/* Wioxon — site styles.
   Tokens: design/brand-system/wioxon-design-tokens.json (Brand System V1).
   Rules: borders before shadows; one primary action per block; amber text on
   white only in Amber 700 at large sizes (Amber 500 on white = 2.38:1, fails);
   motion = transform + opacity only, cubic-bezier(0.2, 0.8, 0.2, 1). */

/* Inter 4.1 variable (wght + opsz), subset to Latin by scripts/font-subset.py. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable-latin.woff2?v=105bef88f4") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Arial with Inter's metrics (measured by scripts/font-subset.py): text keeps
   its size and line breaks when the web font swaps in, so nothing shifts. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  size-adjust: 107.48%;
  ascent-override: 90.14%;
  descent-override: 22.44%;
  line-gap-override: 0%;
}

:root {
  --amber-mist: #fff3e4;
  --amber-300: #ffb000;
  --amber-500: #ff8900;
  --amber-700: #ff6200;
  --core-dark: #0d0d0f;
  --ink: #111111;
  --graphite: #303030;
  --slate: #555555;
  --n800: #242529;
  --n700: #34363b;
  --n600: #50535a;
  --n500: #707780;
  --n400: #9da3ab;
  --n300: #c7cbd1;
  --n200: #e5e7ea;
  --n100: #f4f5f7;
  --n050: #fafafb;
  --white: #ffffff;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-micro: 150ms;
  --t-standard: 320ms;
  --t-narrative: 700ms;

  --gutter: 16px;
  --header-h: 64px;
  --section-y: 64px;

  --font: "Inter", "Inter Fallback", Arial, Helvetica, sans-serif;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section-y: 80px; }
}
@media (min-width: 1024px) {
  :root { --header-h: 72px; --section-y: 96px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 80px; }
}

/* ---- base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
/* Headlines break into balanced lines: no one-word last line at any width.
   Browsers without support keep the normal wrapping. */
h1, h2, h3, .lesson-title, .pager__title, .course-card__title, .invite__title { text-wrap: balance; }
/* Large headlines use Inter's display optical size explicitly. Chromium and
   Firefox already pick it via font-optical-sizing: auto (opsz = 32 at these
   sizes), so nothing changes there; engines that don't apply it automatically
   (seen in WebKit) otherwise draw wider text-size glyphs and break the hero. */
.display, .h2, .lesson-title, .course-hero__title, .scan-aside__title, .fixes-hero__title, .fix-hero .h1, .page-hero .h1 { font-variation-settings: "opsz" 32; }
ul, ol { padding: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--amber-300); color: var(--core-dark); }

:focus-visible { outline: 2px solid var(--amber-500); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: 8px; z-index: 100;
  padding: 10px 16px; background: var(--core-dark); color: var(--white);
  border-radius: var(--radius-md); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container { width: min(100% - 2 * var(--gutter), 1280px); margin-inline: auto; }
.icon { width: 24px; height: 24px; flex: none; }

/* ---- type ----------------------------------------------------------------- */
.eyebrow {
  display: flex; align-items: center; gap: 16px;
  font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--graphite);
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--amber-500); flex: none; }
.on-dark .eyebrow { color: var(--n300); }

.display {
  font-weight: 700;
  /* Sized so the longest line ("Fix the system.") always fits its column:
     full width below 1024px, the 44% hero column above. */
  font-size: min(13vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
@media (min-width: 768px) { .display { font-size: min(8.4vw, 4.5rem); } }
@media (min-width: 1024px) { .display { font-size: clamp(3.5rem, 0.4rem + 5.4vw, 5.5rem); } }
.display span { display: block; }
.h2 {
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
}
.h3 { font-size: 1.5rem; line-height: 2rem; font-weight: 650; letter-spacing: -0.015em; }
.lead { font-size: 1.125rem; line-height: 1.65; color: var(--slate); max-width: 34em; }
@media (min-width: 1024px) { .lead { font-size: 1.25rem; line-height: 1.5; } }
.accent { color: var(--amber-700); }
.on-dark .accent { color: var(--amber-500); }
.muted { color: var(--slate); }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer;
}
.btn .icon { width: 20px; height: 20px; transition: transform var(--t-micro) var(--ease); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: currentColor; opacity: 0;
  transition: opacity var(--t-micro) var(--ease);
}
.btn:hover::after { opacity: 0.08; }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: var(--amber-500); color: var(--core-dark); }
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--n300); }
.btn--outline-light { background: transparent; color: var(--white); border-color: var(--n600); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.btn--block { width: 100%; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--n300); padding-bottom: 2px;
}
.text-link .icon { width: 18px; height: 18px; transition: transform var(--t-micro) var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }

/* ---- header --------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--n200);
  opacity: 0; transition: opacity var(--t-standard) var(--ease);
}
.site-header.is-scrolled::after, .site-header.is-open::after { opacity: 1; }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.site-header__logo img { width: 140px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav__list { display: none; list-style: none; }
.site-nav__list a {
  display: block; padding: 10px 4px; font-weight: 500; text-decoration: none; color: var(--ink);
}
.site-header__cta { display: none; }
.site-header__menu {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; border-radius: var(--radius-md); cursor: pointer;
}
.site-header__menu-close { display: none; }
.site-header.is-open .site-header__menu-open { display: none; }
.site-header.is-open .site-header__menu-close { display: block; }
.site-header.is-open .site-nav__list {
  display: grid; position: absolute; left: 0; right: 0; top: 100%;
  padding: 8px var(--gutter) 24px; background: var(--white); border-bottom: 1px solid var(--n200);
}
.site-header.is-open .site-nav__list a { padding: 14px 0; font-size: 1.25rem; border-bottom: 1px solid var(--n100); }

@media (min-width: 768px) {
  .site-header__cta { display: inline-flex; }
  .site-nav { margin-left: auto; }
}
@media (min-width: 1024px) {
  .site-header__logo img { width: 144px; }
  .site-nav { margin: 0 auto; }
  .site-nav__list, .site-header.is-open .site-nav__list {
    display: flex; gap: 40px; position: static; padding: 0; border: 0; background: none;
  }
  .site-header.is-open .site-nav__list a { padding: 10px 4px; font-size: 1rem; border: 0; }
  .site-header__menu { display: none; }
  .site-nav__list a { position: relative; }
  .site-nav__list a::after {
    content: ""; position: absolute; left: 4px; right: 4px; bottom: 4px; height: 2px; background: var(--amber-500);
    transform: scaleX(0); transform-origin: left; transition: transform var(--t-standard) var(--ease);
  }
  .site-nav__list a:hover::after, .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
}

/* ---- hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--white); }
.hero__content { position: relative; z-index: 3; padding: 40px 0 40px; }
.hero__content .eyebrow { margin-bottom: 24px; }
.hero__content .display { margin-bottom: 24px; }
.hero__content .lead { margin-bottom: 32px; }
.hero__actions { display: grid; gap: 12px; margin-bottom: 20px; }
.trust-row {
  display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none;
  font-size: 0.875rem; line-height: 1.25rem; color: var(--slate);
}
.trust-row li { display: inline-flex; align-items: center; gap: 8px; }
.trust-row .icon { width: 16px; height: 16px; color: var(--amber-700); }

.hero__media { position: relative; height: 420px; overflow: hidden; background: var(--core-dark); }
.hero__media picture, .hero__media img { width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 42% 50%; }

.hero__lines { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hero__line { fill: none; vector-effect: non-scaling-stroke; transform-box: fill-box; }
.hero__line--a { stroke: var(--amber-500); stroke-width: 4px; transform-origin: 0% 100%; }
.hero__line--b { stroke: var(--amber-300); stroke-width: 1.5px; transform-origin: 0% 0%; }
@media (min-width: 1024px) { .hero__line--a { stroke-width: 6px; } .hero__line--b { stroke-width: 2px; } }

.leak-card {
  position: relative; z-index: 3;
  margin: -72px var(--gutter) 0;
  padding: 20px; border-radius: var(--radius-lg);
  background: var(--core-dark); color: var(--white); border: 1px solid var(--n700);
}
.leak-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.leak-card__tag {
  display: inline-block; margin-bottom: 8px; padding: 3px 8px; border-radius: var(--radius-pill);
  font-size: 0.6875rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--core-dark); background: var(--amber-300);
}
.leak-card__title { font-size: 1.25rem; line-height: 1.6rem; font-weight: 650; letter-spacing: -0.015em; }
.leak-card__go {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: var(--radius-pill); background: var(--white); color: var(--core-dark);
}
.leak-card__go .icon { width: 20px; height: 20px; transition: transform var(--t-micro) var(--ease); }
.leak-card__go:hover .icon { transform: translate(2px, -2px); }
.leak-card__list { list-style: none; display: grid; gap: 12px; }
.leak-card__list li { display: flex; align-items: center; gap: 12px; font-size: 0.9375rem; color: var(--n200); }
.leak-card__icon {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  border-radius: var(--radius-pill); background: var(--amber-500); color: var(--core-dark);
}
.leak-card__icon .icon { width: 16px; height: 16px; }

.hero__stat { display: none; }

@media (min-width: 480px) {
  .hero__actions { display: flex; flex-wrap: wrap; }
}
@media (min-width: 768px) {
  .hero__content { padding: 56px 0 48px; }
  .hero__media { height: 540px; }
  .leak-card { max-width: 380px; margin: -120px 0 0 calc(var(--gutter)); }
  .hero__after { padding-bottom: 8px; }
}
@media (min-width: 1024px) {
  .hero { min-height: 640px; }
  .hero__content { width: 44%; padding: 72px 0 88px; }
  .hero__content .lead { max-width: 27em; }
  .hero__media {
    position: absolute; top: 0; bottom: 0; left: 47%; right: 0; height: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14%);
  }
  /* Face sits at ~40% of the photo: anchoring the crop left keeps it to the
     right of the Leak card at every desktop width (measured 1024–1920). */
  .hero__media img { object-position: 0% 45%; }
  .leak-card {
    position: absolute; left: calc(47% - 24px); bottom: 56px; width: 316px; margin: 0;
  }
  .hero__stat {
    display: block; position: absolute; z-index: 3; right: max(var(--gutter), 48px); top: 48px;
    width: 188px; padding: 18px 20px; border-radius: var(--radius-lg);
    background: var(--core-dark); color: var(--white); border: 1px solid var(--n700);
  }
  .hero__stat strong { display: block; font-size: 2.75rem; line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
  .hero__stat span { display: block; margin-top: 4px; font-size: 0.875rem; line-height: 1.25rem; color: var(--n300); }
  .hero__stat i { display: block; width: 32px; height: 2px; margin-bottom: 12px; background: var(--amber-500); }
}
@media (min-width: 1440px) {
  .hero { min-height: 680px; }
  .leak-card { width: 332px; }
}

/* ---- categories band ------------------------------------------------------ */
.band { background: var(--core-dark); color: var(--white); }
.categories { padding: 28px 0; }
.categories__inner { display: grid; gap: 20px; }
.categories__list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.categories__list li { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; color: var(--n200); }
.categories__list .icon { width: 20px; height: 20px; color: var(--n400); }
@media (min-width: 768px) {
  .categories__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .categories { padding: 32px 0; }
  .categories__list { display: flex; justify-content: space-between; gap: 16px; }
  .categories__list li { font-size: 1.0625rem; }
}

@media (min-width: 1280px) {
  .categories__inner { grid-template-columns: auto 1fr; align-items: center; gap: 56px; }
  .categories .eyebrow { white-space: nowrap; }
}

/* ---- sections ------------------------------------------------------------- */
.section { padding: var(--section-y) 0; }
.section-head .eyebrow { margin-bottom: 20px; }
.section-head .h2 { margin-bottom: 20px; }

/* How it works */
.how__grid { display: grid; gap: 32px; }
.how__intro .lead { margin-bottom: 28px; }
.how__title span { display: inline; }
.steps { list-style: none; display: grid; gap: 12px; }
.step {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; align-items: center;
  padding: 20px; border: 1px solid var(--n200); border-radius: var(--radius-md);
  text-decoration: none; color: inherit; background: var(--white);
}
.step__num { grid-row: span 2; font-size: 1.5rem; line-height: 1; font-weight: 700; color: var(--amber-700); letter-spacing: -0.02em; }
.step__title { font-size: 1.125rem; line-height: 1.5rem; font-weight: 650; }
.step__text { grid-column: 2; font-size: 0.9375rem; line-height: 1.375rem; color: var(--slate); }
.step__arrow { grid-column: 3; grid-row: 1 / span 2; color: var(--ink); }
.step__arrow .icon { width: 20px; height: 20px; transition: transform var(--t-micro) var(--ease); }
.step:hover .step__arrow .icon { transform: translateX(3px); }
.step__media { display: none; }

@media (min-width: 1024px) {
  .how__grid { grid-template-columns: 3fr 9fr; gap: 24px; align-items: start; }
  .how__title span { display: block; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .step {
    display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; height: 100%;
    transition: transform var(--t-standard) var(--ease);
  }
  .step:hover { transform: translateY(-4px); }
  .step__body { padding: 24px 24px 20px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 8px; }
  .step__num { grid-row: auto; font-size: 2rem; line-height: 2.375rem; }
  .step__title { font-size: 1.5rem; line-height: 2.375rem; }
  .step__text { grid-column: 1 / -1; font-size: 1rem; line-height: 1.5rem; }
  .step__arrow { display: none; }
  .step__media { display: block; position: relative; margin-top: auto; aspect-ratio: 16 / 10; overflow: hidden; background: var(--core-dark); }
  .step__media img { width: 100%; height: 100%; object-fit: cover; }
  .step__media-go {
    position: absolute; right: 16px; bottom: 16px; display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--core-dark); color: var(--white);
  }
  .step__media-go .icon { width: 20px; height: 20px; transition: transform var(--t-micro) var(--ease); }
  .step:hover .step__media-go .icon { transform: translateX(3px); }
}
.step__body { display: contents; }
@media (min-width: 1024px) { .step__body { display: grid; } }

/* UI panel used as media in step 02 */
.ui-panel { position: absolute; inset: 0; padding: 16px 64px 16px 16px; display: grid; align-content: center; gap: 6px; background: var(--core-dark); }
.ui-panel__row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--n700); color: var(--n200); font-size: 0.8125rem; line-height: 1.25rem;
}
.ui-panel__row .icon { width: 16px; height: 16px; color: var(--n400); }
.ui-panel__row b { margin-left: auto; font-weight: 600; font-size: 0.75rem; color: var(--amber-500); }

/* Principles band */
.principles { position: relative; overflow: hidden; }
.principles__grid { position: relative; z-index: 1; display: grid; gap: 40px; }
.principles .h2 { color: var(--white); }
.principles__lead { color: var(--n300); margin: 20px 0 28px; max-width: 30em; }
.principles__statement { border-top: 2px solid var(--amber-500); padding-top: 24px; }
.principles__statement p { font-size: 1.25rem; line-height: 1.6; color: var(--white); letter-spacing: -0.01em; }
.principles__statement cite { display: block; margin-top: 16px; font-style: normal; font-size: 0.875rem; color: var(--n400); }
.principles__facts { list-style: none; display: grid; gap: 20px; }
.principles__facts li { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 2px; align-content: start; }
.principles__facts .icon { grid-row: span 2; width: 20px; height: 20px; color: var(--amber-500); margin-top: 2px; }
.principles__facts strong { font-size: 1.25rem; line-height: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.principles__facts span { font-size: 0.8125rem; line-height: 1.125rem; color: var(--n300); }
@media (min-width: 1024px) {
  .principles__grid { grid-template-columns: 4fr 4fr 3fr; gap: 24px 56px; align-items: start; }
  .principles__facts { gap: 28px; }
  .principles__statement { margin-top: 44px; }
}

/* Fixes */
.fixes__grid { display: grid; gap: 32px; }
.fix-tiles { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fix-tile {
  display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 148px; padding: 18px 16px 16px;
  border: 1px solid var(--n200); border-radius: var(--radius-md); text-decoration: none; color: inherit; background: var(--white);
  transition: transform var(--t-standard) var(--ease);
}
.fix-tile:hover { transform: translateY(-3px); }
.fix-tile > .icon { color: var(--ink); }
.fix-tile__title { font-size: 0.9375rem; line-height: 1.3rem; font-weight: 600; }
.fix-tile__go { margin-top: auto; }
.fix-tile__go .icon { width: 18px; height: 18px; transition: transform var(--t-micro) var(--ease); }
.fix-tile:hover .fix-tile__go .icon { transform: translateX(3px); }
.fixes__all { margin-top: 28px; }
@media (min-width: 768px) {
  .fix-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .fixes__grid { grid-template-columns: 4fr 8fr; gap: 24px 48px; align-items: start; }
  .fix-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1280px) {
  .fix-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Final CTA */
.final { padding: calc(var(--section-y) * 0.9) 0; }
.final__inner { display: grid; gap: 28px; }
.final .h2 { color: var(--white); max-width: 12em; }
.final__side p { color: var(--n300); margin-bottom: 24px; }
@media (min-width: 1024px) {
  .final__inner { grid-template-columns: 7fr 5fr; align-items: end; gap: 48px; }
}

/* ---- footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--n200); padding: 48px 0 calc(48px + var(--sticky-space, 0px)); }
.site-footer__inner { display: grid; gap: 28px; }
.site-footer__brand img { width: 140px; height: auto; margin-bottom: 16px; }
.site-footer__disclosure { max-width: 36em; font-size: 0.875rem; line-height: 1.375rem; color: var(--slate); }
.site-footer__nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__nav a { display: inline-block; padding: 6px 0; font-size: 0.9375rem; text-decoration: none; color: var(--graphite); }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer__legal { font-size: 0.875rem; color: var(--n500); }
@media (min-width: 1024px) {
  .site-footer__inner { grid-template-columns: 5fr 5fr 2fr; align-items: start; }
  .site-footer__legal { text-align: right; padding-top: 6px; }
}

/* ---- sticky CTA (mobile) --------------------------------------------------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--n200);
  transform: translateY(110%); transition: transform 220ms var(--ease);
}
/* Off-screen = not rendered: its layout box would otherwise still sit over the
   bottom of the viewport for hit-testing and assistive tech (measured with axe). */
.sticky-cta:not(.is-visible) { visibility: hidden; }
.sticky-cta.is-visible { transform: none; }
.has-sticky { --sticky-space: 76px; }
@media (min-width: 768px) {
  .sticky-cta { display: none; }
  .has-sticky { --sticky-space: 0px; }
}

/* ---- inner pages ------------------------------------------------------------ */
.page-hero { padding: 56px 0 32px; }
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero .lead { margin-bottom: 20px; }
.page-hero .lead:last-child { margin-bottom: 0; }
.page-hero .h1 {
  font-weight: 700; font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); line-height: 1.04; letter-spacing: -0.04em;
  margin-bottom: 20px; max-width: 16em;
}
.narrow { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.prose { font-size: 1.0625rem; line-height: 1.7; color: var(--graphite); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.75rem; line-height: 2.25rem; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); margin-top: 2.2em; }
.prose h3 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 650; color: var(--ink); margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose a { color: var(--ink); text-decoration-color: var(--amber-500); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose strong { color: var(--ink); }
.prose .note { padding: 16px 20px; border-left: 3px solid var(--amber-500); background: var(--n050); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 0.975rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 8px; }
.meta-row li {
  padding: 6px 12px; border: 1px solid var(--n200); border-radius: var(--radius-pill);
  font-size: 0.875rem; line-height: 1.25rem; color: var(--graphite); background: var(--white);
}

/* playbook */
.playbook { padding-bottom: var(--section-y); }
.playbook-section { padding-top: 40px; }
.playbook-section > h2, .prose.playbook-section > h2 { margin-top: 0; }
.playbook-section > h2 { display: flex; align-items: baseline; gap: 12px; font-size: 1.75rem; line-height: 2.25rem; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 16px; }
.playbook-section > h2 small { display: inline-flex; align-items: center; gap: 12px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; color: var(--graphite); text-transform: uppercase; }
/* Amber 700 on white is 3.0:1: fine for large display type, not for small labels.
   Small labels stay dark; the amber lives in the dash. */
.playbook-section > h2 small::before { content: ""; width: 24px; height: 2px; background: var(--amber-500); }
.steps-list { list-style: none; counter-reset: step; display: grid; gap: 28px; margin-top: 8px; }
.steps-list > li { counter-increment: step; position: relative; padding-left: 52px; }
/* Narrow phones: less indent so templates inside a step keep their width. */
@media (max-width: 399px) { .steps-list > li { padding-left: 46px; } }
/* Phones: a template inside a step uses the full column, not the step indent. */
@media (max-width: 479px) { .steps-list .template { margin-left: -46px; } }
.steps-list > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--radius-pill); background: var(--core-dark); color: var(--white); font-weight: 700; font-size: 0.9375rem;
}
.steps-list h3 { font-size: 1.25rem; line-height: 2.25rem; font-weight: 650; margin: 0 0 6px; }
.template { margin-top: 16px; border: 1px solid var(--n200); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); }
.template__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 10px 10px 20px; background: var(--core-dark); }
.template__label { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--n200); }
.template__label::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--amber-500); }
.template pre { margin: 0; padding: 20px 24px 24px; white-space: pre-wrap; word-break: break-word; font: 0.9375rem/1.7 var(--font); color: var(--ink); }
.ph { padding: 1px 3px; border-radius: 4px; background: var(--amber-mist); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 0; background: var(--amber-500); color: var(--core-dark); font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.copy-btn .icon { width: 16px; height: 16px; }
.options { display: grid; gap: 16px; margin-top: 8px; }
.option { padding: 20px; border: 1px solid var(--n200); border-radius: var(--radius-md); }
.option h3 { font-size: 1.125rem; line-height: 1.5rem; font-weight: 650; margin-bottom: 8px; }
.option p, .option li { font-size: 1rem; line-height: 1.6; color: var(--graphite); }
.option ul { padding-left: 1.2em; margin-top: 8px; }
.option--disclosed { border-color: var(--n300); background: var(--n050); }
.disclosure { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--amber-mist); font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
@media (min-width: 1024px) {
  .options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.next-fix { margin-top: 56px; padding: 28px; border-radius: var(--radius-lg); background: var(--core-dark); color: var(--white); display: grid; gap: 16px; }
.next-fix p { color: var(--n300); }
@media (min-width: 768px) { .next-fix { grid-template-columns: 1fr auto; align-items: center; } }

/* ---- scan ------------------------------------------------------------------ */
.scan__progress { display: flex; align-items: center; gap: 16px; margin: 8px 0 24px; font-size: 0.875rem; color: var(--slate); }
.scan__bar { position: relative; flex: 1; height: 4px; border-radius: var(--radius-pill); background: var(--n200); overflow: hidden; }
.scan__bar i { position: absolute; inset: 0; background: var(--amber-500); transform-origin: 0 50%; transform: scaleX(0); transition: transform var(--t-standard) var(--ease); }
.question { border: 0; margin: 0; padding: 0; }
.question legend { padding: 0; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.question__hint { color: var(--slate); margin-bottom: 20px; }
.choices { display: grid; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice label {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 14px 18px;
  border: 1px solid var(--n300); border-radius: var(--radius-md); font-weight: 500; cursor: pointer; background: var(--white);
}
.choice label::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: var(--radius-pill); border: 2px solid var(--n400); background: var(--white); }
.choice input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:checked + label::before { border: 6px solid var(--amber-500); }
.choice input:focus-visible + label { outline: 2px solid var(--amber-500); outline-offset: 2px; }
.scan__nav { display: flex; gap: 12px; margin-top: 28px; }
.scan__nav .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.js .question[hidden] { display: none !important; }
.scan__error { margin-top: 12px; color: #b3261e; font-weight: 600; }
.scan__result:focus, .question:focus { outline: none; }
.result__top { list-style: none; display: grid; gap: 16px; margin: 24px 0 40px; }
.result-leak { padding: 24px; border: 1px solid var(--n200); border-radius: var(--radius-lg); }
.result-leak__rank { display: flex; align-items: center; gap: 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); }
.result-leak__rank::before { content: ""; width: 24px; height: 2px; background: var(--amber-500); }
.result-leak h3 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 12px; }
.result-leak dl { display: grid; gap: 10px; margin: 0 0 20px; }
.result-leak dt { font-size: 0.8125rem; font-weight: 600; color: var(--slate); }
.result-leak dd { margin: 2px 0 0; }
.result-map { list-style: none; border: 1px solid var(--n200); border-radius: var(--radius-lg); overflow: hidden; margin: 16px 0 32px; }
.result-map li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--n200); }
.result-map li:first-child { border-top: 0; }
.status { flex: none; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.8125rem; font-weight: 600; }
.status--leaking { background: var(--core-dark); color: var(--white); }
.status--watch { background: var(--amber-mist); color: var(--ink); }
.status--ok { background: var(--n100); color: var(--graphite); }
.result__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- course-first: shared ---------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600; white-space: nowrap;
  background: var(--n100); color: var(--graphite);
}
.chip--live { background: var(--amber-300); color: var(--core-dark); }
.chip--soon { background: var(--n800); color: var(--n300); }
.trust-row--light { color: var(--n300); }
.trust-row--light .icon { color: var(--amber-500); }
.final__actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Thin amber lines drawn as SVG inside dark panels (same language as the hero). */
.invite__lines line, .scan-aside__lines line, .fix-hero__lines line {
  stroke: var(--amber-500); stroke-width: 5px; vector-effect: non-scaling-stroke;
}
.invite__lines line.thin, .scan-aside__lines line.thin, .fix-hero__lines line.thin { stroke: var(--amber-300); stroke-width: 1.5px; }

/* ---- home: course teaser ---------------------------------------------------- */
.course-teaser__grid { display: grid; gap: 40px; }
.course-teaser .lead { margin-bottom: 28px; }
.course-card {
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--core-dark); color: var(--white); border: 1px solid var(--n700);
}
.course-card__head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
.course-card__title { font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.course-card__list { list-style: none; }
.course-card__list li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--n800);
}
.course-card__num { font-weight: 700; color: var(--amber-500); font-variant-numeric: tabular-nums; }
.course-card__name { color: var(--n200); font-size: 0.9375rem; line-height: 1.3rem; }
@media (min-width: 1024px) {
  .course-teaser__grid { grid-template-columns: 5fr 6fr; gap: 72px; align-items: center; }
  .course-card { padding: 32px; }
}

/* ---- course invitation (dialog) --------------------------------------------- */
.invite {
  width: min(100% - 32px, 760px); max-width: none; max-height: calc(100dvh - 32px); padding: 0;
  border: 0; border-radius: var(--radius-lg); overflow: auto;
  background: var(--white); color: var(--ink); box-shadow: 0 24px 64px rgba(13, 13, 15, 0.28);
}
.invite[open] { display: grid; animation: wx-rise var(--t-standard) var(--ease) both; }
.invite::backdrop { background: rgba(13, 13, 15, 0.64); }
/* Focus lands on the title when the dialog opens (autofocus, tabindex=-1), so
   screen readers start at the heading and no control lights up until Tab.
   The title is not a control, so it needs no ring. */
.invite__title:focus-visible { outline: none; }
.invite__panel {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 12px;
  min-height: 112px; padding: 24px; background: var(--core-dark); color: var(--white);
}
/* Lines live in the top-right, away from the number and its label. On the short
   mobile panel they get the right 45% only. */
.invite__lines { position: absolute; top: 0; right: 0; bottom: 0; width: 45%; height: 100%; }
.invite__big { position: relative; font-size: 3.5rem; line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.invite__small { position: relative; padding-bottom: 6px; color: var(--n300); font-weight: 600; }
.invite__body { position: relative; padding: 24px; }
.invite__body .eyebrow { margin-bottom: 14px; }
.invite__title { margin: 0 44px 12px 0; font-size: 1.625rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.invite__text { color: var(--slate); margin-bottom: 24px; }
.invite__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.invite__close {
  position: absolute; top: 12px; right: 12px; display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: var(--radius-pill); background: var(--n100); color: var(--ink); cursor: pointer;
}
.invite__close .icon { width: 20px; height: 20px; }
@media (min-width: 640px) {
  .invite[open] { grid-template-columns: 2fr 3fr; }
  .invite__panel { flex-direction: column; align-items: flex-start; justify-content: flex-end; min-height: 340px; padding: 32px; }
  .invite__lines { width: 100%; }
  .invite__big { font-size: 5.5rem; }
  .invite__body { padding: 44px 36px 36px; }
  .invite__title { font-size: 1.875rem; line-height: 2.25rem; }
}

/* ---- course landing ---------------------------------------------------------- */
.course-hero { position: relative; overflow: hidden; padding: 48px 0 56px; }
.course-hero__grid { display: grid; gap: 40px; }
.course-hero .eyebrow { margin-bottom: 24px; }
.course-hero__title {
  font-weight: 700; font-size: min(12.5vw, 3.25rem); line-height: 1; letter-spacing: -0.045em;
  margin-bottom: 24px; color: var(--white);
}
.course-hero__lead { font-size: 1.125rem; line-height: 1.65; color: var(--n300); max-width: 32em; margin-bottom: 32px; }
.course-hero__media { position: relative; display: grid; gap: 12px; }
.course-hero__media picture { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); background: var(--n800); }
.course-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.progress-card {
  position: relative; z-index: 1; display: grid; gap: 6px; margin: -64px 12px 0; padding: 16px 18px;
  border-radius: var(--radius-lg); background: var(--white); color: var(--ink);
  animation: wx-rise var(--t-standard) var(--ease) 240ms both;
}
.progress-card__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite); }
.progress-card__value { font-size: 1rem; font-weight: 650; }
.progress-card__bar {
  position: relative; display: block; height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--n200);
}
.progress-card__bar i {
  position: absolute; inset: 0; background: var(--amber-500); transform-origin: 0 50%; transform: scaleX(0);
  transition: transform var(--t-standard) var(--ease);
}
.progress-card__note { font-size: 0.75rem; color: var(--slate); }
.upnext-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px;
  border-radius: var(--radius-lg); background: var(--n800); border: 1px solid var(--n700); color: var(--white); text-decoration: none;
  animation: wx-rise var(--t-standard) var(--ease) 320ms both;
}
.upnext-card__label { font-size: 0.8125rem; color: var(--n300); }
.upnext-card__title { font-size: 1rem; line-height: 1.35rem; font-weight: 650; }
.upnext-card__go {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--amber-500); color: var(--core-dark);
}
.upnext-card__go .icon { width: 18px; height: 18px; transition: transform var(--t-micro) var(--ease); }
.upnext-card:hover .upnext-card__go .icon { transform: translateX(3px); }
@media (min-width: 768px) {
  .course-hero__title { font-size: 4rem; }
  .course-hero__lead { font-size: 1.25rem; line-height: 1.55; }
  .course-hero__media { display: block; }
  .course-hero__media picture { aspect-ratio: 16 / 10; }
  .progress-card { position: absolute; left: 20px; bottom: 20px; width: 264px; margin: 0; }
  .upnext-card { position: absolute; right: 20px; top: 20px; width: 300px; background: var(--core-dark); }
}
@media (min-width: 1024px) {
  .course-hero { padding: 88px 0; }
  .course-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
  .course-hero__title { font-size: clamp(3.5rem, 0.4rem + 4.6vw, 5rem); }
  .course-hero__media picture { aspect-ratio: 5 / 4; }
  .progress-card { left: -32px; bottom: 36px; }
  .upnext-card { right: -20px; top: 36px; }
}

.outcomes__head { max-width: 36em; margin-bottom: 40px; }
.outcomes__grid { list-style: none; display: grid; gap: 16px; }
.outcomes__grid li { padding: 24px; border: 1px solid var(--n200); border-radius: var(--radius-lg); }
.outcomes__grid .icon { width: 28px; height: 28px; margin-bottom: 20px; color: var(--ink); }
.outcomes__grid h3 { font-size: 1.125rem; line-height: 1.5rem; font-weight: 650; margin-bottom: 8px; }
.outcomes__grid p { font-size: 0.9375rem; line-height: 1.45rem; color: var(--slate); }
@media (min-width: 768px) { .outcomes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .outcomes__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }

.lesson-format .h2 { color: var(--white); margin-bottom: 40px; }
.format-steps { list-style: none; display: grid; gap: 20px; }
.format-steps li { display: grid; gap: 6px; padding-top: 18px; border-top: 2px solid var(--n700); }
.format-steps li:first-child { border-top-color: var(--amber-500); }
.format-steps b { font-size: 0.875rem; letter-spacing: 0.08em; color: var(--amber-500); }
.format-steps strong { font-size: 1.125rem; font-weight: 650; }
.format-steps span { font-size: 0.9375rem; color: var(--n300); }
@media (min-width: 768px) { .format-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .format-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; } }

.curriculum-section__grid { display: grid; gap: 40px; }
.curriculum-section__intro .lead { margin-bottom: 28px; }
.curriculum { list-style: none; display: grid; gap: 16px; min-width: 0; }
.module { overflow: hidden; border: 1px solid var(--n200); border-radius: var(--radius-lg); background: var(--white); }
.module__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: start; padding: 20px; }
.module__num {
  grid-row: span 2; font-size: 2rem; line-height: 2.25rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--amber-700); font-variant-numeric: tabular-nums;
}
.module__title { font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; letter-spacing: -0.015em; }
.module__promise { font-size: 0.9375rem; line-height: 1.4rem; color: var(--slate); }
.module__count { grid-column: 2; justify-self: start; margin-top: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--graphite); }
.module__lessons { list-style: none; border-top: 1px solid var(--n100); }
.lesson-row {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 20px; border-top: 1px solid var(--n100); color: var(--ink); font-size: 0.9375rem; text-decoration: none;
}
.module__lessons li:first-child .lesson-row { border-top: 0; }
a.lesson-row::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--n050); opacity: 0;
  transition: opacity var(--t-micro) var(--ease);
}
a.lesson-row:hover::before { opacity: 1; }
.lesson-row__state {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-pill);
  border: 2px solid var(--n300); color: var(--core-dark);
}
.lesson-row__state .icon { width: 14px; height: 14px; opacity: 0; }
.lesson-row.is-done .lesson-row__state { border-color: var(--amber-500); background: var(--amber-500); }
.lesson-row.is-done .lesson-row__state .icon { opacity: 1; }
.lesson-row__code { font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.lesson-row__title { font-weight: 600; }
.lesson-row__meta { font-size: 0.8125rem; color: var(--slate); white-space: nowrap; }
.lesson-row.is-soon .lesson-row__title { font-weight: 500; color: var(--slate); }
.lesson-row.is-soon .lesson-row__state { border: 0; color: var(--n500); }
.lesson-row.is-soon .lesson-row__state .icon { width: 16px; height: 16px; opacity: 1; }
.lesson-row[aria-current="page"] { background: var(--amber-mist); }
@media (min-width: 1024px) {
  .curriculum-section__grid { grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
  .curriculum-section__intro { position: sticky; top: calc(var(--header-h) + 32px); }
  .module__head { grid-template-columns: auto minmax(0, 1fr) auto; padding: 24px 28px; }
  .module__count { grid-column: 3; grid-row: 1; margin-top: 6px; }
  .lesson-row { padding: 13px 28px; }
}

.who__grid { display: grid; gap: 32px; }
.who__list { list-style: none; display: grid; gap: 12px; }
.who__list li {
  display: grid; align-content: start; gap: 2px; padding: 18px 20px; border-left: 3px solid var(--amber-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--n050);
}
.who__list strong { font-size: 1.0625rem; }
.who__list span { color: var(--slate); }
.who__note { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--graphite); }
@media (min-width: 1024px) {
  .who__grid { grid-template-columns: 5fr 7fr; gap: 24px 64px; }
  .who__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .who__note { grid-column: 2; }
}

/* ---- lesson pages (premium template) --------------------------------------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 3px; pointer-events: none; }
.read-progress i { display: block; height: 100%; background: var(--amber-500); transform-origin: 0 50%; transform: scaleX(0); }

/* Chapter hero: dark, editorial, with the lesson number as the visual. */
.lesson-hero { position: relative; overflow: hidden; }
.lesson-hero__lines { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lesson-hero__lines line { stroke: var(--amber-500); stroke-width: 5px; vector-effect: non-scaling-stroke; }
.lesson-hero__lines line.thin { stroke: var(--amber-300); stroke-width: 1.5px; }
.lesson-hero__inner { position: relative; z-index: 1; display: grid; padding: 36px 0 36px; }
.lesson-hero__code {
  order: -1; margin-bottom: 14px; font-size: 2.5rem; line-height: 1; font-weight: 700; letter-spacing: -0.05em;
  color: var(--amber-500); font-variant-numeric: tabular-nums;
}
.lesson-hero .eyebrow { margin-bottom: 18px; }
.lesson-title {
  max-width: 15em; margin-bottom: 18px; color: var(--white); font-weight: 700;
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.045em;
}
.lesson-lead { max-width: 36em; margin-bottom: 24px; font-size: 1.125rem; line-height: 1.6; color: var(--n300); }
.lesson-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-meta li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--n700);
  border-radius: var(--radius-pill); font-size: 0.875rem; line-height: 1.25rem; color: var(--n200);
}
.lesson-meta .icon { width: 16px; height: 16px; color: var(--amber-500); }
.lesson-meta__dots { display: inline-flex; gap: 4px; }
.lesson-meta__dots i { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--n700); }
.lesson-meta__dots i.is-past { background: var(--n400); }
.lesson-meta__dots i.is-current { background: var(--amber-500); }
@media (min-width: 768px) { .lesson-lead { font-size: 1.25rem; line-height: 1.55; } }
@media (min-width: 1024px) {
  .lesson-hero__lines { display: block; }
  .lesson-hero__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; padding: 72px 0 64px; }
  .lesson-hero__code {
    order: 0; margin: 0 0 -10px; font-size: clamp(7rem, 3rem + 6.5vw, 11rem); letter-spacing: -0.06em;
    position: relative; color: var(--core-dark); -webkit-text-stroke: 2px var(--amber-500);
  }
}

/* Layout: reading column + a rail (left on desktop, after the lesson on phones). */
.lesson-layout { display: grid; gap: 40px; padding: 40px 0 var(--section-y); }
.lesson-main { min-width: 0; max-width: 720px; }
.lesson-rail { border-top: 1px solid var(--n200); padding-top: 32px; }
.rail { display: grid; gap: 24px; }
.rail__back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 0.9375rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.rail__back .icon { width: 18px; height: 18px; }
.rail__back:hover { text-decoration: underline; }
.rail__progress { display: grid; gap: 8px; font-size: 0.8125rem; color: var(--slate); }
.rail__bar { position: relative; display: block; height: 4px; overflow: hidden; border-radius: var(--radius-pill); background: var(--n200); }
.rail__bar i { position: absolute; inset: 0; background: var(--amber-500); transform-origin: 0 50%; transform: scaleX(0); transition: transform var(--t-standard) var(--ease); }
.rail__title { margin-bottom: 10px; font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); }
.rail__map { display: none; }
.rail__steps { list-style: none; border-left: 2px solid var(--n200); }
.rail__steps a { display: block; margin-left: -2px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; font-size: 0.9375rem; line-height: 1.35; color: var(--slate); text-decoration: none; }
.rail__steps a:hover { color: var(--ink); }
.rail__steps a[aria-current] { border-left-color: var(--amber-500); color: var(--ink); font-weight: 600; }
.rail__lessons { list-style: none; }
.rail .lesson-row { grid-template-columns: 22px 28px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 0; font-size: 0.875rem; }
.rail .lesson-row__meta { display: none; }
.rail .lesson-row[aria-current="page"] { margin: 0 -10px; padding: 9px 10px; border-radius: var(--radius-sm); }
.lesson-row.is-started .lesson-row__state { border-color: var(--amber-500); }
@media (min-width: 1024px) {
  .lesson-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding-top: 56px; }
  .lesson-main { grid-column: 2; grid-row: 1; }
  .lesson-rail { grid-column: 1; grid-row: 1; border-top: 0; padding-top: 0; }
  .rail { position: sticky; top: calc(var(--header-h) + 28px); max-height: calc(100vh - var(--header-h) - 56px); overflow: auto; padding-bottom: 8px; }
  .rail__map { display: block; }
}
@media (min-width: 1280px) { .lesson-layout { grid-template-columns: 260px minmax(0, 720px); gap: 96px; } }

/* Long pages: sections below the fold are laid out only when they come near
   the viewport. Measured on a throttled phone: the lesson load task dropped from
   ~1.2 s to a fraction and mobile performance rose ~7 points. Nothing visible
   changes; `auto` remembers each section's real size once it has rendered. */
.lesson-body > section:not(.l-problem), .lesson-body > .template, .lesson-finish, .curriculum > .module {
  content-visibility: auto; contain-intrinsic-size: auto 600px;
}

/* Body rhythm. :where keeps these at class weight so named blocks win. */
.lesson-body > * + * { margin-top: 56px; }
.lesson-body :where(p) { font-size: 1.0625rem; line-height: 1.7; color: var(--graphite); }
.lesson-body :where(p + p) { margin-top: 12px; }
.lesson-body :where(a) { color: var(--ink); text-decoration-color: var(--amber-500); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lesson-body :where(strong) { color: var(--ink); }
.l-label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite);
}
.l-label::before { content: ""; width: 24px; height: 2px; flex: none; background: var(--amber-500); }

/* Problem + why: the dark moment. */
.l-problem { padding: 28px; border-radius: var(--radius-lg); border-top: 3px solid var(--amber-500); background: var(--core-dark); }
.l-problem .l-label { color: var(--n300); }
.l-problem__text { font-size: 1.1875rem; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; color: var(--white); }
.l-problem__text em { font-style: normal; color: var(--amber-500); }
.l-problem__sub { margin-top: 14px; font-size: 1.0625rem; line-height: 1.7; color: var(--n300); }
.l-problem__why { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--n800); }
.l-problem__why .l-label { margin-bottom: 10px; }
.l-problem__why p:not(.l-label) { font-size: 1.0625rem; line-height: 1.7; color: var(--n200); }
@media (min-width: 768px) {
  .l-problem { padding: 40px; }
  .l-problem__text { font-size: 1.4375rem; line-height: 1.45; }
  .l-problem__why { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .l-problem__why .l-label { margin-top: 4px; white-space: nowrap; }
}

/* Section headings. */
.l-block h2 { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-size: 1.625rem; line-height: 2.1rem; font-weight: 700; letter-spacing: -0.025em; }
.l-num {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: var(--radius-pill);
  background: var(--core-dark); color: var(--white); font-size: 0.9375rem; letter-spacing: 0;
}
@media (min-width: 768px) { .l-block h2 { font-size: 1.875rem; line-height: 2.4rem; } }

/* Method: a numbered flow, not boxes. */
.l-method { list-style: none; counter-reset: m; display: grid; margin: 20px 0; }
.l-method li { counter-increment: m; position: relative; display: grid; gap: 4px; padding: 0 0 24px 56px; }
.l-method li::before {
  content: "0" counter(m); position: absolute; left: 0; top: -2px; font-size: 1.25rem; line-height: 1.75rem; font-weight: 700;
  color: var(--amber-700); font-variant-numeric: tabular-nums;
}
.l-method li::after { content: ""; position: absolute; left: 12px; top: 34px; bottom: 6px; width: 2px; background: var(--n200); }
.l-method li:last-child { padding-bottom: 0; }
.l-method li:last-child::after { display: none; }
.l-method b { font-size: 1.125rem; line-height: 1.5rem; }
.l-method span { font-size: 1rem; line-height: 1.55; color: var(--graphite); }
@media (min-width: 768px) {
  .l-method { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .l-method li { padding: 44px 0 0; }
  .l-method li::after { left: 44px; right: -20px; top: 12px; bottom: auto; width: auto; height: 2px; }
  .l-method li:last-child::after { display: none; }
}

/* Definition grid: hairline rules instead of cards. */
.l-cards { display: grid; gap: 20px 32px; margin-top: 20px; }
.l-cards > div { display: grid; align-content: start; gap: 4px; padding-top: 14px; border-top: 2px solid var(--n200); }
.l-cards strong { font-size: 1.0625rem; }
.l-cards span { font-size: 0.9375rem; line-height: 1.55; color: var(--slate); }
@media (min-width: 640px) { .l-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* System diagram: trigger → conditions → actions → check. */
.l-cards.l-flow { grid-template-columns: 1fr; gap: 22px; }
.l-flow > div {
  position: relative; grid-template-columns: 1fr; padding: 16px 18px; border: 1px solid var(--n200); border-top: 3px solid var(--amber-500);
  border-radius: var(--radius-md); background: var(--white);
}
.l-flow > div + div::before {
  content: ""; position: absolute; left: 28px; top: -24px; width: 2px; height: 20px; background: var(--amber-500);
}
.l-flow > div + div::after {
  content: ""; position: absolute; left: 24px; top: -9px; width: 10px; height: 10px; border-right: 2px solid var(--amber-500);
  border-bottom: 2px solid var(--amber-500); transform: rotate(45deg);
}
@media (min-width: 768px) { .l-flow > div { grid-template-columns: 150px minmax(0, 1fr); column-gap: 20px; align-items: baseline; } }

/* Path diagram: stages on a rail. */
.path { list-style: none; counter-reset: stage; margin-top: 24px; }
.path li { counter-increment: stage; position: relative; display: grid; gap: 2px; padding: 0 0 22px 52px; }
.path li::before {
  content: counter(stage); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: var(--radius-pill); background: var(--amber-500); color: var(--core-dark); font-size: 0.8125rem; font-weight: 700;
}
.path li::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; background: var(--n200); }
.path li:last-child { padding-bottom: 0; }
.path li:last-child::after { display: none; }
.path__stage { font-size: 1.0625rem; font-weight: 700; line-height: 1.75rem; }
.path__what { font-size: 0.9375rem; color: var(--graphite); }
.path__leak { font-size: 0.875rem; color: var(--slate); }
.path--loop li:last-child::after { display: none; }
.path__loop { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-left: 52px; font-size: 0.875rem; font-weight: 600; color: var(--graphite); }
@media (min-width: 768px) {
  .path li { grid-template-columns: 180px minmax(0, 1fr); column-gap: 20px; }
  .path__stage { grid-row: span 2; }
}

/* Steps. */
.lesson-body .steps-list { margin-top: 16px; }
.lesson-body .steps-list h3 { font-size: 1.125rem; line-height: 2.25rem; font-weight: 650; }

/* Callouts and rules. */
.lesson-body .l-callout, .lesson-body .l-rule { position: relative; padding: 16px 20px; border-left: 3px solid var(--amber-500); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--n050); }
.lesson-body .l-callout { margin-top: 20px; font-size: 1rem; }
.lesson-body .l-rule { margin: 8px 0 16px; font-size: 1.3125rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
.l-points { list-style: none; display: grid; gap: 12px; margin-top: 12px; }
.l-points li { position: relative; padding-left: 26px; font-size: 1.0625rem; line-height: 1.6; color: var(--graphite); }
.l-points li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 10px; height: 10px; border-radius: 2px; background: var(--amber-500); }

/* Levels: a staircase from "by hand" to "one platform". */
.levels { list-style: none; counter-reset: lvl; display: grid; gap: 4px; margin-top: 20px; }
.levels > li { counter-increment: lvl; position: relative; padding: 4px 0 20px 26px; border-left: 2px solid var(--n200); }
.levels > li:nth-child(2) { margin-left: 12px; }
.levels > li:nth-child(3) { margin-left: 24px; }
.levels > li:nth-child(4) { margin-left: 36px; }
.levels > li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: var(--radius-pill); background: var(--white); border: 2px solid var(--amber-500); }
.levels__tag { display: block; margin-bottom: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); }
.levels h3 { margin-bottom: 4px; font-size: 1.125rem; line-height: 1.5rem; font-weight: 650; }
.levels .levels__item--disclosed { margin-top: 8px; padding: 20px 22px; border: 1px solid var(--n300); border-radius: var(--radius-md); background: var(--n050); }
.levels .levels__item--disclosed::before { display: none; }
.levels__item--disclosed .disclosure { margin-bottom: 8px; }
.lesson-body .levels__same-team { margin-top: 10px; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
@media (min-width: 768px) {
  .levels > li:nth-child(2) { margin-left: 24px; }
  .levels > li:nth-child(3) { margin-left: 48px; }
  .levels > li:nth-child(4) { margin-left: 72px; }
}

/* Example: a case file. */
.l-example { padding: 28px; border-radius: var(--radius-lg); background: var(--n050); }
.l-example h2 { margin-bottom: 14px; font-size: 1.375rem; line-height: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.l-tag {
  display: inline-block; margin-bottom: 12px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--white);
  border: 1px solid var(--n200); font-size: 0.75rem; line-height: 1.25rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
}
@media (min-width: 768px) { .l-example { padding: 36px; } }
.compare { display: grid; gap: 12px; margin: 16px 0; }
.compare__side { padding: 18px 20px; border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--n200); }
.compare__side--after { border-top: 3px solid var(--amber-500); }
.compare__side--before .compare__label { color: var(--slate); }
.lesson-body .compare__label { margin-bottom: 8px; font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.lesson-body .compare__side p + p { margin-top: 0; }
@media (min-width: 640px) { .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.l-chat { display: grid; gap: 10px; margin: 16px 0; }
.lesson-body .l-chat__msg { max-width: 88%; padding: 14px 16px; border-radius: 16px; font-size: 1rem; line-height: 1.55; }
.lesson-body .l-chat__msg + .l-chat__msg { margin-top: 0; }
.lesson-body .l-chat__msg--in { justify-self: start; border: 1px solid var(--n200); border-bottom-left-radius: 4px; background: var(--white); color: var(--ink); }
.lesson-body .l-chat__msg--out { justify-self: end; border-bottom-right-radius: 4px; background: var(--core-dark); color: var(--white); }
.l-chat__who { display: block; margin-bottom: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.l-timeline { gap: 0; }
.l-points.l-timeline li { padding: 0 0 18px 28px; border-left: 2px solid var(--n300); margin-left: 5px; }
.l-points.l-timeline li:last-child { padding-bottom: 0; }
.l-points.l-timeline li::before { left: -7px; top: 5px; width: 12px; height: 12px; border-radius: var(--radius-pill); background: var(--amber-500); }
.l-points.l-timeline strong { display: block; }
.trace { margin: 16px 0; overflow: hidden; border: 1px solid var(--n200); border-radius: var(--radius-md); background: var(--white); font-size: 0.875rem; }
.trace__row { display: grid; grid-template-columns: 1.1fr 1fr 0.8fr 1.4fr; }
.trace--3 .trace__row { grid-template-columns: 1fr 1.5fr 1fr; }
.trace__row span { padding: 10px 12px; border-top: 1px solid var(--n100); overflow-wrap: anywhere; }
.trace__row--head span { border-top: 0; background: var(--n100); font-weight: 600; color: var(--graphite); }
.trace em { font-style: normal; font-weight: 600; color: var(--ink); }
@media (max-width: 479px) { .trace { font-size: 0.75rem; } .trace__row span { padding: 8px 6px; } }
.measure-grid, .ai-grid { display: grid; gap: 20px 32px; margin-top: 16px; }
.measure-grid > div, .ai-grid > div { display: grid; gap: 4px; padding-top: 14px; border-top: 2px solid var(--n200); }
.measure-grid span, .ai-grid span { font-size: 0.9375rem; color: var(--slate); }
.ai-grid--good > div { border-top-color: var(--amber-500); }
.ai-grid--bad > div { border-top-color: var(--graphite); }
@media (min-width: 640px) { .measure-grid, .ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.matrix__cell { display: grid; align-content: start; gap: 4px; padding: 18px; border: 1px solid var(--n200); border-radius: var(--radius-md); }
.matrix__cell span { font-size: 0.875rem; color: var(--slate); }
.matrix__cell--go { background: var(--core-dark); border-color: var(--core-dark); color: var(--white); }
.matrix__cell--go b { color: var(--amber-500); }
.matrix__cell--go span { color: var(--n300); }
.matrix__cell--later { background: var(--n050); }

/* Exercise: the workbook. */
.l-exercise { position: relative; padding: 28px; border-radius: var(--radius-lg); background: var(--amber-mist); }
.l-exercise h2 { margin-bottom: 6px; font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.lesson-body .l-exercise__count { margin-bottom: 16px; font-size: 0.875rem; font-weight: 600; color: var(--graphite); }
.checklist { list-style: none; display: grid; gap: 8px; }
.checklist label {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--white); font-size: 1rem; line-height: 1.5; cursor: pointer;
}
.checklist input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--core-dark); }
@media (min-width: 768px) { .l-exercise { padding: 36px; } }

/* Takeaway and next action. */
.l-takeaway { padding-top: 32px; border-top: 2px solid var(--core-dark); }
.lesson-body .l-takeaway p { font-size: clamp(1.625rem, 1.1rem + 1.8vw, 2.375rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.035em; color: var(--ink); }
.l-next { display: grid; gap: 8px; padding: 24px 24px 24px 28px; border: 1px solid var(--n200); border-left: 4px solid var(--amber-500); border-radius: var(--radius-md); }
.l-next .l-label { margin-bottom: 0; }
.lesson-body .l-next__text { font-size: 1.1875rem; line-height: 1.55; font-weight: 600; color: var(--ink); }

/* Finish: mark complete, then the next lesson — the loudest thing on the page. */
.lesson-finish { display: grid; gap: 24px; margin-top: 32px; padding: 28px; border-radius: var(--radius-lg); background: var(--core-dark); color: var(--white); }
.lesson-finish__done { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-bottom: 24px; border-bottom: 1px solid var(--n800); }
.lesson-finish__note { font-size: 0.875rem; color: var(--n300); }
.lesson-finish__mark.is-done { background: transparent; border-color: var(--n600); color: var(--white); }
.lesson-finish__mark.is-done .icon { color: var(--amber-500); }
.pager { display: grid; gap: 20px; }
.pager a { text-decoration: none; }
.pager__next { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; color: var(--white); }
.pager__label { font-size: 0.875rem; color: var(--n300); }
.pager__title { font-size: 1.5rem; line-height: 1.9rem; font-weight: 700; letter-spacing: -0.025em; }
.pager__go {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-grid; place-items: center; width: 56px; height: 56px;
  border-radius: var(--radius-pill); background: var(--amber-500); color: var(--core-dark);
}
.pager__go .icon { transition: transform var(--t-micro) var(--ease); }
.pager__next:hover .pager__go .icon { transform: translateX(3px); }
.pager__next.is-ready .pager__label { color: var(--amber-300); }
.pager__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--n800); }
.pager__prev, .pager__all, .pager__share {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 0.9375rem; font-weight: 500; color: var(--n200); cursor: pointer;
}
.pager__prev .icon, .pager__share .icon { width: 16px; height: 16px; flex: none; }
.pager__prev:hover, .pager__all:hover, .pager__share:hover { color: var(--white); text-decoration: underline; }
@media (min-width: 768px) {
  .lesson-finish { padding: 36px 40px; }
  .pager__title { font-size: 1.875rem; line-height: 2.25rem; }
  .pager__share { margin-left: auto; }
}

/* Phones: a little less padding on framed blocks buys reading width. */
@media (max-width: 479px) {
  .l-problem, .l-example, .l-exercise, .lesson-finish { padding: 24px 20px; }
  .l-next { padding: 20px; }
}

.lesson-body > .template + .template { margin-top: 20px; }

/* ---- course ↔ scan ↔ fixes: one product ------------------------------------- */
.btn--lg { min-height: 60px; padding: 0 30px; font-size: 1.0625rem; }
.course-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--n800); }
.course-facts div { display: flex; flex-direction: column-reverse; gap: 4px; }
.course-facts dt { font-size: 0.8125rem; line-height: 1.25rem; color: var(--n300); }
.course-facts dd { margin: 0; font-size: 2.25rem; line-height: 1; font-weight: 700; letter-spacing: -0.04em; color: var(--white); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .course-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.continue-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--amber-500); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.continue-link .icon { width: 18px; height: 18px; }
.result__course .continue-link { color: var(--white); }
.result-lesson {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; margin-top: 16px; padding: 16px 18px;
  border: 1px solid var(--n200); border-radius: var(--radius-md); color: var(--ink); text-decoration: none;
}
.result-lesson::after { content: "→"; grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 1.25rem; font-weight: 600; }
.result-lesson__label { font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); }
.result-lesson__title { font-size: 1.0625rem; font-weight: 650; }
.result-lesson__meta { font-size: 0.8125rem; color: var(--slate); }
.result-lesson:hover .result-lesson__title { text-decoration: underline; }
.result-leak--top .result-lesson { border-color: var(--n700); background: var(--n800); color: var(--white); }
.result-leak--top .result-lesson__label, .result-leak--top .result-lesson__meta { color: var(--n300); }
.result-leak--top .result-lesson::after { color: var(--amber-500); }
.fix-hero__lesson {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 10px; font-size: 0.9375rem; font-weight: 600; color: var(--white);
  text-decoration: underline; text-decoration-color: var(--amber-500); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.fix-hero__lesson .icon { width: 18px; height: 18px; color: var(--amber-500); }
.fix-path { margin-top: 56px; padding: 28px; border-radius: var(--radius-lg); background: var(--n050); }
.fix-path__title { margin-bottom: 16px; font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.fix-path__list { list-style: none; display: grid; gap: 10px; }
.fix-path__list a {
  display: flex; align-items: flex-start; gap: 14px; height: 100%; padding: 16px; border: 1px solid var(--n200); border-radius: var(--radius-md);
  background: var(--white); color: var(--ink); text-decoration: none;
}
.fix-path__list a:hover b { text-decoration: underline; }
.fix-path__num {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: var(--radius-pill);
  background: var(--amber-500); color: var(--core-dark); font-size: 0.8125rem; font-weight: 700;
}
.fix-path__text { display: grid; gap: 2px; }
.fix-path__text span { font-size: 0.9375rem; line-height: 1.45; color: var(--slate); }
@media (min-width: 900px) {
  .fix-path__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fix-path__list a { flex-direction: column; }
}

/* ---- scan (editorial) ------------------------------------------------------ */
.scan-shell { display: grid; }
.scan-aside { position: relative; overflow: hidden; }
/* Sized by width only, anchored top-right: the lines stay in the corner above the
   title however tall the panel grows (the result makes it much taller). */
.scan-aside__lines { position: absolute; top: 0; right: 0; width: 100%; height: auto; pointer-events: none; }
.scan-aside__inner { position: relative; z-index: 1; padding: 40px var(--gutter) 36px; }
.scan-aside .eyebrow { margin-bottom: 20px; }
.scan-aside__title {
  margin-bottom: 16px; font-weight: 700; font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4rem); line-height: 1.02;
  letter-spacing: -0.045em; color: var(--white);
}
.scan-aside__lead { max-width: 30em; font-size: 1.0625rem; line-height: 1.6; color: var(--n300); }
.scan-steps { display: none; list-style: none; counter-reset: q; margin: 36px 0 28px; }
.scan-steps li {
  counter-increment: q; display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--n800);
  font-size: 0.9375rem; color: var(--n400);
}
.scan-steps li::before {
  content: counter(q); display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px;
  border: 1px solid var(--n600); border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 600;
}
.scan-steps li.is-done { color: var(--n300); }
.scan-steps li.is-done::before { background: var(--n700); border-color: var(--n700); color: var(--n200); }
.scan-steps li.is-current { font-weight: 600; color: var(--white); }
.scan-steps li.is-current::before { background: var(--amber-500); border-color: var(--amber-500); color: var(--core-dark); }
.scan-aside__privacy { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; font-size: 0.875rem; color: var(--n300); }
.scan-aside__privacy .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--amber-500); }
.scan-main { min-width: 0; padding: 32px var(--gutter) var(--section-y); }
.scan-card { max-width: 720px; }
.scan-card .question legend { margin-bottom: 10px; font-size: clamp(1.625rem, 1.1rem + 2vw, 2.5rem); line-height: 1.12; letter-spacing: -0.035em; }
.scan-card .choice label { min-height: 64px; padding: 16px 18px; font-size: 1.0625rem; transition: transform var(--t-micro) var(--ease); }
.scan-card .choice label:hover { transform: translateY(-1px); }
.scan-card .choice input:checked + label { background: var(--n050); }
.scan-card .scan__progress { margin-top: 0; }
.result__intro { max-width: 40em; margin-bottom: 20px; font-size: 1.125rem; line-height: 1.6; color: var(--slate); }
.scan-main .result__top { margin: 0 0 32px; }
.result-leak--top { padding: 32px; border: 0; border-top: 3px solid var(--amber-500); background: var(--core-dark); color: var(--white); }
.result-leak--top .result-leak__rank { color: var(--n300); }
.result-leak--top h3 { margin: 10px 0 20px; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.035em; color: var(--white); }
.result-leak--top dt { color: var(--n400); }
.result-leak--top dd { color: var(--n200); }
.result__map-wrap { margin-bottom: 32px; }
.result__map-title { margin-bottom: 4px; font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; }
.result-map li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.result-map__name { font-weight: 600; text-decoration: none; }
.result-map__name:hover { text-decoration: underline; }
.meter { display: inline-flex; gap: 4px; }
.meter i { width: 16px; height: 6px; border-radius: 2px; background: var(--n200); }
.meter i.on { background: var(--amber-500); }
.result__course {
  display: grid; gap: 16px; align-items: center; margin-bottom: 24px; padding: 24px 28px;
  border-radius: var(--radius-lg); background: var(--core-dark); color: var(--white);
}
.result__course .eyebrow { margin-bottom: 8px; color: var(--n300); }
.result__course-title { font-size: 1.375rem; line-height: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.scan__disclaimer { margin-top: 16px; font-size: 0.875rem; color: var(--slate); }
.scan__disclaimer a { color: var(--ink); }
@media (min-width: 640px) { .scan-card .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .result__course { grid-template-columns: minmax(0, 1fr) auto; } }
@media (min-width: 1024px) {
  .scan-shell { grid-template-columns: minmax(360px, 5fr) 7fr; min-height: calc(100vh - var(--header-h)); }
  .scan-aside__inner { position: sticky; top: var(--header-h); padding: 72px 56px; }
  .scan-steps { display: block; }
  .scan-main { padding: 72px 64px var(--section-y); }
}
@media (min-width: 1280px) {
  .scan-main .result__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-leak--top { grid-column: 1 / -1; }
}

/* ---- fixes (editorial) ------------------------------------------------------ */
.fixes-hero { padding: 48px 0 40px; }
.fixes-hero__grid { display: grid; gap: 36px; }
.fixes-hero .eyebrow { margin-bottom: 20px; }
.fixes-hero__title { margin-bottom: 20px; font-weight: 700; font-size: clamp(2.5rem, 1.2rem + 4.4vw, 4.5rem); line-height: 1.02; letter-spacing: -0.045em; }
.fixes-hero .lead { margin-bottom: 28px; }
.includes-card { padding: 28px; border-top: 3px solid var(--amber-500); border-radius: var(--radius-lg); background: var(--core-dark); color: var(--white); }
.includes-card__label {
  margin-bottom: 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--n300);
}
.includes-card__list { list-style: none; }
.includes-card__list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--n800); font-size: 0.9375rem; color: var(--n300); }
.includes-card__list .icon { width: 20px; height: 20px; color: var(--amber-500); }
.includes-card__list b { margin-right: 6px; font-weight: 650; color: var(--white); }
@media (min-width: 1024px) {
  .fixes-hero { padding: 80px 0 56px; }
  .fixes-hero__grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; }
  .includes-card { padding: 32px; }
}
.fixes-list { padding-top: 16px; }
.fix-cards { list-style: none; display: grid; gap: 16px; }
.fix-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 28px;
  border: 1px solid var(--n200); border-radius: var(--radius-lg); background: var(--white); color: inherit; text-decoration: none;
  transition: transform var(--t-standard) var(--ease);
}
.fix-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--amber-500);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-standard) var(--ease);
}
.fix-card:hover { transform: translateY(-4px); }
.fix-card:hover::before { transform: scaleX(1); }
.fix-card__num { position: absolute; top: 28px; right: 28px; font-size: 0.875rem; font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.fix-card__icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px;
  border-radius: var(--radius-pill); background: var(--amber-mist); color: var(--ink);
}
.fix-card__title { font-size: 1.375rem; line-height: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.fix-card__text { color: var(--slate); }
.fix-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.fix-card__go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; font-weight: 600; }
.fix-card__go .icon { width: 18px; height: 18px; transition: transform var(--t-micro) var(--ease); }
.fix-card:hover .fix-card__go .icon { transform: translateX(3px); }
@media (min-width: 768px) { .fix-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .fix-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

.fix-hero { position: relative; overflow: hidden; }
.fix-hero__lines { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fix-hero__inner { position: relative; z-index: 1; padding: 48px 0 44px; }
.fix-hero .eyebrow { margin-bottom: 20px; }
.fix-hero .h1 {
  max-width: 15em; margin-bottom: 20px; font-weight: 700; font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); line-height: 1.04;
  letter-spacing: -0.04em; color: var(--white);
}
.fix-hero .lead { margin-bottom: 24px; color: var(--n300); }
.fix-hero .meta-row li { border-color: var(--n700); border-radius: var(--radius-md); background: transparent; color: var(--n200); }
.fix-layout { display: grid; gap: 8px; }
.fix-content { min-width: 0; max-width: 760px; padding-bottom: var(--section-y); }
.fix-toc { display: none; }
@media (min-width: 1024px) {
  .fix-hero__lines { display: block; }
  .fix-hero__inner { padding: 80px 0 64px; }
  .fix-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 72px; }
  .fix-toc { display: block; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; padding-top: 44px; }
  .fix-toc__title {
    margin-bottom: 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite);
  }
  .fix-toc ol { list-style: none; margin-bottom: 24px; border-left: 2px solid var(--n200); }
  .fix-toc ol a {
    display: block; margin-left: -2px; padding: 7px 0 7px 14px; border-left: 2px solid transparent;
    font-size: 0.9375rem; color: var(--graphite); text-decoration: none;
  }
  .fix-toc ol a:hover { border-left-color: var(--amber-500); color: var(--ink); }
  .fix-toc__course { display: flex; align-items: flex-start; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ink); text-decoration: none; }
  .fix-toc__course:hover { text-decoration: underline; }
  .fix-toc__course .icon { flex: none; width: 18px; height: 18px; }
}

/* ---- 404 ------------------------------------------------------------------- */
.not-found { padding: 96px 0 120px; }

/* ---- motion ---------------------------------------------------------------- */
@keyframes wx-draw { from { transform: scale(0); } to { transform: none; } }
@keyframes wx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero__line--a { animation: wx-draw var(--t-narrative) var(--ease) both; }
.hero__line--b { animation: wx-draw var(--t-narrative) var(--ease) 120ms both; }
.hero__line--c { animation-delay: 60ms; }
.leak-card, .hero__stat { animation: wx-rise var(--t-standard) var(--ease) 260ms both; }
.leak-card__list li { animation: wx-rise var(--t-standard) var(--ease) both; }
.leak-card__list li:nth-child(1) { animation-delay: 380ms; }
.leak-card__list li:nth-child(2) { animation-delay: 440ms; }
.leak-card__list li:nth-child(3) { animation-delay: 500ms; }
.leak-card__list li:nth-child(4) { animation-delay: 560ms; }
.reveal-pending { opacity: 0; transform: translateY(12px); }
.reveal-in { opacity: 1; transform: none; transition: opacity var(--t-standard) var(--ease), transform var(--t-standard) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
  .reveal-pending { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .sticky-cta, .result__actions, .skip-link, .read-progress, .lesson-rail, .lesson-finish, .fix-path { display: none !important; }
  body { color: #000; }
}
