:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; } img { max-width: 100%; } [hidden] { display: none !important; }
/* WB Tribunal Appeal Dashboard: shared tokens, layout and components.
   Layout: deep-teal masthead band (brand) -> sticky nav + universal search -> one report column
   (max 1240px) built from stacked sections; tables scroll inside their own containers. */
:root {
  /* surfaces and ink (neutrals carry a slight teal bias) */
  --bg: #f3f6f5;
  --panel: #ffffff;
  --panel-2: #e9efed;
  --panel-3: #dfe8e5;
  --ink: #0e2627;
  --ink-2: #3f5655;
  --muted: #6b8180;
  --line: #d6e0dd;
  --line-strong: #b7c7c3;
  --shadow: 0 1px 2px rgba(14, 38, 39, .06), 0 4px 16px rgba(14, 38, 39, .05);

  /* brand (from the CRG report artwork) */
  --brand: #0f3b3c;
  --brand-2: #17504f;
  --brand-ink: #f4efe1;
  --brand-ink-2: #b9cfc9;
  --accent: #e8922b;          /* amber rule and highlights */
  --accent-ink: #965609;      /* amber that passes as text on light surfaces */
  --link: #155e8f;
  --focus: #2a78d6;

  /* data: appeal filing (blue ordinal steps) */
  --c-applied: #2a78d6;
  --c-citizen: #1c5cab;
  --c-offline: #3987e5;
  --c-appliedst: #86b6ef;
  --c-not: #c3ccc9;
  --c-unknown: #e1e6e4;
  /* data: tribunal outcome (status palette, always paired with icon + label) */
  --c-pending: #fab219;
  --c-approved: #0ca30c;
  --c-rejected: #d03b3b;
  --c-disposed: #5b6b8c;
  /* data: gender */
  --c-female: #e87ba4;
  --c-male: #2a78d6;
  --c-other: #6250d6;
  /* sequential ramp (blue 100 -> 700) for maps and heat cells */
  --seq-0: #e8f1fc;
  --seq-1: #cde2fb;
  --seq-2: #9ec5f4;
  --seq-3: #6da7ec;
  --seq-4: #3987e5;
  --seq-5: #256abf;
  --seq-6: #184f95;
  --seq-7: #0d366b;
  --seq-none: #e4e9e7;
  /* text tones for good / bad deltas */
  --good-ink: #006300;
  --bad-ink: #a32424;
  --warn-ink: #8a5a00;

  /* type */
  --font-display: "Anek Bangla", "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;
  --font-body: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .9375rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;

  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1240px;
  --nav-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1919; --panel: #102324; --panel-2: #152d2d; --panel-3: #1b3736;
    --ink: #e6eeec; --ink-2: #b3c5c2; --muted: #85a09c; --line: #233e3d; --line-strong: #345453;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --brand: #0a2c2d; --brand-2: #10393a; --brand-ink: #f4efe1; --brand-ink-2: #a9c2bc;
    --accent: #f2a541; --accent-ink: #f2b35f; --link: #7ab8ea; --focus: #6da7ec;
    --c-applied: #3987e5; --c-citizen: #5598e7; --c-offline: #2a78d6; --c-appliedst: #1c5cab;
    --c-not: #4a5d5b; --c-unknown: #2d403f;
    --c-pending: #fab219; --c-approved: #0ca30c; --c-rejected: #e05252; --c-disposed: #8593b3;
    --c-female: #d55181; --c-male: #3987e5; --c-other: #9085e9;
    --seq-0: #0f2a4d; --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
    --seq-none: #1d3332;
    --good-ink: #2fc22f; --bad-ink: #f07a7a; --warn-ink: #fab219;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1919; --panel: #102324; --panel-2: #152d2d; --panel-3: #1b3736;
  --ink: #e6eeec; --ink-2: #b3c5c2; --muted: #85a09c; --line: #233e3d; --line-strong: #345453;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --brand: #0a2c2d; --brand-2: #10393a; --brand-ink: #f4efe1; --brand-ink-2: #a9c2bc;
  --accent: #f2a541; --accent-ink: #f2b35f; --link: #7ab8ea; --focus: #6da7ec;
  --c-applied: #3987e5; --c-citizen: #5598e7; --c-offline: #2a78d6; --c-appliedst: #1c5cab;
  --c-not: #4a5d5b; --c-unknown: #2d403f;
  --c-pending: #fab219; --c-approved: #0ca30c; --c-rejected: #e05252; --c-disposed: #8593b3;
  --c-female: #d55181; --c-male: #3987e5; --c-other: #9085e9;
  --seq-0: #0f2a4d; --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #3987e5; --seq-5: #6da7ec; --seq-6: #9ec5f4; --seq-7: #cde2fb;
  --seq-none: #1d3332;
  --good-ink: #2fc22f; --bad-ink: #f07a7a; --warn-ink: #fab219;
  color-scheme: dark;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.5;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 50; background: var(--brand);
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
.bn { font-family: "Hind Siliguri", "Noto Sans Bengali", var(--font-body); }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- masthead ---------- */
.masthead { background: var(--brand); color: var(--brand-ink); position: relative; overflow: hidden; }
.masthead::after { /* faint concentric sun from the report artwork */
  content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 165, 65, .22) 0 30%, rgba(242, 165, 65, .10) 31% 48%, rgba(242, 165, 65, .05) 49% 66%, transparent 67%);
  pointer-events: none;
}
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 18px 20px; position: relative; z-index: 1; }
.brandmark { display: inline-flex; align-items: center; flex: none; }
.brandmark img { height: 40px; width: auto; display: block; }
.mast-title { min-width: 0; flex: 1 1 360px; border-left: 3px solid var(--accent); padding-left: 16px; }
.mast-title .eyebrow { color: var(--accent); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); letter-spacing: .02em; }
.mast-title h1 { font-size: clamp(1.35rem, 1rem + 1.6vw, 2rem); font-weight: 700; font-stretch: 92%; color: var(--brand-ink); }
.mast-title .sub { color: var(--brand-ink-2); font-size: var(--fs-sm); margin-top: 2px; }
.theme-toggle {
  margin-left: auto; background: transparent; border: 1px solid rgba(244, 239, 225, .28); color: var(--brand-ink);
  border-radius: 999px; padding: 4px 12px; font-size: var(--fs-sm); cursor: pointer;
}
.theme-toggle:hover { background: rgba(244, 239, 225, .08); }

/* ---------- nav + search (sticky) ---------- */
.navbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.navbar .wrap { display: flex; align-items: center; gap: 8px 16px; min-height: var(--nav-h); flex-wrap: wrap; padding-block: 6px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1 1 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  white-space: nowrap; text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: var(--fs-md);
}
.tabs a:hover { background: var(--panel-2); color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
#search-slot { flex: 1 1 320px; max-width: 460px; min-width: 0; position: relative; }

/* ---------- main ---------- */
main#view { padding-block: 20px 56px; display: flex; flex-direction: column; gap: 20px; min-height: 60vh; }
main#view:focus { outline: none; }

.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: var(--fs-sm); color: var(--muted); align-items: center; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--line-strong); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 24px; }
.page-head .titles { min-width: 0; flex: 1 1 420px; }
.page-head .eyebrow { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 600; }
.page-head h1, .page-head h2 { margin: 0; font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); font-weight: 700; font-stretch: 94%; }
.page-head .title-bn { font-size: var(--fs-lg); color: var(--ink-2); font-weight: 500; margin-left: 4px; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); line-height: 1.2;
  padding: 3px 10px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line);
  text-decoration: none; white-space: nowrap;
}
a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.warn { background: color-mix(in srgb, var(--c-pending) 16%, var(--panel)); border-color: color-mix(in srgb, var(--c-pending) 45%, var(--line)); color: var(--ink); }

/* sections */
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.section > .sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 16px 18px 0; }
.section > .sec-head h3 { font-size: var(--fs-lg); font-weight: 650; }
.section > .sec-head .sub { color: var(--muted); font-size: var(--fs-sm); flex: 1 1 240px; }
.section > .sec-head .sec-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section > .sec-body { padding: 14px 18px 18px; min-width: 0; }
.section.flush > .sec-body { padding: 10px 0 0; }
.grid { display: grid; gap: 20px; min-width: 0; }
.grid > * { min-width: 0; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 900px) { .grid.split { grid-template-columns: minmax(0, 1fr); } }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); gap: 12px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; text-decoration: none; color: inherit;
}
a.kpi:hover { border-color: var(--line-strong); }
.kpi .k-label { font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.1; font-stretch: 90%; letter-spacing: -.01em; }
.kpi .k-sub { font-size: var(--fs-sm); color: var(--muted); }
.kpi.lead { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.kpi.lead .k-label { color: var(--brand-ink-2); }
.kpi.lead .k-sub { color: var(--brand-ink-2); }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; background: var(--sw, var(--muted)); }

/* stacked composition bar */
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-bar { display: flex; height: var(--h, 14px); border-radius: 4px; overflow: hidden; background: var(--panel-2); gap: 2px; }
.stack-bar > span { display: block; height: 100%; min-width: 0; background: var(--sw); }
.stack-bar > span:first-child { border-radius: 4px 0 0 4px; }
.stack-bar > span:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-sm); color: var(--ink-2); }
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.legend .item b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.legend .item .pc { color: var(--muted); font-variant-numeric: tabular-nums; }

/* pills: status shown with icon + label, never color alone */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; line-height: 1;
  padding: 4px 8px 4px 6px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--sw) 16%, var(--panel)); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--sw) 45%, var(--line));
}
.pill .ic { width: 14px; height: 14px; border-radius: 50%; background: var(--sw); color: #fff; display: inline-grid; place-items: center; font-size: 9px; line-height: 1; }
.pill.ghost { background: transparent; }

/* buttons, inputs */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-sm); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-2); }
.btn[aria-pressed="true"] { background: var(--panel-3); border-color: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: default; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary { background: var(--accent); border-color: var(--accent); color: #1d1405; }
  :root:not([data-theme="light"]) .btn.primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); }
  :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
}
:root[data-theme="dark"] .btn.primary { background: var(--accent); border-color: var(--accent); color: #1d1405; }
:root[data-theme="dark"] .btn.primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: var(--panel); padding: 5px 10px; font-size: var(--fs-sm); cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.input, select.input {
  border: 1px solid var(--line-strong); background: var(--panel); border-radius: var(--radius-sm); padding: 7px 10px;
  font-size: var(--fs-md); min-width: 0; width: 100%;
}
.input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); min-width: 0; }

/* tables */
.tbl-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 0 18px 10px; }
.tbl-tools .count { font-size: var(--fs-sm); color: var(--muted); margin-left: auto; }
.tbl-tools .input { max-width: 300px; }
.tbl-scroll { overflow: auto; max-height: var(--tbl-max, 640px); border-top: 1px solid var(--line); }
table.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-sm); }
table.tbl th, table.tbl td { padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl th { position: sticky; top: 0; background: var(--panel-2); color: var(--ink-2); font-weight: 600; z-index: 1; white-space: nowrap; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; }
table.tbl th.sortable { cursor: pointer; user-select: none; }
table.tbl th.sortable:hover { color: var(--ink); }
table.tbl th[aria-sort="ascending"]::after { content: " ▲"; font-size: .8em; }
table.tbl th[aria-sort="descending"]::after { content: " ▼"; font-size: .8em; }
table.tbl td.n, table.tbl th.n { text-align: right; white-space: nowrap; }
table.tbl tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl td a { text-decoration: none; font-weight: 500; }
table.tbl td a:hover { text-decoration: underline; }
table.tbl tfoot td { font-weight: 600; background: var(--panel-2); position: sticky; bottom: 0; }
.cellbar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cellbar .track { display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; flex: none; }
.cellbar .fill { display: block; height: 100%; background: var(--sw, var(--c-applied)); border-radius: 3px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 18px 14px; font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.pager .btn { padding: 4px 10px; }

/* charts */
.chart { position: relative; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart text.axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--line-strong); }
.chart-legend { margin-top: 6px; }
.linekey { display: inline-block; width: 16px; height: 2px; border-radius: 1px; background: var(--sw); }
.chart svg[width] { width: 100%; height: auto; }
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 32%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar .lbl a { color: inherit; text-decoration: none; }
.hbar .lbl a:hover { color: var(--ink); text-decoration: underline; }
.hbar .trk { display: block; height: 12px; background: var(--panel-2); border-radius: 0 4px 4px 0; position: relative; }
.hbar .fil { display: block; height: 100%; background: var(--sw, var(--c-applied)); border-radius: 0 4px 4px 0; }
.hbar .val { font-variant-numeric: tabular-nums; color: var(--ink); min-width: 4.5em; text-align: right; }

/* tooltip */
.tip {
  position: fixed; z-index: 100; pointer-events: none; max-width: min(320px, calc(100vw - 24px));
  background: var(--ink); color: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: var(--fs-sm); line-height: 1.4;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.tip .t-title { font-weight: 700; margin-bottom: 4px; }
.tip .t-row { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.tip .t-row .sw { display: inline-flex; align-items: center; gap: 6px; }
.tip .t-muted { opacity: .7; }

/* states */
.state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; color: var(--muted); text-align: center; }
.state.error { color: var(--bad-ink); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--panel-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--panel-2); border-radius: var(--radius-sm); padding: 10px 12px; border-left: 3px solid var(--accent); }
.note.warn { border-left-color: var(--c-pending); }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: var(--fs-sm); }
.site-foot .wrap { display: flex; flex-direction: column; gap: 12px; padding-block: 18px 24px; }
.site-foot img { height: 28px; width: auto; }
.foot-main { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.foot-data { margin: 0; flex: 1 1 320px; max-width: 90ch; }
.foot-links, .foot-contact { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.site-foot a { color: var(--ink-2); text-underline-offset: 2px; }
.site-foot a:hover { color: var(--accent-ink); }
.foot-links a, .foot-contact a { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; overflow-wrap: anywhere; }
.foot-ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
.site-foot a:hover .foot-ic { color: currentColor; }
.foot-gen { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: inline; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline; }

@media (max-width: 560px) {
  .brandmark img { height: 32px; }
  .masthead .wrap { padding-block: 14px 16px; }
  .mast-title .sub { display: none; }
  .theme-toggle { position: absolute; top: 14px; right: max(16px, env(safe-area-inset-right, 0px)); padding: 3px 10px; }
  .mast-title { border-left-width: 2px; padding-left: 12px; flex-basis: 100%; }
  .section > .sec-head { padding: 14px 14px 0; }
  .section > .sec-body { padding: 12px 14px 14px; }
  .tbl-tools, .pager { padding-inline: 14px; }
  table.tbl th, table.tbl td { padding: 6px 8px; }
}

/* "?" explainer button and its popover (CRG.ui.explain) */
.explain {
  position: relative; display: inline-grid; place-items: center; flex: none; vertical-align: middle;
  width: 16px; height: 16px; margin-inline: 4px 0; padding: 0; border-radius: 50%;
  border: 1px solid currentColor; background: transparent; color: inherit; opacity: .75;
  font: 700 10px/1 var(--font-body); cursor: help;
}
.explain::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.explain:hover, .explain[aria-expanded="true"] { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
.xpop {
  position: fixed; z-index: 110; width: max-content; max-width: min(300px, calc(100vw - 16px));
  background: var(--ink); color: var(--bg); border-radius: 8px; padding: 9px 12px 10px; font-size: var(--fs-sm); line-height: 1.45;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); text-align: left; font-weight: 400; white-space: normal;
}
.xpop p { margin: 0; }
.xpop a { display: inline-block; margin-top: 6px; color: inherit; font-weight: 600; text-decoration: underline; }
.xpop a:focus-visible { outline-color: var(--bg); }

/* partial-data notice (CRG.ui.scopeNote) */
.scope-note {
  margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5;
  background: color-mix(in srgb, var(--c-pending) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c-pending) 35%, var(--line));
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.scope-note b { color: var(--ink); }
.scope-note.compact { padding: 6px 10px; font-size: var(--fs-xs); }

/* overview.css: styles owned by the overview worker.
   map-*  the AC choropleth component (map.js), used on several pages
   ov-*   the state overview, district list and district report (views/overview.js) */

/* ---------- tokens ---------- */
:root {
  --ov-deleted: #7b908e;        /* neutral mark for "deleted voters", the base of every pipeline */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ov-deleted: #5d7874; }
}
:root[data-theme="dark"] { --ov-deleted: #5d7874; }

/* =====================================================================
   Map component
   ===================================================================== */
.map { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.map-stage { position: relative; border-radius: var(--radius-sm); min-width: 0; }
.map-stage:focus { outline: none; }
.map-stage:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.map-svg { display: block; width: 100%; height: auto; overflow: hidden; margin-inline: auto; touch-action: manipulation; }
.map-ac {
  fill: var(--seq-none); stroke: var(--panel); stroke-width: 1; vector-effect: non-scaling-stroke;
  stroke-linejoin: round; fill-rule: evenodd; cursor: pointer; transition: fill .25s ease, fill-opacity .15s ease;
}
.map-ac[data-b="1"] { fill: var(--seq-1); }
.map-ac[data-b="2"] { fill: var(--seq-2); }
.map-ac[data-b="3"] { fill: var(--seq-3); }
.map-ac[data-b="4"] { fill: var(--seq-4); }
.map-ac[data-b="5"] { fill: var(--seq-5); }
.map-ac[data-b="6"] { fill: var(--seq-6); }
.map-ac[data-b="7"] { fill: var(--seq-7); }
.map-ac[data-b="none"] { fill: var(--seq-none); }
/* legend focus: keep one colour group, fade the rest */
.map-svg[data-fb] .map-ac { fill-opacity: .16; }
.map-svg[data-fb="1"] .map-ac[data-b="1"], .map-svg[data-fb="2"] .map-ac[data-b="2"], .map-svg[data-fb="3"] .map-ac[data-b="3"],
.map-svg[data-fb="4"] .map-ac[data-b="4"], .map-svg[data-fb="5"] .map-ac[data-b="5"], .map-svg[data-fb="6"] .map-ac[data-b="6"],
.map-svg[data-fb="7"] .map-ac[data-b="7"], .map-svg[data-fb="none"] .map-ac[data-b="none"] { fill-opacity: 1; }
.map-ctx path { fill: var(--panel-2); stroke: var(--panel); stroke-width: 1; vector-effect: non-scaling-stroke; fill-rule: evenodd; pointer-events: none; }
.map-hl path { fill: none; stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.map-hov { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.map-lbl text {
  fill: var(--ink); stroke: var(--panel); paint-order: stroke; stroke-linejoin: round;
  font-family: var(--font-body); font-weight: 600; pointer-events: none; font-variant-numeric: tabular-nums;
}
.map-lbl text[hidden] { display: none; }

.map-info {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 2.25em;
  font-size: var(--fs-sm); color: var(--ink-2); padding: 6px 10px; border-radius: var(--radius-sm); background: var(--panel-2);
}
.map-info .map-idle { color: var(--muted); }
.map-info-t b { color: var(--ink); }
.map-info-v { display: inline-flex; align-items: center; gap: 6px; }
.map-info-v b { color: var(--ink); font-variant-numeric: tabular-nums; }
.map-go { margin-left: auto; font-weight: 600; white-space: nowrap; }
button.map-go { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }

.map-legend { display: flex; flex-direction: column; gap: 6px; }
.map-lg-h { font-size: var(--fs-sm); color: var(--ink-2); }
.map-lg-h b { color: var(--ink); font-weight: 600; }
.map-lg-row { display: flex; flex-wrap: wrap; gap: 4px; }
.map-lg-i {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-size: var(--fs-xs); cursor: pointer;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.map-lg-i:hover { border-color: var(--line-strong); color: var(--ink); }
.map-lg-i[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.map-lg-i.is-empty { opacity: .55; }
.map-lg-sw { width: 18px; height: 12px; border-radius: 3px; background: var(--sw); flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
.map-lg-t { color: var(--ink); white-space: nowrap; }
.map-lg-n { color: var(--muted); }
.map-lg-note { font-size: var(--fs-xs); color: var(--muted); }

/* =====================================================================
   Overview views
   ===================================================================== */
.ov-lede { font-size: var(--fs-lg); line-height: 1.55; color: var(--ink-2); max-width: 74ch; }
.ov-lede b { color: var(--ink); font-weight: 650; }
.ov-headlinks { display: flex; flex-wrap: wrap; gap: 6px; }

/* KPI tile: disposed split */
.ov-ksplit { display: flex; flex-direction: column; gap: 4px; }
.ov-ksplit-l { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--ink-2); }
.ov-oc { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ov-oc b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-ksplit-l .ov-oc { white-space: normal; min-width: 0; max-width: 100%; }
.ov-ic {
  width: 14px; height: 14px; border-radius: 50%; background: var(--sw); color: #fff; flex: none;
  display: inline-grid; place-items: center; font-size: 9px; line-height: 1; font-weight: 700;
}

/* ---------- pipeline: step bars on one scale, with an enlarged final step ---------- */
.ov-flow { margin: 0; display: flex; flex-direction: column; gap: 16px; }
.ov-st { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ov-st-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ov-st-no {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: 700; display: inline-grid; place-items: center; flex: none; align-self: center;
}
.ov-st-name { font-weight: 600; color: var(--ink); }
.ov-st-val { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1; letter-spacing: -.01em; }
.ov-st-note { color: var(--muted); font-size: var(--fs-sm); }
.ov-st-rest { margin-left: auto; font-size: var(--fs-sm); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ov-st-rest b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-st-bar { position: relative; height: 20px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.ov-sg { position: absolute; top: 0; bottom: 0; background: var(--sw); box-sizing: border-box; }
.ov-sg + .ov-sg { border-left: 2px solid var(--panel); }
.ov-sg:hover { filter: brightness(1.08); }
/* step 4 header sits inside a wedge that runs from the disposed sliver of bar 3 to the full width of bar 4 */
.ov-st-zoom .ov-st-h { position: relative; padding: 12px 0 4px; }
.ov-st-zoom .ov-st-h > :not(.ov-zoom) { position: relative; z-index: 1; }
.ov-zoom { position: absolute; left: 0; top: -16px; width: 100%; height: calc(100% + 23px); overflow: visible; z-index: 0; pointer-events: none; }
.ov-zoom polygon { fill: color-mix(in srgb, var(--c-disposed) 12%, transparent); }
.ov-zoom line { stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ov-st-leg { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--fs-sm); color: var(--ink-2); }
.ov-st-leg b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-st-leg .pc { color: var(--muted); }
.ov-flow figcaption { font-size: var(--fs-sm); color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 12px; }
.ov-flow figcaption b { color: var(--ink); }
.ov-empty { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- compositions ---------- */
.ov-mini-h { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.ov-mini-h + * { margin-bottom: 14px; }
.ov-comp-note { font-size: var(--fs-sm); color: var(--muted); margin-top: 10px; }

/* ---------- callouts ---------- */
.ov-calls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.ov-call {
  display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px 14px;
  background: var(--panel-2); border-radius: var(--radius-sm); border-top: 3px solid var(--accent);
}
.ov-call-k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 600; }
.ov-call-fig { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; line-height: 1.05; font-stretch: 92%; letter-spacing: -.01em; color: var(--ink); }
.ov-call-txt { color: var(--ink-2); }
.ov-call-txt b { color: var(--ink); font-weight: 600; }
.ov-call-go { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-sm); font-weight: 600; }
.ov-linkbtn {
  background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}
.ov-linkbtn:hover { text-decoration-thickness: 2px; }

/* ---------- measure picker ---------- */
.ov-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.ov-toolbar-l { font-size: var(--fs-sm); color: var(--muted); }
.ov-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ov-pick-b {
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink-2); border-radius: 999px;
  padding: 4px 12px; font-size: var(--fs-sm); cursor: pointer; line-height: 1.35; white-space: nowrap;
}
.ov-pick-b:hover { background: var(--panel-2); color: var(--ink); }
.ov-pick-b[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ov-pick select.input { width: auto; max-width: 220px; padding: 4px 8px; font-size: var(--fs-sm); border-radius: 999px; }
.ov-pick select.input.is-on { border-color: var(--ink); color: var(--ink); font-weight: 600; }

/* ---------- map + ranking layout ---------- */
.ov-mapgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px 28px; align-items: start; }
.ov-mapgrid.tall-map { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
@media (max-width: 900px) { .ov-mapgrid, .ov-mapgrid.tall-map { grid-template-columns: minmax(0, 1fr); } }
.ov-col-h { font-size: var(--fs-md); font-weight: 650; margin-bottom: 4px; }
.ov-col-sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }
.ov-more { margin-top: 12px; font-size: var(--fs-sm); }

/* ---------- ranked bars ---------- */
.ov-rank { display: flex; flex-direction: column; gap: 3px; }
.ov-rk-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 6px; align-items: center; }
.ov-rk-key .k { display: inline-flex; align-items: center; gap: 6px; }
.ov-rk-key .ln { width: 0; height: 12px; border-left: 2px solid var(--ink-2); display: inline-block; }
.ov-rk-row {
  display: grid; grid-template-columns: 1.6em minmax(84px, 14em) minmax(0, 1fr) 4.9em; gap: 8px; align-items: center;
  font-size: var(--fs-sm); padding: 2px 4px; margin-inline: -4px; border-radius: 4px;
}
.ov-rk-row { cursor: pointer; }
.ov-rk-row:hover { background: var(--panel-2); }
.ov-rk-i { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; font-size: var(--fs-xs); }
.ov-rk-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); text-decoration: none; min-width: 0; }
a.ov-rk-n:hover { color: var(--ink); text-decoration: underline; }
.ov-rk-trk { position: relative; height: 12px; background: var(--panel-2); border-radius: 0 4px 4px 0; }
.ov-rk-row:hover .ov-rk-trk { background: var(--panel-3); }
.ov-rk-fil { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sw); border-radius: 0 4px 4px 0; }
.ov-rk-ref { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px solid var(--ink-2); margin-left: -1px; }
.ov-rk-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.ov-rk-row.is-cur .ov-rk-n { color: var(--ink); font-weight: 700; }

/* ---------- district vs state strip plots ---------- */
.ov-cmp { display: flex; flex-direction: column; gap: 18px; }
.ov-cmp-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-xs); color: var(--muted); align-items: center; }
.ov-cmp-key .k { display: inline-flex; align-items: center; gap: 6px; }
.ov-cmp-key .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px var(--panel); }
.ov-cmp-key .dot.o { width: 8px; height: 8px; background: var(--muted); opacity: .55; }
.ov-cmp-key .ln { width: 0; height: 14px; border-left: 2px solid var(--accent); }
.ov-cmp-row { display: flex; flex-direction: column; gap: 2px; }
.ov-cmp-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; font-size: var(--fs-sm); }
.ov-cmp-l { font-weight: 600; color: var(--ink); }
.ov-cmp-s { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ov-cmp-s b { color: var(--ink); }
.ov-cmp-trk { position: relative; height: 30px; margin: 0 7px; }
.ov-cmp-trk::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line-strong); }
.ov-cmp-dot {
  position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 55%, transparent); cursor: pointer;
}
.ov-cmp-dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.ov-cmp-dot:hover { background: var(--ink-2); }
.ov-cmp-dot.is-cur { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--ink); box-shadow: 0 0 0 2px var(--panel); z-index: 2; }
.ov-cmp-ref { position: absolute; top: 3px; bottom: 3px; width: 0; border-left: 2px solid var(--accent); margin-left: -1px; z-index: 1; pointer-events: none; }
.ov-cmp-ax { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; margin: 0 1px; }

/* ---------- daily charts ---------- */
.ov-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 10px; }
.ov-facts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ov-foot { font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; }

/* ---------- local bodies, voter search, explore links ---------- */
.ov-lb-note { margin: 0 18px 14px; }
.ov-sub-h { font-size: var(--fs-md); font-weight: 650; padding: 4px 18px 10px; }
.ov-tbl-h { font-size: var(--fs-md); font-weight: 650; }
.ov-vs { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: end; max-width: 860px; }
.ov-vs .btn { padding: 8px 16px; font-size: var(--fs-md); }
.ov-vs-hint { font-size: var(--fs-sm); color: var(--muted); margin-top: 8px; }
@media (max-width: 640px) { .ov-vs { grid-template-columns: minmax(0, 1fr); } .ov-vs .btn { justify-content: center; } }
.ov-explore { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.ov-explore a {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); text-decoration: none; color: var(--ink);
}
.ov-explore a:hover { border-color: var(--line-strong); }
.ov-explore a b { font-weight: 650; }
.ov-explore a span { font-size: var(--fs-sm); color: var(--muted); }
.ov-muted-inline { color: var(--muted); font-size: var(--fs-xs); margin-left: 6px; white-space: nowrap; }

@media (max-width: 560px) {
  .ov-lede { font-size: var(--fs-md); }
  .ov-st-val { font-size: var(--fs-lg); }
  .ov-st-rest { margin-left: 0; }
  .ov-call-fig { font-size: var(--fs-xl); }
  .ov-rk-row { grid-template-columns: 1.4em minmax(70px, 36%) minmax(0, 1fr) 4.4em; gap: 6px; }
  .ov-lb-note { margin-inline: 14px; }
  .ov-sub-h { padding-inline: 14px; }
}

/* ---------- round 2: report parts, coverage, affidavit column ---------- */
.ov-part { padding: 18px 0 2px; border-top: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ov-part-h { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; font-stretch: 94%; display: flex; align-items: center; gap: 10px; }
.ov-part-h::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--accent); flex: none; }
.ov-part-s { color: var(--ink-2); font-size: var(--fs-md); }
.ov-top { align-items: stretch; }
.ov-affcol { min-width: 0; display: flex; flex-direction: column; }
.ov-ledehost, .ov-covhost, .ov-inchost, .ov-incpart { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ov-cov-txt { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 12px; }
.ov-cov-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-top: 4px; }
@media (max-width: 900px) { .ov-cov-grid { grid-template-columns: minmax(0, 1fr); } }
.ov-cov-map, .ov-cov-tbl { min-width: 0; }
.ov-cov-tbl .tbl-tools { padding-inline: 0; }
.ov-cov-tbl .tbl-scroll { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ov-cov-tbl .cellbar .track { width: 44px; }
#ov-cov .ov-toolbar { margin-top: 14px; }
.ov-covv { font-variant-numeric: tabular-nums; }
.ov-covv.low { color: var(--warn-ink); font-weight: 700; }
.ov-covv.high { color: var(--link); font-weight: 700; }
.ov-top { align-items: start; }
.ov-lede-note { display: block; margin-top: 8px; font-size: var(--fs-sm); color: var(--ink-2); }

/* ac.css: assembly list, AC report and booth report. Every class is prefixed ac-. */
:root { --ac-on-strong: #ffffff; } /* text on the darker half of the sequential ramp */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ac-on-strong: #0b1919; }
}
:root[data-theme="dark"] { --ac-on-strong: #0b1919; }

/* ---------- names and small text in tables ---------- */
.ac-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ac-name .ac-bn { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.ac-also { font-size: var(--fs-xs); color: var(--muted); }
.ac-sel { max-width: 240px; }
.ac-lbcell { display: inline-flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.ac-lbcell .sep { color: var(--muted); }
.ac-booths td:nth-child(2) { min-width: 180px; max-width: 320px; }
.ac-booths.ac-haslb td:nth-child(3) { min-width: 200px; }
.ac-list table.tbl th, .ac-list table.tbl td { padding-left: 7px; padding-right: 7px; }
.ac-list td:nth-child(2) { min-width: 150px; }
.ac-list td:nth-child(3), .ac-list td:nth-child(4) { white-space: nowrap; }
.ac-list .cellbar .track { width: 40px; }
.ac-lbs td:first-child { min-width: 200px; }
.ac-lbs td:nth-child(2) { white-space: nowrap; color: var(--ink-2); }
.ac-voters .ac-vname { font-size: var(--fs-md); white-space: nowrap; }
.ac-voters td { white-space: nowrap; }

/* ---------- sticky leading column(s) while a wide table scrolls sideways ---------- */
.ac-stick1 table.tbl tr > :first-child,
.ac-stick2 table.tbl tr > :nth-child(-n+2) { position: sticky; z-index: 1; background: var(--panel); }
.ac-stick1 table.tbl tr > :first-child,
.ac-stick2 table.tbl tr > :first-child { left: 0; }
.ac-stick2 table.tbl tr > :first-child { width: 56px; min-width: 56px; max-width: 56px; box-sizing: border-box; }
.ac-stick2 table.tbl tr > :nth-child(2) { left: 56px; }
.ac-stick1 table.tbl tr > :first-child,
.ac-stick2 table.tbl tr > :nth-child(2) { box-shadow: inset -1px 0 0 var(--line); }
.ac-stick1 table.tbl thead th:first-child,
.ac-stick2 table.tbl thead th:nth-child(-n+2) { z-index: 3; background: var(--panel-2); }
.ac-stick1 table.tbl tfoot td,
.ac-stick2 table.tbl tfoot td { z-index: 2; }
.ac-stick1 table.tbl tfoot td:first-child,
.ac-stick2 table.tbl tfoot td:nth-child(-n+2) { z-index: 3; background: var(--panel-2); }
.ac-stick1 table.tbl tbody tr:hover > :first-child,
.ac-stick2 table.tbl tbody tr:hover > :nth-child(-n+2) { background: color-mix(in srgb, var(--panel-2) 60%, var(--panel)); }
.ac-stick2 table.tbl tfoot td:first-child { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
/* soft right-edge shade while more columns sit off to the right; the local layer covers it at the end */
.ac-booths .tbl-scroll, .ac-lbs .tbl-scroll, .ac-list .tbl-scroll, .ac-voters .tbl-scroll {
  background:
    linear-gradient(to left, var(--panel) 12px, transparent 28px) right / 28px 100% no-repeat local,
    linear-gradient(to left, color-mix(in srgb, var(--ink) 16%, transparent), transparent) right / 12px 100% no-repeat scroll;
}

/* ---------- heads ---------- */
.ac-head .meta .chip { white-space: normal; max-width: 100%; }
.ac-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.ac-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }

/* ---------- AC head: voter search ---------- */
.page-head .actions:has(> .ac-vsearch) { flex: 1 1 300px; max-width: 420px; }
.ac-vsearch { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; }
.ac-vsearch-lbl { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.ac-vsearch-row { display: flex; gap: 6px; min-width: 0; }
.ac-vsearch-row .input { flex: 1 1 auto; }
.ac-vsearch-row .btn { flex: none; }

/* ---------- Tribunal block ---------- */
.ac-trib { display: flex; flex-direction: column; gap: 12px; }
.ac-minor { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; }
.ac-minor b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- benchmarks: this AC vs district vs state ---------- */
.ac-bench { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px 28px; }
.ac-bench-panel { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ac-bench-title { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.ac-bench-title .u { color: var(--muted); font-weight: 400; }
.ac-bench-row { display: grid; grid-template-columns: minmax(64px, 36%) minmax(0, 1fr) 3.4em; gap: 8px; align-items: center; font-size: var(--fs-sm); }
.ac-bench-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.ac-bench-row.me .ac-bench-lbl { color: var(--ink); font-weight: 600; }
.ac-bench-trk { display: block; height: 10px; background: var(--panel-2); border-radius: 0 3px 3px 0; overflow: hidden; }
.ac-bench-fil { display: block; height: 100%; background: var(--c-not); border-radius: 0 3px 3px 0; }
.ac-bench-row.me .ac-bench-fil { background: var(--c-applied); }
.ac-bench-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.ac-bench-row.me .ac-bench-val { font-weight: 600; }
.ac-bench-axis { margin-top: -2px; }
.ac-bench-scale { display: flex; justify-content: space-between; font-size: 10px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-bench-note { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.ac-bench-split .ac-bench { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ac-map { min-height: 200px; }

/* ---------- booths at a glance ---------- */
.ac-strip { display: flex; flex-direction: column; gap: 12px; }
.ac-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 3px; }
.ac-tile {
  aspect-ratio: 1 / 1; min-width: 0; display: grid; place-items: center; overflow: hidden;
  border-radius: 4px; background: var(--tile, var(--seq-none)); color: var(--ink);
  font-size: 10px; line-height: 1; font-variant-numeric: tabular-nums; text-decoration: none;
}
.ac-tile { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent); }
.ac-tile.hi { color: var(--ac-on-strong); }
.ac-tile.few, .ac-ramp > span.few { background: repeating-linear-gradient(135deg, var(--line) 0 2px, var(--panel) 2px 5px); color: var(--muted); }
.ac-tile:hover { outline: 2px solid var(--ink); outline-offset: 1px; position: relative; z-index: 1; }
.ac-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: var(--fs-xs); color: var(--ink-2); }
.ac-key { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.ac-ramp { display: inline-flex; gap: 2px; }
.ac-ramp > span { display: block; width: 18px; height: 10px; border-radius: 2px; background: var(--sw); }
.ac-ramp > span { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent); }
.ac-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: var(--fs-sm); }
.ac-top-lbl { color: var(--ink-2); margin-right: 2px; }
.ac-top .chip b { color: var(--ink); font-weight: 600; }

/* ---------- charts drawn at their real pixel width ---------- */
.ac-svgbox { width: 100%; min-width: 0; overflow: hidden; }
.ac-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- daily charts ---------- */
.ac-daychart .ac-cross { stroke: var(--ink-2); stroke-width: 1; }
.ac-daylegend { margin-top: 6px; }
.ac-linekey { display: inline-block; width: 16px; height: 2px; border-radius: 1px; background: var(--sw); }

/* ---------- ranked chart on the list page ---------- */
.ac-rank rect.bar { fill: var(--c-applied); }
.ac-rank.dim rect.bar { fill: var(--c-not); }
.ac-rank.dim rect.bar.on { fill: var(--c-applied); }
.ac-rank rect.bar.hov,
.ac-rank.dim rect.bar.hov { fill: var(--ink); }
.ac-rank .ac-ref { stroke: var(--ink-2); stroke-width: 1; }
.ac-rank .ac-ref-lbl { fill: var(--ink-2); }
.ac-rank .ac-hit { cursor: pointer; }

/* ---------- booth page ---------- */
.ac-station {
  display: block; margin-top: 6px; font-family: var(--font-body); font-size: var(--fs-lg); font-weight: 500;
  font-stretch: normal; color: var(--ink-2); letter-spacing: 0; line-height: 1.3;
}
.ac-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-nav span.btn[aria-disabled="true"] { opacity: .45; cursor: default; }
.ac-nav span.btn[aria-disabled="true"]:hover { background: var(--panel); }
.ac-foot-nav { display: flex; justify-content: flex-end; }
.ac-near { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.ac-cmp { display: flex; flex-direction: column; gap: 8px; }
.ac-cmp-row { display: grid; grid-template-columns: minmax(80px, 28%) minmax(0, 1fr); gap: 10px; align-items: center; font-size: var(--fs-sm); }
.ac-cmp-lbl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-cmp-row.me .ac-cmp-lbl { color: var(--ink); font-weight: 600; }
.ac-cmp-none { font-size: var(--fs-sm); color: var(--muted); }
.ac-cmp .legend { margin-top: 4px; }
.ac-ref-pc { white-space: nowrap; }
.ac-vfilter button { white-space: nowrap; }
.ac-vfilter button:disabled { opacity: .5; cursor: default; }
.ac-cnt { font-variant-numeric: tabular-nums; color: var(--muted); }
.ac-vfilter button[aria-pressed="true"] .ac-cnt { color: inherit; opacity: .8; }
.ac-voters .tbl-tools .input { max-width: 240px; }

@media (max-width: 560px) {
  .ac-tiles { grid-template-columns: repeat(auto-fill, minmax(24px, 1fr)); gap: 2px; }
  .ac-tile { font-size: 9px; border-radius: 3px; }
  .ac-stick2 table.tbl tr > :first-child { width: 46px; min-width: 46px; max-width: 46px; }
  .ac-stick2 table.tbl tr > :nth-child(2) { left: 46px; }
  .ac-booths td:nth-child(2) { min-width: 150px; }
  .ac-voters .tbl-tools .input { max-width: none; }
  .ac-sel { max-width: none; }
  .ac-cmp-row { grid-template-columns: minmax(70px, 34%) minmax(0, 1fr); }
}

/* round 2: the parts of the assembly report (exclusion, inclusion, booths) */
.ac-part { padding: 18px 0 2px; border-top: 2px solid var(--line-strong); display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ac-part-h { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.65rem); font-weight: 700; font-stretch: 94%; display: flex; align-items: center; gap: 10px; }
.ac-part-h::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--accent); flex: none; }
.ac-part-s { color: var(--ink-2); }

/* round 3: jump bar between the parts of the assembly and booth reports */
.ac-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 4px; }
.ac-jump-lbl { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.ac-jump .chip { cursor: pointer; font: inherit; font-size: var(--fs-sm); }
.ac-jump .chip:hover { border-color: var(--line-strong); background: var(--panel-2); }
.ac-part-h:focus { outline: none; }
.ac-part-h:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.ac-incparts { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ac-incparts[hidden] { display: none; }
.ac-inc-links { display: flex; flex-direction: column; gap: 12px; }
.ac-inc-kpis:empty { display: none; }

/* localbody.css: the universal search box (.search-*), local body pages (.lb-*) and About the data (.about-*).
   Colours come from the tokens in app.css only. */

/* ---------- search box (sticky nav) ---------- */
.search { position: relative; width: 100%; }
.search-field {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}
.search-field:hover { border-color: var(--muted); }
.search-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 35%, transparent); }
.search-ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
.search-input {
  flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink);
  font-size: 16px; /* 16px stops phones zooming in on focus */ padding: 0; outline: none;
}
.search-input::placeholder { color: var(--muted); opacity: 1; }
.search-input:focus-visible { outline: none; }
.search-kbd {
  flex: none; font: 600 11px/1 var(--font-mono); color: var(--muted); padding: 3px 6px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--panel-2);
}
.search-field:focus-within .search-kbd { display: none; }
.search-clear {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.search-clear:hover { background: var(--panel-2); color: var(--ink); }
.search-clear[hidden] { display: none; }
.search-clear:not([hidden]) + .search-kbd { display: none; }

.search-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 100%;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .2), 0 2px 6px rgba(0, 0, 0, .08);
}
.search-pop[hidden] { display: none; }
.search-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 0 1 auto; }
.search-list:empty { display: none; }
.search-group { padding: 4px 0; }
.search-group + .search-group { border-top: 1px solid var(--line); }
.search-gh {
  display: flex; justify-content: space-between; gap: 12px; padding: 6px 14px 2px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.search-gcount { letter-spacing: 0; text-transform: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.search-opt {
  display: flex; align-items: center; gap: 12px; padding: 6px 14px; min-height: 44px; cursor: pointer;
  border-left: 3px solid transparent;
}
.search-opt[aria-selected="true"] { background: var(--panel-2); border-left-color: var(--accent); }
.search-badge {
  flex: none; min-width: 3.4em; padding: 4px 6px; border-radius: 6px; text-align: center;
  font-size: var(--fs-xs); font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line);
}
.search-opt[aria-selected="true"] .search-badge { background: var(--panel); }
.search-opt.k-ac .search-badge, .search-opt.k-booth .search-badge { font-family: var(--font-mono); letter-spacing: -.02em; }
.search-opt.k-voter .search-badge { background: color-mix(in srgb, var(--c-applied) 14%, var(--panel)); border-color: color-mix(in srgb, var(--c-applied) 40%, var(--line)); color: var(--ink); }
.search-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.search-label { color: var(--ink); font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-bn { color: var(--ink-2); font-weight: 400; }
.search-sub { color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-label mark {
  background: color-mix(in srgb, var(--accent) 24%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; margin: 0 -1px;
}
.search-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 8px 14px; border-top: 1px solid var(--line); background: var(--panel-2); font-size: var(--fs-xs); color: var(--muted);
}
.search-list:empty + .search-foot { border-top: 0; }
.search-foot:empty { display: none; }
.search-note:empty { display: none; }
.search-keys { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
.search-keys kbd, .search-help kbd {
  font: 600 10px/1 var(--font-mono); padding: 2px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 4px; background: var(--panel); color: var(--ink-2);
}
.search-help { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; flex: 1 1 100%; }
.search-help-h { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.4; }
.search-ex { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.search-exbtn { cursor: pointer; font: inherit; font-size: var(--fs-sm); background: var(--panel); }
.search-exbtn:hover { border-color: var(--line-strong); color: var(--ink); }
.search-link { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; font-size: var(--fs-xs); text-decoration: underline; }
@media (hover: none), (pointer: coarse) {
  .search-kbd, .search-keys { display: none; }
}
@media (max-width: 560px) {
  .search-kbd { display: none; }
  .search-opt { padding: 6px 12px; gap: 10px; }
  .search-gh { padding-inline: 12px; }
  .search-foot { padding-inline: 12px; }
}

/* ---------- local body pages ---------- */
.chip.lb-type { background: var(--panel); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.lb-center { display: flex; justify-content: center; }
.lb-pad { padding: 0 18px 12px; }
.lb-small { font-size: var(--fs-sm); }
.lb-lede { color: var(--ink-2); font-size: var(--fs-md); max-width: 72ch; line-height: 1.55; }
.lb-foot { font-size: var(--fs-sm); margin-top: 12px; }
.lb-tblhost { min-width: 0; }
.lb-acs { white-space: nowrap; }
.lb-ps { display: inline-block; min-width: 14em; }
.lb-vname { font-size: var(--fs-md); }
.page-head .actions .btn { padding: 7px 12px; }

/* browse controls */
.lb-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; padding: 4px 18px 12px; }
.lb-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; }
.lb-seg .lb-n {
  font-size: var(--fs-xs); font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: 999px;
  background: var(--panel-2); color: var(--ink-2);
}
.lb-seg button[aria-pressed="true"] .lb-n { background: color-mix(in srgb, var(--brand-ink) 18%, transparent); color: var(--brand-ink); }
.lb-short { display: none; }
.lb-dist { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); min-width: 0; flex: 0 1 260px; }
.lb-select { cursor: pointer; padding-block: 6px; }
.lb-note { margin: 0 18px 12px; }

/* applied % by type of body: labels may wrap rather than truncate */
.lb-typebars .hbar { grid-template-columns: minmax(7.5em, 34%) minmax(0, 1fr) auto; }
.lb-typebars .hbar .lbl { white-space: normal; line-height: 1.25; }
.lb-typebars .hbar:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

/* comparison table */
.lb-cmp { border-top: 0; max-height: none; }
.lb-cmp table.tbl tbody th {
  position: static; background: none; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm);
  font-weight: 500; color: var(--ink); white-space: normal; text-align: left;
}
.lb-cmp table.tbl thead th:first-child { min-width: 9em; }
.lb-cmp tr.lb-self th, .lb-cmp tr.lb-self td { font-weight: 700; background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }

/* voter list */
.lb-vfilters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.lb-fbtn { gap: 6px; }
.lb-fcount { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.lb-fbtn[aria-pressed="true"] .lb-fcount { color: var(--ink); }
.lb-prog { text-align: center; font-size: var(--fs-sm); }
.lb-vcell { display: flex; flex-direction: column; gap: 1px; }
.lb-vsub { display: none; font-size: var(--fs-xs); color: var(--muted); }

@media (max-width: 720px) {
  .lb-long { display: none; }
  .lb-short { display: inline; }
}
@media (max-width: 560px) {
  .lb-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .lb-seg button { flex-direction: column; gap: 3px; padding: 7px 4px; }
  .lb-seg button + button { border-left: 1px solid var(--line); }
  /* phones: name with EPIC and booth under it, then the two statuses; dates are on the voter page */
  .lb-voters table.tbl th:nth-child(2), .lb-voters table.tbl td:nth-child(2),
  .lb-voters table.tbl th:nth-child(3), .lb-voters table.tbl td:nth-child(3),
  .lb-voters table.tbl th:nth-child(6), .lb-voters table.tbl td:nth-child(6),
  .lb-voters table.tbl th:nth-child(7), .lb-voters table.tbl td:nth-child(7) { display: none; }
  .lb-vsub { display: block; }
  .lb-pad { padding: 0 14px 12px; }
  .lb-controls { padding: 4px 14px 12px; }
  .lb-note { margin: 0 14px 12px; }
  .lb-vfilters { padding: 0 14px 12px; }
  .lb-dist { flex-basis: 100%; }
  .lb-ps { min-width: 11em; }
  .page-head .actions { width: 100%; }
}

/* ---------- about ---------- */
.about-lede { font-size: var(--fs-lg); }
.about-dl { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.about-dl dt { font-weight: 600; color: var(--ink); }
.about-dl dd { margin: 0; color: var(--ink-2); }
.about-code { overflow-wrap: anywhere; background: var(--panel-2); border-radius: 4px; padding: 1px 4px; }
.about-codes { border-top: 0; max-height: none; }
.about-codes td { vertical-align: top; }
.about-codes .pill { margin-right: 8px; }
.about-full { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); }
.about-mean { min-width: 16em; color: var(--ink-2); }
.about-list { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.about-list b { color: var(--ink); font-weight: 600; }
.about-h4 { font-size: var(--fs-md); font-weight: 650; margin: 18px 0 8px; }
.about-gap .tbl-wrap .tbl-tools { padding-top: 0; }
.about-unm { padding-top: 6px; }
.about-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.about-cite {
  margin: 0 0 12px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--panel-2);
  border-radius: var(--radius-sm); color: var(--ink); font-size: var(--fs-md); line-height: 1.5;
}
.about-cite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
@media (max-width: 640px) {
  .about-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .about-dl dd { margin-bottom: 10px; }
  .about-lede { font-size: var(--fs-md); }
  .about-mean { min-width: 9em; }
}

/* About: "What the numbers mean" and the adjudication breakdown */
.about-sublist { margin: 6px 0 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.about-sublist b, .about-dl dd b { color: var(--ink); font-weight: 600; }
.about-p { margin: 12px 0 0; color: var(--ink-2); max-width: 75ch; }
.about-eqs { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.about-eq { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--panel-2); }
.about-eq-term { margin: 0 0 8px; font-weight: 650; color: var(--ink); }
.about-eq-term::after { content: " ="; color: var(--muted); font-weight: 500; }
.about-eq-parts { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.about-eq-part {
  flex: 1 1 220px; min-width: 0; margin: 0; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm);
}
.about-eq-part.here { border-color: color-mix(in srgb, var(--c-applied) 55%, var(--line)); }
.about-eq-op { align-self: center; font-weight: 700; color: var(--muted); }
.about-eq-tag {
  display: block; width: max-content; margin-top: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink);
  padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c-applied) 16%, var(--panel));
}
.about-eq-tag.soon { background: color-mix(in srgb, var(--c-pending) 20%, var(--panel)); }
@media (max-width: 560px) {
  .about-eq-parts { flex-direction: column; }
  .about-eq-part { flex-basis: auto; }
  .about-eq-op { align-self: flex-start; padding-left: 10px; }
}

/* voter.css: voter search ('vs') and voter record ('v-<EPIC>') pages. Every class starts with "voter-".
   Colours come from the app.css tokens, plus two list tokens defined here for light and dark. */

/* which list a record is in: deleted after adjudication / included in e-roll after adjudication */
:root { --voter-del: #6f7f7d; --voter-inc: #1f8a70; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --voter-del: #8b9e9b; --voter-inc: #2fae8e; } }
:root[data-theme="dark"] { --voter-del: #8b9e9b; --voter-inc: #2fae8e; }

.voter-intro { color: var(--ink-2); max-width: 72ch; margin-top: -8px; }
.voter-input, .voter-select, .voter-form .btn, .voter-more, .voter-more > summary, .voter-seg button, .voter-actions .btn,
.voter-pager .btn, .voter-row-link, .voter-list-head, .voter-msg, .voter-tips, .voter-banner, .voter-step-mark, .voter-banner-mark { box-sizing: border-box; }
.voter-ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -4px; }

/* ---------- the two ways in ---------- */
.voter-ways { align-items: start; }
.voter-form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.voter-form > label.field { color: var(--ink); font-weight: 600; font-size: var(--fs-md); }
.voter-input, .voter-select { min-height: 46px; font-size: 1rem; } /* 16px: phones do not zoom into the field */
.voter-input.mono { letter-spacing: .04em; text-transform: uppercase; }
.voter-input.mono::placeholder { text-transform: none; letter-spacing: 0; }
.voter-select { padding-right: 28px; text-overflow: ellipsis; }
.voter-select:disabled { opacity: .6; }
.voter-inline { display: flex; gap: 8px; min-width: 0; }
.voter-inline .voter-input { flex: 1 1 auto; }
.btn.voter-go { min-height: 46px; padding: 0 18px; font-size: var(--fs-md); font-weight: 600; justify-content: center; }
.voter-help { font-size: var(--fs-sm); color: var(--muted); }
.voter-scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 12px; margin-top: 4px; }
.voter-scope label.field, .voter-filters .field { color: var(--ink-2); font-weight: 500; }

.voter-more { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.voter-more > summary {
  cursor: pointer; padding: 10px 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; border-radius: var(--radius-sm);
}
.voter-more > summary::-webkit-details-marker { display: none; }
.voter-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line-strong); font-size: 13px; line-height: 1; }
.voter-more[open] > summary::before { content: "\2212"; }
.voter-more > summary:hover { color: var(--ink); }
.voter-fcount { color: var(--accent-ink); font-weight: 600; }
.voter-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px 12px; padding: 4px 12px 12px; }
.voter-filters .field > span { font-size: var(--fs-sm); }
.voter-seg { display: flex; width: 100%; }
.voter-seg button { flex: 1 1 0; min-height: 44px; padding: 6px 8px; }

.voter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.voter-actions .btn { min-height: 44px; padding: 0 16px; font-size: var(--fs-sm); }
.voter-actions .btn.primary { font-weight: 600; }

.voter-epic-out:not(:empty) { margin-top: 14px; }
.voter-epic-out .state { padding: 20px 8px; }
.voter-msg { background: var(--panel-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: var(--fs-sm); color: var(--ink); display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--line-strong); }
.voter-msg.warn { border-left-color: var(--c-pending); }
.voter-msg.error { border-left-color: var(--c-rejected); color: var(--bad-ink); }
.voter-msg .voter-actions { margin-top: 2px; }

/* ---------- results ---------- */
.voter-res > .sec-head { align-items: flex-start; flex-direction: column; gap: 4px; }
.voter-res > .sec-head h3 { font-size: var(--fs-xl); overflow-wrap: anywhere; }
.voter-res > .sec-head .voter-res-sub { flex: none; font-size: var(--fs-sm); color: var(--ink-2); }
.voter-res > .sec-body { padding-inline: 0; padding-bottom: 6px; }
.voter-res-list > .voter-msg, .voter-res-list > .note, .voter-res-list > .voter-empty, .voter-res-list > .voter-tips, .voter-res > .sec-body > .voter-msg { margin: 0 18px 12px; }

.voter-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 0 18px 14px; font-size: var(--fs-sm); color: var(--ink-2); }
.voter-bar { flex: 1 1 100%; height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; display: block; }
.voter-bar-fill { display: block; height: 100%; width: 2%; background: var(--c-applied); border-radius: 4px; transition: width .25s ease; }
.voter-prog-text { flex: 1 1 260px; font-variant-numeric: tabular-nums; }
.voter-prog .btn { min-height: 40px; }

.voter-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.voter-list-mini { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.voter-row { border-bottom: 1px solid var(--line); }
.voter-list-mini .voter-row:last-child { border-bottom: 0; }
.voter-row-link, .voter-list-head {
  display: grid; align-items: center; gap: 4px 16px;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.15fr) minmax(0, 1.9fr) minmax(0, 1.55fr) minmax(0, 1.3fr) 14px;
  padding: 10px 18px;
}
.voter-row-link { color: var(--ink); text-decoration: none; min-height: 56px; }
.voter-row-link:hover { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.voter-row-link:hover .voter-row-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.voter-row-link:focus-visible { outline-offset: -2px; border-radius: 4px; }
.voter-list-head {
  background: var(--panel-2); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding-block: 7px; border-top: 1px solid var(--line);
}
.voter-list-head + .voter-list { border-top: 0; }
.voter-c { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.voter-row-name { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.voter-row-lat { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.voter-c-epic .mono { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.voter-g { font-size: var(--fs-xs); color: var(--muted); }
.voter-c-where { font-size: var(--fs-sm); }
.voter-station { color: var(--muted); font-size: var(--fs-sm); }
.voter-c-where .voter-station { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.voter-c-status { flex-direction: row; flex-wrap: wrap; gap: 4px; align-items: center; }
.voter-c-dates { font-size: var(--fs-sm); color: var(--ink-2); }
.voter-chev { color: var(--muted); font-size: 1.5rem; line-height: 1; justify-self: end; }
.voter-divider { padding: 8px 18px; background: var(--panel-2); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.voter-pager { padding-top: 12px; }
.voter-pager .btn { min-height: 44px; padding: 0 16px; }
.voter-near-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 18px 4px; font-size: var(--fs-sm); }
.voter-near-more .btn { min-height: 44px; padding: 0 16px; box-sizing: border-box; }

.voter-tips { background: var(--panel-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: var(--fs-sm); color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.voter-tips.short { margin-top: 14px !important; }
.voter-tips-h { font-weight: 600; color: var(--ink); }
.voter-tips ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 3px; }
.voter-empty { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.voter-empty-h { font-size: var(--fs-lg); font-weight: 600; color: var(--ink); font-family: var(--font-display); overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .voter-list-head { display: none; }
  .voter-list-head + .voter-list { border-top: 1px solid var(--line); }
  .voter-row-link { grid-template-columns: minmax(0, 1fr) 14px; padding: 12px 14px; gap: 5px 10px; }
  .voter-row-link > .voter-c { grid-column: 1; }
  .voter-chev { grid-column: 2; grid-row: 1 / span 5; align-self: center; }
  .voter-c-epic { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  .voter-c-where { flex-direction: row; flex-wrap: wrap; gap: 0 6px; }
  .voter-c-where .voter-station { -webkit-line-clamp: 1; }
  .voter-c-dates:empty { display: none; }
  .voter-res-list > .voter-msg, .voter-res-list > .note, .voter-res-list > .voter-empty, .voter-res-list > .voter-tips, .voter-res > .sec-body > .voter-msg { margin-inline: 14px; }
  .voter-prog { padding-inline: 14px; }
  .voter-divider { padding-inline: 14px; }
  .voter-near-more { margin-inline: 14px; }
}

/* ---------- voter record ---------- */
.voter-pill { font-size: var(--fs-sm); line-height: 1.25; padding: 4px 10px 4px 6px; white-space: normal; }
.voter-title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); line-height: 1.2; overflow-wrap: anywhere; }
.voter-title.bn { font-weight: 700; }
.voter-title-lat { font-size: var(--fs-lg); color: var(--ink-2); font-weight: 500; flex-basis: 100%; }
.voter-dup { margin-top: -4px; }

.voter-banner {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--sw) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--sw) 40%, var(--line));
  border-left: 5px solid var(--sw);
}
.voter-banner-mark {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--ink);
  background: color-mix(in srgb, var(--sw) 28%, var(--panel)); border: 2px solid var(--sw);
}
.voter-banner-mark .voter-ic { width: 22px; height: 22px; }
.voter-banner-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--ink-2); }
.voter-banner-h { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.2; color: var(--ink); }

.voter-steps { list-style: none; margin: 18px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 12px; }
.voter-step { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.voter-step:not(:last-child)::after {
  content: ""; position: absolute; top: 18px; left: 46px; right: 4px; height: 0; border-top: 2px solid var(--line-strong);
}
.voter-step.next-none:not(:last-child)::after { border-top-style: dashed; }
.voter-step-mark {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink);
  background: color-mix(in srgb, var(--sw) 24%, var(--panel)); border: 2px solid var(--sw); position: relative; z-index: 1;
}
.voter-step.is-wait .voter-step-mark { box-shadow: 0 0 0 4px color-mix(in srgb, var(--sw) 22%, transparent); }
.voter-step.is-none .voter-step-mark { background: var(--panel); border-style: dashed; border-color: var(--line-strong); color: var(--muted); }
.voter-step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.voter-step-n { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.voter-step-label { font-weight: 650; font-size: var(--fs-md); color: var(--ink); line-height: 1.3; }
.voter-step.is-none .voter-step-label { color: var(--ink-2); }
.voter-step-detail { font-size: var(--fs-sm); color: var(--ink-2); }
@media (max-width: 640px) {
  .voter-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .voter-step { flex-direction: row; gap: 12px; padding-bottom: 16px; }
  .voter-step:last-child { padding-bottom: 0; }
  .voter-step:not(:last-child)::after { top: 42px; bottom: 2px; left: 18px; right: auto; height: auto; width: 0; border-top: 0; border-left: 2px solid var(--line-strong); }
  .voter-step.next-none:not(:last-child)::after { border-left-style: dashed; }
  .voter-step-text { padding-top: 2px; }
  .voter-banner { padding: 12px; gap: 12px; }
  .voter-banner-h { font-size: var(--fs-lg); }
}

.voter-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 0 28px; }
.voter-fact { padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.voter-fact dt { font-size: var(--fs-sm); color: var(--muted); }
.voter-fact dd { margin: 0; font-size: var(--fs-md); color: var(--ink); overflow-wrap: anywhere; }
.voter-val-copy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.voter-epic, .voter-aid { font-size: 1rem; font-weight: 600; user-select: all; }
.btn.voter-copy { min-height: 36px; padding: 4px 12px; font-size: var(--fs-sm); }
.voter-lbs { display: flex; flex-wrap: wrap; gap: 6px; }
.voter-lbs .chip { white-space: normal; text-align: left; }
.voter-rec-actions { margin-top: 18px; }
.voter-para { margin: 14px 0; color: var(--ink-2); max-width: 70ch; }
.voter-form-narrow { max-width: 560px; }
.voter-form + .voter-actions { margin-top: 14px; }
.voter-center { text-align: center; }
.voter-pillx { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; }

/* ---------- the two lists ---------- */
.voter-lb {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; align-self: flex-start; max-width: 100%;
  font-size: var(--fs-xs); line-height: 1.3; color: var(--ink-2); padding: 2px 8px 2px 6px; border-radius: 4px;
  background: color-mix(in srgb, var(--lbc) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--lbc) 45%, var(--line));
  border-left: 4px solid var(--lbc); box-sizing: border-box;
}
.voter-lb b { color: var(--ink); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.voter-lb.is-del { --lbc: var(--voter-del); }
.voter-lb.is-inc { --lbc: var(--voter-inc); }
.voter-c-name .voter-lb { margin-bottom: 3px; }
.page-head .voter-lb { font-size: var(--fs-sm); align-self: center; }
.voter-what-list { margin: 0 0 10px; }
.voter-listfield { display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-weight: 500; }
.voter-listfield > span:first-child { font-size: var(--fs-sm); }
.voter-listseg button { white-space: nowrap; }
.voter-mean { color: var(--ink-2); font-size: var(--fs-sm); }
.voter-filters .field[hidden] { display: none; }

/* inclusion.css: appeals against inclusion ('inc', 'inc-ac-<n>', 'inc-b-<ac>-<part>'). Every class is prefixed inc-. */
:root {
  --inc-clear: #8fcf8f;      /* approved voter, no appeal filed against them */
  --inc-approved: #0b7d0b;   /* approved during adjudication (equation swatch) */
  --inc-deleted: #8a3b3b;    /* deleted during adjudication (equation swatch) */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --inc-clear: #2e6a33; --inc-approved: #2fc22f; --inc-deleted: #e07a7a; }
}
:root[data-theme="dark"] { --inc-clear: #2e6a33; --inc-approved: #2fc22f; --inc-deleted: #e07a7a; }

/* ---------- heads and lookup ---------- */
.inc-head .meta .chip { white-space: normal; max-width: 100%; }
.page-head .actions:has(> .inc-lookup) { flex: 1 1 300px; max-width: 440px; }
.inc-lookup { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; }
.inc-lookup-lbl { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.inc-lookup-row { display: flex; gap: 6px; min-width: 0; }
.inc-lookup-row .input { flex: 1 1 auto; }
.inc-lookup-out:empty { display: none; }
.inc-hits { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.inc-hit {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.inc-hit-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.inc-hit-main .inc-vname { font-size: var(--fs-lg); font-weight: 600; }
.inc-hit-epic { color: var(--ink-2); }
.inc-hit-meta, .inc-hit-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--fs-sm); }

/* ---------- intro ---------- */
.inc-intro { display: flex; flex-direction: column; gap: 8px; max-width: 78ch; color: var(--ink-2); }
.inc-intro b { color: var(--ink); }
.inc-small { font-size: var(--fs-sm); }
.inc-dir { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 10px; }
.inc-dir b { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--ink); margin-right: 4px; font-weight: 700; }
.inc-both > .section { box-shadow: none; background: var(--panel-2); border-color: var(--line); }

/* ---------- adjudication arithmetic ---------- */
.inc-arith { display: flex; flex-direction: column; gap: 12px; }
.inc-eq { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.inc-term {
  display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 140px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel);
}
.inc-term.big { background: var(--panel-2); }
.inc-term-lbl { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.25; }
.inc-term-val { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); line-height: 1.15; font-stretch: 92%; }
.inc-term.big .inc-term-val { font-size: var(--fs-xl); }
.inc-term-sub { font-size: var(--fs-xs); color: var(--muted); }
.inc-op { align-self: center; font-family: var(--font-display); font-size: var(--fs-xl); color: var(--muted); padding: 0 2px; line-height: 1; }
@media (max-width: 560px) {
  /* stacked: the first term, then "= term", "+ term" lines */
  .inc-eq { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 4px 6px; }
  .inc-eq > .inc-term:first-child { grid-column: 2; }
  .inc-term { flex-basis: auto; padding: 6px 10px; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .inc-term-lbl { flex: 1 1 100%; }
  .inc-op { font-size: var(--fs-lg); text-align: center; padding: 0; }
  .inc-arith { gap: 16px; }
}

/* ---------- ECI affidavit slot ---------- */
.inc-affidavit { display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius-sm); padding: 14px 16px; background: var(--panel-2); max-width: 82ch; }
.inc-affidavit.empty { border: 2px dashed var(--line-strong); background: transparent; }
.inc-aff-tag {
  align-self: flex-start; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--warn-ink); background: color-mix(in srgb, var(--c-pending) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c-pending) 45%, var(--line));
  padding: 2px 8px; border-radius: 999px;
}
.inc-aff-num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.inc-aff-num .k-value { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xl); }
.inc-aff-lbl { color: var(--ink-2); }

/* ---------- tables ---------- */
.inc-jump { max-width: 260px; font-size: var(--fs-sm); padding: 5px 8px; }
.inc-actable td:nth-child(2) { white-space: nowrap; }
.inc-actable .cellbar .track, .inc-booths .cellbar .track { width: 40px; }
.inc-booths td:nth-child(2) { min-width: 180px; max-width: 300px; }
.inc-booths td:nth-child(3) { min-width: 140px; }
.inc-lbcell { display: inline; }
.inc-voters td { white-space: nowrap; }
.inc-name { display: flex; flex-direction: column; line-height: 1.25; }
.inc-vname { font-size: var(--fs-md); }
.inc-en { font-size: var(--fs-xs); color: var(--muted); }
.inc-cnt { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.seg button[aria-pressed="true"] .inc-cnt { color: inherit; opacity: .8; }
.inc-vfilter { max-width: 100%; }
.inc-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

/* ---------- booth page ---------- */
.inc-station { display: block; font-size: var(--fs-lg); font-weight: 500; color: var(--ink-2); margin-top: 4px; }
.inc-bnav { display: flex; gap: 8px; flex-wrap: wrap; }
.inc-foot-nav { justify-content: flex-end; }
.inc-cmp { display: flex; flex-direction: column; gap: 6px; }
.inc-cmp-lbl { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.inc-cmp-lbl + .stack { margin-bottom: 8px; }

@media (max-width: 560px) {
  .inc-tools-col { flex-direction: column; }
  .inc-vfilter button { padding: 5px 8px; }
}
.inc-dir-after { margin: 14px 0 0; }
.inc-dir-after b { font-size: var(--fs-lg); }
/* round 2: affidavit column, maps */
.inc-top { align-items: start; }
.inc-affcol { min-width: 0; display: flex; flex-direction: column; }
.inc-map { min-width: 0; }

/* adjud.css: the adjudication arithmetic, coverage meters, ECI affidavit box and the shared AC/district table
   (src/js/views/adjud.js). Every class is prefixed adj-. Tokens --inc-* come from inclusion.css. */

/* ---------- equation ---------- */
.adj { display: flex; flex-direction: column; gap: 16px; }
.adj-eq { display: flex; align-items: stretch; gap: 8px; }
.adj-term {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px;
}
.adj-term.lead { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.adj-term.a { border-top: 3px solid var(--inc-approved); }
.adj-term.d { border-top: 3px solid var(--inc-deleted); }
.adj-term-l { font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.adj-term.lead .adj-term-l, .adj-term.lead .adj-term-s { color: var(--brand-ink-2); }
.adj-term-v { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); line-height: 1.05; font-stretch: 90%; letter-spacing: -.01em; }
.adj-term-s { font-size: var(--fs-sm); color: var(--muted); }
.adj-op { align-self: center; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--muted); flex: none; line-height: 1; }
@media (max-width: 640px) {
  .adj-eq { flex-direction: column; gap: 4px; }
  .adj-term { flex: none; }
  .adj-op { align-self: flex-start; padding-left: 14px; font-size: 1.4rem; }
}
.adj-gap { font-size: var(--fs-sm); color: var(--ink-2); }

/* ---------- split bar ---------- */
.adj-barwrap { display: flex; flex-direction: column; gap: 4px; }
.adj-bar-key { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); color: var(--ink-2); }
.adj-bar-key > span { white-space: nowrap; }
.adj-bar { display: flex; gap: 4px; height: 22px; }
.adj-grp { display: flex; gap: 1px; min-width: 2px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.adj-grp > span { display: block; height: 100%; background: var(--sw); min-width: 0; }

/* ---------- the two sides ---------- */
.adj-sides { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.adj-side { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adj-side.a { border-top: 3px solid var(--inc-approved); }
.adj-side.d { border-top: 3px solid var(--inc-deleted); }
.adj-side-h { font-weight: 600; display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.adj-side-n { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; font-stretch: 92%; }
.adj-side-f { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 6px; }
.adj-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.2em; gap: 10px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.adj-row-l { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink); }
.adj-row.sub .adj-row-l { color: var(--ink-2); padding-left: 16px; }
.adj-row.sub { border-top-style: dashed; }
.adj-row.muted .adj-row-l { color: var(--muted); }
.adj-row-in { width: 10px; flex: none; }
.adj-row-v { font-weight: 600; text-align: right; }
.adj-row.sub .adj-row-v { font-weight: 500; color: var(--ink-2); }
.adj-row-p { color: var(--muted); text-align: right; }
.adj-over, .adj-wait { font-size: var(--fs-sm); color: var(--ink-2); padding-top: 5px; border-top: 1px solid var(--line); }
.adj-go { margin-top: auto; padding-top: 8px; font-size: var(--fs-sm); font-weight: 600; }
.adj-go a { text-decoration: none; }
.adj-go a:hover { text-decoration: underline; }
.adj-src { font-size: var(--fs-xs); color: var(--muted); }
.adj-src b { color: var(--ink-2); font-weight: 600; }
.adj-filer { font-size: var(--fs-xs); color: var(--ink-2); padding-top: 6px; border-top: 1px solid var(--line); line-height: 1.45; }
.adj-filer b { color: var(--ink); font-weight: 600; }
.adj-pending { margin: 0; }

/* ---------- coverage meters ---------- */
.adj-cov { display: grid; gap: 10px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.adj-meter { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adj-meter-h { font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 2px; }
.adj-meter-v { font-size: var(--fs-sm); }
.adj-meter-v b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--ink); margin-right: 4px; }
.adj-meter-trk { display: block; height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.adj-meter-trk > span { display: block; height: 100%; background: var(--seq-5); border-radius: 4px; }
.adj-meter-trk.over > span { background: var(--seq-7, var(--seq-5)); }
.adj-meter-n { font-size: var(--fs-xs); color: var(--ink-2); }

/* ---------- ECI affidavit ---------- */
.adj-aff {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--panel)); border-radius: var(--radius); padding: 14px 16px;
}
.adj-aff-k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 700; }
.adj-aff-big { font-size: var(--fs-md); color: var(--ink-2); }
.adj-aff-big b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 1.3rem + 1.4vw, 2.4rem); color: var(--ink); line-height: 1.05; font-weight: 700; font-stretch: 90%; }
.adj-aff-s { font-size: var(--fs-sm); color: var(--ink-2); }
.adj-aff-s.muted { color: var(--muted); font-size: var(--fs-xs); }
.adj-aff-t { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: none; background: var(--panel); }
.adj-aff-t table.tbl th[scope="row"] { position: static; background: transparent; text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); color: var(--ink); font-weight: 500; }

/* ---------- inclusion summary ---------- */
.adj-inc { display: flex; flex-direction: column; gap: 14px; }

/* ---------- table ---------- */
.adj-views button { white-space: nowrap; }
.adj-gapcell { color: var(--warn-ink); font-weight: 600; }
.adj-tbl table.tbl td:nth-child(2) a { white-space: nowrap; }

/* pages.css: methodology, sources and disclosures (src/js/views/pages.js). Classes are prefixed pg-;
   the shared about-* classes come from localbody.css. */
.pg-steps { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); max-width: 80ch; }
.pg-steps li::marker { color: var(--accent-ink); font-weight: 700; }
.pg-steps b { color: var(--ink); font-weight: 600; }
.pg-ids { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.pg-id { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pg-id-t { font-weight: 650; color: var(--ink); }
.pg-id-p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--ink-2); font-size: var(--fs-sm); }
.pg-id-x { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px 8px; min-width: 0; }
.pg-op { font-weight: 700; color: var(--muted); }
.pg-id-n { font-size: var(--fs-sm); color: var(--muted); }
.pg-credits { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.pg-credit { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.pg-credit b { color: var(--ink); }
.pg-credit-k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 700; }
.pg-first { margin-top: 0; }
.pg-purpose { margin: 4px 0 18px; padding: 14px 18px; border: 1px solid var(--accent); border-left-width: 5px; border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--ink); font-size: var(--fs-lg); font-weight: 650; line-height: 1.4; max-width: 80ch; }
.pg-src { color: var(--ink); }
.pg-repo { display: flex; flex-direction: column; gap: 2px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); background: var(--panel-2); max-width: 80ch; }
.pg-repo-k, .pg-contact-k { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 700; }
.pg-repo a { font-weight: 600; font-size: var(--fs-md); overflow-wrap: anywhere; }
.pg-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.pg-contact li { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }

/* site pages (tools/build.py, tools/prerender.py) */
.mast-title .mast-h1 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0;
  font-size: clamp(1.35rem, 1rem + 1.6vw, 2rem); font-weight: 700; font-stretch: 92%; color: var(--brand-ink); }
.pre { padding-block: 20px 48px; max-width: 80ch; color: var(--ink-2); overflow-wrap: anywhere; }
.pre > h1 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); font-weight: 700; font-stretch: 94%; color: var(--ink); margin: 14px 0 10px; }
.pre > h1 .bn { font-size: var(--fs-lg); color: var(--ink-2); font-weight: 500; }
.pre > h2 { font-size: var(--fs-lg); color: var(--ink); margin: 26px 0 8px; }
.pre > p { margin: 8px 0; } .pre > ul { margin: 8px 0; padding-left: 20px; } .pre > ul > li { margin: 2px 0; }
.pre a { color: var(--accent-ink); }
.page-head h1 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); font-weight: 700; font-stretch: 94%; }
