/* =========================================================
   Quiz — SPA styles
   Complements /css/site.css (design tokens)
   ========================================================= */

/* ---------- Layout ---------- */
html, body { min-height: 100%; }
body {
  background: var(--white);
  color: var(--ink);
}

.quiz-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Topbar ---------- */
.quiz-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-2);
  position: sticky; top: 0; z-index: 10;
  background: var(--white);
}
.quiz-back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s;
  flex-shrink: 0;
}
.quiz-back:hover { background: var(--surface); }
.quiz-back img { width: 20px; height: 20px; }
.quiz-back.hidden { visibility: hidden; }
.quiz-logo {
  flex: 1; display: flex; justify-content: center;
}
.quiz-logo img { height: 26px; width: auto; }
.quiz-topbar-spacer { width: 32px; flex-shrink: 0; }

/* ---------- Progress ---------- */
.quiz-progress-wrap { padding: 10px 16px 0; }
.quiz-progress-label {
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.quiz-progress-bar {
  height: 4px; background: var(--surface);
  border-radius: 2px; overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; background: var(--brand);
  border-radius: 2px;
  transition: width .3s ease;
  width: 0%;
}

/* ---------- Main area ---------- */
.quiz-main {
  flex: 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 120px;
}

/* ---------- Titles ---------- */
.q-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 10px;
}
.q-subtitle {
  font-size: 15px;
  color: var(--ink-dim);
  margin-bottom: 24px;
  line-height: 1.5;
}
.q-prompt {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(20px, 3.5vw, 24px);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 10px;
  padding: 20px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  text-align: center;
  border-left: 4px solid var(--brand);
}

/* ---------- Option buttons (single) ---------- */
.q-options { display: flex; flex-direction: column; gap: 12px; }
.q-option {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 18px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4;
  text-align: left;
  transition: background .15s, color .15s, border-color .15s, transform .08s;
}
.q-option:hover { background: var(--surface-2); }
.q-option:active { transform: scale(.99); }
.q-option.selected {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}
.q-option-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.q-option-icon img { max-width: 100%; max-height: 100%; }
.q-option.selected .q-option-icon img { filter: brightness(0) invert(1); }

/* ---------- Intro grid (2x2 cards with image) ---------- */
.q-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.q-card {
  display: flex; flex-direction: column;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 17px;
  aspect-ratio: 3/4;
  text-align: left;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  transition: background .15s, border-color .15s, transform .1s;
}
.q-card:hover { background: var(--surface-2); }
.q-card.selected { background: var(--brand); color: var(--white); border-color: var(--brand); }
.q-card-img {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}
.q-card-img img { max-height: 100%; object-fit: contain; }

/* ---------- Likert ---------- */
.likert-labels {
  display: flex; justify-content: space-between;
  padding: 0 6px;
  font-size: 13px; color: var(--muted);
  margin-top: 24px; margin-bottom: 16px;
}
.likert-dots {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 8px 0 24px;
}
.likert-dot {
  background: var(--surface);
  border: 2px solid var(--surface-2);
  border-radius: 50%;
  transition: background .15s, border-color .15s, transform .1s;
  flex-shrink: 0;
}
.likert-dot:nth-child(1) { width: 56px; height: 56px; border-color: rgba(239,68,68,.35); }
.likert-dot:nth-child(2) { width: 48px; height: 48px; }
.likert-dot:nth-child(3) { width: 40px; height: 40px; }
.likert-dot:nth-child(4) { width: 48px; height: 48px; }
.likert-dot:nth-child(5) { width: 56px; height: 56px; border-color: rgba(34,197,94,.35); }
.likert-dot:hover { transform: scale(1.08); }
.likert-dot.selected {
  background: var(--brand);
  border-color: var(--brand);
}

/* ---------- Slider ---------- */
.slider-wrap { padding: 32px 4px; }
.slider-value {
  text-align: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 48px;
  color: var(--brand);
  margin-bottom: 16px;
}
.slider-wrap input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: 4px;
  background: var(--surface-2); outline: none; cursor: pointer;
}
.slider-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand);
  border: 4px solid var(--white);
  box-shadow: 0 3px 12px rgba(130,68,162,.4);
  cursor: pointer;
}
.slider-wrap input[type=range]::-moz-range-thumb {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand);
  border: 4px solid var(--white);
  box-shadow: 0 3px 12px rgba(130,68,162,.4);
}
.slider-ticks {
  display: flex; justify-content: space-between;
  margin-top: 12px;
  font-size: 13px; color: var(--muted);
  padding: 0 4px;
}

/* ---------- Info / Pitch screens ---------- */
.q-info {
  text-align: center;
  padding: 24px 0;
}
.q-info h1 {
  font-family: var(--f-display);
  font-size: clamp(24px, 4.5vw, 32px);
  margin-bottom: 16px;
  color: var(--ink);
}
.q-info p {
  font-size: 16px;
  color: var(--ink-dim);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.q-bullets {
  display: flex; flex-direction: column; gap: 12px;
  text-align: left;
  max-width: 420px; margin: 0 auto 32px;
}
.q-bullets li {
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 15px;
  display: flex; align-items: flex-start; gap: 12px;
}
.q-bullets li::before {
  content: "✓";
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: var(--brand); color: var(--white);
  border-radius: 50%;
  font-size: 14px; font-weight: 700;
}

/* ---------- Email ---------- */
.q-email-form { display: flex; flex-direction: column; gap: 16px; }
.q-email-form input {
  padding: 18px 16px;
  font-family: var(--f-sans); font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--surface-2);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s;
}
.q-email-form input:focus { border-color: var(--brand); }
.q-email-disclaimer {
  font-size: 13px; color: var(--muted); line-height: 1.5;
}

/* ---------- Footer (CTA row) ---------- */
.quiz-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--surface-2);
  padding: 16px;
  z-index: 10;
}
.quiz-footer-inner {
  max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
}
.quiz-footer .btn { width: 100%; }
.quiz-terms {
  font-size: 12px; color: var(--muted); text-align: center;
  line-height: 1.5;
}
.quiz-terms a { color: var(--brand); text-decoration: underline; }
.quiz-footer.hidden { display: none; }

/* ---------- Loader ---------- */
.quiz-loader {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  z-index: 100;
  transition: opacity .3s;
}
.quiz-loader.fade-out { opacity: 0; pointer-events: none; }
.quiz-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--surface-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   CHECKOUT
   ========================================================= */
.checkout-main {
  max-width: 560px; margin: 0 auto;
  padding: 0 16px 120px;
}
.checkout-timer-banner {
  background: var(--brand); color: var(--white);
  text-align: center;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
}
.checkout-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 17px;
  margin-left: 8px;
}
.checkout-section { margin-top: 32px; }
.checkout-title {
  font-family: var(--f-display);
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--ink);
}

/* Personalization card */
.personalize-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  position: relative;
}
.personalize-badge {
  position: absolute; top: -12px; left: 16px;
  background: var(--white);
  color: var(--brand);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.personalize-field .label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.personalize-field .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* Success probability */
.success-bars {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
}
.success-bar { text-align: center; display: flex; flex-direction: column; align-items: center; }
.success-bar .bar-viz {
  width: 64px;
  border-radius: 8px 8px 0 0;
  margin-bottom: 10px;
}
.success-bar.now   .bar-viz { height: 50px;  background: var(--muted); }
.success-bar.after .bar-viz { height: 120px; background: var(--brand); }
.success-bar .bar-value {
  font-family: var(--f-display); font-weight: 700;
  font-size: 20px; color: var(--ink);
}
.success-bar .bar-label {
  font-size: 13px; color: var(--muted); margin-top: 4px;
}

/* Plans */
.plans-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.plan-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 16px;
  border: 2px solid var(--surface-2);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s;
}
.plan-card:hover { border-color: var(--brand-light); }
.plan-card.selected {
  border-color: var(--brand);
  background: var(--surface);
}
.plan-card .badge {
  position: absolute; top: -11px; left: 16px;
  background: var(--brand); color: var(--white);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase;
}
.plan-card .badge.best { background: var(--success); }
.plan-left .label { font-family: var(--f-display); font-weight: 600; font-size: 17px; color: var(--ink); }
.plan-left .total { font-size: 12px; color: var(--muted); margin-top: 4px; }
.plan-left .total .old { text-decoration: line-through; margin-right: 6px; }
.plan-right { text-align: right; }
.plan-right .per-day-old { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.plan-right .per-day {
  font-family: var(--f-display); font-weight: 700; font-size: 22px;
  color: var(--brand);
}
.plan-right .per-day .unit { font-size: 12px; color: var(--muted); font-weight: 500; }

.checkout-disclaimer {
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 12px; color: var(--ink-dim); line-height: 1.6;
}
.checkout-trust {
  text-align: center; font-size: 13px; color: var(--muted);
}

/* =========================================================
   Responsive tweaks
   ========================================================= */
@media (min-width: 640px) {
  .q-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .quiz-main { padding: 32px 24px 140px; }
}

@media (max-width: 420px) {
  .likert-dot:nth-child(1), .likert-dot:nth-child(5) { width: 48px; height: 48px; }
  .likert-dot:nth-child(2), .likert-dot:nth-child(4) { width: 42px; height: 42px; }
  .likert-dot:nth-child(3) { width: 36px; height: 36px; }
}

/* ============================================================
   New screen types (2nd pass) — coaching, recap, loading, pitch
   ============================================================ */

.coaching, .recap-profile, .loading-plan, .pitch, .email-gate {
  padding: 24px 20px 120px;
  max-width: 620px;
  margin: 0 auto;
}
.coaching-headline {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.015em;
  color: var(--ink, #3B2B5B);
  margin: 0 0 14px; text-align: center;
}
.coaching-body {
  font-size: 16px; line-height: 1.5;
  color: var(--ink, #3B2B5B); opacity: .85;
  margin: 0 0 20px; text-align: center;
}

/* Rating (welcome coaching) */
.coaching-rating {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px; background: #F4EFF9; border-radius: 16px;
  margin: 16px auto; max-width: 320px;
}
.coaching-rating .stars { color: #F4B63F; font-size: 18px; letter-spacing: 2px; }
.coaching-rating .rating-value { font-weight: 700; font-size: 20px; }
.coaching-rating .rating-reviews { font-size: 13px; opacity: .75; }
.coaching-phone { margin: 18px auto; max-width: 320px; }
.coaching-phone img { width: 100%; display: block; border-radius: 16px; }
.coaching-phone figcaption { text-align: center; font-size: 13px; opacity: .7; margin-top: 6px; }

/* Bullets (honest coaching) */
.coaching-bullets {
  list-style: none; padding: 0;
  margin: 20px auto; max-width: 440px;
  display: flex; flex-direction: column; gap: 10px;
}
.coaching-bullets li {
  background: #F4EFF9;
  padding: 14px 16px 14px 44px;
  border-radius: 14px; position: relative;
  font-size: 15px; line-height: 1.4;
}
.coaching-bullets li::before {
  content: "\2713"; position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: #8244A2; color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}

/* Before/After coaching */
.ba-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-top: 20px;
}
@media (max-width: 520px) { .ba-grid { grid-template-columns: 1fr; gap: 16px; } }
.ba-panel { background: #F4EFF9; border-radius: 16px; padding: 16px; }
.ba-before { background: #FEECEC; }
.ba-after  { background: #E8F5EB; }
.ba-label {
  text-transform: uppercase; letter-spacing: .08em;
  font-size: 12px; font-weight: 700;
  margin-bottom: 10px; opacity: .7;
}
.ba-before .ba-label { color: #C14A4A; }
.ba-after  .ba-label { color: #3A9A55; }
.ba-bubbles { display: flex; flex-direction: column; gap: 8px; }
.ba-bubble {
  background: #fff; padding: 10px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Recap (first-goal coaching) */
.recap-list {
  display: flex; flex-direction: column; gap: 12px;
  background: #F4EFF9; padding: 18px; border-radius: 16px;
  margin: 20px 0;
}
.recap-row { display: flex; gap: 14px; align-items: center; }
.recap-icon {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: grid; place-items: center;
  background: #fff; border-radius: 50%;
}
.recap-icon img { width: 24px; height: 24px; }
.recap-content { flex: 1; }
.recap-label { font-size: 12px; opacity: .65; }
.recap-value { font-size: 16px; font-weight: 600; }

/* Testimonial card list */
.coaching-stat {
  text-align: center; background: #F4EFF9;
  padding: 18px; border-radius: 16px;
  margin: 16px auto; max-width: 360px;
}
.stat-num { font-size: 28px; font-weight: 800; color: #8244A2; }
.stat-caption { font-size: 14px; opacity: .8; margin-top: 4px; }
.testimonial-list {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 20px;
}
.testimonial-card {
  background: #fff; border: 1px solid #EAE5F1;
  padding: 16px; border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.testimonial-card .stars {
  color: #F4B63F; letter-spacing: 2px;
  font-size: 16px; margin-bottom: 8px;
}
.testimonial-text {
  font-size: 14px; line-height: 1.5;
  margin: 0 0 8px; font-style: italic;
}
.testimonial-name { font-size: 13px; font-weight: 600; opacity: .75; }

/* Recap profile (with meter) */
.recap-profile { text-align: center; }
.meter-wrap { margin: 20px auto; max-width: 460px; }
.meter-label { font-size: 14px; opacity: .7; margin-bottom: 10px; }
.meter-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; background: #EAE5F1;
  border-radius: 999px; overflow: hidden; height: 44px;
}
.meter-seg {
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #6F5E8F;
  border-right: 1px solid rgba(255,255,255,.6);
  position: relative;
}
.meter-seg:last-child { border-right: none; }
.meter-seg.pointed {
  background: linear-gradient(135deg, #FF7C7C, #F41C5D);
  color: #fff;
}
.meter-seg.pointed::after {
  content: "\25BC"; position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  color: #F41C5D; font-size: 14px;
}
.recap-fields {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
  background: #F4EFF9; padding: 20px; border-radius: 16px;
  margin: 22px auto 0; max-width: 520px; text-align: left;
}
@media (max-width: 480px) { .recap-fields { grid-template-columns: 1fr; } }
.recap-field .recap-label { font-size: 12px; opacity: .65; }
.recap-field .recap-value { font-size: 15px; font-weight: 600; }

/* Loading plan (25s progressive bars) */
.loading-plan { text-align: center; }
.lp-bars {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 460px; margin: 24px auto;
}
.lp-bar {
  display: grid; grid-template-columns: 1fr auto;
  gap: 6px 10px; align-items: center;
}
.lp-bar-label { grid-column: 1; font-size: 14px; text-align: left; }
.lp-bar-pct {
  grid-column: 2; font-size: 13px; font-weight: 700;
  color: #8244A2; min-width: 44px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.lp-bar-track {
  grid-column: 1 / -1;
  height: 8px; background: #EAE5F1;
  border-radius: 999px; overflow: hidden;
}
.lp-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #FF7C7C, #F41C5D);
  border-radius: 999px;
  transition: width .2s linear;
}

/* Pitch / Journey */
.pitch { text-align: center; }
.pitch-headline {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 700; letter-spacing: -0.015em;
  line-height: 1.1; margin: 0 0 24px;
}
.pitch-curve {
  display: flex; justify-content: space-between; gap: 12px;
  max-width: 560px; margin: 0 auto 24px; position: relative;
}
.pitch-curve::before {
  content: ""; position: absolute;
  left: 10%; right: 10%; top: 22px; height: 2px;
  background: linear-gradient(90deg, #EAE5F1 0%, #F41C5D 100%);
  z-index: 0;
}
.milestone {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.milestone::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: #F41C5D;
  box-shadow: 0 0 0 6px #fff, 0 0 0 7px #F41C5D;
}
.milestone-when { font-size: 12px; font-weight: 600; color: #6F5E8F; }
.milestone-label {
  font-size: 14px; font-weight: 600; line-height: 1.3; max-width: 140px;
}

/* Email gate */
.email-gate { text-align: center; }
.email-form { margin: 20px auto; max-width: 420px; }
.email-form input[type=email] {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px; font-family: inherit;
  border: 2px solid #EAE5F1;
  border-radius: 14px; background: #fff;
  color: var(--ink, #3B2B5B);
  outline: none; box-sizing: border-box;
}
.email-form input[type=email]:focus { border-color: #8244A2; }
.email-disclaimer {
  font-size: 12px; opacity: .65;
  max-width: 420px; margin: 16px auto 0;
  line-height: 1.5;
}

/* Option icon wrap (new structure) */
.q-option-iconwrap {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center;
  margin-right: 12px;
}
.q-option-iconwrap img { width: 28px; height: 28px; }
.q-option-multi { justify-content: space-between; }
.q-option-multi .q-option-label { flex: 1; text-align: left; }
.q-option-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #CFC3E0; flex-shrink: 0;
  position: relative;
}
.q-option-multi.selected .q-option-check {
  background: #8244A2; border-color: #8244A2;
}
.q-option-multi.selected .q-option-check::after {
  content: "\2713"; color: #fff; font-size: 13px; font-weight: 700;
  position: absolute; inset: 0; display: grid; place-items: center;
}

/* Slider end labels (new) */
.slider-end-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; opacity: .65; margin-top: 10px;
}
.q-card-label { display: block; padding: 12px 16px 14px; font-weight: 500; }

