/* Eleição CACS-FUNDEB — Prado. Mobile primeiro, fonte própria (Atkinson Hyperlegible Next), sem CSS/JS inline. */
@font-face {
  font-family: "Atkinson";
  src: url("../fonts/atkinson.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --navy: #0d2b5e;
  --navy-2: #163a78;
  --navy-ink: #081c3f;
  --sol: #ffc933;
  --sol-ink: #3d2f00;
  --verde: #1fa563;
  --verde-escuro: #0f7a45;
  --verde-fundo: #e5f6ed;
  --fundo: #f3f6fb;
  --papel: #ffffff;
  --texto: #14213d;
  --suave: #4a5876;
  --linha: #d6deec;
  --erro: #b3261e;
  --erro-fundo: #fdecea;
  --aviso-fundo: #fff6d6;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(13, 43, 94, .08), 0 6px 18px rgba(13, 43, 94, .07);
  --foco: 0 0 0 3px #fff, 0 0 0 6px #1b6fe0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fundo); color: var(--texto);
  font: 400 1.0625rem/1.55 "Atkinson", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: 6px; }
.wrap { width: min(100% - 32px, 1060px); margin-inline: auto; }
.estreito { width: min(100% - 32px, 640px); margin-inline: auto; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 6.4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 4.4vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }
.suave { color: var(--suave); }
.pequeno { font-size: .9rem; }

/* ------------------------------------------------------------ topo */
.topo { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topo .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 750; line-height: 1.1; }
.marca svg { width: 38px; height: 38px; flex: none; }
.marca small { display: block; font-weight: 400; font-size: .78rem; opacity: .8; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: #dbe5f8; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; }
.nav a.destaque { background: var(--sol); color: var(--sol-ink); }
.nav a.destaque:hover { background: #ffd75e; }
.topo :focus-visible { box-shadow: 0 0 0 3px var(--navy), 0 0 0 6px var(--sol); }
@media (max-width: 640px) {
  .topo .wrap { flex-wrap: wrap; padding-block: 6px; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .nav a { white-space: nowrap; }
}

/* ------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 24px; border-radius: 12px; border: 2px solid transparent;
  font: inherit; font-weight: 750; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  background: var(--navy); color: #fff; transition: transform .08s ease, background .15s;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.sol { background: var(--sol); color: var(--sol-ink); }
.btn.sol:hover { background: #ffd75e; color: var(--sol-ink); }
.btn.verde { background: var(--verde-escuro); }
.btn.verde:hover { background: #0b6639; }
.btn.contorno { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.contorno:hover { background: #e8eefa; }
.btn.claro { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn.claro:hover { background: rgba(255, 255, 255, .22); }
.btn.grande { min-height: 60px; font-size: 1.2rem; padding-inline: 32px; }
.btn.bloco { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------ página inicial */
.hero { background: var(--navy); color: #fff; padding: 36px 0 44px; position: relative; overflow: hidden; }
.hero::after { /* faixa tricolor do logotipo, no pé do bloco */
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px;
  background: linear-gradient(90deg, var(--sol) 0 34%, var(--verde) 34% 67%, #fff 67%);
}
.hero h1 { color: #fff; max-width: 17ch; }
.hero .lead { font-size: 1.2rem; color: #dbe5f8; max-width: 38ch; }
.hero .grade { display: grid; gap: 28px; }
@media (min-width: 860px) { .hero .grade { grid-template-columns: 1.15fr .85fr; align-items: center; } .hero { padding: 64px 0 72px; } }

.painel-estado { background: #fff; color: var(--texto); border-radius: 18px; padding: 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }
.painel-estado h2 { font-size: 1.3rem; margin-bottom: .3em; }
.selo { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: .95rem; padding: 5px 12px; border-radius: 99px; margin-bottom: 12px; }
.selo::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.selo.aberta { background: var(--verde-fundo); color: var(--verde-escuro); }
.selo.aberta::before { animation: pulso 1.6s ease-out infinite; }
.selo.breve { background: var(--aviso-fundo); color: #7a5a00; }
.selo.fechada { background: #e9edf5; color: var(--suave); }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(31, 165, 99, .6); } 100% { box-shadow: 0 0 0 10px rgba(31, 165, 99, 0); } }
.datas { margin: 0 0 16px; padding: 0; list-style: none; color: var(--suave); }
.datas b { color: var(--texto); }

.faixa { padding: 44px 0; }
.faixa.branca { background: var(--papel); }
.faixa > .wrap > h2, .faixa > .wrap > .intro { max-width: 40rem; }
.intro { color: var(--suave); font-size: 1.1rem; }

.passos { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: passo; }
@media (min-width: 760px) { .passos { grid-template-columns: repeat(3, 1fr); } }
.passos li { counter-increment: passo; background: var(--fundo); border-radius: var(--raio); padding: 18px 18px 18px 72px; position: relative; min-height: 84px; }
.passos li::before {
  content: counter(passo); position: absolute; left: 16px; top: 16px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--navy); color: var(--sol); font-weight: 800; font-size: 1.3rem; display: grid; place-items: center;
}
.passos h3 { margin-bottom: .2em; }
.passos p { margin: 0; color: var(--suave); }

.segmentos { display: grid; gap: 14px; margin-top: 24px; }
@media (min-width: 760px) { .segmentos { grid-template-columns: repeat(2, 1fr); } }
.cartao { background: var(--papel); border-radius: var(--raio); padding: 20px; box-shadow: var(--sombra); }
.cartao h3 { margin-bottom: .25em; }
.faixa.branca .cartao { background: var(--fundo); box-shadow: none; }
.vagas { color: var(--verde-escuro); font-weight: 700; }

.locais { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .locais { grid-template-columns: repeat(2, 1fr); } }
.locais li { background: var(--papel); border-left: 6px solid var(--verde); border-radius: 10px; padding: 14px 16px; box-shadow: var(--sombra); }
.locais b { display: block; color: var(--navy); }
.locais span { display: block; color: var(--suave); font-size: .95rem; }

.aviso { background: var(--aviso-fundo); border-left: 6px solid var(--sol); border-radius: 10px; padding: 14px 16px; margin: 18px 0; }
.aviso.erro { background: var(--erro-fundo); border-color: var(--erro); }
.aviso.ok { background: var(--verde-fundo); border-color: var(--verde); }
.aviso > :last-child { margin-bottom: 0; }

details.duvida { background: var(--papel); border-radius: 12px; margin-top: 10px; box-shadow: var(--sombra); }
details.duvida summary { cursor: pointer; padding: 16px 18px; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.duvida summary::-webkit-details-marker { display: none; }
details.duvida summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--verde-escuro); }
details.duvida[open] summary::after { content: "–"; }
details.duvida > div { padding: 0 18px 16px; color: var(--suave); }
details.duvida > div > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ rodapé */
.rodape { background: var(--navy-ink); color: #b9c7e4; padding: 28px 0; font-size: .95rem; }
.rodape a { color: #fff; }
.rodape .wrap { display: grid; gap: 8px; }
.rodape :focus-visible { box-shadow: 0 0 0 3px var(--navy-ink), 0 0 0 6px var(--sol); }

/* ------------------------------------------------------------ candidatos */
.cabeca-pagina { background: var(--navy); color: #fff; padding: 28px 0 32px; }
.cabeca-pagina h1 { color: #fff; font-size: clamp(1.7rem, 5.5vw, 2.4rem); margin-bottom: .2em; }
.cabeca-pagina p { color: #dbe5f8; margin: 0; max-width: 46ch; }
.abas { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 6px; }
.aba { min-height: 46px; padding: 8px 18px; border-radius: 99px; border: 2px solid var(--navy); background: transparent; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.aba[aria-selected="true"] { background: var(--navy); color: #fff; }
.grade-cand { display: grid; gap: 14px; margin: 18px 0 40px; padding: 0; list-style: none; }
@media (min-width: 640px) { .grade-cand { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grade-cand { grid-template-columns: repeat(3, 1fr); } }
.cand { background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; display: flex; flex-direction: column; }
.cand-topo { display: flex; gap: 14px; align-items: center; padding: 14px; }
.foto { width: 84px; height: 84px; border-radius: 12px; background: #e3e9f6; color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; object-fit: cover; flex: none; }
.numero { margin-left: auto; min-width: 64px; text-align: center; background: var(--navy); color: var(--sol); font-weight: 800; font-size: 1.9rem; line-height: 1; padding: 12px 10px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.cand-nome { font-weight: 750; font-size: 1.15rem; line-height: 1.2; color: var(--navy); margin: 0; }
.cand-desc { padding: 0 14px 16px; margin: 0; color: var(--suave); font-size: .98rem; white-space: pre-line; }
.vazio { background: var(--papel); border-radius: var(--raio); padding: 28px 20px; text-align: center; color: var(--suave); box-shadow: var(--sombra); margin: 24px 0; }

/* ------------------------------------------------------------ votação */
.votacao { padding: 24px 0 120px; }
.etapas { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.etapas li { flex: 1; height: 8px; border-radius: 99px; background: var(--linha); }
.etapas li.feita { background: var(--verde); }
.etapas li.atual { background: var(--navy); }
.caixa { background: var(--papel); border-radius: 18px; padding: 24px 20px; box-shadow: var(--sombra); }
.campo { margin: 18px 0; }
.campo label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.campo .dica { color: var(--suave); font-size: .95rem; margin-top: 6px; }
.entrada {
  width: 100%; min-height: 62px; border: 2px solid #9fb0d0; border-radius: 12px; padding: 10px 16px; background: #fff; color: var(--texto);
  font: 700 1.55rem/1.2 "Atkinson", system-ui, sans-serif; letter-spacing: .12em; font-variant-numeric: tabular-nums;
}
.entrada:focus { outline: none; border-color: var(--navy); box-shadow: var(--foco); }
.entrada[aria-invalid="true"] { border-color: var(--erro); }
.msg-erro { color: var(--erro); font-weight: 700; margin: 10px 0 0; }
.cronometro { display: inline-block; background: var(--aviso-fundo); border-radius: 99px; padding: 4px 12px; font-weight: 700; font-size: .92rem; color: #7a5a00; font-variant-numeric: tabular-nums; }
.cronometro.urgente { background: var(--erro-fundo); color: var(--erro); }

.opcoes { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.opcao { position: relative; }
.opcao input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.opcao .linha { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px solid var(--linha); border-radius: 14px; background: #fff; min-height: 84px; transition: border-color .12s, background .12s; }
.opcao input:checked + .linha { border-color: var(--verde-escuro); background: var(--verde-fundo); box-shadow: inset 0 0 0 1px var(--verde-escuro); }
.opcao input:focus-visible + .linha { box-shadow: var(--foco); }
.opcao .marca-sel { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #9fb0d0; flex: none; display: grid; place-items: center; background: #fff; }
.opcao input:checked + .linha .marca-sel { background: var(--verde-escuro); border-color: var(--verde-escuro); }
.opcao input:checked + .linha .marca-sel::after { content: ""; width: 10px; height: 6px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.opcao .foto { width: 64px; height: 64px; font-size: 1.3rem; }
.opcao .numero { font-size: 1.6rem; min-width: 56px; padding: 10px 8px; }
.opcao .texto { flex: 1; min-width: 0; }
.opcao .texto b { display: block; line-height: 1.2; color: var(--navy); font-size: 1.1rem; }
.opcao .texto span { display: block; color: var(--suave); font-size: .92rem; line-height: 1.3; margin-top: 2px; }
.opcao.neutra .linha { min-height: 64px; border-style: dashed; }
.opcao.neutra .numero { background: #e3e9f6; color: var(--navy); }
.separador { margin: 20px 0 4px; color: var(--suave); font-size: .92rem; font-weight: 700; }

.barra-fixa { position: fixed; inset: auto 0 0 0; background: #fff; border-top: 1px solid var(--linha); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(13, 43, 94, .1); z-index: 15; }
.barra-fixa .estreito { display: flex; gap: 10px; }
.barra-fixa .btn { flex: 1; }

.resumo-voto { border: 3px solid var(--navy); border-radius: 16px; padding: 18px; text-align: center; margin: 18px 0; background: #fff; }
.resumo-voto .numero { display: inline-block; font-size: 2.6rem; padding: 14px 22px; margin: 0 0 10px; }
.resumo-voto .foto { margin: 0 auto 10px; width: 110px; height: 110px; font-size: 2rem; }
.resumo-voto strong { display: block; font-size: 1.4rem; color: var(--navy); line-height: 1.2; }
.acoes-col { display: grid; gap: 10px; margin-top: 18px; }

.comprovante { border: 2px dashed var(--verde-escuro); border-radius: 16px; padding: 20px; background: var(--verde-fundo); text-align: center; }
.comprovante .ok { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: var(--verde-escuro); display: grid; place-items: center; }
.comprovante .ok::after { content: ""; width: 26px; height: 14px; border-left: 6px solid #fff; border-bottom: 6px solid #fff; transform: rotate(-45deg) translate(2px, -3px); }
.protocolo { font: 800 clamp(1.2rem, 6.2vw, 2rem)/1.2 "Atkinson", monospace; letter-spacing: .04em; white-space: nowrap; color: var(--navy); margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.dados { text-align: left; margin: 14px 0 0; display: grid; gap: 6px; }
.dados div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(15, 122, 69, .25); padding-top: 6px; }
.dados dt { color: var(--suave); }
.dados dd { margin: 0; font-weight: 700; text-align: right; }

.carregando { display: inline-block; width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .8s linear infinite; vertical-align: -3px; }
@keyframes gira { to { transform: rotate(360deg); } }

.texto-longo h2 { margin-top: 1.6em; }
.texto-longo ul { padding-left: 1.2em; }
.texto-longo li { margin-bottom: .4em; }

@media print {
  .topo, .rodape, .barra-fixa, .nao-imprimir { display: none !important; }
  body { background: #fff; }
  .caixa { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ inscrição de candidatos */
.entrada.texto { font: 500 1.1rem/1.3 "Atkinson", system-ui, sans-serif; letter-spacing: 0; min-height: 52px; }
textarea.entrada { min-height: 96px; resize: vertical; }
select.entrada { appearance: auto; }
.chaves { display: grid; gap: 10px; margin: 14px 0; }
.chaves > div { background: var(--fundo); border-radius: 12px; padding: 12px 14px; }
.chaves dt { color: var(--suave); font-size: .9rem; }
.chaves dd { margin: 2px 0 0; font: 800 1.35rem/1.2 "Atkinson", system-ui, sans-serif; letter-spacing: .04em; word-break: break-all; }
.docs { list-style: none; margin: 14px 0 24px; padding: 0; display: grid; gap: 12px; }
.docs li { background: var(--papel); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra); }
.docs h3 { font-size: 1.05rem; margin: 0 0 4px; }
.docs .sit { font-weight: 700; margin: 4px 0 8px; }
.docs .sit.aprovado { color: var(--verde-escuro); }
.docs .sit.correcao { color: var(--erro); }
.docs .sit.pendente { color: #7a5a00; }
.docs .obs { background: var(--erro-fundo); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.docs input[type=file] { max-width: 100%; margin: 6px 0; }
@media print { .topo, .rodape, .nao-imprimir, #btn-copiar, #btn-docs { display: none !important; } }
@media (max-width: 700px) { .topo .wrap { flex-wrap: wrap; padding-block: 6px; } .nav { overflow-x: auto; max-width: 100%; white-space: nowrap; } }

/* ------------------------------------------------------------ página do edital */
.texto-edital { padding-bottom: 40px; max-width: 820px; }
.texto-edital h2 { margin-top: 36px; padding-top: 8px; scroll-margin-top: 80px; }
.indice { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.indice a { background: var(--papel); border: 1px solid var(--linha); border-radius: 99px; padding: 8px 14px; text-decoration: none; font-weight: 700; }
.cronograma { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cronograma li { background: var(--papel); border-radius: 12px; padding: 12px 14px; box-shadow: var(--sombra); display: grid; gap: 2px; }
.cronograma li b { color: var(--navy); }
.cronograma li:has(b:first-child) { border-left: 6px solid var(--sol); }
.tabela { width: 100%; border-collapse: collapse; background: var(--papel); border-radius: 12px; overflow: hidden; box-shadow: var(--sombra); }
.tabela th, .tabela td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--linha); }
.tabela th { background: var(--navy); color: #fff; }
.tabela td + td, .tabela th + th { text-align: center; width: 90px; }
.lista { padding-left: 1.2em; } .lista li { margin: 8px 0; }
@media (min-width: 640px) { .cronograma li { grid-template-columns: 230px 1fr; gap: 16px; } }
