/* Look: a deep navy sidebar beside a bright workspace, with colour reserved for meaning (tone of a figure, source, sentiment). */
:root {
  color-scheme: light;
  --page: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --ink: #101828;
  --ink-2: #475467;
  --muted: #667085;
  --grid: #e4e7ec;
  --axis: #c9ced8;
  --border: #e4e7ec;
  --hover: rgba(16, 24, 40, 0.05);
  --chip: rgba(16, 24, 40, 0.075);
  --accent: #12553D;
  --accent-ink: #0E4430;
  --accent-soft: #E3F1EA;
  --brand-red: #AB221E;
  --positive: #2a78d6;
  --neutral: #c3c2b7;
  --negative: #e34948;
  --delta-up: #067647;
  --delta-down: #b42318;
  --mark: #fff0b3;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --nav: #0F2E23;
  --nav-2: #184434;
  --nav-ink: #D3E2DA;
  --nav-muted: #93B5A6;
  --nav-active: #1C7A57;
  --blue: #2a78d6; --blue-soft: #e4effc;
  --teal: #0e9384; --teal-soft: #d9f5f1;
  --violet: #6250d6; --violet-soft: #ebe9fb;
  --amber: #b54708; --amber-soft: #fef0c7;
  --red: #d92d20; --red-soft: #fee4e2;
  --pink: #c11574; --pink-soft: #fce7f3;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --heading-font: "Montserrat", "Poppins", "Hind Siliguri", "Segoe UI", system-ui, sans-serif;
  font-family: "Poppins", "Hind Siliguri", "Segoe UI", system-ui, -apple-system, "Nirmala UI", "Noto Sans Bengali", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0a1120; --surface: #131c2f; --surface-2: #19243a; --ink: #eef2f8; --ink-2: #b4bfd1; --muted: #8d9ab0;
    --grid: #25314a; --axis: #3a4763; --border: #25314a; --hover: rgba(255, 255, 255, 0.07); --chip: rgba(255, 255, 255, 0.09);
    --accent: #2E9A6E; --accent-ink: #8FD6B5; --accent-soft: #133A2B;
    --positive: #3987e5; --neutral: #5a6478; --negative: #e66767; --delta-up: #32d583; --delta-down: #f97066; --mark: #5c4a00;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --nav: #0A2219; --nav-2: #143628;
    --blue: #6aa6f0; --blue-soft: #17325a; --teal: #2dd4bf; --teal-soft: #0f3a3a; --violet: #a79bf0; --violet-soft: #2a2654;
    --amber: #fdb022; --amber-soft: #43300a; --red: #f97066; --red-soft: #4a1d1a; --pink: #f178b6; --pink-soft: #4a1a35;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0a1120; --surface: #131c2f; --surface-2: #19243a; --ink: #eef2f8; --ink-2: #b4bfd1; --muted: #8d9ab0;
  --grid: #25314a; --axis: #3a4763; --border: #25314a; --hover: rgba(255, 255, 255, 0.07); --chip: rgba(255, 255, 255, 0.09);
  --accent: #2E9A6E; --accent-ink: #8FD6B5; --accent-soft: #133A2B;
  --positive: #3987e5; --neutral: #5a6478; --negative: #e66767; --delta-up: #32d583; --delta-down: #f97066; --mark: #5c4a00;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --nav: #0A2219; --nav-2: #143628;
  --blue: #6aa6f0; --blue-soft: #17325a; --teal: #2dd4bf; --teal-soft: #0f3a3a; --violet: #a79bf0; --violet-soft: #2a2654;
  --amber: #fdb022; --amber-soft: #43300a; --red: #f97066; --red-soft: #4a1d1a; --pink: #f178b6; --pink-soft: #4a1a35;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.45; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon { flex: none; display: block; }

.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; background: var(--nav); color: var(--nav-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--nav-2) transparent; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: #fff; text-decoration: none; }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--nav-active); color: #fff; }
.mainnav { display: grid; gap: 3px; }
.nav-group { display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 0; padding: 8px 10px 6px; border: 0; background: none; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nav-muted); text-align: left; cursor: pointer; }
.nav-group:hover { color: #fff; }
.nav-group[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.navlink { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 14px; border-radius: 8px; color: var(--nav-ink); text-decoration: none; font-weight: 500; }
.navlink:hover { background: var(--nav-2); color: #fff; }
.navlink[aria-current="page"] { background: var(--nav-active); color: #fff; }
.side-title { margin: 10px 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nav-muted); }
.topics { display: grid; gap: 1px; }
.folder { margin: 10px 10px 2px; font-size: 12px; font-weight: 600; color: var(--nav-muted); }
.topic { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 7px; background: none; color: var(--nav-ink); text-align: left; cursor: pointer; }
.topic:hover { background: var(--nav-2); color: #fff; }
.topic[aria-current="true"] { background: var(--nav-2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--nav-active); }
.topic .n { flex: none; padding: 0 7px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: var(--nav-ink); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 400; }
.userchip { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 10px; border-radius: 10px; background: var(--nav-2); color: #fff; text-decoration: none; }
.sidebar .topics { margin-bottom: 14px; }
.userchip:hover { filter: brightness(1.2); }
.userchip small { display: block; color: var(--nav-muted); font-size: 12px; }
.userchip div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Header */
.main { min-width: 0; padding: 22px 28px 48px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.subheading { color: var(--muted); margin-top: 2px; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); position: relative; }
.status .live { display: inline-flex; align-items: center; gap: 7px; }
.status .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.18); }
.status details summary { cursor: pointer; color: var(--amber); font-weight: 500; }
.status details ul { position: absolute; z-index: 5; right: 0; top: 100%; width: 340px; max-height: 300px; overflow: auto; margin: 6px 0 0; padding: 10px 10px 10px 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.iconbtn { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { color: var(--ink); background: var(--surface-2); }
.new-version { margin-bottom: 14px; padding: 9px 14px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03); }
.btn:hover { background: var(--surface-2); }
.btn:disabled { cursor: default; opacity: 0.55; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
:root[data-theme="dark"] .btn.primary:hover { color: #0a1120; }
.btn.linkbtn { text-decoration: none; }
.btn.small { min-height: 28px; padding: 0 9px; font-size: 12px; }
.linklike { padding: 0; border: 0; background: none; color: var(--accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.form-error { margin: 0; color: var(--delta-down); font-size: 13px; }
.field { display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); flex: 1 1 200px; min-width: 0; }
.field input, .field select, .field textarea, .link-box input, .row-actions select { width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 400; }
.field textarea { resize: vertical; }
.row-actions select { width: auto; min-height: 36px; padding: 0 8px; }
.check { display: inline-flex; gap: 7px; align-items: center; color: var(--ink-2); cursor: pointer; }
.field-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.field-inline input { width: 84px; height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.grow-input { flex: 1 1 200px; min-width: 0; height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.color-field { flex: 0 0 90px; }
.color-field input { padding: 2px; }
fieldset.plain { margin: 0; padding: 0; border: 0; }
fieldset.plain legend { padding: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.wide-field { flex: 2 1 320px; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.form-row.actions { align-items: center; }
.stack { display: grid; gap: 12px; min-width: 0; }
.narrow { max-width: 500px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.filters input[type="search"] { flex: 1 1 240px; min-width: 0; }
.filters input[type="search"], .filters select, .more-panel select { height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); max-width: 100%; }
.more-filters { position: static; }
.more-filters summary { list-style: none; }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters[open] summary { background: var(--accent-soft); border-color: var(--accent); }
.more-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; margin-top: 8px; }
.filters:has(.more-filters[open]) .more-filters { flex: 1 1 100%; }
.views-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.views-row select, .views-row input, .tag-add { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.view-name { width: 170px; }

/* Tabs */
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.dash-tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 400px; padding: 4px; border-radius: 10px; background: var(--hover); }
.dash-tabs button { padding: 6px 12px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.dash-tabs button:hover { color: var(--ink); }
.dash-tabs button[aria-selected="true"] { background: var(--surface); color: var(--accent-ink); font-weight: 600; box-shadow: var(--shadow); }
.dash-actions, .export-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Cards and figures */
#view { outline: none; transition: opacity 0.12s; }
#view.loading { opacity: 0.55; }
.tile, .card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 16px 18px; min-width: 0; box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tile .label { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.tile-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; }
.tile .value { font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-top: 2px; }
.tile .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tone-blue .tile-icon { background: var(--blue-soft); color: var(--blue); }
.tone-teal .tile-icon { background: var(--teal-soft); color: var(--teal); }
.tone-violet .tile-icon { background: var(--violet-soft); color: var(--violet); }
.tone-amber .tile-icon { background: var(--amber-soft); color: var(--amber); }
.tone-red .tile-icon { background: var(--red-soft); color: var(--red); }
.tone-pink .tile-icon { background: var(--pink-soft); color: var(--pink); }
.tile .sub.delta-up { color: var(--delta-up); font-weight: 500; }
.tile .sub.delta-down { color: var(--delta-down); font-weight: 500; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.card.wide { margin-bottom: 12px; }
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 600; margin: 0 !important; }
.section-title { font-size: 16px; font-weight: 600; margin-top: 12px; }
.widget-title { margin: 6px 0; font-size: 14px; font-weight: 600; }
.widget-row select { height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); max-width: 220px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.empty { padding: 56px 16px; text-align: center; color: var(--ink-2); border: 1px dashed var(--axis); border-radius: 12px; }
.meta { color: var(--ink-2); font-size: 13px; }
.intro { max-width: 70ch; }
.scroll-x { overflow-x: auto; }
.row-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.row-main { min-width: 0; flex: 1 1 280px; display: grid; gap: 3px; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.muted-row { opacity: 0.65; }
.keywords { font-size: 12.5px; }
.picker { margin-bottom: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.picker summary { cursor: pointer; font-weight: 600; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; margin-top: 10px; }

.rule-box { font-family: Consolas, "Cascadia Mono", "Nirmala UI", monospace; font-size: 13px !important; line-height: 1.5; }
.rule-help summary { cursor: pointer; color: var(--accent-ink); font-size: 13px; }
.rule-help ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
code { padding: 0 4px; border-radius: 4px; background: var(--hover); font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
.rule-preview { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); max-height: 320px; overflow: auto; }
.sort-select { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.feed-summary { margin-bottom: 12px; }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-bottom: 1px solid var(--border); margin: -16px -18px 12px; }
.strip > div { padding: 14px 18px; border-right: 1px solid var(--border); }
.strip > div:last-child { border-right: 0; }
.strip .num-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.strip .num-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.trend .area { fill: url(#trendFill); stroke: none; }
.trend .line { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.trend .peak { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.trend .peak-ring { fill: var(--accent); opacity: 0.18; }
.trend .fill-a { stop-color: var(--accent); stop-opacity: 0.28; }
.trend .fill-b { stop-color: var(--accent); stop-opacity: 0.02; }
.gauge { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto 2px; }
.gauge .track { fill: none; stroke: var(--grid); stroke-width: 14; stroke-linecap: round; }
.gauge .arc { fill: none; stroke-width: 14; stroke-linecap: round; }
.gauge .arc.pos { stroke: var(--positive); }
.gauge .arc.neg { stroke: var(--negative); }
.gauge text { fill: var(--ink); font-weight: 700; font-size: 26px; text-anchor: middle; }
.gauge .small { fill: var(--muted); font-size: 11px; font-weight: 400; }

/* Feed */
.feed-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.feed-head .count { font-weight: 600; }
.mention { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 14px; padding: 15px 18px 13px 44px; margin-bottom: 10px; border: 1px solid var(--border); border-left: 4px solid var(--axis); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.mention[data-sentiment="positive"] { border-left-color: var(--positive); }
.mention[data-sentiment="negative"] { border-left-color: var(--negative); }
.mention[data-sentiment="neutral"] { border-left-color: var(--neutral); }
.select-box { position: absolute; left: 14px; top: 16px; }
.mention h2, .mention-meta, .snippet { grid-column: 1; }
.mention h2 { font-size: 15.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.mention h2 a { text-decoration: none; }
.mention h2 a:hover { color: var(--accent-ink); text-decoration: underline; }
.mention .thumb { grid-column: 2; grid-row: 1 / span 3; width: 104px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--hover); }
.mention-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink-2); font-size: 13px; }
.mention-meta strong { color: var(--ink); font-weight: 600; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; }
.userchip .avatar { width: 32px; height: 32px; font-size: 14px; }
.av0 { background: #2a78d6; } .av1 { background: #0e9384; } .av2 { background: #6250d6; } .av3 { background: #b54708; } .av4 { background: #c11574; } .av5 { background: #1d7a3e; }
.source-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.src-website { background: var(--blue-soft); color: var(--blue); }
.src-youtube { background: var(--red-soft); color: var(--red); }
.src-x { background: var(--hover); color: var(--ink); }
.src-facebook { background: var(--blue-soft); color: var(--accent-ink); }
.src-instagram { background: var(--pink-soft); color: var(--pink); }
.src-bluesky { background: var(--teal-soft); color: var(--teal); }
.src-reddit { background: var(--amber-soft); color: var(--amber); }
.src-comment { background: var(--violet-soft); color: var(--violet); }
.snippet { color: var(--ink-2); overflow-wrap: anywhere; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.mention footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 500; }
.tag.search { background: var(--amber-soft); color: var(--amber); }
.tag.spike { margin-left: 6px; background: var(--amber-soft); color: var(--amber); }
.tag.on { background: var(--teal-soft); color: var(--teal); font-weight: 600; }
.tag.off { background: var(--hover); color: var(--muted); }
.tags-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tag.removable { border: 0; cursor: pointer; background: var(--violet-soft); color: var(--violet); }
.tag.removable:hover { filter: brightness(0.95); }
.tag-add { height: 24px; padding: 0 6px; font-size: 12px; border-radius: 10px; }
.sentiment { display: inline-flex; gap: 3px; margin-left: auto; align-items: center; }
.sentiment .label { margin-right: 6px; color: var(--muted); font-size: 12px; }
.sentiment button { padding: 3px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 500; }
.sentiment button:hover { background: var(--surface-2); }
.sentiment button:disabled { cursor: default; opacity: 0.7; }
.sentiment button[aria-pressed="true"][data-s="positive"] { background: var(--positive); border-color: var(--positive); color: #fff; }
.sentiment button[aria-pressed="true"][data-s="neutral"] { background: var(--neutral); border-color: var(--neutral); color: var(--ink); }
.sentiment button[aria-pressed="true"][data-s="negative"] { background: var(--negative); border-color: var(--negative); color: #fff; }
.more-list { grid-column: 1 / -1; margin: 8px 0 0; padding: 8px 0 0 16px; border-top: 1px solid var(--border); font-size: 13px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; color: var(--ink-2); }

/* Charts and lists */
.trend { width: 100%; height: auto; display: block; }
.trend text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.trend .grid { stroke: var(--grid); stroke-width: 1; }
.trend .base { stroke: var(--axis); stroke-width: 1; }
.trend .bar { fill: var(--accent); }
.trend .hit { fill: transparent; cursor: default; }
.trend .hit:hover, .trend .hit:focus { fill: var(--hover); outline: none; }
.trend .hit.open { cursor: pointer; }
.trend .series { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; }
.trend .dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.trend .seg.positive { fill: var(--positive); }
.trend .seg.neutral { fill: var(--neutral); }
.trend .seg.negative { fill: var(--negative); }
.tooltip { position: fixed; z-index: 10; pointer-events: none; padding: 6px 9px; border-radius: 6px; background: var(--ink); color: var(--surface); font-size: 12px; white-space: nowrap; }
table.data { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.data th, table.data td { padding: 7px 6px; border-bottom: 1px solid var(--grid); text-align: left; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.topic-table { margin-top: 0; }
.topic-table .linklike { text-align: left; text-decoration: none; font-weight: 500; }
.topic-table .linklike:hover { text-decoration: underline; }
.source-table td { vertical-align: top; }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.spark circle { fill: var(--accent); }
.split { display: flex; gap: 2px; height: 14px; margin-bottom: 10px; }
.split span { min-width: 2px; }
.split span:first-child { border-radius: 4px 0 0 4px; }
.split span:last-child { border-radius: 0 4px 4px 0; }
.split .positive, .swatch.positive { background: var(--positive); }
.split .neutral, .swatch.neutral { background: var(--neutral); }
.split .negative, .swatch.negative { background: var(--negative); }
.split .unscored, .swatch.unscored { background: var(--grid); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 13px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.s1 { --series: var(--s1); } .s2 { --series: var(--s2); } .s3 { --series: var(--s3); } .s4 { --series: var(--s4); }
.s5 { --series: var(--s5); } .s6 { --series: var(--s6); } .s7 { --series: var(--s7); } .s8 { --series: var(--s8); }
.swatch[class*=" s"] { background: var(--series); }
.rank { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rank li { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) 44px; gap: 8px; align-items: center; font-size: 13px; }
.rank .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .track { display: block; height: 8px; border-radius: 4px; background: var(--hover); }
.rank .fill { display: block; height: 8px; min-width: 2px; border-radius: 4px; background: var(--accent); }
.rank .fill[class*=" s"] { background: var(--series); }
.rank .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.stories { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stories li { display: flex; justify-content: space-between; gap: 12px; }
.stories .num { color: var(--ink-2); white-space: nowrap; font-size: 13px; }
.stories li.latest { display: grid; gap: 1px; }
.stories a { overflow-wrap: anywhere; text-decoration: none; font-weight: 500; }
.stories a:hover { color: var(--accent-ink); text-decoration: underline; }
.summaries { display: grid; gap: 8px; }
.summaries summary { cursor: pointer; font-weight: 600; }
.summary-text { white-space: pre-line; color: var(--ink-2); margin: 6px 0 4px; max-width: 80ch; }
.section-box { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.section-box.targeted { border-color: var(--accent); background: var(--accent-soft); }
.pick-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--grid); overflow-wrap: anywhere; }
.news-preview { width: 100%; height: 620px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

/* Login: a newsroom front page */
.auth-page {
  --ap-paper: #f6f3ec; --ap-sheet: #fffdf8; --ap-ink: #16181d; --ap-ink-2: #3d4250; --ap-muted: #6f6a60;
  --ap-rule: #d9d3c6; --ap-rule-strong: #16181d; --ap-field: #ffffff; --ap-focus: #12553D;
  --ap-grad: linear-gradient(90deg, #12553D 0%, #1C7A57 60%, #AB221E 100%);
  --ap-serif: "Montserrat", "Poppins", "Hind Siliguri", "Segoe UI", sans-serif;
  display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; margin: 0;
  color: var(--ap-ink); background: var(--ap-paper);
}
:root:not([data-theme="light"]) .auth-page { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth-page {
    --ap-paper: #121317; --ap-sheet: #1a1c22; --ap-ink: #f1ede4; --ap-ink-2: #c9c4b8; --ap-muted: #9a958a;
    --ap-rule: #2f3139; --ap-rule-strong: #f1ede4; --ap-field: #111216; --ap-focus: #8FD6B5;
  }
}
:root[data-theme="dark"] .auth-page {
  --ap-paper: #121317; --ap-sheet: #1a1c22; --ap-ink: #f1ede4; --ap-ink-2: #c9c4b8; --ap-muted: #9a958a;
  --ap-rule: #2f3139; --ap-rule-strong: #f1ede4; --ap-field: #111216; --ap-focus: #8FD6B5;
}

.ap-mast { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 clamp(16px, 4vw, 56px); padding: 18px 0 14px; border-bottom: 3px double var(--ap-rule-strong); }
.ap-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -0.01em; }
.ap-brand .logo-mark { width: 30px; height: auto; }
.ap-date { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; margin: 0; color: var(--ap-muted); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }

.ap-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); margin: 0 clamp(16px, 4vw, 56px); }
.ap-story { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: clamp(32px, 6vh, 72px) clamp(0px, 4vw, 64px) clamp(32px, 6vh, 72px) 0; border-right: 1px solid var(--ap-rule); }
.ap-kicker { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ap-ink-2); font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.ap-bar { display: inline-block; width: 44px; height: 4px; border-radius: 2px; background: var(--ap-grad); }
.ap-head { max-width: 17ch; margin: 0; font-family: var(--ap-serif); font-size: clamp(38px, 4.6vw, 66px); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
.ap-deck { max-width: 34em; margin: 0; padding-left: 14px; border-left: 2px solid var(--ap-rule-strong); color: var(--ap-ink-2); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; }

.ap-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; padding: 40px 0 40px clamp(24px, 4vw, 64px); }
.auth-page .auth-card { display: grid; gap: 10px; width: 100%; max-width: 380px; padding: 30px 28px 26px; border: 1px solid var(--ap-rule); border-top: 4px solid transparent; border-image: none; background: linear-gradient(var(--ap-sheet), var(--ap-sheet)) padding-box, var(--ap-grad) border-box; border-radius: 4px; box-shadow: 0 1px 0 var(--ap-rule), 0 18px 40px -28px rgba(22, 24, 29, 0.35); }
.ap-eyebrow { margin: 0; color: var(--ap-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.auth-page .auth-card h1 { margin: 0; font-family: var(--ap-serif); font-size: 32px; font-weight: 600; letter-spacing: -0.01em; }
.ap-intro { margin: 0; color: var(--ap-ink-2); font-size: 14.5px; line-height: 1.5; }
.ap-intro:empty { display: none; }
.auth-page .auth-card form { display: grid; gap: 16px; margin-top: 10px; }
.auth-page .field { display: grid; gap: 6px; color: var(--ap-ink-2); font-size: 13.5px; font-weight: 600; }
.auth-page .field input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; border: 1px solid var(--ap-rule); border-radius: 4px; background: var(--ap-field); color: var(--ap-ink); font: inherit; font-size: 15.5px; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.auth-page .field input:hover { border-color: var(--ap-muted); }
.auth-page .field input:focus { outline: none; border-color: var(--ap-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ap-focus) 22%, transparent); }
.ap-pass { position: relative; display: block; }
.ap-pass input { padding-right: 64px !important; }
.ap-show { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 32px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--ap-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ap-show:hover { color: var(--ap-ink); background: color-mix(in srgb, var(--ap-ink) 7%, transparent); }
.ap-show:focus-visible { outline: 2px solid var(--ap-focus); outline-offset: 1px; }
.auth-page .auth-card .btn.primary { position: relative; min-height: 48px; margin-top: 4px; border: 0; border-radius: 4px; background: var(--ap-ink); color: var(--ap-paper); font-size: 15.5px; font-weight: 700; letter-spacing: 0.01em; cursor: pointer; overflow: hidden; }
.auth-page .auth-card .btn.primary::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ap-grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.auth-page .auth-card .btn.primary:hover::after, .auth-page .auth-card .btn.primary:focus-visible::after { transform: scaleX(1); }
.auth-page .auth-card .btn.primary:focus-visible { outline: 2px solid var(--ap-focus); outline-offset: 2px; }
.auth-page .auth-card .btn.primary:disabled { opacity: .6; cursor: progress; }
.ap-foot { margin: 4px 0 0; font-size: 14px; }
.ap-foot:empty { display: none; }
.ap-foot a { color: var(--ap-ink); text-decoration: underline; text-decoration-color: var(--ap-rule); text-underline-offset: 3px; }
.ap-foot a:hover { text-decoration-color: currentColor; }
.ap-note { max-width: 380px; margin: 0; color: var(--ap-muted); font-size: 12.5px; text-align: center; }

.ap-base { display: flex; justify-content: space-between; gap: 12px; margin: 0 clamp(16px, 4vw, 56px); padding: 14px 0 18px; border-top: 1px solid var(--ap-rule); color: var(--ap-muted); font-size: 12.5px; }

.ap-grad-text { background: linear-gradient(95deg, #12553D 0%, #1C7A57 55%, #AB221E 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: .06em; }
.ap-panel { position: relative; isolation: isolate; }
.auth-page { overflow-x: clip; }
.ap-panel::before { content: ''; position: absolute; z-index: -1; top: 50%; left: 50%; width: min(700px, 135%); aspect-ratio: 1.1; transform: translate(-50%, -52%); border-radius: 50%; background: radial-gradient(circle at 30% 35%, rgba(18, 85, 61, .55), transparent 58%), radial-gradient(circle at 72% 30%, rgba(201, 244, 227, .9), transparent 55%), radial-gradient(circle at 60% 75%, rgba(171, 34, 30, .35), transparent 58%), radial-gradient(circle at 30% 80%, rgba(28, 122, 87, .4), transparent 55%); filter: blur(48px); opacity: .85; pointer-events: none; }
.auth-page .auth-card .btn.primary { background-image: linear-gradient(#12553D, #12553D); color: #fff; transition: background-image .2s; }
.auth-page .auth-card .btn.primary:hover:not(:disabled) { background-image: linear-gradient(95deg, #12553D 0%, #1C7A57 60%, #AB221E 100%); color: #fff; }
.auth-page .auth-card .btn.primary:hover::after { transform: scaleX(0); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ap-panel::before { opacity: .4; } }
:root[data-theme="dark"] .ap-panel::before { opacity: .4; }
@media (max-width: 960px) { .ap-panel::before { width: 90%; transform: translate(-50%, -50%); } }
@media (max-width: 960px) {
  .ap-body { grid-template-columns: minmax(0, 1fr); }
  .ap-story { padding: 28px 0 8px; border-right: 0; gap: 14px; }
  .ap-head { font-size: clamp(30px, 7vw, 44px); max-width: 18ch; }
  .ap-panel { padding: 20px 0 32px; }
}
@media (max-width: 560px) {
  .ap-mast { align-items: flex-start; }
  .ap-date { display: none; }
  .ap-deck { font-size: 15.5px; }
  .auth-page .auth-card { padding: 24px 18px 20px; }
  .ap-base { flex-direction: column; gap: 4px; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; max-height: none; padding: 12px; }
  .mainnav { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .nav-group { grid-column: 1 / -1; }
  .side-title, .topics { display: none; }
  .userchip { margin-top: 10px; }
  .main { padding: 16px; }
  .mention { grid-template-columns: minmax(0, 1fr); padding-right: 14px; }
  .mention .thumb { display: none; }
  .sentiment { margin-left: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .status .live { display: none; }
}
/* Topic set-up */
.wizard { display: grid; gap: 14px; margin-bottom: 12px; }
.wizard-title { font-size: 18px; font-weight: 600; margin: 0; }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.start-card { display: grid; gap: 8px; justify-items: start; align-content: start; padding: 18px; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.start-card:hover { background: var(--surface-2); border-color: var(--axis); }
.tone-blue-bg { background: var(--blue-soft); color: var(--blue); }
.wizard-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.wizard-steps { display: grid; gap: 4px; }
.wizard-steps button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-weight: 500; text-align: left; cursor: pointer; }
.wizard-steps button:hover { background: var(--hover); }
.wizard-steps button[aria-current="step"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.wizard-body { min-width: 0; }
.wizard-preview { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.wizard-preview h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.source-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px; gap: 6px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.source-text { display: grid; min-width: 0; }
.source-chip.big { justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; }
.source-row select, .source-values { width: 100%; padding: 7px 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 14px; }
.source-values { grid-column: 1 / -1; resize: vertical; }
/* Post reactions */
.split.thin { height: 8px; margin-top: 8px; }
.reactions { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.reaction { padding: 12px 0; border-top: 1px solid var(--border); }
.reaction:first-child { padding-top: 0; border-top: 0; }
.reaction-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.theme-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
@media (max-width: 900px) {
  .wizard-grid { grid-template-columns: minmax(0, 1fr); }
  .wizard-steps { display: flex; flex-wrap: wrap; }
}

/* Claim checks and public needs */
.tag.status-false { background: var(--red-soft, #fee4e2); color: var(--red, #b42318); }
.plain-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.plain-list.claims li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.plain-list.claims li:first-child { padding-top: 0; border-top: 0; }
.claim-open { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.claim-open:hover strong { color: var(--accent-ink); text-decoration: underline; }
.stories li.suggestion { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.stories li.suggestion > div { flex: 1 1 260px; min-width: 0; }
.linklike.strong { font-weight: 600; text-align: left; }
.minor { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.case { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.case:first-child { padding-top: 0; border-top: 0; }
.case p { margin: 0; }
.case-form { margin-top: 4px; }
.guide h2 { margin-bottom: 0; }
.guide-steps { display: grid; gap: 7px; margin: 0; padding-left: 20px; }

/* Public complaint form */
.public-page { min-height: 100vh; padding: 24px 16px 48px; background: var(--page); }
.public-card { display: grid; gap: 22px; max-width: 640px; margin: 0 auto; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.public-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.public-head h1 { margin: 0; font-size: 22px; font-weight: 700; }
.public-card h2 { margin: 0; font-size: 16px; font-weight: 600; }
.public-card p { margin: 0; }
.public-card .field select, .public-card .field textarea { font-family: inherit; }
.public-track { padding-top: 20px; border-top: 1px solid var(--border); }
.public-track-go { display: flex; align-items: flex-end; }
.public-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.public-emergency { padding: 10px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 14px; }
.public-code { padding: 12px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-size: 22px; font-weight: 700; letter-spacing: 0.06em; text-align: center; }

/* Location map. One hue from light to dark. */
.location-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.place-trail { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 10px; }
.place-rank .name { text-align: left; }
.tile-map-wrap { overflow-x: auto; }
.tile-map { display: grid; grid-template-columns: repeat(10, minmax(46px, 1fr)); gap: 3px; min-width: 490px; }
.zila-tile { min-height: 38px; padding: 2px; border: 1px solid transparent; border-radius: 5px; color: var(--ink); font-size: 11px; line-height: 1.15; overflow-wrap: anywhere; cursor: pointer; }
.zila-tile:hover, .zila-tile:focus-visible { border-color: var(--ink); }
.zila-tile.dim { opacity: 0.45; }
.zila-tile.chosen { border-color: var(--ink); border-width: 2px; }
.heat0 { background: var(--hover); }
.heat1 { background: color-mix(in srgb, var(--blue) 14%, var(--surface)); }
.heat2 { background: color-mix(in srgb, var(--blue) 30%, var(--surface)); }
.heat3 { background: color-mix(in srgb, var(--blue) 50%, var(--surface)); }
.heat4 { background: color-mix(in srgb, var(--blue) 72%, var(--surface)); }
.heat5 { background: var(--blue); }
.zila-tile.heat4, .zila-tile.heat5 { color: #fff; }
:root[data-theme="dark"] .zila-tile.heat4, :root[data-theme="dark"] .zila-tile.heat5 { color: #0a1120; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zila-tile.heat4, :root:not([data-theme="light"]) .zila-tile.heat5 { color: #0a1120; } }
.heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 10px 0 6px; color: var(--muted); font-size: 12px; }
.heat-swatch { width: 20px; height: 12px; border-radius: 3px; }
.heat-swatch.heat0 { margin-left: 10px; }
.place-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); }
@media (max-width: 900px) { .location-grid { grid-template-columns: minmax(0, 1fr); } }

/* Selection bar */
.select-row { margin: 0 0 8px; }
.bulk-bar { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.bulk-select { height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); max-width: 200px; }
.coverage-panel { margin-bottom: 10px; }
.coverage-panel h2 { margin: 0; }
.collection-row .row-actions { flex-wrap: wrap; }

/* Filter menus */
.filter-menu { position: relative; display: inline-block; }
.filter-menu > summary { list-style: none; cursor: pointer; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 34px; }
.filter-menu > summary::-webkit-details-marker { display: none; }
.filter-menu.active > summary { border-color: var(--accent-ink); color: var(--accent-ink); }
.menu-panel { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: grid; gap: 8px; width: 290px; max-width: 80vw; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.menu-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.menu-search { width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--ink); }
.menu-list { display: grid; gap: 2px; max-height: 280px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.menu-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; font-size: 13.5px; }
.menu-row[hidden] { display: none; }
.menu-row:hover { background: var(--hover); }
.menu-row .check { flex: 1 1 auto; min-width: 0; }
.menu-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.menu-only { font-size: 12px; visibility: hidden; }
.menu-row:hover .menu-only, .menu-only:focus-visible { visibility: visible; }
.date-range { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.date-range[hidden] { display: none; }
.date-range input { width: auto; }
.phrase-change { margin-left: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sentiment-verdict { margin: 0 0 12px; font-weight: 500; }
.summarize-box { margin-bottom: 10px; display: grid; gap: 10px; }
.summarize-box select { height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
.summary-text { margin: 0; white-space: pre-wrap; }
.summary-sources { margin-top: 8px; }

/* Sidebar topics: folders fold away */
.topic-search { width: 100%; height: 32px; margin-bottom: 4px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: rgba(255, 255, 255, 0.07); color: #fff; font-size: 13px; }
.topic-search::placeholder { color: var(--nav-muted); }
.topic-search:focus { outline: none; border-color: var(--nav-muted); }
.topic-list { display: grid; gap: 1px; }
.folder-toggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 10px 6px 8px; border: 0; border-radius: 7px; background: none; color: var(--nav-ink); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.folder-toggle:hover { background: var(--nav-2); color: #fff; }
.chevron { flex: none; width: 12px; font-size: 15px; line-height: 1; color: var(--nav-muted); transition: transform 0.12s; }
.folder-toggle[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.folder-count { flex: none; margin-left: auto; color: var(--nav-muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.folder-topics { display: grid; gap: 1px; margin: 0 0 4px 12px; padding-left: 6px; border-left: 1px solid rgba(255, 255, 255, 0.1); }
.topic { font-size: 13px; padding: 5px 8px; }
.topic-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic.paused .topic-name { opacity: 0.55; }
.topic-none { margin: 6px 10px; color: var(--nav-muted); font-size: 13px; }

/* Topic picker, at the top of the page */
.topic-menu > summary.topic-summary { display: inline-flex; align-items: center; gap: 7px; max-width: 280px; line-height: normal; font-weight: 600; }
.topic-summary .chevron { transform: rotate(90deg); color: var(--muted); }
.topic-panel { width: 330px; max-height: min(70vh, 520px); overflow-y: auto; }
.topic-menu .topic-search { background: var(--surface-2); color: var(--ink); border-color: var(--border); margin: 0; }
.topic-menu .topic-search::placeholder { color: var(--muted); }
.topic-menu .topic, .topic-menu .folder-toggle { color: var(--ink); }
.topic-menu .topic:hover, .topic-menu .folder-toggle:hover { background: var(--hover); color: var(--ink); }
.topic-menu .topic[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 3px 0 0 var(--accent-ink); }
.topic-menu .topic .n { background: var(--hover); color: var(--ink-2); }
.topic-menu .chevron, .topic-menu .folder-count { color: var(--muted); }
.topic-menu .folder-topics { border-left-color: var(--border); }
.topic-menu .topic-none { color: var(--muted); }
/* Quick filters */
.quick-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px 24px; margin-bottom: 12px; padding: 16px 18px; }
.chip-group { display: grid; gap: 7px; align-content: start; min-width: 0; }
.chip-label { color: var(--ink); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.chip-options { display: flex; flex-wrap: wrap; gap: 4px; }
.quick-clear { justify-self: start; align-self: end; }
.chip-options .chip-select { width: 100%; height: 34px; }
.chip-options .chip { min-height: 32px; padding: 3px 12px; font-size: 13px; }
.chip { min-height: 28px; padding: 2px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.chip:hover { background: var(--hover); color: var(--ink); }
.chip.on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.chip.on:hover { background: var(--accent); color: #fff; }
.chip-select { height: 28px; padding: 0 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; max-width: 200px; }

/* Daily brief */
.brief-actions { justify-content: flex-end; }
.brief-actions .meta { margin-right: auto; }
.brief-attention { border-left: 3px solid var(--accent-ink); }
.brief-attention h2 { display: flex; align-items: center; gap: 7px; }

/* Explained spikes */
.tight-list { display: grid; gap: 5px; margin: 0; padding-left: 18px; }
.spike-early { margin-left: 8px; }

/* Statistics on each mention */
.stat-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.stat { display: inline-flex; align-items: center; gap: 5px; cursor: help; }
.stat .icon { color: var(--muted); }
.stat-details { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, max-content) minmax(130px, 1fr)); gap: 4px 14px; margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.stat-details dt { color: var(--muted); }
.stat-details dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Crisis room */
.crisis-head { border-left: 3px solid var(--accent-ink); }
.crisis-head .card-title { display: inline-flex; align-items: center; gap: 6px; }
.crisis-tasks li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.crisis-tasks li:first-child { padding-top: 0; border-top: 0; }
.task-main { flex: 1 1 200px; min-width: 0; }
.task-main .tag { margin-left: 6px; }
.task-done .task-main strong { color: var(--muted); font-weight: 500; text-decoration: line-through; }
.crisis-timeline { display: grid; gap: 8px; max-height: 380px; margin: 0; padding: 0 0 0 12px; overflow-y: auto; list-style: none; border-left: 2px solid var(--border); }
.crisis-timeline li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; font-size: 13.5px; }
.tl-peak span:last-child, .tl-start span:last-child, .tl-closed span:last-child { font-weight: 600; }
.hour-table { margin-top: 8px; font-size: 13px; }
.hour-table summary { cursor: pointer; color: var(--accent-ink); }
@media (max-width: 560px) { .crisis-timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* My work */
.work-list { gap: 0; }
.work-item { padding: 12px 0; border-top: 1px solid var(--border); }
.work-item:first-child { padding-top: 0; border-top: 0; }
.work-item.late { box-shadow: inset 3px 0 0 var(--delta-down); padding-left: 10px; }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; }
.work-main { flex: 1 1 280px; min-width: 0; }
.work-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.work-detail { margin-top: 10px; padding: 12px; border-radius: 8px; background: var(--surface-2); }
.work-log { gap: 8px; }
.assign-wrap { display: inline-flex; align-items: center; gap: 6px; }
.assign-panel { grid-column: 1 / -1; margin-top: 8px; padding: 12px; border-radius: 8px; background: var(--surface-2); }
.card .assign-panel { background: none; padding: 0; margin: 0; }
.mention .assign-panel, .case .assign-panel, .crisis-tasks .assign-panel, .crisis > .assign-panel, .stack > .assign-panel { background: var(--surface-2); padding: 12px; margin-top: 8px; flex: 1 1 100%; }

/* Topics page */
.topic-filters { margin-bottom: 0; }
.topic-filters select { height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--ink); max-width: 200px; }
.topic-filters .grow-input { flex: 2 1 220px; background: var(--surface-2); color: var(--ink); }
.topic-folder { margin: 8px 0 -4px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.topic-rows .keywords { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.topic-rows .row-card { padding: 11px 14px; }

/* Statement pickup */
.statement-text { margin: 8px 0 0; white-space: pre-wrap; font-size: 14px; }
.speed-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.speed-cell { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.speed-cell strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.pickup-list { max-height: 520px; }
.pickup-list .tag { margin-left: 4px; }
.pickup-list li { grid-template-columns: 76px minmax(0, 1fr); }

/* Ask */
.ask-box { gap: 8px; }
.ask-row { flex-wrap: nowrap; }
.ask-input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--axis); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; }
.ask-answer { border-left: 3px solid var(--accent-ink); }
.ask-answer h2, .ask-answer p { margin: 0; }
.ask-term { margin-left: 4px; }
.ask-missing { margin: 0; }
.ask-sources li { gap: 2px; }

/* Accuracy */
.accuracy-table { table-layout: fixed; }
.accuracy-table td { vertical-align: top; }
.accuracy-figure { display: grid; gap: 1px; }
.accuracy-figure strong { font-size: 18px; }
.accuracy-report { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.accuracy-report p { margin: 6px 0 0; color: var(--ink-2); }
.accuracy-question { margin: 0; font-size: 16px; }
.accuracy-head { justify-content: space-between; align-items: center; }
.accuracy-head h2 { margin: 0; }

/* International */
.intl-scroll { overflow-x: auto; }
.intl-countries tr.selected td { background: var(--grid); }
.intl-pick select { max-width: 180px; }
.intl-countries .linklike { text-align: left; }
.intl-grid td.num { border-radius: 4px; }

/* TV and radio */
.broadcast-text { width: 100%; font-size: 15px; line-height: 1.6; }
.broadcast-read { white-space: pre-wrap; margin: 0; }

/* Phones */
.phonebar, .filters-toggle, .card-actions { display: none; }
@media (max-width: 800px) {
  .sidebar { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .sidebar { display: flex; position: fixed; inset: 0 0 calc(58px + env(safe-area-inset-bottom)) 0; z-index: 40; overflow-y: auto; }
  .phonebar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding-bottom: env(safe-area-inset-bottom); background: var(--nav); border-top: 1px solid rgba(255, 255, 255, .12); }
  .phonebar a, .phonebar button { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 58px; padding: 4px 2px; border: 0; background: none; color: rgba(255, 255, 255, .72); font: inherit; font-size: 11px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
  .phonebar a[aria-current="page"], .phonebar button[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, .1); font-weight: 600; }
  .phonebar span { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar { flex-wrap: nowrap; align-items: center; gap: 8px; margin-bottom: 10px; }
  .topbar h1 { font-size: 20px; }
  .subheading, .status { display: none; }
  .filters-toggle { display: inline-flex; flex: 1 1 100%; justify-content: center; }
  .filters:not(.filters-open) > :not(#topic-picker):not(#filter-q):not(#filters-toggle):not(input[type="hidden"]) { display: none; }
  .filters:not(.filters-open) ~ .views-row { display: none; }
  .filters:not(.filters-open) ~ main .phone-extra, .filters:not(.filters-open) ~ main .select-box { display: none; }
  #filter-q { flex: 1 1 100%; min-width: 0; }
  .btn, select, input[type="search"], input[type="text"], input[type="email"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="number"], .navlink { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  .chip, main button:not(.linklike) { min-height: 40px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px; }
  .tile .value { font-size: 24px; }
  .tile-icon { display: none; }
  .mention h2 { font-size: 16px; line-height: 1.4; }
  .card-actions { display: inline-flex; justify-self: start; min-height: 38px; }
  .mention:not(.show-actions) footer { display: none; }
  .mention footer { gap: 6px; }
}

/* Opening the reports behind a figure */
.explore-link { cursor: pointer; }
.tile.explore-link:hover, .tile.explore-link:focus-visible { border-color: var(--accent-ink); outline: none; }
.legend-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; font: inherit; }
.explore-chip { justify-content: space-between; }

/* Plain explanations of scores */
.explain-btn { display: inline-grid; place-items: center; width: 17px; height: 17px; min-height: 0 !important; padding: 0; border: 1px solid var(--axis); border-radius: 50%; background: none; color: var(--ink-2); font-size: 11px; font-weight: 600; line-height: 1; vertical-align: 1px; cursor: pointer; }
.explain-btn:hover, .explain-btn:focus-visible, .explain-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent-ink); color: var(--accent-ink); }
.stat-explain { cursor: pointer; border-radius: 4px; }
.stat-explain:hover, .stat-explain:focus-visible { background: var(--hover); }
.explain-panel { position: fixed; z-index: 60; width: min(340px, calc(100vw - 24px)); padding: 12px 14px; border: 1px solid var(--axis); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 8px 28px rgba(0, 0, 0, .28); font-size: 14px; font-weight: 400; line-height: 1.5; text-align: left; }
.explain-panel h3 { margin: 8px 0 1px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.explain-panel p { margin: 0; }
.explain-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.explain-head button { font-size: 18px; line-height: 1; text-decoration: none; }
@media (max-width: 800px) {
  .explain-panel { left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); width: auto; max-height: 55vh; overflow-y: auto; }
  .explain-btn { width: 22px; height: 22px; font-size: 13px; }
  .stat-explain { display: inline-flex; align-items: center; min-height: 36px; padding: 0 8px; margin: 0 -4px; }
}
@media print { .explain-btn, .explain-panel { display: none !important; } }

/* Getting started */
.first-run { border-left: 3px solid var(--accent-ink); }
.first-run h2, .first-run p { margin: 0; }
.first-run-progress { height: 6px; overflow: hidden; border-radius: 3px; background: var(--grid); }
.first-run-progress span { display: block; height: 100%; background: var(--accent-ink); }
.first-run-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.first-run-step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.first-run-tick { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--axis); border-radius: 50%; font-size: 13px; }
.first-run-step.done .first-run-tick { border-color: var(--accent-ink); background: var(--accent-ink); color: #fff; }
.first-run-step.done strong { color: var(--ink-2); font-weight: 500; }
.first-run-body { display: grid; gap: 5px; justify-items: start; min-width: 0; }
.first-run-samples { display: flex; flex-wrap: wrap; gap: 6px; }
.first-run .form-row.actions { flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Clearer layout */
.quick-filters { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 0; padding: 4px 18px 16px; }
.fold-panel { margin-bottom: 12px; padding: 0; overflow: hidden; }
.fold-panel > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 11px 18px; cursor: pointer; list-style-position: inside; }
.fold-title { font-weight: 600; }
.fold-summary { min-width: 0; color: var(--ink-2); font-size: 13px; }
.fold-panel[open] > summary .fold-summary { display: none; }
.fold-panel .feed-summary { margin: 0; border-top: 1px solid var(--border); }
.dash-tabs { display: flex !important; flex-wrap: wrap; gap: 10px 22px; padding: 12px 14px; }
.dash-group { display: grid; gap: 5px; align-content: start; }
.dash-group-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.topic-rows .row-actions .btn, .topic-rows .btn { min-height: 30px; padding: 2px 10px; border-color: transparent; background: var(--surface-2); font-size: 12.5px; font-weight: 500; }
.topic-rows .btn:hover { background: var(--hover); }
.topic-rows .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.topic-rows .btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
:root[data-theme="dark"] .topic-rows .btn.primary:hover { color: #0a1120; }

/* Nothing may slide the page sideways */
body { overflow-x: clip; }
.opens-left > :not(summary) { left: auto !important; right: 0 !important; }
.menu-panel, .topic-panel { max-width: calc(100vw - 24px); }
/* Analytics tabs: the same clear style as the filters */
.dash-head { flex-wrap: wrap; }
.dash-tabs { flex: 1 1 100% !important; border: 1px solid var(--border); border-radius: 12px; background: var(--surface) !important; box-shadow: var(--shadow); }
.dash-tabs button { min-height: 32px; padding: 3px 12px; border: 1px solid transparent; border-radius: 16px; font-size: 13px; }
.dash-tabs button:hover { background: var(--hover); }
.dash-tabs button[aria-selected="true"], .dash-tabs button[aria-selected="true"]:hover { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: none; }
.dash-actions { margin-left: auto; }

/* Consistent page layout */
@media (min-width: 1001px) {
  .topbar { flex-wrap: nowrap; }
  .titles { flex: 1 1 auto; min-width: 0; }
  .topbar-tools { flex: 0 0 auto; }
}
.intro { max-width: 95ch; }
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; align-items: start; }
.guide > section { margin: 0; }
table.data thead th { border-bottom: 1px solid var(--axis); }
table.data tbody tr:hover > td { background: var(--hover); }
.btn.danger { border-color: transparent; background: none; color: var(--red, #b42318); }
.btn.danger:hover { background: var(--red-soft, #fee4e2); }
.first-run-steps { gap: 7px; }
@media (max-width: 560px) { .guide { grid-template-columns: minmax(0, 1fr); } }

/* One compact filter bar */
.filters { gap: 6px; padding: 8px; }
.filters .btn, .filters select, .filters input[type="search"], .views-row .btn, .views-row select, .views-row input { height: 34px; min-height: 34px; font-size: 13.5px; }
.filters select, .filters .btn { padding: 0 10px; }
.filters select { max-width: 150px; }
.filter-menu > summary { line-height: 32px; padding-top: 0; padding-bottom: 0; }
.bar-extra { display: contents; }
.bar-select.bar-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.bar-clear { padding: 0 6px; font-size: 13px; white-space: nowrap; }
.views-row { display: contents; }
.views-row[hidden], .views-row form[hidden], .views-row button[hidden] { display: none; }
.views-row form { display: flex; gap: 6px; align-items: center; }
.views-row input { width: 150px; }
/* Figures in one slim row, with the chart opening when wanted */
.feed-summary { padding: 0; overflow: hidden; }
.feed-summary .strip { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: 0; }
.feed-summary .strip > div { padding: 8px 14px; }
.feed-summary .strip .num-label { font-size: 12px; }
.feed-summary .strip .num-value { font-size: 19px; }
.feed-chart > summary { padding: 7px 14px; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.feed-chart[open] { padding-bottom: 10px; }
.feed-chart svg { display: block; }
@media (max-width: 800px) {
  .filters select { flex: 1 1 45%; max-width: none; }
  .filters .btn, .filters select, .filters input[type="search"], .views-row .btn, .views-row select, .views-row input { height: 40px; min-height: 40px; font-size: 16px; }
  .feed-summary .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* One-click strips */
.filters { position: relative; }
#filter-q { flex: 1 1 240px; }
.bar-extra { display: flex !important; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 2px; }
.date-range { flex: 1 1 100%; order: 6; }
.bar-extra { order: 5; }
.seg { display: inline-flex; align-items: stretch; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.seg-label { display: flex; align-items: center; padding: 0 9px; border-right: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.seg button { min-height: 30px; padding: 0 10px; border: 0; border-right: 1px solid var(--border); background: none; color: var(--ink); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--hover); }
.seg button.on, .seg button.on:hover { background: var(--accent); color: #fff; font-weight: 600; }
.bar-extra .bar-select { height: 32px; min-height: 32px; font-size: 13px; }
/* More filters opens over the page, so nothing jumps */
.filters:has(.more-filters[open]) .more-filters { flex: 0 0 auto; }
.more-panel { position: absolute; z-index: 30; top: 50px; left: 8px; right: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; width: auto; margin: 0; padding: 14px 16px; border: 1px solid var(--axis); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.more-group { display: grid; gap: 7px; align-content: start; min-width: 0; }
.more-group h3 { margin: 0; color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.more-row { display: flex; flex-wrap: wrap; gap: 6px; }
.more-numbers { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 5px 8px; align-items: center; font-size: 13px; }
.more-numbers input { width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--ink); }
@media (max-width: 800px) {
  .more-panel { position: static; margin-top: 8px; box-shadow: none; }
  .filters:not(.filters-open) > .bar-extra { display: none !important; }
  .seg { flex-wrap: wrap; width: 100%; }
  .seg-label { flex: 1 1 100%; min-height: 26px; border-right: 0; border-bottom: 1px solid var(--border); }
  .seg button { flex: 1 1 auto; min-height: 40px; }
}

/* Filter titles stand out from their options */
.seg { border-color: var(--axis); }
.seg-label { padding: 0 11px; border-right: 0; background: #16335f; color: #fff; font-size: 11.5px; letter-spacing: .05em; }
:root[data-theme="dark"] .seg-label { background: #D3E2DA; color: #12553D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-label { background: #D3E2DA; color: #12553D; } }
@media (max-width: 800px) { .seg-label { border-bottom: 0; } }

/* District, forms and small additions */
.district-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.district-head h2, .district-card p { margin: 0; }
.district-select { max-width: 220px; height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
.district-place { border: 0; cursor: pointer; font: inherit; }
.form-more > summary { padding: 4px 0; color: var(--accent-ink); font-weight: 500; cursor: pointer; }
.form-more[open] > summary { margin-bottom: 8px; }
.dash-actions { flex-wrap: wrap; }
details.card > summary { cursor: pointer; }

/* Name and logo */
.logo-mark { display: block; width: 34px; height: 31px; flex: none; }
.brand-name { font-weight: 700; white-space: nowrap; }
.brand-sub { font-weight: 400; opacity: 0.88; }
/* Small tables, link checks and two-step login */
.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 500; }
.mini-table th, .mini-table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--border); }
.link-result { padding: 10px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.tf-key { font-size: 15px; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.tf-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }

/* Account page */
.account-head { display: flex; align-items: center; gap: 16px; }
.account-photo { flex: none; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.account-initial { display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 30px; font-weight: 700; }
.avatar-photo { object-fit: cover; }
label.btn { cursor: pointer; }

/* Customizing the Daily brief */
.brief-customize-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.brief-section-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brief-section-row span { display: flex; gap: 4px; }
.brief-sections { gap: 6px; }
.brief-topic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; max-height: 240px; overflow-y: auto; }
.brief-topic { font-size: 13.5px; }
@media (max-width: 720px) { .brief-customize-grid { grid-template-columns: minmax(0, 1fr); } }

/* Filters on list pages, and the Analytics strips */
.page-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-search { flex: 1 1 200px; max-width: 320px; height: 32px; padding: 0 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.card .page-filters { margin-bottom: 12px; }
.field-inline select { height: 34px; padding: 0 8px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.dash-tabs.seg-row { flex: 1 1 100% !important; gap: 8px !important; padding: 0 !important; border: 0; border-radius: 0; background: none !important; box-shadow: none; }
.dash-tabs.seg-row button { min-height: 30px; padding: 0 10px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: none; color: var(--ink); font-size: 13px; font-weight: 400; white-space: nowrap; box-shadow: none; }
.dash-tabs.seg-row button:last-child { border-right: 0; }
.dash-tabs.seg-row button:hover { background: var(--hover); }
.dash-tabs.seg-row button[aria-selected="true"], .dash-tabs.seg-row button[aria-selected="true"]:hover { background: var(--accent); color: #fff; font-weight: 600; }
.dash-tabs.seg-row .seg-label { white-space: nowrap; }

/* The list of dashboards */
.dash-list-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.dash-list-tabs button { padding: 9px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer; }
.dash-list-tabs button:hover { color: var(--ink); }
.dash-list-tabs button.on { border-bottom-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.dash-list-group { margin-bottom: 18px; }
.dash-list-group > h2 { margin: 0 0 8px; color: var(--ink-2); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.dash-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dash-card { display: flex; flex-direction: column; gap: 6px; }
.dash-card h3 { margin: 0; font-size: 15px; }
.dash-card p { flex: 1; margin: 0 0 6px; }
.dash-actions { width: 100%; margin-left: 0; }
.dash-actions .dash-all { margin-right: auto; color: var(--accent-ink); }
.tiles.tiles-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1250px) { .tiles.tiles-six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tiles.tiles-six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trend .line-previous { fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-dasharray: 5 4; }
.swatch.line-now { background: var(--accent); }
.swatch.line-before { background: var(--muted); }
.card .card-head + .page-filters { margin: 6px 0 8px; }

/* Comments and more, under a report */
.post-details-box { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.post-details h3 { margin: 0; font-size: 14px; }
.post-comments { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; }
.post-comments li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }

.post-comments li.comment-row { display: flex; align-items: flex-start; gap: 9px; padding: 0; border: 0; }
.comment-avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--border); color: var(--ink-2); }
.comment-main { min-width: 0; display: grid; gap: 3px; }
.comment-bubble { padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; }
.comment-bubble strong { display: block; font-size: 12.5px; color: var(--ink-2); }
.comment-meta { padding-left: 12px; }

/* Public sources on a claim: a timeline of who published what */
.source-map { position: relative; display: grid; gap: 12px; padding-left: 4px; }
.source-node { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; }
.source-date { padding-top: 10px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.source-body { padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--axis); border-radius: 8px; background: var(--surface); overflow-wrap: anywhere; }
.role-original .source-body { border-left-color: var(--accent); }
.role-correction .source-body { border-left-color: #12a150; }
.source-links { display: flex; flex-wrap: wrap; gap: 14px; }
.source-form { padding: 12px; border-radius: 8px; background: var(--surface-2); }
@media (max-width: 640px) { .source-node { grid-template-columns: minmax(0, 1fr); gap: 2px; } .source-date { padding-top: 0; } }

.source-quote { margin: 0; padding: 6px 12px; border-left: 3px solid var(--border); color: var(--ink); }
.comment-claim { max-width: 220px; height: 28px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); }

/* Noise control and early warnings */
.noise-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.noise-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.noise-stat strong { font-size: 18px; color: var(--accent-ink); }
.noise-switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.noise-switch input { margin-top: 3px; flex: none; }
.noise-note { display: block; margin-top: 2px; }
.noise-heading { font-size: 14px; margin: 6px 0 0; color: var(--accent-ink); }
.noise-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.noise-row > div { min-width: 0; overflow-wrap: anywhere; }
.noise-row .btn { flex: none; }
.warning-card { border-left: 3px solid var(--accent); }
.warning-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.tag.warning-growing, .tag.warning-checker, .tag.warning-spreading { background: var(--surface-2); color: var(--accent-ink); border: 1px solid var(--border); }
@media (max-width: 640px) { .noise-row, .warning-row { flex-direction: column; align-items: stretch; } .warning-actions { justify-content: flex-start; } }
/* Deleting a topic */
.delete-control { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn.danger { color: #b42318; }
.delete-control .btn.danger-solid, .delete-control .btn.danger-solid:hover, .delete-control .btn.danger-solid:focus, .delete-control .btn.danger-solid:focus-visible { background: #b42318; border-color: #b42318; color: #fff; opacity: 1; }
.delete-note { max-width: 260px; }
/* Automatic claim check */
.auto-check { border-left: 3px solid var(--accent); }
.auto-check .summary-text { white-space: pre-line; }
.reverse-search { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reverse-search .btn { min-height: 30px; padding: 3px 10px; font-size: 12.5px; }
.auto-origin { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 0; }
.media-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.media-item { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: start; border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.media-thumb { width: 160px; max-height: 200px; object-fit: contain; border-radius: 8px; background: var(--surface-2); display: block; }
.media-link-icon { height: 90px; display: grid; place-items: center; color: var(--muted); }
.media-stills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.media-stills img { width: 72px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.media-item .btn.small-link { justify-self: start; }
@media (max-width: 600px) { .media-item { grid-template-columns: 1fr; } .media-thumb { width: 100%; } }
/* ICF headings */
h1, .page-title, .brand-name { font-family: var(--heading-font); letter-spacing: -0.01em; }
.logo-mark { width: auto; height: 32px; }
@media print {
  .first-run { display: none !important; }
  .phonebar { display: none !important; }
  .sidebar, .filters, .views-row, .export-bar, .dash-actions, .dash-tabs, .pager, .select-box, .sentiment button, .tag-add, .linklike, .tooltip, .topbar-tools, .new-version { display: none !important; }
  .shell { display: block; }
  body, .main { background: #fff; color: #000; padding: 0; }
  .mention, .card, .tile { break-inside: avoid; border-color: #ccc; background: #fff; color: #000; box-shadow: none; }
  .mention { padding-left: 12px; }
  .meta, .snippet, .tile .sub, .tile .label, .num, .mention-meta { color: #333 !important; }
  a { color: #12553D; }
}
.claim-row-end { display: flex; align-items: center; gap: 8px; }
.claim-row-end .btn.small-link { min-height: 28px; padding: 2px 10px; font-size: 12.5px; }
.removed-claim { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--border); }

/* Ask: ICF Lens */
.lens-page { gap: 14px; }
.lens-box { gap: 12px; padding: 18px 20px; }
.lens-head { display: flex; align-items: center; gap: 10px; }
.lens-head h2 { margin: 0; font-size: 16px; }
.lens-head .meta { display: block; margin-top: 1px; }
.lens-badge { display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; background: var(--violet-soft); color: var(--violet); }
.lens-idle { display: grid; gap: 8px; }
.lens-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lens-chips-label { min-width: 52px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lens-chips .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lens-top { display: grid; gap: 10px; }
.lens-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lens-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lens-stat { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.lens-stat strong { font-size: 22px; line-height: 1.2; color: var(--ink); }
.lens-stat-label { color: var(--muted); font-size: 12.5px; }
.lens-tone { height: 6px; margin: 6px 0 0; border-radius: 3px; overflow: hidden; }
.lens-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.lens-grid > :only-child { grid-column: 1 / -1; }
.lens-answer { display: grid; gap: 12px; border-top: 3px solid var(--violet); }
.lens-body { display: grid; gap: 8px; color: var(--ink); line-height: 1.6; max-width: 75ch; }
.lens-body p { margin: 0; color: var(--ink-2); }
.lens-body .lens-lead { color: var(--ink); font-size: 16px; font-weight: 500; }
.lens-h { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.lens-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.lens-cite { display: inline-block; min-width: 18px; margin: 0 1px; padding: 0 5px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; text-decoration: none; vertical-align: 1px; }
.lens-cite:hover { background: var(--accent); color: #fff; }
.lens-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding-top: 10px; border-top: 1px solid var(--border); }
.lens-foot p { margin: 0; }
.lens-answer > .assign-panel { padding-top: 10px; border-top: 1px solid var(--border); }
.lens-sources { display: grid; gap: 8px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.lens-sources h3 { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lens-src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lens-src-list li { display: flex; gap: 8px; align-items: flex-start; }
.lens-num { flex: 0 0 auto; min-width: 24px; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-align: center; }
.lens-src { display: grid; gap: 1px; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.lens-src a { color: var(--ink); text-decoration: none; }
.lens-src a:hover { color: var(--accent-ink); text-decoration: underline; }
.lens-more summary { cursor: pointer; font-weight: 600; }
.lens-ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 14px; }
.lens-rank h3 { margin: 0 0 6px; font-size: 13px; }
.lens-loading .lens-badge { animation: lens-pulse 1.2s ease-in-out infinite; }
.lens-skeleton { display: grid; gap: 8px; }
.lens-skeleton span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--hover), var(--surface-2)); background-size: 200% 100%; animation: lens-shimmer 1.4s linear infinite; }
.lens-skeleton span:nth-child(2) { width: 85%; }
.lens-skeleton span:nth-child(3) { width: 60%; }
@keyframes lens-pulse { 50% { opacity: .5; } }
@keyframes lens-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .lens-loading .lens-badge, .lens-skeleton span { animation: none; } }
@media (max-width: 900px) {
  .lens-grid { grid-template-columns: minmax(0, 1fr); }
  .lens-sources { position: static; max-height: none; }
  .lens-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lens-ranks { grid-template-columns: minmax(0, 1fr); }
}
.lens-evidence { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lens-ev { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.lens-ev.none { opacity: .7; }
.lens-ev-head { display: flex; align-items: center; gap: 8px; }
.lens-ev-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); }
.lens-ev-count { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); }
.lens-ev.none .lens-ev-count { color: var(--muted); font-weight: 500; }
.lens-ev-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.lens-ev-list li { display: flex; gap: 8px; align-items: flex-start; }
.lens-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--axis); }
.lens-dot.positive { background: var(--positive); }
.lens-dot.neutral { background: var(--neutral); }
.lens-dot.negative { background: var(--negative); }
.lens-net { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.lens-tone-word { padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.lens-tone-word.positive { background: var(--blue-soft); color: var(--accent-ink); }
.lens-tone-word.neutral { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }
.lens-tone-word.negative { background: var(--red-soft); color: var(--red); }
.lens-tone-key { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 11.5px; }
.lens-tone-key i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; }
.lens-tone-key i.positive { background: var(--positive); }
.lens-tone-key i.neutral { background: var(--neutral); }
.lens-tone-key i.negative { background: var(--negative); }
.lens-sample { justify-self: start; margin-top: 2px; padding: 1px 8px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 11.5px; font-weight: 600; }

/* My work: layout switch, board and first steps */
.work-bar { justify-content: space-between; }
.work-bar-end { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 4px; }
.board-col { display: grid; gap: 10px; align-content: start; min-height: 180px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.board-col.drop { border-color: var(--accent); background: var(--accent-soft); }
.board-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-col-head h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.board-col[data-status="review"] .board-col-head h3 { color: var(--teal); }
.board-col[data-status="done"] .board-col-head h3 { color: var(--delta-up); }
.board-count { min-width: 24px; padding: 1px 7px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-weight: 600; text-align: center; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.board-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); cursor: grab; }
.board-card.dragging { opacity: .5; }
.board-card.high { border-left: 3px solid var(--amber); }
.board-card.late { border-left: 3px solid var(--delta-down); }
.board-card-title { font-size: 14px; line-height: 1.4; }
.board-card-title a { color: var(--ink); text-decoration: none; }
.board-card-title a:hover { color: var(--accent-ink); text-decoration: underline; }
.board-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.board-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-move { max-width: 170px; height: 28px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink-2); font-size: 12px; }
.board-empty { margin: 0; padding: 18px 0; text-align: center; }
.work-start { padding: 22px 24px; }
.work-start h2 { margin: 0; }
.work-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.work-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.work-step p { margin: 4px 0 10px; }
.work-step-n { display: inline-grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
@media (max-width: 900px) { .work-steps { grid-template-columns: minmax(0, 1fr); } }
.board-col, .board-card, .board-card-title { min-width: 0; }
.board-card-title { overflow-wrap: anywhere; }
.board-move { flex: 1 1 auto; min-width: 0; }
.board-card-foot .linklike { flex: 0 0 auto; }
.board-col, .board-card { grid-template-columns: minmax(0, 1fr); }

/* Daily brief */
.brief-summary { display: grid; gap: 10px; border-top: 3px solid var(--violet); }
.brief-lines { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink); line-height: 1.55; }
.brief-alerts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.brief-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.brief-alert-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); }
.brief-alert.kind-warning .brief-alert-icon, .brief-alert.kind-crisis .brief-alert-icon { background: var(--red-soft); color: var(--red); }
.brief-alert.kind-claim .brief-alert-icon { background: var(--amber-soft); color: var(--amber); }
.brief-alert.kind-work .brief-alert-icon, .brief-alert.kind-cases .brief-alert-icon { background: var(--teal-soft); color: var(--teal); }
.brief-alert-body { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.brief-alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.brief-alert > .brief-alert-body + .assign-panel, .brief-alert .assign-panel { flex-basis: 100%; }
.brief-alert:has(.assign-panel) { flex-wrap: wrap; }
.brief-story { display: inline-flex; gap: 8px; align-items: flex-start; }
.brief-claims li { display: grid; gap: 2px; }
.summarize-box { display: grid; gap: 14px; }
.feed-summary { margin-top: 2px; }
.feed-summary-main { padding-right: 4px; }
.feed-summary-sources { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); max-height: 560px; }
.work-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.work-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.work-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 18px; background: var(--chip); color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.work-tab:hover { background: var(--border); color: var(--ink); }
.work-tab[aria-selected="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.work-tab-n { min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 700; line-height: 20px; text-align: center; }
.work-tab[aria-selected="true"] .work-tab-n { background: rgba(255, 255, 255, .22); color: #fff; }
.work-tab.alert .work-tab-n { background: var(--red-soft); color: var(--red); }
.work-tab.alert[aria-selected="true"] { background: var(--red); }

/* Claim checks: search and menus inside the Claims card */
.claims-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.claims-card .card-head h2 { margin: 0; }
.claims-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.claims-tools .page-search { flex: 1 1 260px; min-width: 0; }
.claim-menu { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.claim-menu select { height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.claims-card .work-tabs { padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.removed-claim .claim-row-end { display: flex; gap: 8px; align-items: center; }

.work-tab:not([aria-selected="true"]) .work-tab-n { background: var(--surface); }
.claim-n { flex: 0 0 auto; min-width: 26px; height: 26px; border-radius: 13px; background: var(--chip); color: var(--ink-2); font-size: 13px; font-weight: 700; line-height: 26px; text-align: center; }
.plain-list.claims li { flex-wrap: nowrap; }
.profile-group { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.profile-group h3 { margin: 0; font-size: 15px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 4px; }
.profile-tile { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.profile-tile .linklike { text-align: left; }
.profile-site { overflow-wrap: anywhere; }
@media (max-width: 640px) { .plain-list.claims li { flex-wrap: wrap; } }

.brief-alert { align-items: flex-start; }
.brief-alert-body { flex: 1 1 auto; color: var(--ink); font-size: 14px; line-height: 1.45; text-align: left; }
.brief-alert-actions .btn { text-decoration: none; }
.brief-alert-icon { margin-top: 1px; }
.brief-rank { gap: 10px; }
.brief-rank li { grid-template-columns: minmax(110px, 34%) minmax(0, 1fr) 52px 74px; gap: 12px; font-size: 14px; }
.brief-rank .name { color: var(--ink); }
.brief-rank .num { color: var(--ink); font-weight: 600; }
.brief-change { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 560px) { .brief-rank li { grid-template-columns: minmax(90px, 40%) minmax(0, 1fr) 44px; } .brief-change { grid-column: 3; text-align: right; } }

.select-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager.top { margin-top: 0; gap: 10px; font-size: 14px; }
.pager.top .btn { min-height: 34px; padding: 0 14px; }

.needs-filters { display: grid; gap: 10px; }
.needs-dates { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.needs-dates[hidden] { display: none; }
.needs-dates label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.needs-dates input { height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.needs-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.needs-search { position: relative; display: inline-flex; align-items: center; flex: 1 1 280px; max-width: 460px; }
.needs-search .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.needs-search .page-search { width: 100%; padding-left: 32px; }

.table-scroll { overflow-x: auto; }
.issue-table, .case-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.issue-table th, .case-table th { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; white-space: nowrap; }
.issue-table td, .case-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.issue-table tbody tr:last-child td, .case-table tbody tr:last-child td { border-bottom: 0; }
.issue-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.issue-table td.strong { font-weight: 700; color: var(--ink); }
.issue-table td:first-child .linklike { text-align: left; white-space: nowrap; }
.th-sort { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.th-sort:hover, .th-sort.on { color: var(--accent-ink); }
.th-sort.on::after { content: ' ↓'; }
.issue-change.up { color: var(--red); }
.issue-change.down { color: var(--green, #16a34a); }
.issue-tone { min-width: 150px; }
.issue-tone .split { display: inline-flex; width: 100px; vertical-align: middle; }
.issue-net { display: inline-block; min-width: 34px; margin-left: 8px; font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }
.issue-areas { min-width: 180px; }
.cases-card .work-tabs { padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.case-table th.case-check, .case-table td.case-check { width: 34px; padding-right: 0; }
.case-row { cursor: pointer; }
.case-row:hover td { background: var(--hover); }
.case-row.open td { background: var(--chip); }
.case-row td:nth-child(2) { max-width: 420px; }
.case-line { overflow: hidden; color: var(--ink-2); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.case-area, .case-team { white-space: nowrap; }
.case-due { white-space: nowrap; color: var(--ink-2); }
.case-due.late, .late { color: var(--red); font-weight: 700; }
.case-open td { padding: 4px 10px 16px; background: var(--chip); }
.case-detail { max-width: 860px; }
.case-summary { margin: 4px 0 0; color: var(--ink); white-space: pre-wrap; }
.case-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); }
.case-bulk[hidden] { display: none; }
.case-bulk-team { display: inline-flex; gap: 6px; }
.case-bulk-team input { height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.issue-tone .split { margin: 0; }
.issue-areas { white-space: nowrap; }
.issue-table td { padding-top: 8px; padding-bottom: 8px; }
.case-table .tag { white-space: nowrap; }

.issues-card .issue-table th { white-space: nowrap; }
.issue-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 12.5px; }
.issue-key span { display: inline-flex; align-items: center; gap: 6px; }
.issue-key .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.mentions-cell { min-width: 120px; }
.mentions-cell strong { display: block; color: var(--ink); font-variant-numeric: tabular-nums; }
.mbar { display: block; height: 5px; margin-top: 4px; border-radius: 3px; background: var(--hover); }
.mbar span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.chg { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chg.up { background: var(--amber-soft); color: var(--amber); }
.chg.down { background: var(--teal-soft); color: var(--teal); }
.chg.flat { background: var(--chip); color: var(--ink-2); font-weight: 500; }
.issue-table td.num { text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.share { margin-left: 6px; color: var(--muted); font-size: 12px; }
.tone-cell { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.tone-bar { flex: 0 0 90px; height: 8px; margin: 0; }
.tone-word { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tone-word.positive { color: var(--positive); }
.tone-word.neutral { color: var(--ink-2); }
.tone-word.negative { color: var(--negative); }
.team-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 0; border-top: 1px solid var(--border); }
.team-list li:first-child { border-top: 0; }
.team-actions { display: inline-flex; gap: 6px; margin-left: auto; }
#team-new { flex: 1 1 280px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.needs-search .page-search { max-width: none; }
table.data.issue-table td.num { text-align: left; }
.issue-table .count { display: inline-block; min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.issue-table .share { display: inline-block; min-width: 4ch; margin-left: 8px; text-align: left; }
.issue-table td, .issue-table th { vertical-align: middle; }

.team-list li { display: grid; grid-template-columns: minmax(180px, 240px) 1fr auto; align-items: center; gap: 8px 16px; }
.team-name { display: grid; gap: 2px; }
.team-who { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px; background: var(--chip); font-size: 13px; }
.person-chip.lead { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.person-chip em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.team-slot { grid-column: 1 / -1; }
.team-slot:empty { display: none; }
.team-members-panel { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.team-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; }
.team-case-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.team-case-list li:first-child { border-top: 0; }
@media (max-width: 720px) { .team-list li, .team-case-list li { grid-template-columns: 1fr; } }

.verdict-card { gap: 14px; }
.verdict-banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; border: 1px solid transparent; }
.verdict-banner.v-false { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.verdict-banner.v-misleading { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.verdict-banner.v-true { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 30%, transparent); }
.verdict-banner.v-unverified { background: var(--chip); border-color: var(--border); }
.verdict-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); }
.v-false .verdict-icon, .v-false .verdict-title { color: var(--red); }
.v-misleading .verdict-icon, .v-misleading .verdict-title { color: var(--amber); }
.v-true .verdict-icon, .v-true .verdict-title { color: var(--teal); }
.v-unverified .verdict-icon, .v-unverified .verdict-title { color: var(--ink-2); }
.verdict-kicker { color: var(--ink-2); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.verdict-title { font-size: 24px; font-weight: 800; line-height: 1.2; }
.verdict-meaning { color: var(--ink); font-size: 14px; }
.verdict-note { margin: 0; padding: 8px 12px; border-left: 3px solid var(--amber); background: var(--surface-2); font-size: 13.5px; }
.verdict-section h3, .verdict-correct h3 { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.verdict-section p, .verdict-correct p { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.6; max-width: 900px; }
.verdict-correct { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); }
.verdict-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.verdict-sources li { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; overflow-wrap: anywhere; }
.verdict-sources a { font-weight: 600; text-decoration: none; }
.verdict-sources a:hover { text-decoration: underline; }
.src-host { color: var(--muted); font-size: 12px; }
.verdict-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.verdict-actions .meta { margin-left: auto; }
.verdict-running { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.manual-review > summary { cursor: pointer; }
.manual-review[open] > summary { margin-bottom: 8px; }
.manual-review .cards { margin-top: 12px; }
.manual-review .cards > .card { box-shadow: none; border: 1px solid var(--border); }
.claim-n { min-width: 22px; height: auto; border-radius: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.4; text-align: right; align-self: flex-start; padding-top: 1px; }
.plain-list.claims li { align-items: flex-start; gap: 12px; }
.plain-list.claims .claim-row-end { align-self: center; }

.how-card > summary { cursor: pointer; }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0 8px; padding: 0; list-style: none; }
.how-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.how-steps p { margin: 4px 0 0; }
.how-n { display: inline-grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.dec-table th, .dec-table td { text-align: left; vertical-align: middle; padding: 10px; }
.dec-row { cursor: pointer; }
.dec-row:hover td { background: var(--hover); }
.dec-row .linklike { text-align: left; }
.dec-att { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dec-att strong { font-variant-numeric: tabular-nums; }
.dec-state { text-align: right; }
.tag.side-government { background: var(--accent-soft); color: var(--accent-ink); }
.tag.side-opposition { background: var(--amber-soft); color: var(--amber); }
.side-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.side-tile { padding: 14px; border: 1px solid var(--border); border-radius: 12px; border-top: 3px solid var(--accent); }
.side-tile.side-opposition { border-top-color: var(--amber); }
.side-name { font-weight: 700; margin-bottom: 8px; }
.side-tile dl { display: grid; gap: 6px; margin: 0; }
.side-tile dl div { display: flex; justify-content: space-between; gap: 10px; }
.side-tile dt { color: var(--ink-2); }
.side-tile dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.dec-form .field > label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.dec-helpers { margin-top: 8px; align-items: center; }
.dec-helpers .meta { flex: 1 1 260px; }
.btn.busy { opacity: .6; cursor: progress; }
.dec-preview:empty { display: none; }
.dec-preview { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.dec-preview-n { margin: 0 0 6px; font-weight: 700; color: var(--ink); }
.dec-preview-list li { padding: 4px 0; font-size: 13.5px; }

.media-list2 { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.media-item2 { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface); }
.media-row { display: flex; gap: 14px; align-items: flex-start; }
.media-row .media-thumb { width: 150px; height: 104px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex: 0 0 auto; background: var(--surface-2); }
.media-info { display: grid; gap: 6px; min-width: 0; flex: 1; }
.media-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.media-desc { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.media-spacer { flex: 1; }
.pic-older { position: relative; }
.pic-older > summary { list-style: none; cursor: pointer; }
.pic-older > summary::-webkit-details-marker { display: none; }
.pic-older[open] .reverse-search { position: absolute; z-index: 5; top: 34px; left: 0; display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: 320px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.pic-older .reverse-search > .meta { display: none; }
.media-empty { padding: 14px; border: 1px dashed var(--border); border-radius: 10px; text-align: center; }
.media-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.media-add-box { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-2); }
.media-add-box > strong { display: inline-flex; align-items: center; gap: 6px; }
.media-add-row { display: flex; gap: 8px; align-items: center; }
.media-add-row input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.media-add-row input[type="file"] { padding: 5px 8px; }
.pic-result { display: grid; gap: 14px; margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.pic-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.pic-meter { position: relative; display: grid; justify-items: center; width: 180px; flex: 0 0 auto; }
.pic-gauge { width: 180px; height: 104px; }
.pic-pct { margin-top: -46px; font-size: 30px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.pic-sum { display: grid; gap: 8px; flex: 1 1 300px; min-width: 0; }
.pic-sum p { margin: 0; color: var(--ink); line-height: 1.55; }
.pic-label { justify-self: start; padding: 3px 12px; border-radius: 12px; font-weight: 700; font-size: 13px; }
.pv-real { background: var(--teal-soft); color: var(--teal); }
.pv-unclear { background: var(--chip); color: var(--ink-2); }
.pv-ai, .pv-edited { background: var(--red-soft); color: var(--red); }
.pic-bar { display: grid; grid-template-columns: 70px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.pic-bar-track { height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.pic-bar-track span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.pic-bar strong { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.pic-section h4 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pic-signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.pic-signs li { display: flex; gap: 10px; padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.pic-signs p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.pic-dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--teal); }
.c-some .pic-dot { background: var(--amber); }
.c-strong .pic-dot { background: var(--red); }
.pic-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin: 0 0 6px; }
.pic-facts div { display: grid; gap: 1px; }
.pic-facts dt { color: var(--muted); font-size: 12px; }
.pic-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pic-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .media-row { flex-direction: column; } .media-row .media-thumb { width: 100%; height: 180px; } }

.crisis-add { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.crisis-add[hidden] { display: none; }
.crisis-empty { padding: 12px; border: 1px dashed var(--border); border-radius: 10px; text-align: center; }
.crisis-name { display: flex; align-items: center; gap: 8px; }
.crisis-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grid); flex: 0 0 auto; }
.crisis-dot.live { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.crisis-kind { margin: 4px 0 0 17px; display: inline-block; }
.crisis-table td.strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.card-head h2 .meta { font-weight: 400; font-size: 13px; }

.pic-claim { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; padding: 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.pic-claim h4, .pic-text h4 { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pic-claim p { margin: 0; color: var(--ink); line-height: 1.5; }
.pic-fit { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12.5px; font-weight: 700; }
.fit-yes { background: var(--teal-soft); color: var(--teal); }
.fit-partly, .fit-unclear { background: var(--amber-soft); color: var(--amber); }
.fit-no { background: var(--red-soft); color: var(--red); }
.pic-text > summary { list-style: none; cursor: pointer; }
.pic-text > summary::-webkit-details-marker { display: none; }
.pic-text > summary h4::after { content: ' ▸'; }
.pic-text[open] > summary h4::after { content: ' ▾'; }
.pic-text blockquote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface); white-space: pre-wrap; line-height: 1.6; }

.media-item2 .reverse-search { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--chip); }
.reverse-label { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* Sidebar: quick search, live counts, slim mode and system status */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.side-head .brand { min-width: 0; }
.slim-toggle { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--nav-muted); cursor: pointer; }
.slim-toggle:hover { background: var(--nav-2); color: #fff; }
.slim-toggle:focus-visible, .nav-search:focus-visible { outline: 2px solid var(--nav-active); outline-offset: 1px; }
.nav-search { display: flex; align-items: center; gap: 9px; width: 100%; margin: 0 0 6px; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: var(--nav-muted); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.nav-search:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.nav-search kbd { margin-left: auto; }
.sidebar kbd, .palette kbd { display: inline-block; padding: 1px 6px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 5px; font: 600 11px/1.5 "Segoe UI", system-ui, sans-serif; color: var(--nav-muted); white-space: nowrap; }
.navlink .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { flex: none; min-width: 20px; padding: 0 7px; border-radius: 10px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.navlink[aria-current="page"] .nav-count { background: rgba(255, 255, 255, 0.28); }
.nav-count-alert { background: #e5484d; }
.nav-group .nav-label { flex: 1; }
.nav-group-dot { width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #f5a524; }

.syshealth { margin-top: auto; border-radius: 10px; color: var(--nav-ink); font-size: 13px; }
.syshealth[hidden] { display: none; }
.syshealth:not([hidden]) + .userchip { margin-top: 6px; }
.syshealth > summary { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; list-style: none; cursor: pointer; }
.syshealth > summary::-webkit-details-marker { display: none; }
.syshealth > summary:hover { background: var(--nav-2); color: #fff; }
.syshealth[open] { background: var(--nav-2); }
.health-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health-dots { display: flex; gap: 4px; }
.health-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #98a2b3; }
.health-dot.small { width: 7px; height: 7px; }
.health-ok { background: #17b26a; }
.health-warn { background: #f5a524; }
.health-down { background: #f04438; box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.25); }
.health-off { background: #98a2b3; }
.health-list { display: grid; gap: 8px; margin: 0; padding: 4px 12px 10px; list-style: none; }
.health-list li { display: flex; align-items: flex-start; gap: 9px; }
.health-list li .health-dot { margin-top: 5px; }
.health-list strong { display: block; color: #fff; font-weight: 600; }
.health-list small { display: block; color: var(--nav-muted); font-size: 12px; line-height: 1.4; }
.health-more { display: block; padding: 0 12px 10px 30px; color: var(--nav-ink); font-size: 12.5px; }
.health-more:hover { color: #fff; }

/* Slim mode: icons only, the label shows on hover. Phones always get the full menu. */
@media (min-width: 801px) {
  .shell { transition: grid-template-columns .2s ease; }
  body.nav-slim .shell { grid-template-columns: 72px minmax(0, 1fr); }
  body.nav-slim .sidebar { padding: 14px 10px; align-items: stretch; }
  body.nav-slim .side-head { flex-direction: column; gap: 4px; }
  body.nav-slim .brand { justify-content: center; padding: 4px 0 6px; }
  body.nav-slim .brand .brand-name { display: none; }
  body.nav-slim .slim-toggle { transform: scaleX(-1); }
  body.nav-slim .nav-label, body.nav-slim .chevron, body.nav-slim .nav-search kbd, body.nav-slim .nav-group-dot { display: none; }
  body.nav-slim .nav-group { height: 1px; margin: 8px 6px; padding: 0; background: rgba(255, 255, 255, 0.1); cursor: default; }
  body.nav-slim .navlink, body.nav-slim .nav-search { position: relative; justify-content: center; padding: 10px 0; }
  body.nav-slim .nav-search { border-color: transparent; background: transparent; }
  body.nav-slim .nav-count { position: absolute; top: 2px; right: 0; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
  body.nav-slim .syshealth > summary { justify-content: center; padding: 10px 0; }
  body.nav-slim .syshealth[open] { position: fixed; left: 78px; bottom: 70px; z-index: 30; width: 240px; padding-top: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
  body.nav-slim .syshealth[open] > summary { justify-content: flex-start; padding: 8px 10px; }
  body.nav-slim .syshealth[open] .nav-label { display: inline; }
  body.nav-slim .userchip { justify-content: center; padding: 8px 0; background: transparent; }
  body.nav-slim .userchip > div { display: none; }
}

/* Quick search window */
.palette { width: min(620px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 80px)); margin: 10vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(16, 24, 40, 0.28); overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; }
.palette::backdrop { background: rgba(10, 17, 32, 0.45); backdrop-filter: blur(2px); }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.palette-input { flex: 1; min-width: 0; padding: 6px 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 17px; }
.palette-input::-webkit-search-cancel-button { display: none; }
.palette kbd { border-color: var(--border); color: var(--muted); background: var(--surface-2, transparent); }
.palette-list { flex: 1; overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink-2, var(--ink)); cursor: pointer; }
.palette-item .icon { flex: none; color: var(--muted); }
.palette-item[aria-selected="true"] { background: var(--accent-soft); color: var(--ink); }
.palette-item[aria-selected="true"] .icon { color: var(--accent); }
.palette-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-kind { flex: none; color: var(--muted); font-size: 12px; }
.palette-empty { padding: 18px 12px; color: var(--muted); }
.palette-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.palette-foot kbd { margin-right: 3px; }
@media (max-width: 800px) { .nav-search kbd { display: none; } .slim-toggle { display: none; } }
/* The status line and your name stay at the bottom; only the menu scrolls. */
@media (min-width: 801px) {
  .sidebar { overflow: hidden; }
  .mainnav { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; scrollbar-width: thin; scrollbar-color: var(--nav-2) transparent; }
  .syshealth { margin-top: 6px; }
}
