/* Theory, Framework, or Deepfake? — HTML edition.
   Extends assets/css/site.css. Uses the site's existing tokens only;
   this is not a second design system. Loaded on book pages only. */

.book-body {
  --measure: 34rem;          /* ~68 characters at the reading size */
  --rule: color-mix(in srgb, var(--line) 82%, transparent);
}

/* ----------------------------------------------------------- book landing */
.book-hero { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.book-hero-grid {
  padding: 78px 0 70px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 70px;
  align-items: center;
}
.book-hero-cover img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
}
.book-hero-copy h1 {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.book-hero-subtitle {
  margin-top: 16px;
  max-width: 34em;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.32;
}
.book-hero-author {
  margin-top: 18px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.book-hero-desc {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 40em;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.75;
}
.book-hero-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.book-hero-note {
  margin-top: 24px;
  max-width: 40em;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
}

.book-contents { padding: 92px 0; border-bottom: 1px solid var(--line); }
.book-toc { max-width: 780px; }
.book-toc a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  padding: 17px 12px 17px 4px;
  border-top: 1px solid var(--rule);
  border-radius: 6px;
  transition: background .16s ease, color .16s ease;
}
.book-toc > li:last-child a { border-bottom: 1px solid var(--rule); }
.book-toc a:hover, .book-toc a:focus-visible { background: var(--paper-2); color: var(--teal); }
.toc-number {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.toc-title { font-family: var(--serif); font-size: 21px; line-height: 1.25; }
.toc-part { margin-top: 34px; }
.toc-part:first-child { margin-top: 0; }
.toc-part a {
  grid-template-columns: 92px minmax(0, 1fr);
  padding-top: 22px;
  padding-bottom: 22px;
  border-top: 1.5px solid var(--line-dark);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}
.toc-part-number {
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.toc-part-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 25px;
  line-height: 1.2;
}
.toc-chapter + .toc-part { margin-top: 40px; }

.book-about { padding: 88px 0 100px; }
.book-about-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 38px; }
.book-about-copy { max-width: 44em; }
.book-about-copy a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------- reading page */
.reading { padding: 56px 0 30px; }
.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 54px;
  justify-content: center;
}
.reading-column { min-width: 0; max-width: var(--measure); margin-inline: auto; }

.chapter-head { margin-bottom: 46px; }
.chapter-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.chapter-eyebrow a { color: var(--teal); }
.chapter-eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
.chapter-head h1 {
  margin-top: 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(35px, 4.6vw, 50px);
  line-height: 1.07;
  letter-spacing: -.025em;
  text-wrap: balance;
}

/* Prose. Target measure is ~65–78 characters. */
.prose-book {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.66;
}
.prose-book p { margin-top: 1.05em; }
.prose-book > p:first-child { margin-top: 0; }
.prose-book h2 {
  margin: 2.4em 0 .9em;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--teal);
  scroll-margin-top: 90px;
}
.prose-book h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 1.5px;
  margin-top: 13px;
  background: var(--line-dark);
}
.prose-book em { font-style: italic; }
.prose-book strong { font-weight: 600; }

/* ------------------------------------------------------- documentary devices */
.device {
  margin: 2.1em 0;
  padding: 20px 24px;
  background: var(--paper-2);
  border: 1px solid var(--line-dark);
  border-left: 2.5px solid var(--blue);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-2);
}
.device-label {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.5;
  text-transform: uppercase;
}
.device-body > p + p { margin-top: .8em; }
.device-field {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.device-bullets { margin: .7em 0 .2em; padding-left: 1.15em; list-style: disc; }
.device-bullets li { margin-top: .42em; }
.device-bullets li::marker { color: var(--faint); }
.device-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.device-options li {
  padding: 8px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.device-optionset { border-left-color: var(--line-dark); }
/* A label with no body: a stamp standing on its own. */
.device-stamp { padding: 15px 22px; }
.device-stamp .device-label { margin: 0; padding: 0; border-bottom: 0; }

/* ------------------------------------------------------------------- notes */
.note-ref { font-size: .62em; line-height: 0; vertical-align: super; }
.note-ref a {
  color: var(--teal);
  font-family: var(--sans);
  font-weight: 600;
  padding: 0 .5px;
}
.note-ref a:hover, .note-ref a:focus-visible { text-decoration: underline; }
.notes {
  margin-top: 62px;
  padding-top: 30px;
  border-top: 1px solid var(--line-dark);
}
.notes h2 {
  margin-bottom: 20px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}
.notes-list { counter-reset: note; }
.notes-list li {
  counter-increment: note;
  position: relative;
  margin-top: 13px;
  padding-left: 34px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
  scroll-margin-top: 90px;
  overflow-wrap: break-word;
}
.notes-list li::before {
  content: counter(note) ".";
  position: absolute;
  left: 0;
  width: 26px;
  text-align: right;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.notes-list li:target { color: var(--ink); }
.notes-list li:target::before { color: var(--teal); font-weight: 700; }
.notes-list a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.notes-list a:hover { color: var(--teal); }
.note-back { margin-left: 5px; text-decoration: none; color: var(--teal); white-space: nowrap; }
.note-back span { font-size: .8em; vertical-align: super; }
.note-back:hover { text-decoration: underline; }

/* -------------------------------------------------------- chapter navigation */
.chapter-nav {
  margin-top: 66px;
  padding-top: 26px;
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 22px;
  align-items: start;
}
.chapter-nav a { display: block; font-size: 13px; }
.chapter-nav-next { text-align: right; }
.chapter-nav-toc {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chapter-nav-toc:hover { color: var(--teal); }
.nav-dir {
  display: block;
  color: var(--faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nav-title {
  display: block;
  margin-top: 6px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.28;
}
.chapter-nav a:hover .nav-title, .chapter-nav a:focus-visible .nav-title { color: var(--teal); }

/* --------------------------------------------------------------- chapter TOC */
.chapter-toc {
  margin-bottom: 44px;
  padding: 18px 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.chapter-toc-title {
  margin-bottom: 11px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.chapter-toc ol { counter-reset: sec; }
.chapter-toc li { margin-top: 7px; }
.chapter-toc a {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
}
.chapter-toc a:hover, .chapter-toc a:focus-visible { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1180px) {
  .reading-layout {
    grid-template-columns: 232px minmax(0, var(--measure));
    justify-content: center;
    gap: 76px;
  }
  .chapter-toc {
    position: sticky;
    top: 92px;
    align-self: start;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    margin-bottom: 0;
    padding: 0 18px 0 0;
    background: none;
    border: 0;
    border-right: 1px solid var(--rule);
    border-radius: 0;
  }
  .reading-column { margin-inline: 0; }
  /* Pages with no in-page TOC (part openers, the bibliography) have no
     sidebar to fill, so they use a single centred column instead of
     leaving the text in the 232px sidebar track. */
  .reading--notoc .reading-layout { grid-template-columns: minmax(0, var(--measure)); }
  .reading--notoc .reading-column { margin-inline: auto; }
}

/* ------------------------------------------------------------------- focus */
/* site.css clears outlines on some controls; reading pages state their own. */
.book-body a:focus-visible,
.book-body summary:focus-visible,
.book-body button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}
.book-body .note-ref a:focus-visible { outline-offset: 1px; }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 900px) {
  .book-hero-grid { grid-template-columns: 232px minmax(0, 1fr); gap: 44px; }
  .book-about-grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 700px) {
  .book-hero-grid { grid-template-columns: 1fr; padding: 58px 0 54px; gap: 34px; }
  .book-hero-cover { max-width: 216px; }
  .book-contents { padding: 66px 0; }
  .book-toc a { grid-template-columns: 1fr; gap: 5px; padding: 15px 8px; }
  .toc-part a { padding: 18px 8px; }
  .reading { padding: 38px 0 20px; }
  .prose-book { font-size: 18.5px; line-height: 1.64; }
  .device { padding: 17px 18px; font-size: 14px; }
  .chapter-nav { grid-template-columns: 1fr; gap: 20px; }
  .chapter-nav-next { text-align: left; }
  .chapter-nav-toc { justify-self: start; }
}
@media (max-width: 420px) {
  .prose-book { font-size: 18px; }
  .device { padding: 15px 15px; }
  .device-options { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .book-toc a, .chapter-nav a { transition: none; }
}

/* ------------------------------------------------------------------- print */
@media print {
  .site-header, .site-footer, .skip-link, .chapter-toc,
  .chapter-nav, .book-hero-actions { display: none !important; }
  .book-body { --measure: 100%; }
  .reading { padding: 0; }
  .page-width { width: 100%; }
  .reading-column { max-width: 100%; }
  .prose-book { font-size: 11.5pt; line-height: 1.5; }
  .chapter-head h1 { font-size: 22pt; }
  .prose-book h2 { break-after: avoid; page-break-after: avoid; font-size: 9pt; }
  .device {
    break-inside: avoid;
    page-break-inside: avoid;
    background: none;
    border: 1px solid #999;
    border-left: 2pt solid #333;
    font-size: 9.5pt;
  }
  .notes { break-before: auto; }
  .notes-list li { break-inside: avoid; page-break-inside: avoid; font-size: 9pt; }
  .note-back { display: none; }
  a { color: inherit; text-decoration: none; }
}

/* ===========================================================================
   Practical Philosophy — additions to the shared book styles above.
   Everything here layers on .book-body / .prose-book; no tokens are redefined.
   =========================================================================== */

/* Threshold observation: the chapter's governing sentence, set as a quiet
   epigraph between the title and the first section. Not a pull quote. */
.threshold {
  margin: 0 0 2.6em;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--teal);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.02em;
  font-style: italic;
  line-height: 1.5;
}
.prose-book > .threshold:first-child { margin-top: 0; }

/* --------------------------------------------------------------- PP boxes */
.ppbox {
  margin: 2.2em 0;
  padding: 20px 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 2.5px solid var(--blue);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-2);
}
.ppbox-title {
  margin-bottom: 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--rule);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
}
.ppbox-body > p + p { margin-top: .85em; }
.ppbox-body em { font-style: italic; }

/* Term — definition lines. The source supplies the bold term and the em dash;
   this only gives the pair a hanging indent so the term reads as a term. */
.ppbox-term { padding-left: 1.15em; text-indent: -1.15em; }
.ppbox-term strong { font-weight: 650; color: var(--ink); }

/* The eight box types are distinguished by the type name printed in the title.
   The accent is a secondary cue only; no meaning rests on colour alone. */
.ppbox--myth-vs-reality      { border-left-color: var(--rust); }
.ppbox--myth-vs-reality .ppbox-title { color: var(--rust); }
.ppbox--paradox              { border-left-color: var(--plum); }
.ppbox--paradox .ppbox-title { color: var(--plum); }
.ppbox--counter-inquiry      { border-left-color: var(--teal); }
.ppbox--counter-inquiry .ppbox-title { color: var(--teal); }
.ppbox--friction-point       { border-left-color: var(--gold); }
.ppbox--friction-point .ppbox-title { color: var(--gold); }
.ppbox--diagnostic, .ppbox--critical-distinction { border-left-color: var(--blue); }

/* ------------------------------------------------------------ part openers */
.reading--part .reading-column { padding-top: 12px; }
.reading--part .chapter-head { margin-bottom: 40px; }
.reading--part .chapter-head h1 { font-size: clamp(40px, 5.6vw, 60px); }
.reading--part .prose-book { font-size: 21px; }
.reading--part .prose-book p { margin-top: 1.15em; }

/* ------------------------------------------------------------ numbered list */
.question-list {
  margin: 1.2em 0;
  padding-left: 0;
  list-style: none;
  counter-reset: q;
}
.question-list li {
  counter-increment: q;
  position: relative;
  margin-top: .85em;
  padding-left: 2.1em;
}
.question-list li::before {
  content: counter(q) ".";
  position: absolute;
  left: 0;
  width: 1.6em;
  text-align: right;
  color: var(--faint);
  font-family: var(--sans);
  font-size: .82em;
  font-variant-numeric: tabular-nums;
}

/* Appendix A cross-references into the book */
.appendix-refs {
  margin-top: .5em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
}
.appendix-refs a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- glossary */
.glossary-note {
  margin-bottom: 1.6em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
}
.glossary-letter {
  margin: 2.2em 0 .8em;
  scroll-margin-top: 90px;
}
.prose-book .glossary-letter::after { width: 26px; }
.glossary { margin: 0; }
.glossary dt {
  margin-top: 1.15em;
  font-family: var(--serif);
  font-size: 1.02em;
  font-weight: 600;
  scroll-margin-top: 90px;
}
.glossary dd {
  margin: .2em 0 0;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.62;
}
.chapter-toc--letters ol { display: flex; flex-wrap: wrap; gap: 4px 9px; }
.chapter-toc--letters li { margin-top: 0; }
.chapter-toc--letters a {
  display: inline-block;
  min-width: 1.5em;
  text-align: center;
  font-weight: 600;
}

/* ------------------------------------------------------------ bibliography */
.biblio { margin: 0; padding: 0; list-style: none; }
.biblio li {
  margin-top: .95em;
  padding-left: 1.6em;
  text-indent: -1.6em;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
.biblio a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.biblio a:hover { color: var(--teal); }

/* ---------------------------------------------------------- back-matter TOC */
.toc-back a { border-top-style: dashed; }
.toc-back .toc-title { font-size: 19px; }

@media (max-width: 700px) {
  .ppbox { padding: 17px 18px; font-size: 14px; }
  .threshold { padding-left: 15px; }
  .reading--part .prose-book { font-size: 19.5px; }
}

@media print {
  .ppbox {
    break-inside: avoid;
    page-break-inside: avoid;
    background: none;
    border: 1px solid #999;
    border-left: 2pt solid #333;
    font-size: 9.5pt;
  }
  .ppbox-title { color: #000; }
  .threshold { border-left: 1.5pt solid #666; color: #000; }
  .glossary dt { break-after: avoid; page-break-after: avoid; }
  .biblio li, .question-list li { break-inside: avoid; page-break-inside: avoid; }
}

/* ===========================================================================
   One Garden, Many Gardens — additions to the shared book styles above.
   Layers on .book-body / .prose-book; no shared tokens are redefined.
   =========================================================================== */

/* The Garden Principle / Madoq's Lesson / test boxes. One component, five
   labels; the label text carries the meaning, the accent is secondary. */
.gardenbox {
  margin: 2.2em 0;
  padding: 20px 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 2.5px solid var(--teal);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-2);
}
.gp-label {
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
}
.gp-title {
  margin: 9px 0 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
}
.gardenbox .gp-label + .gp-body { margin-top: 12px; }
.gp-body > p + p { margin-top: .85em; }
.gardenbox--madoq-s-lesson { border-left-color: var(--plum); }
.gardenbox--madoq-s-lesson .gp-label { color: var(--plum); }
.gardenbox--naked-king-test,
.gardenbox--memory-test { border-left-color: var(--blue); }
.gardenbox--naked-king-test .gp-label,
.gardenbox--memory-test .gp-label { color: var(--blue); }
.gardenbox--the-boundary { border-left-color: var(--rust); }
.gardenbox--the-boundary .gp-label { color: var(--rust); }

/* The book deliberately carries no note markers in its prose. Each chapter
   ends with one quiet pointer into the endnotes instead. */
.sources-link {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
}
.sources-link a { color: var(--teal); font-weight: 600; }
.sources-link a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sources-link span { margin-left: 4px; }

/* Endnotes: quoted anchor phrase, then the citation. */
.reading--endnotes .prose-book h2 {
  margin-top: 2.6em;
  scroll-margin-top: 90px;
}
.note-entry {
  padding-left: 1.5em;
  text-indent: -1.5em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: break-word;
}
.note-entry a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.note-entry a:hover { color: var(--teal); }

/* Bibliography: a long alphabetical list with hanging indents. */
.reading--list .prose-book > p {
  margin-top: .95em;
  padding-left: 1.6em;
  text-indent: -1.6em;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
.reading--list .prose-book > p.first {
  padding-left: 0;
  text-indent: 0;
  margin-bottom: 1.6em;
  color: var(--muted);
}
.reading--list .prose-book a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

/* Part openers, matching the other editions' treatment. */
.reading--part .chapter-head { margin-bottom: 40px; }
.reading--part .chapter-head h1 { font-size: clamp(40px, 5.6vw, 60px); }
.reading--part .prose-book { font-size: 21px; }

@media (max-width: 700px) {
  .gardenbox { padding: 17px 18px; font-size: 14px; }
  .gp-title { font-size: 17.5px; }
  .reading--part .prose-book { font-size: 19.5px; }
}

@media print {
  .gardenbox {
    break-inside: avoid;
    page-break-inside: avoid;
    background: none;
    border: 1px solid #999;
    border-left: 2pt solid #333;
    font-size: 9.5pt;
  }
  .gp-label, .gp-title { color: #000; }
  .sources-link { display: none; }
  .note-entry, .reading--list .prose-book > p {
    break-inside: avoid;
    page-break-inside: avoid;
    font-size: 9pt;
  }
}

/* ===========================================================================
   The Fall of Meaning — additions to the shared book styles above.
   Layers on .book-body / .prose-book; no shared tokens are redefined.
   =========================================================================== */

/* This is the first edition that needs three heading levels inside the prose.
   The shared .prose-book h2 rule above sets the top level; h3 and h4 step
   down in weight and colour rather than in size, so a dense reference page
   still reads as one hierarchy at the reading measure. */
.prose-book h3 {
  margin: 1.9em 0 .55em;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--ink);
  scroll-margin-top: 90px;
}
.prose-book h4 {
  margin: 1.5em 0 .45em;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
  scroll-margin-top: 90px;
}
.prose-book h3 + p, .prose-book h4 + p { margin-top: .3em; }

/* The book's one table (Chapter 2). Narrow screens scroll it rather than
   crushing three columns; the region is focusable so a keyboard can reach
   the scroll. */
.book-table {
  margin: 2.2em 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-2);
}
.book-table table {
  width: 100%;
  min-width: 30rem;
  /* The source sets the three columns to 33.3 / 33.3 / 33.4; auto layout gives
     the first column far less and wraps its heading to three lines. */
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}
.book-table th, .book-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.book-table th {
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-dark);
}
.book-table td { color: var(--ink-2); }
.book-table tbody tr:last-child th,
.book-table tbody tr:last-child td { border-bottom: 0; }
.book-table:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Appendix A is a reference catalog of about 180 short entries, not prose.
   It is set smaller and tighter so an entry can be scanned, and its long
   in-page contents list is allowed to scroll on its own. */
.reading--appendix .prose-book { font-size: 18px; line-height: 1.6; }
.reading--appendix .prose-book p { margin-top: .8em; }
.reading--appendix .chapter-toc a { font-size: 13px; }

/* The glossary sets each term as a section heading, so the terms carry the
   page's in-page contents. Capitalization is semantic — `Standing` is a
   defined term — so nothing here transforms their case. */
.reading--glossary .prose-book h2 {
  margin: 1.9em 0 .1em;
  font-family: var(--serif);
  font-size: 1.05em;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.reading--glossary .prose-book h2::after { display: none; }
.reading--glossary .prose-book > h2:first-child { margin-top: 0; }
.reading--glossary .prose-book h2 + p {
  margin-top: .45em;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.62;
}
/* The closing "See also … Read Chapter N" line of an entry. */
.reading--glossary .prose-book h2 + p + p {
  margin-top: .35em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
}
.reading--glossary .prose-book > p.first {
  margin-bottom: 1.8em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.62;
}

@media (max-width: 700px) {
  .book-table table { font-size: 13.5px; }
  .book-table th, .book-table td { padding: 10px 13px; }
  .reading--appendix .prose-book { font-size: 17px; }
}

@media print {
  .book-table { break-inside: avoid; page-break-inside: avoid; overflow: visible; }
  .book-table table { font-size: 9pt; }
  .book-table th { color: #000; }
  .prose-book h3, .prose-book h4 {
    break-after: avoid;
    page-break-after: avoid;
    color: #000;
  }
  .reading--glossary .prose-book h2 { break-after: avoid; page-break-after: avoid; }
}