:root {
  --bg: #f5f3ee;
  --bg-alt: #ebe8e0;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #1a1d26;
  --muted: #5d6270;
  --line: #dcd8cd;
  --accent: #0d6b68;
  --accent-ink: #ffffff;
  --accent-soft: #d8eeec;
  --agree: #1d7a4c;
  --disagree: #b13a3a;
  --mixed: #9a6b00;
  --unknown: #8a8f99;
  --bar-bg: #e6e3db;
  --shadow: 0 1px 2px rgba(20, 20, 30, .06), 0 6px 20px rgba(20, 20, 30, .06);

  --b-convicted-bg: #fde3e1; --b-convicted: #9b1c1c;
  --b-indicted-bg: #feebd8; --b-indicted: #94470a;
  --b-investigation-bg: #fff3c2; --b-investigation: #6e5200;
  --b-closed-bg: #e7e9ee; --b-closed: #485063;
  --b-none-bg: #e2f2e9; --b-none: #1f6a43;

  --radius: 14px;
  --font: "Heebo", system-ui, "Segoe UI", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141a; --bg-alt: #181b22; --surface: #1d2029; --surface-2: #232733;
    --ink: #eceef3; --muted: #a2a8b6; --line: #2f3442;
    --accent: #3fb7b1; --accent-ink: #06201f; --accent-soft: #163a39;
    --agree: #4cc38a; --disagree: #f07b7b; --mixed: #e0b34a; --unknown: #8a90a0;
    --bar-bg: #2a2f3b; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
    --b-convicted-bg: #4a1f22; --b-convicted: #ffb4ad;
    --b-indicted-bg: #4a2d14; --b-indicted: #ffc48f;
    --b-investigation-bg: #433a12; --b-investigation: #f3d873;
    --b-closed-bg: #2d323e; --b-closed: #c1c7d4;
    --b-none-bg: #173a29; --b-none: #8fdcb2;
  }
}
:root[data-theme="dark"] {
  --bg: #12141a; --bg-alt: #181b22; --surface: #1d2029; --surface-2: #232733;
  --ink: #eceef3; --muted: #a2a8b6; --line: #2f3442;
  --accent: #3fb7b1; --accent-ink: #06201f; --accent-soft: #163a39;
  --agree: #4cc38a; --disagree: #f07b7b; --mixed: #e0b34a; --unknown: #8a90a0;
  --bar-bg: #2a2f3b; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  --b-convicted-bg: #4a1f22; --b-convicted: #ffb4ad;
  --b-indicted-bg: #4a2d14; --b-indicted: #ffc48f;
  --b-investigation-bg: #433a12; --b-investigation: #f3d873;
  --b-closed-bg: #2d323e; --b-closed: #c1c7d4;
  --b-none-bg: #173a29; --b-none: #8fdcb2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.fineprint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-note {
  display: grid; place-items: center; width: 30px; height: 36px; border-radius: 3px;
  background: #fff; color: #111; border: 1px solid #cfcabd; font-weight: 900; font-size: 18px;
  box-shadow: 1px 2px 0 rgba(0,0,0,.08);
}
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }

/* hero */
.hero { padding: 56px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 700; margin: 0 0 10px; font-size: 15px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 900; letter-spacing: -.5px; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 16px 0 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-small { padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.countdown {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); text-align: center;
}
.countdown .num { font-size: 56px; font-weight: 900; color: var(--accent); line-height: 1; }
.countdown .lbl { color: var(--muted); font-weight: 500; }

/* sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 28px; max-width: 780px; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 900; margin-bottom: 8px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

/* quiz */
.match-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.cat-title { font-size: 15px; font-weight: 800; color: var(--muted); margin: 26px 0 10px; letter-spacing: .3px; }
.cat-title:first-child { margin-top: 0; }
.topic {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; transition: border-color .15s;
}
.topic.answered { border-color: var(--accent); }
.topic-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.topic-head h4 { font-size: 18px; font-weight: 800; }
.topic-head .hint { color: var(--muted); font-size: 14px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices.choices-3 { grid-template-columns: repeat(3, 1fr); }
.choice {
  display: flex; align-items: flex-start; gap: 10px; text-align: right;
  padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2);
  cursor: pointer; font-size: 15px; font-weight: 500; line-height: 1.4; min-height: 56px;
}
.choice:hover { border-color: var(--accent); }
.choice .box {
  flex: 0 0 22px; height: 22px; border-radius: 6px; border: 2px solid var(--muted);
  display: grid; place-items: center; font-weight: 900; font-size: 14px; color: transparent; margin-top: 1px;
}
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.choice[aria-pressed="true"] .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.topic-foot { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.linkbtn {
  border: 0; background: none; padding: 4px 8px; border-radius: 6px; cursor: pointer;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.linkbtn:hover { background: var(--surface-2); color: var(--ink); }
.linkbtn[disabled] { opacity: .4; cursor: default; }
.topic-foot { align-items: center; justify-content: space-between; }
.weight { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.weight input[type="range"] { width: 150px; accent-color: var(--accent); cursor: pointer; }
.weight output {
  min-width: 28px; text-align: center; font-weight: 800; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-variant-numeric: tabular-nums;
}
.topic.answered .weight output { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.bd-row .wt { font-size: 12px; color: var(--muted); }
.who-panel { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.who-row { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start; padding: 6px 0; font-size: 14px; }
.who-row + .who-row { border-top: 1px solid var(--line); }
.who-row .who-name { font-weight: 700; }
.who-row .who-note { color: var(--muted); }

/* stance pill */
.stance { display: inline-block; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; }
.stance.s-agree { background: color-mix(in srgb, var(--agree) 16%, transparent); color: var(--agree); }
.stance.s-disagree { background: color-mix(in srgb, var(--disagree) 16%, transparent); color: var(--disagree); }
.stance.s-mixed { background: color-mix(in srgb, var(--mixed) 16%, transparent); color: var(--mixed); }
.stance.s-unknown { background: color-mix(in srgb, var(--unknown) 16%, transparent); color: var(--unknown); }
.stance.s-neutral { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }

/* mini ballot letters */
.mini {
  display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 6px;
  background: #fff; color: #111; border: 1px solid #cfcabd; border-radius: 3px;
  font-weight: 900; font-size: 17px; letter-spacing: 1px; box-shadow: 1px 1px 0 rgba(0,0,0,.08);
}

/* results */
.results {
  position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  max-height: calc(100vh - 92px); overflow-y: auto;
}

/* פס גלילה עדין: מסלול שקוף שמתרחק מהפינות המעוגלות, וידית דקה ומעוגלת */
.results::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.results::-webkit-scrollbar-button, .table-wrap::-webkit-scrollbar-button { display: none; }
.results::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track { background: transparent; }
.results::-webkit-scrollbar-track { margin: 16px 0; }
.table-wrap::-webkit-scrollbar-track { margin: 0 8px; }
.results::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--muted) 30%, transparent);
  border: 3px solid transparent; border-radius: 99px; background-clip: padding-box;
}
.results:hover::-webkit-scrollbar-thumb, .table-wrap:hover::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--muted) 50%, transparent);
}
.results::-webkit-scrollbar-thumb:active { background-color: var(--accent); }
@supports not selector(::-webkit-scrollbar) {
  .results, .table-wrap { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 40%, transparent) transparent; }
}
.results h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.progress { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.empty-state { text-align: center; padding: 18px 8px; color: var(--muted); }
.empty-state .ballot { margin: 0 auto 14px; opacity: .55; }
.ballot {
  width: 200px; aspect-ratio: 3 / 4; margin: 6px auto 12px; background: #fff; color: #111;
  border: 1px solid #d3cec1; border-radius: 3px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 16px 12px; text-align: center;
  box-shadow: 2px 3px 0 rgba(0,0,0,.06), 0 12px 30px rgba(0,0,0,.12);
  transform: rotate(-1.2deg);
}
.ballot-letters { font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: 2px; }
.ballot-name { font-size: 14px; font-weight: 700; margin-top: 14px; line-height: 1.35; }
.top-pick { text-align: center; }
.top-pick .label { font-size: 14px; color: var(--muted); }
.top-pick .score { font-size: 15px; font-weight: 700; }
.warn {
  font-size: 13px; padding: 8px 10px; border-radius: 8px; margin: 8px 0;
  background: var(--b-investigation-bg); color: var(--b-investigation);
}
.result-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-item { border-top: 1px solid var(--line); }
.rank-btn {
  width: 100%; display: grid; grid-template-columns: 20px 52px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 2px; border: 0; background: none; cursor: pointer; text-align: right;
}
.rank-num { color: var(--muted); font-size: 13px; font-weight: 700; }
.rank-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.rank-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.bar { height: 6px; background: var(--bar-bg); border-radius: 99px; margin-top: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.rank-pct { font-weight: 900; font-size: 17px; min-width: 46px; text-align: left; }
.breakdown { padding: 4px 0 12px 0; }
.bd-row { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 13.5px; padding: 6px 0; }
.bd-icon { font-weight: 900; text-align: center; }
.bd-icon.agree { color: var(--agree); }
.bd-icon.disagree { color: var(--disagree); }
.bd-icon.mixed { color: var(--mixed); }
.bd-icon.unknown { color: var(--unknown); }
.bd-row .t { font-weight: 700; }
.bd-row .n { color: var(--muted); }
.src { font-size: 12px; margin-inline-start: 4px; white-space: nowrap; }
.float-results {
  display: none; position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 15;
  background: var(--accent); color: var(--accent-ink); text-align: center; padding: 14px; border-radius: 12px;
  font-weight: 800; text-decoration: none; box-shadow: var(--shadow);
}

/* vote box */
.vote-box { margin-top: 28px; }
.vote-card {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.vote-card h3 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.vote-card p { margin: 0 0 14px; }
.vote-card .mini { height: 28px; min-width: 40px; font-size: 15px; vertical-align: middle; }
.vote-match { color: var(--muted); }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tray-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 6px; min-height: 82px; border: 1.5px solid var(--line); background: var(--surface-2);
  border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1.25; text-align: center;
}
.tray-item:hover { border-color: var(--accent); }
.tray-item[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.vote-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.vote-side .ballot { margin-bottom: 14px; }
.vote-sentence { font-size: 17px; }
.btn-vote { font-size: 20px; padding: 14px 40px; border-radius: 12px; width: 100%; max-width: 280px; margin-bottom: 10px; }
.btn-vote[disabled] { opacity: .45; cursor: not-allowed; }
.vote-card.voted { grid-template-columns: minmax(0, 1fr) auto; }

/* collapsible sections */
.fold-section { padding: 8px 0; }
#parties.fold-section { padding-top: 0; }
#method.fold-section { padding-bottom: 56px; }
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.fold-head {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px;
  cursor: pointer; list-style: none; border-radius: var(--radius);
}
.fold-head::-webkit-details-marker { display: none; }
.fold-head:hover { background: var(--surface-2); }
.fold-head:focus-visible, .cand-party-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fold-head h2 { font-size: clamp(21px, 3vw, 27px); font-weight: 900; margin: 0 0 4px; }
.fold-sub { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }
.fold-toggle {
  margin-inline-start: auto; flex: 0 0 auto; padding: 7px 14px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 800; white-space: nowrap;
}
.fold-toggle::before { content: "פתיחה ▾"; }
.fold[open] > .fold-head .fold-toggle::before { content: "סגירה ▴"; }
.cand-party .fold-toggle { padding: 4px 10px; font-size: 13px; margin-inline-start: 0; }
.cand-party .fold-toggle::before { content: "▾"; }
.cand-party[open] .fold-toggle::before { content: "▴"; }
.fold[open] > .fold-head { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.fold-body { padding: 22px; background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); }
.narrow-body { max-width: 820px; }

/* party grid */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.party-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.party-top { display: flex; gap: 14px; align-items: center; }
.party-top .mini { min-width: 60px; height: 44px; font-size: 21px; }
.party-top h3 { font-size: 20px; font-weight: 900; }
.party-top .leader { color: var(--muted); font-size: 14px; }
.party-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.party-card p { margin: 0; }
.notice.withdrawn { margin: 0 0 16px; font-size: 15px; background: var(--surface); border-inline-start-color: var(--b-indicted); }
.notice { font-size: 14px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border-inline-start: 3px solid var(--accent); }
.party-card ul { margin: 0; padding-inline-start: 20px; }
.party-card li { margin-bottom: 3px; font-size: 15px; }
.party-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.pos-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pos-table td { padding: 7px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.pos-table td:first-child { font-weight: 700; width: 34%; }
.pos-table .n { color: var(--muted); display: block; font-size: 13px; }

/* candidates */
.cand-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 99px;
  cursor: pointer; font-size: 14px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center;
}
.chip[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cand-filters { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cand-filters input[type="search"] {
  flex: 1 1 240px; max-width: 360px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit;
}
.legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 800; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.badge.convicted { background: var(--b-convicted-bg); color: var(--b-convicted); }
.badge.indicted { background: var(--b-indicted-bg); color: var(--b-indicted); }
.badge.investigation { background: var(--b-investigation-bg); color: var(--b-investigation); }
.badge.pending { background: var(--b-investigation-bg); color: var(--b-investigation); border: 1px dashed currentColor; }
.badge.closed { background: var(--b-closed-bg); color: var(--b-closed); }
.badge.none { background: var(--b-none-bg); color: var(--b-none); }
.cand-party { margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cand-party-head {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px;
  cursor: pointer; list-style: none; border-radius: 12px;
}
.cand-party-head::-webkit-details-marker { display: none; }
.cand-party-head:hover { background: var(--surface-2); }
.cand-party[open] > .cand-party-head { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.cand-party-head h3 { font-size: 19px; font-weight: 900; }
.cand-count { color: var(--muted); font-size: 14px; }
.cand-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.cand-rows { padding: 0 14px; }
.cand-rows .cand:last-child { border-bottom: 0; }
.cand-intro { margin: 0 0 16px; font-size: 15px; }
.cand-bulk { display: flex; gap: 4px; flex-wrap: wrap; }
.cand {
  display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cand-rank {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.cand-name { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cand-name b { font-size: 17px; }
.cand-name .age { color: var(--muted); font-size: 14px; }
.cand-bio { margin: 4px 0 0; color: var(--ink); font-size: 15px; }
.cand-notable { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.legal-box { margin-top: 8px; border-radius: 10px; padding: 10px 12px; font-size: 14.5px; }
.legal-box.convicted { background: var(--b-convicted-bg); }
.legal-box.indicted { background: var(--b-indicted-bg); }
.legal-box.investigation, .legal-box.pending { background: var(--b-investigation-bg); }
.legal-box.closed { background: var(--b-closed-bg); }
.legal-box p { margin: 0; color: var(--ink); }
.legal-box .srcs { margin-top: 6px; font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.no-results { color: var(--muted); padding: 24px 0; }

/* accordion */
.accordion details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px;
}
.accordion summary {
  cursor: pointer; padding: 16px 18px; font-weight: 800; font-size: 17px; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 22px; color: var(--muted); font-weight: 400; }
.accordion details[open] summary::after { content: "−"; }
.accordion .body { padding: 0 18px 16px; }
.accordion .body p { margin: 0 0 10px; }
.accordion .sides { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 15px; }

/* info */
.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.card ul { margin: 0; padding-inline-start: 20px; }
.card li { margin-bottom: 6px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: right; vertical-align: top; }
.data-table th { font-size: 13px; color: var(--muted); font-weight: 700; border-top: 0; white-space: nowrap; }
.data-table td.num { font-variant-numeric: tabular-nums; text-align: center; }
.data-table th.num { text-align: center; }

/* prose */
.prose h2 { font-size: 32px; font-weight: 900; margin-bottom: 14px; }
.prose h3 { font-size: 20px; font-weight: 800; margin: 24px 0 8px; }
.prose p { margin: 0 0 12px; font-size: 16.5px; }

.footer { padding: 28px 0 90px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .match-layout { grid-template-columns: 1fr; }
  .results { position: static; max-height: none; }
  .float-results:not([hidden]) { display: block; }
  .results-visible .float-results { display: none !important; }
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .vote-card, .vote-card.voted { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}
@media (max-width: 640px) {
  .topbar-inner { height: auto; flex-direction: column; align-items: stretch; gap: 0; padding-top: 8px; }
  .nav { padding-bottom: 6px; }
  .hero { padding: 32px 0 24px; }
  .section { padding: 40px 0; }
  .choices, .choices.choices-3 { grid-template-columns: 1fr; }
  .fold-head { padding: 16px; gap: 10px; }
  .fold-sub { font-size: 14px; }
  .fold-toggle { padding: 6px 10px; font-size: 13px; }
  .fold-body { padding: 14px; }
  .cand-stats { margin-inline-start: 0; width: 100%; }
  .party-grid { grid-template-columns: 1fr; }
  .ballot { width: 170px; }
  .ballot-letters { font-size: 54px; }
  html { scroll-padding-top: 100px; }
}
