@import url("tokens.css");

/* Linguagem visual: painéis em cartões com borda fina e elevação suave, cabeçalho em faixa escura,
   números grandes e tabulares, fichas (chips) de estado, barras espessas, estados com cor e ícone.
   Todos os valores vêm de tokens.css. */

* { box-sizing: border-box; }
html { font-size: 125%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fs-base)/var(--lh-base) var(--font-sans);
  overflow-wrap: break-word;
}
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
h1 { font-size: var(--fs-2xl); line-height: var(--lh-tight); margin: 0 0 var(--sp-2); font-weight: 800; letter-spacing: -.005em; }
h2 { font-size: var(--fs-xl); line-height: 1.3; margin: var(--sp-5) 0 var(--sp-2); font-weight: 800; }
h3 { font-size: var(--fs-lg); margin: var(--sp-4) 0 var(--sp-2); }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
}
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--text); padding: 12px 16px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; top: 8px; z-index: 20; }
.ico { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* Cabeçalho em faixa */
.topo {
  background: linear-gradient(160deg, var(--hero-bg) 0%, var(--hero-bg-2) 100%);
  color: var(--hero-text);
  padding: var(--sp-5) 0 var(--sp-6);
  border-bottom: 4px solid var(--accent);
}
.topo a { color: var(--hero-text); }
.marca {
  font-size: var(--fs-sm); line-height: 1.2; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 var(--sp-3); color: var(--hero-muted);
}
.selo-indep {
  display: inline-block; margin: 0 0 var(--sp-3);
  padding: 4px 14px;
  border: 2px solid var(--hero-chip-border); border-radius: var(--r-pill);
  background: var(--hero-chip-bg);
  color: var(--hero-text); font-size: var(--fs-sm); font-weight: 700; line-height: 1.5;
}
.selo-indep .ico { display: none; }
.topo h1 { color: var(--hero-text); font-size: 1.75rem; }
.aviso-indep { margin: 0; color: var(--hero-muted); }
.contagem {
  margin: var(--sp-4) 0 0; padding: var(--sp-2) var(--sp-4);
  display: inline-block;
  background: var(--hero-chip-bg); border: 2px solid var(--hero-chip-border); border-radius: var(--r-md);
  color: var(--hero-text);
}
.contagem[hidden] { display: none; }
.contagem strong { font-variant-numeric: tabular-nums; font-size: var(--fs-xl); }

main.wrap { padding-top: var(--sp-1); padding-bottom: var(--sp-2); }

/* Alerta da fila */
.destaque {
  display: flex; gap: var(--sp-4); align-items: flex-start;
  background: var(--warn-bg);
  border: var(--bw) solid var(--warn-border);
  border-left: 10px solid var(--warn-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin: var(--sp-5) 0;
  color: var(--text);
  box-shadow: var(--shadow-raised);
}
.destaque > div { min-width: 0; flex: 1; }
.ico-alerta { width: 2.4rem; height: 2.4rem; flex: none; fill: var(--warn-border); }
.destaque h2 { margin: 0 0 var(--sp-1); color: var(--warn); }
.destaque p { margin: 0; font-weight: 600; }
.destaque .contador-prazo {
  display: block;
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: var(--bw-forte) solid var(--warn-border);
  border-radius: var(--r-md);
  font-size: 1.45rem;
  line-height: 1.3;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--warn);
}
.destaque .contador-prazo[hidden] { display: none; }

@media (max-width: 30rem) {
  .destaque { flex-direction: column; gap: var(--sp-2); border-left-width: var(--bw); border-top: 10px solid var(--warn-border); }
  .destaque > div { width: 100%; }
}

/* Sucesso */
.sucesso {
  background: var(--surface);
  border: var(--bw) solid var(--ok-border);
  border-top: 10px solid var(--ok-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-4);
  margin: var(--sp-5) 0;
  box-shadow: var(--shadow-raised);
}
.sucesso[hidden] { display: none; }
.sucesso h2 { margin: var(--sp-1) 0 var(--sp-2); color: var(--ok); }
.selo-ok { width: 3.5rem; height: 3.5rem; display: block; }
.selo-ok circle { fill: var(--ok-bg); stroke: var(--ok-border); stroke-width: 3; }
.selo-ok path { fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.protocolo {
  font: 700 1.6rem/1.3 var(--font-mono);
  letter-spacing: .06em;
  margin: var(--sp-1) 0 var(--sp-3);
  padding: var(--sp-4) var(--sp-3);
  background: var(--surface-2);
  border: var(--bw) dashed var(--border);
  border-radius: var(--r-md);
  user-select: all;
  overflow-wrap: anywhere;
}
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.links li {
  background: var(--surface-2);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.cartao-t { display: block; font-weight: 700; }
.links a, .sucesso .nota a, .rodape a, .voltar a { display: inline-block; padding: 14px 0; min-height: var(--alvo); font-weight: 600; }
.nota { color: var(--muted); }

.privacidade {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 8px solid var(--accent);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-5) 0;
}

.aviso-dados {
  background: var(--accent-soft);
  border: var(--bw) solid var(--accent);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-3) 0;
}
.aviso-dados p { margin: 0 0 var(--sp-2); }
.aviso-dados ul { margin: 0; padding-left: 1.2rem; }
.aviso-dados li { margin: 6px 0; }

/* Formulário em etapas numeradas, cada uma um cartão */
form { counter-reset: etapa; padding-bottom: var(--sp-2); }
fieldset {
  counter-increment: etapa;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin: var(--sp-5) 0;
  padding: var(--sp-1) var(--sp-4) var(--sp-4);
  min-width: 0;
}
legend {
  display: flex; align-items: center; gap: var(--sp-3);
  font-weight: 800; font-size: var(--fs-xl); line-height: 1.3;
  padding: var(--sp-3) 0 var(--sp-2); float: left; width: 100%; margin-bottom: var(--sp-1);
  border-bottom: 1px solid var(--line);
}
legend::before {
  content: counter(etapa);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; flex: none;
  border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-text);
  font-size: var(--fs-lg); font-variant-numeric: tabular-nums;
}
fieldset > legend + * { clear: both; }
.campo { margin: var(--sp-4) 0 18px; }
.campo[hidden], .erro[hidden], .msg-geral[hidden] { display: none; }
label, .rotulo { display: block; font-weight: 700; margin: 0 0 6px; }
.obr { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="time"], select, textarea {
  width: 100%;
  min-height: var(--alvo);
  padding: var(--sp-3) 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: var(--r-md);
}
input[type="text"]:focus, input[type="time"]:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--accent-soft); }
textarea { resize: vertical; }
.linha { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 40rem) { .linha { grid-template-columns: 1fr 1fr; gap: var(--sp-4); } }
.ajuda { color: var(--muted); margin: 6px 0 0; }
.erro { color: var(--danger); font-weight: 700; margin: 6px 0 0; }
.erro::before { content: "\26A0  Erro: "; }
.invalido input[type="text"], .invalido input[type="time"], .invalido select, .invalido textarea { border-color: var(--danger); border-width: var(--bw-forte); background: var(--danger-bg); color: var(--text); }
.invalido .rotulo, .invalido label { color: var(--danger); }
.invalido .opcao { border-color: var(--danger); border-width: var(--bw-forte); }

.opcao, .check { display: flex; align-items: flex-start; gap: var(--sp-3); }
#resultado-opcoes { display: grid; gap: 10px; }
.opcao {
  min-height: var(--alvo); align-items: center;
  border: var(--bw) solid var(--border); border-radius: var(--r-md); padding: 0 14px;
  background: var(--surface);
}
.opcao:has(input:checked) { border-color: var(--accent); border-width: var(--bw-forte); background: var(--accent-soft); }
.opcao:has(input:checked) label::after { content: " (selecionado)"; font-weight: 400; }
.opcao:has(input:focus-visible) { outline: 4px solid var(--focus); outline-offset: 2px; }
.opcao input:focus-visible { outline: none; }
.opcao label, .check label { margin: 0; font-weight: 600; flex: 1; padding: 14px 0; min-height: var(--alvo); }
.opcao input, .check input { width: 1.6rem; height: 1.6rem; margin: 14px 0 0; flex: none; accent-color: var(--accent); }
.opcao input { margin: 0; }
.check { min-height: var(--alvo); }

.isca { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.msg-geral {
  background: var(--danger-bg);
  border: var(--bw) solid var(--danger);
  border-left: 10px solid var(--danger);
  color: var(--text);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0;
  font-weight: 600;
}
.msg-geral::before { content: "\26A0  Atenção: "; color: var(--danger); font-weight: 800; }
.msg-geral ul { margin: .5rem 0 0; padding-left: 1.4rem; font-weight: 400; }

.btn {
  display: block;
  width: 100%;
  min-height: 60px;
  padding: var(--sp-3) var(--sp-4);
  font: inherit;
  font-weight: 800;
  color: var(--accent-text);
  background: var(--accent);
  border: 3px solid var(--accent);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sec { background: transparent; color: var(--link); border-color: var(--link); margin: var(--sp-3) 0; box-shadow: none; }
.btn-sec:hover { background: var(--accent-soft); border-color: var(--link); }
.btn.copiado { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.btn:disabled { opacity: .7; cursor: wait; }
.status { color: var(--muted); min-height: 1.6em; margin: var(--sp-2) 0; }
.barra-envio { margin: var(--sp-5) 0; }

.rodape { color: var(--muted); padding-top: var(--sp-4); padding-bottom: var(--sp-6); border-top: 1px solid var(--line); margin-top: var(--sp-4); }

/* Painel (marcação atual; os tokens são compartilhados com painel.css) */
.cartao-total {
  background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--accent);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  padding: var(--sp-1) var(--sp-4) var(--sp-3); margin: var(--sp-2) 0 var(--sp-4);
}
.cartao-total h2 { margin-top: var(--sp-3); }
.total .numero { font-size: var(--fs-kpi); font-weight: 800; margin: 0; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.barras { display: grid; gap: 14px; margin: var(--sp-2) 0 20px; }
.barras .vazio { color: var(--muted); margin: 0; }
.item .topo-item { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.item .num { font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.item .trilho { background: var(--bar-bg); border-radius: var(--r-pill); height: 16px; margin-top: 6px; overflow: hidden; }
.item .barra { background: var(--bar); height: 100%; border-radius: var(--r-pill); }
.cartoes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.cartoes .item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: var(--sp-3) var(--sp-4); }
.cartoes .topo-item { flex-direction: column-reverse; gap: 0; }
.cartoes .num { font-size: 2.2rem; line-height: 1.1; color: var(--accent); }
.w0 { width: 0; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Telas largas: mais respiro, mesmas proporções */
@media (min-width: 48rem) {
  .topo { padding: 40px 0 44px; }
  .topo h1 { font-size: 2.1rem; }
  fieldset { padding: var(--sp-1) var(--sp-5) var(--sp-5); }
  .destaque { padding: var(--sp-5); }
  .btn { max-width: 24rem; margin-left: auto; margin-right: auto; }
}

/* Módulo de caronas (visual neutro) */
.lista-avisos { margin: .5rem 0 0; padding-left: 1.2rem; font-weight: 400; }
.lista-avisos li { margin-bottom: .5rem; }
.nav-caronas { display: grid; gap: var(--sp-1); margin: var(--sp-4) 0; }
.nav-caronas .btn { margin: 0; }
.nav-caronas .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.lista-cartoes { list-style: none; padding: 0; margin: var(--sp-3) 0; display: grid; gap: var(--sp-3); }
.cartao-carona { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: var(--sp-3) var(--sp-4); margin: var(--sp-3) 0; }
.lista-cartoes .cartao-carona { margin: 0; }
.cartao-carona h3 { margin-top: 0; }
.dado { margin: .25rem 0; }

/* ========== Visual v3: hero, faixa de status, assistente em etapas, tela de sucesso ========== */

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--hero-bg) 0%, var(--hero-bg-2) 100%);
  color: var(--hero-text);
  padding: var(--sp-5) 0 var(--sp-6);
}
.hero .wrap { position: relative; }
.marca-hero { display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-5); font-weight: 800; font-size: var(--fs-lg); letter-spacing: .01em; }
.logo { width: 2.2rem; height: 2.2rem; flex: none; }
.logo rect { fill: var(--hero-text); }
.logo path { fill: none; stroke: var(--hero-bg); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.hero h1 {
  margin: 0 0 var(--sp-3); color: var(--hero-text);
  font-size: var(--fs-hero); line-height: 1.12; font-weight: 850; letter-spacing: -.02em; text-wrap: balance;
}
.hero .sub { margin: 0 0 var(--sp-5); font-size: var(--fs-lg); line-height: 1.45; color: var(--hero-muted); max-width: 30rem; }
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 72px; padding: var(--sp-3) var(--sp-5);
  background: var(--cta-bg); color: var(--cta-text);
  border-radius: var(--r-lg);
  font-size: var(--fs-xl); font-weight: 850; line-height: 1.2; text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18), 0 14px 28px -12px rgba(0, 0, 0, .55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta:hover { transform: translateY(-2px); }
.cta:active { transform: translateY(1px) scale(.99); }
.cta:focus-visible, .atalho:focus-visible { outline: 4px solid var(--hero-text); outline-offset: 3px; }
.ico-cta { width: 1.8rem; height: 1.8rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.cta:hover .ico-cta { transform: translateX(4px); }
.indep { margin: var(--sp-4) 0 var(--sp-5); font-size: var(--fs-sm); line-height: 1.5; color: var(--hero-muted); }
.atalhos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.atalho {
  display: flex; flex-direction: column; gap: 2px; height: 100%; min-height: 56px;
  padding: var(--sp-4) var(--sp-3);
  background: var(--hero-card); color: var(--hero-text);
  border: 2px solid rgba(255, 255, 255, .38); border-radius: var(--r-lg);
  text-decoration: none; transition: transform .15s ease, background-color .15s ease;
}
.atalho:hover { background: var(--hero-card-hover); transform: translateY(-2px); }
.atalho:active { transform: scale(.98); }
.ico-atalho { width: 2.4rem; height: 2.4rem; fill: currentColor; margin-bottom: var(--sp-2); }
.atalho-t { font-weight: 800; font-size: var(--fs-base); line-height: 1.25; }
.atalho-d { font-size: var(--fs-sm); line-height: 1.35; color: var(--hero-muted); }
@media (max-width: 26rem) {
  .atalhos { grid-template-columns: 1fr; }
  .atalho { flex-direction: row; align-items: center; flex-wrap: wrap; column-gap: var(--sp-3); }
  .ico-atalho { margin: 0; }
  .atalho-t { flex: 1; min-width: 0; }
  .atalho-d { flex-basis: 100%; padding-left: calc(2.4rem + var(--sp-3)); }
}
@media (min-width: 48rem) {
  .hero { padding: 48px 0 56px; }
  .atalho { padding: var(--sp-4); }
}

/* Faixa de status */
.faixa { background: var(--warn-bg); border-bottom: var(--bw) solid var(--warn-border); color: var(--text); }
.faixa-in { display: flex; gap: var(--sp-3); align-items: flex-start; padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.ico-relogio { width: 2.2rem; height: 2.2rem; flex: none; fill: none; stroke: var(--warn); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.faixa-txt { min-width: 0; flex: 1; }
.faixa h2 { margin: 0 0 2px; font-size: var(--fs-lg); line-height: 1.25; color: var(--warn); }
.faixa p { margin: 0; line-height: 1.45; font-weight: 600; }
.faixa .contador-prazo {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--sp-2); row-gap: 0;
  margin-top: var(--sp-2); color: var(--warn); font-weight: 700;
}
.faixa .contador-prazo[hidden] { display: none; }
.cont-rot { font-size: var(--fs-base); }
.cont-num { font-size: clamp(1.5rem, 8vw, 2.1rem); line-height: 1.1; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.cont-txt { font-size: var(--fs-sm); flex-basis: 100%; font-weight: 600; color: var(--text); }
.faixa .contador-prazo.encerrado { font-size: var(--fs-lg); }
.faixa .contagem {
  display: block; margin: var(--sp-2) 0 0; padding: 0; background: none; border: 0; border-radius: 0;
  color: var(--text); font-weight: 600;
}
.faixa .contagem[hidden] { display: none; }
.faixa .contagem strong { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; color: var(--warn); }

/* Formulário */
.titulo-form { margin: var(--sp-6) 0 var(--sp-3); font-size: 1.7rem; line-height: 1.15; font-weight: 850; letter-spacing: -.015em; scroll-margin-top: var(--sp-4); text-wrap: balance; }
.titulo-form[hidden] { display: none; }
.privacidade { border-left-width: 1px; border-radius: var(--r-lg); margin: var(--sp-3) 0 var(--sp-4); }
.privacidade[hidden] { display: none; }
fieldset { border-radius: 20px; box-shadow: var(--shadow-raised); }
legend { font-size: 1.45rem; font-weight: 850; letter-spacing: -.01em; }
legend::before { border-radius: 50%; width: 2.4rem; height: 2.4rem; }
label, .rotulo { font-size: var(--fs-base); font-weight: 800; margin-bottom: var(--sp-2); }
.campo { margin: var(--sp-5) 0; }
input[type="text"], input[type="time"], select, textarea {
  border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4);
  box-shadow: inset 0 2px 0 rgba(11, 26, 32, .06);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus, input[type="time"]:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px var(--accent-soft); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 3rem; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 26px) 50%, calc(100% - 18px) 50%;
  background-size: 8px 8px, 8px 8px; background-repeat: no-repeat;
}
.opcao { border-radius: var(--r-md); transition: border-color .15s ease, background-color .15s ease; }
.opcao input[type="radio"] {
  appearance: none; -webkit-appearance: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  border: 3px solid var(--border); background: var(--surface); flex: none; margin: 0;
}
.opcao input[type="radio"]:checked { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 45%, var(--surface) 50%); }

/* Assistente: ativo só com JavaScript (classe passos). */
.progresso { margin: 0 0 var(--sp-3); }
.progresso[hidden], .nav-etapas[hidden], .etapa-revisar[hidden] { display: none; }
.progresso-texto { margin: 0 0 var(--sp-2); font-size: var(--fs-lg); font-weight: 850; line-height: 1.3; }
.progresso-texto:focus { outline: none; }
.progresso-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progresso-seg span { height: 10px; border-radius: var(--r-pill); background: var(--bar-bg); transition: background-color .25s ease; }
.progresso-seg span.feito { background: var(--accent); }
.progresso-seg span.atual { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent); }
.passos fieldset { display: none; margin-top: var(--sp-3); }
.passos fieldset.atual { display: block; animation: etapa-in .25s ease both; }
.passos .barra-envio { display: none; margin-top: var(--sp-4); }
.passos.em-revisao .barra-envio { display: block; }
@keyframes etapa-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nav-etapas { display: flex; flex-direction: column; gap: var(--sp-3); margin: var(--sp-4) 0; }
.nav-etapas .btn { margin: 0; }
.nav-etapas .btn[hidden] { display: none; }

/* Resumo de revisão */
.resumo { display: grid; gap: var(--sp-4); margin-top: var(--sp-3); }
.res-grupo { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); }
.res-cab { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.res-cab h3 { margin: 0; font-size: var(--fs-lg); }
.btn-link {
  min-height: var(--alvo); padding: 0 var(--sp-3); font: inherit; font-weight: 800; color: var(--link);
  background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.resumo dl { margin: 0; }
.resumo dt { font-size: var(--fs-sm); color: var(--muted); font-weight: 700; margin-top: var(--sp-2); }
.resumo dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }

/* Botões */
.btn { border-radius: var(--r-lg); min-height: 64px; font-size: var(--fs-lg); transition: background-color .15s ease, border-color .15s ease, transform .1s ease; }
.btn:active:not(:disabled) { transform: scale(.985); }

/* Tela de sucesso */
.sucesso { text-align: center; border-radius: 24px; border-top-width: var(--bw); padding: var(--sp-6) var(--sp-4) var(--sp-5); }
.sucesso .selo-ok { width: 6rem; height: 6rem; margin: 0 auto var(--sp-2); }
.sucesso .selo-ok path { stroke-dasharray: 60; stroke-dashoffset: 0; animation: desenhar .6s .15s ease both; }
@keyframes desenhar { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
.sucesso h2 { font-size: 2rem; margin: 0 0 var(--sp-2); letter-spacing: -.015em; }
.sucesso-lead { margin: 0 0 var(--sp-2); }
.sucesso .protocolo { font-size: clamp(1.5rem, 8vw, 2.2rem); text-align: center; background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.sucesso h3 { text-align: left; font-size: var(--fs-xl); margin-top: var(--sp-5); }
.sucesso .links { text-align: left; }
.prox { display: grid; grid-template-columns: 3rem 1fr; column-gap: var(--sp-3); align-items: start; box-shadow: var(--shadow-card); background: var(--surface); border-radius: var(--r-lg); }
.prox .ico-prox { grid-row: 1 / span 2; width: 3rem; height: 3rem; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.prox .cartao-t { grid-column: 2; }
.prox a { grid-column: 2; justify-self: start; padding: 10px 0; }
.sucesso .nota { text-align: left; }

@media (prefers-reduced-motion: reduce) {
  .cta:hover, .atalho:hover, .btn:active { transform: none !important; }
}

/* Ajustes para larguras mínimas (zoom de 200% em celular) */
.atalhos > li, .cta > span, .faixa-txt, .atalho > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 15rem) {
  .ico-relogio { display: none; }
  .cta { padding-left: var(--sp-3); padding-right: var(--sp-3); }
  .ico-cta { display: none; }
  .atalhos { grid-template-columns: minmax(0, 1fr); }
}

/* ========== Página inicial e menu de 5 itens ========== */
.hero-min { padding: var(--sp-4) 0 var(--sp-3); }
.hero-min .marca-hero { margin-bottom: var(--sp-2); }
.hero-min .indep { margin: 0; }
.titulo-sec { margin: var(--sp-6) 0 var(--sp-3); font-size: 1.6rem; line-height: 1.15; font-weight: 850; letter-spacing: -.015em; text-wrap: balance; }

.cartoes-nav { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); scroll-margin-top: var(--sp-4); }
.cartao-nav {
  display: flex; align-items: center; gap: var(--sp-4); height: 100%; min-height: 88px;
  padding: var(--sp-4); text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cartao-nav:hover { transform: translateY(-2px); box-shadow: var(--shadow-raised); border-color: var(--accent); }
.cartao-nav:active { transform: scale(.985); }
.ico-card { width: 3rem; height: 3rem; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.cartao-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.cartao-nav-t { font-size: var(--fs-lg); font-weight: 850; line-height: 1.25; }
.cartao-nav-d { font-size: var(--fs-sm); line-height: 1.4; color: var(--muted); }
.destaque-nav { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.destaque-nav .ico-card { stroke: var(--accent-text); }
.destaque-nav .cartao-nav-d { color: var(--accent-text); }
.destaque-nav:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
@media (min-width: 40rem) {
  .cartoes-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cartao-nav { flex-direction: column; align-items: flex-start; min-height: 11rem; }
}

.passos-home { list-style: none; counter-reset: passo; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.passos-home li {
  counter-increment: passo; position: relative;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) 4.2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.passos-home li::before {
  content: counter(passo);
  position: absolute; left: var(--sp-4); top: var(--sp-3);
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-text); font-weight: 850; font-size: var(--fs-lg);
}
.passos-home strong { display: block; font-size: var(--fs-lg); }

.seguranca {
  display: flex; gap: var(--sp-4); align-items: flex-start;
  margin: var(--sp-6) 0 var(--sp-4); padding: var(--sp-4);
  background: var(--accent-soft); border: var(--bw) solid var(--accent); border-radius: 20px;
}
.seguranca > div { min-width: 0; }
.seguranca h2 { margin: 0 0 var(--sp-2); font-size: var(--fs-xl); line-height: 1.25; }
.seguranca p { margin: 0 0 var(--sp-2); }
.seguranca p:last-child { margin-bottom: 0; }
.ico-seg { width: 2.6rem; height: 2.6rem; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 26rem) { .seguranca { flex-direction: column; gap: var(--sp-2); } }

/* Menu com cinco itens: o último ocupa a linha inteira no celular */
nav.menu li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 48rem) {
  nav.menu ul { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  nav.menu li:last-child:nth-child(odd) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .cartao-nav:hover { transform: none !important; } }

.passos-home { grid-template-columns: minmax(0, 1fr); }
.passos-home li, .seguranca, .seguranca > div, .titulo-sec, .titulo-form { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 15rem) { .passos-home li { padding-left: var(--sp-4); padding-top: 3.4rem; } .menu a { overflow-wrap: anywhere; } }
/* Acessibilidade: placeholder legível nos dois temas e textos longos quebrando com zoom alto. */
::placeholder { color: var(--muted); opacity: 1; }
.opcao, .check, .opcao label, .check label { min-width: 0; overflow-wrap: anywhere; }

/* Aviso compacto no registro, horário em dois selects, textos longos com zoom alto */
.hero::before {
  content: ""; position: absolute; right: -4rem; top: -5rem; width: 16rem; height: 16rem; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .10); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; right: -1.5rem; top: -2.5rem; width: 10rem; height: 10rem; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .10); pointer-events: none;
}
.faixa-min .faixa-in { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.hora-par { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.hora-par label { font-weight: 700; }
legend, .opcao label, .check label, .res-cab h3, .rotulo, label { min-width: 0; overflow-wrap: anywhere; }
legend { max-width: 100%; }

.desde { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); line-height: 1.45; color: var(--hero-muted); }
.hero-min .desde { display: none; }

.sucesso:focus { outline: none; }
.sucesso .protocolo { font-size: clamp(1.1rem, 6.2vw, 2rem); letter-spacing: .03em; }

.passos legend::before { display: none; }
