/* Hallmark · v2.0.0 · mode: redesign · depth: full · scope: election dashboard · theme: IEC light civic atlas · shape: results workspace · preserve: data, links, controls, and interaction wiring · party marks: local assets with source notes */
/* Critique: the original dark dashboard compressed the national story, map, and constituency detail into one dense layer; this pass adds a clearer hierarchy, whitespace, contrast, responsive behavior, and verifiable party identifiers. */
:root {
  color-scheme: light;
  --page: #f2f7fb;
  --surface: #ffffff;
  --surface-soft: #f7fbfe;
  --surface-blue: #eaf7fb;
  --ink: #15314b;
  --ink-strong: #0d243a;
  --muted: #60788e;
  --muted-light: #8298aa;
  --line: #dce7ef;
  --line-strong: #c7d8e5;
  --brand: #087fa8;
  --brand-deep: #086b91;
  --brand-soft: #dff3f8;
  --focus: #006db0;
  --grid-line: #e9f1f7;
  --map-water: #f6fbfe;
  --shadow-sm: 0 2px 8px rgb(21 49 75 / 5%);
  --shadow-card: 0 8px 30px rgb(24 56 83 / 7%);
  --shadow-pop: 0 18px 50px rgb(18 47 72 / 17%);
  --party-udc: #6f8dff;
  --party-bdp: #e3757a;
  --party-bcp: #b8d95a;
  --party-bpf: #d5a743;
  --party-ind: #a5adba;
  --party-brp: #8f7bd6;
  --party-bmd: #4fb3a5;
  --party-rap: #c47fa8;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.2,.7,.25,1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: var(--brand-deep); }
svg { width: 18px; height: 18px; display: block; fill: none; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.app-shell { width: min(1720px, 100%); margin: 0 auto; padding: 0 28px 32px; }
.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--page);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink-strong); flex: 0 0 auto; }
.brand-mark {
  width: 36px; height: 26px; display: block; position: relative; overflow: hidden;
  border-radius: 5px; background: #74b5db; box-shadow: inset 0 0 0 1px rgb(21 49 75 / 8%);
}
.brand-mark::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 10px; background: #fff; }
.brand-mark span { position: absolute; z-index: 1; left: 0; right: 0; top: 11px; height: 4px; background: #1b2b38; }
.brand-type { display: grid; line-height: 1.08; }
.brand-type strong { font-size: 14px; letter-spacing: .04em; font-weight: 800; }
.brand-type > span { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.topbar-context { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.context-kicker { color: var(--brand-deep); font-weight: 750; }
.context-divider { width: 1px; height: 18px; background: var(--line-strong); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.result-status { display: inline-flex; align-items: center; gap: 8px; margin-right: 5px; padding: 8px 11px; border: 1px solid #bfe5d1; border-radius: 999px; color: #176c49; background: #eef9f3; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-dot, .live-pulse { width: 8px; height: 8px; border-radius: 50%; background: #29a46a; box-shadow: 0 0 0 3px #d6f1e2; }
.button, .icon-button { border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; transition: transform .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border-radius: 11px; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.button svg { width: 16px; height: 16px; }
.button-replay svg, .replay-play svg { fill: currentColor; }
.button:hover, .icon-button:hover { border-color: #9dc8d8; background: var(--surface-blue); }
.button:active, .icon-button:active { transform: translateY(1px); }
.button-replay { color: #fff; border-color: var(--brand); background: var(--brand); }
.button-replay:hover { border-color: var(--brand-deep); background: var(--brand-deep); }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; border-radius: 11px; color: var(--muted); }
.icon-button svg { width: 18px; height: 18px; }

.national-panel {
  display: grid;
  grid-template-columns: minmax(230px, .92fr) minmax(470px, 1.8fr) minmax(170px, .56fr);
  align-items: stretch;
  gap: 25px;
  margin: 20px 0 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.verdict-block { display: flex; flex-direction: column; justify-content: center; padding-right: 18px; border-right: 1px solid var(--line); }
.section-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-deep); font-size: 12px; line-height: 1.3; font-weight: 750; }
.tiny-flag { width: 15px; height: 10px; display: inline-block; position: relative; border-radius: 2px; background: #74b5db; box-shadow: inset 0 0 0 1px rgb(21 49 75 / 8%); }
.tiny-flag::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 4px; background: white; }
.tiny-flag::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: #1b2b38; }
.verdict-block h1 { margin: 12px 0 6px; color: var(--ink-strong); font-size: clamp(25px, 2.1vw, 33px); line-height: 1.08; letter-spacing: -.035em; font-weight: 780; }
.verdict-block p { max-width: 390px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.assembly-block { align-self: center; min-width: 0; }
.assembly-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; color: var(--muted); font-size: 13px; }
.assembly-heading > span:first-child { color: var(--ink); font-size: 14px; font-weight: 750; }
.assembly-heading strong { color: var(--ink-strong); font-size: 17px; }
.seat-track-wrap { position: relative; margin: 0 0 14px; padding-bottom: 8px; }
.seat-track { display: flex; width: 100%; height: 13px; overflow: hidden; border-radius: 999px; background: var(--line); box-shadow: inset 0 1px 2px rgb(21 49 75 / 10%); }
.seat-segment { min-width: 2px; height: 100%; border-right: 1px solid rgb(255 255 255 / 78%); }
.majority-marker { position: absolute; left: 50.82%; top: -5px; height: 26px; border-left: 1px dashed var(--ink); pointer-events: none; }
.majority-marker span { position: absolute; left: 6px; top: 17px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.party-seat-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.party-seat { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.party-seat > strong { grid-column: 2; grid-row: 1; color: var(--ink-strong); font-size: 20px; line-height: 1.1; }
.party-seat > span:not(.party-mark) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 11px; font-weight: 750; }
.party-seat small { grid-column: 1 / -1; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.2; }
.party-seat .party-mark { grid-column: 1; grid-row: 1 / span 2; }
.turnout-block { display: flex; justify-content: center; align-items: center; gap: 13px; padding-left: 17px; border-left: 1px solid var(--line); }
.turnout-ring { width: 104px; height: 104px; flex: 0 0 104px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--turnout) * 1%), #e7eff5 0); position: relative; }
.turnout-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.turnout-ring > div { position: relative; display: grid; justify-items: center; line-height: 1.15; }
.turnout-ring strong { color: var(--ink-strong); font-size: 21px; letter-spacing: -.03em; }
.turnout-ring strong span { font-size: 12px; }
.turnout-ring > div > span { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.turnout-copy { display: grid; gap: 2px; }
.turnout-copy strong { color: var(--ink-strong); font-size: 17px; }
.turnout-copy > span { color: var(--muted); font-size: 12px; }
.turnout-copy small { color: var(--muted-light); font-size: 11px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(340px, .86fr); align-items: start; gap: 18px; }
.map-card, .insight-panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.map-card { overflow: hidden; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 79px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.map-title { min-width: 180px; }
.map-title h2 { margin: 0; color: var(--ink-strong); font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.map-title > span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.map-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.segment-control { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.segment-control button { min-height: 31px; padding: 0 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.segment-control button.active { color: var(--brand-deep); background: var(--surface); box-shadow: 0 1px 3px rgb(21 49 75 / 12%); }
.icon-button.subtle { width: 36px; height: 36px; border-color: transparent; background: transparent; }
.icon-button.subtle.active { color: var(--brand-deep); background: var(--brand-soft); }
.search-wrap { width: clamp(190px, 19vw, 250px); height: 38px; display: flex; align-items: center; gap: 8px; position: relative; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.search-wrap > svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--muted-light); }
.search-wrap input, .modal-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-wrap input::placeholder, .modal-search input::placeholder { color: var(--muted-light); }
.search-wrap kbd, .about-content kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface-soft); font: 11px ui-monospace, SFMono-Regular, monospace; }
.search-results { position: absolute; z-index: 20; display: none; top: calc(100% + 7px); right: 0; width: min(320px, 88vw); max-height: 340px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-pop); }
.search-results.open { display: grid; gap: 2px; }
.search-result { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 60px; padding: 7px 9px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; text-align: left; }
.search-result:hover, .search-result.focused { background: var(--surface-soft); }
.search-result-copy { min-width: 0; display: grid; gap: 1px; }
.search-result-copy > span { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy > small, .search-result > small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.search-result > small { white-space: nowrap; }
.search-empty { padding: 16px 12px; color: var(--muted); font-size: 13px; }

.map-stage { height: clamp(390px, 44vw, 545px); min-height: 390px; position: relative; overflow: hidden; background: var(--map-water); }
.map-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 42px 42px; opacity: .7; pointer-events: none; }
#botswana-map { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: none; }
.constituency-path { fill: var(--party, #9eb8c8); stroke: #fff; stroke-width: 1.35; stroke-linejoin: round; cursor: pointer; transition: fill-opacity .18s ease, stroke .16s ease, filter .16s ease; }
.constituency-path:hover, .constituency-path.hovered { stroke: var(--brand-deep); stroke-width: 2.2; filter: drop-shadow(0 2px 3px rgb(21 49 75 / 20%)); }
.constituency-path.selected { stroke: var(--ink-strong); stroke-width: 3; filter: drop-shadow(0 2px 3px rgb(21 49 75 / 22%)); }
.constituency-path.pending { fill: #d5e1e8 !important; fill-opacity: .75 !important; stroke-dasharray: 3 2; }
#map-numbers text { fill: #102b43; font-size: 8.3px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: #fff; stroke-width: 2.7px; stroke-linejoin: round; pointer-events: none; }
#map-numbers.hidden-labels { display: none; }
.inset-borders rect { fill: transparent; stroke: var(--line-strong); stroke-width: 1.2; stroke-dasharray: 4 3; pointer-events: none; }
.map-annotations { fill: var(--muted); font-size: 7px; font-weight: 700; }
.map-annotations text { paint-order: stroke; stroke: var(--map-water); stroke-width: 2px; stroke-linejoin: round; }
.map-annotations .north-arrow path { fill: var(--brand-deep); stroke: none; }
.map-annotations .north-arrow text { text-anchor: middle; fill: var(--brand-deep); font-size: 7px; }
.map-legend, .margin-legend { position: absolute; z-index: 2; left: 16px; bottom: 14px; max-width: min(410px, calc(100% - 120px)); padding: 10px 12px; border: 1px solid rgb(199 216 229 / 90%); border-radius: 12px; background: rgb(255 255 255 / 95%); box-shadow: var(--shadow-sm); }
.legend-title, .margin-legend > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 750; }
.legend-items { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; }
.margin-legend { width: 184px; }
.margin-ramp { width: 100%; height: 9px; border-radius: 999px; background: linear-gradient(90deg, #dce8f0, #8bbbd1, var(--brand-deep)); }
.margin-legend > div:last-child { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.zoom-controls { position: absolute; z-index: 2; right: 16px; bottom: 14px; display: grid; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-sm); }
.zoom-controls button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface); cursor: pointer; }
.zoom-controls button:last-child { border-bottom: 0; }
.zoom-controls button:hover { color: var(--brand-deep); background: var(--surface-blue); }
.zoom-controls button svg { width: 17px; height: 17px; }
.map-tooltip { position: absolute; z-index: 8; width: 236px; display: none; pointer-events: none; padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid var(--party, var(--brand)); border-radius: 13px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-pop); }
.map-tooltip.visible { display: block; }
.tooltip-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.tooltip-party { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.map-tooltip h4 { margin: 6px 0 8px; color: var(--ink-strong); font-size: 16px; }
.tooltip-result { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; }
.tooltip-result > span { color: var(--muted); }
.tooltip-result strong { color: var(--ink-strong); font-size: 17px; }
.tooltip-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.popular-vote { padding: 15px 18px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.popular-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.popular-title h3 { margin: 0; color: var(--ink-strong); font-size: 14px; }
.popular-title > span { color: var(--muted); font-size: 11px; }
.popular-parties { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px 14px; }
.vote-party { min-width: 0; }
.vote-party-label { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 6px; margin-bottom: 5px; }
.vote-party-label > span:not(.party-mark) { color: var(--ink); font-size: 12px; font-weight: 750; }
.vote-party-label strong { color: var(--ink-strong); font-size: 12px; }
.vote-bar { height: 6px; overflow: hidden; border-radius: 999px; background: #eaf0f4; }
.vote-bar > span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--party, var(--brand)); }

.insight-panel { overflow: hidden; }
.insight-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.insight-tabs button { min-height: 38px; padding: 6px 7px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.insight-tabs button.active { color: var(--brand-deep); background: var(--surface); box-shadow: 0 1px 4px rgb(21 49 75 / 10%); }
.insight-pane { padding: 14px; }
.detail-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.detail-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--selected, var(--brand)); }
.detail-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.declared-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid #bfe5d1; border-radius: 999px; color: #176c49; background: #eef9f3; font-size: 10px; font-weight: 750; }
.declared-pill svg { width: 13px; height: 13px; }
.declared-pill.pending-pill { border-color: #eedbb7; color: #80602a; background: #fff8e9; }
.detail-heading { padding: 10px 16px 3px; }
.detail-region { color: var(--muted); font-size: 11px; }
.detail-heading h2 { margin: 3px 0 0; color: var(--ink-strong); font-size: 23px; line-height: 1.12; letter-spacing: -.03em; }
.full-constituency-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 16px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--brand-deep); background: var(--surface-soft); font-size: 11px; font-weight: 750; text-decoration: none; }
.full-constituency-link:hover { border-color: #9dc8d8; background: var(--surface-blue); }
.full-constituency-link svg { width: 14px; height: 14px; flex: 0 0 auto; }
.winner-block { display: flex; align-items: center; gap: 12px; margin: 12px 16px 13px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.winner-avatar { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.winner-copy { min-width: 0; display: grid; gap: 1px; }
.winner-copy > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.winner-copy strong { overflow: hidden; color: var(--ink-strong); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.winner-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.elected-check { width: 25px; height: 25px; display: grid; place-items: center; margin-left: auto; border-radius: 50%; color: #16845a; background: #dff4e9; }
.elected-check svg { width: 14px; height: 14px; }
.detail-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 16px 13px; }
.detail-metric { padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.detail-metric > span { display: block; color: var(--muted); font-size: 10px; font-weight: 650; }
.detail-metric strong { display: block; margin-top: 2px; color: var(--ink-strong); font-size: 19px; line-height: 1.2; }
.detail-metric strong small { font-size: 11px; }
.winning-share { margin: 0 16px 13px; }
.share-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.share-label strong { color: var(--ink); font-weight: 650; text-align: right; }
.share-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e8eef3; }
.share-track > span { display: block; height: 100%; border-radius: inherit; background: var(--selected, var(--brand)); }
.poll-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 16px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.poll-facts > div { min-width: 0; padding: 8px 7px; border-right: 1px solid var(--line); }
.poll-facts > div:last-child { border-right: 0; }
.poll-facts span { display: block; color: var(--muted); font-size: 9px; line-height: 1.3; font-weight: 700; }
.poll-facts strong { display: block; margin-top: 2px; color: var(--ink-strong); font-size: 12px; }
.poll-facts strong small { font-size: 10px; }
.cand-block { padding: 11px 16px 13px; border-top: 1px solid var(--line); }
.cand-heading { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.cand-list { display: grid; gap: 3px; }
.cand-row { display: grid; grid-template-columns: 54px minmax(70px, 1fr) 62px 42px; grid-template-rows: auto 4px; align-items: center; column-gap: 7px; row-gap: 3px; padding: 5px 6px; border-radius: 7px; }
.cand-row.is-winner { background: color-mix(in srgb, var(--pc) 13%, white); }
.cand-party { min-width: 0; display: flex; align-items: center; gap: 4px; color: var(--ink); font-size: 10px; font-weight: 750; }
.cand-name { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cand-votes { color: var(--ink); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.cand-share { color: var(--muted); font-size: 10px; text-align: right; }
.cand-bar { grid-column: 2 / -1; height: 4px; overflow: hidden; border-radius: 999px; background: #eaf0f4; }
.cand-bar i { display: block; height: 100%; border-radius: inherit; background: var(--pc); }
.cand-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.station-details { margin: 0 13px 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.station-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; cursor: pointer; list-style: none; }
.station-details > summary::-webkit-details-marker { display: none; }
.station-summary-copy { min-width: 0; display: grid; gap: 3px; }
.station-summary-copy strong { color: var(--ink-strong); font-size: 12px; }
.station-summary-copy small { color: var(--muted); font-size: 10px; }
.station-details > summary > svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--muted); transition: transform .16s ease; }
.station-details[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.station-details[open] > summary > svg { transform: rotate(90deg); }
.station-details-content { padding: 10px; }
.station-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.station-search { min-width: 0; height: 35px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.station-search > svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--muted-light); }
.station-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.station-search input::placeholder { color: var(--muted-light); }
.station-share { min-height: 35px; gap: 5px; padding: 0 9px; border-radius: 8px; font-size: 10px; }
.station-share svg { width: 13px; height: 13px; }
.station-source-note { margin: 8px 1px; color: var(--muted-light); font-size: 9px; line-height: 1.4; }
.station-list { display: grid; max-height: 250px; overflow: auto; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; list-style: none; }
.station-item { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: start; gap: 7px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.station-item:last-child { border-bottom: 0; }
.station-item:nth-child(even) { background: var(--surface-soft); }
.station-number { color: var(--brand-deep); font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.station-name { color: var(--ink); font-size: 10px; line-height: 1.35; }
.station-filter-count { margin-top: 7px; color: var(--muted); font-size: 9px; text-align: right; }
.detail-navigation { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.detail-navigation button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 0; border-radius: 7px; color: var(--brand-deep); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.detail-navigation button:hover { background: var(--brand-soft); }
.detail-navigation svg { width: 13px; height: 13px; }
.detail-navigation .flip { transform: rotate(180deg); }
.detail-navigation > span { color: var(--muted); font-size: 11px; }
.pending-detail { display: grid; justify-items: center; padding: 42px 22px; text-align: center; }
.pending-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 20px; }
.pending-detail h3 { margin: 12px 0 4px; color: var(--ink-strong); font-size: 16px; }
.pending-detail p { max-width: 280px; margin: 0; color: var(--muted); font-size: 13px; }

.close-races-card, .swing-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.card-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; }
.card-section-heading h3 { margin: 3px 0 0; color: var(--ink-strong); font-size: 20px; line-height: 1.2; }
.live-pulse { width: 9px; height: 9px; }
.close-race-list { display: grid; }
.close-race { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 12px 15px; border: 0; border-top: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: background .16s ease; }
.close-race:hover, .swing-row:hover { background: var(--surface-soft); }
.close-rank { color: var(--muted-light); font-size: 12px; font-weight: 750; }
.close-copy { min-width: 0; display: grid; gap: 3px; }
.close-name { overflow: hidden; color: var(--ink-strong); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.close-copy small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; }
.close-margin { display: grid; justify-items: end; }
.close-margin strong { color: var(--ink-strong); font-size: 14px; font-variant-numeric: tabular-nums; }
.close-margin small { color: var(--muted); font-size: 9px; }
.view-all-button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); color: var(--brand-deep); background: var(--surface-soft); cursor: pointer; font-size: 12px; font-weight: 700; }
.view-all-button:hover { background: var(--brand-soft); }
.view-all-button svg { width: 16px; height: 16px; }
.swing-card { margin-top: 12px; }
.swing-row { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.swing-row > b { color: var(--muted-light); font-size: 11px; }
.swing-row > div { min-width: 0; display: grid; }
.swing-row > div span { overflow: hidden; color: var(--ink-strong); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.swing-row > div small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.swing-row em { color: var(--brand-deep); font-size: 13px; font-style: normal; font-weight: 750; }
.compare-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.compare-card .card-section-heading { padding-bottom: 8px; }
.compare-badge { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--brand-deep); background: var(--brand-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.compare-intro { margin: 0; padding: 0 16px 13px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.compare-selectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.compare-selectors label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 750; }
.compare-selectors select { width: 100%; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 11px; }
.compare-content { padding: 13px; }
.compare-empty { display: grid; justify-items: center; gap: 7px; min-height: 122px; align-content: center; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); text-align: center; }
.compare-empty strong { color: var(--ink-strong); font-size: 12px; }
.compare-empty span { max-width: 240px; font-size: 11px; line-height: 1.45; }
.compare-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.compare-side { min-width: 0; padding: 10px; border: 1px solid var(--line); border-top: 3px solid var(--party, var(--brand)); border-radius: 11px; background: var(--surface); }
.compare-side-kicker { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.compare-side h4 { overflow: hidden; margin: 3px 0 9px; color: var(--ink-strong); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compare-member { min-width: 0; display: flex; align-items: center; gap: 7px; }
.compare-member > span:last-child { min-width: 0; display: grid; gap: 2px; }
.compare-member strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compare-member small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.compare-locate { display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; padding: 4px 0 0; border: 0; color: var(--brand-deep); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.compare-locate:hover { text-decoration: underline; }
.compare-locate svg { width: 12px; height: 12px; }
.compare-metrics { margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.compare-column-head, .compare-metric-row { display: grid; grid-template-columns: minmax(0, 1fr) 63px 63px; align-items: center; gap: 6px; }
.compare-column-head { padding: 0 0 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 750; }
.compare-column-head > :nth-child(n+2), .compare-metric-row > strong { text-align: right; }
.compare-metric-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.compare-metric-row:last-child { padding-bottom: 0; border-bottom: 0; }
.compare-metric-label { color: var(--ink); font-size: 10px; font-weight: 650; }
.compare-metric-row > strong { color: var(--ink-strong); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare-bars { grid-column: 1 / -1; display: grid; gap: 3px; }
.compare-bars i { width: var(--bar-width); height: 4px; display: block; border-radius: 999px; background: var(--party, var(--brand)); }
.compare-note { margin: 9px 1px 0; color: var(--muted-light); font-size: 9px; line-height: 1.4; }
.source-note { display: flex; align-items: center; gap: 9px; margin: 12px 2px 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface-soft); font-size: 11px; font-weight: 650; }
.source-note small { color: var(--muted); font-size: 10px; font-weight: 450; }
.source-check { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #16845a; background: #e2f5eb; }
.source-check svg { width: 13px; height: 13px; }
.source-note button { width: 28px; height: 28px; display: grid; place-items: center; margin-left: auto; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.source-note button:hover { color: var(--brand-deep); background: var(--brand-soft); }
.source-note button svg { width: 16px; height: 16px; }

.party-mark { width: 28px; height: 28px; flex: 0 0 auto; display: inline-grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.party-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.party-mark--text { color: var(--ink); background: var(--surface-soft); font-size: 9px; font-weight: 800; letter-spacing: 0; }
.party-mark--legend { width: 23px; height: 23px; border-radius: 6px; }
.party-mark--seat { width: 30px; height: 30px; border-radius: 8px; }
.party-mark--vote { width: 22px; height: 22px; border-radius: 6px; }
.party-mark--winner { width: 100%; height: 100%; border: 0; border-radius: 11px; }
.party-mark--candidate { width: 22px; height: 22px; border-radius: 6px; }
.party-mark--tiny, .party-mark--tooltip { width: 18px; height: 18px; border-radius: 5px; vertical-align: middle; }
.party-mark--search { width: 28px; height: 28px; border-radius: 7px; }
.party-mark--table { width: 23px; height: 23px; border-radius: 6px; }
.party-mark--table + span { color: var(--ink); font-size: 11px; font-weight: 700; }
.table-party { display: inline-flex; align-items: center; gap: 5px; }

.replay-bar { position: fixed; z-index: 30; left: 50%; bottom: 18px; width: min(960px, calc(100% - 28px)); display: grid; grid-template-columns: auto 38px auto minmax(100px, 1fr) 42px 34px; align-items: center; gap: 13px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-pop); transform: translateX(-50%); }
.replay-live { display: inline-flex; align-items: center; gap: 7px; color: #176c49; font-size: 11px; font-weight: 750; white-space: nowrap; }
.replay-live > span { width: 8px; height: 8px; border-radius: 50%; background: #29a46a; }
.replay-play, .replay-close { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; color: var(--brand-deep); background: var(--brand-soft); cursor: pointer; }
.replay-play:hover, .replay-close:hover { background: #d1edf5; }
.replay-time { display: grid; line-height: 1.25; }
.replay-time strong { color: var(--ink-strong); font-size: 11px; white-space: nowrap; }
.replay-time span { color: var(--muted); font-size: 10px; }
.replay-bar input[type="range"] { width: 100%; accent-color: var(--brand); }
.replay-speed { border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface-soft); cursor: pointer; font-size: 11px; font-weight: 750; }
.replay-close { color: var(--muted); background: transparent; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 24px; max-width: calc(100% - 24px); padding: 11px 16px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-pop); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(14 35 54 / 38%); backdrop-filter: blur(4px); }
.modal { width: min(1080px, 100%); max-height: min(92vh, 900px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-pop); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; color: var(--ink-strong); font-size: 23px; line-height: 1.2; }
.results-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.modal-search { min-width: 210px; height: 39px; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); }
.modal-search svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--muted-light); }
.results-filters select { height: 39px; min-width: 145px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 12px; }
.export-button { min-height: 39px; }
.results-table-wrap { min-height: 120px; overflow: auto; }
.results-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.results-table th { position: sticky; z-index: 1; top: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f6fafc; font-size: 11px; font-weight: 750; text-align: left; }
.results-table td { padding: 9px 12px; border-bottom: 1px solid #edf2f6; color: var(--ink); font-size: 12px; }
.results-table tbody tr { cursor: pointer; }
.results-table tbody tr:hover { background: var(--surface-blue); }
.results-table td:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.table-row-arrow { width: 14px; height: 14px; color: var(--muted-light); }
.empty-results { padding: 28px; color: var(--muted); text-align: center; }
.modal-footer { display: flex; justify-content: space-between; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); background: var(--surface-soft); font-size: 11px; }
.about-modal { width: min(760px, 100%); }
.about-content { overflow: auto; padding: 21px 24px 25px; }
.about-mark { display: inline-grid; place-items: center; width: 62px; height: 52px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.about-mark .brand-mark { width: 40px; height: 29px; }
.about-content h3 { margin: 0 0 9px; color: var(--ink-strong); font-size: 22px; line-height: 1.25; }
.about-content p { color: var(--muted); font-size: 13px; line-height: 1.68; }
.about-content h4 { margin: 18px 0 4px; color: var(--ink-strong); font-size: 14px; }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 17px 0; }
.about-stats > div { display: grid; gap: 3px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.about-stats strong { color: var(--ink-strong); font-size: 17px; }
.about-stats span { color: var(--muted); font-size: 10px; }
.about-links { display: grid; gap: 8px; margin-top: 16px; }
.about-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand-deep); background: var(--surface-soft); font-size: 12px; font-weight: 700; text-decoration: none; }
.about-links a:hover { background: var(--brand-soft); }
.about-links svg { width: 15px; height: 15px; }
.about-content .about-disclaimer { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; }

@media (max-width: 1250px) {
  .app-shell { padding-right: 20px; padding-left: 20px; }
  .national-panel { grid-template-columns: minmax(200px, .8fr) minmax(420px, 1.7fr); }
  .turnout-block { grid-column: 1 / -1; justify-content: flex-start; padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .turnout-ring { width: 75px; height: 75px; flex-basis: 75px; }
  .turnout-ring::before { inset: 5px; }
  .turnout-ring strong { font-size: 17px; }
  .workspace { grid-template-columns: minmax(0, 1.3fr) minmax(315px, .8fr); }
  .map-toolbar { align-items: flex-start; flex-direction: column; }
  .map-tools { width: 100%; justify-content: flex-start; }
  .search-wrap { margin-left: auto; width: min(280px, 36vw); }
}
@media (max-width: 920px) {
  .app-shell { padding-right: 14px; padding-left: 14px; }
  .topbar { flex-wrap: wrap; gap: 12px 18px; padding: 12px 0; }
  .topbar-context { margin-right: auto; }
  .topbar-actions { margin-left: 0; }
  .workspace { grid-template-columns: 1fr; }
  .map-stage { height: min(60vw, 520px); min-height: 360px; }
  .insight-panel { display: grid; grid-template-columns: 1fr; }
  .national-panel { grid-template-columns: 1fr; gap: 18px; }
  .verdict-block { padding: 0 0 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .turnout-block { grid-column: auto; padding-top: 15px; }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .app-shell { padding: 0 10px 22px; }
  .topbar { gap: 10px; }
  .brand-mark { width: 32px; height: 23px; }
  .brand-type strong { font-size: 12px; }
  .brand-type > span { font-size: 10px; }
  .topbar-context { order: 3; flex-basis: 100%; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
  .context-divider { height: 14px; }
  .topbar-actions { gap: 6px; margin-left: auto; }
  .result-status { margin: 0; padding: 6px 8px; font-size: 10px; }
  .button { min-height: 36px; padding: 0 9px; font-size: 11px; }
  .button-replay span, .button-fullscreen span { display: none; }
  .button-replay, .button-fullscreen { width: 36px; padding: 0; }
  .icon-button { width: 36px; height: 36px; }
  .national-panel { gap: 15px; margin: 12px 0; padding: 17px 14px; border-radius: 17px; }
  .verdict-block h1 { font-size: 27px; }
  .verdict-block p { font-size: 13px; }
  .assembly-heading { align-items: flex-start; font-size: 11px; }
  .assembly-heading > span:first-child { font-size: 12px; }
  .assembly-heading > span:last-child { text-align: right; }
  .party-seat-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .party-seat:last-child { grid-column: 1 / -1; }
  .party-seat { padding: 8px; }
  .party-seat small { font-size: 10px; }
  .turnout-block { gap: 12px; }
  .workspace { gap: 12px; }
  .map-card, .insight-panel { border-radius: 16px; }
  .map-toolbar { gap: 12px; padding: 14px; }
  .map-title h2 { font-size: 18px; }
  .map-title > span { font-size: 11px; }
  .map-tools { flex-wrap: wrap; gap: 5px; }
  .segment-control button { padding: 0 9px; }
  .search-wrap { order: 5; flex-basis: 100%; width: 100%; margin-left: 0; }
  .map-stage { height: 62vw; min-height: 300px; max-height: 430px; }
  #map-numbers text { font-size: 9px; }
  .map-legend, .margin-legend { left: 9px; bottom: 9px; max-width: calc(100% - 66px); padding: 8px 9px; }
  .legend-items { gap: 5px 8px; }
  .legend-item { font-size: 10px; }
  .party-mark--legend { width: 20px; height: 20px; }
  .zoom-controls { right: 9px; bottom: 9px; }
  .zoom-controls button { width: 34px; height: 34px; }
  .popular-vote { padding: 13px 12px 15px; }
  .popular-parties { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .insight-tabs { padding: 8px; }
  .insight-pane { padding: 9px; }
  .detail-heading h2 { font-size: 21px; }
  .detail-topline { padding: 13px 13px 0; }
  .winner-block { margin: 11px 13px; }
  .detail-metrics, .winning-share, .poll-facts { margin-right: 13px; margin-left: 13px; }
  .cand-block { padding-right: 13px; padding-left: 13px; }
  .cand-row { grid-template-columns: 48px minmax(62px, 1fr) 58px 38px; column-gap: 5px; }
  .cand-name { font-size: 10px; }
  .cand-votes { font-size: 10px; }
  .cand-party { font-size: 9px; }
  .poll-facts > div { padding: 7px 5px; }
  .poll-facts span { font-size: 8px; }
  .poll-facts strong { font-size: 11px; }
  .close-race { padding: 11px 10px; }
  .source-note { margin-top: 9px; }
  .replay-bar { bottom: 8px; grid-template-columns: 34px 36px minmax(76px, auto) 1fr 36px; gap: 7px; padding: 8px; border-radius: 13px; }
  .replay-live { width: 30px; overflow: hidden; font-size: 0; }
  .replay-live > span { flex: 0 0 8px; }
  .replay-play { width: 34px; height: 34px; }
  .replay-time strong { font-size: 9px; }
  .replay-time span { font-size: 9px; }
  .replay-bar input[type="range"] { min-width: 30px; }
  .replay-speed { display: none; }
  .replay-close { width: 30px; height: 30px; }
  .modal-backdrop { padding: 8px; }
  .modal { max-height: 96vh; border-radius: 15px; }
  .modal-header { padding: 15px; }
  .modal-header h2 { font-size: 20px; }
  .results-filters { padding: 10px; }
  .results-filters select { min-width: calc(50% - 5px); flex: 1; font-size: 11px; }
  .modal-search { flex-basis: 100%; }
  .export-button { flex: 1; }
  .modal-footer { padding: 10px; font-size: 10px; }
  .about-content { padding: 16px; }
  .about-content h3 { font-size: 19px; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
