/* ── Learning Leagues: Support role page ─────────────────────────────────
   Design system: "Hextech éditorial". Single dark palette on :root.
   Density tokens (--s) swapped via [data-density].
   Accent hue swapped via [data-accent].
   ───────────────────────────────────────────────────────────────────────── */

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
p { margin: 0; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Color tokens ───────────────────────────────────────────────────────── */

:root {
  --bg:          #070a14;
  --bg-soft:     #0c1222;
  --surface:    #111a2e;
  --surface-2:  #162238;
  --border:      #223152;
  --border-soft: #1a2540;
  --fg:          #e7ecf5;
  --fg-dim:      #a8b3c7;
  --fg-mute:     #6e7a94;
  --accent-or:   #d4b468;
  --accent-ambre:#e39a3c;
  --accent-bleu: #6fa8dc;
  --accent-rouge:#d28585;
  --accent-violet:#a884d0;
  --accent-jade: #5fb38f;
  --rule:        rgba(255,255,255,.09);
  --grid-line:   rgba(127,168,220,.22);
  --gold-soft:   rgba(212,180,104,.12);
  --shadow-lg:   0 30px 60px -30px rgba(0,0,0,.7);
  /* Semantic: win/loss, do/don't, deltas */
  --success:      #9bb777;
  --danger:       #c97a6e;
  --warn:         var(--accent-ambre);
  --success-soft: rgba(155,183,119,.14);
  --danger-soft:  rgba(201,122,110,.14);
}

/* Tier palette: universal LoL constructs */
:root {
  --tier-iron:        #5b5959;
  --tier-bronze:      #a26939;
  --tier-silver:      #9ba6b3;
  --tier-gold:        #e39a3c;
  --tier-platinum:    #4ea3a3;
  --tier-emerald:     #3f9670;
  --tier-diamond:     #6fa8dc;
  --tier-master:      #a868d4;
  --tier-grandmaster: #c9484a;
  --tier-challenger:  #d4b468;
}

/* Accent selector: pick which of the 3 accent tokens is "live" */
:root[data-accent="or"]    { --accent: var(--accent-or);   }
:root[data-accent="ambre"] { --accent: var(--accent-ambre);}
:root[data-accent="bleu"]  { --accent: var(--accent-bleu); }
:root[data-accent="rouge"] { --accent: var(--accent-rouge);}
:root[data-accent="violet"]{ --accent: var(--accent-violet);}
:root[data-accent="jade"]  { --accent: var(--accent-jade); }

/* Role accent: each role guide gets a signature accent without touching the
   palette. Support keeps amber (identical to the default). Place AFTER the
   [data-accent] rules so a future role's accent wins the cascade. */
:root[data-role="support"] { --accent: var(--accent-ambre); }
:root[data-role="adc"]     { --accent: var(--accent-bleu);  }
:root[data-role="top"]     { --accent: var(--accent-rouge); }
:root[data-role="mid"]     { --accent: var(--accent-violet);}
:root[data-role="jungle"]  { --accent: var(--accent-jade); }

/* Spacing scale: strict 8px ladder (Design System §04). 4px is the absolute
   minimum (hairline only); 12px is the only allowed half-step. */
:root {
  --s-05: 4px;
  --s-1:  8px;
  --s-15: 12px;
  --s-2:  16px;
  --s-3:  24px;
  --s-4:  32px;
  --s-5:  40px;
  --s-6:  48px;
  --s-7:  56px;
  --s-8:  64px;
}

/* Layout chrome: nav height + z-index scale.
   Use --nav-h on every sticky offset (toc, tabrail, jumper). Use --z-* to
   avoid ad-hoc z-index values; the scale is sparse so insertions are easy. */
:root {
  --nav-h:     64px;
  --z-base:    1;
  --z-toc:     30;
  --z-sticky:  35;
  --z-nav:     40;
  --z-menu:    50;
  --z-overlay: 100;
}

/* Density: base spacing unit (--s drives existing calc(var(--s) * N) callsites)
   Aere = roomier reading layout (10px base, taller sections, larger body).
   Compact = denser study layout (8px base, tighter sections, smaller body).
   The two MUST differ on --s itself, otherwise the toggle is a no-op. */
:root[data-density="aere"]    { --s: 10px;   --section-y: 140px; --body-size: 16px; }
:root[data-density="compact"] { --s: 8px;    --section-y: 88px;  --body-size: 15px; }

/* On phones, hold body text at the 16px accessibility minimum even in compact
   density (avoids iOS auto-zoom and keeps prose comfortable). */
@media (max-width: 768px) {
  :root[data-density="compact"] { --body-size: 16px; }
}

/* ── Global type ────────────────────────────────────────────────────────── */

body { font-size: var(--body-size); }

.serif { font-family: 'EB Garamond', 'Iowan Old Style', Georgia, serif; font-weight: 500; }
.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; }

h1, h2, h3 { font-family: 'EB Garamond', 'Iowan Old Style', Georgia, serif; font-weight: 500; letter-spacing: -0.01em; margin: 0; }

/* ── Mono labels ("eyebrow" above a title, "tag" in a card or a row) are the
   library's <LL.Eyebrow tone="dim|accent"> (lib/ll-lib.*): never restate the
   recipe here. The library ships no layout for it, so placement is ours:
   .label-slot puts one on its own line. Line-height 0 removes the slot's own
   strut, so the slot is as tall as the label (which sets its own line-height)
   and the parent's text-align still places it. Never inside a heading: the
   Eyebrow goes BEFORE the h2/h3 (library rule). */
.label-slot { display: block; line-height: 0; }

/* ── Gloss: inline term annotations (LoL jargon first-mention) ─────────
   Use <Gloss term="CS"/> in JSX. Renders an <abbr> with a native tooltip.
   Visual: subtle dotted underline that lifts on hover so it doesn't fight
   the body type. Mobile shows the tooltip on tap via title attribute. */
.gloss {
  text-decoration: underline dotted;
  text-decoration-color: color-mix(in oklab, var(--fg-mute) 70%, transparent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: help;
  font-style: inherit;
  transition: text-decoration-color .15s ease;
}
.gloss:hover,
.gloss:focus {
  text-decoration-color: var(--accent);
  color: var(--fg);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.shell { max-width: 1200px; margin: 0 auto; padding: 0 calc(var(--s) * 3); }
@media (max-width: 768px) { .shell { padding: 0 calc(var(--s) * 2); } }

.section { padding-block: var(--section-y); border-top: 1px solid var(--rule); position: relative; }
.section--flush { border-top: 0; padding-top: calc(var(--section-y) * 0.6); }

/* Slot around LL.SectionHead: layout only (distance to the section body). */
.section-head-slot { margin-bottom: calc(var(--s) * 7); }

/* ErrorBoundary fallback message (components.jsx). */
.section-error { color: var(--danger); font-size: 16px; line-height: 1.6; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'EB Garamond', serif; font-size: 20px;
  letter-spacing: 0.01em;
}
.logo-mark {
  width: 24px; height: 24px; flex-shrink: 0;
  color: var(--accent);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  padding: 8px 14px; font-size: 13.5px; color: var(--fg-dim);
  border-radius: 2px; transition: color .15s, background .15s;
  position: relative;
}
.nav-link:hover { color: var(--accent); }
.nav-link[aria-current="page"] {
  color: var(--accent);
}
.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 1px; background: currentColor;
}
.nav-cta {
  padding: 8px 16px; font-size: 13px; letter-spacing: 0.02em;
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 2px; background: transparent;
  cursor: pointer; transition: background .15s;
}
.nav-cta:hover { background: var(--gold-soft); }
/* The header quiz CTA is the library Button since 2026-08-30. .nav-cta-wrap
   is its product layout hook (alignment here, hiding on mobile). The filled
   you-are-here state returned 2026-09-16 as the library's current prop. */
.nav-cta-wrap { display: inline-flex; }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Roles dropdown: replaces the static "Roles" nav link */
.nav-roles { position: relative; display: inline-flex; }
.nav-roles-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 0; cursor: pointer;
  font: inherit;
  font-size: 13.5px;       /* match .nav-link instead of inheriting body's 15px */
}
.nav-roles-caret {
  width: 0.62em; height: 0.5em;       /* sized below cap-height so it doesn't push line-height */
  flex-shrink: 0;
  opacity: 0.95;
  transform: rotate(180deg);          /* user's SVG points up; rotate so the tip always points down */
}
.nav-roles-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  list-style: none; margin: 0; padding: 4px;
  z-index: var(--z-menu);
}
.nav-roles-item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--fg-dim);
  transition: color .15s, background .15s;
}
.nav-roles-item:hover { color: var(--accent); background: var(--surface-2); }

.lang-wrap { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  /* Same vertical formula as the library Button beside it (12px block
     padding, natural line height) so the two stay height-matched. */
  padding: 12px 14px;
  line-height: normal;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  border-radius: 2px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.lang-btn:hover { color: var(--fg); border-color: var(--accent); }
.lang-btn[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.lang-code { font-size: 12px; letter-spacing: 0.06em; }
.lang-chev { opacity: .6; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  list-style: none; margin: 0; padding: 4px;
  z-index: var(--z-menu);
}
.lang-item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--fg-dim);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.lang-item:hover { background: var(--surface-2); color: var(--fg); }
.lang-item .mono { font-size: 10.5px; letter-spacing: 0.12em; color: var(--fg-mute); min-width: 22px; }
.lang-item.is-active { color: var(--accent); }
.lang-item.is-active .mono { color: var(--accent); }
.lang-name { font-family: 'EB Garamond', serif; font-size: 15px; }
/* ── Mobile nav (hamburger) ─────────────────────────────────────────────── */
.nav-burger { display: none; }
.nav-burger-icon { position: relative; display: block; width: 18px; height: 12px; }
.nav-burger-icon i { position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; border-radius: 1px; transition: transform .2s, opacity .2s; }
.nav-burger-icon i:nth-child(1) { top: 0; }
.nav-burger-icon i:nth-child(2) { top: 5px; }
.nav-burger-icon i:nth-child(3) { top: 10px; }
.nav-burger-icon.is-open i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-burger-icon.is-open i:nth-child(2) { opacity: 0; }
.nav-burger-icon.is-open i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-mobile-scrim {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: var(--z-menu);
  background: color-mix(in oklab, var(--bg) 55%, transparent);
}
.nav-mobile {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: calc(var(--z-menu) + 1);
  display: flex; flex-direction: column;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: calc(var(--s) * 2);
  max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
}
.nav-mobile-link { display: block; padding: 12px; font-size: 16px; color: var(--fg-dim); transition: color .15s; }
.nav-mobile-link:hover, .nav-mobile-link.is-active { color: var(--accent); }
.nav-mobile-label {
  display: block; padding: 12px 12px 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-mute);
}
.nav-mobile-sub { display: block; padding: 10px 12px 10px 24px; font-family: 'EB Garamond', serif; font-size: 17px; color: var(--fg-dim); transition: color .15s; }
.nav-mobile-sub:hover { color: var(--accent); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta,
  .nav-cta-wrap { display: none; }    /* primary nav lives in the burger menu */
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--border); border-radius: 2px;
    color: var(--fg-dim); cursor: pointer; transition: color .15s, border-color .15s;
  }
  .nav-burger:hover { color: var(--accent); border-color: var(--accent); }
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.breadcrumb {
  padding: calc(var(--s) * 3) 0 0;
  font-size: 12px;
  color: var(--fg-mute);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}
.breadcrumb .sep { margin: 0 10px; opacity: .5; }
.breadcrumb a:hover { color: var(--fg-dim); }
.breadcrumb .current { color: var(--fg); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--s) * 10) 0 calc(var(--s) * 12);
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: calc(var(--s) * 8);
  align-items: end;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-eyebrow { margin-bottom: calc(var(--s) * 2); }
.hero-eyebrow .dot { display: inline-block; width: 4px; height: 4px; background: var(--accent); margin: 0 10px 3px; vertical-align: middle; transform: rotate(45deg); }
.hero h1 {
  font-size: clamp(32px, 10vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: calc(var(--s) * 4);
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-pullquote {
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 20px;
  font-family: 'EB Garamond', serif;
  font-size: 22px; font-style: italic; line-height: 1.35;
  color: var(--fg);
  margin-bottom: calc(var(--s) * 4);
  margin-left: 10px;
  max-width: 56ch;
}
.hero-intro {
  color: var(--fg-dim);
  max-width: 58ch;
  font-size: 16px; line-height: 1.65;
  margin-bottom: calc(var(--s) * 4);
}

/* hero visual: the Sigil slot. Layout only; the frame, rings and art slot
   are LL.Sigil (lib). The slot sizes and places the square. */
.hero-sigil-slot { width: min(320px, 100%); justify-self: end; }
/* Role position icon (same art as the home page role cards), centred in the
   Sigil's art slot and tinted to the role accent via mask. */
.hero-sigil-icon {
  position: absolute; inset: 0; margin: auto;
  width: 44%; height: 44%;
  background: var(--accent);
  -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain;
  mask-repeat: no-repeat; mask-position: center; mask-size: contain;
}

/* ── Hex background texture (hero only) ─────────────────────────────────── */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 80% 30%, black, transparent 90%);
  pointer-events: none;
  opacity: 0.8;
}
.hero > * { position: relative; }

/* ── Phase cards (Section 01) ─────────────────────────────────────────────
   Subgrid: each card spans the parent's 4 rows (header + 3 items). Rows are
   sized by the tallest content across all 3 cards, so item 01 in card 1
   aligns with item 01 in cards 2 and 3, etc. Result: identical card heights
   AND identical row heights, with a clean 16px rhythm between sections.
*/
.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto auto;
  column-gap: calc(var(--s) * 3);
  row-gap: 0;
  position: relative;
  align-items: stretch;
}
.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 1 / -1;
}
.phase-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 28px; height: 28px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.phase-card::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 28px; height: 28px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.phase-hd {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: calc(var(--s) * 2);
  border-bottom: 1px solid var(--rule);
}
.phase-title { font-size: 24px; }
.phase-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.phase-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: contents;
}
.phase-list li {
  counter-increment: step;
  padding: 12px 0 12px 36px;
  position: relative;
  font-size: 14.5px; line-height: 1.55;
  color: var(--fg-dim);
}
.phase-list li:not(:first-child) {
  border-top: 1px dashed var(--rule);
}
.phase-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* Single-column fallback: subgrid alignment isn't meaningful when cards
   stack vertically, so revert to a plain flex column per card. */
@media (max-width: 900px) {
  .phase-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: calc(var(--s) * 3);
  }
  .phase-card {
    grid-row: auto;
    grid-template-rows: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .phase-list {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
}

/* ── Map (Section 02) ───────────────────────────────────────────────────── */
.map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: calc(var(--s) * 5);
  align-items: stretch;
}
@media (max-width: 1024px) {
  .map-wrap { grid-template-columns: 1fr; }
}
.map-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 1990 / 1323;
  position: relative;
  padding: 12px;
  overflow: hidden;
  /* Without these, aspect-ratio + minmax(0, 1fr) grid track let the frame
     adopt an intrinsic size that overflows the column (~970px instead of
     ~800px at 1366vw), pushing the legend column off-screen and clipping
     its text. width:100% pins the frame to its track; min-width:0 lets
     the grid track shrink below content-min on narrower viewports. */
  width: 100%;
  min-width: 0;
}
.map-image {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: cover;
  filter: saturate(0.92) brightness(0.9);
  z-index: 0;
}
.map-frame .map-pin { z-index: 3; }
.map-frame .map-corners span { z-index: 4; }

.map-corners span {
  position: absolute; width: 10px; height: 10px;
  border-color: var(--accent);
}
.map-corners span:nth-child(1) { top: 6px; left: 6px; border-top: 1px solid; border-left: 1px solid; }
.map-corners span:nth-child(2) { top: 6px; right: 6px; border-top: 1px solid; border-right: 1px solid; }
.map-corners span:nth-child(3) { bottom: 6px; left: 6px; border-bottom: 1px solid; border-left: 1px solid; }
.map-corners span:nth-child(4) { bottom: 6px; right: 6px; border-bottom: 1px solid; border-right: 1px solid; }

/* Riot fan-content credit: required while the official map asset is in use */
.map-credit {
  position: absolute;
  bottom: 16px; left: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  background: rgba(7,10,20,.72);
  padding: 4px 8px;
  border: 1px solid var(--border);
  z-index: 4;
  pointer-events: none;
}
.map-credit .accent { color: var(--accent); }

.map-pin {
  position: absolute;
  width: 30px; height: 30px;
  border: 1.5px solid var(--accent);
  background: rgba(15, 14, 12, 0.55);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition:
    transform   .25s ease,
    background  .25s,
    border-color .25s,
    color       .25s,
    box-shadow  .25s;
}
.map-pin:hover,
.map-pin[data-active="1"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow:
    0 0 0 4px  color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 24px   color-mix(in srgb, var(--accent) 45%, transparent);
  z-index: 2;
  animation: pin-pulse 1.4s ease-in-out infinite;
}
.map-pin::before {
  content: "";
  position: absolute; inset: 3px;
  border: 1px solid currentColor;
  opacity: .35;
  transition: opacity .25s;
}
.map-pin:hover::before,
.map-pin[data-active="1"]::before { opacity: .55; }

@keyframes pin-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent),
      0 0 24px  color-mix(in srgb, var(--accent) 45%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 8px color-mix(in srgb, var(--accent) 8%, transparent),
      0 0 32px  color-mix(in srgb, var(--accent) 65%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-pin:hover, .map-pin[data-active="1"] { animation: none; }
}

.map-legend {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 3);
  display: flex; flex-direction: column;
}
.map-legend h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 calc(var(--s) * 2); font-weight: 500;
}
.legend-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: calc(var(--s) * 1.5);
  padding: calc(var(--s) * 1.5) 0;
  border-bottom: 1px dashed var(--rule);
  cursor: pointer;
  transition: background .15s;
  margin: 0 calc(var(--s) * -3);
  padding-left: calc(var(--s) * 3);
  padding-right: calc(var(--s) * 3);
  align-items: baseline;
}
.legend-item:last-child { border-bottom: 0; }
.legend-item:hover, .legend-item[data-active="1"] { background: var(--bg-soft); }
.legend-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
}
.legend-text { font-size: 13.5px; color: var(--fg-dim); line-height: 1.4; }
.legend-text strong { color: var(--fg); font-weight: 500; }

/* ── Skills (Section 03) ────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--s) * 3);
}
@media (max-width: 768px) {
  .skills-grid { grid-template-columns: 1fr; }
}
.skill {
  padding: calc(var(--s) * 4);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: calc(var(--s) * 2);
  background: var(--surface);
  transition: background .2s, border-color .2s;
  position: relative;
}
.skill::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 22px; height: 22px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.skill:hover { background: var(--surface-2); border-color: var(--accent); }
.skill-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.skill-title { font-size: 22px; line-height: 1.15; margin: 0 0 calc(var(--s) * 0.5); }
.skill-desc { font-size: 14px; color: var(--fg-dim); line-height: 1.6; }
.skill-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: calc(var(--s) * 2);
  display: inline-flex; align-items: center; gap: 6px;
  border-top: 1px dashed var(--rule);
  transition: gap .2s;
}
.skill-link:hover { gap: 12px; }

/* ── Triangle (Section 04) ──────────────────────────────────────────────── */
.triangle-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--s) * 6);
  align-items: center;
}
@media (max-width: 900px) {
  .triangle-wrap { grid-template-columns: 1fr; }
}
.triangle-stage {
  aspect-ratio: 1;
  position: relative;
  padding: 40px 20px;
}
.triangle-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arche-node {
  position: absolute;
  width: min(180px, 44%);
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: pointer;
  z-index: 2;
}
.arche-node[data-corner="bl"] { transform: translate(0, -50%); }
.arche-node[data-corner="br"] { transform: translate(-100%, -50%); }
.arche-node[data-corner="top"] { transform: translate(-50%, 0); }
.arche-node-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 2) calc(var(--s) * 2.5);
  position: relative;
  transition: border-color .2s, background .2s;
}
.arche-node[data-active="1"] .arche-node-inner,
.arche-node:hover .arche-node-inner {
  border-color: var(--accent);
  background: var(--surface-2);
}
.arche-node-inner::before, .arche-node-inner::after {
  content: "◆"; position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 6px;
}
.arche-node-inner::before { left: -3px; }
.arche-node-inner::after { right: -3px; }
.arche-name {
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  color: var(--fg);
  margin-bottom: 4px;
}
.arche-champs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.triangle-legend {
  padding: calc(var(--s) * 3);
  background: var(--surface);
  border: 1px solid var(--border);
}
.triangle-legend h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 calc(var(--s) * 2);
  font-weight: 500;
}
.triangle-legend p {
  font-size: 14px; color: var(--fg-dim); line-height: 1.65;
  margin: 0 0 calc(var(--s) * 2);
}
.triangle-legend p:last-child { margin-bottom: 0; }
.triangle-legend b {
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  background: var(--gold-soft);
  padding: 1px 6px;
  letter-spacing: 0.02em;
}
.triangle-legend strong {
  color: var(--accent-ambre);
  font-weight: 700;
  font-family: inherit;
  background: transparent;
  padding: 0;
}

/* ── Callouts (Section 05) ──────────────────────────────────────────────── */
.callout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--s) * 3);
}
@media (max-width: 900px) {
  .callout-grid { grid-template-columns: 1fr; }
}
/* .callout / .callout-tag / .callout-title / .callout-body: gone. The library's
   LL.Callout carries its own chrome (lib/ll-lib.css). Only .callout-grid stays. */

/* ── Errors (Section 06) ──────────────────────────────────────────────────
   Subgrid: each card spans 4 parent rows (title + Symptom/Cause/Fix). Rows
   auto-size to the tallest content across cards in the same stripe (3 cards
   per stripe at >=900px, 2 at 640-900px). Result: titles align, Symptom
   blocks align, Cause blocks align, Fix blocks align. Same approach as the
   phase cards in Section 01.
*/
.errors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  grid-auto-flow: row;
  column-gap: calc(var(--s) * 3);
  row-gap: calc(var(--s) * 3);     /* gap between stripes (rows of cards) */
  counter-reset: errno;
}
@media (max-width: 900px) {
  .errors-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .errors-grid { grid-template-columns: 1fr; }
}
.error-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  grid-template-columns: auto 1fr; /* counter on the left, title fills the rest */
  grid-row: span 4;
  column-gap: 16px;
  row-gap: 0;
}
.error-card::before {
  content: counter(errno, decimal-leading-zero);
  counter-increment: errno;
  grid-row: 1;
  grid-column: 1;
  align-self: baseline;
  font-family: 'EB Garamond', serif; font-style: italic;
  font-size: 40px;
  color: var(--accent);
  line-height: 1;
  opacity: .7;
}
.error-title {
  grid-row: 1;
  grid-column: 2;
  font-size: 18px; line-height: 2;
  margin-bottom: 8px;
  color: var(--fg);
  border-bottom: 1px solid var(--rule);
}
.error-block {
  grid-column: 1 / -1;             /* span both columns under the header */
  padding: 12px 0;
  display: flex;
  flex-direction: column;
}
.error-block + .error-block {
  border-top: 1px dashed var(--rule);
}
.error-block:last-child {
  padding-bottom: 0;
}
.error-block:nth-child(2) { grid-row: 2; }
.error-block:nth-child(3) { grid-row: 3; }
.error-block:nth-child(4) { grid-row: 4; }
.error-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}
.error-text { font-size: 13.5px; color: var(--fg-dim); line-height: 1.55; }

/* Single-column fallback: subgrid alignment is moot when each card stands
   alone, so revert to a plain flex column with a 24px rhythm between blocks. */
@media (max-width: 640px) {
  .error-card {
    grid-row: auto;
    grid-template-rows: none;
    display: flex;
    flex-direction: column;
  }
}

/* ── Champion cards (Section 07) ────────────────────────────────────────── */
.champ-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--s) * 3);
}
@media (max-width: 900px) { .champ-grid { grid-template-columns: 1fr; } }
.champ-card {
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 460px;
  transition: transform .25s, border-color .25s;
}
.champ-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.champ-portrait {
  aspect-ratio: 1;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.champ-portrait img { width: 100%; height: 100%; object-fit: cover; }
.champ-portrait[data-fallback="1"] img { display: none; }
.champ-portrait[data-fallback="1"]::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--surface-2) 0, var(--surface-2) 6px,
      var(--bg-soft) 6px, var(--bg-soft) 12px
    );
}
.champ-portrait .placeholder-label {
  position: absolute; bottom: 12px; left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em;
  color: var(--fg-mute);
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  z-index: 2;
}
.champ-body { padding: calc(var(--s) * 3); display: flex; flex-direction: column; gap: calc(var(--s) * 1.5); flex: 1; }
.champ-meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.08em; color: var(--fg-mute);
  text-transform: uppercase;
  padding-bottom: calc(var(--s) * 1);
  border-bottom: 1px dashed var(--rule);
}
.champ-name {
  font-size: 34px; line-height: 1;
  margin-top: calc(var(--s) * 0.5);
}
.champ-diff { font-size: 12px; color: var(--fg-mute); font-family: 'JetBrains Mono', monospace; }
.champ-desc { font-size: 13.5px; color: var(--fg-dim); line-height: 1.55; }
.champ-link {
  margin-top: auto;
  padding-top: calc(var(--s) * 2);
  border-top: 1px dashed var(--rule);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--accent);
  display: inline-flex; gap: 6px; align-items: center;
}
.champ-link:hover { gap: 12px; }

/* ── Runes/Build (Section 08) ───────────────────────────────────────────── */
.build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--s) * 3);
}
@media (max-width: 900px) { .build-grid { grid-template-columns: 1fr; } }
.build-block {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 3) calc(var(--s) * 4);
}
/* The archetype label is an LL.Eyebrow placed BEFORE the h3 in the DOM (never
   inside a heading); row-reverse keeps it visually on the right of the title. */
.build-head {
  margin-bottom: calc(var(--s) * 3);
  padding-bottom: calc(var(--s) * 1.5);
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: baseline;
}
.build-block h3 { font-size: 22px; }
.build-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: calc(var(--s) * 2);
  padding: calc(var(--s) * 1.5) 0;
  border-bottom: 1px dashed var(--rule);
  align-items: baseline;
}
.build-row:last-child { border-bottom: 0; }
.build-row dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-mute);
}
.build-row dd { margin: 0; font-size: 14px; color: var(--fg-dim); line-height: 1.5; }

/* ── Matchups (Section 09) ──────────────────────────────────────────────── */
.matchup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.matchup-table th, .matchup-table td {
  text-align: left;
  padding: calc(var(--s) * 2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.matchup-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-mute);
  background: var(--bg-soft);
}
.matchup-table tr:last-child td { border-bottom: 0; }
.matchup-table td.m-name { color: var(--fg); font-family: 'EB Garamond', serif; font-size: 16px; }
.matchup-table td.m-diff .pill {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid currentColor;
}
.pill--easy { color: var(--success); }
.pill--playable { color: var(--accent); }
.pill--hard { color: var(--danger); }
.matchup-table td { color: var(--fg-dim); }
.matchup-table td.m-win b { color: var(--fg); font-weight: 500; }
@media (max-width: 768px) {
  .matchup-table, .matchup-table tbody, .matchup-table tr, .matchup-table td, .matchup-table thead { display: block; width: 100%; }
  .matchup-table thead { display: none; }
  .matchup-table tr { margin-bottom: calc(var(--s) * 2); border-bottom: 1px solid var(--border); padding: calc(var(--s) * 2); }
  .matchup-table td { padding: calc(var(--s) * 1); border-bottom: 0; }
  .matchup-table td::before { content: attr(data-label); display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--fg-mute); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
}

/* ── Checklist (Section 10) ─────────────────────────────────────────────── */
.checklist-wrap {
  display: grid; grid-template-columns: 320px 1fr;
  gap: calc(var(--s) * 5);
  align-items: start;
}
@media (max-width: 900px) { .checklist-wrap { grid-template-columns: 1fr; } }
.checklist-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 4);
  position: sticky; top: 80px;
}
.progress-num {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 80px;
  color: var(--accent);
  line-height: 1;
}
.progress-num .of { color: var(--fg-mute); font-size: 28px; font-style: normal; }
.progress-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-mute);
  margin-top: calc(var(--s) * 1);
  margin-bottom: calc(var(--s) * 2);
}
/* Slot around LL.ProgressBar: layout only (the bar fills its width). */
.progress-bar-slot { margin-bottom: calc(var(--s) * 2); }
.progress-readout {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.55;
}
.progress-readout.ready { color: var(--accent); }

.checklist {
  list-style: none; padding: 0; margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
}
.checklist li {
  display: flex; gap: calc(var(--s) * 2.5);
  padding: calc(var(--s) * 2.5) calc(var(--s) * 3);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background .15s;
  align-items: flex-start;
}
.checklist li:last-child { border-bottom: 0; }
.checklist li:hover { background: var(--surface-2); }
.checklist li.done { opacity: .5; }
.checklist li.done .checklist-text { text-decoration: line-through; text-decoration-color: var(--fg-mute); }
.checklist-box {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  margin-top: 2px;
  position: relative;
  transition: border-color .15s, background .15s;
}
.checklist li:hover .checklist-box { border-color: var(--accent); }
.checklist li.done .checklist-box { background: var(--accent); border-color: var(--accent); }
.checklist li.done .checklist-box::after {
  content: ""; position: absolute;
  left: 5px; top: 2px; width: 5px; height: 9px;
  border-right: 1.5px solid var(--bg); border-bottom: 1.5px solid var(--bg);
  transform: rotate(45deg);
}
.checklist-text { font-size: 14.5px; color: var(--fg-dim); line-height: 1.5; }

/* ── Practice (Section 11) ──────────────────────────────────────────────── */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--s) * 3);
}
@media (max-width: 900px) { .practice-grid { grid-template-columns: 1fr; } }
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 3);
  display: flex; flex-direction: column; gap: calc(var(--s) * 2);
  color: inherit; text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
a.video-card { cursor: pointer; }
a.video-card:hover, a.video-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}
a.video-card:hover .video-title,
a.video-card:focus-visible .video-title { color: var(--accent); }
a.video-card:hover .video-thumb::before,
a.video-card:focus-visible .video-thumb::before { background: rgba(8,12,20,.28); }
.video-thumb {
  aspect-ratio: 16/9;
  background:
    repeating-linear-gradient(-45deg, var(--surface-2) 0 8px, var(--bg-soft) 8px 16px);
  border: 1px solid var(--border);
  position: relative;
}
.video-thumb[data-empty="0"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Play button: dark circle + accent triangle, centred over the thumbnail */
.video-thumb::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(8,12,20,.5); border: 1px solid var(--accent);
  transition: background .2s ease;
}
.video-thumb::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 15px solid var(--accent);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  transform: translateX(3px);
}
.video-duration {
  position: absolute; bottom: 8px; right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  color: var(--fg);
}
.video-title { font-size: 18px; line-height: 1.25; }
.video-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-mute);
}
.exercises { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--s) * 3); margin-top: calc(var(--s) * 3); }
@media (max-width: 900px) { .exercises { grid-template-columns: 1fr; } }
.exercise {
  background: var(--surface);
  border-left: 2px solid var(--accent);
  padding: calc(var(--s) * 3);
  display: flex; flex-direction: column; gap: calc(var(--s) * 1.5);
}
.exercise-title { font-size: 18px; line-height: 1.25; }
.exercise-text { font-size: 13.5px; color: var(--fg-dim); line-height: 1.6; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  margin-top: calc(var(--section-y) * 0.6);
  padding: calc(var(--s) * 8) 0 calc(var(--s) * 4);
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: calc(var(--s) * 6);
  padding-bottom: calc(var(--s) * 6);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand { font-family: 'EB Garamond', serif; font-size: 28px; }
.footer-brand .baseline { display: block; font-family: 'Inter', sans-serif; font-size: 12px; color: var(--fg-mute); margin-top: 6px; letter-spacing: 0.02em; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--s) * 3); }
@media (max-width: 640px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.footer-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 calc(var(--s) * 2); font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--fg-dim);
  padding: 4px 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: calc(var(--s) * 4);
  display: flex; justify-content: space-between; gap: calc(var(--s) * 3);
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--fg-mute);
}
.disclaimer {
  max-width: 780px;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--fg-mute);
}
.disclaimer strong { color: var(--fg-dim); }

/* ── Utility ────────────────────────────────────────────────────────────── */
.center-col { max-width: 740px; margin: 0 auto; }

/* ── Archetype switch (Section 08) ─────────────────────────────────────── */
.archetype-switch {
  display: flex;
  gap: 0;
  margin-bottom: calc(var(--s) * 4);
  border: 1px solid var(--border);
  background: var(--surface);
}
.archetype-tab {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  padding: calc(var(--s) * 2) calc(var(--s) * 3);
  display: flex;
  align-items: baseline;
  gap: 12px;
  cursor: pointer;
  color: var(--fg-dim);
  text-align: left;
  transition: background .15s, color .15s;
}
.archetype-tab:last-child { border-right: 0; }
.archetype-tab:hover { background: var(--surface-2); color: var(--fg); }
.archetype-tab.is-active { background: var(--surface-2); color: var(--fg); }
.archetype-tab .label {
  font-size: 18px;
}
.archetype-tab.is-active {
  position: relative;
}
.archetype-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent);
}
/* Phones: three tabs side by side outgrow the column, so they stack. */
@media (max-width: 768px) {
  .archetype-switch { flex-direction: column; }
  .archetype-tab { border-right: 0; border-bottom: 1px solid var(--border); }
  .archetype-tab:last-child { border-bottom: 0; }
}

/* ── Sidebar TOC ─────────────────────────────────────────────────────────
   Fixed left rail listing all 11 sections. Hidden when there isn't enough
   side gutter to fit it without colliding with the centered .shell (1200px).
*/
.toc {
  position: fixed;
  top: 50%;
  left: calc(var(--s) * 3);
  transform: translateY(-50%);
  z-index: var(--z-toc);
  width: 188px;
  padding: 14px 0;
  pointer-events: auto;
}
.toc-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding: 0 0 10px 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.toc-item {
  position: relative;
}
.toc-link {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 6px 14px 6px 14px;
  color: var(--fg-mute);
  font-size: 12.5px;
  line-height: 1.3;
  border-left: 1px solid var(--rule);
  transition: color .15s, border-color .15s, background .15s;
  cursor: pointer;
  text-decoration: none;
}
.toc-link:hover {
  color: var(--fg-dim);
  border-left-color: var(--border);
}
.toc-num {
  font-size: 10.5px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  font-feature-settings: "tnum";
}
.toc-text {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.toc-item.is-active .toc-link {
  color: var(--accent);
  border-left-color: var(--accent);
}
.toc-item.is-active .toc-num {
  color: var(--accent);
}

/* Compact numbers-only rail when there isn't room for full labels. */
@media (max-width: 1479px) {
  .toc { width: auto; }
  .toc-label { display: none; }
  .toc-link {
    grid-template-columns: 22px;
    padding: 8px 10px;
    border-left: 0;
    border-right: 1px solid var(--rule);
  }
  .toc-text {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 10px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s;
  }
  .toc-link:hover .toc-text {
    opacity: 1;
  }
  .toc-link:hover { border-right-color: var(--border); }
  .toc-item.is-active .toc-link { border-right-color: var(--accent); }
}

@media (max-width: 1199px) {
  .toc { display: none; }
}

/* ── Landing buttons: provided by LearningLeagues-Lib since 2026-08-30
   (lib/ll-lib.css + lib/ll-lib.jsx, vendored at a pin). ──────────────────── */

/* ── Landing: hero ─────────────────────────────────────────────────────── */
.landing-hero { padding: calc(var(--s) * 14) 0 calc(var(--s) * 14); border-bottom: 1px solid var(--rule); }
.landing-hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: calc(var(--s) * 8);
  align-items: center;
}
@media (max-width: 900px) {
  .landing-hero-grid { grid-template-columns: 1fr; gap: calc(var(--s) * 6); }
}
.landing-h1 {
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 calc(var(--s) * 4);
  max-width: 18ch;
}
.landing-h1 em { font-style: italic; color: var(--accent); }
.landing-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 56ch;
  margin: 0 0 calc(var(--s) * 5);
}
.landing-cta-row {
  display: flex; flex-wrap: wrap; gap: calc(var(--s) * 2);
  margin-bottom: calc(var(--s) * 6);
}
.landing-sigil { width: min(360px, 100%); justify-self: end; }
@media (max-width: 900px) { .landing-sigil { justify-self: start; max-width: 240px; } }

/* ── Landing: generic showcase ─────────────────────────────────────────── */
.showcase { padding: calc(var(--s) * 14) 0; border-top: 1px solid var(--rule); position: relative; }
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--s) * 10);
  align-items: center;
}
.showcase-grid--centered {
  grid-template-columns: 1fr;
  justify-items: start;
  margin-bottom: calc(var(--s) * 8);
}
.showcase-grid--centered .showcase-text { max-width: 720px; }
@media (max-width: 900px) {
  .showcase-grid { grid-template-columns: 1fr; gap: calc(var(--s) * 5); }
}
.showcase--reverse .showcase-grid > .showcase-text { order: 2; }
.showcase--reverse .showcase-grid > .showcase-visual { order: 1; }
@media (max-width: 900px) {
  .showcase--reverse .showcase-grid > .showcase-text,
  .showcase--reverse .showcase-grid > .showcase-visual { order: 0; }
}
.showcase-eyebrow { margin-bottom: calc(var(--s) * 2); }
.showcase-title {
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 calc(var(--s) * 3);
  max-width: 16ch;
}
.showcase-title em { font-style: italic; color: var(--accent); }
.showcase-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-dim);
  max-width: 50ch;
  margin: 0 0 calc(var(--s) * 5);
}
.showcase-cta { align-self: flex-start; }

/* ── Landing: Fundamentals visual (curriculum vignette) ────────────────── */
.fund-vignette {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 4);
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.fund-vignette::before, .fund-vignette::after {
  content: ""; position: absolute;
  width: 16px; height: 16px;
  pointer-events: none;
}
.fund-vignette::before { top: -1px; right: -1px;    border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.fund-vignette::after  { bottom: -1px; left: -1px;  border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.fund-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  flex: 1;
}
.fund-cell {
  background: var(--surface);
  padding: calc(var(--s) * 2.5);
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  transition: background .2s;
}
.fund-cell:hover { background: var(--surface-2); }
.fund-cell-num {
  position: absolute; top: 8px; right: 10px;
  font-size: 10px; color: var(--fg-mute); letter-spacing: 0.06em;
}
.fund-cell-label { font-size: 13px; color: var(--fg); line-height: 1.3; font-family: 'EB Garamond', serif; font-size: 16px; }
.fund-credit {
  margin-top: calc(var(--s) * 2);
  font-size: 9.5px; letter-spacing: 0.16em;
  color: var(--fg-mute);
  align-self: flex-end;
}

/* ── Landing: Roles section (signature) ────────────────────────────────── */
.roles-section { padding: calc(var(--s) * 14) 0; border-top: 1px solid var(--rule); }
.roles-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: calc(var(--s) * 2.5);
}
@media (max-width: 1023px) { .roles-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .roles-grid { grid-template-columns: repeat(2, 1fr); } }

.role-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: calc(var(--s) * 1.5);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 5) calc(var(--s) * 3) calc(var(--s) * 4);
  text-align: center;
  isolation: isolate;
  transition: border-color .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
  overflow: visible;
}
/* Two columns on a phone leave each card less than its 88px icon + side padding. */
@media (max-width: 640px) { .role-card { padding-left: calc(var(--s) * 2); padding-right: calc(var(--s) * 2); } }
.role-card-corners span {
  position: absolute; width: 12px; height: 12px;
  opacity: 0;
  transition: opacity .25s ease-out;
}
.role-card-corners span:nth-child(1) { top: -1px; left: -1px;     border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.role-card-corners span:nth-child(2) { top: -1px; right: -1px;    border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.role-card-corners span:nth-child(3) { bottom: -1px; left: -1px;  border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.role-card-corners span:nth-child(4) { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }

.role-card-icon {
  width: 88px; height: 88px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.role-card-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: saturate(0.85) brightness(0.95);
  transition: filter .25s ease;
}
.role-card-name {
  font-size: 22px;
  letter-spacing: 0;
  color: var(--fg);
  transition: color .25s ease;
}
.role-card-blurb {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  transition: color .25s ease-out;
}
.role-card-arrow {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 12px;
  color: var(--fg-mute);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .25s ease-out, transform .25s ease-out, color .25s ease-out;
}

/* hover + focus parity (accessibility): same effect as map pins */
.role-card:hover,
.role-card:focus-visible {
  border-color: var(--accent);
  background: var(--surface-2);
  outline: none;
  box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.18), 0 0 24px rgba(217, 119, 87, 0.45);
  animation: pin-pulse 1.4s ease-in-out infinite;
  z-index: 2;
}
.role-card:hover .role-card-corners span,
.role-card:focus-visible .role-card-corners span { opacity: 1; }
.role-card:hover .role-card-icon img,
.role-card:focus-visible .role-card-icon img {
  filter: saturate(1.1) brightness(1.05);
}
.role-card:hover .role-card-name,
.role-card:focus-visible .role-card-name { color: var(--accent); }
.role-card:hover .role-card-blurb,
.role-card:focus-visible .role-card-blurb { color: var(--fg-dim); }
.role-card:hover .role-card-arrow,
.role-card:focus-visible .role-card-arrow {
  opacity: 1; transform: translateX(0); color: var(--accent);
}

/* ── Landing: Training visual ──────────────────────────────────────────── */
.train-vignette {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 3);
  position: relative;
  display: flex; flex-direction: column;
  gap: calc(var(--s) * 2);
}
.train-vignette::before, .train-vignette::after {
  content: ""; position: absolute;
  width: 16px; height: 16px;
  pointer-events: none;
}
.train-vignette::before { top: -1px; left: -1px;    border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.train-vignette::after  { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.train-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--fg-mute);
  padding-bottom: calc(var(--s) * 2);
  border-bottom: 1px dashed var(--rule);
}
.train-status { color: var(--success); }
.train-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.train-row {
  display: grid;
  grid-template-columns: 36px 1fr 80px 60px;
  gap: calc(var(--s) * 2);
  align-items: baseline;
  padding: calc(var(--s) * 2) calc(var(--s) * 1);
  border-bottom: 1px dashed var(--rule);
  transition: background .15s, color .15s;
}
.train-row:last-child { border-bottom: 0; }
.train-row.is-active {
  background: var(--gold-soft);
  margin: 0 calc(var(--s) * -3);
  padding-left: calc(var(--s) * 3);
  padding-right: calc(var(--s) * 3);
}
.train-row-id { font-size: 11px; color: var(--accent); letter-spacing: 0.06em; }
.train-row.is-active .train-row-id { color: var(--accent); font-weight: 600; }
.train-row-name { font-family: 'EB Garamond', serif; font-size: 18px; color: var(--fg); }
.train-row-tag { text-align: right; }
.train-row-dur { font-size: 11px; color: var(--fg-dim); letter-spacing: 0.06em; text-align: right; }
.train-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: calc(var(--s) * 1);
  padding-top: calc(var(--s) * 2);
  border-top: 1px solid var(--rule);
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--fg-mute);
}
.train-foot-cta { color: var(--accent); }
/* Phones: the fixed tag/duration tracks size to their content and the card
   padding follows the shell gutter, so the drill rows fit a 320px screen. */
@media (max-width: 768px) {
  .train-vignette { padding: calc(var(--s) * 2); }
  .train-row { grid-template-columns: 36px 1fr auto auto; }
  .train-row.is-active {
    margin: 0 calc(var(--s) * -2);
    padding-left: calc(var(--s) * 2);
    padding-right: calc(var(--s) * 2);
  }
}

/* ── Landing: Resources visual ─────────────────────────────────────────── */
.res-vignette {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--s) * 4) calc(var(--s) * 4) calc(var(--s) * 3);
  position: relative;
  display: flex; flex-direction: column;
}
.res-vignette::before, .res-vignette::after {
  content: ""; position: absolute;
  width: 16px; height: 16px;
  pointer-events: none;
}
.res-vignette::before { top: -1px; right: -1px;    border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.res-vignette::after  { bottom: -1px; left: -1px;  border-bottom: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.res-head {
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--fg-mute);
  margin-bottom: calc(var(--s) * 3);
  padding-bottom: calc(var(--s) * 2);
  border-bottom: 1px dashed var(--rule);
}
.res-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(var(--s) * 2); }
.res-row {
  display: grid;
  grid-template-columns: 36px auto 1fr auto;
  gap: calc(var(--s) * 2);
  align-items: baseline;
}
.res-row-num { font-size: 11px; color: var(--accent); letter-spacing: 0.06em; }
.res-row-name { font-size: 22px; letter-spacing: 0.02em; color: var(--fg-dim); transition: color .2s; }
.res-row:hover .res-row-name { color: var(--fg); }
.res-row-line { height: 1px; background: var(--rule); align-self: center; }
.res-foot {
  margin-top: calc(var(--s) * 4);
  padding-top: calc(var(--s) * 3);
  border-top: 1px solid var(--rule);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--fg-mute);
  font-style: italic;
}
@media (max-width: 768px) {
  .res-vignette { padding-left: calc(var(--s) * 2); padding-right: calc(var(--s) * 2); }
  .res-row { column-gap: calc(var(--s) * 1); }
}

/* ── Fundamentals page ─────────────────────────────────────────────────────
   The Fundamentals page is now self-contained in fundamentals.css (.ft-*).
   ───────────────────────────────────────────────────────────────────────── */

/* ── Glossary page ──────────────────────────────────────────────────────── */

/* Letter jumper: sticky horizontal index, A B C... */
.glossary-jumper {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--s) * 1);
  margin-bottom: calc(var(--s) * 6);
  padding-bottom: calc(var(--s) * 3);
  border-bottom: 1px dashed var(--rule);
  position: sticky;
  top: var(--nav-h);
  background: var(--bg);
  z-index: var(--z-sticky);
  padding-top: calc(var(--s) * 2);
}
.glossary-jumper-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  color: var(--fg-mute);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.glossary-jumper-link:hover,
.glossary-jumper-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--gold-soft);
  outline: none;
}

/* Letter groups: A / B / ... section banners */
.glossary-group {
  scroll-margin-top: 112px; /* offset for sticky nav + jumper */
  margin-bottom: calc(var(--s) * 6);
}
.glossary-letter {
  font-size: 56px;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 calc(var(--s) * 3) 0;
  letter-spacing: -0.02em;
  position: relative;
  padding-left: calc(var(--s) * 1.5);
}
.glossary-letter::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  opacity: .55;
}

/* The list itself */
.glossary-list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.glossary-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: calc(var(--s) * 3);
  padding: calc(var(--s) * 2) 0;
  border-bottom: 1px dashed var(--rule);
  align-items: baseline;
}
.glossary-entry:last-child { border-bottom: 0; }
.glossary-term {
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  color: var(--fg);
  font-weight: 500;
  margin: 0;
}
.glossary-def {
  font-size: 14.5px;
  color: var(--fg-dim);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 768px) {
  .glossary-entry {
    grid-template-columns: 1fr;
    gap: calc(var(--s) * 0.5);
  }
  .glossary-letter { font-size: 44px; }
  .glossary-jumper { top: 56px; }
}

