:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #8a93a3;
  --line: #e5e7eb;
  --brand: #c4170c;
  --brand-ink: #ffffff;
  --crust: #e8b04a;
  --ok: #138a4a;
  --warn: #b45309;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 4px 16px rgba(17, 24, 39, .05);
  --slice-gap: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a21; --surface-2: #1d2129; --ink: #f3f4f6; --ink-2: #b6bcc8;
    --ink-3: #7c8494; --line: #2a2f3a; --brand: #d9271a; --shadow: none; --slice-gap: #171a21;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a21; --surface-2: #1d2129; --ink: #f3f4f6; --ink-2: #b6bcc8;
  --ink-3: #7c8494; --line: #2a2f3a; --brand: #d9271a; --shadow: none; --slice-gap: #171a21;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- masthead ---------- */
.masthead { background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 20; }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
/* tema clássico: o selo de antes */
:root[data-pz="classico"] .brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: conic-gradient(#fff 0 38%, rgba(255,255,255,.55) 38% 70%, rgba(255,255,255,.3) 70% 100%);
  box-shadow: 0 0 0 3px var(--crust);
}
/* tema pizzaria: toalha xadrez de cantina embaixo do cabeçalho */
:root[data-pz="pizzaria"] .masthead::after {
  content: ""; display: block; height: 8px;
  background: repeating-conic-gradient(#ffffff 0 25%, #f6c9c4 0 50%) 0 0 / 16px 16px;
}
.seg.seg-dark { background: rgba(0,0,0,.18); border-color: rgba(255,255,255,.25); align-items: center; }
.seg-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .75; padding: 0 6px 0 8px; }
.seg.seg-dark button { color: rgba(255,255,255,.85); padding: 4px 10px; font-size: 12px; }
.seg.seg-dark button[aria-pressed="true"] { background: #fff; color: var(--brand); }
.brand h1 { margin: 0; font: 800 22px/1.1 "Roboto Slab", Georgia, serif; letter-spacing: -.01em; }
.brand-sub { margin: 2px 0 0; font-size: 12.5px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { display: flex; align-items: center; gap: 8px; flex: none; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: rgba(0,0,0,.18); font-weight: 700; font-size: 12px; letter-spacing: .06em; white-space: nowrap;
}
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
.live-pill.offline .dot { animation: none; background: #fcd34d; }
.live-pill.done .dot { animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.refresh {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.4); background: transparent;
  color: inherit; border-radius: 999px; padding: 5px 10px; font: 600 12px Inter, sans-serif; cursor: pointer;
}
.refresh:hover { background: rgba(255,255,255,.12); }
.refresh.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: transparent; color: rgba(255,255,255,.82); font: 600 14px Inter, sans-serif;
  padding: 10px 14px 12px; cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent;
}
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }

main { padding-top: 18px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

.banner { border-radius: 10px; padding: 10px 14px; font-size: 13.5px; background: #fff7e6; color: #7a4b00; border: 1px solid #f5d79e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner { background: #2a2210; color: #f5d79e; border-color: #4a3a14; } }

/* ---------- progress ---------- */
.progress-card, .pizza-card, .cands-card, .stats, .block {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.progress-card { padding: 16px 18px; }
.progress-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.progress-num { font: 800 34px/1 Inter, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.progress-label { color: var(--ink-2); font-weight: 500; margin-left: 4px; }
.progress-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.updated { color: var(--ink-3); font-size: 13px; }
.uf-picker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.uf-picker select, .search {
  font: 600 14px Inter, sans-serif; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px;
}
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); margin-top: 12px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #f05a28); border-radius: 99px; transition: width .8s ease; }

/* ---------- headline ---------- */
.headline { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.card-title { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; }
.pizza-card, .cands-card { padding: 18px; }
.pizza-main { max-width: 360px; margin: 0 auto; }
.pizza-main svg { width: 100%; height: auto; display: block; }
.legend { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }

.cands { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cand { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.cand:last-child { border-bottom: 0; }
.photo {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--surface-2); flex: none;
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 17px; border: 3px solid var(--c, var(--line));
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand-name { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-sub { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.cand-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--c); transition: width .8s ease; }
.cand-pct { text-align: right; }
.cand-pct b { font: 800 24px/1 Inter, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cand-pct small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; letter-spacing: .02em; }
.tag.eleito { background: #dcfce7; color: #166534; }
.tag.turno2 { background: #fef3c7; color: #92400e; }
.tag.sub { background: #fee2e2; color: #991b1b; }
.cand.compact { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 7px 4px; }
.cand.compact .photo { width: 40px; height: 40px; font-size: 14px; border-width: 2px; }
.cand.compact .cand-pct b { font-size: 18px; }
.more-btn { margin-top: 8px; width: 100%; border: 1px dashed var(--line); background: transparent; color: var(--ink-2); border-radius: 8px; padding: 8px; font: 600 13px Inter, sans-serif; cursor: pointer; }

/* ---------- chance de vitória ---------- */
.chance { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 8px; }
.chance-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.chance-h b { font-size: 14px; }
.chance .est { font-size: 12px; color: var(--ink-3); cursor: help; border-bottom: 1px dotted var(--ink-3); }
.chance-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--line); }
.chance-bar i { display: block; height: 100%; transition: width .6s ease; }
.chance-bar i + i { box-shadow: inset 2px 0 0 var(--surface-2); }
.runoff { background: repeating-linear-gradient(45deg, var(--ink-3) 0 3px, color-mix(in srgb, var(--ink-3) 35%, transparent) 3px 6px) !important; }
.chance-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chance-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.chance-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chance-list b { font-variant-numeric: tabular-nums; }
.mini-meter { width: 46px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; display: block; }
.mini-meter i { display: block; height: 100%; }
.tag.chance-tag { display: table; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); margin: 3px 0 0; cursor: help; font-variant-numeric: tabular-nums; }
.chance-lp { color: var(--brand) !important; font-weight: 600; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 4px; }
.stat { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat-label { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font: 700 20px/1.2 Inter, sans-serif; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat-sub { color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- blocks ---------- */
.block { padding: 18px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.block-head h2 { margin: 0; font: 800 20px/1.2 "Roboto Slab", Georgia, serif; }
.block-head p { margin: 0; color: var(--ink-3); font-size: 13px; }

.regions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.region { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.region-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.region-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.region-head span { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.region-pizza { width: 100%; max-width: 150px; margin: 0 auto; }
.region-pizza svg { width: 100%; height: auto; display: block; }
.region-lead { font-size: 12.5px; display: grid; gap: 3px; }
.region-lead div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.region-lead .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-lead b { font-variant-numeric: tabular-nums; }
.states { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
.state {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 5px 3px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; color: inherit; min-width: 0;
}
.state:hover { border-color: var(--ink-3); }
.state.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.state svg { width: 40px; height: 40px; display: block; }
.state .uf { font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.state .lp { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.state.big { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 6px 8px; text-align: left; }
.state.big svg { width: 44px; height: 44px; flex: none; }
.state.big .txt { min-width: 0; display: grid; }
.state.big .pty { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); padding-left: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state.big .pty2 { font-weight: 700; color: var(--ink-2); }
.state.big .ldr { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regions.by-state .states { grid-template-columns: 1fr; }
.state.sen { align-items: flex-start; }
.state.sen .txt { gap: 2px; width: 100%; }
.sen-ln { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; column-gap: 5px; align-items: center; font-size: 11.5px; line-height: 1.25; }
.sen-ln .sw { width: 8px; height: 8px; grid-row: span 2; }
.state.sen svg { width: 34px; height: 34px; }
.state.sen { gap: 6px; padding: 6px; }
.sen-ln .sn { font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.sen-ln .sp { grid-column: 2; font-size: 10px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sen-ln b { grid-row: 1 / span 2; grid-column: 3; font-variant-numeric: tabular-nums; font-size: 12px; }
.sen-ln.out { opacity: .55; border-top: 1px dashed var(--line); padding-top: 2px; }
.sen-ln.out .sn { font-weight: 500; }

/* ---------- mapa ---------- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--ink-2); font: 600 13px Inter, sans-serif; padding: 6px 12px;
  border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.map-wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.map svg { width: 100%; height: auto; display: block; max-height: 640px; }
.map .st { stroke: var(--surface); stroke-width: .9; stroke-linejoin: round; cursor: pointer; transition: fill .5s ease, fill-opacity .5s ease; }
.map .st:hover { stroke: var(--ink); stroke-width: 1.4; }
.map .hl { fill: none; stroke: var(--ink); stroke-width: 2.2; pointer-events: none; }
.map .lbl { font: 800 9px Inter, sans-serif; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.35); stroke-width: 2px; pointer-events: none; }
.map .lbl.dim { fill: var(--ink-2); stroke: var(--surface); stroke-width: 2.5px; }
.map .rlbl { pointer-events: none; }
.map .rlbl rect { fill: var(--surface); stroke: var(--line); }
.map .rlbl text { font: 700 11px Inter, sans-serif; fill: var(--ink); }
.map .rlbl text.s { font-weight: 500; font-size: 10px; fill: var(--ink-2); }
.map .pz { cursor: pointer; }
.map-side { display: grid; gap: 14px; min-width: 0; }
.map-side h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.lead-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lead-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.lead-list li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lead-list li .ct { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 12.5px; }
.lead-list .sw { width: 12px; height: 12px; }
.scale { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.scale i { flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--ink-2) 25%, transparent), var(--ink-2)); }
.region-rows { display: grid; gap: 6px; }
.region-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); }
.region-row svg { width: 44px; height: 44px; display: block; }
.region-row b { display: block; font-size: 13.5px; }
.region-row .ln { font-size: 12.5px; color: var(--ink-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-note { font-size: 12px; color: var(--ink-3); margin: 0; }

.map-ctrls { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.map .mun { stroke: var(--surface); stroke-width: .35; stroke-linejoin: round; transition: fill .5s ease, fill-opacity .5s ease; }
.map .mun:hover { stroke: var(--ink); stroke-width: 1.2; }
.map .inset-box { fill: none; stroke: var(--line); stroke-dasharray: 3 3; }
.map-back { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: 600 13px Inter, sans-serif; cursor: pointer; justify-self: start; }
.loading-bar { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.loading-bar > i { display: block; height: 100%; background: var(--brand); transition: width .3s ease; }

.hatch-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  border-radius: 10px; padding: 6px 12px; font: 600 13px Inter, sans-serif; cursor: pointer;
}
.hatch-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink-2); }
.hs {
  width: 16px; height: 16px; border-radius: 4px; flex: none; display: inline-block; border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, var(--ink-2) 0 var(--s, 2px), color-mix(in srgb, var(--ink-2) 14%, transparent) var(--s, 2px) 6px);
}
.hs.full { background: var(--ink-2); }
.hatch-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }

/* ---------- table ---------- */
.search { min-width: 260px; font-weight: 500; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { background: var(--surface-2); color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; cursor: pointer; user-select: none; }
.tbl th.r, .tbl td.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th[data-dir="asc"]::after { content: " ▲"; font-size: 9px; }
.tbl th[data-dir="desc"]::after { content: " ▼"; font-size: 9px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tr.group td { background: var(--surface-2); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.tbl tr.clickable { cursor: pointer; }
.lead-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.mini-bar { display: inline-block; width: 70px; height: 6px; border-radius: 99px; background: var(--surface-2); vertical-align: middle; margin-left: 8px; overflow: hidden; border: 1px solid var(--line); }
.mini-bar > i { display: block; height: 100%; }
.table-more { text-align: center; }
.table-more:empty { display: none; }
.table-more button { margin-top: 12px; }
.muted { color: var(--ink-3); }
.empty { padding: 30px; text-align: center; color: var(--ink-3); }

.foot { color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 8px 0; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; background: #111827; color: #fff; padding: 10px 12px; border-radius: 12px;
  font-size: 12.5px; box-shadow: 0 10px 30px rgba(0,0,0,.3); width: max-content; max-width: min(300px, calc(100vw - 20px));
}
.tooltip.pinned { pointer-events: auto; }
.tooltip b { font-variant-numeric: tabular-nums; }
.tip-h { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.tip-h b { font-size: 14px; }
.tip-h span { font-size: 11.5px; opacity: .65; white-space: nowrap; }
.tip-s { opacity: .85; font-variant-numeric: tabular-nums; }
.tip-r { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 3px 0; }
.tip-r .sw { width: 10px; height: 10px; }
.tip-r .tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-r .tv { opacity: .6; font-variant-numeric: tabular-nums; font-size: 11.5px; text-align: right; min-width: 64px; }
.tip-f { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.15); font-size: 11.5px; opacity: .8; }
.tip-btn { margin-top: 9px; width: 100%; background: #fff; color: #111827; border: 0; border-radius: 8px; padding: 8px; font: 700 13px Inter, sans-serif; cursor: pointer; }
.region-head[data-tipk] { cursor: help; }

.slice { transition: transform .15s ease; transform-origin: center; transform-box: view-box; cursor: default; }
.slice:hover { transform: scale(1.035); }
.skeleton { opacity: .5; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .regions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .headline { grid-template-columns: 1fr; }
  .map-wrap { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .regions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .brand h1 { font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-sub { display: none; }
  .masthead-row { flex-wrap: wrap; }
  .live { width: 100%; justify-content: space-between; }
  .progress-num { font-size: 28px; }
  .regions { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
  .cand-pct b { font-size: 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
