@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/IBMPlexSerif-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/IBMPlexSerif-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("assets/fonts/IBMPlexSerif-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f5f1e8;
  --ink: #1d1c19;
  --soft-ink: #4e4b45;
  --muted: #6d6961;
  --rule: #d8cdba;
  --rule-dark: #b7aa95;
  --control-rule: #8d8475;
  --accent: #3d4a57;
  --accent-soft: #e5e5e1;
  --field: #fff;
  --scan-mat: #e9e2d7;
  --scan-dialog-mat: #d8d0c4;
  --control-height: 34px;
  --tap-height: 44px;
  --reader-size: 16px;
  --scan-rail-top: 88px;
  --page-anchor: 136px;
  --page-jump-anchor: 88px;
  --reader-tools-height: 74px;
}

* { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: auto;
}

body {
  width: min(100% - 44px, 1240px);
  overflow-x: hidden;
  overflow-x: clip;
  margin: 0 auto;
  padding: 34px 0 72px;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-color: var(--rule-dark);
  text-underline-offset: 3px;
}

a:hover { color: var(--accent); }

button,
input,
select { font: inherit; }

button,
input,
select,
.button-link {
  border: 1px solid var(--control-rule);
  border-radius: 0;
}

button {
  min-height: var(--control-height);
  padding: 6px 10px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

button:hover { background: var(--accent-soft); }
button:disabled { color: var(--rule-dark); cursor: default; background: transparent; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* A page or search jump moves reading focus into the text. Its page or line
   reference already marks the landing point; a box around the whole paragraph
   reads like an editorial annotation. Keyboard-tabbed controls keep the full
   focus ring above. */
.text-line > .line-copy[tabindex="-1"]:focus-visible { outline: 0; }

.skip-link {
  position: absolute;
  top: -60px;
  left: 14px;
  z-index: 10;
  padding: 7px 10px;
  background: var(--paper);
  border: 1px solid var(--ink);
}

.skip-link:focus { top: 12px; }

.site-header {
  width: min(100%, 900px);
  margin: 0 auto 46px;
}

.line-number,
.scan-current,
.stream-status {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.page-marker {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
.eyebrow,
.section-kicker,
.edition-note,
.search-result-label,
.site-footer {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

.eyebrow,
.section-kicker {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 { font-weight: 600; }

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: clamp(29px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.standfirst {
  max-width: 730px;
  margin-bottom: 23px;
  color: var(--soft-ink);
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 17px;
  line-height: 1.5;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-dark);
}

.button-link {
  display: inline-block;
  padding: 6px 10px;
  font-size: 13px;
  text-decoration: none;
}

.button-link-dark {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.button-link-dark:hover { color: #fff; background: var(--ink); }

.edition-note {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
}

.page-controls {
  display: flex;
  align-items: end;
  gap: 6px;
}

.page-field,
.section-field,
.search-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.page-field input {
  width: 66px;
  min-height: var(--control-height);
  padding: 6px 7px;
  color: var(--ink);
  background: var(--field);
}

.section-field select {
  width: 100%;
  min-height: var(--control-height);
  padding: 6px 30px 6px 8px;
  color: var(--ink);
  background: var(--field);
}

.search-field > div { display: flex; }

.search-field input {
  min-width: 0;
  width: 100%;
  min-height: var(--control-height);
  padding: 6px 8px;
  color: var(--ink);
  background: var(--field);
  border-right: 0;
}

.text-size button { min-width: 34px; }

.text-size output {
  display: inline-flex;
  min-width: 48px;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  margin-left: -1px;
  padding: 6px;
  color: var(--soft-ink);
  background: var(--field);
  border: 1px solid var(--rule-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.text-size output + button { margin-left: -1px; }

.search-results {
  position: relative;
  z-index: 19;
  max-height: min(55vh, 480px);
  margin: -8px 0 26px;
  padding: 14px 0 16px;
  overflow: auto;
  scroll-margin-top: calc(var(--reader-tools-height) + 8px);
  background: var(--paper);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.search-results #close-search:focus,
.search-results #close-search:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.search-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.search-results h2 { margin: 0; font-size: 17px; }
.search-results p { color: var(--muted); font-size: 12px; }
.search-results ol { margin: 0; padding: 0; list-style: none; }

.search-result {
  display: grid;
  width: 100%;
  gap: 3px;
  min-height: 0;
  padding: 9px 0;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--rule);
}

.search-result-label { color: var(--accent); font-size: 11px; }
.search-result-copy { color: var(--soft-ink); font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif; font-size: 14px; }

.page-grid {
  display: grid;
  grid-template-columns: minmax(340px, 448px) minmax(0, 760px);
  gap: 32px;
  align-items: start;
}

/* The scan sits on the left and the text on the right. The markup keeps the
   text first so reading order and screen readers still reach it first. */
.scan-rail { grid-column: 1; grid-row: 1; }
.reader-column { grid-column: 2; grid-row: 1; }

.reader-column,
.scan-rail { min-width: 0; }

.stream-status,
.scan-current {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
}

.page-stream { min-height: 70vh; }

.book-page {
  position: relative;
  min-width: 0;
  scroll-margin-top: var(--page-jump-anchor);
}

.book-page[data-rendered="false"] {
  min-height: var(--placeholder-height, 260px);
  content-visibility: auto;
  contain-intrinsic-size: auto var(--placeholder-height, 760px);
}

.book-page[data-rendered="false"]::before {
  content: "Loading PDF page " attr(data-page);
  position: absolute;
  top: 12px;
  left: 0;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
}

.page-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: end;
  margin: 0 0 22px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--rule-dark);
  scroll-margin-top: var(--page-jump-anchor);
}
.page-context-heading { min-width: 0; }
.page-context-path,
.page-context-parent,
.page-context-pages {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
}
.page-context-parent { margin-top: 2px; color: var(--soft-ink); }
.page-context-title {
  margin: 2px 0 0;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

/* A chapter-opening scan already carries the printed title immediately below.
   Keep the generated path and page number, but don't repeat that title twice. */
.section-opener-context .page-context-title { display: none; }

/* Both page orders use quiet dividers. Chapter hierarchy belongs to its
   actual opening, not to every PDF leaf or a break inside a sentence. */
.page-context {
  display: block;
  margin-bottom: 18px;
  padding-bottom: 8px;
}
.running-page-context .page-context-heading { display: none; }
.page-context-pages {
  padding: 0;
  text-align: left;
}
.page-context-pages {
  padding-bottom: 2px;
  white-space: nowrap;
}

.source-notice {
  margin: 0 0 18px;
  padding: 9px 0;
  color: var(--soft-ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.book-page + .book-page {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dotted var(--rule-dark);
}

/* Reading order can repair a sentence interrupted by bound-in plate pages
   without altering the scan or its stable PDF-page links. */
.reading-continuation-copy,
.reading-continuation-following,
.reading-evidence-shelf,
.prose-continuation-cue { display: none; }

.source-note-label-reading { display: none; }

body.view-reading-order .book-page.reading-source-page { display: none; }
body.view-reading-order .book-page.reading-source-page.reading-requested-page { display: block; }
.reading-source-notice { display: none; }
body.view-reading-order .reading-requested-page .reading-source-notice { display: block; }
body.view-reading-order .reading-continuation-copy { display: inline; }
body.view-reading-order .reading-continuation-following { display: block; }
body.view-reading-order .reading-evidence-shelf { display: block; }
body.view-reading-order .prose-continuation-cue { display: block; }
body.view-reading-order .reading-joined-source,
body.view-reading-order .reading-joined-empty,
body.view-reading-order .reading-duplicate-source,
body.view-reading-order .prose-continuation-cue.reading-joined-cue { display: none; }
body.view-reading-order .reading-duplicate-caption-label { display: none; }
body.view-reading-order .source-note-label-original { display: none; }
body.view-reading-order .source-note-label-reading { display: inline; }
body.view-reading-order #page-252 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
body.view-reading-order #page-252 > .page-marker,
body.view-reading-order #page-252 > .page-context,
body.view-reading-order #page-252 > figure.scan { display: none; }

.reading-continuation-following {
  margin: 18px 0 0;
}
.reading-following-paragraph {
  margin: 0 0 18px;
}
.reading-following-paragraph > p {
  margin: 0;
}
.reading-following-paragraph > .quoted-passage {
  margin: 0 0 14px;
}

.reading-evidence-shelf {
  margin: 24px 0 32px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule-dark);
}
.reading-evidence-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 12px;
}
.reading-evidence-title {
  margin: 0 0 3px;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 18px;
  line-height: 1.25;
}
.reading-evidence-description {
  max-width: 62ch;
  margin: 0;
  color: var(--soft-ink);
  font-size: 12px;
  line-height: 1.45;
}
.reading-evidence-open {
  min-height: 32px;
  white-space: nowrap;
}
.reading-evidence-pages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.reading-evidence-page {
  display: grid;
  grid-template-rows: 132px auto;
  min-width: 0;
  min-height: 0;
  padding: 5px;
  border-color: var(--rule-dark);
  text-align: left;
}
.reading-evidence-page img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  background: var(--field);
  border: 1px solid var(--rule);
}
.reading-evidence-page-label {
  display: grid;
  gap: 1px;
  padding: 6px 2px 1px;
  font-size: 11px;
  line-height: 1.3;
}
.reading-evidence-page-label strong { overflow-wrap: anywhere; font-weight: 600; }
.reading-evidence-page-label small { color: var(--muted); font-size: 10px; }

.prose-continuation-cue {
  margin: 10px 0;
  scroll-margin-top: calc(var(--page-anchor) + 8px);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
}
.prose-continuation-link {
  color: var(--soft-ink);
  text-decoration-color: var(--rule-dark);
  text-underline-offset: 3px;
}
.prose-continuation-link:hover { color: var(--ink); }

.reader-navigation-dialog {
  box-sizing: border-box;
  width: min(30rem, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 20px;
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
.reader-navigation-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.reader-navigation-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.reader-navigation-heading h2 { flex: 1; margin: 0; font-size: 18px; line-height: 1.3; }
.reader-navigation-dialog button,
.reader-navigation-dialog input,
.reader-navigation-dialog select { box-sizing: border-box; min-height: 44px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-dark); padding: 8px; }
.reader-navigation-page-form { display: flex; align-items: end; gap: 12px; margin-bottom: 20px; }
.reader-navigation-page-field { flex: 1; }
.reader-navigation-page-field,
.reader-navigation-section { display: grid; gap: 6px; min-width: 0; }
.reader-navigation-dialog input,
.reader-navigation-dialog select { width: 100%; min-width: 0; }
.mobile-reader-location,
.mobile-page-count { appearance: none; background: transparent; border: 0; border-radius: 0; font-family: inherit; text-align: left; cursor: pointer; }
.mobile-page-count { min-height: 44px; font-size: inherit; }
.mobile-page-count::after { content: "⌄"; margin-left: 5px; }
.mobile-reader-location { position: relative; padding-right: 28px; }
.mobile-reader-location::after { content: "⌄"; position: absolute; right: 10px; font-size: 14px; font-weight: 400; }
.mobile-reader-location:focus-visible,
.mobile-page-count:focus-visible,
.reader-navigation-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.search-dialog {
  box-sizing: border-box;
  width: min(38rem, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
.search-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.search-dialog-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100dvh - 22px);
}
.search-dialog-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--rule-dark);
}
.search-dialog-heading h2 { flex: 1; margin: 0; font-size: 18px; line-height: 1.3; }
.search-dialog-heading button,
.search-dialog .search-field input,
.search-dialog .search-field button,
.search-dialog #show-more-search {
  box-sizing: border-box;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  padding: 8px;
}
.search-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-dialog-slot {
  min-height: 0;
  padding: 14px;
  overflow: auto;
}
.search-dialog .search-field { gap: 7px; margin: 0 0 18px; font-size: 13px; }
.search-dialog .search-field input { width: 100%; border-right: 0; }
.search-dialog .search-field button { flex: 0 0 auto; }
.search-dialog .search-results {
  position: static;
  max-height: none;
  margin: 0;
  padding: 14px 0 0;
  overflow: visible;
  scroll-margin-top: 0;
  border-bottom: 0;
}
.search-dialog .search-results #close-search { display: none; }
.search-dialog .search-result { min-height: 44px; }

@media (max-width: 620px) {
  .reading-evidence-heading { grid-template-columns: 1fr; gap: 10px; }
  .reading-evidence-open { width: 100%; }
  .reading-evidence-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  body.view-reading-order .book-page.reading-source-page { display: block; }
  body.view-reading-order .reading-continuation-copy,
  body.view-reading-order .reading-continuation-following,
  body.view-reading-order .reading-evidence-shelf,
  body.view-reading-order .prose-continuation-cue { display: none; }
  body.view-reading-order .reading-joined-source { display: grid; }
  body.view-reading-order .reading-joined-empty { display: block; }
  body.view-reading-order .source-note-label-original { display: inline; }
  body.view-reading-order .source-note-label-reading { display: none; }
  body.view-reading-order #page-252 {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dotted var(--rule-dark);
  }
  body.view-reading-order #page-252 > .page-marker { display: block; }
  body.view-reading-order #page-252 > .page-context { display: grid; }
}

.scan-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: 65px;
  padding-top: 11px;
  border-top: 1px solid var(--ink);
}

.scan-heading h2 {
  margin: 0;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
}

.page-marker {
  position: absolute;
  top: .55em;
  right: calc(100% + 12px);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transition: opacity 120ms ease;
  user-select: none;
}

.book-page:focus-within > .page-marker,
.book-page:target > .page-marker { opacity: 1; }

.text-stage {
  color: var(--ink);
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: var(--reader-size);
  line-height: 1.56;
}

.loading-message { color: var(--muted); }

.text-line {
  position: relative;
  display: block;
  scroll-margin-top: var(--page-anchor);
}

.text-line.is-target { background: var(--accent-soft); }

.line-number {
  position: absolute;
  top: 0;
  right: 100%;
  width: 60px;
  padding: .45em 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: right;
  text-decoration: none;
  user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.text-line:focus-within > .line-number,
.text-line.is-target > .line-number {
  opacity: 1;
  pointer-events: auto;
}

mark.search-hit {
  padding: 0 .06em;
  color: var(--ink);
  background: #cfc5a9;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: .14em;
}


.line-copy {
  position: relative;
  min-width: 0;
  padding: 2px 0;
}

.line-copy p { margin: 0 0 .74em; }
.text-stage .line-copy p { max-width: 72ch; }
.text-stage .ocr-ordered-list .line-copy > p:where(:not(figcaption, figcaption *, .caption-line, .caption-line *, .ocr-caption, .ocr-caption *, .source-sheet-marker, .source-sheet-marker *)),
.text-stage .ocr-unordered-list .line-copy > p:where(:not(figcaption, figcaption *, .caption-line, .caption-line *, .ocr-caption, .ocr-caption *, .source-sheet-marker, .source-sheet-marker *)),
.text-stage .line-copy > .ocr-list-item:where(:not(figcaption, figcaption *, .caption-line, .caption-line *, .ocr-caption, .ocr-caption *, .source-sheet-marker, .source-sheet-marker *)) {
  max-width: 58ch;
}
.source-sheet-marker {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .875em;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}
.text-stage > .text-line > .line-copy > :is(p:not([class]), .reference-dense-paragraph),
.text-stage .source-extract > blockquote > .text-line > .line-copy > :is(p:not([class]), .reference-dense-paragraph) {
  max-width: 58ch;
}
.text-stage > .text-line.is-target:has(> .line-copy > :is(p:not([class]), .reference-dense-paragraph)),
.text-stage .source-extract > blockquote > .text-line.is-target:has(> .line-copy > :is(p:not([class]), .reference-dense-paragraph)) {
  background: transparent;
}
.text-stage > .text-line.is-target > .line-copy > :is(p:not([class]), .reference-dense-paragraph)::first-line,
.text-stage .source-extract > blockquote > .text-line.is-target > .line-copy > :is(p:not([class]), .reference-dense-paragraph)::first-line {
  background: var(--accent-soft);
}
.reference-dense-segment {
  display: inline;
  text-wrap: pretty;
}
.reference-dense-segment:not(:last-child)::after {
  content: "";
  display: block;
  height: .74em;
}
.reference-dense-space {
  font-size: 0;
  white-space: pre;
}
.reference-opening-group { white-space: nowrap; }
.drawing-reference,
.numbered-reference {
  appearance: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  font: inherit;
  line-height: inherit;
  vertical-align: baseline;
  text-decoration: none;
}
.drawing-reference,
button.numbered-reference { cursor: zoom-in; }
.numbered-reference[href] { cursor: pointer; }
.drawing-reference:hover,
.numbered-reference:hover { color: var(--ink); }
.drawing-reference:focus-visible,
.numbered-reference:focus-visible {
  color: var(--ink);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.figure-reference {
  appearance: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  line-height: inherit;
  vertical-align: baseline;
  white-space: nowrap;
  cursor: zoom-in;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--rule-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}
.figure-reference:hover {
  color: var(--accent);
  background: transparent;
  text-decoration-style: solid;
}
.figure-reference:focus-visible {
  color: var(--ink);
  background: transparent;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.continues-to-next .text-stage > .text-line:last-child .line-copy p { margin-bottom: 0; }
.text-line.blank { min-height: .72em; }
.text-line.blank .line-copy { min-height: .72em; }

.book-heading { margin-top: 18px; }
.book-heading .line-copy { padding-top: 0; }
.book-divider .line-copy { padding: 0; }
.book-divider hr {
  width: 42px;
  margin: 18px 0 14px;
  border: 0;
  border-top: 1px solid var(--rule-dark);
}
.book-heading h2,
.book-heading h3,
.book-heading h4,
.book-heading h5,
.book-heading h6,
.contains-book-heading h3 {
  margin: 0 0 9px;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * 1.125);
  line-height: 1.35;
}
.book-heading h2 { font-size: calc(var(--reader-size) * 1.25); line-height: 1.3; }
.contains-book-heading h3:not(:first-child) { margin-top: 18px; }

/* Print-column widths become calm reading measures on the web. They preserve
   intentional heading wraps without squeezing text to a literal page third. */
.book-heading.layout-width-third,
.book-heading.layout-width-half {
  max-width: 100%;
  margin-right: auto;
}
.book-heading.layout-width-third { width: 19rem; }
.book-heading.layout-width-half { width: 34rem; }
.book-heading.layout-width-third.align-center,
.book-heading.layout-width-half.align-center { margin-left: auto; }

.source-bracketed-note {
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: inherit;
  overflow-wrap: anywhere;
}

.embedded-source-list {
  margin: 10px 0 16px;
  padding-left: 1.35em;
}
.embedded-source-list li + li { margin-top: 7px; }
.embedded-source-list p { margin: 0; }

.list-line .line-copy { padding-left: 16px; }
.ocr-list-item::before { content: "•"; position: absolute; left: 0; }
.footnote-line {
  margin: 18px 0 4px;
  padding-top: 9px;
  color: var(--soft-ink);
  border-top: 1px solid var(--rule);
  font-size: calc(var(--reader-size) * .8125);
  line-height: 1.5;
}
.footnote-line .ocr-footnote {
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr);
  gap: .35em;
  margin: 0;
}
.footnote-symbol {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .85em;
  line-height: 1.4;
  vertical-align: .25em;
}

.ocr-ordered-list {
  margin: 4px 0 16px;
  padding-left: 2.15em;
}
.ocr-ordered-list-alpha { list-style-type: lower-alpha; }
.ocr-ordered-list .ordered-list-line {
  display: list-item;
  padding-left: .25em;
}
.ocr-ordered-list .line-copy { padding: 0; }
.ocr-ordered-list .line-number {
  right: 100%;
  width: calc(66px + 3.2em);
  padding-right: calc(12px + 3.2em);
}
.ocr-ordered-list .line-copy p { margin: 0 0 .62em; }
.ocr-ordered-list .ordered-list-line:last-child .line-copy p { margin-bottom: 0; }
.ocr-ordered-list .ocr-ordered-list {
  margin: .55em 0 .75em;
  padding-left: 1.8em;
}

.ocr-unordered-list {
  margin: 4px 0 16px;
  padding-left: 1.35em;
}
.ocr-unordered-list .unordered-list-line {
  display: list-item;
  padding-left: .35em;
}
.ocr-unordered-list .line-copy { padding: 0; overflow-wrap: anywhere; }
.ocr-unordered-list .line-number {
  right: 100%;
  width: calc(66px + 2.2em);
  padding-right: calc(12px + 2.2em);
}
.ocr-unordered-list .line-copy p { margin: 0 0 .5em; }
.ocr-unordered-list .unordered-list-line:last-child .line-copy p { margin-bottom: 0; }

.ocr-definition-list {
  margin: 6px 0 18px;
}
.definition-list-line {
  display: grid;
  grid-template-columns: minmax(7.5em, 1fr) minmax(0, 2fr);
  gap: .35em 1em;
  padding: 3px 0;
}
.definition-list-line > dt {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .86em;
  font-weight: 600;
  line-height: 1.5;
}
.definition-list-line > dd { margin: 0; }
.definition-list-note { grid-template-columns: 1fr; }
.definition-list-note > dt { display: none; }
.definition-list-note > dd {
  color: inherit;
  font-size: inherit;
}
.ocr-definition-list-wrapped-glosses .definition-list-heading:not(:first-child) {
  margin-top: .65em;
}
.ocr-definition-list-wrapped-glosses .definition-list-heading > dd > h4 {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  text-transform: none;
}
.ocr-definition-list-pairs .definition-list-line > dt {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
@media (min-width: 621px) {
  .ocr-definition-list-pairs .definition-list-line:not(.definition-list-note),
  .book-page:has(.ocr-definition-list-pairs) .ocr-definition-list-definitions .definition-list-line:not(.definition-list-note),
  .book-page:has(.ocr-definition-list-pairs) .ocr-definition-list-glosses .definition-list-line:not(.definition-list-note),
  .book-page:has(.ocr-definition-list-pairs) .ocr-definition-list-wrapped-glosses .definition-list-line:not(.definition-list-note) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.text-stage :is(.ocr-definition-list-glosses, .ocr-definition-list-wrapped-glosses).ocr-definition-list-parallel .definition-list-line:not(.definition-list-note) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .5em 1.25em;
}
.text-stage :is(.ocr-definition-list-glosses, .ocr-definition-list-wrapped-glosses).ocr-definition-list-parallel .definition-list-line:not(.definition-list-note) > :is(dt, dd) {
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
}
.ocr-definition-list-parallel .parallel-source-list {
  margin: 0;
  padding-left: 1.25em;
}
.ocr-definition-list-parallel .parallel-source-list li + li { margin-top: .35em; }
@media (max-width: 620px) {
  .text-stage :is(.ocr-definition-list-glosses, .ocr-definition-list-wrapped-glosses).ocr-definition-list-parallel .definition-list-line:not(.definition-list-note) {
    grid-template-columns: minmax(0, 1fr);
    gap: .35em;
  }
}
.ocr-definition-list-key .definition-list-line {
  grid-template-columns: 2.1em minmax(0, 1fr);
  gap: .35em .65em;
}
.ocr-definition-list-mappings .definition-list-line {
  grid-template-columns: minmax(8.5em, 1fr) minmax(0, 1fr);
}
.ocr-definition-list-wrapped-glosses .nested-gloss-list {
  margin: .4em 0 .1em;
  padding-left: 1.4em;
}
.ocr-definition-list-wrapped-glosses .nested-gloss-line + .nested-gloss-line { margin-top: .2em; }
.ocr-definition-list-wrapped-glosses .nested-gloss-line.is-target { background: var(--accent-soft); }

/* Document 12 is a drawing register. Separate its German labels from
   Pressac's English translations so the flat printed list reads as a table. */
.translated-register {
  margin: 28px 0;
  padding: 18px 0 20px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule-dark);
}
.translated-register .register-title { margin-bottom: 10px; }
.register-explanation {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}
.register-group + .register-group { margin-top: 22px; }
.register-group-heading { margin-bottom: 7px; }
.register-group-heading h4 {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.register-language-headings {
  display: grid;
  grid-template-columns: minmax(7.5em, 1fr) minmax(0, 2fr);
  gap: 1em;
  padding: 0 0 5px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
}
.translated-register .ocr-definition-list { margin: 0; }
.translated-register .definition-list-line { border-bottom: 1px solid var(--rule); }
.translated-register .definition-list-line:last-child { border-bottom: 0; }

/* Document 13 carries three dates and two languages. The date list explains
   their sequence before the original wording and translation are read. */
.dated-order {
  margin: 28px 0;
  padding: 18px 0 20px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule-dark);
  scroll-margin-top: var(--page-anchor);
}
.dated-order-explanation {
  margin: 0 0 18px;
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}
.dated-order-chronology {
  margin: 0 0 22px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.dated-order h4 {
  margin: 0 0 7px;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.dated-order-chronology dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.45;
}
.dated-order-chronology dt { color: var(--ink); font-weight: 600; }
.dated-order-chronology dd { margin: 0; color: var(--soft-ink); }
.dated-order-columns { display: grid; gap: 20px; }
.dated-order-language { min-width: 0; }
.dated-order-language > h4 { color: var(--accent); }
.dated-order-identity {
  margin: -2px 0 8px;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
}
.dated-order-language > blockquote {
  margin: 0;
  padding: 2px 0 1px 14px;
  border-left: 2px solid var(--rule-dark);
  color: var(--soft-ink);
}
.dated-order-language .text-line p { margin: 0 0 7px; }
.dated-order-language .text-line { scroll-margin-top: calc(var(--page-anchor) + 58px); }
.dated-order-language .bilingual-original { display: none; margin-bottom: 12px; }
body.view-single .dated-order-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.view-single .dated-order-language .bilingual-original { display: block; }

@media (min-width: 721px) and (max-width: 980px) {
  .dated-order-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dated-order-language .bilingual-original { display: block; }
}
@media (max-width: 720px) {
  .dated-order-language .bilingual-original { display: block; }
}

@media (max-width: 620px) {
  .register-language-headings { display: none; }
}

.ocr-inventory-list {
  margin: 8px 0 22px;
  padding-left: 1.8em;
}
.ocr-inventory-list > .inventory-file {
  display: list-item;
  margin: 0 0 15px;
  padding-left: .25em;
}
.ocr-inventory-list > .inventory-file.is-target { background: transparent; }
.ocr-inventory-list > .inventory-file.is-target > .line-copy { background: var(--accent-soft); }
.inventory-file > .line-copy { padding: 0; }
.inventory-file > .line-copy p {
  margin: 0 0 5px;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .9em;
  font-weight: 600;
}
.ocr-inventory-items {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ocr-inventory-items .inventory-item { margin: 0; }
.ocr-inventory-items .line-copy {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  gap: .5em;
  padding: 2px 0;
}
.inventory-marker {
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .86em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.inventory-copy { min-width: 0; }

.ocr-bracketed-list {
  margin: 8px 0 20px;
  padding: 0;
  list-style: none;
}
.ocr-bracketed-list .line-copy {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  gap: .55em;
  padding: 3px 0;
}
.bracketed-list-marker {
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .86em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bracketed-list-copy { min-width: 0; }

.layout-lines {
  margin: 6px 0 16px;
}
.layout-lines .line-copy p { margin-bottom: .3em; }
.layout-lines .text-line:last-child .line-copy p { margin-bottom: 0; }

.ocr-transcript {
  margin: 18px 0 24px;
  padding-left: 16px;
  border-left: 1px solid var(--rule);
}
.ocr-transcript .transcript-turn { margin: 0; }
.ocr-transcript .transcript-turn > .line-copy {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr);
  gap: .35em;
  padding: 2px 0;
}
.transcript-speaker {
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .84em;
  font-weight: 600;
  line-height: 1.65;
  text-decoration: none;
}
.transcript-question .transcript-copy { font-weight: 600; }
.transcript-answer { margin-bottom: .62em !important; }
.ocr-transcript .transcript-comment,
.ocr-transcript .transcript-stage {
  margin: .55em 0 .8em 2.35em;
  color: var(--soft-ink);
  font-size: .92em;
}
.ocr-transcript .transcript-stage { font-style: italic; }
.ocr-transcript .transcript-comment .line-copy p,
.ocr-transcript .transcript-stage .line-copy p { margin: 0; }
.ocr-transcript .transcript-heading { margin: 18px 0 8px; }

.ocr-bibliography {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  gap: .62em 1em;
  margin: 8px 0 24px;
}
.ocr-bibliography dt {
  grid-column: 1;
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: .82em;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}
.ocr-bibliography .bibliography-entry {
  grid-column: 2;
  margin: 0;
}
.ocr-bibliography .line-copy { padding: 0; }
.ocr-bibliography .line-copy p { margin: 0; }

/* Numbered lines inside a reproduced document keep their printed marker even
   when that document's quotation wrapper prevents list grouping. */
.ordered-list-line > .line-copy > .ocr-list-item {
  display: grid;
  grid-template-columns: 1.7em minmax(0, 1fr);
  gap: .35em;
  padding-left: 0;
}
.ordered-list-line > .line-copy > .ocr-list-item::before { content: none; }
.ocr-ordered-list .ocr-list-marker { display: none; }

.scan-reference-line { margin: 12px 0; }
.scan-reference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: var(--tap-height);
  padding: 9px 0;
  color: var(--soft-ink);
  background: transparent;
  border-top: 1px solid var(--rule);
  border-right: 0;
  border-bottom: 1px solid var(--rule);
  border-left: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
}
.scan-reference-action {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.table-line { margin: 12px 0 20px; }
.table-line .line-copy {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.table-scroll-hint {
  position: sticky;
  left: 0;
  display: none;
  width: max-content;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.table-line.is-scrollable .table-scroll-hint { display: block; }

.ocr-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * .875);
  line-height: 1.45;
}

.ocr-table th,
.ocr-table td {
  min-width: 130px;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.ocr-table th { border-bottom-color: var(--ink); font-weight: 600; }
.ocr-table tr.is-target > * { background: var(--accent-soft); }
.ocr-table tr:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

.inscription-table .ocr-table {
  min-width: 0;
  table-layout: fixed;
  font-size: var(--reader-size);
  line-height: 1.5;
}
.inscription-table .ocr-table :is(th, td) {
  min-width: 0;
  overflow-wrap: break-word;
}
.inscription-table .ocr-table thead th { font-weight: 400; }
.inscription-table .table-cell-line { display: block; }
.inscription-table .table-cell-line + .table-cell-line { margin-top: 3px; }

/* This small dataset is useful because the rooms can be compared at a glance.
   Keep it as a compact matrix at every width instead of turning it into cards. */
#page-278 .table-line .line-copy { overflow-x: visible; }
#page-278 .table-scroll-hint { display: none; }
#page-278 .dimensions-comparison {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: calc(var(--reader-size) * .8125);
  line-height: 1.3;
}
#page-278 .dimensions-comparison :is(th, td) {
  min-width: 0;
  padding: 8px 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#page-278 .dimensions-comparison :is(th, td):first-child {
  width: 32%;
  padding-left: 0;
  text-align: left;
}
#page-278 .dimensions-comparison thead th {
  color: var(--muted);
  font-size: calc(var(--reader-size) * .6875);
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: normal;
}
#page-278 .dimensions-comparison tbody th {
  border-bottom-color: var(--rule);
  font-weight: 500;
}

/* This is Pressac's printed plate label, not interface metadata. */
#p278-l023 p {
  color: var(--ink);
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: calc(var(--reader-size) * 1.0625);
  font-weight: 600;
  line-height: 1.35;
}

/* The furnace table's one heading describes its three result columns. The
   empty source cells are a printed span, not three separate blank headings. */
#page-482 .furnace-matrix {
  table-layout: fixed;
}
#page-482 .furnace-matrix :is(th, td) {
  min-width: 0;
  text-align: center;
}
#page-482 .furnace-matrix :is(th, td):first-child {
  width: 52%;
  text-align: left;
}
#page-482 .furnace-matrix .furnace-muffle-labels th {
  padding-top: 3px;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * .6875);
  font-weight: 600;
}
.source-original-value {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* The BW 30 drawing inventory needs room for long German and English titles.
   On a phone, retain a readable table and let the existing wrapper scroll. */
.book-page[data-page="83"] .ocr-table,
.book-page[data-page="84"] .ocr-table {
  width: 680px;
  min-width: 680px;
  table-layout: fixed;
}
.book-page[data-page="83"] .ocr-table th,
.book-page[data-page="83"] .ocr-table td,
.book-page[data-page="84"] .ocr-table th,
.book-page[data-page="84"] .ocr-table td { min-width: 0; }
.book-page[data-page="83"] .ocr-table :is(th, td):first-child,
.book-page[data-page="84"] .ocr-table :is(th, td):first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 116px;
  background: var(--paper);
}
.book-page[data-page="83"] .ocr-table :is(th, td):last-child,
.book-page[data-page="84"] .ocr-table :is(th, td):last-child { width: 72px; }

/* Keep the inventory fields in the same proportions as the existing 14px
   table text while allowing the reader-size control to enlarge them. The
   mobile description rule below retains its existing 15px ratio. */
.drawing-inventory :is(th, td):first-child,
.drawing-inventory td:nth-child(2),
.drawing-inventory :is(th, td):last-child {
  font-size: calc(var(--reader-size) * .875);
  line-height: 1.45;
}

/* The four printed title lines on the file inventory aren't four equal
   headings. Give them the hierarchy the words and source page imply. */
#p083-l001 h3 {
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: calc(var(--reader-size) * 1.25);
  line-height: 1.25;
}
#p083-l003 h3 { font-size: var(--reader-size); }
#p083-l005 h3 {
  color: var(--muted);
  font-size: calc(var(--reader-size) * .875);
  font-weight: 400;
}
#p083-l007 {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--rule-dark);
}
#p083-l007 h3 { font-size: calc(var(--reader-size) * .9375); }

/* Page 124 opens with source details and then names the three fields in its
   drawing register. Keep that information visible without letting it compete
   with the document title or the entries themselves. */
#p124-l003 p,
#p124-l005 p,
#p124-l007 p {
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * .8125);
  line-height: 1.5;
}
#p124-l003 p,
#p124-l005 p { margin-bottom: 8px; }
#p124-l007 p {
  margin-top: 14px;
  color: var(--muted);
  font-size: calc(var(--reader-size) * .75);
  font-weight: 500;
}

@media (max-width: 620px) {
  .inscription-table .line-copy { overflow-x: visible; }
  .inscription-table .table-scroll-hint { display: none; }
  .inscription-table .ocr-table { display: block; }
  .inscription-table .ocr-table colgroup { display: none; }
  .inscription-table .ocr-table thead {
    display: table;
    width: 100%;
    table-layout: fixed;
  }
  .inscription-table .ocr-table tbody,
  .inscription-table .ocr-table tbody tr,
  .inscription-table .ocr-table tbody td {
    display: block;
    width: 100%;
  }
  .inscription-table .ocr-table tbody td { padding: 10px 8px; }

  /* This is a five-category statistical summary, not a sheet readers should
     have to pan. Keep each category together and name every value in place. */
  #page-13 .table-line .line-copy { overflow-x: visible; }
  #page-13 .table-scroll-hint { display: none; }
  #page-13 .mortality-table,
  #page-13 .mortality-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  #page-13 .mortality-table thead { display: none; }
  #page-13 .mortality-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(96px, .55fr);
    gap: 8px 18px;
    padding: 11px 0 13px;
    border-bottom: 1px solid var(--rule);
  }
  #page-13 .mortality-table :is(th, td) {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    font-variant-numeric: tabular-nums;
  }
  #page-13 .mortality-table tr > :first-child,
  #page-13 .mortality-table tr > :nth-child(2) { grid-column: 1 / -1; }
  #page-13 .mortality-table tr > :first-child {
    padding-bottom: 2px;
    font-weight: 600;
  }
  #page-13 .mortality-table [data-mobile-label]::before {
    display: block;
    margin-bottom: 1px;
    color: var(--muted);
    content: attr(data-mobile-label);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
  }
  #page-13 .mortality-table tr > :nth-child(n + 3) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }
  #page-13 .mortality-table tr > :nth-child(n + 3)::before {
    margin-bottom: 0;
    text-align: left;
  }

  /* Sparse source forms depend on blank print cells for positioning. Those
     cells waste most of a phone screen, so read each populated cell in order. */
  .table-line:has(.sparse-table) .line-copy {
    overflow-x: visible;
  }
  .sparse-table,
  .sparse-table thead,
  .sparse-table tbody,
  .sparse-table tr,
  .sparse-table th,
  .sparse-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .sparse-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
  }
  .sparse-table th,
  .sparse-table td {
    padding: 0;
    border: 0;
  }
  .sparse-table tr > :not(:empty) + :not(:empty) { margin-top: 3px; }
  .sparse-table :empty { display: none; }

  /* The BW 30 and Bauleitung drawing lists are inventories, not comparison
     tables. A stacked row is faster to scan and avoids making the reader pan
     for every file title. */
  .book-page[data-page="83"] .table-line .line-copy,
  .book-page[data-page="84"] .table-line .line-copy,
  .book-page[data-page="124"] .table-line .line-copy { overflow-x: visible; }
  .book-page[data-page="83"] .table-scroll-hint,
  .book-page[data-page="84"] .table-scroll-hint,
  .book-page[data-page="124"] .table-scroll-hint { display: none; }
  .book-page[data-page="83"] .drawing-inventory,
  .book-page[data-page="84"] .drawing-inventory,
  .drawing-inventory tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .drawing-inventory tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
  }
  .drawing-inventory th,
  .drawing-inventory td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
  }
  .book-page[data-page="83"] .drawing-inventory :is(th, td):first-child,
  .book-page[data-page="84"] .drawing-inventory :is(th, td):first-child,
  .book-page[data-page="124"] .drawing-inventory :is(th, td):first-child {
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: auto;
    background: transparent;
  }
  .drawing-inventory td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
    font-size: calc(var(--reader-size) * .9375);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .book-page[data-page="83"] .drawing-inventory :is(th, td):last-child,
  .book-page[data-page="84"] .drawing-inventory :is(th, td):last-child,
  .book-page[data-page="124"] .drawing-inventory :is(th, td):last-child {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
  }

  /* This six-column comparison has only five short data rows. On a phone,
     keeping each room and all four distributions together is calmer and more
     useful than exposing one clipped column at a time. */
  #page-369 .table-line .line-copy { overflow-x: visible; }
  #page-369 .table-scroll-hint { display: none; }
  #page-369 .motor-power-table,
  #page-369 .motor-power-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  #page-369 .motor-power-table thead { display: none; }
  #page-369 .motor-power-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    padding: 13px 0 15px;
    border-bottom: 1px solid var(--rule);
  }
  #page-369 .motor-power-table :is(th, td) {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    font-variant-numeric: tabular-nums;
  }
  #page-369 .motor-power-table tr > :first-child,
  #page-369 .motor-power-table tr > :nth-child(2) {
    grid-column: 1 / -1;
    padding-bottom: 1px;
  }
  #page-369 .motor-power-table tr > :first-child {
    font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
    font-weight: 600;
    line-height: 1.35;
  }
  #page-369 .motor-power-table [data-mobile-label]::before {
    display: block;
    margin-bottom: 1px;
    color: var(--muted);
    content: attr(data-mobile-label);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
  }

  /* Two body types and three signs fit cleanly as a matrix. Panning a table
     this small hides the relationship the reader is trying to compare. */
  #page-482 .table-line .line-copy { overflow-x: visible; }
  #page-482 .table-scroll-hint { display: none; }
  #page-482 .furnace-matrix :is(th, td) { padding: 7px 4px; }
  #page-482 .furnace-matrix :is(th, td):first-child { padding-left: 0; }
}

/* These short comparison tables are also too dense in the default desktop
   scan-beside column. Keep their values visible and labelled instead of
   making the main reading surface behave like a narrow spreadsheet. */
@media (min-width: 621px) {
  :is(#page-13, #page-369) .table-line .line-copy {
    overflow-x: visible;
  }
  :is(#page-13, #page-369) .table-scroll-hint {
    display: none;
  }
  :is(
    #page-13 .mortality-table,
    #page-369 .motor-power-table
  ),
  :is(
    #page-13 .mortality-table,
    #page-369 .motor-power-table
  ) tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  :is(
    #page-13 .mortality-table,
    #page-369 .motor-power-table
  ) thead {
    display: none;
  }
  :is(
    #page-13 .mortality-table,
    #page-369 .motor-power-table
  ) tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    padding: 13px 0 15px;
    border-bottom: 1px solid var(--rule);
  }
  :is(
    #page-13 .mortality-table,
    #page-369 .motor-power-table
  ) :is(th, td) {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    font-variant-numeric: tabular-nums;
    white-space: normal;
  }
  :is(
    #page-13 .mortality-table,
    #page-278 .dimensions-table,
    #page-369 .motor-power-table
  ) [data-mobile-label]::before {
    display: block;
    margin-bottom: 1px;
    color: var(--muted);
    content: attr(data-mobile-label);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
  }
  #page-13 .compact-statistics .mortality-table {
    min-width: 0;
  }
  #page-13 .mortality-table tr > :first-child,
  #page-13 .mortality-table tr > :nth-child(2),
  #page-369 .motor-power-table tr > :first-child,
  #page-369 .motor-power-table tr > :nth-child(2) {
    grid-column: 1 / -1;
  }
  #page-13 .mortality-table tr > :first-child {
    padding-bottom: 2px;
    font-weight: 600;
  }
  #page-13 .compact-statistics .mortality-table :is(th, td) {
    text-align: left;
  }
  #page-13 .compact-statistics .mortality-table tr {
    grid-template-columns: minmax(0, 1.45fr) minmax(96px, .55fr);
    gap: 8px 18px;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2)::before {
    margin-bottom: 0;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2n + 3) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2n + 4) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(n + 3)::before {
    margin-bottom: 0;
    text-align: left;
  }
  #page-369 .motor-power-table tr > :first-child {
    padding-bottom: 1px;
    font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
    font-weight: 600;
    line-height: 1.35;
  }
}

/* Parallel credits -------------------------------------------------------- */
/* The page 8 names are three alphabetical lists, not table rows. Their italic
   serif setting and close leading carry the same quiet credit-page rhythm as
   the print, while the DOM reads each column from top to bottom. */
.layout-translator-credit-title {
  margin: 2px 0 20px;
}
.layout-translator-credit-title h2 {
  margin: 0;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: calc(var(--reader-size) * (19 / 16));
  font-weight: 600;
  line-height: 1.3;
}
.layout-translator-credit-note {
  max-width: 680px;
  margin: 0 auto 22px;
  font-size: calc(var(--reader-size) * (15 / 16));
  font-style: italic;
  line-height: 1.45;
}
.layout-translator-credit-sponsors {
  margin: 0 auto 22px;
  font-size: calc(var(--reader-size) * (15 / 16));
  font-style: italic;
  line-height: 1.25;
}
.layout-translator-credit-sponsors .line-copy p { margin-bottom: .12em; }
.name-columns-line { margin: 30px 0 8px; }
.name-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 34px;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: calc(var(--reader-size) * (14 / 16));
  font-style: italic;
  line-height: 1.28;
}
.name-column {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.name-column li {
  margin: 0 0 .18em;
  overflow-wrap: anywhere;
}

.parallel-lines-line { margin: 16px 0 22px; }
.parallel-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}
.parallel-lines-column { min-width: 0; }
.parallel-lines-column h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.parallel-lines-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.parallel-lines-column li { margin: 0 0 4px; }

@media (max-width: 700px) {
  .name-columns { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .parallel-lines { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

/* Iwaszko dedication ------------------------------------------------------ */
.figure-dedication-portrait {
  width: min(215px, 58vw);
  margin: 6px auto 24px;
}
.figure-dedication-portrait .cut-figure-image {
  width: 100%;
}
.layout-dedication-name {
  margin: 0 0 14px;
}
.layout-dedication-name h3 {
  margin: 0;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: calc(var(--reader-size) * (16 / 16));
  font-weight: 600;
  line-height: 1.3;
}
.layout-dedication-titles {
  margin: 0 0 30px;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: calc(var(--reader-size) * (14 / 16));
  line-height: 1.25;
}
.layout-dedication-titles .line-copy p { margin-bottom: .1em; }
.layout-dedication-text {
  margin: 0 0 22px;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: calc(var(--reader-size) * (15 / 16));
  font-style: italic;
  line-height: 1.35;
}
.layout-dedication-text .line-copy p { margin-bottom: .12em; }
.cut-figure.figure-dedication-portrait { margin-inline: auto; }

/* Acknowledgements -------------------------------------------------------- */
.layout-acknowledgements-title {
  margin: 6px 0 28px;
}
.layout-acknowledgements-title h2 {
  margin: 0;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.layout-acknowledgement-group {
  max-width: 660px;
  margin: 0 auto 18px;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 14px;
  font-style: normal;
  line-height: 1.42;
}
.layout-acknowledgement-group .text-line { margin: 0; }
.layout-acknowledgement-group .line-copy p { margin: 0 0 .18em; }
.layout-acknowledgement-group > .text-line:first-child .line-copy p {
  font-weight: 600;
}
.layout-acknowledgement-group .text-line:not(:first-child) .line-copy { padding-left: 24px; }
@media (max-width: 620px) {
  .layout-acknowledgement-group .text-line:not(:first-child) .line-copy { padding-left: 16px; }
}

/* A cartoon whose handwritten captions belong with the drawing. */
.figure-cartoon-plate {
  max-width: 620px;
  margin: 26px auto 20px;
}
.figure-cartoon-plate .cut-figure-image { margin: 0 auto; }

.scan-rail {
  position: sticky;
  top: var(--scan-rail-top);
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  max-height: calc(100vh - var(--scan-rail-top) - 14px);
  max-height: calc(100dvh - var(--scan-rail-top) - 14px);
  min-height: 0;
}

.scan-heading a { margin-bottom: 3px; color: var(--soft-ink); font-size: 11px; }
.scan-current { margin-top: 4px; }

.scan-frame-wrap {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 48px auto 48px;
  min-height: 0;
  margin-top: 12px;
  background: var(--scan-mat);
  border: 1px solid var(--rule-dark);
}

.scan-frame-wrap:not(.has-previous) {
  grid-template-rows: 0 auto 48px;
}

.scan-frame-wrap:not(.has-next) {
  grid-template-rows: 48px auto 0;
}

.scan-page-peek {
  position: relative;
  min-height: 0;
  overflow: hidden;
  opacity: .32;
  pointer-events: none;
}

.scan-page-peek[hidden] { display: none; }

.scan-page-peek img {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
}

.scan-page-peek-previous img { bottom: 0; }
.scan-page-peek-next img { top: 0; }

.scan-page-link {
  display: block;
  align-self: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.scan-page-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(54vh, 620px);
  max-height: min(54dvh, 620px);
  object-fit: contain;
}

@keyframes scan-page-forward {
  from { opacity: .42; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scan-page-backward {
  from { opacity: .42; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scan-peeks-forward {
  from { opacity: .12; transform: translateY(8px); }
  to { opacity: .32; transform: translateY(0); }
}

@keyframes scan-peeks-backward {
  from { opacity: .12; transform: translateY(-8px); }
  to { opacity: .32; transform: translateY(0); }
}

.scan-frame-wrap.is-moving-forward .scan-page-image { animation: scan-page-forward 240ms ease-out; }
.scan-frame-wrap.is-moving-backward .scan-page-image { animation: scan-page-backward 240ms ease-out; }
.scan-frame-wrap.is-moving-forward .scan-page-peek { animation: scan-peeks-forward 260ms ease-out; }
.scan-frame-wrap.is-moving-backward .scan-page-peek { animation: scan-peeks-backward 260ms ease-out; }

@media (prefers-reduced-motion: reduce) {
  .scan-frame-wrap.is-moving-forward .scan-page-image,
  .scan-frame-wrap.is-moving-backward .scan-page-image,
  .scan-frame-wrap.is-moving-forward .scan-page-peek,
  .scan-frame-wrap.is-moving-backward .scan-page-peek { animation: none; }
}

.scan-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.page-crops {
  margin: 22px 0 10px;
  border-top: 1px solid var(--ink);
}

.page-crops summary {
  padding: 9px 0;
  color: var(--soft-ink);
  font-size: 12px;
  cursor: pointer;
}
.page-crops figure { margin: 0; }

.crop-item {
  display: block;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.crop-item img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 7px;
  background: var(--field);
  border: 1px solid var(--rule);
}

.crop-item figcaption { color: var(--soft-ink); font-size: 11px; line-height: 1.45; }

.mobile-reader-bar,
.mobile-scan-button { display: none; }

.scan-dialog {
  width: min(96vw, 1500px);
  max-width: none;
  height: min(94vh, 1100px);
  max-height: none;
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
}

.scan-dialog::backdrop { background: rgba(20, 19, 17, .72); }

.scan-dialog-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.scan-dialog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ink);
}

.scan-dialog-heading .section-kicker { margin-bottom: 3px; }
.scan-dialog-heading h2 { margin: 0; font-size: 17px; }
.scan-overview-hint { display: none; }
.scan-pan-hint { display: none; }

.scan-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scan-dialog-range {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.scan-dialog-range[hidden] { display: none; }

.scan-dialog-range-label {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.scan-dialog-range select {
  min-width: 0;
  max-width: 240px;
  min-height: var(--control-height);
  padding: 5px 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--control-rule);
}

.scan-dialog-actions a {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  font-size: 12px;
}

.scan-dialog-actions output {
  min-width: 48px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.scan-dialog-stage {
  overflow: auto;
  padding: 18px;
  background: var(--scan-dialog-mat);
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
}

.scan-dialog-canvas {
  display: flex;
  min-width: max-content;
  min-height: 100%;
  align-items: center;
  justify-content: center;
}

.scan-dialog-stage img {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 auto;
  background: var(--field);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 70px;
  padding-top: 14px;
  color: var(--muted);
  border-top: 1px solid var(--rule-dark);
  font-size: 11px;
  line-height: 1.5;
}

.site-footer p { max-width: 760px; margin-bottom: 0; }
.site-footer a { flex: 0 0 auto; color: var(--soft-ink); }

@media (max-width: 980px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  /* One column on narrow screens, so the text is not left in a second column
     that no longer exists. */
  .reader-column {
    grid-column: 1;
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
  }
  .scan-rail { display: none; }
  .book-page { scroll-margin-top: var(--page-jump-anchor); }
  .text-line { scroll-margin-top: var(--page-anchor); }
  /* The sticky mobile bar already names the chapter and section. Repeating
     that title at every page wastes the first screenful and weakens hierarchy. */
  .page-context {
    display: block;
    margin-bottom: 18px;
    padding-bottom: 8px;
  }
  .page-context-heading { display: none; }
  .page-context-pages {
    padding: 0;
    text-align: left;
  }
  .page-context-pdf-page { display: none; }
  /* The compact bar and the page label already mark the boundary. A third,
     dotted separator made the top of every phone page look banded. */
  .book-page + .book-page { border-top: 0; }
}

@media (max-width: 620px) {
  body { width: min(100% - 28px, 1240px); padding-top: 22px; }
  .site-header { margin-bottom: 34px; }
  h1 { font-size: 29px; }
  .standfirst { font-size: 15px; }
  .header-row { flex-wrap: wrap; }
  .edition-note { width: 100%; margin: 4px 0 0; text-align: left; }
  .scan-heading h2 { font-size: 22px; }
  .stream-status { text-align: right; }
  .line-number { display: none; }
  .page-marker {
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .ocr-definition-list:not(.ocr-definition-list-key) .definition-list-line {
    grid-template-columns: 1fr;
    gap: .12em;
  }
  .scan-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
  }
  .scan-dialog-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto minmax(48px, auto) auto;
    align-items: center;
    gap: 6px 4px;
    padding: max(10px, env(safe-area-inset-top)) 10px 10px;
  }
  .scan-dialog-heading > div:first-child {
    grid-column: 1 / 5;
    grid-row: 1;
  }
  .scan-dialog-actions { display: contents; }
  .scan-dialog.has-reference-range .scan-dialog-range {
    grid-column: 1 / 6;
    grid-row: 2;
  }
  .scan-dialog.has-reference-range .scan-dialog-range select {
    flex: 1;
    max-width: none;
  }
  .scan-dialog.has-reference-range .scan-dialog-actions a,
  .scan-dialog.has-reference-range #scan-fit,
  .scan-dialog.has-reference-range #scan-zoom-out,
  .scan-dialog.has-reference-range .scan-dialog-actions output,
  .scan-dialog.has-reference-range #scan-zoom-in { grid-row: 3; }
  .scan-dialog-actions a {
    grid-column: 1;
    grid-row: 2;
    min-width: max-content;
    white-space: nowrap;
  }
  #scan-fit { grid-column: 2; grid-row: 2; }
  #scan-zoom-out { grid-column: 3; grid-row: 2; }
  .scan-dialog-actions output { grid-column: 4; grid-row: 2; min-width: 48px; }
  #scan-zoom-in { grid-column: 5; grid-row: 2; }
  #close-scan-dialog {
    grid-column: 5;
    grid-row: 1;
    justify-self: end;
  }
  #scan-zoom-out,
  #scan-zoom-in,
  #scan-fit { min-width: var(--tap-height); }
  .scan-dialog-stage { padding: 10px; }
  .scan-dialog-stage img { width: auto; }
  .site-footer { display: block; }
  .site-footer a { display: inline-block; margin-top: 9px; }
}

@media (max-width: 350px) {
  .scan-dialog-heading {
    grid-template-columns: auto auto minmax(48px, auto) auto;
    gap: 6px 8px;
  }
  .scan-dialog-heading > div:first-child { grid-column: 1 / 4; }
  #close-scan-dialog { grid-column: 4; }
  .scan-dialog.has-reference-range .scan-dialog-range {
    grid-column: 1 / 5;
    grid-row: 2;
  }
  .scan-dialog.has-reference-range .scan-dialog-actions a,
  .scan-dialog.has-reference-range #scan-fit { grid-row: 3; }
  .scan-dialog.has-reference-range #scan-zoom-out,
  .scan-dialog.has-reference-range .scan-dialog-actions output,
  .scan-dialog.has-reference-range #scan-zoom-in { grid-row: 4; }
  #scan-fit { grid-column: 2 / 5; justify-self: end; }
  #scan-zoom-out { grid-column: 2; grid-row: 3; }
  .scan-dialog-actions output { grid-column: 3; grid-row: 3; }
  #scan-zoom-in { grid-column: 4; grid-row: 3; }
}

@media (max-width: 600px) {
  .scan-dialog.is-scan-tap-eligible.is-scan-overview .scan-overview-hint {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
  }
  .scan-dialog.is-scan-tap-eligible:not(.is-scan-overview) .scan-pan-hint,
  .scan-dialog:not(.is-scan-tap-eligible) .scan-pan-hint {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
  }
}

@media print {
  body { width: 100%; padding: 0; }
  .reader-tools,
  .search-results,
  .scan-rail,
  .mobile-reader-bar,
  .mobile-scan-button,
  .scan-dialog,
  .search-dialog,
  .site-footer,
  .skip-link { display: none !important; }
  body.view-single figure.scan,
  body.view-single .scan-collage { display: none !important; }
  .site-header { margin-bottom: 30px; }
  .page-grid { display: block; }
  .text-line { break-inside: avoid; }
}

/* Quotations ------------------------------------------------------------- */
/* The caption sits outside the quoted words. It identifies the change of
   voice, while the left rule carries that boundary through long documents,
   lists and transcripts. Pressac's prose resumes at the page margin. */
.source-extract {
  width: 100%;
  margin: 22px 0 26px;
  scroll-margin-top: var(--page-anchor);
}

@media (max-width: 980px) {
  .source-extract { scroll-margin-top: var(--page-anchor); }
}

.source-extract-label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 9px;
  color: var(--accent);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * 0.8125);
  font-weight: 500;
  line-height: 1.45;
}

.quoted-document,
.quoted-passage,
.quoted-transcript {
  margin: 0;
  padding: 2px 0 1px 18px;
  border-left: 2px solid var(--rule-dark);
  color: var(--soft-ink);
}

.source-extract-mixed > .quoted-passage + .quoted-passage,
.source-extract-mixed > .quoted-document + .quoted-document,
.source-extract-mixed > .quoted-transcript + .quoted-transcript {
  margin-top: 14px;
}

.source-extract-mixed > .source-insert + .quoted-passage,
.source-extract-mixed > .source-insert + .quoted-document,
.source-extract-mixed > .source-insert + .quoted-transcript {
  margin-top: 14px;
}

.source-clarification {
  margin: 12px 0 14px 18px;
  padding: 10px 12px;
  background: var(--accent-soft);
}

.source-clarification-label {
  margin: 0 0 3px;
  color: var(--accent);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.source-clarification-copy {
  margin: 0;
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.source-insert {
  margin-left: 18px;
}

.source-note-label {
  display: block;
  margin: 2px 0 4px;
  color: var(--accent);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
}

.source-extract .source-extract {
  margin: 16px 0;
}

/* Letterheads, addresses, and reference numbers are separate OCR rows. Full
   paragraph spacing between them turns an address block into eight thoughts. */
.quoted-document .text-line { margin: 0; }
.quoted-document .text-line:not(.caption-line) > .line-copy { padding-top: 0; padding-bottom: 0; }
.quoted-document .text-line p { margin: 0 0 2px; }
.quoted-document .text-line.joined-paragraph p { margin: 0 0 12px; }
.document-date-group { display: contents; }
body.view-reading-order .document-date-group {
  display: flex;
  position: relative;
  align-items: baseline;
  gap: .3em;
  width: max-content;
  max-width: 100%;
  margin: 0 0 2px;
  white-space: nowrap;
}
body.view-reading-order .document-date-group > .text-line {
  flex: 0 0 auto;
  min-width: 0;
}
body.view-reading-order .document-date-group > .text-line:last-child {
  position: static;
}
body.view-reading-order .document-date-group > .text-line:last-child > .line-number {
  opacity: 0;
  pointer-events: none;
  right: auto;
  left: -60px;
}
/* The shared gutter has one visible, hit-testable link. Focus wins over a
   hovered row, and hover wins over a target row. The other anchor stays in
   the DOM and remains keyboard-reachable when it isn't the current winner. */
body.view-reading-order .document-date-group:has(> .text-line.is-target):not(:has(> .text-line:hover)):not(:has(> .text-line:focus-within)) > .text-line.is-target > .line-number,
body.view-reading-order .document-date-group:has(> .text-line:hover):not(:has(> .text-line:focus-within)) > .text-line:hover > .line-number,
body.view-reading-order .document-date-group:has(> .text-line:focus-within) > .text-line:focus-within > .line-number {
  opacity: 1;
  pointer-events: auto;
}
body.view-reading-order .document-date-group:has(> .text-line.is-target):not(:has(> .text-line:hover)):not(:has(> .text-line:focus-within)) > .text-line:not(.is-target) > .line-number,
body.view-reading-order .document-date-group:has(> .text-line:hover):not(:has(> .text-line:focus-within)) > .text-line:not(:hover) > .line-number,
body.view-reading-order .document-date-group:has(> .text-line:focus-within) > .text-line:not(:focus-within) > .line-number {
  opacity: 0;
  pointer-events: none;
}
.quoted-passage .text-line { margin: 0; }
.quoted-passage .text-line p { margin: 0 0 12px; }
.quoted-passage .text-line:last-child p { margin-bottom: 0; }

/* A caption names the document beside it. It is the book speaking about the
   document, not the document speaking. */
.caption-line .ocr-caption {
  margin: 0 0 8px;
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * 0.875);
  font-weight: 500;
  line-height: 1.5;
}

/* Square brackets carry the editor's voice: a note on a stamp, a marginal
   remark, a reading of damaged handwriting. */
.editorial-line .ocr-editorial {
  margin: 8px 0;
  color: var(--muted);
  font-style: italic;
  overflow-wrap: anywhere;
}
/* A long bracketed intervention is prose, not a short marginal aside. Upright
   type and a modest inset keep it distinct without turning a full paragraph
   into a tiring block of italics. */
.editorial-line.joined-paragraph .ocr-editorial,
.editorial-line.long-editorial .ocr-editorial {
  padding: 0 14px;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1em;
  font-style: normal;
  line-height: 1.58;
}
.layout-ruled-box {
  margin: 24px 0;
  padding: 13px 15px;
  border: 1px solid var(--rule-dark);
}
.layout-ruled-box .ocr-editorial { margin: 0; }
.quoted-document .editorial-line .ocr-editorial { margin: 4px 0; }

/* A joined-line target sits at its source-text boundary. When selected, it
   draws only a short opening cue instead of tinting the whole paragraph. */
.line-anchor {
  position: relative;
  display: inline;
  scroll-margin-top: var(--page-anchor);
}
.line-anchor.is-target::before {
  content: "";
  position: absolute;
  top: 1.15em;
  left: 0;
  width: 1.25em;
  height: 0;
  border-bottom: 2px solid var(--accent);
}

@media (max-width: 800px) {
  .quoted-document,
  .quoted-passage,
  .quoted-transcript { padding-left: 12px; }
  .source-insert { margin-left: 12px; }
  .source-clarification { margin-left: 12px; }
}

/* Credits lists ---------------------------------------------------------- */
/* Acknowledgements name an institution, then the people at it. The print
   indents the people under the institution. Full paragraph spacing on every
   name turns one list into thirty separate statements. */
.roster { margin: 16px 0; }

.roster-heading { margin-top: 16px; }
.roster-heading:first-child { margin-top: 0; }
.roster-heading p { margin: 0; }

.roster-group { margin-left: 22px; }

.roster-person { margin: 0; }
.roster-person p { margin: 0 0 1px; }

@media (max-width: 800px) {
  .roster-group { margin-left: 14px; }
}

/* Contents page ------------------------------------------------------------ */
/* Each entry links to its page. The printed page number stays visible because
   it is what the book prints and what a citation uses. */
.contents-line { margin: 0; }
.contents-entry {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 7px;
}
.contents-link { flex: 1 1 auto; text-decoration-color: var(--rule); }
.contents-link:hover { text-decoration-color: currentColor; }
.contents-page {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}


/* Chapter openers ---------------------------------------------------------- */
/* "PART TWO" and "CHAPTER 3" sit above a chapter title as small labels. */
.kicker-line { margin: 0; }
.kicker-line + .kicker-line { margin-top: -6px; }
.book-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * (12 / 16));
  font-weight: 500;
}
.layout-part-label,
.layout-chapter-label {
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * (12 / 16));
}
.layout-part-label { margin: 14px 0 7px; }
.layout-part-title { margin: 0 0 12px; }
.layout-part-title h2 {
  margin: 0;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.3125em;
  line-height: 1.25;
}
.layout-chapter-label { margin: 0 0 7px; }
.layout-chapter-title { margin: 0 0 8px; }
.layout-chapter-title h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}
.layout-chapter-subtitle {
  margin: 0 0 12px;
  font-size: calc(var(--reader-size) * (15 / 16));
  font-style: italic;
  line-height: 1.35;
}
.layout-chapter-deck {
  margin: 0 0 6px;
  font-size: calc(var(--reader-size) * (14 / 16));
  line-height: 1.35;
}
.layout-chapter-deck-spaced {
  margin: 0 0 12px;
  font-size: calc(var(--reader-size) * (14 / 16));
  line-height: 1.35;
}
.layout-chapter-date {
  margin: 0 0 12px;
  font-size: calc(var(--reader-size) * (14 / 16));
  line-height: 1.35;
}
.layout-chapter-section-title {
  margin: 24px 0 12px;
}
.layout-chapter-section-title h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.layout-chapter-section-line {
  margin: 0 0 9px;
}
.layout-chapter-section-line h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}
.layout-chapter-secondary-title {
  margin: 12px 0 6px;
}
.layout-chapter-secondary-title h3 {
  margin: 0;
  font-size: 1em;
  line-height: 1.35;
}
.layout-chapter-tertiary-title {
  margin: 6px 0 12px;
}
.layout-chapter-tertiary-title h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.layout-foreword-source-title {
  margin: 6px 0 9px;
}
.layout-foreword-source-title h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.layout-foreword-source-deck {
  margin: 0 0 16px;
  font-size: calc(var(--reader-size) * (13 / 16));
  line-height: 1.4;
}
.layout-foreword-section-title {
  margin: 0 0 11px;
}
.layout-foreword-section-title h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

/* One column ----------------------------------------------------------------- */
/* As on the Belzec reader: the text centred at a reading measure, each page
   break a dotted rule with the page number at the right, and the page's scan
   standing inline as a figure that can be shown full, compact, or as its
   caption alone. */
figure.scan { display: none; }
.figure-toggle { display: none; }

body.view-single .page-grid { display: block; }
body.view-single .scan-rail { display: none; }
body.view-single .reader-column { max-width: 760px; margin: 0 auto; }
body.view-single .book-page + .book-page { margin-top: 28px; }
body.view-single .page-marker { right: 0; }
body.view-single .book-heading { margin-top: 14px; }

body.view-single figure.scan,
figure.scan.scan-required {
  display: block;
  margin: 0 0 18px;
  padding: 0;
  text-align: center;
}
.scan-figure-button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.scan-figure-button:hover { background: transparent; }
body.view-single figure.scan img,
figure.scan.scan-required img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--rule-dark);
  background: var(--field);
}
body.view-single figure.scan figcaption,
figure.scan.scan-required figcaption {
  margin-top: 8px;
  padding: 0 4px;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}
body.view-single figure.scan figcaption strong { color: var(--ink); font-weight: 600; }

body:not(.figs-hidden) .book-page > figure.scan.scan-required { display: block !important; }

body.view-single.figs-compact figure.scan { max-width: 280px; margin: 14px auto; }
body.view-single.figs-compact figure.scan figcaption { text-align: center; }
body.view-single.figs-hidden figure.scan .scan-figure-button { display: none; }
body.view-single.figs-hidden figure.scan {
  margin: 12px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--rule-dark);
  text-align: left;
}
body.view-single.figs-hidden figure.scan figcaption { margin-top: 0; }

@media (max-width: 980px) {
  body.view-single .figure-toggle,
  body.view-single figure.scan { display: none; }
}

/* A run of short lines is a stacked block in the print, such as a title page
   or a signature. It is set tight, not as a series of paragraphs. */
.short-run { margin: 0; }
.short-run .line-copy p { margin: 0 0 3px; }
.short-run + .text-line:not(.short-run) { margin-top: 14px; }

/* The front matter as one collage figure. */
.collage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.collage-grid .scan-figure-button { width: auto; }
body.view-single .scan-collage img { width: 100%; }
body.view-single.figs-compact .scan-collage { max-width: 420px; }
body.view-single.figs-compact .collage-grid { gap: 4px; }
body.view-single.figs-hidden .scan-collage .collage-grid { display: none; }

/* Contents page, as the print sets it ------------------------------------- */
.contents-sheet {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
}
.contents-sheet .contents-title h2 { margin: 0 0 10px; text-align: center; font-size: calc(var(--reader-size) * (22 / 16)); }
.contents-sheet .contents-summary p {
  max-width: 700px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: calc(var(--reader-size) * (14 / 16));
  font-style: normal;
  line-height: 1.5;
  text-align: center;
}
.contents-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.contents-column { min-width: 0; }
.contents-column + .contents-column {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.contents-part { margin: 22px 0 4px; }
.contents-part h3 { margin: 0; text-align: center; font-size: calc(var(--reader-size) * (16 / 16)); }
.contents-part-subtitle p { margin: 0 0 10px; text-align: center; font-size: calc(var(--reader-size) * (15 / 16)); font-weight: 600; }
.contents-sheet .contents-line { margin: 0; }
.contents-sheet .contents-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px 8px;
  margin: 0 0 12px;
  font-size: calc(var(--reader-size) * (14 / 16));
  line-height: 1.35;
}
.contents-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * (11 / 16));
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.2;
}
.contents-sheet .contents-link {
  grid-column: 1;
  min-width: 0;
  text-align: left;
  text-decoration: none;
}
.contents-sheet .contents-link:hover { text-decoration: underline; }
.contents-sheet .contents-page {
  grid-column: 2;
  align-self: start;
  color: var(--muted);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
}
.contents-split-entry .contents-entry { align-items: flex-end; }
.contents-split-entry .contents-link { display: block; }
.contents-split-title {
  display: block;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(var(--reader-size) * (11 / 16));
  font-weight: 600;
}
.contents-split-subtitle { display: block; }
.contents-subitem p { margin: -4px 0 8px 22px; font-size: calc(var(--reader-size) * (13 / 16)); line-height: 1.35; }
@media (max-width: 980px) {
  .contents-columns { grid-template-columns: 1fr; }
}

/* A translation with its original -------------------------------------------
   In the normal reader this block already sits beside the full-page scan.
   Splitting that text column again leaves the translation too narrow to read,
   so the detail sits above it at a useful size. The two-column treatment is
   reserved for the full-width, text-only view. */
.bilingual { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 18px 0 22px; align-items: start; }
.bilingual > * { min-width: 0; }
.bilingual .source-extract { margin: 0; }
.bilingual > .bilingual-original,
.bilingual > .bilingual-original-group { width: min(100%, 22rem); }
.bilingual-original-group { display: grid; gap: 16px; }
.original-crop {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--rule-dark);
  background-color: var(--field);
  background-repeat: no-repeat;
  cursor: zoom-in;
}
.original-crop:hover { background-color: var(--field); }
.bilingual-note { margin: 6px 0 0; color: var(--muted); font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif; font-size: 11px; line-height: 1.45; }
@media (min-width: 981px) {
  body:not(.view-single) .bilingual > .bilingual-original,
  body:not(.view-single) .bilingual > .bilingual-original-group { display: none; }
}
@media (min-width: 721px) {
  body.view-single .bilingual { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
  body.view-single .bilingual > .bilingual-original,
  body.view-single .bilingual > .bilingual-original-group { width: auto; }
}
@media (max-width: 720px) {
  .bilingual { grid-template-columns: minmax(0, 1fr); }
}

/* Masthead: the book's own title leaf beside the title ----------------- */
.site-header { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 26px; align-items: start; }
/* The title block sits in the right half of the scanned title spread; the
   masthead shows that region, cropped, at 132 pixels. */
.masthead-leaf {
  width: 132px;
  aspect-ratio: 132 / 100;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--rule-dark);
  background: var(--field) url("assets/scan-pages/page-001.jpg?v=jpeg-2026-08-25-p189") no-repeat;
  background-size: 150% auto;
  background-position: 82% 0%;
  cursor: zoom-in;
}
.masthead-leaf:hover { background-color: var(--field); }
.masthead-copy { min-width: 0; }
@media (max-width: 720px) {
  .site-header { grid-template-columns: 1fr; }
  .masthead-leaf { width: 120px; }
}

/* Live region for screen readers only. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Scan heading on one line. */
.scan-heading { align-items: baseline; min-height: 0; padding: 10px 0 9px; }
.scan-heading .scan-current { font-size: 11px; }

/* Scan treatment ------------------------------------------------------------ */
/* A 3x3 sharpen and a touch of contrast, applied in the browser. Measured on
   the dense italic of page 154 and the heavy Topf typescript of page 374: type
   crisper and darker, no blotching, no change to the files. */
body.scan-clearer #scan-page-image,
body.scan-clearer .scan-page-peek img,
body.scan-clearer #scan-dialog-image,
body.scan-clearer figure.scan img,
body.scan-clearer .original-crop,
body.scan-clearer .masthead-leaf,
body.scan-clearer .crop-item img { filter: url("#scan-sharpen") contrast(1.15); }

/* Lines stay grouped with any source-faithful block styling around them. */
.line-copy { display: flex; flex-direction: column; }

/* Figures cut from the page ----------------------------------------------- */
/* Figures break out of the reading measure, as in a long-form piece: the text
   keeps its column, the photographs take the fuller width. */
.figure-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  width: var(--figure-width, 100%);
  margin: 22px 0 14px;
}
.cut-figure-wide { width: var(--figure-width, 100%); }
body.view-single .figure-row,
body.view-single .cut-figure-wide { margin-left: calc((var(--figure-width, 100%) - 100%) / -2); }
.figure-row .cut-figure { flex: 1 1 0; min-width: 0; margin: 0; }
.figure-row .cut-figure-half { flex-grow: 3; }
.figure-row .cut-figure-third { flex-grow: 2; }
/* At the narrow edge of scan-beside view, three equal columns make both the
   photographs and their captions too small. Keep the page scan beside them,
   but let dense rows use two readable columns. */
@media (min-width: 981px) and (max-width: 1180px) {
  body:not(.view-single) .figure-row:has(> .cut-figure:nth-child(3)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.cut-figure { margin: 20px 0 14px; }
.cut-figure-image {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  cursor: zoom-in;
}
.figure-image-stage { min-width: 0; }
.figure-row .figure-image-stage {
  display: flex;
  height: 260px;
  align-items: flex-end;
  justify-content: center;
}
body.view-reading-order .figure-row .figure-image-stage { height: auto; }
.figure-row .cut-figure-image {
  width: min(100%, var(--figure-stage-width, 260px));
  max-height: 260px;
}
/* Matching photographs use the row together. They grow to the width of their
   equal columns, but the crop's pixel width remains the enlargement limit. */
.figure-row-matched .figure-image-stage,
.figure-sequence-matched-row .figure-image-stage {
  display: block;
  height: auto;
}
.figure-row-matched .cut-figure-image,
.figure-sequence-matched-row .cut-figure-image {
  width: 100%;
  max-height: none;
  margin-inline: auto;
}
.cut-figure-image:hover { background-color: transparent; }
.cut-figure figcaption,
.figure-set-caption {
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
.cut-figure figcaption { margin-top: 8px; }
.cut-figure.figure-caption-before > figcaption { margin: 0 0 8px; }
.figure-caption-beside.figure-caption-before { grid-template-columns: minmax(0, 1fr); }
.cut-figure > .figure-attached-label-before {
  margin: 0 0 8px;
  color: var(--soft-ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}
.cut-figure > .figure-attached-label-before p {
  max-width: 54ch;
  margin: 0;
  font-size: calc(var(--reader-size) * 0.875);
  line-height: 1.5;
}
.cut-figure > .figure-attached-label-before .line-copy { padding: 0; }
.cut-figure > .figure-attached-label-before .ocr-caption { margin: 0; }
.cut-figure figcaption .text-line { margin: 0; }
.cut-figure figcaption p,
.figure-set-caption p {
  max-width: 54ch;
  margin: 0;
  font-size: calc(var(--reader-size) * 0.875);
  line-height: 1.5;
}
.cut-figure figcaption .figure-caption-title p,
.cut-figure figcaption p.figure-caption-title,
.figure-set-caption .figure-caption-title p {
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
}
.cut-figure figcaption .figure-caption-copy + .figure-caption-copy { margin-top: 8px; }
.cut-figure figcaption .figure-caption-copy .ocr-caption { font-weight: 400; }
.figure-caption-label { color: var(--ink); font-weight: 600; }
.caption-line > .line-copy > p.ocr-caption.figure-caption-title { color: var(--ink); font-weight: 600; }
.cut-figure figcaption .line-copy { padding: 0; }
.cut-figure figcaption .list-line > .line-copy { padding-left: 16px; }
.cut-figure figcaption .ocr-caption { margin: 0 0 6px; }
.cut-figure figcaption .source-extract { margin: 12px 0; }
.figure-original-caption { margin-top: 10px; font-size: 14px; }
.figure-original-caption summary { cursor: pointer; color: var(--accent); }
.figure-original-caption[open] summary { margin-bottom: 8px; }
.figure-caption-beside { display: grid; grid-template-columns: minmax(0, var(--caption-image-width, 280px)) minmax(0, 1fr); gap: 20px; align-items: start; }
.figure-caption-beside figcaption { margin-top: 0; }
.text-stage:has(.figure-caption-beside-structured) {
  container-name: structured-figure;
  container-type: inline-size;
}
.figure-caption-beside-structured {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}
.text-stage .figure-caption-beside-structured > figcaption :is(.ocr-definition-list-glosses, .ocr-definition-list-pairs) .definition-list-line:not(.definition-list-note) {
  grid-template-columns: minmax(0, 1fr);
  gap: .12em;
}
@container structured-figure (max-width: 700px) {
  .figure-caption-beside-structured {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}
.layout-translation-key { max-width: 68ch; margin: 24px 0; line-height: 1.5; }
.layout-translation-key .line-copy { padding-block: 0; }
.layout-translation-key .line-copy p { margin: 0 0 6px; }
.layout-translation-key .translation-key-pair {
  display: grid;
  grid-template-columns: minmax(15rem, .9fr) minmax(0, 1.1fr);
  gap: .15em 1.25em;
  align-items: baseline;
}
.translation-key-original {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
}
.translation-key-english {
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
}
.layout-translation-key .book-heading { margin-top: 20px; }
.layout-translation-key .book-heading :is(h2,h3,h4,h5,h6) { margin: 0 0 8px; font-size: 1em; line-height: 1.5; font-weight: 600; }
.layout-translation-key > .text-line:first-child .ocr-caption { color: var(--ink); font-weight: 600; }
@media (max-width: 620px) {
  .figure-caption-beside { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .layout-translation-key .translation-key-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: .05em;
    margin-bottom: .68em;
  }
}
.cut-figure figcaption .book-heading { margin-top: 0; }
.cut-figure figcaption .book-heading h3,
.cut-figure figcaption .book-heading h4,
.cut-figure figcaption .book-heading h5,
.cut-figure figcaption .book-heading h6 {
  margin: 0 0 5px;
  font-size: calc(var(--reader-size) * 1);
}
.cut-figure-set {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 22px;
  margin: 22px 0 28px;
}
.cut-figure-set .cut-figure { min-width: 0; margin: 0; }
.cut-figure-set .cut-figure-wide { width: auto; }
.cut-figure-set .cut-figure-span-wide { grid-column: 1 / -1; }
.figure-set-title {
  grid-column: 1 / -1;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.figure-set-caption {
  grid-column: 1 / -1;
  max-width: 72ch;
  padding-top: 2px;
}

/* Mixed portrait and landscape sequences use one lead view, two supporting
   details, then an even pair. The order follows the printed photo numbers. */
.figure-sequence-lead-stack-pair {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 22px 24px;
}
.figure-sequence-matched-row {
  grid-template-columns: repeat(var(--figure-count, 3), minmax(0, 1fr));
  gap: 18px;
  width: var(--figure-width, 100%);
}
.layout-subtitle h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.28;
}
.figure-sequence-plate-four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}
.figure-sequence-plate-four > .cut-figure:nth-of-type(4) { grid-column: auto; }
body.view-single .figure-sequence-matched-row {
  margin-left: calc((var(--figure-width, 100%) - 100%) / -2);
}
.photo-group-caption {
  width: 100%;
  max-width: none;
  margin: -2px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.photo-group-caption p { max-width: none; }
.figure-sequence-lead-stack-pair > .cut-figure:nth-of-type(1) {
  grid-column: 1;
  grid-row: 2 / span 2;
}
.figure-sequence-lead-stack-pair > .cut-figure:nth-of-type(2) {
  grid-column: 2;
  grid-row: 2;
}
.figure-sequence-lead-stack-pair > .cut-figure:nth-of-type(3) {
  grid-column: 2;
  grid-row: 3;
}
.figure-sequence-lead-stack-pair > .cut-figure:nth-of-type(4) {
  grid-column: 1;
  grid-row: 4;
}
.figure-sequence-lead-stack-pair > .cut-figure:nth-of-type(5) {
  grid-column: 2;
  grid-row: 4;
}
#page-15 .cut-figure-set[data-line-from="9"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#page-21 .cut-figure-set[data-line-from="3"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 20px;
}
#page-21 .figure-photo-plate-grid .cut-figure-image {
  max-width: 100%;
}
#page-46 .cut-figure-set[data-line-from="1"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 18px;
}
.figure-block1-building-primary {
  width: 350px;
  max-width: 46%;
  margin-right: auto;
  margin-left: auto;
}
.figure-block1-building-secondary {
  width: 520px;
  max-width: 68%;
  margin-right: auto;
  margin-left: auto;
}
.figure-source-caption { color: var(--soft-ink); }
.figure-source-caption > p { margin: 0; }
.figure-caption-list {
  margin: 6px 0 0;
  padding-left: 1.35em;
}
.figure-caption-list li + li { margin-top: 4px; }
.narrow-third { width: calc((100% - 28px) / 3); }
.narrow-half { width: calc((100% - 14px) / 2); }
/* A fractional print column is useful only inside an explicit grouped layout.
   Standalone transcript blocks use the full reading measure; otherwise a
   four-column scan can leave web prose stranded in a 240px strip. */
.text-stage > .narrow { width: 100%; }
.align-center h2, .align-center h3 { text-align: center; }
.layout-lines.align-center { text-align: center; }
.layout-lines.align-right { text-align: right; }
body.view-single { --figure-width: min(100vw - 120px, 1180px); }

/* Page structures whose meaning is lost when they are treated as body prose. */
.layout-signature {
  margin: 20px 0 26px;
  text-align: right;
}
.layout-signature .line-copy p {
  margin: 0;
  font-style: italic;
  font-weight: 600;
}
.layout-signature.align-center { text-align: center; }
.layout-preface-title {
  margin: 8px 0 10px;
}
.layout-preface-title h2 {
  margin: 0;
  font-family: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
}
.layout-preface-byline {
  margin: 0 0 28px;
  font-style: italic;
}
.layout-preface-byline .text-line,
.layout-preface-byline .line-copy p {
  margin: 0;
}
.layout-preface-subtitle {
  margin: 0 0 26px;
}
.layout-preface-subtitle h3 {
  margin: 0;
  font-size: 16px;
  font-style: italic;
  line-height: 1.35;
}
.layout-declaration-title {
  margin: 8px 0 18px;
}
.layout-declaration-title h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}
.layout-declaration-translator-note {
  margin: 0 0 30px;
  color: var(--soft-ink);
  font-style: italic;
}
.layout-declaration-translator-note .text-line,
.layout-declaration-translator-note .line-copy p {
  margin: 0;
}
.layout-photo-plate-title {
  margin: 8px 0 22px;
}
.layout-photo-plate-title h3 {
  font-size: 16px;
  font-weight: 500;
}
.layout-drawing-number {
  margin: 6px 0 16px;
  font-size: 14px;
  font-weight: 600;
}
.layout-drawing-number .text-line,
.layout-drawing-number .line-copy p { margin: 0; }
.table-caption {
  margin: 20px 0 10px;
  text-align: center;
}
.table-caption .text-line,
.table-caption .line-copy p { margin: 0; }
.table-caption .text-line:first-child { font-size: calc(var(--reader-size) * .875); }
.table-caption .text-line:last-child { font-weight: 600; }
/* The print compresses ten columns into half a spread. The web table stays
   large enough to read, with a sideways scroll rather than smaller type. */
.compact-statistics .ocr-table {
  min-width: 920px;
  table-layout: fixed;
  font-size: calc(var(--reader-size) * .875);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.compact-statistics .ocr-table .row-label-column { width: 18%; }
.compact-statistics .ocr-table th,
.compact-statistics .ocr-table td {
  min-width: 0;
  padding: 9px 7px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}
.compact-statistics .ocr-table thead th {
  text-align: center;
  white-space: normal;
}
.compact-statistics .ocr-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: var(--paper);
}
.table-footnote-marker {
  margin-left: .12em;
  font-size: .78em;
  line-height: 0;
  vertical-align: .42em;
}
@media (max-width: 720px) {
  .compact-statistics .ocr-table { min-width: 860px; }
}

@media (max-width: 980px) {
  body.view-single { --figure-width: 100%; }
  body.view-single .figure-row,
  body.view-single .cut-figure-wide,
  body.view-single .figure-sequence-matched-row { margin-left: 0; }
}

@media (max-width: 720px) {
  .figure-row { flex-wrap: wrap; }
  .figure-row .cut-figure { flex-basis: 100%; }
  .figure-row .figure-image-stage { display: block; height: auto; }
  .figure-row .cut-figure-image { width: 100%; max-height: none; }
  .cut-figure-set,
  #page-15 .cut-figure-set[data-line-from="9"],
  #page-21 .cut-figure-set[data-line-from="3"],
  #page-46 .cut-figure-set[data-line-from="1"] { grid-template-columns: 1fr; }
  .figure-sequence-plate-four { grid-template-columns: 1fr; }
  .figure-sequence-plate-four > .cut-figure:nth-of-type(4) { grid-column: auto; }
  .figure-sequence-lead-stack-pair > .cut-figure:nth-of-type(n) {
    grid-column: 1;
    grid-row: auto;
  }
  #page-28 .figure-block1-building-primary {
    width: 100%;
    max-width: 100%;
  }
  /* The source page uses two print columns, but a phone has one reading
     column. Keep the photograph numbers in the expected 1, 2, 3, 4 order. */
  #page-496 .figure-row > .cut-figure:nth-child(1) { order: 1; }
  #page-496 .figure-row > .cut-figure:nth-child(3) { order: 2; }
  #page-496 .figure-row > .cut-figure:nth-child(2) { order: 3; }
  #page-496 .figure-row > .cut-figure:nth-child(4) { order: 4; }
  /* Multi-column plate order isn't a useful phone reading order. Put numbered
     photographs in sequence while the desktop keeps the printed arrangement. */
  #page-531 .figure-sequence-matched-row > .cut-figure:nth-of-type(1) { order: 1; }
  #page-531 .figure-sequence-matched-row > .cut-figure:nth-of-type(2) { order: 2; }
  #page-531 .figure-sequence-matched-row > .cut-figure:nth-of-type(4) { order: 3; }
  #page-531 .figure-sequence-matched-row > .cut-figure:nth-of-type(3) { order: 4; }
  #page-531 .figure-sequence-matched-row > .cut-figure:nth-of-type(6) { order: 5; }
  #page-531 .figure-sequence-matched-row > .cut-figure:nth-of-type(5) { order: 6; }
  #page-534 .figure-row > .cut-figure:nth-child(2) { order: 1; }
  #page-534 .figure-row > .cut-figure:nth-child(1) { order: 2; }
  #page-534 .figure-row > .cut-figure:nth-child(3) { order: 3; }
  #page-541 .figure-sequence-matched-row > .cut-figure:nth-of-type(4) { order: 1; }
  #page-541 .figure-sequence-matched-row > .cut-figure:nth-of-type(1) { order: 2; }
  #page-541 .figure-sequence-matched-row > .cut-figure:nth-of-type(2) { order: 3; }
  #page-541 .figure-sequence-matched-row > .cut-figure:nth-of-type(3) { order: 4; }
  #page-541 .figure-sequence-matched-row > .cut-figure:nth-of-type(5) { order: 5; }
  #page-541 .figure-sequence-matched-row > .cut-figure:nth-of-type(6) { order: 6; }
  .narrow-third, .narrow-half,
  .book-heading.layout-width-third,
  .book-heading.layout-width-half { width: auto; }
}

#page-534 .figure-sequence-matched-row > .cut-figure:nth-of-type(3) {
  grid-column: 1 / -1;
  width: min(50%, 560px);
  justify-self: center;
}
@media (max-width: 720px) {
  #page-534 .figure-sequence-matched-row > .cut-figure:nth-of-type(3) {
    grid-column: auto;
    width: auto;
  }
  #page-534 .figure-sequence-matched-row > .cut-figure:nth-of-type(2) { order: 1; }
  #page-534 .figure-sequence-matched-row > .cut-figure:nth-of-type(1) { order: 2; }
  #page-534 .figure-sequence-matched-row > .cut-figure:nth-of-type(3) { order: 3; }
}

.text-stage :is(.layout-part-label, .layout-part-title, [class*="layout-chapter-"], [class*="layout-foreword-"]) { text-align: left; }

/* A very wide picture (2.5:1 or wider) takes its own line at full measure,
   so a label strip or a panorama is legible rather than a few pixels tall. */
.cut-figure-banner {
  width: var(--figure-width, 100%);
  margin: 24px 0 18px;
}
body.view-single .cut-figure-banner { margin-left: calc((var(--figure-width, 100%) - 100%) / -2); }
.cut-figure-banner .cut-figure-image { width: 100%; }
.cut-figure-banner figcaption { max-width: 760px; }

/* A crop is never shown wider than the pixels it actually has, so a tall
   narrow photograph stays its own size instead of filling the measure. */
.cut-figure-image { max-width: var(--natural-width, 100%); }
.cut-figure-banner .cut-figure-image { max-width: min(var(--natural-width, 100%), 100%); }

/* A plate page: a narrow column of commentary level with a large drawing,
   as the print sets it, instead of the text stacked far above the picture. */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: var(--figure-width, 100%);
  margin: 20px 0 24px;
}
body.view-single .spread { margin-left: calc((var(--figure-width, 100%) - 100%) / -2); }
.spread-text { min-width: 0; font-size: 14px; }
.spread-text .text-line p { margin: 0 0 10px; }
.spread-figure { min-width: 0; }
.spread-figure .cut-figure { margin: 0; }
.spread-figure .cut-figure-image { max-width: 100%; }
@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; margin-left: 0; }
}

/* A figure and its caption precede the text. No mid-paragraph width changes. */
.flow-wrap {
  width: var(--figure-width, 100%);
  margin: 20px 0 24px;
}
.flow-wrap-figure,
.flow-wrap-figure-left .flow-wrap-figure {
  width: 100%;
  margin: 0 0 20px;
}
.flow-wrap-figure .cut-figure,
.flow-wrap-figure .cut-figure-wide {
  width: 100%;
  margin: 0;
}
.flow-wrap-figure .cut-figure-image { max-width: 100%; }
.flow-wrap .line-copy { display: block; }
.text-stage .reading-heading :is(h2,h3,h4,h5,h6) { text-align: left; }
.text-stage > .reading-heading:where(:not(.layout-part-title)) h2 { font-size: 1.25em; }
.text-stage > .reading-heading:where(:not(.layout-part-title)) :is(h3,h4,h5,h6) { font-size: 1.125em; }
.text-stage > .layout-chapter-secondary-title:where(.reading-heading) h3 { font-size: 1em; }
.text-stage .heading-cluster-lead,
.text-stage .heading-cluster-follow { width: auto; margin-inline: 0; text-align: left; }
.text-stage .heading-cluster-lead { margin-top: 16px; margin-bottom: 0; }
.text-stage .heading-cluster-lead :is(h2,h3,h4,h5,h6) { margin-bottom: 0; font-size: 1.125em; line-height: 1.35; text-align: left; }
.text-stage .heading-cluster-follow { margin-top: 5px; margin-bottom: 0; }
.text-stage .heading-cluster-follow :is(h2,h3,h4,h5,h6) { margin-bottom: 0; font-size: 1em; line-height: 1.4; font-weight: 500; text-align: left; }
.text-stage .heading-cluster-gap { display: none; }
.text-stage .heading-cluster-end { margin-bottom: 12px; }
.text-stage .layout-chapter-section-title :is(h2,h3,h4,h5,h6) {
  font-size: 1em;
}
.text-stage .reading-chapter-title :is(h2,h3,h4,h5,h6) {
  font-size: 1.25em;
  line-height: 1.3;
}
body.view-single .flow-wrap { margin-left: calc((var(--figure-width, 100%) - 100%) / -2); }
@media (max-width: 900px) {
  .flow-wrap { width: 100%; margin-left: 0; }
  .flow-wrap-figure {
    float: none;
    width: 100%;
    margin: 0 0 22px;
  }
  .flow-wrap-figure-left .flow-wrap-figure {
    float: none;
    width: 100%;
    margin: 0 0 22px;
  }
}

/* Cohesive reader controls. The book remains the dominant surface; controls
   use the same paper, type, and hairline rules as the documentary pages. */
.reader-tools {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(170px, 1.2fr) minmax(240px, 1.05fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
  padding: 10px 0 11px;
  background: var(--paper);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.reader-tools .section-field,
.reader-tools .search-field { min-width: 0; }
.reading-order-choice,
.layout-choice,
.reader-options-wrap {
  display: grid;
  gap: 4px;
  align-items: end;
  color: var(--muted);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 11px;
}
.reading-order-choice > span,
.layout-choice > span { line-height: 1.3; }
.segmented-control {
  display: flex;
  align-items: stretch;
}
.segmented-control button {
  min-height: var(--control-height);
  margin: 0;
}
.segmented-control button + button { margin-left: -1px; }
.segmented-control button[aria-pressed="true"] {
  position: relative;
  z-index: 1;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.reader-options { position: relative; }
.reader-options summary {
  position: relative;
  box-sizing: border-box;
  min-height: var(--control-height);
  padding: 6px 28px 6px 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--control-rule);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  line-height: 20px;
}
.reader-options summary::-webkit-details-marker { display: none; }
.reader-options summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 0;
  height: 0;
  margin-top: -2px;
  border: 4px solid transparent;
  border-top-color: currentColor;
}
.reader-options[open] summary { background: var(--accent-soft); }
.reader-options-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  display: flex;
  gap: 18px;
  align-items: end;
  width: max-content;
  max-width: calc(100vw - 44px);
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
}
.reader-options-panel .scan-choice,
.reader-options-panel .layout-choice,
.reader-options-panel .figure-toggle,
.reader-options-panel .text-size {
  display: grid;
  gap: 4px;
  align-items: end;
  color: var(--muted);
  font-size: 11px;
}
.reader-options-panel .figure-toggle { display: none; }
body.view-single .reader-options-panel .figure-toggle { display: grid; }
.reader-options-panel .text-size {
  grid-column: auto;
  justify-content: initial;
}
.reader-type-dialog .reader-options-panel {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  width: auto;
  max-width: none;
  padding: 0;
  border: 0;
}
.reader-type-dialog .reader-options-panel .layout-choice,
.reader-type-dialog .reader-options-panel .scan-choice,
.reader-type-dialog .reader-options-panel .figure-toggle,
.reader-type-dialog .reader-options-panel .text-size { display: grid; }
body.view-single .reader-type-dialog .reader-options-panel .figure-toggle { display: grid; }
.reader-type-dialog .reader-options-panel .segmented-control button {
  flex: 1;
  min-height: var(--tap-height);
}
.reader-type-dialog .reader-options-panel .text-size output { min-height: var(--tap-height); }
@media (max-width: 980px) {
  .reader-options-panel .layout-choice,
  body.view-single .reader-options-panel .figure-toggle { display: none; }
  .reader-tools {
    position: static;
    grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.25fr) auto auto;
    gap: 10px 12px;
    padding: 10px 0 12px;
  }
  .reader-tools .page-controls { display: none; }
  .reader-tools .section-field { grid-column: 1; grid-row: 1; }
  .reader-tools .search-field { grid-column: 2; grid-row: 1; }
  .reading-order-choice { grid-column: 3; grid-row: 1; }
  .reader-options-wrap { grid-column: 4; grid-row: 1; }
  .reader-options-panel .scan-choice,
  .reader-options-panel .text-size { display: grid; }
  .mobile-reader-bar {
    position: sticky;
    top: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 0;
    gap: 8px;
    color: var(--muted);
    background: var(--paper);
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
    font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 11px;
  }
  .mobile-reader-location {
    grid-column: 1 / -1;
    margin: 0;
    padding: 7px 8px 6px;
    overflow: hidden;
    color: var(--soft-ink);
    border-bottom: 1px solid var(--rule);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-page-nav,
  .mobile-reader-actions {
    display: flex;
    align-items: center;
  }
  .mobile-bar-button,
  .mobile-scan-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 8px;
    border: 0;
    border-left: 1px solid var(--rule);
  }
  .mobile-page-nav .mobile-bar-button:first-child { border-left: 0; }
  .mobile-page-count {
    padding: 0 7px;
    color: var(--soft-ink);
    white-space: nowrap;
  }
  .mobile-page-count strong {
    color: var(--ink);
    font-weight: 600;
  }
  .mobile-scan-button {
    color: var(--soft-ink);
    background: transparent;
    border-color: var(--rule);
    font-weight: 600;
  }

  .scan-dialog-actions a,
  .scan-dialog-actions button { min-height: var(--tap-height); }
}

@media (max-width: 360px) {
  .mobile-page-nav .mobile-bar-button,
  .mobile-reader-actions .mobile-bar-button,
  .mobile-reader-actions .mobile-scan-button {
    min-width: 36px;
    padding-inline: 5px;
  }
  .mobile-page-count {
    padding-inline: 4px;
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  .site-header {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0 14px;
    margin-bottom: 22px;
  }
  .masthead-copy { display: contents; }
  .masthead-leaf {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 82px;
  }
  .eyebrow {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin-bottom: 5px;
  }
  h1 {
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 0;
    font-size: clamp(24px, 7.2vw, 28px);
  }
  .standfirst {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 16px 0 14px;
    font-size: 14px;
    line-height: 1.45;
  }
  .header-row {
    grid-column: 1 / -1;
    grid-row: 4;
    gap: 8px;
    padding-top: 12px;
  }
  .edition-note { margin-top: 2px; }
  .reader-tools {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 0;
    padding: 10px 0 12px;
  }
  .reader-tools .page-controls { display: none; }
  .reader-tools .section-field { grid-column: 1; grid-row: 1; }
  .reader-options-wrap { grid-column: 2; grid-row: 1; }
  .reader-tools .search-field { grid-column: 1 / -1; grid-row: 2; }
  .reading-order-choice { grid-column: 1 / -1; grid-row: 3; }
  .reading-order-choice .segmented-control button { flex: 1; }
  body:not(.mobile-search-open) .reader-tools .search-field { display: none; }
  .page-field > span,
  .section-field > span,
  .search-field > label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  button,
  input,
  select,
  summary,
  .button-link { min-height: var(--tap-height); }
  .reader-options-panel {
    right: 0;
    flex-direction: column;
    align-items: stretch;
    width: min(362px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    gap: 12px;
  }
  .reader-options summary { min-height: var(--tap-height); }
  .reader-options-panel .segmented-control button {
    flex: 1;
    min-height: var(--tap-height);
  }
  .reader-options-panel .text-size output { min-height: var(--tap-height); }
  .page-context {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    margin-bottom: 18px;
  }
  .page-context-pages { padding-bottom: 0; }
  .dated-order-chronology dl { grid-template-columns: 1fr; gap: 1px; }
  .dated-order-chronology dd { margin-bottom: 6px; }
  .dated-order-columns { grid-template-columns: minmax(0, 1fr); }
  body.view-single .dated-order-columns { grid-template-columns: minmax(0, 1fr); }
  .dated-order-language .bilingual-original { display: block; }

  /* Keep each count on the same baseline as its label. The adjacent share
     column then reads as one compact, aligned statistical row. */
  #page-13 .compact-statistics .mortality-table :is(th, td) {
    text-align: left;
    white-space: normal;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2)::before {
    margin-bottom: 0;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2n + 3) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(2n + 4) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }
  #page-13 .compact-statistics .mortality-table tr > :nth-child(n + 3)::before {
    margin-bottom: 0;
    text-align: left;
  }
}

/* The source plate stays in Original pages; Reading joins each photo to its caption. */
.reading-attached-figure,
.reading-attached-figure > figcaption { display: contents; }
.reading-attached-figure > .figure-image-stage { display: none; }
body.view-reading-order .reading-attached-figure,
body.view-reading-order .reading-attached-figure > figcaption,
body.view-reading-order .reading-attached-figure > .figure-image-stage { display: block; }
body.view-reading-order .reading-attached-figure > .figure-image-stage {
  width: min(100%, var(--natural-width));
  margin-inline: auto;
}
body:not(.view-reading-order) .reading-attached-figure figcaption,
body:not(.view-reading-order) .reading-attached-figure > .figure-attached-label-before { font: inherit; }

/* English captions copied from the preceding page appear only in Reading.
   The source rows and exact duplicate label stay available in Original pages. */
.reading-caption-copy { display: none; }
body.view-reading-order .reading-caption-copy { display: block; }
body.view-reading-order .reading-caption-source,
body.view-reading-order .reading-caption-duplicate { display: none; }
body.view-reading-order .cut-figure.reading-caption-owner > figcaption { margin: 8px 0 0; }

.cut-figure .source-clarification {
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--rule);
  background: none;
}
.cut-figure .source-clarification-label { font-size: 13px; }
@media print {
  body.view-reading-order .reading-attached-figure,
  body.view-reading-order .reading-attached-figure > figcaption { display: contents; }
  body.view-reading-order .reading-attached-figure > .figure-image-stage { display: none; }
}

/* Suppress a redundant gutter marker only beside a rendered page context.
   Page 252 is the observed Reading-mode exception: its context is display:none. */
.book-page:has(> .page-context) > .page-marker { display: none; }
body.view-reading-order #page-252 > .page-marker { display: block; }
