:root {
  color-scheme: light;
  --ink: #15221f;
  --ink-soft: #44514d;
  --paper: #f3efe5;
  --paper-light: #fffdf7;
  --line: #c8c1b2;
  --blue: #2448d8;
  --orange: #f15b32;
  --acid: #d7f36a;
  --shadow: 0 18px 45px rgba(21, 34, 31, 0.11);
  --content: min(1320px, calc(100vw - 48px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; }

button,
summary { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

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

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--ink);
  background: rgba(243, 239, 229, 0.96);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  grid-template-columns: 42px auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  text-decoration: none;
  line-height: 1;
}

.brand > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  background: var(--acid);
  font-weight: 900;
}

.brand strong { align-self: end; font-size: 13px; letter-spacing: 0.12em; }
.brand small { align-self: start; margin-top: 5px; font-size: 9px; letter-spacing: 0.17em; }

.topbar nav {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.topbar nav a,
.language-switch button {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.topbar nav a[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.language-switch { display: flex; border: 1px solid var(--ink); }
.language-switch button { cursor: pointer; }
.language-switch button[aria-pressed="true"] { background: var(--blue); color: #fff; }

main { overflow: clip; }

.hero {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 230px;
  min-height: 580px;
  border-right: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 62px;
  border-right: 1px solid var(--ink);
}

.hero-stage strong {
  font-family: Georgia, serif;
  font-size: clamp(72px, 9vw, 126px);
  font-weight: 400;
  line-height: 0.8;
}

.hero-stage span,
.eyebrow,
.section-label,
.method-section header > p,
.index-section header > p,
.sources-section header > p,
.boundary-section > div > p {
  margin: 18px 0 0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.hero-copy { padding: 60px clamp(28px, 5vw, 74px); }
.eyebrow { margin-top: 0; }

.hero h1 {
  margin: 24px 0 28px;
  font-size: clamp(48px, 6.2vw, 94px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 span,
.hero h1 em { display: block; }
.hero h1 em { color: var(--blue); font-family: Georgia, serif; font-weight: 400; }
.hero-copy > p:not(.eyebrow) { max-width: 780px; margin: 0; font-size: 17px; }

.hero-chips,
.tag-row,
.card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-chips { margin-top: 34px; }
.hero-chips span,
.card-status span {
  padding: 7px 10px;
  border: 1px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.draft-stamp {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border-left: 1px solid var(--ink);
  background: var(--orange);
  color: #fff;
}

.draft-stamp span,
.draft-stamp small { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; }
.draft-stamp strong { font-family: Georgia, serif; font-size: 74px; font-weight: 400; line-height: 0.8; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-block: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.metric-strip article { padding: 25px; border-right: 1px solid rgba(255, 255, 255, 0.25); text-align: center; }
.metric-strip strong { display: block; color: var(--acid); font-family: Georgia, serif; font-size: 44px; font-weight: 400; line-height: 1; }
.metric-strip span { display: block; margin-top: 7px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }

.validation-bar {
  padding: 10px 24px;
  border-bottom: 1px solid var(--ink);
  background: var(--acid);
  text-align: center;
  font: 800 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
}

.method-section,
.index-section,
.sources-section,
.boundary-section {
  width: var(--content);
  margin: 0 auto;
  padding: 86px 0;
}

.method-section header,
.index-section header,
.sources-section header {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 38px;
}

.method-section header > p,
.index-section header > p,
.sources-section header > p { margin: 8px 0 0; }

.method-section h2,
.index-section h2,
.sources-section h2,
.boundary-section h2 {
  margin: 0;
  max-width: 850px;
  font-family: Georgia, serif;
  font-size: clamp(36px, 5vw, 66px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.method-grid article { min-height: 240px; padding: 28px; border-right: 1px solid var(--ink); background: var(--paper-light); }
.method-grid article:last-child { border-right: 0; }
.method-grid article:nth-child(2) { background: #e7ebff; }
.method-grid article:nth-child(3) { background: #fee1d7; }
.method-grid span { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: 0.12em; }
.method-grid h3 { margin: 28px 0 12px; font-size: 24px; }
.method-grid p { margin: 0; color: var(--ink-soft); }
.method-note { margin: 18px 0 0; padding: 16px 20px; border-left: 5px solid var(--orange); background: var(--paper-light); }

.index-section { border-top: 1px solid var(--line); }
.card-index { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.card-index a { display: flex; gap: 14px; align-items: center; min-height: 66px; padding: 12px 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper-light); font-size: 13px; font-weight: 800; text-decoration: none; }
.card-index a:hover { background: var(--acid); }
.card-index span { color: var(--blue); font: 900 10px/1 ui-monospace, monospace; }

.cards-section { width: var(--content); margin: 0 auto 96px; }
.teacher-card { scroll-margin-top: 96px; margin-bottom: 34px; border: 1px solid var(--ink); background: var(--paper-light); box-shadow: var(--shadow); }
.card-header { display: grid; grid-template-columns: 92px minmax(0, 1fr) 130px; align-items: stretch; border-bottom: 1px solid var(--ink); }
.card-number { display: grid; place-items: center; border-right: 1px solid var(--ink); background: var(--blue); color: #fff; font: 400 46px/1 Georgia, serif; }
.card-header > div:nth-child(2) { padding: 24px 28px; }
.card-kicker { margin: 0 0 5px; color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: 0.12em; }
.card-header h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(30px, 4vw, 52px); font-weight: 400; line-height: 1.05; }
.creator-record { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; }
.card-count { display: grid; place-items: center; align-content: center; border-left: 1px solid var(--ink); background: var(--acid); text-align: center; }
.card-count strong { font-family: Georgia, serif; font-size: 42px; font-weight: 400; line-height: 1; }
.card-count span { margin-top: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.07em; }
.teacher-card > .tag-row { padding: 14px 20px 6px; }
.tag-row span { padding: 5px 8px; border: 1px solid var(--line); background: #fff; font-size: 9px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
.card-status { padding: 6px 20px 16px; }
.card-status span { background: var(--paper); }
.card-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 30px 26px; border-top: 1px solid var(--ink); }
.section-label { margin: 5px 0 0; }
.fact-list { margin: 0; padding-left: 25px; }
.fact-list li { position: relative; margin-bottom: 14px; padding-left: 8px; }
.fact-list li:last-child { margin-bottom: 0; }
.fact-list--context li::marker { color: var(--orange); }
.citations { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: super; }
.citations a { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 1px solid var(--blue); border-radius: 50%; color: var(--blue); font: 900 9px/1 ui-monospace, monospace; text-decoration: none; }
.citations a:hover { background: var(--blue); color: #fff; }

.teaching-block { border-top: 1px solid var(--ink); }
.teaching-block summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 26px; background: #e7ebff; cursor: pointer; font-weight: 900; }
.teaching-block summary small { color: var(--blue); font: 900 10px/1 ui-monospace, monospace; letter-spacing: 0.08em; }
.question-grid { display: grid; grid-template-columns: 3fr 2fr; border-top: 1px solid var(--ink); }
.question-grid section { padding: 26px; border-right: 1px solid var(--line); }
.question-grid section:last-child { border-right: 0; }
.question-grid h3,
.activity-layout h3 { margin: 0 0 15px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.question-grid ol,
.activity-layout ol,
.activity-layout ul { margin: 0; padding-left: 23px; }
.question-grid li,
.activity-layout li { margin-bottom: 10px; }
.activity-block summary { background: var(--acid); }
.activity-block summary small { color: var(--ink); }
.activity-layout { display: grid; grid-template-columns: 1fr 1.6fr; border-top: 1px solid var(--ink); }
.activity-layout > div { padding: 26px; border-right: 1px solid var(--line); }
.activity-layout > div:last-child { border-right: 0; }
.activity-layout p { margin: 0 0 22px; }
.activity-layout blockquote { margin: 20px 0 0; padding: 14px 16px; border-left: 4px solid var(--orange); background: var(--paper); font-weight: 800; }
.sensitivity-block summary { background: #fee1d7; }
.sensitivity-block summary small { color: #9a2b13; }
.sensitivity-layout { padding: 25px; border-top: 1px solid var(--ink); }
.tag-row--flags { margin-bottom: 20px; }
.tag-row--flags span { border-color: var(--orange); color: #8f2e18; }
.sensitivity-layout dl { margin: 0; }
.term-row { display: grid; grid-template-columns: 220px 1fr; border-top: 1px solid var(--line); }
.term-row dt,
.term-row dd { margin: 0; padding: 18px 0; }
.term-row dt { padding-right: 20px; color: #8f2e18; font-weight: 900; }
.term-row dd { border-left: 1px solid var(--line); padding-left: 24px; }
.term-row p { margin: 0 0 8px; }
.term-row p.preferred { font-weight: 800; }
.sensitivity-layout aside { margin-top: 20px; padding: 20px; border: 1px solid var(--ink); background: var(--paper); }
.sensitivity-layout aside p { display: inline; margin: 0 6px; }

.sources-section { border-top: 1px solid var(--ink); }
.sources-section header > p:last-child { grid-column: 2; max-width: 760px; margin: 0; }
.source-register { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); list-style: none; }
.source-register li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; min-height: 112px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper-light); }
.source-register li > span { display: grid; place-items: center; align-self: stretch; border-right: 1px solid var(--line); color: var(--blue); font: 900 11px/1 ui-monospace, monospace; }
.source-register li > div { padding: 16px; }
.source-register small { display: block; color: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: 0.08em; }
.source-register strong { display: block; margin-top: 4px; font-size: 13px; }
.source-register p { margin: 3px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.source-register a { margin-right: 16px; color: var(--blue); font-size: 10px; font-weight: 900; text-decoration: none; }

.boundary-section { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; border-top: 1px solid var(--ink); }
.boundary-section > div > p { margin-top: 0; }
.boundary-section > div > p:last-child { margin-top: 24px; max-width: 700px; }
.boundary-section ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.boundary-section li { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; min-height: 76px; border-bottom: 1px solid var(--ink); }
.boundary-section li span { color: var(--blue); font: 900 10px/1 ui-monospace, monospace; }
.boundary-section li small { padding: 5px 8px; background: var(--orange); color: #fff; font: 900 9px/1 ui-monospace, monospace; }
.boundary-section > a { grid-column: 1 / -1; justify-self: start; padding: 12px 18px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 900; text-decoration: none; }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 30px max(24px, calc((100vw - 1320px) / 2)); background: var(--ink); color: #fff; }
footer div { display: flex; flex-direction: column; gap: 3px; }
footer span { color: #bec7c3; font-size: 11px; }
footer b { color: var(--acid); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

@media (max-width: 980px) {
  :root { --content: min(100% - 28px, 900px); }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; justify-content: flex-start; }
  .hero { grid-template-columns: 100px minmax(0, 1fr); }
  .draft-stamp { grid-column: 1 / -1; min-height: 170px; border-top: 1px solid var(--ink); border-left: 0; flex-direction: row; align-items: center; }
  .draft-stamp strong { font-size: 58px; }
  .metric-strip { grid-template-columns: repeat(3, 1fr); }
  .method-section header,
  .index-section header,
  .sources-section header { grid-template-columns: 1fr; }
  .sources-section header > p:last-child { grid-column: auto; }
  .card-index { grid-template-columns: repeat(2, 1fr); }
  .card-section { grid-template-columns: 1fr; }
  .source-register { grid-template-columns: 1fr; }
  .boundary-section { grid-template-columns: 1fr; }
  .boundary-section > a { grid-column: auto; }
}

@media (max-width: 680px) {
  :root { --content: calc(100% - 20px); }
  .topbar { gap: 12px; padding: 10px; }
  .brand small { display: none; }
  .topbar nav a { padding: 7px 8px; }
  .hero { grid-template-columns: 1fr; border-inline: 0; }
  .hero-stage { flex-direction: row; justify-content: space-between; padding: 22px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .hero-stage strong { font-size: 64px; }
  .hero-stage span { margin: 0; }
  .hero-copy { padding: 36px 22px; }
  .hero h1 { font-size: 46px; }
  .draft-stamp { grid-column: auto; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .method-section,
  .index-section,
  .sources-section,
  .boundary-section { padding: 60px 0; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--ink); }
  .card-index { grid-template-columns: 1fr; }
  .card-header { grid-template-columns: 58px minmax(0, 1fr); }
  .card-number { font-size: 30px; }
  .card-header > div:nth-child(2) { padding: 18px; }
  .card-count { grid-column: 1 / -1; min-height: 70px; border-top: 1px solid var(--ink); border-left: 0; }
  .question-grid,
  .activity-layout { grid-template-columns: 1fr; }
  .question-grid section,
  .activity-layout > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .term-row { grid-template-columns: 1fr; }
  .term-row dd { border-left: 0; padding-top: 0; padding-left: 0; }
  .source-register li { grid-template-columns: 38px 1fr; }
  .source-register a { grid-column: 2; margin: 0 16px 14px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (forced-colors: active) {
  .teacher-card,
  .method-grid article,
  .source-register,
  .boundary-section { color: CanvasText; border-color: CanvasText; background: Canvas; box-shadow: none; }
  a,
  button { color: LinkText; border-color: ButtonText; forced-color-adjust: auto; }
  :focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }
}

@page { size: A4 portrait; margin: 12mm; }

@media print {
  :root { --content: 100%; }
  body { background: #fff; font-size: 10pt; }
  .topbar,
  .hero-stage,
  .draft-stamp,
  .card-index,
  .language-switch,
  .boundary-section > a { display: none; }
  .hero { display: block; min-height: 0; border: 0; }
  .hero-copy { padding: 0 0 24px; }
  .hero h1 { font-size: 38pt; }
  .metric-strip { break-inside: avoid; }
  .teacher-card { break-before: page; box-shadow: none; }
  .teaching-block > * { display: block; }
  .sources-section { break-before: page; }
  a { text-decoration: none; }
}
