/* Chip 101, design option "map": the course drawn as one connected path.
   One stylesheet for every page. No web fonts, no external files. */

:root {
  color-scheme: dark;

  /* Lesson picture palette: the same values the app uses, so the pictures look the same here. */
  --fig-ink: oklch(0.97 0 0);
  --fig-muted: oklch(0.8 0.01 250);
  --fig-line: oklch(0.62 0.02 250);
  --fig-panel: oklch(0.27 0.015 250);
  --fig-accent: oklch(0.82 0.12 200);
  --fig-accent-2: oklch(0.85 0.14 85);
  --fig-warm: oklch(0.77 0.15 50);
  --fig-good: oklch(0.82 0.16 150);
  --fig-bad: oklch(0.74 0.17 25);

  --bg: oklch(0.155 0.012 255);
  --bg-2: oklch(0.18 0.014 255);
  --surface: oklch(0.21 0.016 255);
  --surface-2: oklch(0.245 0.018 255);
  --line: oklch(0.31 0.02 255);
  --line-soft: oklch(0.31 0.02 255 / 0.6);
  --line-2: oklch(0.42 0.024 255);
  --text: var(--fig-ink);
  --text-2: oklch(0.85 0.012 250);
  --text-3: oklch(0.76 0.016 250);
  --cyan: var(--fig-accent);
  --amber: var(--fig-accent-2);
  --green: var(--fig-good);
  --on-color: oklch(0.18 0.02 250);
  --glow-cyan: oklch(0.82 0.12 200 / 0.45);
  --glow-amber: oklch(0.85 0.14 85 / 0.38);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
}

/* ---- base ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ol, ul { margin: 0; padding: 0; }
figure { margin: 0; }
a { color: inherit; }
svg { display: block; }
.ic { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--cyan); color: var(--on-color); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---- lesson pictures ------------------------------------------------------------------ */
.lesson-art { display: block; width: 100%; height: auto; fill: var(--fig-ink); font-family: var(--sans); font-size: 22px; }
.fill-none { fill: none; }
.fill-fig-ink { fill: var(--fig-ink); }
.fill-fig-muted { fill: var(--fig-muted); }
.fill-fig-line { fill: var(--fig-line); }
.fill-fig-panel { fill: var(--fig-panel); }
.fill-fig-accent { fill: var(--fig-accent); }
.fill-fig-accent-2 { fill: var(--fig-accent-2); }
.fill-fig-warm { fill: var(--fig-warm); }
.fill-fig-good { fill: var(--fig-good); }
.fill-fig-bad { fill: var(--fig-bad); }
.stroke-fig-ink { stroke: var(--fig-ink); }
.stroke-fig-muted { stroke: var(--fig-muted); }
.stroke-fig-line { stroke: var(--fig-line); }
.stroke-fig-panel { stroke: var(--fig-panel); }
.stroke-fig-accent { stroke: var(--fig-accent); }
.stroke-fig-accent-2 { stroke: var(--fig-accent-2); }
.stroke-fig-warm { stroke: var(--fig-warm); }
.stroke-fig-good { stroke: var(--fig-good); }
.stroke-fig-bad { stroke: var(--fig-bad); }
.art-frame {
  border-radius: var(--r);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: clamp(10px, 2.4vw, 20px);
}

/* ---- header, buttons, footer ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: oklch(0.155 0.012 255 / 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-right: 6px;
  color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.logo-mark { width: 28px; height: 28px; color: var(--cyan); filter: drop-shadow(0 0 8px var(--glow-cyan)); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav > a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
}
.nav > a:not(.btn):hover, .nav > a[aria-current="page"] { color: var(--text); background: var(--surface); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn .ic { width: 18px; height: 18px; }
.btn-primary {
  background: var(--cyan); color: var(--on-color);
  box-shadow: 0 10px 30px -12px var(--glow-cyan), inset 0 1px 0 oklch(1 0 0 / 0.35);
}
.btn-primary:hover { background: oklch(0.88 0.1 200); box-shadow: 0 12px 36px -10px var(--glow-cyan), inset 0 1px 0 oklch(1 0 0 / 0.4); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn-ghost .ic { color: var(--cyan); }
.btn-lg { min-height: 54px; padding: 0 24px; border-radius: 14px; font-size: 1.0625rem; }
.btn-sm { min-height: 44px; padding: 0 16px; border-radius: 11px; font-size: 0.9375rem; }
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: none; }
}

.kicker {
  font-family: var(--mono); font-size: 0.8125rem; font-weight: 600; line-height: 1.3;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber);
}

.site-footer { border-top: 1px solid var(--line-soft); padding: 40px 0 48px; }
.foot { display: grid; gap: 20px; }
.foot-brand p { margin-top: 4px; color: var(--text-2); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-left: -12px; }
.foot-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 600;
}
.foot-nav a:hover { color: var(--text); background: var(--surface); }
.foot-note { padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--text-3); font-size: 0.9375rem; }
@media (min-width: 768px) {
  .foot { grid-template-columns: 1fr auto; align-items: center; }
  .foot-nav { margin-left: 0; }
  .foot-note { grid-column: 1 / -1; }
}

/* ---- landing: hero -------------------------------------------------------------------- */
.hero { position: relative; overflow: clip; isolation: isolate; padding: 36px 0 44px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(oklch(1 0 0 / 0.08) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 70% 40%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 65% at 70% 40%, #000 15%, transparent 72%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; inset: -20% -30% auto auto; width: 900px; height: 900px;
  background:
    radial-gradient(closest-side, oklch(0.82 0.12 200 / 0.17), transparent 70%);
}
.hero-grid { display: grid; gap: 32px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-size: 0.875rem; font-weight: 600;
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px oklch(0.82 0.16 150 / 0.16), 0 0 12px oklch(0.82 0.16 150 / 0.7);
}
.hero h1 {
  margin: 20px 0 16px; font-size: clamp(2.5rem, 1.25rem + 5.2vw, 4.75rem);
  line-height: 1.02; letter-spacing: -0.042em; font-weight: 800;
}
.lede { max-width: 36em; color: var(--text-2); font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem); line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .cta-row .btn { flex: 1 1 auto; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; color: var(--text-2); font-size: 0.9375rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .ic { width: 18px; height: 18px; color: var(--green); }

.hero-visual { position: relative; padding: 14px 0 26px; }
.mock {
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 40px 80px -32px oklch(0 0 0 / 0.75), inset 0 1px 0 oklch(1 0 0 / 0.05);
}
.mock-front { position: relative; z-index: 2; padding: 14px 14px 18px; }
/* The second card behind the first only fits beside the copy on wide screens. */
.mock-back {
  display: none; position: absolute; z-index: 1; top: -18px; right: -34px; width: 74%; padding: 10px;
  transform: rotate(5deg); filter: saturate(0.7) brightness(0.72);
}
.mock-back .art-frame { padding: 8px; }
.mock-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 4px 12px; color: var(--text-2); font: 600 0.8125rem/1.3 var(--mono); letter-spacing: 0.02em;
}
.mini-strip { position: relative; display: flex; align-items: center; gap: 9px; }
.mini-strip::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; margin-top: -1px; background: var(--line-2);
}
.mini-strip i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.mini-strip i.past { border-color: var(--cyan); }
.mini-strip i.here {
  width: 13px; height: 13px; background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 0 4px oklch(0.82 0.12 200 / 0.2), 0 0 12px var(--glow-cyan);
}
.mock-title { margin: 0 4px 12px; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.mock figcaption { margin: 14px 4px 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.mock figcaption strong { color: var(--text); }
.mock-chip {
  position: absolute; z-index: 3; left: -4px; bottom: 0;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid oklch(0.82 0.12 200 / 0.55); color: var(--text);
  font: 600 0.8125rem/1.3 var(--mono); box-shadow: 0 12px 30px -10px oklch(0 0 0 / 0.8);
}
.mock-chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--glow-cyan); }

@media (min-width: 1024px) {
  .hero { padding: 60px 0 52px; }
  .hero-grid { grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); column-gap: 64px; row-gap: 28px; }
  .hero-copy { grid-column: 1; grid-row: 1; align-self: end; }
  .hero-visual { grid-column: 2; grid-row: 1 / span 2; padding: 24px 0 32px; }
  .trust { grid-column: 1; grid-row: 2; align-self: start; }
  .hero .cta-row .btn { flex: 0 0 auto; }
  .mock-back { display: block; }
  .mock-front { margin-right: 34px; }
  .mock-chip { left: -22px; bottom: 4px; }
}

/* ---- landing: bands ------------------------------------------------------------------- */
.band { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.band + .band { border-top: 1px solid var(--line-soft); }
/* The path band starts at the hero's edge: its dotted line runs down from that border. */
.band-path { padding-top: 0; border-top: 1px solid var(--line-soft); }
.band-path .lead-line { height: 64px; margin-bottom: 20px; }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head h2, .anatomy-copy h2, .who h2, .cta-panel h2 {
  margin-top: 12px; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.25rem); line-height: 1.06; letter-spacing: -0.035em; font-weight: 800;
}
.section-head > p:last-child { margin-top: 18px; color: var(--text-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); }
.lead-line {
  display: block; width: 2px; height: 56px; margin: 0 auto 18px;
  background-image: linear-gradient(var(--cyan) 50%, transparent 0); background-size: 2px 8px;
}
.center-row { display: flex; justify-content: center; margin-top: 40px; }

/* The path overview: a spine with six numbered stops. Vertical on phones, horizontal on wide screens. */
.overview { position: relative; display: grid; gap: 8px; list-style: none; }
.overview::before {
  content: ""; position: absolute; left: 28px; top: 40px; bottom: 40px; width: 2px; margin-left: -1px;
  background: var(--cyan); opacity: 0.6; box-shadow: 0 0 10px var(--glow-cyan);
}
.stop {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px;
  padding: 12px 14px 14px 0; border-radius: var(--r); border: 1px solid transparent;
  color: var(--text); text-decoration: none; transition: background-color 0.2s ease, border-color 0.2s ease;
}
.stop:hover { background: var(--surface); border-color: var(--line); }
.stop-mark {
  position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px;
  background: var(--amber); color: var(--on-color); font: 800 1.375rem/1 var(--mono);
  box-shadow: 0 0 0 6px var(--bg), 0 0 32px -6px var(--glow-amber);
}
.stop:hover .stop-mark { box-shadow: 0 0 0 6px var(--surface), 0 0 32px -6px var(--glow-amber); }
.stop-body { padding-top: 4px; }
.stop-title { font-size: 1.1875rem; font-weight: 750; letter-spacing: -0.015em; line-height: 1.25; }
.stop-meta {
  display: block; margin-top: 4px; color: var(--text-3);
  font: 600 0.8125rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.stop-lessons { display: flex; flex-wrap: wrap; margin-top: 10px; list-style: none; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.stop-lessons li:not(:last-child)::after { content: "\00B7"; margin: 0 8px; color: var(--line-2); }
/* Wide screens: six columns that share their rows (subgrid), so every title, count and lesson list
   starts at the same height whether a title takes one line or two. */
@media (min-width: 1024px) {
  .overview { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); column-gap: 14px; row-gap: 0; }
  .overview > li { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
  .overview::before { left: calc(100% / 12); right: calc(100% / 12); top: 40px; bottom: auto; width: auto; height: 2px; margin: -1px 0 0; }
  .stop {
    grid-row: span 4; grid-template-rows: subgrid; grid-template-columns: 1fr; justify-items: center; align-items: start;
    row-gap: 0; padding: 12px 10px 18px; text-align: center;
  }
  .stop-body { display: contents; }
  .stop-title { margin-top: 14px; }
  .stop-lessons { flex-direction: column; justify-self: stretch; gap: 6px; margin-top: 16px; }
  .stop-lessons li {
    padding: 6px 8px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line);
    font-size: 0.875rem; line-height: 1.35;
  }
  .stop:hover .stop-lessons li { background: var(--surface-2); }
  .stop-lessons li:not(:last-child)::after { content: none; }
}

/* Inside a lesson */
.anatomy { display: grid; gap: 48px; align-items: center; }
.sample {
  padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px oklch(0 0 0 / 0.85);
}
.sample-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 4px 14px; }
.pill {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  background: oklch(0.85 0.14 85 / 0.14); color: var(--amber); font: 600 0.8125rem/1.4 var(--mono); letter-spacing: 0.04em;
}
.sample-lesson { color: var(--text-2); font-size: 0.9375rem; font-weight: 600; }
.sample figcaption { margin: 16px 6px 4px; color: var(--text-2); font-size: 1.0625rem; }
.sample figcaption strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 1.1875rem; }
.anatomy-copy > p:not(.kicker) { margin-top: 16px; color: var(--text-2); font-size: 1.125rem; }
.parts { display: grid; margin-top: 26px; list-style: none; }
.parts li {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start;
  padding: 12px 0; border-top: 1px solid var(--line-soft); color: var(--text-2);
}
.parts li:last-child { border-bottom: 1px solid var(--line-soft); }
.part-n {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--cyan); font: 700 0.875rem/1 var(--mono);
}
.parts strong { display: block; color: var(--text); }
.try { margin-top: 26px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.try-label {
  display: flex; align-items: center; gap: 8px; color: var(--cyan);
  font: 600 0.8125rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.try-label .ic { width: 18px; height: 18px; }
.try-q { margin-top: 10px; font-size: 1.1875rem; font-weight: 650; line-height: 1.4; }
@media (min-width: 1024px) {
  .anatomy { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; }
}

/* Reveal an answer (landing demo and the lesson check). */
.reveal { margin-top: 14px; }
.reveal summary {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--text); font-weight: 700; cursor: pointer; list-style: none;
}
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary::marker { content: ""; }
.reveal summary::after {
  content: ""; width: 8px; height: 8px; margin-left: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg);
}
.reveal[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.reveal summary:hover { border-color: var(--cyan); }
.reveal .when-open, .reveal[open] .when-closed { display: none; }
.reveal[open] .when-open { display: inline; }
.reveal > p {
  margin-top: 12px; padding: 12px 16px; border-radius: 12px;
  background: oklch(0.82 0.16 150 / 0.1); border: 1px solid oklch(0.82 0.16 150 / 0.4);
  color: var(--text); font-weight: 650;
}

/* Who it is for */
.who { display: grid; gap: 24px; }
.who-text p { color: var(--text-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.65; }
.who-text p + p { margin-top: 16px; }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 48px 0 0;
  border-radius: var(--r-lg); overflow: hidden; background: var(--line); border: 1px solid var(--line);
}
.facts div { display: flex; flex-direction: column-reverse; gap: 6px; padding: 22px 20px; background: var(--bg-2); }
.facts dd { margin: 0; font: 800 clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem)/1 var(--mono); letter-spacing: -0.04em; }
.facts div:first-child dd { color: var(--cyan); }
.facts dt { color: var(--text-2); font-size: 0.9375rem; }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .who { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; align-items: end; }
}

/* Closing call to action */
.cta-panel {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border-radius: 28px; border: 1px solid var(--line); background: var(--surface);
}
.cta-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 50% 0%, oklch(0.82 0.12 200 / 0.16), transparent 70%),
    radial-gradient(40% 60% at 90% 100%, oklch(0.85 0.14 85 / 0.1), transparent 70%);
}
.cta-panel > p:not(.kicker) { margin-top: 14px; color: var(--text-2); font-size: 1.125rem; }
.cta-panel .cta-row { justify-content: center; }

/* ---- catalog -------------------------------------------------------------------------- */
.page-head { padding: 20px 0 8px; }
.crumbs { display: flex; align-items: center; gap: 2px; margin-left: -10px; color: var(--text-3); font-size: 0.9375rem; }
.crumbs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none;
}
.crumbs a:hover { color: var(--text); background: var(--surface); }
.crumbs [aria-current] { padding: 0 10px; color: var(--text); }
.page-head h1 { margin-top: 10px; font-size: clamp(2.25rem, 1.35rem + 3.8vw, 3.875rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 800; }
.page-head .lede { margin-top: 16px; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 26px; }
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text-2); font-size: 0.9375rem; }
.progress b { color: var(--text); font-weight: 750; }
.progress-ring {
  --p: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line-2) 0);
  -webkit-mask: radial-gradient(circle, transparent 6px, #000 6.5px);
  mask: radial-gradient(circle, transparent 6px, #000 6.5px);
}
.progress-note { color: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; list-style: none; color: var(--text-2); font-size: 0.9375rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 14px; height: 14px; border-radius: 4px; }
.lg-sec { background: var(--amber); }
.lg-node { background: var(--surface); border: 2px solid var(--line-2); }
.lg-done { background: var(--green); }
.lg-here { border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px oklch(0.82 0.12 200 / 0.25); }
@media (min-width: 1024px) {
  .page-head { padding-top: 28px; text-align: center; }
  .crumbs, .head-actions, .legend { justify-content: center; }
  .crumbs { margin-left: 0; }
  .page-head .lede { margin-inline: auto; }
}

/* The map: a glowing spine, amber section boxes, and lesson nodes joined to the spine by dotted lines. */
.map { --spine: 22px; position: relative; z-index: 0; margin-top: 36px; padding-bottom: 8px; }
.map::before {
  content: ""; position: absolute; z-index: 0; left: var(--spine); top: 22px; bottom: 30px; width: 2px; margin-left: -1px;
  background: var(--cyan); opacity: 0.7; box-shadow: 0 0 12px var(--glow-cyan);
}
.map::after {
  content: ""; position: absolute; z-index: 0; left: var(--spine); top: 0; width: 4px; height: 140px; margin-left: -2px;
  border-radius: 4px; background: linear-gradient(transparent, oklch(0.95 0.06 200), transparent); opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .map::after { animation: signal 10s linear infinite; }
}
@keyframes signal {
  0% { top: 0; opacity: 0; }
  6% { opacity: 0.9; }
  94% { opacity: 0.9; }
  100% { top: calc(100% - 140px); opacity: 0; }
}
.cap { position: relative; z-index: 1; height: 44px; font-weight: 750; }
.cap-dot {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan); color: var(--cyan); box-shadow: 0 0 18px -2px var(--glow-cyan);
}
.cap-dot .ic { width: 18px; height: 18px; }
.cap-text { position: absolute; left: 58px; right: 0; top: 50%; transform: translateY(-50%); line-height: 1.3; }
.cap-text small { display: block; color: var(--text-2); font-size: 0.9375rem; font-weight: 500; }
.cap-end { margin-top: 44px; margin-bottom: 8px; }
.secs { position: relative; z-index: 2; list-style: none; }
.sec { padding-top: 40px; scroll-margin-top: 76px; }
.sec-box {
  position: relative; padding: 14px 18px 16px; border-radius: var(--r);
  background: var(--amber); color: var(--on-color);
  box-shadow: 0 0 0 6px var(--bg), 0 18px 50px -20px var(--glow-amber);
}
.sec-kicker { font: 700 0.8125rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.sec-title { margin-top: 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.sec-blurb { margin: 14px 0 0 52px; color: var(--text-2); font-size: 1rem; line-height: 1.55; }
.nodes { display: grid; gap: 10px; margin-top: 16px; padding-left: 52px; list-style: none; }
.node { position: relative; }
.node::before {
  content: ""; position: absolute; top: 50%; right: 100%; width: 30px; margin-top: -1px;
  border-top: 2px dotted oklch(0.82 0.12 200 / 0.75);
}
.node::after {
  content: ""; position: absolute; top: 50%; left: -36px; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan);
}
.node-link {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 10px 14px 10px 10px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.node-link:hover { background: var(--surface-2); border-color: oklch(0.82 0.12 200 / 0.7); }
.node-num {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 11px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font: 700 0.9375rem/1 var(--mono);
}
.node-ck { display: none; width: 20px; height: 20px; }
.node-text { min-width: 0; }
.node-label { display: block; font-size: 1.0625rem; font-weight: 750; line-height: 1.25; }
.node-q { display: block; margin-top: 2px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.35; }
.node-peek { display: none; }
.node.is-done .node-num { background: var(--green); border-color: transparent; color: var(--on-color); }
.node.is-done .node-n { display: none; }
.node.is-done .node-ck { display: block; }
.node.is-done::after { background: var(--green); border-color: var(--green); }
.node.is-here .node-link { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 14px 40px -14px var(--glow-cyan); }
.node.is-here::after {
  width: 16px; height: 16px; margin-top: -8px; left: -38px; background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 0 5px oklch(0.82 0.12 200 / 0.2), 0 0 14px var(--glow-cyan);
}
.here-tag {
  position: absolute; top: -11px; right: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--cyan); color: var(--on-color); font: 700 0.8125rem/1.4 var(--mono); letter-spacing: 0.02em;
}

@media (min-width: 1024px) {
  .map { --spine: 50%; margin-top: 48px; }
  .cap { display: flex; justify-content: center; }
  .cap-text { left: calc(50% + 36px); right: auto; width: max-content; max-width: calc(50% - 36px); }
  .sec { padding-top: 64px; }
  .sec-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .sec-box { min-width: 340px; padding: 16px 30px 18px; }
  .sec-title { font-size: 1.625rem; }
  .sec-blurb {
    max-width: 460px; margin: 14px 0 0; padding: 10px 18px; border-radius: 12px;
    background: var(--bg); border: 1px solid var(--line);
  }
  .nodes {
    grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); grid-auto-rows: minmax(39px, auto);
    gap: 0; margin-top: 30px; padding-left: 0;
  }
  .node { grid-row: var(--row) / span 2; align-self: start; width: min(100%, 430px); }
  .node:nth-child(odd) { grid-column: 1; justify-self: end; }
  .node:nth-child(even) { grid-column: 3; justify-self: start; }
  .node::before { width: 40px; }
  .node:nth-child(odd)::before { left: 100%; right: auto; }
  .node:nth-child(odd)::after { left: calc(100% + 34px); }
  .node:nth-child(even)::after { left: -46px; }
  .node.is-here:nth-child(odd)::after { left: calc(100% + 32px); }
  .node.is-here:nth-child(even)::after { left: -48px; }
  .node:nth-child(odd) .node-link { flex-direction: row-reverse; text-align: right; padding: 10px 10px 10px 16px; }
  .node:nth-child(odd) .here-tag { right: auto; left: 12px; }
}
@media (min-width: 1024px) and (hover: hover) {
  .node:hover, .node:focus-within { z-index: 5; }
  .node-peek {
    display: block; position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0;
    padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid oklch(0.82 0.12 200 / 0.5);
    box-shadow: 0 24px 50px -20px oklch(0 0 0 / 0.9); color: var(--text); font-size: 0.9375rem; line-height: 1.5; text-align: left;
    opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  }
  .node:hover .node-peek, .node:focus-within .node-peek {
    opacity: 1; visibility: visible; transform: none; transition: opacity 0.15s ease, transform 0.15s ease;
  }
}

/* ---- lesson --------------------------------------------------------------------------- */
.strip { background: var(--bg-2); border-bottom: 1px solid var(--line-soft); }
.strip-grid {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  grid-template-areas: "back . count" "where where where" "nodes nodes nodes";
  padding: 6px 0 10px;
}
.strip-back {
  grid-area: back; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -10px;
  padding: 0 12px 0 6px; border-radius: var(--r-sm); color: var(--text-2); font-size: 0.9375rem; font-weight: 650; text-decoration: none;
}
.strip-back:hover { color: var(--text); background: var(--surface); }
.strip-count { grid-area: count; color: var(--text-2); font: 600 0.875rem/1.3 var(--mono); }
.strip-count b { color: var(--cyan); }
.strip-where { grid-area: where; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 0.9375rem; }
.strip-sec { color: var(--amber); font: 600 0.8125rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.strip-sec-title { font-weight: 700; }
.strip-nodes { --n: 7; --i: 0; grid-area: nodes; position: relative; display: flex; margin-top: 4px; list-style: none; }
.strip-nodes::before, .strip-nodes::after {
  content: ""; position: absolute; top: 21px; height: 2px; left: calc(50% / var(--n));
}
.strip-nodes::before { right: calc(50% / var(--n)); background: var(--line-2); }
.strip-nodes::after { width: calc(100% * var(--i) / var(--n)); background: var(--cyan); box-shadow: 0 0 8px var(--glow-cyan); }
.strip-nodes li { position: relative; flex: 1 1 0; min-width: 0; }
.strip-nodes a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; padding: 14px 2px 4px;
  border-radius: var(--r-sm); color: var(--text-2); text-decoration: none;
}
.strip-dot {
  position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--line-2); transition: border-color 0.2s ease;
}
.strip-label { font-size: 0.8125rem; line-height: 1.25; text-align: center; }
.strip-nodes a:hover { color: var(--text); }
.strip-nodes a:hover .strip-dot { border-color: var(--cyan); }
.strip-nodes .is-before .strip-dot { border-color: var(--cyan); }
.strip-nodes .is-done .strip-dot { background: var(--green); border-color: var(--green); }
.strip-nodes .is-here .strip-dot {
  width: 20px; height: 20px; margin-top: -2px; margin-bottom: -2px; background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 0 5px oklch(0.82 0.12 200 / 0.2), 0 0 16px var(--glow-cyan);
}
.strip-nodes .is-here a { color: var(--cyan); font-weight: 700; }
@media (max-width: 767px) {
  .strip-nodes li:not(.is-here) .strip-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .strip-nodes .is-here .strip-label { white-space: nowrap; }
}
@media (min-width: 768px) {
  .strip-grid { grid-template-areas: "back where count" "nodes nodes nodes"; padding: 8px 0 12px; }
  .strip-where { justify-content: center; }
}

.lesson { padding: 36px 0 0; }
.lesson-head { max-width: 840px; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-2); font-size: 0.9375rem; }
.lesson-meta span { display: inline-flex; align-items: center; gap: 7px; }
.lesson-meta .ic { width: 18px; height: 18px; color: var(--cyan); }
.lesson-head h1 { margin-top: 12px; font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.25rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 800; }
.answer {
  position: relative; margin-top: 22px; padding: 18px 20px 18px 24px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem); line-height: 1.5;
}
.answer::before {
  content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px; border-radius: 4px;
  background: var(--cyan); box-shadow: 0 0 14px var(--glow-cyan);
}
.answer-label {
  display: block; margin-bottom: 6px; color: var(--cyan);
  font: 700 0.8125rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}

.panels { display: grid; gap: clamp(44px, 6vw, 80px); margin-top: clamp(44px, 6vw, 72px); list-style: none; }
.panel { display: grid; gap: 18px; align-items: center; }
.panel .art-frame { padding: clamp(12px, 2.6vw, 28px); }
.panel-step {
  display: flex; align-items: center; gap: 10px; color: var(--amber);
  font: 700 0.8125rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.panel-n {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--amber); color: var(--on-color); letter-spacing: 0; font-size: 0.875rem;
}
.panel h2 { margin-top: 10px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; }
.panel-text > p:last-child { margin-top: 12px; color: var(--text-2); font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.6; }
@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; }
  .panel:nth-child(even) .art-frame { order: 2; }
}

.block { margin-top: clamp(56px, 8vw, 96px); }
.block-title { display: flex; align-items: center; gap: 12px; font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); letter-spacing: -0.025em; font-weight: 800; }
.ic-badge {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--cyan);
}
.words { display: grid; gap: 12px; margin: 22px 0 0; }
.word { padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.word dt { color: var(--amber); font-size: 1.125rem; font-weight: 800; }
.word dd { margin: 6px 0 0; color: var(--text-2); }
@media (min-width: 768px) { .words { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.at-work, .check {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(22px, 4vw, 36px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
/* A solid amber edge, like the cyan edge on the short answer: an amber glow turned muddy brown here. */
.at-work { border-color: oklch(0.85 0.14 85 / 0.3); }
.at-work::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--amber); }
.at-work .ic-badge { color: var(--amber); }
.at-work > p { max-width: 46em; margin-top: 16px; font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.6; }
.check { border-color: oklch(0.82 0.12 200 / 0.4); }
.check::before {
  content: ""; position: absolute; z-index: -1; left: -140px; bottom: -200px; width: 460px; height: 460px;
  background: radial-gradient(closest-side, oklch(0.82 0.12 200 / 0.12), transparent 70%);
}
.check-q { margin-top: 16px; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); font-weight: 700; line-height: 1.4; }
.check .reveal { margin-top: 18px; }
.done-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.done-row[hidden] { display: none; }
.btn-done[aria-pressed="true"] { background: oklch(0.82 0.16 150 / 0.14); border-color: oklch(0.82 0.16 150 / 0.6); color: var(--green); }
.btn-done[aria-pressed="true"] .ic { color: var(--green); }
.done-note { color: var(--text-3); font-size: 0.9375rem; }

.related-list { display: grid; gap: 10px; margin-top: 22px; list-style: none; }
.related-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 12px 16px 12px 18px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-weight: 700; text-decoration: none; transition: border-color 0.2s ease, background-color 0.2s ease;
}
.related-list a:hover { background: var(--surface-2); border-color: oklch(0.82 0.12 200 / 0.6); }
.related-list small {
  display: block; margin-bottom: 2px; color: var(--text-3);
  font: 600 0.8125rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.related-list .ic { color: var(--cyan); }
@media (min-width: 768px) { .related-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pager { display: grid; gap: 12px; padding: clamp(48px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.pager a {
  display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 104px; padding: 20px 22px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pager a:hover { background: var(--surface-2); border-color: var(--line-2); }
.pager span {
  display: inline-flex; align-items: center; gap: 8px; color: var(--text-2);
  font: 600 0.8125rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.pager .ic { width: 18px; height: 18px; }
.pager strong { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; }
.pager-next { border-color: oklch(0.82 0.12 200 / 0.5); align-items: flex-end; text-align: right; }
.pager-next span { color: var(--cyan); }
.pager-next:hover { border-color: var(--cyan); }
@media (min-width: 768px) { .pager { grid-template-columns: 1fr 1fr; } }
