/* The material samples and workbench records share the same reading measure. */
.chapter-mode { scroll-padding-top: calc(var(--masthead) + 1px); scroll-behavior: auto; }
.chapter-mode .reading-screen {
  position: relative; display: flex; flex-direction: column; justify-content: safe center;
  height: calc(100svh - var(--masthead) - 1px); min-height: 0; padding: clamp(16px,3.2svh,42px) 0;
  overflow: auto; overscroll-behavior-y: contain; scroll-margin-top: 0;
}
.chapter-mode .reading-screen:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.short-window-details > summary { display: none; }
.reading-screen > :is(.shell,footer) { flex: 0 0 auto; }
.reading-screen > .shell { width: min(87%,1280px); }
.reading-screen .section-heading { gap: clamp(18px,3.3vw,46px); margin-bottom: clamp(18px,3svh,34px); }
.reading-screen .section-heading h2, .reading-screen.closing h2 {
  font-size: clamp(1.9rem,3.55vw,3.6rem); line-height: 1.14; letter-spacing: -.045em; text-wrap: balance;
}
.reading-screen .section-heading > p { max-width: 25em; font-size: clamp(.87rem,1.16vw,1rem); line-height: 1.64; }
.reading-screen .scene-label { margin: 0 0 .4rem; color: var(--muted); font-size: .85rem; letter-spacing: 0; }
.section-alias { position: absolute; top: 0; }
.chapter-subhead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem;
  padding: 0 0 .5rem; border-bottom: 1px solid var(--line);
}
.chapter-subhead h3 { font-size: 1.12rem; font-weight: 650; line-height: 1.3; }
.chapter-subhead > :is(span,a) { color: var(--muted); font-size: .77rem; }

.training { background: #f3f1e8; --ink: #1a3141; --muted: #4d6269; --line: #bfc9c9; }
.training-layout, .workbench-layout, .research-layout {
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items: start;
  gap: clamp(18px,3.2vw,48px);
}
.corpus-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem .7rem; margin-top: .75rem; }
.part-sample {
  min-width: 0; display: flex; flex-direction: column; background: #faf9f3; border: 1px solid #c4cdcd;
  border-radius: 4px; overflow: hidden;
}
.part-sample .image-trigger { display: block; width: 100%; background: #223643; border-radius: 0; }
.part-sample .image-trigger:focus-visible { outline-offset: -4px; }
.part-sample .image-trigger img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.part-sample figcaption {
  flex: 1; padding: .55rem .68rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .2rem .65rem; color: #1e3444; line-height: 1.2; font-size: .94rem;
}
.part-sample figcaption strong { font-weight: 650; }
.part-sample small { display: block; margin-top: .28rem; color: var(--muted); font-size: .77rem; }
.part-sample a { min-height: 32px; display: inline-flex; align-items: center; gap: .24rem; color: #274d66; font-size: .78rem; text-underline-offset: 3px; }
.part-sample a:hover { text-decoration: underline; }
.part-sample a .icon { width: .75rem; height: .75rem; }
.part-sample:last-child { grid-column: 1/-1; display: grid; grid-template-columns: clamp(112px,12vw,165px) minmax(0,1fr); align-items: stretch; }
.part-sample:last-child figcaption { padding-inline: .85rem; }
.part-sample:last-child img { object-fit: contain; }
.training-method .chapter-subhead { margin-bottom: .75rem; }
.training-figure { max-inline-size: calc(max(30svh,100svh - 395px) * 8 / 5 + 2px); border: 1px solid #b7c8cc; }
:is(.training-figure,.process-still,.interface-frame) .image-trigger:focus-visible { outline-offset: -3px; z-index: 1; }
.training-figure .image-zoom-label { bottom: 8px; right: 8px; }
.training-steps, .workbench-notes { margin: .62rem 0; }
.training-steps > div, .workbench-notes > div {
  display: grid; grid-template-columns: 6.4em minmax(0,1fr); gap: .4rem .75rem; align-items: baseline;
  padding-block: .52rem; border-bottom: 1px solid var(--line); font-size: .86rem; line-height: 1.52;
}
.training-steps dt, .workbench-notes dt { font-weight: 650; }
.training-steps dd, .workbench-notes dd { margin: 0; color: var(--muted); }
.training-method > a { color: #254b64; text-decoration: underline; text-underline-offset: 4px; font-size: .85rem; }

.inference { --dark: #192d43; --dark-ink: #edf2f6; --dark-muted: #c2d2df; --dark-line: #597183; --dark-accent: #ffce98; background: var(--dark); }
.inference-board { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(13px,2.3vw,30px); }
.inference-pane {
  --ink: #203846; --muted: #4f6370; --line: #bbccd0; --accent: #225d6f;
  display: flex; min-width: 0; flex-direction: column; padding: clamp(11px,1.35vw,19px);
  border-radius: 4px; background: #e9eff0; color: var(--ink);
}
.inference-pane .chapter-subhead { border: 0; }
.inference-pane :focus-visible { outline-color: #225d6f; }
.review-mode { display: none; }
:is(.review-mode,.guide-replay,.evidence-viewer,.knowledge-review) { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
:is(.evidence-tabs,.guide-tabs) {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px;
  margin: 0 0 .75rem; background: #afc4cc; border: 1px solid #afc4cc; border-radius: 3px;
}
:is(.evidence-tabs,.guide-tabs,.review-mode) label { position: relative; }
:is(.evidence-tabs,.guide-tabs,.review-mode) input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
:is(.evidence-tabs,.guide-tabs,.review-mode) label span {
  display: grid; place-items: center; min-height: 40px; padding: .3rem .22rem; text-align: center;
  background: #f7f9f8; color: #3d5869; font-size: .82rem; line-height: 1.3;
}
:is(.evidence-tabs,.guide-tabs,.review-mode) input:checked + span { background: #dbe8eb; color: #19445b; font-weight: 650; box-shadow: inset 0 -2px #275e71; }
:is(.evidence-tabs,.guide-tabs,.review-mode) input:focus-visible + span { position: relative; z-index: 1; outline: 2px solid #275e71; outline-offset: -2px; }
.evidence-case, .guide-page {
  display: none; grid-template-columns: minmax(0,.87fr) minmax(0,1fr); gap: clamp(11px,1.4vw,22px); align-items: start;
}
.evidence-viewer:has(#evidence-scan:checked) #evidence-overview,
.evidence-viewer:has(#evidence-identify:checked) #evidence-identification,
.evidence-viewer:has(#evidence-ask:checked) #evidence-guidance,
.guide-replay:has(#guide-leg:checked) .guide-leg,
.guide-replay:has(#guide-first:checked) .guide-first,
.guide-replay:has(#guide-follow:checked) .guide-follow { display: grid; }
.evidence-frame, .workstation-input { position: relative; width: min(100%,36svh,260px); }
:is(.evidence-frame,.workstation-input) img { width: 100%; height: auto; }
.guide-camera { grid-area: 1/1; }
.guide-camera figcaption { padding-top: .35rem; color: var(--muted); font-size: .71rem; line-height: 1.4; }
:is(.guide-model,.evidence-model) { margin-bottom: .55rem; font-size: .77rem; color: var(--muted); font-weight: 550; line-height: 1.35; }
:is(.evidence-answer,.guide-dialogue) h3 { margin: 0 0 .6rem; font-size: clamp(1rem,1.43vw,1.35rem); line-height: 1.35; font-weight: 650; }
:is(.evidence-answer,.guide-dialogue) blockquote { margin: .5rem 0; padding: .32rem 0 .32rem .65rem; border-left: 2px solid #b45835; color: #19364a; font-weight: 580; line-height: 1.5; }
:is(.evidence-answer,.guide-context,.recorded-answer) { font-size: .86rem; line-height: 1.55; }
.guide-context { margin-top: .65rem; color: var(--muted); }
.evidence-answer ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .25rem .33rem; padding: 0; margin: .65rem 0; list-style: none; font-size: .8rem; }
.evidence-answer li { border-left: 2px solid var(--part-key); padding-left: .28rem; line-height: 1.4; }
.evidence-answer li:nth-child(1) { --part-key: #73974a; }
.evidence-answer li:nth-child(2) { --part-key: #c67757; }
.evidence-answer li:nth-child(3) { --part-key: #b7852e; }
.evidence-answer li:nth-child(4) { --part-key: #438f99; }
.evidence-answer a, .inference-notes a { text-decoration: underline; text-underline-offset: 3px; font-size: .8rem; }
.evidence-answer a { display: inline-block; margin-top: .55rem; color: #254d65; }
.evidence-answer summary { color: #204c65; cursor: pointer; font-weight: 650; padding-block: .3rem; }
.recorded-answer { padding-block: .15rem .4rem; }
.recorded-answer strong { font-size: 1rem; }
.label-hide, details[open] > summary .label-show, .observation-box { display: none; }
details[open] > summary .label-hide { display: inline; }
#evidence-identification:has(#inference-answer[open]) .observation-box { display: block; }
.inference-notes {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .5rem 1rem;
  border-top: 1px solid var(--dark-line); margin-top: .9rem; padding-top: .5rem; color: var(--dark-muted);
  font-size: .82rem; line-height: 1.55;
}
.inference-notes a { margin-left: .3rem; color: var(--dark-accent); }
.session-record summary { cursor: pointer; font-weight: 600; }
.session-record[open] { grid-column: 1/-1; }
.inference-foot { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; padding: .65rem 0 .3rem; }
.inference-foot strong { display: block; color: var(--dark-ink); }

.workspace { --ink: #1b3938; --muted: #4c6665; --line: #b5c6c1; background: #e7eeea; }
.workbench-layout { grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); }
.process-still { margin-top: .75rem; max-inline-size: calc(max(34svh,100svh - 465px) * 8 / 5); }
.process-still .image-trigger { background: #1b3032; border-radius: 3px; overflow: hidden; }
.process-still figcaption { font-size: .77rem; line-height: 1.5; color: var(--muted); margin-top: .42rem; }
.workbench-notes > div { grid-template-columns: 7.3em minmax(0,1fr); }
.workbench-tools .workspace-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: .55rem 0 .75rem; gap: 2px; }
.workbench-tools .workspace-tabs button { min-width: 0; padding: .42rem .6rem; border-radius: 2px 2px 0 0; }
.workbench-tools .workspace-tabs button > span { gap: .36rem; font-size: clamp(.86rem,1.16vw,1.16rem); line-height: 1.2; }
.workbench-tools .workspace-tabs .icon { width: 15px; height: 15px; }
.workbench-tools .workspace-tabs small { padding: 0; margin-top: .24rem; font-size: .7rem; line-height: 1.35; }
.workbench-tools .workspace-panel { display: flex; flex-direction: column-reverse; align-items: stretch; gap: .5rem; }
.workbench-tools .interface-frame {
  --preview-aspect-ratio: 8 / 5;
  --preview-height: max(32svh,100svh - 460px);
  max-inline-size: calc(var(--preview-height) * var(--preview-aspect-ratio) + 2px);
}
#panel-compile .interface-frame { --preview-aspect-ratio: 2; }
.workbench-tools .image-trigger > img { aspect-ratio: var(--preview-aspect-ratio); }
.workspace-story { display: block; padding: 0; }
.workspace-story h3 { font-size: 1.05rem; line-height: 1.35; margin: .2rem 0 .3rem; }
.workspace-story p, .workspace-story a { margin-top: .24rem; font-size: .84rem; line-height: 1.58; }
.workspace-story a { display: inline-flex; text-underline-offset: 3px; }

.knowledge { --ink: #263846; --muted: #4b6170; --line: #bbcad3; background: #edf1f2; }
.knowledge-overview { margin-top: .85rem; border-block: 1px solid var(--line); }
.knowledge-overview summary { padding: .6rem 0; cursor: pointer; font-size: .88rem; font-weight: 600; }
.knowledge-overview > a { display: inline-block; padding-bottom: .65rem; color: #285671; text-decoration: underline; font-size: .85rem; }
.knowledge-tabs { display: none; }
.knowledge-evidence {
  display: grid; grid-template-columns: minmax(0,4fr) minmax(0,4fr) minmax(0,7.6fr);
  gap: 0 clamp(9px,1.2vw,17px); margin: 0;
}
.knowledge-evidence .interface-frame {
  --screenshot-width: 1600;
  --capture-x: 1200;
  --capture-width: 400;
  --capture-height: 296;
  border-radius: 5px; box-shadow: none;
}
#knowledge-ports { --capture-y: 510; }
#knowledge-assembly { --capture-y: 195; }
#knowledge-training {
  --screenshot-width: 1760;
  --screenshot-height: 960;
  --capture-width: 855;
  --capture-height: 333;
}
.knowledge-evidence figcaption { display: block; min-height: 0; padding: .55rem .75rem; line-height: 1.4; }
.knowledge-evidence figcaption strong { display: block; font-size: .98rem; color: var(--ink); }
.knowledge-evidence figcaption span { display: block; margin-top: .18rem; font-size: .78rem; overflow-wrap: anywhere; }
/* The original screenshots are also the full-size images opened by the preview buttons. */
.knowledge-crop { position: relative; display: block; overflow: hidden; aspect-ratio: var(--capture-width) / var(--capture-height); }
.knowledge-crop img {
  position: absolute; max-width: none;
  width: calc(100% * var(--screenshot-width) / var(--capture-width));
  left: calc(-100% * var(--capture-x) / var(--capture-width));
  top: calc(-100% * var(--capture-y) / var(--capture-height));
}
.knowledge-annotation-preview { display: grid; grid-template-columns: minmax(0,535fr) minmax(0,320fr); }
.knowledge-annotation-preview .knowledge-crop { aspect-ratio: auto; }
.knowledge-annotation-preview img {
  top: 0;
  transform: translateY(calc(-100% * var(--capture-y) / var(--screenshot-height)));
}
.knowledge-annotation-picture { --capture-x: 617; --capture-y: 552; --capture-width: 510; }
.knowledge-annotation-details { --capture-x: 1440; --capture-y: 221; --capture-width: 320; }
.device-onboarding {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .65rem 1.5rem; align-items: center;
  margin-bottom: clamp(13px,2.1svh,24px); padding: clamp(11px,1.2vw,18px); border-left: 3px solid #487692;
  background: #dce7ed;
}
.device-onboarding h3 { font-size: 1.1rem; line-height: 1.35; }
.device-onboarding p { color: #3b5565; font-size: .89rem; line-height: 1.6; margin-top: .3rem; max-width: 65em; }
.device-onboarding > a { display: inline-flex; align-items: center; gap: .3rem; color: #244c64; font-size: .85rem; }
.device-onboarding a .icon { width: .85rem; height: .85rem; }

.research { --line: #c5cfcf; background: #eff3f0; }
.research-layout { grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); align-items: stretch; }
.research-layout:has(.research-case[open]) > * { grid-column: 1/-1; }
.research-demos .chapter-subhead { margin-bottom: .68rem; }
.research-demos .research-case { margin: 0 0 .7rem; border-radius: 4px; }
.research-demos .research-case summary { gap: .75rem; padding: clamp(12px,1.75vw,23px); }
.research-demos .research-case summary strong { font-size: clamp(.96rem,1.45vw,1.25rem); }
.research-layout .evidence { --dark: #223b44; --dark-line: #57717c; --dark-accent: #ffd0a2; margin: 0; border-radius: 4px; padding: clamp(14px,1.9vw,26px); }
.research-layout .evidence-top { flex-direction: row; align-items: start; gap: .65rem; padding-bottom: .65rem; }
.research-layout .evidence-top h3 { margin: 0 0 .38rem; font-size: clamp(1rem,1.7vw,1.5rem); line-height: 1.3; }
.research-layout .evidence-top p { font-size: .85rem; line-height: 1.4; margin-bottom: .2rem; }
.research-layout .evidence-top a { font-size: .8rem; }
.research-layout .volume-number { font-size: clamp(35px,4vw,58px); }
.research-layout .volume-number > span { margin-left: .3rem; }
.research-layout .evidence-charts { gap: .65rem 1.1rem; margin-top: .3rem; padding-top: .6rem; }
.research-layout .result-numbers { gap: .38rem; margin-block: .34rem .7rem; font-variant-numeric: tabular-nums; }
.research-layout .result-numbers > span { font-size: clamp(1.12rem,2vw,1.55rem); }
.research-layout .result-numbers strong { font-size: clamp(1.4rem,2.6vw,2.1rem); }
.research-layout .result-numbers b { margin-left: 0; }
.research-layout .evidence-note { margin-top: .65rem; line-height: 1.55; }

.chapter-mode .closing { justify-content: start; padding-bottom: 0; }
.chapter-mode .closing > .start-grid { margin-block: auto; padding-block: 1rem 2rem; }
.closing .start-note { padding: clamp(13px,2vw,27px); border-radius: 4px; }
.closing .start-note ol { margin: 0; gap: .8rem; }
.closing .start-note li + li { border-top: 1px solid #c5d7d7; padding-top: .7rem; }
.closing .site-footer { width: 100%; }
.closing .site-footer p { margin: 0; }

.chapter-counter { display: none; }
.page-markers {
  --rail-ink: #284967; --rail-active: #b14c21; position: fixed; z-index: 15; right: max(6px,1.2vw); top: 51%;
  transform: translateY(-50%); display: grid; justify-items: end; max-height: calc(100svh - var(--masthead) - 24px);
}
.page-markers[data-tone="dark"] { --rail-ink: #c4d8e4; --rail-active: #ffc38a; }
.page-markers a { display: flex; justify-content: flex-end; align-items: center; position: relative; width: 24px; min-height: min(2.9svh,26px); color: var(--rail-ink); text-decoration: none; }
.page-markers a::after { content: ''; position: absolute; right: 8px; height: 4px; width: 4px; border-radius: 4px; background: currentColor; opacity: .66; }
.page-markers a[aria-current]::after { height: min(2.05svh,18px); width: 4px; opacity: 1; background: var(--rail-active); }
.page-markers a:hover::after, .page-markers a:focus-visible::after { opacity: 1; }
.page-markers a span { position: absolute; right: 23px; white-space: nowrap; pointer-events: none; opacity: 0; padding: .28em .65em; border-radius: 3px; background: #f7f7ef; color: #24425c; box-shadow: 0 2px 8px #0e274326; font-size: .74rem; }
.page-markers a:is(:hover,:focus-visible) span { opacity: 1; }
.page-markers a:focus-visible { outline-offset: -2px; }
@media (max-width: 840px) {
  .chapter-counter:not([hidden]) { display: inline-flex; align-items: center; gap: 3px; min-height: 40px; padding: 0 .4rem; border: 0; background: transparent; font: 500 .77rem var(--font); color: #587084; font-variant-numeric: tabular-nums; }
  .chapter-counter b { color: #174573; font-size: 1rem; font-weight: 650; }
  .page-markers { display: none; }
  .page-markers.is-open {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); justify-items: stretch; gap: 1px 8px; overflow: auto;
    right: 12px; top: calc(var(--masthead) + 5px); transform: none; width: min(330px,calc(100vw - 24px));
    padding: 10px; border: 1px solid #a9baca; border-radius: 5px; box-shadow: 0 6px 24px #102e4438; background: #f6f8f8;
  }
  .page-markers a { justify-content: start; width: auto; height: 42px; gap: .6em; padding: 0 7px; color: #36556c; }
  .page-markers a::after { display: none; }
  .page-markers a::before { content: attr(data-number); font-size: .76rem; color: #657b87; font-variant-numeric: tabular-nums; }
  .page-markers a span { position: static; padding: 0; opacity: 1; background: transparent; box-shadow: none; font-size: .86rem; }
  .page-markers a[aria-current] { background: #dfeaf2; box-shadow: inset 2px 0 #c56228; }
}

@media (max-width: 1050px) {
  .reading-screen > .shell { width: min(90%,1280px); }
  .scene-detection span { font-size: 9px; }
  .research-layout .result-numbers { flex-wrap: wrap; }
}

@media (min-width: 841px) {
  .knowledge-evidence .interface-frame { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
  .knowledge-crop { height: 100%; }
}

@media (max-width: 840px) {
  .reading-screen > .shell { width: calc(100% - 2 * clamp(15px,4.5vw,32px)); }
  .reading-screen .section-heading {
    flex-direction: column; align-items: start; gap: .5rem; margin-bottom: 1rem;
  }
  .reading-screen .section-heading h2, .reading-screen.closing h2 { font-size: clamp(1.7rem,5.25vw,2.65rem); text-wrap: initial; }
  .reading-screen .section-heading > p { max-width: 47em; }
  .reading-screen .scene-label { font-size: .77rem; }
  .reading-screen .review-mode {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px;
    background: #5b7689; border: 1px solid #5b7689; margin-bottom: .7rem;
  }
  .review-mode label span { background: #283f54; color: #e5eaf0; }
  .inference-board { display: block; }
  .inference-pane .chapter-subhead { display: none; }
  #inference:has([name="review-mode"][aria-controls="recognition"]:checked) #assembly-guidance,
  #inference:has([name="review-mode"][aria-controls="assembly-guidance"]:checked) #recognition { display: none; }
  .inference-notes { grid-template-columns: 1fr; }
  .knowledge-tabs { display: grid; }
  .knowledge-evidence { grid-template-columns: minmax(0,1fr); }
  .knowledge-evidence > figure { display: none; }
  .knowledge-evidence .interface-frame { max-inline-size: calc(36svh * var(--capture-width) / var(--capture-height) + 2px); }
  .knowledge-review:has(#detail-ports:checked) #knowledge-ports,
  .knowledge-review:has(#detail-assembly:checked) #knowledge-assembly,
  .knowledge-review:has(#detail-training:checked) #knowledge-training { display: block; }
  #knowledge-training { --capture-width: 400; --capture-height: 296; }
  .knowledge-annotation-preview { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
  .knowledge-annotation-picture { --capture-x: 748; --capture-y: 511; --capture-width: 292; }
  .knowledge-annotation-details { --capture-width: 248; }
}

@media (min-width: 601px) and (max-width: 840px) {
  .reading-screen .section-heading { flex-direction: row; align-items: end; gap: 1rem; }
  .reading-screen .section-heading > p { max-width: 20em; font-size: .84rem; }
  .closing .start-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.4rem; }
  .evidence-frame, .workstation-input { max-width: 30svh; }
}

@media (max-width: 840px) and (max-height: 740px) {
  .knowledge-evidence .interface-frame {
    --capture-height: 172;
    max-inline-size: calc(26svh * var(--capture-width) / var(--capture-height) + 2px);
  }
  #knowledge-ports { --capture-y: 520; }
  #knowledge-assembly { --capture-y: 350; }
  #knowledge-training { --capture-height: 172; }
  .knowledge-annotation-picture { --capture-y: 575; --capture-width: 328; }
  .knowledge-evidence figcaption { padding: .35rem .55rem; }
  .knowledge-tabs { margin-bottom: .5rem; }
  .knowledge-overview { margin-top: .55rem; }
  .knowledge-overview summary { padding-block: .4rem; }
}

@media (max-width: 600px) {
  .chapter-mode .reading-screen { padding-block: 14px; }
  .training-layout, .workbench-layout, .research-layout { grid-template-columns: 1fr; gap: 1rem; }
  .chapter-subhead { padding-bottom: .4rem; }
  .chapter-subhead h3 { font-size: 1rem; }
  .corpus-strip { gap: .55rem; margin-top: .55rem; }
  .part-sample figcaption { padding: .43rem .5rem; font-size: .84rem; }
  .part-sample small, .part-sample a { font-size: .73rem; }
  .part-sample:last-child { grid-template-columns: 83px minmax(0,1fr); }
  .training-method { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: .35rem; }
  .training-method .chapter-subhead { grid-column: 1; grid-row: 1; margin-bottom: 0; border: 0; align-self: end; }
  .training-method :is(.training-steps,.text-link) { grid-column: 1/-1; }
  .training-figure { grid-column: 2; grid-row: 1; width: 120px; }
  .training-figure .image-zoom-label { font-size: .63rem; padding: .12rem .3rem; right: 3px; bottom: 3px; opacity: 1; }
  .training-steps, .workbench-notes { margin: .2rem 0; }
  .training-steps > div, .workbench-notes > div { padding-block: .41rem; font-size: .8rem; line-height: 1.45; grid-template-columns: 5.35em minmax(0,1fr); }
  .process-still { margin-top: .55rem; max-inline-size: calc(20svh * 8 / 5); }
  .workbench-tools .workspace-panel { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); align-items: start; }
  .workbench-tools .workspace-panel .interface-frame { grid-column: 1; grid-row: 1; }
  .workspace-story { grid-column: 2; }
  .workspace-story h3 { font-size: .94rem; }
  .workspace-story p, .workspace-story a { font-size: .76rem; line-height: 1.45; }
  .device-onboarding { grid-template-columns: 1fr; gap: .35rem; padding: .6rem .75rem; margin-bottom: .75rem; }
  .device-onboarding p { font-size: .81rem; }
  .research-layout .evidence-charts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .research-layout .evidence-top h3 { font-size: 1.1rem; }
  .research-layout .result-numbers { font-size: .75rem; }
  .inference-foot { grid-template-columns: 1fr; }
  .chapter-mode .closing { padding-bottom: 0; }
  .chapter-mode .closing > .start-grid { gap: 1rem; padding-block: 10px 16px; }
  .closing .start-grid > div > p, .closing .closing-buttons, .closing .historical-link { margin-top: .8rem; }
  .closing .site-footer { padding-block: 13px; }
  .closing .footer-top { gap: .5rem; }
  .closing .footer-bottom { margin-top: 10px; padding-top: 9px; }
}

@media (min-width: 601px) and (max-height: 730px) {
  .reading-screen .section-heading { margin-bottom: 13px; }
  .reading-screen .section-heading h2 { font-size: clamp(1.8rem,3.1vw,2.95rem); }
  .chapter-mode .reading-screen { padding-block: 13px; }
  .part-sample:not(:last-child) .image-trigger img { max-height: 30svh; }
  .part-sample:last-child .image-trigger img { max-height: 13svh; }
  .training-figure { max-inline-size: calc(34svh * 8 / 5 + 2px); }
  .process-still { max-inline-size: calc(39svh * 8 / 5); }
  .workbench-tools .interface-frame { --preview-height: 35svh; }
  .research-layout .evidence { padding: 16px; }
}

@media (max-width: 600px) and (max-height: 740px) {
  .chapter-mode .reading-screen { padding-block: 12px; }
  .reading-screen .section-heading { margin-bottom: .65rem; }
  .reading-screen .section-heading > p { font-size: .83rem; line-height: 1.49; }
  .chapter-subhead h3 { font-size: .93rem; }
  .corpus-strip { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .33rem; }
  .part-sample:last-child { display: flex; grid-column: auto; }
  .part-sample figcaption, .part-sample:last-child figcaption { padding: .3rem .36rem; }
  .part-sample figcaption small { margin-top: .16rem; }
  .part-sample a { min-height: 28px; }
  .training-figure { width: min(25vw,100px); }
  .training-layout { gap: .7rem; }
  .training-steps > div { padding-block: .32rem; grid-template-columns: 4.75em minmax(0,1fr); gap: .45rem; }
  .evidence-frame, .workstation-input { max-width: 25svh; }
  :is(.evidence-tabs,.guide-tabs,.review-mode) label span { min-height: 36px; }
  :is(.guide-context,.recorded-answer,.evidence-answer) { font-size: .8rem; line-height: 1.45; }
  .evidence-answer ul { margin-block: .35rem; }
  .inference-pane { padding: 9px; }
  .inference-notes { margin-top: .55rem; }
  .process-info { display: grid; grid-template-columns: minmax(0,.96fr) minmax(0,1.04fr); gap: .65rem; align-items: start; }
  .process-still { max-inline-size: none; }
  .workbench-notes > div { display: block; padding-block: .35rem; }
  .workbench-notes dt { margin-bottom: .15rem; }
  .workbench-tools .workspace-panel .interface-frame figcaption { min-height: 30px; padding: .35rem .45rem; font-size: .71rem; }
  .research-demos .chapter-subhead { display: none; }
  .research-demos .research-case { margin-bottom: .42rem; }
  .research-demos .research-case summary { padding: .55rem .72rem; }
  .research-demos .research-case summary small { font-size: .75rem; line-height: 1.4; }
  .research-layout .evidence { padding: .68rem .8rem; }
  .research-layout .evidence-charts { gap: .45rem .6rem; }
  .research-layout .comparison-bars > div { margin-bottom: 4px; }
  .research-layout .evidence-note { margin-top: .35rem; }
  .closing .start-note ol { gap: .5rem; }
  .closing .start-note li + li { padding-top: .5rem; }
  .closing .start-note p { line-height: 1.42; font-size: .8rem; }
  .closing .footer-top > p { display: none; }
  .closing .site-footer { padding-block: 9px; }
  .closing .footer-top .brand-mark { width: 28px; height: 28px; }
  .closing .footer-bottom { gap: .4rem; font-size: .69rem; }
  .short-window-details > summary { display: list-item; padding: .55rem 0; cursor: pointer; font-size: .85rem; font-weight: 650; }
  .device-onboarding { grid-template-columns: minmax(0,1fr) auto; gap: .25rem .5rem; }
  .device-onboarding > div { display: contents; }
  .device-onboarding h3 { grid-row: 1; grid-column: 1; font-size: .98rem; }
  .device-onboarding a { grid-row: 1; grid-column: 2; min-height: 28px; font-size: .75rem; }
  .device-onboarding p { grid-row: 2; grid-column: 1/-1; margin: 0; }
}

@media (max-width: 355px) and (max-height: 660px) {
  .chapter-mode .reading-screen { padding-block: 5px; }
  .reading-screen .section-heading { margin-bottom: .48rem; }
  .reading-screen .section-heading h2 { font-size: 23px; }
  .reading-screen .section-heading > p { font-size: .8rem; }
  .training-steps dd { font-size: .77rem; }
  .training-layout { gap: .5rem; }
  .training-figure { width: 64px; }
  .training-steps > div { padding-block: .2rem; }
  .training-method > a { line-height: 1.4; }
  .part-sample a { min-height: 26px; }
  .evidence-answer h3, .guide-dialogue h3 { font-size: .94rem; margin-bottom: .42rem; }
  .guide-page { grid-template-columns: minmax(0,.69fr) minmax(0,1fr); gap: .55rem; }
  .guide-dialogue blockquote { font-size: .86rem; line-height: 1.4; padding-block: .25rem; }
  .guide-context { margin-top: .4rem; }
  :is(.evidence-tabs,.guide-tabs) { margin-bottom: .48rem; }
  .inference-notes { gap: .22rem; padding-top: .36rem; }
  .workbench-tools .workspace-tabs { margin-block: .38rem .48rem; }
  .workbench-tools .workspace-tabs button { padding-block: .35rem; }
  .closing .site-footer { padding-block: 7px; }
  .closing .footer-bottom { margin-top: .3rem; }
  .research-layout .evidence { padding-block: .55rem; }
}

@media (max-width: 390px) and (max-height: 650px) {
  .research-demos .research-case summary small, .research-layout .comparison-bars { display: none; }
  .research-layout .evidence-charts { padding-top: .45rem; }
  .research-layout .result-numbers { margin-bottom: .2rem; }
}

@media (min-width: 601px) and (max-height: 675px) {
  .closing .site-footer { padding-block: 13px; }
  .closing .footer-bottom { margin-top: 11px; padding-top: 9px; }
  .training-figure { max-inline-size: calc(30svh * 8 / 5 + 2px); }
  .training-steps { margin-block: .35rem; }
  .training-steps > div { padding-block: .35rem; }
}

@media (min-width: 601px) and (max-height: 550px) {
  .chapter-mode .reading-screen { padding-block: 10px; }
  .reading-screen .section-heading { margin-bottom: 9px; }
  .reading-screen .section-heading h2, .reading-screen.closing h2 { font-size: clamp(1.55rem,7svh,2.6rem); }
  .reading-screen .section-heading > p { font-size: .81rem; line-height: 1.45; }
  .reading-screen .scene-label { font-size: .72rem; margin-bottom: .2rem; }
  .chapter-subhead { padding-bottom: .32rem; }
  .chapter-subhead h3 { font-size: .95rem; }
  .training-layout, .workbench-layout, .research-layout { gap: 1rem; }
  .corpus-strip { margin-top: .42rem; gap: .4rem; }
  .part-sample:not(:last-child) .image-trigger img { max-height: 29svh; object-fit: contain; }
  .part-sample:last-child .image-trigger img { max-height: 11svh; }
  .part-sample figcaption { padding: .25rem .5rem; font-size: .82rem; }
  .part-sample figcaption small, .part-sample a { font-size: .71rem; }
  .training-method .chapter-subhead { margin-bottom: .42rem; }
  .training-figure { max-inline-size: calc(29svh * 8 / 5 + 2px); }
  .training-steps > div, .workbench-notes > div { padding-block: .3rem; font-size: .79rem; line-height: 1.4; }
  .evidence-frame, .workstation-input { max-width: 21svh; }
  :is(.evidence-tabs,.guide-tabs,.review-mode) label span { min-height: 30px; }
  :is(.evidence-tabs,.guide-tabs,.review-mode) { margin-bottom: .45rem; }
  .inference-pane { padding: .63rem; }
  .guide-dialogue h3 { font-size: 1rem; margin-bottom: .35rem; }
  .guide-dialogue blockquote { font-size: .91rem; padding-block: .22rem; }
  .guide-context { font-size: .79rem; line-height: 1.45; margin-top: .42rem; }
  .evidence-answer h3 { font-size: 1rem; margin-bottom: .35rem; }
  .evidence-answer summary { padding-block: .2rem; line-height: 1.4; }
  .recorded-answer { font-size: .8rem; line-height: 1.4; }
  .inference-notes { margin-top: .53rem; font-size: .76rem; line-height: 1.35; }
  .process-still { margin-top: .42rem; max-inline-size: calc(30svh * 8 / 5); }
  .workbench-notes { margin-block: .3rem; }
  .workbench-tools .workspace-tabs { margin: .35rem 0 .42rem; }
  .workbench-tools .interface-frame { --preview-height: 21svh; }
  .workbench-tools .interface-frame figcaption { min-height: 25px; padding: .4rem .6rem; }
  .workbench-tools .workspace-panel { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(0,1fr); align-items: start; }
  .workbench-tools .workspace-panel .interface-frame { grid-column: 1; grid-row: 1; }
  .workbench-tools .workspace-story { grid-column: 2; }
  .workspace-story p, .workspace-story a { font-size: .78rem; line-height: 1.4; }
  .device-onboarding { margin-bottom: .53rem; padding: .5rem .72rem; }
  .device-onboarding p { font-size: .81rem; line-height: 1.45; }
  .knowledge-overview { margin-top: .55rem; }
  .knowledge-overview summary { padding-block: .3rem; }
  .knowledge-evidence { max-inline-size: calc(26svh * 1560 / 296); }
  .knowledge-evidence figcaption { padding: .3rem .5rem; line-height: 1.28; }
  .research-demos .research-case summary { padding: .6rem .8rem; }
  .research-layout .evidence { padding: .65rem .8rem; }
  .closing .start-grid > div > p, .closing .closing-buttons, .closing .historical-link { margin-top: .65rem; }
  .closing .site-footer { padding-block: 8px; }
  .closing .footer-bottom { padding-top: 7px; margin-top: 8px; }
  .closing .start-note { padding: .6rem .9rem; }
  .closing .start-note ol { gap: .46rem; }
  .closing .start-note li + li { padding-top: .4rem; }
  .closing .start-note p { font-size: .82rem; line-height: 1.45; }
  .chapter-mode .closing > .start-grid { padding-block: .5rem .75rem; }
}

@media (min-width: 601px) and (max-width: 840px) and (max-height: 550px) {
  .knowledge-evidence .interface-frame { max-inline-size: calc(24svh * var(--capture-width) / var(--capture-height) + 2px); }
}

@media (prefers-reduced-motion: no-preference) {
  .page-markers a::after, .page-markers a span { transition: height .19s ease,opacity .18s ease; }
}
@media print {
  .chapter-mode .reading-screen { height: auto; overflow: visible; display: block; break-before: page; }
  .page-markers, .chapter-counter { display: none !important; }
}
