/* ==========================================================================
   EBIA — Apuração 2º Turno 2026 — Estilos Principais (app.css)
   Aderência estrita aos tokens do Design System EBIA
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--petroleo);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--petroleo-deep);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--petroleo);
  outline-offset: 2px;
  border-radius: 4px;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

@media (min-width: 900px) {
  .wrap {
    padding-left: max(40px, env(safe-area-inset-left, 0px));
    padding-right: max(40px, env(safe-area-inset-right, 0px));
  }
}

/* ==========================================================================
   Cabeçalho Corporativo Fixo
   ========================================================================== */

.hdr {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-header);
}

.hdr .wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  transition: filter 0.25s ease;
}

[data-theme="dark"] .brand-logo {
  filter: brightness(0) invert(1);
}

.brand-mark {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.brand-sep {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
}

.brand-prod {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-body);
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  position: relative;
  padding: 8px 14px;
  color: var(--ink-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--petroleo);
  transform: scaleX(0);
  opacity: 0;
  transition: all 0.25s ease;
}

.nav a:hover, .nav a.active {
  color: var(--petroleo);
}

.nav a:hover::after {
  transform: scaleX(1);
  opacity: 0.5;
}

.nav a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  flex-shrink: 0;
}

.theme-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink-body);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  border-color: var(--line-strong);
  color: var(--petroleo);
}

/* Botão Hambúrguer Mobile (3 traços deitados que expandem as opções de navegação) */
.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  transition: all 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.nav-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.is-active .nav-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-active .nav-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .brand-sep, .brand-prod { display: none; }
  .hdr .wrap {
    min-height: 58px;
    padding-inline: 16px;
    position: relative;
  }
  .brand-logo {
    height: 26px;
  }
  .hdr-actions {
    margin-left: auto;
  }
  .nav-toggle {
    display: flex;
  }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    flex-direction: column;
    padding: 12px 16px;
    gap: 4px;
    z-index: 100;
  }
  .nav.is-open {
    display: flex;
    animation: navSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .nav a {
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--ink-body);
    transition: background 0.15s ease, color 0.15s ease;
  }
  .nav a:hover, .nav a.active {
    background: var(--surface-tint);
    color: var(--petroleo);
  }
  .nav a::after {
    display: none;
  }
}

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Hero Section & Status da Apuração TSE
   ========================================================================== */

section.hero, #topoHero.hero, .hero {
  background: linear-gradient(180deg, var(--surface-tint) 0%, var(--surface) 100%);
  min-height: calc(85vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(68px, 12vh, 128px) !important;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  right: -140px;
  top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--ciano) 15%, transparent), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--ciano-soft);
  border: 1px solid color-mix(in srgb, var(--ciano) 25%, transparent);
  color: var(--petroleo);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .badge {
    padding: 4px 10px;
    font-size: 11px;
    gap: 6px;
    white-space: nowrap;
  }
  .badge i {
    width: 6px;
    height: 6px;
  }
  .turno-btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
}

.badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ciano);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0.35; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.source-tag.live {
  color: var(--petroleo);
  border-color: var(--line-strong);
}

.source-tag.sim {
  color: var(--serie-b);
  border-color: var(--serie-b-soft);
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 24ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--petroleo);
}

.hero .lead {
  font-size: 19px;
  line-height: 1.68;
  max-width: 62ch;
  margin-top: 18px;
  margin-bottom: 0;
  color: var(--ink-body);
}

/* Ações e Destaques da Home */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--petroleo);
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px rgba(14, 116, 144, 0.28);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(14, 116, 144, 0.38);
  background: var(--petroleo-deep);
  color: #ffffff !important;
}

.hero-cta-btn svg {
  transition: transform 0.2s ease;
}

.hero-cta-btn:hover svg {
  transform: translateY(2px);
}

.hero-quick-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-card);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hero-pill-item svg {
  color: var(--petroleo);
}

[data-theme="dark"] .hero-cta-btn {
  background: var(--ciano);
  color: #061218 !important;
  box-shadow: 0 4px 18px rgba(34, 211, 238, 0.25);
}

[data-theme="dark"] .hero-cta-btn:hover {
  background: #67e8f9;
  color: #061218 !important;
}



/* ==========================================================================
   Placar Bipolar do Presidente (.board)
   ========================================================================== */

.board {
  margin-top: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: grid;
  gap: 24px;
  box-shadow: var(--shadow-card);
}

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.cand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 4px;
}

.cand.right {
  text-align: right;
  align-items: flex-end;
}

.cand-badge-wrap {
  display: flex;
  min-height: 20px;
}

.cand.right .cand-badge-wrap {
  justify-content: flex-end;
}

.cand-status-pill {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.cand-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cand.right .cand-meta-row {
  flex-direction: row-reverse;
}

.cand-photo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-strong);
  flex-shrink: 0;
}

.cand-bio {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cand.right .cand-bio {
  text-align: right;
}

.cand .name {
  font-size: clamp(19px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.cand .party {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.3;
}

.cand-score {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.cand.right .cand-score {
  align-items: flex-end;
}

.cand .pct {
  font-family: var(--font-sans) !important;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.cand.a .pct { color: var(--serie-a); }
.cand.b .pct { color: var(--serie-b); }

.cand .votes {
  font-family: var(--font-sans) !important;
  font-size: clamp(13px, 1.4vw, 15px);
  color: var(--ink-body);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Barra Bipolar */
.bar-container {
  display: grid;
  gap: 8px;
}

.bar {
  position: relative;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--serie-neutra);
  overflow: hidden;
  display: flex;
}

.bar span {
  display: block;
  height: 100%;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar .a { background: var(--serie-a); }
.bar .b { background: var(--serie-b); margin-left: auto; }

.bar-mid {
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--ink);
  opacity: 0.6;
}

.bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Grid de Estatísticas */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

.stat {
  background: var(--surface-card);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat b {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat small {
  font-size: 13px;
  color: var(--ink-body);
}

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { padding: var(--space-3); }
}

@media (max-width: 520px) {
  .cand-photo { width: 44px; height: 44px; }
  .cand-meta-row { gap: 8px; }
  .cand .name { font-size: 16px; }
  .cand .party { font-size: 11px; }
  .cand .pct { font-size: clamp(1.6rem, 6.5vw, 2.4rem); }
  .cand .votes { font-size: 12.5px; }
  .cand-status-pill { font-size: 9.5px; }
  .duo { gap: 10px; }
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 19px; }
}

/* ==========================================================================
   Seções em Faixas Alternadas (Band)
   ========================================================================== */

section.band, section[id]:not(.hero), .band[id] {
  padding-block: var(--space-6);
  scroll-margin-top: 80px;
}

/* Seção Mapa — espaçamento dedicado para descer e deixar a Home em destaque */
#mapa {
  padding-top: clamp(64px, 10vh, 104px) !important;
  scroll-margin-top: 76px;
}

section.band.tint {
  background: var(--surface-tint);
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.sec-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.sec-head p {
  max-width: 62ch;
  margin-top: 8px;
  color: var(--ink-body);
}

/* ==========================================================================
   Mapa Interativo & Card de Estado
   ========================================================================== */

.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.map-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (max-width: 960px) {
  .map-grid { grid-template-columns: 1fr; }
  .state-card {
    position: static !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }
  .map-box.is-zoomed .crumbs {
    gap: 8px;
  }
  .map-box.is-zoomed .crumb-btn {
    visibility: visible;
    width: auto;
    max-width: 95px;
    padding: 3px 10px !important;
    gap: 6px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    background: var(--surface-tint);
    color: var(--petroleo);
    border: 1px solid var(--line-strong) !important;
    border-radius: 6px;
  }
}

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  gap: 4px;
}

section.tint .seg {
  background: var(--surface);
}

.seg button, button.seg {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  vertical-align: middle;
  font: 600 14px var(--font-sans);
  color: var(--ink-body);
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seg button:hover:not([aria-pressed="true"]) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  transform: translateY(-1px);
}

[data-theme="light"] .seg button:hover:not([aria-pressed="true"]) {
  background: rgba(14, 116, 144, 0.08);
  color: var(--ink);
}

.seg button[aria-pressed="true"] {
  background: var(--petroleo);
  color: var(--on-petroleo);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35);
}

.seg button[aria-pressed="true"]:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.seg button:active {
  transform: translateY(0);
}

/* No mobile: Grid 4 colunas específico para as 4 opções do Mapa (#mapa .seg) */
@media (max-width: 640px) {
  .sec-head {
    gap: 12px;
  }
  #mapa .seg, #tabPanelMapa .seg, .map-seg-controls {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    padding: 4px !important;
    gap: 4px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  #mapa .seg button, #tabPanelMapa .seg button, .map-seg-controls button {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px 6px !important;
    min-height: 38px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-align: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  #mapa .seg button {
    padding: 6px 1px !important;
    font-size: 10.5px !important;
  }
  #deputados .dep-full-label {
    display: none;
  }
  #deputados .seg button {
    padding: 7px 4px !important;
    font-size: 12px !important;
  }
}

.map-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 100% at 50% 50%, #ffffff, #f0f9fb 58%, #e1f0f5);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  height: 580px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .map-box {
  background: radial-gradient(110% 90% at 55% 50%, #0f2834, #0a1d25 58%, #061318);
  border-color: var(--line);
}

.map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.map-canvas:active,
.map-canvas.is-dragging {
  cursor: grabbing !important;
}

@media (max-width: 768px) {
  .map-box {
    height: 440px !important;
  }
}

@media (max-width: 480px) {
  .map-box {
    height: 380px !important;
  }
}

/* Barra superior de controles e migalhas de pão */
.maptop {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

/* Oculto na visão nacional! Só surge quando um estado for clicado / aproximado */
.crumbs {
  display: none !important;
  align-items: center;
  gap: 0;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  pointer-events: auto;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.map-box.is-zoomed .crumbs {
  display: inline-flex !important;
}

.crumb-target {
  color: var(--ink);
  font-weight: 700;
}

/* A seta de voltar SÓ aparece quando o mouse está sobre o mapa, sem deixar nenhum espaço fantasma */
.crumb-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 0;
  max-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  transform: translateX(-4px);
  color: var(--petroleo);
  font-size: 12px;
  font-weight: 700;
  transition: max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              padding 0.2s ease,
              gap 0.2s ease,
              visibility 0.2s,
              transform 0.25s ease,
              background 0.15s ease,
              color 0.15s ease,
              border-color 0.15s ease;
}

.crumb-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.crumb-btn span {
  color: currentColor;
  font-weight: 700;
}

.map-box.is-zoomed .crumbs {
  gap: 8px;
}

.map-box.is-zoomed .crumb-btn {
  visibility: visible;
  width: auto;
  max-width: 95px;
  padding: 3px 10px !important;
  gap: 6px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  background: var(--surface-tint);
  color: var(--petroleo);
  border: 1px solid var(--line-strong) !important;
  border-radius: 6px;
}

.map-box.is-zoomed:hover .crumb-btn:hover,
.crumb-btn:hover {
  background: var(--petroleo) !important;
  color: #ffffff !important;
  border-color: var(--petroleo) !important;
}

.map-box.is-zoomed:hover .crumb-btn:hover svg,
.map-box.is-zoomed:hover .crumb-btn:hover span {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.zoomctl {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 3px;
  border-radius: 100px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  pointer-events: auto;
  box-shadow: var(--shadow-card);
}

.zoomctl button {
  all: unset;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 100px;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.zoomctl button:hover {
  background: var(--surface-tint);
  color: var(--ink);
}

.zoomctl button:focus-visible {
  outline: 2px solid var(--ciano);
}

/* Popover de Município no Hover integrado ao Design System EBIA */
.townpill {
  position: absolute;
  z-index: 50;
  min-width: 270px;
  max-width: 300px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  color: var(--ink);
  pointer-events: none !important;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.08s ease-out;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-theme="dark"] .townpill {
  background: var(--surface-card);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.townpill.visible {
  opacity: 1;
}

.tp-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tp-uf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--petroleo);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  padding: 4px 7px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.tp-title-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tp-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.tp-sub {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.tp-cands {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tp-cand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tp-cand-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-cand-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.tp-cand-meta {
  display: flex;
  flex-direction: column;
}

.tp-cand-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.tp-cand-party {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tp-cand-pct {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.tp-hist {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}

.tp-hist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
}

.tp-hist-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-body);
}

.tp-hist-tag i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.tp-var-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 11px;
}

.tp-var-row .val {
  color: var(--ink);
  font-weight: 600;
}

.legend {
  display: flex;
  align-items: center;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  font-size: 12px;
  color: var(--ink-body);
}

.legend .leg-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  width: 100%;
}

.legend .leg-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.legend .leg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.legend .leg-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.legend .leg-status {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

.legend .ramp {
  display: inline-flex;
  gap: 2px;
}

.legend .ramp i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.legend .sw {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend .chip {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* Card das Apurações integrado ao Design System EBIA */
.state-card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 580px;
  min-height: 580px;
  max-height: 580px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-card);
  color: var(--ink-body);
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.sc-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sc-back-link {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--petroleo);
  transition: color 0.15s ease;
}

.sc-back-link:hover {
  color: var(--ciano);
  text-decoration: underline;
}

.sc-close-btn {
  all: unset;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--ink-muted);
  transition: all 0.15s ease;
}

.sc-close-btn:hover {
  color: var(--ink);
  background: var(--surface-tint);
}

.sc-city-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sc-flag-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
  background: var(--surface-tint);
  box-shadow: 0 2px 8px rgba(10, 46, 60, 0.08);
}

.sc-flag-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sc-city-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-family: var(--font-sans);
}

.sc-city-subtitle {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.sc-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.sc-status-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.sc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--ciano-soft);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--petroleo);
}

.sc-status-pill .dot {
  color: #16a34a;
  font-size: 10px;
}

.sc-sections-note {
  font-size: 12px;
  color: var(--ink-muted);
}

.sc-cands-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-cand-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sc-cand-card:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.sc-cand-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sc-cand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-cand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}

.sc-cand-meta {
  display: flex;
  flex-direction: column;
}

.sc-cand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.sc-cand-party {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sc-cand-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sc-cand-pct {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.sc-cand-votes {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.sc-cand-bar {
  height: 4px;
  border-radius: 100px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.sc-cand-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
}

.sc-kpis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.sc-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-kpi-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.sc-kpi-val {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.sc-state-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: var(--surface-tint);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.15s ease;
}

.sc-state-btn:hover {
  background: var(--petroleo);
  color: #ffffff;
  border-color: var(--petroleo);
}

.sc-muni-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  width: 100%;
  box-sizing: border-box;
}

.sc-muni-back-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--line);
  background: var(--surface-tint);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.sc-muni-back-btn:hover {
  background: var(--petroleo);
  color: #ffffff;
  border-color: var(--petroleo);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.sc-muni-back-btn:active {
  transform: translateY(0);
}

.sc-muni-back-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sc-muni-back-btn:hover svg {
  transform: translateX(-3px);
}

.state-card::-webkit-scrollbar,
.sc-cities-list::-webkit-scrollbar {
  width: 6px;
}

.state-card::-webkit-scrollbar-track,
.sc-cities-list::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}

.state-card::-webkit-scrollbar-thumb,
.sc-cities-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.state-card::-webkit-scrollbar-thumb:hover,
.sc-cities-list::-webkit-scrollbar-thumb:hover {
  background: var(--petroleo);
}

.state-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.state-card .uf {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
}

.sc-region-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--ciano-soft);
  color: var(--petroleo);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
}

.sc-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--surface-tint);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  border: 1px solid var(--line);
}

.sc-meta-item {
  display: flex;
  flex-direction: column;
}

.sc-meta-item .lbl {
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sc-meta-item .val {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}

.sc-sen-list {
  display: grid;
  gap: 6px;
}

.sc-sen-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  font-size: 13px;
}

.sc-block {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sc-cities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.sc-city-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sc-city-row:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transform: translateX(2px);
}

.sc-city-row .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}

.sc-city-row .head b {
  color: var(--ink);
  font-weight: 700;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.row .who {
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.row .who small {
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 12px;
  margin-left: 6px;
}

.mini {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--serie-neutra);
  overflow: hidden;
  grid-column: 1 / -1;
}

.mini span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.5s ease-out;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill.ok {
  background: var(--ciano-soft);
  color: var(--petroleo);
}

.pill.run {
  background: var(--serie-b-soft);
  color: var(--ink);
}

.hint {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ==========================================================================
   Governadores — 6 Estados em 2º Turno
   ========================================================================== */

.runoff {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: var(--space-5);
}

@media (max-width: 520px) {
  .runoff { grid-template-columns: 1fr; }
}

.ro-card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.ro-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.ro-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ro-head h4 {
  font-size: 18px;
  font-weight: 700;
}

.ro-cands {
  display: grid;
  gap: 10px;
}

.ro-cand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.ro-cand .name {
  font-weight: 700;
  color: var(--ink);
}

.ro-cand .party {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 600;
  margin-left: 6px;
}

.ro-cand .pct {
  font-size: 18px;
  font-weight: 800;
}

.ro-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.btn-inspect {
  border: 0;
  background: transparent;
  color: var(--petroleo);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.btn-inspect:hover {
  background: var(--ciano-soft);
}

/* Grid de Governadores Eleitos no 1º Turno */
.gov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.gov {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gov:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.gov .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.gov .st {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.gov .gname {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.gov .gname small {
  color: var(--ink-muted);
  font-weight: 600;
}

.gov .gpct {
  font-size: 14px;
}

/* ==========================================================================
   Tabela Presidente — 1º Turno
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-tint);
}

tr:last-child td {
  border-bottom: 0;
}

td.r, th.r {
  text-align: right;
}

td .cn {
  font-weight: 700;
  color: var(--ink);
}

td .tag {
  margin-left: 8px;
}

.pbar {
  display: inline-block;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--petroleo);
  vertical-align: middle;
}

/* ==========================================================================
   Senado Federal — 54 Vagas Eleitas
   ========================================================================== */

.sen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: var(--space-5);
  align-items: start;
}

@media (max-width: 900px) {
  .sen-grid { grid-template-columns: 1fr; }
}

.parties {
  display: grid;
  gap: 10px;
}

.prow {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.prow .pn {
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
}

.prow .track {
  height: 22px;
  border-radius: 6px;
  background: var(--surface-tint);
  overflow: hidden;
}

section.tint .prow .track {
  background: var(--surface);
}

.prow .fill {
  height: 100%;
  background: var(--petroleo);
  border-radius: 6px;
}

.prow .pv {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.seats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.seats i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--serie-neutra);
  transition: transform 0.15s ease;
}

.seats i.pl {
  background: var(--petroleo);
}

.sen-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 24px;
  border-top: 1px solid var(--line);
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.sen-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.sen-item .st {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 12px;
  padding-top: 2px;
}

.sen-item b {
  color: var(--ink);
  font-weight: 700;
}

.sen-item small {
  color: var(--ink-muted);
  font-weight: 600;
}

.filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter input {
  font: 500 15px var(--font-sans);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  width: min(340px, 100%);
}

.filter input::placeholder {
  color: var(--ink-muted);
}

/* ==========================================================================
   Câmara dos Deputados & Assembleias Legislativas (#deputados)
   ========================================================================== */

#deputados {
  scroll-margin-top: 80px;
}

.dep-sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
  gap: var(--space-5);
  align-items: start;
}

@media (max-width: 960px) {
  .dep-sec-grid {
    grid-template-columns: 1fr;
  }
}

.dep-sec-left {
  display: grid;
  gap: var(--space-4);
}

.dep-sec-right {
  display: grid;
  gap: var(--space-4);
}

.dep-sec-card {
  background: var(--surface-card, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#deputados .seg {
  display: flex !important;
  width: 100% !important;
  max-width: 440px !important;
  padding: 4px !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  gap: 4px !important;
  box-sizing: border-box !important;
}

#deputados .seg button {
  flex: 1 1 50% !important;
  width: 50% !important;
  min-width: 0 !important;
  padding: 8px 10px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  text-align: center !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
}

@media (max-width: 440px) {
  #deputados .seg {
    max-width: 100% !important;
    padding: 3px !important;
    gap: 3px !important;
  }
  #deputados .seg button {
    padding: 7px 4px !important;
    font-size: 12px !important;
  }
  #deputados .dep-full-label {
    display: none !important;
  }
}

.dep-sec-blocs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dep-blocs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.dep-blocs-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin-top: 2px;
  letter-spacing: -0.01em;
}

.dep-quorum-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dep-quorum-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-body);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dep-quorum-pill b {
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dep-quorum-pill.spec {
  border-color: rgba(14, 116, 144, 0.4);
  background: rgba(14, 116, 144, 0.08);
  color: var(--petroleo);
}

[data-theme="dark"] .dep-quorum-pill.spec {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

.dep-blocs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .dep-blocs-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.dep-bloc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.dep-bloc-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.dep-bloc-card.featured {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
}

.dep-bloc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dep-bloc-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dep-bloc-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.bloc-left .dep-bloc-tag .dot { background: #dc2626; }
.bloc-center .dep-bloc-tag .dot { background: #f59e0b; }
.bloc-right .dep-bloc-tag .dot { background: #2563eb; }

.dep-bloc-pct {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-muted);
}

.dep-bloc-badge-featured {
  font-size: 9.5px;
  font-weight: 800;
  color: #b45309;
  background: rgba(245, 158, 11, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

[data-theme="dark"] .dep-bloc-badge-featured {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.25);
}

.dep-bloc-val {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.dep-bloc-val small {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.dep-bloc-partidos {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.35;
}

/* Barra Segmentada de Espectro */
.dep-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
  padding-top: 4px;
}

.dep-spectrum-bar {
  position: relative;
  height: 14px;
  border-radius: 100px;
  overflow: visible;
  display: flex;
  background: var(--line);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dep-spectrum-bar .spec-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.dep-spectrum-bar .seg-left {
  background: #dc2626;
  border-top-left-radius: 100px;
  border-bottom-left-radius: 100px;
}

.dep-spectrum-bar .seg-center {
  background: #f59e0b;
}

.dep-spectrum-bar .seg-right {
  background: #2563eb;
  border-top-right-radius: 100px;
  border-bottom-right-radius: 100px;
}

/* Marcadores verticais de Quórum (257 e 308) */
.quorum-marker {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  background: #ffffff;
  z-index: 3;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.marker-flag {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  line-height: 1.1;
}

.marker-flag::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 3px 3px 0 3px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.dep-bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-muted);
  padding: 0 2px;
}

.dep-bar-legend b {
  color: var(--ink);
}

.dep-balance-insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(14, 116, 144, 0.08);
  border: 1px solid rgba(14, 116, 144, 0.2);
}

.dep-balance-insight .insight-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-globe-svg {
  color: var(--petroleo);
  flex-shrink: 0;
}

[data-theme="dark"] .sc-globe-svg {
  color: #38bdf8;
}

.dep-balance-insight p {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}

.dep-sec-hemi {
  display: grid;
  gap: 16px;
}

.dep-sec-card-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.dep-sec-card-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.dep-sec-card-title .badge-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.dep-hemi-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: var(--surface-tint);
  border-radius: var(--radius-md, 8px);
  padding: 12px 10px 8px 10px;
  border: 1px solid var(--line);
}

.dep-hemi-svg-main {
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
}

.dep-hemi-dot {
  cursor: pointer;
  transition: transform 0.15s ease, r 0.15s ease;
}

.dep-hemi-dot:hover {
  transform: scale(1.4);
  transform-origin: center;
  stroke: #ffffff;
  stroke-width: 0.8px;
}

.dep-hemi-main-cnt {
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 800;
  fill: var(--ink);
}

.dep-hemi-main-lbl {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 700;
  fill: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dep-hemi-footer-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

.dep-hemi-footer-meta b {
  color: var(--ink);
}

.dep-parties-head {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.dep-parties-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.dep-party-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) 75px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.dep-party-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dep-party-tag i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dep-party-bar-track {
  height: 14px;
  border-radius: 4px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  overflow: hidden;
}

.dep-party-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.dep-party-count {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}

.dep-party-count small {
  color: var(--ink-muted);
}

/* Assembleias Highlights */
.dep-est-summary-card {
  display: grid;
  gap: 12px;
}

.dep-est-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-body);
  margin: 0;
}

.dep-est-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dep-est-stat {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 6px);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dep-est-stat b {
  font-size: 20px;
  font-family: var(--font-mono);
  color: var(--ink);
}

.dep-est-stat small {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.3;
}

/* Coluna Direita: Filtros e Candidatos */
.dep-filters-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .dep-filters-bar {
    grid-template-columns: 1fr;
  }
}

.dep-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm, 6px);
  padding: 0 10px;
  margin-top: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dep-search-box:focus-within {
  border-color: var(--petroleo);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.dep-search-box svg {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.dep-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 8px 0;
  font: 500 14px var(--font-sans);
  color: var(--ink);
  outline: none;
}

.dep-select-uf {
  margin-top: 4px;
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  color: var(--ink);
  font: 600 14px var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.dep-select-uf:focus {
  border-color: var(--petroleo);
}

.dep-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 12px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.dep-results-meta .num {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  font-size: 12px;
}

/* Grid de Cards de Candidatos */
.dep-cands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
}

.dep-sec-cand-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dep-sec-cand-card:hover {
  transform: translateY(-2px);
  border-color: var(--petroleo);
  box-shadow: 0 4px 12px rgba(10, 46, 60, 0.08);
}

.dep-cand-avatar-box {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface-tint);
  border: 1.5px solid var(--line);
}

.dep-sec-cand-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.dep-cand-rank-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--petroleo-deep, #0e7490);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.2;
}

.dep-sec-cand-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.dep-cand-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.dep-cand-nome {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dep-cand-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.dep-tag-partido {
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
}

.dep-tag-numero {
  font-family: var(--font-mono);
  color: var(--ink-muted);
  font-weight: 600;
}

.dep-tag-uf {
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--petroleo-deep);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
}

.dep-cand-vote-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.dep-vote-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.dep-vote-lbl {
  font-size: 11px;
  color: var(--ink-muted);
}

.dep-badge-eleito {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #15803d;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.dep-badge-suplente {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.dep-pagination-wrap {
  display: flex;
  justify-content: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.btn-load-more {
  background: var(--surface);
  border: 1.5px solid var(--petroleo);
  color: var(--petroleo);
  font: 700 13px var(--font-sans);
  padding: 8px 18px;
  border-radius: var(--radius-pill, 9999px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-load-more:hover {
  background: var(--petroleo);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 116, 144, 0.2);
}

.dep-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-muted);
  font-size: 14px;
}

/* Link dentro do sidebar card do mapa */
.dep-link-to-sec {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--petroleo);
  text-decoration: none;
  padding: 6px;
  border-radius: 6px;
  background: var(--surface-tint);
  border: 1px dashed var(--line-strong);
  transition: all 0.15s ease;
}

.dep-link-to-sec:hover {
  background: var(--surface);
  border-style: solid;
  color: var(--petroleo-deep);
}

/* ==========================================================================
   Votos no Exterior — Regiões e Países
   ========================================================================== */

.ext-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
}

@media (max-width: 900px) {
  .ext-grid { grid-template-columns: 1fr; }
}

.region {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.region:first-child {
  padding-top: 0;
}

.region .rh {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  color: var(--ink);
}

.split {
  height: 14px;
  border-radius: var(--radius-pill);
  display: flex;
  overflow: hidden;
  background: var(--serie-neutra);
}

.split .a { background: var(--serie-a); }
.split .b { background: var(--serie-b); }

.split-l {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  gap: 12px;
}

.big-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bp {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: grid;
  gap: 4px;
  box-shadow: var(--shadow-card);
}

.bp .pct {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.bp.a .pct { color: var(--serie-a); }
.bp.b .pct { color: var(--serie-b); }
.bp .who { font-weight: 700; color: var(--ink); }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.fact {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-tint);
  display: grid;
}

section.tint .fact {
  background: var(--surface);
}

.fact b {
  font-size: 22px;
  color: var(--ink);
  font-weight: 800;
}

.fact small {
  font-size: 13px;
}

/* ==========================================================================
   Controles de Alternância de Turno
   ========================================================================== */

.turno-badge-group {
  display: inline-flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  gap: 3px;
}

.turno-btn {
  border: 0;
  background: transparent;
  color: var(--ink-body);
  font: 700 13px var(--font-sans);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.turno-btn[aria-pressed="true"] {
  background: var(--petroleo);
  color: var(--on-petroleo);
  box-shadow: var(--shadow-button);
}

/* ==========================================================================
   Rodapé
   ========================================================================== */

footer {
  background: var(--foot-bg, transparent);
  color: var(--text, var(--foot-fg));
  padding-block: 28px 36px;
}

footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--space-5);
}

@media (max-width: 800px) {
  footer .wrap { grid-template-columns: 1fr; }
}

footer .fbrand {
  margin-bottom: 10px;
}

.fbrand-logo {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

footer p {
  color: var(--foot-muted);
  font-size: 14px;
  margin-top: 10px;
  max-width: 52ch;
}

footer h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--foot-muted);
}

footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 14px;
}

footer a {
  color: var(--foot-fg);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

footer a:hover {
  color: #ffffff !important;
  border-bottom-color: var(--ciano);
  text-decoration: none;
}

footer .lic {
  font-size: 12px;
  margin-top: 16px;
  color: var(--foot-muted);
}

/* ==========================================================================
   EBIA - Card Original de Regiões (Imagem 1) e Card do Estado (Imagem 2)
   ========================================================================== */

/* --- Card por Regiões (Nível 0 / Padrão Nacional) --- */
.sc-reg-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-reg-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 4px;
}

.sc-reg-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.sc-reg-sub {
  font-size: 13px;
  color: var(--ink-muted);
}

.sc-reg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-reg-row {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.sc-reg-row:hover {
  background: var(--surface-tint);
}

.sc-reg-name-col {
  display: flex;
  flex-direction: column;
  width: 106px;
  flex: 0 0 106px;
  min-width: 106px;
  max-width: 106px;
  overflow: hidden;
}

.sc-reg-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
}

.sc-reg-pct-sec {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 1px;
}

.sc-reg-cand-col {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 154px;
  flex: 0 0 154px;
  margin-left: 6px;
}

.sc-reg-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex: 0 0 28px;
}

.sc-reg-party {
  font-size: 13px;
  font-weight: 800;
  width: 22px;
  flex: 0 0 22px;
  text-align: left;
}

.sc-reg-lead-pct {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  width: 48px;
  flex: 0 0 48px;
  text-align: right;
  letter-spacing: -0.2px;
}

.sc-reg-diff {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  width: 32px;
  flex: 0 0 32px;
  text-align: right;
}

.sc-reg-bar-col {
  flex: 1 1 50px;
  min-width: 44px;
  margin-left: 10px;
  margin-right: 2px;
}

.sc-reg-bar-track {
  position: relative;
  height: 6px;
  background: rgba(120, 140, 160, 0.25);
  border-radius: 100px;
}

.sc-reg-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 100px;
}

.sc-reg-bar-tick {
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #ffffff;
  border-radius: 1px;
  z-index: 2;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.sc-reg-exterior-box {
  margin-top: 6px;
  padding: 8px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-tint);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.sc-reg-exterior-box:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

@media (max-width: 400px) {
  .sc-reg-name-col {
    width: 94px;
    flex: 0 0 94px;
    min-width: 94px;
    max-width: 94px;
  }
  .sc-reg-name {
    font-size: 13.5px;
  }
  .sc-reg-cand-col {
    width: 142px;
    flex: 0 0 142px;
    gap: 6px;
    margin-left: 4px;
  }
  .sc-reg-av {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
  }
  .sc-reg-lead-pct {
    font-size: 13.5px;
    width: 44px;
    flex: 0 0 44px;
  }
  .sc-reg-diff {
    font-size: 10.5px;
    width: 30px;
    flex: 0 0 30px;
  }
  .sc-reg-bar-col {
    min-width: 36px;
    margin-left: 6px;
  }
}

@media (max-width: 380px) {
  .sc-reg-name-col {
    width: 76px;
    flex: 0 0 76px;
    min-width: 76px;
    max-width: 76px;
  }
  .sc-reg-name {
    font-size: 12.5px;
  }
  .sc-reg-cand-col {
    width: 120px;
    flex: 0 0 120px;
    gap: 4px;
    margin-left: 2px;
  }
  .sc-reg-av {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }
  .sc-reg-lead-pct {
    font-size: 12px;
    width: 38px;
    flex: 0 0 38px;
  }
  .sc-reg-diff {
    font-size: 10px;
    width: 26px;
    flex: 0 0 26px;
  }
  .sc-reg-bar-col {
    min-width: 24px;
    margin-left: 4px;
  }
}

/* --- Card do Estado (Nível 1 - Imagem 2) --- */
.sc-state-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-state-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sc-state-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sc-state-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sc-state-subtitle {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.sc-state-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-nav-btn {
  all: unset;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  background: var(--surface-tint);
  transition: all 0.15s ease;
}

.sc-nav-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface);
  transform: scale(1.06);
}

.sc-sec-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.sc-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sc-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.sc-sec-hint {
  font-size: 12px;
  color: var(--ink-muted);
}

.sc-badge-eleito {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(120, 140, 160, 0.18);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.sc-badge-eleito .dot {
  color: #ffffff;
  font-size: 8px;
}

.sc-cand-row-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.sc-cand-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-cand-av-lg {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}

.sc-cand-names-box {
  display: flex;
  flex-direction: column;
}

.sc-cand-h-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.sc-cand-h-party {
  font-size: 12px;
  font-weight: 700;
}

.sc-cand-row-pct {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
}

/* Subseção Governador DUO */
.sc-gov-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.sc-gov-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-gov-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.sc-gov-duo-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-gov-right .sc-gov-duo-head {
  flex-direction: row-reverse;
}

.sc-gov-big-pct {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.sc-gov-big-pct sup {
  font-size: 14px;
  font-weight: 700;
  margin-left: 1px;
}

.sc-dual-bar {
  position: relative;
  height: 6px;
  border-radius: 100px;
  background: var(--line);
  overflow: hidden;
  display: flex;
  margin: 6px 0 10px 0;
}

.sc-dual-bar-tick {
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #ffffff;
  border-radius: 1px;
  z-index: 2;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}

.sc-anulado-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12px;
}

.sc-anulado-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
}

.sc-anulado-av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  filter: grayscale(100%);
  opacity: 0.65;
  border: 1px solid var(--line);
}

.sc-badge-anulado {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-weight: 600;
}

.sc-link-expand {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: underline;
  margin-top: 4px;
  display: inline-block;
  transition: color 0.15s ease;
}

.sc-link-expand:hover {
  color: var(--petroleo);
}

/* ==========================================================================
   EBIA — Aba "Mais Candidatos" (Presidente / Governador / Senado)
   ========================================================================== */
.sc-more-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sc-more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.sc-more-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
}

.sc-more-back {
  all: unset;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.sc-more-back:hover {
  color: var(--petroleo);
}

.sc-more-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.sc-more-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sc-more-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
  background: var(--surface-tint);
}

.sc-more-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sc-more-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-more-party {
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.sc-more-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.sc-more-pct {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.sc-more-votes {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.2;
  margin-top: 1px;
}

/* ==========================================================================
   EBIA — Camada de Sobreposição do Mapa (Map Overlay Bubbles & Badges)
   ========================================================================== */
.map-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.map-cand-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.map-cand-bubble:hover {
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 30;
}

.map-cand-bubble .bubble-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-cand-bubble .bubble-avatars img:nth-child(2) {
  margin-left: -8px;
}

.map-cand-bubble .bubble-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  background: var(--surface-card);
}

.map-cand-bubble .bubble-badge {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 9999px;
  margin-top: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.map-cand-bubble .bubble-badge.uncolored {
  background: #475569 !important;
  color: #cbd5e1;
}

/* ==========================================================================
   EBIA — Card Lateral: Governadores (GovernorsModule Sidebar)
   ========================================================================== */
.gov-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gov-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.gov-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.gov-card-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.gov-card-badge {
  font-size: 12px;
  color: var(--ink-muted);
}

.gov-uf-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
}

.gov-uf-btn {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  text-align: center;
}

.gov-uf-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.gov-uf-btn.active {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.gov-dispute-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.gov-dispute-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.gov-dispute-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gov-nav-arrow {
  all: unset;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  padding: 0 4px;
}

.gov-nav-arrow:hover:not(:disabled) {
  color: var(--ink);
}

.gov-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gov-nav-page {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.gov-dispute-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.gov-disp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface-tint);
  cursor: pointer;
  transition: background 0.15s ease;
}

.gov-disp-row:hover {
  background: var(--line-strong);
}

.gov-disp-badge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
}

.gov-disp-uf-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
}

.gov-disp-status {
  font-size: 9px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.gov-disp-cands-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.gov-cand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gov-cand-ident {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.gov-cand-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.gov-cand-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gov-cand-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   EBIA — Card Lateral: Senado Federal (SenateModule Sidebar)
   ========================================================================== */
.sen-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sen-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sen-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.sen-card-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.sen-balance-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-tint);
}

.sen-balance-numbers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-body);
}

.sen-balance-numbers .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}

.sen-balance-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--line);
}

.sen-balance-bar .bar-left { background: #dc2626; }
.sen-balance-bar .bar-center { background: #a3967d; }
.sen-balance-bar .bar-right { background: #1e3a8a; }

.sen-balance-sub {
  font-size: 10px;
  color: var(--ink-muted);
}

.sen-hemi-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.sen-hemi-svg {
  width: 100%;
  max-width: 250px;
  height: auto;
}

.sen-hemi-cnt {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  fill: var(--ink);
}

.sen-hemi-lbl {
  font-family: var(--font-sans);
  font-size: 10px;
  fill: var(--ink-muted);
}

.sen-hemi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
}

.sen-leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--ink-muted);
}

.sen-leg-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.sen-grid-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-top: 4px;
}

.sen-uf-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
}

.sen-uf-btn {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  text-align: center;
}

.sen-uf-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.sen-uf-btn.active {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.sen-dispute-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.sen-dispute-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.sen-dispute-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sen-nav-arrow {
  all: unset;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  padding: 0 4px;
}

.sen-nav-arrow:hover:not(:disabled) {
  color: var(--ink);
}

.sen-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sen-nav-page {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.sen-dispute-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.sen-disp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface-tint);
  cursor: pointer;
  transition: background 0.15s ease;
}

.sen-disp-row:hover {
  background: var(--line-strong);
}

.sen-disp-badge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
}

.sen-disp-uf-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  background: #dc2626;
}

.sen-disp-status {
  font-size: 9px;
  color: var(--ink-muted);
}

.sen-disp-cands-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.sen-cand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sen-cand-ident {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sen-cand-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.sen-cand-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sen-cand-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   EBIA — Card Lateral: Câmara dos Deputados (DeputiesModule Sidebar)
   ========================================================================== */
.dep-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dep-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dep-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.dep-subtitle {
  font-size: 12px;
  color: var(--ink-muted);
}

.dep-badge-total {
  font-size: 12px;
  color: var(--ink-muted);
}

.dep-clear-uf {
  all: unset;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: var(--petroleo);
  padding: 3px 8px;
  border-radius: 4px;
}

.dep-tabs {
  display: flex;
  gap: 6px;
}

.dep-tab-btn {
  all: unset;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--surface-tint);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-sizing: border-box;
}

.dep-tab-btn:hover:not(.active) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
  transform: translateY(-1px);
}

[data-theme="light"] .dep-tab-btn:hover:not(.active) {
  background: rgba(14, 116, 144, 0.08);
}

.dep-tab-btn.active {
  color: #ffffff !important;
  background: #0891b2 !important;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.dep-tab-btn.active:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.dep-tab-btn:active {
  transform: translateY(0);
}

.dep-balance-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-tint);
}

.dep-balance-numbers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-body);
}

.dep-balance-numbers .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}

.dep-balance-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--line);
}

.dep-balance-bar .bar-left { background: #dc2626; }
.dep-balance-bar .bar-center { background: #a3967d; }
.dep-balance-bar .bar-right { background: #1e3a8a; }

.dep-balance-sub {
  font-size: 10px;
  color: var(--ink-muted);
}

.dep-hemi-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.dep-hemi-svg {
  width: 100%;
  max-width: 270px;
  height: auto;
}

.dep-hemi-cnt {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  fill: var(--ink);
}

.dep-hemi-lbl {
  font-family: var(--font-sans);
  font-size: 10px;
  fill: var(--ink-muted);
}

.dep-hemi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
}

.dep-leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--ink-muted);
}

.dep-leg-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.dep-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.dep-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dep-rank-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.dep-rank-pct {
  font-size: 11px;
  color: var(--ink-muted);
}

.dep-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.dep-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--surface-tint);
}

.dep-rank-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-muted);
  width: 14px;
  text-align: center;
}

.dep-cand-avatar-wrap {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.dep-cand-av {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dep-cand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dep-cand-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dep-cand-meta {
  font-size: 10px;
  color: var(--ink-muted);
}

.dep-cand-votes {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.dep-vote-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.dep-badge-eleito {
  font-size: 9.5px;
  font-weight: 800;
  color: #ffffff !important;
  background: #15803d;
  padding: 1.5px 6px;
  border-radius: 4px;
  text-transform: lowercase;
  letter-spacing: 0.2px;
  display: inline-block;
  line-height: 1.2;
}

.dep-btn-more {
  all: unset;
  cursor: pointer;
  display: block;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.dep-btn-more:hover {
  background: var(--line-strong);
}

.dep-click-hint {
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
  margin: 0;
}

/* Modal de Busca Completa de Deputados */
.dep-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dep-modal-backdrop.visible {
  display: flex;
}

.dep-modal-content {
  background: var(--surface-card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.dep-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.dep-modal-head h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.dep-modal-head p {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.dep-modal-close {
  all: unset;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-muted);
  padding: 4px 8px;
  border-radius: 4px;
}

.dep-modal-close:hover {
  color: var(--ink);
  background: var(--surface-tint);
}

.dep-modal-filters {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.dep-search-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
}

.dep-uf-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.dep-modal-list {
  padding: 10px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

.dep-modal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-tint);
}

.dep-modal-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.dep-modal-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dep-modal-meta b {
  font-size: 13px;
  color: var(--ink);
}

.dep-modal-meta small {
  font-size: 11px;
  color: var(--ink-muted);
}

.dep-modal-votes {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.dep-modal-votes span {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}


/* ==========================================================================
   EBIA — Refinamentos de Hover de Botões e Bubbles Costeiras
   ========================================================================== */
.map-cand-bubble.callout-bubble {
  flex-direction: row;
  gap: 5px;
  transform: translate(0, -50%);
}

.map-cand-bubble.callout-bubble:hover {
  transform: translate(0, -50%) scale(1.15);
}

.map-cand-bubble.callout-bubble .bubble-badge {
  margin-top: 0;
}

.gov-uf-btn, .sen-uf-btn, .dep-uf-btn {
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.gov-uf-btn:hover, .sen-uf-btn:hover, .dep-uf-btn:hover {
  filter: brightness(1.22);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.gov-nav-arrow, .sen-nav-arrow, .sc-nav-btn {
  transition: all 0.18s ease;
}

.gov-nav-arrow:hover:not(:disabled), .sen-nav-arrow:hover:not(:disabled), .sc-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--ciano);
  border-color: var(--ciano);
  transform: scale(1.12);
}

.zoomctl button {
  transition: all 0.18s ease;
}

.zoomctl button:hover {
  background: var(--surface-card);
  color: var(--ciano);
  border-color: var(--ciano);
  transform: scale(1.08);
}

.crumb-btn {
  transition: all 0.18s ease;
}

.crumb-btn:hover {
  background: var(--surface-card);
  border-color: var(--ciano);
  color: var(--ciano);
  transform: translateY(-1px);
}

.sc-back-link {
  transition: all 0.18s ease;
}

.sc-back-link:hover {
  color: var(--ciano);
  transform: translateX(-2px);
}

.sc-close-btn {
  transition: all 0.18s ease;
}

.sc-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  transform: scale(1.15);
}

.sc-state-btn {
  transition: all 0.18s ease;
}

.sc-state-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.sc-more-back {
  transition: all 0.18s ease;
}

.sc-more-back:hover {
  border-color: var(--ciano);
  color: var(--ciano);
  transform: translateY(-1px);
}

.nav a {
  transition: all 0.18s ease;
}

.nav a:hover:not(.active) {
  color: var(--ciano);
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   EBIA — Auditoria de Responsividade Global (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 768px) {
  .hero h1 {
    font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  }
  .hero p.lead {
    font-size: 14.5px;
    line-height: 1.5;
  }
  .sec-head h2 {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
  }
  .sec-head p {
    font-size: 13.5px;
  }
  .townpill {
    max-width: calc(100vw - 32px);
    left: 16px !important;
  }
  .sen-item {
    font-size: 13px;
  }
  .dep-sec-card {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  section.hero, #topoHero.hero, .hero {
    min-height: auto !important;
    padding-block: 44px 36px !important;
  }
  .hero-actions {
    margin-top: 24px;
    gap: 12px;
  }
  .hero-cta-btn {
    width: 100%;
    justify-content: center;
  }
  .hero-quick-pills {
    width: 100%;
    gap: 8px;
  }
  .hero-pill-item {
    font-size: 12px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  section.hero, #topoHero.hero, .hero {
    padding-block: 36px 28px !important;
  }
  .board {
    padding: 14px;
    gap: 16px;
  }
  .cand img {
    width: 44px !important;
    height: 44px !important;
  }
  .cand .rotulo {
    font-size: 10.5px;
  }
  .cand .party {
    font-size: 11px;
  }
  .bar-mid {
    width: 2px;
  }
  .bar-legend {
    font-size: 11.5px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .gov-uf-btn, .sen-uf-btn, .dep-uf-btn {
    min-width: 26px;
    height: 24px;
    font-size: 10px;
  }
  .ro-card {
    padding: 12px;
  }
  .ro-head h4 {
    font-size: 15px;
  }
  .dep-cands-grid {
    grid-template-columns: 1fr;
    max-height: 480px;
  }
  .dep-sec-cand-card {
    padding: 8px 10px;
    gap: 10px;
  }
  .dep-cand-avatar-box {
    width: 44px;
    height: 44px;
  }
  .dep-cand-name-text {
    font-size: 13.5px;
  }
  .dep-cand-votes-text {
    font-size: 12px;
  }
  .sen-list {
    grid-template-columns: 1fr;
  }
  .prow {
    grid-template-columns: 85px minmax(0, 1fr) 28px;
    gap: 8px;
  }
  .prow .pn {
    font-size: 13px;
  }
  .prow .pv {
    font-size: 13px;
  }
  .ext-grid {
    grid-template-columns: 1fr;
  }
}

