:root {
  --blue: #005EB6;
  --blue-2: #0060B8;
  --blue-dark: #003967;
  --blue-deep: #08374A;
  --green: #51BA64;
  --green-dark: #077A45;
  --green-deep: #005F3D;
  --green-soft: #DAE99A;
  --white: #FFFFFF;
  --text: #0F2338;
  --muted: #62758A;
  --line: rgba(15, 35, 56, .12);
  --shadow: 0 24px 80px rgba(0, 57, 103, .20);
  --radius: 28px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 12%, rgba(81, 186, 100, .32), transparent 32%),
    radial-gradient(circle at 78% 0%, rgba(0, 94, 182, .30), transparent 33%),
    linear-gradient(150deg, #F3FAFF 0%, #FFFFFF 48%, #EEF9F1 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(81, 186, 100, .45); outline-offset: 3px; }
img { max-width: 100%; display: block; }

.noscript {
  padding: 16px;
  background: #ffe9e9;
  color: #7b1b1b;
  text-align: center;
  font-weight: 700;
}

.page-shell {
  min-height: 100dvh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
}

.quiz-app {
  width: min(100%, 480px);
  min-height: min(780px, calc(100dvh - 40px));
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255,255,255,.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quiz-app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 94, 182, .08), transparent 38%),
    radial-gradient(circle at 15% 20%, rgba(218, 233, 154, .50), transparent 28%),
    radial-gradient(circle at 90% 86%, rgba(81, 186, 100, .20), transparent 34%);
}

.quiz-header {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: calc(16px + var(--safe-top)) 18px 0;
}

.back-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 94, 182, .10);
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  transition: transform .18s ease, background .18s ease;
}

.back-button:hover { transform: translateY(-1px); background: rgba(0, 94, 182, .16); }
.back-button:disabled { opacity: .45; cursor: not-allowed; }
.back-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.progress {
  height: 10px;
  background: rgba(0, 94, 182, .10);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width .32s ease;
}

.progress-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-dark);
  white-space: nowrap;
}

.screen {
  position: relative;
  z-index: 2;
  min-height: min(780px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  padding: 26px;
  animation: screenIn .30s ease both;
}

.quiz-header:not([hidden]) + .screen { min-height: min(710px, calc(100dvh - 100px)); }

@keyframes screenIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero {
  flex: 1;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-mark,
.brand-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0,57,103,.06);
}

.brand-mark {
  gap: 8px;
  padding: 8px 11px;
  font-weight: 900;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-pill {
  padding: 8px 10px;
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.brand-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(81,186,100,.18);
}

.hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 14px;
  border-radius: 32px;
  padding: 18px 18px 16px;
  color: white;
  background:
    radial-gradient(circle at 82% 8%, rgba(218, 233, 154, .24), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(81, 186, 100, .28), transparent 30%),
    linear-gradient(140deg, rgba(0,94,182,.98) 0%, rgba(0,57,103,.98) 64%, rgba(0,95,61,.98) 100%);
}

.hero-visual {
  position: relative;
  width: min(178px, 46vw);
  aspect-ratio: 1;
  margin: 0 auto -4px;
  display: grid;
  place-items: end center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.28), transparent 58%),
    linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 20px 50px rgba(0,0,0,.20);
}

.hero-visual img {
  width: 72%;
  max-height: 108%;
  object-fit: contain;
  object-position: bottom center;
  transform: translateY(7%);
  filter: drop-shadow(0 18px 20px rgba(0,0,0,.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  margin: 14px auto 9px;
  max-width: 390px;
  font-size: clamp(29px, 7.4vw, 42px);
  line-height: .98;
  letter-spacing: -.06em;
}

.hero h1 strong { color: var(--green-soft); }

.hero-sub {
  margin: 0 auto;
  max-width: 360px;
  color: rgba(255,255,255,.88);
  font-size: 15px;
  line-height: 1.43;
}

.trust-list {
  position: relative;
  z-index: 3;
  align-self: end;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.trust-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 11px;
  line-height: 1.18;
  font-weight: 850;
}

.cta-area { display: grid; gap: 10px; }

.cta-primary,
.cta-secondary,
.option-card,
.final-button {
  border: 0;
  width: 100%;
  border-radius: 21px;
  min-height: 58px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.cta-primary,
.final-button {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  font-weight: 900;
  letter-spacing: -.02em;
  box-shadow: 0 16px 30px rgba(7,122,69,.24);
}

.cta-primary:hover,
.final-button:hover,
.option-card:hover { transform: translateY(-2px); }

.cta-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.cta-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.step-main { display: grid; gap: 20px; }

.support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 22px;
  background: rgba(0,94,182,.08);
  border: 1px solid rgba(0,94,182,.10);
}

.support-card img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  object-position: 44% 34%;
  border-radius: 18px;
  background: rgba(255,255,255,.6);
}

.support-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--blue-dark);
  font-weight: 750;
}

.step-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(81,186,100,.15);
  color: var(--green-deep);
  font-weight: 900;
  font-size: 12px;
}

.step-title {
  margin: 0;
  font-size: clamp(27px, 7.1vw, 38px);
  line-height: 1.05;
  letter-spacing: -.055em;
  color: var(--blue-deep);
}

.step-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.48;
}

.options { display: grid; gap: 11px; }

.option-card {
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0,57,103,.07);
}

.option-card.is-selected {
  border-color: rgba(81,186,100,.85);
  background: rgba(218,233,154,.30);
}

.option-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(0,94,182,.09);
  color: var(--blue-dark);
  font-size: 22px;
}

.option-text strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.option-text span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.option-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: rgba(0,94,182,.08);
  font-weight: 900;
}

.form-stack { display: grid; gap: 14px; }

.field { display: grid; gap: 8px; position: relative; }

.field label {
  font-weight: 900;
  color: var(--blue-deep);
  font-size: 13px;
}

.field input {
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  border: 1.5px solid rgba(0,94,182,.16);
  padding: 0 16px;
  background: rgba(255,255,255,.94);
  outline: none;
  color: var(--text);
  font-weight: 750;
  box-shadow: 0 10px 28px rgba(0,57,103,.06);
}

.field input:focus { border-color: rgba(81,186,100,.95); }
.field input::placeholder { color: #9AA8B6; font-weight: 600; }

.phone-country {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  border: 0;
}

.phone-country legend {
  padding: 0;
  margin: 0;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.phone-country-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.phone-country-button {
  min-height: 58px;
  border-radius: 18px;
  border: 1.5px solid rgba(0,94,182,.14);
  background: rgba(255,255,255,.88);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--text);
  box-shadow: 0 10px 28px rgba(0,57,103,.06);
}

.phone-country-button span { font-size: 22px; }
.phone-country-button strong { text-align: left; font-size: 14px; font-weight: 900; }
.phone-country-button small { color: var(--muted); font-size: 12px; font-weight: 900; }

.phone-country-button.is-active {
  border-color: rgba(81,186,100,.95);
  background: rgba(218,233,154,.34);
  box-shadow: 0 14px 30px rgba(7,122,69,.12);
}

.phone-field input { padding-left: 68px; }

.phone-prefix {
  position: absolute;
  left: 14px;
  top: 36px;
  z-index: 2;
  min-width: 42px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0,94,182,.10);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 950;
}

.phone-help {
  margin-top: -1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field-error {
  min-height: 18px;
  color: #B42318;
  font-size: 12px;
  font-weight: 750;
}

.final-screen {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 20px;
  text-align: center;
}

.final-badge {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  border-radius: 28px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 34px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 20px 38px rgba(0,94,182,.22);
}

.final-screen h2 {
  margin: 0;
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.04;
  letter-spacing: -.055em;
  color: var(--blue-deep);
}

.final-screen p {
  margin: 0 auto;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.55;
}

.final-actions { display: grid; gap: 10px; }

.cta-secondary {
  background: rgba(0,94,182,.08);
  color: var(--blue-dark);
  font-weight: 900;
}

.loading-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.35);
  border-top-color: var(--green-dark);
  animation: spin .75s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .page-shell { padding: 0; min-height: 100dvh; place-items: stretch; }
  .quiz-app {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .screen {
    min-height: 100dvh;
    padding: calc(16px + var(--safe-top)) 16px calc(18px + var(--safe-bottom));
  }
  .quiz-header:not([hidden]) + .screen { min-height: calc(100dvh - 58px - var(--safe-top)); }
  .quiz-header { padding: calc(12px + var(--safe-top)) 14px 0; grid-template-columns: 40px 1fr auto; gap: 10px; }
  .back-button { width: 40px; height: 40px; }
  .hero { gap: 12px; }
  .brand-mark { padding: 8px 10px; font-size: 14px; }
  .brand-pill { font-size: 10px; padding: 8px; }
  .hero-card { border-radius: 28px; padding: 16px 15px 15px; gap: 12px; }
  .hero-visual { width: min(160px, 41vw); }
  .hero h1 { font-size: clamp(28px, 7.2vw, 34px); }
  .hero-sub { font-size: 14px; }
  .trust-item { min-height: 38px; padding: 8px 8px; font-size: 10.5px; }
  .cta-primary, .final-button { min-height: 58px; }
  .step { gap: 18px; }
}

@media (min-width: 390px) and (max-width: 520px) and (min-height: 800px) {
  .screen { padding-left: 18px; padding-right: 18px; }
  .hero-card { padding: 18px 17px 16px; gap: 14px; }
  .hero-visual { width: min(176px, 42vw); }
  .hero h1 { font-size: clamp(31px, 7.4vw, 38px); }
  .hero-sub { font-size: 15px; }
  .trust-item { font-size: 11.5px; }
}

@media (max-width: 374px) {
  .screen { padding: calc(13px + var(--safe-top)) 13px calc(15px + var(--safe-bottom)); }
  .brand-pill { display: none; }
  .hero-card { border-radius: 24px; padding: 14px 13px; gap: 10px; }
  .hero-visual { width: 136px; }
  .hero h1 { margin-top: 10px; font-size: 26px; }
  .hero-sub { font-size: 13px; }
  .trust-list { gap: 7px; }
  .trust-item { min-height: 34px; font-size: 10px; }
  .step-title { font-size: 26px; }
  .phone-country-button { grid-template-columns: auto 1fr; min-height: 56px; }
  .phone-country-button small { grid-column: 2; margin-top: -8px; }
}

@media (max-height: 720px) and (max-width: 520px) {
  .hero-card { gap: 9px; }
  .hero-visual { width: 126px; }
  .hero h1 { font-size: 26px; margin: 9px auto 7px; }
  .hero-sub { font-size: 13px; line-height: 1.35; }
  .trust-list { grid-template-columns: 1fr 1fr; gap: 6px; }
  .trust-item { min-height: 32px; font-size: 9.8px; padding: 6px; }
  .cta-note { font-size: 11px; }
}

/* ===== V3 refinements ===== */
.hero-home {
  justify-content: space-between;
  gap: 14px;
}

.hero-card-home {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 14px;
  align-content: start;
  border-radius: 32px;
  padding: 18px 18px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 12%, rgba(218, 233, 154, .20), transparent 24%),
    radial-gradient(circle at 12% 88%, rgba(81, 186, 100, .22), transparent 28%),
    linear-gradient(152deg, #005EB6 0%, #004B96 42%, #003967 76%, #005F3D 100%);
}

.hero-card-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 30%),
    radial-gradient(circle at 50% 12%, rgba(255,255,255,.13), transparent 20%);
}

.hero-visual-wrap {
  position: relative;
  z-index: 1;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 6px;
}

.hero-visual-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28) 0%, rgba(255,255,255,.10) 38%, transparent 72%);
  filter: blur(4px);
  top: 2px;
}

.hero-mascot {
  position: relative;
  z-index: 2;
  width: min(210px, 52vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.24));
}

.hero-content-home {
  text-align: center;
}

.hero-content-home .hero-eyebrow {
  margin: 0 auto;
}

.hero-content-home h1 {
  margin: 12px auto 10px;
  max-width: 360px;
  font-size: clamp(30px, 7vw, 42px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.hero-content-home .hero-sub {
  max-width: 350px;
}

.support-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 18px;
  padding: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
}

.phone-country-options {
  grid-template-columns: 1fr;
}

.phone-country-button {
  min-height: 64px;
  grid-template-columns: auto 1fr;
  gap: 12px;
  text-align: left;
}

.country-flag {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  background: rgba(0,94,182,.08);
  box-shadow: inset 0 0 0 1px rgba(0,94,182,.10);
}

.country-meta {
  display: grid;
  gap: 2px;
}

.country-meta strong {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.country-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.phone-help {
  margin-top: 2px;
}

.final-note-box {
  margin: 0 auto;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(0,94,182,.08);
  border: 1px solid rgba(0,94,182,.10);
  color: var(--blue-dark);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

@media (max-width: 520px) {
  .hero-card-home {
    padding: 16px 15px 15px;
    gap: 12px;
  }

  .hero-visual-wrap {
    min-height: 196px;
  }

  .hero-visual-glow {
    width: 182px;
    height: 182px;
    top: 6px;
  }

  .hero-mascot {
    width: min(190px, 49vw);
  }

  .hero-content-home h1 {
    max-width: 320px;
    font-size: clamp(29px, 7vw, 36px);
  }

  .trust-item {
    min-height: 42px;
    font-size: 11px;
  }
}

@media (min-width: 414px) and (max-width: 430px) and (min-height: 850px) {
  .screen {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-card-home {
    gap: 14px;
    padding: 18px 18px 16px;
  }

  .hero-visual-wrap {
    min-height: 220px;
  }

  .hero-mascot {
    width: 208px;
  }

  .hero-content-home h1 {
    font-size: 35px;
    max-width: 360px;
  }

  .hero-sub {
    font-size: 15px;
  }
}

@media (max-width: 374px) {
  .hero-card-home {
    border-radius: 26px;
    padding: 15px 13px 14px;
  }

  .hero-visual-wrap {
    min-height: 170px;
  }

  .hero-visual-glow {
    width: 156px;
    height: 156px;
  }

  .hero-mascot {
    width: 164px;
  }

  .hero-content-home h1 {
    font-size: 27px;
  }

  .phone-country-button {
    min-height: 60px;
  }

  .country-flag {
    width: 40px;
    height: 40px;
  }
}

@media (max-height: 720px) and (max-width: 520px) {
  .hero-card-home {
    gap: 10px;
  }

  .hero-visual-wrap {
    min-height: 152px;
  }

  .hero-visual-glow {
    width: 148px;
    height: 148px;
  }

  .hero-mascot {
    width: 150px;
  }

  .hero-content-home h1 {
    margin: 8px auto 6px;
    font-size: 25px;
  }

  .hero-sub {
    font-size: 13px;
    line-height: 1.35;
  }
}

/* ===== V4 hero simplification ===== */
.brand-row-home {
  justify-content: center;
}

.hero-home {
  min-height: 100%;
  justify-content: space-between;
  gap: 16px;
}

.hero-card-home {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: start;
  text-align: center;
  gap: 10px;
  padding: 18px 18px 20px;
}

.hero-copy-top,
.hero-copy-bottom {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-copy-top .hero-eyebrow {
  margin: 0 auto;
}

.hero-copy-top h1 {
  margin: 12px auto 0;
  max-width: 360px;
  font-size: clamp(29px, 7vw, 40px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.hero-copy-bottom .hero-sub {
  margin: 0 auto;
  max-width: 340px;
}

.hero-visual-wrap-home {
  min-height: 230px;
  width: 100%;
  padding: 4px 0;
}

.hero-visual-wrap-home .hero-visual-glow {
  width: 216px;
  height: 216px;
  top: 8px;
}

.hero-visual-wrap-home .hero-mascot {
  width: min(215px, 55vw);
  max-width: 100%;
}

.cta-area-home {
  gap: 12px;
}

@media (max-width: 520px) {
  .hero-home {
    gap: 14px;
  }

  .hero-card-home {
    padding: 16px 16px 18px;
    gap: 8px;
  }

  .hero-copy-top h1 {
    max-width: 315px;
    font-size: clamp(28px, 7vw, 35px);
  }

  .hero-visual-wrap-home {
    min-height: 200px;
  }

  .hero-visual-wrap-home .hero-visual-glow {
    width: 184px;
    height: 184px;
    top: 8px;
  }

  .hero-visual-wrap-home .hero-mascot {
    width: min(185px, 46vw);
  }

  .hero-copy-bottom .hero-sub {
    max-width: 312px;
    font-size: 14px;
    line-height: 1.4;
  }
}

@media (min-width: 414px) and (max-width: 430px) and (min-height: 850px) {
  .hero-card-home {
    padding: 18px 18px 20px;
  }

  .hero-copy-top h1 {
    max-width: 350px;
    font-size: 34px;
  }

  .hero-visual-wrap-home {
    min-height: 224px;
  }

  .hero-visual-wrap-home .hero-mascot {
    width: 208px;
  }

  .hero-copy-bottom .hero-sub {
    max-width: 330px;
    font-size: 15px;
  }
}

@media (max-width: 374px) {
  .hero-card-home {
    padding: 14px 13px 16px;
  }

  .hero-copy-top h1 {
    max-width: 290px;
    font-size: 26px;
  }

  .hero-visual-wrap-home {
    min-height: 170px;
  }

  .hero-visual-wrap-home .hero-visual-glow {
    width: 154px;
    height: 154px;
  }

  .hero-visual-wrap-home .hero-mascot {
    width: 154px;
  }

  .hero-copy-bottom .hero-sub {
    max-width: 280px;
    font-size: 13px;
  }
}

@media (max-height: 720px) and (max-width: 520px) {
  .hero-card-home {
    gap: 8px;
  }

  .hero-copy-top h1 {
    font-size: 25px;
  }

  .hero-visual-wrap-home {
    min-height: 150px;
  }

  .hero-visual-wrap-home .hero-visual-glow {
    width: 140px;
    height: 140px;
  }

  .hero-visual-wrap-home .hero-mascot {
    width: 142px;
  }

  .hero-copy-bottom .hero-sub {
    font-size: 13px;
  }
}

.hero-card-home .trust-list { display: none; }


/* ===== V5 mobile fit: quiz sem rolagem nas telas principais ===== */
@media (max-width: 520px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    min-height: 100svh;
  }

  .page-shell {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .quiz-app {
    height: 100svh;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
  }

  .screen {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: calc(12px + var(--safe-top)) 14px calc(12px + var(--safe-bottom));
  }

  .quiz-header {
    height: calc(54px + var(--safe-top));
    padding: calc(10px + var(--safe-top)) 14px 0;
  }

  .quiz-header:not([hidden]) + .screen {
    height: calc(100svh - 54px - var(--safe-top));
    min-height: 0;
    padding-top: 12px;
  }

  .hero,
  .step,
  .final-screen {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .hero-home {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .brand-row-home {
    min-height: 34px;
  }

  .brand-mark {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .hero-card-home {
    min-height: 0;
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    gap: 8px;
    padding: 14px 14px 16px;
  }

  .hero-copy-top h1 {
    max-width: 330px;
    margin-top: 10px;
    font-size: clamp(25px, 6.4vw, 34px);
    line-height: 1.01;
  }

  .hero-eyebrow {
    padding: 7px 9px;
    font-size: 11px;
  }

  .hero-visual-wrap-home {
    min-height: 0;
    height: 100%;
    padding: 0;
    align-items: center;
  }

  .hero-visual-wrap-home .hero-mascot {
    width: min(190px, 46vw, 36svh);
    max-height: 100%;
  }

  .hero-visual-wrap-home .hero-visual-glow {
    width: min(190px, 46vw, 36svh);
    height: min(190px, 46vw, 36svh);
    top: 50%;
    transform: translateY(-50%);
  }

  .hero-copy-bottom .hero-sub {
    max-width: 320px;
    font-size: 14px;
    line-height: 1.36;
  }

  .cta-area-home {
    gap: 8px;
  }

  .cta-primary,
  .final-button {
    min-height: 52px;
    border-radius: 18px;
    font-size: 15px;
  }

  .cta-note {
    font-size: 11px;
    line-height: 1.32;
  }

  .step {
    justify-content: space-between;
    gap: 10px;
  }

  .step-main {
    gap: 10px;
  }

  .support-card {
    min-height: 0;
    padding: 9px 10px;
    gap: 9px;
    border-radius: 18px;
  }

  .support-card img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .support-card p {
    font-size: 11px;
    line-height: 1.25;
  }

  .step-kicker {
    padding: 6px 9px;
    font-size: 11px;
  }

  .step-title {
    font-size: clamp(23px, 6vw, 31px);
    line-height: 1.03;
    letter-spacing: -.05em;
  }

  .step-subtitle {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.35;
  }

  .options {
    gap: 8px;
    min-height: 0;
  }

  .option-card {
    min-height: clamp(48px, 7.2svh, 56px);
    padding: 9px 10px;
    border-radius: 17px;
    gap: 9px;
  }

  .option-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 18px;
  }

  .option-text strong {
    font-size: 13.5px;
    line-height: 1.15;
  }

  .option-text span {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.18;
  }

  .option-arrow {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .form-stack {
    gap: 10px;
  }

  .field {
    gap: 6px;
  }

  .field label,
  .phone-country legend {
    font-size: 12px;
  }

  .field input {
    min-height: 52px;
    border-radius: 17px;
    font-size: 15px;
  }

  .phone-field input {
    padding-left: 62px;
  }

  .phone-prefix {
    top: 31px;
    left: 12px;
    height: 30px;
    min-width: 40px;
    border-radius: 11px;
    font-size: 12px;
  }

  .phone-country-options {
    gap: 8px;
  }

  .phone-country-button {
    min-height: 56px;
    border-radius: 16px;
    padding: 8px 10px;
  }

  .country-flag {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .country-meta strong {
    font-size: 13.5px;
  }

  .country-meta small,
  .phone-help,
  .field-error {
    font-size: 11px;
  }

  .final-screen {
    align-content: center;
    gap: 14px;
  }

  .final-badge {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    font-size: 28px;
  }

  .final-screen h2 {
    font-size: clamp(25px, 6.4vw, 32px);
  }

  .final-screen p {
    max-width: 330px;
    font-size: 13px;
    line-height: 1.4;
  }

  .final-note-box {
    max-width: 330px;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.35;
  }
}

/* iPhone 14 Plus / telas altas: mantém respiro, sem estourar altura */
@media (min-width: 414px) and (max-width: 430px) and (min-height: 850px) {
  .screen {
    padding: calc(14px + var(--safe-top)) 18px calc(14px + var(--safe-bottom));
  }

  .quiz-header:not([hidden]) + .screen {
    padding-top: 14px;
  }

  .hero-home {
    gap: 12px;
  }

  .hero-card-home {
    padding: 18px 18px 20px;
    gap: 10px;
  }

  .hero-copy-top h1 {
    max-width: 360px;
    font-size: 34px;
  }

  .hero-visual-wrap-home .hero-mascot {
    width: min(215px, 40svh);
  }

  .hero-visual-wrap-home .hero-visual-glow {
    width: min(215px, 40svh);
    height: min(215px, 40svh);
  }

  .hero-copy-bottom .hero-sub {
    font-size: 15px;
  }

  .step-title {
    font-size: clamp(28px, 6.8vw, 36px);
  }

  .option-card {
    min-height: 58px;
    padding: 12px;
  }

  .option-icon {
    width: 40px;
    height: 40px;
  }
}

/* Aparelhos baixos: prioriza encaixe total da UI */
@media (max-width: 520px) and (max-height: 760px) {
  .screen {
    padding: calc(10px + var(--safe-top)) 12px calc(10px + var(--safe-bottom));
  }

  .quiz-header {
    height: calc(50px + var(--safe-top));
    padding-top: calc(8px + var(--safe-top));
  }

  .quiz-header:not([hidden]) + .screen {
    height: calc(100svh - 50px - var(--safe-top));
    padding-top: 8px;
  }

  .support-card {
    display: none;
  }

  .step-title {
    font-size: clamp(22px, 5.7vw, 28px);
  }

  .step-subtitle {
    font-size: 12px;
    line-height: 1.25;
  }

  .option-card {
    min-height: 45px;
    padding: 8px 9px;
  }

  .option-text span {
    display: none;
  }

  .option-icon {
    width: 31px;
    height: 31px;
    font-size: 17px;
  }

  .form-stack {
    gap: 8px;
  }

  .field input {
    min-height: 48px;
  }

  .phone-country-button {
    min-height: 50px;
  }

  .country-flag {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .phone-help {
    display: none;
  }

  .hero-card-home {
    padding: 12px 12px 14px;
  }

  .hero-copy-top h1 {
    font-size: clamp(23px, 5.8vw, 28px);
    margin-top: 8px;
  }

  .hero-visual-wrap-home .hero-mascot {
    width: min(150px, 36vw, 28svh);
  }

  .hero-visual-wrap-home .hero-visual-glow {
    width: min(150px, 36vw, 28svh);
    height: min(150px, 36vw, 28svh);
  }

  .hero-copy-bottom .hero-sub {
    font-size: 12.5px;
  }

  .cta-primary,
  .final-button {
    min-height: 48px;
  }
}

/* Fluxos com 5 opções, como tempo nos EUA: layout ainda mais compacto no mobile */
@media (max-width: 520px) {
  .options-count-5 {
    gap: 7px;
  }

  .options-count-5 .option-card {
    min-height: clamp(43px, 6.4svh, 52px);
  }

  .options-count-5 .option-text span {
    font-size: 10.5px;
  }
}

@media (max-width: 520px) and (max-height: 690px) {
  .brand-row-home {
    display: none;
  }

  .options-count-5 .option-text span {
    display: none;
  }

  .step-kicker {
    display: none;
  }

  .final-note-box {
    padding: 10px 12px;
  }
}

/* Fallback para navegadores que ainda não entendem svh */
@supports not (height: 100svh) {
  @media (max-width: 520px) {
    body,
    .page-shell,
    .quiz-app {
      height: 100dvh;
      min-height: 100dvh;
    }

    .quiz-header:not([hidden]) + .screen {
      height: calc(100dvh - 54px - var(--safe-top));
    }
  }
}


/* ===== V6 assets, dropdown e final warning ===== */
.hero-image-frame {
  width: min(230px, 56vw);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .22);
  border: 2px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.10);
}

.hero-cover-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
}

.hero-visual-wrap-home {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual-wrap-home .hero-visual-glow,
.hero-visual-wrap-home .hero-mascot {
  display: none;
}

.support-card img {
  object-fit: contain;
  object-position: center;
  background: transparent;
  padding: 0;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '⌄';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue-dark);
  font-size: 22px;
  pointer-events: none;
}

.field select {
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  border: 1.5px solid rgba(0,94,182,.16);
  padding: 0 44px 0 16px;
  background: rgba(255,255,255,.94);
  outline: none;
  color: var(--text);
  font-weight: 750;
  box-shadow: 0 10px 28px rgba(0,57,103,.06);
  appearance: none;
  -webkit-appearance: none;
}

.field select:focus {
  border-color: rgba(81,186,100,.95);
}

.final-warning {
  margin: 0 auto;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 237, 213, .9);
  border: 1px solid rgba(249, 115, 22, .35);
  color: #9A3412;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 520px) {
  .hero-image-frame {
    width: min(190px, 44vw, 33svh);
    border-radius: 24px;
  }

  .field select {
    min-height: 52px;
    border-radius: 17px;
    font-size: 15px;
  }

  .final-warning {
    max-width: 330px;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 11.5px;
    line-height: 1.33;
  }
}

@media (min-width: 414px) and (max-width: 430px) and (min-height: 850px) {
  .hero-image-frame {
    width: min(215px, 39svh);
  }
}

@media (max-width: 520px) and (max-height: 760px) {
  .hero-image-frame {
    width: min(150px, 35vw, 24svh);
    border-radius: 20px;
  }

  .field select {
    min-height: 48px;
  }
}


/* ===== V7 dropdown com bandeiras ===== */
.phone-country-field {
  gap: 6px;
}

.select-wrap-country select {
  font-weight: 850;
  color: var(--text);
}

.select-wrap-country option {
  color: var(--text);
}

.phone-country-options,
.phone-country-button {
  display: none !important;
}

@media (max-width: 520px) {
  .phone-country-field,
  .select-field {
    gap: 6px;
  }

  .select-wrap-country select {
    padding-left: 14px;
    padding-right: 42px;
  }
}

/* ===== V8 outros e listas alinhadas ===== */
.is-hidden {
  display: none !important;
}

.conditional-field {
  margin-top: -2px;
}

.phone-prefix.is-hidden {
  display: none;
}

.phone-field.phone-field-no-prefix input {
  padding-left: 16px;
}

.conditional-field .phone-help {
  margin-top: 0;
}
