/* ===========================================================
   TruMath Canada — Design System
   Concept: "The Graded Paper" — a teacher's red-pen marks on
   a test, rendered as the site's signature motif. Numbers
   (years, ranks, prices, course codes) get a monospace,
   stamped treatment; key proof points get hand-drawn coral
   circles/underlines, like marks on a returned exam.
   =========================================================== */

/* Fonts are loaded with <link> tags in each page's <head>, not @import.
   An @import here forces a serial chain (HTML -> style.css -> Google CSS ->
   font files) which delays first paint; the <link> version starts the font
   request in parallel with this stylesheet. */

:root {
  /* Color tokens */
  --ink: #14213D;
  --ink-70: #14213Db3;
  --paper: #FAF3E7;
  --paper-dim: #F0E7D6;
  --white: #FFFDF9;
  --cobalt: #3452E1;
  --cobalt-dark: #2138A8;
  --amber: #FFB020;
  --coral: #FF5A46;
  --mint: #1FAE7A;
  --line: #E4D8C2;

  /* Type */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --max: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--coral);
  display: inline-block;
}

.stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

p.lead { font-size: 19px; color: var(--ink-70); max-width: 54ch; }

/* Reduced motion respected everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;   /* "Start Free Week" must stay on one line */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: var(--white); box-shadow: 0 6px 0 #C2402F; }
.btn-primary:hover { box-shadow: 0 8px 0 #C2402F; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 3px 0 #C2402F; }
.btn-dark { background: var(--ink); color: var(--paper); box-shadow: 0 6px 0 #060D1F; }
.btn-dark:active { transform: translateY(2px); box-shadow: 0 3px 0 #060D1F; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
/* Three zones: brand (left) | links (centre) | CTAs (right).
   .nav-links takes flex:1 so it owns the whole middle band and centres
   inside it — without that the links are just a clump floating in the
   leftover space, which reads as one continuous strip. */
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; flex-shrink: 0; white-space: nowrap; }
.brand .mark { width: 42px; height: 42px; flex-shrink: 0; object-fit: contain; }
.nav-links { display: flex; flex: 1; align-items: center; justify-content: center; gap: 30px; font-weight: 600; font-size: 15px; }
.nav-links a { position: relative; padding: 4px 0; white-space: nowrap; }
.nav-links a:hover { color: var(--cobalt); }
.nav-cta { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.nav-toggle { display: none; }
/* Login lives in the .nav-cta bar on desktop. That bar's ghost button is
   hidden on phones (no room), so this duplicate rides inside the slide-in
   menu instead — otherwise a signed-up student on a phone has no way in.
   Hidden at desktop widths so nothing changes there. */
.nav-links .nav-login-m { display: none; }

/* Between the mobile breakpoint and ~1080px all six links plus both
   buttons are still on one row, so tighten the middle band rather than
   let the three zones run together. */
@media (min-width: 881px) and (max-width: 1080px) {
  .site-nav .wrap { gap: 24px; }
  .nav-links { gap: 18px; font-size: 14px; }
}

@media (max-width: 880px) {
  /* justify-content resets to flex-start: centring is for the desktop
     middle band only, and would otherwise centre this full-height panel. */
  .nav-links { position: fixed; inset: 68px 0 0 0; background: var(--paper); flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: 30px 28px; gap: 22px; font-size: 18px; transform: translateX(100%); transition: transform 0.25s ease; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: block; background: none; border: 2px solid var(--ink); border-radius: 8px; width: 42px; height: 38px; cursor: pointer; }
  .nav-cta .btn-ghost { display: none; }
  /* ...and the in-menu Login takes over, styled to stand apart from the
     plain nav links so it reads as an account action. */
  .nav-links .nav-login-m { display: inline-flex; margin-top: 6px; padding: 11px 22px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 16px; }
}

/* ---------- Dropdowns (nav Courses + course-page Enrol) ----------
   One pattern for both: a .dd wrapper, a .dd-btn that toggles aria-expanded,
   and a .dd-menu revealed by .dd.open. Driven by JS click rather than :hover
   so it works on touch; hover only pre-opens on real pointer devices. */
.dd { position: relative; display: inline-flex; }
.dd-menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 200;
  min-width: 236px; padding: 8px; background: var(--white);
  border: 2px solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: 5px 5px 0 var(--ink);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s; }
.dd.open > .dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-menu a { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px;
  border-radius: 7px; }
.dd-menu a:hover, .dd-menu a:focus-visible { background: var(--paper-dim); outline: none; }
.dd-caret { transition: transform .15s ease; flex-shrink: 0; }
.dd.open .dd-caret { transform: rotate(180deg); }

/* nav "Courses" */
.nav-links .dd-btn { display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; color: inherit; }
.nav-links .dd-btn:hover { color: var(--cobalt); }
.nav-links .dd-btn:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.nd-code { font-family: var(--font-mono); font-weight: 700; font-size: 14.5px; color: var(--cobalt); }
.nd-g { font-size: 12px; color: var(--ink-70); }
.dd-menu .nd-all { border-top: 2px dashed var(--line); margin-top: 6px; padding-top: 11px;
  font-weight: 700; font-size: 13.5px; color: var(--coral); }

/* course-page "Enrol" */
.enroll-menu { min-width: 262px; }
.em-price { font-family: var(--font-mono); font-weight: 700; font-size: 19px; color: var(--ink); }
.em-price span { font-size: 13px; font-weight: 500; color: var(--ink-70); }
.em-note { font-size: 12.5px; color: var(--ink-70); }

@media (max-width: 880px) {
  /* In the slide-in menu the dropdown expands in flow instead of floating. */
  .nav-links .dd { display: block; width: 100%; }
  .nav-links .dd-btn { font-size: 18px; }
  .nav-links .dd-menu { position: static; box-shadow: none; border: 0; padding: 6px 0 0 14px;
    min-width: 0; opacity: 1; visibility: hidden; transform: none; height: 0; overflow: hidden; }
  .nav-links .dd.open > .dd-menu { visibility: visible; height: auto; }
}
@media (max-width: 560px) {
  .dd-menu { left: auto; right: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
/* Without this the hero stayed two columns at every width, squeezing the
   headline and the stat card into ~180px each on a phone. */
@media (max-width: 880px) {
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  /* The card is decorative tilt on desktop; straighten it once it is
     full-width so it does not crowd the section edges. */
  .hero-grid .paper-card { transform: rotate(1deg); }
}
.hero h1 { font-size: clamp(38px, 5vw, 62px); }
.hero .annotate { position: relative; white-space: nowrap; display: inline-block; }
.hero .annotate svg { position: absolute; left: -2%; bottom: -6px; top: auto; width: 104%; height: 22px; pointer-events: none; }
.hero-sub { margin-top: 22px; }
.ontario-highlight {
  color: var(--ink);
  background: linear-gradient(transparent 38%, rgba(255, 176, 32, 0.40) 38%);
  border-radius: 4px;
  padding: 0 0.12em;
  margin: 0 -0.04em;
  font-weight: 800;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-trust { margin-top: 30px; display: flex; gap: 26px; flex-wrap: wrap; font-size: 14px; color: var(--ink-70); font-weight: 600;}
.hero-trust span { display: flex; align-items: center; gap: 8px; }
.hero-trust .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

.paper-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(2deg);
}
.paper-card .stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  background: var(--amber);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 6px;
  transform: rotate(-4deg);
  margin-bottom: 14px;
}
.paper-card .big-stat { font-size: 54px; color: var(--coral); line-height: 1; }
.paper-card .big-stat-label { font-family: var(--font-body); font-weight: 700; font-size: 15px; margin-top: 6px; }
.paper-card .divider { height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); margin: 18px 0; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-stats .n { font-family: var(--font-mono); font-weight: 700; font-size: 22px; color: var(--ink); }
.mini-stats .l { font-size: 12.5px; color: var(--ink-70); font-weight: 600; }
.mini-stats .span-2 { grid-column: 1 / -1; }
/* The rank list is long enough to wrap inside the card, so it gets a smaller
   size and real line-height rather than the single-figure treatment. Coral
   picks out that these are ranks, not a generic stat. */
.mini-stats .n.ranks { font-size: 15px; line-height: 1.4; color: var(--coral); letter-spacing: -0.01em; }

/* ---------- Hero "try one" widget ----------
   The site's central claim is that the student solves inside the lesson
   rather than watching. This demonstrates that in the first screen instead
   of asserting it. All three questions live in the DOM as real text, so
   they still index; JS only wires up the interaction. */
.try-card { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: 8px 8px 0 var(--cobalt); transform: rotate(-1.5deg); margin-bottom: 30px; }
.try-card .stamp { display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  letter-spacing: .06em; background: var(--cobalt); color: var(--white); padding: 4px 10px;
  border-radius: 6px; transform: rotate(2deg); margin-bottom: 14px; }
.try-q { display: none; }
.try-q.on { display: block; }
.try-grade { font-family: var(--font-mono); font-size: 12px; color: var(--ink-70); margin: 0 0 6px; }
.try-stem { font-size: 17px; font-weight: 700; line-height: 1.45; margin: 0 0 14px; }
.try-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.try-opt { font-family: var(--font-mono); font-size: 14.5px; font-weight: 700; text-align: left; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-sm);
  padding: 11px 13px; cursor: pointer; opacity: 1;
  transition: transform .12s ease, background .12s ease; }
.try-opt:hover:not(:disabled) { transform: translateY(-2px); background: var(--paper-dim); }
.try-opt:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.try-opt:disabled { cursor: default; }
.try-opt.right { background: var(--mint); color: var(--white); }
.try-opt.wrong { background: var(--coral); color: var(--white); }
.try-why { font-size: 13.5px; line-height: 1.55; color: var(--ink-70); margin: 14px 0 0;
  padding-top: 12px; border-top: 2px dashed var(--line); display: none; }
.try-q.answered .try-why { display: block; }
.try-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; flex-wrap: wrap; }
.try-status { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; }
.try-next { background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 13.5px; color: var(--coral); }
.try-next:hover { color: var(--cobalt); }
.try-next:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
@media (max-width: 880px) { .try-card { transform: rotate(-1deg); } }
@media (max-width: 480px) { .try-opts { grid-template-columns: 1fr; } }

/* ---------- Press strip ---------- */
.press-strip { padding: 30px 0 10px; }
.press-label { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-70); text-align: center; margin: 0 0 18px; }
.press-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 34px; }
.press-logos span, .press-logos a { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--ink); opacity: 0.55; transition: opacity 0.2s ease; letter-spacing: -0.01em; }
.press-logos a:hover { opacity: 1; color: var(--cobalt); }
/* auto-fit rather than a fixed 3: the press list changes as coverage is
   added or retired, and a fixed count strands the last card on its own row. */
.press-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; margin-top: 34px; }
.press-card { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 20px 22px; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.press-card:hover { transform: translateY(-3px); box-shadow: 5px 5px 0 var(--ink); }
.press-card .outlet { font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cobalt); }
.press-card .headline { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.press-card .read { font-size: 13px; font-weight: 700; color: var(--coral); margin-top: auto; }
@media (max-width: 560px) { .press-cards { grid-template-columns: 1fr; } .press-logos span, .press-logos a { font-size: 18px; } .press-logos { gap: 12px 22px; } }

.hl {
  background: linear-gradient(to bottom, transparent 62%, var(--amber) 62%);
  padding: 0 2px;
  font-weight: 700;
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 12px; }
.notch { border-top: 2px dashed var(--line); }

/* ---------- Why / feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.feature-card { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); padding: 26px; }
.feature-card .icon { width: 44px; height: 44px; margin-bottom: 18px; }
.feature-card h3 { font-size: 19px; margin-bottom: 10px; }
.feature-card p { font-size: 14.5px; color: var(--ink-70); margin: 0; }
.old-vs-new { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
.compare-card { border-radius: var(--radius); padding: 28px; border: 2px solid var(--ink); }
.compare-card.old { background: var(--paper-dim); }
.compare-card.new { background: var(--ink); color: var(--paper); }
.compare-card h3, .compare-card h4 { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.compare-card ul { padding-left: 0; list-style: none; margin: 0; }
.compare-card li { padding: 9px 0; border-top: 1px solid rgba(0,0,0,0.08); font-size: 15px; }
.compare-card.new li { border-top-color: rgba(255,255,255,0.15); }

/* Label/value rows. Both columns carry the same five labels in the same
   order, so the rows read across as a spec sheet — and each column still
   stands on its own once they stack on mobile. */
.spec { margin: 4px 0 0; }
.spec > div { padding: 12px 0; border-top: 1px solid rgba(20,33,61,0.12); }
.compare-card.new .spec > div { border-top-color: rgba(255,255,255,0.16); }
.spec dt { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-70); margin-bottom: 5px; }
.compare-card.new .spec dt { color: rgba(250,243,231,0.6); }
.spec dd { margin: 0; font-size: 15px; line-height: 1.55; }
/* Cost is the last spec row, set exactly like every other row rather than as
   a headline number — the substance rows above are what carry the comparison.
   Only the figures themselves are picked out, and only on our own card. */
.spec .fig { font-family: var(--font-mono); font-weight: 700; }
.compare-card.new .spec .fig { color: var(--amber); }
/* "unlimited classes" is the claim, so it stays full-strength paper white —
   amber is reserved for the figures, or the row ends up all highlight. */
.compare-card.new .spec dd strong { color: var(--paper); font-weight: 700; }
.spec > div:last-child { border-bottom: 1px solid rgba(20,33,61,0.12); }
.compare-card.new .spec > div:last-child { border-bottom-color: rgba(255,255,255,0.16); }

/* Closing line under the two columns — the one place the comparison is stated
   outright, so it is set as a sentence, not another price block. */
.compare-bottom { margin: 26px auto 0; max-width: 660px; text-align: center; font-size: 17px; line-height: 1.65; color: var(--ink); font-family: var(--font-display); }

@media (max-width: 1040px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 880px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .old-vs-new { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- Courses ---------- */
/* auto-fit rather than a fixed count: five courses fit one row at full width
   and reflow to 4/3/2 as it narrows, so adding a course needs no CSS change. */
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 20px; }
.course-card { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.course-card:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ink); }
.course-card .top { background: var(--cobalt); color: var(--white); padding: 20px 22px; }
/* Reserve two lines for the grade label so every blue header is the same
   height, whether the label wraps ("Grade 12 · Advanced Fn.") or not
   ("MTH1W"). Without this the headers end up ragged across the row. */
.course-card .top .grade { font-family: var(--font-mono); font-size: 13px; opacity: 0.85; line-height: 1.35; min-height: 2.7em; }
.course-card .top .code { font-family: var(--font-mono); font-size: 26px; font-weight: 700; margin-top: 4px; }
.course-card .body { padding: 20px 22px 24px; }
.course-card .body p { font-size: 14.5px; color: var(--ink-70); min-height: 60px; }
.course-card .body a { font-weight: 700; font-size: 14.5px; color: var(--coral); display: inline-flex; align-items: center; gap: 6px; }
/* Flex column instead of the old min-height guess, so "View course" lines up
   along the bottom of every card whatever the blurb length. */
.course-card { display: flex; flex-direction: column; }
.course-card .body { display: flex; flex-direction: column; flex: 1; }
.course-card .body p { flex: 1; min-height: 0; }
@media (max-width: 560px) { .course-grid { grid-template-columns: 1fr; } }

/* ---------- Curriculum road (course pages) ----------
   "What's Covered" is a route, not a set. The units become waypoints on a
   road that weaves down the section, with a car that drives it as you
   scroll. The path is generated in JS from where the nodes actually land,
   so it stays correct at any width and after webfonts reflow the layout.

   Geometry: the node offset is a PERCENTAGE (68%/32% of the content width)
   rather than a fixed pixel value, so the road spreads on wide screens but
   still leaves the labels room to breathe as it narrows. Offset and row
   pitch have to stay in proportion — at roughly 1.45:1 the bends still read
   as a road; squeeze the pitch much below this and they flatten into
   switchbacks.

   Scoped to .topic-list.spine; the practice-links list keeps its grid. The
   <svg> is a sibling of the units, so alternation uses nth-of-type. */
.topic-list.spine { display: block; position: relative; margin-top: 34px; }
.spine-road { position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none; z-index: 0; }
/* Labels sit outboard of each node, away from the centre where the road
   sweeps — putting them inboard runs the text under the curve. */
.topic-list.spine .topic-item { position: relative; z-index: 1;
  display: flex; align-items: center; gap: 16px; width: 100%;
  background: transparent; border: 0; border-radius: 0;
  flex-direction: row-reverse; text-align: right;
  padding: 0 calc(68% - 28px) 84px 0;
  font-size: 16px; font-weight: 600; }
.topic-list.spine .topic-item:nth-of-type(even) { flex-direction: row;
  text-align: left; padding: 0 0 84px calc(68% - 28px); }
.topic-list.spine .topic-item:last-child { padding-bottom: 0; }
.topic-list.spine .idx { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--white); border: 2.5px solid var(--ink); color: var(--cobalt);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700; }

@media (max-width: 760px) {
  /* Too narrow to weave: straight left-hand rail. */
  .topic-list.spine .topic-item,
  .topic-list.spine .topic-item:nth-of-type(even) { flex-direction: row; text-align: left;
    gap: 14px; padding: 0 0 28px 0; font-size: 15px; }
  .topic-list.spine .idx { width: 44px; height: 44px; font-size: 13px; }
}

/* ---------- Course pathway ----------
   Sits above the course cards (which are unchanged) and answers the question
   parents actually arrive with: which course now, and what comes after. */
.pathway { display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 10px; margin-bottom: 14px; }
.pw-node { display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-sm);
  padding: 12px 20px; transition: transform .15s ease, box-shadow .15s ease; }
.pw-node:hover { transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.pw-g { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-70); }
.pw-c { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--cobalt); }
.pw-arrow { color: var(--ink-70); font-size: 17px; line-height: 1; }
.pw-pair { display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 9px 13px; }
.pw-pair-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-70); }
.pw-pair-nodes { display: flex; gap: 8px; }
.pw-pair .pw-node { padding: 9px 16px; }
.pathway-note { text-align: center; font-size: 13.5px; color: var(--ink-70); margin: 0 0 34px; }
@media (max-width: 760px) {
  /* Stack into a vertical run; the arrows turn to point down. */
  .pathway { flex-direction: column; align-items: stretch; gap: 8px; }
  .pw-node { flex-direction: row; justify-content: space-between; gap: 14px; padding: 11px 18px; }
  .pw-arrow { text-align: center; transform: rotate(90deg); }
  .pw-pair { align-items: stretch; }
  .pw-pair-nodes { flex-direction: column; gap: 8px; }
}

/* ---------- Process steps ---------- */
.process-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.process-step { padding: 0 20px; position: relative; }
.process-step .num { font-family: var(--font-mono); font-size: 13px; color: var(--coral); font-weight: 700; }
.process-step h4 { font-size: 17px; margin: 10px 0 8px; }
.process-step p { font-size: 14px; color: var(--ink-70); }
.process-row::before { content: ''; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
@media (max-width: 880px) { .process-row { grid-template-columns: 1fr 1fr; gap: 30px 0; } .process-row::before { display: none; } }
@media (max-width: 560px) { .process-row { grid-template-columns: 1fr; } }

/* ---------- Results / testimonial video cards ---------- */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.video-card { background: var(--ink); border-radius: var(--radius); overflow: hidden; color: var(--paper); border: 3px solid var(--amber); box-shadow: 0 0 0 5px rgba(255,176,32,0.18); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.video-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 6px rgba(255,90,70,0.25); border-color: var(--coral); }
.video-card .frame { position: relative; aspect-ratio: 16/9; background: #000; }
.video-card .frame iframe { width: 100%; height: 100%; border: 0; }

/* Click-to-load YouTube facade */
.yt-facade { cursor: pointer; width: 100%; height: 100%; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; }
.yt-facade .yt-play {
  position: absolute; inset: 0; margin: auto;
  width: 68px; height: 48px; border-radius: 13px;
  background: rgba(20,33,61,0.82); border: 2px solid var(--paper);
  transition: background 0.15s ease, transform 0.15s ease;
}
.yt-facade .yt-play::after {
  content: ''; position: absolute; top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid; border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent var(--paper);
}
.yt-facade:hover .yt-play,
.yt-facade:focus-visible .yt-play { background: var(--coral); transform: scale(1.07); }
.yt-facade:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.video-card .meta { padding: 16px 18px 20px; }
.video-card .meta .name { font-weight: 700; font-size: 15.5px; }
.video-card .meta .tag { font-family: var(--font-mono); font-size: 12.5px; color: var(--amber); margin-top: 3px; }
.video-card .meta .badge { display: inline-block; margin-top: 10px; font-size: 11.5px; font-family: var(--font-mono); background: rgba(255,255,255,0.1); padding: 3px 9px; border-radius: 5px; }
@media (max-width: 880px) { .results-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .results-grid { grid-template-columns: 1fr; } }

/* ---------- Outcomes band (results page) ----------
   results.html opens straight into a grid of video thumbnails with no visual
   anchor. This puts the headline numbers up front, in the same stamped mono
   treatment the hero stat card uses. Every figure here is already claimed
   elsewhere on the site — nothing new is asserted. */
.outcome-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  list-style: none; padding: 0; margin: 0 0 14px; }
.outcome { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: 5px 5px 0 var(--ink); }
.oc-n { display: block; font-family: var(--font-mono); font-weight: 700; font-size: 34px;
  line-height: 1; color: var(--coral); }
.oc-sm { font-size: 18px; color: var(--ink-70); }
.oc-l { display: block; margin-top: 9px; font-size: 13.5px; font-weight: 600;
  line-height: 1.4; color: var(--ink-70); }
.outcome-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-70);
  margin: 0 0 38px; }
@media (max-width: 880px) { .outcome-band { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .outcome-band { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.price-card { border: 2px solid var(--ink); border-radius: var(--radius); padding: 34px; background: var(--white); position: relative; }
.price-card.featured { background: var(--ink); color: var(--paper); }
.price-card .badge-best { position: absolute; top: -14px; right: 28px; background: var(--coral); color: var(--white); font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; transform: rotate(3deg); }
.price-card .old-price { font-family: var(--font-mono); text-decoration: line-through; opacity: 0.55; font-size: 20px; }
.price-card .new-price { font-family: var(--font-mono); font-weight: 700; font-size: 46px; margin: 4px 0 2px; }
.price-card .per { font-size: 14px; opacity: 0.75; margin-bottom: 20px; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0; }
.price-card li { padding: 8px 0; font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.price-card li svg { flex-shrink: 0; margin-top: 2px; }
.trial-banner { margin-top: 40px; background: var(--amber); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.trial-banner p { margin: 0; font-weight: 700; font-size: 16.5px; }
@media (max-width: 780px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---------- Two-column split ----------
   Two-column split used by the "See It For Yourself" try-a-question
   block on the home page. */
.demo-split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 880px) { .demo-split { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Teacher teaser ---------- */
.teacher-split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 50px; align-items: center; }
/* Real photo now, so a solid frame with the site's offset-shadow treatment
   rather than the dashed "placeholder" look it had before. */
.teacher-photo { aspect-ratio: 4/5; background: var(--paper-dim); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--coral); border-radius: var(--radius); overflow: hidden; }
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teacher-quote { font-family: var(--font-display); font-size: 24px; font-style: italic; line-height: 1.4; }
@media (max-width: 880px) { .teacher-split { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: var(--paper); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid .footer-h { margin: 0 0 16px; font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber); margin-bottom: 16px; }
.footer-grid a, .footer-grid p { color: rgba(250,243,231,0.8); font-size: 14.5px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom { border-top: 1px solid rgba(250,243,231,0.15); margin-top: 44px; padding-top: 22px; font-size: 13px; color: rgba(250,243,231,0.55); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
/* Policies live on the LearnWorlds side; these open there. */
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-legal a:hover { color: var(--amber); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
/* Two footer columns at 360px leaves ~150px each; stack instead. */
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } .footer-bottom { justify-content: flex-start; } }

/* ---------- Page header (interior pages) ---------- */
.page-header { padding: 56px 0 40px; border-bottom: 2px dashed var(--line); }
.breadcrumb { font-family: var(--font-mono); font-size: 13px; color: var(--ink-70); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--cobalt); }

/* ---------- Utility ---------- */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.tag-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; background: var(--paper-dim); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Conversion journey ---------- */
body.nav-open,
body.dialog-open { overflow: hidden; }

.nav-mobile-trial { display: none; }

.hero-course-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-course-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px;
  padding: 8px 12px; background: rgba(255,253,249,0.75); border: 1.5px solid var(--ink);
  border-radius: 999px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.hero-course-links a:hover, .hero-course-links a:focus-visible { background: var(--amber); outline: none; }

.start-journey { padding: 28px 0 48px; border-top: 0; }
.journey-card { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
  padding: 28px 30px; background: var(--white); border: 2px solid var(--ink);
  border-radius: var(--radius); box-shadow: 7px 7px 0 var(--amber); }
.journey-heading { font-size: 24px; margin-bottom: 16px; }
.journey-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.journey-step { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.journey-step .step-n { width: 30px; height: 30px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 50%; background: var(--cobalt); color: var(--white);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.journey-step strong { display: block; font-size: 14px; }
.journey-step small { display: block; color: var(--ink-70); font-size: 12px; margin-top: 2px; }
.journey-action { min-width: 218px; text-align: center; }
.journey-action .btn { width: 100%; }
.journey-action small { display: block; margin-top: 10px; color: var(--ink-70); font-size: 11.5px; }

.cta-assurance { margin: 14px 0 0; color: var(--ink-70); font-size: 13px; font-weight: 600; }
.not-found-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* The course chooser keeps generic homepage traffic from landing on an
   unrelated signup page. It is native, keyboard accessible, and one tap per
   course on phones. */
.course-chooser { width: min(760px, calc(100% - 32px)); max-height: min(760px, calc(100dvh - 32px));
  padding: 0; color: var(--ink); background: transparent; border: 0; overflow: visible; }
.course-chooser::backdrop { background: rgba(6,13,31,0.68); backdrop-filter: blur(4px); }
.chooser-shell { position: relative; overflow-y: auto; max-height: min(760px, calc(100dvh - 32px));
  padding: 34px; background: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--radius); box-shadow: 9px 9px 0 var(--amber); }
.chooser-shell h2 { margin-top: 10px; font-size: clamp(27px, 4vw, 38px); }
.chooser-intro { margin: 12px 46px 22px 0; color: var(--ink-70); }
.chooser-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px;
  border-radius: 50%; border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  font-size: 27px; line-height: 1; cursor: pointer; }
.chooser-close:hover, .chooser-close:focus-visible { background: var(--amber); outline: 3px solid var(--cobalt); }
.chooser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chooser-option { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
  padding: 15px 16px; background: var(--white); border: 2px solid var(--ink);
  border-radius: var(--radius-sm); transition: transform .15s ease, box-shadow .15s ease; }
.chooser-option:hover, .chooser-option:focus-visible { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); outline: none; }
.chooser-grade { grid-row: 1 / span 3; align-self: stretch; display: flex; align-items: center;
  padding-right: 12px; border-right: 1px dashed var(--line); color: var(--cobalt);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.chooser-option strong { font-family: var(--font-mono); font-size: 18px; color: var(--ink); }
.chooser-name { color: var(--ink-70); font-size: 12px; }
.chooser-plan { margin-top: 4px; color: var(--coral); font-size: 12px; font-weight: 700; }
.chooser-assurance { margin: 20px 0 0; text-align: center; color: var(--ink-70); font-size: 12.5px; font-weight: 600; }

.mobile-cta { display: none; }

@media (max-width: 880px) {
  .site-nav .wrap { gap: 12px; padding: 10px 18px; }
  .brand .mark { width: 38px; height: 38px; }
  .nav-cta { display: none; }
  .nav-links { inset: 60px 0 0 0; z-index: 210; overflow-y: auto; padding: 28px 22px 130px; }
  .nav-mobile-trial { display: inline-flex !important; width: 100%; max-width: 360px;
    justify-content: center; margin-top: 4px; color: var(--white) !important; }
  .nav-toggle { flex-shrink: 0; font-size: 24px; line-height: 1; }

  .journey-card { grid-template-columns: 1fr; gap: 22px; }
  .journey-action { min-width: 0; }
  .mobile-cta { position: fixed; z-index: 500; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 9px 9px 16px; background: var(--ink); color: var(--white);
    border: 2px solid var(--amber); border-radius: 17px; box-shadow: 0 8px 28px rgba(6,13,31,0.28); }
  .mobile-cta > span { min-width: 0; }
  .mobile-cta strong { display: block; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
  .mobile-cta small { display: block; margin-top: 2px; color: rgba(255,255,255,.72); font-size: 10.5px; }
  .mobile-cta .btn { flex-shrink: 0; padding: 11px 15px; min-height: 44px; font-size: 13px; box-shadow: none; }
  body.has-mobile-cta { padding-bottom: 88px; }
  footer { padding-bottom: 40px; }

  section { padding: 66px 0; }
  .page-header { padding: 42px 0 34px; }
}

@media (max-width: 620px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .hero { padding: 38px 0 24px; }
  .hero-grid { gap: 28px; }
  .hero h1 { font-size: clamp(34px, 10vw, 43px); }
  p.lead { font-size: 17px; }
  .hero-sub { margin-top: 18px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .hero-actions .btn { width: 100%; min-height: 50px; white-space: normal; text-align: center; }
  .hero-trust { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
  .hero-course-links { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-course-links a { justify-content: center; text-align: center; }
  .paper-card { padding: 21px; box-shadow: 5px 5px 0 var(--ink); }
  .paper-card .big-stat { font-size: 54px; }

  .start-journey { padding: 20px 0 42px; }
  .journey-card { padding: 24px 20px; box-shadow: 5px 5px 0 var(--amber); }
  .journey-heading { font-size: 22px; }
  .journey-steps { grid-template-columns: 1fr; gap: 13px; }
  .journey-action .btn { min-height: 50px; }

  .chooser-shell { padding: 27px 18px 22px; }
  .chooser-intro { margin-right: 34px; }
  .chooser-grid { grid-template-columns: 1fr; }
  .chooser-option { min-height: 82px; }

  section { padding: 54px 0; }
  .section-head { margin-bottom: 34px; }
  .price-card { padding: 26px 22px; }
  .trial-banner { align-items: stretch; padding: 22px 20px; }
  .trial-banner .btn { width: 100%; }
  .page-header h1 { overflow-wrap: anywhere; }
  .cta-assurance { line-height: 1.55; }
  .not-found-actions { display: grid; grid-template-columns: 1fr; }
  .not-found-actions .btn { width: 100%; }
}

@media (max-width: 390px) {
  .mobile-cta { left: 7px; right: 7px; gap: 8px; padding-left: 12px; }
  .mobile-cta small { display: none; }
  .mobile-cta .btn { padding-left: 12px; padding-right: 12px; font-size: 12.5px; }
  .hero-course-links { grid-template-columns: 1fr; }
}
