/* ==========================================================================
   thephysicslab — styles
   Two moods share one system:
     · the LAB      dark, technical, cut corners, condensed italic display type
     · the NOTEBOOK cream graph paper, ink outlines, highlighter, pen doodles
   Contents: tokens · base · helpers · buttons · promo · nav · hero · tapes
             method · modules · tray · quiz · teacher · register · faq · footer
             motion · responsive
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0b0c10;
  --ink-2: #13151b;
  --ink-3: #1c1f27;
  --paper: #f6f1e4;
  --paper-2: #ece4d0;
  --white: #ffffff;
  --navy: #11264d;
  --volt: #ffe11a;
  --flare: #ff4a2b;
  --flare-deep: #c22f15;
  --cobalt: #2757f5;

  --line-d: rgba(246, 241, 228, 0.14);
  --mute-d: rgba(246, 241, 228, 0.68);
  --mute-p: rgba(17, 38, 77, 0.78);

  --f-display: "Sofia Sans Extra Condensed", "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(84px, 10.5vw, 160px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sine: cubic-bezier(0.3642, 0, 0.6358, 1);

  --focus: var(--volt);
  --surface: var(--ink);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* The tapes run wider than the page on purpose; clip them without creating a scroll container */
@supports (overflow: clip) {
  body { overflow-x: clip; }
  main { overflow-x: clip; }
}

h1, h2, h3, p, ul, ol, figure, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--volt); color: var(--ink); }

/* ---------- Helpers ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 12px 18px; background: var(--volt); color: var(--ink);
  font-weight: 800; text-decoration: none; transition: top 0.2s;
}
.skip:focus { top: 16px; }

.i { width: 1.15em; height: 1.15em; flex: none; }

.display {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(3.6rem, 9.2vw, 8.25rem);
  line-height: 0.84;
  letter-spacing: 0.002em;
  text-transform: uppercase;
}
.display--volt { color: var(--volt); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.8em;
  font: 700 0.78rem/1.3 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; flex: none; width: 28px; height: 2px; background: currentColor; }
.eyebrow--volt { color: var(--volt); }

.hand { font-family: var(--f-hand); font-weight: 700; font-size: 1.65rem; line-height: 1.05; }

/* Highlighter stroke behind a phrase */
.hl {
  padding: 0 0.1em; margin: 0 -0.1em;
  background: linear-gradient(var(--volt), var(--volt)) no-repeat 0 82% / 100% 48%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Pen doodles (arrows, underlines, bursts) */
.doodle {
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round; overflow: visible;
}
.doodle path { stroke-dasharray: 1 2; }

.linkbtn {
  padding: 0; border: 0; background: none;
  font-weight: 700; font-size: 0.95rem; color: inherit;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.linkbtn:hover { color: var(--cobalt); }

code {
  padding: 2px 6px; border-radius: 6px;
  font: 500 0.88em var(--f-mono);
  background: rgba(11, 12, 16, 0.08);
}

/* Notebook surface */
.paper {
  --focus: var(--cobalt);
  --surface: var(--paper);
  color: var(--navy);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(39, 87, 245, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 87, 245, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(39, 87, 245, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 87, 245, 0.05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.paper .eyebrow { color: var(--flare-deep); }
.paper .display { color: var(--navy); }

/* Shared section header: big title left, short intro right */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  align-items: end;
  gap: 28px 64px;
  margin-bottom: clamp(44px, 6vw, 84px);
}
.section-head .display { margin-top: 18px; }
.section-head__lead { font-size: 1.12rem; color: var(--mute-d); padding-bottom: 6px; }
.paper .section-head__lead { color: var(--mute-p); }

/* Torn paper edge hanging over a dark section */
.tear {
  position: absolute; left: 0; right: 0; top: -1px;
  height: clamp(18px, 2.4vw, 34px);
  background: url("../img/tear.svg") center top / 100% 100% no-repeat;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--volt); --fg: var(--ink); --cut: 13px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.8em;
  min-height: 54px; padding: 0 1.65em;
  font: 800 0.84rem/1 var(--f-body);
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--fg); background: var(--bg);
  border: 0; border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: background-color 0.2s, color 0.2s, translate 0.2s var(--ease);
}
.btn .i { width: 1.3em; height: 1.3em; transition: translate 0.25s var(--ease); }
.btn:hover .i { translate: 4px 0; }
.btn:active { translate: 0 1px; }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--fg); }

.btn--volt:hover { --bg: var(--white); }
.btn--ink { --bg: var(--ink); --fg: var(--paper); }
.btn--ink:hover { --bg: var(--cobalt); --fg: var(--white); }

.btn--ghost { --bg: var(--volt); --fg: var(--paper); }
.btn--ghost::before {
  content: ""; position: absolute; inset: 2px; z-index: -1;
  background: var(--surface);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut) + 1.2px), calc(100% - var(--cut) + 1.2px) 100%, 0 100%);
  transition: opacity 0.2s;
}
.btn--ghost:hover { --fg: var(--ink); }
.btn--ghost:hover::before { opacity: 0; }

.btn--sm { --cut: 11px; min-height: 46px; padding: 0 1.3em; font-size: 0.78rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Promo bar ---------- */
.promo {
  padding: 9px var(--gutter);
  background: var(--flare); color: var(--ink);
  font-size: 0.875rem; font-weight: 700; text-align: center;
  --focus: var(--ink);
}
.promo p { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; }
.promo a { display: inline-flex; align-items: center; gap: 6px; text-underline-offset: 3px; }
.promo a:hover { text-decoration-thickness: 2px; }
.promo__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: pulse 1.8s ease-in-out infinite; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 12px; z-index: 50;
  margin-top: 12px; padding-inline: var(--gutter);
  pointer-events: none;
}
.nav__bar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 24px;
  width: min(100%, var(--container)); height: var(--nav-h);
  margin-inline: auto; padding: 0 11px 0 18px;
  background: rgba(15, 17, 22, 0.84);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--line-d); border-radius: 22px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
}

.logo { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--paper); text-decoration: none; }
.logo__mark { flex: none; width: 34px; height: 34px; }
.logo__pendulum { transform-origin: 20px 8px; transform: rotate(22deg); }
.logo:hover .logo__pendulum { animation: swing 1.5s var(--sine) infinite; }
.logo__word { font: 500 1.24rem/1 var(--f-body); letter-spacing: -0.02em; }
.logo__word b { font-weight: 800; }
.logo__word em { font-style: normal; font-weight: 800; color: var(--volt); }

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 10px 14px; border-radius: 12px;
  font-size: 0.95rem; font-weight: 600; color: var(--mute-d); text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover { color: var(--paper); background: rgba(246, 241, 228, 0.08); }
.nav__links a[aria-current] { color: var(--volt); }

.nav__toggle {
  display: none; position: relative; flex: none;
  width: 46px; height: 46px; border: 0; border-radius: 14px;
  background: rgba(246, 241, 228, 0.1);
}
.nav__toggle span {
  position: absolute; left: 13px; right: 13px; height: 2px; background: var(--paper);
  transition: top 0.3s var(--ease), rotate 0.3s var(--ease);
}
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 26px; }
.nav__toggle[aria-expanded="true"] span { top: 22px; }
.nav__toggle[aria-expanded="true"] span:first-child { rotate: 45deg; }
.nav__toggle[aria-expanded="true"] span:last-child { rotate: -45deg; }

/* Full-screen menu (small screens) */
.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: calc(var(--nav-h) + 88px) var(--gutter) 28px;
  background: var(--ink);
  overflow-y: auto;
  visibility: hidden; opacity: 0;
  transition: opacity 0.25s, visibility 0s 0.25s;
}
.menu-open .menu { visibility: visible; opacity: 1; transition: opacity 0.25s, visibility 0s; }
.menu-open { overflow: hidden; }
.menu nav { display: grid; }
.menu nav a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line-d);
  font: italic 900 clamp(2.9rem, 13vw, 4.2rem)/1 var(--f-display);
  text-transform: uppercase; text-decoration: none; color: var(--paper);
}
.menu nav a:hover { color: var(--volt); }
.menu nav small { font: 700 0.74rem var(--f-mono); letter-spacing: 0.1em; color: var(--volt); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  margin-top: calc((var(--nav-h) + 12px) * -1);
  padding: calc(var(--nav-h) + clamp(44px, 5.4vw, 76px)) 0 clamp(128px, 13vw, 184px);
  overflow: clip;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(54rem 38rem at 80% 40%, rgba(255, 225, 26, 0.14), transparent 70%),
    linear-gradient(var(--line-d) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line-d) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 50%, transparent 96%);
}
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center; gap: clamp(32px, 5vw, 76px);
}

/* Four stacked lines. Sizes are set so the widest line ("SCIENTISTS.", about 3.9em) always fits its column. */
.hero__title {
  margin: 20px 0 26px;
  font: italic 900 clamp(3.4rem, 21vw, 10rem)/0.78 var(--f-display);
  letter-spacing: -0.006em; text-transform: uppercase;
  color: var(--volt);
}
.hero__title span { display: block; }
/* The small handwritten "and" tucked beside DOCTORS */
.hero__title em {
  display: inline-block; margin-left: 0.3em;
  font: 700 0.42em/1 var(--f-hand); letter-spacing: 0; text-transform: none;
  color: var(--paper); rotate: -7deg; translate: 0 -0.16em;
}
/* Outline word: stroke first, then an ink fill on top, so the font's overlapping contours never show through */
.hero__title .is-outline { color: var(--ink); -webkit-text-stroke: 5px var(--volt); paint-order: stroke fill; }
.hero__title i { font-style: inherit; color: var(--flare); }

.hero__lead { max-width: 33rem; font-size: clamp(1.06rem, 1.35vw, 1.24rem); color: var(--mute-d); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero__note {
  margin-top: 22px;
  font: 500 0.76rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(246, 241, 228, 0.5);
}
.hero__note span { margin: 0 0.5em; color: var(--volt); }

/* Gravity bench */
.bench { position: relative; }
.bench::before, .bench::after {
  content: ""; position: absolute; width: 15px; height: 15px; pointer-events: none;
  background:
    linear-gradient(var(--mute-d), var(--mute-d)) center / 100% 1px no-repeat,
    linear-gradient(var(--mute-d), var(--mute-d)) center / 1px 100% no-repeat;
}
.bench::before { right: -24px; top: -24px; }
.bench::after { right: -24px; bottom: -24px; }

.bench__frame {
  --c: 26px;
  padding: 1px;
  background: linear-gradient(135deg, var(--volt), rgba(246, 241, 228, 0.2) 26%, rgba(246, 241, 228, 0.14));
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.bench__body {
  --c: 25.4px;
  background: #0d0f14;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.bench__top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 14px 16px 12px 32px; border-bottom: 1px solid var(--line-d);
}
.bench__label { font: 700 0.72rem var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--volt); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 7px 11px; border: 1px solid var(--line-d); border-radius: 999px;
  font: 700 0.7rem/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute-d); background: transparent;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--paper); border-color: var(--paper); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--volt); border-color: var(--volt); }

.bench__canvas {
  width: 100%; height: clamp(290px, min(33vw, 44vh), 430px);
  touch-action: pan-y; cursor: crosshair;
  background:
    linear-gradient(rgba(246, 241, 228, 0.055) 1px, transparent 1px) 0 calc(100% - 18px) / 50px 50px,
    linear-gradient(90deg, rgba(246, 241, 228, 0.055) 1px, transparent 1px) 0 0 / 50px 50px;
}
.bench__canvas.is-over { cursor: grab; }
.bench__canvas.is-grabbing { cursor: grabbing; }

.bench__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 11px 34px 12px 98px; border-top: 1px solid var(--line-d); /* left space is for the round badge */
  font: 500 0.76rem var(--f-mono); color: var(--mute-d);
}
.bench__foot b { color: var(--volt); font-weight: 700; }
.bench__read { display: flex; white-space: nowrap; }
.bench__count::before { content: "/"; margin: 0 0.7em; opacity: 0.5; }
.bench__drop {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 2px; border: 0; background: none;
  font: 700 0.72rem var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper);
}
.bench__drop:hover { color: var(--volt); }

.bench__note {
  position: absolute; right: 7%; top: -50px; z-index: 2;
  display: flex; align-items: flex-start; gap: 8px;
  color: var(--paper); rotate: -4deg; pointer-events: none;
}
.bench__note .doodle { width: 46px; margin-top: 12px; color: var(--volt); }
.bench__note .doodle path { animation: draw 0.9s ease 1.1s both; }

.badge {
  position: absolute; left: -44px; bottom: -42px; z-index: 3;
  display: grid; place-items: center;
  width: 124px; height: 124px; border-radius: 50%;
  background: var(--flare); color: var(--ink);
  transition: scale 0.3s var(--ease), rotate 0.3s var(--ease);
  --focus: var(--paper);
}
.badge:hover { scale: 1.08; rotate: -10deg; }
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.badge__ring text { font: 700 10.5px var(--f-mono); fill: currentColor; }
.badge__arrow { width: 40px; height: 40px; }

/* ---------- Tapes ---------- */
.tapes { position: relative; z-index: 6; height: 0; }
.tape {
  position: absolute; left: -5vw; right: -5vw; top: 0;
  display: flex; align-items: center;
  height: clamp(52px, 5.4vw, 72px); overflow: hidden;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  translate: 0 -50%;
}
.tape--volt { background: var(--volt); rotate: -2.2deg; --mark-bg: var(--ink); --mark-fg: var(--volt); }
.tape--white { background: var(--white); rotate: 1.9deg; --mark-bg: var(--ink); --mark-fg: var(--white); }
.tape__track {
  display: flex; flex: none; align-items: center;
  gap: clamp(22px, 3vw, 40px); padding-right: clamp(22px, 3vw, 40px);
  white-space: nowrap;
}
.tape__track span {
  font: italic 900 clamp(2rem, 3.6vw, 3rem)/1 var(--f-display);
  letter-spacing: 0.01em; text-transform: uppercase;
}
.tape__mark { flex: none; width: clamp(26px, 2.8vw, 36px); height: clamp(26px, 2.8vw, 36px); }
.js .tape__track { animation: tape 46s linear infinite; }
.js .tape__track--rev { animation-direction: reverse; animation-duration: 58s; }

/* ---------- Method ---------- */
.method { position: relative; padding: calc(var(--section) + 60px) 0 calc(var(--section) + 10px); }

.moves {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
}
.move {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(22px, 2.4vw, 32px);
  border: 2.5px solid var(--ink); border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink);
  rotate: var(--r, 0deg);
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.move:hover { transform: translate(-4px, -4px); box-shadow: 12px 12px 0 var(--ink); }
.move--navy { --r: -1.4deg; background: var(--navy); color: var(--paper); }
.move--flare { --r: 0.9deg; margin-top: 30px; background: var(--flare); color: var(--ink); }
.move--volt { --r: -0.6deg; background: var(--volt); color: var(--ink); }

.move__top { display: flex; align-items: flex-start; justify-content: space-between; }
.move__num {
  padding: 7px 11px; border: 2px solid currentColor; border-radius: 999px;
  font: 700 0.74rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase;
}
.move__icon { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.move__title {
  margin-top: 22px;
  font: italic 900 clamp(3.6rem, 6.2vw, 5.4rem)/0.84 var(--f-display);
  text-transform: uppercase;
}
.move__kicker { font-size: 1.18rem; font-weight: 800; line-height: 1.25; }
.move__text { font-size: 1rem; line-height: 1.55; opacity: 0.92; }

.moves__arrow { position: absolute; top: -50px; width: 104px; color: var(--ink); pointer-events: none; }
.moves__arrow--1 { left: calc(33.33% - 60px); }
.moves__arrow--2 { left: calc(66.66% - 44px); top: -34px; rotate: 8deg; }

/* Index cards taped to the page */
.tiles-wrap { margin-top: clamp(68px, 8vw, 116px); }
.tiles__label { display: inline-flex; align-items: flex-start; gap: 10px; margin: 0 0 26px 6px; color: var(--flare-deep); rotate: -2deg; }
.tiles__label .doodle { width: 50px; margin-top: 10px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 30px); }
.tile {
  position: relative;
  padding: 30px 20px 20px 34px;
  background:
    linear-gradient(90deg, transparent 21px, rgba(255, 74, 43, 0.5) 21px 22.5px, transparent 22.5px),
    repeating-linear-gradient(to bottom, transparent 0 27px, rgba(39, 87, 245, 0.2) 27px 28px),
    #fffdf6;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(17, 38, 77, 0.2), 0 20px 30px -20px rgba(17, 38, 77, 0.55);
  rotate: var(--r, 0deg);
}
.tile::before {
  content: ""; position: absolute; left: 50%; top: -13px;
  width: 88px; height: 26px; translate: -50% 0; rotate: -3deg;
  background: rgba(255, 225, 26, 0.82);
  box-shadow: 0 1px 2px rgba(11, 12, 16, 0.15);
}
.tile--volt::before { background: rgba(39, 87, 245, 0.55); }
.tile__value {
  font: 900 clamp(2.5rem, 3.7vw, 3.4rem)/0.95 var(--f-display);
  color: var(--navy); white-space: nowrap;
}
.tile__value span { margin: 0 0.06em; font-size: 0.8em; }
.tile__value sup { font-size: 0.52em; vertical-align: 0.72em; line-height: 0; }
.tile__value small { margin-left: 0.1em; font-size: 0.46em; letter-spacing: 0.02em; }
.tile__note { margin-top: 10px; font: 700 1.36rem/1.05 var(--f-hand); color: var(--navy); }

/* ---------- Modules ---------- */
.modules { position: relative; padding: calc(var(--section) + 24px) 0 calc(var(--section) + 4vw); background: var(--ink); }
.modules::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--line-d) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line-d) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(60rem 34rem at 0% 0%, #000, transparent 70%);
  mask-image: radial-gradient(60rem 34rem at 0% 0%, #000, transparent 70%);
}
.modules > .container { position: relative; }

.mod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.mod {
  --c: 22px; --edge: var(--line-d);
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  padding: 20px 22px 22px;
  background: var(--edge);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%);
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease), background-color 0.25s, transform 0.3s var(--ease);
}
.mod::before {
  content: ""; position: absolute; inset: 1px; z-index: -1;
  background: var(--ink-2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--c) + 0.6px), calc(100% - var(--c) + 0.6px) 100%, 0 100%);
  transition: background-color 0.25s;
}
.mod:hover { --edge: var(--volt); transform: translateY(-5px); }
.mod.is-picked { --edge: var(--volt); }
.mod.is-picked::before { background: #1b1a0e; }

.mod__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mod__num { font: 700 0.7rem var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute-d); }
.mod__formula {
  padding: 5px 9px; border: 1px solid rgba(255, 225, 26, 0.45);
  font: 500 0.74rem/1 var(--f-mono); color: var(--volt); white-space: nowrap;
}
.mod__fig { height: 132px; margin: 16px -4px 18px; }
.mod__title {
  display: flex; align-items: flex-end; min-height: 1.72em;
  font: italic 900 clamp(2.3rem, 2.9vw, 2.7rem)/0.86 var(--f-display);
  letter-spacing: 0.005em; text-transform: uppercase; color: var(--paper);
  transition: color 0.25s;
}
.mod:hover .mod__title, .mod.is-picked .mod__title { color: var(--volt); }
.mod__desc { min-height: 4.5em; margin-top: 10px; font-size: 0.95rem; line-height: 1.5; color: var(--mute-d); }
.mod__topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 22px; }
.mod__topics li {
  padding: 5px 9px; border: 1px solid var(--line-d); border-radius: 999px;
  font: 500 0.69rem/1.2 var(--f-mono); color: var(--mute-d);
}
.mod__add {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 48px; margin-top: auto; padding: 0 14px 0 16px;
  border: 1px solid rgba(246, 241, 228, 0.3); background: transparent;
  font: 700 0.75rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper);
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.mod__add:hover { color: var(--volt); border-color: var(--volt); }
.mod__add[aria-pressed="true"] { color: var(--ink); background: var(--volt); border-color: var(--volt); }
.mod__add .i { width: 18px; height: 18px; }

/* Module diagrams (line drawings that move) */
.dg {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  color: rgba(246, 241, 228, 0.5);
}
.dg text { fill: currentColor; stroke: none; font: 500 9px var(--f-mono); }
.dg .a { stroke: var(--volt); }
.dg .af { fill: var(--volt); stroke: none; }
.dg .pf { fill: var(--paper); stroke: none; }
.dg .ff { fill: var(--flare); stroke: none; }
.dg-dash { stroke-dasharray: 3 5; }
.dg-faint { opacity: 0.55; }
.dg-tick { stroke-linecap: butt; }

.dg-jaw { animation: dg-jaw 5s var(--sine) infinite; }
.dg-read { animation: dg-read 5s linear infinite; }
.dg-px { animation: dg-px 2.8s linear infinite; }
.dg-py { animation: dg-py 2.8s linear infinite; }
.dg-wave { animation: dg-wave 2s linear infinite; }
.dg-bob { animation: dg-bob 1s var(--sine) infinite alternate; }
.dg-piston { animation: dg-piston 3.4s var(--sine) infinite alternate; }
.dg-mercury { fill: var(--flare); stroke: none; transform-box: fill-box; transform-origin: 50% 100%; animation: dg-mercury 3.4s var(--sine) infinite alternate; }
.tx { animation: dg-tx var(--t, 2s) linear infinite alternate; }
.ty { animation: dg-ty var(--t, 2s) linear infinite alternate; }
.dg-orbit { transform-origin: 120px 65px; animation: spin 7s linear infinite; }
.dg-glow { fill: var(--volt); stroke: none; animation: dg-glow 1.6s ease-in-out infinite alternate; }
.dg-flow { stroke: var(--volt); stroke-width: 3.2; stroke-dasharray: 0.1 17.9; animation: dg-flow 1.1s linear infinite; }
.sig-a { animation: sig-a 4.8s step-end infinite; }
.sig-b { animation: sig-b 4.8s step-end infinite; }
.sig-q { animation: sig-q 4.8s step-end infinite; }
.ex { animation: dg-ex var(--t, 2s) var(--sine) infinite alternate; }
.ey { animation: dg-ey var(--t, 2s) var(--sine) infinite alternate; animation-delay: calc(var(--t, 2s) / -2); }

/* Only run the diagrams while the grid is on screen */
.js .mod-grid:not(.is-live) .dg * { animation-play-state: paused; }

@keyframes dg-jaw { 0%, 8% { transform: translateX(64px); } 38%, 78% { transform: none; } 100% { transform: translateX(64px); } }
@keyframes dg-read { 0%, 36% { opacity: 0; } 42%, 76% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes dg-px { 0% { transform: none; } 80%, 100% { transform: translateX(180px); } }
@keyframes dg-py {
  0% { transform: none; animation-timing-function: cubic-bezier(0.33, 0.67, 0.67, 1); }
  40% { transform: translateY(-87px); animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0.33); }
  80%, 100% { transform: none; }
}
@keyframes dg-wave { to { transform: translateX(-80px); } }
@keyframes dg-bob { to { transform: translateY(52px); } }
@keyframes dg-piston { to { transform: translateY(11px); } }
@keyframes dg-mercury { from { transform: scaleY(0.38); } to { transform: scaleY(1); } }
@keyframes dg-tx { to { transform: translateX(var(--dx)); } }
@keyframes dg-ty { to { transform: translateY(var(--dy)); } }
@keyframes dg-glow { from { opacity: 0.1; } to { opacity: 0.42; } }
@keyframes dg-flow { to { stroke-dashoffset: -18; } }
@keyframes sig-a { 0% { opacity: 0; } 25% { opacity: 1; } 50% { opacity: 0; } 75% { opacity: 1; } }
@keyframes sig-b { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes sig-q { 0% { opacity: 0; } 75% { opacity: 1; } }
@keyframes dg-ex { from { transform: translateX(-68px); } to { transform: translateX(68px); } }
@keyframes dg-ey { from { transform: translateY(-24px); } to { transform: translateY(24px); } }

/* "Take all eight" banner */
.allin {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  margin-top: 20px; padding: clamp(22px, 3vw, 34px) clamp(22px, 3.4vw, 44px);
  background: var(--volt); color: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
  --focus: var(--ink);
}
.allin__title { font: italic 900 clamp(2.8rem, 5vw, 4.4rem)/0.85 var(--f-display); text-transform: uppercase; }
.allin p { margin-top: 8px; max-width: 46ch; font-weight: 600; }
.allin .btn { margin-right: 14px; }

/* ---------- Picked-modules tray ---------- */
.tray {
  position: fixed; left: 50%; bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 28px); padding: 8px 8px 8px 9px;
  background: var(--paper); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 999px;
  box-shadow: 5px 5px 0 var(--volt), 5px 5px 0 2.5px var(--ink), 0 26px 50px -14px rgba(0, 0, 0, 0.6);
  translate: -50% 170%; visibility: hidden;
  transition: translate 0.45s var(--ease), visibility 0s 0.45s;
  --focus: var(--cobalt);
}
.tray.is-on { translate: -50% 0; visibility: visible; transition: translate 0.45s var(--ease), visibility 0s; }
.tray__count {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--volt);
  font: 900 1.55rem/1 var(--f-display);
}
.tray__text { display: grid; min-width: 0; line-height: 1.2; }
.tray__text b { font-size: 0.92rem; font-weight: 800; white-space: nowrap; }
.tray__text span {
  max-width: 30ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 0.8rem; color: rgba(11, 12, 16, 0.68);
}
.tray__go {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 800 0.76rem var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  transition: background-color 0.2s;
}
.tray__go:hover { background: var(--cobalt); }
.tray__clear {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink);
}
.tray__clear:hover { background: rgba(11, 12, 16, 0.1); }

/* ---------- Quiz ---------- */
.quiz {
  position: relative; z-index: 1;
  margin-top: -4vw; padding: calc(var(--section) + 4vw) 0 calc(var(--section) + 18px);
  color: var(--white);
  background-color: var(--cobalt);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
  clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
  --focus: var(--volt);
}
.quiz__inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: clamp(36px, 6vw, 96px);
}
.quiz .eyebrow { color: var(--volt); }
.quiz__head .display { margin-top: 18px; font-size: clamp(3.6rem, 8vw, 7rem); }
.quiz__lead { margin-top: 22px; max-width: 30rem; font-size: 1.14rem; color: rgba(255, 255, 255, 0.88); }
.quiz__hand { display: inline-grid; gap: 2px; margin-top: 26px; color: var(--volt); rotate: -3deg; }
.quiz__hand .doodle { width: 100%; }

.quiz__card {
  position: relative; min-height: 430px;
  padding: clamp(22px, 3vw, 40px);
  background: var(--paper); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 28px;
  box-shadow: 12px 12px 0 var(--ink);
  --focus: var(--cobalt);
}
.quiz__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px;
  font: 700 0.74rem var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.quiz__dots { display: flex; gap: 6px; }
.quiz__dots i { width: 28px; height: 6px; border-radius: 3px; background: rgba(11, 12, 16, 0.16); }
.quiz__dots i.is-on { background: var(--ink); }
.quiz__dots i.is-right { background: var(--cobalt); }
.quiz__dots i.is-wrong { background: var(--flare); }
.quiz__q {
  margin-bottom: 22px; outline: none;
  font: 800 clamp(1.22rem, 1.9vw, 1.56rem)/1.3 var(--f-body); letter-spacing: -0.01em;
}
.opts { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 13px 16px; text-align: left;
  background: var(--white); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 600; font-size: 1.02rem; line-height: 1.35; color: var(--ink);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s;
}
.opt:not([aria-disabled="true"]):hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.opt[aria-disabled="true"] { cursor: default; box-shadow: 2px 2px 0 var(--ink); }
.opt__key {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--ink); color: var(--volt);
  font: 700 0.82rem var(--f-mono);
}
.opt.is-right { background: var(--volt); }
.opt.is-wrong { background: #ffd8cf; }
.opt.is-dim { opacity: 0.55; }

.quiz__why { margin-top: 22px; padding-top: 18px; border-top: 2px dashed rgba(11, 12, 16, 0.28); }
.quiz__why:empty { display: none; }
.quiz__verdict { font: 700 1.9rem/1 var(--f-hand); color: var(--cobalt); }
.quiz__verdict.is-wrong { color: var(--flare-deep); }
.quiz__why p + p { margin-top: 8px; }
.quiz__next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; }
.quiz__tag { font: 700 0.72rem var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(11, 12, 16, 0.6); }

.quiz__result { display: grid; align-content: center; justify-items: start; gap: 14px; min-height: 350px; }
.quiz__score { font: italic 900 clamp(6rem, 12vw, 9rem)/0.8 var(--f-display); color: var(--cobalt); }
.quiz__result .quiz__q { margin: 0; }
.quiz__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 10px; }

/* ---------- Teacher ---------- */
.teacher { position: relative; z-index: 2; padding: var(--section) 0 calc(var(--section) + 14px); }
.teacher::before {
  content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px;
  background: radial-gradient(circle at 18px 18px, var(--paper) 17.5px, transparent 18px) 0 0 / 36px 18px repeat-x;
}
.teacher__inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: clamp(48px, 7vw, 112px);
}

.portrait { position: relative; justify-self: center; width: min(100%, 390px); }
.portrait__frame {
  aspect-ratio: 4 / 5; overflow: hidden;
  border: 2.5px solid var(--ink); border-radius: 28px;
  background: var(--navy) url("../img/portrait-bg.svg") center / cover no-repeat;
  box-shadow: 14px 14px 0 var(--volt), 14px 14px 0 2.5px var(--ink);
  rotate: -2.5deg;
}
.portrait__frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: center bottom;
  /* Die-cut sticker edge around the cutout; also keeps the dark suit readable on the navy */
  filter:
    drop-shadow(2.5px 0 0 var(--paper)) drop-shadow(-2.5px 0 0 var(--paper))
    drop-shadow(0 2.5px 0 var(--paper)) drop-shadow(0 -2.5px 0 var(--paper));
}
.portrait__plate {
  position: absolute; left: -20px; bottom: 30px;
  display: grid; gap: 4px;
  padding: 13px 26px 13px 16px;
  background: var(--ink); color: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  rotate: 2deg;
}
.portrait__plate strong { font: italic 900 2rem/0.9 var(--f-display); letter-spacing: 0.01em; text-transform: uppercase; }
.portrait__plate span { font: 700 0.66rem var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--volt); }
.portrait__burst { position: absolute; right: -54px; top: -50px; z-index: 2; width: 118px; color: var(--flare); }
.portrait__spring { position: absolute; left: -58px; top: 20%; width: 40px; color: var(--cobalt); }

.teacher__copy .display { margin: 18px 0 30px; font-size: clamp(3.4rem, 7.4vw, 6.6rem); }
.teacher__statement {
  font: 800 clamp(1.5rem, 2.5vw, 2.3rem)/1.22 var(--f-body);
  letter-spacing: -0.018em; color: var(--navy);
}
.teacher__text { margin-top: 22px; max-width: 38rem; font-size: 1.1rem; color: var(--mute-p); }
.creed { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-top: 32px; }
.creed li {
  padding: 10px 18px;
  background: var(--white); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800; rotate: var(--r, 0deg);
}
.creed li:nth-child(2) { background: var(--volt); }
.creed li:nth-child(3) { background: var(--flare); }

/* ---------- Register ---------- */
.register {
  position: relative; z-index: 2;
  padding: calc(var(--section) + 14px) 0;
  background: var(--volt); color: var(--ink);
  --focus: var(--ink); --surface: var(--volt);
}
.register::before, .register::after {
  content: ""; position: absolute; left: 0; right: 0; height: 14px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 14px, transparent 14px 28px);
}
.register::before { top: 0; }
.register::after { bottom: 0; }
.register__inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start; gap: clamp(36px, 6vw, 96px);
}
.register__copy { position: sticky; top: 116px; }
.register__copy .display { margin-top: 18px; }
.register__lead { margin-top: 22px; max-width: 26rem; font-size: 1.16rem; font-weight: 600; }

.steps { margin-top: 34px; border-top: 2.5px solid var(--ink); }
.steps li { display: flex; align-items: baseline; gap: 18px; padding: 15px 0; border-bottom: 2.5px solid var(--ink); }
.steps__num { flex: none; min-width: 44px; font: italic 900 2.5rem/0.8 var(--f-display); }
.steps h3 { font-size: 1.14rem; font-weight: 800; line-height: 1.25; }
.steps p { font-size: 0.98rem; color: rgba(11, 12, 16, 0.76); }

.register__card {
  padding: clamp(20px, 3vw, 40px);
  background: var(--paper); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 28px;
  box-shadow: 12px 12px 0 var(--ink);
  --focus: var(--cobalt); --surface: var(--paper);
}
.form { display: grid; gap: 30px; }
.form__group legend {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  font: italic 900 2.1rem/1 var(--f-display); text-transform: uppercase;
}
.form__step {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px;
  background: var(--ink); color: var(--volt);
  font: 700 0.9rem var(--f-mono);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}
.form__between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field--wide { grid-column: 1 / -1; }
.field--check { margin-top: 18px; }

/* Module picker chips */
.picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick { position: relative; display: block; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pick__box {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 12px;
  background: var(--white); border: 2px solid var(--ink); border-radius: 12px;
  font-weight: 700; font-size: 0.94rem; line-height: 1.2;
  transition: background-color 0.15s, box-shadow 0.15s var(--ease), translate 0.15s var(--ease);
}
.pick__num { flex: none; padding: 4px 6px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 700 0.7rem/1 var(--f-mono); }
.pick__tick { flex: none; width: 18px; height: 18px; margin-left: auto; opacity: 0; }
.pick:hover .pick__box { box-shadow: 3px 3px 0 var(--ink); translate: -1px -1px; }
.pick input:checked + .pick__box { background: var(--volt); box-shadow: 3px 3px 0 var(--ink); translate: -1px -1px; }
.pick input:checked + .pick__box .pick__tick { opacity: 1; }
.pick input:focus-visible + .pick__box { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Fields */
.field > label:not(.check) {
  display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px;
  font-size: 0.76rem; font-weight: 700; line-height: 1.3; letter-spacing: 0.07em; text-transform: uppercase;
}
.field > label:not(.check) span { font-weight: 600; color: rgba(11, 12, 16, 0.58); }
.input {
  display: block; width: 100%; padding: 12px 14px;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 12px; outline: none;
  font: 500 1rem/1.4 var(--f-body);
  transition: box-shadow 0.15s var(--ease);
}
.input:focus-visible { box-shadow: 4px 4px 0 var(--cobalt); }
textarea.input { min-height: 96px; resize: vertical; }
.is-invalid .input { border-color: var(--flare-deep); box-shadow: 4px 4px 0 var(--flare); }
.field__error { margin-top: 6px; font-size: 0.86rem; font-weight: 700; color: var(--flare-deep); }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: 600; line-height: 1.4; }
.check input { position: absolute; width: 26px; height: 26px; margin: 0; opacity: 0; }
.check__box {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px;
  background: var(--white); border: 2px solid var(--ink); border-radius: 8px; color: transparent;
}
.check__box .i { width: 16px; height: 16px; }
.check input:checked + .check__box { background: var(--ink); color: var(--volt); }
.check input:focus-visible + .check__box { outline: 3px solid var(--focus); outline-offset: 2px; }
.is-invalid .check__box { border-color: var(--flare-deep); box-shadow: 3px 3px 0 var(--flare); }

.form__status { font-size: 0.95rem; font-weight: 700; color: var(--flare-deep); }
.form__status:empty { display: none; }

/* Confirmation */
.done { display: grid; justify-items: start; gap: 16px; outline: none; }
.done__stamp {
  padding: 7px 14px; border: 2.5px solid var(--cobalt); border-radius: 8px;
  font: 700 0.8rem var(--f-mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--cobalt);
  rotate: -4deg;
}
.done .display { font-size: clamp(3rem, 6vw, 5rem); }
.done__mods { display: flex; flex-wrap: wrap; gap: 8px; }
.done__mods li { padding: 6px 12px; background: var(--volt); border: 2px solid var(--ink); border-radius: 999px; font-size: 0.9rem; font-weight: 700; }
.done__preview { padding: 14px 16px; background: var(--white); border: 2px dashed var(--ink); border-radius: 12px; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq { position: relative; padding: var(--section) 0 calc(var(--section) + 24px); }
.faq__inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start; gap: clamp(32px, 6vw, 96px);
}
.faq__head { position: sticky; top: 116px; }
.faq__head .display { margin-top: 18px; }
.faq__hand { margin-top: 20px; color: var(--flare-deep); rotate: -2deg; }

.qa { border-bottom: 2.5px solid var(--ink); }
.qa:first-child { border-top: 2.5px solid var(--ink); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px; cursor: pointer; list-style: none;
  font: 800 clamp(1.1rem, 1.6vw, 1.32rem)/1.3 var(--f-body); color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa__icon {
  position: relative; flex: none; width: 36px; height: 36px;
  background: var(--white); border: 2.5px solid var(--ink); border-radius: 50%;
  transition: background-color 0.2s, rotate 0.35s var(--ease);
}
.qa__icon::before, .qa__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 2.5px; background: var(--ink); translate: -50% -50%;
}
.qa__icon::after { rotate: 90deg; transition: rotate 0.35s var(--ease); }
.qa[open] .qa__icon { background: var(--volt); rotate: 180deg; }
.qa[open] .qa__icon::after { rotate: 0deg; }
.qa__body { max-width: 40rem; padding: 0 56px 24px 4px; color: var(--mute-p); }

/* ---------- Footer ---------- */
.footer { position: relative; padding: calc(var(--section) + 16px) 0 26px; overflow: clip; }
.footer .tear { transform: scaleX(-1); }
.footer__cta {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px;
  padding-bottom: clamp(48px, 7vw, 92px); border-bottom: 1px solid var(--line-d);
}
.footer__shout {
  font: italic 900 clamp(5.4rem, 16vw, 15rem)/0.76 var(--f-display);
  letter-spacing: -0.008em; text-transform: uppercase; color: var(--volt);
}
.footer__shout i { font-style: inherit; color: var(--flare); }
.footer__cta-side { display: grid; flex: 0 1 290px; justify-items: start; gap: 22px; padding-bottom: 12px; }
.footer__cta-side p { font-size: 1.16rem; font-weight: 600; line-height: 1.4; }

.footer__grid {
  display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px 32px; padding: clamp(40px, 6vw, 72px) 0;
}
.footer__brand p { margin-top: 16px; max-width: 36ch; color: var(--mute-d); }
.footer__brand strong { display: block; margin-bottom: 4px; font-weight: 700; color: var(--paper); }
.footer__col h3 { margin-bottom: 14px; font: 700 0.74rem var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--volt); }
.footer__col li + li { margin-top: 8px; }
.footer__col a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--volt); }
.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 22px; border-top: 1px solid var(--line-d);
  font-size: 0.88rem; color: var(--mute-d);
}
.footer__base a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.footer__base a:hover { color: var(--volt); }
.footer__up { rotate: -90deg; }

/* ---------- Motion ---------- */
@keyframes pulse { 50% { opacity: 0.25; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes swing { 0%, 100% { transform: rotate(22deg); } 50% { transform: rotate(-22deg); } }
@keyframes tape { to { transform: translateX(-50%); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; translate: 0 34px; } }

.badge__ring { transform-origin: 50% 50%; }

/* Hero entrance: plain CSS, so it never depends on scripts */
.hero .eyebrow, .hero__title span, .hero__lead, .hero__actions, .hero__note, .bench { animation: rise 0.9s var(--ease) both; }
.hero__title span:nth-child(1) { animation-delay: 0.06s; }
.hero__title span:nth-child(2) { animation-delay: 0.14s; }
.hero__title span:nth-child(3) { animation-delay: 0.22s; }
.hero__title span:nth-child(4) { animation-delay: 0.3s; }
.hero__lead { animation-delay: 0.42s; }
.hero__actions { animation-delay: 0.5s; }
.hero__note { animation-delay: 0.58s; }
.bench { animation-delay: 0.34s; }

/* Scroll reveal: only armed once main.js has run */
.js [data-reveal] {
  opacity: 0; translate: 0 30px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }
/* Cards that also move on hover keep their own hover transitions alongside the reveal */
.js .move[data-reveal] {
  transition: opacity 0.7s var(--ease) var(--d, 0s), translate 0.7s var(--ease) var(--d, 0s),
    transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.js .mod[data-reveal] {
  transition: opacity 0.7s var(--ease) var(--d, 0s), translate 0.7s var(--ease) var(--d, 0s),
    background-color 0.25s, transform 0.3s var(--ease);
}
.menu-open .tray { visibility: hidden; }

.js [data-reveal] .hl, .js [data-reveal].hl { background-size: 0% 48%; transition: background-size 0.9s var(--ease) 0.35s; }
.js [data-reveal].is-in .hl { background-size: 100% 48%; }
.js [data-reveal] .doodle path, .js .doodle[data-reveal] path { stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s ease 0.45s; }
.js [data-reveal].is-in .doodle path, .js .doodle[data-reveal].is-in path { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; translate: none; }
  .js [data-reveal] .hl { background-size: 100% 48%; }
  .js [data-reveal] .doodle path { stroke-dashoffset: 0; }
}

/* ---------- Responsive ---------- */
/* Desktop hero: the headline and top padding shrink with window height, so the buttons stay above the fold */
@media (min-width: 1000px) {
  .hero { padding-top: calc(var(--nav-h) + clamp(30px, 25vh - 160px, 76px)); }
  .hero__title { font-size: clamp(4.9rem, min(10.6vw, 24.7vh - 79px), 9.5rem); }
  .hero__lead { max-width: 38rem; }
}

@media (max-width: 1239px) {
  .portrait__spring { left: -38px; width: 30px; }
  .mod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod__fig { height: 150px; }
  .mod__title { min-height: 0; font-size: clamp(2.5rem, 5.4vw, 3.2rem); }
  .mod__desc { min-height: 0; }
}

@media (max-width: 999px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }

  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 92px; }
  .bench { margin-inline: 4px 14px; }
  .badge { left: -10px; bottom: -46px; width: 104px; height: 104px; }
  .bench__foot { padding-left: 104px; }

  .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .section-head__lead { max-width: 34rem; }

  .moves { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .move--flare { margin-top: 0; }
  .moves__arrow { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }

  .quiz__inner, .teacher__inner, .register__inner, .faq__inner { grid-template-columns: minmax(0, 1fr); }
  .register__copy, .faq__head { position: static; }
  .teacher__inner { gap: 72px; }
  .portrait { width: min(78%, 360px); }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 719px) {
  body { font-size: 1rem; }
  .mod-grid { grid-template-columns: minmax(0, 1fr); }
  .form__grid, .picker { grid-template-columns: minmax(0, 1fr); }
  .allin .btn { width: 100%; margin-right: 0; }
  .bench__note { right: 4%; font-size: 1.45rem; }
  .bench__count { display: none; }
  .hero__title .is-outline { -webkit-text-stroke-width: 4px; }
  .bench__top { padding-left: 30px; }
  .portrait__burst { right: -30px; width: 92px; }
  .portrait__spring { left: -40px; width: 32px; }
  .portrait__plate { left: -12px; }
  .qa__body { padding-right: 8px; }
  .tray { gap: 8px; }
  .tray__text span { display: none; }
}

@media (max-width: 479px) {
  .tiles { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .promo { font-size: 0.8rem; }
}

/* Short laptop screens: keep the hero buttons above the fold */
@media (min-width: 1000px) and (max-height: 760px) {
  .hero__title { margin: 14px 0 18px; font-size: clamp(4.6rem, min(10.6vw, 14vh), 9.5rem); }
  .hero__actions { margin-top: 22px; }
}
