/* ============================================================
   QUOTIFY FUNNEL V2 — Interactive redesign
   iOS-optimized · Spanish · Smart form + Morphing tiles
   ============================================================ */

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

:root {
  /* Brand palette */
  --blue:       #4BBAE9;
  --blue-dk:    #1D9BD4;
  --blue-xdk:   #0E3878;
  --blue-lt:    #E8F6FD;
  --blue-glow:  rgba(75,186,233,0.22);

  --orange:     #F07945;
  --orange-dk:  #D4592A;
  --orange-lt:  #FFF1E9;

  --green:      #30C75E;
  --green-lt:   #E4F9EB;
  --green-dk:   #166534;

  --red:        #EF4444;
  --amber:      #F59E0B;
  --amber-lt:   #FFFBEB;

  --ink:        #0F172A;
  --ink-soft:   #1E293B;
  --muted:      #475569;
  --muted-soft: #64748B;
  --line:       #E2E8F0;
  --line-soft:  #F1F5F9;
  --bg:         #FFFFFF;
  --surface:    #FFFFFF;
  --surface-2:  #FFFFFF;

  /* iOS safe areas */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow:    0 4px 14px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 14px 40px rgba(15,23,42,0.14), 0 4px 12px rgba(15,23,42,0.06);

  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html, body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; border: 0; background: transparent; }

/* No iOS zoom on input focus (needs >=16px) — enforced */
input, select, textarea { font-size: 16px; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* Header */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
}
.hdr-left { display: flex; align-items: center; gap: 10px; }
.hdr-back {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: all 0.18s var(--ease-out);
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}
.hdr-back.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.hdr-back:active { background: var(--line-soft); transform: scale(0.94); }

.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--blue-xdk);
}
.brand-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  margin-left: 1px;
  vertical-align: top;
  margin-top: 6px;
}

.hdr-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--muted);
  text-transform: uppercase;
  background: var(--line-soft);
  padding: 5px 10px;
  border-radius: 999px;
}

/* Progress dots */
.dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 20px 0;
}
.dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.dot-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--blue-dk), var(--blue));
  transform: translateX(-101%);
  transition: transform 0.6s var(--ease-out);
  box-shadow: 0 0 6px var(--blue-glow);
}
.dot.is-active .dot-fill { transform: translateX(0); }
.dot.is-done .dot-fill { transform: translateX(0); }

/* ============================================================
   PAGE CONTAINER (each page)
   ============================================================ */
.page {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 18px 20px 28px;
  position: relative;
}
.page.is-active {
  display: flex;
  animation: pageIn 0.5s var(--ease-out) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO / IMAGERY (mixed: family + peace-of-mind + lifestyle)
   Placeholder tiles with subtle stripes + label (real imagery drops in)
   ============================================================ */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--blue-lt);
  height: 170px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  box-shadow: var(--shadow);
}
.hero-single {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-tile {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hero-tile:nth-child(1) { grid-row: span 2; }
.hero-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(14,56,120,0.65));
}
.hero-tile-label {
  position: absolute;
  left: 8px; bottom: 8px;
  z-index: 1;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.4px;
  opacity: 0.78;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(14,56,120,0.0) 20%, rgba(14,56,120,0.55) 95%);
  z-index: 1;
}
.hero-caption {
  position: relative;
  z-index: 2;
  padding: 16px 18px;
  color: #fff;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid rgba(255,255,255,0.32);
}
.hero-chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.35);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(74,222,128,0.08); }
}
.hero-title {
  margin-top: 8px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ============================================================
   TITLES
   ============================================================ */
.q-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.6px;
  line-height: 1.15;
  color: var(--ink);
  margin-top: 18px;
  text-wrap: pretty;
}
.q-title em {
  font-style: normal;
  color: var(--blue-dk);
  position: relative;
  white-space: nowrap;
}
.q-title em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 6px;
  background: rgba(75,186,233,0.25);
  z-index: -1;
  border-radius: 3px;
}
.q-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.55;
}

/* ============================================================
   SMART FORM (page 1)
   Single form, field-by-field activation with live preview
   ============================================================ */
.form-stack {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  transition: all 0.28s var(--ease-out);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.field.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-glow), var(--shadow);
  transform: translateY(-1px);
}
.field.is-complete {
  background: linear-gradient(135deg, #fff, #F0FBFF);
  border-color: rgba(48,199,94,0.45);
}
.field.is-complete::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
  animation: slideIn 0.3s var(--ease-out);
}
@keyframes slideIn {
  from { transform: scaleY(0); transform-origin: top; }
  to   { transform: scaleY(1); transform-origin: top; }
}

.field-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.field-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--blue-lt);
  color: var(--blue-dk);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s var(--ease-out);
}
.field.is-complete .field-icon {
  background: var(--green-lt);
  color: var(--green-dk);
}
.field-icon svg { width: 16px; height: 16px; }

.field-meta { flex: 1; min-width: 0; }
.field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.field-label::after {
  content: ' *';
  color: var(--orange-dk);
  font-weight: 800;
  margin-left: 2px;
}
.field.is-complete .field-label::after {
  content: '';
  margin-left: 0;
}
.field-hint {
  font-size: 12px;
  color: var(--muted-soft);
  margin-top: 1px;
}

.field-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s var(--ease-out);
}
.field-check svg { width: 12px; height: 12px; }
.field.is-complete .field-check { opacity: 1; transform: scale(1); }

.field-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition: max-height 0.38s var(--ease-out), opacity 0.28s var(--ease-out), margin-top 0.3s var(--ease-out);
}
.field.is-active .field-body {
  max-height: 280px;
  opacity: 1;
  margin-top: 14px;
}

.input-row { display: flex; gap: 8px; }
.input {
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.input::placeholder { color: var(--muted-soft); }

.phone-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.phone-prefix {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--line-soft);
  border: 1.5px solid var(--line);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.state-pill-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.state-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all 0.18s var(--ease-out);
}
.state-pill:active { transform: scale(0.96); }
.state-pill.is-selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px var(--blue-glow);
}
.state-pill.is-detected::after {
  content: '📍';
  margin-left: 4px;
  font-size: 11px;
}

select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.err {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.25s var(--ease-out);
}
.err.is-visible { opacity: 1; max-height: 40px; }

/* Live preview card */
.preview {
  margin-top: 18px;
  padding: 16px;
  background: linear-gradient(135deg, var(--blue-xdk), #1E4A91);
  border-radius: var(--radius-lg);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(14,56,120,0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.5s var(--ease-out);
}
.preview.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.preview::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75,186,233,0.4), transparent 70%);
  pointer-events: none;
}
.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.preview-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.preview-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(74,222,128,0.22);
  color: #86EFAC;
  border: 1px solid rgba(74,222,128,0.3);
}
.preview-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  min-height: 28px;
  transition: all 0.4s var(--ease-out);
}
.preview-name.is-empty::after {
  content: '—';
  opacity: 0.4;
}
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  position: relative;
  z-index: 1;
}
.preview-item-label {
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.preview-item-value {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
  min-height: 17px;
  transition: all 0.3s var(--ease-out);
  word-break: break-word;
}
.preview-item-value:empty::after {
  content: '···';
  color: rgba(255,255,255,0.3);
  font-weight: 400;
}

/* ============================================================
   CTA BUTTON
   ============================================================ */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 20px;
  margin-top: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-dk) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1px;
  box-shadow:
    0 8px 22px rgba(240,121,69,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
  min-height: 54px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cta:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(240,121,69,0.35); }
.cta:disabled { opacity: 0.45; cursor: not-allowed; }
.cta-arrow {
  display: inline-flex;
  transition: transform 0.2s var(--ease-out);
}
.cta:not(:disabled):hover .cta-arrow { transform: translateX(3px); }

.cta-ghost {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 6px;
}

/* Trust micro-row */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.trust-item { display: flex; align-items: center; gap: 5px; }
.trust-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-soft); }

/* ============================================================
   PAGE 2 — Insurance tiles + Age picker
   ============================================================ */
.tiles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.tile {
  position: relative;
  width: 100%;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  padding: 12px 14px;
  padding-right: 42px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: left;
  overflow: hidden;
  transition: all 0.28s var(--ease-out);
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 56px;
}
.tile:active { transform: scale(0.98); }
.tile.is-selected {
  border-color: var(--blue);
  box-shadow: 0 6px 18px rgba(75,186,233,0.28);
  background: linear-gradient(90deg, #F0FBFF, #fff);
}
.tile.is-selected .tile-icon {
  background: var(--blue);
  color: #fff;
}
.tile.is-dimmed {
  opacity: 0.55;
}

.tile-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--blue-lt);
  color: var(--blue-dk);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.28s var(--ease-out);
}
.tile-icon svg { width: 20px; height: 20px; }

.tile > div:not(.tile-icon):not(.tile-check) {
  flex: 1;
  min-width: 0;
}

.tile-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  color: var(--ink);
  line-height: 1.2;
}
.tile-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

.tile-check {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%) scale(0.6);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.25s var(--ease-out);
}
.tile-check svg { width: 12px; height: 12px; }
.tile.is-selected .tile-check { opacity: 1; transform: translateY(-50%) scale(1); }

/* Age range picker — segmented control */
.age-picker {
  margin-top: 8px;
  background: var(--line-soft);
  border-radius: 14px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  position: relative;
}
.age-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(20% - 1.6px);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out);
  z-index: 0;
  left: 4px;
  transform: translateX(0);
}
.age-opt {
  position: relative;
  z-index: 1;
  padding: 12px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  transition: color 0.25s var(--ease-out);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.age-opt.is-selected { color: var(--blue-xdk); }

/* Summary morph card */
.summary {
  margin-top: 16px;
  background: linear-gradient(135deg, var(--blue-xdk), #1E4A91);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(14,56,120,0.3);
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  transition: all 0.5s var(--ease-out);
}
.summary.is-visible {
  opacity: 1;
  max-height: 400px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.summary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(240,121,69,0.22), transparent 55%);
  pointer-events: none;
}
.summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
}
.summary-sparkle {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(240,121,69,0.25);
  border: 1px solid rgba(240,121,69,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #FFBF9A;
  flex-shrink: 0;
}
.summary-header-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.summary-header-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  margin-top: 1px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  position: relative;
}
.summary-row:first-of-type { border-top: 0; }
.summary-row-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}
.summary-row-value {
  font-weight: 800;
  font-size: 14px;
  text-align: right;
}
.summary-mini-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74,222,128,0.2);
  color: #86EFAC;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  letter-spacing: 0.4px;
}

/* Social proof mini */
.proof {
  margin-top: 12px;
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.proof-avatars {
  display: flex;
  flex-shrink: 0;
}
.proof-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-left: -8px;
}
.proof-av:first-child { margin-left: 0; }
.proof-av-1 { background: linear-gradient(135deg, #F472B6, #DB2777); }
.proof-av-2 { background: linear-gradient(135deg, #60A5FA, #1D4ED8); }
.proof-av-3 { background: linear-gradient(135deg, #FBBF24, #D97706); }
.proof-body { flex: 1; min-width: 0; }
.proof-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}
.proof-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.proof-stars {
  color: #F59E0B;
  font-size: 11px;
  letter-spacing: 1px;
  margin-top: 1px;
}

/* Legal footer */
.legal {
  padding: 18px 20px 20px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks-panel {
  position: fixed;
  bottom: 14px;
  right: 14px;
  width: 260px;
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  z-index: 100;
  display: none;
  font-size: 12px;
}
.tweaks-panel.is-open { display: block; animation: pageIn 0.35s var(--ease-out); }
.tweaks-title {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tweak-group { margin-bottom: 10px; }
.tweak-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}
.tweak-opts { display: flex; gap: 5px; flex-wrap: wrap; }
.tweak-chip {
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.tweak-chip.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.tweak-swatch {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1.5px var(--line);
}
.tweak-swatch.is-active { box-shadow: 0 0 0 2.5px var(--ink); }

/* ============================================================
   iOS safari tweaks
   ============================================================ */
@supports (-webkit-touch-callout: none) {
  .input, select.input { font-size: 16px; }
  .app { min-height: -webkit-fill-available; }
}

/* Tiny screens */
@media (max-width: 380px) {
  .q-title { font-size: 23px; }
  .tile-title { font-size: 14px; }
}

/* ============================================================
   TESTIMONIALS (rotating, below hero)
   ============================================================ */
.testimonials {
  margin-top: 14px;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 70px;
  position: relative;
  overflow: hidden;
}
.testimonial-stack {
  position: relative;
  min-height: 56px;
}
.testimonial {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  pointer-events: none;
}
.testimonial.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.testimonial-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.testimonial-body { flex: 1; min-width: 0; }
.testimonial-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.testimonial-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}
.testimonial-loc {
  font-size: 11px;
  color: var(--muted);
}
.testimonial-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #F59E0B;
  margin-left: auto;
}
.testimonial-verified {
  font-size: 9px;
  font-weight: 700;
  color: var(--green-dk);
  background: var(--green-lt);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.testimonial-quote {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  font-style: italic;
}
.testimonial-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 10px;
}
.testimonial-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line);
  transition: all 0.3s var(--ease-out);
}
.testimonial-dot.is-active {
  background: var(--blue);
  width: 14px;
  border-radius: 3px;
}

/* ============================================================
   STATE DETECTED CARD
   ============================================================ */
.state-detected {
  background: linear-gradient(135deg, var(--blue-lt), #F0FBFF);
  border: 1.5px solid rgba(75,186,233,0.35);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  animation: pageIn 0.4s var(--ease-out);
}
.state-detected-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.state-detected-pin {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--blue-glow);
}
.state-detected-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.state-detected-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-xdk);
  letter-spacing: -0.3px;
}
.state-detected-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.state-btn {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all 0.18s var(--ease-out);
  min-height: 38px;
}
.state-btn:active { transform: scale(0.96); }
.state-btn--primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 3px 10px var(--blue-glow);
}


/* ============================================================
   SINGLE-PAGE FUNNEL — Section transition + scroll cue
   ============================================================ */

/* Scroll cue: hidden until contact fields complete, then animates in */
.scroll-cue {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition:
    max-height 0.5s var(--ease-out),
    opacity 0.35s var(--ease-out),
    transform 0.5s var(--ease-out);
}
.scroll-cue:active .scroll-cue-inner { transform: scale(0.98); }
.scroll-cue-inner { transition: transform 0.15s var(--ease-out); }
.scroll-cue.is-visible {
  opacity: 1;
  max-height: 140px;
  margin: 14px 0 2px;
  transform: translateY(0);
}
.scroll-cue-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #E8F6FD 0%, #F0FBFF 100%);
  border: 1.5px solid rgba(75,186,233,0.35);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(75,186,233,0.18);
  position: relative;
}
.scroll-cue-check {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(48,199,94,0.4);
  animation: cuePop 0.5s var(--ease-out);
}
.scroll-cue-check svg { width: 16px; height: 16px; }

.scroll-cue-text { flex: 1; min-width: 0; }
.scroll-cue-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--blue-xdk);
  line-height: 1.2;
  letter-spacing: -0.2px;
}
.scroll-cue-title span {
  font-style: normal;
  color: var(--blue-dk);
}
.scroll-cue-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
  line-height: 1.3;
}

.scroll-cue-arrow {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue-dk);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(15,23,42,0.1);
  animation: cueBounce 1.6s var(--ease-out) infinite;
}
.scroll-cue-arrow svg { width: 18px; height: 18px; }

@keyframes cuePop {
  0%   { transform: scale(0.3) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(8deg);  opacity: 1; }
  100% { transform: scale(1)    rotate(0);     opacity: 1; }
}
@keyframes cueBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* Section head (insurance section) */
.section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
  padding-top: 4px;
}
.section-step {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--blue-lt);
  color: var(--blue-dk);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.section-step svg { width: 20px; height: 20px; }

.section-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue-dk);
  margin-bottom: 2px;
}
.section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0;
}
.section-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
  text-wrap: pretty;
}

/* Age block wrapper */
.age-block {
  margin-top: 16px;
}
.age-block-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: -0.1px;
  margin-bottom: 8px;
}


/* ============================================================
   GUIDED ANIMATIONS — step-by-step user cues
   ============================================================ */

/* Pulse ring around the NEXT field to fill.
   Animates the box-shadow already on .field.is-active for a gentle pulse. */
.field.is-active:not(.is-complete) {
  animation: fieldPulse 2.4s var(--ease-out) infinite;
}
@keyframes fieldPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(75,186,233, 0.22), var(--shadow); }
  50%      { box-shadow: 0 0 0 10px rgba(75,186,233, 0.08), 0 8px 22px rgba(75,186,233, 0.18); }
}

/* Little animated "point here" arrow that appears next to the active field label */
.field.is-active:not(.is-complete) .field-icon {
  animation: iconBob 1.8s var(--ease-out) infinite;
}
@keyframes iconBob {
  0%,100% { transform: translateY(0) rotate(0); }
  50%     { transform: translateY(-2px) rotate(-4deg); }
}

/* Completed field: quick green flash to confirm */
.field.is-complete {
  animation: completeFlash 0.6s var(--ease-out);
}
@keyframes completeFlash {
  0%   { background: #ECFDF5; }
  100% { background: linear-gradient(135deg, #fff, #F0FBFF); }
}
.field.is-complete .field-check {
  animation: checkPop 0.45s var(--ease-out);
}
@keyframes checkPop {
  0%   { transform: scale(0.3) rotate(-30deg); }
  55%  { transform: scale(1.25) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Input focus glow — gentle blue pulse */
.field.is-active .input:focus {
  animation: inputFocus 0.5s var(--ease-out);
}
@keyframes inputFocus {
  0%   { box-shadow: 0 0 0 0 rgba(75,186,233, 0.6); }
  100% { box-shadow: 0 0 0 4px rgba(75,186,233, 0.15); }
}

/* Input placeholder animation when empty — subtle shimmer to invite typing */
.field.is-active .input::placeholder {
  animation: placeholderBreathe 3s ease-in-out infinite;
}
@keyframes placeholderBreathe {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.85; }
}

/* "Siguiente" button nudge — gently bobs when field is valid and ready to advance */
.field.is-active .field-body .cta:not(:disabled) {
  animation: ctaReady 2.2s var(--ease-out) infinite;
}
@keyframes ctaReady {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* Next-field teaser: faint "peek" on the COLLAPSED next field so user knows
   there's more. It breathes in opacity. */
.field:not(.is-active):not(.is-complete) {
  position: relative;
}
.field:not(.is-active):not(.is-complete) .field-head {
  animation: nextTeaser 3.5s ease-in-out infinite;
}
@keyframes nextTeaser {
  0%, 100% { opacity: 0.58; }
  50%      { opacity: 0.92; }
}

/* Tile selection confetti-pop */
.tile.is-selected {
  animation: tilePop 0.5s var(--ease-out);
}
@keyframes tilePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}

/* Age-option tap feedback */
.age-opt {
  transition: color 0.25s var(--ease-out), transform 0.2s var(--ease-out);
}
.age-opt:active {
  transform: scale(0.94);
}
.age-opt.is-selected {
  animation: ageSelected 0.4s var(--ease-out);
}
@keyframes ageSelected {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Scroll cue rainbow shimmer when it first appears */
.scroll-cue.is-visible .scroll-cue-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255,255,255,0.6) 50%,
    transparent 100%);
  background-size: 200% 100%;
  animation: cueShimmer 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cueShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Final CTA — pulse when ALL conditions are met and ready to submit */
#ctaPage2:not(:disabled) {
  animation: finalReady 1.8s var(--ease-out) infinite;
}
@keyframes finalReady {
  0%, 100% { box-shadow: 0 6px 20px rgba(240,121,69, 0.35); }
  50%      { box-shadow: 0 10px 28px rgba(240,121,69, 0.55), 0 0 0 6px rgba(240,121,69, 0.12); }
}

/* Progress indicator dots next to active field — subtle typing trail */
.field.is-active .field-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  margin-right: 6px;
  vertical-align: middle;
  animation: typingDot 1.2s ease-in-out infinite;
}
@keyframes typingDot {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* Reduced motion: disable all of these for accessibility */
@media (prefers-reduced-motion: reduce) {
  .field.is-active:not(.is-complete),
  .field.is-active:not(.is-complete) .field-icon,
  .field.is-complete,
  .field.is-complete .field-check,
  .field.is-active .input:focus,
  .field.is-active .input::placeholder,
  .field.is-active .field-body .cta:not(:disabled),
  .field:not(.is-active):not(.is-complete) .field-head,
  .tile.is-selected,
  .age-opt.is-selected,
  .scroll-cue.is-visible .scroll-cue-inner::before,
  #ctaPage2:not(:disabled),
  .field.is-active .field-label::before {
    animation: none !important;
  }
}


/* ============================================================
   LEGAL MODAL
   ============================================================ */
.modal[hidden] { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: modalFade .22s ease;
}
@media (min-width: 640px) {
  .modal { align-items: center; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  background: #fff;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -20px 60px rgba(10, 22, 40, 0.25);
  animation: modalSlide .32s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 640px) {
  .modal-panel {
    border-radius: 20px;
    max-height: 82vh;
    box-shadow: 0 30px 80px rgba(10, 22, 40, 0.3);
    animation: modalPop .32s cubic-bezier(.2,.8,.2,1);
  }
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalSlide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Drag handle for mobile bottom-sheet feel */
@media (max-width: 639px) {
  .modal-panel::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(10, 22, 40, 0.18);
    z-index: 3;
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 22px 16px;
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
  flex-shrink: 0;
}
@media (max-width: 639px) {
  .modal-head { padding-top: 28px; }
}

.modal-kicker {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand, #4BBAE9);
  margin-bottom: 6px;
}

.modal-title {
  font-family: "Fraunces", serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink, #0A1628);
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 22, 40, 0.06);
  color: var(--ink, #0A1628);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { background: rgba(10, 22, 40, 0.1); }
.modal-close:active { transform: scale(.92); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 22px 8px;
}

.modal-body h3 {
  font-family: "Fraunces", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink, #0A1628);
  margin: 22px 0 8px;
  letter-spacing: -0.005em;
}
.modal-body h3:first-child { margin-top: 4px; }

.modal-body p {
  font-family: "DM Sans", sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: #3c4858;
  margin: 0 0 10px;
}
.modal-body p strong {
  color: var(--ink, #0A1628);
  font-weight: 600;
}

.modal-body ul {
  margin: 8px 0 12px;
  padding-left: 20px;
}
.modal-body li {
  font-family: "DM Sans", sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: #3c4858;
  margin-bottom: 6px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(10, 22, 40, 0.06);
  background: #fff;
  flex-shrink: 0;
}

.modal-foot-meta {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: var(--muted, #7a8494);
}

.modal-ok {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--ink, #0A1628);
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.modal-ok:hover { background: #162236; }
.modal-ok:active { transform: scale(.96); }

/* Make the legal footer links feel tappable */
.legal a {
  cursor: pointer;
  transition: color .15s ease;
}
.legal a:hover {
  color: var(--brand, #4BBAE9);
  text-decoration-color: var(--brand, #4BBAE9);
}

/* Prevent body scroll when modal open */
body.modal-open { overflow: hidden; }


/* ============================================================
   STATE DETECTED CARD — CONFIRMATION ANIMATION
   ============================================================ */
.state-detected {
  transition: background .25s var(--ease-out), border-color .25s var(--ease-out), transform .3s var(--ease-out);
}

/* When "Sí" is tapped: card flashes green, pulses, and a giant check sweeps in */
.state-detected.is-confirming {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border-color: rgba(48,199,94,0.55);
  animation: stateConfirmPulse 0.6s var(--ease-out);
}

.state-detected.is-confirming .state-detected-pin {
  background: var(--green, #30C75E);
  box-shadow: 0 6px 18px rgba(48,199,94,0.35);
  animation: pinPop 0.55s var(--ease-out);
}

.state-detected.is-confirming .state-detected-label,
.state-detected.is-confirming .state-detected-name {
  animation: labelShift 0.5s var(--ease-out);
}

.state-detected.is-confirming .state-detected-actions {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

/* Overlay a giant checkmark that sweeps across the card */
.state-detected.is-confirming::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green, #30C75E);
  background-image:
    linear-gradient(45deg, transparent 45%, #fff 46%, #fff 52%, transparent 53%),
    linear-gradient(-45deg, transparent 58%, #fff 59%, #fff 66%, transparent 67%);
  background-size: 18px 18px, 18px 18px;
  background-position: center, center;
  background-repeat: no-repeat;
  box-shadow: 0 6px 18px rgba(48,199,94,0.45);
  animation: confirmCheckBurst 0.7s var(--ease-out) 0.1s forwards;
}

.state-detected { position: relative; }

@keyframes stateConfirmPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes pinPop {
  0%   { transform: scale(1) rotate(0); }
  45%  { transform: scale(1.18) rotate(-6deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes labelShift {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

@keyframes confirmCheckBurst {
  0%   { transform: translateY(-50%) scale(0) rotate(-40deg); opacity: 0; }
  40%  { transform: translateY(-50%) scale(1.2) rotate(6deg); opacity: 1; }
  70%  { transform: translateY(-50%) scale(0.95) rotate(0); opacity: 1; }
  100% { transform: translateY(-50%) scale(1) rotate(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .state-detected.is-confirming,
  .state-detected.is-confirming .state-detected-pin,
  .state-detected.is-confirming .state-detected-label,
  .state-detected.is-confirming .state-detected-name,
  .state-detected.is-confirming::after {
    animation: none !important;
  }
}

/* ============================================================
   PAGE 3 — THANK YOU PAGE
   Variable aliases: map old design tokens → funnel-v2 tokens
   ============================================================ */
:root {
  --g50:    #F8FAFC;
  --g200:   #E2E8F0;
  --g400:   #64748B;
  --g900:   #0F172A;
  --blue-bd: rgba(75,186,233,0.30);
  --white:  #FFFFFF;
}

/* Wrap & card */
.final-wrap { width: 100%; display: flex; justify-content: center; padding: 20px 16px 36px; }
.final-card  { width: 100%; max-width: 400px; }

/* Success header */
.final-success {
  text-align: center;
  padding: 8px 16px 20px;
  background: linear-gradient(180deg, var(--blue-lt) 0%, transparent 100%);
  border-radius: 20px;
  margin-bottom: 16px;
}
.final-check { display: flex; justify-content: center; margin: 0 0 14px; }
.final-check svg { width: 54px; height: 54px; filter: drop-shadow(0 4px 12px rgba(75,186,233,0.45)); }
.final-check circle { fill: var(--blue); stroke: var(--blue); stroke-width: 2; }
.final-check path   { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.final-h1 {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px; line-height: 1.3; font-weight: 900; color: var(--g900);
}
.final-highlight { color: var(--blue-dk); }
.final-p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--g400); }

/* Call card */
.final-call {
  margin: 0 0 14px;
  background: linear-gradient(135deg, #B71C1C, #C62828);
  border: 1px solid rgba(239,68,68,0.30);
  border-radius: 16px; padding: 18px 16px 16px; text-align: center;
  box-shadow: 0 6px 20px rgba(183,28,28,0.30);
}
.final-call-title { font-size: 15px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 12px; color: #FFF; }
.final-call-icon { font-size: 15px; }
.final-call-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.18); border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 800; color: #FFF; border: 1px solid rgba(255,255,255,0.25); }
.final-switch { width: 26px; height: 15px; border-radius: 999px; background: rgba(255,255,255,0.35); position: relative; display: inline-block; }
.final-switch-dot { width: 11px; height: 11px; border-radius: 999px; background: #FFF; position: absolute; top: 2px; left: 2px; }
.final-call-text { margin: 12px 0 0; font-size: 12px; line-height: 1.45; color: #FFCDD2; }

/* Video section */
.final-video { margin: 0 0 14px; background: var(--blue-lt); border: 1.5px solid var(--blue-bd); border-radius: 16px; padding: 16px; border-top: 3px solid var(--blue); box-shadow: 0 4px 14px var(--blue-glow); }
.final-video-badge { display: inline-flex; align-items: center; gap: 6px; background: #DC2626; color: #FFF; font-weight: 900; font-size: 11px; padding: 6px 14px; border-radius: 999px; letter-spacing: 0.2px; }
.final-video-h2 { margin: 12px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: 16px; font-weight: 900; color: var(--g900); }
.final-video-p { margin: 7px 0 12px; font-size: 12px; line-height: 1.5; color: var(--g400); }
.final-video-frame { width: 100%; border-radius: 10px; overflow: hidden; background: #0B1E36; border: 1px solid var(--blue-bd); cursor: pointer; }
.final-video-skeleton { position: relative; width: 100%; padding-top: 56.25%; background: linear-gradient(180deg, rgba(75,186,233,0.08), rgba(75,186,233,0)); }
.final-play { width: 58px; height: 58px; border-radius: 999px; background: rgba(75,186,233,0.25); border: 2px solid rgba(75,186,233,0.55); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); box-shadow: 0 8px 24px rgba(0,0,0,0.40); transition: transform 0.15s, background 0.15s; pointer-events: none; }
.final-play::before { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%); width: 0; height: 0; border-left: 18px solid rgba(255,255,255,0.95); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.final-video-benefits { margin-top: 12px; display: grid; gap: 10px; }
.final-vb { background: var(--white); border-radius: 10px; padding: 11px 13px; border: 1.5px solid var(--blue-bd); }
.final-vb-title { font-weight: 800; font-size: 12px; color: var(--blue-dk); }
.final-vb-sub { margin-top: 2px; font-size: 11px; color: var(--g400); line-height: 1.4; }

/* Info sections */
.final-section { margin: 0 0 14px; background: var(--g50); border-radius: 16px; padding: 16px; border: 1.5px solid var(--g200); }
.final-sec-title { font-size: 13px; font-weight: 900; color: var(--g900); margin: 0 0 12px; display: flex; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 1.5px solid var(--g200); }
.final-info-card { background: var(--white); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; border: 1px solid var(--g200); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.final-info-card:last-child { margin-bottom: 0; }
.final-info-card--accent { background: var(--blue-lt); border-left: 3px solid var(--blue); }
.final-info-card--soft   { background: var(--orange-lt); border-left: 3px solid var(--orange); }
.final-info-title { font-weight: 800; font-size: 12px; color: var(--g900); }
.final-info-text  { margin-top: 4px; font-size: 11px; line-height: 1.45; color: var(--g400); }

/* Checklist */
.final-checklist { display: grid; gap: 8px; }
.final-cl-item { display: flex; gap: 11px; align-items: flex-start; background: var(--white); border: 1px solid var(--g200); border-radius: 10px; padding: 11px 13px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.final-cl-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--blue-lt); color: var(--blue-dk); border: 1.5px solid var(--blue-bd); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 11px; flex: 0 0 20px; }
.final-cl-text {}
.final-cl-strong { font-weight: 800; font-size: 12px; color: var(--g900); }
.final-cl-sub    { margin-top: 2px; font-size: 10.5px; color: var(--g400); line-height: 1.4; }
.final-mini-line { margin: 12px 0 0; text-align: center; font-size: 10.5px; color: var(--blue-dk); font-weight: 800; letter-spacing: 0.3px; }

/* FAQ */
.final-faq { display: grid; gap: 8px; }
.final-faq-item { background: var(--white); border: 1px solid var(--g200); border-radius: 10px; padding: 11px 13px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.final-faq-q { font-size: 12px; font-weight: 800; color: var(--g900); }
.final-faq-a { margin-top: 4px; font-size: 11px; color: var(--g400); line-height: 1.4; }

/* Bottom CTA */
.final-bottom { margin: 0; background: linear-gradient(135deg, var(--blue-dk), var(--blue-xdk)); border-radius: 16px; padding: 24px 16px 20px; text-align: center; position: relative; box-shadow: 0 8px 24px rgba(75,186,233,0.30); }
.final-bottom-phone { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; position: absolute; top: -20px; left: 50%; transform: translateX(-50%); box-shadow: 0 8px 22px rgba(240,121,69,0.55); font-size: 19px; }
.final-bottom-text { margin-top: 8px; font-size: 14px; font-weight: 700; color: #FFF; line-height: 1.35; }
.final-bottom-accent { display: inline-block; margin-top: 8px; background: var(--orange); color: #FFF; font-weight: 900; font-size: 13px; padding: 7px 16px; border-radius: 8px; letter-spacing: 0.3px; box-shadow: 0 4px 16px rgba(240,121,69,0.45); }
.final-bottom-sub { margin-top: 10px; font-size: 10.5px; color: rgba(255,255,255,0.65); line-height: 1.4; }

/* Footer */
.page-footer { margin-top: 16px; text-align: center; font-size: 11px; color: var(--g400); }
.page-footer a { color: var(--g400); text-decoration: underline; }
.legal-disclaimer { margin-top: 12px; font-size: 9px; line-height: 1.55; color: var(--g400); text-align: center; opacity: 0.8; }
.final-card .page-footer { margin: 16px 0 0; }
