/* Layout: a briefing bar (brand + filters) over a summary, the topic architecture as the spine, then evidence cards and the coverage log. */
:root {
  --bg: #F3F5F7;
  --panel: #FFFFFF;
  --ink: #14202B;
  --muted: #5A6773;
  --line: #DAE0E6;
  --grid: #E8ECF0;
  --accent: #1E4DA6;
  --accent-soft: #E7EDF9;
  --pos: #1D8556;
  --neg: #BF3A28;
  --neu: #A3ADB7;
  --warn: #A86B12;
  --c1: #1E4DA6;
  --c2: #2C8C88;
  --c3: #B07A26;
  --c4: #8E98A3;
  --shadow: 0 1px 2px rgba(20, 32, 43, .06), 0 6px 20px rgba(20, 32, 43, .06);
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px;
  --gap: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D141B; --panel: #151F29; --ink: #E5EBF0; --muted: #93A0AC; --line: #283542; --grid: #1F2B37;
    --accent: #84A8F2; --accent-soft: #1B2A44; --pos: #4FC48E; --neg: #F27C69; --neu: #66737F; --warn: #E2A94C;
    --c1: #84A8F2; --c2: #4DBDB7; --c3: #D9A54E; --c4: #6E7A86; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D141B; --panel: #151F29; --ink: #E5EBF0; --muted: #93A0AC; --line: #283542; --grid: #1F2B37;
  --accent: #84A8F2; --accent-soft: #1B2A44; --pos: #4FC48E; --neg: #F27C69; --neu: #66737F; --warn: #E2A94C;
  --c1: #84A8F2; --c2: #4DBDB7; --c3: #D9A54E; --c4: #6E7A86; --shadow: none; color-scheme: dark;
}
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--panel); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1320px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-data); }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { height: 48px; width: auto; max-width: 280px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.brand-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fresh { font-size: 12px; color: var(--muted); }
.fresh b { color: var(--ink); font-weight: 500; }

.filters { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 10px; border-top: 1px solid var(--line); }
.field { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.select { text-transform: none; letter-spacing: 0; font-size: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.btn-primary:hover { color: var(--panel); filter: brightness(1.08); }
.btn-danger { color: var(--neg); }
.btn-danger:hover { border-color: var(--neg); color: var(--neg); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

main { display: grid; gap: 28px; padding-block: 24px 48px; }
.notice { border: 1px solid var(--accent); color: var(--ink); background: var(--accent-soft); border-radius: var(--r); padding: 10px 14px; font-size: 13px; }

/* Summary */
.summary { display: grid; gap: 12px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
/* The period shown: its dates first, then what kind of period and what it is compared with. */
.range { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 4px; font-size: 13.5px; color: var(--muted); }
.range-main { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.range-sub::before { content: "·"; margin: 0 9px; }
.range-busy { color: var(--accent); }
.range-busy::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.summary h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.15; margin: 0; text-wrap: balance; }
.takeaway { display: grid; gap: 6px; max-width: 80ch; font-size: 15px; color: var(--muted); }
.takeaway p { margin: 0; }
.takeaway b { color: var(--ink); font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--gap); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 4px; }
.kpi-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-value { font-family: var(--font-display); font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); min-height: 1.45em; }
.kpi-note { font-size: 12px; color: var(--muted); }
.good { color: var(--pos) !important; }
.bad { color: var(--neg) !important; }

/* Sections */
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.sec-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 0; }
.note { font-size: 12.5px; color: var(--muted); margin: 0; }

.rising { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.rising-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); font-weight: 600; margin-right: 4px; }
.rise { display: inline-flex; gap: 8px; align-items: baseline; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.rise:hover { border-color: var(--warn); }
.rise .g { color: var(--muted); font-size: 12px; }
.rise .d { color: var(--warn); font-weight: 600; font-variant-numeric: tabular-nums; }

.arch { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: var(--gap); }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: grid; align-content: start; min-width: 0; overflow: hidden; }
.gcard.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gcard.is-dim { opacity: .55; }
.ghead { all: unset; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 14px 16px 10px; }
.ghead:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gname { font-weight: 600; font-size: 15px; line-height: 1.25; grid-column: 1; }
.gmeta { grid-column: 1; font-size: 12px; color: var(--muted); }
.gn { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-family: var(--font-display); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; align-self: center; }
.gn small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--muted); margin-top: 4px; }
.sentbar { display: flex; height: 5px; margin: 0 16px 8px; border-radius: 3px; overflow: hidden; background: var(--grid); gap: 1px; }
.sentbar i { display: block; height: 100%; }
.tlist { list-style: none; margin: 0; padding: 0 8px 10px; display: grid; }
.trow { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr) 54px 34px 48px; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; font-size: 13px; }
.trow:hover { background: var(--bg); }
.trow:focus-visible { outline: 2px solid var(--accent); }
.trow.is-active { background: var(--accent-soft); }
.tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--neu); }
.tname { overflow-wrap: anywhere; line-height: 1.25; }
.tname.is-rising::after { content: "▲"; margin-left: 5px; font-size: 8px; color: var(--warn); vertical-align: 2px; }
.tbar { height: 6px; background: var(--grid); border-radius: 3px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--c1); border-radius: 3px; }
.tn { text-align: right; font-variant-numeric: tabular-nums; }
.td { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tzero { color: var(--muted); }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: var(--gap); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card h3 + .note { margin-top: -6px; }
.chart { position: relative; min-height: 240px; }
.chart svg { display: block; overflow: visible; }
/* The trend chart stretches to the card's height; its drawing sits on top so it never props the card open. */
#trend-card { grid-template-rows: auto auto auto minmax(240px, 1fr); }
#trend > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#markets { grid-template-rows: auto auto minmax(0, 1fr); }
#outlet-table td:nth-child(2) { white-space: nowrap; }
#market-chart > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tick { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.endlabel { fill: var(--ink); font-size: 11.5px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 6px 10px; font-size: 12px; white-space: nowrap; z-index: 3; font-variant-numeric: tabular-nums; }
.tip .h { color: var(--muted); margin-bottom: 2px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.empty { display: flex; align-items: center; justify-content: center; min-height: inherit; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }


.twrap { overflow: auto; max-height: 30rem; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; white-space: nowrap; }
table.t td { padding: 7px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.t .r { text-align: right; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--bg); }
.sent { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.sent-pos { color: var(--pos); }
.sent-neg { color: var(--neg); }
.sent-neu { color: var(--muted); }
.cov-title a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.cov-title a:hover { color: var(--accent); border-color: var(--accent); }
.cov-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cov-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { flex: 1 1 220px; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.multi { display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 999px; padding: 0 7px; margin: 2px 4px 0 0; white-space: nowrap; }
.overlap { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); gap: 28px; margin-top: var(--gap); padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.ov-k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.ov-v { font-family: var(--font-display); font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.ov-pairs { display: grid; gap: 2px; min-width: 0; align-content: start; }
.ov-pair { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 200px) 56px; gap: 16px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.ov-pair:hover { background: var(--bg); }
.ov-pair:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ov-names { display: flex; gap: 6px; min-width: 0; }
.ov-names span:not(.ov-plus) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-plus { flex: none; color: var(--muted); }
.ov-bar { height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.ov-bar i { display: block; height: 100%; border-radius: 3px; background: var(--c1); }
.ov-n { text-align: right; font-variant-numeric: tabular-nums; }
.subfilter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; border-left: 3px solid var(--sw, var(--line)); background: var(--bg); border-radius: 0 8px 8px 0; }
.subfilter .k { font-size: 12px; color: var(--muted); margin-right: 4px; }
.subfilter button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.subfilter button span { color: var(--muted); margin-left: 4px; }
.subfilter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.subfilter button[aria-pressed="true"] span { color: inherit; opacity: .8; }
.tag { display: inline-block; font-size: 11.5px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin: 2px 4px 0 0; }
@media (max-width: 720px) { .hide-sm { display: none; } .brand-sub { display: none; } }

/* Admin */
.admin-head h1 { font-family: var(--font-display); font-weight: 400; font-size: 30px; margin: 0 0 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabpanel { display: grid; gap: var(--gap); }
.drop { display: grid; place-items: center; gap: 8px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r); padding: 36px 16px; background: var(--panel); cursor: pointer; }
.drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 16px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px 16px; }
.mapgrid label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.mapgrid .req { color: var(--neg); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-family: var(--font-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.msg { font-size: 13px; }
.msg.err { color: var(--neg); }
.msg.ok { color: var(--pos); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.logo-prev { min-height: 60px; display: flex; align-items: center; justify-content: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); }
.logo-prev img { max-height: 48px; max-width: 100%; }
.alias { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 13px; }
.log { margin: 0; font-family: var(--font-data); font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lock { max-width: 460px; margin: 40px auto 0; }
.lock .select { flex: 1 1 180px; min-width: 0; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 70ch; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Hosted app additions: page basics (the artifact platform supplied these), sign-in, user menu, users and Talkwalker panels. */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
.who { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.who b { color: var(--ink); font-weight: 500; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.signin-card { width: min(100%, 420px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px; display: grid; gap: 14px; }
.signin-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin: 0; }
.signin-card .eyebrow { margin-bottom: -6px; }
.signin-card form { display: grid; gap: 10px; }
.signin-card label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.signin-card input { font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.signin-card input.code { font-family: var(--font-data); font-size: 22px; letter-spacing: .3em; text-align: center; }
.signin-card .btn { padding: 10px 14px; font-size: 14px; }
.linkbtn { all: unset; cursor: pointer; color: var(--accent); font-size: 13px; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.pill-s { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.adduser { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adduser input { flex: 1 1 240px; min-width: 0; }
tr.is-deleted td { color: var(--muted); }
tr.is-deleted td:first-child { text-decoration: line-through; }

/* Filter bar: one row of compact pickers. A picker that narrows the data is tinted. */
.pick { position: relative; display: inline-flex; align-items: center; min-width: 0; max-width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 13px; transition: border-color .15s, background-color .15s; }
.pick:hover { border-color: var(--muted); }
.pick.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pick::after { content: ""; position: absolute; right: 13px; top: 50%; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-75%) rotate(45deg); pointer-events: none; opacity: .65; }
.pick select { field-sizing: content; appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; height: 100%; max-width: 100%; padding: 0 32px 0 12px; border-radius: 10px; cursor: pointer; text-overflow: ellipsis; }
.pick select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick select option, .pick select optgroup { color: var(--ink); background: var(--panel); }
.dates { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pick-date { height: 36px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); color: var(--accent); padding: 0 12px; font: inherit; font-size: 13px; }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.reset { margin-left: 4px; }

/* Topic picker */
.dd { position: relative; min-width: 0; max-width: 100%; }
.dd > summary { list-style: none; padding: 0 32px 0 12px; cursor: pointer; user-select: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dd[open] > summary { border-color: var(--accent); }
#f-topics-sum { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 6; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 560px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 32, 43, .16); font-size: 13px; color: var(--ink); }
.dd-panel.to-left { left: auto; right: 0; }
.dd-search { margin: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 13px; min-width: 0; }
.dd-list { overflow: auto; overscroll-behavior: contain; padding: 0 6px; border-top: 1px solid var(--grid); }
.dd-group { padding: 6px 0; border-bottom: 1px solid var(--grid); }
.dd-group:last-child { border-bottom: 0; }
.dd-row { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.dd-row:hover { background: var(--bg); }
.dd-row.t { padding-left: 33px; }
.dd-row input { margin: 0; width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.dd-row.g .dd-name { font-weight: 600; }
.dd-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dd-empty { padding: 16px 8px; }
.dd-foot { display: flex; align-items: center; gap: 12px; padding: 10px; border-top: 1px solid var(--line); }
.dd-foot .btn { margin-left: auto; padding: 6px 14px; }
.dd-mode { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.dd-mode button { border: 0; background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.dd-mode button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 32, 43, .14); }

/* Channels: one row per channel, its platforms beneath; every row filters the dashboard */
.chanlist { display: grid; }
.chanhead, .crow { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(40px, 1fr) 64px 44px 60px; align-items: center; gap: 12px; padding: 7px 8px; font-variant-numeric: tabular-nums; }
.chanhead { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); padding-top: 0; }
.chanhead span:nth-child(n+3) { text-align: right; }
.crow { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(40px, 1fr) 64px 44px 60px; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; }
.crow:hover { background: var(--bg); }
.crow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.crow[aria-pressed="true"] { background: var(--accent-soft); }
.crow.ch { font-weight: 600; margin-top: 4px; }
.crow.pl { color: var(--muted); }
.crow.pl .crow-name { padding-left: 20px; }
.crow-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crow-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow-name .sw { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.crow-bar { height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.crow-bar i { display: block; height: 100%; border-radius: 3px; }
.crow.pl .crow-bar i { opacity: .55; }
.crow-n, .crow-pct, .crow-net { text-align: right; }
.crow-n { color: var(--ink); }
.crow-pct { color: var(--muted); font-weight: 400; }
.trow.is-out .tname { text-decoration: line-through; color: var(--muted); }
.tick-on { fill: var(--ink); font-weight: 600; }

/* Top stories */
.stories { list-style: none; margin: 0; padding: 0; display: grid; }
.story { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--grid); align-items: baseline; }
.story:last-child { border-bottom: 0; }
.story-rank { font-family: var(--font-display); font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.story-main { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; font-size: 14px; }
.story-main .cov-sub { display: flex; align-items: center; gap: 7px; margin: 0; font-variant-numeric: tabular-nums; }
.story-main .tdot { flex: none; }
.story-see { white-space: nowrap; }
#stories-more { justify-self: start; }

@media (max-width: 720px) {
  .topbar { position: static; }
  .filters { gap: 6px; }
  .sep { display: none; }
  .dd { position: static; }
  .dd-panel, .dd-panel.to-left { left: 0; right: 0; width: auto; }
  .story { grid-template-columns: 20px minmax(0, 1fr); }
  .story-see { grid-column: 2; justify-self: start; }
  .brand img { height: 40px; }
  .chanhead, .crow { grid-template-columns: minmax(0, 1fr) 52px 40px 52px; gap: 8px; }
  .crow-bar, .chanhead span:nth-child(2) { display: none; }
  .overlap { grid-template-columns: 1fr; gap: 16px; }
  .ov-pair { grid-template-columns: minmax(0, 1fr) 48px; }
  .ov-bar { display: none; }
}
