/* Auditoria ao vivo · tema Sentinel V6 (ver assets/tokens.css) */
@font-face { font-family: "Roboto"; src: url("fonts/Roboto-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/Roboto-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/Roboto-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--surface-base); color: var(--text-body);
  font-family: var(--font-sans); font-weight: 300;
  font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: hidden; max-width: 100%; }
h1, h2, h3 { color: var(--text-title); font-weight: 400; margin: 0 0 var(--sp-4); }
h2 { font-size: var(--fs-h2); line-height: 1.15; }
h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
p { margin: 0 0 var(--sp-3); }
a { color: var(--text-accented); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--white-100); }
strong { font-weight: 700; }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.num { font-variant-numeric: tabular-nums; }
.num-strong { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-title); }
.soft { color: var(--text-soft); font-size: var(--fs-small); }
.container { max-width: 1480px; margin: 0 auto; padding: 0 var(--sp-6); }
.section { padding: var(--sp-10) 0; border-top: 1px solid var(--line); }
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: 13px; letter-spacing: 0.18em; font-weight: 400; margin-bottom: var(--sp-3); }

*:focus-visible { outline: none; box-shadow: var(--glow-focus); border-radius: var(--r-sm); }

/* ── barra de progresso de topo (sensação de velocidade) ──── */
.top-progress { position: sticky; top: 0; z-index: calc(var(--z-nav) + 1); height: 2px; background: transparent; }
.top-progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 600ms var(--ease-out); box-shadow: 0 0 6px var(--accent-a40); }

/* ── header pulso ao vivo (fonte.tse_idg muda) ──────────────── */
.nav.pulse { animation: navpulse 900ms var(--ease-out); }
@keyframes navpulse {
  0% { box-shadow: inset 0 0 0 0 rgba(0,233,165,0); }
  40% { box-shadow: inset 0 0 0 6px rgba(0,233,165,.25); }
  100% { box-shadow: inset 0 0 0 0 rgba(0,233,165,0); }
}

/* ── indicador vivo ─────────────────────────────────────── */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-soft); display: inline-block; flex: none; }
.dot.on { background: var(--accent); box-shadow: 0 0 0 0 var(--accent-a40); animation: pulse 2s var(--ease-out) infinite; }
.dot.off { background: var(--status-error); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-a40); }
  70% { box-shadow: 0 0 0 6px rgba(0,233,165,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,233,165,0); }
}

/* ── header ─────────────────────────────────────────────── */
.conn-banner {
  background: var(--amber-900); color: #FDE68A; border-bottom: 1px solid var(--amber-600);
  padding: var(--sp-2) var(--sp-6); font-size: var(--fs-small); text-align: center;
}
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(0,15,25,0.78); backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1480px; margin: 0 auto; padding: var(--sp-3) var(--sp-6);
  display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; flex: none; }
.logo { width: 68px; height: auto; display: block; }
.title-block { flex: 1 1 auto; min-width: 200px; }
.title-block .eyebrow { margin-bottom: 2px; }
.page-title { font-size: 20px; font-weight: 400; margin: 0; color: var(--text-title); }
.rel-link { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--text-soft); text-decoration: underline; text-underline-offset: 2px; }
.rel-link:hover { color: var(--text-title); }
.live-cluster { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: none; padding: 0 var(--sp-3); }
.live-cluster-main { display: flex; align-items: baseline; gap: 5px; }
.live-big-n { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1; }
.live-big-l { font-size: 11px; color: var(--text-soft); white-space: nowrap; }
#live-updated { font-size: 11px; white-space: nowrap; }
.clock-block { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-small); align-items: flex-end; flex: none; }
.clock-row { display: flex; align-items: center; gap: 6px; color: var(--text-body); white-space: nowrap; }
.clock-row b { font-variant-numeric: tabular-nums; color: var(--text-title); font-weight: 700; }
.nav-actions { display: flex; gap: var(--sp-2); flex: none; }
.icon-btn {
  display: flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line);
  color: var(--text-body); border-radius: var(--r-md); padding: 7px 10px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  min-width: 44px; min-height: 44px; justify-content: center;
}
.icon-btn:hover { border-color: var(--line-accent); background: var(--accent-a04); color: var(--text-title); }
.kbd { font-size: 11px; color: var(--text-soft); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; }

/* ── busca ⌘K ───────────────────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0; background: var(--surface-overlay); z-index: var(--z-modal);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh;
  backdrop-filter: blur(8px);
}
.search-box {
  width: min(560px, 92vw); background: var(--surface-raised); border: 1px solid var(--line-strong);
  border-radius: var(--r-xl); box-shadow: var(--glow-card); overflow: hidden;
}
.search-input-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); color: var(--text-soft); }
.search-input-row input {
  flex: 1; background: transparent; border: none; color: var(--text-title); font: inherit; font-size: 16px; outline: none;
}
.search-results { max-height: 50vh; overflow-y: auto; }
.search-item {
  display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5);
  cursor: pointer; border-bottom: 1px solid var(--line); color: var(--text-body); font-size: var(--fs-small);
}
.search-item:hover, .search-item.active { background: var(--accent-a04); color: var(--text-title); }
.search-item .sm-uf { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.search-empty { padding: var(--sp-5); color: var(--text-soft); font-size: var(--fs-small); }

/* ── faixa de status (countdown + relógios) ─────────────── */
.status-strip {
  position: sticky; top: 0; z-index: calc(var(--z-nav) - 1);
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  min-height: 36px; padding: 4px var(--sp-4);
  background: rgba(2,10,18,0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--text-soft); line-height: 1.3;
}
.status-strip b { color: var(--text-title); font-weight: 700; font-variant-numeric: tabular-nums; }
.status-strip #countdown { color: var(--accent); }
.status-strip .ss-sep { color: var(--line-strong); }
#clock-status { color: var(--text-body); }
.lead { font-size: var(--fs-lead); line-height: 1.6; max-width: 72ch; color: var(--text-body); }

/* ── grid 3 colunas ─────────────────────────────────────── */
.cols3 { display: grid; grid-template-columns: 300px 1fr 320px; gap: var(--sp-6); align-items: start; border-top: none; padding-top: var(--sp-5); }
.col { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }

.card {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5); min-width: 0; max-width: 100%;
}
.card.destaque { background: linear-gradient(var(--accent-a04), var(--accent-a04)), var(--surface-raised); border-color: var(--line-accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }

/* ── card candidatos ────────────────────────────────────── */
.cand-card-sub { margin: 0 0 var(--sp-4); }
.cand-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.cand-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cand-head { display: flex; align-items: center; gap: 8px; }
.cand-foto { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; display: block; }
.cand-foto-wrap { width: 56px; height: 56px; border-radius: 50%; flex: none; border: 2px solid; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface-sunken); }
.cand-foto-fallback { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cand-num { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.cand-nome { font-size: var(--fs-small); color: var(--text-body); margin-bottom: 4px; white-space: normal; line-height: 1.1; overflow-wrap: break-word; }
.cand-ref-1t { font-size: 12px; color: var(--text-soft); opacity: .75; margin: 0; font-variant-numeric: tabular-nums; }
.cand-votos { font-size: clamp(19px, 2.1vw, 26px); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-title); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand-pct { font-size: var(--fs-small); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.cand-col[data-side="right"] { text-align: right; }

.adv-wrap { margin-top: var(--sp-4); }
.adv-bar { position: relative; height: 10px; border-radius: var(--r-pill); background: var(--surface-sunken); overflow: hidden; display: flex; }
.adv-fill-22, .adv-fill-13 { height: 100%; transition: width var(--dur-slow) var(--ease-out); }
.adv-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }
.adv-label { margin: var(--sp-2) 0 0; font-size: var(--fs-small); color: var(--text-body); text-align: center; }

.secoes-prog { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.secoes-prog-row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-small); color: var(--text-body); margin-bottom: 6px; }
.progress-track { height: 6px; background: var(--surface-sunken); border-radius: var(--r-pill); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width var(--dur-slow) var(--ease-out); }

.turnout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
.turnout-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.turnout-item .l { color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.turnout-item .v { color: var(--text-title); font-weight: 700; font-variant-numeric: tabular-nums; font-size: clamp(13px, 1.4vw, 15px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── projeção ───────────────────────────────────────────── */
.proj-card .eyebrow { margin-bottom: var(--sp-3); }
.proj-lider { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.proj-foto { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid; }
.proj-tw { font-size: clamp(26px, 3vw, 34px); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-title); line-height: 1.1; }
.proj-ic { font-size: var(--fs-small); color: var(--text-soft); margin-top: 2px; }
.proj-conf { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border-radius: var(--r-pill); padding: 3px 10px; margin-top: var(--sp-3); border: 1px solid; }
.proj-conf.baixa { color: var(--status-alert); border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.06); }
.proj-conf.media { color: var(--status-intel); border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.06); }
.proj-conf.alta { color: var(--status-protected); border-color: var(--accent-a25); background: var(--accent-a04); }
.proj-nota { font-size: 12px; color: var(--text-soft); margin-top: var(--sp-3); }
.proj-vazio { margin: 0; }
.btn-quiet {
  background: none; border: none; color: var(--accent); font-size: var(--fs-small); cursor: pointer;
  padding: var(--sp-2) 0; margin-top: var(--sp-2); display: inline-block; text-decoration: none;
}
.btn-quiet:hover { color: var(--accent-hover); }

/* ── gráficos ───────────────────────────────────────────── */
.chart { width: 100%; min-height: 220px; }
.chart-xs { min-height: 110px; }
.chart-vazio { text-align: center; padding: var(--sp-8) 0; margin: 0; }
.chart-card .soft { margin-bottom: var(--sp-3); }
.proj-tag { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin: -4px 0 var(--sp-3); }

/* ── mapa ───────────────────────────────────────────────── */
.map-card { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); min-height: 72vh; }
.map-toolbar { display: flex; justify-content: space-between; gap: var(--sp-3); flex-wrap: nowrap; }
.chip-group { display: flex; gap: 6px; flex-wrap: nowrap; }
.chip-scroll { overflow-x: auto; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip {
  background: var(--surface-sunken); border: 1px solid var(--line); color: var(--text-body);
  border-radius: var(--r-pill); padding: 7px 14px; font-size: 13px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-accent); color: var(--text-title); }
.chip.active { border-color: var(--accent-a40); background: var(--accent-a08); color: var(--accent); }

.map-wrap { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface-base); flex: 1; display: flex; }
.map { width: 100%; height: auto; min-height: 520px; flex: 1; }
#map, #map canvas, #map .maplibregl-canvas-container { touch-action: none; }
.map .maplibregl-ctrl-bottom-left, .map .maplibregl-ctrl-attrib, .map .maplibregl-ctrl-bottom-right { display: none; }
.map-zoom { position: absolute; left: var(--sp-3); bottom: var(--sp-3); display: flex; flex-direction: column; gap: 1px; z-index: 12; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-strong); }
.map-zoom button {
  width: 36px; height: 36px; background: rgba(4,15,26,0.9); border: none; color: var(--text-title);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line); touch-action: manipulation;
}
.map-zoom button:last-child { border-bottom: none; }
.map-zoom button:hover { background: var(--accent-a08); color: var(--accent); }
.map-ufs-btn { display: none; }
.map-pre17-note { margin: 0 0 var(--sp-2); }

.map-tooltip {
  position: absolute; z-index: 10; pointer-events: none; background: rgba(4,15,26,0.95);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-small); color: var(--text-body); max-width: 240px; box-shadow: var(--glow-card);
}
.map-tooltip .tt-title { color: var(--text-title); font-weight: 700; margin-bottom: 2px; }
.map-tooltip .tt-row { display: flex; justify-content: space-between; gap: var(--sp-3); font-variant-numeric: tabular-nums; }

.map-legend {
  position: absolute; left: 56px; bottom: var(--sp-3); top: auto; z-index: 5; pointer-events: none; background: rgba(4,15,26,0.9);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3); max-width: 230px;
  font-size: 12px; color: var(--text-soft); display: flex; flex-direction: column; gap: 4px;
}
.map-legend .lg-t { color: var(--text-title); font-weight: 700; font-size: 12px; display: block; margin-bottom: 2px; }
.map-legend .lg-note { font-size: 11px; color: var(--text-soft); line-height: 1.4; margin-top: 2px; }
.legend-grad { width: 120px; height: 8px; border-radius: var(--r-pill); background: linear-gradient(90deg, #d7263d, #4a3f55, #2f6fed); }

.map-novidades-chip {
  position: absolute; top: var(--sp-3); right: var(--sp-3); z-index: 6; pointer-events: none; background: rgba(0,233,165,0.12);
  border: 1px solid var(--accent-a40); border-radius: var(--r-pill); padding: 6px 12px; font-size: 12px;
  color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums;
  transition: opacity 300ms var(--ease-out);
}

.map-callouts { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
#map .maplibregl-marker { pointer-events: none; }
.map-callout-box { transition: top 300ms var(--ease-out); }
.map-callout {
  position: absolute; pointer-events: auto; background: rgba(4,15,26,0.92); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: 4px 8px; font-size: 11px; color: var(--text-body); white-space: nowrap;
  display: flex; align-items: center; gap: 6px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.map-callout b { color: var(--text-title); font-variant-numeric: tabular-nums; }

/* ── pulso de novidade no mapa (marcador no centróide) ─────── */
.map-pulse-mk { position: relative; width: 1px; height: 1px; pointer-events: none; }
.map-pulse-ring {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px;
  border-radius: 50%; border: 2px solid var(--accent); opacity: .9;
  animation: pulsering 2.5s var(--ease-out) forwards;
}
@keyframes pulsering {
  0% { transform: scale(0.3); opacity: .9; }
  100% { transform: scale(7); opacity: 0; }
}

/* ── timeline/replay ────────────────────────────────────── */
.timeline-bar { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-2) 0; }
.tl-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-title); font-size: var(--fs-small); flex: none; min-width: 70px; }
.tl-track { position: relative; flex: 1; height: 28px; display: flex; align-items: center; cursor: pointer; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--surface-sunken); border-radius: var(--r-pill); }
.tl-marks { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 10px; color: var(--text-soft); top: 16px; }
.tl-marks span { transform: translateX(-50%); }
.tl-progress { position: absolute; left: 0; height: 3px; background: var(--accent); border-radius: var(--r-pill); top: 50%; transform: translateY(-50%); transition: width var(--dur-base) var(--ease-out); }
.tl-handle {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  top: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--accent-a25);
  cursor: grab; transition: left var(--dur-base) var(--ease-out);
}
.tl-handle:active { cursor: grabbing; }
.tl-live {
  flex: none; background: transparent; border: 1px solid var(--line); color: var(--text-soft);
  border-radius: var(--r-pill); padding: 6px 14px; font-size: 13px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.tl-live.active { border-color: var(--accent-a40); background: var(--accent-a08); color: var(--accent); }

/* ── painel município ───────────────────────────────────── */
.mun-panel {
  position: relative; background: var(--surface-raised); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); padding: var(--sp-5); animation: rise var(--dur-slow) var(--ease-out);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.mun-panel-close { position: absolute; top: var(--sp-3); right: var(--sp-3); background: none; border: none; color: var(--text-soft); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; }
.mun-panel-close:hover { color: var(--text-title); }
.mun-panel-flags { display: flex; gap: 6px; flex-wrap: wrap; margin: var(--sp-3) 0; }
.flag-badge { font-size: 11px; border-radius: var(--r-pill); padding: 2px 10px; border: 1px solid; }
.flag-badge.vermelho { color: var(--status-error); border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.flag-badge.amarelo { color: var(--status-alert); border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }

/* ── kpis ───────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--sp-3); }
.kpis-sm .kpi { padding: var(--sp-2) var(--sp-3); }
.kpi { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); }
.kpi .v { display: block; color: var(--text-title); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 18px; line-height: 1.15; }
.kpi .l { color: var(--text-soft); font-size: 12px; }

/* ── por região ─────────────────────────────────────────── */
.regioes-lista { display: flex; flex-direction: column; gap: var(--sp-4); }
.regiao-item { display: flex; flex-direction: column; gap: 4px; }
.regiao-head { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-small); }
.regiao-head b { color: var(--text-title); }
.regiao-bar-wrap { display: flex; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-sunken); }
.regiao-bar-wrap i { display: block; height: 100%; }
.regiao-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-soft); font-variant-numeric: tabular-nums; }

/* ── feed ───────────────────────────────────────────────── */
.feed-lista { display: flex; flex-direction: column; gap: var(--sp-3); max-height: 360px; overflow-y: auto; }
.feed-item { display: flex; gap: var(--sp-3); font-size: var(--fs-small); animation: rise var(--dur-slow) var(--ease-out); }
.feed-item .ft-time { color: var(--text-soft); font-variant-numeric: tabular-nums; flex: none; width: 54px; }
.feed-item .ft-txt { color: var(--text-body); }
.feed-vazio { padding: var(--sp-4) 0; margin: 0; }

/* ── tabelas ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--text-label); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.tbl td { color: var(--text-body); font-variant-numeric: tabular-nums; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl-compact th, .tbl-compact td { padding: 6px 8px; white-space: normal; }
.tbl tr:hover td { background: var(--accent-a04); }
.tbl .bar-cell { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.tbl .bar-track { flex: 1; height: 6px; background: var(--surface-sunken); border-radius: var(--r-pill); overflow: hidden; }
.tbl .bar-fill { height: 100%; border-radius: var(--r-pill); }
.lvl-tag { font-size: 11px; border-radius: var(--r-pill); padding: 2px 8px; border: 1px solid; white-space: nowrap; }
.lvl-tag.vermelho { color: var(--status-error); border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.lvl-tag.amarelo { color: var(--status-alert); border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
.flag-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.flag-dot.vermelho { background: var(--status-error); }
.flag-dot.amarelo { background: var(--status-alert); }

.lista { padding-left: var(--sp-5); margin: 0 0 var(--sp-4); }
.lista li { margin-bottom: var(--sp-2); }
.glossario { margin: 0; }
.glossario dt { color: var(--text-title); font-weight: 700; font-size: var(--fs-small); margin-top: var(--sp-3); }
.glossario dd { margin: 0; font-size: var(--fs-small); color: var(--text-soft); }

/* ── modal método ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: var(--surface-overlay); z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-6); backdrop-filter: blur(8px);
}
.modal {
  position: relative; width: min(560px, 100%); background: var(--surface-raised); border: 1px solid var(--line-strong);
  border-radius: var(--r-xl); box-shadow: var(--glow-card); padding: var(--sp-8);
  animation: rise var(--dur-slow) var(--ease-out); max-height: 80vh; overflow-y: auto;
}
.modal-close { position: absolute; top: var(--sp-4); right: var(--sp-4); background: none; border: none; color: var(--text-soft); font-size: 24px; cursor: pointer; }
.modal-close:hover { color: var(--text-title); }

/* ── rodapé ─────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--surface-sunken); padding: var(--sp-12) 0; margin-top: var(--sp-10); }
.footer-inner { display: flex; justify-content: space-between; gap: var(--sp-8); flex-wrap: wrap; }
.logo-footer { width: 100px; margin-bottom: var(--sp-3); }
.footer p { margin-bottom: var(--sp-2); font-size: var(--fs-small); }

/* ── responsivo ─────────────────────────────────────────── */
@media (max-width: 1099px) {
  .cols3 { grid-template-columns: 1fr 1fr; }
  .col-center { grid-column: 1 / -1; order: -1; }
}
/* ── barra fixa mobile ──────────────────────────────────── */
.mobile-bar { display: none; }

@media (max-width: 768px) {
  .container { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .nav { position: static; }
  .nav-inner { padding: var(--sp-2) var(--sp-4); gap: var(--sp-3); }
  .logo { width: 52px; }
  .page-title { font-size: 17px; }
  .mobile-bar {
    display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--z-nav) + 2);
    align-items: center; gap: 10px; height: 48px; padding: 0 var(--sp-4);
    background: rgba(2,10,18,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line);
  }
  body { padding-top: 48px; }
  .mb-adv { flex: 1; }
  .mb-adv-track { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-sunken); }
  .mb-adv-fill-22 { background: #2f6fed; height: 100%; transition: width .4s; }
  .mb-adv-fill-13 { background: #d7263d; height: 100%; transition: width .4s; }
  .mb-meta { display: flex; flex-direction: column; gap: 0; font-size: 10px; color: var(--text-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .status-strip { top: 48px; }
  .cols3 { display: flex; flex-direction: column; gap: var(--sp-5); }
  .col { display: contents; }
  .map-card { order: -12; min-height: 0; }
  #mun-panel { order: -11; }
  #cand-card { order: -10; }
  .proj-card { order: -9; }
  #card-regioes { order: -8; }
  .map-wrap { display: block; }
  .map { height: 66vh; min-height: 66vh; }
  /* botões de zoom: alvo de toque 44px, canto inferior direito, acima dos overlays */
  .map-zoom { left: auto; right: var(--sp-3); bottom: var(--sp-3); z-index: 12; }
  .map-zoom button { width: 44px; height: 44px; font-size: 20px; }
  .map-legend { left: var(--sp-3); max-width: 200px; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: var(--sp-8) 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .cand-row { grid-template-columns: 1fr 1fr; }
  .nav-actions .kbd { display: none; }
  .table-wrap .tbl { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

a, code { overflow-wrap: anywhere; word-break: break-word; }
