/* Apuração das Eleições 2026 (/politica/eleicoes/2026/apuracao/) */
.apuracao { padding-top: 24px; padding-bottom: 48px; max-width: 1100px; }
.apu-header { margin-bottom: 18px; }
.apu-kicker { display: inline-block; color: #e00000; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.apu-header h1 { font-size: 38px; line-height: 1.1; margin: 6px 0 8px; color: #111; letter-spacing: -1px; }
.apu-header p { color: #555; font-size: 17px; margin: 0; max-width: 720px; }
.apu-filtro { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.apu-filtro label { font-weight: 700; color: #2e8f3c; }
.apu-filtro select { font: inherit; padding: 8px 12px; border: 1px solid #c9d3e0; border-radius: 8px; background: #fff; min-width: 220px; }
.apu-auto { color: #666; font-size: 13px; margin: 10px 0 16px; }
.apu-auto::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e00000; margin-right: 6px; vertical-align: 1px; animation: apu-pulse 1.6s infinite; }
@keyframes apu-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .apu-auto::before { animation: none; } }

.apu-race { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.apu-destaque { border-top: 4px solid #2e8f3c; }
.apu-estado { border-top: 4px solid #5b7db1; }
.apu-race-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.apu-race-head h2 { margin: 0; font-size: 22px; color: #2e8f3c; }
.apu-destaque .apu-race-head h2 { font-size: 28px; }
.apu-badge { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; background: #eef2f7; color: #4a5a70; }
.apu-apurando .apu-badge { background: #fff1f1; color: #c00000; }
.apu-encerrada .apu-badge { background: #e8f6ee; color: #146c3a; }
.apu-progress { height: 8px; background: #eef2f7; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.apu-progress span { display: block; height: 100%; background: #2e8f3c; transition: width .6s ease; }
.apu-secoes { margin: 0 0 6px; color: #444; font-size: 14px; }

.apu-cands { list-style: none; margin: 10px 0 0; padding: 0; }
.apu-cand { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid #f0f2f5; }
.apu-cand:first-child { border-top: 0; }
/* Foto do candidato como vem do TSE (retrato 161×225), sem recorte. */
.apu-cand img, .apu-foto-vazia { width: 58px; height: auto; display: block; }
.apu-foto-vazia { aspect-ratio: 161 / 225; background: #e3e8ef; }
.apu-cand-info b { display: block; font-size: 18px; color: #111; }
.apu-cand-info small { color: #666; font-size: 13px; }
.apu-bar { height: 10px; background: #eef2f7; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.apu-bar span { display: block; height: 100%; background: #5b7db1; transition: width .6s ease; }
.apu-cand:first-child .apu-bar span { background: #2e8f3c; }
.apu-cand.is-eleito .apu-bar span { background: #146c3a; }
.apu-cand-num { text-align: right; min-width: 110px; }
.apu-cand-num b { display: block; font-size: 26px; color: #111; letter-spacing: -.5px; }
.apu-destaque .apu-cand-num b { font-size: 32px; }
.apu-cand-num small { color: #666; font-size: 13px; }
.apu-eleito { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: #146c3a; color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; vertical-align: 3px; }

.apu-totais { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #f0f2f5; }
.apu-totais div { background: #f7f9fc; border-radius: 8px; padding: 8px 10px; }
.apu-totais dt { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .04em; }
.apu-totais dd { margin: 2px 0 0; font-weight: 700; color: #222; font-size: 15px; }
.apu-totais dd small { font-weight: 400; color: #666; }
.apu-upd { color: #777; font-size: 12px; margin: 10px 0 0; }

.apu-secao { font-size: 24px; color: #111; margin: 30px 0 12px; }
.apu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.apu-grid .apu-cand-num b { font-size: 22px; }
.apu-grid .apu-cand { grid-template-columns: 50px 1fr auto; }
.apu-grid .apu-cand img, .apu-grid .apu-foto-vazia { width: 50px; height: auto; }
.apu-grid .apu-totais { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 760px) {
    .apu-header h1 { font-size: 30px; }
    .apu-grid { grid-template-columns: 1fr; }
    .apu-race { padding: 14px; }
    .apu-cand { grid-template-columns: 46px 1fr auto; gap: 10px; }
    .apu-cand img, .apu-foto-vazia { width: 46px; height: auto; }
    .apu-cand-info b { font-size: 16px; }
    .apu-cand-num { min-width: 80px; }
    .apu-cand-num b, .apu-destaque .apu-cand-num b { font-size: 22px; }
    .apu-totais { grid-template-columns: repeat(2, 1fr); }
    .apu-filtro select { width: 100%; }
}

/* Mapa da apuração por município (/politica/eleicoes/2026/apuracao/mapa-da-apuracao/) */
.apu-voltar { margin-top: 10px; font-size: 14px; }
.apu-voltar a, .apu-link-mapa a { color: #2e8f3c; font-weight: 700; }
.apu-link-mapa { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #2e8f3c; color: #fff; border-radius: 12px; padding: 14px 18px; margin: 0 0 18px; text-decoration: none; }
.apu-link-mapa b { font-size: 18px; display: block; }
.apu-link-mapa span { color: #c9d6ea; font-size: 14px; }
.apu-link-mapa em { font-style: normal; background: #fff; color: #2e8f3c; font-weight: 700; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.apu-link-mapa:hover em { background: #eef2f7; }
.apu-mapa { position: relative; }
.apu-mapa-cargos, .apu-mapa-ufs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.apu-mapa-ufs[hidden] { display: none; }
.apu-mapa-cargos button, .apu-mapa-ufs button, .apu-mapa-cargos a, .apu-mapa-ufs a { font: inherit; text-decoration: none; display: inline-block; font-weight: 700; border: 1px solid #c9d3e0; background: #fff; color: #2e8f3c; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.apu-mapa-ufs button, .apu-mapa-ufs a { padding: 6px 12px; font-size: 14px; }
.apu-mapa-cargos button.on, .apu-mapa-ufs button.on, .apu-mapa-cargos a.on, .apu-mapa-ufs a.on { background: #2e8f3c; color: #fff; border-color: #2e8f3c; }
.apu-mapa-corpo { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.apu-mapa-svg { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 10px; min-height: 300px; }
.apu-mapa-svg svg { display: block; width: 100%; height: auto; max-height: 78vh; }
.apu-mapa-svg path { fill-rule: evenodd; }
.apu-mapa-svg path[data-c] { fill: #d3d8df; stroke: #fff; stroke-width: .15; cursor: pointer; }
.apu-mapa-svg svg.is-estado path[data-c] { stroke-width: .05; }
.apu-mapa-svg path[data-c]:hover { stroke: #111; stroke-width: .6; }
.apu-mapa-svg svg.is-estado path[data-c]:hover { stroke-width: .15; }
.apu-mapa-ufs-borda path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; pointer-events: none; }
.apu-mapa-svg svg.is-estado .apu-mapa-ufs-borda path { stroke-width: .6; }
.apu-mapa-legenda { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 14px 16px; }
.apu-mapa-legenda h2 { font-size: 18px; color: #2e8f3c; margin: 0 0 10px; }
.apu-mapa-legenda p { margin: 0 0 10px; line-height: 1.3; }
.apu-mapa-legenda i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 8px; vertical-align: -2px; }
.apu-mapa-legenda small { color: #666; }
.apu-mapa-legenda span { display: block; color: #555; font-size: 13px; margin-left: 22px; }
.apu-mapa-sem i { background: #d3d8df; }
.apu-mapa-sem { color: #666; font-size: 13px; }
.apu-mapa-tip { position: absolute; z-index: 5; background: #111; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4; pointer-events: none; max-width: 260px; }
.apu-mapa-tip small { color: #cbd5e1; }
@media (max-width: 860px) {
    .apu-mapa-corpo { grid-template-columns: 1fr; }
    .apu-mapa-svg { padding: 4px; }
}

/* Mapa: Brasil (só cores) → clique no estado → zoom com a porcentagem por cidade */
.apu-mapa-dica { color: #555; font-size: 14px; margin: 0 0 8px; }
.apu-mapa-zoom { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.apu-mapa-zoom[hidden], .apu-mapa-dica[hidden] { display: none; }
.apu-mapa-voltar { font: inherit; font-weight: 700; border: 1px solid #2e8f3c; background: #fff; color: #2e8f3c; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.apu-mapa-voltar:hover { background: #2e8f3c; color: #fff; }
.apu-mapa-estado { font-size: 18px; color: #111; }
.apu-mapa-svg svg.is-brasil path[data-c] { cursor: pointer; }
.apu-mapa-svg svg.is-brasil path[data-c]:hover { stroke: #fff; stroke-width: .15; }
.apu-mapa-svg svg.is-brasil .apu-mapa-ufs-borda path.is-hover { stroke: #111; stroke-width: 3.2; }
.apu-mapa-svg path.is-fora { opacity: .12; pointer-events: none; }
.apu-mapa-svg .apu-mapa-ufs-borda path.is-fora { opacity: 0; }

/* Compartilhar (mesmos botões das matérias) */
.apu-share { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.apu-share > span { font-size: 13px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .04em; }
.apu-share .artigo-share { margin: 0; }

/* Apuração: uma disputa por vez (Presidente por padrão; Governador por estado) */
.apu-escolha { margin: 4px 0 6px; }
#apuracao-resultados { display: flex; flex-direction: column; }
#apuracao-resultados .apu-auto { order: 0; }
#apuracao-resultados .apu-bloco-presidente { order: 1; }
#apuracao-resultados .apu-bloco-governador { order: 2; }
#apuracao-resultados[data-ver="governador"] .apu-bloco-governador { order: 1; }   /* Governador escolhido: vem primeiro */
#apuracao-resultados[data-ver="governador"] .apu-bloco-presidente { order: 2; }
.apu-bloco-governador .apu-race:not(.is-ver) { display: none; }                   /* um estado por vez */
.apu-bloco-governador .apu-secao { margin: 8px 0 8px; }
.apu-gov-ufs { margin: 0 0 12px; }
#apuracao-resultados[data-ver="governador"] .apu-bloco-presidente { margin-top: 14px; }
.apu-race .apu-link-mapa { margin: 14px 0 4px; padding: 12px 16px; }
.apu-race .apu-link-mapa b { font-size: 16px; }

/* Evolução da apuração (gráfico como o do G1) */
.apu-evolucao { margin: 16px 0 4px; padding: 12px 12px 6px; border: 1px solid #eef0f3; border-radius: 10px; }
.apu-evolucao figcaption { font-weight: 700; font-size: 17px; color: #222; margin: 0 0 6px; }
.apu-evolucao svg { display: block; width: 100%; height: auto; overflow: visible; }
.apu-evolucao line.g { stroke: #eef0f3; stroke-width: 1; }
.apu-evolucao line.agora { stroke: #111; stroke-width: 1.2; }
.apu-evolucao text { font: 12px system-ui, -apple-system, sans-serif; fill: #888; }
.apu-evolucao text.ya { text-anchor: end; }
.apu-evolucao text.xa { text-anchor: middle; }
.apu-evolucao text.xa-fim { fill: #555; }
.apu-evolucao polyline { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.apu-evolucao circle { stroke: #fff; stroke-width: 2; }
.apu-evolucao .selo rect { fill: #0b6b3a; }
.apu-evolucao .selo text { fill: #fff; font-weight: 700; text-anchor: middle; font-size: 12px; }
.apu-evolucao-legenda { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.apu-evolucao-legenda li { font-size: 14px; color: #333; }
.apu-evolucao-legenda i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.apu-evolucao-legenda small { color: #999; font-weight: 700; margin-right: 4px; }
@media (max-width: 600px) {
    .apu-evolucao { padding: 10px 6px 6px; }
    .apu-evolucao text { font-size: 30px; }
    .apu-evolucao text.ya-5, .apu-evolucao text.xa-meio { display: none; }   /* no celular: eixos de 10 em 10% e menos horários */
    .apu-evolucao polyline { stroke-width: 6; }
    .apu-evolucao circle { r: 10; stroke-width: 3; }
    .apu-evolucao line.agora { stroke-width: 2.5; }
    .apu-evolucao .selo rect { width: 96px; height: 36px; }
    .apu-evolucao-legenda { grid-template-columns: 1fr; }
}

/* Linha e caixinha que seguem o mouse no gráfico de evolução */
.apu-evo-area { position: relative; touch-action: pan-y; }
.apu-evolucao .cursor line { stroke: #555; stroke-width: 1.2; stroke-dasharray: 4 3; }
.apu-evolucao .cursor circle { stroke: #fff; stroke-width: 2; }
.apu-evo-tip { position: absolute; z-index: 3; min-width: 200px; background: #fff; border: 1px solid #dde3ea; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); padding: 8px 10px; pointer-events: none; font-size: 13px; }
.apu-evo-tip span { display: block; color: #666; font-size: 12px; margin-bottom: 4px; }
.apu-evo-tip p { margin: 2px 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.apu-evo-tip p i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.apu-evo-tip p small { color: #999; font-weight: 700; }
.apu-evo-tip p b { margin-left: auto; padding-left: 10px; }
@media (max-width: 600px) {
    .apu-evolucao .cursor line { stroke-width: 2.5; }
    .apu-evolucao .cursor circle { r: 10; }
    .apu-evo-tip { position: static; margin-top: 6px; min-width: 0; box-shadow: none; }   /* no celular: embaixo do gráfico, sem tapar as linhas */
}

/* 1º/2º turno e a tela do 1º turno (todos os cargos) */
.apu-turnos { margin: 6px 0 10px; }
.apu-uf-form { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.apu-uf-form label { font-weight: 700; color: #2e8f3c; }
.apu-uf-form select { font: inherit; padding: 8px 12px; border: 1px solid #c9d3e0; border-radius: 8px; background: #fff; min-width: 220px; }
.apu-2turno { background: #5b7db1; }
.apu-sub { font-size: 17px; color: #222; margin: 18px 0 8px; }
.apu-bancada { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.apu-bancada li { background: #f7f9fc; border: 1px solid #e3e8ef; border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.apu-bancada i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.apu-bancada span { color: #555; }
.apu-eleitos-wrap { overflow-x: auto; }
.apu-eleitos { width: 100%; border-collapse: collapse; font-size: 14px; }
.apu-eleitos th { text-align: left; color: #666; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid #e3e8ef; padding: 6px 8px; }
.apu-eleitos td { border-bottom: 1px solid #f0f2f5; padding: 7px 8px; white-space: nowrap; }
.apu-eleitos td small { color: #777; }
@media (max-width: 600px) { .apu-uf-form select { width: 100%; min-width: 0; } .apu-eleitos th:nth-child(5), .apu-eleitos td:nth-child(5) { display: none; } }

.apu-evo-nota { color: #777; font-size: 12px; margin: 6px 0 0; }
/* Mapa: balão com os votos de todos os candidatos do município (do mais votado para o menos votado, com foto) */
.apu-mapa-tip { max-width:320px; width:max-content; min-width:220px; }
.apu-tip-mun { display:block; font-size:14px; margin-bottom:6px; }
.apu-tip-lista { list-style:none; margin:0 0 6px; padding:0; display:grid; gap:7px; max-height:360px; overflow:hidden; }
.apu-tip-lista li { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:8px; align-items:center; }
.apu-tip-lista img, .apu-tip-sem { width:34px; height:34px; border-radius:50%; object-fit:cover; object-position:top; border:2px solid var(--cor, #888); background:#333; display:flex; align-items:center; justify-content:center; font-weight:800; }
.apu-tip-nome { min-width:0; line-height:1.2; }
.apu-tip-nome b { font-size:13px; }
.apu-tip-nome small { color:#cbd5e1; font-size:11px; }
.apu-tip-barra { display:block; height:4px; margin-top:4px; border-radius:3px; background:rgba(255,255,255,.15); overflow:hidden; }
.apu-tip-barra > i { display:block; height:100%; background:var(--cor, #888); }
.apu-tip-num { text-align:right; line-height:1.15; }
.apu-tip-num b { display:block; font-size:13px; }
.apu-tip-num small { font-size:10px; }
