/* ==========================================================================
   Apuração 2026 — sistema visual
   Mobile-first; tokens claros/escuros; tipografia Inter com números tabulares.
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #f2f1ed;
  --surface-3: #e9e7e1;
  --border: #e4e2dc;
  --border-strong: #d3d0c8;
  --text: #121212;
  --text-2: #4a4945;
  --muted: #76746d;
  --accent: #121212;
  --lula: #d93b34;
  --flavio: #2a78d6;
  --t2: #8f8d86;
  --other: #c98500;
  --grid: #ebe9e4;
  --pending: #e6e4de;
  --map-stroke: #ffffff;
  --state-stroke: #4a4945;
  --l1: #f4c2bd; --l2: #e9877f; --l3: #d93b34; --l4: #9e1f19;
  --f1: #b7d3f6; --f2: #6da7ec; --f3: #2a78d6; --f4: #184f95;
  --ok: #0ca30c;
  --warn: #e5a00d;
  --crit: #d03b3b;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(18, 18, 18, .03), 0 1px 3px rgba(18, 18, 18, .04), 0 12px 32px -18px rgba(18, 18, 18, .18);
  --header-h: 64px;
  --footer-h: 46px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0e0d;
    --surface: #171716;
    --surface-2: #1f1f1d;
    --surface-3: #292927;
    --border: #2a2a27;
    --border-strong: #3a3a36;
    --text: #f4f3ee;
    --text-2: #c3c2b7;
    --muted: #8e8d85;
    --accent: #f4f3ee;
    --lula: #ec5a52;
    --flavio: #4b93ec;
    --t2: #8f8d86;
    --other: #d99a1a;
    --grid: #262624;
    --pending: #2b2b28;
    --map-stroke: #171716;
    --state-stroke: #c3c2b7;
    --l1: #5a2420; --l2: #8f2a24; --l3: #c63a33; --l4: #ef5b53;
    --f1: #173a63; --f2: #1c5cab; --f3: #2f7bd9; --f4: #5aa0f0;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 12px 32px -20px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e0d;
  --surface: #171716;
  --surface-2: #1f1f1d;
  --surface-3: #292927;
  --border: #2a2a27;
  --border-strong: #3a3a36;
  --text: #f4f3ee;
  --text-2: #c3c2b7;
  --muted: #8e8d85;
  --accent: #f4f3ee;
  --lula: #ec5a52;
  --flavio: #4b93ec;
  --t2: #8f8d86;
  --other: #d99a1a;
  --grid: #262624;
  --pending: #2b2b28;
  --map-stroke: #171716;
  --state-stroke: #c3c2b7;
  --l1: #5a2420; --l2: #8f2a24; --l3: #c63a33; --l4: #ef5b53;
  --f1: #173a63; --f2: #1c5cab; --f3: #2f7bd9; --f4: #5aa0f0;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 12px 32px -20px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 60px); }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: 1.05rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 650; }
h3 { font-size: .74rem; font-weight: 650; margin-bottom: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
a { color: inherit; }
abbr { text-decoration: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.eyebrow { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ghost {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: .38rem .8rem; color: var(--text-2); font-size: .85rem; line-height: 1.2; min-height: 34px;
  transition: background .15s, border-color .15s;
}
.ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
a.ghost { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.how::after { content: "→"; margin-left: .4rem; transition: transform .15s; }
.how:hover::after { transform: translateX(2px); }
:focus-visible { outline: 2px solid var(--flavio); outline-offset: 2px; border-radius: 6px; }

/* ---------- topo */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .65rem; min-width: 0; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--lula) 0 50%, var(--flavio) 50% 100%);
}
.brand-mark::after { content: ""; position: absolute; inset: 9px 7px; border-radius: 3px; background: var(--surface); opacity: .92; }
.title { min-width: 0; }
.title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { margin: .1rem 0 0; color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: flex; align-items: center; gap: .5rem; flex: none; }
.badge {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 650;
  padding: .3rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--text-2);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--t2); flex: none; }
.badge.live { color: var(--text); }
.badge.live::before { background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 1.8s infinite; }
.badge.sim::before { background: var(--warn); }
.badge.err::before { background: var(--crit); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .badge.live::before { animation: none; } * { transition: none !important; } }
#theme { width: 34px; padding: 0; }

.nav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px .55rem; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; text-decoration: none; font-size: .86rem; font-weight: 550; color: var(--text-2);
  padding: .36rem .8rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent); color: var(--surface); }

.progress-row { display: flex; align-items: center; gap: .75rem; padding-bottom: .55rem; }
.progress { flex: 1; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--text); border-radius: 3px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.progress-label { font-size: .78rem; color: var(--text-2); white-space: nowrap; }
.progress-detail { font-size: .74rem; color: var(--muted); padding-bottom: .55rem; margin-top: -.3rem; }
#updated { font-size: .74rem; }

/* ---------- conteúdo e cards */
main { padding-top: 1rem; padding-bottom: 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
main > * { min-width: 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1rem 1.15rem; box-shadow: var(--shadow); min-width: 0;
}
.card-head { margin-bottom: .9rem; }
.card-head.row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.card-head p { margin: .25rem 0 0; }
.alert {
  display: flex; gap: .6rem; align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn) 9%, var(--surface));
  border-radius: var(--radius-sm); padding: .65rem .85rem; font-size: .86rem; color: var(--text-2);
}
.alert[hidden] { display: none; }
.alert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-top: .45rem; flex: none; }

/* ---------- medidor */
.meter-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .2rem 0 .8rem; }
.mnum { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.mnum.t2 { align-items: center; text-align: center; }
.mnum.flavio { align-items: flex-end; text-align: right; }
.mnum .mlabel { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; color: var(--text-2); line-height: 1.25; }
.mnum .swatch { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.mnum strong { font-size: clamp(1.75rem, 8.5vw, 3.4rem); font-weight: 750; letter-spacing: -.035em; line-height: 1; }
.mnum.lula strong { color: var(--lula); }
.mnum.flavio strong { color: var(--flavio); }
.mnum.lula .swatch, .seg.lula { background: var(--lula); }
.mnum.flavio .swatch, .seg.flavio { background: var(--flavio); }
.mnum.t2 .swatch, .seg.t2 { background: var(--t2); }
.meter-bar { display: flex; gap: 3px; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.seg { height: 100%; transition: flex-basis 1s cubic-bezier(.2, .8, .2, 1); flex: 0 0 0; min-width: 0; }
.meter-sub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.history { position: relative; }
.history svg, #projection svg { display: block; width: 100%; height: auto; overflow: visible; }
.axis text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.axis path, .axis line { stroke: var(--grid); }
.gridline { stroke: var(--grid); }
.refline { stroke: var(--text-2); stroke-dasharray: 3 3; }
.reflabel { fill: var(--text-2); font-size: 11px; }
.dlabel { font-size: 12px; font-weight: 650; fill: var(--text); }
.dlabel-sub { font-size: 11px; fill: var(--muted); }

/* ---------- grade principal */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.map-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 80vh; border-radius: var(--radius-sm); overflow: hidden; touch-action: none; background: var(--surface); }
#map { width: 100%; height: 100%; display: block; cursor: grab; }
#map:active { cursor: grabbing; }
#map .unit { stroke: var(--map-stroke); stroke-width: .35; vector-effect: non-scaling-stroke; transition: fill .4s; }
#map .unit:hover { stroke: var(--text); stroke-width: 1.5; }
#map .states-mesh { fill: none; stroke: var(--state-stroke); stroke-width: .8; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.controls { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.seg-ctl { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-ctl button { border: 0; background: transparent; padding: .32rem .8rem; color: var(--text-2); border-radius: 999px; font-size: .84rem; min-height: 30px; }
.seg-ctl button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.legend { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; margin-top: .8rem; font-size: .76rem; color: var(--text-2); align-items: center; }
.legend > span { display: inline-flex; align-items: center; }
.legend .ramp { display: inline-flex; gap: 2px; margin-right: .4rem; }
.legend .ramp i, .legend .sw { display: inline-block; width: 14px; height: 9px; border-radius: 2px; }
.legend .sw { margin-right: .35rem; }
.note { margin: .7rem 0 0; font-size: .78rem; line-height: 1.45; }

/* ---------- candidatos */
.cand { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .6rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.cand:first-child { border-top: 0; padding-top: 0; }
.cand .name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand .name small { font-weight: 450; color: var(--muted); margin-left: .35rem; font-size: .76rem; }
.cand .pct { font-weight: 700; text-align: right; }
.cand .bar { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.cand .bar i { display: block; height: 100%; border-radius: 3px; background: var(--t2); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.cand.lula .bar i { background: var(--lula); }
.cand.flavio .bar i { background: var(--flavio); }
.cand .votes { grid-column: 1 / -1; font-size: .74rem; color: var(--muted); }
.cand.minor { padding: .3rem 0; }
.cand.minor .bar { height: 3px; }
.cand.minor .votes { display: none; }
.cand.minor .name, .cand.minor .pct { font-size: .82rem; font-weight: 500; }
.cand-sep { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--border-strong); font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.cand.nv { border-top: 0; }
.cand.nv .votes { display: block; }
.cand.nv .bar i { background: var(--border-strong); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin: 0; }
.stats div { min-width: 0; }
.stats dt { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.stats dd { margin: .1rem 0 0; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; }
.stats dd small { font-weight: 450; color: var(--muted); font-size: .76rem; display: block; letter-spacing: 0; }

/* ---------- tabelas */
.table-wrap { overflow-x: auto; margin: 0 -1rem; padding: 0 1rem; -webkit-overflow-scrolling: touch; }
table.states { width: 100%; border-collapse: collapse; font-size: .86rem; }
.states th { text-align: left; font-weight: 650; color: var(--muted); padding: .5rem .5rem; border-bottom: 1px solid var(--border); cursor: pointer; white-space: nowrap; user-select: none; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.states th.sorted::after { content: " ↓"; }
.states th.sorted.asc::after { content: " ↑"; }
.states td { padding: .5rem .5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.states tr:last-child td { border-bottom: 0; }
.states .num { text-align: right; }
.states tbody tr { cursor: pointer; transition: background .12s; }
.states tbody tr:hover { background: var(--surface-2); }
.states .mini { display: inline-block; width: 46px; height: 5px; background: var(--surface-3); border-radius: 3px; margin-left: .4rem; vertical-align: middle; overflow: hidden; }
.states .mini i { display: block; height: 100%; background: var(--text-2); }
.lead-l { color: var(--lula); font-weight: 650; }
.lead-f { color: var(--flavio); font-weight: 650; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; vertical-align: 1px; }

.method p, .method li { color: var(--text-2); max-width: 72ch; font-size: .92rem; }
.method ol { padding-left: 1.2rem; }
.method li { margin-bottom: .45rem; }

/* ---------- exterior */
.ext-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.world-wrap { width: 100%; aspect-ratio: 1.9 / 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); touch-action: none; }
#world { width: 100%; height: 100%; display: block; cursor: grab; }
#world .country { fill: var(--surface); stroke: var(--border-strong); stroke-width: .5; vector-effect: non-scaling-stroke; transition: fill .4s; }
#world .country.br { fill: var(--surface-3); }
#world .country.has-data { fill-opacity: .55; stroke: var(--surface); }
#world .country.has-data:hover { fill-opacity: .8; }
#world .city { stroke: var(--surface); stroke-width: 1; vector-effect: non-scaling-stroke; }
#world .city.pending { fill: none; stroke: var(--muted); stroke-width: 1; }
#world .city:hover { stroke: var(--text); stroke-width: 2; }
.ext-side { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.ext-tabs { align-self: flex-start; }
.ext-list { max-height: 340px; overflow: auto; border-top: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.ext-table th { position: sticky; top: 0; background: var(--surface); cursor: default; z-index: 1; }
.ext-table td:first-child { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- página dos estados */
.uf-picker { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem .2rem; -webkit-overflow-scrolling: touch; }
.uf-picker::-webkit-scrollbar { display: none; }
.uf-picker button {
  flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  min-width: 46px; padding: .4rem .5rem; font-weight: 650; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase;
}
.uf-picker button.on { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.race-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.race-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.race-head .kpi { font-size: .82rem; color: var(--text-2); }
.race-head .kpi b { font-size: 1.05rem; color: var(--text); }
.rc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .7rem; padding: .65rem 0; border-top: 1px solid var(--border); align-items: center; }
.rc:first-of-type { border-top: 0; }
.rc .nm { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc .nm small { color: var(--muted); font-weight: 450; margin-left: .3rem; font-size: .75rem; }
.rc .pv { text-align: right; font-weight: 700; font-size: .95rem; }
.rc .track { grid-column: 1 / -1; position: relative; height: 8px; background: var(--surface-2); border-radius: 4px; }
.rc .track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--text-2); opacity: .85; }
.rc .track .range { position: absolute; top: -3px; bottom: -3px; border-radius: 3px; border: 1.5px solid var(--text); opacity: .5; }
.rc .track .half { position: absolute; top: -5px; bottom: -5px; width: 0; border-left: 1.5px dashed var(--muted); }
.rc .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .74rem; color: var(--muted); }
.rc .meta b { color: var(--text); font-weight: 650; }
.prob-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.prob-pill.hi { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: color-mix(in srgb, var(--ok) 70%, var(--text)); }
.seats { display: flex; flex-direction: column; gap: .45rem; }
.seat-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 58px; gap: .55rem; align-items: center; font-size: .82rem; }
.seat-row .sg { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-row .sbar { position: relative; height: 16px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.seat-row .sbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--text-2); border-radius: 4px; }
.seat-row .sbar s { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--text-2) 22%, transparent); text-decoration: none; }
.seat-row .sn { text-align: right; font-weight: 700; }
.seat-row .sn small { display: block; font-weight: 450; color: var(--muted); font-size: .7rem; }
.search { width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: .55rem .75rem; font: inherit; font-size: .9rem; color: var(--text); margin: .3rem 0 .6rem; }
.empty { color: var(--muted); font-size: .88rem; padding: .6rem 0; }

/* ---------- tooltip */
.tooltip {
  position: fixed; z-index: 30; pointer-events: none; max-width: 280px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: .6rem .75rem; font-size: .8rem; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .28);
}
.tooltip .tt-title { font-weight: 650; margin-bottom: .15rem; }
.tooltip .tt-sub { color: var(--muted); margin-bottom: .4rem; }
.tooltip .tt-row { display: grid; grid-template-columns: 10px 1fr auto; gap: .45rem; align-items: center; }
.tooltip .tt-row i { width: 10px; height: 10px; border-radius: 3px; }
.tooltip .tt-row b { text-align: right; }

/* ---------- rodapé fixo */
.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted);
}
.footer a { text-decoration: none; color: var(--text-2); }
.footer a:hover { color: var(--text); }
.powered { display: inline-flex; align-items: center; gap: .45rem; font-weight: 550; }
.powered b { color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.powered .tf { width: 16px; height: 16px; border-radius: 5px; background: conic-gradient(from 210deg, #c9ccd3, #f4f5f7, #9aa0aa, #e6e8ec, #c9ccd3); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.footer .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }

/* ---------- breakpoints */
@media (min-width: 640px) {
  .card { padding: 1.3rem 1.4rem 1.4rem; }
  .table-wrap { margin: 0 -1.4rem; padding: 0 1.4rem; }
  .uf-picker { margin: 0 -1.4rem; padding: 0 1.4rem .2rem; }
  .meter-bar { height: 18px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  h1 { font-size: 1.15rem; }
}
@media (min-width: 900px) {
  .meter-sub { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
  .ext-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .race-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1040px) {
  .grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .side .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639px) {
  :root { --header-h: 56px; }
  .sub { display: none; }
  #updated { display: none; }
  .badge { font-size: .64rem; padding: .26rem .5rem; }
  .map-wrap { aspect-ratio: 1 / 1.02; }
  .world-wrap { aspect-ratio: 1.55 / 1; }
  .seat-row { grid-template-columns: 74px minmax(0, 1fr) 48px; }
  .card-head.row { align-items: flex-start; }
  .footer .hide-sm { display: none; }
  .ov-table .uf-name { display: none; }
}
@media (forced-colors: active) {
  .seg, .cand .bar i { forced-color-adjust: none; }
}
