/* Hallmark v2.0.0 · theme: almanac (dealt 1/3, seed clinichandbook-independent-reference-tool-4170·fa84cd8a·2026-12-02·r0) · genre: editorial · shape: Pinned story · hero: Stage · nav: edge-aligned wordmark and links · footer: mast · signature: the fifty states plotted as a live dot figure that reforms into the career steps and the index */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, no real rule pages exist yet; led with the plotted figure and the record format instead of invented sample rules */
/* waive: almanac motion (nothing moves except state) · the owner asked for a Three.js scene; motion is scroll-linked, one figure, and stops under prefers-reduced-motion */
:root {
  --color-paper: oklch(84% 0.012 245); --color-paper-2: oklch(81% 0.012 245); --color-paper-3: oklch(77% 0.012 245);
  --color-ink: oklch(16% 0.020 245); --color-ink-2: oklch(24% 0.018 245); --color-muted: oklch(38% 0.016 245);
  --color-rule: oklch(73% 0.013 240); --color-rule-2: oklch(32% 0.018 240);
  --color-accent: oklch(45% 0.180 350); --color-accent-2: oklch(37% 0.160 350); --color-accent-ink: oklch(97% 0.006 245); --color-focus: oklch(46% 0.190 350);
  --color-sheet: oklch(93.5% 0.008 245);
  --color-on-ink-muted: oklch(72% 0.012 245); --color-rule-on-ink: oklch(34% 0.018 245); --color-accent-on-ink: oklch(72% 0.150 350);
  --font-display: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Newsreader", ui-serif, Georgia, serif;
  --font-outlier: "IBM Plex Mono", ui-monospace, monospace;
  --radius-card: 0; --radius-pill: 2px; --rule-hair: 1px; --rule-bar: 2px;
  --tracking-display: -0.02em; --display-weight: 600;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1.0625rem; --text-lg: 1.25rem;
  --text-display: clamp(2.75rem, 5vw + 1rem, 5.25rem);
  --text-section: clamp(2rem, 2.5vw + 1rem, 3.25rem);
  --text-lead: clamp(1.125rem, 0.35vw + 1rem, 1.375rem);
  --wrap: 1240px; --gutter: clamp(20px, 4vw, 48px); --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-3xl); scrollbar-color: var(--color-muted) var(--color-paper); }
body { overflow-x: clip; margin: 0; background: var(--color-paper); color: var(--color-ink-2); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); color: var(--color-ink); letter-spacing: var(--tracking-display); line-height: 1.05; overflow-wrap: break-word; min-width: 0; }
h1 { font-size: var(--text-display); letter-spacing: -0.035em; line-height: 0.95; max-width: 11ch; }
h2 { font-size: var(--text-section); max-width: 16ch; }
p { margin: 0; }
h1, h2 { text-wrap: balance; }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
a { color: var(--color-ink); text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--color-accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.num { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: var(--text-lead); line-height: 1.45; max-width: 34ch; }

.nav { position: sticky; top: 0; z-index: 10; background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.nav-in { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.word { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.02em; text-decoration: none; }
.word b { font-weight: 600; color: var(--color-accent); }
.nav-links { display: flex; gap: var(--space-lg); font-family: var(--font-display); font-weight: 500; font-size: var(--text-sm); }
.nav-links a { text-decoration: none; padding-block: var(--space-xs); }
.nav-links a:hover { text-decoration-line: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }

.btn { display: inline-block; white-space: nowrap; border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); padding: var(--space-sm) var(--space-lg); font: 500 var(--text-sm)/1.2 var(--font-display); color: var(--color-ink); background: transparent; text-decoration: none; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
.btn:hover { background: var(--color-ink); color: var(--color-paper); }
.btn:active { background: var(--color-ink-2); color: var(--color-paper); }
.btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-2); border-color: var(--color-accent-2); color: var(--color-accent-ink); }
.btn--primary:active { background: var(--color-ink); border-color: var(--color-ink); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xl); }

.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-2xl); align-items: start; }
.chapters { grid-column: 1; grid-row: 1; }
.plate-col { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--nav-h) + var(--space-lg)); height: calc(100svh - var(--nav-h) - var(--space-lg) * 2); display: flex; align-items: center; }
.chapter { min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; padding-block: var(--space-2xl); }
.chapter > p { margin-top: var(--space-lg); max-width: 36ch; }
.chapter--hero { min-height: calc(100svh - var(--nav-h)); }
.steps { list-style: none; margin: var(--space-lg) 0 0; padding: 0; max-width: 22rem; border-top: var(--rule-bar) solid var(--color-rule-2); }
.steps li { display: flex; gap: var(--space-md); align-items: baseline; padding-block: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-rule); }
.steps .num { color: var(--color-muted); font-size: var(--text-sm); }

.sheet { margin: 0; width: 100%; max-height: 100%; display: flex; flex-direction: column; background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.sheet-head strong { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); color: var(--color-ink); letter-spacing: -0.01em; }
.sheet-head .num { color: var(--color-accent); font-weight: 500; }
.fig { position: relative; flex: 1 1 auto; aspect-ratio: 5 / 4; min-height: 0; }
.fig canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fig-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-lg); text-align: center; color: var(--color-muted); font-size: var(--text-sm); }
.scene-on .fig-fallback { display: none; }
.sheet-foot { display: flex; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); min-height: 2.9em; }
.sheet-foot .now { color: var(--color-ink); font-weight: 500; }

.band { background: var(--color-ink); color: var(--color-paper); padding-block: var(--space-3xl); }
.band h2 { color: var(--color-paper); }
.band .lead { color: var(--color-on-ink-muted); margin-top: var(--space-lg); }
.record { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-2xl); row-gap: var(--space-xl); align-items: start; }
.file { margin: 0; font-family: var(--font-outlier); font-size: var(--text-sm); line-height: 1.7; color: var(--color-sheet); white-space: pre-wrap; overflow-wrap: anywhere; padding-bottom: var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule-on-ink); }
.file b { font-weight: 500; color: var(--color-accent-on-ink); }
.fields { width: 100%; border-collapse: collapse; margin-top: var(--space-lg); }
.fields th, .fields td { text-align: left; vertical-align: baseline; padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule-on-ink); }
.fields th { font: 500 var(--text-sm)/1.4 var(--font-outlier); color: var(--color-sheet); white-space: nowrap; width: 9rem; }
.fields td { color: var(--color-on-ink-muted); font-size: var(--text-sm); }
.band .note { margin-top: var(--space-md); font-size: var(--text-sm); font-style: italic; color: var(--color-on-ink-muted); }

.contents { padding-block: var(--space-3xl); }
.contents-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--space-2xl); row-gap: var(--space-xl); align-items: start; }
.toc { width: 100%; border-collapse: collapse; }
.toc thead th { font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--color-muted); text-align: left; padding: 0 var(--space-md) var(--space-xs) 0; border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.toc td { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); vertical-align: baseline; }
.toc td:first-child { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); color: var(--color-ink); letter-spacing: -0.01em; white-space: nowrap; }
.toc td:last-child, .toc th:last-child { text-align: right; padding-right: 0; white-space: nowrap; color: var(--color-muted); font-size: var(--text-sm); }
.toc tr.is-next td:last-child { color: var(--color-accent); font-weight: 500; }

.foot { border-top: var(--rule-bar) solid var(--color-rule-2); padding-block: var(--space-xl) var(--space-2xl); }
.foot-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-2xl); row-gap: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.foot-in .word { font-size: var(--text-lg); color: var(--color-ink); }
.foot-links { display: flex; gap: var(--space-lg); margin-top: var(--space-sm); }

.doc { max-width: 44rem; padding-block: var(--space-2xl) var(--space-3xl); }
.doc h1 { max-width: none; font-size: var(--text-section); line-height: 1.05; letter-spacing: var(--tracking-display); }
.doc h2 { font-size: var(--text-lg); margin-top: var(--space-xl); max-width: none; }
.doc p, .doc ul { margin-top: var(--space-md); }

@media (max-width: 899px) {
  .story { display: block; }
  .plate-col { position: sticky; top: var(--nav-h); z-index: 2; height: auto; display: block; background: var(--color-paper); padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule-2); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .fig { aspect-ratio: auto; height: 34svh; }
  .sheet-head { padding: var(--space-xs) var(--space-md); }
  .sheet-head strong { font-size: var(--text-md); }
  .sheet-foot { padding: var(--space-xs) var(--space-md); min-height: 0; }
  .sheet-foot .hint { display: none; }
  .chapter, .chapter--hero { min-height: 52svh; padding-block: var(--space-xl); justify-content: flex-start; }
  .record, .contents-in, .foot-in { grid-template-columns: minmax(0, 1fr); }
  .nav-links a:not(:last-child) { display: none; }
  .toc td:nth-child(2), .toc th:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
