/* Pulso — identidade provisória: azul escuro, azul, cinza, prata e branco. Sem fontes remotas, sem animações além de transições curtas. */
:root {
  --azul-escuro: #0b2545;  /* textos */
  --azul: #1d5fd0;         /* ações (branco sobre azul ≥ 5,5:1) */
  --azul-2: #174ea9;
  --azul-claro: #e8f0fd;
  --cinza-fundo: #eef1f5;
  --cinza-claro: #f6f8fa;
  --prata: #c4ccd8;        /* detalhe/decoração; não é usada para texto */
  --borda: #c3ccd6;
  --borda-campo: #6b7d92;  /* contorno de campos (≥ 3:1 sobre branco) */
  --texto: #0b2545;
  --texto-2: #3a4a5e;      /* ≥ 7:1 sobre o fundo claro */
  --erro: #a4262c;
  --erro-fundo: #fdecee;
  --raio: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cinza-fundo); color: var(--texto);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere;
}
h1, h2, p, ol, dl, dd { margin: 0; }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); line-height: 1.15; letter-spacing: -0.01em; font-weight: 750; }
h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .35rem; }
a { color: var(--azul); }

.pular { position: absolute; left: .75rem; top: -4rem; background: var(--azul-escuro); color: #fff; padding: .6rem .9rem; border-radius: 8px; z-index: 20; }
.pular:focus { top: .75rem; }

:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(29, 95, 208, .22); border-radius: 6px; }

.topo { max-width: 1080px; margin: 0 auto; padding: 1.1rem 1rem 0; }
.marca { display: flex; align-items: center; gap: .75rem; }
.simbolo { width: 48px; height: 48px; flex: none; }
.nome { font-size: 1.5rem; font-weight: 800; letter-spacing: .01em; line-height: 1.1; color: var(--azul-escuro); }
.assinatura { font-size: .95rem; color: var(--azul); font-weight: 600; }

main { max-width: 1080px; margin: 0 auto; padding: 0 1rem 2rem; }
.hero { padding: 1.6rem 0 1.4rem; max-width: 46rem; }
.lead { margin-top: .8rem; font-size: 1.1rem; color: var(--texto-2); }

.grade { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .grade { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } .previa { position: sticky; top: 1rem; } }

.cartao { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.25rem; box-shadow: 0 1px 2px rgba(11, 37, 69, .06); min-width: 0; }
.nota { color: var(--texto-2); font-size: .95rem; margin: .2rem 0 .9rem; }

.campo { margin: 0 0 1.1rem; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; font-weight: 650; margin-bottom: .3rem; padding: 0; }
.opcional { font-weight: 500; color: var(--texto-2); }
.ajuda { color: var(--texto-2); font-size: .9rem; margin-top: .3rem; }
.estado { color: var(--azul-escuro); font-weight: 600; min-height: 0; }
.estado:empty { display: none; }
.erro { color: var(--erro); font-size: .92rem; margin-top: .35rem; font-weight: 600; }
.erro::before { content: "Erro: "; }
input[type="text"], input[type="tel"], input[type="time"], input[type="number"], select {
  width: 100%; font: inherit; color: var(--texto); background: #fff; border: 1.5px solid var(--borda-campo); border-radius: 10px; padding: .65rem .75rem; min-height: 2.9rem;
}
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--erro); background: var(--erro-fundo); }
.duas { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .duas { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }

/* telefone */
.telefone-linha { display: grid; gap: .6rem; grid-template-columns: max-content minmax(0, 1fr); align-items: end; }
.telefone-linha .pais, .telefone-linha .numero { min-width: 0; }
.seletor-pais { position: relative; }
.pais-controle { display: flex; align-items: center; gap: .45rem; width: max-content; min-height: 2.9rem; padding: .35rem .6rem; font: inherit; color: var(--texto); background: #fff; border: 1.5px solid var(--borda-campo); border-radius: 10px; cursor: pointer; }
.pais-controle .pais-codigo { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.2ch; }
.pais-controle .seta { color: var(--azul-escuro); font-size: .9rem; }
.pais-controle[aria-expanded="true"] { border-color: var(--azul); }
.pais-controle[aria-invalid="true"] { border-color: var(--erro); background: var(--erro-fundo); }
.pais-popup { position: absolute; z-index: 15; left: 0; top: calc(100% + 4px); width: min(21rem, calc(100vw - 3rem)); background: #fff; border: 1.5px solid var(--borda-campo); border-radius: 12px; box-shadow: 0 10px 24px rgba(11, 37, 69, .18); padding: .5rem; }
.pais-popup input { margin-bottom: .4rem; }
.combo-lista { margin: 0; padding: 0; list-style: none; max-height: 16rem; overflow: auto; }
.combo-opcao { display: flex; gap: .6rem; align-items: baseline; padding: .5rem .6rem; border-radius: 8px; cursor: pointer; }
.combo-opcao .bandeira { flex: none; min-width: 1.6rem; }
.combo-opcao .nome-pais { flex: 1; min-width: 0; }
.combo-opcao .codigo { flex: none; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.combo-opcao[aria-selected="true"] { font-weight: 700; }
.combo-opcao.ativa { background: var(--azul-claro); outline: 2px solid var(--azul); outline-offset: -2px; }
.combo-vazio { padding: .6rem; color: var(--texto-2); }

.temas { display: grid; gap: .5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .temas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tema { display: flex; align-items: center; gap: .6rem; border: 1.5px solid var(--borda); border-radius: 10px; padding: .55rem .7rem; background: #fff; cursor: pointer; font-weight: 500; margin: 0; }
.tema:has(input:checked) { border-color: var(--azul); background: var(--azul-claro); }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; flex: none; accent-color: var(--azul); margin: 0; }
.marcar { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.consentimento { background: var(--cinza-claro); border: 1px solid var(--borda); border-radius: 10px; padding: .8rem; }
.secundario { border: 1.5px dashed var(--prata); border-radius: 12px; padding: .9rem; background: var(--cinza-claro); }
.secundario label { font-size: .98rem; }

.botao { display: inline-block; width: 100%; font: inherit; font-weight: 700; color: #fff; background: var(--azul); border: 2px solid var(--azul); border-radius: 12px; padding: .8rem 1.2rem; min-height: 3rem; cursor: pointer; transition: background .15s ease; }
.botao:hover { background: var(--azul-2); border-color: var(--azul-2); }
.botao.secundario { background: #fff; color: var(--azul); }
.botao.secundario:hover { background: var(--azul-claro); }
@media (min-width: 560px) { .botao { width: auto; min-width: 14rem; } }

.erros-resumo { background: var(--erro-fundo); border: 1.5px solid var(--erro); color: #5b1015; border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.erros-resumo ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.erros-resumo a { color: inherit; font-weight: 700; }
.sucesso { background: var(--azul-claro); border: 1.5px solid var(--azul); color: var(--azul-escuro); border-radius: 10px; padding: .8rem 1rem; font-weight: 700; margin: .6rem 0 1rem; }
.resumo { display: grid; gap: .6rem; margin-bottom: 1.2rem; }
.resumo div { border-bottom: 1px solid var(--borda); padding-bottom: .5rem; }
.resumo dt { font-size: .85rem; color: var(--texto-2); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.resumo dd { font-weight: 600; }
.resumo .obs { display: block; font-weight: 500; color: var(--texto-2); font-size: .9rem; }

.selo-previa { display: inline-block; background: var(--azul-escuro); color: #fff; border-radius: 999px; padding: .2rem .8rem; font-size: .88rem; font-weight: 650; margin: .2rem 0 .6rem; }
.balao { background: #e9eef5; border: 1px solid var(--prata); border-radius: 14px; padding: .9rem; max-height: 36rem; overflow: auto; }
.mensagem { font-size: .93rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--azul-escuro); }
.mensagem strong { font-weight: 750; }

.confirmacao { margin-top: 1.25rem; }
.selo { display: inline-block; background: var(--cinza-fundo); border: 1px solid var(--prata); color: var(--azul-escuro); border-radius: 999px; padding: .15rem .7rem; font-size: .85rem; font-weight: 650; margin: .2rem 0 .8rem; }
.confirmacao ol { padding-left: 1.3rem; display: grid; gap: .4rem; margin-bottom: .8rem; }

.rodape { max-width: 1080px; margin: 0 auto; padding: 1rem 1rem 2.5rem; color: var(--texto-2); font-size: .9rem; border-top: 1px solid var(--prata); display: grid; gap: .3rem; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* bandeiras SVG locais (decorativas) */
.bandeira-sel { width: 1.5rem; height: 1.5rem; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px var(--prata); }
.combo-opcao .bandeira { width: 1.4rem; height: 1.4rem; min-width: 1.4rem; border-radius: 50%; align-self: center; box-shadow: 0 0 0 1px var(--prata); background: var(--cinza-fundo); }

/* novos temas em preparação */
.em-preparacao { border: 1.5px dashed var(--prata); border-radius: 12px; padding: .9rem; background: var(--cinza-claro); }
.em-preparacao legend { padding: 0 .35rem; margin-left: -.35rem; }
.em-preparacao .tema { background: #fff; border-style: dashed; }
.bandeira-resumo { width: 1.25rem; height: 1.25rem; border-radius: 50%; vertical-align: -0.2em; box-shadow: 0 0 0 1px var(--prata); }

/* cadastro real: aviso de dados, falha de envio e botão ocupado */
.dados-guardados { background: #f3f5f8; border: 1px solid var(--prata); border-radius: 10px; padding: .7rem .9rem; margin: 1rem 0 .8rem; font-size: .92rem; color: var(--azul-escuro); }
.dados-guardados p { margin: 0 0 .35rem; }
.dados-guardados p:last-child { margin-bottom: 0; }
.aviso-envio { background: var(--erro-fundo); border: 1.5px solid var(--erro); border-radius: 10px; padding: .7rem .9rem; margin: .6rem 0; }
.aviso-envio[hidden] { display: none; }
.botao:disabled { opacity: .65; cursor: progress; }

/* confirmação do número */
.confirmar { border-top: 1px solid var(--prata); margin: 1rem 0; padding-top: 1rem; }
.confirmar h3 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--azul-escuro); }
.confirmar[hidden], #form-codigo[hidden] { display: none; }
#codigo { font-size: 1.5rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; max-width: 14rem; }
.acoes-codigo { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .6rem; }
.acoes-codigo .botao { margin: 0; }

/* gerenciar assinatura */
.acesso-gestao { margin: .4rem 0 0; }
.link-botao { font: inherit; background: none; border: 0; padding: .25rem 0; color: var(--azul); text-decoration: underline; cursor: pointer; font-weight: 600; }
.link-botao:hover { color: var(--azul-2); }
.modo-gestao .so-cadastro { display: none !important; }
#area-gestao [hidden] { display: none !important; }
.perigo { border-top: 1px solid var(--prata); margin-top: 1.2rem; padding-top: 1rem; }
.perigo h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--erro); }
.perigo-botao { background: var(--erro); border-color: var(--erro); }
.perigo-botao:hover { background: #8c1d1d; border-color: #8c1d1d; }
#g-confirma { background: var(--erro-fundo); border: 1.5px solid var(--erro); border-radius: 10px; padding: .8rem 1rem; margin-top: .6rem; }
#g-codigo-campo { font-size: 1.5rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; max-width: 14rem; }

/* página de privacidade (privacidade.html): leitura simples, sem estilo em linha (a CSP não permite) */
.conteudo { max-width: 46rem; margin: 2rem auto; padding: 0 1rem; line-height: 1.5; }
