:root {
  --paper: #f3f6fb;
  --surface: #ffffff;
  --ink: #14213d;
  --ink-2: #263653;
  --muted: #5d6a82;
  --rule: #ccd5e4;
  --rule-dark: #94a3bc;
  --blue: #2758cc;
  --blue-dark: #173d9c;
  --blue-pale: #e5ecff;
  --teal: #087b6c;
  --teal-pale: #dff3ed;
  --yellow: #f3c54f;
  --orange: #d66a25;
  --red: #b23a48;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  --page: 1340px;
  --reading: 820px;
  --ease: 180ms ease;
}

* { box-sizing: border-box; }
html { min-width: 1100px; background: var(--paper); color: var(--ink); scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; min-width: 1100px; color: var(--ink); background: linear-gradient(90deg, rgba(39,88,204,.032) 1px, transparent 1px) 0 0 / 96px 100%, var(--paper); font: 16.5px/1.78 var(--sans); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
::selection { background: rgba(39,88,204,.18); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--blue); }
button, input, textarea { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
svg path, svg line, svg polyline { vector-effect: non-scaling-stroke; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
h1 { line-height: 1.08; } h2 { line-height: 1.24; } h3 { line-height: 1.4; }
p, li, dd, figcaption { text-wrap: pretty; }
code { padding: 2px 5px; border-radius: 3px; background: #e8edf6; font: .9em/1.5 var(--mono); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { background: #e9eef8; color: var(--ink); font-size: 14px; }
td { background: rgba(255,255,255,.7); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; top: -80px; left: 24px; z-index: 100; padding: 10px 16px; border: 2px solid var(--ink); background: #fff; transition: top var(--ease); }
.skip-link:focus { top: 12px; }
.site-header { position: relative; z-index: 20; display: grid; grid-template-columns: 210px 1fr 150px; align-items: center; width: min(calc(100% - 64px), var(--page)); height: 78px; margin: 0 auto; border-bottom: 1px solid var(--rule-dark); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; width: max-content; text-decoration: none; }
.brand span { font: 700 26px/1 var(--serif); letter-spacing: .04em; }
.brand small { color: var(--blue); font: 800 11px/1 var(--sans); letter-spacing: .16em; }
.site-header nav { display: flex; justify-content: center; gap: 30px; }
.site-header nav a { position: relative; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-header nav a::after { position: absolute; right: 50%; bottom: -12px; left: 50%; height: 3px; background: var(--blue); content: ""; transition: left var(--ease), right var(--ease); }
.site-header nav a:hover::after, .site-header nav a[aria-current="page"]::after { right: 0; left: 0; }
.search-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--rule-dark); border-radius: 4px; background: rgba(255,255,255,.7); cursor: pointer; }
.search-trigger svg, .search-close svg, [data-copy] svg, .chapter-pagination svg, .back-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-trigger span { font-size: 13px; font-weight: 700; }
.search-trigger kbd { padding: 1px 6px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; color: var(--muted); font: 12px var(--mono); }

.page-shell { width: min(calc(100% - 80px), 1280px); margin: 0 auto; padding: 72px 0 120px; }
.page-intro { display: grid; grid-template-columns: minmax(0, 820px) 300px; align-items: end; gap: 80px; padding: 20px 0 48px; border-bottom: 3px solid var(--ink); }
.eyebrow, .section-title > span, .section-heading > span, .chapter-kicker span, .opening-problem > span, .behavior-trace > div:first-child > span, .mastery > div:first-child > span, .chapter-close > div > span, .template-card > span { color: var(--blue); font: 800 12px/1.2 var(--sans); letter-spacing: .15em; text-transform: uppercase; }
.page-intro h1 { max-width: 850px; margin: 14px 0 20px; font-size: 64px; }
.page-intro p { margin: 0; color: var(--ink-2); font-size: 18px; }
.page-intro aside { padding: 20px 0 6px 24px; border-left: 5px solid var(--yellow); }
.page-intro aside b { display: block; margin-bottom: 8px; font: 600 38px/1 var(--serif); }
.page-intro aside span { color: var(--muted); font-size: 14px; }
.section-heading { display: flex; align-items: baseline; gap: 18px; margin-bottom: 28px; }
.section-heading h2, .section-title h2 { margin: 0; font-size: 36px; }
.section-heading p { max-width: 590px; margin: 0 0 0 auto; color: var(--muted); }

/* Home */
.home-hero { position: relative; display: grid; grid-template-columns: 1.12fr .88fr; width: min(calc(100% - 64px), var(--page)); min-height: 690px; margin: 0 auto; border-bottom: 1px solid var(--rule-dark); }
.home-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 88px 78px 88px 0; border-right: 1px solid var(--rule-dark); }
.home-hero-copy .eyebrow { display: flex; align-items: center; gap: 12px; }
.home-hero-copy .eyebrow::before { width: 34px; height: 4px; background: var(--yellow); content: ""; }
.home-hero h1 { max-width: 760px; margin: 26px 0 26px; font-size: clamp(62px, 6vw, 90px); }
.home-hero h1 em { color: var(--blue); font-style: normal; }
.home-hero-copy > p { max-width: 700px; color: var(--ink-2); font-size: 19px; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; }
.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 20px; border: 2px solid var(--ink); border-radius: 3px; font-size: 14px; font-weight: 800; text-decoration: none; transition: transform var(--ease), background var(--ease), color var(--ease); }
.button-primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-2px); }
.button-secondary:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.home-hero-visual { display: flex; flex-direction: column; justify-content: center; padding: 70px 0 70px 70px; }
.home-system-card { position: relative; padding: 34px; border: 2px solid var(--ink); background: #fff; box-shadow: 18px 18px 0 var(--blue-pale); }
.home-system-card::before { position: absolute; top: -9px; right: 22px; width: 76px; height: 17px; background: var(--yellow); content: ""; transform: rotate(-2deg); }
.home-system-card > span { color: var(--muted); font: 800 12px var(--mono); letter-spacing: .1em; }
.home-system-card h2 { margin: 10px 0 26px; font-size: 33px; }
.os-loop { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.os-loop div { min-height: 115px; padding: 20px; background: var(--paper); border-left: 4px solid var(--blue); }
.os-loop div:nth-child(2) { border-color: var(--teal); }.os-loop div:nth-child(3) { border-color: var(--orange); }.os-loop div:nth-child(4) { border-color: var(--yellow); }
.os-loop b { display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 21px; }.os-loop small { color: var(--muted); font-size: 13px; line-height: 1.55; }
.proof-strip { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); width: min(calc(100% - 64px), var(--page)); margin: 38px auto 0; border: 1px solid var(--rule-dark); background: #fff; }
.proof-strip > div { min-height: 110px; padding: 24px; border-right: 1px solid var(--rule); }.proof-strip > div:last-child { border-right: 0; }
.proof-strip b { display: block; margin-bottom: 6px; font: 600 29px var(--serif); }.proof-strip span { color: var(--muted); font-size: 13px; }
.proof-strip .proof-intro { background: var(--ink); color: #fff; }.proof-strip .proof-intro b { font-size: 21px; }.proof-strip .proof-intro span { color: #cbd4e5; }
.home-section { width: min(calc(100% - 80px), 1280px); margin: 0 auto; padding: 96px 0; }
.home-section + .home-section { border-top: 1px solid var(--rule-dark); }
.stage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stage-card { min-height: 290px; padding: 24px; border: 1px solid var(--rule-dark); background: rgba(255,255,255,.82); text-decoration: none; transition: transform var(--ease), box-shadow var(--ease); }
.stage-card:hover { color: inherit; transform: translateY(-5px); box-shadow: 0 12px 30px rgba(20,33,61,.1); }
.stage-card > span { color: var(--blue); font: 800 13px var(--mono); }
.stage-card h3 { margin: 38px 0 12px; font-size: 28px; }.stage-card p { color: var(--muted); font-size: 14px; }.stage-card b { display: block; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; }
.difference-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.difference-grid article { padding: 30px; border-top: 5px solid var(--blue); background: #fff; }.difference-grid article:nth-child(2) { border-color: var(--teal); }.difference-grid article:nth-child(3) { border-color: var(--yellow); }.difference-grid h3 { font-size: 25px; }.difference-grid p { margin-bottom: 0; color: var(--muted); }
.boundary-banner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 60px; padding: 44px; background: var(--ink); color: #fff; }.boundary-banner h2 { margin: 10px 0 0; font-size: 38px; }.boundary-banner p { color: #d4dbea; }.boundary-banner a { color: #fff; font-weight: 800; }

/* Roadmap and general cards */
.roadmap-grid { margin-top: 56px; }
.roadmap-stage { display: grid; grid-template-columns: 170px 1fr; border-top: 1px solid var(--rule-dark); }
.roadmap-stage:last-child { border-bottom: 1px solid var(--rule-dark); }
.roadmap-stage > header { padding: 34px 28px 34px 0; border-right: 1px solid var(--rule-dark); }
.roadmap-stage > header span { color: var(--blue); font: 800 13px var(--mono); }.roadmap-stage > header h2 { margin: 18px 0 8px; font-size: 30px; }.roadmap-stage > header p { color: var(--muted); font-size: 14px; }
.roadmap-chapters { display: grid; grid-template-columns: repeat(3, 1fr); }
.roadmap-chapters a { min-height: 235px; padding: 30px; border-right: 1px solid var(--rule); text-decoration: none; }.roadmap-chapters a:last-child { border-right: 0; }.roadmap-chapters a:hover { background: #fff; color: inherit; }
.roadmap-chapters small { color: var(--blue); font: 800 12px var(--mono); }.roadmap-chapters h3 { margin: 18px 0 12px; font-size: 23px; }.roadmap-chapters p { color: var(--muted); font-size: 14px; }
.week-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 50px; }.week-grid article { padding: 22px; border: 1px solid var(--rule); background: #fff; }.week-grid span { color: var(--blue); font: 800 12px var(--mono); }.week-grid h3 { margin: 14px 0 8px; font-size: 21px; }.week-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.audit-note { margin-top: 48px; padding: 30px; border-left: 5px solid var(--yellow); background: #fff; }

/* Chapter */
.reading-progress { position: fixed; top: 0; left: 0; z-index: 50; width: 100%; height: 4px; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.chapter-layout { display: grid; grid-template-columns: 280px minmax(0, 880px); gap: 70px; width: 1230px; margin: 0 auto; padding: 70px 0 120px; }
.chapter-sidebar { position: sticky; top: 26px; align-self: start; max-height: calc(100vh - 52px); overflow: auto; padding-right: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-decoration: none; }.chapter-sidebar > p:not(.sidebar-title) { margin: 46px 0 8px; color: var(--blue); font: 800 12px var(--mono); letter-spacing: .1em; }.chapter-sidebar .sidebar-title { margin: 0 0 28px; font: 600 24px/1.35 var(--serif); letter-spacing: -.02em; text-wrap: balance; }.chapter-sidebar nav { border-top: 1px solid var(--rule-dark); }.chapter-sidebar nav a { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 13px; line-height: 1.45; text-decoration: none; }.chapter-sidebar nav a:hover { color: var(--blue); }.chapter-sidebar nav span { font: 12px var(--mono); }
.chapter-main { min-width: 0; }
.chapter-hero { padding: 12px 0 52px; border-bottom: 3px solid var(--ink); }.chapter-kicker { display: flex; align-items: center; gap: 12px; }.chapter-kicker b { padding: 5px 9px; border-radius: 2px; background: var(--yellow); font-size: 12px; }.chapter-hero h1 { margin: 24px 0 22px; font-size: 58px; }.chapter-hero > p { max-width: 800px; color: var(--ink-2); font-size: 19px; }.chapter-hero dl { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 0; margin: 32px 0 0; border: 1px solid var(--rule-dark); }.chapter-hero dl div { padding: 17px 18px; border-right: 1px solid var(--rule); }.chapter-hero dl div:last-child { border-right: 0; }.chapter-hero dt { color: var(--muted); font-size: 12px; font-weight: 800; }.chapter-hero dd { margin: 5px 0 0; font-size: 14px; }
.opening-problem { margin: 48px 0; padding: 30px 34px; border-left: 6px solid var(--yellow); background: var(--ink); color: #fff; }.opening-problem > span { color: #f7d979; }.opening-problem p { margin: 12px 0 0; font: 21px/1.75 var(--serif); }
.anchor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 72px; }.anchor-grid article { padding: 22px; border: 1px solid var(--rule); background: #fff; }.anchor-grid article > span { color: var(--blue); font: 800 12px var(--mono); }.anchor-grid h2 { margin: 18px 0 9px; font-size: 20px; }.anchor-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.lesson-section { margin: 0 0 78px; }.lesson-section > header { display: grid; grid-template-columns: 45px 1fr; gap: 18px; align-items: baseline; padding-bottom: 18px; border-bottom: 1px solid var(--rule-dark); }.lesson-section > header span { color: var(--blue); font: 800 13px var(--mono); }.lesson-section > header h2 { margin: 0; font-size: 34px; }.lesson-prose { padding: 28px 0 0 63px; }.lesson-prose > p, .lesson-prose > ol, .lesson-prose > ul, .lesson-prose > table, .lesson-prose > blockquote, .lesson-prose > div, .lesson-prose > aside { max-width: var(--reading); }.lesson-prose p { margin-bottom: 20px; }.lesson-prose table { margin: 26px 0; font-size: 14px; }.lesson-prose blockquote { margin: 28px 0; padding: 22px 26px; border-left: 5px solid var(--blue); background: #fff; font: 18px/1.75 var(--serif); }.lesson-prose ol, .lesson-prose ul { padding-left: 24px; }.lesson-prose li { margin-bottom: 10px; }
.worked-example { margin: 28px 0; padding: 24px 26px; border: 1px solid var(--rule-dark); background: #fff; }.worked-example > span { display: block; margin-bottom: 10px; color: var(--teal); font: 800 12px var(--sans); letter-spacing: .12em; }.worked-example p:last-child { margin-bottom: 0; }
.lesson-check { margin: 28px 0; padding: 22px 26px; border-left: 5px solid var(--yellow); background: #fff7dc; }.lesson-check strong { display: block; margin-bottom: 8px; }.lesson-check p:last-child { margin-bottom: 0; }
.dialogue-trace { margin: 28px 0; padding: 26px; border: 1px solid var(--rule); background: #edf1f8; }.dialogue-trace p { margin-bottom: 12px; }
.lesson-section figure { margin: 34px 0 0 63px; max-width: var(--reading); }.lesson-section figure img { width: 100%; border: 1px solid var(--rule-dark); border-radius: 4px; background: #fff; }.lesson-section figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; }
.behavior-trace, .misconceptions, .stuck, .practice-block, .mastery, .chapter-close { margin: 88px 0; }
.behavior-trace { padding: 38px; border: 2px solid var(--ink); background: #fff; }.behavior-trace h2 { margin: 10px 0 12px; font-size: 34px; }.behavior-trace > div:first-child p { color: var(--muted); }.trace-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 18px; }.trace-compare article { padding: 24px; background: #f7e9eb; }.trace-compare article:last-child { background: var(--teal-pale); }.trace-compare b { display: block; margin-bottom: 10px; }.trace-compare p { margin: 0; }.trace-why { margin: 0; padding-top: 18px; border-top: 1px solid var(--rule); }
.section-title { margin-bottom: 24px; }.section-title h2 { margin-top: 10px; }
.misconceptions > div:last-child { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }.misconceptions article { padding: 26px; border-top: 4px solid var(--red); background: #fff; }.misconceptions h3 { font-size: 22px; }.misconceptions p { margin: 0; color: var(--muted); }
.stuck { padding: 34px 38px; background: var(--blue-pale); }.stuck ol { margin: 0; padding-left: 24px; }.stuck li { margin-bottom: 10px; }
.practice-block { padding: 40px; background: var(--ink); color: #fff; }.practice-block .section-title > span { color: #8fb0ff; }.practice-block > article { position: relative; margin-top: 22px; padding: 30px; background: #fff; color: var(--ink); }.practice-block > article > span { position: absolute; top: 26px; right: 26px; color: var(--blue); font: 800 13px var(--mono); }.practice-block h3 { max-width: 680px; margin-bottom: 24px; font-size: 26px; }.practice-block dl { display: grid; grid-template-columns: 150px 1fr; margin: 0; border-top: 1px solid var(--rule); }.practice-block dt, .practice-block dd { padding: 13px 0; border-bottom: 1px solid var(--rule); }.practice-block dt { color: var(--blue); font: 800 12px var(--mono); }.practice-block dd { margin: 0; }
.mastery { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 34px 0; border-top: 3px solid var(--yellow); border-bottom: 1px solid var(--rule-dark); }.mastery h2 { margin: 10px 0 0; font-size: 31px; }.mastery details { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--rule-dark); background: #fff; }.mastery summary { cursor: pointer; font-weight: 800; }.mastery details p { margin: 14px 0 0; }
.chapter-close { padding: 38px; background: var(--blue); color: #fff; }.chapter-close > div > span { color: #b9cbff; }.chapter-close h2 { margin: 10px 0 22px; font-size: 34px; }.chapter-close ol { margin: 0 0 24px; padding-left: 24px; }.chapter-close p { margin: 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.35); }
.chapter-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 70px; }.chapter-pagination a { display: flex; align-items: center; gap: 15px; min-height: 88px; padding: 20px; border: 1px solid var(--rule-dark); background: #fff; text-decoration: none; }.chapter-pagination a.next { justify-content: flex-end; text-align: right; }.chapter-pagination small { display: block; color: var(--muted); font-size: 12px; }.chapter-pagination svg { flex: 0 0 auto; }

/* Support pages */
.practice-grid, .template-grid, .source-grid, .glossary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
.practice-card, .template-card, .source-card, .glossary-card { padding: 28px; border: 1px solid var(--rule-dark); background: #fff; }
.practice-card > span, .source-card > span { color: var(--blue); font: 800 12px var(--mono); }.practice-card h2, .template-card h2, .source-card h2 { margin: 22px 0 12px; font-size: 25px; }.practice-card p, .template-card p, .source-card p, .glossary-card p { color: var(--muted); }
.practice-card dl { display: grid; grid-template-columns: 92px 1fr; margin: 22px 0 0; }.practice-card dt, .practice-card dd { padding: 10px 0; border-top: 1px solid var(--rule); }.practice-card dt { color: var(--blue); font: 800 12px var(--mono); }.practice-card dd { margin: 0; font-size: 14px; }
.template-card { position: relative; }.template-card pre { max-height: 360px; overflow: auto; padding: 20px; background: var(--paper); color: var(--ink-2); white-space: pre-wrap; font: 13px/1.7 var(--mono); }.template-card button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--rule-dark); background: #fff; cursor: pointer; font-size: 13px; font-weight: 800; }
.source-grid { grid-template-columns: 1fr 1fr; }.source-card a { color: var(--blue); font-weight: 800; }.source-card .accessed { color: var(--muted); font: 12px var(--mono); }
.glossary-grid { grid-template-columns: repeat(2, 1fr); }.glossary-card h2 { margin-bottom: 8px; font-size: 23px; }.glossary-card p { margin: 0; }
.project-brief { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; margin-top: 52px; }.project-brief > div { padding: 34px; border: 1px solid var(--rule-dark); background: #fff; }.project-brief h2 { font-size: 31px; }.project-brief li { margin-bottom: 10px; }
.deliverable-list { counter-reset: item; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; padding: 0; list-style: none; }.deliverable-list li { position: relative; min-height: 130px; padding: 24px 24px 24px 72px; border: 1px solid var(--rule); background: #fff; }.deliverable-list li::before { counter-increment: item; position: absolute; top: 24px; left: 24px; color: var(--blue); content: counter(item, decimal-leading-zero); font: 800 13px var(--mono); }.deliverable-list b { display: block; margin-bottom: 6px; }.deliverable-list span { color: var(--muted); font-size: 14px; }
.rubric { margin-top: 40px; }.rubric th:first-child { width: 200px; }.rubric td { font-size: 14px; }
.diagnostic-form { margin-top: 50px; }.diagnostic-group { margin-bottom: 26px; padding: 30px; border: 1px solid var(--rule-dark); background: #fff; }.diagnostic-group h2 { font-size: 26px; }.diagnostic-item { display: grid; grid-template-columns: 1fr 310px; gap: 30px; align-items: center; padding: 16px 0; border-top: 1px solid var(--rule); }.diagnostic-item p { margin: 0; }.diagnostic-item .scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.diagnostic-item .scale label { display: block; }.diagnostic-item input { position: absolute; opacity: 0; }.diagnostic-item span { display: grid; place-items: center; min-height: 38px; border: 1px solid var(--rule); cursor: pointer; font-size: 13px; }.diagnostic-item input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }.diagnostic-item input:checked + span { border-color: var(--blue); background: var(--blue); color: #fff; }.diagnostic-actions { display: flex; align-items: center; gap: 18px; }.diagnostic-result { margin-top: 32px; padding: 34px; border: 2px solid var(--ink); background: #fff; }.diagnostic-result h2 { font-size: 32px; }.diagnostic-result a { color: var(--blue); font-weight: 800; }

.site-footer { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 56px; min-width: 1100px; padding: 64px max(40px, calc((100% - 1280px)/2)); background: var(--ink); color: #fff; }.site-footer .brand small { color: #88a9ff; }.site-footer > div { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }.site-footer p, .site-footer a { margin: 0; color: #cbd4e5; font-size: 13px; }.site-footer a:hover { color: #fff; }.site-footer b { margin-bottom: 5px; font-size: 14px; }

.search-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding-top: 85px; background: rgba(13,23,43,.72); backdrop-filter: blur(8px); }.search-panel { width: 760px; max-height: calc(100vh - 140px); overflow: auto; padding: 30px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 0 24px 70px rgba(0,0,0,.28); }.search-panel > header { display: flex; justify-content: space-between; align-items: start; }.search-panel header span { color: var(--blue); font: 800 12px var(--mono); }.search-panel h2 { margin: 8px 0 22px; font-size: 32px; }.search-close { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--rule-dark); background: #fff; cursor: pointer; }.search-panel input { width: 100%; padding: 16px 18px; border: 2px solid var(--ink); background: #fff; color: var(--ink); }.search-results { margin-top: 15px; border-top: 1px solid var(--rule-dark); }.search-results a { display: grid; grid-template-columns: 1fr 250px 20px; gap: 18px; align-items: center; padding: 15px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; }.search-results a > span { font-weight: 800; }.search-results small { color: var(--muted); font-size: 12px; }.search-results svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }.search-hint { margin: 18px 0 0; color: var(--muted); font: 12px var(--mono); }.empty-state { padding: 24px 0; color: var(--muted); }

/* Four classic fundamentals lab */
.classic-shell { width: min(calc(100% - 80px), 1280px); margin: 0 auto; padding: 64px 0 120px; }
.classic-hero { display: grid; grid-template-columns: minmax(0, 860px) 270px; gap: 80px; align-items: end; padding: 22px 0 56px; border-bottom: 3px solid var(--ink); }
.classic-hero > div { min-width: 0; }
.classic-back { display: inline-flex; margin-bottom: 28px; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; }
.classic-hero .eyebrow { display: block; }
.classic-hero h1 { max-width: 900px; margin: 15px 0 22px; font-size: clamp(46px, 5vw, 66px); }
.classic-hero p { max-width: 820px; margin: 0; color: var(--ink-2); font-size: 18px; }
.classic-hero aside { padding: 20px 0 6px 24px; border-left: 5px solid var(--yellow); }
.classic-hero aside b { display: block; margin-bottom: 10px; font: 600 34px/1 var(--serif); }
.classic-hero aside span { display: block; color: var(--muted); font-size: 14px; }
.classic-hub-hero { min-height: 520px; }
.classic-hub-hero .hero-actions { margin-top: 30px; }
.classic-local-nav { position: sticky; top: 0; z-index: 10; display: flex; gap: 0; margin-bottom: 88px; border-bottom: 1px solid var(--rule-dark); background: rgba(243,246,251,.96); backdrop-filter: blur(10px); }
.classic-local-nav a { flex: 1; padding: 16px 12px; color: var(--muted); font: 800 12px/1.4 var(--mono); text-align: center; text-decoration: none; }
.classic-local-nav a:hover { background: #fff; color: var(--blue); }
.classic-section { display: grid; grid-template-columns: 255px minmax(0, 880px); gap: 55px; margin: 0 auto 100px; scroll-margin-top: 80px; }
.classic-section > header { padding-top: 8px; border-top: 4px solid var(--blue); }
.classic-section > header span { color: var(--blue); font: 800 13px var(--mono); }
.classic-section > header h2 { margin: 15px 0 0; font-size: 29px; }
.classic-prose { min-width: 0; font-size: 17px; line-height: 1.82; }
.classic-prose > p { margin-bottom: 22px; }
.classic-prose a, .classic-overview a { color: var(--blue); font-weight: 700; }
.classic-prose table { margin: 28px 0; font-size: 14px; line-height: 1.62; }
.classic-callout { margin: 30px 0; padding: 24px 28px; border-left: 5px solid var(--yellow); background: #fff; }
.classic-callout b { display: block; margin-bottom: 8px; color: var(--blue); font-size: 14px; }
.classic-callout p { margin: 0; }
.classic-steps { margin: 28px 0; padding: 0; counter-reset: classic-step; list-style: none; }
.classic-steps li { position: relative; margin-bottom: 12px; padding: 19px 22px 19px 68px; border: 1px solid var(--rule); background: #fff; }
.classic-steps li::before { counter-increment: classic-step; position: absolute; top: 20px; left: 22px; color: var(--blue); content: counter(classic-step, decimal-leading-zero); font: 800 13px var(--mono); }
.classic-figure { grid-column: 2; width: 100%; margin: -62px 0 90px; }
.classic-figure img { width: 100%; border: 1px solid var(--rule-dark); border-radius: 5px; background: #fff; }
.classic-figure figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; }
.trace-ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 0; }
.trace-ledger article { padding: 24px; border: 1px solid var(--rule); background: #fff; }
.trace-ledger article > span { color: var(--blue); font: 800 12px var(--mono); }
.trace-ledger h3 { margin: 13px 0 8px; font-size: 21px; }
.trace-ledger p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.failure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.failure-grid article { padding: 24px; border-top: 4px solid var(--red); background: #fff; }
.failure-grid h3 { margin-bottom: 8px; font-size: 20px; }
.failure-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.68; }
.classic-stuck { margin: 30px 0; padding: 30px; background: var(--blue-pale); }
.classic-stuck h3 { margin-bottom: 16px; font-size: 24px; }
.classic-stuck ol { margin: 0; padding-left: 24px; }
.classic-stuck li { margin-bottom: 9px; }
.classic-exercise { position: relative; margin: 30px 0; padding: 30px; border: 2px solid var(--ink); background: #fff; }
.classic-exercise > span { display: block; margin-bottom: 14px; color: var(--blue); font: 800 12px var(--mono); }
.classic-exercise h3 { margin-bottom: 22px; font-size: 25px; }
.classic-exercise dl { display: grid; grid-template-columns: 140px 1fr; margin: 0; border-top: 1px solid var(--rule); }
.classic-exercise dt, .classic-exercise dd { padding: 13px 0; border-bottom: 1px solid var(--rule); }
.classic-exercise dt { color: var(--blue); font: 800 12px var(--mono); }
.classic-exercise dd { margin: 0; font-size: 14px; line-height: 1.65; }
.classic-mastery { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; margin: 20px 0 100px 310px; padding: 34px 0; border-top: 4px solid var(--yellow); border-bottom: 1px solid var(--rule-dark); }
.classic-mastery > div span { color: var(--blue); font: 800 12px var(--mono); }
.classic-mastery h2 { margin: 10px 0 0; font-size: 30px; }
.classic-mastery > p { margin: 0; }
.classic-mastery table { font-size: 13px; }
.classic-overview { padding: 94px 0; border-bottom: 1px solid var(--rule-dark); }
.classic-overview:last-child { border-bottom: 0; }
.classic-lede { max-width: 940px; color: var(--ink-2); font-size: 18px; }
.classic-method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 38px; }
.classic-method-card { min-height: 270px; padding: 30px; border: 1px solid var(--rule-dark); border-top: 5px solid var(--teal); background: #fff; color: inherit !important; text-decoration: none; transition: transform var(--ease), box-shadow var(--ease); }
.classic-method-card:nth-child(2) { border-top-color: var(--blue); }
.classic-method-card:nth-child(3) { border-top-color: var(--orange); }
.classic-method-card:nth-child(4) { border-top-color: var(--yellow); }
.classic-method-card.benchmark { box-shadow: inset 0 0 0 2px var(--teal); }
.classic-method-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,33,61,.10); }
.classic-method-card > span { color: var(--blue); font: 800 12px var(--mono); }
.classic-method-card h2 { margin: 26px 0 12px; font-size: 29px; }
.classic-method-card p { color: var(--muted); }
.classic-method-card b { display: block; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; }
.classic-flow { display: grid; grid-template-columns: repeat(4, 1fr); margin: 40px 0; border: 1px solid var(--rule-dark); background: #fff; }
.classic-flow article { position: relative; min-height: 255px; padding: 26px; border-right: 1px solid var(--rule); }
.classic-flow article:last-child { border-right: 0; }
.classic-flow article:not(:last-child)::after { position: absolute; top: 42px; right: -9px; z-index: 2; width: 18px; height: 18px; border-top: 3px solid var(--blue); border-right: 3px solid var(--blue); background: #fff; content: ""; transform: rotate(45deg); }
.classic-flow span { color: var(--blue); font: 800 13px var(--mono); }
.classic-flow h3 { margin: 28px 0 10px; font-size: 26px; }
.classic-flow p { color: var(--muted); font-size: 14px; }
.classic-flow a { font-size: 14px; text-decoration: none; }
.classic-overview > table { margin-top: 36px; font-size: 14px; }

@media (min-width: 1100px) and (max-width: 1280px) {
  .site-header { grid-template-columns: 190px 1fr 135px; }
  .site-header nav { gap: 18px; }
  .site-header nav a { font-size: 13px; }
  .search-trigger kbd { display: none; }
}

@media print {
  html, body { min-width: 0; background: #fff; color: #000; }
  .site-header, .site-footer, .search-overlay, .reading-progress, .chapter-sidebar, .chapter-pagination, .hero-actions, .search-trigger, [data-copy] { display: none !important; }
  .page-shell, .home-section, .chapter-layout { display: block; width: auto; margin: 0; padding: 0; }
  .chapter-main { width: auto; }
  .chapter-hero, .page-intro { break-after: avoid; }
  figure, table, .worked-example, .lesson-check, .practice-card, .template-card, .source-card, .glossary-card, .classic-exercise { break-inside: avoid; }
  .classic-shell, .classic-section, .classic-mastery { display: block; width: auto; margin: 0; padding: 0; }
  .classic-local-nav, .classic-back { display: none; }
  a { color: #000; text-decoration: underline; }
  img, svg { max-height: 230mm; }
}
