/* Apuração 2026 — design tokens
   Tese visual: noite de apuração. Tinta azul-petróleo quase preta, texto em off-white quente,
   acento amarelo-ouro (verde só para "ao vivo"), números em mono tabular, cartões planos com
   borda fina e raio médio. Movimento: 150–250ms ease-out, contagem 700ms, sem bounce. */
:root {
  --bg: #090d12;
  --bg-2: #0d1319;
  --surface: #111922;
  --surface-2: #17212c;
  --surface-3: #1e2b38;
  --line: #243242;
  --line-soft: #1a2530;
  --text: #eef0ea;
  --text-2: #a9b4bf;
  --text-3: #75828f;
  --gold: #f5c542;
  --gold-ink: #1a1405;
  --green: #35d489;
  --red: #ff6b5e;
  --warn: #f0a93a;

  --reg-norte: #35d489;
  --reg-nordeste: #f5c542;
  --reg-centro: #a78bfa;
  --reg-sudeste: #4aa8ff;
  --reg-sul: #ff7eb6;
  --reg-exterior: #9aa8b5;

  --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-2: 0 24px 60px -20px rgba(0,0,0,.8);

  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 150ms; --t-med: 240ms; --t-slow: 420ms;
  --gutter: 16px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* grão sutil de fundo */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(245,197,66,.07), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(74,168,255,.06), transparent 60%),
    var(--bg);
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(9,13,18,.82); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line-soft); }
.topbar__in { max-width: var(--maxw); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: 18px; white-space: nowrap; }
.brand b { font-weight: 800; color: var(--gold); }
.brand__mark { width: 28px; height: 28px; border-radius: 8px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; }
.brand__mark svg { width: 18px; height: 18px; }
.nav { display: flex; gap: 2px; margin-left: var(--s3); flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; padding: 6px 12px; border-radius: 99px; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.is-active { background: var(--surface-3); color: var(--text); }
.live { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; white-space: nowrap; margin-left: auto; }
.live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); position: relative; }
.live[data-s="live"] { color: var(--green); border-color: rgba(53,212,137,.35); }
.live[data-s="live"] .live__dot { background: var(--green); }
.live[data-s="live"] .live__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); animation: pulse 1.8s var(--ease) infinite; }
.live[data-s="wait"] { color: var(--gold); border-color: rgba(245,197,66,.3); }
.live[data-s="wait"] .live__dot { background: var(--gold); }
.live[data-s="off"] { color: var(--red); }
.live[data-s="off"] .live__dot { background: var(--red); }
@keyframes pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

.banner { max-width: var(--maxw); margin: var(--s3) auto 0; padding: 10px 14px; width: calc(100% - 2 * var(--gutter)); display: flex; gap: 10px; align-items: flex-start; color: var(--warn); background: rgba(240,169,58,.08); border: 1px solid rgba(240,169,58,.25); border-radius: var(--r-sm); font-size: 13.5px; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) var(--s8); }
.sec { padding-top: var(--s7); }
.sec__head { margin-bottom: var(--s4); }
.eyebrow { font: 600 11.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
h2 { font: 700 clamp(24px, 4.5vw, 34px)/1.1 var(--font-display); letter-spacing: -.02em; }
.sec__sub { color: var(--text-2); margin-top: 6px; font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); box-shadow: var(--shadow-1); }

/* ---------- hero ---------- */
.hero { padding-top: var(--s6); }
.hero__grid { display: grid; gap: var(--s4); }
.hero__main { position: relative; overflow: hidden; padding: var(--s5) var(--s4); border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--surface) 55%); }
.hero__main::after { content: "26"; position: absolute; right: -12px; bottom: -48px; font: 800 220px/1 var(--font-display); color: rgba(245,197,66,.05); letter-spacing: -.06em; pointer-events: none; }
.hero h1 { font: 800 clamp(30px, 7vw, 54px)/1.02 var(--font-display); letter-spacing: -.03em; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero__lead { margin-top: var(--s3); color: var(--text-2); max-width: 46ch; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: var(--s5); max-width: 520px; position: relative; z-index: 1; }
.count__u { background: rgba(9,13,18,.55); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 6px 10px; text-align: center; }
.count__n { display: block; font: 600 clamp(28px, 8vw, 52px)/1 var(--font-mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--text); }
.count__n.tick { animation: tick var(--t-med) var(--ease); }
@keyframes tick { from { transform: translateY(-6px); opacity: .3; } to { transform: none; opacity: 1; } }
.count__l { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.hero__when { margin-top: var(--s4); font-size: 13px; color: var(--text-3); position: relative; z-index: 1; }

.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(3, 1fr); }
.stat { padding: var(--s4) var(--s3); }
.stat__k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; }
.stat__v { display: block; margin-top: 6px; font: 600 clamp(18px, 4.6vw, 30px)/1.1 var(--font-mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat__s { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.stat--gold .stat__v { color: var(--gold); }

.hero--live .hero__main { display: grid; gap: var(--s5); }
.leadbox { display: flex; gap: var(--s4); align-items: center; position: relative; z-index: 1; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 900ms var(--ease); }
.ring__c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__c b { font: 600 22px/1 var(--font-mono); letter-spacing: -.04em; }
.ring__c span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-top: 3px; }
.leadbox__t { min-width: 0; }
.leadbox__t .eyebrow { margin-bottom: 4px; }
.leadbox__name { font: 700 clamp(22px, 5vw, 34px)/1.05 var(--font-display); letter-spacing: -.02em; }
.leadbox__pct { font: 600 15px var(--font-mono); color: var(--text-2); margin-top: 6px; }
.duo { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-3); position: relative; z-index: 1; }
.duo i { display: block; height: 100%; transition: width 900ms var(--ease); min-width: 0; }
.duo i + i { margin-left: 2px; }
.duo__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); position: relative; z-index: 1; }
.duo__legend span { display: inline-flex; align-items: center; gap: 6px; }
.duo__legend i { width: 9px; height: 9px; border-radius: 3px; }

/* ---------- race ---------- */
.race { display: grid; gap: var(--s4); }
.prog { padding: var(--s4); }
.prog__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prog__top b { font: 600 22px var(--font-mono); letter-spacing: -.04em; }
.prog__top span { font-size: 13px; color: var(--text-2); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; transition: transform 900ms var(--ease); border-radius: 99px; }
.cands { display: grid; gap: 10px; position: relative; }
.cand { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 14px; align-items: center; padding: 12px 14px 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; --c: var(--gold); }
.cand::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.cand.is-lead { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, var(--surface)), var(--surface) 70%); border-color: color-mix(in srgb, var(--c) 40%, var(--line-soft)); }
.photo { width: 56px; height: 70px; border-radius: 10px; overflow: hidden; background: var(--surface-3); position: relative; grid-row: span 2; align-self: start; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: relative; }
.photo b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 18px var(--font-display); color: #fff; background: var(--c); }
.cand__who { min-width: 0; align-self: end; }
.cand__name { font: 600 16px/1.2 var(--font-display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand__meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.tag { font: 600 11px var(--font-mono); padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.tag--num { background: color-mix(in srgb, var(--c) 22%, var(--surface-3)); color: var(--text); }
.tag--ok { background: rgba(53,212,137,.15); color: var(--green); }
.tag--r2 { background: rgba(245,197,66,.15); color: var(--gold); }
.cand__pct { text-align: right; align-self: end; }
.cand__pct b { font: 600 24px/1 var(--font-mono); letter-spacing: -.05em; }
.cand__pct small { font-size: .55em; color: var(--text-2); margin-left: 1px; }
.cand__v { grid-column: 2 / 4; display: flex; align-items: center; gap: 12px; align-self: start; }
.cand__bar { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.cand__bar i { display: block; height: 100%; background: var(--c); transform-origin: left; transition: transform 900ms var(--ease); border-radius: 99px; }
.cand__votes { font: 500 13px var(--font-mono); color: var(--text-2); letter-spacing: -.03em; min-width: 9ch; text-align: right; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fact { padding: 12px 14px; }
.fact__k { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.fact__v { display: block; font: 600 19px/1.2 var(--font-mono); letter-spacing: -.04em; margin-top: 4px; }
.fact__s { font-size: 12px; color: var(--text-2); font-family: var(--font-mono); }
.empty { padding: var(--s5); text-align: center; color: var(--text-2); border: 1px dashed var(--line); border-radius: var(--r-md); font-size: 14px; }

/* ---------- map ---------- */
.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 99px; margin-bottom: var(--s4); max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 99px; color: var(--text-2); font-weight: 500; font-size: 13.5px; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.mapwrap { display: grid; gap: var(--s4); }
.tilemap { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(8, 1fr); gap: 5px; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 6 / 7.3; }
.tile { position: relative; border: 1px solid transparent; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; color: var(--text); background: var(--surface-2); transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-slow) var(--ease); min-width: 0; overflow: hidden; }
.tile:hover { transform: translateY(-2px); border-color: var(--text-2); z-index: 2; }
.tile:active { transform: scale(.97); }
.tile.is-sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); z-index: 3; }
.tile b { font: 700 clamp(13px, 3.4vw, 17px)/1 var(--font-display); letter-spacing: .02em; }
.tile small { font: 500 clamp(9px, 2.3vw, 11px)/1.1 var(--font-mono); letter-spacing: -.03em; opacity: .9; }
.tile--ext { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.05) 6px 7px); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--text-2); justify-content: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.legend .grad { width: 90px; height: 8px; border-radius: 99px; }
.legend small { color: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; }

/* ---------- exterior ---------- */
.toolbar { margin: var(--s5) 0 var(--s3); }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 0 14px; max-width: 420px; transition: border-color var(--t-fast) var(--ease); }
.search:focus-within { border-color: var(--gold); }
.search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; padding: 11px 0; color: var(--text); font: inherit; outline: none; }
.cont { margin-top: var(--s5); }
.cont__h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 10px; }
.cont__h h3 { font: 700 18px var(--font-display); letter-spacing: -.01em; }
.cont__h span { font: 500 12.5px var(--font-mono); color: var(--text-2); }
.countries { display: grid; gap: 8px; grid-template-columns: 1fr; align-items: start; }
.country { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.country[open] { border-color: var(--line); background: var(--surface-2); }
.country summary { list-style: none; display: grid; grid-template-columns: 34px 1fr auto 18px; gap: 4px 12px; align-items: center; padding: 11px 14px; cursor: pointer; transition: background var(--t-fast) var(--ease); }
.country summary::-webkit-details-marker { display: none; }
.country summary:hover { background: var(--surface-2); }
.flag { font-size: 26px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; grid-row: span 2; }
.country__n { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country__u { font: 500 13px var(--font-mono); color: var(--text-2); text-align: right; }
.country .chev { width: 16px; height: 16px; color: var(--text-3); transition: transform var(--t-med) var(--ease); grid-row: span 2; }
.country[open] .chev { transform: rotate(180deg); }
.country__p { grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; }
.country__p .bar { margin: 0; flex: 1; height: 5px; }
.country__p em { font: 500 12px var(--font-mono); font-style: normal; color: var(--text-2); min-width: 6ch; text-align: right; }
.cities { list-style: none; margin: 0; padding: 4px 14px 12px; display: grid; gap: 2px; }
.city { display: grid; grid-template-columns: 1fr auto 64px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.city:first-child { border-top: 0; }
.city .bar { margin: 0; height: 4px; grid-column: 1 / -1; }
.city__n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city__u { font: 500 12.5px var(--font-mono); color: var(--text-2); }
.city__p { font: 500 12.5px var(--font-mono); text-align: right; color: var(--text-2); }

/* ---------- ranking urnas ---------- */
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-bottom: var(--s5); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s4); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 13px; font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; transition: all var(--t-fast) var(--ease); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--text-3)); }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: relative; }
.rank li { margin: 0; }
.rank button { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; text-align: left; background: transparent; border: 0; padding: 9px 8px; border-radius: 10px; transition: background var(--t-fast) var(--ease); }
.rank button:hover { background: var(--surface); }
.rank__pos { font: 500 12px var(--font-mono); color: var(--text-3); }
.rank__n { font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: center; min-width: 0; }
.rank__n i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c); }
.rank__n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__v { font: 500 13px var(--font-mono); color: var(--text-2); }
.rank .bar { grid-column: 2 / 4; margin: 4px 0 0; height: 6px; }
.rank .bar > i { background: var(--c); }

/* ---------- panel ---------- */
.scrim { position: fixed; inset: 0; background: rgba(3,6,9,.6); backdrop-filter: blur(3px); z-index: 40; opacity: 0; transition: opacity var(--t-med) var(--ease); }
.scrim.is-open { opacity: 1; }
.panel { position: fixed; z-index: 50; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow-2); display: flex; flex-direction: column; visibility: hidden; transition: transform var(--t-med) var(--ease), visibility 0s linear var(--t-med); outline: none;
  left: 0; right: 0; bottom: 0; max-height: 92dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateY(102%); }
.panel.is-open { transform: none; visibility: visible; transition: transform var(--t-med) var(--ease), visibility 0s; }
.panel__grab { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 8px auto 0; flex: none; }
.panel__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px var(--gutter) 12px; border-bottom: 1px solid var(--line-soft); flex: none; }
.panel__head h2 { font-size: 26px; }
.panel__body { overflow-y: auto; overscroll-behavior: contain; padding: var(--s4) var(--gutter) calc(var(--s6) + env(safe-area-inset-bottom)); display: grid; gap: var(--s5); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; transition: background var(--t-fast) var(--ease); }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn svg { width: 18px; height: 18px; }
.psec h3 { font: 700 17px var(--font-display); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.psec h3 small { font: 500 12px var(--font-mono); color: var(--text-3); }
.psec .cand { grid-template-columns: 44px 1fr auto; padding: 10px 12px 12px; }
.psec .photo { width: 44px; height: 54px; }
.psec .cand__name { font-size: 14.5px; }
.psec .cand__pct b { font-size: 20px; }
.panel .facts { grid-template-columns: repeat(2, 1fr); }
.chips-mini { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-mini .tag { font-size: 12px; padding: 3px 10px; }
.skel { height: 72px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface) 0 40%, var(--surface-2) 50%, var(--surface) 60% 100%); background-size: 250% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- footer ---------- */
.foot { max-width: var(--maxw); margin: 0 auto; padding: var(--s5) var(--gutter) var(--s7); color: var(--text-3); font-size: 12.5px; display: flex; gap: var(--s4); flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--line-soft); }

/* ---------- entrada ---------- */
.reveal { animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- breakpoints ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .countries { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .hero__main { padding: var(--s6); }
  .cand { grid-template-columns: 72px 1fr auto; padding: 14px 18px 16px; }
  .photo { width: 72px; height: 90px; }
  .cand__name { font-size: 18px; }
  .cand__pct b { font-size: 30px; }
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.55fr 1fr; align-items: stretch; }
  .hero .stats { grid-template-columns: 1fr; }
  .hero--live .stats, .hero .stats { grid-auto-rows: 1fr; }
  .mapwrap { grid-template-columns: minmax(0, 560px) 1fr; align-items: start; gap: var(--s6); }
  .legend { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding-top: var(--s3); }
  .countries { grid-template-columns: repeat(3, 1fr); }
  .rank { grid-template-columns: repeat(2, 1fr); column-gap: var(--s5); }
  .panel { left: auto; top: 0; right: 0; bottom: 0; width: min(500px, 92vw); max-height: none; border-radius: var(--r-lg) 0 0 var(--r-lg); transform: translateX(102%); }
  .panel__grab { display: none; }
  .panel__head { padding-top: var(--s5); }
  .panel__body { padding-inline: var(--s5); }
  .panel .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .brand__txt { display: none; }
  .nav a { padding: 6px 10px; }
  .live { padding: 6px 10px; font-size: 12px; }
  .ring { width: 92px; height: 92px; }
  .ring__c b { font-size: 18px; }
  .stat { padding: 12px 10px; }
  .cand__votes { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .live[data-s="live"] .live__dot::after { animation: none; opacity: .4; transform: scale(1.4); }
}

/* ---------- ajustes ---------- */
.live__t { color: var(--text-2); font-weight: 500; font-family: var(--font-mono); }
@media (max-width: 560px) { .live__t { display: none; } }
.prog__t { font-size: 12.5px; color: var(--text-3); margin-top: 8px; font-family: var(--font-mono); }
.more { justify-self: start; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, 1fr); } .panel .facts { grid-template-columns: repeat(2, 1fr); } }
.psec .race { gap: var(--s3); }
.totals .stat { padding: var(--s4); }
.hero__grid { grid-template-columns: minmax(0, 1fr); }
.hero__grid > *, .race > *, .mapwrap > *, .psec, .countries > * { min-width: 0; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat__v { overflow-wrap: anywhere; font-size: clamp(15px, 4.2vw, 30px); }
.facts, .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.leadbox__pct { overflow-wrap: anywhere; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .panel .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } .hero .stats { grid-template-columns: 1fr; } .mapwrap { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); } .countries { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rank { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 959px) { .countries { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .countries { grid-template-columns: minmax(0, 1fr); } }
.cand__votes { min-width: 16ch; }
@media (min-width: 960px) { #presidenteBody .cands, #exteriorRace .cands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .nav a { padding: 6px 8px; font-size: 13px; } .nav { margin-left: 0; } .topbar__in { gap: 8px; } .cand__votes { min-width: 0; } }

/* ---------- votação no exterior ---------- */
:root { --v-closed: #35d489; --v-open: #f5c542; --v-wait: #75828f; --v-part: #4aa8ff; }
.votex { padding: var(--s5) var(--s4); margin-bottom: var(--s5); background: linear-gradient(160deg, var(--surface-2), var(--surface)); border-color: var(--line); }
.votex__big { font: 700 clamp(18px, 4.6vw, 26px)/1.2 var(--font-display); letter-spacing: -.02em; }
.votex__big b { font: 600 1.35em var(--font-mono); color: var(--v-closed); letter-spacing: -.05em; }
.votex__big span { font-weight: 500; color: var(--text-2); font-size: .8em; }
.votex .bar { height: 10px; margin: 14px 0 10px; }
.votex .bar > i { background: var(--v-closed); }
.votex__sub { font-size: 14px; color: var(--text-2); }
.votex__sub .num { color: var(--text); }
.votex__note { margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.vchip { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--font-body); padding: 4px 9px; border-radius: 99px; background: color-mix(in srgb, var(--vc) 14%, transparent); color: var(--vc); white-space: nowrap; }
.vchip i, .vdot { width: 6px; height: 6px; border-radius: 50%; background: var(--vc); display: inline-block; }
.vchip--closed, .vdot--closed { --vc: var(--v-closed); }
.vchip--open, .vdot--open { --vc: var(--v-open); }
.vchip--wait, .vdot--wait { --vc: var(--v-wait); }
.vchip--part, .vdot--part { --vc: var(--v-part); }
.vchip--open i { animation: pulse 1.8s var(--ease) infinite; }
.chip .vdot { width: 8px; height: 8px; }
#votFilter { margin-bottom: var(--s3); }
.country__v { flex: none; }
.country__p.no-bar { justify-content: space-between; }
.country__p .bar[hidden] { display: none; }
.country__p em { margin-left: auto; }
.city { grid-template-columns: minmax(0, 1fr) auto auto 64px; }
.city__t { display: inline-flex; align-items: center; gap: 8px; justify-self: end; }
.city__h { font: 500 12px var(--font-mono); color: var(--text-3); }
.city__p:empty { display: none; }
.hero__vot { margin-top: 6px; font-size: 13px; color: var(--v-closed); position: relative; z-index: 1; }
@media (max-width: 480px) { .city { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 4px; } .city__u { grid-column: 1; grid-row: 2; font-size: 12px; } .city__t { grid-column: 2 / 4; grid-row: 1; } .city__n { grid-column: 1; } .city__p { grid-column: 3; } }
@media (max-width: 480px) { .city { grid-template-columns: minmax(0, 1fr) auto; } .city__n { grid-column: 1; grid-row: 1; } .city__t { grid-column: 2; grid-row: 1; } .city__u { grid-column: 1; grid-row: 2; } .city__p { grid-column: 2; grid-row: 2; justify-self: end; } }
