:root { color-scheme: light dark; --paper: #f7f5ee; --surface: #fffefa; --ink: #242b28; --muted: #59625b; --line: #d9ddd3; --accent: #765018; --tint: #f5eddc; --soft: #eeefe8; --focus: #8b590f; }
* { box-sizing: border-box; }
html { scroll-padding-top: 7rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, select { font: inherit; }
a { color: var(--accent); text-underline-offset: .2em; overflow-wrap: anywhere; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin-top: 0; }
p { margin-bottom: 0; }
.masthead { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; align-items: center; padding: .9rem max(1.25rem, calc((100vw - 1300px) / 2)); background: var(--paper); border-bottom: 1px solid var(--line); }
.wordmark { font-weight: 750; letter-spacing: -.035em; font-size: 1.1rem; }
.wordmark span { color: var(--muted); font-size: .85rem; font-weight: 450; letter-spacing: 0; margin-left: .5rem; }
.mode { font-size: .75rem; color: var(--muted); }
.page { max-width: 1300px; margin: auto; padding: 3.5rem 1.5rem 1.5rem; }
.intro { max-width: 920px; margin-bottom: 3rem; }
.eyebrow { font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); margin-bottom: .85rem; }
h1 { font: 400 clamp(2.4rem, 5vw, 4rem)/1.09 Georgia, "Times New Roman", serif; letter-spacing: -.045em; margin-bottom: 1.15rem; }
.subtitle { color: var(--muted); max-width: 740px; font-size: 1.05rem; }
.walkthrough-control { margin-top: 1.5rem; max-width: 32rem; }
.walkthrough-control label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .4rem; }
.walkthrough-control select { width: 100%; min-width: 0; min-height: 44px; padding: .65rem .5rem; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: .85rem; }
.active-walkthrough { margin-top: 1rem; font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }
.episode-notice { display: inline-block; margin-top: 1.4rem; padding: .55rem .8rem; border-left: 3px solid var(--accent); background: var(--tint); color: var(--accent); font-size: .83rem; }
.layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); align-items: start; gap: 2.5rem; }
.rail { position: sticky; top: 6rem; }
.rail ol { list-style: none; margin: 0; padding: 0; }
.rail li + li { margin-top: .35rem; }
.stage-button { display: flex; align-items: baseline; gap: .9rem; width: 100%; padding: .8rem .9rem; text-align: left; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.stage-button:hover { background: var(--soft); color: var(--ink); }
.stage-button[aria-current="step"] { background: var(--tint); border-color: var(--line); color: var(--accent); font-weight: 650; }
.stage-number { font-size: .7rem; font-variant-numeric: tabular-nums; flex: 0 0 1.1rem; }
.rail-note { padding: 1.5rem .9rem 0; font-size: .78rem; color: var(--muted); }
.panel { min-width: 0; padding: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.stage-heading { border-bottom: 1px solid var(--line); padding-bottom: 1.8rem; margin-bottom: 2rem; }
h2 { margin-bottom: 1.35rem; font-size: clamp(1.65rem, 3vw, 2.2rem); font-weight: 550; line-height: 1.2; letter-spacing: -.035em; scroll-margin-top: 7rem; }
.demonstration { padding: .7rem .9rem; background: var(--soft); border-radius: 4px; font-size: .82rem; }
.demonstration span { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2rem; }
.demonstration strong { font-weight: 550; }
h3 { font-size: .89rem; margin-bottom: .55rem; font-weight: 700; }
.narrative { display: grid; gap: 1.5rem; }
.narrative p { font-size: .94rem; }
.boundary { padding: 1.15rem 1.3rem; border-left: 3px solid var(--accent); background: var(--tint); }
.boundary h3 { color: var(--accent); }
.support { border-top: 1px solid var(--line); padding-top: 1.6rem; margin-top: 1.8rem; }
.support-note { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; vertical-align: top; padding: .65rem .8rem .65rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { width: 35%; color: var(--muted); font-weight: 500; }
td { padding-right: 0; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; }
.section-heading span { font-size: .72rem; color: var(--muted); }
.evidence-list { list-style: none; margin: 0; padding: 0; }
.evidence-list li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.evidence-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.evidence-list a { font-size: .9rem; font-weight: 550; }
details { font-size: .8rem; }
summary { color: var(--muted); padding: .5rem 0; }
summary:hover { color: var(--ink); }
.file-meta { margin: .4rem 0 0; }
.file-meta dt { color: var(--muted); margin-top: .4rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.file-meta dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; margin: .5rem 0 1rem; }
.stage-controls { display: flex; gap: 1rem; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.5rem; }
.stage-controls button { border: 1px solid var(--line); border-radius: 5px; padding: .65rem 1rem; background: var(--paper); color: var(--ink); font-size: .8rem; min-height: 44px; }
.stage-controls button:hover:enabled { border-color: var(--accent); color: var(--accent); }
.stage-controls button:disabled { opacity: .45; cursor: default; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .7rem; color: var(--muted); }
.panel p, .panel strong, h1, h2, button, footer { overflow-wrap: anywhere; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 20; padding: .6rem 1rem; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.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; }
@media (max-width: 850px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); gap: 1.25rem; }
  .panel { padding: 1.5rem; }
  .rail-note { padding-left: 0; }
}
@media (max-width: 640px) {
  .masthead { display: block; padding: .65rem 1rem; }
  .mode { font-size: .68rem; margin-top: .15rem; }
  .page { padding: 2rem 1rem 1rem; }
  .intro { margin-bottom: 2rem; }
  .layout { display: block; }
  .rail { position: static; margin-bottom: 1.5rem; }
  .rail ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; }
  .rail li + li { margin-top: 0; }
  .stage-button { padding: .65rem .5rem; gap: .35rem; height: 100%; font-size: .76rem; }
  .rail-note { display: none; }
  .panel { padding: 1.2rem; }
  .stage-controls { gap: .5rem; }
  .stage-controls button { padding: .65rem .6rem; }
  th { width: 40%; }
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1c211e; --surface: #232a25; --ink: #e9ece3; --muted: #b7c0b7; --line: #434c43; --accent: #e8c183; --tint: #343023; --soft: #30382f; --focus: #f2ce91; }
}
@media print {
  .masthead { position: static; }
  .rail, .stage-controls, .skip-link { display: none; }
  .layout { display: block; }
  .panel { border: 0; padding: 0; }
}
