/* Componente da home do site: apuração para presidente (mapa, resultado ao vivo, Prumo a partir de 15%).
   Identidade BP: azul-noite, Playfair Display só na manchete, Inter nos dados, cores de partido do app.
   Celular primeiro; a partir de 860 px, duas colunas (dados à esquerda, mapa à direita). */
:root {
  --noite: #071A38; --navy: #0C2A5C; --azul: #1F5FBF; --claro: #E9F1FD; --suave: rgba(190,214,245,.72);
  --linha: rgba(150,190,255,.16); --verm: #E11D1D;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; }
body { font-family: var(--sans); color: var(--claro); -webkit-font-smoothing: antialiased; }
.cx { max-width: 1216px; margin: 0 auto; padding: 18px 16px 20px;
  background: radial-gradient(120% 70% at 50% 0%, #163E7E 0%, var(--navy) 42%, var(--noite) 100%); border-radius: 14px; overflow: hidden; }

/* topo: marca, cargo e o sinal de ao vivo */
.cx-topo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--linha); }
.cx-marca { height: 22px; width: auto; }
.cx-cargo { font-size: 13px; font-weight: 600; color: var(--suave); }
.cx-vivo { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.cx-vivo i { width: 9px; height: 9px; border-radius: 50%; background: var(--verm); box-shadow: 0 0 0 0 rgba(225,29,29,.6); animation: cx-pulso 1.8s ease-out infinite; }
.cx-vivo b { font-weight: 800; color: #fff; }
.cx-vivo time { color: var(--suave); font-variant-numeric: tabular-nums; }
.cx-encerrado .cx-vivo i { animation: none; background: #8FE3B0; }
@keyframes cx-pulso { 70% { box-shadow: 0 0 0 9px rgba(225,29,29,0); } 100% { box-shadow: 0 0 0 0 rgba(225,29,29,0); } }
.cx-teste { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #0C2A5C; background: #F2C14E; padding: 3px 8px; border-radius: 4px; }

/* manchete e submanchete: o texto conta o estado da disputa em uma frase */
.cx-manchete { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 5.6vw, 34px); line-height: 1.12; letter-spacing: -.01em;
  margin: 14px 0 8px; color: #fff; text-wrap: balance; max-width: 36ch; }
.cx-sub { font-size: clamp(14px, 3.6vw, 16px); line-height: 1.45; color: var(--suave); margin: 0 0 14px; max-width: 62ch; text-wrap: pretty; }
.cx-sub b { color: var(--claro); font-weight: 700; }

/* urnas apuradas */
.cx-urnas { margin: 0 0 16px; }
.cx-urnas-txt { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.cx-urnas-txt strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.cx-urnas-txt span { font-size: 14px; color: var(--suave); }
.cx-urnas-barra { height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.cx-urnas-barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7FB2F0, #E9F1FD); transition: width 1s cubic-bezier(.2,.8,.2,1); }

.cx-grade { display: grid; gap: 22px; }

/* candidatos: os dois primeiros em destaque; os demais numa lista compacta */
.cx-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cx-cand { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.cx-foto { grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 50%; padding: 2px; border: 2.5px solid var(--c); background: #dbe5f2; overflow: hidden; position: relative; }
.cx-foto img { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 15%; display: block; }
.cx-foto span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; color: var(--navy); font-size: 18px; }
.cx-nome { min-width: 0; }
.cx-nome b { display: block; font-size: 17px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-nome small { font-size: 13px; color: var(--suave); font-variant-numeric: tabular-nums; }
.cx-pct { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; text-align: right; line-height: 1; }
.cx-barra { grid-column: 2 / span 2; height: 8px; border-radius: 4px; background: rgba(255,255,255,.09); margin-top: 8px; overflow: hidden; }
.cx-barra i { display: block; height: 100%; width: 0; background: var(--c); border-radius: 4px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.cx-selo { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 4px; vertical-align: 2px; background: #BFE0FF; color: var(--navy); }
.cx-selo.eleito { background: #8FE3B0; color: #063A22; }
.cx-outros { margin-top: 14px; border-top: 1px solid var(--linha); }
.cx-outros summary { cursor: pointer; padding: 12px 0 4px; font-size: 14px; font-weight: 700; color: #BFE0FF; list-style: none; }
.cx-outros summary::-webkit-details-marker { display: none; }
.cx-outros summary::after { content: " +"; } .cx-outros[open] summary::after { content: " −"; }
.cx-outros ol { list-style: none; margin: 6px 0 0; padding: 0; }
.cx-outros li { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; border-bottom: 1px solid rgba(150,190,255,.08); }
.cx-outros li i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.cx-outros li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-outros li b { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Prumo: o elemento que é só da BP — o pêndulo aponta a vantagem projetada */
.cx-prumo { margin-top: 20px; padding: 16px 14px 14px; border-radius: 12px; background: rgba(255,255,255,.045); border: 1px solid var(--linha); }
.cx-prumo-cab { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cx-prumo-nome { font-family: var(--serif); font-size: 22px; font-weight: 800; color: #fff; }
.cx-prumo-oque { font-size: 13px; color: var(--suave); }
.cx-prumo-svg { display: block; width: 100%; max-width: 420px; margin: 6px auto 4px; overflow: visible; }
.cx-prumo-leitura { margin: 4px 0 0; text-align: center; font-size: 15px; line-height: 1.45; color: var(--suave); }
.cx-prumo-leitura b { color: #fff; font-weight: 800; }

/* mapa: cor do partido de quem lidera; mais intensa quanto maior a vantagem; sem urnas = hachurado */
.cx-mapa-cab { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.cx-mapa-svg { display: block; width: 100%; max-width: 380px; margin: 0 auto; height: auto; }
.cx-mapa-svg path { stroke: rgba(7,26,56,.95); stroke-width: 1.4; stroke-linejoin: round; cursor: pointer; transition: fill .6s ease, opacity .2s; }
.cx-mapa-svg path:hover, .cx-mapa-svg path.on { stroke: #fff; stroke-width: 2.4; }
.cx-mapa-svg:has(path.on) path:not(.on) { opacity: .55; }
.cx-mapa-leg { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin-top: 10px; font-size: 13px; color: var(--suave); }
.cx-mapa-leg span { display: inline-flex; align-items: center; gap: 6px; }
.cx-mapa-leg i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.cx-uf { margin: 12px auto 0; max-width: 560px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--linha); font-size: 14px; }
.cx-uf h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: #fff; } .cx-uf h3 small { font-weight: 500; color: var(--suave); }
.cx-uf p { margin: 3px 0; display: flex; justify-content: space-between; gap: 10px; } .cx-uf p b { font-variant-numeric: tabular-nums; }

/* rodapé: o caminho para o app */
.cx-pe { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linha); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cx-botoes { display: flex; flex-wrap: wrap; gap: 10px; }
.cx-cta { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: #E9F1FD; color: var(--navy);
  font-weight: 800; font-size: 16px; text-decoration: none; transition: background .2s, transform .2s; }
.cx-cta:hover { background: #fff; transform: translateY(-1px); }
.cx-live { background: var(--verm); color: #fff; }
.cx-live:hover { background: #F23A3A; }
.cx-live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: cx-pulso 1.8s ease-out infinite; }
.cx-cta:focus-visible, .cx-outros summary:focus-visible { outline: 3px solid #7FB2F0; outline-offset: 3px; }
.cx-mapa-svg path:focus { outline: none; }
.cx-mapa-svg path:focus-visible { stroke: #7FB2F0; stroke-width: 3; }
.cx-fonte { margin: 0; font-size: 12px; line-height: 1.5; color: rgba(190,214,245,.55); max-width: 60ch; flex: 1 1 320px; }

/* desktop: manchete na largura toda; dados à esquerda, mapa à direita */
@media (min-width: 860px) {
  .cx { padding: 22px 32px 22px; }
  .cx-grade { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .cx-mapa-svg { max-width: 340px; }
  .cx-foto { width: 64px; height: 64px; } .cx-cand { grid-template-columns: 64px minmax(0,1fr) auto; }
  .cx-pct { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { .cx-vivo i, .cx-live i { animation: none; } .cx-barra i, .cx-urnas-barra i, .cx-mapa-svg path { transition: none; } }
.cx-mapa-leg i.cx-hach { background: repeating-linear-gradient(45deg, #1A3466 0 3px, #2C4A80 3px 6px); }

/* mobile: no map, keeps the embed short on the portal home */
@media (max-width: 859px) { .cx-mapa { display: none; } }
