/* Lern website. A dark study desk: dot-grid page, a red notebook margin, paper and tape,
   one yellow highlighter for the main action and a few other highlighters for tagging.
   Real app screenshots carry the story; small UI pieces float around them. */

/* Self-hosted fonts (SIL OFL 1.1, see fonts/LICENSE.md). Latin subsets only. */
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/fonts/newsreader.woff2") format("woff2");
}
@font-face {
  font-family: "Kalam"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/kalam-400.woff2") format("woff2");
}
@font-face {
  font-family: "Kalam"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/kalam-700.woff2") format("woff2");
}

:root {
  --desk: #121214;
  --sheet: #1a1a1d;
  --sheet-2: #222226;
  --rule: #2e2e33;
  --line: #36363c;
  --chalk: #ece7dc;
  --chalk-2: #c9c4b9;
  --pencil: #8e8a82;
  --ink: #16161a;
  --paper: #ede8dd;
  --paper-line: #c9c2b2;

  --yellow: #f4d35e;
  --yellow-deep: #e6b93a;
  --red: #e5534b;
  --mint: #7ddbb5;
  --pink: #f49ac1;
  --lav: #b4a7f5;
  --sky: #8ec5f4;
  --orange: #f2a57a;

  --serif: "Newsreader", "New York", ui-serif, Georgia, serif;
  --hand: "Kalam", "Bradley Hand", "Segoe Print", cursive;

  /* Layout: the notebook margin, where content starts, and the page rhythm. */
  --m: clamp(16px, 4.5vw, 76px);
  --gut: calc(var(--m) + clamp(22px, 4vw, 64px));
  --right: clamp(20px, 5vw, 80px);
  --maxw: 1240px;
  --space: clamp(96px, 11vw, 168px);

  /* One radius scale: small chips, cards, panels. */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, .05, .25, 1);
  --shadow-float: 0 24px 48px -20px rgba(0,0,0,.8), 0 2px 0 rgba(255,255,255,.03) inset;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--desk);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1.1px, transparent 1.4px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 24px 24px, 160px 160px;
  color: var(--chalk);
  font-family: var(--serif);
  font-size: clamp(17px, 0.4vw + 15.4px, 20px);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 34em; }
h1, h2, h3 { margin: 0; font-weight: 650; text-wrap: balance; }
p, li { text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(244, 211, 94, .35); color: var(--chalk); }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gut); top: -60px; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: 10px 16px; border-radius: var(--r-sm);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }
.center { text-align: center; margin-inline: auto; }
.fine { font-size: .86rem; color: var(--pencil); max-width: none; }

/* The red notebook margin down the whole page. */
.margin-rule {
  position: absolute; top: 0; bottom: 0; left: var(--m); width: 1.5px;
  background: linear-gradient(to bottom, transparent, rgba(229, 83, 75, .5) 120px, rgba(229, 83, 75, .5) calc(100% - 120px), transparent);
  pointer-events: none; z-index: 0;
}

/* Tape, for sticky notes and taped-in paper. */
.tape {
  position: absolute; top: -11px; left: 50%; width: 74px; height: 22px; margin-left: -37px;
  background: rgba(255,255,255,.2); transform: rotate(-3deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent calc(100% - 2px));
}

/* ---------- Buttons ---------- */
.btn {
  --bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: 0 24px; border-radius: var(--r-md);
  font-family: var(--serif); font-size: 1rem; font-weight: 600; letter-spacing: .005em; line-height: 1.1;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent; text-align: center;
  background: var(--bg);
  transition: transform .35s var(--ease-out), background-color .2s, border-color .2s, box-shadow .35s var(--ease-out), color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  --bg: var(--yellow); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 12px 30px -12px rgba(244, 211, 94, .55);
}
.btn-primary:hover { --bg: #f7dc73; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 18px 40px -14px rgba(244, 211, 94, .7); transform: translateY(-1px); }
.btn-ghost { color: var(--chalk); border-color: #3a3a40; background: rgba(255,255,255,.025); }
.btn-ghost:hover { border-color: #5a5a61; background: rgba(255,255,255,.055); transform: translateY(-1px); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .95rem; border-radius: 12px; }
.btn-large { min-height: 58px; padding: 0 30px; font-size: 1.08rem; }
.btn-wide { width: 100%; }

/* ---------- Wordmark ---------- */
.wordmark { text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.wordmark-text { position: relative; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variation-settings: "opsz" 72; }
.wordmark-text::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: .02em; height: .32em; z-index: -1;
  background: var(--yellow); opacity: .78; border-radius: 999px; transform: rotate(-1.5deg);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 12px var(--right) 12px var(--gut);
  background: rgba(18,18,20,.72);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s;
}
.nav.is-scrolled { border-bottom-color: rgba(255,255,255,.07); background: rgba(18,18,20,.86); }
.nav > .wordmark { justify-self: start; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; color: var(--chalk-2); font-size: .97rem; transition: color .2s, background-color .2s;
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--chalk); background: rgba(255,255,255,.06); }
.nav > .btn { justify-self: end; }
.menu-btn {
  display: none; width: 44px; height: 44px; border: 1px solid #3a3a40; border-radius: 12px; background: rgba(255,255,255,.03);
  cursor: pointer; position: relative; justify-self: end;
}
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.8px; border-radius: 2px; background: var(--chalk); transition: transform .35s var(--ease-out), top .35s var(--ease-out); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.mobile-menu {
  position: fixed; z-index: 49; top: 68px; left: 0; right: 0; padding: 8px var(--right) 24px var(--gut);
  background: rgba(22,22,25,.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
  opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .35s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu ul { list-style: none; margin: 0 0 16px; padding: 0; }
.mobile-menu li + li { border-top: 1px solid var(--rule); }
.mobile-menu a:not(.btn) { display: flex; align-items: center; min-height: 54px; text-decoration: none; font-size: 1.2rem; font-weight: 600; }

/* ---------- Shared section layout ---------- */
main > section, .feature, .try { position: relative; padding: var(--space) var(--right) var(--space) var(--gut); }
.section-title {
  font-size: clamp(2.1rem, 2.6vw + 1.1rem, 3.6rem); line-height: 1.04; letter-spacing: -.02em;
  font-variation-settings: "opsz" 72; font-weight: 650; max-width: 17ch; margin-bottom: .5em;
}
.section-title.center { max-width: 20ch; }
.glow {
  position: absolute; inset: 8% 10%; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 211, 94, .13), rgba(244, 211, 94, .04) 60%, transparent 75%);
  filter: blur(20px);
}
.ticks { list-style: none; padding: 0; margin: 1.4em 0 0; display: grid; gap: 12px; color: var(--chalk-2); }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: .38em; width: 15px; height: 8px;
  border-left: 2.3px solid var(--yellow); border-bottom: 2.3px solid var(--yellow); transform: rotate(-45deg);
}

/* Scroll reveal: fade up once, staggered with --d. */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out) var(--d, 0s), transform 1.1s var(--ease-out) var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Phone frame ---------- */
.phone {
  --pw: 270px;
  position: relative; margin: 0; width: var(--pw);
  padding: calc(var(--pw) * .03); border-radius: calc(var(--pw) * .165);
  background: linear-gradient(150deg, #44444b, #1d1d21 32%, #17171a 70%, #34343a);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.09) inset,
    0 0 0 1.5px #0b0b0d,
    0 70px 120px -50px rgba(0,0,0,.95),
    0 30px 60px -30px rgba(0,0,0,.6);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2c2c31; }
.phone::before { left: -3px; top: 20%; height: 9%; box-shadow: 0 calc(var(--pw) * .25) 0 #2c2c31; }
.phone::after { right: -3px; top: 27%; height: 14%; }
.phone img { width: 100%; height: auto; border-radius: calc(var(--pw) * .135); }

/* ---------- Small UI pieces (rebuilt from the app) ---------- */
.ui-card {
  position: absolute; z-index: 3; padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(34, 34, 38, .92); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-float); font-size: .84rem; line-height: 1.4;
}
.ui-head { display: flex; justify-content: space-between; color: var(--pencil); font-size: .76rem; font-weight: 600; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1.5px solid rgba(229, 83, 75, .55); }
.ui-q { font-size: 1.02rem; font-weight: 650; line-height: 1.3; margin: 0 0 12px; font-variation-settings: "opsz" 24; }
.ui-rate { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ui-rate span { text-align: center; padding: 6px 4px; border-radius: var(--r-sm); font-size: .7rem; font-weight: 650; border: 1px solid; white-space: nowrap; }
.r-again { color: var(--orange); border-color: rgba(242,165,122,.45) !important; background: rgba(242,165,122,.1); }
.r-good { color: var(--mint); border-color: rgba(125,219,181,.45) !important; background: rgba(125,219,181,.1); }
.ui-title { display: block; font-size: .98rem; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1.5px solid rgba(229, 83, 75, .55); }
.ui-notes p { margin: 0 0 6px; color: var(--chalk-2); font-size: .82rem; }
.ui-notes p:last-child { margin: 0; }
.ui-notes mark { background: rgba(244, 211, 94, .26); border-radius: 3px; padding: 0 2px; }
mark { color: inherit; background: linear-gradient(transparent 52%, rgba(244, 211, 94, .55) 52%, rgba(244, 211, 94, .55) 90%, transparent 90%); padding: 0 1px; }
.ui-exam { display: flex; align-items: center; gap: 12px; }
.ui-exam b { display: block; font-size: 1rem; line-height: 1.2; white-space: nowrap; }
.ui-small { display: block; color: var(--pencil); font-size: .74rem; }
.ui-exam .ui-small:first-child { color: var(--orange); font-weight: 650; }
.ring { width: 46px; height: 46px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: #3a3a40; }
.ring .fill { stroke: var(--yellow); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: calc(113.1 * (1 - var(--p))); transition: stroke-dashoffset 1.6s var(--ease-out) .5s; }
.ui-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  background: rgba(34, 34, 38, .92); border: 1px solid var(--line); box-shadow: var(--shadow-float); font-size: .88rem; color: var(--chalk-2);
}
.ui-chip b { color: var(--chalk); font-size: 1rem; }
.flame {
  width: 13px; height: 17px; background: var(--orange); flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 0c1 6 9 9 9 19a9 9 0 0 1-18 0c0-5 3-7 4-11 1 3 3 4 4 5 1-4 2-8 1-13z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 0c1 6 9 9 9 19a9 9 0 0 1-18 0c0-5 3-7 4-11 1 3 3 4 4 5 1-4 2-8 1-13z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hand-note { position: absolute; z-index: 3; margin: 0; font-family: var(--hand); color: var(--red); font-size: 1.15rem; line-height: 1.1; max-width: 9em; }
.hand-note svg { display: block; width: 54px; height: 36px; margin-top: 2px; overflow: visible; }
.hand-note path { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Paper: the student's own material. */
.paper { position: absolute; z-index: 2; background: var(--paper); border-radius: 4px; box-shadow: 0 22px 36px -16px rgba(0,0,0,.75); }
.src-pdf { width: 132px; height: 172px; padding: 32px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.src-pdf i { display: block; height: 5px; border-radius: 3px; background: var(--paper-line); }
.src-pdf i.short { width: 60%; }
.src-pdf .tag { position: absolute; top: 0; right: 0; padding: 4px 9px; border-radius: 0 4px 0 8px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; }
.src-photo { width: 158px; padding: 9px 9px 30px; background: #f4f1ea; border-radius: 3px; }
.photo-inner {
  height: 104px; border-radius: 2px; display: grid; place-content: center; gap: 2px;
  background: radial-gradient(120% 100% at 30% 20%, #3f5a4b, #2a3d33);
  font-family: var(--hand); color: rgba(255,255,255,.88); font-size: 1.05rem; text-align: center; line-height: 1.2;
}
.src-rec {
  position: absolute; z-index: 3; width: 196px; height: 54px; padding: 0 14px; border-radius: 27px;
  background: rgba(38, 38, 43, .95); border: 1px solid var(--line); box-shadow: var(--shadow-float);
  display: flex; align-items: center; gap: 10px;
}
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(229, 83, 75, .2); flex: none; }
.wave { display: flex; align-items: center; gap: 3px; height: 26px; flex: 1; }
.wave i { flex: 1; border-radius: 3px; background: var(--lav); }
.wave i:nth-child(1) { height: 40%; } .wave i:nth-child(2) { height: 75%; } .wave i:nth-child(3) { height: 50%; } .wave i:nth-child(4) { height: 95%; }
.wave i:nth-child(5) { height: 60%; } .wave i:nth-child(6) { height: 80%; } .wave i:nth-child(7) { height: 35%; } .wave i:nth-child(8) { height: 65%; } .wave i:nth-child(9) { height: 45%; }
.rec-time { font-size: .8rem; color: var(--pencil); font-variant-numeric: tabular-nums; }

/* ======================================================================
   HERO
   ====================================================================== */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); align-items: center;
  gap: clamp(24px, 3vw, 56px);
  min-height: calc(100svh - 68px); max-width: calc(var(--maxw) + 200px);
  padding-top: clamp(40px, 6vh, 80px) !important; padding-bottom: clamp(56px, 8vh, 110px) !important;
}
.lamp {
  position: absolute; inset: -30% -10% auto 25%; height: 130%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(244, 211, 94, .11), rgba(244, 211, 94, .035) 55%, transparent 75%);
}
.hero-copy { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(3rem, 4.2vw + 1rem, 6.6rem); line-height: .96; letter-spacing: -.032em;
  font-weight: 700; font-variation-settings: "opsz" 72; margin-bottom: .34em;
}
.hero-title .line { display: block; white-space: nowrap; }
.swipe {
  background-image: linear-gradient(transparent 62%, rgba(244, 211, 94, .78) 62%, rgba(244, 211, 94, .78) 92%, transparent 92%);
  background-repeat: no-repeat; background-size: 0% 100%;
  padding: 0 .06em; margin: 0 -.06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size 1s var(--ease-io) .95s;
}
.is-ready .swipe, html:not(.js) .swipe { background-size: 100% 100%; }
.lede { font-size: clamp(1.1rem, .5vw + .95rem, 1.32rem); color: var(--chalk-2); max-width: 29em; margin-bottom: 1.7em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.cta-row.center { justify-content: center; }

.js .hero-title .line, .js .lede, .js .hero .cta-row, .js .hero .fine {
  opacity: 0; transform: translateY(18px);
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
}
.js .hero-title .line:nth-child(2) { transition-delay: .08s; }
.js .lede { transition-delay: .18s; }
.js .hero .cta-row { transition-delay: .26s; }
.js .hero .fine { transition-delay: .32s; }
.is-ready .hero-title .line, .is-ready .lede, .is-ready .hero .cta-row, .is-ready .hero .fine { opacity: 1; transform: none; }

.hero-visual { position: relative; height: clamp(560px, 50vw, 740px); }
.phone-hero { --pw: clamp(250px, 21.5vw, 330px); position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); }
.hf { --r: 0deg; transform: rotate(var(--r)); }
.hf-flash { --r: -4deg; width: 204px; left: -5%; top: 22%; }
.hf-notes { --r: 3deg; width: 196px; right: -5%; top: 50%; }
.hf-exam { --r: 2deg; width: 212px; left: -2%; bottom: 9%; }
.hf-streak { --r: -2deg; right: -2%; top: 15%; }
.hf-hand { --r: -3deg; right: 1%; bottom: 4%; }
.hf-hand svg { transform: scaleX(-1) rotate(-20deg); margin-left: 8px; }

.js .phone-hero { opacity: 0; transform: translate(-50%, -46%) scale(.96); transition: opacity 1s var(--ease-out) .2s, transform 1.3s var(--ease-out) .2s; }
.is-ready .phone-hero { opacity: 1; transform: translate(-50%, -50%); }
.js .hf { opacity: 0; transform: translateY(18px) rotate(var(--r)); transition: opacity .8s var(--ease-out) var(--d), transform 1s var(--ease-out) var(--d); }
.is-ready .hf { opacity: 1; transform: rotate(var(--r)); }
.hf-flash { --d: .55s; } .hf-notes { --d: .7s; } .hf-exam { --d: .85s; } .hf-streak { --d: 1s; } .hf-hand { --d: 1.3s; }
.js .hero .ring .fill { stroke-dashoffset: 113.1; }
.is-ready .hero .ring .fill { stroke-dashoffset: calc(113.1 * (1 - var(--p))); transition-delay: 1.1s; }
@media (hover: hover) {
  .is-ready .hf:not(.hand-note):hover { transform: translateY(-4px) rotate(var(--r)); transition-delay: 0s; transition-duration: .4s; }
}

/* ======================================================================
   FEATURES
   ====================================================================== */
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center;
  column-gap: clamp(40px, 6vw, 110px); max-width: calc(var(--maxw) + 200px);
}
.feature-copy p { color: var(--chalk-2); font-size: 1.06rem; }
.feature-flip .feature-copy { order: 2; }
.feature-visual { position: relative; height: clamp(500px, 44vw, 640px); }
.feature-visual .phone { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); --pw: clamp(232px, 19vw, 286px); }

/* 1: material in */
.fv-sources .phone { left: 60%; }
.fv-sources .src-pdf { left: 4%; top: 12%; --r: -8deg; }
.fv-sources .src-photo { left: 2%; bottom: 12%; --r: 6deg; }
.fv-sources .src-rec { left: 16%; top: 47%; --r: -2deg; }
.fv-sources .paper, .fv-sources .src-rec { transform: rotate(var(--r)); }
.js .fv-sources .paper, .js .fv-sources .src-rec { opacity: 0; transform: translateX(-40px) rotate(var(--r)); transition: opacity .8s var(--ease-out), transform 1.1s var(--ease-out); }
.fv-sources.is-in .paper, .fv-sources.is-in .src-rec { opacity: 1; transform: rotate(var(--r)); }
.fv-sources.is-in .src-pdf { transition-delay: .25s; }
.fv-sources.is-in .src-rec { transition-delay: .4s; }
.fv-sources.is-in .src-photo { transition-delay: .55s; }

/* 2 and 4: two phones, one in front */
.fv-practice .phone-back, .fv-help .phone-back { left: 34%; top: 46%; --pw: clamp(204px, 16.5vw, 250px); transform: translate(-50%, -50%) rotate(-5deg); filter: brightness(.82); z-index: 1; }
.fv-practice .phone-front, .fv-help .phone-front { left: 64%; top: 53%; }
.js .fv-practice .phone-back, .js .fv-help .phone-back { transform: translate(-30%, -50%) rotate(0deg); transition: transform 1.2s var(--ease-out) .2s; }
.fv-practice.is-in .phone-back, .fv-help.is-in .phone-back { transform: translate(-50%, -50%) rotate(-5deg); }

.methods-list { list-style: none; padding: 0; margin: 1.5em 0 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 34em; }
.methods-list li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: .9rem; color: var(--chalk-2);
}
.methods-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* 3: plan */
.fv-exam { right: 2%; bottom: 18%; width: 210px; transform: rotate(2deg); }
.js .fv-exam { opacity: 0; transform: translateY(16px) rotate(2deg); transition: opacity .8s var(--ease-out) .35s, transform 1s var(--ease-out) .35s; }
.fv-plan.is-in .fv-exam { opacity: 1; transform: rotate(2deg); }
.js .fv-plan .ring .fill { stroke-dashoffset: 113.1; }
.fv-plan.is-in .ring .fill { stroke-dashoffset: calc(113.1 * (1 - var(--p))); transition-delay: .7s; }

.board-label { grid-column: 1 / -1; margin: clamp(56px, 7vw, 96px) 0 0; font-family: var(--hand); color: var(--red); font-size: 1.2rem; transform: rotate(-1deg); }
.board {
  grid-column: 1 / -1; margin-top: 22px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(180px, 1.15fr); gap: clamp(14px, 1.8vw, 26px); align-items: center;
}
.sticky-note {
  --tilt: -2deg;
  position: relative; padding: 26px 18px 22px; min-height: 160px; border-radius: 2px 2px 16px 2px;
  color: var(--ink); box-shadow: 0 20px 30px -16px rgba(0,0,0,.7);
  transform: rotate(var(--tilt)); transform-origin: 50% 0;
}
.sticky-note:nth-child(2) { --tilt: 1.6deg; } .sticky-note:nth-child(3) { --tilt: -1deg; } .sticky-note:nth-child(4) { --tilt: 2.2deg; } .sticky-note:nth-child(5) { --tilt: -1.4deg; }
.sticky-note b { display: block; font-family: var(--hand); font-size: 1.45rem; line-height: 1; margin-bottom: 10px; }
.sticky-note ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .96rem; line-height: 1.3; }
.n-sky { background: linear-gradient(170deg, #a5d2f7, var(--sky)); }
.n-mint { background: linear-gradient(170deg, #97e5c6, var(--mint)); }
.n-lav { background: linear-gradient(170deg, #c6bcf8, var(--lav)); }
.n-pink { background: linear-gradient(170deg, #f7b2d0, var(--pink)); }
.n-exam { background: linear-gradient(170deg, #f8df85, var(--yellow)); }
.n-exam b { color: #a02f29; }
.sticky-note::after {
  content: ""; position: absolute; right: 14px; top: 16px; width: 30px; height: 16px;
  border-left: 3.5px solid rgba(22, 22, 26, .85); border-bottom: 3.5px solid rgba(22, 22, 26, .85);
  transform: rotate(-45deg) scale(0); transform-origin: 30% 70%;
  transition: transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.sticky-note.is-done::after { transform: rotate(-45deg) scale(1); }
.sticky-note.is-done li { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(22,22,26,.6); }
.n-exam::after { display: none; }
.readiness { display: flex; align-items: center; gap: 16px; padding-left: 8px; }
.readiness svg { width: 100px; height: 100px; transform: rotate(-90deg); flex: none; }
.readiness circle { fill: none; stroke-width: 10; }
.readiness .track { stroke: #2c2c31; }
.readiness .fill { stroke: var(--yellow); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 144.5; transition: stroke-dashoffset .8s var(--ease-out); }
.readiness strong { display: block; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; font-variation-settings: "opsz" 72; }
.readiness span { color: var(--pencil); font-size: .95rem; white-space: nowrap; }

/* 4: help */
.problem-photo {
  left: -6%; top: 3%; width: 206px; padding: 20px 16px 16px; z-index: 3; transform: rotate(-4deg);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(80, 120, 170, .22) 27px 28px); background-position: 0 14px; background-color: var(--paper);
}
.problem-photo p { margin: 0; font-family: var(--hand); color: #2b2620; font-size: 1.12rem; line-height: 1.5; }
.js .problem-photo { opacity: 0; transform: translateY(-14px) rotate(-8deg); transition: opacity .7s var(--ease-out) .4s, transform 1s var(--ease-out) .4s; }
.fv-help.is-in .problem-photo { opacity: 1; transform: rotate(-4deg); }

/* ======================================================================
   TRY A CARD
   ====================================================================== */
.try {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 6vw, 110px); row-gap: 8px; max-width: calc(var(--maxw) + 200px);
}
.try-copy { grid-column: 1; grid-row: 1; align-self: end; }
.try-copy p { color: var(--chalk-2); font-size: 1.06rem; }
.deck-wrap { grid-column: 2; grid-row: 1 / span 2; width: min(500px, 100%); justify-self: center; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r-lg); background: rgba(26,26,29,.7); border: 1px solid var(--rule); box-shadow: 0 50px 90px -50px rgba(0,0,0,.95); }
.try-cta { grid-column: 1; grid-row: 2; align-self: start; margin-top: 6px; }
.try-cta p { color: var(--chalk); font-weight: 600; margin-bottom: .7em; }
.kbd-hint { font-size: .9rem; color: var(--pencil) !important; }
@media (hover: none) { .kbd-hint { display: none; } }
kbd {
  display: inline-block; min-width: 1.7em; padding: 1px 7px; border-radius: 6px; text-align: center;
  font-family: var(--serif); font-size: .85em; color: var(--chalk);
  background: var(--sheet-2); border: 1px solid #3a3a40; border-bottom-width: 2.5px;
}
.deck-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.deck-count { font-weight: 700; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.deck-tallies { display: flex; gap: 14px; font-size: .86rem; color: var(--pencil); }
.tally b { font-variant-numeric: tabular-nums; }
.tally-again b { color: var(--orange); }
.tally-good b { color: var(--mint); }
.deck-progress { height: 4px; border-radius: 2px; background: #2c2c31; overflow: hidden; margin-bottom: 18px; }
.deck-progress span { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--yellow); transition: width .6s var(--ease-out); }
.deck { position: relative; aspect-ratio: 5 / 4; margin-bottom: 18px; perspective: 1800px; touch-action: pan-y; }
.flash { position: absolute; inset: 0; transform-style: preserve-3d; cursor: grab; user-select: none; -webkit-user-select: none; will-change: transform; }
.flash:active { cursor: grabbing; }
.flash.is-behind { pointer-events: none; }
.flash-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3, 1.2, .45, 1); }
.flash.is-flipped .flash-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--r-md); background-color: var(--sheet-2);
  background-image: repeating-linear-gradient(to bottom, transparent 0 33px, rgba(142, 197, 244, .08) 33px 34px);
  background-position: 0 60px;
  border: 1px solid var(--line); box-shadow: 0 30px 50px -24px rgba(0,0,0,.85);
  display: flex; flex-direction: column;
}
.flash-face.back { transform: rotateY(180deg); border-color: rgba(244, 211, 94, .45); }
.flash-head { display: flex; justify-content: space-between; align-items: center; height: 54px; padding: 0 20px; border-bottom: 1.5px solid rgba(229, 83, 75, .55); color: var(--pencil); font-size: .92rem; font-weight: 600; }
.back .flash-head { color: var(--yellow); }
.flash-text { flex: 1; display: grid; place-items: center; margin: 0; padding: 18px 26px; max-width: none; text-align: center; font-size: clamp(1.25rem, 1.3vw + .8rem, 1.7rem); line-height: 1.3; font-weight: 650; font-variation-settings: "opsz" 36; }
.back .flash-text { font-weight: 400; }
.flash-hint { text-align: center; padding-bottom: 14px; font-family: var(--hand); color: var(--pencil); font-size: 1rem; }
.flash-stamp { position: absolute; top: 70px; z-index: 5; padding: 6px 14px; border-radius: var(--r-sm); font-weight: 700; font-size: 1.02rem; border: 2.5px solid currentColor; opacity: 0; pointer-events: none; transform: rotate(var(--sr)); background: rgba(18,18,20,.6); }
.flash-stamp.good { right: 20px; color: var(--mint); --sr: 8deg; }
.flash-stamp.again { left: 20px; color: var(--orange); --sr: -8deg; }
.deck-controls { min-height: 50px; }
.rate { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-rate { border-width: 1.5px; }
.rate-again { color: var(--orange); background: rgba(242, 165, 122, .1); border-color: rgba(242, 165, 122, .45); }
.rate-good { color: var(--mint); background: rgba(125, 219, 181, .1); border-color: rgba(125, 219, 181, .45); }
.rate-again:hover { background: rgba(242, 165, 122, .18); transform: translateY(-1px); }
.rate-good:hover { background: rgba(125, 219, 181, .18); transform: translateY(-1px); }
.deck-note { min-height: 1.6em; margin: 12px 0 0; font-family: var(--hand); color: var(--red); font-size: 1.1rem; text-align: center; max-width: none; }
.deck-done { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; border-radius: var(--r-md); border: 1.5px dashed #3a3a40; padding: 24px; }
.deck-done h3 { font-size: 1.6rem; }
.deck-done p { color: var(--chalk-2); margin: 0 auto; max-width: 24em; }

/* ======================================================================
   WHY LERN
   ====================================================================== */
.why { max-width: calc(var(--maxw) + 200px); }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(40px, 5vw, 64px); }
.why-item { padding-top: 26px; border-top: 1px solid var(--rule); }
.why-item h3 { font-size: 1.45rem; margin: 22px 0 8px; font-variation-settings: "opsz" 36; }
.why-item p { color: var(--chalk-2); font-size: 1.02rem; margin: 0; }
.why-art { height: 90px; width: 100%; max-width: 230px; display: block; }
.why-curve { overflow: visible; }
.why-curve .axis { stroke: var(--rule); stroke-width: 1.5; }
.why-curve .cram { fill: none; stroke: var(--pencil); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.why-curve .lern { fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 0; }
.why-curve circle { fill: var(--desk); stroke: var(--yellow); stroke-width: 2.5; }
.js .why-curve .lern { stroke-dashoffset: 420; transition: stroke-dashoffset 1.8s var(--ease-io) .3s; }
.js .is-in .why-curve .lern { stroke-dashoffset: 0; }
.why-flow { display: flex; align-items: center; gap: 14px; }
.mini-paper { position: relative; width: 52px; height: 66px; padding: 14px 9px 0; display: flex; flex-direction: column; gap: 6px; transform: rotate(-5deg); }
.mini-paper i { height: 4px; border-radius: 2px; background: var(--paper-line); }
.flow-arrow { position: relative; width: 46px; height: 2px; background: var(--pencil); }
.flow-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 9px; height: 9px; border-right: 2px solid var(--pencil); border-top: 2px solid var(--pencil); transform: rotate(45deg); }
.mini-outs { display: grid; grid-template-columns: repeat(2, 30px); gap: 6px; }
.mini-outs i { height: 30px; border-radius: 6px; background: var(--sheet-2); border: 1px solid var(--line); border-top: 3px solid var(--c); }
.js .mini-outs i { opacity: 0; transform: scale(.7); transition: opacity .4s, transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.js .is-in .mini-outs i { opacity: 1; transform: none; }
.is-in .mini-outs i:nth-child(1) { transition-delay: .5s; } .is-in .mini-outs i:nth-child(2) { transition-delay: .6s; }
.is-in .mini-outs i:nth-child(3) { transition-delay: .7s; } .is-in .mini-outs i:nth-child(4) { transition-delay: .8s; }
.why-week { display: flex; align-items: center; gap: 8px; }
.why-week span { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-sm); font-weight: 700; color: var(--ink); font-size: .95rem; isolation: isolate; }
.why-week span::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); background: var(--yellow); z-index: -1; transform-origin: left; }
.why-week .exam { color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.why-week .exam::before { display: none; }
.js .why-week span:not(.exam) { color: var(--pencil); transition: color .2s; }
.js .why-week span::before { transform: scaleX(0); transition: transform .35s var(--ease-io); }
.js .is-in .why-week span:not(.exam) { color: var(--ink); }
.js .is-in .why-week span::before { transform: scaleX(1); }
.is-in .why-week span:nth-child(1), .is-in .why-week span:nth-child(1)::before { transition-delay: .4s; }
.is-in .why-week span:nth-child(2), .is-in .why-week span:nth-child(2)::before { transition-delay: .55s; }
.is-in .why-week span:nth-child(3), .is-in .why-week span:nth-child(3)::before { transition-delay: .7s; }
.is-in .why-week span:nth-child(4), .is-in .why-week span:nth-child(4)::before { transition-delay: .85s; }

/* ======================================================================
   PRICING
   ====================================================================== */
.pricing { max-width: calc(var(--maxw) + 200px); }
.pricing-head { text-align: center; }
.pricing-head > p { color: var(--chalk-2); max-width: 32em; }
.billing { display: inline-flex; gap: 4px; padding: 4px; margin-top: 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.billing button { min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--chalk-2); font-weight: 600; cursor: pointer; transition: background-color .25s, color .25s; }
.billing button:hover { color: var(--chalk); }
.billing button.is-on { background: var(--yellow); color: var(--ink); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); max-width: 940px; margin: clamp(36px, 5vw, 56px) auto 28px; align-items: start; }
.plan-card { position: relative; padding: clamp(26px, 3vw, 40px); border-radius: var(--r-lg); background: var(--sheet); border: 1px solid var(--rule); display: flex; flex-direction: column; }
.plan-pro { border: 1.5px solid rgba(244, 211, 94, .55); background: linear-gradient(180deg, rgba(244, 211, 94, .07), transparent 38%), var(--sheet); box-shadow: 0 40px 90px -50px rgba(244, 211, 94, .35); }
.plan-card h3 { font-size: 1.45rem; font-variation-settings: "opsz" 48; }
.price { margin: 14px 0 4px; color: var(--chalk-2); }
.price strong { font-size: 3rem; line-height: 1; color: var(--chalk); font-variation-settings: "opsz" 72; letter-spacing: -.02em; margin-right: 4px; }
.plan-sub { color: var(--pencil); font-size: .97rem; min-height: 3.1em; margin-bottom: 20px; }
.limits { width: 100%; border-collapse: collapse; margin: 22px 0 0; font-size: .97rem; }
.limits th, .limits td { padding: 11px 0; border-top: 1px solid var(--rule); text-align: left; font-weight: 400; }
.limits th { color: var(--chalk-2); }
.limits td { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.plan-pro .limits td { color: var(--yellow); }

/* ======================================================================
   FAQ
   ====================================================================== */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 90px); max-width: calc(var(--maxw) + 200px); }
.faq-list { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 64px; padding: 14px 0; font-size: 1.15rem; font-weight: 600; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 14px; height: 14px; flex: none; margin-right: 6px;
  background: linear-gradient(var(--chalk-2), var(--chalk-2)) center / 100% 2px no-repeat, linear-gradient(var(--chalk-2), var(--chalk-2)) center / 2px 100% no-repeat;
  transition: transform .35s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--yellow); }
.faq details p { color: var(--chalk-2); padding: 0 0 22px; margin: 0; }
.faq details a { color: var(--yellow); }

/* ======================================================================
   CLOSING
   ====================================================================== */
.closing { text-align: center; padding-bottom: clamp(120px, 15vw, 200px) !important; overflow: hidden; }
.closing-glow { position: absolute; left: 50%; top: 40%; width: min(900px, 120vw); height: 520px; transform: translate(-50%, -50%); pointer-events: none; background: radial-gradient(closest-side, rgba(244, 211, 94, .12), transparent 75%); }
.closing-book { --bw: 300px; position: relative; width: 300px; height: 210px; margin: 0 auto 44px; perspective: 1600px; transform-style: preserve-3d; filter: drop-shadow(0 30px 30px rgba(0,0,0,.6)); transition: transform 1.3s var(--ease-io); }
.cb-page { position: absolute; left: 50%; top: 0; width: 50%; height: 100%; border-radius: 3px 10px 10px 3px; background-color: #1d1d21; background-image: repeating-linear-gradient(to bottom, transparent 0 15px, rgba(142, 197, 244, .1) 15px 16px); }
.cb-cover {
  position: absolute; left: 50%; top: 0; width: 50%; height: 100%; transform-origin: left center;
  border-radius: 4px 12px 12px 4px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,.06), transparent 60%), linear-gradient(160deg, #27272c, #1b1b1f);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  transform: rotateY(-178deg); backface-visibility: visible; transition: transform 1.3s var(--ease-io);
}
.spine { position: absolute; left: 0; top: 0; bottom: 0; width: 9%; background: linear-gradient(90deg, #141417, #1c1c20); }
.cover-l { position: relative; z-index: 2; font-family: var(--serif); font-weight: 700; color: var(--chalk); font-size: 70px; line-height: 1; font-variation-settings: "opsz" 72; transform: translate(-6%, -2%); }
.cover-swipe { position: absolute; z-index: 1; width: 52%; height: 9%; left: 16%; top: 56%; background: var(--yellow); border-radius: 30px 8px 30px 10px; transform: rotate(-9deg); }
.cb-cover .cover-l, .cb-cover .cover-swipe, .cb-cover .spine { opacity: 0; transition: opacity .2s .65s; }
.cb-band { position: absolute; z-index: 3; left: calc(50% + 50% * .8); width: 7px; top: -3px; bottom: -3px; border-radius: 3px; background: linear-gradient(90deg, #c94740, var(--red) 35%, #f06b62 55%, #c94740); opacity: 0; transform: translate(70px, -30px) rotate(-18deg); transition: transform .6s cubic-bezier(.3, 1.7, .5, 1) 1.25s, opacity .2s 1.25s; }
.closing-book.is-closed { transform: translateX(-25%); }
.closing-book.is-closed .cb-cover { transform: rotateY(0deg); }
.closing-book.is-closed .cb-cover .cover-l, .closing-book.is-closed .cb-cover .cover-swipe, .closing-book.is-closed .cb-cover .spine { opacity: 1; }
.closing-book.is-closed .cb-band { opacity: 1; transform: none; }
.closing-title { position: relative; font-size: clamp(2.6rem, 4.6vw + 1rem, 5.6rem); line-height: 1; letter-spacing: -.03em; max-width: 14ch; margin: 0 auto .3em; font-variation-settings: "opsz" 72; }
.closing-sub { position: relative; font-size: clamp(1.15rem, .6vw + 1rem, 1.45rem); color: var(--chalk-2); margin: 0 auto 1.6em; }

/* ---------- Footer ---------- */
.footer {
  position: relative; display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 64px);
  padding: clamp(48px, 6vw, 72px) var(--right) 40px var(--gut); border-top: 1px solid rgba(255,255,255,.07);
}
.footer-brand p { color: var(--chalk-2); font-size: .98rem; margin: 10px 0 18px; max-width: 22em; }
.footer-col h2 { font-size: .95rem; font-weight: 700; color: var(--chalk); margin: 10px 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 38px; color: var(--chalk-2); text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: var(--yellow); }
.footer-base { grid-column: 1 / -1; margin: 16px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); }

/* ======================================================================
   RESPONSIVE
   ====================================================================== */
@media (max-width: 1180px) {
  .board { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .readiness { grid-column: 1 / -1; justify-content: center; margin-top: 18px; }
  .hf-flash { width: 190px; left: -3%; } .hf-notes { width: 180px; right: -3%; } .hf-exam { width: 196px; left: 0; }
}

/* Tablet and phone: one column, the product right after the headline. */
@media (max-width: 920px) {
  .nav { grid-template-columns: 1fr auto auto; gap: 10px; }
  .nav-main { display: none; }
  .menu-btn { display: block; }
  .nav-doc .nav-main { display: block; }

  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 12px; }
  .hero-visual { height: clamp(560px, 118vw, 760px); }
  .phone-hero { --pw: clamp(220px, 52vw, 320px); }
  .hf-flash { left: 0; top: 6%; width: min(210px, 44vw); }
  .hf-exam { left: auto; right: 0; bottom: 8%; width: min(220px, 46vw); }
  .hf-notes { right: 0; top: 34%; width: min(196px, 40vw); }
  .hf-streak { right: 4%; top: 2%; }
  .hf-hand { display: none; }

  .feature, .try, .faq { grid-template-columns: minmax(0, 1fr); }
  .feature-flip .feature-copy { order: 0; }
  .feature-copy { margin-bottom: 8px; }
  .feature-visual { height: clamp(500px, 112vw, 640px); }
  .feature-visual .phone { --pw: clamp(210px, 50vw, 280px); }
  .fv-practice .phone-back, .fv-help .phone-back { --pw: clamp(180px, 42vw, 240px); left: 30%; }
  .fv-practice .phone-front, .fv-help .phone-front { left: 66%; }
  .fv-sources .phone { left: 62%; }

  .try { grid-template-rows: none; row-gap: 28px; }
  .try-copy, .deck-wrap, .try-cta { grid-column: 1; grid-row: auto; }
  .deck-wrap { justify-self: stretch; width: 100%; max-width: 520px; }

  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .plan-sub { min-height: 0; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .n-exam { grid-column: span 2; max-width: 60%; justify-self: center; }
  .footer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .nav-cta { display: none; }
  .hero-title { font-size: clamp(2.5rem, 11.5vw, 3.4rem); }
  .hero-title .line { white-space: normal; }
  .hero .cta-row .btn { width: 100%; }
  .hero-visual { height: 120vw; }
  .phone-hero { --pw: 54vw; }
  .hf-notes { display: none; }
  .hf-streak { display: none; }
  .hf-flash { width: 46vw; top: 31%; left: -3%; } .hf-exam { width: 52vw; bottom: 4%; right: -3%; }
  .ui-card { padding: 11px 12px; }
  .ui-q { font-size: .92rem; }
  .ui-exam b { font-size: .9rem; }
  .ui-exam { gap: 9px; } .ui-exam .ring { width: 38px; height: 38px; }
  .feature-visual { height: 122vw; }
  .feature-visual .phone { --pw: 52vw; }
  .fv-practice .phone-back, .fv-help .phone-back { --pw: 44vw; }
  .fv-sources .src-pdf { width: 104px; height: 136px; padding-top: 26px; }
  .fv-sources .src-photo { width: 126px; } .fv-sources .photo-inner { height: 82px; }
  .fv-sources .src-rec { width: 160px; left: 4%; top: 50%; }
  .problem-photo { width: 180px; left: 0; top: 4%; }
  .fv-exam { width: 172px; right: 0; bottom: 6%; }
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reduced motion: every end state, no movement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ======================================================================
   DOCUMENT PAGES (privacy, support, 404)
   ====================================================================== */
.doc-main { position: relative; padding: clamp(48px, 8vh, 96px) var(--right) clamp(80px, 12vh, 140px) var(--gut); }
.doc { max-width: 44rem; }
.doc h1 { font-size: clamp(2.4rem, 3vw + 1.4rem, 4rem); line-height: 1.02; letter-spacing: -.02em; font-variation-settings: "opsz" 72; margin-bottom: .35em; }
.doc .updated { color: var(--pencil); font-size: .95rem; margin-bottom: 2.4em; }
.doc .summary { font-size: 1.12rem; color: var(--chalk); padding: 20px 24px; border-radius: var(--r-md); background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--yellow); margin-bottom: 2.6em; max-width: none; }
.doc h2 { font-size: 1.6rem; font-variation-settings: "opsz" 48; margin: 2.2em 0 .6em; padding-top: 1.2em; border-top: 1px solid var(--rule); scroll-margin-top: 90px; }
.doc h3 { font-size: 1.18rem; margin: 1.6em 0 .4em; }
.doc p, .doc li { color: var(--chalk-2); max-width: none; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; display: grid; gap: .45em; }
.doc strong { color: var(--chalk); font-weight: 650; }
.doc a:not(.btn) { color: var(--yellow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc a:not(.btn):hover { text-decoration-thickness: 2px; }
.doc .table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--rule); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.doc thead th { color: var(--chalk); font-weight: 650; background: var(--sheet); }
.doc tbody tr:last-child td { border-bottom: 0; }
.doc td { color: var(--chalk-2); }
.doc .toc { margin: 0 0 2.4em; padding: 18px 22px; border-radius: var(--r-md); background: var(--sheet); border: 1px solid var(--rule); }
.doc .toc ol { margin: 0; columns: 2; column-gap: 28px; display: block; }
.doc .toc li { margin-bottom: .3em; break-inside: avoid; }
.doc .toc a { color: var(--chalk-2); text-decoration: none; }
.doc .toc a:hover { color: var(--yellow); }
.doc .contact-card { padding: 24px; border-radius: var(--r-lg); background: var(--sheet); border: 1px solid var(--rule); margin: 0 0 1.4em; }
.doc .contact-card .btn { margin-top: 8px; }
.doc .contact-card .card-title { border: 0; margin: 0 0 .4em; padding: 0; }
.doc .closing-note { margin-top: 3em; font-size: .92rem; color: var(--pencil); }
.nav-doc .nav-links { display: flex; }
.notfound { min-height: 70svh; display: grid; align-content: center; justify-items: start; gap: 6px; }
.notfound .hand { font-family: var(--hand); color: var(--red); font-size: 1.4rem; transform: rotate(-2deg); margin: 0; }
@media (max-width: 640px) { .doc .toc ol { columns: 1; } }
