/* Hallmark · shape: Specimen Book · theme: Specimen (3/3) · genre: editorial · hero: Poster · nav: masthead · footer: colophon · imagery: study plates · signature: layered Web boundaries · posture: restrained · v2.0.0 */
/* Critique: the plate and the headline each have room, while the index stays a ruled list for scanning. */
/* Waive 58 on lesson pages: tutorial prose is the product and is divided into separately headed steps. */
/* Waive F15 for the compact topic-row grid: its fields stay visually distinct from page columns. */
:root {
  --paper: oklch(96.5% 0.016 82);
  --paper-2: oklch(93.5% 0.02 80);
  --paper-3: oklch(89% 0.024 78);
  --ink: oklch(17% 0.012 60);
  --quiet: oklch(37% 0.017 62);
  --muted: oklch(46% 0.016 65);
  --rule: oklch(79% 0.018 75);
  --strong-rule: oklch(63% 0.02 72);
  --blue: oklch(43% 0.17 260);
  --focus: oklch(48% 0.19 260);
  --color-accent: var(--blue);
  --color-accent-ink: var(--paper);
  --font-display: "Bodoni Moda", Georgia, "Songti SC", "SimSun", serif;
  --font-body: "Geist", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --xs: .5rem;
  --sm: .75rem;
  --md: 1rem;
  --lg: 1.5rem;
  --xl: 2.5rem;
  --xxl: 4rem;
  --xxxl: 6rem;
  --column-gap: var(--xl);
  --gutter: clamp(1rem, 4.4vw, 4.5rem);
  --wrap: 86rem;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: var(--lg); scrollbar-color: var(--strong-rule) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.62 var(--font-body);
  font-synthesis: none;
}
::selection { color: var(--paper); background: var(--blue); }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
p { text-wrap: pretty; margin: 0 0 var(--md); }
a { color: inherit; text-underline-offset: .2em; text-decoration-color: var(--blue); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 {
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--ink);
  font: 400 1.07 var(--font-display);
  text-wrap: balance;
  margin: 0;
}
img { display: block; height: auto; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button {
  min-height: 44px;
  padding: var(--xs) var(--md);
  border: 1px solid var(--strong-rule);
  background: var(--paper);
}
button:hover { background: var(--paper-2); }
button:active { background: var(--paper-3); }
button:disabled { opacity: .6; cursor: not-allowed; }
button[aria-busy="true"] { cursor: progress; }
button[aria-pressed="true"] { border-color: var(--ink); background: var(--paper-2); }
.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; top: var(--sm); left: var(--md); padding: var(--sm); z-index: 3; background: var(--paper); }
.skip:not(:focus) { clip-path: inset(50%); }
.mast { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: var(--lg); border-bottom: 1px solid var(--strong-rule); }
.brand { font: 400 1.7rem/1 var(--font-display); letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--blue); }
.mast nav { display: flex; gap: clamp(var(--sm), 4vw, var(--xl)); font-size: .92rem; }
.mast nav a, .hero-actions a { white-space: nowrap; }
.mast nav a, .foot a { text-decoration-color: var(--rule); }
.hero {
  min-height: min(660px, calc(100svh - 74px));
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
  gap: var(--column-gap);
  align-items: center;
  padding-block: var(--xxl);
}
.hero h1 { font-size: clamp(4rem, 8.4vw, 8.6rem); line-height: .95; letter-spacing: -.06em; }
.hero-copy > p { color: var(--quiet); margin-top: var(--xl); max-width: 25em; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--lg); margin-top: var(--lg); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--xs) var(--lg); text-decoration: none; white-space: nowrap; border: 1px solid var(--ink); }
.primary { background: var(--ink); color: var(--paper); }
.primary:hover, .primary[aria-pressed="true"] { background: var(--blue); color: var(--paper); }
.primary:active { background: var(--quiet); color: var(--paper); }
.hero-figure { margin: 0; min-width: 0; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-figure .cover-map { aspect-ratio: auto; object-fit: contain; border: 1px solid var(--rule); }
.hero-figure figcaption { display: flex; justify-content: space-between; gap: var(--md); color: var(--muted); font-size: .83rem; margin-top: var(--sm); font-variant-numeric: tabular-nums; }
.catalog { border-top: 3px double var(--strong-rule); padding-block: var(--xxl); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: var(--md); }
.section-title h2, .method h2 { font-size: clamp(2.5rem, 5vw, 4.7rem); }
.section-title p, .level-head p, .results { color: var(--muted); font-size: .9rem; }
.section-title p, .level-head p { margin: 0; }
.course-tools { margin-top: var(--xl); display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: var(--lg); }
.search { width: min(100%, 26rem); }
.search label { display: block; font-size: .9rem; margin-bottom: var(--xs); }
.search input { background: var(--paper); border: 1px solid var(--strong-rule); width: 100%; padding: var(--xs) var(--md); min-height: 48px; border-radius: 0; caret-color: var(--blue); }
.filters { display: flex; gap: var(--xs); }
.filters button { min-height: 48px; white-space: nowrap; }
.filters button[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); }
.results { margin: var(--sm) 0 0; }
.level { margin-top: var(--xl); }
.level-head { display: flex; justify-content: space-between; align-items: end; padding-bottom: var(--sm); border-bottom: 1px solid var(--strong-rule); }
.level-head h3 { font-size: 2rem; }
.topics, .challenge-list { padding: 0; margin: 0; list-style: none; }
.topic a, .challenge-list li { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) auto; align-items: center; gap: var(--sm); min-height: 54px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.topic a:hover { color: var(--blue); background: var(--paper-2); }
.topic-id { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.topic-type { color: var(--muted); font-size: .78rem; text-align: end; white-space: nowrap; }
.topic[data-done="true"] .topic-id { color: var(--blue); }
.topic[data-done="true"] .topic-id::before { content: "✓ "; }
.sources {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--column-gap);
  border-top: 1px solid var(--strong-rule);
  padding-block: var(--xxl);
}
.sources h2 { font-size: clamp(2.1rem, 4vw, 3.7rem); margin-bottom: var(--md); }
.sources p { color: var(--quiet); }
.sources ul { margin: 0; padding: 0; list-style: none; }
.sources li { min-height: 54px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sm); border-bottom: 1px solid var(--rule); }
.sources li span { color: var(--muted); font-size: .87rem; }
.method { border-top: 1px solid var(--strong-rule); padding-block: var(--xxl) var(--xxxl); }
.method ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--column-gap); padding: 0; margin: var(--xl) 0 var(--lg); list-style: none; }
.method li { border-top: 1px solid var(--rule); padding-top: var(--md); }
.method li strong { display: block; margin-bottom: var(--xs); }
.method li p, .method > p { color: var(--quiet); }
.method > p { max-width: 65ch; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sm); border-top: 1px solid var(--rule); padding-block: var(--lg); color: var(--muted); font-size: .86rem; }
.foot strong { color: var(--ink); }
.lesson { padding-block: var(--xl) var(--xxl); max-width: 76rem; }
.breadcrumbs { display: flex; gap: var(--lg); flex-wrap: wrap; color: var(--muted); font-size: .89rem; }
.breadcrumbs a { white-space: nowrap; }
.lesson-head { border-bottom: 3px double var(--strong-rule); padding-block: var(--xl) var(--lg); }
.lesson-head h1 { font-size: clamp(2.55rem, 6vw, 5rem); }
.lesson-head p { margin: var(--md) 0 0; color: var(--muted); }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, .34fr); gap: var(--column-gap); padding-top: var(--xl); }
.lesson-copy, .lesson-side { min-width: 0; }
.lesson-copy section { margin-block: var(--xl); }
.lesson-copy h2 { font-size: clamp(1.75rem, 4vw, 2.55rem); margin-bottom: var(--md); }
.lesson-copy p { max-width: 66ch; }
.figure { margin: 0; }
.figure img { width: 100%; border: 1px solid var(--rule); }
.figure figcaption { color: var(--muted); font-size: .87rem; margin-top: var(--sm); font-variant-numeric: tabular-nums; }
.lesson-side { border-top: 1px solid var(--strong-rule); padding-top: var(--md); }
.lesson-side h2 { font-size: 1.5rem; margin-bottom: var(--md); }
.lesson-side a { color: var(--blue); }
.lesson-side [role="status"] { min-height: 1lh; margin-top: var(--sm); color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.exercise { margin-block: var(--sm); border-block-start: 1px solid var(--rule); padding-block: var(--sm); }
.exercise summary, .solution summary { min-height: 44px; color: var(--blue); }
.exercise p { padding-inline-start: var(--md); }
.solution { padding-inline-start: var(--md); }
.challenge-list li { grid-template-columns: minmax(0, 1fr) auto; }
.challenge-list a { color: var(--blue); overflow-wrap: break-word; }
.challenge-list span { color: var(--muted); font-size: .82rem; }
.step-links { display: flex; justify-content: space-between; gap: var(--lg); flex-wrap: wrap; padding-top: var(--lg); border-top: 1px solid var(--rule); }
@media (max-width: 52rem) {
  .hero { min-height: auto; grid-template-columns: minmax(0, 1fr); gap: var(--xl); padding-block: var(--xl); }
  .hero-copy > p { margin-top: var(--lg); }
  .hero h1 { font-size: clamp(3.45rem, 13vw, 6rem); }
  .hero-figure img { aspect-ratio: 16 / 10; }
  .lesson-grid, .method ol, .sources { grid-template-columns: minmax(0, 1fr); gap: var(--lg); }
  .lesson-grid { padding-top: var(--lg); }
  .method { padding-block: var(--xl); }
}
@media (max-width: 28rem) {
  .mast { gap: var(--sm); }
  .mast nav { gap: var(--sm); font-size: .83rem; }
  .topic a { grid-template-columns: 3.7rem minmax(0, 1fr); }
  .topic-type { grid-column: 2; text-align: start; margin-bottom: var(--xs); }
  .section-title { align-items: start; flex-direction: column; }
  .hero-actions { gap: var(--md); }
  .filters button { padding-inline: var(--sm); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
