/* ===========================================================================
   DC Council Tracker — design system
   ---------------------------------------------------------------------------
   Positioning: a publication of record, not a dashboard. Editorial serif for
   headlines, UI sans for data, hairline rules instead of boxes, and density
   appropriate to a reference work people scan rather than browse.

   Color decisions are computed, not chosen by eye:
     · Vote outcomes use the fixed STATUS palette (good/critical/warning) and
       are ALWAYS paired with a text label or glyph — red/green alone measures
       ΔE 4.1 under deuteranopia, so color never carries the meaning.
     · Scorecard scores use a single-hue ORDINAL blue ramp, validated for
       lightness monotonicity, step gaps and light-end contrast in both modes.
       Deliberately NOT red-to-green: the site hosts scorecards, it does not
       endorse them, and a red "F" would editorialize on the org's behalf.
   =========================================================================== */

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light;

  /* surfaces — warm paper, not clinical white */
  --page:          #f4f3ee;
  --surface:       #fbfaf7;
  --surface-sunk:  #f0efe9;
  --surface-hover: #f5f4ee;

  /* ink */
  --ink:           #17171a;
  --ink-2:         #4e4d49;
  --ink-3:         #7a7873;

  /* rules */
  --rule:          #e2e0d8;
  --rule-strong:   #c9c7bd;

  /* brand / interactive */
  --accent:        #1c5cab;
  --accent-hover:  #104281;
  --accent-wash:   #e8f0fa;

  /* status — fixed palette; never themed, never color-alone */
  --good:          #0ca30c;
  --good-text:     #006300;
  --good-wash:     #e6f5e6;
  --critical:      #d03b3b;
  --critical-text: #a32222;
  --critical-wash: #fbeaea;
  --warning:       #fab219;
  --warning-text:  #7a5200;
  --warning-wash:  #fdf3dd;
  --neutral-wash:  #eceae3;

  /* ordinal score ramp (validated: light) */
  --score-1: #86b6ef;
  --score-2: #5598e7;
  --score-3: #2a78d6;
  --score-4: #1c5cab;
  --score-5: #104281;

  /* type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --header-h:  62px;
  --radius:    8px;
  --radius-sm: 5px;
  --shadow:    0 1px 2px rgba(23,23,26,.05), 0 8px 24px -12px rgba(23,23,26,.18);
  --measure:   68ch;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page:          #0f1012;
    --surface:       #16171a;
    --surface-sunk:  #1c1e22;
    --surface-hover: #1f2126;
    --ink:           #f2f1ee;
    --ink-2:         #b5b3ad;
    --ink-3:         #85837e;
    --rule:          #2b2d32;
    --rule-strong:   #3d4046;
    --accent:        #6da7ec;
    --accent-hover:  #9ec5f4;
    --accent-wash:   #14243a;
    --good:          #0ca30c;
    --good-text:     #4cc24c;
    --good-wash:     #122a12;
    --critical:      #d03b3b;
    --critical-text: #ef8177;
    --critical-wash: #2e1616;
    --warning:       #fab219;
    --warning-text:  #d8a445;
    --warning-wash:  #2c2410;
    --neutral-wash:  #23252a;
    --score-1: #cde2fb; --score-2: #9ec5f4; --score-3: #6da7ec;
    --score-4: #3987e5; --score-5: #256abf;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page:#0f1012; --surface:#16171a; --surface-sunk:#1c1e22; --surface-hover:#1f2126;
  --ink:#f2f1ee; --ink-2:#b5b3ad; --ink-3:#85837e;
  --rule:#2b2d32; --rule-strong:#3d4046;
  --accent:#6da7ec; --accent-hover:#9ec5f4; --accent-wash:#14243a;
  --good:#0ca30c; --good-text:#4cc24c; --good-wash:#122a12;
  --critical:#d03b3b; --critical-text:#ef8177; --critical-wash:#2e1616;
  --warning:#fab219; --warning-text:#d8a445; --warning-wash:#2c2410;
  --neutral-wash:#23252a;
  --score-1:#cde2fb; --score-2:#9ec5f4; --score-3:#6da7ec; --score-4:#3987e5; --score-5:#256abf;
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.011em; }
h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; margin: 0 0 12px; }
h2 { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.22; margin: 0 0 6px; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 20; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------- header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
}
.header-inner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  min-height: var(--header-h);
  padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: baseline; gap: 10px; color: inherit;
  text-decoration: none; flex-shrink: 0; }
.brand-mark {
  font-family: var(--serif); font-size: 21px; font-weight: 700;
  letter-spacing: -.02em; color: var(--ink);
}
.brand-mark .dot { color: var(--critical); }
.brand small {
  display: block; color: var(--ink-3); font-size: 11px;
  letter-spacing: .07em; text-transform: uppercase; padding-top: 2px;
}

.site-nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 6px 10px; border-radius: 999px; transition: background .12s, color .12s;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-sunk); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--accent-wash); color: var(--accent); font-weight: 600; }

.header-search { display: flex; gap: 6px; flex-shrink: 1; min-width: 0; }
.header-search input {
  width: 208px; min-width: 0; padding: 8px 14px; border: 1px solid var(--rule-strong);
  border-radius: 999px; background: var(--page); color: var(--ink); font-size: 14px;
  font-family: inherit;
}
.header-search input::placeholder { color: var(--ink-3); }
.header-search button {
  padding: 8px 16px; border: 0; border-radius: 999px; background: var(--ink);
  color: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.header-search button:hover { background: var(--accent); }

/* One row at desktop: the search shrinks rather than wrapping under the logo,
   which reads as a layout bug rather than a choice. */
@media (min-width: 900px) {
  .header-inner { flex-wrap: nowrap; }
  .header-search { flex: 0 1 auto; }
  .header-search input { width: clamp(150px, 15vw, 220px); }
}

/* ----------------------------------------------------------------- hero */

.hero { padding: 52px 0 30px; max-width: var(--measure); }
.kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--critical-text); margin: 0 0 14px;
  display: flex; align-items: center; gap: 9px;
}
.kicker::before {
  content: ""; width: 22px; height: 2px; background: var(--critical); display: block;
}
.hero .lede { font-size: 18.5px; line-height: 1.62; color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------ stat rail */

.stat-rail {
  display: grid; gap: 0; margin: 30px 0 10px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
}
.stat {
  padding: 15px 18px; border-right: 1px solid var(--rule);
}
.stat:last-child { border-right: 0; }
.stat .value {
  font-size: 27px; font-weight: 650; letter-spacing: -.025em; line-height: 1.1;
  color: var(--ink); font-family: var(--sans);
}
.stat .value.is-alert { color: var(--critical-text); }
.stat .label {
  font-size: 11.5px; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .06em; padding-top: 4px;
}

/* --------------------------------------------------------------- layout */

.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 22px;
}
.card-raised { box-shadow: var(--shadow); }
.grid-2 { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.section { margin: 44px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink);
  padding-bottom: 8px; margin-bottom: 4px;
}
.section-head h2 { margin: 0; }
.section-note { margin: 10px 0 18px; color: var(--ink-2); font-size: 14.5px; max-width: var(--measure); }

/* --------------------------------------------------------------- tables */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead th {
  text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3);
  border-bottom: 1px solid var(--rule-strong);
  background: var(--surface);
  /* NOT sticky: .table-scroll is an overflow-x container, so a sticky thead
     positions against that container rather than the viewport and lands on top
     of the first row. Wide tables need the horizontal scroll more than long
     tables need a pinned header. */
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:hover { background: var(--surface-hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }

.measure-number {
  font-family: var(--mono); font-size: 12.5px; white-space: nowrap;
  color: var(--ink-2); text-decoration: none;
}
a.measure-number:hover { color: var(--accent); }
.row-title { display: block; color: var(--ink); font-weight: 500; line-height: 1.4; }
a.row-title { text-decoration: none; }
a.row-title:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- pills */

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  white-space: nowrap; background: var(--neutral-wash); color: var(--ink-2);
  font-family: var(--sans);
}
.pill.good    { background: var(--good-wash);     color: var(--good-text); }
.pill.bad     { background: var(--critical-wash); color: var(--critical-text); }
.pill.warn    { background: var(--warning-wash);  color: var(--warning-text); }
.pill.neutral { background: var(--accent-wash);   color: var(--accent); }
/* Glyphs are the secondary encoding that lets these survive CVD and print. */
.pill.good::before { content: "✓"; font-size: 11px; }
.pill.bad::before  { content: "✕"; font-size: 10px; }
.pill.warn::before { content: "◐"; font-size: 10px; }

/* --------------------------------------------------------------- tally */

.tally {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  white-space: nowrap; font-size: 13.5px; text-decoration: none;
}
.tally .y { color: var(--good-text); font-weight: 600; }
.tally .n { color: var(--critical-text); font-weight: 700; }
.tally .sep { color: var(--ink-3); }

/* Stacked micro-meter. 2px surface gaps between segments are the spacer rule —
   they keep adjacent fills legible without relying on hue contrast. */
.meter {
  display: flex; height: 7px; border-radius: 999px;
  background: var(--surface-sunk); overflow: hidden; gap: 2px;
}
.meter span { display: block; height: 100%; }
.meter .yes     { background: var(--good); }
.meter .no      { background: var(--critical); }
.meter .absent  { background: var(--rule-strong); }
.meter.inline { width: 74px; display: inline-flex; vertical-align: middle; margin-left: 8px; }

/* -------------------------------------------------------------- filters */

.filters {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 22px;
}
.filters label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.filters select, .filters input[type="search"], .filters input[type="text"], .filters input[type="email"] {
  padding: 8px 11px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  background: var(--page); color: var(--ink); font-size: 14px; min-width: 150px;
  font-family: inherit;
}
.filters .checkbox {
  display: flex; align-items: center; gap: 7px; font-size: 14px;
  padding-bottom: 9px; color: var(--ink-2); cursor: pointer;
}
.btn, .filters button {
  padding: 9px 18px; border: 0; border-radius: var(--radius-sm); background: var(--ink);
  color: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer;
  font-family: inherit; text-decoration: none; display: inline-block;
}
.btn:hover, .filters button:hover { background: var(--accent); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink-2); border: 1px solid var(--rule-strong);
}
.btn-ghost:hover { background: var(--surface-sunk); color: var(--ink); }
.filters .reset { background: transparent; color: var(--ink-3); text-decoration: underline; padding: 9px 4px; }
.filters .reset:hover { background: transparent; color: var(--ink); }

/* ----------------------------------------------------------- pagination */

.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 30px 0 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 7px 13px; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-2); font-size: 14px; background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 600; }
.pagination .disabled { opacity: .4; }

/* -------------------------------------------------------------- vote UI */

.vote-card {
  border-left: 3px solid var(--accent); background: var(--surface);
  border-top: 1px solid var(--rule); border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 15px 18px; margin-bottom: 12px;
}
.vote-card.is-lone { border-left-color: var(--critical); }
.vote-card .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.vote-card h3 { font-family: var(--sans); font-size: 15.5px; font-weight: 600; margin: 5px 0 8px; }
.vote-card h3 a { color: var(--ink); text-decoration: none; }
.vote-card h3 a:hover { color: var(--accent); text-decoration: underline; }

.roster { display: grid; gap: 7px; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
.roster .row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  background: var(--surface);
}
.roster .row.no { border-color: var(--critical); background: var(--critical-wash); }
.roster .row a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
.roster .row a:hover { text-decoration: underline; }

/* Initials chip — gives member lists a scannable anchor without avatars. */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent-wash);
  color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .02em;
  flex-shrink: 0;
}

/* ------------------------------------------------------------ timeline */

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 7px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--rule-strong);
}
.timeline li.is-vote::before { border-color: var(--accent); background: var(--accent); }
.timeline .date {
  font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600;
}
.timeline .what { font-weight: 550; color: var(--ink); }

/* ------------------------------------------------------------ scorecard */

.scorecard-head {
  display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap;
  padding: 22px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); margin-bottom: 8px;
}
.scorecard-head .org-mark {
  width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--surface-sunk);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink-2);
}
.hosted-banner {
  display: flex; gap: 10px; align-items: flex-start;
  border-left: 3px solid var(--warning); background: var(--warning-wash);
  padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px; color: var(--ink-2); margin-bottom: 26px; line-height: 1.55;
}

/* Score bar: ordinal single-hue ramp, value always printed beside it. */
.score-bar { display: flex; align-items: center; gap: 10px; min-width: 168px; }
.score-track {
  flex: 1; height: 9px; background: var(--surface-sunk); border-radius: 999px; overflow: hidden;
}
.score-fill { display: block; height: 100%; border-radius: 999px; background: var(--score-3); }
.score-fill.s1 { background: var(--score-1); }
.score-fill.s2 { background: var(--score-2); }
.score-fill.s3 { background: var(--score-3); }
.score-fill.s4 { background: var(--score-4); }
.score-fill.s5 { background: var(--score-5); }
.score-value {
  font-variant-numeric: tabular-nums; font-weight: 650; font-size: 14px;
  min-width: 44px; text-align: right; color: var(--ink);
}
.grade {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 26px; padding: 0 7px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; background: var(--surface-sunk); color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.position-yes, .position-no { font-weight: 600; font-size: 12.5px; }
.position-yes { color: var(--good-text); }
.position-no  { color: var(--critical-text); }

.rationale {
  font-size: 13.5px; color: var(--ink-2); line-height: 1.55;
  border-left: 2px solid var(--rule-strong); padding-left: 12px; margin: 6px 0 0;
}

/* ----------------------------------------------------------- transcript */

.transcript { max-width: var(--measure); }
.transcript .turn { padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; line-height: 1.68; }
.transcript mark, .snippet mark { background: var(--warning-wash); color: var(--ink); padding: 0 2px; border-radius: 2px; }
.snippet { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin-top: 4px; }

/* --------------------------------------------------------------- prose */

.prose { max-width: var(--measure); font-size: 16.5px; line-height: 1.7; }
.prose h2 { margin-top: 36px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose code, .prose pre { font-family: var(--mono); font-size: 13px; }
.prose pre {
  background: var(--surface-sunk); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 15px; overflow-x: auto; line-height: 1.5;
}

.empty {
  text-align: center; padding: 44px 20px; color: var(--ink-3);
  border: 1px dashed var(--rule-strong); border-radius: var(--radius);
}

/* -------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--rule); background: var(--surface); margin-top: 72px; padding: 40px 0 32px; }
.footer-inner { display: grid; gap: 32px; grid-template-columns: 2.2fr 1fr 1fr; font-size: 14px; }
.footer-inner strong { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.footer-inner ul { list-style: none; margin: 10px 0 0; padding: 0; }
.footer-inner li { margin-bottom: 7px; }
.footer-inner p { color: var(--ink-2); margin: 10px 0 0; line-height: 1.6; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .header-search { width: 100%; order: 3; }
  .header-search input { min-width: 0; flex: 1; }
  .site-nav { margin-left: 0; order: 2; }
  .hero { padding: 34px 0 22px; }
  .stat-rail { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
  .stat { border-bottom: 1px solid var(--rule); }
}

/* ---------------------------------------------------------------- print */
/* Scorecards and vote records get printed and handed out at meetings. */

@media print {
  :root { --page: #fff; --surface: #fff; --ink: #000; --ink-2: #333; --rule: #ccc; }
  .site-header, .site-footer, .filters, .pagination, .skip-link, .header-search { display: none !important; }
  body { font-size: 11pt; }
  a { color: #000; text-decoration: underline; }
  .wrap { max-width: none; padding: 0; }
  table { font-size: 10pt; }
  .card, .scorecard-head, .stat-rail { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  tr, .vote-card { break-inside: avoid; }
  .meter span, .score-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ======================================================================
   congressReporter addendum — party context, split bars, flashes.
   Party hue is contextual decoration only; the letter label always renders.
   ====================================================================== */
.flashes { margin: 16px 0; }
.flash { padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.flash-ok    { background: var(--good-wash);     color: var(--good-text); }
.flash-error { background: var(--critical-wash); color: var(--critical-text); }

.pill.party-D { background: var(--accent-wash);  color: var(--accent); }
.pill.party-R { background: var(--critical-wash); color: var(--critical-text); }
.pill.party-I { background: var(--neutral-wash); color: var(--ink-2); }

.split { display: flex; height: 10px; border-radius: 999px; overflow: hidden;
         background: var(--surface-sunk); min-width: 120px; }
.split span { display: block; height: 100%; }
.split .seg-dy { background: var(--accent); }
.split .seg-dn { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.split .seg-ry { background: var(--critical); }
.split .seg-rn { background: color-mix(in srgb, var(--critical) 35%, var(--surface)); }

.newsscore { font-variant-numeric: tabular-nums; font-weight: 600;
             color: var(--ink-2); }
.reason-list { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2);
               font-size: 13.5px; }
.defection-mark { color: var(--warning-text); font-weight: 600; }
table.delegation-grid td { white-space: nowrap; }

/* Full-roll member listing: compact wrapped grid, not chips. */
.voter-cloud { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 18px; }
.voter-cloud a { font-size: 13px; white-space: nowrap; text-decoration: none;
                 color: var(--ink-2); }
.voter-cloud a:hover { color: var(--accent); text-decoration: underline; }
.voter-cloud a.defection-mark { color: var(--warning-text); }
