:root {
  --verde: #0d6861;
  --verde-escuro: #08433e;
  --verde-hover: #094e49;
  --verde-claro: #eaf3f1;
  --ink: #111827;
  --txt: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --r: 12px;
  --cor-partido: #2e4a8e;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Header Topo */
.topo {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.topo-marca {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.topo-marca em {
  color: var(--verde);
  font-style: normal;
}

.nav-topo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-voltar {
  font-size: 13px;
  font-weight: 600;
  color: var(--verde);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--verde-claro);
  transition: all .15s ease;
}

.btn-voltar:hover {
  background: #d5e9e5;
  color: var(--verde-escuro);
}

/* Breadcrumbs bar */
.breadcrumbs-bar {
  max-width: 960px;
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumbs-bar a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.breadcrumbs-bar a:hover {
  color: var(--verde);
  text-decoration: underline;
}

.breadcrumbs-bar span {
  opacity: 0.6;
}

.breadcrumbs-bar .current {
  color: var(--ink);
  font-weight: 600;
}

/* Container Principal */
.container {
  max-width: 960px;
  margin: 20px auto 60px;
  padding: 0 20px;
}

/* Card Principal do Candidato */
.card-candidato {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Hero Header do Candidato */
.cand-hero {
  background: linear-gradient(to bottom, #ffffff, #fafbfb);
  border-bottom: 1px solid var(--line);
  padding: 36px 36px 28px;
  position: relative;
}

.cand-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--cor-partido), #0d6861);
}

.cand-header-flex {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 720px) {
  .cand-hero {
    padding: 24px 20px 20px;
  }
  .cand-header-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
}

/* Caixa da Foto Oficial */
.cand-foto-box {
  position: relative;
  width: 170px;
  height: 220px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 3px solid #ffffff;
  outline: 2px solid var(--line);
  background: #f3f4f6;
}

.cand-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge-status {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.status-eleito {
  background: #15803d;
  color: #ffffff;
}

.status-suplente {
  background: #b45309;
  color: #ffffff;
}

.status-outro {
  background: #4b5563;
  color: #ffffff;
}

/* Dados Principais do Candidato */
.cand-dados-principais {
  flex: 1;
  min-width: 0;
}

.tag-partido {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cand-nome-urna {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4.5vw, 38px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 4px;
}

.cand-nome-completo {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.cand-cargo-detalhe {
  font-size: 14px;
  font-weight: 600;
  color: var(--verde);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

/* Grid de Fatos Principais (KPIs) */
.cand-grid-fatos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 800px) {
  .cand-grid-fatos {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fato-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.fato-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.fato-valor {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fato-destaque {
  color: var(--verde);
  font-size: 16px;
}

/* Barra de Ações Rápidas */
.cand-action-bar {
  display: flex;
  gap: 10px;
  padding: 14px 36px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .cand-action-bar {
    padding: 12px 20px;
    justify-content: center;
  }
}

.btn-action-zap {
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .15s;
}

.btn-action-zap:hover {
  opacity: 0.9;
}

.btn-action-fb {
  background: #1877f2;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .15s;
}

.btn-action-fb:hover {
  opacity: 0.9;
}

.btn-action-link {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--txt);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}

.btn-action-link:hover {
  border-color: var(--verde);
  color: var(--verde);
}

/* Conteúdo Editorial do Candidato */
.cand-corpo-editorial {
  padding: 40px 48px;
}

@media (max-width: 640px) {
  .cand-corpo-editorial {
    padding: 24px 20px;
  }
}

.sec-bloco {
  margin-bottom: 36px;
}

.sec-bloco:last-of-type {
  margin-bottom: 24px;
}

.sec-bloco h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--cor-partido);
  line-height: 1.3;
}

.sec-bloco p {
  font-size: 15.5px;
  color: var(--txt);
  line-height: 1.8;
  margin-bottom: 16px;
}

.sec-bloco p:last-child {
  margin-bottom: 0;
}

/* Destaque Editorial Callout */
.callout-tse {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: #166534;
}

.callout-tse strong {
  display: block;
  font-size: 14px;
  color: #14532d;
  margin-bottom: 4px;
}

/* Seções de Clusters */
.cluster-secao {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-top: 32px;
}

.cluster-secao h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  border-left: none;
  padding-left: 0;
  margin-bottom: 8px;
}

.cluster-secao p {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

.cluster-links-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cluster-link {
  font-size: 13px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: #1f2937;
  font-weight: 600;
  transition: all .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.cluster-link:hover {
  border-color: var(--cor-partido);
  color: var(--cor-partido);
  background: #f9fafb;
  transform: translateY(-1px);
}

.cluster-link-reg {
  font-size: 13px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: #0369a1;
  font-weight: 700;
  transition: all .15s ease;
}

.cluster-link-reg:hover {
  background: #bae6fd;
  transform: translateY(-1px);
}

/* Rodapé com 7 Links Institucionais */
.nav-inst-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px 20px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  justify-content: center;
  font-size: 13px;
  margin-top: 50px;
}

.nav-inst-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.nav-inst-links a:hover {
  color: var(--verde);
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #ffffff;
}
