/* Diagnóstico de Automação para PME — Automize
   Tokens alinhados com automize-tokens.css. Cores de texto validadas para ≥ 4,5:1. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  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 {
  --automize-blue: #126DF2;
  --automize-sky: #4AA7FF;
  --automize-navy: #0C1B38;
  --automize-text-soft: #4E678B;
  --automize-ice: #EAF4FF;
  --automize-bg: #F7FBFF;
  --automize-bg-2: #EEF6FF;
  --automize-white: #FFFFFF;
  --automize-success: #20B876;
  --automize-line: rgba(25, 103, 194, 0.11);
  --automize-shadow: 0 24px 70px rgba(34, 96, 179, 0.10);
  --automize-gradient-soft: linear-gradient(180deg, #FFFFFF 0%, #F7FBFF 55%, #EEF6FF 100%);
  --automize-radius-sm: 12px;
  --automize-radius-md: 18px;
  --automize-radius-lg: 30px;
  --automize-radius-xl: 40px;
  --automize-radius-pill: 999px;
  --automize-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Derivados com contraste validado */
  --text-strong: #264F7D;      /* 8,41:1 em branco */
  --text-kicker: #2A64AD;      /* 5,62:1 em #F3F9FF */
  --text-link: #0B5FCF;        /* 5,32:1 em Ice Blue */
  --btn-gradient: linear-gradient(135deg, #0A5FDC, #126DF2); /* texto branco ≥ 4,67:1 */
  --accent-gradient: linear-gradient(98deg, #0A5FDC, #2E86F0); /* texto grande ≥ 3,63:1 */
  --error: #B3263A;
  --success-text: #15784F;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --focus-ring: 2px solid var(--automize-blue);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--automize-font);
  color: var(--automize-navy);
  background: var(--automize-gradient-soft);
  line-height: 1.5;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(74, 167, 255, .16), transparent 26%),
    radial-gradient(circle at 88% 76%, rgba(18, 109, 242, .10), transparent 30%);
}
img { max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }

.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.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; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: var(--automize-radius-pill); background: var(--automize-blue); color: #fff; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Cabeçalho */
.top { padding: 18px 0 0; }
.nav {
  min-height: 62px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--automize-line);
  border-radius: var(--automize-radius-pill);
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 14px 38px rgba(24, 92, 173, .08);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; letter-spacing: .14em; color: #0B447E; border-radius: var(--automize-radius-sm); }
.brand img { width: 42px; height: 34px; object-fit: contain; }
.brand span { font-size: 13px; }
.nav-note { margin: 0; display: inline-flex; align-items: center; gap: 9px; color: var(--automize-text-soft); font-size: 13px; font-weight: 700; }
.nav-note i { width: 8px; height: 8px; border-radius: 50%; background: var(--automize-success); box-shadow: 0 0 0 6px rgba(32, 184, 118, .12); }

/* Layout principal */
main { padding: 28px 0 56px; }
.layout { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: 18px; align-items: stretch; }
.story, .experience { border: 1px solid var(--automize-line); border-radius: var(--automize-radius-xl); box-shadow: var(--automize-shadow); position: relative; }
.story {
  padding: 52px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(234, 244, 255, .72));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.story::before { content: ""; position: absolute; right: -32%; top: -20%; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(74, 167, 255, .22), transparent 66%); z-index: -1; }
.kicker { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 850; color: var(--text-kicker); }
.story h1 { font-size: clamp(40px, 4.8vw, 64px); line-height: .98; letter-spacing: -.05em; margin: 20px 0 18px; max-width: 690px; }
.accent { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story-lead { font-size: 17px; line-height: 1.65; color: var(--automize-text-soft); max-width: 540px; margin: 0; }
.proof { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--text-strong); font-size: 13px; font-weight: 750; }
.proof li { display: inline-flex; align-items: center; gap: 8px; }
.proof b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--automize-blue); font-size: 11px; box-shadow: 0 8px 20px rgba(21, 92, 184, .08); }
.signal { margin-top: auto; padding: 22px; border-radius: 26px; border: 1px solid rgba(24, 103, 197, .09); background: rgba(255, 255, 255, .62); }
.signal-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 12px; min-height: 44px; }
.signal-row + .signal-row { border-top: 1px solid rgba(25, 103, 194, .08); }
.signal-label { font-size: 12px; color: var(--automize-text-soft); }
.signal-line { height: 4px; border-radius: var(--automize-radius-pill); background: #DCECFF; overflow: hidden; }
.signal-line::after { content: ""; display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8ECBFF, var(--automize-blue)); transform-origin: left; animation: signal 3.6s ease-in-out infinite; }
.signal-row:nth-child(2) .signal-line::after { width: 52%; animation-delay: .5s; }
.signal-row:nth-child(3) .signal-line::after { width: 86%; animation-delay: 1s; }
.signal-value { font-size: 12px; font-weight: 800; color: var(--text-kicker); }
@keyframes signal { 0%, 100% { transform: scaleX(.45); opacity: .6; } 50% { transform: scaleX(1); opacity: 1; } }

/* Cartão do diagnóstico */
.experience { background: rgba(255, 255, 255, .9); display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 12px; }
.experience:focus { outline: none; }
.progress { padding: 26px 40px 0; }
.progress-label { margin: 0 0 10px; color: var(--automize-text-soft); font-size: 13px; font-weight: 750; }
.progress-track { height: 6px; background: var(--automize-bg-2); border-radius: var(--automize-radius-pill); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #67BAFF, var(--automize-blue)); transition: width .45s var(--ease); }
.stage-root { flex: 1; display: flex; }
.stage { width: 100%; padding: 40px 40px 44px; display: flex; flex-direction: column; }
/* Só anima depois da primeira interação, para não atrasar a primeira pintura. */
.stage-root.is-live .stage { animation: stageIn .35s var(--ease); }
@keyframes stageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-label { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 850; color: var(--text-kicker); }
.stage h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.06; letter-spacing: -.04em; margin: 14px 0 12px; }
.stage h2:focus { outline: none; }
.stage h2:focus-visible { outline: var(--focus-ring); outline-offset: 4px; border-radius: 6px; }
.stage[data-view="intro"] h2 { font-size: clamp(32px, 3.8vw, 50px); }
.sub { font-size: 16px; color: var(--automize-text-soft); line-height: 1.6; margin: 0; max-width: 620px; }
.intro-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0 0; }
.intro-list li { padding: 14px; border-radius: 16px; background: var(--automize-bg); border: 1px solid var(--automize-line); color: var(--automize-text-soft); font-size: 13px; line-height: 1.45; }
.intro-list strong { display: block; color: var(--text-strong); margin-bottom: 4px; font-size: 13.5px; }
.noscript { margin-top: 20px; color: var(--automize-text-soft); }

/* Opções */
.options { display: grid; gap: 10px; margin-top: 24px; }
.option {
  position: relative;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(18, 96, 190, .16);
  border-radius: var(--automize-radius-md);
  background: rgba(255, 255, 255, .92);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.option-dot { width: 20px; height: 20px; border: 1.5px solid #8FB3DA; border-radius: 50%; display: grid; place-items: center; background: #fff; transition: border-color .3s var(--ease); }
.option-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--automize-blue); transform: scale(0); transition: transform .2s var(--ease); }
.option-label { font-size: 15px; font-weight: 700; line-height: 1.38; color: var(--text-strong); transition: color .3s var(--ease); }
.option-arrow { color: #7F9CBF; font-weight: 800; transition: color .3s var(--ease), transform .3s var(--ease); }

@media (hover: hover) and (pointer: fine) {
  .option:hover {
    border-color: rgba(18, 109, 242, .32);
    background-color: transparent;
    background-image: linear-gradient(135deg, var(--automize-ice), rgba(74, 167, 255, .12));
    box-shadow: 0 12px 30px rgba(18, 109, 242, .09);
  }
  .option:hover .option-label { color: var(--text-link); }
  .option:hover .option-dot { border-color: var(--automize-sky); }
  .option:hover .option-arrow { color: var(--automize-blue); transform: translateX(4px); }
}

.option:active { transform: scale(.99); }

.option[aria-checked="true"] {
  border: 2px solid var(--automize-blue);
  padding: 13px 15px;
  background-image: none;
  background-color: var(--automize-ice);
  box-shadow: 0 0 0 4px rgba(18, 109, 242, .08);
}
.option[aria-checked="true"] .option-dot { border-color: var(--automize-blue); }
.option[aria-checked="true"] .option-dot::after { transform: scale(1); }
.option[aria-checked="true"] .option-label { color: var(--automize-navy); font-weight: 800; }
.option[aria-checked="true"] .option-arrow { color: var(--automize-blue); }

.option:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

/* Botões */
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 26px; }
.btn {
  min-height: 50px;
  padding: 13px 20px;
  border-radius: var(--automize-radius-pill);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn.primary { color: #fff; background: var(--btn-gradient); box-shadow: 0 16px 36px rgba(18, 109, 242, .22); }
.btn.secondary { background: #fff; border-color: rgba(23, 101, 193, .18); color: var(--text-strong); }
.btn:disabled { opacity: .6; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) { transform: translateY(-2px); }
  .btn.primary:hover:not(:disabled) { box-shadow: 0 22px 44px rgba(18, 109, 242, .28); }
}
.btn .arrow { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.btn.secondary .arrow { background: var(--automize-bg-2); color: var(--automize-blue); }
.btn.small { min-height: 42px; padding: 9px 16px; font-size: 14px; }
.start-btn { margin-top: 30px; align-self: flex-start; }
/* CTA do hero: só no mobile, onde substitui o cartão de introdução. */
.hero-start { display: none; }
.link-button { border: 0; background: none; padding: 0; color: var(--text-link); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 4px; }

/* Formulário */
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; margin-top: 24px; }
.field { display: grid; gap: 6px; align-content: start; }
.field.full, .choice, .check, .form-status, .submit-row, .turnstile { grid-column: 1 / -1; }
.field label, .choice legend { font-size: 13px; font-weight: 800; color: var(--text-strong); }
.optional { font-weight: 600; color: var(--automize-text-soft); }
.field-hint { margin: 0; font-size: 12.5px; color: var(--automize-text-soft); }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 100, 191, .28);
  border-radius: 14px;
  background: #fff;
  color: var(--automize-navy);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder { color: #6F87A6; }
.field input:focus { outline: none; border-color: var(--automize-blue); box-shadow: 0 0 0 4px rgba(18, 109, 242, .14); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 0; font-size: 13px; font-weight: 650; color: var(--error); }
.choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice legend { padding: 0; margin-bottom: 8px; }
.choice-options { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-options label { position: relative; display: inline-flex; }
.choice-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-options span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid rgba(22, 100, 191, .24);
  border-radius: var(--automize-radius-pill);
  background: #fff;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.choice-options input:checked + span { border: 2px solid var(--automize-blue); padding: 8px 15px; background: var(--automize-ice); color: var(--automize-navy); }
.choice-options input:focus-visible + span { outline: var(--focus-ring); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .choice-options span:hover { border-color: rgba(18, 109, 242, .4); background: var(--automize-ice); }
}
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13.5px; line-height: 1.5; color: var(--automize-text-soft); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--automize-blue); }
.check a { color: var(--text-link); text-underline-offset: 2px; }
.privacy-note { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.5; color: var(--automize-text-soft); }
.privacy-note a { color: var(--text-link); text-underline-offset: 2px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 20px; font-size: 14px; color: var(--automize-text-soft); }
.form-status.error { color: var(--error); font-weight: 650; }
.submit-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.submit-row .btn.primary { min-width: 230px; }

/* Resultado */
.result-badge { margin: 0; display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; padding: 8px 14px; border-radius: var(--automize-radius-pill); border: 1px solid rgba(32, 184, 118, .28); background: #EEF9F4; color: var(--success-text); font-size: 13px; font-weight: 850; }
.result-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--automize-success); }
.result-block { margin-top: 20px; }
.result-block h3, .result-card .label, .service-card .label { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 850; color: var(--text-kicker); }
.insights { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.insights li { position: relative; padding-left: 20px; color: var(--text-strong); font-size: 15px; }
.insights li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--automize-sky); }
.result-card, .service-card { margin-top: 20px; padding: 22px 24px; border-radius: 24px; border: 1px solid rgba(18, 109, 242, .14); }
.result-card { background: linear-gradient(145deg, #fff, #EDF7FF); box-shadow: 0 18px 50px rgba(29, 91, 164, .08); }
.service-card { background: #fff; }
.result-card h3, .service-card h3 { font-size: 22px; letter-spacing: -.02em; margin: 8px 0; }
.result-card p, .service-card p { margin: 0; font-size: 15px; color: var(--automize-text-soft); line-height: 1.6; }
.next-list { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.next-list li { counter-increment: step; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; color: var(--text-strong); font-size: 14.5px; }
.next-list li::before { content: counter(step); width: 26px; height: 26px; border-radius: 9px; background: #DDEEFF; color: #0B4FB0; display: grid; place-items: center; font-size: 12px; font-weight: 850; }
.note { margin: 16px 0 0; font-size: 13px; color: var(--automize-text-soft); }
.confirmation { margin: 16px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--automize-bg); border: 1px solid var(--automize-line); font-size: 14.5px; color: var(--text-strong); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.restart { margin: 18px 0 0; font-size: 14px; }

/* Conteúdo estático */
.details { padding: 8px 0 0; }
.details > h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; margin: 0 0 18px; }
.details-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.details-grid li { padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, .8); border: 1px solid var(--automize-line); }
.details-grid h3 { margin: 0 0 6px; font-size: 16px; color: var(--automize-navy); }
.details-grid p { margin: 0; font-size: 14px; color: var(--automize-text-soft); line-height: 1.55; }
.details-note { margin: 18px 0 0; font-size: 14px; color: var(--automize-text-soft); max-width: 820px; }
.details-note a { color: var(--text-link); }

/* Rodapé */
.footer { display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 22px 0 34px; margin-top: 40px; border-top: 1px solid var(--automize-line); color: var(--automize-text-soft); font-size: 13px; }
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { text-decoration: none; border-radius: 4px; }
.footer-links a:hover { color: var(--automize-blue); text-decoration: underline; }
.footer .link-button { font-size: 13px; font-weight: 600; color: var(--automize-text-soft); }

/* Consentimento */
.consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  z-index: 40;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(18, 109, 242, .16);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 90px rgba(10, 61, 126, .2);
}
/* Tablet e desktop: o banner encosta a um canto, fora da zona do CTA do diagnóstico
   (à direita com uma coluna, à esquerda com duas, onde o CTA fica na coluna direita). */
@media (min-width: 651px) {
  .consent { left: auto; right: 20px; bottom: 20px; transform: none; width: min(440px, calc(100% - 40px)); }
  .consent-actions .btn { flex: 1 1 0; }
  .consent-actions .link-button { margin: 0 auto; }
}
@media (min-width: 981px) {
  .consent { left: 20px; right: auto; }
}
.consent-title { margin: 0; font-weight: 850; font-size: 17px; }
.consent-text { margin: 6px 0 14px; font-size: 14px; color: var(--automize-text-soft); }
.consent-text a { color: var(--text-link); font-weight: 700; text-underline-offset: 2px; }
.consent-options { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.consent-options label { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--automize-line); background: var(--automize-bg); cursor: pointer; }
.consent-options input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--automize-blue); }
.consent-options b { font-size: 14px; color: var(--automize-navy); }
.consent-options em { margin-left: 6px; font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--automize-text-soft); }
.consent-options small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--automize-text-soft); }
.consent-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
/* Áreas de toque de pelo menos 44 px em todos os controlos do consentimento. */
.consent-actions .btn { min-height: 44px; }
.consent-actions .link-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 10px; margin-left: auto; font-size: 13px; }

/* Tablet e mobile */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .story { padding: 30px 28px; }
  .story h1 { font-size: clamp(34px, 7vw, 48px); margin: 14px 0 12px; }
  .signal { display: none; }
  .proof { margin-top: 18px; }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 24px); }
  .top { padding-top: 10px; }
  .nav { min-height: 54px; padding: 7px 12px; }
  .brand img { width: 38px; height: 31px; }
  .brand span { font-size: 12px; }
  .nav-note { font-size: 12px; }
  main { padding: 12px 0 40px; }
  .layout { gap: 12px; }
  .story, .experience { border-radius: 26px; }
  .story { padding: 22px 20px; }
  .story h1 { font-size: 34px; }
  .story-lead { font-size: 15.5px; }
  .proof { gap: 6px 14px; font-size: 12.5px; }
  .progress { padding: 20px 20px 0; }
  .stage { padding: 24px 20px 28px; }
  .stage h2 { font-size: 26px; }
  .stage[data-view="intro"] h2 { font-size: 28px; }
  .sub { font-size: 15px; }
  /* No mobile, o hero já resume o diagnóstico: o CTA fica no hero, logo abaixo da
     promessa, e o cartão só aparece quando o diagnóstico começa (com JS ativo). */
  .hero-start { display: inline-flex; width: 100%; margin-top: 18px; }
  .experience[data-view="intro"] { display: none; }
  .stage[data-view="intro"] .step-label, .stage[data-view="intro"] .sub, .intro-list { display: none; }
  .start-btn { margin-top: 22px; }
  .options { margin-top: 18px; gap: 8px; }
  .option { padding: 13px 13px; grid-template-columns: 20px 1fr auto; }
  .option[aria-checked="true"] { padding: 12px 12px; }
  .option-label { font-size: 14.5px; }
  .actions { padding-top: 20px; }
  .start-btn { align-self: stretch; }
  .lead-form { grid-template-columns: 1fr; }
  .submit-row .btn { width: 100%; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .result-card, .service-card { padding: 18px; }
  .details-grid { grid-template-columns: 1fr; }
  /* Banner compacto: aceitar e rejeitar com o mesmo tamanho, lado a lado, numa só linha. */
  .consent { width: calc(100% - 16px); bottom: 8px; padding: 12px 14px; border-radius: 20px; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .consent-title { font-size: 15px; }
  .consent-text { margin: 4px 0 10px; font-size: 13px; line-height: 1.45; }
  .consent-actions { flex-wrap: nowrap; gap: 8px; }
  .consent-actions .btn { flex: 1 1 0; min-width: 0; padding: 6px 10px; font-size: 13px; line-height: 1.2; text-align: center; }
  .consent-actions .link-button { flex: 0 0 auto; margin: 0; padding: 0 6px; }
}

@media (max-width: 400px) {
  .nav-note { display: none; }
}

/* Ecrãs estreitos (320–389 px): hero mais compacto e banner mais baixo, para que o
   banner inicial de cookies nunca tape o CTA "Começar diagnóstico". */
@media (max-width: 389px) {
  .top { padding-top: 8px; }
  .nav { min-height: 50px; padding: 5px 12px; }
  main { padding-top: 8px; }
  .story { padding: 16px 18px 20px; }
  .kicker { font-size: 10.5px; letter-spacing: .1em; }
  .story h1 { font-size: 30px; margin: 8px 0 10px; }
  .story-lead { font-size: 14.5px; line-height: 1.5; }
  .hero-start { margin-top: 14px; }

  .consent { padding: 10px 12px; }
  /* O título continua a nomear o diálogo para leitores de ecrã. */
  .consent:not(.is-expanded) .consent-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .consent-text { margin: 0 0 8px; font-size: 12.5px; line-height: 1.4; }
  .consent-actions .btn { padding: 4px 6px; font-size: 12.5px; }
  .consent-actions .link-button { padding: 0 4px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .option:active { transform: none; }
}
