:root {
  --bg: #f4f5f7;
  --sup: #ffffff;
  --sup2: #f8fafc;
  --linha: #e5e7eb;
  --linha2: #d1d5db;
  --tx: #0f172a;
  --tx2: #475569;
  --tx3: #94a3b8;
  --fla: #2563eb;
  --fla-cl: #e8efff;
  --lula: #dc2626;
  --lula-cl: #fdeaea;
  --roxo: #6d5fd3;
  --zap: #1faa59;
  --raio: 10px;
  --sombra: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 20px rgba(15, 23, 42, .08);
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--tx); background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--fla); }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fla { color: var(--fla); }
.lula { color: var(--lula); }
.nota { font-size: 12px; color: var(--tx3); margin-top: 10px; }
.guia { color: var(--tx2); margin: 4px 0 14px; }
.guia b { color: var(--tx); }
.rotulo { font-size: 12px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .04em; }
.sec { font-size: 13px; font-weight: 700; margin: 22px 0 8px; }
.texto { color: var(--tx2); margin-bottom: 10px; }
.texto b { color: var(--tx); }

/* estrutura */
.app { display: grid; grid-template-rows: 56px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.barra { display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--sup); border-bottom: 1px solid var(--linha); }
.marca { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: var(--tx); text-decoration: none; white-space: nowrap; }
.marca-ico { display: inline-flex; align-items: flex-end; gap: 2px; width: 26px; height: 26px; padding: 5px; border-radius: 7px; background: var(--tx); }
.marca-ico i { display: block; width: 4px; border-radius: 1px; }
.marca-ico i:nth-child(1) { height: 9px; background: var(--lula); }
.marca-ico i:nth-child(2) { height: 15px; background: #cbd5e1; }
.marca-ico i:nth-child(3) { height: 12px; background: var(--fla); }
.barra-sub { color: var(--tx3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-cont { margin-left: auto; font-size: 12px; color: var(--tx2); background: var(--sup2); border: 1px solid var(--linha); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.barra-cont b { color: var(--tx); }
.palco { display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: 0; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, box-shadow .15s, border-color .15s; }
.btn svg { width: 18px; height: 18px; }
.btn-zap { background: var(--zap); color: #fff; }
.btn-zap:hover { background: #179a4f; }
.btn-sec { background: var(--sup); border: 1px solid var(--linha2); color: var(--tx); }
.btn-sec:hover { border-color: var(--tx3); background: var(--sup2); }
.btn-cheio { width: 100%; height: 44px; }
.btn-ico { width: 36px; height: 36px; border-radius: 8px; background: var(--sup); border: 1px solid var(--linha); color: var(--tx); font-size: 18px; line-height: 1; box-shadow: var(--sombra); }
.btn-ico:hover { background: var(--sup2); }
.btn-br { font-size: 11px; font-weight: 700; }
:focus-visible { outline: 2px solid var(--fla); outline-offset: 2px; }

/* mapa */
.mapa { position: relative; min-height: 0; overflow: hidden; background: #e9ecf1; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.mapa.arrastando { cursor: grabbing; }
#cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mapa2d { position: absolute; inset: 12px; }
.mapa2d svg { width: 100%; height: 100%; }
#g-mun path { stroke: #fff; stroke-width: .25; }
#g-uf path { fill: none; stroke: #94a3b8; stroke-width: .7; pointer-events: none; }
.sobre-mapa { position: absolute; z-index: 3; }
.topo-esq { top: 12px; left: 12px; right: 60px; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; pointer-events: none; }
.topo-esq > * { pointer-events: auto; }
.base-esq { left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; pointer-events: none; }
.base-dir { right: 12px; bottom: 12px; }
.busca { position: relative; width: 280px; max-width: 100%; }
#busca-in { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--linha); border-radius: 8px; background: var(--sup) no-repeat 11px 50% / 15px; box-shadow: var(--sombra); outline: none; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E"); }
#busca-in:focus { border-color: var(--fla); box-shadow: 0 0 0 3px var(--fla-cl); }
.busca-lista { position: absolute; left: 0; right: 0; top: 42px; list-style: none; background: var(--sup); border: 1px solid var(--linha); border-radius: 8px; box-shadow: var(--sombra); max-height: 300px; overflow-y: auto; padding: 4px; }
.busca-lista li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; color: var(--tx2); }
.busca-lista li b { color: var(--tx); font-weight: 600; }
.busca-lista li[aria-selected=true], .busca-lista li:hover { background: var(--sup2); }
.busca-lista li .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.busca-lista li.vazio { cursor: default; }
.camada select { height: 38px; padding: 0 30px 0 12px; border: 1px solid var(--linha); border-radius: 8px; background: var(--sup) no-repeat right 10px center / 12px; box-shadow: var(--sombra); -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23475569' stroke-width='1.8'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E"); }
.legenda { background: rgba(255, 255, 255, .92); border: 1px solid var(--linha); border-radius: 8px; padding: 8px 10px; font-size: 11.5px; color: var(--tx2); box-shadow: var(--sombra); min-width: 220px; }
.legenda .faixa { height: 6px; border-radius: 3px; margin: 6px 0 4px; }
.legenda .pontas { display: flex; justify-content: space-between; font-weight: 600; }
.dica-uso { font-size: 11.5px; color: var(--tx2); background: rgba(255, 255, 255, .8); border-radius: 6px; padding: 3px 8px; }
.zoom { display: flex; flex-direction: column; gap: 6px; }
.tip { position: absolute; z-index: 6; pointer-events: none; min-width: 210px; background: var(--sup); border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); font-size: 12.5px; }
.tip b { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.tip .l1 { display: flex; justify-content: space-between; gap: 14px; color: var(--tx2); }
.tip .l1 span:last-child { font-variant-numeric: tabular-nums; }
.tip .el { color: var(--tx3); margin-top: 4px; font-size: 11.5px; }

/* painel */
.painel { display: flex; flex-direction: column; min-height: 0; background: var(--sup); border-left: 1px solid var(--linha); }
.resultado { padding: 14px 18px 14px; border-bottom: 1px solid var(--linha); }
.placar { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6px; }
.placar .nome { display: block; font-size: 12px; font-weight: 600; color: var(--tx2); }
.placar b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.placar .dir { text-align: right; }
.placar-p { margin: 4px 0 6px; }
.placar-p b { font-size: 26px; }
.barra-duelo { position: relative; display: flex; height: 8px; margin-top: 8px; border-radius: 4px; overflow: hidden; background: var(--linha); }
.barra-duelo i { display: block; height: 100%; transition: width .35s ease; }
.b-l { background: var(--lula); }
.b-f { background: var(--fla); margin-left: auto; }
.barra-duelo .meio { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; }
.res-pe { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.selo { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.selo.F { background: var(--fla-cl); color: var(--fla); }
.selo.L { background: var(--lula-cl); color: var(--lula); }
.res-linha { font-size: 12px; color: var(--tx2); }
.res-linha b { color: var(--tx); font-variant-numeric: tabular-nums; }
.abas { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--linha); }
.abas button { position: relative; height: 44px; padding: 0 10px; font-weight: 600; color: var(--tx2); }
.abas button[aria-selected=true] { color: var(--tx); }
.abas button[aria-selected=true]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--tx); }
.conteudo { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 28px; overscroll-behavior: contain; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { height: 32px; padding: 0 11px; border: 1px solid var(--linha); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--tx2); background: var(--sup); }
.presets button:hover { border-color: var(--tx3); color: var(--tx); }
.presets button.on { background: var(--tx); border-color: var(--tx); color: #fff; }
.grupo { padding: 12px 0 6px; border-top: 1px solid var(--linha); }
.grupo:first-child { border-top: 0; }
.g-cab { display: flex; justify-content: space-between; gap: 10px; }
.g-cab b { font-weight: 700; }
.g-cab span { font-size: 12px; color: var(--tx3); white-space: nowrap; }
.leitura { display: flex; justify-content: space-between; margin-top: 2px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; --p: 50%; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; }
.r-duelo::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--lula) var(--p), var(--fla) var(--p)); }
.r-duelo::-moz-range-track { background: linear-gradient(90deg, var(--lula) var(--p), var(--fla) var(--p)); }
.r-centro::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--lula), var(--linha) 40%, var(--linha) 60%, var(--fla)); }
.r-centro::-moz-range-track { background: linear-gradient(90deg, var(--lula), var(--linha) 40%, var(--linha) 60%, var(--fla)); }
.r-cheio::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--tx) var(--p), var(--linha) var(--p)); }
.r-cheio::-moz-range-track { background: linear-gradient(90deg, var(--tx) var(--p), var(--linha) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 1px solid var(--linha2); box-shadow: 0 1px 4px rgba(15, 23, 42, .25); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--linha2); box-shadow: 0 1px 4px rgba(15, 23, 42, .25); }
.bloco { border-top: 1px solid var(--linha); padding: 12px 0 2px; margin-top: 6px; }
.ctl { display: block; }
.ctl-cab { display: flex; justify-content: space-between; gap: 10px; }
.ctl-cab b { font-weight: 600; }
.ctl-cab output { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aj { font-size: 12px; color: var(--tx3); margin-bottom: 8px; }
.avancado { border-top: 1px solid var(--linha); margin-top: 6px; }
.avancado summary { list-style: none; cursor: pointer; padding: 12px 0; font-weight: 600; display: flex; justify-content: space-between; }
.avancado summary::-webkit-details-marker { display: none; }
.avancado summary::after { content: "+"; color: var(--tx3); font-weight: 700; }
.avancado[open] summary::after { content: "−"; }

/* ajustes avançados */
.apagado { opacity: .45; }
.apagado input { cursor: not-allowed; }
.avancado .leitura { display: flex; margin-top: 2px; }

/* veredito */
.veredito { display: flex; align-items: center; gap: 12px; margin: 12px 18px 0; padding: 11px 12px 11px 14px; border-radius: 12px; text-decoration: none; color: #f3f4f8;
  background: radial-gradient(80% 160% at 0% 50%, rgba(220, 38, 38, .35), transparent 60%), radial-gradient(80% 160% at 100% 50%, rgba(37, 99, 235, .35), transparent 60%), #0b0d12;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12); transition: transform .15s, box-shadow .15s; }
.veredito:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.veredito:focus-visible { outline: 2px solid var(--tx); outline-offset: 2px; }
.v-marca { flex: none; display: flex; flex-direction: column; gap: 3px; }
.v-marca i { display: block; width: 4px; height: 13px; border-radius: 2px; background: var(--lula); }
.v-marca i + i { background: var(--fla); }
.v-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 12px; color: rgba(243, 244, 248, .72); line-height: 1.35; }
.v-txt b { font-size: 13.5px; color: #fff; font-weight: 800; letter-spacing: -.1px; }
.v-btn { flex: none; font-size: 12.5px; font-weight: 800; color: #0b0d12; background: #f3f4f8; padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.v-btn i { font-style: normal; }
.veredito-sobre { margin: 12px 0; }
@media (prefers-reduced-motion: reduce) { .veredito { transition: none; } .veredito:hover { transform: none; } }

/* estados */
.ufs { display: grid; gap: 4px; }
.uf { display: grid; grid-template-columns: 30px 1fr 64px; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.uf:hover { background: var(--sup2); }
.uf > b { font-weight: 700; color: var(--tx2); }
.trilho { position: relative; height: 12px; background: var(--sup2); border-radius: 3px; }
.trilho::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--linha2); }
.bar { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; }
.bar.L { right: 50%; background: var(--lula); }
.bar.F { left: 50%; background: var(--fla); }
.marco { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--tx); border-radius: 1px; }
.uf .m { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.uf .m.F { color: var(--fla); } .uf .m.L { color: var(--lula); }
.uf.apertado > b::after { content: " •"; color: var(--roxo); }

/* pesquisas */
.cartao { border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; background: var(--sup2); }
.grafico { margin: 16px 0 4px; }
.grafico svg { display: block; width: 100%; height: auto; }
.grafico text { font-size: 10.5px; fill: var(--tx3); font-family: var(--sans); }
.pesq-lista { display: grid; gap: 8px; }
.pesq { border: 1px solid var(--linha); border-radius: 8px; padding: 10px 12px; }
.pesq.fora { opacity: .6; }
.pesq-cab { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.pesq-cab a { color: var(--tx); text-decoration: none; }
.pesq-cab a:hover { text-decoration: underline; }
.pesq-cab span { font-variant-numeric: tabular-nums; }
.pesq dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin-top: 6px; font-size: 12px; }
.pesq dt { color: var(--tx3); }
.pesq dd { color: var(--tx2); text-align: right; }
.agenda { list-style: none; display: grid; gap: 2px; max-height: 300px; overflow-y: auto; }
.agenda li { display: grid; grid-template-columns: 46px 1fr auto; gap: 8px; padding: 7px 8px; border-radius: 6px; font-size: 12.5px; color: var(--tx2); }
.agenda li:nth-child(odd) { background: var(--sup2); }
.agenda li .d { font-weight: 700; color: var(--tx); font-variant-numeric: tabular-nums; }
.agenda li.grande b { color: var(--tx); }
.agenda li b { font-weight: 600; }
.agenda li .n { color: var(--tx3); font-size: 11.5px; }

/* sobre */
.fatos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fato { border: 1px solid var(--linha); border-radius: var(--raio); padding: 10px 12px; }
.fato b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fato span { font-size: 12px; color: var(--tx2); }

/* apuração */
.ao-vivo { padding: 12px 18px; border-bottom: 1px solid var(--linha); background: #fff7f7; }
.av-cab { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--lula); }
.pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--lula); animation: pulsa 1.2s infinite; }
@keyframes pulsa { 50% { opacity: .25; } }

/* compartilhar */
.modal { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 32px)); margin: auto; box-shadow: 0 30px 80px rgba(15, 23, 42, .3); color: var(--tx); }
.modal::backdrop { background: rgba(15, 23, 42, .45); }
.modal-cab { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--linha); }
.modal-cab h2 { font-size: 16px; font-weight: 700; }
.modal-cab .btn-ico { box-shadow: none; font-size: 20px; }
.modal-corpo { display: grid; grid-template-columns: 260px 1fr; gap: 18px; padding: 16px; align-items: start; }
.prev { position: relative; aspect-ratio: 1080 / 1350; border-radius: 8px; overflow: hidden; background: var(--sup2); border: 1px solid var(--linha); }
.prev img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prev-carregando { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tx3); font-size: 12.5px; }
.modal-acoes { display: grid; gap: 10px; }
.lado-a-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lado-a-lado .btn { height: 42px; }

@media (max-width: 899px) {
  .app { grid-template-rows: 52px minmax(0, 1fr); }
  .barra { gap: 10px; padding: 0 12px; }
  .barra-sub { display: none; }
  .barra-cont { font-size: 11px; padding: 3px 8px; }
  .btn-zap span { display: none; }
  .btn-zap { width: 40px; padding: 0; }
  .modal .btn-zap span { display: inline; }
  .modal .btn-zap { width: 100%; }
  .palco { grid-template-columns: 1fr; grid-template-rows: 44% minmax(0, 1fr); }
  .painel { border-left: 0; border-top: 1px solid var(--linha); }
  .resultado { padding: 10px 14px; }
  .resultado .rotulo { display: none; }
  .placar b { font-size: 26px; }
  .placar .nome { font-size: 11px; }
  .res-pe { margin-top: 8px; }
  .conteudo { padding: 12px 14px 24px; }
  .abas { padding: 0 6px; }
  .topo-esq { right: 56px; }
  .topo-esq { flex-wrap: nowrap; }
  .busca { width: auto; flex: 1 1 auto; min-width: 0; }
  .camada select { max-width: 132px; padding-right: 26px; font-size: 13px; }
  .legenda { min-width: 160px; padding: 5px 8px; }
  .legenda .txt { display: none; }
  .legenda .faixa { margin-bottom: 0; }
  .dica-uso { display: none; }
  .modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .modal-corpo { grid-template-columns: 120px 1fr; gap: 12px; }
}
@media (hover: none) { .dica-uso { display: none; } }
@media (prefers-reduced-motion: reduce) { .barra-duelo i { transition: none; } .pulso { animation: none; } }
