/* ==========================================================================
   iSTL Quiz Funnel — restyle on iSpeedToLead design system
   White surface, red brand (#CC0000), Inter type.
   v=goal-chart-redesign
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-VariableFont.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Italic-VariableFont.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Brand */
  --color-accent:        #CC0000;
  --color-accent-hover:  #E43A3A;
  --color-red-dark:      #8E0000;
  --color-red-bg:        #FFE6E6;
  --color-red-lighter:   #FDEDF0;

  /* Ink — all values audited for WCAG AA on white + #EDEFF3 page bg.
     Old #777A8D / #A0A3BD failed AA (3.8:1 / 2.6:1); they were the source
     of the "too gray, hard to read" complaint. */
  --color-title:         #111727;  /* 16.6:1 on white  — AAA */
  --color-black:         #242A38;  /* 12.8:1 on white  — AAA */
  --color-text-sub:      #4A4F5E;  /*  8.2:1 on white  — AAA */
  --color-default:       #5A5E70;  /*  6.0:1 on white  — AAA, AA on bg */
  --color-grey:          #6F7388;  /*  4.6:1 on white  — AA  (decorative captions only) */

  /* Surfaces */
  --color-white:         #FFFFFF;
  --color-bg:            #EDEFF3;
  --color-bg-2:          #F6F8FA;
  --color-bg-3:          #F3F9FC;

  /* Borders */
  --color-border:        #E2E5EA;
  --color-stroke-soft:   #E2E4E9;
  --color-divider:       #CDD1D8;

  /* Semantic */
  --color-success:       #02994D;
  --color-success-light: #4CAF50;
  --color-warning:       #FFA000;
  --color-info:          #55B4FF;
  --color-premium:       #FFCA00;

  /* Gradients */
  --gradient-logo:    linear-gradient(135deg, #D91F00 0%, #D90200 93%, #D90000 100%);
  --gradient-red-cta: linear-gradient(180deg, #E43A3A 0%, #CC0000 100%);

  /* Shadows */
  --shadow-card:   none;
  --shadow-md:     none;
  --shadow-lg:     none;
  --shadow-cta:    none;

  /* Radii */
  --radius:    8px;
  --radius-md: 10px;
  --radius-lg: 15px;
  --radius-pill: 999px;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Motion */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-base: 300ms;

  /* Layout — kept in sync between sticky topbar and sticky progress bar */
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
*, *::before, *::after { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-black);
  background: var(--color-bg);
  font-feature-settings: "ss01", "cv11";
}
/* Force Inter inheritance for any element that explicitly sets font-family
   (some inline styles + the SVG GoalChart already use Inter; this is a safety net). */
input, textarea, select, button, svg text { font-family: var(--font-sans); }

::selection { background: var(--color-accent); color: #fff; }

/* ===== App shell ===== */
.app-shell {
  min-height: 100vh;
  background: var(--color-bg);
  position: relative;
}

.app-shell::before { display: none; }

.app-content { position: relative; z-index: 1; }

/* ===== Progress bar ===== */
.progress-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 39;
  height: 3px;
  background: var(--color-border);
}
.progress-bar__fill {
  height: 100%;
  background: var(--color-accent);
  transition: width 600ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-bg);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 24px;
  max-width: 100%;
  min-height: var(--topbar-h);
  border-bottom: 1px solid transparent;
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
}
.topbar__right {
  justify-self: end;
}
.topbar__center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar__section {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-accent);
}
.topbar__back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-title);
  transition: border-color 180ms, color 180ms;
  flex-shrink: 0;
}
.topbar__back:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.topbar__back--placeholder {
  width: 36px;
  height: 36px;
  visibility: hidden;
  pointer-events: none;
}
.topbar__logo {
  height: 36px;
  width: auto;
  display: block;
}

/* ===== Main container ===== */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 140px;
}

/* ===== Sticky CTA bar ===== */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: linear-gradient(180deg, rgba(237,239,243,0) 0%, var(--color-bg) 30%, var(--color-bg) 100%);
  padding: 20px 20px 24px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.sticky-cta__inner {
  width: 100%;
  max-width: 420px;
  pointer-events: auto;
}
.sticky-cta .btn-primary {
  margin-top: 0;
}


/* ===== Headlines ===== */
.h-display {
  font-size: 36px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-title);
  margin: 0 0 16px;
  text-wrap: balance;
  text-align: center;
}
.h-question {
  font-size: 26px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-title);
  margin: 0 0 14px;
  text-wrap: balance;
  text-align: center;
}
.h-subtle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-sub);
  margin: 0 auto 24px;
  text-align: center;
  max-width: 520px;
}

@media (min-width: 768px) {
  .h-display { font-size: 48px; }
  .h-question { font-size: 32px; }
  .h-subtle { font-size: 17px; }
}

.accent { color: var(--color-accent); }

/* ===== Option button ===== */
.opt {
  width: 100%;
  text-align: left;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: border-color 180ms var(--ease-default), background-color 180ms var(--ease-default);
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: inherit;
  font-size: 18px;
  color: var(--color-black);
  min-height: 64px;
}
.opt:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-2);
}
.opt--selected,
.opt--selected:hover {
  border-color: var(--color-accent);
  background: var(--color-red-lighter);
}

.opt__body { flex: 1; min-width: 0; }
.opt__label {
  font-weight: 500;
  font-size: 18px;
  color: var(--color-title);
  line-height: 1.35;
}
.opt__detail {
  margin-top: 4px;
  font-size: 16px;
  color: var(--color-default);
  line-height: 1.45;
}
.opt__check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--color-divider);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: all 180ms var(--ease-default);
}
.opt__check--box {
  border-radius: 7px;
}
.opt__check--radio {
  border-radius: 50%;
}
.opt__check-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  display: block;
}
.opt--selected .opt__check {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: white;
}
.opts-stack { display: flex; flex-direction: column; gap: 12px; }
.multi-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(229, 35, 30, 0.08);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* ===== Input ===== */
.input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 17px;
  color: var(--color-title);
  background: var(--color-white);
  transition: border-color 180ms var(--ease-default);
}
.input:focus {
  outline: none;
  border-color: var(--color-accent);
}
.input--icon { padding-left: 48px; }
.input-wrap { position: relative; }
.input-wrap__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent);
}

/* ===== Primary button ===== */
.btn-primary {
  width: 100%;
  margin-top: 28px;
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.005em;
  transition: background-color 180ms var(--ease-default);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-red-dark);
}
.btn-primary:disabled {
  background: var(--color-bg);
  color: var(--color-grey);
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--color-white);
  color: var(--color-title);
  border: 1.5px solid var(--color-border);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn-link {
  background: none;
  border: none;
  color: var(--color-default);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}
.btn-link:hover { color: var(--color-accent); }

/* ===== Card ===== */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.card--accent {
  border-color: var(--color-accent);
  border-width: 1.5px;
}
.card--soft {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
}
.card--feature {
  background: var(--color-white);
  border-color: var(--color-accent);
}

/* ===== Eyebrow / tag ===== */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ===== Pills / chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-red-bg);
  border: 1px solid rgba(204,0,0,0.2);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--color-success);
  opacity: 0.3;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.3; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ===== Intro hero ===== */
.intro {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  padding-top: 16px;
}
.intro__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent);
}
.intro__h1 {
  font-size: 44px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-title);
  margin: 0 0 20px;
}
.intro__h1 em {
  font-style: normal;
  color: var(--color-accent);
}
@media (min-width: 768px) {
  .intro__h1 { font-size: 60px; }
}
.intro__sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-sub);
  max-width: 460px;
  margin: 0 auto 32px;
}
.intro__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 32px;
  font-size: 12px;
  color: var(--color-default);
  font-weight: 500;
  flex-wrap: wrap;
}
.intro__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.intro__meta-item svg { color: var(--color-accent); }
.intro__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-divider);
}
.intro__social {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-default);
}
.intro__avatars {
  display: flex;
}
.intro__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
  border: 2px solid var(--color-bg);
  margin-left: -8px;
}
.intro__avatar:first-child { margin-left: 0; }

/* ===== Math row ===== */
.math-row {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.math-row__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--color-red-lighter);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.math-row__label {
  flex: 1;
  font-size: 16px;
  color: var(--color-default);
  line-height: 1.4;
}
.math-row__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-title);
  font-variant-numeric: tabular-nums;
}
.math-row--dim .math-row__value { color: var(--color-default); }

/* ===== Plan / list items ===== */
.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-black);
}
.plan-item__check {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-success);
}
.plan-item--highlight {
  font-weight: 600;
  color: var(--color-title);
}
.plan-item--highlight .plan-item__check { color: var(--color-accent); }

/* ===== Stat grid ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  text-align: left;
}
.stat__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 11px;
  color: var(--color-default);
  line-height: 1.35;
}

/* ===== Two-column grid ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== Big number ===== */
.bignum {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.bignum-sub {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-title);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ===== Avatar ===== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }

/* ===== Loader ===== */
.loader-spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--color-default);
  padding: 10px 0;
  text-align: left;
  transition: color 300ms;
}
.loader-step--active { color: var(--color-title); font-weight: 500; }
.loader-step--done { color: var(--color-title); }
.loader-step__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-divider);
  flex-shrink: 0;
}
.loader-step--active .loader-step__dot {
  background: var(--color-accent);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.loader-step--done .loader-step__dot { display: none; }
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* ===== Price tile (paywall) ===== */
.price-tile {
  position: relative;
  background: white;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 180ms var(--ease-default);
  font-family: inherit;
}
.price-tile:hover { border-color: var(--color-accent); }
.price-tile--selected {
  border-color: var(--color-accent);
  background: var(--color-red-lighter);
  border-width: 2px;
}
.price-tile__amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-title);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.price-tile--selected .price-tile__amount { color: var(--color-accent); }
.price-tile__sub {
  font-size: 11px;
  color: var(--color-default);
  line-height: 1.3;
}
.price-tile__badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  text-transform: uppercase;
}

/* ===== Price row (line item) ===== */
.price-row {
  display: flex;
  align-items: center;
  justify-content: between;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}
.price-row__label { color: var(--color-black); }
.price-row__value {
  color: var(--color-success);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== Form field ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-default);
  font-weight: 600;
}
.field__input {
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  color: var(--color-title);
  background: white;
  transition: all 180ms;
}
.field__input:focus {
  outline: none;
  border-color: var(--color-accent);
}
.field__input--error,
.field__input--error:focus {
  border-color: #dc2626;
  background: #fef2f2;
}
.field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #dc2626;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.4;
}
.field__error::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
}
.field__hint {
  font-size: 14px;
  color: var(--color-default);
  margin-top: 4px;
  line-height: 1.5;
}

/* ===== Phone input with country prefix ===== */
.phone-input {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
  transition: all 180ms;
}
.phone-input:focus-within {
  border-color: var(--color-accent);
}
.phone-input--error,
.phone-input--error:focus-within {
  border-color: #dc2626;
  background: #fef2f2;
}
.phone-input__prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--color-bg-2);
  border-right: 1.5px solid var(--color-border);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.phone-input--error .phone-input__prefix {
  background: #fee2e2;
  border-right-color: #dc2626;
}
.phone-input__field {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-title);
  outline: none;
}

/* ===== Trust strip ===== */
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-default);
  font-weight: 600;
  flex-wrap: wrap;
}
.trust-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.trust-strip__sep { color: var(--color-divider); }

/* ===== Countdown ===== */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--color-red-lighter);
  border: 1px solid rgba(204,0,0,0.2);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--color-text-sub);
}
.countdown__time {
  color: var(--color-accent);
  font-family: 'Inter', monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ===== Logo display ===== */
.logo-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--color-title);
  letter-spacing: -0.02em;
}
.logo-text__mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

/* ===== Animations (fade-in for screen transitions) ===== */
/* Note: avoid transform on .fade-in — it creates a containing block and
   breaks position:fixed on .sticky-cta inside it (causing the button to jump). */
.fade-in {
  animation: fadeInOnly 300ms var(--ease-default);
}
@keyframes fadeInOnly {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-in {
  animation: slideIn 350ms var(--ease-default);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Stagger fade ===== */
.stag > * {
  opacity: 0;
  animation: fadeInUp 320ms var(--ease-default) forwards;
}
.stag > *:nth-child(1) { animation-delay: 60ms; }
.stag > *:nth-child(2) { animation-delay: 120ms; }
.stag > *:nth-child(3) { animation-delay: 180ms; }
.stag > *:nth-child(4) { animation-delay: 240ms; }
.stag > *:nth-child(5) { animation-delay: 300ms; }
.stag > *:nth-child(6) { animation-delay: 360ms; }
.stag > *:nth-child(7) { animation-delay: 420ms; }

/* ===== Star rating ===== */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--color-premium);
}

/* ===== Quote callout ===== */
.callout {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.callout__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.callout__text {
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-title);
}

/* ===== Calendly inline embed wrap ===== */
.calendly-wrap {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 -8px;
}
.calendly-inline-widget {
  width: 100%;
  border: 0;
}
@media (max-width: 480px) {
  .calendly-wrap { margin: 0; }
  .calendly-inline-widget { height: 600px !important; }
}

/* ===== Education lead-in (personal, segment- or frustration-aware) ===== */
.edu-leadin {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--color-accent);
  background: var(--color-red-lighter);
  border-left: 3px solid var(--color-accent);
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 20px;
}

/* ===== Bullet stack (archetype reveal — scannable, lead-bold pattern) ===== */
.bullet-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bullet-stack__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.bullet-stack__dot {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.bullet-stack__text {
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text-sub);
}
.bullet-stack__text strong {
  color: var(--color-title);
  font-weight: 700;
}
.bullet-stack__rest { font-weight: 400; }

/* ===== Numbered list ===== */
.num-list { display: flex; flex-direction: column; gap: 14px; }
.num-list__item { display: flex; gap: 12px; align-items: flex-start; }
.num-list__num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.num-list__label {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-title);
  margin-bottom: 4px;
  line-height: 1.4;
}
.num-list__detail {
  font-size: 16px;
  color: var(--color-default);
  line-height: 1.5;
}

/* ===== Success splash ===== */
.success-splash {
  text-align: center;
  padding-top: 48px;
  max-width: 480px;
  margin: 0 auto;
}
.success-splash__icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: popIn 400ms var(--ease-default);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== Specialist card ===== */
.specialist {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.specialist__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-title);
}
.specialist__role {
  font-size: 12px;
  color: var(--color-default);
  margin-bottom: 8px;
}
.specialist__quote {
  font-size: 13px;
  color: var(--color-text-sub);
  line-height: 1.5;
}

/* ===== Slot grid ===== */
.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.slot {
  text-align: left;
  background: white;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 180ms;
  font-family: inherit;
}
.slot:hover { border-color: var(--color-accent); }
.slot--selected {
  border-color: var(--color-accent);
  background: var(--color-red-lighter);
  border-width: 2px;
}
.slot__time {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-title);
  line-height: 1.3;
}
.slot--selected .slot__time { color: var(--color-accent); }
.slot__sub {
  font-size: 13px;
  color: var(--color-default);
  margin-top: 4px;
}

/* ===== Util ===== */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.divider {
  height: 1px;
  background: var(--color-border);
  margin: 16px 0;
}

/* ===== Topbar centered-logo mode (loader / email / results) ===== */
.topbar--center-logo .topbar__logo { height: 40px; }

/* ===== Intro rating row ===== */
.intro__rating {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-default);
}

/* ===== Teach helpers ===== */
.teach-tag {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.teach__headline {
  margin-bottom: 24px;
}
.teach__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.teach__para {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-sub);
  margin: 0;
}
.teach__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.teach__footer {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-default);
  margin: 16px 0 0;
}

/* ===== Goal chart card ===== */
.chart-card {
  padding: 20px;
  margin-bottom: 20px;
}
.chart-card .eyebrow {
  margin-bottom: 14px;
}

/* Wrapper holds legend (HTML) + chart (SVG) + gap callout (HTML) in a clean stack */
.goal-chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Legend — read FIRST, before scanning the chart */
.goal-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.goal-chart-legend__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--color-text-sub);
  line-height: 1.4;
}
.goal-chart-legend__text strong {
  color: var(--color-title);
  font-weight: 600;
}
.goal-chart-legend__swatch {
  flex-shrink: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-accent);
}
.goal-chart-legend__swatch--current {
  background: repeating-linear-gradient(
    to right,
    var(--color-default) 0 6px,
    transparent 6px 10px
  );
  height: 3px;
}
.goal-chart-legend__swatch--istl {
  background: var(--color-accent-hover);
}

.goal-chart {
  display: block;
  margin: 0 auto;
  max-width: 520px;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Gap callout — appears BELOW the chart in with-gap mode */
.goal-chart-gap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--color-red-lighter);
  border: 1px solid rgba(204, 0, 0, 0.18);
  border-radius: var(--radius);
}
.goal-chart-gap__num {
  flex-shrink: 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.goal-chart-gap__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.goal-chart-gap__label {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-title);
  line-height: 1.3;
}
.goal-chart-gap__sub {
  font-size: 14px;
  color: var(--color-default);
  line-height: 1.4;
}

/* ===== Goal chart animations ===== */
.goal-chart__path-goal {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 1.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.goal-chart__path-istl {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 1.4s cubic-bezier(0.32, 0.72, 0, 1) 300ms forwards;
}
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}

/* ===== Testimonial card (Trustpilot) ===== */
.testimonial {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.testimonial--compact {
  padding: 14px 16px;
}
.testimonial__eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 12px;
}
.testimonial__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.testimonial__id {
  flex: 1;
  min-width: 0;
}
.testimonial__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-title);
  line-height: 1.3;
}
.testimonial__meta {
  font-size: 13px;
  color: var(--color-default);
  margin-top: 2px;
  line-height: 1.4;
}
.testimonial__stars {
  flex-shrink: 0;
}
.testimonial__quote {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-title);
  margin: 0 0 10px;
}
.testimonial__verify {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--color-default);
  font-weight: 600;
}

/* ===== Email screen weekly opt-in ===== */
.opt-in {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: none;
  padding: 6px 0 0;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.opt-in .opt__check {
  margin-top: 1px;
}
.opt-in .opt__check--on {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: white;
}
.opt-in__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-title);
  line-height: 1.4;
}
.opt-in__sub {
  font-size: 13px;
  color: var(--color-default);
  margin-top: 4px;
  line-height: 1.45;
}

/* ===== Coupon hero card (beginners paywall) ===== */
.coupon {
  position: relative;
  background: var(--color-white);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 24px 24px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.coupon__notch {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: var(--color-bg);
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  transform: translateY(-50%);
}
.coupon__notch--left  { left: -12px;  clip-path: inset(0 0 0 50%); }
.coupon__notch--right { right: -12px; clip-path: inset(0 50% 0 0); }
.coupon__eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 12px;
}
.coupon__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.coupon__code {
  font-size: 38px;
  font-weight: 800;
  color: var(--color-title);
  letter-spacing: 0.08em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.coupon__copy {
  background: var(--color-bg-2);
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 180ms;
}
.coupon__copy:hover {
  background: var(--color-accent);
  color: white;
}
.coupon__sub {
  font-size: 12px;
  color: var(--color-default);
}
.countdown--expired { opacity: 0.6; }

/* ===== Price row highlight ===== */
.price-row--highlight .price-row__value {
  color: var(--color-accent);
  font-weight: 700;
}

/* ===== Specialist card ===== */
.specialist__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-title);
  line-height: 1.3;
}
.specialist__role {
  font-size: 14px;
  color: var(--color-default);
  margin-bottom: 8px;
}
.specialist__quote {
  font-size: 16px;
  color: var(--color-text-sub);
  line-height: 1.6;
  margin: 0;
}

/* ===== Loader footer ===== */
.loader-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  font-size: 11.5px;
  color: var(--color-default);
  text-align: center;
}

/* ===== Responsive — mobile (≤480px) ===== */
@media (max-width: 480px) {
  :root { --topbar-h: 58px; }

  /* Type scale */
  .intro__h1 { font-size: 34px; }
  .h-display { font-size: 30px; }
  .h-question { font-size: 24px; }
  .h-subtle { font-size: 16px; }
  .coupon__code { font-size: 32px; }
  .testimonial__quote { font-size: 16px; }

  /* Topbar — flex on mobile: [back + logo] on left, section pushed to the right */
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 12px;
  }
  .topbar__left { flex-shrink: 0; gap: 10px; }
  .topbar__center { flex-shrink: 1; min-width: 0; }
  .topbar__right { display: none; }
  .topbar__logo { height: 26px; }
  .topbar--center-logo {
    justify-content: center;
  }
  .topbar--center-logo .topbar__logo { height: 30px; }
  .topbar__back { width: 34px; height: 34px; }
  .topbar__back--placeholder { width: 34px; height: 34px; }
  .topbar__section {
    font-size: 11px;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }

  /* Container — restore breathing room above content */
  .container { padding: 24px 16px 140px; }

  /* Cards a bit tighter */
  .card { padding: 18px; }

  /* Options — keep them tappable but a little less padded */
  .opt { padding: 18px 18px; min-height: 60px; }
  .opt__label { font-size: 17px; }

  /* Stats stay 3-up but tighter */
  .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat__value { font-size: 22px; }

  /* Slot grid stacks 1-up on phones */
  .slot-grid { grid-template-columns: 1fr; }

  /* Two-col grid stacks on phones */
  .two-col { grid-template-columns: 1fr; gap: 12px; }

  /* Phone-input row */
  .phone-input__prefix { padding: 0 12px; font-size: 15px; }

  /* Sticky CTA gets a bit shorter on phones */
  .sticky-cta { padding: 16px 14px 18px; }
  .btn-primary { padding: 16px 20px; font-size: 16px; }

  /* Goal chart pulls in slightly */
  .chart-card { padding: 14px 12px; }

  /* Gap callout: tighten so the +N number doesn't cramp the body text */
  .goal-chart-gap { padding: 12px 14px; gap: 12px; }
  .goal-chart-gap__num { font-size: 28px; }

  /* Trust strip: wrap on narrow + smaller separator dots */
  .trust-strip { flex-wrap: wrap; gap: 8px 10px; row-gap: 6px; }

  /* Coupon code can overflow on narrow phones */
  .coupon { padding: 20px 16px 16px; }
  .coupon__row { flex-wrap: wrap; gap: 8px; }

  /* Education lead-in nudge */
  .edu-leadin { font-size: 13.5px; padding: 10px 12px; margin-bottom: 16px; }
}

/* ===== Very narrow (≤360px) — final hardening ===== */
@media (max-width: 360px) {
  .topbar__section { display: none; } /* avoid logo overlap on very small screens */
  .intro__h1 { font-size: 30px; }
  .h-display { font-size: 26px; }
  .h-question { font-size: 22px; }
}
