:root {
  color-scheme: light;
  --paper: #f5f1e7;
  --paper-light: #fbf9f2;
  --paper-line: rgba(60, 97, 150, .105);
  --ink: #202b38;
  --graphite: #4b5660;
  --muted: #6d7478;
  --blue: #254b83;
  --red: #a84c42;
  --gold: #b88737;
  --rule: rgba(32, 43, 56, .2);
  --sans: Inter, "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, var(--paper-line) 36px, transparent 37px);
  background-attachment: fixed;
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: clamp(22px, 7.2vw, 112px);
  width: 1px;
  background: rgba(174, 78, 67, .28);
  pointer-events: none;
}
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { color: #17345d; }
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
::selection { color: #fff; background: var(--blue); }

.container { width: min(100% - 64px, 1140px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 500; top: -60px; left: 16px; padding: 8px 12px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }

.app-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 64px;
  background: rgba(245, 241, 231, .96);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.brand-wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.header-logo-wordmark { display: block; width: 52px; height: 42px; object-fit: contain; }
.quiet-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px clamp(10px, 2vw, 22px); margin-left: auto; font-size: .83rem; }
.quiet-nav a { color: var(--graphite); text-decoration: none; }
.quiet-nav a:hover { color: var(--blue); }
.btn-reset {
  padding: 5px 0 5px 12px;
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .78rem;
}
.btn-reset:hover { color: var(--blue); }

.notebook-main { position: relative; isolation: isolate; }
.reasoning-thread { position: absolute; z-index: 0; inset: 0 auto auto 0; width: 100%; overflow: visible; pointer-events: none; }
.reasoning-thread path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.thread-ink { stroke: rgba(37, 75, 131, .42); stroke-width: 2.2; }
.thread-branch { stroke: rgba(37, 75, 131, .48); stroke-width: 2; stroke-dasharray: 8 9; opacity: 0; transition: opacity .25s ease; }
.reasoning-break-shown .thread-branch { opacity: .92; }
.thread-branch.branch-a { stroke: var(--red); }
.thread-ending { stroke: var(--blue); stroke-width: 2.6; }
.thread-anchor { position: absolute; width: 1px; height: 1px; pointer-events: none; }
#thread-cover { top: 55%; left: 75%; }
#thread-path-start { top: 24%; left: 50%; }
#thread-path-a { top: 49%; left: 25%; }
#thread-path-b { top: 61%; left: 75%; }
#thread-path-merge { top: 79%; left: 51%; }
#thread-demo-entry { top: 7%; left: 3.5%; }
#thread-challenge { top: 52%; left: 3.5%; }
#thread-diagnosis { top: 8%; left: 3.5%; }
#thread-balance { top: 78%; left: 3.5%; }
#thread-research-entry { top: 7%; left: 3.5%; }
#thread-research { top: 0; left: 0; }
#thread-data { top: 8%; left: 3.5%; }
#thread-data-exit { top: 91%; left: 3.5%; }
#thread-roadmap-entry, #thread-roadmap, #thread-roadmap-exit { top: 0; left: 0; }
#thread-ending-anchor { top: 83%; left: 52%; }

.journey-chapter { position: relative; z-index: 1; scroll-margin-top: 72px; }
.chapter-inner { position: relative; }
.chapter-cover { min-height: calc(100svh - 64px); display: flex; align-items: center; padding: 72px 0 104px; }
.cover-inner { max-width: 1120px; padding-left: clamp(48px, 13vw, 190px); }
.margin-note { margin: 0 0 14px; color: var(--red); font: italic 1rem var(--serif); transform: rotate(-2deg); transform-origin: left; }
.cover-headline { max-width: 970px; margin: 0; font-size: clamp(3.2rem, 9.6vw, 8.6rem); line-height: .91; letter-spacing: -.075em; font-weight: 650; }
.cover-headline em, .section-headline em { color: var(--blue); font-family: var(--serif); font-weight: 400; }
.cover-equation { margin: clamp(34px, 7vh, 76px) 0 16px; color: var(--blue); font: 500 clamp(2rem, 5.3vw, 4rem)/1.15 var(--mono); letter-spacing: -.09em; }
.cover-copy { max-width: 460px; margin: 0; color: var(--graphite); font: 1.1rem/1.55 var(--serif); }
.cover-reveal-phrase { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 42px 0 4px; font-size: clamp(1.5rem, 4vw, 3.2rem); line-height: 1.03; font-weight: 790; letter-spacing: -.055em; }
.cover-reveal-phrase span + span { color: var(--red); padding-left: clamp(24px, 6vw, 84px); }
.cover-question { margin: 17px 0 20px; font: italic clamp(1.2rem, 2vw, 1.8rem) var(--serif); }
.quiet-scroll-link { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); text-decoration: none; font-size: .82rem; }
.quiet-scroll-link:hover { color: var(--blue); }

.chapter-paths { min-height: 118svh; padding: 108px 0 140px; }
.paths-inner { padding-left: clamp(20px, 8vw, 112px); }
.section-headline { max-width: 800px; margin: 0; font-size: clamp(2.45rem, 6vw, 5.8rem); line-height: .98; letter-spacing: -.065em; font-weight: 680; }
.section-subhead { max-width: 630px; margin: 18px 0 0; color: var(--graphite); font: 1.06rem/1.55 var(--serif); }
.shared-equation { width: fit-content; margin: 42px 0 28px; padding-bottom: 7px; color: var(--blue); border-bottom: 2px solid rgba(37, 75, 131, .55); font: 500 clamp(1.7rem, 4.3vw, 3.2rem)/1.25 var(--mono); letter-spacing: -.08em; }
.path-spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 10vw, 150px); max-width: 950px; }
.solution-path { padding: 14px 0 8px; }
.solution-path h3 { margin: 0 0 12px; color: var(--muted); font-size: .79rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.path-steps-list { margin: 0; padding: 0; list-style: none; background: transparent; border: 0; }
.path-step-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: baseline; gap: 12px; min-height: 48px; padding: 8px 0; border: 0; border-bottom: 1px solid rgba(32, 43, 56, .15); background: transparent; }
.step-lbl { color: #85847c; font: .72rem var(--mono); }
.step-eq { color: var(--ink); font: 500 clamp(1.08rem, 2.1vw, 1.55rem)/1.35 var(--mono); letter-spacing: -.06em; white-space: nowrap; }
.path-step-outcome .step-eq { color: var(--blue); }
.path-result-note { margin: 38px 0 12px; font: 1.25rem/1.5 var(--serif); }
.path-result-note strong { color: var(--red); font-weight: 600; }
.paths-diverge-details { max-width: 620px; margin-top: 26px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.paths-diverge-details summary { padding: 11px 0; cursor: pointer; color: var(--blue); font-size: .85rem; }
.paths-diverge-content { padding: 0 0 14px; color: var(--graphite); font: .93rem/1.55 var(--serif); }
.paths-diverge-content p { margin: 0; }

.chapter-demo { padding: 140px 0 150px; }
.demo-inner { max-width: 940px; margin-left: max(32px, calc((100vw - 1140px) / 2 + 92px)); margin-right: 32px; }
.section-header { margin-bottom: 32px; }
.path-selector-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 760px; margin: 30px 0 25px; border-bottom: 1px solid var(--rule); }
.path-tabs, .diag-path-tabs { display: flex; align-items: center; gap: 22px; }
.path-tab-btn { position: relative; padding: 11px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; color: var(--muted); font-size: .9rem; }
.path-tab-btn.active { color: var(--blue); border-color: var(--blue); font-weight: 650; box-shadow: none; }
.btn-compare, .btn-action-text { padding: 8px 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: .83rem; text-decoration: underline; text-underline-offset: .2em; }
.btn-compare:hover, .btn-action-text:hover { color: var(--red); }
.comparison-section { display: none; max-width: 800px; margin: 22px 0 32px; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: transparent; box-shadow: none; }
.comparison-section.visible { display: block; }
.comparison-section h3 { margin: 0 0 14px; font: 1.15rem var(--serif); }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.comparison-col { padding: 0; border: 0; background: transparent; }
.comparison-col h4 { margin: 0 0 8px; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.comparison-col p { margin: 6px 0; font: .95rem var(--mono); }
.workspace-grid-single { max-width: 760px; }
.challenge-panel, .panel, .probe-panel { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.panel-header { padding: 0 0 12px; border-bottom: 1px solid var(--rule); }
.panel-header-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.panel-title { margin: 0; color: var(--ink); font: 1.2rem var(--serif); letter-spacing: -.02em; }
.student-work-title { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.panel-body { padding: 0; }
.notebook-paper-container { position: relative; margin: 15px 0 12px; padding: 12px 0 12px clamp(25px, 5vw, 60px); background: transparent; border: 0; }
.notebook-paper-container::before { content: ""; position: absolute; top: 0; bottom: 0; left: 15px; border-left: 1px solid rgba(168, 76, 66, .45); }
.paper-header { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 8px; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: .76rem; }
.paper-lines { margin: 8px 0 0; padding: 0; list-style: none; }
.paper-line-item { position: relative; margin: 0; }
.paper-line-btn { position: relative; display: block; width: 100%; min-height: 47px; padding: 7px 8px; text-align: left; border: 0; border-bottom: 1px solid rgba(60, 97, 150, .13); border-radius: 0; background: transparent; cursor: pointer; }
.paper-line-btn:hover { background: rgba(255, 255, 255, .36); }
.line-btn-content { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; }
.line-num-tag { color: #89877e; font: .7rem var(--mono); }
.line-equation-text { position: relative; color: var(--ink); font: 500 clamp(1.08rem, 2.6vw, 1.55rem)/1.4 var(--mono); letter-spacing: -.055em; }
.line-role-tag, .break-pill-badge, .step-tag, .badge, .sticker { display: inline; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: 0; }
.line-break-revealed { border-bottom-color: rgba(168, 76, 66, .55); background: transparent; }
.line-break-revealed .line-equation-text { color: var(--red); }
.line-break-revealed::after { content: ""; position: absolute; left: 0; right: 10%; bottom: 2px; height: 1px; background: var(--red); transform: rotate(-.45deg); }
.line-incorrect-selected { background: rgba(184, 135, 55, .1); }
.handdrawn-ring { position: absolute; inset: -3px -14px -5px -8px; width: calc(100% + 22px); height: calc(100% + 8px); overflow: visible; pointer-events: none; }
.ring-path { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 300; stroke-dashoffset: 0; }
.connector-container { height: 9px; margin-left: 25px; color: rgba(37, 75, 131, .55); overflow: hidden; }
.connector-svg { width: 18px; height: 18px; margin-top: -4px; }
.challenge-controls-wrapper { margin: 20px 0 0; }
.challenge-feedback-msg { min-height: 34px; padding: 8px 12px; border: 0; border-left: 2px solid var(--blue); border-radius: 0; display: flex; align-items: center; gap: 10px; background: transparent; color: var(--graphite); font: .95rem/1.45 var(--serif); }
.challenge-neutral { border-left-color: rgba(37, 75, 131, .45); }
.challenge-success { border-left-color: #54734d; color: #365438; }
.challenge-hint { border-left-color: var(--red); color: #803e36; }
.feedback-subtext { margin: 4px 0 0; font-size: .88rem; }
.challenge-actions-bar { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.trace-disclosure { margin-top: 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.trace-summary { display: flex; gap: 20px; justify-content: space-between; padding: 12px 0; cursor: pointer; font-size: .84rem; }
.trace-summary-hint { color: var(--muted); font-size: .75rem; }
.step-cards { padding: 0 0 16px; }
.step-card { padding: 10px 0; border-bottom: 1px solid rgba(32, 43, 56, .15); background: transparent; }
.step-card-top { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.step-number-tag { color: var(--muted); font: .72rem var(--mono); }
.step-math { color: var(--blue); font: 1rem var(--mono); }
.step-desc { margin: 5px 0 0 52px; color: var(--graphite); font-size: .86rem; }
.hypothesis-box { display: none; margin: 20px 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: transparent; }
.hypothesis-box:not(.hypothesis-locked) { display: block; }
.hypothesis-title { margin: 0 0 5px; font: 1.1rem var(--serif); }
.hypothesis-body, .hypothesis-caution { margin: 5px 0; color: var(--graphite); font-size: .9rem; }
.hypothesis-caution { color: var(--muted); font-style: italic; }

.chapter-diagnosis { min-height: 108svh; padding: 125px 0 140px; }
.diagnosis-inner { max-width: 860px; margin-left: max(32px, calc((100vw - 1140px) / 2 + 170px)); }
.diag-path-tabs { margin: 30px 0 28px; border-bottom: 1px solid var(--rule); }
.probe-panel { max-width: 700px; }
.probe-panel > .panel-title { margin-bottom: 16px; font-size: 1.45rem; }
.probe-target-label { margin: 20px 0 0; color: var(--muted); font-size: .78rem; }
.probe-equation { margin: 0 0 22px; color: var(--blue); font: 500 clamp(1.8rem, 5vw, 3.6rem)/1.2 var(--mono); letter-spacing: -.07em; }
.options-fieldset { margin: 0; padding: 0; border: 0; }
.options-legend { margin: 0 0 8px; color: var(--graphite); font-size: .82rem; }
.option-item { display: flex; align-items: center; gap: 10px; max-width: 430px; min-height: 42px; padding: 7px 4px; border-bottom: 1px solid rgba(32, 43, 56, .14); }
.option-input { width: 16px; height: 16px; accent-color: var(--blue); }
.option-label { cursor: pointer; }
.diagnostic-actions { display: flex; align-items: center; gap: 22px; margin-top: 17px; }
.btn-primary, .btn-secondary { min-height: 38px; padding: 7px 16px; border: 1px solid var(--blue); border-radius: 2px; background: var(--blue); color: #fff; cursor: pointer; font-size: .84rem; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--blue); }
.btn-primary:hover:not(:disabled) { background: #183761; }
.btn-secondary:hover { background: rgba(37, 75, 131, .07); }
.feedback-container { display: none; max-width: 650px; margin-top: 28px; }
.feedback-container.visible { display: block; }
.feedback-card { padding: 15px 0; border: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; }
.feedback-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.feedback-headline-group { display: flex; align-items: baseline; gap: 10px; }
.feedback-status-title { margin: 0; font: 1.15rem var(--serif); }
.feedback-indicator-icon { color: var(--blue); }
.feedback-category { color: var(--red); font-size: .76rem; }
.feedback-text { color: var(--graphite); font: .95rem/1.55 var(--serif); }
.balance-visualizer { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.balance-visualizer-header { border-bottom: 1px solid var(--rule); }
.balance-title { margin: 0; padding: 0 0 8px; color: var(--graphite); font: 1rem var(--serif); }
.balance-steps { display: grid; gap: 8px; padding-top: 10px; }
.balance-step-row { display: block; padding: 7px 0; border-bottom: 1px solid rgba(32, 43, 56, .12); font: .95rem var(--mono); }
.balance-step-math-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: center; gap: 10px; }
.balance-step-math { grid-column: 1 / -1; }
.balance-side-lhs, .balance-side-rhs { display: flex; gap: 4px; min-width: 0; }
.balance-side-rhs { justify-content: flex-start; }
.balance-equals-sign { text-align: center; color: var(--muted); }
.op-accent { color: var(--red); }
.balance-step-note { display: block; margin-top: 5px; color: var(--muted); font: italic .79rem var(--serif); }
.balance-step-lhs, .balance-step-rhs { display: flex; gap: 7px; align-items: baseline; }
.balance-equals { color: var(--muted); text-align: center; }
.balance-op { color: var(--red); }
.balance-op-pulse { animation: ink-pulse .8s ease-in-out 2; }
@keyframes ink-pulse { 50% { color: var(--red); transform: translateY(-2px); } }
.uncertainty-note { max-width: 500px; margin: 26px 0 0; color: var(--muted); font: italic .95rem var(--serif); }
.fix-idea-note { margin: 62px 0 0 auto; width: fit-content; color: var(--red); font: italic clamp(1.3rem, 3vw, 2.2rem) var(--serif); transform: rotate(-2deg); }

.chapter-research { padding: 130px 0 145px; }
.research-inner { max-width: 960px; margin-left: max(32px, calc((100vw - 1140px) / 2 + 120px)); }
.research-inner .section-headline { max-width: 750px; }
.research-quick-links { display: flex; gap: 22px; margin: 30px 0 42px; flex-wrap: wrap; font-size: .85rem; }
.experiment-record { max-width: 870px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.experiment-header { display: block; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.experiment-title-group .eyebrow, .experiment-header > .badge, .datacards-header, .roadmap-header { display: none; }
.experiment-title { margin: 0; font: 1.3rem var(--serif); }
.experiment-desc { max-width: 720px; margin: 15px 0 30px; color: var(--graphite); font-size: .94rem; }
.record-label { margin: 0 0 12px; color: var(--red); font: .74rem var(--mono); letter-spacing: .06em; }
.record-label span { color: var(--muted); letter-spacing: 0; }
.record-sample { max-width: 720px; margin: 0 0 24px; color: var(--graphite); font: .92rem/1.5 var(--serif); }
.record-compare { max-width: 760px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 46px; align-items: end; padding: 18px 0 10px; border-top: 1px solid var(--rule); border-bottom: 2px solid var(--blue); }
.record-measure { min-width: 0; }
.measure-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .78rem; }
.measure-heading strong { color: var(--blue); font: 600 1.6rem var(--mono); letter-spacing: -.06em; white-space: nowrap; }
.heuristic-measure .measure-heading strong { color: var(--graphite); }
.measure-track { height: 3px; margin: 6px 0 13px; background: rgba(32, 43, 56, .13); }
.measure-track span { display: block; height: 100%; background: var(--blue); }
.heuristic-measure .measure-track span { background: #8a8982; }
.record-difference { grid-column: 1 / -1; margin: 0 0 4px; color: var(--red); font: italic 1rem var(--serif); }
.record-secondary { margin: 18px 0 0 22px; color: var(--graphite); font-size: .86rem; }
.record-secondary strong { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.record-annotation { margin: 28px 0 8px 22px; color: var(--red); font: italic 1.06rem var(--serif); }
.record-scope { max-width: 760px; margin: 0 0 0 22px; color: var(--muted); font-size: .82rem; }
.chart-container { max-width: 760px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.chart-ruler, .chart-scale-note { display: none; }
.chart-header-row { font-size: .8rem; }
.chart-bars-track { gap: 8px; }
.chart-bar-row { gap: 5px; }
.bar-meta { font-size: .8rem; }
.bar-val { font: .95rem var(--mono); }
.bar-slot { height: 3px; border: 0; border-radius: 0; background: rgba(32, 43, 56, .13); }
.bar-fill, .bar-fill-primary { border-radius: 0; background: var(--blue); }
.bar-fill-muted { border-radius: 0; background: #8a8982; }
.scope-alert-card { margin: 20px 0; padding: 10px 0 10px 14px; border: 0; border-left: 2px solid var(--red); border-radius: 0; background: transparent; font-size: .84rem; }
.scope-alert-header { color: var(--ink); }
.scope-points { margin: 8px 0 0; padding-left: 18px; color: var(--graphite); }
.scope-points li { margin: 5px 0; }
.methods-disclosure { margin-top: 20px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: transparent; }
.methods-disclosure > summary { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; cursor: pointer; font-size: .84rem; }
.methods-disclosure > summary span { color: var(--muted); font-size: .76rem; }
.methods-content { padding: 12px 0 18px; color: var(--graphite); font-size: .86rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 22px; margin: 16px 0; }
.metric-cell { padding: 6px 0; border: 0; border-bottom: 1px solid rgba(32, 43, 56, .13); border-radius: 0; background: transparent; text-align: left; }
.metric-num { display: block; color: var(--blue); font: 1.1rem var(--mono); }
.metric-label { color: var(--muted); font-size: .72rem; }
.method-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.method-metrics div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid rgba(32, 43, 56, .12); }
.method-metrics dt { color: var(--muted); }
.method-metrics dd { margin: 0; color: var(--ink); text-align: right; }

.chapter-data { padding: 125px 0 150px; }
.data-inner { max-width: 1000px; padding-left: clamp(18px, 8vw, 112px); }
.data-entries, .datacards-grid { display: block; max-width: 910px; margin-top: 44px; }
.data-entry, .datacard-item { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 24px; padding: 22px 0; border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.datacard-top { display: block; }
.data-stage, .datacard-top .badge { margin: 5px 0 0; color: var(--red); font: .72rem var(--mono); letter-spacing: .06em; }
.datacard-name { display: block; margin: 0 0 5px; color: var(--ink); font: 1.25rem var(--serif); }
.datacard-role, .datacard-stats, .datacard-boundary, .datacard-license { margin: 5px 0; color: var(--graphite); font-size: .84rem; line-height: 1.5; }
.datacard-boundary { color: var(--muted); }
.datacard-license { font-size: .78rem; }
.datacard-footer { margin-top: 8px; padding: 0; border: 0; }
.datacard-footer a, .card-ext-link { font-size: .8rem; }
.data-entry h3 { margin: 0 0 8px; font: 1.3rem var(--serif); }
.data-entry p { margin: 5px 0; color: var(--graphite); font-size: .86rem; }
.data-entry .data-boundary, .data-entry .data-license { color: var(--muted); font-size: .78rem; }
.data-entry a { white-space: nowrap; }

.chapter-horizon { padding: 125px 0 80px; min-height: 118svh; }
.horizon-inner { max-width: 1000px; margin-left: max(32px, calc((100vw - 1140px) / 2 + 100px)); }
.horizon-inner > .section-header { margin-bottom: 34px; }
.roadmap-section-wrapper { max-width: 840px; }
.roadmap-list { position: relative; margin: 0; padding: 0 0 0 48px; list-style: none; }
.roadmap-list::before { content: ""; position: absolute; top: 9px; bottom: 16px; left: 11px; width: 1px; background: rgba(37, 75, 131, .46); }
.roadmap-step-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 18px; align-items: baseline; padding: 8px 0 18px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.roadmap-num { position: absolute; left: -48px; top: 13px; color: var(--blue); font: .68rem var(--mono); }
.roadmap-item-title { margin: 0; font: 1.02rem var(--serif); }
.roadmap-item-desc { margin: 5px 0 0; color: var(--graphite); font-size: .81rem; line-height: 1.45; }
.roadmap-status { color: var(--muted); font: .69rem var(--mono); text-align: right; }
.roadmap-step-item.done .roadmap-status { color: #4b6948; }
.roadmap-step-item.needed .roadmap-status { color: var(--red); }
.ending-line { position: relative; max-width: 740px; margin: 88px 0 48px auto; padding: 28px 0 26px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ending-line p { margin: 0; font-size: clamp(2rem, 5.4vw, 4rem); line-height: 1.02; letter-spacing: -.06em; }
.ending-line strong { color: var(--blue); font-family: var(--serif); font-style: italic; font-weight: 400; }
.ending-line > span { display: block; margin-top: 15px; color: var(--muted); font: italic 1rem var(--serif); }
.research-links-wrapper { max-width: 850px; margin: 26px 0 40px; }
.research-links-bar { display: block; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.research-links-primary { display: inline; }
.research-links-primary a, .research-links-list > p a { display: inline; padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; color: var(--blue); font-size: .86rem; font-weight: 500; text-decoration: underline; text-underline-offset: .18em; }
.research-links-primary a:hover { background: transparent; color: var(--red); }
.research-files-list { margin-top: 16px; }
.research-files-label { color: var(--muted); font-size: .78rem; }
.research-files-grid, .research-links-list ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 7px 0 0; padding: 0; list-style: none; }
.research-file-chip, .research-links-list li a { display: inline; padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--graphite); font-size: .78rem; font-weight: 500; text-decoration: underline; text-underline-offset: .18em; }
.research-file-chip:hover { color: var(--blue); }
.research-links-list > p { margin: 0; }
.link-separator { color: var(--muted); padding: 0 8px; }
.btn-return-cover { display: inline-block; padding: 8px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--muted); font-size: .8rem; text-decoration: underline; text-underline-offset: .2em; }

.plain-note { max-width: 700px; margin: 16px 0; color: var(--muted); font: .9rem var(--serif); }
.app-footer { position: relative; z-index: 1; padding: 22px 0 34px; border-top: 1px solid var(--rule); background: var(--paper); }
.footer-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner > p { margin: 0; color: var(--muted); font-size: .77rem; }
.footer-details { font-size: .78rem; }
.footer-details-summary { cursor: pointer; color: var(--blue); }
.footer-details-content { max-width: 760px; color: var(--graphite); line-height: 1.5; }
.footer-details-content p { margin: 8px 0; }

@media (max-width: 760px) {
  body::before { left: 20px; }
  .container { width: min(100% - 40px, 650px); }
  .header-inner { gap: 12px; }
  .header-logo-wordmark { width: 44px; height: 38px; }
  .chapter-cover { padding: 66px 0 80px; }
  .cover-inner { padding-left: 32px; }
  .cover-headline { font-size: clamp(3.4rem, 14vw, 6.3rem); }
  .cover-equation { font-size: clamp(1.8rem, 8vw, 2.7rem); }
  .chapter-paths, .chapter-demo, .chapter-diagnosis, .chapter-research, .chapter-data, .chapter-horizon { padding-top: 96px; padding-bottom: 100px; }
  .paths-inner, .data-inner { padding-left: 24px; }
  .path-spread { gap: 28px; }
  .demo-inner, .diagnosis-inner, .research-inner, .horizon-inner { width: min(100% - 40px, 650px); margin-inline: auto; padding-left: 24px; }
  .section-headline { font-size: clamp(2.5rem, 10vw, 4rem); }
  .section-subhead { font-size: .98rem; }
  .fix-idea-note { margin-top: 42px; }
  .record-compare { column-gap: 22px; }
  .roadmap-step-item { grid-template-columns: minmax(0, 1fr) 78px; gap: 10px; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 34px); }
  body::before { left: 12px; }
  .header-inner { min-height: 58px; gap: 10px; }
  .app-header { min-height: 58px; }
  .header-logo-wordmark { width: 42px; height: 35px; }
  .quiet-nav { gap: 5px 9px; font-size: .71rem; }
  .btn-reset { font-size: .73rem; }
  .cover-inner { padding-left: 19px; }
  .cover-headline { font-size: clamp(3.1rem, 15.6vw, 4.5rem); }
  .cover-copy { max-width: 330px; font-size: 1rem; }
  .cover-reveal-phrase { font-size: clamp(1.45rem, 7.4vw, 2rem); margin-top: 32px; }
  .cover-reveal-phrase span + span { padding-left: 20px; }
  .chapter-paths, .chapter-demo, .chapter-diagnosis, .chapter-research, .chapter-data, .chapter-horizon { padding-top: 76px; padding-bottom: 82px; }
  .paths-inner, .data-inner, .demo-inner, .diagnosis-inner, .research-inner, .horizon-inner { width: calc(100% - 34px); padding-left: 20px; }
  .section-headline { font-size: clamp(2.25rem, 11.2vw, 3.35rem); }
  .path-spread { grid-template-columns: 1fr; gap: 20px; }
  .path-step-row { min-height: 42px; }
  .step-eq { font-size: 1.12rem; }
  .path-selector-bar { align-items: flex-end; gap: 8px; }
  .path-tabs, .diag-path-tabs { gap: 16px; }
  .path-tab-btn { font-size: .82rem; }
  .btn-compare { font-size: .74rem; white-space: nowrap; }
  .comparison-grid { grid-template-columns: 1fr; gap: 20px; }
  .line-btn-content { grid-template-columns: 42px minmax(0, 1fr); gap: 8px; }
  .line-role-tag, .break-pill-badge { grid-column: 2; font-size: .68rem; }
  .line-equation-text { font-size: 1.08rem; }
  .paper-line-btn { min-height: 52px; padding-inline: 3px; }
  .trace-summary { flex-direction: column; gap: 3px; }
  .probe-equation { font-size: clamp(1.8rem, 8.4vw, 2.8rem); }
  .feedback-header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .balance-step-row { font-size: .78rem; }
  .record-compare { grid-template-columns: 1fr; gap: 4px; }
  .record-difference { margin-top: 3px; }
  .measure-heading strong { font-size: 1.4rem; }
  .metrics-grid, .method-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .methods-disclosure > summary { flex-direction: column; gap: 3px; }
  .data-entry, .datacard-item { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  .datacard-name, .data-entry h3 { font-size: 1.08rem; }
  .datacard-role, .datacard-stats, .datacard-boundary, .datacard-license, .data-entry p { font-size: .76rem; }
  .roadmap-list { padding-left: 34px; }
  .roadmap-list::before { left: 8px; }
  .roadmap-num { left: -34px; font-size: .63rem; }
  .roadmap-step-item { grid-template-columns: minmax(0, 1fr); gap: 2px; padding-bottom: 20px; }
  .roadmap-status { text-align: left; }
  .ending-line { margin-top: 58px; }
  .ending-line p { font-size: clamp(2rem, 10vw, 3rem); }
  .research-links-primary a { white-space: normal; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 10px; }
  #thread-cover { top: 94%; left: 3.5%; }
  #thread-path-start { top: 8%; left: 3.5%; }
  #thread-path-merge { top: 98%; left: -7px; }
  .thread-branch { display: none; }
}

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