/* ============================================================================
   Satyameter — a measuring instrument for truth.
   Aesthetic: forensic, archival, calm. Light "case-file" paper is primary;
   a dark variant is derived from the same tokens via prefers-color-scheme.
   No external fonts or assets — system stacks only.
   ============================================================================ */

:root {
  /* Surfaces & ink */
  --surface:  #F4F5F2;   /* cool paper */
  --raised:   #FFFFFF;   /* raised cards */
  --ink:      #1B2228;   /* primary ink */
  --ink-2:    #52616C;   /* secondary ink */
  --hairline: #D9DDD6;   /* hairlines */
  --hairline-strong: #C4CAC0;

  /* Identity accent */
  --accent:      #2B4A6F; /* deep ink-blue */
  --accent-soft: #E4EAF1;
  --heat:        #2B4A6F; /* single-hue heatmap ink (light→dark via opacity) */
  --ci-band:     rgba(43, 74, 111, 0.16); /* 95% CI shading on the truth meter */

  /* Verdict semantics (reserved — do not reuse for topics) */
  --accurate:     #1E7D46;
  --misleading:   #B87A00;
  --inaccurate:   #B3362B;
  --unverifiable: #6B7280;
  --unchecked:    #9AA4A0; /* hollow / outline treatment applied separately */

  /* Verdict tints (faint fills for banners) */
  --accurate-tint:     #E6F1EA;
  --misleading-tint:   #F5EEDD;
  --inaccurate-tint:   #F5E4E1;
  --unverifiable-tint: #EDEFEF;

  /* Topic categorical palette — validated (light, surface #F4F5F2, CVD >=12) */
  --topic-0: #2F5C9E; /* blue   */
  --topic-1: #C0392B; /* red    */
  --topic-2: #0E9488; /* teal   */
  --topic-3: #6D7B1E; /* olive  */
  --topic-4: #8E44AD; /* purple */
  --topic-5: #D8722C; /* orange */
  --topic-6: #B03A6E; /* pink   */
  --topic-7: #3E8E41; /* green  */
  --topic-other: #97A09B;

  /* Meter instrument */
  --tm-axis:   #7C878C;
  --tm-tick:   #AFB7B2;
  --tm-needle: #1B2228;
  --tm-zone-low:  rgba(179, 54, 43, 0.10);
  --tm-zone-mid:  rgba(184, 122, 0, 0.10);
  --tm-zone-high: rgba(30, 125, 70, 0.12);

  /* Type */
  --serif: "Iowan Old Style", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono:  "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --shadow-card: 0 1px 2px rgba(27, 34, 40, 0.06), 0 1px 1px rgba(27, 34, 40, 0.04);
  --shadow-hover: 0 4px 14px rgba(27, 34, 40, 0.10);
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface:  #14181C;
    --raised:   #1B2127;
    --ink:      #E7EBE6;
    --ink-2:    #9AA6A0;
    --hairline: #2B333A;
    --hairline-strong: #39424A;

    --accent:      #7FA6D4;
    --accent-soft: #23303F;
    --heat:        #7FA6D4;
    --ci-band:     rgba(127, 166, 212, 0.20);

    --accurate:     #4DA657;
    --misleading:   #D6A63C;
    --inaccurate:   #E06A5E;
    --unverifiable: #8A948F;
    --unchecked:    #4A555C;

    --accurate-tint:     #17251C;
    --misleading-tint:   #241F14;
    --inaccurate-tint:   #2A1B18;
    --unverifiable-tint: #1E2429;

    /* Topic palette — validated (dark, surface #14181C) same hue order */
    --topic-0: #5A88C8;
    --topic-1: #D6584E;
    --topic-2: #22A091;
    --topic-3: #8A9A3C;
    --topic-4: #A878CC;
    --topic-5: #C77832;
    --topic-6: #CE5A88;
    --topic-7: #4DA657;
    --topic-other: #6C766F;

    --tm-axis:   #6B757B;
    --tm-tick:   #4A545A;
    --tm-needle: #E7EBE6;
    --tm-zone-low:  rgba(224, 106, 94, 0.12);
    --tm-zone-mid:  rgba(214, 166, 60, 0.12);
    --tm-zone-high: rgba(77, 166, 87, 0.14);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 22px; }
.measure { max-width: 68ch; }

/* ---- numbers, dates, badges are mono everywhere ---- */
.mono, .num, time, .n-badge, .stat-num, .bar-pct, .tm-readout {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

a { color: var(--accent); }
a:focus-visible,
.row-link:focus-visible,
.bar-link:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================== Header ============================== */
.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--raised);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 22px;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}
.brand .devanagari {
  font-size: 0.72em;
  color: var(--accent);
  font-weight: 500;
  opacity: 0.9;
}
.brand:hover { color: var(--accent); }
.tagline { color: var(--ink-2); font-size: 13.5px; flex: 1 1 260px; line-height: 1.4; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
}
.nav { flex-wrap: wrap; }
.nav a:hover { color: var(--accent); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

main.wrap { padding-top: 30px; padding-bottom: 72px; }

/* ============================== Type ============================== */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.12;
  margin: 0 0 10px;
  letter-spacing: -0.2px;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  margin: 0 0 12px;
  letter-spacing: -0.1px;
}
h3 { font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.lede { color: var(--ink-2); margin: 0 0 4px; font-size: 16.5px; }
.small { font-size: 13px; }
.muted { color: var(--ink-2); }
.empty { color: var(--ink-2); font-style: italic; }

.crumb { margin: 0 0 16px; font-size: 14px; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

section { margin: 34px 0 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 8px; margin-bottom: 14px;
}
.section-head h2 { margin: 0; }
.section-head .caption { color: var(--ink-2); font-size: 13px; }

.card {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ======================= THE TRUTH METER ======================= */
.truth-meter { display: block; height: auto; }
.tm-compact { width: 360px; max-width: 100%; }
.tm-large   { width: 640px; max-width: 100%; }
.tm-axis   { stroke: var(--tm-axis); stroke-width: 1.25; }
.tm-tick-major { stroke: var(--tm-tick); stroke-width: 1.25; }
.tm-tick-minor { stroke: var(--tm-tick); stroke-width: 0.75; opacity: 0.7; }
.tm-zone-low  { fill: var(--tm-zone-low); }
.tm-zone-mid  { fill: var(--tm-zone-mid); }
.tm-zone-high { fill: var(--tm-zone-high); }
.tm-end-label { fill: var(--ink-2); font-family: var(--mono); }
.tm-readout   { fill: var(--ink); font-family: var(--mono); font-weight: 600; }
.tm-needle-line { stroke: var(--tm-needle); stroke-width: 1.5; }
.tm-needle-tri  { fill: var(--tm-needle); }
.tm-needle-g { transform: translateX(var(--x)); }
.tm-insufficient {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-style: italic;
}
.tm-dash { stroke: var(--tm-tick); stroke-width: 1.5; stroke-dasharray: 4 4; }
.tm-ci-band { fill: var(--ci-band); }
.tm-ci-cap  { stroke: var(--accent); stroke-width: 1; opacity: 0.5; }

.tm-animate .tm-needle-g {
  animation: tm-sweep 950ms cubic-bezier(.16,.75,.24,1) both;
}
@keyframes tm-sweep {
  from { transform: translateX(var(--x0)); }
  to   { transform: translateX(var(--x)); }
}
@media (prefers-reduced-motion: reduce) {
  .tm-animate .tm-needle-g { animation: none; }
}

/* ======================= Leaderboard ======================= */

/* Corpus strip: 4 mono stat tiles */
.corpus-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0 8px;
}
.stat-tile {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-card);
}
.stat-num {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.stat-num.stat-sm { font-size: 18px; }
.stat-label {
  color: var(--ink-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 8px;
}

/* Findings callout cards */
.findings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0 6px;
}
.finding {
  display: block;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: box-shadow .12s ease, transform .12s ease;
}
a.finding:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.finding-kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--ink-2); margin-bottom: 8px;
}
.finding-stat {
  font-family: var(--serif);
  font-size: 27px; font-weight: 600; line-height: 1.05; color: var(--ink);
  margin-bottom: 6px;
}
.finding-stat .unit { font-size: 15px; color: var(--ink-2); font-family: var(--sans); }
.finding-body { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.finding-more { font-size: 12px; color: var(--accent); margin-top: 8px; }

/* Ranked ledger */
.ledger { margin-top: 8px; }
.ledger-head, .ledger-row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1.3fr) minmax(200px, 1fr) 64px minmax(90px, 0.7fr);
  align-items: center;
  gap: 16px;
}
.ledger-head {
  padding: 0 14px 8px;
  color: var(--ink-2);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  border-bottom: 1px solid var(--hairline);
}
.ledger-head .r { text-align: right; }
.ledger-row {
  padding: 14px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  transition: box-shadow .12s ease, background .12s ease;
}
.ledger-row:hover {
  background: var(--raised);
  box-shadow: var(--shadow-hover);
}
.ledger-row.sub { opacity: 0.62; }
.ledger-rank { text-align: right; color: var(--ink-2); font-size: 15px; }
.ledger-anchor .name {
  font-family: var(--serif);
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.ledger-row:hover .ledger-anchor .name { color: var(--accent); }
.ledger-anchor .sub-line { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.ledger-n { text-align: right; }
.n-badge {
  display: inline-block;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  padding: 2px 8px;
}
.ledger-row.sub .n-badge { background: transparent; }

/* mini verdict-mix strip */
.mini-mix {
  display: flex; height: 12px; width: 100%;
  border-radius: 3px; overflow: hidden; gap: 2px;
  background: transparent;
}
.mini-mix .seg { height: 100%; border-radius: 2px; }
.mini-mix .seg:first-child { border-top-left-radius: 3px; border-bottom-left-radius: 3px; }
.mini-mix .seg:last-child  { border-top-right-radius: 3px; border-bottom-right-radius: 3px; }

/* ======================= Verdict segments / chips ======================= */
.seg-accurate     { background: var(--accurate); }
.seg-misleading   { background: var(--misleading); }
.seg-inaccurate   { background: var(--inaccurate); }
.seg-unverifiable { background: var(--unverifiable); }
.seg-unchecked    {
  background: repeating-linear-gradient(
    45deg, transparent, transparent 3px,
    var(--unchecked) 3px, var(--unchecked) 4px);
  border: 1px solid var(--unchecked);
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline-strong);
  font-size: 11.5px; color: var(--ink-2); text-transform: capitalize;
  font-family: var(--sans); letter-spacing: 0.2px; white-space: nowrap;
}
.chip.mono { font-family: var(--mono); text-transform: none; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

.verdict-accurate     { color: var(--accurate);     border-color: var(--accurate); }
.verdict-inaccurate   { color: var(--inaccurate);   border-color: var(--inaccurate); }
.verdict-misleading   { color: var(--misleading);   border-color: var(--misleading); }
.verdict-unverifiable { color: var(--unverifiable); border-color: var(--unverifiable); }
.verdict-accurate .chip-dot     { background: var(--accurate); }
.verdict-inaccurate .chip-dot   { background: var(--inaccurate); }
.verdict-misleading .chip-dot   { background: var(--misleading); }
.verdict-unverifiable .chip-dot { background: var(--unverifiable); }
.pending {
  color: var(--ink-2);
  border-style: dashed;
  border-color: var(--hairline-strong);
}

/* ======================= Dossier ======================= */
.dossier-head {
  display: flex; flex-wrap: wrap; gap: 24px 40px;
  align-items: flex-start;
  padding: 24px;
  margin-top: 8px;
}
.dossier-id { flex: 1 1 260px; min-width: 240px; }
.dossier-id h1 { font-size: 34px; margin-bottom: 8px; }
.id-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dossier-meter { flex: 1 1 360px; min-width: 300px; }
.meter-context { color: var(--ink-2); font-size: 14px; margin: 6px 0 0; }
.meter-context strong { color: var(--ink); font-family: var(--mono); }
.score-headline {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px;
}
.score-headline .big {
  font-family: var(--serif);
  font-size: 40px; font-weight: 600; line-height: 1; color: var(--ink);
  font-feature-settings: "tnum" 1;
}
.score-headline .big.na { color: var(--ink-2); font-size: 26px; }
.score-headline .lbl { color: var(--ink-2); font-size: 13px; }

/* Verdict-mix stacked bar */
.stacked-bar {
  display: flex; height: 26px; width: 100%; margin: 10px 0 14px;
  gap: 2px; border-radius: 6px; overflow: hidden;
}
.stacked-bar .seg {
  height: 100%; min-width: 0;
  transition: filter .1s ease;
}
.stacked-bar .seg:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.stacked-bar .seg:last-child  { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.stacked-caption { color: var(--ink-2); font-size: 13px; margin: 2px 0 0; }

.legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legend li { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.legend strong { color: var(--ink); font-family: var(--mono); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }

/* Horizontal bar lists (coverage / framing / subtopics) */
.bars { margin-top: 6px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr 56px;
  align-items: center; gap: 14px; margin: 3px 0;
  padding: 5px 8px; border-radius: 6px;
}
.bar-label { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label.muted { color: var(--ink-2); }
.bar-track { height: 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 3px 0 0 3px; }
.bar-fill-muted { background: var(--hairline-strong); }
.bar-pct { text-align: right; font-size: 13px; color: var(--ink-2); }

a.bar-link { text-decoration: none; color: inherit; }
a.bar-link:hover { background: var(--accent-soft); }
a.bar-link:hover .bar-label { color: var(--accent); }

/* Topic color classes */
.tc-0 { background: var(--topic-0); } .tc-1 { background: var(--topic-1); }
.tc-2 { background: var(--topic-2); } .tc-3 { background: var(--topic-3); }
.tc-4 { background: var(--topic-4); } .tc-5 { background: var(--topic-5); }
.tc-6 { background: var(--topic-6); } .tc-7 { background: var(--topic-7); }
.tc-8 { background: var(--topic-other); }

/* Framing palette (reuse topic hues; distinct from verdict semantics) */
.fr-individuals         { background: var(--topic-5); }
.fr-system_institutions { background: var(--topic-0); }
.fr-government          { background: var(--topic-4); }
.fr-opposition          { background: var(--topic-6); }
.fr-minority_community  { background: var(--topic-1); }
.fr-foreign_actor       { background: var(--topic-3); }
.fr-media               { background: var(--topic-2); }
.fr-none                { background: var(--hairline-strong); }

/* Framing panel with a direct-labeled top target */
.framing-lead {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; margin: 0 0 14px;
  background: var(--accent-soft); border-radius: var(--radius);
}
.framing-lead .who {
  font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink);
}
.framing-lead .who-n { font-family: var(--mono); color: var(--ink-2); font-size: 14px; }

/* Flagged claims */
.flagged { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.flagged li {
  padding: 14px 16px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--inaccurate);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.flagged li.v-misleading { border-left-color: var(--misleading); }
.flagged-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.flagged-claim { display: block; font-size: 16px; text-decoration: none; color: var(--ink); font-weight: 500; margin: 2px 0; }
.flagged-claim:hover { color: var(--accent); text-decoration: underline; }
.flagged .quote { margin: 8px 0 0; }
.ev-count { font-size: 12px; color: var(--ink-2); font-family: var(--mono); }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.board { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 14px; }
table.board caption { text-align: left; color: var(--ink-2); font-size: 13px; padding: 0 0 8px; }
table.board th, table.board td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
table.board th { color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
table.board td.num, table.board th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.board tbody tr:hover { background: var(--raised); }
table.board a { text-decoration: none; }
table.board a:hover { text-decoration: underline; }

.episodes { list-style: none; padding: 0; margin: 4px 0 0; }
.episodes li { padding: 9px 0; border-bottom: 1px solid var(--hairline); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ep-date { color: var(--ink-2); font-family: var(--mono); font-size: 13px; width: 92px; flex: 0 0 auto; }

/* ======================= Claim receipt ======================= */
.receipt {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-top: 8px;
}
.receipt-banner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline);
  border-left: 6px solid var(--unverifiable);
}
.receipt-banner.v-accurate     { background: var(--accurate-tint);     border-left-color: var(--accurate); }
.receipt-banner.v-inaccurate   { background: var(--inaccurate-tint);   border-left-color: var(--inaccurate); }
.receipt-banner.v-misleading   { background: var(--misleading-tint);   border-left-color: var(--misleading); }
.receipt-banner.v-unverifiable { background: var(--unverifiable-tint); border-left-color: var(--unverifiable); }
.receipt-banner.v-pending      { background: var(--surface); border-left-color: var(--hairline-strong); border-left-style: dashed; }
.verdict-word { font-family: var(--serif); font-size: 26px; font-weight: 600; text-transform: capitalize; line-height: 1; }
.verdict-accurate .verdict-word     { color: var(--accurate); }
.verdict-inaccurate .verdict-word   { color: var(--inaccurate); }
.verdict-misleading .verdict-word   { color: var(--misleading); }
.verdict-unverifiable .verdict-word { color: var(--unverifiable); }

/* small confidence meter */
.conf-meter { display: flex; flex-direction: column; gap: 4px; }
.conf-track { width: 130px; height: 8px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 4px; overflow: hidden; }
.conf-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.conf-label { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }

.badge-review {
  margin-left: auto; font-size: 12px; color: var(--misleading);
  border: 1px solid var(--misleading); border-radius: 999px; padding: 3px 12px;
  white-space: nowrap;
}
.receipt-body { padding: 20px 22px; }
.receipt-body section { margin-top: 22px; }
.receipt-body section:first-child { margin-top: 0; }
.claim-en { font-family: var(--serif); font-size: 21px; margin: 4px 0 10px; line-height: 1.3; }
.quote {
  color: var(--ink-2); font-style: italic;
  border-left: 3px solid var(--hairline-strong);
  padding: 4px 0 4px 14px; margin: 8px 0;
  font-family: Georgia, "Noto Serif Devanagari", "Nirmala UI", serif; /* Devanagari-safe */
  font-size: 16.5px;
}
.claim-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.rationale { font-size: 15.5px; line-height: 1.6; }

.watch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 9px 16px; border-radius: 6px; text-decoration: none;
  font-size: 14px; font-weight: 500; margin-top: 6px;
}
.watch-btn:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { .watch-btn { color: #0e1216; } }

.evidence { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.evidence li {
  padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 6px;
  background: var(--surface); word-break: break-word;
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline;
}
.evidence a { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.audit-chip { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.audit-ok   { color: var(--accurate);     border: 1px solid var(--accurate); }
.audit-dead { color: var(--inaccurate);   border: 1px solid var(--inaccurate); }
.audit-pend { color: var(--ink-2);        border: 1px dashed var(--hairline-strong); }
.evidence-warn {
  color: var(--inaccurate); font-size: 13px;
  border: 1px solid var(--inaccurate); border-radius: 6px; padding: 8px 12px; margin: 0 0 10px;
}

/* ======================= Methodology ======================= */
.method { }
.method ol.sections { counter-reset: sec; list-style: none; padding: 0; margin: 24px 0 0; }
.method ol.sections > li {
  counter-increment: sec;
  padding: 0 0 8px 48px;
  position: relative;
  margin-bottom: 26px;
}
.method ol.sections > li::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--mono); font-size: 15px; color: var(--accent);
  border: 1px solid var(--hairline-strong); border-radius: 6px;
  padding: 2px 8px; background: var(--raised);
}
.method h2 { border: none; }
.method p, .method li { font-size: 15.5px; }
.method .pipeline { padding-left: 20px; }
.method .pipeline li { margin: 6px 0; }
code {
  background: var(--surface); border: 1px solid var(--hairline);
  padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: 13.5px;
}

/* ======================= Tooltip ======================= */
.tip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 5px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .1s ease;
  white-space: nowrap;
  max-width: 280px;
}
.tip.show { opacity: 1; }

/* ======================= Footer ======================= */
.site-footer { border-top: 1px solid var(--hairline); color: var(--ink-2); font-size: 13px; padding: 24px 0; margin-top: 40px; }
.site-footer .wrap { display: flex; gap: 8px; flex-direction: column; }
.site-footer .measure { margin: 0; }

/* ======================= Leaderboard N badge extras ======================= */
.n-of { color: var(--ink-2); }
.ledger-row.sub .n-of { color: var(--ink-2); }
.ci-text {
  display: block; margin-top: 4px;
  font-size: 11px; color: var(--ink-2);
  white-space: nowrap;
}

/* ======================= Comparison charts ======================= */
.compare .chart { margin: 0 0 30px; }
.compare .chart:last-child { margin-bottom: 0; }
.chart figcaption { margin: 0 0 10px; }
.chart figcaption h3 { margin: 0 0 2px; }
.chart figcaption .cap { margin: 0; color: var(--ink-2); font-size: 13px; max-width: 70ch; line-height: 1.45; }

.chart-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.cmp-svg { display: block; font-family: var(--sans); }
.cmp-svg text { fill: var(--ink); }

.cmp-grid { stroke: var(--hairline); stroke-width: 1; }
.cmp-grid.faint { stroke: var(--hairline); opacity: 0.5; }
.cmp-axis { stroke: var(--hairline-strong); stroke-width: 1.25; }
.cmp-tick { fill: var(--ink-2); font-family: var(--mono); font-size: 10px; }
.cmp-axis-title { fill: var(--ink-2); font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; }
.cmp-whisker { stroke: var(--accent); stroke-width: 1.5; opacity: 0.45; }
.cmp-dot { fill: var(--accent); stroke: var(--raised); stroke-width: 1.5; cursor: pointer; }
.cmp-dot:hover, .cmp-dot:focus { fill: var(--ink); outline: none; }
.cmp-dot-label { fill: var(--ink); font-size: 12px; font-weight: 600; }

.cmp-row-label { fill: var(--ink); font-size: 12.5px; }
.cmp-row-label.link { fill: var(--accent); cursor: pointer; }
.cmp-svg a:hover .cmp-row-label.link { text-decoration: underline; }
.cmp-seg { transition: filter .1s ease; cursor: default; }
.cmp-seg:hover, .cmp-seg:focus { filter: brightness(1.08); outline: none; }
.cmp-head { fill: var(--ink-2); font-size: 11px; font-weight: 600; cursor: default; }

.heat-cell { fill: var(--heat); stroke: var(--hairline); stroke-width: 0.5; cursor: default; }
.heat-cell:hover, .heat-cell:focus { stroke: var(--accent); stroke-width: 1.5; outline: none; }
.heat-num { fill: var(--ink); font-family: var(--mono); font-size: 11px; pointer-events: none; }

.donut-wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; }
.donut-seg { stroke: var(--raised); stroke-width: 2; cursor: default; transition: filter .1s ease; }
.donut-seg:hover, .donut-seg:focus { filter: brightness(1.08); outline: none; }
.donut-center-num { fill: var(--ink); font-family: var(--mono); font-weight: 600; font-size: 30px; }
.donut-center-lbl { fill: var(--ink-2); font-size: 11px; }

.cmp-legend { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cmp-legend li { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.cmp-legend.vert { flex-direction: column; gap: 7px; margin: 0; }
.cmp-legend strong { color: var(--ink); font-family: var(--mono); }

/* SVG fill classes (topic + verdict). Each also sets `background` so the same
   class paints an HTML legend swatch; SVG rects/paths use `fill`. */
.tf-0 { fill: var(--topic-0); background: var(--topic-0); }
.tf-1 { fill: var(--topic-1); background: var(--topic-1); }
.tf-2 { fill: var(--topic-2); background: var(--topic-2); }
.tf-3 { fill: var(--topic-3); background: var(--topic-3); }
.tf-4 { fill: var(--topic-4); background: var(--topic-4); }
.tf-5 { fill: var(--topic-5); background: var(--topic-5); }
.tf-6 { fill: var(--topic-6); background: var(--topic-6); }
.tf-7 { fill: var(--topic-7); background: var(--topic-7); }
.tf-8 { fill: var(--topic-other); background: var(--topic-other); }
.vf-accurate     { fill: var(--accurate);     background: var(--accurate); }
.vf-misleading   { fill: var(--misleading);   background: var(--misleading); }
.vf-inaccurate   { fill: var(--inaccurate);   background: var(--inaccurate); }
.vf-unverifiable { fill: var(--unverifiable); background: var(--unverifiable); }
.vf-unchecked {
  fill: var(--unchecked);
  background: repeating-linear-gradient(
    45deg, var(--surface), var(--surface) 3px, var(--unchecked) 3px, var(--unchecked) 5px);
  border: 1px solid var(--unchecked);
}

/* ======================= Filter bar ======================= */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 12px;
}
.filter-bar input[type="search"], .filter-bar select {
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--raised); border: 1px solid var(--hairline-strong);
  border-radius: 6px; padding: 7px 10px;
}
.filter-bar .fb-search { flex: 1 1 220px; min-width: 160px; }
.filter-bar select { text-transform: capitalize; cursor: pointer; }
.filter-bar button {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  background: var(--accent); color: #fff; border: none;
  border-radius: 6px; padding: 8px 16px; cursor: pointer;
}
.filter-bar button:hover { filter: brightness(1.08); }
.filter-bar .fb-clear { font-size: 13px; color: var(--ink-2); text-decoration: none; padding: 6px 4px; }
.filter-bar .fb-clear:hover { color: var(--accent); text-decoration: underline; }
@media (prefers-color-scheme: dark) { .filter-bar button { color: #0e1216; } }

.active-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2);
  background: var(--accent-soft); border-radius: 999px;
  padding: 4px 6px 4px 14px; margin: 0 0 12px;
}
.active-chip strong { color: var(--ink); }
.chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  color: var(--ink-2); text-decoration: none; font-size: 15px; line-height: 1;
  background: var(--raised);
}
.chip-x:hover { color: var(--inaccurate); }

/* Subtopic chip inside claims tables */
.sub-chip {
  display: inline-block; margin-left: 8px;
  font-size: 11px; font-family: var(--mono);
  color: var(--ink-2); text-decoration: none;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 4px; padding: 1px 7px; white-space: nowrap;
}
.sub-chip:hover { color: var(--accent); border-color: var(--accent); }

/* ======================= Scrutiny bar ======================= */
.scrutiny { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; }
.scrutiny-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--ink-2); flex: 0 0 auto;
}
.scrutiny-track {
  flex: 1 1 auto; height: 8px; max-width: 260px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 4px; overflow: hidden;
}
.scrutiny-fill { display: block; height: 100%; background: var(--accent); border-radius: 3px 0 0 3px; }
.scrutiny-pct { font-size: 12px; color: var(--ink-2); flex: 0 0 auto; }

/* ======================= Pager ======================= */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin: 16px 0 0; font-size: 14px;
}
.pager .pg-nums { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.pager .pg, .pager .pg-cur, .pager .pg-gap {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px;
}
.pager a.pg { color: var(--accent); text-decoration: none; border: 1px solid var(--hairline); }
.pager a.pg:hover { background: var(--accent-soft); }
.pager .pg-cur { background: var(--accent); color: #fff; font-weight: 600; }
.pager .pg-gap { color: var(--ink-2); min-width: 18px; }
.pager .pg-off { color: var(--ink-2); border: 1px solid var(--hairline); opacity: 0.55; }
@media (prefers-color-scheme: dark) { .pager .pg-cur { color: #0e1216; } }

/* ======================= Responsive ======================= */
@media (max-width: 720px) {
  .corpus-strip { grid-template-columns: repeat(2, 1fr); }
  .findings { grid-template-columns: 1fr; }
  .filter-bar .fb-search { flex-basis: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  h1 { font-size: 27px; }
  .dossier-id h1 { font-size: 28px; }
  .ledger-head { display: none; }
  .ledger-row {
    grid-template-columns: 30px 1fr;
    grid-template-areas:
      "rank anchor"
      "meter meter"
      "n mix";
    gap: 8px 12px;
  }
  .ledger-rank { grid-area: rank; }
  .ledger-anchor { grid-area: anchor; }
  .ledger-meter { grid-area: meter; margin-top: 4px; }
  .ledger-n { grid-area: n; text-align: left; }
  .ledger-mix { grid-area: mix; align-self: center; }
  .bar-row { grid-template-columns: minmax(90px, 130px) 1fr 44px; gap: 10px; }
  .stat-num { font-size: 24px; }
}

/* ======================= IA upgrade: nav-forward components ======================= */

/* Screen-reader-only text */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* (i) explainer — a <details> popover, keyboard-accessible, no framework */
.info { display: inline-block; position: relative; vertical-align: middle; }
.info > summary {
  list-style: none; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
}
.info > summary::-webkit-details-marker { display: none; }
.info-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--hairline-strong); color: var(--ink-2);
  font-family: var(--serif); font-style: italic; font-size: 11px; line-height: 1;
  background: var(--raised); transition: color .1s ease, border-color .1s ease;
}
.info > summary:hover .info-i,
.info[open] > summary .info-i { color: var(--accent); border-color: var(--accent); }
.info > summary:focus-visible { outline: none; }
.info > summary:focus-visible .info-i { outline: 2px solid var(--accent); outline-offset: 2px; }
.info-pop {
  position: absolute; z-index: 30; left: 0; top: calc(100% + 6px);
  width: max-content; max-width: min(320px, 84vw);
  background: var(--raised); color: var(--ink);
  border: 1px solid var(--hairline-strong); border-radius: 8px;
  box-shadow: var(--shadow-hover);
  padding: 10px 13px; font-size: 13px; line-height: 1.5; font-weight: 400;
  font-family: var(--sans); text-transform: none; letter-spacing: normal;
  white-space: normal;
}
/* Keep the popover on-screen near the right edge */
.section-head .info-pop, .ledger-head .info-pop { right: auto; }
@media (max-width: 560px) { .info-pop { left: auto; right: 0; } }

/* Corpus stat tiles that are also links */
a.stat-link { text-decoration: none; color: inherit; display: block;
  transition: box-shadow .12s ease, transform .12s ease; }
a.stat-link:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
a.stat-link:hover .stat-num { color: var(--accent); }

/* Compact findings teaser + compare CTA */
.findings-teaser .finding { padding: 14px 16px; }
.findings-teaser .finding-stat { font-size: 24px; margin-bottom: 4px; }
.findings-teaser .finding-body { font-size: 13px; }
.compare-cta { margin: 14px 0 0; }
.compare-cta a {
  text-decoration: none; font-size: 14px; font-weight: 500;
  display: inline-block; padding: 4px 0;
}
.compare-cta a:hover { text-decoration: underline; }

/* Insights: headline number + explanation, above each drillable breakdown */
.insight-headline {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  margin: 0 0 14px;
}
.ih-stat {
  font-family: var(--serif); font-weight: 600; line-height: 1;
  font-size: 44px; color: var(--ink); flex: 0 0 auto;
  font-feature-settings: "tnum" 1;
}
.ih-stat .unit { font-size: 20px; color: var(--ink-2); font-family: var(--sans); }
.ih-body { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; flex: 1 1 320px; }
.ih-body strong { color: var(--ink); }

/* Group tags on insight bars */
.tag {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
  border-radius: 4px; vertical-align: middle;
  border: 1px solid var(--hairline-strong); color: var(--ink-2);
  font-family: var(--sans);
}
.tag-conflict { color: var(--inaccurate); border-color: var(--inaccurate); }
.tag-dev { color: var(--accurate); border-color: var(--accurate); }
.tag-gap { color: var(--misleading); border-color: var(--misleading); }
.bar-row.row-gap { background: var(--misleading-tint); }
.bar-pct .muted { font-size: 0.92em; }

/* Framing drill-down title (h1 with a swatch) */
.framing-title {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; line-height: 1.15;
}

/* Framing-lead as a link */
a.framing-lead-link { text-decoration: none; color: inherit; transition: box-shadow .12s ease; }
a.framing-lead-link:hover { box-shadow: var(--shadow-hover); }
a.framing-lead-link:hover .who { color: var(--accent); }

/* Clickable chart marks — pointer cursor + focus affordance on SVG links */
.cmp-seg.link, .heat-cell.link, .donut-seg.link { cursor: pointer; }
.cmp-svg a { cursor: pointer; }
.cmp-svg a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cmp-svg a:hover .cmp-seg.link,
.cmp-svg a:focus-visible .cmp-seg.link { filter: brightness(1.12); }
.cmp-svg a:hover .heat-cell.link { stroke: var(--accent); stroke-width: 1.5; }
.cmp-svg a:hover .donut-seg.link { filter: brightness(1.12); }
.cmp-svg a:hover .cmp-dot { fill: var(--ink); }
.cmp-legend a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 7px; }
.cmp-legend a:hover { color: var(--accent); }
.cmp-legend.vert a:hover .swatch { outline: 1px solid var(--accent); }

/* ============================================================================
   CASE FILES — index cards, dashboard timeline rail, coverage stance chips.
   All colours derive from the existing token set (accent, verdict, topic hues).
   ============================================================================ */

/* Case index cards */
.case-list { display: grid; gap: 14px; margin-top: 18px; }
.case-card {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-card);
}
.case-card:hover { border-color: var(--hairline-strong); }
.case-card:hover h2 { color: var(--accent); }
.case-card-main { flex: 1 1 340px; min-width: 0; }
.case-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.case-card-head h2 { margin: 0; font-size: 20px; }
.case-dek { color: var(--ink-2); font-size: 14px; margin: 6px 0 8px; line-height: 1.45; }
.case-meta { color: var(--ink-2); font-size: 13px; }
.case-card-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.case-card-read { font-size: 12px; color: var(--ink-2); }

/* Vertical timeline rail */
.timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 6px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; background: var(--hairline-strong);
}
.tl-node { position: relative; padding: 0 0 18px 26px; }
.tl-node:last-child { padding-bottom: 0; }
.tl-marker {
  position: absolute; left: 0; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--raised);
  border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--surface);
}
.tl-card {
  background: var(--raised); border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-card);
}
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-date { color: var(--ink-2); font-size: 12.5px; }
.tl-kind { text-transform: capitalize; }
.tl-title { margin: 6px 0 4px; font-size: 16px; }
.tl-body { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.tl-source { display: inline-block; margin-top: 8px; font-size: 12.5px; }

/* Coverage stance — chips + distribution bar (topic hues, kept distinct from
   the reserved verdict colours). */
.stance-bars { margin-bottom: 14px; }
.stance-chip { border: 1px solid var(--hairline-strong); }
.stance-supportive  { color: var(--topic-7); border-color: var(--topic-7); }
.stance-neutral     { color: var(--ink-2);   border-color: var(--hairline-strong); }
.stance-critical    { color: var(--topic-5); border-color: var(--topic-5); }
.stance-dismissive  { color: var(--topic-4); border-color: var(--topic-4); }
.stance-defamatory  { color: var(--topic-1); border-color: var(--topic-1); }
.stance-mixed       { color: var(--topic-6); border-color: var(--topic-6); }
.stance-unclassified { color: var(--ink-2);  border-color: var(--hairline); }
.bar-fill.stance-supportive  { background: var(--topic-7); }
.bar-fill.stance-neutral     { background: var(--topic-0); }
.bar-fill.stance-critical    { background: var(--topic-5); }
.bar-fill.stance-dismissive  { background: var(--topic-4); }
.bar-fill.stance-defamatory  { background: var(--topic-1); }
.bar-fill.stance-mixed       { background: var(--topic-6); }
.bar-fill.stance-unclassified { background: var(--topic-other); }
