/* Brasil: tokens compartilhados por todas as visualizações. */
:root{color-scheme:dark;--br-blue:#002776;--br-green:#009c3b;--br-yellow:#ffdf00;--br-bg:#061b32;--br-surface:#0b2b49;--br-raised:#103858;--br-line:#31536e;--br-text:#f6fbff;--br-muted:#b7ccdd;--br-radius:16px}
body{background:radial-gradient(ellipse at 5% 0%,#009c3b18,transparent 42%),radial-gradient(ellipse at 100% 30%,#0027764d,transparent 55%),var(--br-bg);color:var(--br-text);background-attachment:fixed}
body::before{content:"";position:fixed;inset:0 0 auto;height:4px;background:linear-gradient(90deg,var(--br-green) 0 42%,var(--br-yellow) 42% 62%,#2862ce 62%);z-index:30;pointer-events:none}
header{border-color:var(--br-line)}
.brand{display:flex;align-items:center;gap:10px;letter-spacing:.1em;color:#f6fbff}
.brand .br-flag{display:inline-block;position:relative;flex:0 0 34px;width:34px;height:24px;background:var(--br-green);border-radius:4px;box-shadow:0 0 0 1px #ffffff1f}
.br-flag::before{content:"";position:absolute;inset:4px;background:var(--br-yellow);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.br-flag::after{content:"";position:absolute;width:10px;height:10px;left:12px;top:7px;background:var(--br-blue);border-radius:50%;box-shadow:inset 0 1px #fff8}
button,select{background:var(--br-surface);border-color:var(--br-line);border-radius:10px;transition:background .18s,border-color .18s}
button:hover{background:var(--br-raised);border-color:#6e9bb2}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--br-yellow);outline-offset:3px}
.controls button{box-shadow:none;color:#edf7ff;font-weight:600}
#notifications{border-color:#2d8768;background:#0b423e}
#notifications:hover{background:#115849}
.eyebrow{color:#9ddbbd;font-weight:650}
h1{color:#fff;letter-spacing:-.045em}.intro p{color:var(--br-muted)}
.live{border-color:#47705e;background:#0b3835;color:#ddf6e8;box-shadow:none}
.live::before{color:var(--br-yellow)}
.tabs{gap:6px;padding:4px;background:#031426;border:1px solid #26445d;border-radius:13px}
.tabs button{background:transparent;border-color:transparent;color:#c6d9e8;border-radius:9px;font-weight:600}
.tabs button:hover{background:#163c58;color:white}
.tabs button[aria-selected=true]{background:var(--br-yellow);color:#06264a;border-color:var(--br-yellow);box-shadow:0 2px 8px #0003;font-weight:800}
.arena{border-color:#47716c;border-radius:var(--br-radius);background:radial-gradient(ellipse at 50% 10%,#1d44775c,transparent 65%),linear-gradient(100deg,#472037 0%,#102b47 48%,#064834 100%);box-shadow:0 12px 32px #0002}
.party,.votes{color:#d0dce9}.candidate:first-child .percent{color:#ff909c}.candidate:last-child .percent{color:#7af0b6}
.verdict{color:#f1f8ff}.balance{color:#b7cddf}
.track{background:#009c58}.track span{background:#e9536b}
.stats{border-color:var(--br-line);background:var(--br-line);border-radius:13px}
.stat{background:var(--br-surface)}.stat label,.metric-label{color:var(--br-muted)}.stat strong{color:#fff}
.progress{background:#284b66}.progress div{background:var(--br-yellow)}
.stat-explain:hover strong,.inline-explain:hover{color:var(--br-yellow)}
.notice,.bottom{color:#b6cbde}.bottom{border-color:var(--br-line)}.bottom a{color:#e0edfa;text-underline-offset:3px}
.history{background:var(--br-surface);border-color:var(--br-line);border-radius:var(--br-radius)}
#history-slider{accent-color:var(--br-yellow)}#point-detail{color:#e0edf7}#history-note{color:var(--br-muted)}
.update-label{background:#082d44f5;border-color:#ffdf0099;color:#fff3a3}
#push-dialog,#progress-dialog,#governors-dialog{background:var(--br-bg);border-color:#527893;color:var(--br-text);box-shadow:0 24px 80px #0008}
.progress-dialog-head,.governors-head{background:var(--br-bg)}
#push-enable,#push-install{background:var(--br-yellow);border-color:var(--br-yellow);color:#06264a;font-weight:800}
#push-enable:hover,#push-install:hover{background:#ffe947}
.push-step,#push-message,#progress-status,#governors-status{color:#ffea70}
#push-instruction,.explain-equation,.section-numbers div{background:var(--br-surface);border-color:var(--br-line)}
.explain-equation{color:#fff3a3}.explain-warning{border-color:var(--br-yellow);background:#ffdf000a;color:#fff1b0}
.gov-party{background:#10483f;border-color:#367b64;color:#dbffeb}
.governors-filters input,.governors-filters select{background:var(--br-surface);border-color:var(--br-line)}
/* Mapas seguem as mesmas superfícies e tokens do painel Brasil. */
.map-screen,.world-screen{color-scheme:dark;background:var(--br-surface);color:var(--br-text);border-color:var(--br-line);border-radius:var(--br-radius);box-shadow:inset 0 3px var(--br-green),0 12px 32px #0002}
.map-heading h2,.world-heading h2{color:var(--br-text)}.map-heading h2 span{color:#9ddbbd}
.map-screen select,.world-screen select{background:var(--br-bg);color:var(--br-text);border-color:#55758d}
.map-candidate{border-color:var(--br-line);box-shadow:none;background:var(--br-bg);border-radius:10px;color:var(--br-text)}
.map-candidate:first-child{border-left-color:#e9536b}.map-candidate:last-child{border-left-color:#25b87a}
.map-candidate strong{color:#ff909c}.map-candidate:last-child strong{color:#7af0b6}
.map-candidate small{color:var(--br-muted)}.map-candidate .map-votes{color:#d0dce9}
.map-mode{background:var(--br-bg);border:1px solid var(--br-line)}.map-mode button{color:var(--br-muted)}.map-mode button:hover{background:var(--br-raised);color:var(--br-text)}.map-mode button[aria-pressed=true]{background:var(--br-yellow);color:#06264a;box-shadow:none}
.map-governors,.world-tools button{background:var(--br-bg);color:var(--br-text);border-color:#55758d}.map-governors:hover,.world-tools button:hover{background:var(--br-raised);border-color:#9ddbbd}
.map-state,.df-target{fill:#35536e;stroke:#8ba8bc}
.map-state.lead-lula,.df-target.lead-lula{fill:#e9536b}.map-state.lead-flavio,.df-target.lead-flavio{fill:#25b87a}.map-state.tie,.df-target.tie{fill:#d2af37}
.map-state:hover,.map-state:focus-visible,.map-state.selected,.df-target.selected,.map-screen.regional-mode .map-state.selected{stroke:var(--br-yellow);filter:drop-shadow(0 0 3px #ffdf0044)}
.uf-label{fill:#fff;stroke:#061b32;stroke-width:2.5px;paint-order:stroke;stroke-linejoin:round}
.world-canvas{background:#071f36;border-color:var(--br-line)}
.world-country path,.world-country circle{fill:#35536e;stroke:#8ba8bc}
.world-country.lead-lula path,.world-country.lead-lula circle{fill:#e9536b}.world-country.lead-flavio path,.world-country.lead-flavio circle{fill:#25b87a}.world-country.tie path,.world-country.tie circle{fill:#d2af37}
.world-country.selected path,.world-country:hover path,.world-country:focus-visible path,.world-country.selected circle,.world-country:hover circle,.world-country:focus-visible circle{stroke:var(--br-yellow)}
.world-country.selected{filter:drop-shadow(0 0 3px #ffdf0055)}
.map-legend{color:#dce8f2}.map-legend span:nth-child(1) i{background:#e9536b!important}.map-legend span:nth-child(2) i{background:#25b87a!important}.map-legend span:nth-child(3) i{background:#35536e!important;box-shadow:inset 0 0 0 1px #8ba8bc}.map-legend span:nth-child(4) i{background:#d2af37!important}
.map-total{border-color:var(--br-line)}.map-screen .progress,.world-screen .progress{background:#284b66}.map-screen .progress div,.world-screen .progress div{background:var(--br-yellow)}
#map-detail,#world-detail,.map-hint,.map-region-note,.world-region,.world-caption,#world-help{color:var(--br-muted)}
#map-error,#world-error{color:#ffe18b}.map-screen a,.world-screen a{color:#e0edfa;text-underline-offset:3px}
@media(max-width:650px){.brand{gap:6px;max-width:125px;font-size:8px;letter-spacing:.08em}.brand .br-flag{flex-basis:26px;width:26px;height:20px}.br-flag::before{inset:4px 3px}.br-flag::after{left:9px;top:6px;width:8px;height:8px}.tabs{padding:3px;gap:3px}.tabs button{font-size:10px}.controls button{font-weight:550}.scene{margin-top:3px}}
@media(prefers-reduced-motion:reduce){button,select{transition:none}}

@media(max-width:650px){.tabs{padding:2px;gap:2px;margin:6px 0}.tabs button{min-width:0;min-height:34px;font-size:9.5px;white-space:nowrap;padding:6px 2px}}

@media(max-width:650px){.world-canvas{height:clamp(120px,18svh,160px)}#brazil-map{height:clamp(145px,24svh,205px)}.regional-mode #brazil-map{height:clamp(140px,21svh,185px)}}
