:root {
  color-scheme: light dark;
  --paper: #f1f0eb;
  --paper-deep: #e4e2da;
  --surface: #faf9f5;
  --ink: #191a18;
  --muted: #65665f;
  --line: #c9c7bd;
  --accent: #b73a2e;
  --accent-strong: #92291f;
  --accent-ink: #fffaf5;
  --dark: #232522;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(38, 35, 30, 0.12);
  --max: 1240px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

html[lang^="en"] {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 72%, white); outline-offset: 4px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: .65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-180%);
  border-radius: 8px;
}

.skip-link:focus { transform: translateY(0); }

.section-shell,
.nav-shell,
.footer-grid {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 21px;
}

.primary-nav { display: flex; align-items: center; gap: 24px; white-space: nowrap; }

.primary-nav a { color: var(--muted); font-size: 14px; }
.primary-nav a:hover,
.primary-nav a.is-active { color: var(--ink); }
.primary-nav a.is-active { font-weight: 700; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.language-switch:hover { border-color: var(--accent); color: var(--ink); }

html[lang^="en"] .primary-nav { gap: 19px; }
html[lang^="en"] .hero h1 { max-width: 13ch; }
html[lang^="en"] .page-hero h1 { max-width: 18ch; }

.menu-button { display: none; }

.hero {
  min-height: calc(100dvh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  align-items: center;
  gap: clamp(42px, 5vw, 70px);
  padding-block: clamp(56px, 8vw, 96px);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.hero h1 { max-width: none; font-size: clamp(44px, 4.3vw, 60px); }
.title-line { display: block; white-space: nowrap; }

.hero-lead {
  max-width: 32rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 1.5vw, 21px);
}

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px); }

.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: var(--accent-strong); }
.button-secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button-secondary:hover { border-color: var(--ink); }
.button-light { background: var(--paper); color: var(--dark); }

.hero-visual {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 1.12;
  background: var(--dark);
}

.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.statement {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
  padding-block: clamp(90px, 12vw, 160px);
  border-top: 1px solid var(--line);
}

.statement-number {
  color: var(--accent);
  font-size: clamp(120px, 18vw, 260px);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.08em;
}

.statement-copy h2,
.section-heading h2,
.reading-intro h2,
.cases-copy h2,
.final-cta h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.1;
  letter-spacing: -.045em;
}

.statement-copy p,
.section-heading p,
.reading-intro p,
.cases-copy p,
.final-cta p {
  max-width: 38rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.path { padding-block: clamp(80px, 10vw, 132px); }
.section-heading { max-width: 760px; }

.path-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: clamp(32px, 6vw, 80px);
  margin-top: 64px;
  align-items: stretch;
}

.path-feature {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--radius);
  background: var(--dark);
  color: #f1f0eb;
  background-image: linear-gradient(150deg, rgba(183, 58, 46, .5), transparent 44%);
}

.path-days { margin-bottom: auto; color: #dd867b; font-size: clamp(80px, 12vw, 150px); font-weight: 800; line-height: .8; letter-spacing: -.08em; }
.path-feature h3 { margin: 38px 0 12px; font-size: clamp(29px, 3vw, 42px); line-height: 1.1; }
.path-feature p { max-width: 34rem; margin: 0; color: #c9c9c3; }
.text-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 28px; font-weight: 750; }

.path-steps { margin: 0; padding: 0; list-style: none; display: grid; }
.path-steps li { padding: 28px 0; border-bottom: 1px solid var(--line); }
.path-steps li:first-child { padding-top: 0; }
.path-steps span { display: block; color: var(--accent); font-size: 13px; font-weight: 800; }
.path-steps strong { display: block; margin-top: 8px; font-size: 23px; line-height: 1.25; }
.path-steps p { margin: 10px 0 0; color: var(--muted); }

.reading {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: clamp(52px, 9vw, 130px);
  padding-block: clamp(90px, 12vw, 160px);
  border-top: 1px solid var(--line);
}

.article-list { border-top: 2px solid var(--ink); }
.article-list a { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); font-size: clamp(19px, 2vw, 27px); font-weight: 700; line-height: 1.35; }
.article-list a:hover span { color: var(--accent); }
.article-list small { color: var(--muted); font-size: 12px; font-weight: 700; }

.cases-preview {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
  padding-block: clamp(90px, 12vw, 160px);
}

.case-slot {
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.case-slot > span { color: var(--accent); font-size: 13px; font-weight: 800; }
.case-slot h3 { margin: 52px 0 16px; font-size: clamp(29px, 3vw, 43px); line-height: 1.15; letter-spacing: -.04em; }
.case-slot p { margin: 0 0 28px; color: var(--muted); }

.final-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  margin-bottom: clamp(80px, 10vw, 130px);
  padding: clamp(42px, 7vw, 78px);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
}
.final-cta p { color: #f5cbc5; }

.page-hero { padding-block: clamp(84px, 10vw, 140px); }
.page-hero h1 { max-width: 15ch; }
.page-hero > p:not(.eyebrow) { max-width: 44rem; margin: 28px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 23px); }
.page-content { padding-bottom: clamp(90px, 12vw, 160px); }

.legal-copy {
  max-width: 760px;
  display: grid;
  gap: 46px;
}

.legal-copy section { display: grid; gap: 12px; }
.legal-copy h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -.03em; }
.legal-copy p { margin: 0; color: var(--muted); }
.legal-copy strong { color: var(--ink); }

.serial-list { border-top: 2px solid var(--ink); }
.serial-list article { display: grid; grid-template-columns: 60px minmax(0, 1fr) minmax(220px, .5fr); gap: 28px; align-items: start; padding: 30px 0; border-bottom: 1px solid var(--line); }
.serial-list span,
.template-grid > article > span { color: var(--accent); font-size: 13px; font-weight: 800; }
.serial-list h2 { margin: 0; font-size: clamp(21px, 2.3vw, 31px); line-height: 1.35; }
.serial-list h2 a { text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: 5px; }
.serial-list h2 a:hover { color: var(--accent); text-decoration-color: currentColor; }
.serial-list p { margin: 3px 0 0; color: var(--muted); }

.longform { padding-bottom: clamp(90px, 12vw, 160px); }

.article-header {
  max-width: 940px;
  padding-top: clamp(70px, 9vw, 124px);
  padding-bottom: clamp(44px, 6vw, 72px);
}

.article-back {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.article-header h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(42px, 5.7vw, 78px);
  line-height: 1.08;
  letter-spacing: -.055em;
}

.article-deck {
  max-width: 42rem;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 24px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
  margin-top: 34px;
  color: var(--muted);
  font-size: 14px;
}

.copy-link,
.action-card-heading button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.copy-link[data-state="copied"] { color: var(--accent); }

.article-cover {
  max-width: 1120px;
  margin-bottom: clamp(64px, 9vw, 110px);
}

.article-cover img {
  width: 100%;
  max-height: 700px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.article-body { max-width: 760px; }

.article-body > p,
.article-body > ol {
  margin-block: 0 1.45em;
  font-size: clamp(17px, 1.45vw, 19px);
  line-height: 1.95;
}

.article-body > h2 {
  margin: 2.4em 0 .75em;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.18;
  letter-spacing: -.04em;
}

.article-lead {
  font-size: clamp(21px, 2.2vw, 27px) !important;
  line-height: 1.75 !important;
  letter-spacing: -.018em;
}

.article-body > ol { padding-left: 1.25em; }
.article-body > ol li { padding-left: .35em; margin-bottom: .7em; }

.article-quote {
  margin: clamp(54px, 7vw, 84px) 0;
  padding: 34px 0 34px clamp(28px, 5vw, 60px);
  border-left: 5px solid var(--accent);
}

.article-quote p {
  margin: 0;
  font-size: clamp(27px, 3.4vw, 42px);
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.04em;
}

.article-path {
  display: grid;
  gap: 0;
  margin: clamp(56px, 7vw, 86px) 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.article-path > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.article-path > div:last-child { border-bottom: 0; }
.article-path span { color: var(--accent); font-weight: 800; }
.article-path strong { font-size: 19px; }

.action-card {
  margin: clamp(66px, 9vw, 110px) 0;
  padding: clamp(30px, 5vw, 52px);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, var(--line));
}

.action-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.action-card-heading button { color: var(--ink); font-size: 13px; }

.action-card h2 {
  margin: 56px 0 24px;
  font-size: clamp(29px, 3.8vw, 46px);
  line-height: 1.16;
  letter-spacing: -.04em;
}

.action-card ol { margin: 0; padding-left: 1.2em; }
.action-card li { margin-bottom: .8em; padding-left: .35em; }
.action-card p { margin: 24px 0 0; color: var(--muted); }

.article-cta {
  margin: clamp(70px, 10vw, 120px) 0;
  padding: clamp(36px, 6vw, 62px);
  border-radius: var(--radius);
  background: var(--dark);
  color: #f1f0eb;
}

.article-cta h2 { margin: 0; font-size: clamp(31px, 4vw, 48px); line-height: 1.12; }
.article-cta p { margin: 16px 0 28px; color: #bdbeb8; }

.article-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.article-pagination > * { display: grid; gap: 6px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.article-pagination a:hover { border-color: var(--ink); }
.article-pagination span,
.article-pagination small { color: var(--muted); font-size: 13px; }
.article-pagination strong { line-height: 1.45; }

.timeline { max-width: 900px; border-top: 2px solid var(--ink); }
.timeline article { display: grid; grid-template-columns: 120px 1fr; gap: 30px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.timeline article > span { color: var(--accent); font-weight: 800; }
.timeline h2 { margin: 0; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.25; }
.timeline p { margin: 8px 0 0; color: var(--muted); }
.timeline h2 a { text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: 5px; }
.timeline h2 a:hover { color: var(--accent); text-decoration-color: currentColor; }
.timeline small { display: inline-block; margin-top: 12px; color: var(--muted); }
.lesson-entry { display: inline-flex; gap: 8px; align-items: center; margin-top: 16px; color: var(--accent); font-weight: 800; }
.timeline .is-ready { background: color-mix(in srgb, var(--accent) 5%, transparent); }

.lesson-page { padding-bottom: clamp(90px, 12vw, 150px); }
.lesson-hero { padding-block: clamp(58px, 8vw, 110px); }
.lesson-breadcrumb { display: flex; gap: 10px; align-items: center; margin-bottom: 48px; color: var(--muted); font-size: 14px; }
.lesson-breadcrumb a:hover { color: var(--accent); }
.lesson-breadcrumb strong { color: var(--ink); }
.lesson-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr); gap: clamp(46px, 8vw, 110px); align-items: end; }
.lesson-hero h1 { margin: 0; max-width: 12ch; font-size: clamp(44px, 5.6vw, 76px); line-height: 1.06; letter-spacing: -.055em; }
.lesson-hero-grid > div > p:not(.eyebrow) { max-width: 43rem; margin: 26px 0 0; color: var(--muted); font-size: clamp(18px, 2vw, 22px); }
.lesson-facts { margin: 0; border-top: 2px solid var(--ink); }
.lesson-facts > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.lesson-facts dt { color: var(--muted); font-size: 12px; font-weight: 750; }
.lesson-facts dd { margin: 5px 0 0; font-weight: 800; line-height: 1.45; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(220px, 1fr); gap: clamp(50px, 9vw, 130px); align-items: start; }
.lesson-content { min-width: 0; }
.lesson-side { position: sticky; top: 110px; display: grid; gap: 18px; }
.lesson-side > div { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lesson-side strong { font-size: 15px; }
.lesson-side ol { margin: 18px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 14px; }
.lesson-side > a { color: var(--accent); font-size: 14px; font-weight: 800; }

.lesson-section { padding: 48px 0; border-top: 1px solid var(--line); }
.lesson-section:first-child { padding-top: 0; border-top: 0; }
.lesson-section h2 { margin: 0 0 18px; font-size: clamp(29px, 3.2vw, 42px); line-height: 1.18; letter-spacing: -.04em; }
.lesson-section > p { margin: 0 0 22px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.lesson-section code { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }

.source-note { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 28px; padding: 22px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.source-note strong { margin-bottom: 4px; }
.source-note a { width: fit-content; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.folder-tree { display: grid; gap: 6px; margin: 28px 0; padding: 26px; overflow-x: auto; border-radius: var(--radius); background: var(--dark); color: #f1f0eb; }
.folder-tree code { white-space: pre; }

.prompt-block { margin: 28px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--dark); color: #f1f0eb; }
.prompt-block > div { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 12px 18px; border-bottom: 1px solid #454943; color: #bdbeb8; font-size: 13px; }
.prompt-block button { padding: 5px 10px; border: 1px solid #686b65; border-radius: 999px; background: transparent; color: #f1f0eb; cursor: pointer; font-weight: 750; }
.prompt-block button[data-state="copied"] { border-color: #d85a4e; color: #e9847a; }
.prompt-block pre { margin: 0; padding: 24px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; font: 14px/1.8 "Cascadia Code", "SFMono-Regular", Consolas, monospace; }

.lesson-check,
.danger-note { margin: 28px 0 0; padding: 24px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.lesson-check ul { margin: 14px 0 0; padding-left: 1.2em; color: var(--muted); }
.danger-note { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line)); }
.danger-note p { margin: 8px 0 0; color: var(--muted); }

.interactive-checklist { display: grid; gap: 10px; margin: 28px 0; }
.interactive-checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.interactive-checklist input { width: 18px; height: 18px; margin-top: 4px; flex: 0 0 auto; accent-color: var(--accent); }

.download-card { display: grid; gap: 4px; margin-top: 26px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.download-card:hover { border-color: var(--ink); }
.download-card span { color: var(--accent); font-size: 12px; font-weight: 800; }
.download-card strong { font-size: 20px; }
.download-card small { color: var(--muted); }

.project-map {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  margin: 30px 0 14px;
}

.project-map article {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-map article:first-child {
  grid-row: span 2;
  min-height: 366px;
  background: var(--dark);
  color: #f1f0eb;
}

.project-map code { width: fit-content; color: var(--accent-strong); font-size: 13px; font-weight: 800; }
.project-map strong { margin-top: auto; font-size: 21px; }
.project-map p { margin: 9px 0 0; color: var(--muted); line-height: 1.65; }
.project-map article:first-child p { color: #bdbeb8; }

.brief-anatomy {
  margin-top: 30px;
  border-top: 2px solid var(--ink);
}

.brief-anatomy article {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brief-anatomy strong { font-size: 16px; }
.brief-anatomy p { margin: 0; color: var(--muted); line-height: 1.7; }

.scope-ledger {
  margin-top: 28px;
  border-top: 2px solid var(--ink);
}

.scope-ledger > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.scope-ledger strong { color: var(--accent); }
.scope-ledger span { line-height: 1.65; }

.status-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 30px 0;
}

.status-legend > div {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.status-legend > div:first-child { grid-row: span 2; min-height: 314px; background: var(--dark); color: #f1f0eb; }
.status-legend strong { color: var(--accent-strong); font-size: 18px; }
.status-legend span { margin-top: auto; color: var(--muted); line-height: 1.65; }
.status-legend > div:first-child span { color: #bdbeb8; }

.test-matrix,
.debug-sequence {
  margin: 30px 0;
  border-top: 2px solid var(--ink);
}

.test-matrix > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 72px;
  gap: 22px;
  align-items: start;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.test-matrix span,
.debug-sequence span { color: var(--muted); line-height: 1.65; }
.test-matrix b { color: var(--accent); font-size: 13px; text-align: right; }

.debug-sequence > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
}

.debug-sequence strong { color: var(--accent); }

.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0 12px; }
.answer-grid label { display: grid; gap: 8px; font-size: 14px; font-weight: 750; }
.answer-grid .wide { grid-column: 1 / -1; }
.answer-grid input,
.answer-grid textarea { width: 100%; padding: 12px 13px; border: 1px solid #989990; border-radius: 9px; background: var(--surface); color: var(--ink); resize: vertical; }
.answer-grid input::placeholder,
.answer-grid textarea::placeholder { color: #707169; opacity: 1; }
.small-note { font-size: 13px !important; }

.lesson-complete { margin-top: 50px; padding: clamp(34px, 6vw, 58px); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); }
.lesson-complete > span { font-size: 13px; font-weight: 800; }
.lesson-complete h2 { margin: 48px 0 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.12; letter-spacing: -.04em; }
.lesson-complete p { margin: 0 0 28px; color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.lesson-complete .button-primary { background: var(--accent-ink); color: var(--accent-strong); }

.lesson-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 70px; }
.lesson-pagination > * { display: grid; gap: 5px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.lesson-pagination a:hover { border-color: var(--ink); }
.lesson-pagination span { color: var(--muted); font-size: 13px; }

.stage-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.stage-grid article { min-height: 260px; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); }
.stage-grid article:nth-child(3) { grid-column: span 2; min-height: 220px; background: var(--dark); color: #f1f0eb; }
.stage-grid span { color: var(--accent); font-size: 13px; font-weight: 800; }
.stage-grid h2 { margin: 70px 0 12px; font-size: 31px; line-height: 1.15; }
.stage-grid article:nth-child(3) h2 { margin-top: 40px; }
.stage-grid p { color: var(--muted); }
.stage-grid article:nth-child(3) p { color: #bdbeb8; }
.note-block { max-width: 760px; margin-top: 48px; padding: 28px 0 0; border-top: 2px solid var(--accent); }
.note-block p { color: var(--muted); }

.template-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.template-grid article { min-height: 240px; display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); }
.template-grid article:nth-child(1),
.template-grid article:nth-child(6) { background: var(--dark); color: #f1f0eb; }
.template-grid article:nth-child(3) { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); }
.template-grid h2 { margin: auto 0 0; font-size: 22px; line-height: 1.25; }
.template-grid p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }

.empty-state { max-width: 820px; min-height: 430px; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(36px, 7vw, 80px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.empty-state > span { margin-bottom: auto; color: var(--accent); font-weight: 800; }
.empty-state h2 { margin: 70px 0 16px; font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.05em; }
.empty-state p { max-width: 38rem; margin: 0; color: var(--muted); }

.update-list { border-top: 2px solid var(--ink); }
.update-list article { display: grid; grid-template-columns: 180px 1fr; gap: 30px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.update-list time { color: var(--accent); font-weight: 800; }
.update-list h2 { margin: 0; font-size: 30px; }
.update-list p { margin: 8px 0 0; color: var(--muted); }

.form-page { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: clamp(46px, 8vw, 110px); padding-block: clamp(76px, 10vw, 130px); align-items: start; }
.form-intro { position: sticky; top: 112px; }
.form-intro h1 { margin: 0; max-width: 11ch; font-size: clamp(42px, 5vw, 68px); line-height: 1.05; letter-spacing: -.05em; }
.form-intro > p:not(.eyebrow) { max-width: 32rem; color: var(--muted); }
.form-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.form-tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.form-tabs a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.action-form { padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.field { display: grid; gap: 8px; align-content: start; }
.field > span { font-size: 14px; font-weight: 750; }
.field-wide { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #989990;
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #707169; opacity: 1; }
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); }
.consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.honeypot { position: absolute; left: -10000px; }
.form-actions { display: flex; gap: 18px; align-items: center; margin-top: 32px; }
.form-status { margin: 0; color: var(--muted); }
.form-status.is-error { color: var(--accent); font-weight: 700; }
.form-status.is-success { color: #2f7650; font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1fr auto minmax(240px, .6fr); gap: 56px; align-items: start; padding-block: 60px; }
.footer-brand { font-size: 19px; font-weight: 800; }
.footer-grid p { max-width: 31rem; margin: 10px 0 0; color: var(--muted); }
.footer-links { display: grid; gap: 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-note { text-align: right; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1c1a;
    --paper-deep: #252824;
    --surface: #222522;
    --ink: #eeeee8;
    --muted: #aaa9a2;
    --line: #484a45;
    --accent: #d85a4e;
    --accent-strong: #e16d62;
    --accent-ink: #181918;
    --dark: #111311;
    --shadow: 0 24px 60px rgba(0, 0, 0, .32);
  }
  .field input::placeholder,
  .field textarea::placeholder { color: #a3a29b; }
  .form-status.is-success { color: #73c89a; }
}

@media (max-width: 1040px) {
  .nav-shell { grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; }
  .primary-nav { display: none; grid-column: 1 / -1; grid-row: 2; padding: 4px 0 18px; }
  .primary-nav.is-open { display: flex; flex-wrap: wrap; }
  .nav-cta { display: none; }
  .nav-actions { grid-column: 2; grid-row: 1; }
  .menu-button { display: inline-flex; grid-column: 3; grid-row: 1; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); padding: 8px 14px; cursor: pointer; }
  .hero { grid-template-columns: 1fr 1fr; gap: 34px; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .section-shell,
  .nav-shell,
  .footer-grid { width: min(100% - 32px, var(--max)); }
  .nav-shell { min-height: 64px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; font-size: 18px; }
  .primary-nav.is-open { flex-direction: column; align-items: flex-start; gap: 12px; }
  html[lang^="en"] .brand { font-size: 13px; }
  html[lang^="en"] .menu-button { padding-inline: 11px; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-block: 52px 72px; }
  .hero h1,
  .page-hero h1 { max-width: 14ch; font-size: clamp(40px, 13vw, 58px); }
  .title-line { white-space: normal; }
  .hero-visual { aspect-ratio: 4 / 3; }
  .button-row { align-items: stretch; flex-direction: column; }
  .button-row .button { width: 100%; }
  .statement,
  .path-layout,
  .reading,
  .cases-preview,
  .form-page,
  .footer-grid { grid-template-columns: 1fr; }
  .statement { gap: 48px; }
  .statement-number { font-size: 42vw; }
  .path-feature { min-height: 430px; }
  .path-steps li:first-child { padding-top: 28px; }
  .article-list a { grid-template-columns: 1fr; gap: 8px; }
  .final-cta { grid-template-columns: 1fr; }
  .serial-list article { grid-template-columns: 42px 1fr; gap: 18px; }
  .serial-list p { grid-column: 2; }
  .article-header { padding-top: 58px; }
  .article-header h1 { font-size: clamp(40px, 12vw, 56px); }
  .article-header h1 .mobile-title-line { display: block; white-space: nowrap; }
  .article-cover { width: 100%; }
  .article-cover img { border-radius: 0; }
  .article-body > p,
  .article-body > ol { font-size: 17px; line-height: 1.9; }
  .article-path > div { grid-template-columns: 1fr; gap: 6px; }
  .action-card-heading { align-items: flex-start; flex-direction: column; }
  .article-pagination { grid-template-columns: 1fr; }
  .timeline article { grid-template-columns: 1fr; gap: 10px; }
  .lesson-hero-grid,
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-hero h1 { font-size: clamp(40px, 12vw, 58px); }
  .lesson-side { position: static; order: -1; }
  .project-map { grid-template-columns: 1fr; }
  .project-map article:first-child { grid-row: auto; min-height: 220px; }
  .project-map article { min-height: 176px; }
  .brief-anatomy article,
  .scope-ledger > div,
  .debug-sequence > div { grid-template-columns: 1fr; gap: 7px; }
  .status-legend { grid-template-columns: 1fr; }
  .status-legend > div:first-child { grid-row: auto; min-height: 180px; }
  .status-legend > div { min-height: 150px; }
  .test-matrix > div { grid-template-columns: 1fr; gap: 7px; }
  .test-matrix b { text-align: left; }
  .answer-grid { grid-template-columns: 1fr; }
  .answer-grid .wide { grid-column: auto; }
  .lesson-pagination { grid-template-columns: 1fr; }
  .stage-grid { grid-template-columns: 1fr; }
  .stage-grid article:nth-child(3) { grid-column: auto; }
  .template-grid { grid-template-columns: 1fr; }
  .template-grid article { min-height: 190px; }
  .update-list article { grid-template-columns: 1fr; gap: 8px; }
  .form-intro { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .footer-grid { gap: 34px; }
  .footer-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  .site-header,
  .site-footer,
  .article-header,
  .article-cover,
  .article-body > :not(.action-card) { display: none !important; }
  body { background: white; color: black; }
  .longform,
  .article-body { margin: 0; padding: 0; width: 100%; max-width: none; }
  .action-card { display: block; margin: 0; box-shadow: none; border: 2px solid black; background: white; }
  .action-card-heading button { display: none; }
}
