/* Civic theme — clean, readable, government-site plain.
   One accent blue; red/green/amber are reserved for vote and status meaning,
   never decoration. All text colors clear WCAG AA on their backgrounds.
   Dark scheme is the SAME palette rules re-stepped for a dark surface —
   the override block below swaps tokens only; rules never hardcode hexes. */
:root {
  --page: #f7f7f8;
  --surface: #ffffff;
  --ink: #111827;         /* body text */
  --ink-2: #374151;       /* secondary text, 10.3:1 */
  --muted: #5b6472;       /* captions/labels, 5.6:1 on white */
  --grid: #e5e7eb;        /* hairline dividers */
  --baseline: #d1d5db;    /* control borders */
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 2px 10px rgba(15, 23, 42, 0.12);
  --accent: #0d71ba;      /* City of Atlanta blue — links, active nav (5.1:1) */
  --accent-deep: #223971; /* City of Atlanta navy — hover/active/deep (11.1:1) */
  --accent-wash: #e0f3fc; /* brand light blue — selected/hover wash */
  /* City of Atlanta brand chrome — decorative only, never text/meaning.
     Same value in both schemes (chrome borders/rules, not AA text). */
  --brand-red: #e33d40;   /* the seal/masthead red rule */
  --brand-navy: #223971;
  --good: #15803d;        /* aye */
  --good-text: #15803d;
  --warning: #b45309;     /* abstain / held (text-safe amber) */
  --warning-bright: #f59e0b; /* held-pill border / legend dot (never text) */
  --abstain-dot: #d97706; /* vote-chip abstain dot (never text) */
  --critical: #b91c1c;    /* nay / failed */
  --critical-solid: #b91c1c; /* solid chip bg carrying --btn-ink text (both schemes) */
  --flip: #6d28d9;        /* divergence highlight — a hue OUTSIDE the green/red/
                             amber disposition palette so "flipped here" never
                             reads as approve/deny/defer */
  --flip-bright: #7c3aed; /* reversal ring / vg-header flag */
  --flip-wash: #f5f3ff;
  --flip-wash-hover: #ede9fe;
  --seq-100: #dbeafe;
  --seq-250: #93c5fd;
  --seq-bad: #fca5a5;     /* grad-red column-shading mix source */
  /* stage-matrix ramp sources: cells carry visible --ink counts, so these
     must keep ink ≥ AA at full mix in BOTH schemes (light: = warning/critical) */
  --ramp-warn: #b45309;
  --ramp-bad-deep: #b91c1c;
  /* meaning washes (pill/cell backgrounds under their matching text colors) */
  --wash-good: #f0fdf4;
  --wash-bad: #fef2f2;
  --wash-held: #fffbeb;
  --wash-abstain: #fff7ed;
  --wash-missed: #f8fafc;
  --wash-neutral: #f3f4f6; /* datebar section rows */
  --hover-wash: #fafafa;   /* table row hover */
  --stripe: #f1f5f9;       /* absent-stop hatching */
  --banner-bg: #fffbeb;
  --banner-border: #fde68a;
  --banner-ink: #78350f;
  /* primary buttons: fixed mid-blue + white in both schemes (a light dark-mode
     accent under white text would fail AA, so buttons don't follow --accent) */
  --btn-bg: #0d71ba;
  --btn-bg-hover: #223971;
  --btn-ink: #fff;
}

/* Dark scheme: same rules, tokens re-stepped for dark surfaces. Scoped to
   `screen` so printing from a dark-OS browser still gets the light tokens.
   Two scopes carry the SAME token set (tests assert they never drift):
   1. OS preference (auto), unless the rail toggle stamped an explicit light;
   2. explicit dark from the rail toggle (site.js stamps <html data-theme>,
      a pre-paint snippet in base.html re-applies it before first render). */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #111a2e;      /* navy-black — City brand dark */
    --surface: #1a2338;    /* navy card */
    --ink: #e7eaf0;
    --ink-2: #c4cbd7;       /* 9.9:1 on surface */
    --muted: #97a1b1;       /* 5.5:1 on surface */
    --grid: #2a3448;
    --baseline: #3f4a60;
    --border: #2a3448;
    /* shadows read as dirt on dark — elevation becomes a hairline ring */
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.16);
    --accent: #6fb4ec;     /* Atlanta blue, lightened for dark */
    --accent-deep: #a6c9fb;  /* "deep" = MORE emphasis, i.e. lighter on dark */
    --accent-wash: #223a63;
    /* City of Atlanta brand chrome — decorative only, never text/meaning. */
    --brand-red: #e33d40;
    --brand-navy: #223971;
    --good: #57ca7c;
    --good-text: #57ca7c;
    --warning: #fbbf24;
    --abstain-dot: #f59e0b;
    --critical: #f28080;
    --flip: #b39df7;
    --flip-bright: #a78bfa;
    --flip-wash: #292145;
    --flip-wash-hover: #332a55;
    --seq-100: #1d3a5f;
    --seq-250: #3a6db0;      /* grad cells stay dark-mid so light ink keeps AA */
    --seq-bad: #a04b4b;
    --ramp-warn: #92400e;
    --ramp-bad-deep: #991b1b;
    --wash-good: #16301f;
    --wash-bad: #371c20;
    --wash-held: #322512;
    --wash-abstain: #332013;
    --wash-missed: #202733;
    --wash-neutral: #242b36;
    --hover-wash: #20262f;
    --stripe: #26303d;
    --banner-bg: #322512;
    --banner-border: #6b5416;
    --banner-ink: #fcd34d;
  }
}

/* Rail toggle override: identical tokens (see note above). Wrapped in
   @media screen so a forced-dark user still prints light. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --page: #111a2e;      /* navy-black — City brand dark */
    --surface: #1a2338;    /* navy card */
    --ink: #e7eaf0;
    --ink-2: #c4cbd7;       /* 9.9:1 on surface */
    --muted: #97a1b1;       /* 5.5:1 on surface */
    --grid: #2a3448;
    --baseline: #3f4a60;
    --border: #2a3448;
    /* shadows read as dirt on dark — elevation becomes a hairline ring */
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.16);
    --accent: #6fb4ec;     /* Atlanta blue, lightened for dark */
    --accent-deep: #a6c9fb;  /* "deep" = MORE emphasis, i.e. lighter on dark */
    --accent-wash: #223a63;
    /* City of Atlanta brand chrome — decorative only, never text/meaning. */
    --brand-red: #e33d40;
    --brand-navy: #223971;
    --good: #57ca7c;
    --good-text: #57ca7c;
    --warning: #fbbf24;
    --abstain-dot: #f59e0b;
    --critical: #f28080;
    --flip: #b39df7;
    --flip-bright: #a78bfa;
    --flip-wash: #292145;
    --flip-wash-hover: #332a55;
    --seq-100: #1d3a5f;
    --seq-250: #3a6db0;      /* grad cells stay dark-mid so light ink keeps AA */
    --seq-bad: #a04b4b;
    --ramp-warn: #92400e;
    --ramp-bad-deep: #991b1b;
    --wash-good: #16301f;
    --wash-bad: #371c20;
    --wash-held: #322512;
    --wash-abstain: #332013;
    --wash-missed: #202733;
    --wash-neutral: #242b36;
    --hover-wash: #20262f;
    --stripe: #26303d;
    --banner-bg: #322512;
    --banner-border: #6b5416;
    --banner-ink: #fcd34d;
  }
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--accent);
  padding: 8px 16px; z-index: 100; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }
/* screen-reader-only text: heatmap cells carry their tooltip text in one of
   these so the grids are readable without a pointer (site review #5) */
.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;
}

/* ---- layout: sidebar shell ---- */
.app-shell { display: flex; min-height: 100vh; align-items: flex-start; }
.nav-toggle-checkbox { display: none; }

.mobile-topbar {
  display: none; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--grid); background: var(--surface);
  position: sticky; top: 0; z-index: 25;
}
.mobile-topbar .brand { font-weight: 600; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand-logo { flex: none; display: block; }
.hamburger {
  font-size: 19px; line-height: 1; cursor: pointer; padding: 6px 9px;
  border-radius: 6px; border: 1px solid var(--grid); background: var(--page); color: var(--ink-2);
}
.rail-scrim { display: none; }
.hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
abbr.ms-mark { text-decoration: underline dotted; cursor: help; }

.rail {
  width: 228px; flex: none; background: var(--surface); border-right: 1px solid var(--grid);
  display: flex; flex-direction: column; padding: 0 0 20px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.rail .brand {
  padding: 18px 18px 14px; font-weight: 600; font-size: 16px; color: var(--ink);
  display: flex; align-items: center; gap: 9px; border-bottom: 3px solid var(--brand-red); /* City masthead rule */
}
.rail-top-link {
  padding: 12px 18px; font-size: 14.5px; font-weight: 600; color: var(--ink-2);
  border-bottom: 1px solid var(--grid);
}
.rail-top-link.active { color: var(--accent-deep); }
/* theme switcher (bottom of the rail): a button dressed as a rail link */
button.theme-toggle {
  background: none; border: none; border-bottom: 1px solid var(--grid);
  width: 100%; text-align: left; cursor: pointer; font: inherit;
}
button.theme-toggle:hover { color: var(--ink); }
button.theme-toggle .theme-icon { font-size: 17px; line-height: 1; }
.rail-section { border-bottom: 1px solid var(--grid); }
.rail-section summary {
  list-style: none; cursor: pointer; padding: 12px 18px; font-size: 12px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between;
}
.rail-section summary::-webkit-details-marker { display: none; }
.rail-section summary::after { content: '▸'; transition: transform .1s; }
.rail-section[open] summary::after { transform: rotate(90deg); }
.rail-section summary:hover { color: var(--ink); }
.rail-links { padding: 0 10px 10px; display: flex; flex-direction: column; }
.rail-links a { color: var(--ink-2); padding: 10px 10px; border-radius: 6px; font-size: 14.5px; }
.rail-links a:hover { background: var(--page); color: var(--ink); text-decoration: none; }
.rail-links a.active { background: var(--accent-wash); color: var(--accent-deep); font-weight: 600; }

.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

@media (max-width: 880px) {
  .app-shell { display: block; }
  .mobile-topbar { display: flex; }
  .rail {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; z-index: 40;
    transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: 4px 0 16px rgba(15, 23, 42, .18);
  }
  .rail .brand { display: none; } /* shown in .mobile-topbar instead */
  .rail-scrim { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 35; }
  .nav-toggle-checkbox:checked ~ .app-shell .rail { transform: translateX(0); }
  .nav-toggle-checkbox:checked ~ .app-shell .rail-scrim { display: block; }
  .shell-main { width: 100%; }
}

main { max-width: 1100px; margin: 0 auto; padding: 32px 24px; width: 100%; }
footer {
  max-width: 1100px; margin: 0 auto; padding: 20px 24px 48px;
  color: var(--muted); font-size: 14px; border-top: 1px solid var(--grid);
}

h1 { font-size: 1.75rem; margin: 0 0 6px; font-weight: 600; line-height: 1.3; }
h2 { font-size: 1.2rem; margin: 32px 0 12px; font-weight: 600; }
.sub { color: var(--ink-2); margin: 0 0 24px; max-width: 75ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }

/* ---- cards / panels ---- */
.panel {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}
/* minmax(0,…) everywhere: a grid child's default min-width:auto lets a
   table's intrinsic width blow the track past the viewport (rev2 V2 —
   399px document in a 375px viewport) */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---- stat tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
/* phones: 2–3 across instead of one giant card per row (member-profile
   review — five stacked tiles ate the first 1.5 screens) */
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile .value { font-size: 1.3rem; }
}
.tile { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 16px 18px; }
.tile .value { font-size: 1.6rem; font-weight: 600; }
.tile .label { color: var(--muted); font-size: 14px; }
/* linkable state tiles (hopper): the top border carries the state; the
   text stays in ink tokens so state is never color-alone (label names it) */
a.tile { display: block; color: var(--ink); border-top: 3px solid var(--grid); }
a.tile:hover { background: var(--accent-wash); }
a.tile .value { color: var(--ink); }
.tile.state-active { border-top-color: var(--accent); }
.tile.state-dying { border-top-color: var(--warning); }
.tile.state-review { border-top-color: var(--muted); }
.tile.state-dead { border-top-color: var(--baseline); }
.backlink { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 10px; }

/* ---- banner ---- */
.banner {
  background: var(--banner-bg);
  border: 1px solid var(--banner-border);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 0 0 24px;
  color: var(--banner-ink);
  font-size: 14.5px;
}

/* ---- tables ---- */
/* contain:paint — rotated heatmap labels are ink overflow that Chromium lets
   escape an overflow:auto box into the page scroll area (486px document at
   375px on /blocs, rev2 V2 sweep); paint containment clips it to the wrap */
.tablewrap { overflow-x: auto; contain: paint; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 12px 14px; border-bottom: 2px solid var(--grid);
  text-transform: uppercase; letter-spacing: 0.03em;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover, table.data tr:hover td { background: var(--hover-wash); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
th a.sortlink { color: inherit; }
th a.sortlink:hover { color: var(--accent-deep); text-decoration: none; }
th a.sortlink.active { color: var(--accent-deep); }
th a.sortlink .arrow { font-size: 10px; margin-left: 3px; }
/* per-column value shading: --v in [0,1]; washes stay light so ink keeps AA.
   Selectors repeat under tr:hover so the row-hover wash doesn't wipe them. */
td.grad, table.data tr:hover td.grad {
  background: color-mix(in oklab, var(--seq-250) calc(var(--v, 0) * 65%), var(--surface));
}
td.grad-red, table.data tr:hover td.grad-red {
  background: color-mix(in oklab, var(--seq-bad) calc(var(--v, 0) * 65%), var(--surface));
}
table.data td > a[href^="/legislation/"] { white-space: nowrap; font-weight: 500; }
table.data td.nowrap { white-space: nowrap; }
table.data.compact th { padding: 8px 12px; }
table.data.compact td { padding: 6px 12px; font-size: 14px; }

/* ---- pills & chips ---- */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; border: 1px solid var(--baseline);
  color: var(--ink-2); background: var(--surface); white-space: nowrap;
}
/* code citations (legislation detail): pill-shaped but WRAPPING — the verbatim
   strings run long ("Sections 2-1517, et seq. of the City of Atlanta Code of
   Ordinances"), and .pill's nowrap would push the page past 375px on mobile */
ul.code-chips { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.code-chip {
  padding: 2px 10px; border-radius: 999px; font-size: 13px; max-width: 100%;
  border: 1px solid var(--accent); background: var(--accent-wash);
  color: var(--accent-deep); overflow-wrap: anywhere;
}
.code-chip.unlinked { border-color: var(--baseline); background: var(--surface); color: var(--ink-2); }
.code-chip a { text-decoration: none; }
.code-chip a:hover { text-decoration: underline; }
.code-chip .ext-mark { color: var(--muted); font-size: 11px; }

.pill.status-adopted { color: var(--good-text); border-color: var(--good); background: var(--wash-good); }
.pill.status-adversed, .pill.status-failed { color: var(--critical); border-color: var(--critical); background: var(--wash-bad); }
.pill.status-held, .pill.status-pending { color: var(--warning); border-color: var(--warning-bright); background: var(--wash-held); }
/* still in flight / no outcome yet — deliberately outside the red/green/amber
   meaning palette, so it never reads as a disposition. */
.pill.status-inflight { color: var(--muted); border-color: var(--baseline); background: var(--page); }
.pill.debut { color: var(--accent-deep); border-color: var(--accent); background: var(--accent-wash); }

/* status legend above the /legislation results table */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; }
.legend .legend-label { font-size: 13px; color: var(--muted); }
.legend .swatch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-2);
}
.legend .swatch::before {
  content: ""; width: 10px; height: 10px; border-radius: 999px;
  border: 1px solid var(--baseline); background: var(--surface);
}
.legend .swatch.status-adopted::before { border-color: var(--good); background: var(--good); }
.legend .swatch.status-adversed::before { border-color: var(--critical); background: var(--critical); }
.legend .swatch.status-held::before { border-color: var(--warning-bright); background: var(--warning-bright); }
.legend .swatch.status-inflight::before { border-color: var(--baseline); background: var(--page); }

.vote-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px; font-size: 13.5px;
  border: 1px solid var(--grid); background: var(--surface); white-space: nowrap;
}
.vote-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.vote-chip.aye .dot { background: var(--good); }
.vote-chip.nay .dot { background: var(--critical); }
.vote-chip.abstain .dot { background: var(--abstain-dot); }
.vote-chip.missed { color: var(--muted); }

.tally { display: inline-flex; gap: 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.tally .aye { color: var(--good-text); font-weight: 600; }
.tally .nay { color: var(--critical); font-weight: 600; }
.tally .other { color: var(--muted); }

/* ---- timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--grid);
}
.timeline li { position: relative; padding: 0 0 26px 32px; }
.timeline li::before {
  content: ""; position: absolute; left: 1px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
}
.timeline li.pending::before { background: var(--baseline); }
/* news coverage interleaved into the path (plan/news_linking.md) — hollow dot */
.timeline li.news-stop::before { background: var(--surface); border-color: var(--accent); }
.news-pill { background: var(--surface); border: 1px solid var(--accent); color: var(--accent); }
/* /news index: paper + member chips per article */
.news-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.news-chips .pill { text-decoration: none; }
.news-chips .pill:hover { background: var(--accent-wash); }
.news-chips .member-chip { border-style: dashed; }
/* member quoted/named in an article that is NOT about council business
   (extractions.is_council_related=false) — present but visually quieter */
.news-chips .member-chip.offtopic { opacity: .55; }
.source-favicon { width: 14px; height: 14px; vertical-align: -2px; border-radius: 3px; }
/* News table on narrow screens: drop "Papers & members" to a full-width 2nd
   row so the article title gets the width instead of scrolling sideways.
   Grid per row — date + title on line 1, chips spanning both columns below. */
@media (max-width: 600px) {
  table.news-table, table.news-table tbody { display: block; }
  table.news-table tr:first-child { display: none; } /* header labels: redundant once stacked */
  table.news-table tr {
    display: grid; grid-template-columns: max-content 1fr; align-items: start;
    gap: 2px 12px; padding: 11px 14px; border-bottom: 1px solid var(--grid);
  }
  table.news-table tr:last-child { border-bottom: none; }
  table.news-table td { padding: 0; border-bottom: none; }
  table.news-table td:nth-child(3) { grid-column: 1 / -1; padding-top: 6px; }
  .news-chips { max-width: none; }
}
.news-filters { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
                margin: 0 0 14px; background: var(--surface); border-radius: 8px;
                box-shadow: var(--shadow); padding: 10px 14px; }
.news-filters label { cursor: pointer; white-space: nowrap; }
.news-filters input { vertical-align: -2px; margin-right: 3px; }
.ai-matched { border-bottom: 1px dotted var(--muted); cursor: help; }
/* paywall marker beside an outlet name ($) */
.paywall { color: var(--muted); font-weight: 600; cursor: help; margin-left: 1px; }
/* "Support independent newsrooms" block at the foot of /news */
.support-newsrooms { margin-top: 28px; padding: 14px 16px; background: var(--surface);
                     border-radius: 8px; box-shadow: var(--shadow); }
.support-newsrooms h2 { margin: 0 0 4px; font-size: 16px; }
.support-list { margin: 8px 0 0; padding-left: 18px; }
.support-list li { margin: 2px 0; }
.timeline .stop-head { font-weight: 600; }
.timeline .stop-date { color: var(--muted); font-size: 14px; }
.timeline .action-text { color: var(--ink-2); }
.rollcall { margin-top: 10px; }
.rollcall .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* secondary external link beside an internal one (dashboard meeting rows) */
.ext-link { margin-left: 12px; color: var(--muted); white-space: nowrap; }
.ext-link:hover { color: var(--accent); }

/* ---- meeting agenda ---- */
table.agenda td .pill { margin-left: 2px; }
.acpc-note { border-left: 3px solid var(--accent); padding-left: 10px; margin-top: 6px; color: var(--ink-2); }
.tagrow { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
table.agenda td.action-col { color: var(--ink-2); min-width: 130px; }

/* ---- aging bars (hopper) ---- */
table.data tr.datebar td, table.data tr.datebar:hover td {
  background: var(--wash-neutral); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 6px 14px;
}

.agebar {
  height: 8px; border-radius: 0 4px 4px 0; background: var(--seq-250);
  min-width: 3px; display: inline-block; vertical-align: middle;
}

/* ---- horizontal bar chart (server-rendered) ---- */
.barchart { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 16px; }
.barrow { display: grid; grid-template-columns: 100px 1fr max-content; gap: 10px; align-items: center; font-size: 13.5px; }
.barrow .barlabel { color: var(--ink-2); text-align: right; white-space: nowrap; overflow: hidden; }
.barrow .bar { height: 10px; border-radius: 0 4px 4px 0; background: var(--accent); min-width: 2px; }
.barrow .barvalue { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* stacked variant: full-width label above its bar — for long category names */
.barchart.stacked { gap: 12px; }
.stackrow .stackhead {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: baseline; font-size: 13.5px; margin-bottom: 3px;
}
.stackrow .lbl { color: var(--ink-2); }
.stackrow .lbl a { color: inherit; }
.stackrow .lbl a:hover { color: var(--accent-deep); }
.stackrow.selected .lbl a { color: var(--accent-deep); font-weight: 600; }
.stackrow.selected .bar { background: var(--accent-deep); }
.stackrow .val { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stackrow .bar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--accent); min-width: 2px; }

/* ---- filters ---- */
form.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 20px; }
form.filters input[type="search"], form.filters input[type="text"], form.filters select {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--baseline); border-radius: 6px;
  padding: 8px 12px; font: inherit; font-size: 15px;
}
form.filters input[type="search"] { min-width: 280px; }
/* a <select>'s intrinsic width is its longest option — on phones the meetings
   body filter alone was 668px wide and set the page width (rev2 V2 sweep) */
form.filters select, .inline-filter select, .zrb-filters select { max-width: 100%; }
form.filters input[type="search"], .notfound-search input { max-width: 100%; min-width: 0; }
form.filters button, .btn {
  background: var(--btn-bg); color: var(--btn-ink); border: none; border-radius: 6px;
  padding: 9px 18px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
form.filters button:hover, .btn:hover { background: var(--btn-bg-hover); }
form.filters a.clear { font-size: 14px; color: var(--muted); margin-left: 4px; }
form.reversals-filter input[type="range"] { width: 200px; accent-color: var(--critical); cursor: pointer; }
form.reversals-filter #min-out { font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 1.2em; display: inline-block; text-align: center; color: var(--critical); }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.segmented label { padding: 6px 12px; font-size: 14px; cursor: pointer; color: var(--muted);
  border-left: 1px solid var(--border); }
.segmented label:first-child { border-left: none; }
.segmented label.on { background: var(--btn-bg); color: var(--btn-ink); }
.segmented label input { position: absolute; opacity: 0; width: 0; height: 0; }
p.reversals-help { margin-top: -8px; }
.pill.vg-header-flag { border-color: var(--flip-bright); color: var(--flip-bright); background: var(--flip-wash); }
.pill.vg-header-flag:hover { background: var(--flip-wash-hover); }
form.period-picker { margin: 0 0 20px; }
form.period-picker label { font-weight: 600; }

/* ---- faceted browse (/legislation) ---- */
.facet-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; margin-top: 16px; }
/* min-width:auto on grid items would let the results table force the page
   to scroll horizontally; tablewrap's own overflow-x handles wide tables */
.facet-layout > * { min-width: 0; }
/* stack at 1000 (not 800): a 2-col layout between 800–1000 leaves the results
   pane too narrow for the legislation table (site review 2026-07-18 #2) */
@media (max-width: 1000px) { .facet-layout { grid-template-columns: 1fr; } }
form.facets input[type="search"] {
  width: 100%; box-sizing: border-box; margin-bottom: 10px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--baseline); border-radius: 6px;
  padding: 8px 12px; font: inherit; font-size: 15px;
}
/* the sidebar eats 278px of an 1100px main, leaving titles ~300px at 1440 —
   let sidebar-plus-results pages use more of a wide viewport (:has() misses
   in old browsers and harmlessly keeps 1100px) */
main:has(.facet-layout) { max-width: 1320px; }
/* fixed layout so Title absorbs all slack; the nowrap pill/date columns take
   only their set widths (site review 2026-07-18 #2). Long status pills may
   wrap — that beats squeezing the title. */
table.leg-table { table-layout: fixed; min-width: 600px; }
table.leg-table .col-file { width: 96px; }
table.leg-table .col-status { width: 170px; }
table.leg-table .col-n { width: 54px; }
table.leg-table .col-date { width: 104px; }
table.leg-table .pill { white-space: normal; }
@media (max-width: 1000px) {
  /* narrow panes: auto layout shares the (min 600px, scrolling) width by
     content instead of starving Title with the fixed widths above */
  table.leg-table { table-layout: auto; }
}
details.facet-group { border-bottom: 1px solid var(--grid); padding: 8px 0; }
details.facet-group summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.facet-active { color: var(--accent-deep); font-variant-numeric: tabular-nums; }
/* shared AI-origin sparkle (facet headers + tag chips); color emoji glyphs
   ignore `color`, so desaturate + dim via filter instead */
.ai-mark { font-size: 11px; cursor: help; vertical-align: 1px; filter: grayscale(1); opacity: .55; }
.facet-options { margin-top: 6px; }
.facet-scroll { max-height: 240px; overflow-y: auto; }
.facet-opt { display: flex; gap: 8px; align-items: baseline; font-size: 14px; padding: 2px 0; cursor: pointer; }
.facet-opt .lbl { min-width: 0; }
.facet-opt .cnt { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.facet-opt.zero { opacity: .45; }
form.facets a.clear { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---- settlement explorer ---- */
.callout-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 18px 0 6px; }
@media (max-width: 800px) { .callout-cards { grid-template-columns: minmax(0, 1fr); } }
.callout {
  display: block; padding: 16px 18px; border-radius: 8px;
  background: var(--surface); box-shadow: var(--shadow);
  border-left: 3px solid var(--accent); color: inherit;
}
.callout:hover { text-decoration: none; box-shadow: var(--shadow-hover); }
.callout-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.callout-title { font-weight: 600; font-size: 16.5px; color: var(--accent-deep); margin: 2px 0 6px; }
.callout p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.callout-stats { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rss-icon { color: var(--muted); display: inline-block; line-height: 1; vertical-align: baseline; padding: 2px; }
.rss-icon:hover { color: var(--accent-deep); }
.export-links { float: right; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.export-links a { color: var(--muted); }
.export-links a:hover { color: var(--accent-deep); }
.page-nav {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 22px;
  font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--grid);
}
.page-nav a { color: var(--ink-2); }
.page-nav a:hover { color: var(--accent-deep); }
.map-chipbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; align-items: center; }
.map-chipbar .chip {
  padding: 5px 12px; font: inherit; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--baseline); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); text-decoration: none;
}
.map-chipbar .chip:hover { text-decoration: none; background: var(--page); }
.chip-year { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.chip-year label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.chip-year select {
  font: inherit; font-size: 14px; padding: 4px 8px;
  border: 1px solid var(--baseline); border-radius: 6px; background: var(--surface);
}
.map-chipbar .chip.active {
  background: var(--accent-wash); border-color: var(--accent);
  color: var(--accent-deep); font-weight: 600;
}
.inline-filter { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 0 0 14px; }
.inline-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.inline-filter select {
  font: inherit; font-size: 14px; padding: 6px 8px;
  border: 1px solid var(--baseline); border-radius: 6px; background: var(--surface);
}
.inline-filter button {
  font: inherit; font-size: 14px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--btn-bg); border-radius: 6px;
  background: var(--btn-bg); color: var(--btn-ink);
}
.inline-filter a.clear { font-size: 14px; color: var(--muted); align-self: center; }

/* ---- glossary ---- */
dl.glossary { max-width: 75ch; }
dl.glossary dt { font-weight: 600; margin-top: 14px; }
dl.glossary dd { margin: 4px 0 0 0; line-height: 1.6; color: var(--ink-2); }

/* ---- 404 page ---- */
.notfound-search { display: flex; gap: 8px; max-width: 460px; margin: 18px 0; }
.notfound-search input {
  flex: 1; background: var(--surface); color: var(--ink);
  border: 1px solid var(--baseline); border-radius: 6px;
  padding: 8px 12px; font: inherit; font-size: 15px;
}
.notfound-search button {
  padding: 8px 16px; font: inherit; font-size: 15px; cursor: pointer;
  border: 1px solid var(--btn-bg); border-radius: 6px;
  background: var(--btn-bg); color: var(--btn-ink);
}

/* ---- /documents search ---- */
.doc-search { display: flex; gap: 8px; max-width: 560px; margin: 18px 0; }
.doc-search input {
  flex: 1; background: var(--surface); color: var(--ink);
  border: 1px solid var(--baseline); border-radius: 6px;
  padding: 8px 12px; font: inherit; font-size: 15px;
}
.doc-search button {
  padding: 8px 16px; font: inherit; font-size: 15px; cursor: pointer;
  border: 1px solid var(--btn-bg); border-radius: 6px;
  background: var(--btn-bg); color: var(--btn-ink);
}
.doc-snippet { margin-top: 3px; max-width: 70ch; }
.doc-snippet mark {
  background: var(--accent-wash); color: inherit;
  padding: 0 2px; border-radius: 2px;
}
/* .ext-mark is scoped under .code-chip; the doc-results usage needs its own */
.doc-results .ext-mark { color: var(--muted); font-size: 11px; }

/* ---- pagination ---- */
.pager { display: flex; gap: 8px; align-items: center; margin: 16px 0; color: var(--ink-2); font-size: 15px; }
.pager a, .pager span.cur {
  padding: 5px 12px; border: 1px solid var(--baseline); border-radius: 6px; background: var(--surface);
}
.pager span.cur { font-weight: 600; color: var(--ink); border-color: var(--accent); }

/* ---- detail page ---- */
.leg-header { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
h1.leg-title { font-size: 1.1rem; line-height: 1.5; font-weight: 600; margin: 10px 0 6px; max-width: 80ch; }
.file-no { font-weight: 700; font-size: 15px; color: var(--muted); letter-spacing: 0.02em; }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 16px 0; }
dl.meta dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
dl.meta dd { margin: 0; }
details.bodytext summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details.bodytext pre {
  white-space: pre-wrap; font: 14.5px/1.6 inherit;
  background: var(--surface); border-radius: 8px; box-shadow: var(--shadow);
  padding: 18px; max-height: 480px; overflow-y: auto;
}

/* ---- tags & annotations ---- */
.tagbox { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill.tag a { color: inherit; }
.pill.tag-acpc { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-wash); }
.tag-x {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 0 0 0 4px; line-height: 1;
}
.tag-x:hover { color: var(--critical); }
form.tagform { display: inline-flex; gap: 4px; }
form.tagform input {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--baseline); border-radius: 999px;
  padding: 2px 12px; font: inherit; font-size: 13px; width: 120px;
}
form.tagform button {
  background: none; border: 1px solid var(--baseline); border-radius: 999px;
  color: var(--ink-2); cursor: pointer; font-size: 14px; padding: 0 10px;
}
.annotation {
  background: var(--accent-wash);
  border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 14px 18px; margin: 16px 0;
}
.annotation-body { margin-bottom: 8px; white-space: pre-line; }

/* ---- heatmap grids (attendance, blocs) ---- */
table.heatmap { border-collapse: collapse; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); }
table.heatmap th.rowhead {
  text-align: right; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 0 10px 0 8px; white-space: nowrap;
}
table.heatmap th.rot { height: 100px; vertical-align: bottom; padding: 0; }
table.heatmap th.rot span {
  display: inline-block; transform: rotate(-60deg) translateX(4px);
  transform-origin: bottom left; font-size: 12px; font-weight: 500;
  color: var(--muted); white-space: nowrap; width: 18px;
}
table.heatmap td.cell, table.heatmap a.cell {
  width: 18px; height: 18px; min-width: 18px; padding: 0;
  border: 2px solid var(--surface);
  border-radius: 3px;
  /* floor at 6% so a true 0 (e.g. no missed meetings) still reads as a
     filled cell instead of vanishing into the white surface behind it */
  background: color-mix(in oklab, var(--accent-deep) calc(6% + var(--v, 0) * 82%), var(--surface));
  cursor: pointer;
}
table.heatmap td.cell.nodata { background: var(--page); }
/* attendance: high --v = missed meetings, which must not read as dark blue
   (blue = activity in this palette; red is reserved for nays/missed —
   site review 2026-07-18 #13). Blocs keeps the blue ramp: high = agreement. */
table.heatmap.ramp-bad td.cell {
  background: color-mix(in oklab, var(--critical) calc(6% + var(--v, 0) * 70%), var(--surface));
}
.cell-demo.ramp-bad {
  background: color-mix(in oklab, var(--critical) calc(6% + var(--v, 0) * 70%), var(--surface));
}
table.heatmap td.cell.self { background: var(--grid); }
table.heatmap a.cell {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  text-decoration: none; color: inherit;
}

/* stage-matrix variant (committee hopper): cells are bigger and show a
   count, shaded amber -> red by dying/dead share instead of accent-deep */
table.heatmap.stage-matrix { width: 100%; }
table.heatmap.stage-matrix th { padding: 4px 10px; font-size: 13.5px; color: var(--ink-2); text-align: center; }
table.heatmap.stage-matrix th.rowhead { text-align: right; font-weight: 500; }
table.heatmap.stage-matrix td { padding: 3px; }
table.heatmap.stage-matrix td.cell,
table.heatmap.stage-matrix a.cell {
  width: 100%; min-width: 56px; height: 36px; border-radius: 6px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  /* mixes --ramp-* (not --critical/--warning): these cells carry visible ink
     counts, so the ramp sources stay dark enough for AA in both schemes */
  background: color-mix(in oklab,
    color-mix(in oklab, var(--ramp-bad-deep) calc(max(0, (var(--v, 0) - 0.5)) * 200%), var(--ramp-warn))
    calc(8% + var(--v, 0) * 80%), var(--surface));
}
table.heatmap.stage-matrix td.cell.nodata { background: var(--page); width: 100%; min-width: 56px; height: 36px; }
/* stretch variant (attendance): columns share the available width so a
   young term fills the page instead of huddling left; cells cap at 48px
   and compress back to compact as months accumulate */
table.heatmap.stretch {
  width: min(100%, calc(200px + var(--cols, 12) * 52px));
  table-layout: fixed;
}
/* fixed layout sizes columns from the FIRST row — the month-label header —
   so pin the name column there, not on .rowhead */
table.heatmap.stretch tr:first-child th:first-child { width: 190px; }
table.heatmap.stretch td.cell { width: auto; min-width: 0; height: 22px; }

/* triangle variant (blocs): lower half only, member labels below.
   Cells are 24px (2px surface border -> 24px columns); the label translateX
   must stay at half the column width to keep labels centered. */
table.heatmap.triangle { padding: 24px 110px 20px 24px; } /* right room for the last rotated label */
table.heatmap.triangle td.cell { width: 24px; min-width: 24px; height: 24px; }
table.heatmap.triangle th.rowhead { font-size: 14px; }
table.heatmap.triangle th.rotb { height: 170px; vertical-align: top; padding: 0; min-width: 24px; }
table.heatmap.triangle th.rotb span {
  /* start the text under its own column's center (half a column right of
     the th's left edge), then rotate — measured, not eyeballed */
  display: inline-block; transform: translateX(12px) rotate(60deg);
  transform-origin: top left; font-size: 12.5px; font-weight: 500;
  color: var(--ink-2); white-space: nowrap;
  width: 24px;  /* untransformed width, so labels don't stretch the columns */
}
/* inline agreement bar (blocs alignment table) */
td.agreecell { white-space: nowrap; }
td.agreecell .num { font-variant-numeric: tabular-nums; margin-left: 8px; }
.inlinebar {
  display: inline-block; vertical-align: middle;
  width: 150px; height: 8px; border-radius: 4px;
  background: var(--grid);
}
.inlinebar > span {
  display: block; height: 100%; border-radius: 4px;
  background: var(--accent); min-width: 2px;
}

.cell-demo {
  display: inline-block; width: 14px; height: 14px; border-radius: 3px;
  vertical-align: text-bottom; margin: 0 4px 0 12px;
  background: color-mix(in oklab, var(--accent-deep) calc(6% + var(--v, 0) * 82%), var(--surface));
}
.cell-demo.stage {
  background: color-mix(in oklab,
    color-mix(in oklab, var(--ramp-bad-deep) calc(max(0, (var(--v, 0) - 0.5)) * 200%), var(--ramp-warn))
    calc(8% + var(--v, 0) * 80%), var(--surface));
}

/* tap-to-show detail for heatmap cells (title tooltips don't fire on touch) */
.cell-tip {
  position: absolute; z-index: 60; max-width: 260px;
  background: var(--ink); color: var(--page); font-size: 13px; line-height: 1.4;
  padding: 7px 10px; border-radius: 6px; box-shadow: var(--shadow);
  pointer-events: none;
}

.empty {
  color: var(--ink-2); background: var(--surface); border: 1px dashed var(--baseline);
  border-radius: 8px; padding: 28px; text-align: center; margin: 16px 0;
}

/* About page prose */
.prose { max-width: 75ch; line-height: 1.65; margin: 0 0 14px; }
.prose-list { max-width: 75ch; line-height: 1.65; padding-left: 22px; display: grid; gap: 10px; }

/* ---- ZRB (Zoning Review Board) ---- */
.zrb-case {
  border: 1px solid var(--grid); border-radius: 8px; background: var(--surface);
  box-shadow: var(--shadow); padding: 12px 14px; margin: 10px 0;
}
.zrb-case-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zrb-case-head .file-no { font-size: 16px; color: var(--ink); }
.zrb-case-head a { margin-left: auto; white-space: nowrap; }
.zrb-chain {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 4px;
}
.zrb-stage { display: inline-flex; flex-direction: column; gap: 3px; }
.zrb-stage-name {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
}
/* divergence view: outline the pill at a flagged hand-off */
.zrb-chain.compact { gap: 4px 8px; margin: 0; }
.zrb-chain.compact .pill { font-size: 12px; }
/* divergence view: the recommendation-hierarchy flow diagram */
.flip-flow { margin: 14px 0 6px; padding: 8px 14px 10px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); max-width: 780px; }
.flip-flow svg { width: 100%; height: auto; display: block; }
.flip-flow .node rect { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.flip-flow .node text { fill: var(--ink); font-size: 14px; font-weight: 600; }
.flip-flow .node.pivot rect { stroke: var(--flip); stroke-width: 2; }
.flip-flow .node.mute rect { stroke: var(--grid); }
.flip-flow .node.mute text { fill: var(--muted); font-weight: 500; }
.flip-flow .flip-arrow { fill: none; stroke: var(--flip); stroke-width: 2.2; marker-end: url(#ah-flip); }
.flip-flow .mute-arrow { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 3; marker-end: url(#ah-mute); }
.flip-flow marker#ah-flip path { fill: var(--flip); }
.flip-flow marker#ah-mute path { fill: var(--muted); }
.flip-flow .flow-note { fill: var(--muted); font-size: 11px; }
.flip-flow figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.flip-flow .flip-key { color: var(--flip); font-weight: 700; }

/* divergence highlight is violet (not red) — the pill's own colour still carries
   approve/deny; the dashed violet ring + label mean only "this hand-off flipped". */
.zrb-stage.diverged .pill { outline: 2px solid var(--flip); outline-offset: 1px; }
.zrb-stage.diverged .zrb-stage-name { color: var(--flip); font-weight: 700; }
.zrb-axis-grid td.num a { display: block; font-variant-numeric: tabular-nums; }
.zrb-axis-grid td.hot { background: color-mix(in oklab, var(--flip) 10%, var(--surface)); }
.zrb-axis-grid td.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.zrb-diverge-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.zrb-diverge-note .warn { color: var(--warning); font-weight: 600; }
.zrb-hearings { margin-top: 8px; }
.zrb-hearings a { font-weight: 500; }
.zrb-docs { margin-top: 8px; }
.zrb-docs summary { cursor: pointer; color: var(--accent); }
.zrb-docs table.data { margin-top: 6px; }
/* the recreated-hearing / index tables reuse table.data + .pill */
.zrb-meta { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }
.zrb-hearing-list { list-style: none; padding: 0; margin: 8px 0 16px; }
.zrb-hearing-list li { padding: 5px 0; border-bottom: 1px solid var(--grid); }
.zrb-hearing-list .pill { margin-left: 4px; }
.zrb-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0; }
.zrb-filters input[type=search] { min-width: 240px; padding: 6px 8px; }
.zrb-filter-group { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.zrb-filter-group label { font-size: 13px; white-space: nowrap; }
.zrb-filters select { padding: 5px 6px; }
.zrb-filters .clear { font-size: 13px; color: var(--muted); }
.pager { display: flex; gap: 14px; align-items: center; margin: 14px 0; }
/* Leaflet's controls/panes use z-index up to 1000; without a stacking context
   here they punch through the mobile topbar (25) and nav drawer (40). */
.leaflet-container { z-index: 0; }

.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-size: 13px; }
.map-legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* literal white stroke: matches the marker strokes on the (always-light) map
   tiles, so the legend swatch mirrors what the map actually draws */
.map-legend-swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid #ffffff; box-shadow: 0 0 0 1px var(--border); flex: none; }
.zrb-case-head { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.zrb-case-head dl.meta { flex: 1 1 340px; }
.zrb-case-map { flex: 1 1 380px; min-width: 280px; height: 240px; border-radius: 8px; border: 1px solid var(--border); }
.zrb-asi { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.zrb-asi-form { flex: 1 1 320px; min-width: 280px; }
.zrb-asi-caption { font-weight: 600; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--muted); margin-bottom: 4px;
  border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.zrb-asi-form dl.meta { margin: 8px 0 0; }
.zrb-wf-mark { text-align: center; width: 1.5em; }
.zrb-wf-done { color: var(--good-text); font-weight: 700; }
.zrb-wf-active { color: var(--warning); }
.zrb-wf-pending td { color: var(--muted); }

/* Per-paper vote timeline grid (legislation detail) */
table.votegrid { border-collapse: collapse; table-layout: fixed; width: 100%; }
table.votegrid th, table.votegrid td { border: 1px solid var(--border); }
table.votegrid thead th { vertical-align: bottom; font-weight: 600; padding: 7px 6px; }
.votegrid th.vg-col { text-align: center; width: 92px; font-size: 12px; line-height: 1.25; }
.votegrid .vg-stage { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.votegrid th.vg-full .vg-stage { color: var(--good-text); }
.votegrid th.vg-col-nay { background: var(--wash-bad); }
.votegrid th.vg-col-nay .vg-stage { color: var(--critical); }
.votegrid .vg-cmte { font-weight: 600; }
/* member column: narrow + pinned, so scrolling on small screens keeps names */
.votegrid th:first-child, .votegrid td.vg-member {
  position: sticky; left: 0; z-index: 1; background: var(--surface); }
.votegrid td.vg-member { width: 210px; font-weight: 500; line-height: 1.3; }
.votegrid td.vg-cell { text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.votegrid td.aye { background: var(--wash-good); color: var(--good-text); }
.votegrid td.nay { background: var(--wash-bad); color: var(--critical); font-weight: 700; }
.votegrid td.abstain { background: var(--wash-abstain); color: var(--warning); }
.votegrid td.missed { background: var(--wash-missed); color: var(--muted); }
.votegrid td.vg-absent-stop { background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 4px, var(--stripe) 4px, var(--stripe) 8px); color: var(--muted); }
.votegrid tr.vg-fliprow td.vg-member { box-shadow: inset 3px 0 0 var(--critical); }
.votegrid td.vg-reversal { box-shadow: inset 0 0 0 2px var(--flip-bright); }
.votegrid td.vg-spnay-cell { outline: 2px solid var(--critical); outline-offset: -3px; }
/* mover/seconder role markers: small, heavy, superscripted */
.votegrid .vg-role { font-size: 10px; font-weight: 800; vertical-align: super;
  line-height: 0; margin-left: 2px; color: var(--muted); }
/* substantive-vote sequence, on its own line under the member name */
.votegrid .vg-seq { display: block; font-size: 11px; margin-top: 2px; }
.votegrid .vg-seq b { font-weight: 700; }
.votegrid .vg-seq .vg-arr, .votegrid + p .vg-arr, p .vg-arr { color: var(--muted); margin: 0 2px; font-weight: 400; }
.vg-s-aye { color: var(--good-text); }
.vg-s-nay { color: var(--critical); }
.vg-s-abstain { color: var(--warning); }
.pill.vg-flag { font-size: 11px; }
.pill.vg-flag.vg-spnay { background: var(--critical-solid); border-color: var(--critical-solid); color: var(--btn-ink); }

/* ---- print (site review 2026-07-18 #15) ----
   Reporters print member pages and vote timelines: drop the chrome and
   controls, let the content own the page. Maps stay — a printed settlement
   map is useful; its filter chips are not. */
@media print {
  .rail, .mobile-topbar, .rail-scrim, .skip-link,
  form.facets, form.filters, .pager, .export-links, .map-chipbar,
  .page-nav, .notfound-search, .nav-toggle-checkbox { display: none !important; }
  .app-shell { display: block; }
  .shell-main { min-height: auto; display: block; }
  main, footer { max-width: none; padding: 0 0 12px; }
  .facet-layout { display: block; }
  body { background: #fff; }
  .tablewrap { box-shadow: none; overflow: visible; }
  .tile { box-shadow: none; border: 1px solid var(--grid); }
  a { color: inherit; }
  a[href]::after { content: none; } /* some UAs append URLs; keep tables tight */
}
