/* THEME "wattle": white page, ironbark-brown ink, wattle-gold bands. Bricolage Grotesque (display) + Atkinson Hyperlegible.
   Light and dark. Rules: no party colour dominates (party colours are reserved for small party labels); no
   electoral-commission magenta/purple, no government navy. Chart series s1..s6 are a validated categorical palette.
   The ballot planner and the example ballots have their own fixed "paper" tokens in base.css so they look like ballots.
   art-* tokens colour the front-page illustration. */

/* ---------- Wattle (default) ---------- */
:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --ink: #2B2622; --muted: #6A6159; --line: #E4DCCD; --soft: #F6F1E6;
  --accent: #2B2622; --accent-ink: #FFFFFF; --accent-soft: #FBF0CC; --mark: #2B2622; --link-line: #E0A800;
  --hi: #B07D00; --bar: #CEC5B6; --ref: #8B8177;
  --ok: #2E6B4E; --warn: #8F5A0F; --bad: #A3362E;
  --s1: #2a78d6; --s2: #eda100; --s3: #1baf7a; --s4: #6250d6; --s5: #e87ba4; --s6: #008300;
  --flow-in: #2F7F78; --flow-out: #A8691C;
  --band: #F2C230; --band-ink: #2B2622; --band-muted: #5C4A1E; --tint-1: #F7D867; --tint-2: #CFE5E0; --tint-3: #F9D6CB; --tint-4: #D3E7F2;
  --art-ink: #2B2622; --art-map: #E3AC16; --art-shade: #8A6A1B; --art-step: #3B342E; --art-step2: #4A4139; --art-lamp: #FFF4C9; --art-paper: #FFFFFF; --art-box: #FFFDF6; --art-bell: #E7849F; --art-bell-tip: #FFFFFF; --art-leaf: #4D6B3C;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif; --display-stretch: 88%; --display-weight: 750;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif; --ui: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif; --ui-stretch: 100%;
  --mono: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --r: 10px; --r-card: 14px; --shadow: 0 1px 0 rgba(43,38,34,.06); --body-size: 17px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1C1916; --surface: #25211D; --ink: #F3ECDD; --muted: #B5AA9A; --line: #3A342D; --soft: #2C2722;
  --accent: #F2C230; --accent-ink: #1C1916; --accent-soft: #3A3018; --mark: #F2C230; --link-line: #C99A1A;
  --hi: #E8B83A; --bar: #5A5249; --ref: #9C9184;
  --ok: #6FB792; --warn: #E0A35A; --bad: #E58378;
  --s1: #3987e5; --s2: #c98500; --s3: #199e70; --s4: #9085e9; --s5: #d55181; --s6: #2f9a2f;
  --flow-in: #4BA89F; --flow-out: #D39A45;
  --band: #2A241B; --band-ink: #F3ECDD; --band-muted: #C9B98E; --tint-1: #4A3C12; --tint-2: #1F3D39; --tint-3: #4A2B24; --tint-4: #213A4A;
  --art-ink: #F2C230; --art-map: #3A3121; --art-shade: #5E4A1C; --art-step: #D9AB2A; --art-step2: #C79A22; --art-lamp: #FFF4C9; --art-paper: #F3ECDD; --art-box: #2C2722; --art-bell: #E58FA8; --art-bell-tip: #F3ECDD; --art-leaf: #8DAA74;
  --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #1C1916; --surface: #25211D; --ink: #F3ECDD; --muted: #B5AA9A; --line: #3A342D; --soft: #2C2722;
  --accent: #F2C230; --accent-ink: #1C1916; --accent-soft: #3A3018; --mark: #F2C230; --link-line: #C99A1A;
  --hi: #E8B83A; --bar: #5A5249; --ref: #9C9184;
  --ok: #6FB792; --warn: #E0A35A; --bad: #E58378;
  --s1: #3987e5; --s2: #c98500; --s3: #199e70; --s4: #9085e9; --s5: #d55181; --s6: #2f9a2f;
  --flow-in: #4BA89F; --flow-out: #D39A45;
  --band: #2A241B; --band-ink: #F3ECDD; --band-muted: #C9B98E; --tint-1: #4A3C12; --tint-2: #1F3D39; --tint-3: #4A2B24; --tint-4: #213A4A;
  --art-ink: #F2C230; --art-map: #3A3121; --art-shade: #5E4A1C; --art-step: #D9AB2A; --art-step2: #C79A22; --art-lamp: #FFF4C9; --art-paper: #F3ECDD; --art-box: #2C2722; --art-bell: #E58FA8; --art-bell-tip: #F3ECDD; --art-leaf: #8DAA74;
  --shadow: none; color-scheme: dark; }

/* Party colours: lighter variants in dark mode where the original would vanish. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pc { --c: var(--pcd, var(--muted)); } }
:root[data-theme="dark"] .pc { --c: var(--pcd, var(--muted)); }

/* BASE LAYOUT AND COMPONENTS. Uses only tokens from themes.css.
   Layout: sticky top bar; reading-width column (.wrap) for prose; full-width column (.wrap.wide) for comparisons.
   Comparison tables live in bounded scroll boxes so their header row and first column stay visible. */
:root { --topbar-h: 58px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-variant-numeric: tabular-nums; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: var(--body-size); line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
a { color: inherit; text-decoration-thickness: 2px; text-decoration-color: var(--link-line, currentColor); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.12rem; }
p { margin: 0; }
ul, ol { margin: 0; }
small { font-size: 0.82em; }
.eyebrow { font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.lede { font-size: 1.14rem; color: var(--muted); max-width: 64ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.prose { max-width: 68ch; display: grid; gap: 0.9em; }
.prose-p { max-width: 70ch; }
.more { font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent); }
.more:hover { background: var(--accent-soft); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1880px; margin: 0 auto; display: flex; align-items: center; gap: 18px; min-height: var(--topbar-h); padding-block: 6px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); font-size: 1.12rem; text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 34px; height: auto; flex: none; fill: var(--ink); }
.brand-mark.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--band); }
.brand-mark { filter: drop-shadow(2px 2px 0 var(--band)); }
nav#nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
nav#nav::-webkit-scrollbar { display: none; }
nav#nav a { font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 600; font-size: 0.94rem; text-decoration: none; padding: 8px 12px; border-radius: var(--r); white-space: nowrap; color: var(--muted); }
nav#nav a:hover { color: var(--ink); background: var(--soft); }
nav#nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.banner { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.88rem; }
.banner > p { max-width: 1880px; margin: 0 auto; padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- page frame ---------- */
main { padding-block: 28px 72px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap.wide { max-width: 1880px; }
.wrap .wrap { padding-left: 0; padding-right: 0; }
.view { display: grid; gap: 40px; }
.view > .wrap { display: grid; gap: 36px; align-content: start; }
.block { display: grid; gap: 16px; align-content: start; min-width: 0; }
.block-head { display: grid; gap: 4px; }
.hero { display: grid; gap: 14px; }
.view:not(.start) > .wrap > .hero, .view:not(.start) > .wrap > .issue-hero { background: var(--band); color: var(--band-ink); border-radius: var(--r-card); padding: clamp(20px, 3vw, 36px); position: relative; overflow: hidden; }
.view:not(.start) > .wrap > .hero .eyebrow, .view:not(.start) > .wrap > .hero .lede { color: var(--band-muted); }
.view:not(.start) > .wrap > .hero .lede { color: var(--band-ink); }
.issue-hero { gap: 10px; }
.countdown { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--mono); color: var(--muted); }
.countdown b { font-size: 2.1rem; font-weight: 600; color: var(--mark); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; align-items: start; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.panel ul { padding-left: 1.1em; display: grid; gap: 5px; }
/* start page: early-voting strip and "doesn't cover" box share the full content width */
.notices { display: grid; gap: 16px; }
.urgent { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-card); padding: 14px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 24px; }
.urgent-text { display: grid; gap: 4px; max-width: 95ch; }
.urgent-go { white-space: normal; text-align: center; max-width: 34ch; }
@media (max-width: 760px) { .urgent { grid-template-columns: 1fr; } .urgent-go { max-width: none; } }
.urgent b { font-family: var(--ui); font-stretch: var(--ui-stretch); }
.glossary { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.glossary dt { font-family: var(--ui); font-weight: 700; }
.glossary dd { margin: 0; }
.callout { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; max-width: 72ch; display: grid; gap: 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- sources ---------- */
.src { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 3px; }
.src a { font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.74rem; color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--muted); line-height: 1.35; }
.src a:hover { color: var(--ink); border-bottom-style: solid; }
.src-todo { font-family: var(--ui); font-size: 0.74rem; color: var(--warn); }

/* ---------- start: full-bleed band with the style's artwork ---------- */
.view.start { margin-top: -28px; }
.band { background: var(--band); color: var(--band-ink); overflow: hidden; }
.band-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px 48px; align-items: center; padding-block: 44px 40px; }
.band-text { display: grid; gap: 16px; align-content: center; }
.band h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); line-height: 1.02; max-width: 14ch; }
.band .eyebrow, .band .lede, .band .countdown { color: var(--band-muted); }
.band .lede { color: var(--band-ink); max-width: 46ch; font-size: 1.2rem; }
.band .countdown b { color: var(--band-ink); }
.band-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.band .btn { border-color: var(--band-ink); color: var(--band-ink); background: transparent; }
.band .btn.primary { background: var(--band-ink); color: var(--band); }
.hero-art { min-width: 0; }
.art { display: block; width: 100%; height: auto; max-height: 470px; }
@media (max-width: 860px) {
  .band-in { grid-template-columns: 1fr; padding-block: 28px 24px; }
  .hero-art { order: -1; } .art { max-height: 230px; } .art-dots { max-height: 150px; width: auto; display: block; margin: 0 auto 4px; }
}

/* ---------- start ---------- */
.path { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; max-width: 1100px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); text-decoration: none; }
.step:hover { border-color: var(--ink); }
.step .box { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); font-size: 1.25rem; color: var(--band-ink); background: var(--band); border-radius: 50%; }
.step > span { min-width: 0; }
.step .step-h { font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); font-size: 1.12rem; line-height: 1.15; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 0.95rem; }
.dates { list-style: none; padding: 0; border-top: 1px solid var(--line); max-width: 780px; }
.dates li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.dates li.past { color: var(--muted); }
.dates .d { font-family: var(--mono); font-size: 0.88rem; }

/* ---------- chips & buttons ---------- */
.chips-wrap { display: grid; gap: 8px; padding-top: 10px; }
.picker > summary { cursor: pointer; font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.9rem; color: var(--muted); padding: 4px 0; }
.picker > summary .picker-lab { font-weight: 700; color: var(--ink); }
.picker[open] > summary { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.pc { --c: var(--pc, var(--muted)); }
.pdot { display: inline-block; width: 0.72em; height: 0.72em; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 2.5px color-mix(in srgb, var(--c) 45%, var(--line)); margin-right: 0.45em; vertical-align: 0.02em; flex: none; }
th.pc { box-shadow: inset 0 5px 0 var(--c); }
.chip.pc:not(.off) { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.chip.off .pdot { opacity: 0.45; }
.pcard.pc { border-top: 5px solid var(--c); }
.chip input { accent-color: var(--ink); margin: 0; width: 15px; height: 15px; }
.chip.off { color: var(--muted); background: transparent; }
.btn { text-decoration: none; display: inline-flex; align-items: center; font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; font-size: 0.9rem; padding: 8px 14px; border-radius: var(--r); border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.ghost { border-color: var(--line); }
.btn.small { padding: 6px 11px; font-size: 0.84rem; }
.btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- comparison tables (sticky header + first column inside a bounded box) ---------- */
.tablebox { position: relative; overflow: auto; max-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top, 0px) - 24px); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.tablebox.short { max-height: min(78dvh, 820px); }
.tablebox table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.tablebox th, .tablebox td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--soft); }
.tablebox thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: inset 0 -2px 0 var(--ink); }
.ph-name { display: block; font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); font-size: 1rem; line-height: 1.2; }
.ph-head { display: block; font-family: var(--body); font-weight: 400; font-size: 0.9rem; line-height: 1.35; margin-top: 4px; color: var(--ink); }

.gt th, .gt td { padding: 11px 13px; }
.gt td { width: 200px; min-width: 180px; max-width: 260px; font-size: 0.92rem; line-height: 1.4; }
.gt tbody th, .gt thead th.corner { position: sticky; left: 0; z-index: 1; background: var(--surface); width: 184px; min-width: 184px; box-shadow: inset -2px 0 0 var(--line); }
.gt thead th.corner { z-index: 3; box-shadow: inset -2px 0 0 var(--line), inset 0 -2px 0 var(--ink); font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.gt tbody th a { display: flex; gap: 9px; align-items: flex-start; text-decoration: none; font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; font-size: 0.93rem; line-height: 1.25; }
.gt td a { text-decoration: none; display: block; }
.gt td a:hover { text-decoration: underline; }
.gt tbody tr:hover td, .gt tbody tr:hover th { background: var(--soft); }
.ic { width: 22px; height: 22px; flex: none; display: inline-grid; place-items: center; font-family: var(--ui); font-size: 0.72rem; font-weight: 700; border-radius: 50%; background: var(--tint-1); color: var(--ink); }
.istrip a:nth-child(4n+3) .ic, .gt tbody tr:nth-child(4n+2) .ic { background: var(--tint-2); }
.istrip a:nth-child(4n+4) .ic, .gt tbody tr:nth-child(4n+3) .ic { background: var(--tint-3); }
.istrip a:nth-child(4n+5) .ic, .gt tbody tr:nth-child(4n+4) .ic { background: var(--tint-4); }
td.none { color: var(--muted); font-style: italic; font-size: 0.86rem; }

.tablebox.tall { max-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top, 0px) - 16px); }
.tablebox table.pt { table-layout: fixed; width: max(100%, calc(var(--n, 4) * 196px)); }
.pt th, .pt td { padding: 13px 15px; }
.pt thead th { padding-bottom: 12px; }
.items { list-style: none; padding: 0; display: grid; gap: 15px; }
.items li { display: grid; gap: 4px; font-size: 0.95rem; line-height: 1.45; }
.tag { justify-self: start; font-family: var(--ui); font-stretch: 100%; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.budget { background: var(--soft); color: var(--ink); border-color: var(--soft); }
.tag.promise { border-color: var(--ink); color: var(--ink); }
.tag.costed { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.tag.opposes { border-style: dashed; color: var(--bad); border-color: var(--bad); }
.tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cost { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.keytags { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 0.85rem; color: var(--muted); align-items: center; }

/* issue strip */
.istrip { display: flex; flex-wrap: wrap; gap: 6px; }
.istrip a { display: inline-flex; gap: 8px; align-items: center; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 600; font-size: 0.88rem; background: var(--surface); }
.istrip a:hover { border-color: var(--ink); }
.istrip a[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.istrip .ic { width: 20px; height: 20px; font-size: 0.66rem; }
.istrip a[aria-current="true"] .ic { color: var(--ink); }

/* issue body */
.why { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; max-width: 980px; }
.why > div:first-child { display: grid; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.stat { border-top: 4px solid var(--tint-1) !important; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); display: grid; gap: 3px; align-content: start; }
.stat b { font-family: var(--mono); font-size: 1.32rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.88rem; color: var(--muted); line-height: 1.35; }
.figs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; max-width: 900px; } /* one chart per row: charts never sit side by side, so different scales are never read against each other */
.snap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 32px; align-items: start; background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; margin: 4px 0 30px; }
.snap h2 { margin: 2px 0 8px; }
.snap-head > p { margin: 0 0 10px; max-width: 62ch; }
.snap-list { display: flex; flex-wrap: wrap; gap: 6px; }
.snap-list span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-family: var(--ui); font-size: 0.84rem; }
.snap-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.glance-h { margin: 0 0 10px; }
@media (max-width: 860px) { .snap { grid-template-columns: 1fr; padding: 18px 16px; } }
.primer { display: grid; gap: 8px; max-width: 980px; }
.primer details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.primer summary { cursor: pointer; padding: 12px 16px; font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; font-size: 1rem; }
.primer details[open] summary { border-bottom: 1px solid var(--line); }
.primer-a { padding: 12px 16px 14px; display: grid; gap: 6px; max-width: 75ch; }
.levers { padding-left: 1.1em; display: grid; gap: 4px; }
.agree { border: 1px dashed var(--muted); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 5px; }
.ctx { background: var(--soft); border-radius: var(--r-card); padding: 16px 18px; display: grid; gap: 10px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.opt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 8px; align-content: start; }
.opt p { font-size: 0.95rem; }
.who { display: flex; flex-wrap: wrap; gap: 6px; }
.whochip { font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.76rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); }
.editor { border-left: 3px double var(--ink); padding-left: 14px; }
.np { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; }
.np a { text-decoration: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.np a:hover { border-color: var(--ink); }

/* ---------- figures ---------- */
.fig { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px 18px 16px; display: grid; gap: 12px; min-width: 0; align-content: start; }
.fig figcaption { display: grid; gap: 2px; }
.fig-title { font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); font-size: 1.12rem; line-height: 1.2; }
.fig-sub { font-size: 0.86rem; color: var(--muted); }
.fig-note { font-size: 0.86rem; color: var(--muted); }
.hbars { display: grid; gap: 9px; }
.hb, .sb { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: baseline; }
.hb-lab { font-size: 0.9rem; line-height: 1.3; min-width: 0; }
.hb-val { font-family: var(--mono); font-size: 0.86rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-track, .sb-track { grid-column: 1 / -1; position: relative; height: 10px; background: var(--soft); border-radius: 2px; display: flex; gap: 2px; }
.hb-fill { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.hb.hi .hb-fill { background: var(--hi); }
.hb.hi .hb-lab { font-weight: 700; }
.hb.ref .hb-fill { background: repeating-linear-gradient(135deg, var(--ref) 0 3px, transparent 3px 6px); border: 1px solid var(--ref); }
.hb-lab small { display: block; color: var(--muted); font-size: 0.8rem; }
.hb-share { font-style: normal; color: var(--muted); margin-left: 4px; }
.fig.tone-in .hb-fill { background: var(--flow-in, #1a8f6a); }
.fig.tone-out .hb-fill { background: var(--flow-out, #c4572e); }
.fig.tone-in .hb.gap .hb-fill { background: repeating-linear-gradient(135deg, var(--flow-in, #1a8f6a) 0 4px, transparent 4px 7px); border: 1.5px solid var(--flow-in, #1a8f6a); }
.flowsum { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px 16px; align-items: center; font-family: var(--ui); margin: 6px 0 14px; }
.flowsum b { font-family: var(--mono); font-size: 1.4rem; display: block; }
.flowsum .in b { color: var(--flow-in, #1a8f6a); } .flowsum .out b { color: var(--flow-out, #c4572e); }
.flowsum .eq { font-size: 1.6rem; color: var(--muted); }
.hb:hover .hb-fill, .sb:hover .sb-seg { filter: brightness(0.92); }
.tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); transform: translateX(-1px); }
.sb-seg { display: block; height: 100%; }
.sb-seg:last-child { border-radius: 0 4px 4px 0; }
.sb-parts { grid-column: 1 / -1; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.s1 { background: var(--s1); fill: var(--s1); } .s2 { background: var(--s2); fill: var(--s2); } .s3 { background: var(--s3); fill: var(--s3); }
.s4 { background: var(--s4); fill: var(--s4); } .s5 { background: var(--s5); fill: var(--s5); } .s6 { background: var(--s6); fill: var(--s6); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.84rem; color: var(--muted); }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; flex: none; }
.cols-wrap { width: 100%; }
svg.cols { width: 100%; height: auto; display: block; overflow: visible; }
svg.cols .grid { stroke: var(--soft); stroke-width: 1; }
svg.cols .axis { stroke: var(--line); stroke-width: 1; }
svg.cols .bar { fill: var(--bar); }
svg.cols .col.hi .bar { fill: var(--hi); }
svg.cols .hit { fill: transparent; }
svg.cols .col:hover .bar { filter: brightness(0.9); }
svg.cols text { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
svg.cols text.v { fill: var(--ink); font-weight: 600; }
svg.cols .col.ref .bar { fill: var(--ref); }
svg.cols text.y, svg.lines text.y { text-anchor: end; }
svg.lines { width: 100%; height: auto; display: block; overflow: visible; }
svg.lines .grid { stroke: var(--soft); stroke-width: 1; }
svg.lines text { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
svg.lines .ln path { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
svg.lines .ln circle { stroke: var(--surface); stroke-width: 1.5; }
svg.lines .ln.s1 path { stroke: var(--s1); } svg.lines text.e1 { fill: var(--ink); }
svg.lines .ln.s2 path { stroke: var(--s2); } svg.lines text.e2 { fill: var(--ink); }
svg.lines .ln.s3 path { stroke: var(--s3); } svg.lines text.e3 { fill: var(--ink); }
svg.lines .ln.s4 path { stroke: var(--s4); } svg.lines text.e4 { fill: var(--ink); }
svg.lines .ln.s5 path { stroke: var(--s5); } svg.lines text.e5 { fill: var(--ink); }
svg.lines .ln.s6 path { stroke: var(--s6); } svg.lines text.e6 { fill: var(--ink); }
svg.lines .ln.hi path { stroke-width: 3.5; }
svg.lines .ln.ref path { stroke-dasharray: 5 4; }
.donut-wrap { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 18px; align-items: center; }
svg.donut { width: 100%; height: auto; max-width: 220px; }
svg.donut .slice { stroke: var(--surface); stroke-width: 2; }
svg.donut .slice:hover { filter: brightness(0.92); }
.d-total { font-family: var(--mono); font-size: 19px; font-weight: 600; fill: var(--ink); }
.d-cap { font-family: var(--ui); font-size: 11px; fill: var(--muted); }
.legend-list { list-style: none; padding: 0; display: grid; gap: 7px; }
.legend-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 2.6rem; gap: 2px 8px; align-items: baseline; font-size: 0.9rem; line-height: 1.3; }
.legend-list .sw { margin: 0; align-self: center; }
.legend-list small { display: block; color: var(--muted); }
.legend-list .lv, .legend-list .lp { font-family: var(--mono); font-size: 0.84rem; text-align: right; font-variant-numeric: tabular-nums; }
.legend-list .lp { color: var(--muted); }
.timeline { list-style: none; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: 12px; padding: 8px 0 10px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--hi); }
.tl-date { font-family: var(--mono); font-size: 0.84rem; color: var(--muted); padding-top: 2px; }
.tl-body { display: grid; gap: 2px; font-size: 0.94rem; }
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dtable { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.dtable th, .dtable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable thead th { font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.dtable tbody th { font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; }
.dtable.cmp td { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtable.cmp { background: var(--surface); }

/* ---------- money: levels ---------- */
.levels { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 14px; align-items: stretch; }
.level { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 10px; align-content: start; color: var(--muted); }
.level h3 { color: var(--ink); }
.level ul { padding-left: 1.1em; display: grid; gap: 5px; font-size: 0.94rem; }
.level.current { border: 2px solid var(--ink); color: var(--ink); background: var(--surface); }
.level.current h3 { font-size: 1.3rem; }
.level.current::after { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--accent); border-radius: var(--r-card) var(--r-card) 0 0; }
.badge { justify-self: start; font-family: var(--ui); font-stretch: 100%; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--band); color: var(--band-ink); margin-top: 4px; }

/* ---------- parties ---------- */
.plist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 10px; align-content: start; }
.pcard .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pcard h3 { font-size: 1.18rem; }
.seats { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.depth { font-family: var(--ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.depth.full { color: var(--ok); } .depth.partial { color: var(--warn); } .depth.todo { color: var(--bad); }

/* ---------- ballot planner ---------- */
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; flex-wrap: wrap; }
.seg button { font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; font-size: 0.9rem; padding: 8px 13px; background: var(--surface); color: var(--ink); border: 0; cursor: pointer; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg-sub { font-weight: 400; opacity: 0.8; }
.unitsel { font-family: var(--ui); font-weight: 600; font-size: 0.9rem; display: inline-flex; gap: 8px; align-items: center; }
.unitsel select { font: inherit; padding: 6px 8px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.builder { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.paper, .card-plan { --surface: #FFFFFF; --ink: #141414; --muted: #555555; --line: #B9B9B9; --soft: #F0F0F0; --mark: #141414; --accent: #141414; --accent-soft: #EFEFEF;
  --ui: Arial, "Helvetica Neue", Helvetica, sans-serif; --ui-stretch: 100%; --display: Arial, "Helvetica Neue", Helvetica, sans-serif; --display-stretch: 100%; --display-weight: 700; --mono: Arial, Helvetica, sans-serif; --body: Arial, Helvetica, sans-serif; color-scheme: light; }
.paper { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 2px; padding: 18px 18px 22px; box-shadow: 0 10px 28px -20px rgba(0,0,0,.35); display: grid; gap: 12px; min-width: 0; }
.ptitle { text-align: center; display: grid; gap: 2px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.ptitle b { font-family: var(--display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); font-size: 1.08rem; letter-spacing: 0.03em; text-transform: uppercase; }
.ptitle span, .instr { font-family: var(--ui); font-stretch: var(--ui-stretch); font-size: 0.84rem; text-align: center; }
.cands { display: grid; gap: 6px; }
.cand { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; padding: 4px; cursor: pointer; color: inherit; border-radius: 3px; font: inherit; }
.cand:hover:not(:disabled) { background: var(--soft); }
.nbox { width: 40px; height: 40px; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--mono); font-size: 1.25rem; font-weight: 600; color: var(--mark); background: var(--surface); }
.cand.on .nbox, .atlbox.on .nbox { background: var(--accent-soft); }
.cand-t { display: grid; gap: 1px; }
.cand .nm { font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 800; font-size: 0.96rem; text-transform: uppercase; line-height: 1.15; }
.cand .cpt { font-family: var(--ui); font-size: 0.82rem; line-height: 1.2; color: var(--muted); }
.atl { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.atlbox { display: grid; justify-items: center; gap: 5px; text-align: center; background: transparent; border: 0; cursor: pointer; color: inherit; padding: 6px 4px; border-radius: 3px; font: inherit; }
.atlbox:hover:not(:disabled) { background: var(--soft); }
.atlbox .glabel { font-family: var(--mono); font-size: 0.74rem; }
.atlbox .nbox { width: 44px; height: 44px; }
.atlbox .gp { font-family: var(--ui); font-stretch: var(--ui-stretch); font-weight: 700; font-size: 0.76rem; text-transform: uppercase; line-height: 1.15; }
.theline { height: 4px; background: var(--ink); margin-block: 2px; }
.atl.off, .btlwrap.off { opacity: 0.38; }
.atl.off button, .btlwrap.off button { cursor: default; }
.btlwrap { overflow-x: auto; }
.btl { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; }
.gcol { display: grid; gap: 3px; align-content: start; }
.ghead { font-family: var(--mono); font-size: 0.72rem; text-align: center; border-bottom: 1px solid var(--ink); padding-bottom: 4px; min-height: 2.8em; display: grid; align-content: end; }
.cand.small { grid-template-columns: 34px 1fr; gap: 8px; }
.cand.small .nbox { width: 30px; height: 30px; font-size: 1rem; }
.cand.small .nm { font-size: 0.8rem; }
.side { display: grid; gap: 14px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--topbar-h) + 16px); }
.side-h { font-size: 1.05rem; }
.status { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 0.94rem; display: grid; gap: 3px; }
.status.ok { border-color: var(--ok); } .status.ok b { color: var(--ok); }
.status.no { border-color: var(--warn); } .status.no b { color: var(--warn); }
ol.order { padding: 0; list-style: none; display: grid; gap: 4px; }
ol.order li { display: grid; grid-template-columns: 2rem 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 0.92rem; }
ol.order .n { font-family: var(--mono); font-weight: 600; color: var(--mark); }
ol.order .who { min-width: 0; line-height: 1.25; }
ol.order .who small { display: block; color: var(--muted); }
.mv { display: flex; gap: 3px; }
.mv button { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 4px; cursor: pointer; font-family: var(--mono); }
.mv button:hover:not(:disabled) { border-color: var(--ink); }
.mv button:disabled { opacity: 0.3; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.copied { font-size: 0.86rem; color: var(--ok); }
textarea.out { width: 100%; min-height: 9rem; font-family: var(--mono); font-size: 0.82rem; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: var(--surface); color: var(--ink); }
.card-plan { color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); padding: 18px; display: grid; gap: 14px; }
.card-head { display: grid; gap: 4px; }
.card-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card-col { display: grid; gap: 8px; align-content: start; }
.card-mode { font-family: var(--ui); font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { font-family: var(--ui); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.pill.ok { color: var(--ok); } .pill.no { color: var(--warn); }
.card-list { list-style: none; padding: 0; display: grid; gap: 4px; }
.card-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; font-family: var(--ui); font-size: 0.92rem; line-height: 1.2; }
.card-list li small { color: var(--muted); }
.card-list li.blank { color: var(--muted); }
.cbox { width: 30px; height: 30px; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--mono); font-weight: 600; color: var(--mark); }

/* ---------- method & footer ---------- */
.todo-list { display: grid; gap: 6px; padding-left: 1.2em; }
.byline { font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
footer.site { border-top: 1px solid var(--line); }
footer.site > div { max-width: 1880px; margin: 0 auto; padding-block: 22px 76px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); font-size: 0.86rem; color: var(--muted); display: grid; gap: 6px; }

/* preview style switcher */
.styles { position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; gap: 4px; align-items: center; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 22px -10px rgba(0,0,0,.4); font-family: var(--ui); font-size: 0.78rem; max-width: calc(100vw - 24px); overflow-x: auto; }
.styles .sw-lab { padding: 0 6px 0 8px; color: var(--muted); white-space: nowrap; font-weight: 600; }
.styles button { font: inherit; font-weight: 700; border: 0; background: transparent; color: var(--ink); padding: 6px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.styles button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .why { grid-template-columns: minmax(0, 1fr); }
  .levels { grid-template-columns: minmax(0, 1fr); }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
}
@media (max-width: 720px) {
  :root { --topbar-h: 100px; }
  .topbar-in { flex-wrap: wrap; gap: 4px 12px; padding-block: 8px 4px; }
  nav#nav { flex-basis: 100%; margin-inline: -8px; }
  nav#nav a { padding: 8px 10px; }
  .dates li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .donut-wrap .legend-list { width: 100%; }
  .gt tbody th, .gt thead th.corner { width: 118px; min-width: 118px; }
  .gt tbody th a { font-size: 0.86rem; }
  .gt tbody th .ic { display: none; }
  .gt td { width: 190px; min-width: 180px; font-size: 0.88rem; }
  .gt th, .gt td { padding: 10px 10px; }
  .tablebox table.pt { width: calc(var(--n, 4) * min(80vw, 300px)); }
  .istrip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 2px 4px 6px; }
  .istrip a { white-space: nowrap; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .glossary { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .glossary dd { margin-bottom: 8px; }
  .styles .sw-lab { display: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .view { animation: rise 0.22s ease-out; }
  @keyframes rise { from { transform: translateY(4px); } to { transform: none; } }
}
@media print {
  .topbar, .banner, footer.site, .styles, .toolbar, .chips, .istrip { display: none !important; }
  .tablebox { max-height: none; overflow: visible; }
  .noprint { display: none !important; }
  body.print-plan * { visibility: hidden; }
  body.print-plan .card-plan, body.print-plan .card-plan * { visibility: visible; }
  body.print-plan .card-plan { position: absolute; left: 0; top: 0; width: 100%; font-size: 14pt; }
}
.stats .stat:nth-child(4n+2) { border-top-color: var(--tint-2) !important; }
.stats .stat:nth-child(4n+3) { border-top-color: var(--tint-3) !important; }
.stats .stat:nth-child(4n+4) { border-top-color: var(--tint-4) !important; }
.profile summary { cursor: pointer; font-family: var(--ui); font-weight: 700; font-size: 0.92rem; }
.profile ul { list-style: none; padding: 8px 0 0; display: grid; gap: 6px; }
.profile a { display: grid; grid-template-columns: auto 1fr; gap: 8px; text-decoration: none; font-size: 0.92rem; line-height: 1.35; }
.profile a b { display: block; font-family: var(--ui); font-size: 0.82rem; color: var(--muted); }
.profile a:hover span:last-child { text-decoration: underline; }

/* ---------- issue size and rank ---------- */
.rank { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--band); color: var(--band-ink); font-family: var(--ui); font-weight: 700; font-size: 0.74rem; margin-right: 7px; flex: none; }
.gt tbody th a { display: flex; align-items: flex-start; gap: 0; }
.gt-issue { display: grid; }
.gt-issue small { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.issue-size { font-family: var(--ui); font-size: 0.98rem; }
.issue-size a { margin-left: 4px; }
.sizet { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.sizet th, .sizet td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sizet thead th { font-family: var(--ui); font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.sizet .rk { font-family: var(--display); font-weight: 750; font-size: 1.1rem; width: 2.2em; }
.sizet tbody th { font-family: var(--ui); font-weight: 700; white-space: nowrap; }
.sizet .sz { min-width: 220px; width: 34%; }
.szbar { display: block; height: 10px; background: var(--soft); border-radius: 2px; margin: 5px 0 4px; }
.szfill { display: block; height: 100%; background: var(--ink); border-radius: 0 3px 3px 0; }
.szfill.raise { background: repeating-linear-gradient(135deg, var(--ink) 0 3px, transparent 3px 6px); }
.szt { font-size: 0.84rem; color: var(--muted); }
.szn { color: var(--muted); font-size: 0.86rem; max-width: 52ch; }
.snap { grid-template-columns: 1fr; }
.snap .snap-head > p { max-width: 80ch; }

/* ---------- not the state's call ---------- */
.notstate ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.notstate li { background: var(--surface); border: 1px dashed var(--muted); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.notstate li b { font-family: var(--ui); }
.notstate .who { font-family: var(--ui); font-size: 0.82rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); justify-self: start; padding: 1px 9px; border-radius: 999px; }
.notstate li p { font-size: 0.93rem; }

/* ---------- your marks ---------- */
.marks-intro { background: var(--accent-soft); border-radius: var(--r-card); padding: 10px 14px; font-size: 0.93rem; max-width: 980px; }
.mark { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.mk { font-family: var(--ui); font-size: 0.78rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.mk:hover { border-color: var(--ink); color: var(--ink); }
.mk.mk-yes[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.mk.mk-meh[aria-pressed="true"] { background: var(--muted); border-color: var(--muted); color: var(--bg); }
.mk.mk-no[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: var(--bg); }
.mkb { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; font-size: 0.75rem; font-weight: 700; color: var(--bg); vertical-align: middle; }
.mkb.mk-yes { background: var(--ok); } .mkb.mk-meh { background: var(--muted); } .mkb.mk-no { background: var(--bad); }
.msum-t td { text-align: center; font-weight: 700; font-size: 1.05rem; width: auto; min-width: 110px; }
.msum-t td.mk-yes { color: var(--ok); } .msum-t td.mk-no { color: var(--bad); } .msum-t td.mk-meh { color: var(--muted); }
.msum-t tr.major th { background: var(--accent-soft); }
.msum-t tr.tot th, .msum-t tr.tot td { border-top: 2px solid var(--ink); font-size: 0.9rem; }
.tl .mk-yes { color: var(--ok); } .tl .mk-no { color: var(--bad); } .tl .mk-meh { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- phone note: only on narrow screens ---------- */
.phone-note { display: none; font-family: var(--ui); font-size: 0.86rem; color: var(--muted); }
@media (max-width: 720px) { .phone-note { display: block; } }
.device-note { font-size: 0.9rem; color: var(--band-muted); }

/* ---------- report form ---------- */
.report { max-width: 720px; }
.report label { display: grid; gap: 4px; font-family: var(--ui); font-weight: 700; font-size: 0.95rem; }
.report input, .report textarea { font: inherit; font-weight: 400; font-family: var(--body); padding: 9px 11px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); }
.report input:focus, .report textarea:focus { border-color: var(--ink); outline: none; }
.report .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.report button[disabled] { opacity: 0.6; cursor: default; }
.corrections { display: grid; gap: 8px; padding-left: 1.1em; }

/* ---------- annotated example ballots ---------- */
.ex { margin: 0; display: grid; gap: 10px; }
.ex h3 { font-size: 1.15rem; }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ex-paper .cand, .ex-paper .atlbox { cursor: default; position: relative; }
.ex-paper .cand:hover, .ex-paper .atlbox:hover { background: transparent; }
.ex-paper .nbox { font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; font-size: 1.4rem; color: #1F3F8F; }
.pin { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #C0392B; color: #fff; font-family: var(--ui); font-weight: 700; font-size: 0.78rem; flex: none; margin: 0 6px; vertical-align: middle; font-style: normal; }
.ex-paper .cand .pin { position: absolute; left: 34px; top: -4px; margin: 0; }
.ex-paper .atlbox .pin { position: absolute; right: 8px; top: 18px; margin: 0; }
.pins { list-style: none; padding: 0; display: grid; gap: 12px; }
.pins li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.pins .pin { margin: 2px 0 0; }
@media (max-width: 860px) { .ex-grid { grid-template-columns: 1fr; } }
.ex-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
@media (min-width: 861px) {
  .ex-paper .atl { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ex-paper .btl { grid-auto-columns: minmax(0, 1fr); }
  .ex-paper .cand.small { grid-template-columns: 26px 1fr; gap: 6px; }
  .ex-paper .cand.small .nbox { width: 26px; height: 26px; font-size: 1rem; }
  .ex-paper .cand.small .nm { font-size: 0.72rem; }
  .ex-paper .cand.small .cpt { display: none; }
  .ex-paper .cand.small .pin { left: 16px; }
}
.ex-paper .cand.small .pin { left: -9px; top: -9px; }
.sowhat { background: var(--accent-soft); border-radius: var(--r-card); padding: 16px 20px; display: grid; gap: 8px; max-width: 980px; }
.sowhat h3 { font-size: 1.08rem; }
.sowhat ul { padding-left: 1.1em; display: grid; gap: 6px; }
.ruler { max-width: 640px; }
.ruler th { font-family: var(--display); font-size: 1.2rem; }
.msum .tablebox { max-height: none; }
.msum-t tbody th { min-width: 250px; }
.msum-t td { font-size: 1.35rem; vertical-align: middle; padding-top: 6px; padding-bottom: 6px; }
.msum-t .gt-issue small { display: block; }
.msum-t tr.tot td { font-size: 0.95rem; }

/* ---------- what it could mean for you ---------- */
.fy { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.fy-i { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--band); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.fy-i h3 { font-size: 1rem; }
.fy-i p { font-size: 0.95rem; }

/* dot-map hero art: tonal dots, the capital ring is the only full-strength mark */
.art-dots .a-dots { fill: var(--art-ink); opacity: 0.55; }
.art-dots .a-cap { fill: none; stroke: var(--art-ink); stroke-width: 4; }
.art-dots .a-capdot { fill: var(--art-ink); }
.art-dots .a-caplab { fill: var(--art-ink); fill-opacity: 0.85; font-family: var(--ui); font-weight: 600; font-size: 18px; letter-spacing: 0.1em; stroke: var(--band); stroke-width: 9px; stroke-linejoin: round; paint-order: stroke; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .art-dots .a-dots { opacity: 0.6; } }
:root[data-theme="dark"] .art-dots .a-dots { opacity: 0.6; }
@media (max-width: 640px) { .hero-art:has(.art-dots) { display: none; } }

.olist { display: grid; gap: 10px; }
.oitem { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 4px; }
.oitem h3 { font-size: 1rem; }

/* address finder */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; display: grid; gap: 8px; margin-block: 10px; max-width: 760px; }
.finder-row { display: flex; flex-wrap: wrap; gap: 8px; }
.finder-row input { flex: 1 1 260px; min-width: 0; font: inherit; padding: 9px 11px; border: 1px solid var(--line-strong, var(--line)); border-radius: 8px; background: var(--bg); color: var(--ink); }
.finder-out p { margin: 0; }
.finder-ok { border-left: 4px solid var(--band); padding-left: 10px; }
.finder-bad { border-left: 4px solid var(--warn, #b5462b); padding-left: 10px; }
.finder-picks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.finder-picks button { text-align: left; font: inherit; font-size: 0.92rem; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--ink); width: 100%; }

.limits-list { margin: 6px 0 8px; padding-left: 1.2em; display: grid; gap: 8px 40px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .limits-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .limits-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.callout.limits { max-width: none; }
/* front-page caveat styled as a warning */
.callout.limits { border: 1px solid var(--bad); border-left: 6px solid var(--bad); border-radius: var(--r-card); padding: 14px 18px; background: var(--surface); background: color-mix(in srgb, var(--bad) 7%, var(--bg)); }
.callout.limits .eyebrow { color: var(--bad); font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; }
.callout.limits .eyebrow::before { content: "⚠ "; }
