/* ═══════════════════════════════════════════════════════════
   DEEP RABBIT — Landing page styles
   Layers on top of tokens.css (brand tokens, world colors)
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Landing type scale */
  --lp-hero: clamp(42px, 5.6vw, 76px);
  --lp-h2: clamp(30px, 3.6vw, 46px);
  --lp-h3: 23px;
  --lp-lead: clamp(17px, 1.6vw, 21px);
  --lp-body: 17px;
  --lp-caption: 14px;
  --lp-max: 1160px;
  --lp-pad: clamp(20px, 5vw, 48px);

  /* Hero sky (light = sunrise) */
  --sky-a: #C9E4F2;
  --sky-b: #FFDCBC;
  --sky-c: #FFB98C;
  --hero-glow: rgba(255,107,53,0.14);
}
[data-theme="dark"] {
  /* dusk */
  --sky-a: #131a30;
  --sky-b: #2b2547;
  --sky-c: #503257;
  --hero-glow: rgba(255,107,53,0.10);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-size: var(--lp-body);
  line-height: 1.55;
  overflow-x: hidden;
}

.wrap { max-width: var(--lp-max); margin: 0 auto; padding: 0 var(--lp-pad); }

h1, h2, h3 { font-family: var(--font-rounded); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: var(--lp-hero); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; }
h2 { font-size: var(--lp-h2); font-weight: 800; letter-spacing: -0.015em; line-height: 1.08; }
h3 { font-size: var(--lp-h3); font-weight: 700; letter-spacing: -0.01em; }
p  { margin: 0; text-wrap: pretty; }

.lead { font-size: var(--lp-lead); color: var(--ink-2); }
.kicker {
  font-family: var(--font-rounded); font-size: 14px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-primary);
}
.section-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
section { padding: clamp(64px, 9vw, 120px) 0; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 3px; border-radius: 6px; }

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-rounded); font-weight: 700; text-decoration: none;
  border-radius: var(--r-pill); cursor: pointer; border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: var(--brand-primary); color: #fff;
  font-size: 18px; padding: 16px 34px; min-width: 200px;
  box-shadow: var(--shadow-pop);
}
.btn-primary:hover { background: var(--brand-primary-hover); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,107,53,0.42); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 4px 14px rgba(255,107,53,0.3); }
.btn-ghost {
  background: transparent; color: var(--ink); font-size: 16px; padding: 12px 22px;
  box-shadow: inset 0 0 0 1.5px var(--hairline-strong);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand-primary); color: var(--brand-primary); }

/* App Store badge */
.asbadge { display: inline-block; border-radius: 12px; line-height: 0; transition: transform 0.18s ease, opacity 0.18s ease; }
.asbadge:hover { transform: translateY(-2px); }
.asbadge svg { border-radius: 12px; }
.asbadge-hero svg { height: 58px; width: auto; }
.asbadge-nav svg { height: 36px; width: auto; }

/* CTA swap: TestFlight variant */
.cta-testflight { display: none; }
[data-cta="testflight"] .cta-appstore { display: none; }
[data-cta="testflight"] .cta-testflight { display: inline-flex; }

/* ─── Nav ─────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.nav-inner {
  max-width: var(--lp-max); margin: 0 auto; padding: 14px var(--lp-pad);
  display: flex; align-items: center; gap: 28px;
}
.nav.scrolled {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 1px 0 var(--glass-stroke), var(--shadow-1);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--font-rounded); font-weight: 800; font-size: 19px; color: var(--ink);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink-2);
  padding: 8px 14px; border-radius: var(--r-pill); transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--brand-primary-tint); color: var(--brand-primary); }
@media (max-width: 720px) { .nav-links { display: none; } .nav-inner { justify-content: space-between; } }

/* ─── Hero ────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(120px, 14vw, 170px) 0 0; overflow: clip; }
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 600px at 78% 30%, var(--hero-glow), transparent 65%),
    linear-gradient(180deg, color-mix(in srgb, var(--sky-a), var(--canvas) 55%) 0%, var(--canvas) 78%);
}
.hero-stars { position: absolute; inset: 0; z-index: -1; display: none; pointer-events: none; }
[data-theme="dark"] .hero-stars { display: block; }
.hero-stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #F4F6FB; opacity: 0.55; animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity: 0.2; } 50% { opacity: 0.7; } }

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy { display: grid; gap: 26px; padding-bottom: clamp(48px, 6vw, 96px); }
.hero-copy h1 em { font-style: normal; color: var(--brand-primary); }
.hero-cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-fineprint { font-size: var(--lp-caption); font-weight: 500; color: var(--ink-3); }
.hero-fineprint b { color: var(--ink-2); font-weight: 600; }

/* Phone */
.hero-stage { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: min(360px, 82vw); aspect-ratio: 390 / 800;
  border-radius: 56px; background: #0d1017;
  padding: 10px;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.08) inset,
    0 30px 80px rgba(20,20,40,0.35),
    0 8px 24px rgba(20,20,40,0.22);
  z-index: 2;
}
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 46px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 52%, var(--sky-c) 100%);
}
.phone-notch {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 30px; border-radius: 99px; background: #0d1017; z-index: 6;
}
.phone-status {
  position: absolute; top: 26px; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; padding: 0 30px;
  font-family: var(--font-rounded); font-size: 14px; font-weight: 700;
  color: rgba(20,25,40,0.85);
}
[data-theme="dark"] .phone-status { color: rgba(244,246,251,0.9); }
.phone-map { position: absolute; inset: 0; width: 100%; height: 100%; }

/* HUD */
.phone-hud {
  position: absolute; top: 64px; left: 14px; right: 14px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-radius: var(--r-pill);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 0 0 1px var(--glass-stroke), 0 1px 0 var(--glass-shine) inset, var(--shadow-1);
}
.hud-group { display: flex; align-items: center; gap: 5px; font-family: var(--font-rounded); font-weight: 700; font-size: 14px; color: var(--ink); }
.hud-hearts { display: flex; gap: 3px; }
.hud-xp {
  font-family: var(--font-rounded); font-weight: 700; font-size: 13px;
  color: var(--brand-primary); background: var(--brand-primary-tint);
  padding: 4px 11px; border-radius: var(--r-pill);
}

/* Play pill on map */
.phone-play {
  position: absolute; left: 50%; bottom: 7.5%; transform: translateX(-78%); z-index: 5;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-rounded); font-weight: 800; font-size: 16px; color: #fff;
  background: var(--brand-primary); border-radius: var(--r-pill); padding: 11px 26px;
  box-shadow: var(--shadow-pop);
  animation: playPulse 2.6s ease-in-out infinite;
}
@keyframes playPulse {
  0%,100% { box-shadow: 0 8px 24px rgba(255,107,53,0.32); }
  50% { box-shadow: 0 10px 32px rgba(255,107,53,0.52); }
}

/* Map islands (SVG, shared with worlds cards) */
.isl-cone     { fill: color-mix(in srgb, var(--wc), #1F2937 55%); }
.isl-cone-lit { fill: color-mix(in srgb, var(--wc), #1F2937 22%); }
.isl-top      { fill: var(--wc); }
.isl-hl       { fill: color-mix(in srgb, var(--wc), #ffffff 50%); opacity: 0.55; }
.isl-shadow   { fill: var(--wc); opacity: 0.28; filter: blur(5px); }
.isl-locked   { filter: saturate(0.12) brightness(0.92); opacity: 0.72; }
.isl-drift    { animation: drift 6s ease-in-out infinite alternate; }
.isl-drift.d2 { animation-duration: 7.5s; animation-delay: -2s; }
.isl-drift.d3 { animation-duration: 8.5s; animation-delay: -4s; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-9px); } }

.map-label {
  font-family: var(--font-rounded); font-size: 13px; font-weight: 700;
  fill: rgba(25,30,45,0.78); text-anchor: middle;
}
[data-theme="dark"] .map-label { fill: rgba(244,246,251,0.82); }
.map-trail      { stroke: #FF8A50; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 13; fill: none; }
.map-trail-glow { stroke: #FF8A50; stroke-width: 11; stroke-linecap: round; stroke-dasharray: 1 13; fill: none; opacity: 0.35; filter: blur(4px); }

/* Bleed islands behind/around the phone */
.hero-bleed { position: absolute; z-index: 1; pointer-events: none; opacity: 0.85; }
.hero-bleed.b1 { width: 210px; right: -60px; top: 4%; }
.hero-bleed.b2 { width: 160px; left: -84px; bottom: 12%; opacity: 0.65; }
.hero-bleed.b3 { width: 120px; right: -20px; bottom: -2%; opacity: 0.5; filter: blur(2px); }
@media (max-width: 1100px) { .hero-bleed.b1 { right: -90px; } }

/* ─── Social-proof slot ──────────────────────────────── */
.proof { padding: 0 0 clamp(48px, 6vw, 72px); }
.proof-slot {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  border: 1.5px dashed var(--hairline-strong); border-radius: var(--r-4);
  padding: 22px 28px; color: var(--ink-3);
}
.proof-stars { display: flex; gap: 3px; }
.proof-slot .slot-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-4); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 3px 10px;
}

/* ─── How it works ───────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.step-card {
  background: var(--elevated); border-radius: var(--r-5); padding: 26px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-2);
  display: grid; gap: 16px; align-content: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-3); }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-rounded); font-weight: 800; font-size: 16px;
  background: var(--brand-primary-tint); color: var(--brand-primary);
}
.step-card p { font-size: 15.5px; color: var(--ink-2); }
.step-visual {
  border-radius: var(--r-4); overflow: hidden; height: 190px;
  display: grid; place-items: center;
  background: var(--canvas-soft);
}
.step-visual.sky { background: linear-gradient(180deg, var(--sky-a), var(--sky-c)); }

/* mini result visual */
.mini-result { display: grid; gap: 12px; justify-items: center; }
.mini-stars { display: flex; gap: 6px; }
.mini-stars svg { animation: starPop 0.5s ease backwards; }
.mini-stars svg:nth-child(2) { animation-delay: 0.12s; }
.mini-stars svg:nth-child(3) { animation-delay: 0.24s; }
@keyframes starPop { from { transform: scale(0.3); opacity: 0; } }
.xp-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.xp-chip {
  font-family: var(--font-rounded); font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--elevated); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-1);
}
.xp-chip b { color: var(--brand-primary); }
.perfect-tag { font-family: var(--font-rounded); font-weight: 800; font-size: 17px; color: var(--warning); letter-spacing: 0.02em; }

/* mini question visual */
.mini-q { display: grid; gap: 8px; width: min(86%, 300px); }
.mini-q .code-block { font-size: 12px; padding: 12px 14px; }
.mini-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini-answer {
  font-family: var(--font-mono); font-size: 12px; text-align: center;
  background: var(--elevated); border-radius: var(--r-2); padding: 7px 4px;
  box-shadow: 0 0 0 1px var(--hairline);
  color: var(--ink-2);
}
.mini-answer.correct { box-shadow: 0 0 0 1.5px var(--success); color: var(--success); font-weight: 700; }

/* ─── Code blocks (always dark) ──────────────────────── */
.code-block {
  background: var(--code-bg); border-radius: var(--r-3);
  font-family: var(--font-mono); font-size: 14.5px; line-height: 1.65;
  color: var(--code-plain); padding: 18px 20px; overflow-x: auto;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.code-block code { font-family: inherit; white-space: pre; display: block; }
.tok-k { color: var(--code-keyword); }
.tok-t { color: var(--code-type); }
.tok-s { color: var(--code-string); }
.tok-n { color: var(--code-num); }
.tok-f { color: var(--code-fn); }
.tok-c { color: var(--code-comment); }
code.inline {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--code-bg); color: var(--code-plain);
  padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
/* Code window chrome (matches app) */
.code-window { border-radius: var(--r-4); overflow: hidden; box-shadow: 0 8px 24px rgba(15,20,35,0.25); }
.code-chrome {
  display: flex; align-items: center; gap: 7px;
  background: color-mix(in srgb, var(--code-bg), #ffffff 4%);
  padding: 11px 14px; position: relative;
}
.code-chrome .cd { width: 11px; height: 11px; border-radius: 50%; }
.code-chrome .cd.r { background: #F25F5C; }
.code-chrome .cd.y { background: #FFB627; }
.code-chrome .cd.g { background: #22C55E; }
.code-chrome span {
  position: absolute; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 12px; color: #6B7693; pointer-events: none;
}
.code-block.in-window { border-radius: 0; box-shadow: none; }
.code-block .ln {
  display: inline-block; width: 1.6em; margin-right: 1em;
  color: #4A5468; text-align: right; user-select: none;
}
.blank-filled {
  display: inline-block; font-weight: 700; color: #FF9A66;
  border: 1.5px solid #FF8A50; border-radius: 999px;
  background: rgba(255,107,53,0.16); padding: 0 12px;
}
.kw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kw-pill {
  font-family: var(--font-mono); font-size: 14.5px; font-weight: 600;
  background: var(--elevated-2); border-radius: var(--r-pill); padding: 12px 20px;
  box-shadow: 0 0 0 1.5px var(--hairline-strong); color: var(--ink-2);
}
.kw-pill.picked {
  box-shadow: 0 0 0 2px var(--brand-primary);
  background: var(--brand-primary-tint); color: var(--ink); font-weight: 700;
}

.blank-slot {
  display: inline-block; min-width: 64px; text-align: center;
  border: 1.5px dashed var(--brand-primary); border-radius: 7px;
  background: rgba(255,107,53,0.14); color: var(--brand-primary);
  padding: 0 8px; font-weight: 700;
}

/* ─── Question types ─────────────────────────────────── */
.qtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.qtab {
  font-family: var(--font-rounded); font-size: 15px; font-weight: 700;
  padding: 10px 20px; border-radius: var(--r-pill); border: none; cursor: pointer;
  background: var(--elevated); color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-1);
  transition: all 0.18s ease;
}
.qtab:hover { color: var(--brand-primary); }
.qtab[aria-selected="true"] { background: var(--brand-primary); color: #fff; box-shadow: var(--shadow-pop); }
.qpanel-holder { display: grid; }
.qpanel { grid-area: 1 / 1; }
.qpanel[hidden] { display: none; }

.qcard-wrap { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 900px) { .qcard-wrap { grid-template-columns: 1fr; } }
.qcard {
  background: var(--elevated); border-radius: var(--r-6); padding: 26px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-3);
  display: grid; gap: 16px;
}
.qcard-meta { display: flex; justify-content: space-between; align-items: center; }
.qcard-tag {
  font-family: var(--font-rounded); font-size: 12px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-secondary-hover); background: var(--brand-secondary-tint);
  padding: 4px 12px; border-radius: var(--r-pill);
}
.qcard-hearts { display: flex; gap: 3px; }
.qcard-question { font-family: var(--font-rounded); font-size: 18px; font-weight: 700; color: var(--ink); }
.answers { display: grid; gap: 9px; }
.answer {
  font-family: var(--font-mono); font-size: 14.5px;
  background: var(--elevated-2); border-radius: var(--r-3); padding: 13px 16px;
  box-shadow: 0 0 0 1px var(--hairline);
  color: var(--ink-2); display: flex; justify-content: space-between; align-items: center;
}
.answer.correct {
  box-shadow: 0 0 0 2px var(--success), var(--shadow-glow-green);
  background: var(--success-tint); color: var(--ink); font-weight: 600;
}
.answer .check { color: var(--success); font-weight: 800; font-family: var(--font-rounded); font-size: 15px; }
.answer.sans { font-family: var(--font-text); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kw-chip {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  background: var(--elevated-2); border-radius: var(--r-2); padding: 8px 16px;
  box-shadow: 0 0 0 1px var(--hairline-strong); color: var(--ink-2);
}
.kw-chip.picked {
  background: var(--brand-primary); color: #fff;
  box-shadow: var(--shadow-pop); transform: translateY(-2px);
}
/* True/false — matches app: orange statement card + two big cards */
.tf-statement {
  background: linear-gradient(160deg, #FF8A50 0%, #EE5E2B 100%);
  border-radius: var(--r-4); padding: 22px 24px;
  font-family: var(--font-rounded); font-weight: 800; font-size: 19px; line-height: 1.4;
  color: #fff; text-wrap: pretty;
  box-shadow: 0 8px 24px rgba(238,94,43,0.28);
}
.tf-statement code {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.92em;
  background: rgba(255,255,255,0.16); border-radius: 6px; padding: 1px 7px; white-space: nowrap;
}
.tf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-card {
  background: var(--elevated-2); border-radius: var(--r-4); padding: 26px 12px 20px;
  box-shadow: 0 0 0 1.5px var(--hairline-strong);
  display: grid; gap: 12px; justify-items: center;
}
.tf-card b { font-family: var(--font-rounded); font-weight: 800; font-size: 19px; color: var(--ink); }
.tf-card.picked { box-shadow: 0 0 0 2px var(--success), var(--shadow-glow-green); background: var(--success-tint); }
.tf-circle { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.tf-circle.yes { background: var(--success); }
.tf-circle.no { background: var(--danger); }

.qexplain { display: grid; gap: 14px; }
.qexplain h3 { color: var(--ink); }
.qexplain p { color: var(--ink-2); font-size: 16.5px; }

/* ─── Worlds ─────────────────────────────────────────── */
.worlds { background: var(--canvas-soft); }
.world-group { margin-bottom: 34px; }
.world-group:last-child { margin-bottom: 0; }
.world-group-label {
  font-family: var(--font-rounded); font-size: 15px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.world-group-label::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.world-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.world-card {
  background: var(--elevated); border-radius: var(--r-4); padding: 16px 18px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-1);
  display: flex; align-items: center; gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.world-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--wc), transparent 40%), var(--shadow-2); }
.world-card svg { flex-shrink: 0; }
.world-name { font-family: var(--font-rounded); font-weight: 700; font-size: 15.5px; color: var(--ink); line-height: 1.2; }
.world-idx { font-family: var(--font-rounded); font-size: 12px; font-weight: 700; color: var(--ink-4); display: block; margin-top: 2px; }
.worlds-caption { text-align: center; margin-top: 40px; font-size: var(--lp-lead); color: var(--ink-2); }
.worlds-caption code { font-family: var(--font-mono); font-size: 0.88em; color: var(--brand-primary); background: var(--brand-primary-tint); padding: 2px 8px; border-radius: 6px; }

/* ─── Learn from mistakes ────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split .section-head { margin-bottom: 0; } }
.explain-card {
  background: var(--elevated); border-radius: var(--r-6); padding: 24px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-3);
  display: grid; gap: 14px; max-width: 460px;
}
.verdict { display: grid; gap: 8px; }
.verdict-row {
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--r-3); padding: 10px 14px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
}
.verdict-row .vlabel { font-family: var(--font-rounded); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; margin-right: auto; }
.verdict-row.wrong { background: var(--danger-tint); color: var(--danger); }
.verdict-row.right { background: var(--success-tint); color: var(--success); }
.explain-body { display: grid; gap: 10px; }
.explain-body h4 { font-family: var(--font-rounded); font-size: 16px; font-weight: 800; margin: 0; color: var(--ink); }
.explain-body p { font-size: 15px; color: var(--ink-2); }
.feature-list { display: grid; gap: 18px; margin-top: 8px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--r-3);
  display: grid; place-items: center;
  background: var(--brand-primary-tint); color: var(--brand-primary);
}
.feature b { font-family: var(--font-rounded); font-size: 16.5px; display: block; margin-bottom: 2px; }
.feature p { font-size: 15.5px; color: var(--ink-2); }

/* ─── Streaks & achievements ─────────────────────────── */
.streak-card {
  background: var(--elevated); border-radius: var(--r-6); padding: 28px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-3);
  display: grid; gap: 20px; justify-items: center; max-width: 400px;
}
.flame-wrap { position: relative; width: 84px; height: 96px; }
.flame-wrap svg { animation: flicker 2.8s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker {
  0%,100% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.04) rotate(-1.4deg); }
  60% { transform: scale(0.98) rotate(1.2deg); }
}
.streak-count { font-family: var(--font-rounded); font-size: 30px; font-weight: 800; color: var(--ink); text-align: center; }
.streak-count small { display: block; font-size: 14px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }
.week-dots { display: flex; gap: 10px; }
.week-dot { display: grid; gap: 6px; justify-items: center; font-family: var(--font-rounded); font-size: 11px; font-weight: 700; color: var(--ink-4); }
.week-dot i {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--canvas-soft); box-shadow: inset 0 0 0 1.5px var(--hairline);
  display: grid; place-items: center;
}
.week-dot.done i { background: var(--streak); box-shadow: none; color: #fff; }
.week-dot.today i { box-shadow: inset 0 0 0 2px var(--streak); }

.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ach {
  background: var(--elevated); border-radius: var(--r-4); padding: 16px 10px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-1);
  display: grid; gap: 8px; justify-items: center; text-align: center;
}
.ach-medal {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--warning-tint); color: var(--warning);
}
.ach b { font-family: var(--font-rounded); font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.ach.locked .ach-medal { background: var(--canvas-soft); color: var(--ink-4); }
.ach.locked b { color: var(--ink-4); }

/* ─── Contribute / PR card ───────────────────────────── */
.pr-card {
  background: var(--elevated); border-radius: var(--r-5); padding: 22px;
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-3);
  display: grid; gap: 16px; max-width: 440px; margin: 0 auto;
}
.pr-row { display: flex; align-items: flex-start; gap: 12px; }
.pr-state {
  font-family: var(--font-rounded); font-size: 12.5px; font-weight: 800;
  color: #fff; background: var(--success); border-radius: var(--r-pill); padding: 4px 12px;
}
.pr-body { display: grid; gap: 2px; }
.pr-body b { font-family: var(--font-rounded); font-size: 16px; color: var(--ink); }
.pr-body span { font-size: 13.5px; color: var(--ink-3); }
.pr-diff {
  background: var(--code-bg); border-radius: var(--r-3); padding: 14px 16px;
  display: grid; gap: 4px; overflow-x: auto;
}
.diff-line { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.diff-line.add { color: #7EE2A8; }
.pr-merge {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-rounded); font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.pr-merge i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--success-tint); color: var(--success); font-style: normal; font-size: 13px;
}

/* ─── Final CTA ──────────────────────────────────────── */
.cta-panel {
  position: relative; overflow: clip;
  background: linear-gradient(145deg, #FF7B4D 0%, #EE5E2B 100%);
  border-radius: var(--r-6); padding: clamp(48px, 7vw, 88px) clamp(24px, 6vw, 80px);
  text-align: center; display: grid; gap: 22px; justify-items: center;
  box-shadow: 0 24px 64px rgba(238,94,43,0.35);
}
.cta-panel h2 { color: #fff; max-width: 15ch; margin: 0 auto; }
.cta-panel .cta-sub { color: rgba(255,255,255,0.88); font-size: var(--lp-lead); }
.cta-signoff { font-family: var(--font-mono); font-size: 15px; color: rgba(255,255,255,0.75); }
.cta-panel::before, .cta-panel::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.09); pointer-events: none;
}
.cta-panel::before { width: 420px; height: 420px; top: -220px; left: -140px; }
.cta-panel::after { width: 320px; height: 320px; bottom: -180px; right: -100px; }
.cta-panel .asbadge:hover { transform: translateY(-2px) scale(1.02); }

/* ─── Footer ─────────────────────────────────────────── */
.footer { padding: 40px 0 48px; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--ink-3); font-size: 14px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-rounded); font-weight: 800; font-size: 15px; color: var(--ink-2); }
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a { text-decoration: none; color: var(--ink-3); font-weight: 500; }
.footer-links a:hover { color: var(--brand-primary); }
.footer-micro { width: 100%; font-size: 12.5px; color: var(--ink-4); }
.footer-rabbit { cursor: default; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); display: inline-flex; }
.footer-rabbit:hover { transform: rotate(-10deg) scale(1.15); }

/* ─── Reveal on scroll ───────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.dl1 { transition-delay: 0.1s; }
.reveal.dl2 { transition-delay: 0.2s; }
.reveal.dl3 { transition-delay: 0.3s; }

/* ─── Motion off / reduced motion ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition-duration: 0.01ms !important; }
html[data-motion="off"] .reveal { opacity: 1; transform: none; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; justify-items: center; padding-bottom: 12px; }
  .hero-cta-row { justify-content: center; }
  .hero-stage { padding-bottom: 20px; }
  .hero-bleed.b2 { left: -60px; }
}
@media (max-width: 520px) {
  .ach-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .steps { gap: 16px; }
  .qcard { padding: 20px; }
  .footer-links { margin-left: 0; }
}
