/* Base comum dos dois modos da /apuracao (Telão e Lista). Carrega depois de beds.css e site.css; apuracao-telao.css e
   apuracao-lista.css só valem dentro de .pa e .pb (body), escopo por :where para não mudar a especificidade.
   Cores de dado: --c (preenchimento) e --ct (texto que passa de 4.5:1 no tema). */
.pp {
  --t-pt: #ff6369; --t-pl: #6e9bff; --gov-a: #f5a524; --gov-b: #b49cff;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --barra-cel: 61px;                     /* altura da barra fixa de baixo (44 + 2 × 8 + borda) */
  --m22: var(--warning);
  min-height: 100dvh;
  font-variant-numeric: tabular-nums;
}
[data-tema=claro] .pp { --t-pt: #c62a2f; --t-pl: #2f5fe0; --gov-a: #a54f00; --gov-b: #7c3aed; }
.c-pt { --c: var(--pt); --ct: var(--t-pt); }
.c-pl { --c: var(--pl); --ct: var(--t-pl); }
.c-a { --c: var(--gov-a); --ct: var(--gov-a); }
.c-b { --c: var(--gov-b); --ct: var(--gov-b); }
.pp :where(ul, ol, dl, dd, figure) { margin: 0; }
.pp :where(ul, ol) { padding: 0; list-style: none; }
.pp img { display: block; }
:where(.pp) a { color: inherit; }
:where(.pp) button { font: inherit; color: inherit; }

/* ---------- cabeçalho compacto: uma linha, menu atrás de um botão (nav.js) ---------- */
.cab { position: relative; z-index: 30; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 var(--gutter); background: var(--background); border-bottom: 1px solid var(--border-strong); }
.cab-marca { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; font-weight: 600; color: var(--heading); }
.cab-marca .logo { width: 28px; height: 28px; }
.cab-pag { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 400; line-height: inherit; color: var(--muted-foreground); white-space: nowrap; }
.cab-pag::before { content: ''; width: 1px; height: 16px; background: var(--border-strong); }
.cab-pag b { font-weight: 500; color: var(--heading); }
.cab-acoes { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.fase { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font: 500 11px/16px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--heading); box-shadow: inset 0 0 0 1px var(--border-strong); white-space: nowrap; }
.fase::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-foreground); }
.fase[data-fase=vivo]::before { background: var(--vivo); }
.fase[data-fase=fim]::before { background: var(--heading); }
@media (max-width: 479px) { .cab-marca > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .cab-pag::before { display: none; } }

/* ---------- mapa (BR e cidades) ---------- */
.mapa-svg { display: block; width: 100%; height: auto; aspect-ratio: 3804 / 3921; }
.mapa-svg path { fill: var(--muted); stroke: var(--background); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; transition: fill .4s; }
.mapa-svg path.n0 { fill: color-mix(in oklab, var(--c) 34%, var(--background)); }
.mapa-svg path.n1 { fill: color-mix(in oklab, var(--c) 56%, var(--background)); }
.mapa-svg path.n2 { fill: color-mix(in oklab, var(--c) 78%, var(--background)); }
.mapa-svg path.n3 { fill: var(--c); }
.mapa-svg path.sel { stroke: var(--heading); stroke-width: 2.5; }
.mapa-svg .cidades path { stroke-width: .4; }
.mapa-svg .rotulos text { font: 600 64px var(--font-sans); fill: #fff; text-anchor: middle; paint-order: stroke; stroke: #0000004d; stroke-width: 8px; pointer-events: none; }
@media (hover: hover) { .mapa-svg path:hover { stroke: var(--heading); stroke-width: 1.5; } }
.legenda { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted-foreground); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 22px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in oklab, var(--c) 34%, var(--background)), var(--c)); }

/* ---------- story ---------- */
.dlg { padding: 0; border: 0; border-radius: 16px; background: var(--popover); color: var(--foreground); box-shadow: var(--shadow-dialog), inset 0 0 0 1px var(--border-strong); max-width: min(560px, calc(100vw - 32px)); }
.dlg::backdrop { background: var(--overlay); }
.dlg-x { position: absolute; inset: 10px 10px auto auto; z-index: 2; }

.foto { border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: var(--muted); outline: 1px solid #ffffff1a; outline-offset: -1px; }
[data-tema=claro] .foto { outline-color: #0000001a; }
.som[aria-pressed=true] { color: var(--heading); box-shadow: inset 0 0 0 1px var(--brand); }

/* ---------- peças compartilhadas: placas, régua, comparação, mapa, painel do estado, quadro, governadores ---------- */
.tc { color: var(--ct); }
/* As placas: uma por dígito, cor de papel, com a costura do placar de virar e a cor do candidato embaixo. */
.placa { display: flex; align-items: flex-end; gap: calc(var(--tw) * .07); }
.placa .t { position: relative; display: grid; place-items: center; width: var(--tw); height: calc(var(--tw) * 1.28); border-radius: calc(var(--tw) * .1); background: var(--papel); color: var(--tinta); font: 400 calc(var(--tw) * .96) / 1 var(--font-mono); letter-spacing: -.02em; perspective: 400px; box-shadow: inset 0 calc(var(--tw) * -.075) 0 var(--c), 0 1px 0 #00000040; overflow: hidden; }
.placa .t::after { content: ''; position: absolute; inset: 50% 0 auto; height: max(1px, calc(var(--tw) * .015)); background: #00000024; }
.placa .t b { font-weight: 400; display: block; transform-origin: 50% 50%; }
.placa .virg { font: 400 calc(var(--tw) * .9) / 1 var(--font-mono); color: var(--heading); width: calc(var(--tw) * .34); text-align: center; font-style: normal; }
.placa .pc { align-self: flex-start; margin-inline-start: calc(var(--tw) * .06); font: 600 calc(var(--tw) * .42) / 1 var(--font-sans); color: var(--muted-foreground); font-style: normal; }
[data-tema=claro] .placa .t { box-shadow: inset 0 0 0 1px #0000001f, inset 0 calc(var(--tw) * -.075) 0 var(--c); }
.perdeu .placa { opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .placa .t.vira b { animation: vira .42s var(--ease) both; animation-delay: calc(var(--k) * 55ms); }
}
@keyframes vira { from { transform: rotateX(-88deg); opacity: .3; } }
.cv { font-variant-numeric: tabular-nums; }
.cv.mudou { border-radius: 4px; animation: realce 1s ease-out; }
@keyframes realce { from { background: color-mix(in oklab, var(--brand) 30%, transparent); } }
.regua { display: grid; gap: 10px; }
.regua-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted-foreground); }
.regua-cab b { font-size: 22px; font-weight: 600; color: var(--heading); letter-spacing: -.01em; }
.trilho { position: relative; height: 8px; margin-bottom: 36px; border-radius: 999px; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.trilho .feito { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--heading); transition: width .8s var(--ease); }
.marco { position: absolute; left: var(--x); top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--muted-foreground); }
.marco span { position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; font-size: 12px; white-space: nowrap; color: var(--muted-foreground); }
.marco.m22 { top: -9px; bottom: -9px; width: 3px; margin-left: -1.5px; background: repeating-linear-gradient(var(--m22) 0 4px, transparent 4px 6px); }
.marco.m22 span { top: 100%; left: 0; translate: -4px 0; color: var(--m22); font-weight: 500; }
/* o rótulo da virada corre do traço para a direita; se não couber até o fim do trilho, recua só o necessário */
.trilho { container-type: inline-size; }
.marco.m22 span { translate: min(-4px, calc(100cqw * (100 - var(--xn, 0)) / 100 - 100%)) 0; }
@media (max-width: 359px) { .marco:not(.m22) span { display: none; } }
.agora { position: absolute; left: var(--x); top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--heading); box-shadow: 0 0 0 4px var(--background); transition: left .8s var(--ease); }
@media (prefers-reduced-motion: no-preference) { .agora::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--heading); animation: onda 2s ease-out infinite; } }
@keyframes onda { to { inset: -12px; opacity: 0; } }
.compara { display: block; }
.mapa-area { position: relative; display: grid; gap: 16px; }
.mapa-area .mapa-svg { max-height: 640px; }
.voltar { position: absolute; z-index: 2; inset: 0 auto auto 0; }

.painel-uf { display: grid; gap: 14px; align-content: start; position: sticky; top: 60px; }
.painel-uf select { width: 100%; }
.dica { font-size: 14px; color: var(--muted-foreground); text-wrap: pretty; }
.reg li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-block: 10px; border-bottom: 1px solid var(--border); }
.reg span { color: var(--heading); font-size: 14px; }
.reg small { display: block; font-size: 12px; color: var(--muted-foreground); }
.reg b { font-size: 14px; font-weight: 600; align-self: center; }
.reg .bar { grid-column: 1 / -1; }
.bar { position: relative; display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--muted); }
.bar i { background: var(--c); }
.bar i + i { box-shadow: inset 2px 0 0 var(--background); }
.bar b { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--heading); opacity: .6; }
.uf-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.uf-cab h3 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--heading); }
.uf-cab p { font-size: 13px; color: var(--muted-foreground); }
.uf-cands { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.uf-cands li { display: grid; gap: 2px; }
.uf-cands li + li { text-align: end; }
.uf-cands .nm { font-size: 14px; color: var(--heading); }
.uf-cands b { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.uf-cands small { font: 400 12px var(--font-mono); color: var(--muted-foreground); }
.painel-uf > .bar { height: 10px; border-radius: 5px; }
.uf-dif { font-size: 14px; color: var(--foreground); }
.uf-22 { font-size: 14px; color: var(--heading); padding-inline-start: 12px; box-shadow: inset 2px 0 0 var(--m22); text-wrap: pretty; }
.uf-22 .rot { color: var(--m22); margin-inline-end: 4px; }
.cid { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border-strong); }
.cid-lista li { display: flex; justify-content: space-between; gap: 12px; padding-block: 7px; border-bottom: 1px solid var(--border); font-size: 14px; }
.cid-lista:empty { display: none; }
.cid-lista b { font-weight: 600; }
.nota { font-size: 12px; color: var(--muted-foreground); }

/* ---------- quadro de estados ---------- */
.quadro { padding-block: 48px 8px; }
.quadro h2 { margin-bottom: 16px; }
.quadro-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px 28px; align-items: start; }
.qpar { display: grid; gap: 24px; align-content: start; }
.qcol h3 { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border-strong); font-size: 14px; font-weight: 600; color: var(--heading); }
.qcol h3 b { font-weight: 600; font-size: 13px; }
.qcol :is(button, a) { display: grid; color: inherit; text-decoration: none; grid-template-columns: 30px 1fr 38px 34px; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: start; }
@media (hover: hover) { .qcol :is(button, a):hover { background: var(--secondary); } }
.qcol .sig { font: 400 13px var(--font-mono); color: var(--heading); }
.qcol :is(button, a) b { font-size: 13px; font-weight: 600; text-align: end; }
.qcol small { font: 400 11px var(--font-mono); color: var(--muted-foreground); text-align: end; }

/* ---------- governadores ---------- */
.governos { padding-block: 48px 8px; }
.governos .sub { margin: 4px 0 16px; font-size: 14px; color: var(--muted-foreground); }
.gov-lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.gov-lista li { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--border-strong); }
.g-uf { grid-column: 1 / -1; font-size: 15px; font-weight: 600; color: var(--heading); }
.g-uf small { display: block; font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.g-c { display: grid; font-size: 13px; color: var(--foreground); }
.g-c.dir { text-align: end; }
.g-c b { font-size: 20px; font-weight: 600; }
.g-c.perdeu b { opacity: .6; }
.gov-lista .bar { grid-column: 1 / -1; }

/* ---------- mapa: zoom no estado ---------- */
.mapa-svg path[data-uf] { transition: fill .4s, opacity .45s var(--ease); }
.mapa-svg.foco path[data-uf]:not(.sel) { opacity: .22; }
.mapa-svg.foco .rotulos { display: none; }
.mapa-svg .cidades { animation: aparece .35s var(--ease) both; }
@keyframes aparece { from { opacity: 0; } }
.mapa-svg .cidades path { stroke-width: .5; }

/* ---------- atualização visível ---------- */
.atz { --p: 0; display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; color: var(--muted-foreground); }
.atz-anel { flex: none; width: 22px; height: 22px; }
.atz-anel svg { display: block; width: 100%; height: 100%; rotate: -90deg; fill: none; stroke-width: 2.4; }
.atz-anel circle { stroke: var(--border-strong); }
.atz-anel .atz-p { stroke: var(--vivo); stroke-dasharray: 100; stroke-dashoffset: calc(var(--p) * 100); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.atz[data-fase=buscando] .atz-anel svg { animation: gira .8s linear infinite; }
.atz[data-fase=buscando] .atz-p { stroke-dashoffset: 70; }
.atz[data-fase=parado] .atz-anel { display: none; }
.atz-t { min-width: 0; }
.atz-camadas { display: grid; }
.atz-camadas > [data-c] { grid-area: 1 / 1; visibility: hidden; white-space: nowrap; }
.atz-camadas > .on { visibility: visible; }
.atz-t { color: var(--heading); font-weight: 500; }
.atz-n { font-weight: inherit; font-variant-numeric: tabular-nums; }
.atz-btn { flex: none; }
.atz-btn[aria-disabled] { opacity: .7; cursor: progress; }
.atz[data-fase=buscando] .ico-atz { animation: gira .8s linear infinite; }
@keyframes gira { to { rotate: 1turn; } }
.atz-cheio .atz-btn { margin-inline-start: 4px; }
/* variante da barra do celular: um botão com o anel e a contagem */
.atz-barra { display: contents; }
.atz-barra .atz-btn { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 52px; padding: 4px 0; border: 0; border-radius: 10px; background: transparent; font-size: 12px; color: var(--heading); cursor: pointer; }
.atz-barra .atz-anel { width: 22px; height: 22px; }
.atz-barra .atz-s { font: 400 10px var(--font-mono); color: var(--muted-foreground); }
.atz-barra .atz-b { line-height: 1.2; }
@media (prefers-reduced-motion: reduce) { .atz-anel .atz-p { transition: none; } }

/* ---------- modelos: botão compacto, grade com miniaturas e o modal (folha no celular) ---------- */
.btn-modelo { gap: 10px; padding-inline-start: 6px; }
.btn-modelo b { font-weight: 600; }
.bm-mini { display: block; width: 18px; height: 32px; border-radius: 3px; overflow: hidden; background: var(--raised); box-shadow: 0 0 0 1px var(--border-strong); }
.bm-mini canvas, .gm-mini canvas { display: block; width: 100%; height: 100%; }
.gm { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.gm button { display: grid; justify-items: center; gap: 6px; padding: 6px 6px 8px; border: 0; border-radius: 12px; background: var(--secondary); box-shadow: inset 0 0 0 1px var(--border-strong); font: 500 12px/1.3 var(--font-sans); color: var(--foreground); cursor: pointer; }
.gm [aria-selected=true] { box-shadow: inset 0 0 0 2px var(--brand); color: var(--heading); }
@media (hover: hover) { .gm button:hover { background: var(--raised); } }
.gm-mini { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--raised); }
.gm-nome { text-align: center; }
.st-modelos.gm { grid-template-columns: 1fr 1fr; align-content: start; max-height: min(640px, 62dvh); overflow: auto; padding-inline-end: 4px; }
@media (max-width: 640px) {
  .gm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-modelos.gm { display: flex; max-height: none; overflow-x: auto; padding-bottom: 4px; }
  .st-modelos.gm button { flex: 0 0 76px; }
}
@keyframes sobe { from { translate: 0 100%; } }
@media (max-width: 640px) {
  #dlg-story { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) { #dlg-story[open] { animation: sobe .3s var(--ease); } }

/* ---------- story: modal com prévia em canvas e, na A, a lista de modelos ---------- */
#dlg-story { width: min(860px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); }
#dlg-story[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.st-cab, .st-pe { display: flex; align-items: center; gap: 8px; padding: 14px 16px; }
.st-cab > div { margin-inline-end: auto; }
.st-cab h2 { font-size: 16px; font-weight: 600; color: var(--heading); }
.st-pe { border-top: 1px solid var(--border-strong); }
.st-pe .st-nome { margin-inline-end: auto; }
.st-corpo { display: grid; gap: 14px; padding: 0 16px 16px; min-height: 0; overflow: auto; }
.st-corpo.com-lista { grid-template-columns: 220px 1fr; }
.st-palco { display: grid; place-items: center; min-height: 0; }
.st-palco canvas { display: block; width: auto; height: min(62dvh, 640px); max-width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; box-shadow: 0 0 0 1px var(--border-strong), 0 12px 32px #0000003d; }
.st-modelos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; max-height: min(640px, 62dvh); overflow: auto; padding-inline-end: 4px; }
@media (max-width: 640px) {
  .st-corpo.com-lista { grid-template-columns: 1fr; }
  .st-modelos { display: flex; max-height: none; overflow-x: auto; padding-bottom: 4px; }
  .st-palco canvas { height: min(52dvh, 520px); }
}

@media (prefers-reduced-motion: reduce) {
  .pp *, .pp *::before, .pp *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- "Criar story" e "Baixar imagem": o botão arco-íris da colinha (cópia de colinha.css) ----------
   Letras em arco-íris com a cor correndo em onda, fundo escuro nos dois temas; sem movimento, cada letra fica na sua cor. */
.btn.btn-arco { background: #0d0d0d; color: #f1f1f1; box-shadow: inset 0 0 0 1px #ffffff1f; font-family: var(--font-mono); letter-spacing: .02em; }
@media (hover: hover) { .btn.btn-arco:hover { background: #1c1c1c; } }
.arco span { --c0: #ef6b6b; color: var(--c0); }
.arco span:nth-child(7n+2) { --c0: #f39a4a; } .arco span:nth-child(7n+3) { --c0: #f5cb4d; } .arco span:nth-child(7n+4) { --c0: #79d465; }
.arco span:nth-child(7n+5) { --c0: #5aaaf8; } .arco span:nth-child(7n+6) { --c0: #9c8afa; } .arco span:nth-child(7n) { --c0: #de83e6; }
@keyframes arco {
  0%, 100% { color: #ef6b6b; } 14% { color: #f39a4a; } 28% { color: #f5cb4d; } 43% { color: #79d465; }
  57% { color: #5aaaf8; } 71% { color: #9c8afa; } 86% { color: #de83e6; }
}
@media (prefers-reduced-motion: no-preference) {
  .arco span { animation: arco 2.1s linear infinite; animation-delay: calc(var(--i) * -.15s); }
}
@media (max-width: 640px) { .st-pe { flex-wrap: wrap; } .st-pe .st-nome { flex-basis: 100%; } }

/* ---------- velocímetro (votos por segundo nos últimos boletins): neutro e verde da colinha, nunca cor de candidato ---------- */
.velo[hidden], .velo-mini[hidden] { display: none; }
.velo-svg { display: block; width: 100%; height: auto; overflow: visible; }
.v-fundo { fill: none; stroke: color-mix(in oklab, var(--muted-foreground) 28%, transparent); stroke-width: 10; stroke-linecap: round; }
.v-valor { fill: none; stroke: var(--brand); stroke-width: 10; stroke-linecap: round; }
.v-marca { stroke: var(--muted-foreground); stroke-width: 1; }
.v-marca.maior { stroke: var(--foreground); stroke-width: 1.8; }
.v-rot { font: 500 10px var(--font-sans); fill: var(--muted-foreground); text-anchor: middle; }
.v-agulha { stroke: var(--heading); stroke-width: 3; stroke-linecap: round; }
.v-eixo { fill: var(--heading); stroke: var(--background); stroke-width: 2; }
.v-pico line { stroke: var(--foreground); stroke-width: 2.5; stroke-dasharray: 2.5 2; }
.v-pico .v-fantasma { stroke: var(--muted-foreground); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 4 4; opacity: .55; }
.velo-svg.mini .v-fundo, .velo-svg.mini .v-valor { stroke-width: 5; }
.velo-svg.mini .v-agulha { stroke-width: 2; }
.velo-svg.mini .v-eixo { stroke-width: 1; }
.velo-svg.mini .v-pico line { stroke-width: 1.5; stroke-dasharray: none; }
.velo-svg.mini .v-pico .v-fantasma { stroke-width: 1.2; stroke-dasharray: 2 2; }

/* ---------- grupo de ações (Atualizar, Modelo, Story, Som): ícone + rótulo no desktop, só ícone no celular ---------- */
.grupo-acoes { display: flex; align-items: center; gap: 8px; }
.grupo-acoes .btn svg { width: 16px; height: 16px; }
.ico-insta { fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn-arco .ico-insta { stroke: url(#ig-arco); }
.btn-arco .ico-insta .ig-c { stroke: none; fill: #5aaaf8; }
@keyframes arco-traco { 0%, 100% { stroke: #ef6b6b; } 14% { stroke: #f39a4a; } 28% { stroke: #f5cb4d; } 43% { stroke: #79d465; } 57% { stroke: #5aaaf8; } 71% { stroke: #9c8afa; } 86% { stroke: #de83e6; } }
@keyframes arco-ponto { 0%, 100% { fill: #ef6b6b; } 14% { fill: #f39a4a; } 28% { fill: #f5cb4d; } 43% { fill: #79d465; } 57% { fill: #5aaaf8; } 71% { fill: #9c8afa; } 86% { fill: #de83e6; } }
@media (prefers-reduced-motion: no-preference) {
  .btn-arco .ico-insta .ig-a { animation: arco-traco 2.1s linear infinite; }
  .btn-arco .ico-insta .ig-b { animation: arco-traco 2.1s linear infinite -.3s; }
  .btn-arco .ico-insta .ig-c { animation: arco-ponto 2.1s linear infinite -.6s; }
}
.som .mudo { display: none; }
.som[aria-pressed=false] .ondas { display: none; }
.som[aria-pressed=false] .mudo { display: block; }
.som[aria-pressed=true] { color: var(--heading); box-shadow: inset 0 0 0 1px var(--brand); }
.so-cel { display: none; }
/* barra fixa de baixo no celular: o mesmo grupo, só ícones de 44 px */
.grupo-acoes.cel { position: fixed; z-index: 30; inset: auto 0 0; justify-content: flex-end; gap: 6px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: color-mix(in oklab, var(--background) 95%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border-strong); }
.grupo-acoes.cel .g-rot { display: none; }
.grupo-acoes.cel .btn { width: 44px; min-height: 44px; padding: 0; }
.grupo-acoes.cel .btn svg { width: 20px; height: 20px; }
.grupo-acoes.cel .bm-mini { width: 16px; height: 28px; }
.grupo-acoes.cel .atz { margin-inline-end: auto; gap: 6px; }
.grupo-acoes.cel .so-cel { display: inline-flex; }
/* aviso de virada no placar */
.aviso-virada { position: absolute; z-index: 5; left: 50%; top: 8px; translate: -50% -8px; padding: 8px 16px; border-radius: 999px; background: var(--popover); box-shadow: var(--shadow-dialog), inset 0 0 0 2px var(--c, var(--brand)); font-size: 15px; color: var(--heading); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s var(--ease); }
.aviso-virada b { color: var(--ct, var(--heading)); margin-inline-end: 4px; }
.aviso-virada.on { opacity: 1; translate: -50% 0; }

/* ---------- comparação com 2022: desligada por padrão; o botão do topo liga <html data-c22="on"> ----------
   As camadas abrem e fecham pela altura (grid 0fr → 1fr) com opacidade, sem salto brusco. */
.c22-btn[aria-pressed=true] { background: var(--m22); color: var(--background); box-shadow: none; } /* camada ligada: preenchido (texto 5:1 ou mais nos dois temas) */
@media (max-width: 719px) { .cab .c22-btn { width: 44px; padding: 0; } .cab .c22-btn .g-rot { display: none; } }
.camada-22 { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .35s var(--ease), opacity .2s, visibility 0s .35s; }
.camada-22 > div { min-height: 0; overflow: hidden; }
[data-c22=on] .camada-22 { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition: grid-template-rows .35s var(--ease), opacity .3s .1s, visibility 0s; }
.marco.m22, .cb-trilho .m22, .cb-22 { transition: opacity .3s; }
html:not([data-c22=on]) .marco.m22, html:not([data-c22=on]) .cb-trilho .m22, html:not([data-c22=on]) .cb-22 { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .camada-22, [data-c22=on] .camada-22 { transition: none; } }

.c22 { display: grid; gap: 16px; margin-top: 8px; padding: 18px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border-strong), inset 3px 0 0 var(--m22); }
.c22-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.c22-cab h2 { font-size: 18px; font-weight: 600; color: var(--heading); }
.c22-aviso { font-size: 12px; font-weight: 500; color: var(--m22); }
.c22-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px 28px; align-items: start; }
.c22-bloco { display: grid; gap: 10px; margin: 0; min-width: 0; }
.c22-bloco h3 { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); }
.c22-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.c22-col { display: grid; gap: 6px; }
.c22-ano { font-size: 16px; font-weight: 700; color: var(--heading); }
.c22-ano span { display: block; font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.c22-par { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.c22-par b { display: block; font-size: 18px; font-weight: 600; }
.c22-col .bar, .c22-br .bar { height: 8px; border-radius: 4px; }
.c22-dif { font-size: 12px; color: var(--muted-foreground); }
.c22-barras { display: grid; gap: 10px; }
.c22-br { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; color: var(--foreground); }
.c22-v { font-size: 13px; white-space: nowrap; }
.c22-v b { font-weight: 600; }
.c22-br.fantasma .bar { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.c22-br.fantasma .bar i { opacity: .55; background: repeating-linear-gradient(135deg, var(--c) 0 4px, transparent 4px 7px); }
.c22-svg { display: block; width: 100%; max-width: 360px; max-height: 180px; height: auto; } /* não cresce com a coluna: o texto fica perto de 12 px */
.c22-eixo line { stroke: var(--border-strong); stroke-width: 1; }
.c22-eixo line.meio { stroke: var(--muted-foreground); stroke-dasharray: 3 3; }
.c22-eixo text, .c22-virada-t { font: 400 12px var(--font-sans); fill: var(--muted-foreground); }
.c22-virada { stroke: var(--m22); stroke-width: 1.5; stroke-dasharray: 3 3; }
.c22-virada-t { fill: var(--m22); font-weight: 600; }
.c22-l22 { fill: none; stroke: var(--m22); stroke-width: 2; stroke-linejoin: round; }
.c22-l26 { fill: none; stroke: var(--heading); stroke-width: 2.5; stroke-linejoin: round; }
.c22-p26 { fill: var(--heading); stroke: var(--card); stroke-width: 2; }
.c22-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted-foreground); }
.c22-leg span { display: inline-flex; align-items: center; gap: 6px; }
.c22-leg span::before { content: ''; width: 16px; height: 2.5px; border-radius: 2px; }
.lg-22::before { background: var(--m22); } .lg-26::before { background: var(--heading); }
.c22-fatos li { padding-block: 7px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--heading); text-wrap: pretty; }
.c22-fatos li:last-child { border-bottom: 0; }
.c22-b .c22 { margin: 0 0 16px; }
@media (max-width: 479px) { .c22 { padding: 14px; } .c22-br { grid-template-columns: 1fr auto; } .c22-br > span:first-child { grid-column: 1 / -1; } }

/* ---------- rodapé: fonte dos dados, Peteleco, anúncio e o tema (Claro · Escuro · Sistema) ---------- */
.rodape-pp { display: grid; gap: 14px; max-width: 1680px; margin: 40px auto 0; padding: 20px var(--gutter) 28px; border-top: 1px solid var(--border-strong); font-size: 13px; color: var(--muted-foreground); }
.rp-fonte { max-width: 90ch; text-wrap: pretty; }
.rp-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.rp-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.rp-links a, .rp-fonte a { color: var(--heading); text-underline-offset: 3px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; font: 500 13px var(--font-sans); color: var(--muted-foreground); cursor: pointer; }
.seg [aria-checked=true] { background: var(--raised); color: var(--heading); box-shadow: 0 0 0 1px var(--border-strong); }
[data-tema=claro] .seg [aria-checked=true] { background: #fff; box-shadow: 0 0 0 1px var(--border-strong), 0 1px 2px #0000001a; }
@media (pointer: coarse) { .seg button { min-height: 44px; } }

/* ---------- visão: segmentado Telão | Lista ao lado do título (modo atual preenchido) ---------- */
.visao-seg { position: relative; display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 10px; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.visao-seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 7px; font: 500 13px var(--font-sans); color: var(--muted-foreground); text-decoration: none; white-space: nowrap; }
.visao-seg a svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.visao-seg a[aria-current] { background: var(--primary); color: var(--primary-foreground); }
@media (hover: hover) { .visao-seg a:not([aria-current]):hover { color: var(--heading); background: var(--secondary); } }
.visao-seg a:focus-visible { outline-offset: 1px; }
.visao-dica { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--popover); box-shadow: var(--shadow-dialog), inset 0 0 0 1px var(--brand); font-size: 12px; color: var(--heading); white-space: nowrap; }
.visao-dica::before { content: ''; position: absolute; top: -5px; left: 18px; width: 8px; height: 8px; rotate: 45deg; background: var(--popover); box-shadow: -1px -1px 0 var(--brand); }
@media (prefers-reduced-motion: no-preference) { .visao-seg.novo { animation: pulso-seg 1.4s ease-out 2; } }
@keyframes pulso-seg { 0% { box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 0 color-mix(in oklab, var(--brand) 55%, transparent); } 100% { box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 10px transparent; } }
/* o "2022" é uma camada liga/desliga, não um modo: fica nas ações da direita, com outro desenho */
@media (max-width: 559px) {
  .cab { gap: 8px; }
  .cab-turno { display: none; }
  .visao-seg a { width: 40px; min-height: 36px; padding: 0; justify-content: center; }
  .visao-seg a span { display: none; }
  .visao-dica { left: auto; right: -40px; white-space: normal; width: 180px; }
  .visao-dica::before { left: auto; right: 60px; }
}
@media (max-width: 479px) { .cab-pag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } } /* com o seletor de turno, o título só para o leitor de tela */

/* ---------- bloco do mapa (o mesmo nos dois modos) ---------- */
.mp { container-type: inline-size; display: grid; gap: 14px; }
.mp-grade { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@container (min-width: 900px) { .mp-grade { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 32px; } }
@container (max-width: 899px) { .mp .painel-uf { position: static; } }
.mp .painel-uf select { width: 100%; }

/* ---------- gaveta: abas Mapa · Estados · Governadores (ao lado da fita na Lista; folha que sobe no celular, nos dois modos) ---------- */
.gv-cab { display: flex; align-items: center; gap: 8px; padding: 12px 12px 0; }
.abas { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.abas button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.abas [aria-selected=true] { background: var(--raised); color: var(--heading); box-shadow: 0 0 0 1px var(--border-strong); }
[data-tema=claro] .abas [aria-selected=true] { background: #fff; box-shadow: 0 0 0 1px var(--border-strong), 0 1px 2px #0000001a; }
.gv-fechar { display: none; margin-inline-start: auto; }
.gv-corpo { overflow: auto; padding: 14px 16px 18px; scrollbar-width: thin; }
.gv-corpo > section { display: grid; gap: 14px; align-content: start; }
.gaveta .painel-uf { position: static; }
.reg-cab { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; margin-top: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border-strong); font-size: 14px; font-weight: 600; color: var(--heading); }
.reg-cab:first-child { margin-top: 0; }
.reg-cab small { grid-row: 2; font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.reg-cab b { grid-row: 1 / 3; align-self: center; font-size: 13px; }
.ufs :is(button, a) { display: grid; color: inherit; text-decoration: none; grid-template-columns: minmax(0, 1fr) 80px 92px 32px; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: start; font-size: 13px; }
@media (hover: hover) { .ufs :is(button, a):hover { background: var(--secondary); } }
.ufs .nm { color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ufs b { font-weight: 600; text-align: end; }
.ufs small { font: 400 11px var(--font-mono); color: var(--muted-foreground); text-align: end; }
.sub { font-size: 14px; color: var(--muted-foreground); }
.gov li { display: grid; gap: 6px; padding-block: 12px; border-bottom: 1px solid var(--border); }
.g-uf { font-size: 14px; font-weight: 600; color: var(--heading); }
.g-uf small { display: block; font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.g-cs { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.g-cs span:last-child { text-align: end; }
.g-cs b { display: block; font-size: 18px; font-weight: 600; }
.g-cs .perdeu b { opacity: .6; }
.gaveta { display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border-strong); }
.gaveta.folha { position: fixed; z-index: 40; inset: auto 0 0; top: auto; margin: 0; max-height: 86dvh; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-dialog), inset 0 0 0 1px var(--border-strong); translate: 0 105%; visibility: hidden; transition: translate .3s var(--ease), visibility 0s .3s; }
.gaveta.folha.aberta { translate: 0 0; visibility: visible; transition: translate .3s var(--ease); }
.gaveta.folha .gv-fechar { display: inline-flex; }
.gaveta.folha #gv-mapa .mapa-svg { max-height: 46vh; }
.folha-aberta::after { content: ''; position: fixed; inset: 0; z-index: 35; background: var(--overlay); }
@media (max-width: 479px) {
  .ufs :is(button, a) { grid-template-columns: minmax(0, 1fr) 56px 84px 30px; gap: 8px; }
  .abas { min-width: 0; }
  .abas button { padding: 0 9px; }
}

/* carregando as cidades de uma UF (o zoom não espera) */
.dica.carregando { display: flex; align-items: center; gap: 8px; }
.giro { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--heading); }
@media (prefers-reduced-motion: no-preference) { .giro { animation: gira .8s linear infinite; } }

.dica-mapa { position: absolute; z-index: 3; padding: 6px 10px; border-radius: 8px; background: var(--popover); box-shadow: var(--shadow-dialog), inset 0 0 0 1px var(--border-strong); font-size: 13px; color: var(--heading); white-space: nowrap; pointer-events: none; }
.dica-mapa b { font-weight: 600; margin-inline-end: 4px; }


/* ---------- produção: menu do site (nav.js), avisos de atraso, anúncio sem imagem ---------- */
.cab .menu-site { margin-inline-start: 0; }
.telao-hora.alerta, .cb-ultimo.alerta { color: var(--warning); }
.cb-ultimo.alerta .rot { color: var(--warning); }

/* ---------- cidades no painel do estado: progresso, busca, resultados, escolhida, maiores e tabela ---------- */
.cid-prog { font-size: 12px; line-height: 16px; color: var(--muted-foreground); text-wrap: pretty; }
.cid-campo { position: relative; }
.cid-campo svg { position: absolute; inset-inline-start: 12px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; fill: none; stroke: var(--muted-foreground); stroke-width: 1.5; stroke-linecap: round; pointer-events: none; }
.cid-campo .entrada { padding-inline-start: 36px; background: var(--secondary); }
.cid-res:empty { display: none; }
.cid-res, .cid-top .cid-lista { display: grid; gap: 2px; }
.cid-res button, .cid-top button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--heading); font: 400 14px/1.3 var(--font-sans); text-align: start; cursor: pointer; }
.cid-top .cid-lista li { display: block; padding: 0; border-bottom: 1px solid var(--border); }
.cid-top .cid-lista button { border-radius: 6px; padding-inline: 6px; }
@media (hover: hover) { .cid-res button:hover, .cid-top button:hover { background: var(--secondary); } }
.cid-res button:focus-visible, .cid-top button:focus-visible { outline-offset: -2px; background: var(--secondary); }
.cid-res .dica { padding: 4px 10px; }
.cid-res b, .cid-top b { flex: none; font-size: 13px; font-weight: 600; }
.cid-res .sem, .cid-top .sem { flex: none; font-size: 12px; color: var(--muted-foreground); }
.cid-sel { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--border-strong); }
.cs-nm { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; font-size: 14px; color: var(--heading); }
.cs-nm span { font-size: 12px; color: var(--muted-foreground); }
.cs-cands b { font-size: 24px; }
.cid-top { display: grid; gap: 6px; }
.cid-top:empty { display: none; }
.cid-tab summary, .c22-metodo summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; color: var(--foreground); cursor: pointer; list-style: none; }
.cid-tab summary::-webkit-details-marker, .c22-metodo summary::-webkit-details-marker { display: none; }
.cid-tab summary::before, .c22-metodo summary::before { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; rotate: -45deg; transition: rotate .15s; }
.cid-tab[open] summary::before, .c22-metodo[open] summary::before { rotate: 45deg; }
@media (pointer: coarse) { .cid-tab summary, .c22-metodo summary { min-height: 44px; } }
.tabela-rola { max-height: min(40dvh, 360px); overflow: auto; overscroll-behavior: contain; margin-top: 8px; }
.cid-tab table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; }
.cid-tab th, .cid-tab td { padding: 6px 8px; border-bottom: 1px solid var(--border-strong); text-align: start; font-weight: 400; }
.cid-tab thead th { position: sticky; top: 0; background: var(--card); color: var(--muted-foreground); font-size: 12px; }
.cid-tab .n { text-align: end; font-variant-numeric: tabular-nums; }
.cid-tab td.lid { color: var(--heading); font-weight: 600; }
.cid-tab th button { min-height: 28px; padding: 0; border: 0; background: none; color: var(--heading); font: inherit; text-align: start; text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 30%, transparent); text-underline-offset: 3px; cursor: pointer; }
.c22-metodo p { margin-top: 6px; font-size: 12px; line-height: 18px; color: var(--muted-foreground); max-width: 70ch; text-wrap: pretty; }
.c22-metodo p b { color: var(--foreground); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .cid-tab summary::before, .c22-metodo summary::before { transition: none; } }
.legenda .lg-vazio i { background: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
/* ---------- turnos: seletor [1º turno | 2º turno], replay do 1º turno ---------- */
/* Governadores no replay do 1º turno: cinzas neutros por posição para quem não é de PT nem PL (texto acima de 4.5:1). */
.pp { --gov-n1: #d4d4d8; --gov-n2: #9b9ba3; }
[data-tema=claro] .pp { --gov-n1: #3f3f46; --gov-n2: #6b6b74; }
.c-n1 { --c: var(--gov-n1); --ct: var(--gov-n1); }
.c-n2 { --c: var(--gov-n2); --ct: var(--gov-n2); }
.turno-seg .t-c { display: none; }
.turno-seg a { justify-content: center; }
@media (max-width: 559px) {
  .turno-seg a { width: 36px; }
  .turno-seg .t-l { display: none; }
  .turno-seg .t-c { display: inline; }
}
#vista { display: contents; }
#vista[hidden] { display: none; }
[data-turno="1"] .manchete { min-height: 2lh; }
@media (max-width: 559px) { [data-turno="1"] .manchete { min-height: 3lh; } }
/* o canvas dos lotes guarda o lugar desde o começo do replay (ele aparece com 2 min de boletins) */
@media (prefers-reduced-motion: no-preference) { [data-turno="1"] .telao > .ritmo-cv[hidden] { display: block !important; visibility: hidden; } }
[data-turno="1"] [data-atz] { display: none !important; } /* no replay não há o que atualizar */
.fase[data-fase=replay] { background: var(--warning); color: var(--background); box-shadow: none; font-weight: 600; }
.fase[data-fase=replay]::before { background: currentColor; }
:where(.pa) .telao-topo .fase[data-fase=replay] { background: none; color: var(--warning); font-weight: 700; } /* no Telão a fase é texto com um ponto, não pílula */

/* barra do replay: marca REPLAY, relógio grande e controles; alturas fixas para nada se mexer enquanto toca */
.rp { display: none; }
[data-turno="1"] .rp { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "marca relogio" "ctl ctl"; align-items: center; gap: 10px 14px; padding: 12px var(--gutter); background: var(--card); border-bottom: 1px solid var(--border-strong); }
@media (min-width: 1024px) { [data-turno="1"] .rp { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "marca relogio ctl"; } }
.rp-marca { grid-area: marca; margin: 0; padding: 4px 10px; border-radius: 6px; background: var(--warning); color: var(--background); font: 700 13px/18px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.rp-relogio { grid-area: relogio; margin: 0; min-width: 0; color: var(--muted-foreground); font-size: 15px; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-relogio b { display: inline-block; min-width: 3.4ch; color: var(--heading); font: 600 28px/32px var(--font-sans); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rp-rapido { display: none; color: var(--warning); font-size: 13px; }
.rp.rapido .rp-rapido { display: inline; }
.rp-ctl { grid-area: ctl; display: flex; align-items: center; gap: 8px; min-width: 0; }
.rp-ctl > .btn { flex: none; }
.rp-play { min-width: 112px; justify-content: center; }
.rp-play svg { width: 16px; height: 16px; flex: none; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rp-play .ico-play, .rp-play[data-estado=parado] .ico-pausa { display: none; }
.rp-play[data-estado=parado] .ico-play { display: block; }
.rp-reini svg { fill: none; }
.rp-trilho { position: relative; flex: 1; min-width: 120px; padding-bottom: 16px; }
.rp-barra { display: block; width: 100%; height: 28px; margin: 0; accent-color: var(--warning); cursor: pointer; }
.rp-marcas { position: absolute; inset: auto 8px 0; height: 16px; font-size: 11px; line-height: 16px; color: var(--muted-foreground); pointer-events: none; }
.rp-marcas span { position: absolute; left: calc(var(--x) * 100%); translate: -50% 0; white-space: nowrap; }
.rp-marcas span::before { content: ''; position: absolute; left: 50%; top: -5px; width: 1px; height: 4px; background: var(--border-strong); }
.rp-vel { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 10px; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rp-vel button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--muted-foreground); font: 500 13px var(--font-sans); white-space: nowrap; cursor: pointer; }
.rp-vel button[aria-pressed=true] { background: var(--primary); color: var(--primary-foreground); }
@media (hover: hover) { .rp-vel button[aria-pressed=false]:hover { color: var(--heading); background: var(--secondary); } }
.rp-aviso { grid-column: 1 / -1; margin: 0; color: var(--warning); font-size: 14px; }
.rp.sem-dado .rp-ctl { opacity: .5; }
@media (max-width: 559px) {
  .rp-play { min-width: 44px; padding: 0; width: 44px; }
  .rp-play .g-rot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rp-vel .so-largo { display: none; }
  .rp-vel button { padding: 0 8px; }
  .rp-relogio b { font-size: 24px; }
  .rp-dia { font-size: 14px; }
}
@media (max-width: 719px) { .rp-marcas span:nth-child(2), .rp-marcas span:nth-child(3) { display: none; } }
@media (max-width: 359px) { .rp-ctl { gap: 6px; } .rp-trilho { min-width: 72px; } .rp-vel button { padding: 0 6px; } .rp-relogio .rp-rot { display: none; } .rp-marcas span:nth-child(4) { display: none; } }
@media (pointer: coarse) { .rp-vel button { min-height: 40px; } }

/* replay: os outros dez candidatos a presidente sob as placas (Telão) e na fita (Lista) */
.outros:empty { display: none; }
.outros { margin-top: 18px; }
.outros-t { margin: 0 0 8px; color: var(--muted-foreground); font: 500 12px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; }
.outros-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 2px 24px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.outros-l li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 28px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.outros-l .nm { min-width: 0; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outros-l small { color: var(--muted-foreground); font-size: 12px; }
.outros-l b { font-weight: 500; color: var(--heading); }
.f-outros { display: grid; gap: 2px; margin-top: 4px; font-size: .86em; color: var(--ink-2); }

/* ---------- Telão: o cabeçote da Lista fixo no topo depois que o placar grande sai da tela ----------
   Sobreposto (fixed), então nada abaixo se mexe; desliza e aparece em 150 ms (com movimento reduzido, só aparece). */
.cabecote.cb-fixo { position: fixed; inset: 0 0 auto; z-index: 25; translate: 0 -100%; opacity: 0; visibility: hidden; transition: translate .15s var(--ease), opacity .15s, visibility 0s .15s; }
.cabecote.cb-fixo.on { translate: 0 0; opacity: 1; visibility: visible; transition: translate .15s var(--ease), opacity .15s; }
@media (prefers-reduced-motion: reduce) { .cabecote.cb-fixo, .cabecote.cb-fixo.on { transition: none; } }
.cbf-rp { display: none; align-items: center; gap: 6px; flex: none; }
[data-turno="1"] .cbf-rp { display: flex; }
.cbf-hora { min-width: 3.4ch; margin-inline-end: 2px; font: 600 16px/1 var(--font-sans); color: var(--heading); font-variant-numeric: tabular-nums; }
.cbf-play svg { fill: currentColor; }
.cbf-play .ico-play, .cbf-play[data-estado=parado] .ico-pausa { display: none; }
.cbf-play[data-estado=parado] .ico-play { display: block; }
@media (max-width: 819px) { .cb-fixo .cb-atz { display: none; } }

/* ---------- replay no celular: os controles na barra fixa de baixo, em duas linhas (três em 359 px ou menos) ----------
   O bloco #replay entra em #acoes com display: contents e cada peça ocupa uma área da grade. */
.grupo-acoes.cel.com-rp { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto auto auto; grid-template-areas: "marca relogio trilho trilho trilho trilho trilho" "play reini vel . story som mapa"; align-items: center; justify-content: stretch; gap: 6px; }
.grupo-acoes.com-rp .rp { display: contents; }
.grupo-acoes.com-rp .rp-ctl { display: contents; }
.grupo-acoes.com-rp .rp-marca { grid-area: marca; padding: 2px 8px; font-size: 12px; }
.grupo-acoes.com-rp .rp-relogio { grid-area: relogio; overflow: visible; line-height: 28px; }
.grupo-acoes.com-rp .rp-relogio b { font-size: 20px; line-height: 28px; }
.grupo-acoes.com-rp .rp-rot, .grupo-acoes.com-rp .rp-dia, .grupo-acoes.com-rp .rp-rapido { display: none; }
.grupo-acoes.com-rp .rp-trilho { grid-area: trilho; min-width: 0; padding-bottom: 14px; }
.grupo-acoes.com-rp .rp-barra { height: 24px; }
.grupo-acoes.com-rp .rp-play { grid-area: play; width: 44px; min-width: 44px; }
.grupo-acoes.com-rp .rp-reini { grid-area: reini; }
.grupo-acoes.com-rp .rp-vel { grid-area: vel; }
.grupo-acoes.com-rp .rp-vel button { min-width: 44px; min-height: 38px; padding: 0 5px; }
.grupo-acoes.com-rp .rp-vel .so-largo { display: none; }
.grupo-acoes.com-rp #criar-story { grid-area: story; }
.grupo-acoes.com-rp .som { grid-area: som; }
.grupo-acoes.com-rp .so-cel { grid-area: mapa; }
.grupo-acoes.com-rp .rp-aviso { position: absolute; inset: auto var(--gutter) calc(100% + 8px); margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--popover); box-shadow: var(--shadow-dialog), inset 0 0 0 1px var(--border-strong); }
@media (max-width: 399px) {
  .grupo-acoes.cel.com-rp { grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; grid-template-areas: "marca relogio vel vel vel vel" "trilho trilho trilho trilho trilho trilho" "play reini . story som mapa"; }
  .grupo-acoes.com-rp .rp-vel { justify-self: end; }
}
/* com os controles embaixo, o placar fixo do Telão não repete o replay */
@media (max-width: 819px) { [data-turno="1"] .cb-fixo .cbf-rp { display: none; } }

/* ---------- espaço reservado na carga (CLS): o cabeçote tem a altura de quando está cheio e a fita ocupa a tela,
   então o que vem abaixo dela já começa fora da tela e não salta quando chegam os registros ---------- */
.cabecote .cb-in { min-height: 90px; }
@media (max-width: 1180px) { .cabecote .cb-in { min-height: 161px; } }
@media (max-width: 1023px) { .cabecote .cb-in { min-height: 146px; } }
@media (max-width: 359px) { .cabecote .cb-in { min-height: 161px; } }
.pb .fita { min-height: calc(100svh - var(--cbh, 160px)); }

/* até o primeiro dado (apuracao.js põe .pronto no body, no máximo 2 s depois da base) o conteúdo ocupa o lugar, invisível */
body.pp:not(.pronto) :is(#vista, .rodape-pp, .ticker) { visibility: hidden; }

/* ---------- 1º turno em texto e tabela (scripts/seo-apuracao.mjs): já vem no HTML, para quem lê sem JS e para robôs ---------- */
.seo { max-width: 1680px; margin: 48px auto 0; padding: 0 var(--gutter); }
.seo-in { display: grid; gap: 12px; max-width: 78ch; font-size: 15px; line-height: 1.6; color: var(--foreground); text-wrap: pretty; }
.seo h2 { margin-top: 4px; color: var(--heading); font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }
.seo h3 { margin-top: 12px; color: var(--heading); font-size: 16px; line-height: 1.3; }
.seo a { color: var(--heading); text-underline-offset: 3px; }
.seo-lista { display: grid; gap: 6px; margin: 0; padding-inline-start: 20px; }
.seo-trilha { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted-foreground); }
.seo-tab { overflow-x: auto; }
.seo-tab table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.seo-tab caption { padding-bottom: 6px; color: var(--muted-foreground); font-size: 13px; text-align: start; }
.seo-tab th, .seo-tab td { padding: 6px 8px; border-bottom: 1px solid var(--border-strong); text-align: start; font-weight: 400; }
.seo-tab thead th { color: var(--muted-foreground); font-size: 12px; white-space: nowrap; }
.seo-tab tbody th { color: var(--heading); }
.seo-tab .n { text-align: end; white-space: nowrap; }
.seo-tab .lid { color: var(--heading); font-weight: 600; }
.seo-perg { display: grid; gap: 4px; margin: 0; }
.seo-perg dt { margin-top: 8px; color: var(--heading); font-weight: 600; }
.seo-perg dd { margin: 0; }
.seo-fonte { margin-top: 8px; font-size: 13px; color: var(--muted-foreground); }
/* antes do JS montar o modo, o lugar dele já ocupa a tela: o texto do 1º turno, que vem no HTML, não pinta no topo para depois descer */
#modo { min-height: 100svh; }
