#mainNav [data-action='news'] {
  --nav-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3.5h12v13H4.5A1.5 1.5 0 0 1 3 15zM15 7h2v8a1.5 1.5 0 0 1-1.5 1.5M6.5 7h5.5m-5.5 3h5.5m-5.5 3h3'/%3E%3C/svg%3E");
}
#newsPage[hidden], #newsWidget[hidden], .news-open main, .news-open .sdock-mount, .news-open #feedState, .news-empty[hidden] { display: none !important; }
#newsPage { max-width: 880px; margin: 0 auto; padding: 24px 32px 48px; min-height: calc(100dvh - 80px); container-type: inline-size; }
.news-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-heading h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.5px; }
.news-heading h2 { margin: 0; font-size: 14px; font-weight: 700; }
.news-heading .iconbtn { flex: none; }
.news-sync { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.news-list { min-width: 0; }
.news-day {
  margin: 0; padding: 20px 0 8px; color: var(--muted); font-weight: 500; font-size: 11px; border-bottom: 1px solid var(--line);
}
.news-post { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.news-time { font: 11px/1.5 var(--mono); color: var(--muted); }
.news-source { display: block; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.news-headline, .news-text, .news-summary { display: block; margin: 4px 0 0; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.news-headline, .news-text { font-size: calc(15px + var(--news-zoom, 0px)); }
.news-headline { padding: 0; border: 0; background: none; font-weight: 650; text-decoration: none; text-align: start; cursor: pointer; }
.news-headline:is(:hover, :focus-visible) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.news-text, .news-full-post { white-space: pre-wrap; overflow-wrap: anywhere; }
.news-full-post { margin: 0; line-height: 1.55; }
.news-empty { display: grid; justify-items: center; gap: 6px; max-width: 400px; margin: 56px auto 0; padding: 32px 24px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; border: 1px solid var(--hairline, var(--line)); border-radius: 10px; }
.news-empty .icon { width: 22px; height: 22px; margin-bottom: 6px; color: var(--muted); opacity: .8; }
.news-empty .icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.news-empty strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.news-empty .secondary { margin-top: 10px; min-height: 30px; padding-inline: 14px; font-size: 12px; }
#newsWidget { padding: 8px 12px 12px; container-type: inline-size; }
:is(#newsWidget,#watchNews) :is(.news-headline,.news-summary) {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
:is(#newsWidget,#watchNews) .news-headline { font-size: calc(13px + var(--news-zoom, 0px)); }
:is(#newsWidget,#watchNews) .news-summary { color: var(--muted); font-size: calc(12px + var(--news-zoom, 0px)); }
#newsWidget .news-post { padding: 10px 0; gap: 8px; grid-template-columns: 36px minmax(0, 1fr); }
#newsWidget .news-empty, #watchNews .news-empty { margin: 16px 0 0; padding: 20px 12px; font-size: 12px; }
#newsWidget .news-empty strong, #watchNews .news-empty strong { font-size: 13px; }
@media (max-width: 760px) { #newsPage { padding: 20px 16px 40px; } }
@media (max-width: 420px) { header .brand img { display: none; } }
@media (max-width: 355px) { #mainNav button { padding-inline: 4px; } }
.news-heading-label { flex: 1; min-width: 0; }
.news-heading .secondary { min-height: 32px; padding-inline: 12px; font-size: 12px; }
.news-sources .muted { margin: 0 0 12px; }
.news-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 48dvh; overflow: auto; gap: 0 12px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 0; }
.news-choices legend { padding: 0 4px; font-size: 12px; color: var(--muted); }
.news-choices label { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px; overflow-wrap: anywhere; }
.news-choices input[type=checkbox] { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.news-choices label:has(input:disabled) { color: var(--muted); }
.news-choice-count { color: var(--muted); font-size: 12px; }
.news-open > header { position: sticky; top: 0; z-index: 5; }
.sdock-tile[data-panel='news'] .sdock-content { overflow: hidden; }
.sdock-tile[data-panel='news'] #newsWidget { height: 100%; min-height: 0; }
#newsWidget .news-heading { flex: none; }
#newsWidget .news-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 385px) {
  header { height: auto; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding-block: 4px; }
  header .brand img { display: block; }
  header .header-actions { grid-column: 2; grid-row: 1; }
  header #mainNav { grid-row: 2; grid-column: 1 / -1; width: 100%; }
  header #mainNav button { flex: 1; }
}

.news-impact-filter { max-width: 135px; min-width: 0; padding: 3px; font-size: 11px; color:var(--ink); background:var(--panel); border:1px solid var(--line); border-radius:4px; }
.news-post[data-impact='medium'] .news-time { color:#e0bd69; }
.news-post[data-impact='high'] .news-time { color:#f2878c; }
.news-post[data-impact='medium'] .news-time::after, .news-post[data-impact='high'] .news-time::after { display:block; font:9px/1.4 system-ui; }
.news-post[data-impact='medium'] .news-time::after { content:'Medium'; }
.news-post[data-impact='high'] .news-time::after { content:'High'; }
.news-heading-compact { display: grid; align-items: stretch; justify-content: stretch; gap: 2px; margin-block-end: 4px; }
.news-toolbar { display: flex; align-items: center; min-width: 0; gap: 8px; }
.news-toolbar h2 { line-height: 1.15; }
.news-toolbar > .iconbtn { min-width: 28px; min-height: 28px; }
.news-zoom { display: inline-flex; flex: none; border-radius: 4px; border: 1px solid var(--line); }
.news-toolbar .news-zoom { margin-inline-start: auto; }
.news-zoom .iconbtn { width: 23px; height: 24px; padding: 3px; }
.news-zoom .iconbtn + .iconbtn { border-inline-start: 1px solid var(--line); }
.news-zoom .icon { width: 12px; height: 12px; }
@media (pointer: coarse) {
  .news-zoom .iconbtn { width: 32px; height: 32px; }
}
.news-meta { display: grid; gap: 2px; padding-top: 4px; color: var(--muted); font-size: 11px; }
.news-meta .news-sync { margin: 0; }
.news-heading-compact .news-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
#watchNews .news-heading h2 { display:none; }
:is(#watchNews,#newsWidget) .news-list > .news-day { padding-top:8px; }
#watchNews .news-post { padding:8px 0; gap:6px; grid-template-columns:35px minmax(0,1fr); }
@container (max-width: 278px) {
  #newsWidget .news-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 3px 5px; }
  #newsWidget .news-toolbar .news-zoom { grid-area: 1 / 2; }
  #newsWidget .news-toolbar > .iconbtn { grid-area: 1 / 3; }
  #newsWidget .news-toolbar .news-impact-filter { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
}

.news-top { flex: none; padding-block-end: 6px; border-bottom: 1px solid var(--line); }
#newsPage .news-top > .news-heading { flex-wrap: wrap; }
@container (max-width: 500px) {
  #newsPage .news-heading-label { flex-basis: 100%; }
}
.news-sentiment {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px;
  width: min(100%, 132px); justify-self: end;
  padding: 5px 7px 1px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--panel) 96%, var(--ink) 4%);
  font-size: 11px; line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}
.news-sentiment[hidden] { display: none; }
.news-sentiment:is(:hover, :focus-visible) { border-color: var(--muted); }
.news-sentiment:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.news-sentiment-name { font-weight: 700; }
/* The mood word (Extreme Fear, Greed...) is slightly bolder so it reads at a glance. */
.news-sentiment-mood { font-weight: 600; }
.news-sentiment[data-mood='fear'] .news-sentiment-mood { color: var(--down); }
.news-sentiment[data-mood='greed'] .news-sentiment-mood { color: var(--up); }
.news-sentiment-compact:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px;
  width: 100%; min-height: 25px; margin-top: 4px; padding: 3px 6px;
}
.news-sentiment-compact .news-sentiment-name { margin-inline-end: auto; }
/* 24h liquidations sits under Fear & Greed with the same row style. */
/* Scanner row: long green, short red, the same as the Liquidations page. */
.news-liquidations { --liq-long: #63d8bd; --liq-short: #f28795; cursor: default; }
:root[data-theme='light'] .news-liquidations { --liq-long: #0b7d62; --liq-short: #c42b48; }
.news-liquidations:not([hidden]) { flex-wrap: nowrap; }
.news-liquidations .news-sentiment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-liquidations-value {
  display: flex; flex: none; gap: 8px; align-items: baseline;
  font: 650 11px/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap;
}
.news-liquidations-part { display: inline-flex; gap: 3px; align-items: baseline; }
.news-liquidations-part[hidden] { display: none; }
.news-liquidations-part b { font-weight: 650; color: var(--muted); }
.news-liquidations-part.is-long strong { color: var(--liq-long); }
.news-liquidations-part.is-short strong { color: var(--liq-short); }
.news-liquidations.is-stale .news-liquidations-part strong { color: var(--muted); }
.news-sentiment-score {
  min-width: 19px; padding: 2px 3px; border-radius: 3px; text-align: center;
  background: var(--panel); font: 650 11px/1.1 var(--mono); font-variant-numeric: tabular-nums;
}
@media (pointer: coarse) {
  .news-sentiment-compact:not([hidden]) { min-height: 32px; }
}
.news-gauge { position: relative; display: block; width: 120px; max-width: 100%; justify-self: center; }
.news-gauge canvas { display: block; width: 100%; height: auto; }
.news-gauge-score {
  position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center;
  width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--panel); color: var(--ink);
  font: 650 11px/1 var(--mono); font-variant-numeric: tabular-nums;
}
.news-gauge-widget {
  display: grid; align-content: start; justify-items: center; gap: 7px;
  min-height: 100%; padding: 10px 8px; text-align: center;
}
.news-gauge-widget h2 { margin: 0; font-size: 14px; font-weight: 650; }
.news-gauge-widget .news-sentiment { width: min(100%, 210px); justify-self: center; padding: 6px 8px 3px; }
.news-gauge-widget .news-gauge-status { margin: 0; color: var(--muted); font-size: 12px; }
