/* Dubai Off-Plan — Marquiz-style quiz funnel */

:root {
  --bg: #ffffff;
  --field: #f5f5f7;
  --field-focus: #eef0f4;
  --text: #111111;
  --muted: #5c6470;
  --dim: #8b939e;
  --border: #e5e7eb;
  --blue: #1a368e;
  --blue-press: #152d75;
  --green: #31a24c;
  --gold: #b8860b;
  --radius: 12px;
  --field-radius: 10px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-headline: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --lux-deep: #0a2e38;
  --lux-deep-2: #0d3a45;
  --apple-blue: #007aff;
  --apple-blue-dim: #409cff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
  height: -webkit-fill-available;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

button,
input,
select,
textarea {
  font-family: var(--font);
}

.quiz-page {
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.quiz-shell {
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

@media (min-width: 600px) {
  .quiz-shell {
    max-width: 560px;
  }
}

.quiz-form {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* ── Steps ── */
.quiz-step {
  display: none;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: calc(8px + var(--safe-top)) 12px calc(8px + var(--safe-bottom));
}

.quiz-step.is-active {
  display: flex;
  contain: layout style;
}

.quiz-step.is-entering > * {
  animation: rise-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-step.is-entering > *:nth-child(1) { animation-delay: 0.04s; }
.quiz-step.is-entering > *:nth-child(2) { animation-delay: 0.12s; }
.quiz-step.is-entering > *:nth-child(3) { animation-delay: 0.2s; }
.quiz-step.is-entering > *:nth-child(4) { animation-delay: 0.28s; }
.quiz-step.is-entering > *:nth-child(5) { animation-delay: 0.36s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-nav {
  margin-bottom: 20px;
  min-height: 36px;
}

.quiz-back {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.quiz-back:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── Step 0 intro — one screen, no scroll ── */
.quiz-step--intro {
  justify-content: flex-start;
  gap: 16px;
  padding: calc(14px + var(--safe-top)) 12px calc(16px + var(--safe-bottom));
}

.intro-top {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.intro-brand {
  margin: 0;
  padding: 0 2px 4px;
  font-size: clamp(17px, 5.4vw, 24px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(
    110deg,
    #08163f 0%,
    #1a368e 20%,
    #2d52b8 38%,
    #c9a227 50%,
    #2d52b8 62%,
    #1a368e 80%,
    #08163f 100%
  );
  background-size: 320% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: brand-shine 4.5s ease-in-out infinite;
}

@keyframes brand-shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.intro-ticker {
  position: relative;
  width: 100%;
  min-height: 40px;
  height: auto;
  overflow: hidden;
  padding: 0 2px;
}

.intro-ticker--cta {
  margin: 0;
  min-height: 44px;
}

.intro-ticker-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 4px;
  font-size: clamp(12px, 3.4vw, 14px);
  font-weight: 600;
  line-height: 1.45;
  color: #1a1a1a;
  text-align: center;
  opacity: 0;
  transform: translateX(14%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s ease;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
}

.intro-ticker-item.is-active {
  opacity: 1;
  transform: translateX(0);
}

.intro-ticker-item.is-exit {
  opacity: 0;
  transform: translateX(-14%);
}

.hero-card {
  position: relative;
  flex: 0 0 auto;
  width: calc(100% + 28px);
  max-width: calc(100vw - 2px);
  margin: 6px -14px 10px;
  aspect-ratio: 1280 / 672;
  max-height: calc(100dvh - 268px);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #0a0a0a;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.hero-sound {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: none;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-sound-overlay {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: auto;
  top: auto;
  transform: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 4px 9px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 4;
  touch-action: manipulation;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.hero-sound-overlay.is-hidden {
  display: none;
}

.hero-sound-overlay.is-muted .hero-sound-pulse {
  animation: sound-pulse 2s ease-in-out infinite;
}

.hero-sound-overlay.is-replay .hero-sound-pulse {
  animation: none;
}

.hero-sound-icon--replay {
  display: none;
}

.hero-sound-overlay.is-replay .hero-sound-icon--muted {
  display: none;
}

.hero-sound-overlay.is-replay .hero-sound-icon--replay {
  display: block;
}

.hero-sound-pulse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue);
  flex-shrink: 0;
}

.hero-sound-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.hero-sound-overlay-text {
  text-shadow: none;
  opacity: 0.95;
}

@keyframes sound-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); }
}

.hero-sound.is-hidden {
  display: none;
}

.hero-sound.is-on {
  background: rgba(0, 0, 0, 0.45);
}

.hero-sound-icon {
  font-size: 14px;
  line-height: 1;
}

.intro-copy {
  flex: 0 0 auto;
  margin: 0;
  padding-top: 4px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-step--intro .quiz-headline {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.035em;
  color: #0a0a0a;
  text-align: center;
}

.intro-bullets {
  margin: 0;
  padding: 0 0 0 1em;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.intro-bullets li {
  position: relative;
  font-size: clamp(10px, 2.85vw, 11.5px);
  font-weight: 500;
  line-height: 1.34;
  color: var(--text);
}

.intro-bullets li::before {
  content: "";
  position: absolute;
  left: -1em;
  top: 0.58em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
}

.intro-bullets strong {
  font-weight: 700;
  color: var(--text);
}

.intro-tap {
  margin: 0;
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  text-align: center;
}

.intro-tap-action {
  color: var(--blue);
}

.quiz-headline {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.03em;
  color: var(--text);
}

.quiz-subhead {
  margin: 0 0 24px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}

.quiz-subhead--step {
  margin-top: -8px;
  margin-bottom: 20px;
}

/* ── Picker steps (1 & 2) — match intro polish ── */
.quiz-step--picker {
  justify-content: flex-start;
  gap: 0;
  padding: calc(14px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.picker-header {
  flex: 0 0 auto;
  margin-bottom: 20px;
}

.picker-header .quiz-nav {
  margin-bottom: 0;
}

/* ── Animated funnel progress (steps 1–2) ── */
.funnel-progress {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  width: 100%;
  max-width: 560px;
  padding: calc(10px + var(--safe-top)) 16px 12px;
  background: linear-gradient(180deg, #fff 72%, rgba(255, 255, 255, 0));
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.funnel-progress.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.funnel-progress-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: #e8ecf4;
  overflow: visible;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.funnel-progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #152d75 0%, #1a368e 45%, #3d5fc4 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 14px rgba(26, 54, 142, 0.35);
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  animation: progress-gradient 4s ease-in-out infinite;
}

.funnel-progress-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.funnel-progress-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: progress-shine 2.4s ease-in-out infinite;
}

.funnel-progress-knob {
  position: absolute;
  top: 50%;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #1a368e;
  box-shadow: 0 0 0 4px rgba(26, 54, 142, 0.14), 0 2px 8px rgba(26, 54, 142, 0.25);
  transform: translate(50%, -50%);
  animation: progress-knob-pulse 2s ease-in-out infinite;
}

.funnel-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.funnel-progress-segments {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.funnel-progress-segment {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.35s ease;
}

.funnel-progress-segment span {
  position: relative;
  padding-left: 18px;
}

.funnel-progress-segment span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #d1d8e6;
  background: #fff;
  transform: translateY(-50%);
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.funnel-progress-segment + .funnel-progress-segment {
  margin-left: 28px;
}

.funnel-progress-segment + .funnel-progress-segment::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #d1d8e6;
  transform: translateY(-50%);
  transition: background 0.35s ease;
}

.funnel-progress-segment.is-active {
  color: var(--blue);
}

.funnel-progress-segment.is-active span::before {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(26, 54, 142, 0.12);
  transform: translateY(-50%) scale(1.08);
}

.funnel-progress-segment.is-complete {
  color: var(--blue);
}

.funnel-progress-segment.is-complete span::before {
  border-color: var(--blue);
  background: var(--blue);
}

.funnel-progress-segment.is-complete + .funnel-progress-segment::before {
  background: var(--blue);
}

.funnel-progress-label {
  margin: 0;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.funnel-progress-label.is-updating {
  animation: label-tick 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

body.funnel-active .quiz-step--picker {
  padding-top: calc(78px + var(--safe-top));
}

@keyframes progress-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes progress-shine {
  0% { left: -60%; }
  100% { left: 120%; }
}

@keyframes progress-knob-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(26, 54, 142, 0.14), 0 2px 8px rgba(26, 54, 142, 0.25); }
  50% { box-shadow: 0 0 0 7px rgba(26, 54, 142, 0.08), 0 2px 12px rgba(26, 54, 142, 0.3); }
}

@keyframes label-tick {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .funnel-progress-fill,
  .funnel-progress-shine::after,
  .funnel-progress-knob {
    animation: none;
  }
}

.picker-video-card {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 14px;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.picker-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(46dvh, 320px);
  object-fit: contain;
  object-position: center center;
  background: #0a0a0a;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

#purpose-video {
  aspect-ratio: 1280 / 548;
}

#units-video {
  aspect-ratio: 1168 / 784;
  max-height: min(40dvh, 280px);
}

.quiz-step--picker:has(.picker-video-card) .picker-header {
  margin-bottom: 8px;
}

.quiz-step--picker:has(.picker-video-card) .picker-sub {
  margin-bottom: 18px;
  max-width: 36ch;
}

.quiz-step--picker:has(.picker-video-card) .picker-headline {
  margin-bottom: 8px;
}

.picker-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.picker-headline {
  margin: 0 0 10px;
  font-family: var(--font-headline);
  font-size: clamp(20px, 5.5vw, 24px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.035em;
  color: #0a0a0a;
  text-align: center;
}

.picker-sub {
  margin: 0 0 28px;
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(13px, 3.6vw, 15px);
  font-weight: 600;
  line-height: 1.5;
  color: #1a1a1a;
  text-align: center;
}

.picker-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.picker-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 16px 16px 14px;
  border: 1.5px solid #e2e6ef;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.picker-card:hover {
  border-color: #c5cee0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.picker-card:active {
  transform: scale(0.985);
}

.picker-card.is-selected,
.picker-card:active {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(26, 54, 142, 0.05) 0%, rgba(26, 54, 142, 0.02) 100%);
}

.picker-card-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 1px;
  border-radius: 10px;
  background: rgba(26, 54, 142, 0.08);
  color: var(--blue);
}

.picker-card-copy {
  flex: 1;
  min-width: 0;
}

.picker-card-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #0a0a0a;
}

.picker-card-desc {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: #1f2937;
}

.picker-card.is-selected .picker-card-desc,
.picker-card:active .picker-card-desc {
  color: #152d75;
}

.picker-card-arrow {
  flex-shrink: 0;
  margin-top: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  opacity: 0.45;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.picker-card.is-selected .picker-card-arrow,
.picker-card:active .picker-card-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* ── Premium picker cards (goal step) ── */
.picker-headline--goal {
  margin-bottom: 18px;
  font-size: clamp(22px, 6vw, 26px);
  letter-spacing: -0.04em;
}

.picker-cards--premium {
  gap: 12px;
}

.picker-card--premium {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto;
  gap: 12px 14px;
  align-items: center;
  width: 100%;
  padding: 16px 16px 16px 18px;
  border: 1.5px solid #e8ecf4;
  border-radius: 18px;
  background: #ffffff;
  color: #0a0a0a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.picker-card--premium:hover {
  border-color: #d4dbe8;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.picker-card--premium:active {
  transform: scale(0.985);
}

.picker-card--premium.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 14px 36px rgba(26, 54, 142, 0.12);
}

.picker-card--premium .picker-card-icon {
  grid-row: 1;
  grid-column: 1;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 12px;
  background: rgba(26, 54, 142, 0.08);
  color: var(--blue);
  border: 1px solid rgba(26, 54, 142, 0.1);
}

.picker-card--premium .picker-card-icon svg {
  width: 21px;
  height: 21px;
}

.picker-card--premium .picker-card-copy {
  grid-row: 1;
  grid-column: 2;
  position: relative;
  z-index: 1;
}

.picker-card--premium .picker-card-title {
  font-family: var(--font-headline);
  font-size: clamp(13px, 3.6vw, 15px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  line-height: 1.3;
  color: #0a0a0a;
}

.picker-card--premium .picker-card-desc {
  margin-top: 4px;
  font-size: clamp(11.5px, 3.1vw, 13.5px);
  font-weight: 500;
  line-height: 1.42;
  color: #1f2937;
}

.picker-card--premium.is-selected .picker-card-desc {
  color: #152d75;
}

.picker-card-go {
  grid-row: 1;
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.picker-card--premium.is-selected .picker-card-go,
.picker-card--premium:active .picker-card-go {
  transform: translateX(2px);
  background: var(--blue);
}

.picker-chips--premium {
  gap: 12px;
}

.picker-chips--premium .picker-chip {
  min-height: 58px;
  border: 1.5px solid #e8ecf4;
  border-radius: 14px;
  background: #ffffff;
  color: #0a0a0a;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.picker-chips--premium .picker-chip.is-selected,
.picker-chips--premium .picker-chip:active {
  border-color: var(--blue);
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 8px 22px rgba(26, 54, 142, 0.1);
  transform: scale(0.98);
}

.picker-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
  align-content: start;
}

.picker-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 12px;
  border: 1.5px solid #e2e6ef;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.picker-chip--wide {
  grid-column: 1 / -1;
  min-height: 52px;
}

.picker-chip:active {
  transform: scale(0.98);
}

.picker-chip.is-selected,
.picker-chip:active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

/* ── Success step ── */
.quiz-step--success {
  justify-content: center;
  padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
  background: #000;
  color: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.success-shell {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.success-headline {
  margin: 0 0 10px;
  font-family: var(--font-headline);
  font-size: clamp(32px, 9.5vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fff;
}

.success-name {
  margin: 0 0 20px;
  font-family: var(--font-headline);
  font-size: clamp(22px, 6.5vw, 28px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--apple-blue);
}

.success-copy {
  margin: 0 0 28px;
  font-family: var(--font-headline);
  font-size: clamp(14px, 3.9vw, 16px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: #fff;
}

.success-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.success-stat {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.success-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.success-stat-label {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.55);
}

.success-stat-val {
  margin: 0 0 10px;
  font-family: var(--font-headline);
  font-size: clamp(26px, 7.5vw, 32px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #fff;
}

.success-stat-note {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.62);
}

.quiz-step--success.is-entering .success-shell > * {
  animation: rise-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-step--success.is-entering .success-shell > *:nth-child(1) { animation-delay: 0.04s; }
.quiz-step--success.is-entering .success-shell > *:nth-child(2) { animation-delay: 0.1s; }
.quiz-step--success.is-entering .success-shell > *:nth-child(3) { animation-delay: 0.16s; }
.quiz-step--success.is-entering .success-shell > *:nth-child(4) { animation-delay: 0.22s; }

/* ── Questions (legacy) ── */
.quiz-question {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  text-align: center;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

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

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-options--grid .quiz-option {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 12px;
}

.quiz-option--wide {
  grid-column: 1 / -1;
}

.quiz-option.is-selected,
.quiz-option:active {
  border-color: var(--blue);
  background: rgba(30, 42, 74, 0.06);
}

.quiz-option-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.quiz-option-copy {
  flex: 1 1 0;
  min-width: 0;
}

.quiz-option-label {
  display: block;
  line-height: 1.3;
}

.quiz-option-desc {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}

.quiz-option.is-selected .quiz-option-desc,
.quiz-option:active .quiz-option-desc {
  color: rgba(26, 54, 142, 0.75);
}

/* ── Contact fields ── */
.quiz-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.quiz-field {
  position: relative;
  display: block;
  background: var(--field);
  border-radius: var(--field-radius);
  border: 1.5px solid var(--border);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.quiz-field:focus-within {
  background: var(--field-focus);
  border-color: rgba(30, 42, 74, 0.35);
}

.quiz-field.is-valid { border-color: rgba(49, 162, 76, 0.55); }
.quiz-field.is-invalid { border-color: rgba(220, 38, 38, 0.55); }

.quiz-field-label {
  display: block;
  padding: 10px 14px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.quiz-input {
  display: block;
  width: 100%;
  padding: 2px 40px 12px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  scroll-margin-bottom: 120px;
}

.quiz-input::placeholder { color: var(--dim); }

.quiz-field--phone .phone-row {
  display: flex;
  align-items: stretch;
  padding: 2px 40px 12px 0;
}

.phone-code {
  flex: 0 0 auto;
  max-width: 42%;
  padding: 0 10px 0 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7280' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 16px;
}

.quiz-field--phone .quiz-input--phone {
  flex: 1 1 0;
  min-width: 0;
  padding: 2px 0 0 10px;
  border-left: 1px solid var(--border);
}

.quiz-input:-webkit-autofill,
.quiz-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--field) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.quiz-check {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0;
  transform: translateY(-50%) scale(0.5);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.quiz-check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.quiz-field.is-valid .quiz-check {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ── Footer / CTA ── */
.quiz-footer {
  margin-top: auto;
  padding-top: 16px;
}

.quiz-footer--sticky {
  flex: 0 0 auto;
  position: static;
  z-index: 20;
  margin-top: 0;
  padding: 14px 0 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.quiz-step--intro .quiz-footer--sticky {
  margin-top: 0;
}

/* ── Slide CTA ── */
.slide-cta {
  position: relative;
  width: 100%;
  min-height: 58px;
  height: 58px;
  border-radius: 10px;
  background: var(--blue);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.slide-cta-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  pointer-events: none;
  transition: width 0.15s ease;
}

.slide-cta.is-complete .slide-cta-fill {
  width: 100% !important;
  transition: width 0.25s ease;
}

.slide-cta-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 56px;
  font-family: var(--font-headline);
  font-size: clamp(10px, 2.85vw, 13px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.25;
  color: #fff;
  pointer-events: none;
  text-align: center;
}

.slide-cta-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 50px;
  height: 50px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), left 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.slide-cta-handle:active {
  cursor: grabbing;
  transform: scale(0.97);
}

.slide-cta.is-dragging .slide-cta-handle {
  transition: none;
  will-change: left, transform;
}

.picker-card--premium,
.picker-chip,
.quiz-btn,
.slide-cta-handle,
.quiz-back {
  touch-action: manipulation;
}

.picker-card--premium,
.quiz-btn,
.slide-cta {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.slide-cta.is-complete .slide-cta-handle {
  left: calc(100% - 54px) !important;
  transition: left 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-cta-arrow {
  display: block;
  margin: 0 auto;
  width: 20px;
  height: 20px;
}

.slide-cta-hint {
  animation: nudge-arrow 1.8s ease-in-out infinite;
}

@keyframes nudge-arrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.quiz-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
}

.quiz-btn-text {
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.quiz-btn:active:not(:disabled) {
  background: var(--blue-press);
  transform: scale(0.98);
}

.quiz-btn:disabled { opacity: 0.65; }

.quiz-btn.is-loading .quiz-btn-text { opacity: 0; }
.quiz-btn.is-loading .quiz-btn-spinner { opacity: 1; }

.quiz-btn-spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}

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

body.keyboard-open .quiz-footer { padding-bottom: 8px; }

/* ── Lead capture modal ── */
.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lead-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lead-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: min(92dvh, 640px);
  overflow-y: auto;
  margin: 0 auto;
  padding: 22px 16px calc(18px + var(--safe-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--bg);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.lead-modal.is-open .lead-modal-panel {
  transform: translateY(0);
}

.lead-modal-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--text);
}

.lead-modal-sub {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--muted);
}

.lead-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lead-modal-submit {
  margin-top: 4px;
}

body.modal-open {
  overflow: hidden;
}


@media (min-width: 600px) {
  .lead-modal {
    align-items: center;
    padding: 20px;
  }

  .lead-modal-panel {
    border-radius: 16px;
    padding: 28px 24px 24px;
    transform: translateY(24px) scale(0.96);
  }

  .lead-modal.is-open .lead-modal-panel {
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
