/* ================================================================
   estilo.css — Cartilha TRE-RN | Auditoria das Urnas | Eleições 2026
   Identidade visual fiel ao portal oficial tre-rn.jus.br
   ================================================================ */

/* ── 0. RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body { overflow-x: hidden; }

/* ── 1. VARIÁVEIS — PALETA TRE-RN ────────────────────────────── */
:root {
  /* Extraídas dos prints oficiais */
  --azul-inst:     #1E3A6E;   /* Azul escuro institucional             */
  --azul-medio:    #1A5EA8;   /* Azul médio – links, destaques          */
  --azul-claro:    #C5DCF0;   /* Azul claro – fundo de caixas           */
  --amarelo:       #F0A500;   /* Amarelo/dourado – detalhe logo e barra */
  --verde-teal:    #4A7C6F;   /* Verde-teal – terceiro do logo          */
  --laranja:       #E07000;   /* Laranja – etiquetas PRAZO, fab, cards  */
  --laranja-claro: #FFF3E0;   /* Fundo laranja suave                    */
  --verde-ok:      #1B7F5A;   /* Verde de confirmação                   */
  --verde-claro:   #EAF7F2;   /* Fundo verde suave                      */
  --cinza-bg:      #EFF3F8;   /* Fundo geral da página                  */
  --cinza-borda:   #C8D6E8;
  --cinza-texto:   #2D3748;
  --cinza-leve:    #718096;
  --branco:        #FFFFFF;
  --amarelo-claro: #ffda59;
  --vd-ink:    #1F2937;
  --vd-verde:  #2E9E4A;
  --vd-azul:   #1D4E89;
  --vd-amare:  #F2B233;

  /* Tokens de componentes */
  --radius:        10px;
  --radius-lg:     14px;
  --sombra:        0 2px 14px rgba(30,58,110,.10);
  --sombra-hover:  0 6px 24px rgba(30,58,110,.18);
  --transicao:     all .22s ease;
  --largura:       900px;
  --pad-lateral:   clamp(1rem, 4vw, 2rem);
}

/* ── 2. BASE ──────────────────────────────────────────────────── */
body {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  background: var(--cinza-bg);
  color: var(--cinza-texto);
  font-size: 16px;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  max-width: var(--largura);
  margin: 0 auto;
  padding: 0 var(--pad-lateral);
}

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

/* ── 3. BARRA GOV ─────────────────────────────────────────────── */
.barra-gov {
  background: #12253F;
  border-bottom: 2px solid var(--verde-teal);
  padding: .4rem var(--pad-lateral);
  font-size: .78rem;
  color: #8AAAC8;
}
.barra-gov .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.barra-gov__links { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.barra-gov__links a { color: #8AAAC8; text-decoration: none; transition: var(--transicao); }
.barra-gov__links a:hover { color: var(--amarelo-claro); }
.barra-gov__links span { color: #334D6E; }

/* ── 4. CABEÇALHO ─────────────────────────────────────────────── */
.cabecalho {
  background: var(--branco);
  border-bottom: 3px solid var(--verde-teal);
  box-shadow: 0 2px 8px rgba(30,58,110,.10);
  position: sticky;
  top: 0;
  z-index: 500;
}
.cabecalho__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: .7rem;
  padding-bottom: .7rem;
  flex-wrap: wrap;
}
.cabecalho__logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  flex-shrink: 0;
}
/* ── Logo TRE-RN (cabeçalho) ──────────────────────────────────── */
/* O SVG tem viewBox 260×102 — proporção ~2.55:1. Altura fixa 48px → largura ~122px */
.cabecalho__logo-img {
  display: block;
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

/* ── Logo TRE-RN (rodapé) ─────────────────────────────────────── */
/* No rodapé o fundo é escuro: o SVG tem texto preto (.cls-5 fill:#1d1d1b).
   Invertemos as cores via filter para ficar branco sobre azul escuro.     */
.rodape__logo-img {
  display: block;
  height: 52px;
  width: auto;
  flex-shrink: 0;
  /* inverte preto→branco mantendo as cores do brasão intactas */
  filter: brightness(0) invert(1);
}
.cabecalho__nome {
  display: flex;
  flex-direction: column;
  font-size: .82rem;
  font-weight: 700;
  color: var(--azul-inst);
  line-height: 1.3;
}
.cabecalho__busca {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--cinza-bg);
  border: 1.5px solid var(--cinza-borda);
  border-radius: 24px;
  padding: .45rem 1rem;
  min-width: 0;
  max-width: 380px;
  margin-left: auto;
  color: var(--cinza-leve);
}
.cabecalho__busca input {
  flex: 1;
  border: none;
  background: none;
  font-family: inherit;
  font-size: .88rem;
  color: var(--cinza-texto);
  outline: none;
  min-width: 0;
}
.cabecalho__busca input::placeholder { color: var(--cinza-leve); }
#busca-resultado {
  font-size: .75rem;
  font-weight: 700;
  color: var(--amarelo-claro);
  white-space: nowrap;
}

/* ── 5. SUMÁRIO ───────────────────────────────────────────────── */
#sumario {
  background: var(--branco);
  border-bottom: 2px solid var(--cinza-borda);
  position: sticky;
  top: 66px;
  z-index: 400;
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(30,58,110,.06);
  -webkit-overflow-scrolling: touch;
}
#sumario .container { padding: 0 var(--pad-lateral); }
#sumario ul {
  display: flex;
  list-style: none;
  min-width: max-content;
  gap: 0;
}
#sumario a {
  display: block;
  padding: .8rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--azul-inst);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: var(--transicao);
}
#sumario a:hover,
#sumario a.ativo {
  /* color: var(--amarelo-claro); */
  border-bottom-color: var(--amarelo-claro); 
  background: #FFF6EB;
}

/* ── 6. HERO BANNER ───────────────────────────────────────────── */
.hero {
  background:
    /* camada de luz dourada no canto superior direito */
    radial-gradient(ellipse 55% 70% at 95% 10%, rgba(240,165,0,.18) 0%, transparent 65%),
    /* camada de luz azul clara no canto inferior esquerdo */
    radial-gradient(ellipse 40% 50% at 5% 95%, rgba(26,94,168,.35) 0%, transparent 60%),
    /* degradê principal */
    linear-gradient(145deg, #0D1F3C 0%, #1E3A6E 45%, #1A5EA8 100%);
  color: var(--branco);
  position: relative;
  overflow: hidden;
}

/* Linha decorativa dourada no topo do hero */
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--azul-inst) 0%, #FFD60A 50%, var(--verde-teal) 100%);
}

/* Corpo do hero: duas colunas (texto | logo) */
.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
  position: relative;
  z-index: 1;
}

/* Coluna de texto (esquerda) */
.hero__texto {
  flex: 1;
  min-width: 0;
}

.hero__tribunal {
  font-size: clamp(.72rem, 2vw, .82rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: .75rem;
}

.hero__titulo {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .75rem;
  color: var(--branco);
}

/* Sublinhado dourado no título */
.hero__titulo::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--amarelo);
  border-radius: 2px;
  margin-top: .75rem;
}

.hero__subtitulo {
  font-size: clamp(.9rem, 2.2vw, 1.05rem);
  font-weight: 600;
  color: rgba(168,200,232,.9);
  max-width: 480px;
}

/* Coluna da logo Eleições 2026 (direita) */
.hero__logo-eleicoes {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* moldura com brilho sutil */
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.08);
}

.hero__logo-img {
  display: block;
  width: clamp(160px, 22vw, 240px);
  height: auto;
  object-fit: contain;
  /* leve drop-shadow para destacar sobre qualquer fundo */
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.35));
}

/* Faixa inferior: secretaria */
.hero__secretaria {
  background: rgba(0,0,0,.28);
  border-top: 1px solid rgba(255,255,255,.10);
  padding: .75rem var(--pad-lateral);
}
.hero__secretaria-inner {
  max-width: var(--largura);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .85rem;
  align-items: center;
  font-size: .8rem;
  color: rgba(255,255,255,.68);
}
.hero__secretaria-inner strong { color: var(--branco); }
.hero__secretaria-inner .sep  { color: rgba(255,255,255,.28); }

/* Responsividade do hero */
@media (max-width: 640px) {
  .hero__inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 1.5rem;
    gap: 1.5rem;
  }
  .hero__logo-eleicoes {
    width: 100%;
    padding: 1rem;
  }
  .hero__logo-img {
    width: clamp(120px, 55vw, 200px);
    margin: 0 auto;
  }
  .hero__titulo::after { width: 40px; }
}

/* ── 7. MAIN ──────────────────────────────────────────────────── */
main { flex: 1; }
.main-inner { padding: 2rem var(--pad-lateral) 5rem; max-width: var(--largura); margin: 0 auto; }

/* ── 8. INTRO BOX ─────────────────────────────────────────────── */
.intro-box {
  background: linear-gradient(135deg, var(--azul-inst), #1A5EA8);
  color: var(--branco);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--sombra);
  animation: sobe .45s ease both;
}
.intro-box p { font-size: .97rem; margin-bottom: .6rem; }
.intro-box p:last-child { margin-bottom: 0; }
.intro-box strong { color: #FFD60A; }
.intro-box a { color: #FFD60A; font-weight: 700; }

@keyframes sobe {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 9. SEÇÕES ────────────────────────────────────────────────── */
.secao {
  background: var(--branco);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--sombra);
  border-left: 5px solid var(--azul-medio);
  animation: sobe .45s ease both;
}
.secao-titulo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--azul-inst);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--cinza-borda);
}
.secao-titulo .em { font-size: 1.35rem; }
.secao h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--azul-medio);
  margin: 1.5rem 0 .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.secao p { margin-bottom: .75rem; font-size: .97rem; }
.secao ul, .secao ol { margin: .6rem 0 .75rem 1.25rem; font-size: .95rem; line-height: 2; }

/* ── 10. ETIQUETAS ───────────────────────────────────────────── */
.etq {
  display: inline-block;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 2px 3px 2px 0;
  vertical-align: middle;
}
.et-seg    { background: var(--azul-inst); color: #fff; }
.et-prazo  { background: var(--amarelo-claro); color: #fff; }
.et-fiscal { background: var(--verde-ok); color: #fff; }

/* ── 11. CARDS ───────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .85rem;
  margin: 1rem 0;
}
.card {
  background: var(--cinza-bg);
  border-radius: var(--radius);
  padding: 1rem .9rem;
  border-top: 4px solid var(--azul-medio);
  font-size: .9rem;
  line-height: 1.6;
  transition: var(--transicao);
}
.card:hover { box-shadow: var(--sombra-hover); transform: translateY(-2px); }
.card.laranja { border-top-color: var(--amarelo-claro); }
.card.verde   { border-top-color: var(--verde-ok); }
.card strong  { display: block; font-weight: 800; color: var(--azul-inst); margin-bottom: .4rem; font-size: .9rem; }

/* ── 12. CAIXAS ──────────────────────────────────────────────── */
.caixa {
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin: .75rem 0;
  display: flex;
  gap: .9rem;
  align-items: flex-start;
}
.caixa .ci { font-size: 1.5rem; flex-shrink: 0; margin-top: .1rem; }
.caixa h4  { font-size: .9rem; font-weight: 800; color: var(--azul-inst); margin-bottom: .3rem; }
.caixa p   { font-size: .9rem; margin: 0 0 .4rem; }
.caixa p:last-child { margin: 0; }
.caixa.azul  { background: #EAF3FF; border: 1.5px solid #A0C2E8; }
.caixa.lj    { background: var(--amarelo-claro-claro); border: 1.5px solid #F0C080; }
.caixa.verde { background: var(--verde-claro); border: 1.5px solid #7ABDA8; }

/* ── 13. LISTA DE ENTIDADES ──────────────────────────────────── */
.lista-ent {
  columns: 2;
  column-gap: 1rem;
  list-style: none;
  margin: .75rem 0;
}
.lista-ent li {
  background: var(--cinza-bg);
  border-radius: 8px;
  padding: .5rem .75rem;
  margin-bottom: .5rem;
  font-size: .88rem;
  break-inside: avoid;
  border-left: 3px solid var(--azul-medio);
}
@media (max-width: 500px) { .lista-ent { columns: 1; } }

/* ── 14. FLUXO ───────────────────────────────────────────────── */
.fluxo-wrap {
  background: linear-gradient(135deg, var(--azul-inst), #1A5EA8);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  margin: 1rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.fluxo-wrap h3 { color: #A8C8E8; text-align: center; margin-bottom: 1.25rem; font-size: .9rem; }
.fluxo { display: flex; align-items: center; min-width: max-content; }
.fluxo-passo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 90px;
  flex-shrink: 0;
}
.fluxo-icone {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.14);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  border: 2px solid rgba(255,255,255,.28);
  margin-bottom: .5rem;
}
.fluxo-label { font-size: .72rem; font-weight: 700; color: #fff; line-height: 1.3; }
.fluxo-seta  {
  font-size: 1.2rem;
  color: #F0A500;
  padding: 0 .2rem;
  flex-shrink: 0;
  align-self: center;
  margin-bottom: 1.6rem;
}

/* ── 15. TIMELINE ────────────────────────────────────────────── */
.tl {
  position: relative;
  margin: 1rem 0 .5rem .875rem;
}
.tl::before {
  content: "";
  position: absolute;
  left: 14px; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--azul-medio), var(--amarelo-claro));
  border-radius: 3px;
}
.tl-item {
  position: relative;
  padding: 0 0 1.4rem 2.75rem;
  display: flex;
  gap: 0;
}
.tl-dot {
  position: absolute;
  left: 6px; top: 4px;
  width: 18px; height: 18px;
  background: var(--amarelo);
  border-radius: 50%;
  border: 3px solid var(--branco);
  box-shadow: 0 0 0 2px var(--azul-medio);
  flex-shrink: 0;
}
.tl-corpo { flex: 1; }
.tl-titulo { font-weight: 800; color: var(--azul-inst); font-size: .9rem; margin-bottom: .3rem; }
.tl-desc   { font-size: .88rem; color: #4A5568; line-height: 1.7; }

/* ── 16. ACORDEÃO ────────────────────────────────────────────── */
.acordeao { margin: .75rem 0; }
.ac-item {
  border: 1.5px solid var(--cinza-borda);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  /* sem overflow:hidden para não cortar os tooltips */
}
.ac-btn {
  width: 100%;
  background: var(--cinza-bg);
  border: none;
  padding: .85rem 1rem;
  text-align: left;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  color: var(--azul-inst);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  transition: var(--transicao);
  border-radius: var(--radius) var(--radius) 0 0;
}
.ac-btn:not(.ativo) { border-radius: var(--radius); }
.ac-btn:hover { background: #D9E8F8; }
.ac-btn.ativo { background: var(--azul-medio); color: var(--branco); }
.ac-btn .ch   { transition: transform .3s; font-style: normal; flex-shrink: 0; }
.ac-btn.ativo .ch { transform: rotate(180deg); }
.ac-cont {
  display: none;
  padding: .9rem 1rem;
  font-size: .9rem;
  border-top: 1px solid var(--cinza-borda);
  background: var(--branco);
  line-height: 1.75;
  animation: fadeAc .22s ease;
  border-radius: 0 0 var(--radius) var(--radius);
}
.ac-cont.open { display: block; }
.ac-cont ul   { margin: .5rem 0 0 1.1rem; line-height: 2; }

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

/* ── 17. TABELAS ─────────────────────────────────────────────── */
.tabela-wrap {
  overflow-x: auto;
  margin: .75rem 0;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 480px;
  background: var(--branco);
}
thead tr { background: var(--azul-inst); color: var(--branco); }
thead th { padding: .85rem 1rem; text-align: left; font-weight: 700; font-size: .82rem; letter-spacing: .03em; }
tbody tr:nth-child(even) { background: var(--cinza-bg); }
tbody tr:hover { background: #DBEAFE; }
tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--cinza-borda);
  vertical-align: top;
  font-size: .88rem;
}
tbody td:first-child { font-weight: 700; color: var(--azul-inst); }

/* Tabela responsiva */
@media (max-width: 600px) {
  table, thead, tbody, tr, th, td { display: block; min-width: unset; }
  thead { display: none; }
  tbody tr { border: 1px solid var(--cinza-borda); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; }
  tbody td {
    text-align: right;
    padding: .55rem .9rem;
    border-bottom: 1px solid var(--cinza-borda);
    font-size: .85rem;
  }
  tbody td:first-child { font-weight: 400; color: inherit; }
  tbody td::before {
    content: attr(data-label);
    float: left;
    font-weight: 700;
    color: var(--azul-inst);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
}

/* ── 18. GLOSSÁRIO ───────────────────────────────────────────── */
.glossario {
  background: var(--cinza-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: .75rem 0;
}
.glossario dt {
  font-weight: 800;
  color: var(--azul-inst);
  font-size: .95rem;
  margin-top: .9rem;
  border-left: 3px solid var(--amarelo);
  padding-left: .6rem;
}
.glossario dt:first-child { margin-top: 0; }
.glossario dd {
  font-size: .88rem;
  margin-left: 1rem;
  margin-top: .2rem;
  color: #4A5568;
  line-height: 1.6;
}

/* ── 19. LINKS INSTITUCIONAIS ────────────────────────────────── */
.links-institucionais {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.link-inst-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.link-inst-card--azul  { background: #EAF3FF; border: 2px solid var(--azul-medio); }
.link-inst-card--amarelo-claro { background: var(--amarelo-claro-claro); border: 2px solid #E0A000; }
.link-inst-card__topo {
  display: flex; align-items: center; gap: .6rem;
}
.link-inst-card__topo span { font-size: 1.5rem; }
.link-inst-card__topo strong { color: var(--azul-inst); font-size: .95rem; }
.link-inst-card p { font-size: .88rem; color: #444; flex: 1; }
.link-inst-btn {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 7px;
  font-weight: 700;
  font-size: .82rem;
  text-decoration: none;
  text-align: center;
  transition: var(--transicao);
}
.link-inst-btn--azul    { background: var(--azul-medio); color: var(--branco); }
.link-inst-btn--azul:hover { background: var(--azul-inst); }
.link-inst-btn--amarelo-claro { background: var(--amarelo-claro); color: var(--branco); }
.link-inst-btn--amarelo-claro:hover { background: #B05800; }

/* ── 20. PESQUISA RÁPIDA ─────────────────────────────────────── */
#pesquisa-geral {
  background: linear-gradient(135deg, var(--azul-inst), #1A4A82);
  color: var(--branco);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--sombra);
}
#pesquisa-geral h2 { color: #A8C8E8; margin-bottom: .75rem; font-size: 1rem; font-weight: 800; }
#pesquisa-geral p  { font-size: .88rem; color: rgba(255,255,255,.8); margin-bottom: 1rem; }
.pq-opcoes { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pq-btn {
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  color: var(--branco);
  border-radius: 7px;
  padding: .55rem 1rem;
  font-size: .88rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transicao);
}
.pq-btn:hover { background: rgba(224,112,0,.35); border-color: var(--amarelo-claro); }
.pq-btn.sel   { background: var(--amarelo-claro); border-color: var(--amarelo-claro); }
#pq-fb { font-size: .9rem; color: #A8C8E8; min-height: 1.4rem; font-weight: 700; }

/* ── 20b. HASHTAG DEMOCRACIA ─────────────────────────────────── */
.hashtag-bloco {
  text-align: center;
  padding: .75rem 1rem 1.5rem;
  margin-bottom: 0;
  font-size: .82rem;
  opacity: .72;
}

/* ── 21. MARK (busca) ────────────────────────────────────────── */
mark.hl { background: #FFD60A; color: #1A202C; border-radius: 3px; padding: 0 2px; }

/* ── 22. TOOLTIPS ────────────────────────────────────────────── */
.tip {
  position: relative;
  display: inline;
  border-bottom: 1.5px dashed var(--azul-medio);
  color: var(--azul-inst);
  font-weight: 700;
  cursor: help;
}
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: calc(50% + var(--tip-dx, 0px));
  transform: translateX(-50%) translateY(4px);
  background: var(--azul-inst);
  color: var(--branco);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.55;
  padding: .7rem .9rem;
  border-radius: var(--radius);
  white-space: normal;
  width: 250px;
  max-width: 90vw;
  text-align: left;
  box-shadow: 0 6px 20px rgba(30,58,110,.28);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
  font-family: inherit;
  border: 1px solid rgba(255,255,255,.12);
}
.tip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: calc(50% + var(--tip-dx, 0px));
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--azul-inst);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 9999;
}
.tip:hover::after, .tip.ativo::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.tip:hover::before, .tip.ativo::before { opacity: 1; }

/* ── 23. BOTÃO FLUTUANTE ─────────────────────────────────────── */
.fab-btn {
  position: fixed;
  right: 1.75rem;
  bottom: 1.5rem;
  z-index: 1200;
  height: 52px;
  max-width: calc(100vw - 3.5rem);
  border-radius: 999px;
  background: rgb(251, 192, 26, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--branco);
  border: 2px dotted  var(--verde-ok);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 1rem 0 .85rem;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
}
.fab-btn:hover {
  background: rgb(27, 69, 127); 
  border-color: rgba(255, 255, 255, 0.25); 
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45), 
              0 0 15px rgba(26, 85, 168, 0.2); 
  transition: transform 0.95s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.95s cubic-bezier(0.25, 0.8, 0.25, 1), 
              background 0.95s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-color 0.95s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fab-btn-icon  { display: flex; align-items: center; flex-shrink: 0; overflow: visible; }
.fab-btn-text  { display: flex; flex-direction: column; line-height: 1.25; }
.fab-btn-text span:last-child { font-size: .7rem; opacity: .8; }
.fab-pulse {
  background: rgba(20, 184, 166, 0.15);
  color: var(--branco);
  font-size: .68rem;
  font-weight: 800;
  border-radius: 50px;
  padding: 2px 6px;
  border: 2px solid rgba(255,255,255,.35);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .fab-btn      { padding: 0; width: 48px; height: 48px; border-radius: 50%;
                  justify-content: center; right: 1rem; bottom: 1rem; }
  .fab-btn-text { display: none; }
  .fab-pulse    { display: none; }
}

/* ── 24. PAINEL AVALIAÇÃO ────────────────────────────────────── */
.fab-panel {
  position: fixed;
  bottom: 90px;
  right: 1.75rem;
  z-index: 1199;
  width: min(330px, calc(100vw - 3.5rem));
  max-height: calc(100vh - 130px);
  background: var(--branco);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(30,58,110,.28);
  border: 1.5px solid var(--cinza-borda);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.fab-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
@media (max-width: 600px) { .fab-panel { width: calc(100vw - 2rem); right: 1rem; bottom: 72px; } }

.panel-header {
  background: linear-gradient(135deg, var(--azul-inst), var(--azul-medio));
  color: var(--branco);
  padding: 1rem 1.1rem .875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.panel-header-left { display: flex; align-items: center; gap: .6rem; }
.panel-header-left h2 { font-size: .88rem; font-weight: 700; margin: 0; }
.panel-header-left p  { font-size: .7rem; opacity: .75; margin: 2px 0 0; }
.panel-close-btn {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 7px;
  color: var(--branco);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.panel-close-btn:hover { background: rgba(255,255,255,.3); }

.panel-tabs {
  display: flex;
  background: var(--cinza-bg);
  border-bottom: 1.5px solid var(--cinza-borda);
  flex-shrink: 0;
}
.panel-tab {
  flex: 1;
  padding: .65rem .4rem;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--cinza-leve);
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: color .15s, border-color .15s;
}
.panel-tab.active { color: var(--azul-inst); border-bottom-color: var(--amarelo-claro); }
.panel-tab:hover:not(.active) { color: var(--azul-medio); }

.panel-body {
  overflow-y: auto;
  padding: 1.1rem;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--cinza-borda) transparent;
}

/* Estrelas do painel */
.fp-label { font-size: .82rem; font-weight: 600; color: var(--azul-inst); margin-bottom: .5rem; }
.fp-stars  { display: flex; gap: .35rem; justify-content: center; margin-bottom: .4rem; }
.fp-stars button {
  background: none; border: none; cursor: pointer;
  font-size: 1.75rem; padding: 2px; border-radius: 6px;
  line-height: 1; transition: transform .15s;
  filter: grayscale(1) opacity(.4);
}
.fp-stars button:hover, .fp-stars button.sel { filter: none; transform: scale(1.2); }
.fp-star-hint { text-align: center; font-size: .72rem; color: var(--cinza-leve); margin-bottom: .9rem; min-height: 1rem; font-style: italic; }
.fp-textarea {
  width: 100%; border: 1.5px solid var(--cinza-borda);
  border-radius: var(--radius); padding: .6rem .75rem;
  font-family: inherit; font-size: .85rem; color: var(--cinza-texto);
  background: var(--cinza-bg); resize: vertical; transition: border-color .2s; min-height: 68px;
}
.fp-textarea:focus { outline: none; border-color: var(--azul-medio); background: var(--branco); }
.fp-submit {
  width: 100%; margin-top: .75rem;
  background: var(--azul-inst); color: var(--branco);
  border: none; border-radius: var(--radius); padding: .65rem;
  font-family: inherit; font-weight: 700; font-size: .85rem;
  cursor: pointer; transition: var(--transicao);
  display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.fp-submit:hover:not(:disabled) { background: var(--azul-medio); }
.fp-submit:disabled { background: #aaa; cursor: not-allowed; }
.fp-hint   { font-size: .68rem; color: var(--cinza-leve); margin-top: .4rem; text-align: center; }
.fp-success {
  text-align: center; padding: 1.25rem .5rem;
  background: var(--verde-claro);
  border-radius: var(--radius);
  border: 2px solid #7ABDA8;
}
.fp-success .fs-icon { font-size: 2rem; }
.fp-success h3 { font-size: .95rem; color: var(--verde-ok); margin: .4rem 0 .3rem; }
.fp-success p  { font-size: .8rem; color: var(--cinza-leve); }

/* Gráfico */
.chart-avg { text-align: center; margin-bottom: 1rem; padding: .75rem; background: #EAF3FF; border-radius: var(--radius); border: 1.5px solid var(--cinza-borda); }
.avg-num   { font-size: 2.2rem; font-weight: 800; color: var(--azul-inst); line-height: 1; }
.avg-stars { font-size: 1.1rem; margin: .2rem 0; }
.avg-lbl   { font-size: .72rem; color: var(--cinza-leve); }
.bar-row   { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.bar-label { font-size: .75rem; font-weight: 700; color: var(--cinza-texto); width: 1rem; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--cinza-bg); border-radius: 5px; height: 16px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--azul-medio), #80B8F0); transition: width .6s cubic-bezier(.34,1,.64,1); }
.bar-fill[data-star="1"] { background: linear-gradient(90deg, #C05200, #F4A84B); }
.bar-fill[data-star="2"] { background: linear-gradient(90deg, #E08020, #F9C96A); }
.bar-fill[data-star="3"] { background: linear-gradient(90deg, #5A3E9B, #B39EE8); }
.bar-fill[data-star="5"] { background: linear-gradient(90deg, var(--verde-ok), #7AC4B2); }
.bar-count { font-size: .7rem; color: var(--cinza-leve); width: 20px; text-align: right; flex-shrink: 0; }
.chart-empty { text-align: center; padding: 1.25rem; color: var(--cinza-leve); font-size: .82rem; opacity: .75; }

/* Contador */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .75rem; }
.stat-card {
  background: #EAF3FF; border: 1.5px solid var(--cinza-borda);
  border-radius: var(--radius); padding: .75rem .6rem; text-align: center;
}
.stat-card.warn { background: var(--amarelo-claro); border-color: #F0C080; }
.sc-num { font-size: 1.6rem; font-weight: 800; color: var(--azul-inst); line-height: 1; }
.stat-card.warn .sc-num { color: #7A3800; }
.sc-lbl { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--cinza-leve); margin-top: .2rem; }

/* ── 25. RODAPÉ ──────────────────────────────────────────────── */
.rodape { background: var(--azul-inst); color: rgba(255,255,255,.72); margin-top: auto; }

.rodape__topo { border-bottom: 1px solid rgba(255,255,255,.10); padding: 2rem var(--pad-lateral); }
.rodape__topo-inner {
  max-width: var(--largura); margin: 0 auto;
  display: flex; gap: 2.5rem; flex-wrap: wrap; align-items: flex-start;
}
.rodape__logo-bloco { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.rodape__trib { font-size: .88rem; font-weight: 700; color: var(--branco); line-height: 1.3; }
.rodape__info { flex: 1; min-width: 220px; font-size: .82rem; line-height: 1.7; }
.rodape__social { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.rodape__social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  transition: var(--transicao);
}
.rodape__social a:hover { background: var(--amarelo-claro); color: var(--azul-inst); }
.rodape__social a svg  { width: 17px; height: 17px; }

.rodape__meio { padding: 1.25rem var(--pad-lateral); border-bottom: 1px solid rgba(255,255,255,.08); }
.rodape__meio .container { max-width: var(--largura); margin: 0 auto; }
.rodape__meio p { font-size: .78rem; line-height: 1.75; margin-bottom: .4rem; }
.rodape__meio p:last-child { margin-bottom: 0; }
.rodape__meio a { color: #8AAAC8; transition: var(--transicao); }
.rodape__meio a:hover { color: var(--amarelo); }

.rodape__base { padding: .75rem var(--pad-lateral); background: rgba(0,0,0,.20); }
.rodape__base-inner {
  max-width: var(--largura); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
}
.rodape__base nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.rodape__base nav a { color: #5A7A9C; font-size: .78rem; text-decoration: none; transition: var(--transicao); }
.rodape__base nav a:hover { color: var(--amarelo); }
.mapa-site { color: #5A7A9C; font-size: .78rem; text-decoration: none; transition: var(--transicao); }
.mapa-site:hover { color: var(--amarelo-claro); }

/* ──  #VOTONADEMOCRACIA ────────────────────────────────────────────── */
 .voto-democracia {
    display: block;
    width: fit-content;
    margin: 60px auto 16px auto;
    font-family: 'Space Grotesk', sans-serif;
    /* Escala fluida: 28px no mobile, 80px no desktop */
    font-size: clamp(14px, 2.5vw, 28px);
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
  }

  .voto-democracia .vd-hash,
  .voto-democracia .vd-voto,
  .voto-democracia .vd-na   { font-weight: 600; }

  /* Ancora editorial — fonte display diferente, peso e tracking próprios */
  .voto-democracia .vd-dem  {
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    letter-spacing: -0.04em;
  }

  .voto-democracia .vd-hash { color: var(--vd-ink);   }
  .voto-democracia .vd-voto { color: var(--vd-verde); }
  .voto-democracia .vd-na   { color: var(--vd-azul);  }
  .voto-democracia .vd-dem  { color: var(--vd-amare); }

  /* Variante p/ fundo escuro: troca o cinza do '#' por branco */
  .voto-democracia--dark .vd-hash { color: #FFFFFF; }

/* ── 26. RESPONSIVIDADE GERAL ────────────────────────────────── */
@media (max-width: 768px) {
  .cabecalho__busca { max-width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .secao { padding: 1.5rem 1rem; }
  .rodape__topo-inner { gap: 1.5rem; }
}
@media (max-width: 480px) {
  .logo-trern { width: 44px; height: 44px; }
  .cabecalho__nome span { font-size: .74rem; }
  .hero__titulo { font-size: 1.4rem; }
  .links-institucionais { grid-template-columns: 1fr; }
}

/* ── 27. PRINT ───────────────────────────────────────────────── */
@media print {
  .barra-gov, #sumario, .cabecalho__busca,
  .fab-btn, .fab-panel, #pesquisa-geral { display: none !important; }
  .cabecalho { position: static; box-shadow: none; }
  .hero { background: var(--azul-inst) !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  a[href]::after { content: " (" attr(href) ")"; font-size: .72rem; color: var(--cinza-leve); }
}
