/* chapter-book.css: the book's own look on the chapter pages and the contents page of the book online (read/).
   The design of the book online (20 Nov 2026), with its dark frame. Loaded after chapter-dress.css; colors from assets/tokens.css.
   Layout only: no word of a chapter is added, cut or moved by these rules. The chapter opener as printed (item 4)
   is in assets/chapter-opener.css, which went live with the printed opener in build 44. */

/* ---- the chapter head: roundel, title, years; the edition line is at the foot (items 3, 5, 12) ---- */
header.chx-hero { padding-top: 1.3rem; padding-bottom: 1.6rem; }
header.chx-hero .chx-roundel { display: block; width: 96px; height: auto; aspect-ratio: 120 / 116; margin: 0 auto 0.7rem; }
html body header.chx-hero:not(#_):not(#__) h1:not(#_) { font-family: var(--bk-font-display) !important; font-weight: 700; letter-spacing: 0.005em; text-wrap: balance; }
header.chx-hero:has(.chx-fleuron):not(#_) h1:not(#_)::after { content: none !important; display: none !important; }   /* the oak fleuron replaces the diamond rule */
header.chx-hero .chx-fleuron { display: block; width: 120px; height: auto; margin: 0.85rem auto 0; opacity: 0.9; }
header.chx-hero .stx-brow { margin-bottom: 0.9rem; }
@media (max-width: 760px) {
  header.chx-hero { padding-top: 0.9rem; padding-bottom: 1.1rem; }
  header.chx-hero .stx-brow { margin-bottom: 0.6rem; }
  header.chx-hero .chx-roundel { width: 64px; margin-bottom: 0.45rem; }
  header.chx-hero .chx-fleuron { width: 96px; margin-top: 0.55rem; }
}
.bk-wrap.chx p.chx-edition { margin: 2.4rem 0 0; padding-top: 0.9rem; border-top: 1px solid rgba(190, 150, 70, 0.45); font-family: var(--bk-font-ui); font-size: 0.82rem; line-height: 1.5; color: #5a4c38; }
.bk-wrap.chx p.chx-edition a { color: inherit; }
html.theme-dark .bk-wrap.chx p.chx-edition { color: #c8b896; }

/* ---- reading size and measure (item 8): 18 px on a phone; 19.5 px and a 33 em column on a desktop (62-70 characters) ---- */
main.bk-wrap.chx { --chx-fs: 18px; font-size: var(--chx-fs); max-width: 33em; color: var(--bk-ink); }
@media (min-width: 761px) { main.bk-wrap.chx { --chx-fs: 19.5px; } }
html.brx-size-1 main.bk-wrap.chx { font-size: calc(var(--chx-fs) * 1.12); }
html.brx-size-2 main.bk-wrap.chx { font-size: calc(var(--chx-fs) * 1.25); }
/* the same factor for sizes set in rem inside the chapter column (rem is counted from the page, which the buttons do not change) */
main.bk-wrap.chx { --brx-k: 1; }
html.brx-size-1 main.bk-wrap.chx { --brx-k: 1.12; }
html.brx-size-2 main.bk-wrap.chx { --brx-k: 1.25; }
.bk-wrap.chx p.chx-lead { font-size: 1.14em; }
html.theme-dark main.bk-wrap.chx { color: #e9dfc8; }

/* ---- figures (item 21): old-style figures in running text, lining tabular figures in tables; true small caps ---- */
main.bk-wrap.chx p, main.bk-wrap.chx li, main.bk-wrap.chx figcaption { font-variant-numeric: oldstyle-nums proportional-nums; }
main.bk-wrap.chx table, main.bk-wrap.chx .chx-v, main.bk-wrap.chx sup, main.bk-wrap.chx .stx-pills { font-variant-numeric: lining-nums tabular-nums; }
/* note numbers: raised without opening the line, so every line of a paragraph stands the same distance apart */
main.bk-wrap.chx sup { line-height: 0; font-size: 0.72em; vertical-align: baseline; position: relative; top: -0.45em; }
main.bk-wrap.chx sup a { font-size: inherit; }

/* ---- captions and frames as in the book (item 13) ---- */
.bk-wrap.chx figure figcaption > b:first-child { font-variant-caps: all-small-caps; letter-spacing: 0.05em; font-weight: 700; color: var(--bk-accent); }
.bk-wrap.chx figure figcaption { font-style: normal; color: var(--bk-ink); }
.bk-wrap.chx figure figcaption .credit { display: block; margin-top: 0.3rem; font-size: 0.86em; color: var(--bk-ink-soft); }
.bk-wrap.chx figure[data-doc] img { outline: 0.5pt solid var(--bk-frame); outline-offset: 0; }
.bk-wrap.chx figure img { display: block; margin-left: auto; margin-right: auto; }
.bk-wrap.chx figure a.fig-full { display: block; cursor: zoom-in; }
.bk-wrap.chx figure a.fig-full:focus-visible { outline: 2px solid var(--bk-focus); outline-offset: 3px; }

/* ---- tables rule-only, as in print (item 23): a rule above and below the head row and at the foot, no boxes ---- */
.bk-wrap.chx table { border: 0; border-top: 1.2px solid var(--bk-ink); border-bottom: 1.2px solid var(--bk-ink); border-radius: 0; background: transparent; }
.bk-wrap.chx th { background: transparent; border: 0; border-bottom: 0.8px solid var(--bk-ink); color: var(--bk-ink); font-variant-caps: all-small-caps; text-transform: none; letter-spacing: 0.05em; font-size: 0.86rem; }
.bk-wrap.chx td { border: 0; border-top: 0.5px solid var(--bk-rule-light); }
.bk-wrap.chx tr:first-child td { border-top: 0; }
.bk-wrap.chx td.num, .bk-wrap.chx th.num { text-align: right; }
html.theme-dark .bk-wrap.chx table { background: transparent; border-color: #c8b896; }
html.theme-dark .bk-wrap.chx th { background: transparent; color: #f6f1e7; border-bottom-color: #c8b896; }
html.theme-dark .bk-wrap.chx td { border-top-color: rgba(200, 184, 150, 0.28); }

/* ---- the growing oak at the end of a chapter (item 12): at the printed proportion, a third of the text line; every
   stage at the one scale of the drawings, never a common height, so the acorn stays small. No counter, no movement.
   The last reading page closes with the full tree, larger ---- */
.bk-wrap.chx p.chx-tail { margin: 2.8rem auto 1.2rem; text-align: center; }
.bk-wrap.chx p.chx-tail img { display: inline-block; width: clamp(168px, 43vw, 220px); max-width: 100%; height: auto; }
.bk-wrap.chx p.chx-tail.chx-tail-end img { width: clamp(240px, 61.5vw, 300px); }
html.theme-dark .bk-wrap.chx p.chx-tail img { filter: invert(0.88) sepia(0.35) saturate(1.4) hue-rotate(5deg); }

/* ---- maps and record images in the dark theme (item 16): never inverted; a thin gilt rule and a darker mat ---- */
html.theme-dark .bk-wrap.chx figure.fig, html.theme-dark .bk-wrap.chx figure.map, html.theme-dark .bk-wrap.chx figure.subart { background: #101826; border-color: rgba(216, 179, 102, 0.55); }
html.theme-dark .bk-wrap.chx figure img { filter: none; outline: 1px solid rgba(216, 179, 102, 0.6); outline-offset: 0; }

/* ---- small print and the whites of the pictures (24 Nov 2026) ----
   1. Captions, credits and notes follow the reader's text size (the two A buttons): their sizes are counted from the
      chapter text (em), with a floor (15 px for a caption, 14 px for a credit, 11 px for a note number), which grows with the
      buttons too. Every other size in the chapter column
      is rem times --brx-k, which is 1 at the default size, so nothing there moves; small words rise to 14 px. The
      reading bar, the pill rows, the grade-key buttons and the links to the chapters before and after keep their size.
   2. Light theme: the mat round a picture is the paper of the printed maps, and white inside a picture takes the tone
      behind it (multiply). Dark theme: pictures are dimmed and warmed, never inverted; a chart drawn as SVG lies on the
      same dimmed paper. The full-size view shows every picture as it is.
   3. On a phone, a line under each map that opens full size says so. It is drawn by the style sheet, so it is not
      part of the page's text or of the search, and the link keeps its spoken name.
   Screen only: a printed chapter is set by chapter-paper.css. */
@media screen {
  /* 1. captions, credits, notes */
  .bk-wrap.chx figure figcaption:not(#_) { font-size: max(0.87em, calc(0.9375rem * var(--brx-k))); line-height: 1.5; }
  .bk-wrap.chx figure figcaption :is(.credit, .book-credit):not(#_),
  .bk-wrap.chx figure.fig.fig-offline .fig-offline-note:not(#_) { font-size: max(0.9em, calc(0.875rem * var(--brx-k))); line-height: 1.45; }
  .bk-wrap.chx :is(figcaption, table) sup.en a:not(#_) { font-size: max(0.75em, calc(11px * var(--brx-k))); }
  /* everything else in the chapter column follows the buttons */
  .bk-wrap.chx p.chx-chlabel:not(#_) { font-size: calc(1.05rem * var(--brx-k)); }
  .bk-wrap.chx .chx-toc:not(#_) { font-size: calc(0.98rem * var(--brx-k)); }
  .bk-wrap.chx .chx-brief p.chx-brief-title:not(#_) { font-size: calc(1.5rem * var(--brx-k)); }
  .bk-wrap.chx .chx-brief p.chx-row > b:first-child:not(#_) { font-size: calc(0.76rem * var(--brx-k)); }
  .bk-wrap.chx h3[id]:not(#_) { font-size: calc(1.52rem * var(--brx-k)); }
  .bk-wrap.chx .chx-fold h3:not(#_) { font-size: calc(1.2rem * var(--brx-k)); }
  .bk-wrap.chx details.chx-fold > summary h2:not(#_) { font-size: calc(1.18rem * var(--brx-k)); }
  .bk-wrap.chx details.chx-fold > summary small:not(#_) { font-size: calc(0.875rem * var(--brx-k)); }
  .bk-wrap.chx details.chx-fold.bk-notes:not(#_) { font-size: calc(0.9rem * var(--brx-k)); }
  .bk-wrap.chx details.chx-fold > p.bk-summary-note:not(#_) { font-size: calc(0.875rem * var(--brx-k)); }
  .bk-wrap.chx .bk-fuller :is(.fa-src, ol.fa-src):not(#_) { font-size: calc(0.875rem * var(--brx-k)); }
  .bk-wrap.chx p.tbl-title:not(#_) { font-size: calc(1rem * var(--brx-k)); }
  .bk-wrap.chx table:not(#_) { font-size: calc(0.9rem * var(--brx-k)); }
  .bk-wrap.chx table th:not(#_) { font-size: calc(0.875rem * var(--brx-k)); }
  .bk-wrap.chx td .why:not(#_) { font-size: max(0.86em, calc(0.875rem * var(--brx-k))); }
  .bk-wrap.chx .chx-v:not(#_) { font-size: calc(0.75rem * var(--brx-k)); }
  .bk-wrap.chx p.chx-extras:not(#_) { font-size: calc(0.82rem * var(--brx-k)); }
  .bk-wrap.chx section.bk-supp:not(#_) { font-size: calc(0.93rem * var(--brx-k)); }
  .bk-wrap.chx section.bk-supp h2:not(#_) { font-size: calc(1.45rem * var(--brx-k)) !important; }   /* a site-wide heading rule sets 1.45rem !important */
  .bk-wrap.chx p.chx-edition:not(#_) { font-size: calc(0.875rem * var(--brx-k)); }
  @media (max-width: 760px) { .bk-wrap.chx h3[id]:not(#_) { font-size: calc(1.36rem * var(--brx-k)); } }
  @media (max-width: 640px) {
    html main.bk-wrap.chx table.tcard:not(#_):not(#_) > :is(tbody, tfoot) > tr > [data-th]::before { font-size: calc(0.75rem * var(--brx-k)); }
    html main.bk-wrap.chx table.tcard:not(#_):not(#_) > :is(tbody, tfoot) > tr > [data-th].tcard-long::before { font-size: calc(0.875rem * var(--brx-k)); }
  }

  /* 2. light theme: the mat, and white taking the tone behind it */
  html:not(.theme-dark) .bk-wrap.chx :is(figure.fig, figure.map.chart:has(> a.chart-box)):not(#_) { background: var(--bk-mat); }
  html:not(.theme-dark) .bk-wrap.chx figure img:not(#_) { mix-blend-mode: multiply; }
  html:not(.theme-dark) .bk-wrap.chx figure.map.chart .chart-pane:not(#_):not(#_) { background: var(--bk-paper); }
  html:not(.theme-dark) .bk-wrap.chx figure.map.chart .chart-pane > img:not(#_):not(#_) { background: transparent; mix-blend-mode: multiply; }
  /* dark theme: dimmed and warmed, never inverted */
  html.theme-dark .bk-wrap.chx figure img:not(#_) { filter: brightness(0.8) sepia(0.2); }
  /* a chart drawn as SVG: its paper panel becomes the dimmed paper and the chart is laid on it; caption and credit in one dark ink */
  html.theme-dark .bk-wrap.chx figure:has(> img[src$=".svg"]):not(#_) { background: var(--bk-mat-dim) !important; }
  html.theme-dark .bk-wrap.chx figure:has(> img[src$=".svg"]) > img:not(#_) { filter: none; mix-blend-mode: multiply; background: transparent !important; outline: 0; }
  html.theme-dark .bk-wrap.chx figure:has(> img[src$=".svg"]) > figcaption:not(#_):not(#_),
  html.theme-dark .bk-wrap.chx figure:has(> img[src$=".svg"]) > figcaption .credit:not(#_):not(#_) { color: var(--bk-ink-mat) !important; }
  /* the same chart in its own pane (the chart viewer's markup: a.chart-box > .chart-pane > img) on the navy mat */
  html.theme-dark .bk-wrap.chx figure.map.chart .chart-pane:not(#_):not(#_) { background: var(--bk-mat-dim); }
  html.theme-dark .bk-wrap.chx figure.map.chart .chart-pane > img:not(#_):not(#_) { filter: none; background: transparent; mix-blend-mode: multiply; }

  /* 3. on a phone: under a map that opens full size; the same look as the hint under a family chart */
  @media (max-width: 660px) {
    .bk-wrap.chx :is(figure.map:not(.chart), figure.fig[data-series="Map"]) > a.fig-full:not(#_) { text-decoration: none; }
    .bk-wrap.chx :is(figure.map:not(.chart), figure.fig[data-series="Map"]) > a.fig-full::after {
      content: "Tap the map to enlarge it."; content: "Tap the map to enlarge it." / "";
      display: block; margin-top: 0.5rem; text-align: left;
    }
  }
  .bk-wrap.chx :is(figure.map:not(.chart), figure.fig[data-series="Map"]) > a.fig-full::after,
  .bk-wrap.chx figure.map.chart .chart-hint:not(#_):not(#_) { font-size: max(0.78em, calc(0.875rem * var(--brx-k))); font-style: italic; line-height: 1.45; color: var(--bk-ink-soft); }
  .bk-wrap.chx figure.map.chart .chart-row:not(#_):not(#_) { font-size: inherit; }
  .bk-wrap.chx figure.map.chart .chart-cue:not(#_):not(#_) { font-size: 0.86rem; }
  html.theme-dark .bk-wrap.chx figure.map.chart .chart-hint:not(#_):not(#_) { color: var(--bk-ink-soft); }
}
/* more contrast set in the reader's system, or forced colours: pictures at full strength */
@media (prefers-contrast: more), (forced-colors: active) {
  html .bk-wrap.chx figure img:not(#_):not(#_), html .bk-wrap.chx figure.map.chart .chart-pane > img:not(#_):not(#_):not(#_) { filter: none; mix-blend-mode: normal; }
}

/* ---- the contents page: the roundel beside each chapter (item 3) ---- */
.rx-row a.rx-has-rnd { grid-template-columns: 2.5rem 40px minmax(0, 1fr); column-gap: 0.65rem; }
.rx-row .rx-rndw { display: block; width: 40px; padding-top: 0.15rem; }
.rx-row .rx-rnd { display: block; width: 40px; height: auto; aspect-ratio: 120 / 116; }
.rx-row .rx-rnd-d { display: none; }
html.theme-dark .rx-row .rx-rnd-l { display: none; }
html.theme-dark .rx-row .rx-rnd-d { display: block; }
@media (max-width: 760px) { .rx-row a.rx-has-rnd { grid-template-columns: 2rem 32px minmax(0, 1fr); column-gap: 0.5rem; } .rx-row .rx-rndw, .rx-row .rx-rnd { width: 32px; } }

@media print {
  header.chx-hero .chx-roundel { filter: none; }
  .bk-wrap.chx figure a.fig-full { cursor: auto; }
  html .bk-wrap.chx figure img:not(#_):not(#_) { filter: none; mix-blend-mode: normal; }
}

/* ---- the "Chapters" disclosure, first in the pill row, pinned left (21 Nov 2026);
   the pills scroll beside it and fade at the right edge instead of being cut mid-word ---- */
nav.stx-pills.chx-pillbar { display: flex; align-items: center; max-width: 76rem; margin: 0 auto; }
html body nav.stx-pills.chx-pillbar { max-width: none; }
nav.chx-pillbar .chx-chapwrap { flex: none; position: relative; padding: 6px 0.7rem 6px 1rem; border-right: 1px solid rgba(216, 179, 102, 0.45); }
nav.chx-pillbar > ul { flex: 1 1 auto; min-width: 0; justify-content: flex-start; align-items: center; padding: 8px 2rem 8px 0.8rem;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.2rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2.2rem), transparent); }
nav.chx-pillbar.chx-nopills > ul { display: none; }
nav.chx-pillbar.chx-nopills .chx-chapwrap { border-right: 0; }
nav.chx-pillbar > ul a, nav.chx-pillbar > ul .chx-return { box-sizing: border-box; display: flex; align-items: center; min-height: 32px; padding-top: 0; padding-bottom: 0; line-height: 1.2; }
nav.chx-pillbar details.chx-chapters > summary { box-sizing: border-box; min-height: 36px; padding-top: 0; padding-bottom: 0; line-height: 1.2; }
details.chx-chapters > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2rem; padding: 0.36rem 0.95rem; border: 1px solid var(--bk-gilt); border-radius: 999px; background: rgba(216, 179, 102, 0.14); color: #f6f1e7; font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
details.chx-chapters > summary::-webkit-details-marker { display: none; }
details.chx-chapters > summary::after { content: ""; width: 0.42em; height: 0.42em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.12em) rotate(45deg); }
details.chx-chapters[open] > summary { background: #d8b366; color: #141f30; }
details.chx-chapters > summary:focus-visible, .chx-chap-panel a:focus-visible, .chx-chap-close:focus-visible, nav.chx-pillbar .chx-return:focus-visible { outline: 2px solid #e8cd8a; outline-offset: 3px; }
.chx-chap-panel { position: absolute; left: 0.6rem; top: calc(100% + 0.25rem); z-index: 950; box-sizing: border-box; width: 24rem; max-width: calc(100vw - 1.2rem); max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; padding: 0.4rem 0 0.8rem; background: #fffaf0; color: #1c2a3f; border: 1px solid rgba(190, 150, 70, 0.7); border-top: 3px solid #d8b366; border-radius: 6px; box-shadow: 0 12px 32px rgba(20, 31, 48, 0.28); text-align: left; font-family: var(--bk-font-text); }
.chx-chap-top { display: none; }
details.chx-chapters p.chx-chap-part { margin: 0.75rem 1rem 0.25rem; padding: 0; border: 0; font-family: var(--bk-font-ui); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: #7a5514; line-height: 1.3; }
.chx-chap-panel ol { list-style: none; margin: 0; padding: 0; }
.chx-chap-panel li { margin: 0; }
nav.stx-pills .chx-chap-panel a { border: 0; border-radius: 0; white-space: normal; font-weight: 400; background: transparent; display: flex; gap: 0.55rem; align-items: baseline; min-height: 24px; padding: 0.3rem 1rem; color: #1c2a3f; text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
nav.stx-pills .chx-chap-panel a .n { flex: 0 0 1.6rem; text-align: right; color: #8a6420; font-variant-numeric: lining-nums tabular-nums; }
nav.stx-pills .chx-chap-panel a:hover { background: rgba(216, 179, 102, 0.18); }
nav.stx-pills .chx-chap-panel a[aria-current="page"] { color: #1c2a3f; background: rgba(216, 179, 102, 0.28); font-weight: 700; box-shadow: inset 3px 0 0 #8a6420; }
.chx-chap-all { margin: 0.6rem 0 0; padding: 0.55rem 0 0; border-top: 1px solid rgba(190, 150, 70, 0.45); }
nav.stx-pills .chx-chap-all a { font-weight: 700; }
html.theme-dark .chx-chap-panel { background: #1f2e45; color: #f6f1e7; border-color: rgba(216, 179, 102, 0.5); }
html.theme-dark nav.stx-pills .chx-chap-panel a, html.theme-dark nav.stx-pills .chx-chap-panel a[aria-current="page"] { color: #f6f1e7; }
html.theme-dark details.chx-chapters p.chx-chap-part, html.theme-dark nav.stx-pills .chx-chap-panel a .n { color: #d8b366; }
@media (max-width: 699px) {
  nav.chx-pillbar .chx-chapwrap { position: static; padding: 4px 0.7rem; }
  details.chx-chapters > summary { min-height: 44px; }
  .chx-chap-panel { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 2147483000; width: auto; max-width: none; max-height: none; border-radius: 0; border-left: 0; border-right: 0; }
  details.chx-chapters[data-js] .chx-chap-top { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -0.4rem; margin: -0.4rem 0 0; padding: 0.5rem 1rem; background: inherit; border-bottom: 1px solid rgba(190, 150, 70, 0.45); font-weight: 700; z-index: 1; }
  .chx-chap-close { min-height: 44px; min-width: 44px; padding: 0 1rem; border: 1px solid #8a6420; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
  nav.stx-pills .chx-chap-panel a { min-height: 44px; align-items: center; }
  nav.chx-pillbar > ul { padding-top: 4px; padding-bottom: 4px; padding-left: 0.6rem; }
  nav.chx-pillbar > ul a, nav.chx-pillbar > ul .chx-return, nav.chx-pillbar details.chx-chapters > summary { min-height: 44px; }
}
html.chx-lock, html.chx-lock body { overflow: hidden; }
html.chx-lock .theme-toggle-fab, html.chx-lock .brx-resume { display: none !important; }
@media (max-width: 699px) { html.chx-lock .site-nav-shared, html.chx-lock .cknz-toggle, html.chx-lock [class*="cknz"] { visibility: hidden !important; } }
@media print { details.chx-chapters, nav.chx-pillbar .chx-chapwrap { display: none !important; } }
/* the pill row's own link colours (start-page.css: colour and -webkit-text-fill-color, some !important) do not reach the menu */
html body nav.stx-pills .chx-chap-panel a:not(#_):not(#__), html body nav.stx-pills .chx-chap-panel .chx-chap-top:not(#_) { color: #1c2a3f !important; -webkit-text-fill-color: #1c2a3f !important; }
html body nav.stx-pills .chx-chap-panel a:not(#_):not(#__) .n, html body nav.stx-pills details.chx-chapters p.chx-chap-part:not(#_) { color: #7a5514 !important; -webkit-text-fill-color: #7a5514 !important; }
html body nav.stx-pills .chx-chap-panel .chx-chap-close:not(#_) { color: #1c2a3f !important; -webkit-text-fill-color: #1c2a3f !important; }
html.theme-dark body nav.stx-pills .chx-chap-panel a:not(#_):not(#__), html.theme-dark body nav.stx-pills .chx-chap-panel .chx-chap-top:not(#_), html.theme-dark body nav.stx-pills .chx-chap-panel .chx-chap-close:not(#_) { color: #f6f1e7 !important; -webkit-text-fill-color: #f6f1e7 !important; }
html.theme-dark body nav.stx-pills .chx-chap-panel a:not(#_):not(#__) .n, html.theme-dark body nav.stx-pills details.chx-chapters p.chx-chap-part:not(#_) { color: #d8b366 !important; -webkit-text-fill-color: #d8b366 !important; }

/* ---- the lean chapter top: a shorter title band, a two-part trail, one chapter label,
   a slim tools row, and Previous / Next beside the Chapters button ---- */
@media screen {
  html body header.chx-hero:not(#_):not(#__) { padding-top: 1.5rem !important; padding-bottom: 1.2rem !important; }
  header.chx-hero .stx-brow { margin-bottom: 0.55rem; }
  header.chx-hero .chx-roundel { width: 60px; margin-bottom: 0.4rem; }
  header.chx-hero .chx-fleuron { width: 100px; margin-top: 0.5rem; }
  /* the trail keeps "Read the book / Chapter N"; the site name and the part stay for screen readers */
  header.chx-hero .stx-brow > a:first-child:not(:focus-visible),
  header.chx-hero .stx-brow > a:first-child:not(:focus-visible) + span:not([class]),
  header.chx-hero .stx-brow > .stx-brow-mid,
  header.chx-hero .stx-brow > .stx-brow-mid + span:not([class]) { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  main.bk-wrap.chx:not(#_) { padding-top: 0.7rem; }
  .bk-wrap.chx p.chx-chlabel.chx-label-said:not(#_) { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bk-wrap.chx .brx-bar:not(#_) { margin: 0.1rem 0 0.9rem; padding: 0.2rem 0; border-top: 0; font-size: 0.86rem; }
  .bk-wrap.chx .brx-bar button.brx-a:not(#_) { min-width: 1.8rem; height: 1.8rem; }
  .bk-wrap.chx .brx-bar button.brx-notes-btn:not(#_) { height: 1.8rem; }
}
@media screen and (max-width: 640px) {
  html body header.chx-hero:not(#_):not(#__) { padding-top: 1.1rem !important; padding-bottom: 0.9rem !important; }
  header.chx-hero .chx-roundel { width: 46px; margin-bottom: 0.3rem; }
  header.chx-hero .chx-fleuron { width: 84px; margin-top: 0.4rem; }
  .bk-wrap.chx .brx-bar button.brx-a:not(#_) { min-width: 2.75rem; height: 2.1rem; }
}
nav.chx-pillbar .chx-chapwrap.chx-has-step { display: flex; align-items: center; gap: 0.4rem; }
nav.stx-pills.chx-pillbar a.chx-step { display: inline-flex; align-items: center; gap: 0.35rem; box-sizing: border-box; min-height: 2rem; padding: 0.36rem 0.8rem; border: 1px solid rgba(216, 179, 102, 0.6); border-radius: 999px; background: transparent; color: #f6f1e7; font-size: 0.92rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
nav.stx-pills.chx-pillbar a.chx-step:hover { background: rgba(216, 179, 102, 0.2); }
nav.stx-pills.chx-pillbar a.chx-step:focus-visible { outline: 2px solid #e8cd8a; outline-offset: 3px; }
nav.stx-pills.chx-pillbar a.chx-step .chx-step-a { font-size: 1.15em; line-height: 1; }
@media (max-width: 699px) {
  nav.chx-pillbar .chx-chapwrap.chx-has-step { gap: 0.3rem; padding-left: 0.5rem; padding-right: 0.5rem; }
  nav.stx-pills.chx-pillbar a.chx-step { min-height: 44px; min-width: 44px; box-sizing: border-box; justify-content: center; padding: 0; }
  nav.stx-pills.chx-pillbar a.chx-step .chx-step-w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* in the dark theme the opening letter of a chapter is gilt, not cream (Jed, 26 Nov 2026) */
html.theme-dark .bk-wrap.chx p.chx-lead:not(.chx-nodrop):not(#_)::first-letter { color: #d8b366; }
/* the chapter text in the book's own face where the device has it (Apple devices); Source Serif 4 elsewhere
   (Jed's card, 26 Nov 2026: "Iowan where the device has it") */
html body main.bk-wrap.chx:not(#_) { --bk-font-text: "Iowan Old Style", "Source Serif 4", "Palatino Linotype", Georgia, serif; font-family: var(--bk-font-text); }
html body nav.stx-pills details.chx-chapters[open] > summary:not(#_) { color: #141f30 !important; -webkit-text-fill-color: #141f30 !important; }

/* ---- one bar while reading (24 Nov 2026): once the book bar is held at the top, the site's header goes up out of the way
   while the reader reads down and comes back on the way up, on focus and near the top. assets/book-reader.js sets the
   class chx-solo on <html> (and --chx-barh, the book bar's height); without the script both bars stay as they are.
   A transform and a sticky offset only: no line of the text moves. ---- */
html { --chx-top: var(--stx-navh, 0px); }
html.chx-solo { --chx-top: 0px; }
body:has(nav.chx-pillbar) .site-nav-shared { transition: transform 0.2s ease; }
html.chx-solo body .site-nav-shared { transform: translateY(-100%); box-shadow: none; }
/* the site search is held at the top on its own (assets/site-search.js); it goes up with the header */
body:has(nav.chx-pillbar) .cknz-q { transition: transform 0.2s ease; }
html.chx-solo body:has(nav.chx-pillbar) .cknz-q { transform: translateY(calc(-100% - var(--stx-navh, 56px))); }
html body nav.stx-pills.chx-pillbar { top: var(--chx-top); transition: top 0.2s ease; }
@media (min-width: 1120px) { html.brx-panel-on body .brx-panel:not(#_) { top: var(--chx-top); transition: top 0.2s ease; } }
@media (prefers-reduced-motion: reduce) { body:has(nav.chx-pillbar) .site-nav-shared, body:has(nav.chx-pillbar) .cknz-q, html body nav.stx-pills.chx-pillbar, html.brx-panel-on body .brx-panel:not(#_) { transition: none; } }
/* a place reached by a link stands 12 px below both bars (and lower still while the header is away) */
html:not(#_):not(#__) body:has(nav.chx-pillbar) [id]:not(.stx-sec, nav, header), html:not(#_):not(#__) body:has(nav.chx-pillbar) main.chx :where(a[href], button, summary, [tabindex]) { scroll-margin-top: calc(var(--stx-navh, 3.5rem) + var(--chx-barh, 4.2rem) + 12px); }
/* the controls of the two bars are held at the top already: focusing one must not scroll the page */
html:not(#_):not(#__) body:has(nav.chx-pillbar) :is(.site-nav-shared, nav.chx-pillbar) :where(a[href], button, summary, input, [tabindex]) { scroll-margin-top: 0; }
/* "Back to your place": first in the row while a place is kept, in the outline of the other links */
nav.chx-pillbar .chx-return { gap: 0.35rem; margin: 0; padding-left: 0.95rem; padding-right: 0.95rem; border: 1px solid var(--bk-gilt); border-radius: 999px; background: transparent; color: #f6f1e7; font: inherit; font-size: 0.92rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
nav.chx-pillbar .chx-return:hover { background: rgba(216, 179, 102, 0.12); }
.chx-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
