/* Owlee site — tokens mirror branding.md */
:root {
  --navy: #073B78;
  --navy-deep: #042B5C;
  --terracotta: #C1541E;
  --gold: #F6A800;
  --gold-dark: #D98E00;
  --soft-white: #FFF9F2;
  --peach: #FDECDD;
  --tan: #F3E1CC;
  --white: #FFFFFF;
  --ink: #082F5F;
  --muted: #6E6155;
  --placeholder: #C9B4A0;
  --success: #22A06B;
  --error: #E5484D;

  --r-btn: 16px;
  --r-card: 22px;
  --r-input: 14px;
  --r-slab: 32px;
  --shadow: 0 8px 24px rgba(7, 59, 120, 0.10);

  --font: "Nunito", ui-rounded, system-ui, sans-serif;
  --wrap: 1160px;
  --gutter: 16px;
  --section-y: clamp(64px, 9vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--soft-white);
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--terracotta); }
h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--ink); }
h2 { font-size: clamp(2rem, 4.2vw, 2.75rem); font-weight: 900; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 800; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: max(var(--gutter), 3vw); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; color: #fff; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 22px;
  border-radius: var(--r-btn); border: 2px solid transparent;
  font: 800 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 8px 16px; font-size: .9375rem; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-dark); color: var(--ink); }
.btn-ghost { color: var(--navy); border-color: var(--tan); background: var(--white); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-outline { color: var(--navy); border-color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-on-navy { color: #fff; border-color: rgba(255,255,255,.4); background: transparent; }
.btn-on-navy:hover { border-color: #fff; color: #fff; }

.play-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 22px 8px 16px;
  background: var(--navy-deep); color: #fff; border-radius: var(--r-btn);
  text-decoration: none; transition: background-color .15s;
}
.play-btn:hover { background: #021d40; color: #fff; }
.play-btn svg { width: 28px; height: 28px; flex: none; }
.play-btn span { display: flex; flex-direction: column; font-weight: 800; font-size: 1.1875rem; line-height: 1.1; }
.play-btn small { font-weight: 600; font-size: .75rem; opacity: .85; }
.play-btn-light { background: #fff; color: var(--ink); }
.play-btn-light:hover { background: var(--peach); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 249, 242, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--tan); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand span { font-weight: 900; font-size: 1.5rem; letter-spacing: -0.02em; }
.brand img { width: 40px; height: 40px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  padding: 10px 14px; border-radius: 12px;
  font-weight: 700; color: var(--ink); text-decoration: none;
}
.site-nav a:not(.btn):hover { background: var(--peach); color: var(--navy); }
.site-nav .btn { margin-left: 8px; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .menu-btn {
    display: grid; place-items: center; width: 46px; height: 46px;
    border: 0; border-radius: 14px; background: var(--peach); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--navy);
    transition: transform .2s, background-color .2s;
  }
  .menu-bars { position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -7px; }
  .menu-bars::after { top: 7px; }
  .menu-btn[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--gutter) 16px;
    background: var(--soft-white); border-bottom: 1px solid var(--tan);
    box-shadow: 0 16px 24px rgba(7,59,120,.08);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px; }
  .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); background: linear-gradient(180deg, var(--soft-white) 0%, var(--peach) 100%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 900; letter-spacing: -0.035em; line-height: 1.02;
  color: var(--navy); max-width: 12ch;
}
.lede { margin-top: 24px; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 28px 0 0; font-weight: 700; font-size: .9375rem; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23082F5F' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Hero stage: real app screen with the sample quiz laid over it */
.hero-stage { position: relative; justify-self: end; width: 100%; max-width: 600px; padding-bottom: 190px; }
.phone {
  margin: 0 0 0 auto; width: min(300px, 54%);
  padding: 10px; border-radius: 44px; background: var(--navy-deep);
  box-shadow: 0 30px 60px rgba(4, 43, 92, .28);
}
.phone img { width: 100%; border-radius: 34px; }
.quiz { position: absolute; left: 0; bottom: 0; width: min(360px, 64%); }
.quiz > * { flex-shrink: 0; }
.quiz > .qs-body { flex-shrink: 1; }
/* Mirrors the app's practice runner: QuizHeader, QuestionCard, ChoiceButton, feedback panel */
.quiz {
  display: flex; flex-direction: column; height: 600px;
  background: var(--soft-white); border-radius: 30px; overflow: hidden;
  border: 1px solid var(--tan);
  box-shadow: 0 24px 56px rgba(4, 43, 92, .22);
}
.qs-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; }
.qs-tools { display: flex; gap: 8px; }
.qs-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--tan); color: var(--ink); padding: 0;
}
button.qs-icon { cursor: pointer; }
button.qs-icon:hover { border-color: var(--navy); }
.qs-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.qs-tools .qs-icon { color: var(--muted); }
.qs-head { padding: 14px 18px 12px; }
.qs-title { font-weight: 900; font-size: 1.25rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-count { font-weight: 600; font-size: .8125rem; color: var(--muted); margin-top: 1px; }
.qs-bar { margin-top: 12px; height: 8px; border-radius: 4px; background: var(--tan); overflow: hidden; }
.qs-bar span { display: block; height: 100%; width: 0; background: var(--navy); border-radius: 4px; transition: width .32s cubic-bezier(.33,1,.68,1); }

.qs-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 14px; scrollbar-width: thin; }
.qs-question {
  background: var(--white); border-radius: 22px; padding: 18px; margin-bottom: 14px;
  font-weight: 700; font-size: 1.0625rem; line-height: 1.55;
  box-shadow: 0 4px 14px rgba(7, 59, 120, .07);
}
.qs-choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; text-align: left; cursor: pointer;
  font: 500 .9375rem/1.45 var(--font); color: var(--ink);
  background: var(--white); border: 2px solid var(--tan); border-radius: 18px;
  box-shadow: 0 2px 6px rgba(7, 59, 120, .05);
  transition: transform .1s, background-color .15s, border-color .15s;
}
.choice:active:not(:disabled) { transform: scale(.98); }
.choice:hover:not(:disabled) { border-color: var(--placeholder); }
.choice-key {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px;
  background: var(--soft-white); color: var(--muted); font-weight: 800; font-size: .9375rem;
}
.choice-key svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.choice[aria-checked="true"], .choice.is-correct, .choice.is-wrong { font-weight: 700; box-shadow: none; }
.choice[aria-checked="true"] { background: var(--peach); border-color: var(--navy); }
.choice[aria-checked="true"] .choice-key { background: var(--navy); color: #fff; }
.choice.is-correct { background: #DCFCE7; border-color: var(--success); }
.choice.is-correct .choice-key { background: var(--success); }
.choice.is-wrong { background: #FEE2E2; border-color: var(--error); }
.choice.is-wrong .choice-key { background: var(--error); }
.choice:disabled { cursor: default; }

.qs-why {
  display: flex; gap: 12px; margin-top: 8px; padding: 14px;
  background: var(--white); border: 1px solid var(--tan); border-radius: 20px; font-size: .875rem; line-height: 1.55;
}
.qs-why-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--peach); color: var(--terracotta); }
.qs-why-icon svg { width: 17px; height: 17px; }
.qs-why b { display: block; font-weight: 800; margin-bottom: 2px; }

.qs-panel {
  padding: 14px 16px 16px; background: var(--white);
  border-radius: 24px 24px 0 0; box-shadow: 0 -4px 14px rgba(7, 59, 120, .08);
  transition: background-color .2s;
}
.qs-panel.is-correct { background: #DCFCE7; box-shadow: none; }
.qs-panel.is-wrong { background: #FEE2E2; box-shadow: none; }
.qs-tone { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qs-tone-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.qs-tone-icon svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.is-correct .qs-tone-icon { background: var(--success); }
.is-wrong .qs-tone-icon { background: var(--error); }
.qs-tone b { display: block; font-weight: 900; font-size: 1.125rem; line-height: 1.2; }
.is-correct .qs-tone b { color: var(--success); }
.is-wrong .qs-tone b { color: var(--error); }
.qs-tone span { font-weight: 600; font-size: .8125rem; }
.qs-actions { display: flex; gap: 8px; }
.qs-actions .btn { flex: 1; min-height: 50px; box-shadow: 0 4px 12px rgba(7, 59, 120, .10); }
.qs-actions .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Results — mirrors ScoreHero */
.score { background: var(--navy); color: #fff; border-radius: 26px; padding: 20px; position: relative; overflow: hidden; }
.score::before { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; border: 30px solid rgba(255,255,255,.05); }
.score-kind { font-weight: 700; font-size: .8125rem; color: rgba(255,255,255,.7); }
.score-topic { font-weight: 900; font-size: 1.25rem; line-height: 1.25; margin-top: 2px; }
.score-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.ring { position: relative; flex: none; width: 112px; height: 112px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-track { stroke: rgba(255,255,255,.14); }
.ring-fill { stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.33,1,.68,1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-weight: 900; font-size: 1.875rem; line-height: 1; }
.ring-label strong small { font-size: 1rem; color: rgba(255,255,255,.7); }
.ring-label span { font-weight: 700; font-size: .75rem; color: rgba(255,255,255,.7); margin-top: 2px; }
.pass-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); font-weight: 800; font-size: .75rem; }
.pass-pill.passed { background: var(--gold); color: var(--ink); }
.score-msg { font-weight: 600; font-size: .875rem; line-height: 1.45; margin-top: 8px; }
.score-split { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.split-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.split-bar i:first-child { background: var(--success); }
.split-bar i:last-child { background: var(--error); }
.score-stats { display: flex; margin-top: 12px; }
.score-stats div { flex: 1; }
.score-stats b { display: block; font-weight: 900; font-size: 1.125rem; }
.score-stats span { font-size: .75rem; font-weight: 600; color: rgba(255,255,255,.7); }
.score-note { margin-top: 12px; font-size: .875rem; color: var(--muted); padding: 0 4px; }

/* Load sequence: card rises, owl peeks up behind it */
@media (prefers-reduced-motion: no-preference) {
  .phone { animation: rise .8s cubic-bezier(.2,.8,.2,1) both .05s; }
  .quiz { animation: slide-in .7s cubic-bezier(.2,.8,.2,1) both .45s; }
  .qs-tone.pop .qs-tone-icon { animation: pop .4s ease; }
  @keyframes rise { from { opacity: 0; transform: translateY(32px); } }
  @keyframes slide-in { from { opacity: 0; transform: translate(-24px, 16px); } }
  @keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.15); } }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-peach { background: var(--peach); }
.section-tan { background: linear-gradient(180deg, var(--soft-white) 0%, var(--tan) 100%); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { margin-top: 14px; font-size: 1.125rem; color: var(--muted); }

/* Modes slab */
.slab {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--navy); color: #fff; border-radius: var(--r-slab);
  overflow: hidden;
}
.mode { padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; }
.mode + .mode { border-left: 1px solid rgba(255,255,255,.14); }
.mode h3 { color: #fff; font-size: 1.625rem; font-weight: 900; letter-spacing: -0.01em; }
.mode-for { margin-top: 6px; color: #C9D6EA; }
.mode .ticks { margin-top: 20px; flex: 1; }
.mode .ticks li::before { background-color: var(--gold); }
.mode-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); font-size: .9375rem; color: #C9D6EA; }
.mode-note a { color: var(--gold); font-weight: 800; }
.mode-teacher { background: var(--navy-deep); }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-weight: 600; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23082F5F' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat;
}

/* Inside */
.inside { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.inside-intro p { margin-top: 16px; font-size: 1.125rem; color: var(--muted); max-width: 30em; }
.inside-intro img { width: min(320px, 70%); margin-top: 32px; }
.mastery { background: var(--white); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); }
.mastery-bar { display: grid; grid-template-columns: 40fr 20fr 20fr 21fr; gap: 4px; height: 18px; }
.mastery-bar span { border-radius: 6px; }
.m-crit { background: var(--error); }
.m-need { background: var(--gold); }
.m-dev { background: var(--navy); }
.m-strong { background: var(--success); }
.mastery-legend { display: grid; grid-template-columns: 40fr 20fr 20fr 21fr; gap: 4px; margin-top: 14px; font-size: .875rem; }
.mastery-legend b { display: block; font-weight: 800; line-height: 1.25; }
.mastery-legend span { color: var(--muted); font-weight: 600; }

.facts { margin: 32px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.facts div { padding-top: 16px; border-top: 2px solid var(--tan); }
.facts dt { font-weight: 900; font-size: 1.125rem; }
.facts dd { margin: 6px 0 0; color: var(--muted); }
.fact-ai { border-top-color: var(--terracotta) !important; }
.fact-ai dt { color: var(--terracotta); }

.topics { margin-top: 40px; }
.topics h3 { font-size: 1.125rem; }
.topic-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-list li { padding: 8px 14px; border-radius: 999px; background: var(--white); font-weight: 700; font-size: .9375rem; border: 1px solid var(--tan); }

/* ---------- Guide ---------- */
.docs { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.docs-nav { position: sticky; top: 92px; display: grid; gap: 2px; border-left: 2px solid var(--tan); }
.docs-nav a {
  padding: 8px 16px; margin-left: -2px; border-left: 2px solid transparent;
  font-weight: 700; color: var(--muted); text-decoration: none;
}
.docs-nav a:hover { color: var(--navy); }
.docs-nav a.active { color: var(--navy); border-left-color: var(--navy); }
.docs-body { display: grid; gap: 20px; min-width: 0; }
.doc { background: var(--white); border-radius: var(--r-card); padding: clamp(22px, 3.5vw, 36px); box-shadow: var(--shadow); max-width: 760px; }
.doc h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: 14px; }
.doc p + p { margin-top: 12px; }
.doc p { color: #2f3f55; }
.doc-ai { background: linear-gradient(180deg, #FFF3EA 0%, var(--white) 140px); }
.ai-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ai-head h3 { margin: 0; }
.ai-badge {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
  background: var(--terracotta); color: #fff; box-shadow: 0 6px 14px rgba(193, 84, 30, .28);
}
.ai-badge svg { width: 22px; height: 22px; fill: currentColor; }
.ai-limits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0 0; }
.ai-limits div { padding: 14px 16px; border-radius: 16px; background: var(--soft-white); border: 1px solid var(--tan); }
.ai-limits dt { font-weight: 700; font-size: .8125rem; color: var(--muted); }
.ai-limits dd { margin: 4px 0 0; font-size: .875rem; line-height: 1.4; color: #2f3f55; }
.ai-limits dd b { display: block; font-weight: 900; font-size: 1.25rem; line-height: 1.2; color: var(--terracotta); }
.doc .ai-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; font-size: .875rem; color: var(--muted); }
.ai-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 480px) { .ai-limits { grid-template-columns: 1fr; } }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; color: #2f3f55; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--peach); color: var(--navy); font-weight: 900; font-size: .9375rem;
}
.steps b, .plain b { color: var(--ink); }
.plain { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 8px; color: #2f3f55; }
.plain li::marker { color: var(--gold); }
details { border-top: 1px solid var(--tan); }
details:last-of-type { border-bottom: 1px solid var(--tan); }
summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; font-weight: 800; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
details p { padding-bottom: 16px; }

/* ---------- Pricing ---------- */
.free-strip {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 24px; border-radius: var(--r-card);
  background: var(--white); border: 2px dashed var(--placeholder);
  margin-bottom: 32px;
}
.free-strip img { width: 80px; height: 80px; flex: none; }
.free-strip p { color: var(--muted); margin-top: 2px; }
.billing { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--white); border: 1px solid var(--tan); margin-bottom: 24px; }
.billing button {
  min-height: 44px; padding: 8px 18px; border: 0; border-radius: 12px;
  font: 800 .9375rem var(--font); color: var(--muted); background: transparent; cursor: pointer;
}
.billing button em { font-style: normal; font-weight: 700; color: var(--success); margin-left: 4px; }
.billing button[aria-checked="true"] { background: var(--navy); color: #fff; }
.billing button[aria-checked="true"] em { color: #8FE3BF; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--white); border-radius: var(--r-card); padding: 28px; box-shadow: var(--shadow); }
.plan h3 { font-size: 1.375rem; font-weight: 900; }
.price { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price span { font-size: 2.75rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: var(--navy); }
.price small { font-weight: 700; color: var(--muted); }
.plan-tag { margin-top: 10px; color: var(--muted); }
.plan .ticks { margin: 22px 0 28px; flex: 1; }
.plan .ticks li::before { background-color: var(--peach); }
.plan .btn { width: 100%; }
.plan-pro { background: var(--navy); color: #fff; box-shadow: 0 24px 48px rgba(7,59,120,.25); }
.plan-pro h3 { color: #fff; }
.plan-pro .price span { color: var(--gold); }
.plan-pro .price small, .plan-pro .plan-tag { color: #C9D6EA; }
.plan-pro .ticks li::before { background-color: var(--gold); }
.pay-note { margin-top: 24px; color: var(--muted); max-width: 640px; }

/* ---------- Download ---------- */
.download { background: var(--navy); color: #fff; padding-block: clamp(56px, 8vw, 96px); overflow: hidden; }
.download-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; }
.download h2 { color: #fff; font-size: clamp(2.25rem, 5vw, 3.5rem); }
.download p { margin-top: 14px; color: #C9D6EA; font-size: 1.125rem; }
.download .download-note { margin-top: 24px; font-size: .9375rem; }
.download img { width: clamp(200px, 26vw, 300px); margin-block: -24px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-info > p:first-of-type { margin-top: 16px; font-size: 1.125rem; color: var(--muted); max-width: 28em; }
.contact-mail { margin-top: 24px; font-size: 1.125rem; font-weight: 800; word-break: break-all; }
.contact-info .muted { margin-top: 16px; }
.contact-form { background: var(--white); border-radius: 24px; padding: clamp(22px, 3.5vw, 36px); box-shadow: var(--shadow); display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: .9375rem; }
.field input, .field select, .field textarea {
  width: 100%; font: 600 1rem/1.4 var(--font); color: var(--ink);
  background: var(--soft-white); border: 1.5px solid var(--tan); border-radius: var(--r-input);
  padding: 12px 14px; min-height: 50px;
}
.field textarea { resize: vertical; }

/* Select: custom chevron everywhere; fully styled popup where base-select is supported (Chromium). */
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background: var(--soft-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23073B78' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center/16px no-repeat;
  transition: border-color .15s, background-color .15s;
}
.field select:hover { border-color: var(--placeholder); background-color: var(--white); }
@supports (appearance: base-select) {
  .field select, .field select::picker(select) { appearance: base-select; }
  .field select { display: flex; align-items: center; justify-content: space-between; background-image: none; }
  .field select::picker-icon {
    content: ""; width: 16px; height: 16px; flex: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23073B78' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: rotate .2s cubic-bezier(.33,1,.68,1);
  }
  .field select:open::picker-icon { rotate: 180deg; }
  .field select::picker(select) {
    margin-top: 6px; padding: 6px; background: var(--white);
    border: 1.5px solid var(--tan); border-radius: var(--r-input); box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-4px);
    transition: opacity .15s, transform .15s, overlay .15s allow-discrete, display .15s allow-discrete;
  }
  .field select:open::picker(select) { opacity: 1; transform: none; }
  @starting-style { .field select:open::picker(select) { opacity: 0; transform: translateY(-4px); } }
  .field select option {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
    font: 700 1rem/1.3 var(--font); color: var(--ink); cursor: pointer;
  }
  .field select option:hover, .field select option:focus-visible { background: var(--peach); outline: none; }
  .field select option:checked { background: var(--peach); color: var(--navy); }
  .field select option::checkmark { content: ""; order: 1; margin-left: auto; width: 16px; height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C1541E' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/contain no-repeat; }
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(7,59,120,.15); }
.field [aria-invalid="true"] { border-color: var(--error); }
.form-error { color: #B42318; font-weight: 700; }
.form-hint { font-size: .875rem; color: var(--muted); margin-top: -8px; }
.contact-form .btn { justify-self: start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #C9D6EA; padding: 40px 0; }
.footer-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 32px; }
.brand-light { color: #fff; }
.brand-light:hover { color: #fff; }
.brand-light img { width: 36px; height: 36px; background: #fff; border-radius: 10px; padding: 3px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.site-footer a:not(.brand) { color: #fff; font-weight: 700; text-decoration: none; }
.site-footer a:not(.brand):hover { color: var(--gold); }
.copy { width: 100%; font-size: .875rem; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  /* minmax(0,1fr), not 1fr: a bare 1fr track won't shrink below its content's min-content (e.g. the nowrap quiz title) */
  .hero-grid, .inside, .contact { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { justify-self: center; }
  .slab { grid-template-columns: minmax(0, 1fr); }
  .mode + .mode { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-nav {
    position: static; display: flex; gap: 8px; overflow-x: auto; border-left: 0;
    margin-inline: calc(-1 * max(var(--gutter), 3vw)); padding: 0 max(var(--gutter), 3vw) 4px;
    scrollbar-width: none;
  }
  .docs-nav::-webkit-scrollbar { display: none; }
  .docs-nav a { flex: none; margin: 0; border: 1px solid var(--tan); border-radius: 999px; background: var(--white); padding: 8px 14px; }
  .docs-nav a.active { border-color: var(--navy); background: var(--navy); color: #fff; }
  .inside-intro img { display: none; }
}
@media (max-width: 640px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .mastery-legend { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mastery-legend b { font-size: .8125rem; }
  .download-grid { grid-template-columns: minmax(0, 1fr); }
  .download img { width: 180px; margin: 0; justify-self: center; }
  .hero-stage { padding-bottom: 0; }
  .phone { width: 220px; margin-inline: auto; border-radius: 36px; padding: 8px; }
  .phone img { border-radius: 28px; }
  /* Narrower, tighter card on phones so it sits inside the gutters instead of edge to edge */
  .quiz { position: relative; width: min(100%, 300px); margin: -150px auto 0; height: 540px; border-radius: 26px; }
  .qs-top { padding: 12px 14px 0; }
  .qs-icon { width: 36px; height: 36px; }
  .qs-head { padding: 10px 14px 10px; }
  .qs-title { font-size: 1.0625rem; }
  .qs-body { padding: 4px 10px 10px; }
  .qs-question { padding: 14px; margin-bottom: 10px; font-size: .9375rem; border-radius: 18px; }
  .choice { padding: 9px 10px; gap: 10px; font-size: .875rem; border-radius: 16px; }
  .choice-key { width: 28px; height: 28px; border-radius: 9px; font-size: .875rem; }
  .qs-panel { padding: 12px 12px 14px; }
  .free-strip { flex-direction: column; align-items: flex-start; }
  .billing { display: flex; }
  .billing button { flex: 1; padding-inline: 10px; }
  .site-footer nav { margin-left: 0; }
  .contact-form .btn, .hero-actions .btn, .hero-actions .play-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Legal pages (privacy.html, delete-account.html) ---------- */
.legal { padding-block: clamp(40px, 7vw, 72px) var(--section-y); }
.legal .doc { margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 900; letter-spacing: -0.02em; }
.legal .effective { margin-top: 8px; color: var(--muted); font-size: .9375rem; }
.legal h2 { font-size: 1.25rem; font-weight: 900; letter-spacing: 0; margin-top: 32px; margin-bottom: 10px; }
.legal ul, .legal ol { margin: 10px 0 0; padding-left: 1.25em; color: #2f3f55; }
.legal li + li { margin-top: 6px; }
.legal .callout { margin-top: 24px; padding: 16px 18px; border-radius: var(--r-input); background: var(--peach); }
.legal-back { color: var(--navy); font-weight: 800; text-decoration: none; margin-left: auto; }
