/* Layout: one mobile column (max 760px) — sticky masthead with section tabs, fixed bottom switcher
   between Nová Paka and the other towns. Results-desk idea: the chrome stays ink-on-paper,
   only the data (the lists) carries colour. */
:root {
  --bg: #edf0ee;
  --surface: #fcfcfb;
  --surface-2: #f3f5f4;
  --ink: #111614;
  --ink-2: #48524d;
  --muted: #78827d;
  --line: #dde2df;
  --line-2: #c4ccc7;
  --invert-bg: #111614;
  --invert-fg: #fcfcfb;
  --live: #c62f2f;
  --good: #0a6f0a;
  --warn: #8a5800;
  --warn-bg: #fff4dc;
  --info-bg: #e7eef9;
  --sim-bg: #f3e9ff;
  --sim-fg: #4a2a85;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948; --sx: #9aa39e;
  --s9: #8a6a45; --s10: #0f8b8d; --s11: #a33cb8; --s12: #6f8f1f;
  --seq0: #e9eef5; --seq1: #cde2fb; --seq2: #9ec5f4; --seq3: #6da7ec; --seq4: #3987e5; --seq5: #256abf; --seq6: #184f95;
  --pending: #e4e8e6;
  --new: #2559b5;
  --star: #d99a00;
  --shadow: 0 1px 2px rgba(17, 22, 20, .05), 0 2px 10px rgba(17, 22, 20, .035);
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
  --r-s: 9px;
  --gap: 14px;
  --tabbar-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0d0c; --surface: #151918; --surface-2: #1c211f; --ink: #f1f4f2; --ink-2: #c2cac5;
    --muted: #8a938e; --line: #272d2a; --line-2: #39413d; --invert-bg: #f1f4f2; --invert-fg: #111614;
    --live: #ef6b6b; --good: #3fc23f; --warn: #f0b440; --warn-bg: #2e2510; --info-bg: #14223a;
    --sim-bg: #261a3d; --sim-fg: #d6c2ff;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300;
    --s7: #9085e9; --s8: #e66767; --sx: #6b746f;
    --s9: #b08d64; --s10: #26a9ab; --s11: #c56ed8; --s12: #93b33c;
    --seq0: #1f2a37; --seq1: #183f6e; --seq2: #1c5cab; --seq3: #2a78d6; --seq4: #5598e7; --seq5: #86b6ef; --seq6: #b7d3f6;
    --pending: #252b28;
    --new: #8db4f5; --star: #f0b429; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0d0c; --surface: #151918; --surface-2: #1c211f; --ink: #f1f4f2; --ink-2: #c2cac5;
  --muted: #8a938e; --line: #272d2a; --line-2: #39413d; --invert-bg: #f1f4f2; --invert-fg: #111614;
  --live: #ef6b6b; --good: #3fc23f; --warn: #f0b440; --warn-bg: #2e2510; --info-bg: #14223a;
  --sim-bg: #261a3d; --sim-fg: #d6c2ff;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300;
  --s7: #9085e9; --s8: #e66767; --sx: #6b746f;
  --s9: #b08d64; --s10: #26a9ab; --s11: #c56ed8; --s12: #93b33c;
  --seq0: #1f2a37; --seq1: #183f6e; --seq2: #1c5cab; --seq3: #2a78d6; --seq4: #5598e7; --seq5: #86b6ef; --seq6: #b7d3f6;
  --pending: #252b28;
  --new: #8db4f5; --star: #f0b429; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
  padding-inline: 0;
  padding-block: 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; }

/* ---------- masthead ---------- */
.top {
  position: sticky;
  top: 0;
  padding-top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-block: 10px 6px; }
.brand { min-width: 0; }
.eyebrow { display: block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.brand h1 {
  margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.02;
  letter-spacing: -.005em; text-wrap: balance; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.updated { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
.pill.live .dot { animation: pulse 1.6s ease-in-out infinite; }
.pill.done { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill.sim { color: var(--sim-fg); background: var(--sim-bg); border-color: transparent; }
.pill.wait { color: var(--ink-2); }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.pill.live.stale .dot { animation: none; background: var(--warn); }
.eyebrow.live { color: var(--live); }
.eyebrow.done { color: var(--good); }
/* heartbeat: when ČSÚ was last read; the ring fills up until the next round */
.updated { display: inline-flex; align-items: center; gap: 5px; }
.updated.warn { color: var(--warn); font-weight: 600; }
.updated.done { color: var(--good); }
.hb { width: 12px; height: 12px; flex: 0 0 12px; transform: rotate(-90deg); }
.hb circle { fill: none; stroke-width: 2; }
.hb .trk { stroke: var(--line-2); }
.hb .arc { stroke: var(--ink-2); stroke-dasharray: 28.9; stroke-dashoffset: 28.9; animation-name: hbfill; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes hbfill { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .pill.live .dot { animation: none; } .hb .arc { animation: none; stroke-dashoffset: 0; } * { scroll-behavior: auto !important; transition: none !important; } }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 2px 8px; margin-inline: -16px; padding-inline: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; border: 0; background: transparent; padding: 7px 12px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; color: var(--ink-2);
}
.tab[aria-selected="true"] { background: var(--invert-bg); color: var(--invert-fg); }

/* ---------- bottom switcher ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar-in { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: var(--tabbar-h); }
.tb-btn { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-weight: 600; font-size: 13px; position: relative; min-width: 0; padding-inline: 4px; }
.tb-btn .tb-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-btn svg { width: 24px; height: 24px; }
.tb-btn[aria-selected="true"] { color: var(--ink); }
.tb-btn[aria-selected="true"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ink); }
.tb-badge { position: absolute; top: 9px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--live); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* ---------- content blocks ---------- */
main { display: flex; flex-direction: column; gap: var(--gap); padding-block: 14px 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; box-shadow: var(--shadow); }
.card.flat { background: transparent; border: 0; padding: 0; box-shadow: none; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: .005em; text-wrap: balance; }
.card-h .aside { font-size: 12.5px; color: var(--muted); text-align: right; }
h3 { margin: 18px 0 8px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.note { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 10px 0 0; }
.note strong { color: var(--ink-2); }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }

.banner { border-radius: var(--r-s); padding: 11px 13px; font-size: 14px; line-height: 1.4; display: flex; gap: 10px; align-items: flex-start; }
.banner b { font-weight: 700; }
.banner.sim { background: var(--sim-bg); color: var(--sim-fg); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.info { background: var(--info-bg); color: var(--ink-2); }
.banner svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }

/* hero: counting progress */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: end; }
.hero-num { font-family: var(--f-display); font-weight: 700; font-size: 56px; line-height: .9; letter-spacing: -.01em; }
.hero-num small { font-size: 26px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.hero-lbl { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hero-side { text-align: right; }
.hero-side .big { font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1; }
.delta { font-size: 13px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--live); }
.delta.flat { color: var(--muted); }

.strip { display: grid; grid-template-columns: repeat(var(--n, 14), 1fr); gap: 3px; margin-top: 14px; }
.strip button {
  border: 0; padding: 0; height: 30px; border-radius: 5px; background: var(--pending); color: var(--muted);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.strip button.on { background: var(--invert-bg); color: var(--invert-fg); }
.strip button.new { box-shadow: 0 0 0 2px var(--live) inset; animation: pop .45s ease-out 1; }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
/* the newest batch of okrsky, under the strip */
.latest { margin-top: 10px; padding: 8px 11px; border-radius: var(--r-s); background: var(--surface-2); font-size: 14px; line-height: 1.4; }
.latest .lt-1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.latest .lt-2 { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; }
.latest .up, .feed .up { color: var(--good); }
.latest .down, .feed .down { color: var(--live); }
.sb-title { margin: 18px 0 6px; }
.result.final { border-top: 5px solid var(--c, var(--ink)); }
.maj { margin: 8px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); text-align: center; text-wrap: balance; }
.sb-bar i.grow { animation: sbgrow .8s cubic-bezier(.2, .7, .2, 1); }
@keyframes sbgrow { from { width: var(--w0); } }
#view { overflow-anchor: none; }
/* waiting for the first okrsek: the count elsewhere */
.wctx { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.wrow { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px;
  color: var(--ink-2); background: none; border: 0; text-align: left; font: inherit; width: 100%; }
button.wrow { cursor: pointer; color: var(--ink); }
.wrow .wl { font-weight: 600; }
.wrow .track { height: 6px; border-radius: 3px; background: var(--pending); overflow: hidden; }
.wrow .track i { display: block; height: 100%; background: var(--live); border-radius: 3px; }
.wrow .wv { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrow .wv.wide { grid-column: 2 / span 2; white-space: normal; }
.wrow svg { width: 16px; height: 16px; color: var(--muted); }
.strip-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.stat .v { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .k { font-size: 12px; color: var(--muted); line-height: 1.25; }

.countdown { display: flex; gap: 10px; margin-top: 4px; }
.cd { min-width: 60px; }
.cd .v { font-family: var(--f-display); font-weight: 700; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.cd .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* party bars */
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: baseline; }
.bar-name { display: flex; gap: 8px; align-items: baseline; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.25; }
.bar-name .sw { flex: 0 0 10px; height: 10px; border-radius: 3px; transform: translateY(-1px); }
.bar-name .nm { min-width: 0; overflow-wrap: anywhere; }
.bar-name .no { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-val { text-align: right; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-track { grid-column: 1 / -1; position: relative; height: 12px; }
.bar-track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; min-width: 2px; transition: width .5s ease; }
.bar-track .thr { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px solid var(--line-2); }
.bar-track .ghost { position: absolute; top: 4px; height: 4px; border-radius: 2px; background: var(--ink); opacity: .22; }
.bar-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seat-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink); }
.seat-chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.below { opacity: .62; }

/* council chart */
/* the council as a ring of seats (seatArc) */
.sa { display: block; width: 100%; max-width: 440px; margin: 0 auto; height: auto; }
.sa text { text-anchor: middle; dominant-baseline: middle; }
.sa .n { font: 700 15px var(--f-display); fill: var(--ink-2); }
.sa .big { font: 700 48px var(--f-display); fill: var(--ink); }
.sa .sub { font: 600 13px var(--f-body); fill: var(--muted); }
.sa .tick { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.sa.past path { opacity: .5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.legend b { font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: 2px; }
.tag.off { background: var(--invert-bg); color: var(--invert-fg); border-color: transparent; }
.tag.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: transparent; }
.tag.live { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); background: transparent; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.lastseat { margin-top: 14px; padding: 12px 13px; border-radius: var(--r-s); background: var(--surface-2); font-size: 14px; line-height: 1.4; }
.lastseat b { font-weight: 700; }

/* tables */
.tbl-wrap { overflow-x: auto; margin-inline: -16px; padding-inline: 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.cut td { border-top: 2px solid var(--ink); }
.tbl tr.out td { color: var(--muted); }
.tbl .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }

/* chips & inputs */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 999px; padding: 6px 11px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); max-width: 260px;
}
.chip span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.chip[aria-pressed="true"] { background: var(--invert-bg); color: var(--invert-fg); border-color: var(--invert-bg); }
.search { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 11px; padding: 11px 13px; font-size: 16px; }
.search::placeholder { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 11px; padding: 10px 14px; font-weight: 600; font-size: 14.5px; color: var(--ink);
}
.btn.primary { background: var(--invert-bg); color: var(--invert-fg); border-color: var(--invert-bg); }
.btn.danger { color: var(--live); border-color: color-mix(in srgb, var(--live) 45%, transparent); }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* candidates */
.list-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.list-block:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.list-head { display: flex; gap: 10px; align-items: flex-start; }
.list-head .sw { flex: 0 0 12px; height: 12px; border-radius: 4px; margin-top: 6px; }
.list-head .ttl { min-width: 0; flex: 1; }
.list-head .ttl b { display: block; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.list-head .ttl span { font-size: 12.5px; color: var(--muted); }
.list-head .res { text-align: right; flex-shrink: 0; }
.list-head .res b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.list-head .res span { font-size: 12.5px; color: var(--muted); }
.cands { list-style: none; margin: 10px 0 0; padding: 0; }
.cand { border-bottom: 1px solid var(--line); }
.cand:last-child { border-bottom: 0; }
.cand > button { width: 100%; text-align: left; background: transparent; border: 0; padding: 9px 0; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; }
.cand .n { color: var(--muted); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.cand .who { min-width: 0; }
.cand .who b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.cand .who small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; }
.cand .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.cand .v small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.cand .pbar { grid-column: 2 / -1; height: 4px; background: var(--surface-2); border-radius: 2px; position: relative; overflow: hidden; margin-top: 3px; }
.cand .pbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.cand .pbar u { position: absolute; top: -1px; bottom: -1px; width: 0; border-left: 1.5px solid var(--ink); opacity: .55; }
.cand .badges { grid-column: 2 / -1; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.cand.el .who b::after { content: ""; }
.cand .more { padding: 0 0 12px 36px; font-size: 13.5px; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.el { background: var(--invert-bg); color: var(--invert-fg); border-color: var(--invert-bg); }
.badge.pr { border-style: dashed; }
.badge.jump { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.badge.sub { color: var(--muted); }

/* okrsky */
.map { display: block; width: 100%; height: auto; max-height: 460px; }
.map path.ok { stroke: var(--surface); stroke-width: 2; stroke-linejoin: round; cursor: pointer; }
.map path.ok.sel { stroke: var(--ink); stroke-width: 3.5; }
.map text { font: 700 22px var(--f-body); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; pointer-events: none; }
.okr-list { list-style: none; margin: 0; padding: 0; }
.okr-list li > button { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; text-align: left; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.okr-list li > button[aria-expanded="true"] { border-bottom-color: transparent; }
.okr-no { font-family: var(--f-display); font-weight: 700; font-size: 22px; text-align: center; line-height: 1; }
.okr-name { min-width: 0; }
.okr-name b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.okr-name small { color: var(--muted); font-size: 12.5px; }
.okr-r { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.okr-r b { display: block; font-size: 15px; }
.stack { grid-column: 2 / -1; display: flex; height: 8px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--pending); }
.stack i { display: block; height: 100%; }
.okr-detail { padding: 4px 0 14px 44px; border-bottom: 1px solid var(--line); }

/* charts */
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--f-body); }
.chart .lbl { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; font-family: var(--f-body); }
.tip { position: relative; margin-top: 8px; min-height: 22px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.tip b { font-variant-numeric: tabular-nums; }

.log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.log li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.log time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* coalition */
.coal-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 12px 13px; border-radius: var(--r-s); background: var(--surface-2); }
.coal-sum .big { font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1; }
.coal-sum.ok { background: var(--invert-bg); color: var(--invert-fg); }
.coal-sum.ok .muted { color: inherit; opacity: .75; }
.coal-meter { position: relative; display: flex; height: 14px; gap: 2px; margin-top: 10px; }
.coal-meter i { flex: 1; border-radius: 3px; background: var(--pending); }
.coal-meter .maj { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px solid var(--ink); }

/* towns view: a card per town; the header (with the arrow) opens it, an open card spans the whole row */
.town { padding: 0; overflow: hidden; scroll-margin-top: 96px; }
.town-h { width: 100%; background: transparent; border: 0; text-align: left; padding: 14px 16px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; gap: 4px 10px; align-items: start; color: inherit; font: inherit; }
button.town-h { cursor: pointer; }
.town-h .tn { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.town-h h2 { margin: 0; font-family: var(--f-display); font-size: 24px; line-height: 1.05; font-weight: 700; overflow-wrap: anywhere; }
.town-h .where { font-size: 12.5px; color: var(--muted); }
.town-h .side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; padding-top: 2px; }
div.town-h { grid-template-columns: minmax(0, 1fr) auto; }
.chev { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; transition: transform .2s ease, background-color .15s ease; }
.chev svg { width: 18px; height: 18px; }
@media (hover: hover) { button.town-h[aria-expanded="false"]:hover .chev { background: var(--pending); } }
.town-h[aria-expanded="true"] .chev { transform: rotate(180deg); background: var(--invert-bg); color: var(--invert-fg); border-color: transparent; }
.btn .chev { width: auto; height: auto; border: 0; background: none; transform: rotate(180deg); }
.btn .chev svg { width: 15px; height: 15px; }
.prog { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.prog .track { flex: 1; height: 6px; border-radius: 3px; background: var(--pending); overflow: hidden; }
.prog .track i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.mini { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 7px; }
.mini[data-a] { cursor: pointer; }
.mini-row { display: grid; grid-template-columns: minmax(0, 1fr) 50px 54px 26px; gap: 8px; align-items: center; font-size: 13.5px; }
.mini-row .nm { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mini-row .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mini-row .nm i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.mini-row .p { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-row .s { height: 6px; background: var(--surface-2); border-radius: 3px; position: relative; overflow: hidden; }
.mini-row .s i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.mini-row .m { text-align: right; font-family: var(--f-display); font-weight: 700; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.mini-row .m.z { color: var(--muted); opacity: .6; }
.mini-hd { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: -3px; }
.mini-hd .m { font-family: inherit; font-size: inherit; }
.mini-more { font-size: 12.5px; color: var(--muted); }
.mini-seats { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; }
.mini-cap { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-pre { font-size: 13.5px; color: var(--ink-2); }
.mini-lists { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 13px; color: var(--ink-2); }
.mini-lists .ml { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.mini-lists .ml span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mini-lists .ml i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.mini-lists .more { color: var(--muted); }
.seatdots { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 16px 14px; }
.seatdots i { width: 11px; height: 11px; border-radius: 50%; }
.seatdots i.proj { opacity: .55; }
.seatdots.sm { gap: 2px; }
.seatdots.sm i { width: 9px; height: 9px; }
.town-body { border-top: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.tb-cols, .tb-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.tb-col { display: contents; } /* one column on a phone: the sections go in the order below */
.tb-sec.o1 { order: 1; } .tb-sec.o2 { order: 2; } .tb-sec.o3 { order: 3; } .tb-sec.o4 { order: 4; } .tb-sec.o5 { order: 5; } .tb-sec.o6 { order: 6; }
.tb-sec { min-width: 0; }
.tb-sec h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-sec h3 .cnt { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 12.5px; }
.tb-sec .maj { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-align: center; }
.tb-sec .sa { max-width: 400px; }
details.tb-22 summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.tb-22 summary::-webkit-details-marker { display: none; }
details.tb-22 summary h3 { margin: 0; }
details.tb-22 summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); margin-left: auto; transition: transform .2s ease; }
details.tb-22[open] summary::after { transform: rotate(225deg) translateY(-1px); }
details.tb-22[open] summary { margin-bottom: 8px; }
.tb-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.toplist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.toplist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.toplist li .r { color: var(--muted); font-variant-numeric: tabular-nums; }
.toplist li .t { min-width: 0; overflow-wrap: anywhere; }
.toplist li .muted i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin: 0 4px 0 2px; }
.toplist li b { font-variant-numeric: tabular-nums; }

/* scoreboard: % of votes and seats per list (the bar shows the 5 % line and a ring at the 2022 result) */
.sb { display: flex; flex-direction: column; }
.sb-head, .sb-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 48px; column-gap: 10px; }
.sb-head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sb-head span:nth-child(2), .sb-head span:nth-child(3) { text-align: right; }
.sb-row { grid-template-rows: auto auto; row-gap: 5px; padding: 8px 0 9px; border-bottom: 1px solid var(--line); align-items: center; border-radius: 6px; }
.sb-row:last-child { border-bottom: 0; }
.sb-nm { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.25; }
.sb-nm .sw { flex: 0 0 10px; height: 10px; border-radius: 3px; }
.sb-nm .no { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.sb-nm .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sb-p { text-align: right; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-p small { font-size: 12px; color: var(--muted); font-weight: 600; }
.sb-s { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; line-height: 1; }
.sb-s b { font-family: var(--f-display); font-weight: 700; font-size: 30px; font-variant-numeric: tabular-nums; }
.sb-s small { font-size: 11.5px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-s small.up { color: var(--good); }
.sb-s small.down { color: var(--live); }
.sb-s small.flat { color: var(--muted); }
.sb-bar { grid-column: 1 / span 2; position: relative; height: 10px; border-radius: 4px; background: var(--surface-2); }
.sb-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; min-width: 2px; }
.sb-bar u { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px solid var(--line-2); }
.sb-bar s { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--surface); box-sizing: border-box; }
.sb-row.below { opacity: .55; }
.sb-row.flash { animation: rowflash 2.2s ease-out; }
.towns-intro { margin: 0; font-size: 13.5px; color: var(--muted); }
.add-row { display: flex; justify-content: center; }
.add-panel { display: flex; flex-direction: column; gap: 10px; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.results li .t { min-width: 0; }
.results li b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.results li small { color: var(--muted); font-size: 12.5px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px); z-index: 40; background: var(--invert-bg); color: var(--invert-fg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.foot { font-size: 12.5px; color: var(--muted); line-height: 1.5; padding-block: 6px 4px; }
.foot a { color: var(--ink-2); }
.foot .seg { display: flex; width: fit-content; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 22px 8px; font-size: 14px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) {
  .brand h1 { font-size: 36px; }
  .hero-num { font-size: 72px; }
}
@media (max-width: 360px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-num { font-size: 48px; }
}

/* ---------- layout: one column on phones, two on tablets ---------- */
.cols, .col, .flow { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.town-grid { display: flex; flex-direction: column; gap: var(--gap); }
.dot-c { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; flex: 0 0 9px; }
.lead-note { margin: -4px 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; flex-wrap: wrap; }
.card-foot .btn svg { width: 15px; height: 15px; }

/* segmented control */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.seg button svg { width: 14px; height: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.seg button:disabled { opacity: .4; cursor: default; }
.seg.sm button { padding: 5px 10px; font-size: 12.5px; }
.search-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-row .search { flex: 1 1 240px; min-width: 0; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 2px 0 14px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k1 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpis.sm { margin-bottom: 12px; }
.kpi { background: var(--surface-2); border-radius: var(--r-s); padding: 10px 12px; min-width: 0; }
.kpi b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpis.sm .kpi b { font-size: 24px; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.25; margin-top: 3px; }
.kpi.inc b { color: var(--good); }
.kpi.nw b { color: var(--new); }
.kpi.jump b { color: var(--warn); }

/* badges added for the council */
.badge.inc { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.badge.nw { color: var(--new); border-color: color-mix(in srgb, var(--new) 45%, transparent); }
.badge.star-b { color: var(--star); border-color: color-mix(in srgb, var(--star) 50%, transparent); display: inline-flex; align-items: center; gap: 3px; }
.badge.star-b svg { width: 11px; height: 11px; }

/* member rows (council, followed candidates) */
.mlist { list-style: none; margin: 6px 0 0; padding: 0; }
.mrow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 34px; gap: 2px 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mo { font-family: var(--f-display); font-weight: 700; font-size: 17px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.mw { background: transparent; border: 0; padding: 2px 0; text-align: left; min-width: 0; color: inherit; }
.mw b { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.mw small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; }
.mw:hover b { text-decoration: underline; text-underline-offset: 3px; }
.mv { text-align: right; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.mrow .badges { grid-column: 2 / -1; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 1px; }
.star { width: 34px; height: 34px; border: 0; background: transparent; color: var(--line-2); border-radius: 50%; display: inline-grid; place-items: center; padding: 0; }
.star svg { width: 19px; height: 19px; }
.star:hover { color: var(--muted); }
.star.on { color: var(--star); }
.star.wt { width: auto; height: auto; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 9px; display: inline-flex; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink); }
.star.wt svg { width: 16px; height: 16px; }
.star.wt.on { color: var(--star); border-color: color-mix(in srgb, var(--star) 55%, transparent); }
.star.wt.on span { color: var(--ink); }

/* party blocks of the council */
.cparty { border-top: 5px solid var(--c); }
.cp-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 4px; }
.cp-head .ttl { min-width: 0; }
.cp-head .ttl b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
.cp-head .ttl span { font-size: 12.5px; color: var(--muted); }
.cp-seats { text-align: right; flex-shrink: 0; }
.cp-seats b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 36px; line-height: .95; }
.cp-seats span { display: block; font-size: 12px; color: var(--muted); }
.cp-seats .delta { margin-top: 2px; }
.edge { margin-top: 10px; padding: 9px 12px; border-radius: var(--r-s); background: var(--surface-2); display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 1px 8px; align-items: center; font-size: 13.5px; }
.edge .lbl { grid-column: 1 / -1; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.edge .who { grid-column: 1; min-width: 0; }
.edge .need { grid-column: 1; color: var(--warn); font-weight: 600; font-size: 12.5px; }
.edge .star { grid-column: 2; grid-row: 2 / span 2; }
details.subs { margin-top: 6px; }
details.subs summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.mlist.sub .mo { font-size: 14px; }

/* plain two-sided lists */
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.plain li:last-child { border-bottom: 0; }
.plain li > span:first-child { min-width: 0; }
.plain b { font-weight: 600; }
.plain small { display: block; color: var(--muted); font-size: 12.5px; }
.plain .st { text-align: right; font-size: 13px; color: var(--ink-2); flex-shrink: 0; max-width: 58%; }

/* compact "who is elected" */
.ec { display: flex; flex-direction: column; gap: 12px; }
.ec-row { border-left: 3px solid var(--c); padding-left: 10px; }
.ec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14.5px; }
.ec-h span { font-family: var(--f-display); font-weight: 700; font-size: 20px; line-height: 1; }
.ec-names { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.nm-chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--ink-2); font-weight: 500; line-height: 1.35; }
.nm-chip.nw { font-weight: 700; color: var(--ink); background: var(--surface); border-color: var(--line-2); }
.nm-chip.starred { border-color: var(--star); box-shadow: 0 0 0 1px var(--star) inset; }
.nm-chip .up { color: var(--good); font-weight: 700; }
.nm-chip.demo { pointer-events: none; padding: 1px 7px; font-size: 12px; }

/* coalitions */
.chips.wrapc { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
.coal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.coal-list li > button, .coal-list .cl-static { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); color: inherit; border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.coal-list li > button:hover { border-color: var(--line-2); }
.coal-list li > button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.sbar { grid-column: 1 / -1; position: relative; display: block; height: 10px; }
.sbar-in { display: flex; height: 100%; gap: 2px; border-radius: 5px; overflow: hidden; }
.sbar-in i { display: block; height: 100%; }
.sbar-in i.rest { background: var(--pending); }
.sbar u { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px solid var(--ink); }
.cl-main { min-width: 0; }
.cl-names { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.cl-names .plus { color: var(--muted); margin: 0 6px; font-weight: 500; }
.cl-meta { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.cl-sum { text-align: right; }
.cl-sum b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1; }
.cl-sum small { font-size: 12px; color: var(--muted); }
.solo { padding: 11px 13px; border-radius: var(--r-s); background: var(--invert-bg); color: var(--invert-fg); font-size: 14.5px; margin-bottom: 10px; }
.coal-meter i.mj { position: relative; }
.coal-meter i.mj::after { content: ""; position: absolute; right: -2px; top: -5px; bottom: -5px; border-right: 2px solid var(--ink); }
.coal-sum { align-items: center; }
.coal-sum .of { font-size: 20px; opacity: .6; }
.verdict { text-align: right; font-size: 13.5px; line-height: 1.38; max-width: 72%; }
.stab { font-size: 12px; opacity: .8; margin-top: 4px; }

/* change feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.feed .fl { line-height: 1.45; display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.feed .fl svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--live); margin-top: 3px; }
.feed small { color: var(--muted); font-size: 12px; }
.feed b.up { color: var(--good); }
.feed b.down { color: var(--live); }

/* comparison table */
.tbl.cmp td small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.tbl.cmp td b { font-weight: 600; }

/* a list whose numbers just moved */
.bar-row { border-radius: 8px; }
.bar-row.flash { animation: rowflash 2.2s ease-out; }
@keyframes rowflash {
  0% { background-color: color-mix(in srgb, var(--live) 14%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--live) 14%, transparent); }
  100% { background-color: transparent; box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) { .bar-row.flash, .sb-row.flash, .sb-bar i.grow, .strip button.new { animation: none; } }

/* ---------- tablets and wider ---------- */
@media (min-width: 760px) {
  .wrap { max-width: 1180px; padding-inline: 22px; }
  .tabs { margin-inline: -22px; padding-inline: 22px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
  .cols.one { display: flex; max-width: 760px; margin-inline: auto; width: 100%; }
  .town-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; grid-auto-flow: row dense; }
  .town.open { grid-column: 1 / -1; }
  .town.open .tb-cols { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .town.open .tb-col { display: flex; }
  .town.open .town-h, .town.open .town-body { padding-inline: 20px; }
  /* blocks keep their reading order: down the first column, then the second */
  .flow { display: block; column-count: 2; column-gap: var(--gap); }
  .flow > * { break-inside: avoid; margin-bottom: var(--gap); }
  .flow > .card.flat { column-span: none; }
  .tbl-wrap, .chips { margin-inline: -16px; padding-inline: 16px; }
  .chips.wrapc { margin-inline: 0; padding-inline: 0; }
  :root { --gap: 16px; }
  .card { padding: 18px; }
  .tabbar-in { max-width: 640px; }
}
@media (min-width: 1000px) {
  .cand-cols { columns: 2; column-gap: 30px; }
  .cand-cols .list-block { break-inside: avoid; }
  .cand-cols .list-block:first-child, .cand-cols .list-block { border-top: 0; margin-top: 0; padding-top: 0; margin-bottom: 22px; }
  .town-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* the voter's own okrsek */
.myok { border-left: 4px solid var(--ink); }
.myok-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.myok-res div { background: var(--surface-2); border-radius: var(--r-s); padding: 8px 10px; min-width: 0; }
.myok-res span { display: block; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.myok-res b { display: block; font-family: var(--f-display); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.winline { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--ink-2); margin: -4px 0 10px; }

/* boot message (replaced by the first render) and the compact snapshot notice */
.boot-msg { color: var(--muted); font-size: 14px; padding: 28px 4px; margin: 0; text-align: center; }
.banner.compact { font-size: 13px; padding: 9px 12px; }
.boot-late { opacity: 0; animation: boot-late 0s linear 12s forwards; }
@keyframes boot-late { to { opacity: 1; } }

/* ---------- notifications: bell in the masthead + settings sheet ---------- */
.top-row .bell { align-self: center; flex: 0 0 auto; width: 40px; height: 40px; margin-left: auto; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.top-row .bell svg { width: 22px; height: 22px; }
.top-row .bell[aria-pressed="true"] { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
.top-row .brand { flex: 1 1 auto; }
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(10, 13, 12, .45); }
.sheet-in { position: relative; width: 100%; max-width: 560px; max-height: calc(100% - 40px - env(safe-area-inset-top, 0px)); overflow-y: auto;
  border-radius: 18px 18px 0 0; margin: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; }
.sheet-in h3 { margin: 4px 0 0; }
@media (min-width: 760px) { .sheet { align-items: center; } .sheet-in { border-radius: 18px; max-height: 86vh; } }
.nf-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-list { display: grid; gap: 6px; }
.nf-chk { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-size: 15px; }
.nf-grid .nf-chk { padding: 7px 12px; }
.nf-chk input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: 0 0 auto; }
.nf-chk span { display: grid; gap: 1px; min-width: 0; }
.nf-chk small { color: var(--muted); font-size: 12.5px; }
.nf-on { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--good); }
.nf-on svg { width: 20px; height: 20px; color: var(--live); }
.nf-msg { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); font-size: 14.5px; }
.nf-btns .btn svg { width: 18px; height: 18px; }
.banner svg + div svg { width: 16px; height: 16px; vertical-align: -3px; }

/* lists that end: coalitions folded after six, three candidates per list */
.coal-line { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
details.more-coal { margin-top: 8px; }
details.more-coal > summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 8px 0; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more-coal > summary::-webkit-details-marker { display: none; }
details.more-coal > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
details.more-coal[open] > summary::after { transform: rotate(225deg); }
.more-c { margin: 8px 0 0 22px; }
.legend-line { margin: 10px 0 12px; }
