:root {
  color-scheme: light;
  --page: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f7f7fa;
  --ink: #0f1222;
  --ink-2: #4f5368;
  --muted: #868a9c;
  --line: #e4e5ec;
  --line-2: #d3d5df;
  --brand-1: #2a2fb5;
  --brand-2: #4b3fdb;
  --brand-3: #1fb6cc;
  --s26: #2a78d6;
  --s22: #eb6834;
  --s21: #1baf7a;
  --nat: #898781;
  --up: #0a7a3a;
  --down: #c23434;
  --bar-bg: #eceef4;
  --shadow: 0 1px 2px rgba(15, 18, 34, .05), 0 6px 24px rgba(15, 18, 34, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0e0f15;
    --surface: #181a22;
    --surface-2: #1f212b;
    --ink: #f0f0f4;
    --ink-2: #c0c2cf;
    --muted: #8b8e9e;
    --line: #2a2c37;
    --line-2: #3a3d4a;
    --s26: #3987e5;
    --s22: #d95926;
    --s21: #199e70;
    --nat: #9a9890;
    --up: #2fbf6a;
    --down: #ff7a7a;
    --bar-bg: #2a2c37;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0e0f15; --surface: #181a22; --surface-2: #1f212b;
  --ink: #f0f0f4; --ink-2: #c0c2cf; --muted: #8b8e9e; --line: #2a2c37; --line-2: #3a3d4a;
  --s26: #3987e5; --s22: #d95926; --s21: #199e70; --nat: #9a9890;
  --up: #2fbf6a; --down: #ff7a7a; --bar-bg: #2a2c37;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.55 Heebo, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 16px; }
h1, h2 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
.hint { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }

/* header */
.hero {
  background: linear-gradient(120deg, var(--brand-1) 0%, var(--brand-2) 45%, var(--brand-3) 100%);
  color: #fff; padding: 34px 0 78px;
}
.hero-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 500; opacity: .85; letter-spacing: .02em; }
.hero h1 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; line-height: 1.15; }
.sub { margin: 8px 0 0; opacity: .9; max-width: 560px; }
.live {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  font-size: 13px; font-weight: 500; backdrop-filter: blur(4px);
}
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #7dffb0; box-shadow: 0 0 0 0 rgba(125, 255, 176, .7); animation: pulse 2s infinite; }
.live.stale .dot { background: #ffd36b; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(125, 255, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(125, 255, 176, 0); } }

main { margin-top: -54px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi .lbl { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.kpi .val { font-size: 30px; font-weight: 800; line-height: 1.2; margin-top: 4px; }
.kpi .val small { font-size: 15px; font-weight: 500; color: var(--muted); }
.kpi .foot-n { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.kpi.main { background: linear-gradient(160deg, var(--surface) 55%, color-mix(in srgb, var(--s26) 9%, var(--surface))); }
.up { color: var(--up); }
.down { color: var(--down); }

/* cards */
.card { background: var(--surface); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: none !important; border-top: 2px dashed; height: 0; }
.chart-box { position: relative; height: 320px; }
.table-view { margin-top: 10px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--muted); }

/* toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.search:focus-within { border-color: var(--s26); }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; background: none; outline: none; color: var(--ink); font: inherit; padding: 9px 0; width: 100%; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th {
  text-align: right; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 8px 10px;
  border-bottom: 1px solid var(--line-2); cursor: pointer; user-select: none; white-space: nowrap; position: sticky; top: 0; background: var(--surface);
}
.grid th.num { text-align: left; }
.grid th.sorted { color: var(--ink); }
.grid th.sorted::after { content: " ▾"; font-size: 10px; }
.grid th.sorted.asc::after { content: " ▴"; }
.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tbody tr { cursor: default; }
#cityTable tbody tr { cursor: pointer; }
.grid tbody tr:hover td { background: var(--surface-2); }
.t-name { font-weight: 500; }
.grid td.t-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid td .sec { color: var(--muted); font-size: 12px; font-weight: 400; }
/* distance from the next seat / from losing one: two small stacked lines */
.grid td.mg { font-size: 12px; line-height: 1.35; white-space: nowrap; }
.grid td.mg > span { display: block; }
.grid td.mg .pair { color: var(--muted); }
/* under the count table: who is closest to gaining / losing a seat */
.edge { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; font-size: 13.5px; }
.edge .why, .edge .wide { grid-column: 1 / -1; }
.edge .why { margin: 0; color: var(--ink-2); }
.edge h3 { font-size: 14.5px; font-weight: 700; margin: 6px 0; }
.edge ul { margin: 0; padding-inline-start: 18px; }
.edge li { margin-bottom: 6px; }
@media (max-width: 760px) { .edge { grid-template-columns: 1fr; } }
.empty { text-align: center; color: var(--muted); padding: 26px 0 !important; }

/* bullet bar: fill = now, ticks = 2022 / 2021 final */
.bullet { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bullet b { font-weight: 700; min-width: 44px; text-align: left; }
.bar { position: relative; width: 110px; height: 8px; border-radius: 4px; background: var(--bar-bg); flex: none; direction: ltr; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--s26); }
.bar .tick { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; box-shadow: 0 0 0 1px var(--surface); }
.bar .tick.t22 { background: var(--s22); }
.bar .tick.t21 { background: var(--s21); }
.reach { font-weight: 700; }
.chip { display: inline-block; direction: ltr; unicode-bidi: isolate; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.chip.up { background: color-mix(in srgb, var(--up) 13%, transparent); }
.chip.down { background: color-mix(in srgb, var(--down) 13%, transparent); }
.more { display: block; margin: 14px auto 2px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 500; padding: 8px 22px; border-radius: 10px; cursor: pointer; }
.more:hover { border-color: var(--s26); }

/* city view */
.back { background: var(--surface); border: 0; box-shadow: var(--shadow); color: var(--ink); font: inherit; font-weight: 500; padding: 8px 16px; border-radius: 10px; cursor: pointer; margin-bottom: 14px; }
.city-head { margin: 4px 2px 14px; }
.city-head h2 { font-size: 28px; font-weight: 800; }
.kalpi-card summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; }
.kalpi-card summary::-webkit-details-marker { display: none; }
.kalpi-card summary h2::before { content: "◂ "; color: var(--muted); font-size: 14px; }
.kalpi-card[open] summary h2::before { content: "▾ "; }
.kalpi-card[open] summary { margin-bottom: 12px; }

.foot { font-size: 13px; color: var(--ink-2); padding: 8px 4px 40px; max-width: 860px; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-m { display: none; }
}
@media (max-width: 600px) {
  .hide-s { display: none; }
  .hero { padding: 24px 0 70px; }
  .kpi .val { font-size: 24px; }
  .card { padding: 14px 14px; border-radius: 14px; }
  .chart-box { height: 260px; }
  .bar { width: 56px; }
  .grid td, .grid th { padding: 8px 6px; }
  .grid td.t-name { max-width: 130px; }
}

/* right vs left (2022 groups) */
:root {
  --g-right: #1c5cab; --g-rlean: #6da7ec; --g-llean: #f09a8f; --g-left: #d43d3c;
  --g-haredi: #3b3a37; --g-arab: #008300;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --g-right: #3987e5; --g-rlean: #86b6ef; --g-llean: #f0a3a2; --g-left: #e66767; --g-haredi: #c3c2b7; --g-arab: #1baf7a; }
}
:root[data-theme="dark"] { --g-right: #3987e5; --g-rlean: #86b6ef; --g-llean: #f0a3a2; --g-left: #e66767; --g-haredi: #c3c2b7; --g-arab: #1baf7a; }

.insight { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14.5px; }
.insight b { font-weight: 700; }
.bloc-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 18px; }
.bloc-charts h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }
.bloc-charts .legend { margin-top: 8px; }
.chart-box.sm { height: 280px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tag i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 12px; }
.chips button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; padding: 4px 11px; border-radius: 999px; cursor: pointer; }
.chips button i { width: 8px; height: 8px; border-radius: 50%; }
.chips button.on { border-color: var(--ink-2); color: var(--ink); font-weight: 700; background: var(--surface-2); }
#blocTable td.t-name { max-width: none; }
@media (max-width: 900px) { .bloc-charts { grid-template-columns: 1fr; } }
#blocTable tr.sum td { background: var(--surface-2); }
#blocTable tr.sum + tr:not(.sum) td, #blocTable tbody tr:not(.sum) + tr.sum td { border-top: 1px solid var(--line-2); }

/* seat model */
.seat-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.seat-head .blk { border-radius: 12px; padding: 12px 14px; background: var(--surface-2); border-top: 4px solid var(--c); }
.seat-head .blk .lbl { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.seat-head .blk .val { font-size: 34px; font-weight: 800; line-height: 1.15; }
.seat-head .blk .sub2 { font-size: 12.5px; color: var(--muted); }
.seatbar { position: relative; display: flex; gap: 2px; height: 22px; margin: 4px 0 26px; direction: rtl; }
.seatbar span { flex: 1; border-radius: 3px; }
.seatbar .mid { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); right: calc(60 / 120 * 100%); }
.seatbar .mid::after { content: "61"; position: absolute; top: 100%; transform: translateX(50%); right: 0; font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.caveat { margin-top: 14px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; border: 1px dashed var(--line-2); }
.caveat b { color: var(--ink); }
#modelTable tr.out td { color: var(--muted); }
@media (max-width: 600px) { .seat-head .blk .val { font-size: 26px; } .seat-head { gap: 8px; } .seat-head .blk { padding: 10px; } }
.seat-head.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .seat-head.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#fcTable tr.out td { color: var(--muted); }
#fcTable td.origin { font-size: 12.5px; color: var(--ink-2); }
.tr-table { margin-top: 10px; }
.tr-table summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.tr-table table { margin-top: 8px; background: var(--surface); border-radius: 8px; }
/* the count */
.progress { margin: 0 0 16px; }
.progress .pbar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress .pbar span { display: block; height: 100%; background: var(--s26); border-radius: 99px; }
.progress .txt { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
#countTable tr.out td, #exitTable tr.out td { color: var(--muted); }
#countTable tr.sum td { background: var(--surface-2); border-top: 1px solid var(--line-2); }
#exitCard .seat-head:not(.four) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#exitSel { flex-wrap: wrap; }
#exitTable .sel { background: color-mix(in srgb, var(--s26) 10%, transparent); font-weight: 700; }
#exitTable th .ok { color: var(--up, #1a7f37); font-weight: 800; }
.notes { margin: 0 0 14px; }
.notes p { margin: 0 0 6px; font-size: 13.5px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #f5a524 14%, transparent); border-right: 3px solid #f5a524; }
.notes p.sel { font-weight: 500; }
#exitTable th .note { color: #d97706; font-weight: 800; }

/* layout: the count in the main column, turnout on the side */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.main-col, .side { min-width: 0; }
.side-head { background: var(--surface); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 12px; border-top: 4px solid var(--s26); }
.side-head h2 { font-size: 17px; }
.side .card { padding: 14px 16px; }
.side .card h2 { font-size: 16px; }
.side .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.side .kpi { padding: 12px 14px; }
.side .kpi .val { font-size: 22px; }
.side .chart-box { height: 240px; }
.side .chart-box.sm { height: 230px; }
.side .bloc-charts { grid-template-columns: 1fr; gap: 12px; }
.side .bar { width: 64px; }
.side .hs { display: none; }
.side .grid td.t-name { max-width: 150px; }
.side .seat-head .blk .val { font-size: 26px; }
.side .seat-head .blk { padding: 10px; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) { .side .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.credit { margin: 10px 0 0; font-size: 13.5px; opacity: .92; }
.credit a, .foot a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.kpi .val.name { font-size: 22px; line-height: 1.3; padding-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi.wide { grid-column: 1 / -1; }
.done { color: var(--up); font-weight: 700; }
#cblocTable td.t-name { max-width: none; }
#cblocTable tr.sum td { background: var(--surface-2); }
#cblocTable tbody tr:not(.sum) + tr.sum td { border-top: 1px solid var(--line-2); }
.cbloc-chart { margin-top: 18px; }
.cbloc-chart h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }
.cbloc-chart .legend { margin-top: 8px; }
#kalpiTable tr.out td, #cityResTable tr.out td { color: var(--muted); }
#cityResTable tr.more-row { cursor: pointer; }
#cityResTable tr.more-row:hover td { color: var(--ink); background: var(--surface-2); }
#cityResTable tr.more-row .caret { display: inline-block; width: 1em; }
#cityResTable tr.sub td.t-name { padding-inline-start: 22px; }
.side .grid td, .side .grid th { padding: 7px 5px; }
.side .bullet { gap: 6px; }
.side .bar { width: 48px; }

/* a neighborhood / ballot box opened for its full results */
#nbrTable tbody tr[data-id], #kalpiTable tbody tr[data-id] { cursor: pointer; }
#nbrTable tbody tr[data-id] td.t-name::before, #kalpiTable tbody tr[data-id] td.t-name::before { content: "◂ "; color: var(--muted); font-size: 11px; }
#nbrTable tbody tr.open td.t-name::before, #kalpiTable tbody tr.open td.t-name::before { content: "▾ "; }
.grid tr.open td { background: var(--surface-2); font-weight: 700; }
.grid tr.detail td { background: var(--surface-2); padding: 4px 14px 14px; white-space: normal; }
.grid tr.detail:hover td { background: var(--surface-2); }
.res-meta { margin: 6px 0 4px; font-size: 13px; color: var(--ink-2); }
.res-blocs { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; font-size: 13px; }
.res-blocs .sep { width: 14px; }
.res { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 0 14px; max-width: 640px; }
.res-row { display: contents; }
.res-row > * { padding: 5px 0; border-bottom: 1px solid var(--line); align-self: center; }
.res-row .tag { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .res { gap: 0 8px; } }

/* links to the history page */
.hero-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--brand-1); font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.hero-link:hover { background: #eef0ff; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hist-link { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--s26); text-decoration: none; }
.hist-link:hover { text-decoration: underline; }

/* history page */
.hero-back { color: #fff; text-decoration: none; font-weight: 700; }
.hero-back:hover { text-decoration: underline; }
.hist-pick { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.hist-pick .field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.hist-pick .field:first-child { flex: 1 1 260px; }
.hist-pick .search { flex: none; }
.hist-pick select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 220px; max-width: 100%; }
.hist-pick select:focus { outline: none; border-color: var(--s26); }
.hist-page .city-head { margin-top: 6px; }
.hist-legend { margin-top: 10px; gap: 6px 8px; }
.hist-legend button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; padding: 2px 4px; cursor: pointer; border-radius: 6px; }
.hist-legend button:hover { background: var(--surface-2); }
.hist-legend button.off { opacity: .4; text-decoration: line-through; }
.hist-grid th { cursor: default; }
.hist-grid tr.click { cursor: pointer; }
.hist-grid tr.sum td { background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.hist-grid tr.dim td { color: var(--muted); }
.hist-grid td.t-name { max-width: 260px; }
.dotc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 7px; vertical-align: middle; flex: none; }
@media (max-width: 600px) { .hist-pick select { min-width: 0; width: 100%; } .hist-pick .field { flex: 1 1 100%; } .hist-grid td.t-name { max-width: 150px; } }

/* scenario page (arab.php) */
.scn { border: 2px solid var(--g-arab); }
.scn .eyebrow-s { display: inline-block; font-size: 12px; font-weight: 700; color: var(--surface); background: var(--g-arab); border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
.scn .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scn .kpi { background: var(--surface-2); box-shadow: none; }
.scn .kpi.main { background: color-mix(in srgb, var(--g-arab) 10%, var(--surface-2)); }
.scn-moved { font-size: 14px; color: var(--ink-2); margin: 0; }
.scn-cut { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
@media (max-width: 600px) { .scn .kpis { grid-template-columns: 1fr; } }
.scn-ctl { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin-bottom: 14px; }
.scn-ctl input[type=range] { width: 200px; accent-color: var(--g-arab); }
.scn-ctl #scnTv { min-width: 48px; display: inline-block; }
.scn-h { font-size: 15px; margin: 18px 0 6px; }
.scn-tbl tbody tr { cursor: pointer; }
.scn-tbl tbody tr:hover { background: var(--surface-2); }
.scn-tbl tbody tr.on { background: color-mix(in srgb, var(--g-arab) 12%, transparent); }

/* vote-flow page (flows.html) */
.flow-pairs button { white-space: nowrap; }
.flow-pick select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 240px; max-width: 100%; }
.flow-pick select:focus { outline: none; border-color: var(--s26); }
.sankey { position: relative; user-select: none; }
.sankey svg { display: block; overflow: visible; }
.sankey path { fill-opacity: .42; cursor: pointer; transition: fill-opacity .15s; }
.sankey.hl path { fill-opacity: .07; }
.sankey.hl path.on { fill-opacity: .82; }
.sankey rect.nd { cursor: pointer; }
.sk-year { position: absolute; top: 0; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.sk-year.a { right: 0; text-align: right; }
.sk-year.b { left: 0; text-align: left; }
.sk-lbl { position: absolute; display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1; color: var(--ink); cursor: pointer; white-space: nowrap; }
.sk-lbl.a { right: 0; justify-content: flex-end; }
.sk-lbl.b { left: 0; justify-content: flex-start; }
.sk-lbl .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sk-lbl .pc { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sk-lbl.on .nm { font-weight: 800; }
.sankey.hl .sk-lbl:not(.on) { opacity: .55; }
.card:has(.sankey) { position: relative; }
.flow-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 320px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow); }
.flow-bars { display: grid; grid-template-columns: minmax(0, 230px) minmax(60px, 1fr) auto auto; gap: 0 12px; max-width: 860px; }
.fb-row { display: contents; }
.fb-row > * { padding: 6px 0; border-bottom: 1px solid var(--line); align-self: center; }
.fb-nm { display: flex; align-items: center; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fb-row.same .fb-nm { font-weight: 700; }
.fb-bar { height: 100%; display: flex; align-items: center; }
.fb-bar i { display: block; height: 12px; border-radius: 3px; min-width: 2px; }
.fb-pc { font-weight: 700; }
.fb-v { color: var(--muted); font-size: 13px; }
.flow-grid th.vh { vertical-align: bottom; padding: 6px 4px; }
.flow-grid th.vh > span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-flex; align-items: center; gap: 4px; max-height: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.flow-grid th.vh .dotc { margin: 0; }
.flow-grid th.corner { vertical-align: bottom; font-size: 12px; white-space: nowrap; }
.flow-grid td.hc { padding: 7px 4px; min-width: 42px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--s26) calc(var(--h) * .62), transparent); }
.flow-grid td.hc.same { font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.flow-grid tbody tr:hover td.hc { filter: brightness(.96); }
.flow-grid td.t-name { max-width: 220px; }
.flow-grid tr.sum td { background: var(--surface-2); font-size: 12px; color: var(--ink-2); text-align: center; }
.flow-grid tr.sum td:first-child { text-align: right; }
@media (max-width: 600px) {
  .flow-bars { grid-template-columns: minmax(0, 130px) minmax(40px, 1fr) auto auto; gap: 0 8px; }
  .fb-nm { font-size: 13px; }
  .flow-pick, .flow-pick select { width: 100%; min-width: 0; }
  .sk-lbl { font-size: 11.5px; gap: 3px; }
  .sk-lbl .pc { font-size: 10.5px; }
  .flow-grid td.t-name { max-width: 120px; }
}
.flow-kpis .kpi .val.name { white-space: normal; font-size: 20px; }
@media (max-width: 600px) { .flow-kpis .kpi .val.name { font-size: 16px; } .flow-bars { grid-template-columns: minmax(0, 112px) minmax(40px, 1fr) auto auto; } }
.flow-other { margin-top: 12px; max-width: 860px; line-height: 1.6; }
