/* Apuração 2026 — escuro quente por padrão; claro e alto contraste por data-tema. */
:root {
  color-scheme: dark;
  --fundo: #0f0e0d;
  --painel: #161513;
  --painel-2: #1c1b18;
  --painel-3: #262420;
  --linha: rgba(255, 255, 255, 0.07);
  --linha-forte: rgba(255, 255, 255, 0.14);
  --tx: #fafaf9;
  --tx-2: #d6d4cf;
  --tx-3: #a6a39c;
  --tx-4: #85827c;
  --foco: #90c2ff;
  --link: #90c2ff;
  --vivo: #3ecf8e;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.45);
  --mapa-vazio: #22201d;
  --mapa-borda-mun: rgba(15, 14, 13, 0.55);
  --mapa-borda-uf: rgba(250, 250, 249, 0.5);
  --rotulo-fundo: rgba(15, 14, 13, 0.72);

  /* famílias de cor por partido: 1 = vantagem pequena … 4 = grande (escuro: mais vivo) */
  --azul-1: #233a63; --azul-2: #2a4f93; --azul-3: #3266c4; --azul-4: #4a82ec;
  --verm-1: #5e2724; --verm-2: #8d2e2b; --verm-3: #bf3432; --verm-4: #ec4744;
  --verde-1: #15463a; --verde-2: #17654f; --verde-3: #178a63; --verde-4: #22b47f;
  --ambar-1: #4f3c12; --ambar-2: #7b5b0f; --ambar-3: #a97b07; --ambar-4: #eaa21a;
  --viol-1: #302b5e; --viol-2: #443b8c; --viol-3: #5a4abb; --viol-4: #8676ea;
  --cinza-1: #34322e; --cinza-2: #4a4843; --cinza-3: #625f59; --cinza-4: #7d7a73;

  /* cor "cheia" de cada família (textos, barras, linhas) */
  --azul: var(--azul-4); --verm: var(--verm-4); --verde: var(--verde-4); --ambar: var(--ambar-4); --viol: var(--viol-4); --cinza: var(--cinza-4);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--sans);
}
:root[data-tema="claro"] {
  color-scheme: light;
  --fundo: #f3f2ee; --painel: #ffffff; --painel-2: #f7f6f3; --painel-3: #ecebe6;
  --linha: rgba(15, 14, 13, 0.08); --linha-forte: rgba(15, 14, 13, 0.16);
  --tx: #141311; --tx-2: #3d3b37; --tx-3: #5f5c56; --tx-4: #7a776f;
  --foco: #1c5cab; --link: #1c5cab; --vivo: #0b8a55;
  --sombra: 0 10px 30px rgba(15, 14, 13, 0.12);
  --mapa-vazio: #e4e2dc; --mapa-borda-mun: rgba(255, 255, 255, 0.6);
  --mapa-borda-uf: rgba(20, 19, 17, 0.55); --rotulo-fundo: rgba(255, 255, 255, 0.85);
  --azul-1: #c9dcf6; --azul-2: #86b2ec; --azul-3: #3e82dc; --azul-4: #1c55a6;
  --verm-1: #f6cfcd; --verm-2: #ee9592; --verm-3: #df4744; --verm-4: #ad2a28;
  --verde-1: #cdeedf; --verde-2: #81d2b0; --verde-3: #1fa874; --verde-4: #0e7550;
  --ambar-1: #fae6b6; --ambar-2: #f3c75c; --ambar-3: #e09a06; --ambar-4: #a26b00;
  --viol-1: #dcd8f6; --viol-2: #aaa0ef; --viol-3: #6a58d8; --viol-4: #45389e;
  --cinza-1: #e1dfd9; --cinza-2: #c3c0b8; --cinza-3: #9a978f; --cinza-4: #6f6c66;
  --azul: var(--azul-3); --verm: var(--verm-3); --verde: var(--verde-3); --ambar: var(--ambar-4); --viol: var(--viol-3); --cinza: var(--cinza-4);
}
:root[data-tema="contraste"] {
  --fundo: #000; --painel: #000; --painel-2: #000; --painel-3: #111;
  --linha: #fff; --linha-forte: #fff; --tx: #fff; --tx-2: #fff; --tx-3: #fff; --tx-4: #fff;
  --foco: #ffd400; --link: #ffd400; --vivo: #5dff9c; --sombra: none;
  --mapa-vazio: #000; --mapa-borda-mun: #000; --mapa-borda-uf: #fff; --rotulo-fundo: #000;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* vale mesmo onde o CSS define display */
html, body { margin: 0; background: var(--fundo); color: var(--tx); }
body { font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
[data-tema="contraste"] :focus-visible { outline-width: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--painel); padding: 8px 12px; border-radius: 8px; }
.pular:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }
.mudo { color: var(--tx-3); }

/* ------------------------------------------------------------ barra superior */
.topo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 14px 18px; padding-top: max(14px, env(safe-area-inset-top, 0px));
}
.marca { display: flex; align-items: baseline; gap: 10px; margin-right: 8px; }
.marca h1 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0; letter-spacing: -0.02em; white-space: nowrap; }
.marca span { font-size: 12px; color: var(--tx-3); white-space: nowrap; }
@media (max-width: 1500px) { .marca span { display: none; } }
.pilulas { display: inline-flex; gap: 2px; padding: 3px; background: var(--painel); border: 1px solid var(--linha); border-radius: 999px; }
.pilulas button {
  border: 0; background: transparent; color: var(--tx-3); padding: 6px 14px; border-radius: 999px;
  cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap;
}
.pilulas button:hover { color: var(--tx); }
.pilulas button[aria-pressed="true"] { background: var(--painel-3); color: var(--tx); box-shadow: inset 0 0 0 1px var(--linha-forte); }
.pilulas button:disabled { opacity: 0.4; cursor: not-allowed; }
.busca { position: relative; }
.busca input {
  font: inherit; font-size: 13px; color: var(--tx); width: 190px; max-width: 100%;
  background: var(--painel); border: 1px solid var(--linha); border-radius: 999px; padding: 8px 14px 8px 34px;
}
.busca input::placeholder { color: var(--tx-3); }
.busca svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--tx-3); }
.busca ul {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 320px; max-width: 90vw; max-height: 340px; overflow: auto;
  list-style: none; margin: 0; padding: 6px; background: var(--painel-2); border: 1px solid var(--linha-forte); border-radius: 12px; box-shadow: var(--sombra);
}
.busca li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.busca li[aria-selected="true"], .busca li:hover { background: var(--painel-3); }
.busca li small { color: var(--tx-3); }
.topo-dir { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status-vivo { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tx-2); }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--tx-4); flex: none; }
.ponto.vivo { background: var(--vivo); animation: pulso 2s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--vivo) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .ponto.vivo { animation: none; } }
.botao {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linha-forte); background: var(--painel);
  color: var(--tx); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.botao:hover { background: var(--painel-3); }
.ajustes { position: relative; }
.ajustes summary { list-style: none; }
.ajustes summary::-webkit-details-marker { display: none; }
.ajustes summary::after { content: "▾"; font-size: 10px; color: var(--tx-3); }
.ajustes .menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 240px; display: grid; gap: 12px;
  padding: 14px; background: var(--painel-2); border: 1px solid var(--linha-forte); border-radius: 12px; box-shadow: var(--sombra); font-size: 13px;
}
.ajustes .menu label { display: grid; gap: 6px; }
.ajustes .menu select { font: inherit; color: var(--tx); background: var(--painel); border: 1px solid var(--linha-forte); border-radius: 8px; padding: 6px 8px; }
.ajustes .linha-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 8px; }
.ajustes .linha-check small { grid-column: 2; color: var(--tx-3); font-size: 11px; }
select.botao { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--tx-3) 50%), linear-gradient(135deg, var(--tx-3) 50%, transparent 50%); background-position: right 13px center, right 9px center; background-size: 4px 4px; background-repeat: no-repeat; }

/* ------------------------------------------------------------ grade principal */
/* a primeira tela (barra + grade) ocupa exatamente a janela; o resto rola abaixo */
.tela { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 640px; }
.grade {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 340px minmax(0, 1fr) 340px; gap: 14px;
  padding: 0 18px 18px;
}
.coluna { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.cartao { background: var(--painel); border: 1px solid var(--linha); border-radius: 16px; padding: 16px; }
.cartao h2 { font-size: 14px; font-weight: 600; margin: 0; }
.cabeca { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.cabeca small { color: var(--tx-3); font-size: 12px; }
.sobrancelha { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--tx-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--painel-3); color: var(--tx-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
[data-tema="contraste"] .chip { border: 1px solid #fff; }

@media (max-width: 1180px) {
  .tela { height: auto; }
  .grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grade .centro { grid-column: 1 / -1; order: -1; height: 72vh; min-height: 460px; }
  .coluna { overflow: visible; }
}
@media (max-width: 720px) {
  .topo { padding: 12px; }
  .grade { grid-template-columns: minmax(0, 1fr); padding: 0 12px 12px; }
  .topo-dir { margin-left: 0; }
  .busca { flex: 1 1 200px; }
  .busca input { width: 100%; }
}

/* ------------------------------------------------------------ resultado (esquerda) */
.cartao .manchete { font-family: var(--serif); font-size: 28px; line-height: 1.12; letter-spacing: -0.02em; margin: 14px 0 16px; font-weight: 400; }
.duelo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lado { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lado.dir { align-items: flex-end; text-align: right; }
.pessoa { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-width: 0; }
.lado.dir .pessoa { flex-direction: row-reverse; }
.pessoa b { display: block; font-size: 14px; line-height: 1.15; font-weight: 600; }
.pessoa small { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.foto { width: 44px; height: 52px; border-radius: 8px; object-fit: cover; object-position: top; flex: none; background: var(--painel-3); }
.foto.ini { display: grid; place-items: center; font-weight: 600; color: var(--tx-2); }
.grande { font-family: var(--serif); font-size: 46px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.grande sup { font-family: var(--sans); font-size: 13px; vertical-align: top; margin-left: 2px; color: var(--tx-3); letter-spacing: 0; }
.lado .votos { font-size: 12px; color: var(--tx-3); }
.cabo { position: relative; display: flex; gap: 3px; height: 8px; margin: 14px 0 12px; }
.cabo span { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.cabo .meio { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--tx); border-radius: 1px; transform: translateX(-1px); }
.linhas-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; color: var(--tx-3); margin: 0; }
.linhas-info dd { margin: 0; text-align: right; color: var(--tx-2); }
.linhas-info dd b { color: var(--tx); }
.todos { margin-top: 12px; border-top: 1px solid var(--linha); padding-top: 10px; }
.todos summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--tx-2); list-style: none; display: flex; justify-content: space-between; }
.todos summary::-webkit-details-marker { display: none; }
.todos summary::after { content: "+"; color: var(--tx-3); }
.todos[open] summary::after { content: "–"; }
.todos ol { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.todos li { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; font-size: 13px; }
.todos li .b { grid-column: 1 / -1; height: 4px; background: var(--painel-3); border-radius: 2px; overflow: hidden; }
.todos li .b span { display: block; height: 100%; border-radius: 2px; }
.todos li small { color: var(--tx-3); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--linha); }
.trio dt { font-size: 11px; color: var(--tx-3); }
.trio dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rodape-cartao { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; }
.trilha { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--tx-3); }
.trilha button { border: 0; background: none; padding: 0; color: var(--tx-3); cursor: pointer; }
.trilha button:hover { color: var(--tx); text-decoration: underline; }
.trilha > * + *::before { content: "·"; margin-right: 4px; color: var(--tx-4); }

/* gráfico */
.grafico svg { width: 100%; height: auto; display: block; overflow: visible; }
.grafico .eixo text { fill: var(--tx-4); font-size: 10px; font-family: var(--sans); }
.grafico .eixo line { stroke: var(--linha); }
.grafico .serie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.grafico .mira { stroke: var(--tx-3); stroke-dasharray: 2 3; }
.legenda-linhas { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--tx-2); margin: 6px 0 10px; }
.legenda-linhas i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 6px; }
.vazio { color: var(--tx-3); font-size: 13px; padding: 4px 0; margin: 0; }

/* ------------------------------------------------------------ mapa (centro) */
.centro { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.mapa-topo { position: absolute; z-index: 3; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.mapa-topo > * { pointer-events: auto; }
.mapa-topo .pilulas button { padding: 5px 12px; font-size: 12px; }
.legenda { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 11px; color: var(--tx-3); background: var(--rotulo-fundo); padding: 8px 10px; border-radius: 10px; backdrop-filter: blur(6px); max-width: 100%; }
.legenda .partidos { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
.legenda .partidos b { color: var(--tx); font-weight: 600; margin-left: 4px; }
.legenda .escala { display: flex; align-items: center; gap: 6px; }
.escala .degraus { display: inline-flex; gap: 2px; }
.escala .degraus i { width: 12px; height: 8px; border-radius: 2px; display: block; }
.quad { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.mapa-area { position: relative; flex: 1; min-height: 0; cursor: grab; touch-action: none; overflow: hidden; }
.mapa-area.arrastando { cursor: grabbing; }
.mapa-area > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mapa-area .mun path { stroke: var(--mapa-borda-mun); stroke-width: 0.35; vector-effect: non-scaling-stroke; transition: fill 0.6s ease, opacity 0.5s ease; }
.mapa-area .mun path:hover { stroke: var(--tx); stroke-width: 1.4; }
.mapa-area .ufs-cor path { transition: fill 0.6s ease; }
.mapa-area.modo-regiao .mun path.fora { opacity: 0.16; }
.mapa-area.modo-regiao .ufs path { stroke-opacity: 0.35; }
.mapa-area.modo-regiao .mun path:not(.fora) { stroke: var(--tx); stroke-width: 1.1; }
.mapa-area.estados .mun { display: none; }
.mapa-area .ufs-cor path { stroke: none; }
.mapa-area:not(.estados) .ufs-cor { display: none; }
.mapa-area .ufs path { fill: none; stroke: var(--mapa-borda-uf); stroke-width: 0.9; vector-effect: non-scaling-stroke; pointer-events: none; }
.mapa-area .realce path { fill: none; stroke: var(--tx); stroke-width: 2.4; vector-effect: non-scaling-stroke; pointer-events: none; }
.mapa-area .ufs-alvo path { fill: transparent; stroke: none; pointer-events: none; }
.mapa-area .ufs-alvo path:focus-visible { outline: none; fill: rgba(255, 255, 255, 0.08); stroke: var(--foco); stroke-width: 3; vector-effect: non-scaling-stroke; }
[data-tema="contraste"] .mapa-area .mun path { stroke-width: 0.6; }
.rotulos { pointer-events: none; }
.rotulos text { font-family: var(--sans); paint-order: stroke; stroke: var(--rotulo-fundo); stroke-linejoin: round; }
.rotulos .sg { fill: var(--tx); font-weight: 700; }
.rotulos .pc { fill: var(--tx-2); font-weight: 600; }
.chamadas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.chamadas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chamadas line { stroke: var(--tx-4); stroke-width: 1; }
.chamada { position: absolute; display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 70px; padding: 3px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; color: #fff; pointer-events: auto; cursor: pointer; border: 0; transform: translateY(-50%); }
.chamada span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
[data-tema="contraste"] .chamada { outline: 1px solid #fff; }
.zoom { position: absolute; z-index: 3; left: 12px; bottom: 60px; display: flex; flex-direction: column; gap: 4px; }
.zoom button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--linha-forte); background: var(--painel-2); cursor: pointer; font-size: 15px; line-height: 1; display: grid; place-items: center; }
.zoom button:hover { background: var(--painel-3); }
.mapa-base { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--linha); font-size: 12px; color: var(--tx-3); background: var(--painel); }
.mapa-base .progresso { flex: 1; min-width: 120px; height: 4px; border-radius: 2px; background: var(--painel-3); overflow: hidden; }
.mapa-base .progresso span { display: block; height: 100%; background: var(--tx-2); border-radius: 2px; transition: width 0.6s; }
.mapa-base .vivo { display: inline-flex; align-items: center; gap: 6px; color: var(--tx-2); }
.mapa-carregando { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tx-3); }
[data-leve="1"] .centro, [data-leve="1"] .so-mapa { display: none !important; }
[data-leve="1"] .tela { height: auto; }
[data-leve="1"] .grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 720px) { [data-leve="1"] .grade { grid-template-columns: minmax(0, 1fr); } }

/* dica flutuante */
.dica { position: fixed; z-index: 40; pointer-events: none; min-width: 190px; max-width: 280px; background: var(--painel-2); border: 1px solid var(--linha-forte); border-radius: 12px; padding: 10px 12px; box-shadow: var(--sombra); font-size: 12px; color: var(--tx-2); }
.dica > b { display: block; color: var(--tx); font-size: 13px; margin-bottom: 6px; }
.dica .l { display: flex; justify-content: space-between; gap: 10px; }
.dica .l + .l { margin-top: 2px; }
.dica .m { color: var(--tx-3); margin-top: 6px; }

/* ------------------------------------------------------------ direita */
.regiao { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 7px 0; border-top: 1px solid var(--linha); align-items: center; }
.regiao:first-of-type { border-top: 0; }
.regiao .nome { font-weight: 600; font-size: 13px; }
.regiao .nome small { display: block; font-weight: 400; color: var(--tx-4); font-size: 11px; }
.regiao .lider { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mini-foto { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--painel-3); flex: none; }
.regiao .lider .pt { font-size: 11px; font-weight: 600; }
.regiao .lider b { font-variant-numeric: tabular-nums; }
.regiao .lider .mg { color: var(--tx-3); font-size: 11px; width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.regiao .mini { grid-column: 2; height: 3px; border-radius: 2px; background: var(--painel-3); position: relative; margin-top: 3px; }
.regiao .mini span { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.regiao .mini::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--tx-3); }
.regiao button.nome { all: unset; font-weight: 600; font-size: 13px; cursor: pointer; }
.regiao button.nome:hover, .regiao button.nome:focus-visible { text-decoration: underline; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 40px 26px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linha); font-size: 13px; color: var(--tx-2); }
.feed li:first-child { border-top: 0; }
.feed time { font-size: 11px; color: var(--tx-4); padding-top: 3px; font-variant-numeric: tabular-nums; }
.feed .ic { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--painel-3); }
.feed .ic.anel { background: none; border: 2px solid var(--tx-2); width: 16px; height: 16px; margin: 5px; }
.feed .ic.ok { display: grid; place-items: center; font-size: 13px; color: var(--vivo); background: none; border: 1.5px solid var(--vivo); width: 20px; height: 20px; margin: 3px; }
.feed b { color: var(--tx); font-weight: 600; }
.feed .pcs { display: block; }
.as-linha { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--linha); font-size: 13px; }
.as-linha:first-of-type { border-top: 0; }
.as-linha button { all: unset; cursor: pointer; font-weight: 500; }
.as-linha button:hover, .as-linha button:focus-visible { text-decoration: underline; }
.as-linha .ap { color: var(--tx-4); font-size: 11px; font-variant-numeric: tabular-nums; }
.as-linha .ld { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 92px; justify-content: flex-end; }
.as-linha .ld small { font-weight: 600; font-size: 10px; }
.mais { display: inline-block; margin-top: 10px; font-size: 12px; }

/* ------------------------------------------------------------ seções abaixo da dobra */
.secoes { padding: 0 18px 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (max-width: 720px) { .secoes { padding: 0 12px 24px; } }
.secoes .cartao { padding: 18px; }
.secoes h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }
.cabeca-secao { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acoes input { font: inherit; font-size: 13px; color: var(--tx); background: var(--painel-2); border: 1px solid var(--linha-forte); border-radius: 999px; padding: 6px 12px; }
.nota { font-size: 12px; color: var(--tx-3); margin: 0 0 10px; }
.rolagem { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
caption { text-align: left; font-size: 12px; color: var(--tx-3); padding-bottom: 8px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--linha); text-align: left; vertical-align: middle; }
thead th { font-size: 11px; font-weight: 600; color: var(--tx-3); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
thead th button { all: unset; cursor: pointer; }
thead th button:focus-visible { outline: 2px solid var(--foco); }
th[aria-sort="ascending"] button::after { content: " ↑"; }
th[aria-sort="descending"] button::after { content: " ↓"; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody th { font-weight: 500; }
tbody th button { all: unset; cursor: pointer; color: var(--tx); border-bottom: 1px dotted var(--tx-4); }
tbody th button:hover, tbody th button:focus-visible { border-bottom-color: var(--tx); }
tbody tr:hover { background: var(--painel-2); }
tbody tr.atual { background: var(--painel-3); }
tfoot th, tfoot td { font-weight: 700; border-top: 1px solid var(--linha-forte); }
.selo { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tx-3); margin-left: 6px; }
.empilhada { display: flex; gap: 2px; height: 10px; min-width: 120px; }
.empilhada span { display: block; height: 100%; }
.empilhada span:first-child { border-radius: 3px 0 0 3px; }
.empilhada span:last-child { border-radius: 0 3px 3px 0; }
.th-cand { display: inline-flex; align-items: center; gap: 5px; }
.regional-grade { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .regional-grade { grid-template-columns: minmax(0, 1fr); } }
.mapa-am svg { width: 100%; height: auto; display: block; }
.mapa-am path { stroke: var(--mapa-borda-mun); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.mapa-am path.as { stroke: var(--tx); stroke-width: 1.6; }
.mapa-am figcaption { font-size: 12px; color: var(--tx-3); margin-top: 6px; }
figure { margin: 0; }
.rodape { padding: 8px 18px 28px; font-size: 12px; color: var(--tx-4); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

@media (forced-colors: active) {
  .cabo span, .quad, .empilhada span, .escala i, .chamada { forced-color-adjust: none; }
}

/* celular: vem por último para vencer as regras gerais do mapa */
@media (max-width: 720px) {
  .grade .centro { order: 0; height: auto; min-height: 0; }
  .mapa-topo { position: static; padding: 12px 12px 0; }
  .legenda { align-items: flex-start; background: none; padding: 0; }
  .legenda .partidos { justify-content: flex-start; }
  .mapa-area { flex: none; aspect-ratio: 1 / 1.02; max-height: 70vh; }
  .zoom { bottom: 64px; }
}


/* ------------------------------------------------------------ v3: novos recursos */
.compartilhar { position: relative; }
.compartilhar .menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 180px; display: grid; padding: 6px;
  background: var(--painel-2); border: 1px solid var(--linha-forte); border-radius: 12px; box-shadow: var(--sombra);
}
.compartilhar .menu a, .compartilhar .menu button {
  all: unset; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--tx);
}
.compartilhar .menu a:hover, .compartilhar .menu button:hover,
.compartilhar .menu a:focus-visible, .compartilhar .menu button:focus-visible { background: var(--painel-3); }
#tela-cheia[aria-pressed="true"] { background: var(--painel-3); }
.botao.icone { padding: 7px 9px; }
.botao.icone svg { display: block; }
.link { all: unset; color: var(--link); cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.link:focus-visible { outline: 2px solid var(--foco); }

/* tabela recolhível */
.barra-tabela { margin-bottom: 10px; }
#detalhamento .cabeca-secao { margin-bottom: 0; }
#detalhamento #corpo-tabela { margin-top: 14px; }
#abrir-tabela[aria-expanded="true"] { background: var(--painel-3); }

/* exterior: ranking por país no lugar do mapa */
.painel-exterior { position: absolute; inset: 56px 12px 52px; z-index: 2; overflow: auto; padding: 4px 6px; }
.painel-exterior h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0 0 4px; }
.pais { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--linha); font-size: 13px; }
.pais small { display: block; color: var(--tx-4); font-size: 11px; }
.pais .barra2 { display: flex; gap: 2px; height: 10px; }
.pais .barra2 span { display: block; height: 100%; border-radius: 2px; transition: flex-grow 0.8s ease; }
.pais .v { font-variant-numeric: tabular-nums; color: var(--tx-3); font-size: 12px; text-align: right; }

/* proporcional: cadeiras e bancadas */
.cadeiras { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 14px; }
.cadeiras i { width: 16px; height: 16px; border-radius: 50%; display: block; animation: surgir 0.4s ease both; }
.bancadas { display: grid; gap: 6px; }
.bancada { display: grid; grid-template-columns: 92px 1fr 34px; gap: 8px; align-items: center; font-size: 12px; }
.bancada b { font-weight: 600; }
.bancada .trilho { height: 8px; border-radius: 4px; background: var(--painel-3); overflow: hidden; }
.bancada .trilho span { display: block; height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.bancada .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.eleitos { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.eleitos li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--linha); font-size: 13px; }
.eleitos li:first-child { border-top: 0; }
.eleitos li small { color: var(--tx-3); }
.eleitos .q { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.eleitos .v { font-variant-numeric: tabular-nums; color: var(--tx-2); }
.nota-curva { font-size: 11px; color: var(--tx-4); margin: 6px 0 0; }

/* animações (desligadas com prefers-reduced-motion) */
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes surgir { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes desenhar { from { stroke-dashoffset: var(--comp, 1000); } to { stroke-dashoffset: 0; } }
.cartao { animation: entrar 0.5s ease both; }
.coluna .cartao:nth-child(2) { animation-delay: 0.06s; }
.coluna .cartao:nth-child(3) { animation-delay: 0.12s; }
.cabo span { transition: flex-grow 0.9s cubic-bezier(.2,.8,.2,1); }
.regiao .mini span, .todos li .b span { transition: width 0.9s cubic-bezier(.2,.8,.2,1); }
.grafico .serie.anim { stroke-dasharray: var(--comp, 1000); animation: desenhar 1.4s ease-out both; }
.manchete.nova { animation: entrar 0.45s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 720px) {
  .topo > .pilulas { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .topo > .pilulas button { padding: 6px 10px; }
}

/* dica do mapa: 3 primeiros com foto */
.dica { min-width: 230px; }
.dica .l { align-items: center; }
.dica .lf { display: flex; align-items: center; gap: 8px; min-width: 0; }
.foto-dica { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--painel-3); flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 600; color: var(--tx-2); }
.dica .l + .l { margin-top: 5px; }
.dica .sub { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tx-4); margin: 8px 0 3px; }
