/* ==========================================================================
   Athena Assessoria Especializada — Ficha de Alinhamento (Dados do Negócio)
   Página /formulario/ · independente do main.css da landing page
   Paleta: docs/athena-brand.md
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  /* Paleta aprovada */
  --navy-950: #020B1C;
  --navy-900: #05132D;
  --navy-800: #0B1F45;
  --navy-700: #1A2F5C;
  --gold-300: #F3DC72;
  --gold-500: #E5C85A;
  --gold-600: #D4AF2E;
  --gold-ink: #7A5C17;
  --off-white: #F6F3EC;
  --white: #FFFFFF;
  --ink: #1A2233;
  --text-on-dark: #F3F1EA;
  --muted-on-dark: #A9B3C6;
  --slate: #4A5468;

  --navy-950-rgb: 2 11 28;
  --navy-700-rgb: 26 47 92;
  --gold-500-rgb: 229 200 90;
  --ink-rgb: 26 34 51;
  --light-blue-rgb: 59 91 160;

  /* Ação destrutiva (remover blocos) */
  --danger: #B42318;
  --danger-strong: #912018;
  --danger-rgb: 180 35 24;
  --danger-bg: #FEF3F2;

  /* Semânticos da ficha */
  --page-bg: var(--off-white);
  --surface: var(--white);
  --surface-soft: #FBFAF6;
  --border: rgb(var(--ink-rgb) / .12);
  --border-strong: rgb(var(--ink-rgb) / .2);
  --heading: var(--navy-900);
  --text: var(--ink);
  --text-soft: var(--slate);

  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(var(--ink-rgb) / .05), 0 12px 32px -20px rgb(var(--ink-rgb) / .28);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --progress-h: 60px;
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* Campos focados não ficam sob a barra de progresso fixa */
  scroll-padding-top: calc(var(--progress-h) + 24px);
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg { display: block; max-width: 100%; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--navy-800);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gold-500);
  color: var(--navy-950);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible { transform: none; }

/* ==========================================================================
   Cabeçalho navy
   ========================================================================== */
.topbar {
  padding: 20px 16px 76px;
  background:
    radial-gradient(60% 90% at 85% 10%, rgb(var(--light-blue-rgb) / .22), transparent 70%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: var(--text-on-dark);
}

.topbar__inner {
  max-width: 880px;
  margin: 0 auto;
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: 12px;
}

.brand__emblem {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  box-shadow: 0 0 0 1px rgb(var(--gold-500-rgb) / .35), 0 10px 24px -12px rgb(0 0 0 / .6);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  line-height: 1;
}

.brand__name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--white);
}

.brand__tagline {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: 0 .25rem;
  border-radius: 8px;
  color: var(--muted-on-dark);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease-out);
}

.back-link:hover { color: var(--gold-500); }
.back-link .icon { width: 16px; height: 16px; }
.topbar :focus-visible { outline-color: var(--gold-500); }

.topbar__heading {
  margin-top: clamp(28px, 5vw, 44px);
  text-align: center;
}

.topbar__title {
  margin: 0;
  font-size: clamp(1.625rem, 1.25rem + 1.6vw, 2.375rem);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.topbar__text {
  max-width: 36rem;
  margin: .875rem auto 0;
  color: var(--muted-on-dark);
  font-size: clamp(.9375rem, .9rem + .2vw, 1.0625rem);
  text-wrap: balance;
}

/* Celular: marca um pouco menor e tagline em duas linhas (lockup), sem disputar espaço
   com o link "Voltar ao site" */
@media (max-width: 479.98px) {
  .brand { gap: .75rem; }
  .brand__emblem { width: 48px; height: 48px; border-radius: 11px; }
  .brand__text { gap: .35rem; }
  .brand__name { font-size: 1.25rem; }

  .brand__tagline {
    font-size: .6875rem;
    letter-spacing: .14em;
    line-height: 1.25;
  }

  .brand__tagline > span { display: block; }
}

/* ==========================================================================
   Área do formulário
   ========================================================================== */
.wrap {
  max-width: 880px;
  margin: -44px auto 0;
  padding: 0 16px 48px;
}

/* Barra de progresso (fixa no topo durante o preenchimento) */
.progress {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--progress-h);
  margin-bottom: 20px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(255 255 255 / .96);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.progress__label {
  min-width: 7.5em;
  font-size: .875rem;
  font-weight: 600;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.progress__track {
  position: relative;
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--off-white);
  box-shadow: inset 0 0 0 1px var(--border);
}

.progress__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-ink), var(--gold-600) 55%, var(--gold-500));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ease-out);
}

/* ---------- Cards expansíveis ---------- */
.ficha { margin: 0; }

.card {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card__heading { margin: 0; }

.card__toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 18px 22px;
  border: 0;
  background: var(--surface);
  color: var(--heading);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s var(--ease-out);
}

.card__toggle:hover { background: var(--surface-soft); }

.card__toggle:focus-visible {
  outline: 2px solid var(--gold-ink);
  outline-offset: -4px;
  border-radius: var(--radius);
}

.card__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-500);
  font-size: .875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.card__titles {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.card__title {
  font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.card__hint {
  font-size: .8125rem;
  font-weight: 400;
  color: var(--text-soft);
}

.card__chevron {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out);
}

.card__chevron::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.75px solid var(--navy-900);
  border-bottom: 1.75px solid var(--navy-900);
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform .25s var(--ease-out);
}

/* Fechado: seta para a direita; aberto: seta para baixo e destaque dourado */
.card__toggle[aria-expanded="false"] .card__chevron::before { transform: translate(-65%, -50%) rotate(-45deg); }
.card__toggle[aria-expanded="true"] .card__chevron { border-color: rgb(var(--gold-500-rgb) / .7); background: rgb(var(--gold-500-rgb) / .18); }

/* Expansão discreta; os campos continuam no DOM (dados preservados) */
.card__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .3s var(--ease-out);
}

.card__inner { min-height: 0; overflow: hidden; }

.card__body {
  padding: 4px 22px 24px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.card.is-collapsed .card__panel { grid-template-rows: 0fr; }

.card.is-collapsed .card__inner {
  visibility: hidden;
  transition: visibility 0s .3s;
}

/* ---------- Campos ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.grid--spaced { margin-bottom: 20px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--full { grid-column: 1 / -1; }
.field[hidden] { display: none; }

.field label {
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--heading);
}

/* Obrigatório: asterisco depois do rótulo (fora do texto do label, que vai para o resumo e o pacote).
   O leitor de tela já anuncia "obrigatório" pelo atributo required. */
.field:has(> [required]) > label::after {
  content: "*";
  content: "*" / "";
  margin-left: 3px;
}

.field:has(> [required]) > label::after,
.req-mark {
  color: var(--gold-ink);
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1;
}

.ficha__legend {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: .875rem;
}

.ficha__legend .req-mark { margin: 0 1px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font: inherit;
  /* 16px evita o zoom automático do iOS ao focar */
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

/* Texto livre curto (data / momento da posse): duas linhas */
.field textarea.textarea--short { min-height: 76px; }

/* Celular: o exemplo do placeholder ocupa três linhas */
@media (max-width: 559.98px) {
  .field textarea.textarea--short { min-height: 100px; }
}

.field select {
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2305132D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat,
    var(--white);
  cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder { color: rgb(var(--ink-rgb) / .45); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgb(var(--ink-rgb) / .32); }

/* Foco: borda em dourado de texto + anel dourado suave
   (:focus, e não :focus-visible: em campos de preenchimento o realce também deve aparecer ao clicar) */
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-ink);
  box-shadow: 0 0 0 3px rgb(var(--gold-500-rgb) / .45);
}

.field select:has(option[value=""]:checked) { color: rgb(var(--ink-rgb) / .55); }

.is-uppercase { text-transform: uppercase; }

/* Campo condicional "Outro": entrada discreta */
.field--other:not([hidden]) { animation: field-in .25s var(--ease-out); }

@keyframes field-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.subhead {
  display: flex;
  align-items: center;
  gap: .625rem;
  grid-column: 1 / -1;
  margin: 8px 0 -4px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.subhead::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Blocos dinâmicos (corretores e pagamentos) ---------- */
.blocks {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.block {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.block--payment { border-left: 3px solid var(--gold-500); }

.block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.block__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
}

.block--payment .block__title { color: var(--gold-ink); }

.block.is-new { animation: block-in .3s var(--ease-out); }

@keyframes block-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 1.125rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out), transform .15s var(--ease-out);
}

.btn:active { transform: translateY(1px); }

.btn--add {
  border-color: rgb(var(--ink-rgb) / .22);
  background: var(--white);
  color: var(--navy-900);
}

.btn--add .icon { color: var(--gold-ink); }

.btn--add:hover {
  border-color: var(--navy-800);
  background: var(--surface-soft);
}

.btn--remove {
  min-height: 40px;
  padding: 0 .875rem;
  border-color: rgb(var(--danger-rgb) / .35);
  background: var(--white);
  color: var(--danger);
  font-size: .875rem;
}

.btn--remove .icon { width: 16px; height: 16px; }

.btn--remove:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.btn--remove:active:not(:disabled) {
  border-color: var(--danger-strong);
  color: var(--danger-strong);
}

.btn--remove:focus-visible { outline-color: var(--danger); }

.btn--remove:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn--primary {
  min-height: 52px;
  padding: 0 1.75rem;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 14px 28px -16px rgb(var(--navy-950-rgb) / .55);
}

.btn--primary:hover { background: var(--gold-300); }
.btn--primary:active { background: var(--gold-600); }

.btn--secondary {
  min-height: 52px;
  padding: 0 1.5rem;
  border-color: var(--border-strong);
  background: var(--white);
  color: var(--navy-900);
}

.btn--secondary:hover { border-color: var(--navy-800); }

.actions {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
}

.page-footer {
  margin-top: 24px;
  color: var(--text-soft);
  font-size: .8125rem;
  text-align: center;
  text-wrap: balance;
}

.page-footer p { margin: 0; }

.page-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.25rem;
  margin-top: 6px;
}

.page-footer__links a {
  display: inline-block;
  padding: .375rem 0;
  color: var(--text-soft);
  text-decoration: underline;
  text-decoration-color: rgb(var(--ink-rgb) / .25);
  text-underline-offset: .25em;
  transition: color .15s var(--ease-out), text-decoration-color .15s var(--ease-out);
}

.page-footer__links a:hover {
  color: var(--gold-ink);
  text-decoration-color: currentColor;
}

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

/* ==========================================================================
   Resumo (diálogo)
   ========================================================================== */
.summary {
  width: min(720px, calc(100% - 32px));
  /* substitui os limites padrão do navegador para <dialog> */
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px -20px rgb(var(--navy-950-rgb) / .55);
}

.summary[open] {
  display: flex;
  flex-direction: column;
}

.summary::backdrop {
  background: rgb(var(--navy-950-rgb) / .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.summary__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: var(--text-on-dark);
}

.summary__title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 600;
}

.summary__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(var(--navy-700-rgb));
  border-radius: 50%;
  background: rgb(255 255 255 / .06);
  color: var(--text-on-dark);
  cursor: pointer;
}

.summary__close:hover { border-color: var(--gold-500); color: var(--gold-500); }
.summary__close:focus-visible { outline-color: var(--gold-500); }

/* Cabeçalho, mensagem de envio e botões mantêm sempre a própria altura;
   só a área de revisão encolhe e rola. */
.summary__header,
.summary__status,
.summary__actions { flex-shrink: 0; }

/* flex-basis "auto" (e não 0%): com base 0%, versões do WebKit (Safari/iPhone e navegadores
   internos de apps, como o do WhatsApp) reduziam esta área a quase nada, porque o diálogo
   só tem max-height. min-height: 0 permite encolher até caber e rolar por dentro. */
.summary__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 22px 22px;
}

.summary__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

@media (max-width: 479.98px) {
  /* Altura definida (~88% da área visível): a área de revisão ocupa todo o espaço entre
     cabeçalho e botões. dvh acompanha as barras do navegador (Safari e navegadores
     internos de apps); vh é o fallback. */
  .summary {
    width: calc(100% - 16px);
    height: 85vh;
    height: 88dvh;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
  }

  .summary__header { padding: 14px 16px 14px 20px; }
  .summary__content { padding: 4px 16px 18px; }
  .summary__status { padding: .75rem 16px; }

  .summary__actions {
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .summary__actions .btn { flex: 1 1 100%; }

  /* A página ao fundo não rola enquanto o resumo está aberto */
  html:has(.summary[open]) { overflow: hidden; }
}

/* ---------- Conteúdo do resumo (tela e impressão) ---------- */
.sum-meta {
  margin: 14px 0 4px;
  color: var(--text-soft);
  font-size: .875rem;
}

.sum-section { padding: 18px 0 4px; }
.sum-section + .sum-section { border-top: 1px solid var(--border); }

.sum-section__title {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
}

.sum-section__num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-500);
  font-size: .75rem;
  font-weight: 600;
}

.sum-group {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.sum-group__title {
  margin: 0 0 8px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gold-ink);
}

.sum-group__sub {
  margin: 12px 0 6px;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.sum-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 0 0 12px;
}

.sum-item { min-width: 0; }
.sum-item--full { grid-column: 1 / -1; }

.sum-item dt {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-soft);
}

.sum-item dd {
  margin: 2px 0 0;
  font-size: .9375rem;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sum-empty { color: rgb(var(--ink-rgb) / .45); font-style: italic; }

@media (max-width: 559.98px) {
  .sum-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 639.98px) {
  .topbar { padding-bottom: 68px; }

  .wrap { padding-inline: 12px; }

  .progress {
    top: 8px;
    gap: 12px;
    padding: 12px 16px;
  }

  .card__toggle {
    gap: 12px;
    padding: 16px;
  }

  .card__body { padding: 18px 16px 20px; }

  .grid { grid-template-columns: 1fr; }

  .block { padding: 14px; }

  .blocks + .btn--add,
  .btn--add { width: 100%; }

  .actions .btn--primary { width: 100%; }
}

/* ==========================================================================
   Movimento reduzido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* ==========================================================================
   Envio para a Athena: validação, mensagens e confirmação
   ========================================================================== */

/* Anti-robô: fora da área visível (não usar display:none) */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Campo com erro */
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgb(var(--danger-rgb) / .16);
}

.field__error {
  margin: 0;
  color: var(--danger);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Aviso junto ao botão "Revisar e gerar resumo" */
.actions {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.form-alert {
  margin: 0;
  padding: .625rem 1rem;
  border: 1px solid rgb(var(--danger-rgb) / .3);
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: var(--danger-strong);
  font-size: .9375rem;
  font-weight: 600;
  text-align: center;
}

.form-alert[hidden] { display: none; }

/* Mensagem de envio dentro do diálogo */
.summary__status {
  margin: 0;
  padding: .875rem 22px;
  border-top: 1px solid var(--border);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5;
}

.summary__status[hidden] { display: none; }
.summary__status.is-info { background: var(--surface-soft); color: var(--navy-900); }
.summary__status.is-erro { background: var(--danger-bg); color: var(--danger-strong); }

/* Formulário travado (durante o envio e depois de concluído) */
.ficha.is-locked { opacity: .72; }

.btn:disabled { cursor: not-allowed; }
.btn--primary:disabled,
.btn--secondary:disabled { opacity: .65; }

/* Confirmação */
.sent {
  padding: 28px 4px 12px;
  text-align: center;
}

.sent__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--heading);
}

.sent__title::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border: 1px solid rgb(var(--gold-500-rgb) / .6);
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A5C17' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 26px no-repeat,
    rgb(var(--gold-500-rgb) / .18);
}

.sent__protocol,
.sent-banner__protocol {
  margin: .875rem 0 0;
  font-size: 1.125rem;
  color: var(--text);
}

.sent__protocol strong,
.sent-banner__protocol strong {
  display: inline-block;
  padding: .15rem .75rem;
  border-radius: 8px;
  background: var(--navy-900);
  color: var(--gold-500);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.sent__text,
.sent-banner__text {
  max-width: 34rem;
  margin: .75rem auto 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.sent-banner {
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid rgb(var(--gold-500-rgb) / .55);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}

.sent-banner[hidden] { display: none; }
.sent-banner:focus { outline: none; }
.sent-banner:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; }

.sent-banner__title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--heading);
}

.sent-banner .btn { margin-top: 1rem; }
