/* Panorama do Voto: interface clara, com dados antes das ferramentas de exploração. */
:root { --ink:#122C40; --muted:#526675; --paper:#F4F7F8; --line:#D7E1E6; --a:#007C83; --b:#B85C25; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:var(--brand-font); }
a { color:inherit; text-decoration:none; }
button,select { font:inherit; color:inherit; border:1px solid var(--line); background:white; border-radius:8px; padding:10px 14px; max-width:100%; }
button { cursor:pointer; font-size:12px; font-weight:650; }
button:hover { background:#eaf1f2; }
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible { outline:3px solid #49bfc7; outline-offset:4px; }
header { display:flex; align-items:center; gap:32px; min-height:78px; padding:16px max(24px,calc((100% - 1192px)/2)); background:white; border-bottom:1px solid var(--line); }
.brand img { display:block; width:260px; height:auto; }
nav { display:flex; gap:22px; align-items:center; font-size:12px; }
nav button { border:0; background:transparent; padding:8px 0; }
.nav-active { color:var(--a); box-shadow:0 2px var(--a); }
/* O seletor flutua sobre o conteúdo, sem deslocar a página. */
.replay-picker { position:relative; }
#replayToggle { color:var(--muted); white-space:nowrap; }
#replayToggle.nav-active { color:var(--a); }
#replayToggle span { display:inline-block; margin-left:5px; transition:transform .15s; }
#replayToggle[aria-expanded="true"] span { transform:rotate(180deg); }
.replay-options { position:absolute; top:calc(100% + 12px); right:0; z-index:10; width:180px; background:white; border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px #122c4018; padding:8px; }
.replay-options p { color:var(--muted); font-size:10px; margin:5px 8px 8px; }
nav .replay-options button { display:block; width:100%; padding:11px 12px; text-align:left; border-radius:6px; font-family:var(--data-font); }
nav .replay-options button:hover { background:#eaf2f3; color:var(--a); }
.official { color:var(--muted); }
.official { margin-left:auto; font-size:11px; white-space:nowrap; }
main { max-width:1240px; padding:32px 24px 16px; margin:auto; }
.heading { display:flex; align-items:center; justify-content:space-between; gap:30px; margin-bottom:24px; }
.eyebrow { font-size:10px; font-weight:750; letter-spacing:1.6px; color:var(--muted); margin:0 0 10px; }
h1 { font-size:clamp(29px,3.2vw,43px); font-weight:650; letter-spacing:-1.6px; line-height:1.15; margin:0; }
h1 span { color:#607f86; }
.intro { font-size:14px; color:var(--muted); margin:14px 0 0; line-height:1.6; }
.edition-status { display:grid; gap:10px; text-align:right; }
.status { font-size:10px; letter-spacing:.7px; font-weight:700; border-radius:20px; border:1px solid #c5dedf; background:#eaf4f3; color:#00636a; padding:8px 13px; }
.status.replay { background:#fff5dc; color:#875800; border-color:#e6d7b8; }
#sourceStatus { font-size:11px; color:var(--muted); line-height:1.6; }
.notice { font-size:12px; background:#edf3f5; border:1px solid var(--line); border-radius:8px; padding:12px 16px; line-height:1.7; margin-bottom:24px; }
.notice.replay-notice { border-color:#e6d7b8; background:#fff9ed; color:#775a2a; }
h2 { font-size:18px; letter-spacing:-.3px; margin:0; font-weight:650; }
.projection-panel { margin-bottom:20px; }
.projection-top { display:flex; justify-content:space-between; gap:18px; align-items:center; margin-bottom:16px; }
.p90-label { font-size:10px; letter-spacing:.6px; color:var(--muted); }
.candidates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.candidate { background:white; border:1px solid var(--line); border-top:3px solid var(--candidate); border-radius:12px; padding:20px 24px 16px; min-width:0; }
.candidate-head { display:flex; gap:10px; align-items:center; }
.candidate-head i { height:9px; width:9px; border-radius:50%; background:var(--candidate); flex-shrink:0; }
.candidate-head h3 { font-size:18px; font-weight:650; margin:0; }
.candidate-values { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:18px 0; }
.candidate .number { font:400 clamp(34px,3.5vw,44px)/1.1 var(--data-font); color:var(--candidate); letter-spacing:-1.7px; white-space:nowrap; }
.candidate .number small { font-size:21px; }
.metric-label { font-size:10px; color:var(--muted); display:block; margin-bottom:6px; }
.partial { font:400 21px var(--data-font); }
.candidate .number.waiting { display:flex; align-items:center; min-height:49px; font:500 14px var(--brand-font); letter-spacing:0; color:var(--muted); }
.candidate-pending { border-top:1px solid #edf1f2; padding-top:14px; min-height:78px; color:var(--muted); font-size:11px; line-height:1.7; }
.interval-text { border-top:1px solid #edf1f2; padding-top:12px; font-size:11px; color:var(--muted); display:flex; justify-content:space-between; gap:8px; }
.interval-text strong { color:var(--ink); font:400 12px var(--data-font); }
.range-track { height:23px; position:relative; margin-top:8px; background:var(--paper); border-radius:4px; overflow:hidden; }
.range-track .majority { position:absolute; top:0; height:100%; border-left:1px dashed #7d939e; }
.range-band { position:absolute; top:5px; height:13px; background:var(--candidate); opacity:.25; border-radius:3px; }
.range-dot { position:absolute; top:4px; height:15px; width:3px; background:var(--candidate); border-radius:2px; }
.range-axis { display:flex; justify-content:space-between; color:var(--muted); font:9px var(--data-font); margin-top:5px; position:relative; }
.range-axis .axis-majority { position:absolute; transform:translateX(-50%); }
.uncertainty-summary { display:flex; justify-content:space-between; gap:24px; background:#eaf2f3; border:1px solid #d5e4e6; border-radius:8px; padding:14px 18px; margin-top:14px; align-items:center; }
.signal { font-size:12px; font-weight:750; }
.signal.open { color:#875800; }
.uncertainty-summary p { font-size:11px; line-height:1.7; color:var(--muted); max-width:700px; margin:5px 0 0; }
.uncertainty-size { text-align:right; min-width:185px; display:grid; gap:3px; }
.uncertainty-size span,.uncertainty-size small { font-size:10px; color:var(--muted); }
.uncertainty-size strong { font:400 23px var(--data-font); white-space:nowrap; }
.calibration-note { font-size:10px; color:var(--muted); line-height:1.6; margin:9px 0 0; }
.stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:20px 0; }
.stats article { background:white; border:1px solid var(--line); border-radius:10px; padding:16px 20px; display:grid; gap:6px; }
.stats span { font-size:11px; color:var(--muted); }
.stats strong { font:400 24px var(--data-font); letter-spacing:-.8px; }
.stats small { font-size:10px; color:var(--muted); line-height:1.5; }
.panel { background:white; border:1px solid var(--line); border-radius:12px; padding:24px; min-width:0; }
.wide { margin-bottom:20px; }
.panel-head { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:18px; }
.control-label { display:grid; font-size:10px; color:var(--muted); gap:7px; }
.control-label select { font-size:11px; color:var(--ink); }
.secondary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:stretch; margin-bottom:20px; }
.map-panel { margin-bottom:20px; }
.map-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:32px; }
.map { max-width:520px; margin:0 auto; min-height:200px; }
.map svg { display:block; width:100%; max-height:460px; }
.map path { stroke:white; stroke-width:1.1; cursor:pointer; outline:none; vector-effect:non-scaling-stroke; transition:fill-opacity .15s,stroke-width .15s; }
.map.has-selection path:not(.selected) { fill-opacity:.25; }
.map.has-selection path:not(.selected):hover { fill-opacity:.6; }
.map path:not(.selected):hover { stroke:var(--muted); stroke-width:1.5; }
.map path:focus-visible { stroke:var(--ink); stroke-width:2.5; outline:none; fill-opacity:1; }
.map.has-selection text:not(.selected) { fill:var(--muted); }
.map text.selected { font-weight:800; font-size:10px; }
.map text { font:600 9px var(--brand-font); fill:var(--ink); pointer-events:none; paint-order:stroke; stroke:white; stroke-width:2px; }
.state-detail { border-left:1px solid var(--line); padding-left:18px; min-width:0; }
.state-detail>select { width:100%; margin:8px 0 20px; font-size:12px; }
.state-detail h3 { font-size:21px; margin:0 0 8px; }
.state-status { color:var(--muted); font-size:11px; line-height:1.7; }
.detail-progress { height:5px; background:#e6edef; border-radius:4px; overflow:hidden; margin:14px 0; }
.detail-progress span { display:block; height:100%; background:var(--a); }
.state-vote { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-top:16px; font-size:11px; }
.state-vote strong { font:16px var(--data-font); }
.state-vote i { width:7px; height:7px; display:inline-block; margin-right:5px; background:var(--candidate); border-radius:50%; }
.state-counts { display:grid; gap:12px; border-top:1px solid var(--line); padding-top:18px; margin:20px 0; font-size:10px; }
.state-counts div { display:flex; justify-content:space-between; gap:10px; }
.state-counts dt { color:var(--muted); }
.state-counts dd { margin:0; font-family:var(--data-font); }
.legend { display:flex; gap:12px; align-items:center; flex-wrap:wrap; font-size:10px; color:var(--muted); }
.legend i { display:inline-block; vertical-align:middle; width:10px; height:10px; margin-right:5px; border-radius:2px; }
.exterior { margin-top:14px; padding:9px 10px; font-size:10px; width:100%; text-align:left; }
.exterior span { float:right; color:var(--muted); }
.caption { font-size:11px; color:var(--muted); line-height:1.7; margin:12px 0 0; }
.chart-toolbar { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
.chart-toolbar button { font-size:10px; padding:7px 9px; }
.chart-toolbar span { font:10px var(--data-font); color:var(--muted); margin-left:auto; }
.chart-legend { margin-bottom:12px; }
.band-key { background:#c4dedf; }
.waiting-key { background:#edf2f4; border:1px solid var(--line); }
.chart svg { display:block; width:100%; height:auto; }
.secondary-grid .lower-chart-head { min-height:118px; }
.secondary-grid .chart { margin-top:14px; }
.probability-values { display:flex; flex-wrap:wrap; gap:14px 24px; margin-top:14px; font-size:12px; }
.probability-values strong { font:400 19px var(--data-font); color:var(--candidate); margin-left:6px; }
.method a { color:var(--a); text-decoration:underline; }
.method { border:1px solid var(--line); background:white; border-radius:10px; padding:18px 22px; margin-bottom:20px; font-size:12px; line-height:1.8; color:var(--muted); }
summary { cursor:pointer; font-weight:650; color:var(--ink); }
summary span { font-weight:400; color:var(--muted); font-size:11px; margin-left:15px; }
.method>div { max-width:850px; }
.playback { display:flex; gap:22px; align-items:center; padding:16px 20px; background:#fff9ed; border:1px solid #e5d9bb; border-radius:10px; margin-bottom:20px; }
.timeline { flex:1; }
.timeline label { display:flex; justify-content:space-between; font-size:10px; }
.timeline output { font:12px var(--data-font); }
input[type=range] { width:100%; accent-color:var(--a); }
.ticks { display:flex; justify-content:space-between; font-size:9px; color:var(--muted); }
footer { display:flex; justify-content:space-between; gap:20px; font-size:10px; color:var(--muted); padding:12px 0; line-height:1.7; }
#error { background:#fff1f1; border:1px solid #e8bfc3; color:#8c2436; padding:15px; margin-bottom:20px; font-size:12px; }
@media(max-width:1050px) {
  .map-layout { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); }
  .map svg { max-height:380px; }
  header { gap:24px; }
  .official { display:none; }
  nav { margin-left:auto; }
}
@media(max-width:700px) {
  .secondary-grid { grid-template-columns:1fr; }
  .secondary-grid .lower-chart-head { min-height:0; }
  header { padding:16px; gap:16px; flex-wrap:wrap; }
  .brand img { width:220px; }
  nav { margin:0; width:100%; justify-content:space-between; }
  main { padding:24px 16px 12px; }
  .heading { display:block; }
  .edition-status { display:flex; text-align:left; flex-wrap:wrap; align-items:center; margin-top:18px; }
  .intro { font-size:13px; }
  .candidates { gap:14px; }
  .candidate { padding:18px; }
  .candidate-values { flex-wrap:wrap; }
  .candidate .number { font-size:34px; }
  .stats { gap:10px; }
  .stats article { padding:14px; }
  .stats strong { font-size:20px; }
  .panel { padding:18px; }
  .panel-head { align-items:flex-start; flex-wrap:wrap; gap:14px; }
  .chart-toolbar span { margin:4px 0 0; width:100%; }
  footer { flex-direction:column; gap:6px; }
}
@media(max-width:480px) {
  .projection-top { align-items:flex-start; flex-direction:column; gap:8px; }
  .candidates { grid-template-columns:1fr; }
  .candidate-values { flex-wrap:nowrap; }
  .candidate .number { font-size:39px; }
  .uncertainty-summary { flex-direction:column; align-items:stretch; gap:14px; }
  .uncertainty-size { text-align:left; border-top:1px solid #d5e4e6; padding-top:12px; }
  .stats { grid-template-columns:1fr; }
  .stats article { grid-template-columns:1fr auto; align-items:center; }
  .stats small { grid-column:1/-1; }
  .map-layout { grid-template-columns:1fr; }
  .map { max-width:300px; }
  .state-detail { padding:18px 0 0; border:0; border-top:1px solid var(--line); }
  .playback { flex-wrap:wrap; padding:15px; gap:14px; }
  .timeline { min-width:55%; }
  .playback>button:last-child { width:100%; }
  .method { padding:16px; }
  summary span { display:block; margin:0; }
}
