/* Live count tracker. Loads after /segundo-turno-2026/styles.css and only overrides it here. */

/* Header: brand row, dynamic headline, chance-of-victory bar */
.brandbar{gap:12px}
.brand{white-space:nowrap}
.brand-link,.theme{white-space:nowrap}
.kicker{margin:0 0 6px;font-size:13px;letter-spacing:.02em;color:var(--ink-muted)}
.top h1{text-wrap:balance}
.top h1 .fl,.top h1 .lu{font-weight:400}
.headline-sub{margin:0 0 12px;font-size:15px;color:var(--ink-soft)}
.hl-prob{max-width:560px;margin:0 0 16px}
.hl-lab{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:14px;font-variant-numeric:tabular-nums;color:var(--ink)}
.hl-lab b{font-weight:600}
.hl-lab .hl-k{font-size:12px;color:var(--ink-muted);text-align:center}
.bar.hl-bar{height:8px;margin-top:6px}
.bar.hl-bar .l{border-radius:4px 0 0 4px}.bar.hl-bar .f{border-radius:0 4px 4px 0}
.bar.hl-bar .mid{top:-4px;bottom:-4px}

.status{margin:14px 0;font-size:14px;color:var(--ink-muted);overflow-wrap:anywhere}
.status strong{color:var(--ink)}
.status .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--amber);margin-right:6px;vertical-align:1px}
.status .dot.live{background:#3c9a5f}

/* Cards */
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.card h2{margin:0 0 8px;font-size:22px}
.pcts{display:flex;justify-content:space-between;font-family:var(--font-serif);font-size:44px;line-height:1.05;font-variant-numeric:tabular-nums}
.names{display:flex;justify-content:space-between;font-size:13px}
/* Projected-result CI: a translucent range with end caps and a line through it (an error bar),
   drawn over the bar. The red/blue boundary is the point estimate. */
.bar.band .ci{position:absolute;top:-7px;bottom:-7px;border-left:2px solid var(--ink);border-right:2px solid var(--ink);min-width:6px;transform:translateX(-1px)}
.bar.band .ci::before{content:"";position:absolute;inset:4px 0;background:var(--ink);opacity:.18;border-radius:1px}
.bar.band .ci::after{content:"";position:absolute;left:0;right:0;top:50%;height:2px;margin-top:-1px;background:var(--ink)}
.ci-key{margin:12px 0 0;font-size:12px;color:var(--ink-muted);display:flex;align-items:center;gap:6px}
.ci-key i{display:inline-block;width:18px;height:12px;border-left:2px solid var(--ink);border-right:2px solid var(--ink);background:linear-gradient(var(--ink),var(--ink)) center/100% 2px no-repeat,linear-gradient(color-mix(in srgb,var(--ink) 18%,transparent),color-mix(in srgb,var(--ink) 18%,transparent)) center/100% 8px no-repeat}
.kv{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.kv>div{border-top:1px solid var(--edge);padding-top:6px;min-width:0}
.kv .k{display:block;font-size:12px;color:var(--ink-muted)}
.kv .v{display:block;font-family:var(--font-serif);font-size:19px;line-height:1.25;font-variant-numeric:tabular-nums}
.kv .d{display:block;font-size:12px;color:var(--ink-muted);margin-top:2px;font-variant-numeric:tabular-nums}
.hint{font-size:13px;color:var(--ink-muted);margin:8px 0 0}

/* Charts */
.chart{width:100%;height:340px;margin-top:10px;touch-action:pan-y}
.chart svg{width:100%;height:100%;display:block;overflow:visible}
.chart text{font-family:var(--font-ui)}
.chart .axis text{font-size:11px;fill:var(--ink-muted);font-variant-numeric:tabular-nums}
.chart .axis line{stroke:var(--edge)}
.chart .at{font-size:11px;fill:var(--ink-muted)}
.chart .empty{font-size:13px;fill:var(--ink-muted)}
.chart .rg.fl{fill:var(--fl);fill-opacity:.07}
.chart .rg.lu{fill:var(--lu);fill-opacity:.07}
.chart .rl{font-size:11.5px;font-weight:600;paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round}
.chart .rl.fl{fill:var(--fl)}.chart .rl.lu{fill:var(--lu)}
.chart .dl{font-size:11px;fill:var(--ink-soft);font-variant-numeric:tabular-nums;paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round}
.chart .zero{stroke:var(--amber);stroke-width:2}
.chart .raw{fill:none;stroke:var(--ink);stroke-width:2.5;stroke-linejoin:round}
.chart .adj{fill:none;stroke:var(--ink-soft);stroke-width:2;stroke-dasharray:5 4}
.chart .band{fill:var(--neutral);opacity:.5}
.chart .med{fill:none;stroke:var(--ink-muted);stroke-width:1.25}
.chart .end{stroke:var(--surface);stroke-width:2}
.chart circle.end.raw{fill:var(--ink)}.chart circle.end.med{fill:var(--ink-muted)}
.chart .g1{fill:var(--ink);stroke:var(--surface);stroke-width:2}
.chart .ini{stroke:var(--ink-muted);stroke-width:1.5;stroke-dasharray:1 3;stroke-linecap:round}
.chart .gate{stroke:var(--edge-strong);stroke-width:1;stroke-dasharray:3 3}
.chart .xh{stroke:var(--ink-muted);stroke-width:1;stroke-dasharray:2 3;pointer-events:none}
.tip.gt{border:1px solid var(--edge-strong);line-height:1.45;font-variant-numeric:tabular-nums}
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:var(--ink-muted);margin-top:8px}
.legend>span{white-space:nowrap}
.legend .sw{display:inline-block;width:18px;height:3px;margin-right:6px;vertical-align:3px;background:var(--ink)}
.legend .sw.adj{background:repeating-linear-gradient(90deg,var(--ink-soft) 0 5px,transparent 5px 9px)}
.legend .sw.med{height:1.5px;background:var(--ink-muted)}
.legend .sw.ini{height:2px;background:repeating-linear-gradient(90deg,var(--ink-muted) 0 2px,transparent 2px 5px)}
.legend .sw.band{height:10px;vertical-align:0;background:var(--neutral);opacity:.7}
.legend .sw.zero{background:var(--amber)}
.legend .sw.diag{height:2px;background:var(--ink-muted)}
.legend .dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:-1px}
.legend .dot.up{background:var(--fl)}.legend .dot.dn{background:var(--lu)}
.chart.short{height:280px}
.chart.square{height:auto;aspect-ratio:1/1;max-width:520px}
:root{--s1:color-mix(in srgb,var(--edge-strong) 78%,var(--ink))}
.chart .s1{fill:none;stroke:var(--s1);stroke-width:2}
.chart .sp{fill:none;stroke:var(--ink-muted);stroke-width:2;stroke-dasharray:5 4}
.chart .s2{fill:none;stroke:var(--ink);stroke-width:2.5}
.chart circle.end.s1{fill:var(--s1)}.chart circle.end.sp{fill:var(--surface);stroke:var(--ink-muted);stroke-width:1.75}.chart circle.end.s2{fill:var(--ink)}
.chart .diag{stroke:var(--ink-muted);stroke-width:1.5}
.chart circle.up{fill:var(--fl);fill-opacity:.5;stroke:var(--surface);stroke-width:.6}
.chart circle.dn{fill:var(--lu);fill-opacity:.5;stroke:var(--surface);stroke-width:.6}
.legend .sw.s1{background:var(--s1)}
.legend .sw.sp{background:repeating-linear-gradient(90deg,var(--ink-muted) 0 5px,transparent 5px 9px)}
.legend .sw.s2{background:var(--ink)}
.split-now{margin:10px 0 0;font-size:15px}

/* States table */
/* Right-edge shadow while more columns are hidden; the 'local' cover hides it at the scroll end. */
.tbl{overflow-x:auto;-webkit-overflow-scrolling:touch;background:linear-gradient(to left,var(--surface) 40%,transparent) right/28px 100% no-repeat local,radial-gradient(farthest-side at 100% 50%,color-mix(in srgb,var(--ink) 22%,transparent),transparent) right/14px 100% no-repeat scroll}
.tbl table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;font-variant-numeric:tabular-nums}
.tbl th,.tbl td{text-align:right;padding:6px 8px;border-bottom:1px solid var(--edge);white-space:nowrap}
.tbl th:first-child,.tbl td:first-child{text-align:left;position:sticky;left:0;background:var(--surface);z-index:1}
.tbl th{font-weight:600;font-size:12px;color:var(--ink-muted);white-space:normal;vertical-align:bottom;line-height:1.3}
.tbl th:first-child{z-index:2}
.notes li{margin-bottom:6px}

@media (max-width:820px){
  .grid2{grid-template-columns:minmax(0,1fr)}
  .pcts{font-size:34px}
  .kv{grid-template-columns:minmax(0,1fr)}
  .kv>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;column-gap:12px}
  .kv .k{grid-column:1}.kv .v{grid-column:2;text-align:right;font-size:18px}
  .kv .d{grid-column:1/-1;text-align:right}
  .chart{height:260px}
  .chart.square{height:auto}
}
@media (max-width:560px){
  .wrap{padding:0 16px}
  .top{padding:12px 0 16px}
  /* Brand row: brand left, theme toggle right; the simulator link drops to a quiet second line. */
  .brandbar{flex-wrap:wrap;row-gap:4px;margin-bottom:12px}
  .brand strong{font-size:19px}
  .brand-actions{display:contents}
  .brand-actions .theme{order:2;margin-left:auto;font-size:12.5px;padding:4px 9px}
  .brand-actions .brand-link{order:3;flex-basis:100%;font-size:13px;color:var(--ink-soft)}
  .brand-link .long{display:inline}
  .top h1{font-size:29px;line-height:1.1;letter-spacing:-.035em;margin-bottom:6px}
  .headline-sub{font-size:14px;margin-bottom:12px}
  .hl-prob{margin-bottom:14px}
  .lede{font-size:14.5px;line-height:1.5}
  .status{font-size:13px}
  .card{padding:14px}
  .card h2{font-size:20px}
  .split-now{font-size:14px}
  .tbl table{font-size:13px}
  .tbl th,.tbl td{padding:6px 6px}
}
@media (max-width:380px){
  .hl-lab .hl-k{display:none}
  .top h1{font-size:27px}
}

/* "Apurado até agora" before 17h: a sentence and an empty track instead of dashes. */
.wait-msg{display:none;margin:6px 0 0;font-size:15px;color:var(--ink-soft)}
#now.waiting .wait-msg{display:block}
#now.waiting .pcts,#now.waiting .names{display:none}
#now.waiting .bar .l,#now.waiting .bar .f{background:transparent}
#now.waiting .kv .v{color:var(--ink-muted)}
.lede a{color:inherit;text-underline-offset:3px;text-decoration-color:var(--edge-strong)}
.notice{margin:0 0 16px;padding:10px 14px;border-left:4px solid var(--amber);background:var(--surface);font-size:14px;line-height:1.5;color:var(--ink-soft)}
.notice strong{color:var(--ink)}
.sc-filter{display:flex;align-items:center;gap:8px;margin:12px 0 4px;font-size:14px}
.sc-filter select{max-width:100%;min-width:0;flex:1 1 auto}
@media (min-width:821px){.sc-filter select{flex:0 1 320px}}
.sc-sum{margin:6px 0 0;font-size:14px;color:var(--ink-soft)}
#gapstates tr.tot td{font-weight:600;border-top:2px solid var(--edge-strong)}
