/* Psychopathia Machinalis — Book reader (chapter edition and landing).
 *
 * Source for the content-hashed /book/reader.<hash>.css that
 * scripts/build_book_routes.py emits. Loaded after /css/site-nav.css and
 * before /css/site-theme.css, which owns the --pm-* tokens and wins at equal
 * specificity; every rule here is scoped under .book-route-body so the
 * cascade is decided by specificity, not by luck.
 *
 * Voice: Charter carries the book (titles, running heads, contents, prose);
 * Poppins is reserved for controls, labels and metadata. Brass is a hairline
 * and a numeral, never a fill. Ink navy is the frame.
 */

@font-face { font-family: "Charter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Charter/charter_regular.woff2") format("woff2"); }
@font-face { font-family: "Charter"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/Charter/charter_italic.woff2") format("woff2"); }
@font-face { font-family: "Charter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/Charter/charter_bold.woff2") format("woff2"); }
@font-face { font-family: "Charter"; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/Charter/charter_bold_italic.woff2") format("woff2"); }

/* ------------------------------------------------------------------ */
/* 1. Book-scoped tokens (derived from the house --pm-* palette)        */
/* ------------------------------------------------------------------ */
.book-route-body {
  --bk-nav-h: var(--pm-nav-h, 64px); /* exported by css/site-theme.css; the bar is border-box */
  --bk-serif: "Charter", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --bk-sans: var(--pm-font, "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --bk-mono: "Fira Code", "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --bk-measure: 42rem;
  --bk-rail-w: 17.5rem;
  --bk-gutter: clamp(1.25rem, 4vw, 3.5rem);
  --bk-ink: var(--pm-ink, #0f1c2e);
  --bk-text: var(--pm-text, #1c2a3a);
  --bk-text-2: var(--pm-text-2, #3f4f61);
  --bk-muted: var(--pm-text-muted, #55657a);
  --bk-brass: var(--pm-brass, #b8862b);
  --bk-brass-text: var(--pm-brass-text, #7d5a17);
  --bk-brass-line: var(--pm-brass-line, rgba(184, 134, 43, 0.45));
  --bk-canvas: var(--pm-canvas, #f4f6f9);
  --bk-paper: #fffdfa;
  --bk-paper-dim: #f7f4ee;
  --bk-line: var(--pm-border, #e2e8ef);
  --bk-line-strong: var(--pm-border-strong, #c9d3dd);
  --bk-on-ink: var(--pm-on-ink, #f3f6fa);
  --bk-on-ink-2: var(--pm-on-ink-2, rgba(243, 246, 250, 0.76));
  --bk-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --bk-shadow-plate: 0 1px 2px rgba(15, 28, 46, 0.06), 0 24px 48px -28px rgba(15, 28, 46, 0.45);
  --bk-focus: 0 0 0 3px rgba(184, 134, 43, 0.45);
}
html.dark .book-route-body {
  --bk-paper: #121c2b;
  --bk-paper-dim: #17233a;
  --bk-shadow-plate: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 48px -24px rgba(0, 0, 0, 0.8);
}

/* ------------------------------------------------------------------ */
/* 2. Shell                                                             */
/* ------------------------------------------------------------------ */
.book-route-body.has-site-nav { padding-top: var(--bk-nav-h); }
.book-route-body { margin: 0; background: var(--bk-canvas); color: var(--bk-text); font-family: var(--bk-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.book-route-body *:focus-visible { outline: 2px solid var(--bk-brass); outline-offset: 2px; }

/* Skip link: above the fixed nav, inset as a deliberate chip. */
.book-route-body .skip-link { position: fixed; top: .75rem; left: 1rem; z-index: 2000; padding: .65rem 1.1rem; border-radius: 999px; background: var(--bk-ink); color: var(--bk-on-ink); font-family: var(--bk-sans); font-size: .85rem; font-weight: 600; text-decoration: none; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .6); transform: translateY(-300%); transition: transform .15s var(--bk-ease); }
.book-route-body .skip-link:focus, .book-route-body .skip-link:focus-visible { transform: translateY(0); outline: 3px solid var(--bk-brass); outline-offset: 2px; }

/* Reading progress: a brass hairline pinned under the nav. */
.book-progress { position: fixed; top: var(--bk-nav-h); left: 0; right: 0; z-index: 1000; height: 2px; background: transparent; pointer-events: none; }
.book-progress__bar { display: block; height: 100%; width: 100%; background: var(--bk-brass); transform: scaleX(0); transform-origin: 0 50%; transition: transform .12s linear; }

/* Running head: appears once the chapter title has scrolled off. */
.book-runhead { position: fixed; top: var(--bk-nav-h); left: 0; right: 0; z-index: 900; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; box-sizing: border-box; min-height: 44px; padding: .35rem var(--bk-gutter); border-bottom: 1px solid var(--bk-line); background: color-mix(in srgb, var(--bk-paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s var(--bk-ease), transform .2s var(--bk-ease); }
.book-route-body.is-past-title .book-runhead { opacity: 1; transform: none; pointer-events: auto; }
.book-runhead__title { display: flex; align-items: baseline; gap: .75rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--bk-serif); font-size: .95rem; color: var(--bk-text); }
.book-runhead__book { color: var(--bk-muted); font-style: italic; }
.book-runhead__chapter { overflow: hidden; text-overflow: ellipsis; }
.book-runhead__nav { display: flex; gap: .25rem; }
.book-runhead__nav a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; color: var(--bk-text-2); text-decoration: none; transition: background .15s var(--bk-ease), color .15s var(--bk-ease); }
.book-runhead__nav a:hover { color: var(--bk-text); background: var(--bk-paper-dim); }
.book-runhead__nav svg { width: 18px; height: 18px; }

.book-shell { display: grid; grid-template-columns: var(--bk-rail-w) minmax(0, 1fr); min-height: calc(100vh - var(--bk-nav-h)); }

/* ------------------------------------------------------------------ */
/* 3. Contents rail                                                     */
/* ------------------------------------------------------------------ */
.book-rail { position: sticky; top: var(--bk-nav-h); align-self: start; box-sizing: border-box; max-height: calc(100vh - var(--bk-nav-h)); overflow: auto; overscroll-behavior: contain; padding: 1.5rem 1rem 2.5rem 1.25rem; border-right: 1px solid var(--bk-line); background: var(--bk-canvas); scrollbar-width: thin; }
.book-rail > .book-rail__summary { display: none; }
.book-rail__head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: 0 .75rem .9rem; }
.book-rail__home { color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.book-rail__home:hover { color: var(--bk-text); }
.book-rail__part { margin: 1.1rem 0 .25rem; padding: 0 .75rem; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.book-rail__part:first-child { margin-top: 0; }
.book-route-toc { list-style: none; margin: 0; padding: 0; }
.book-route-toc li { margin: 0; padding: 0; }
.book-route-toc-child > a { padding-left: 1.5rem; font-size: .8rem; }
.book-route-toc a { position: relative; display: block; box-sizing: border-box; padding: .5rem .75rem; border-radius: 8px; color: var(--bk-text-2); font-family: var(--bk-sans); font-size: .84rem; line-height: 1.4; text-decoration: none; transition: background .15s var(--bk-ease), color .15s var(--bk-ease); }
.book-route-toc a:hover, .book-route-toc a:focus-visible { color: var(--bk-text); background: var(--bk-paper); }
.book-route-toc a[aria-current="page"] { color: var(--bk-text); background: var(--bk-paper); font-weight: 600; }
.book-route-toc a[aria-current="page"]::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: 0; width: 2px; border-radius: 2px; background: var(--bk-brass); }
.book-route-toc .book-route-toc-child > a[aria-current="page"]::before { left: .75rem; }
/* Section anchors of the current chapter, revealed beneath it. */
.book-rail__sections { list-style: none; margin: .1rem 0 .4rem; padding: 0 0 0 1.25rem; border-left: 1px solid var(--bk-line); }
.book-rail__sections li { margin: 0; }
.book-rail__sections a { padding: .32rem .75rem; color: var(--bk-muted); font-size: .78rem; line-height: 1.35; }
.book-rail__sections a:hover { color: var(--bk-text); background: transparent; }
.book-rail__sections a.is-active { color: var(--bk-brass-text); }
.book-rail__sections a.is-active::before { content: ""; position: absolute; top: .55rem; bottom: .55rem; left: -1px; width: 1px; background: var(--bk-brass); }
.book-rail__foot { margin-top: 1.25rem; padding: 1rem .75rem 0; border-top: 1px solid var(--bk-line); }
.book-complete-link { display: block; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .76rem; font-weight: 500; line-height: 1.45; text-decoration: none; }
.book-complete-link:hover { color: var(--bk-text); }
.book-complete-link small { display: block; margin-top: .15rem; color: var(--bk-text-2); font-size: .72rem; font-weight: 400; }

/* ------------------------------------------------------------------ */
/* 4. Reading column                                                    */
/* ------------------------------------------------------------------ */
.book-route-main { min-width: 0; box-sizing: border-box; padding: 0 var(--bk-gutter) 5rem; background: var(--bk-paper); }
.book-page { width: 100%; max-width: var(--bk-measure); margin: 0 auto; }

/* Reader bar: quiet, aligned to the reading column. */
.book-route-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .1rem; max-width: var(--bk-measure); min-height: 60px; margin: 0 auto; padding: .5rem 0; border-bottom: 1px solid var(--bk-line); }
.book-route-toolbar__crumb { display: flex; align-items: baseline; gap: .5rem; margin-right: auto; min-width: 0; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.book-route-toolbar__crumb a { color: inherit; text-decoration: none; }
.book-route-toolbar__crumb a:hover { color: var(--bk-text); }
.book-route-toolbar__crumb .sep { color: var(--bk-brass); }
.book-route-toolbar button, .book-rail__summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .6rem; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--bk-text-2); font-family: var(--bk-sans); font-size: .78rem; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s var(--bk-ease), color .15s var(--bk-ease), border-color .15s var(--bk-ease); }
.book-route-toolbar button:hover, .book-route-toolbar button:focus-visible, .book-rail__summary:hover { color: var(--bk-text); background: var(--bk-paper-dim); }
.book-route-toolbar button svg, .book-rail__summary svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.book-route-toolbar button[aria-pressed="true"] svg, .book-route-toolbar button.is-saved svg { fill: var(--bk-brass); stroke: var(--bk-brass); }
.book-route-toolbar kbd { display: none; margin-left: .15rem; padding: .1rem .35rem; border: 1px solid var(--bk-line-strong); border-radius: 4px; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .62rem; font-weight: 600; letter-spacing: .04em; }
@media (min-width: 1300px) { .book-route-toolbar kbd { display: inline-block; } }
.book-route-toolbar .book-icon-only .label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Continue-reading card: filled by the runtime when a resume point exists. */
.book-continue { display: none; align-items: center; gap: 1rem; max-width: var(--bk-measure); margin: 1.25rem auto 0; padding: .9rem 1.1rem; border: 1px solid var(--bk-brass-line); border-radius: 12px; background: var(--bk-paper-dim); color: var(--bk-text); text-decoration: none; font-family: var(--bk-serif); }
.book-continue[href] { display: flex; }
.book-continue strong { font-weight: 700; }
.book-continue span { color: var(--bk-muted); font-family: var(--bk-sans); font-size: .78rem; }
.book-continue .arrow { margin-left: auto; color: var(--bk-brass); }

/* ------------------------------------------------------------------ */
/* 5. Manuscript typography                                             */
/* ------------------------------------------------------------------ */
.book-route-article { font-family: var(--bk-serif); font-size: 1.125rem; line-height: 1.7; color: var(--bk-text); font-kerning: normal; font-variant-ligatures: common-ligatures; hyphens: manual; overflow-wrap: break-word; }
.book-route-article > :first-child { margin-top: 0; }

/* Chapter opening */
.book-route-article h1.part-heading { margin: clamp(1.75rem, 4vw, 2.5rem) 0 1.5rem; padding: 0; font-family: var(--bk-serif); font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.08; color: var(--bk-text); text-wrap: balance; scroll-margin-top: calc(var(--bk-nav-h) + 1rem); }
.book-route-article h1.part-heading::before, .book-route-article h1.part-heading::after { content: none; }
.book-chapter-label { display: block; margin-bottom: 1.1rem; padding-top: 1.1rem; border-top: 2px solid var(--bk-brass); color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .74rem; font-weight: 700; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; }
.book-label-colon { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.book-chapter-name { display: block; }
.book-chapter-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: -.5rem 0 2rem; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .76rem; font-weight: 500; letter-spacing: .04em; }
.book-chapter-meta .dot { color: var(--bk-brass); }

/* Plate */
.book-route-article figure.chapter-plate { width: 100%; margin: 0 0 2.5rem; padding: 0; }
.book-route-article figure.chapter-plate img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--bk-line-strong); border-radius: 4px; box-shadow: var(--bk-shadow-plate); background: var(--bk-paper-dim); }

/* Epigraph */
.book-route-article blockquote.book-epigraph { max-width: 34rem; margin: 0 auto 3rem; padding: 0; border: 0; text-align: center; }
.book-route-article blockquote.book-epigraph p { margin: 0 0 .75rem; color: var(--bk-text-2); font-size: 1.05rem; line-height: 1.6; }
.book-route-article blockquote.book-epigraph p em { font-style: italic; }
.book-route-article blockquote.book-epigraph .book-epigraph__source { color: var(--bk-muted); font-family: var(--bk-sans); font-size: .74rem; font-style: normal; letter-spacing: .06em; }
.book-route-article blockquote.book-epigraph .book-epigraph__source em { font-style: italic; letter-spacing: 0; }
.book-route-article blockquote.book-epigraph::after { content: ""; display: block; width: 2.5rem; height: 1px; margin: 1.75rem auto 0; background: var(--bk-brass); }

/* Opening paragraph */
.book-route-article p.book-opening::first-letter { float: left; margin: .12em .12em 0 0; padding: 0; font-family: var(--bk-serif); font-size: 3.6em; font-weight: 700; line-height: .8; color: var(--bk-brass-text); }

/* Headings */
.book-route-article h2 { position: relative; margin: 3.25rem 0 1.1rem; padding-top: 1.25rem; font-family: var(--bk-serif); font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: var(--bk-text); text-wrap: balance; scroll-margin-top: calc(var(--bk-nav-h) + 3.5rem); }
.book-route-article h2::before { content: ""; position: absolute; top: 0; left: 0; width: 2.25rem; height: 2px; background: var(--bk-brass); }
.book-route-article h3 { margin: 2.4rem 0 .8rem; font-family: var(--bk-serif); font-size: 1.32rem; font-weight: 700; line-height: 1.3; color: var(--bk-text); text-wrap: balance; scroll-margin-top: calc(var(--bk-nav-h) + 3.5rem); }
.book-route-article h4 { margin: 2rem 0 .6rem; font-family: var(--bk-sans); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bk-brass-text); scroll-margin-top: calc(var(--bk-nav-h) + 3.5rem); }
.book-route-article h5, .book-route-article h6 { margin: 1.6rem 0 .5rem; font-family: var(--bk-serif); font-size: 1.05rem; font-weight: 700; }
.book-route-article h2 + h3 { margin-top: 1.4rem; }

/* Copy-link anchors, revealed on hover or focus. */
.book-route-article .book-anchor { display: inline-block; margin-left: .45em; color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .62em; font-weight: 600; letter-spacing: .04em; text-decoration: none; vertical-align: .18em; opacity: 0; transition: opacity .15s var(--bk-ease); }
.book-route-article h2:hover .book-anchor, .book-route-article h3:hover .book-anchor, .book-route-article .book-anchor:focus-visible, .book-route-article .book-anchor.is-copied { opacity: 1; }

/* Figure lightbox */
.book-lightbox { position: fixed; inset: 0; width: min(96vw, 1400px); max-width: none; max-height: 94vh; box-sizing: border-box; margin: auto; padding: 1rem; border: 0; border-radius: 12px; background: var(--bk-paper); color: var(--bk-text); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7); }
.book-lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .75rem; animation: book-dialog-in .18s var(--bk-ease); }
.book-lightbox::backdrop { background: rgba(8, 14, 24, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.book-lightbox img { display: block; max-width: 100%; max-height: calc(94vh - 5.5rem); margin: 0 auto; object-fit: contain; border-radius: 4px; }
.book-lightbox__caption { max-width: 60rem; margin: 0 auto; padding: 0 3rem; color: var(--bk-text-2); font-family: var(--bk-serif); font-size: .95rem; line-height: 1.5; text-align: center; }
.book-lightbox .book-dialog-close { top: .75rem; right: .75rem; }
.book-route-article figure img[role="button"] { cursor: zoom-in; }
.book-route-article figure img[role="button"]:focus-visible { outline: 3px solid var(--bk-brass); outline-offset: 3px; }

/* Text */
.book-route-article p { margin: 0 0 1.15em; text-wrap: pretty; }
.book-route-article strong { font-weight: 700; color: var(--bk-text); }
.book-route-article em { font-style: italic; }
.book-route-article a { color: var(--pm-primary, #21354d); text-decoration: underline; text-decoration-color: var(--bk-brass-line); text-decoration-thickness: .06em; text-underline-offset: .16em; transition: text-decoration-color .15s var(--bk-ease); }
.book-route-article a:hover { color: var(--bk-text); text-decoration-color: var(--bk-brass); }
html.dark .book-route-article a { color: #c9d6e6; }
.book-route-article a.uri, .book-route-article code { font-family: var(--bk-mono); font-size: .84em; overflow-wrap: anywhere; }
.book-route-article code { padding: .1em .35em; border-radius: 4px; background: var(--bk-paper-dim); }
.book-route-article pre { margin: 1.5rem 0; padding: 1rem 1.15rem; overflow: auto; border: 1px solid var(--bk-line); border-radius: 8px; background: var(--bk-paper-dim); font-family: var(--bk-mono); font-size: .84rem; line-height: 1.55; }
.book-route-article pre code { padding: 0; background: transparent; font-size: inherit; }
.book-route-article pre[tabindex]:focus-visible { outline: 2px solid var(--bk-brass); outline-offset: 3px; }
.book-route-article sup { font-size: .72em; line-height: 0; vertical-align: super; }

/* Lists */
.book-route-article ul, .book-route-article ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.book-route-article li { margin: 0 0 .45em; padding-left: .15em; }
.book-route-article li > p { margin-bottom: .6em; }
.book-route-article ul { list-style: none; }
.book-route-article ul > li { position: relative; }
.book-route-article ul > li::before { content: ""; position: absolute; top: .72em; left: -1.05em; width: .38em; height: .38em; border-radius: 50%; background: var(--bk-brass); }
.book-route-article ul ul > li::before { background: transparent; border: 1px solid var(--bk-brass); box-sizing: border-box; }
.book-route-article ol { list-style: decimal; }
.book-route-article ol > li::marker { color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .82em; font-weight: 700; font-variant-numeric: tabular-nums; }
.book-route-article ul.task-list { padding-left: 0; }
.book-route-article ul.task-list > li { display: grid; grid-template-columns: 1.35em 1fr; gap: .6em; align-items: start; padding-left: 0; }
.book-route-article ul.task-list > li::before { content: none; }
.book-route-article ul.task-list input[type="checkbox"] { width: 1.05em; height: 1.05em; margin: .3em 0 0; accent-color: var(--bk-brass); }
.book-route-article ul.task-list label { display: contents; }

/* Blockquotes (non-epigraph) */
.book-route-article blockquote { margin: 1.75rem 0; padding: .1rem 0 .1rem 1.4rem; border-left: 2px solid var(--bk-brass); color: var(--bk-text-2); }
.book-route-article blockquote p { margin-bottom: .8em; }
.book-route-article blockquote p:last-child { margin-bottom: 0; }

/* Figures */
.book-route-article figure { margin: 2.25rem 0; padding: 0; text-align: left; }
.book-route-article figure img { display: block; width: 100%; height: auto; border: 1px solid var(--bk-line-strong); border-radius: 4px; background: var(--bk-paper-dim); box-shadow: var(--bk-shadow-plate); }
.book-route-article figure.condition-illustration img { cursor: zoom-in; }
.book-route-article figcaption { margin: .8rem 0 0; color: var(--bk-text-2); font-family: var(--bk-serif); font-size: .92rem; line-height: 1.55; text-align: left; }
.book-route-article figcaption .book-fig-label { display: inline-block; margin-right: .55rem; color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; vertical-align: .05em; }

/* Tables */
.book-route-article .table-scroll-wrapper { margin: 2rem 0; overflow-x: auto; border-top: 2px solid var(--bk-ink); border-bottom: 1px solid var(--bk-ink); -webkit-overflow-scrolling: touch; }
.book-route-article .table-scroll-wrapper:focus-visible { outline: 2px solid var(--bk-brass); outline-offset: 4px; }
html.dark .book-route-article .table-scroll-wrapper { border-color: var(--bk-line-strong); }
.book-route-article table { width: 100%; border-collapse: collapse; margin: 0; font-family: var(--bk-serif); font-size: .95rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
.book-route-article thead th { padding: .7rem .75rem .55rem; border-bottom: 1px solid var(--bk-line-strong); color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: left; vertical-align: bottom; background: transparent; }
.book-route-article tbody td, .book-route-article tbody th { padding: .6rem .75rem; border-top: 1px solid var(--bk-line); text-align: left; vertical-align: top; background: transparent; color: var(--bk-text); }
.book-route-article tbody tr:first-child td, .book-route-article tbody tr:first-child th { border-top: 0; }
.book-route-article tbody th[scope="row"] { font-weight: 700; }
.book-route-article tbody tr:hover td, .book-route-article tbody tr:hover th { background: color-mix(in srgb, var(--bk-brass) 6%, transparent); }
.book-route-article th:first-child, .book-route-article td:first-child { padding-left: .25rem; }
.book-route-article th:last-child, .book-route-article td:last-child { padding-right: .25rem; }

/* Definition lists and rules */
.book-route-article dl { margin: 0 0 1.25em; }
.book-route-article dt { font-weight: 700; }
.book-route-article dd { margin: 0 0 .8em 1.4em; }
.book-route-article hr { width: 6rem; height: 1px; margin: 3rem auto; border: 0; background: var(--bk-brass); }

/* References and appendix pages */
.book-references .book-route-article p { padding-left: 1.6em; text-indent: -1.6em; font-size: 1rem; line-height: 1.55; }
.book-references .book-route-article p a.uri { text-indent: 0; }
.book-route-article .footnotes { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--bk-line); font-size: .92rem; color: var(--bk-text-2); }

/* Previous / next */
.book-route-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: var(--bk-measure); margin: 4.5rem auto 0; padding: 0; border-top: 1px solid var(--bk-line); border-bottom: 1px solid var(--bk-line); }
.book-route-prevnext a { display: block; box-sizing: border-box; padding: 1.25rem 1rem 1.35rem 0; color: var(--bk-text); font-family: var(--bk-serif); font-size: 1.05rem; font-weight: 700; line-height: 1.3; text-decoration: none; transition: color .15s var(--bk-ease); }
.book-route-prevnext a + a { padding-right: 0; padding-left: 1rem; border-left: 1px solid var(--bk-line); }
.book-route-prevnext a:hover { color: var(--bk-brass-text); }
.book-route-prevnext a span { display: block; margin-bottom: .45rem; color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.book-route-prevnext .book-next { text-align: right; }
.book-route-prevnext .book-next:first-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
.book-route-prevnext .book-prev:last-child { grid-column: 1 / -1; padding-right: 0; }

/* Colophon */
.book-colophon { max-width: var(--bk-measure); margin: 3rem auto 0; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .78rem; line-height: 1.6; }
.book-colophon p { margin: 0 0 .5rem; }
.book-colophon .book-cite { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 2px solid var(--bk-brass); background: var(--bk-paper-dim); color: var(--bk-text-2); font-family: var(--bk-serif); font-size: .9rem; }
.book-colophon .book-cite strong { display: block; margin-bottom: .35rem; color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.book-colophon .book-cite button { margin-top: .6rem; padding: .35rem .8rem; border: 1px solid var(--bk-line-strong); border-radius: 999px; background: var(--bk-paper); color: var(--bk-text-2); font-family: var(--bk-sans); font-size: .74rem; font-weight: 600; cursor: pointer; }
.book-colophon .book-cite button:hover { color: var(--bk-text); border-color: var(--bk-brass); }

/* ------------------------------------------------------------------ */
/* 6. Dialogs: search and saved chapters                                */
/* ------------------------------------------------------------------ */
.book-search-dialog { position: fixed; inset: 0; width: min(44rem, calc(100% - 2rem)); max-width: none; max-height: min(78vh, 46rem); box-sizing: border-box; margin: auto; padding: 0; border: 1px solid var(--bk-line); border-radius: 16px; color: var(--bk-text); background: var(--bk-paper); box-shadow: 0 30px 80px -30px rgba(15, 28, 46, .6); font-family: var(--bk-sans); overflow: hidden; }
.book-search-dialog[open] { display: flex; flex-direction: column; animation: book-dialog-in .18s var(--bk-ease); }
.book-search-dialog::backdrop { background: rgba(15, 28, 46, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@keyframes book-dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.book-dialog__head { position: relative; padding: 1.5rem 4rem 0 1.75rem; }
.book-dialog__body { padding: 0 1.75rem 1.5rem; overflow: auto; overscroll-behavior: contain; }
.book-search-dialog h2 { margin: 0 0 .9rem; font-family: var(--bk-serif); font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.book-search-dialog label { display: block; margin-bottom: .45rem; color: var(--bk-brass-text); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.book-dialog-close { position: absolute; top: 1.15rem; right: 1.15rem; z-index: 1; margin: 0; }
.book-dialog-close button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--bk-line); border-radius: 999px; background: var(--bk-paper); color: var(--bk-text-2); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.book-dialog-close button:hover { color: var(--bk-text); border-color: var(--bk-brass); }
.book-search-dialog input { width: 100%; box-sizing: border-box; margin: 0 0 .5rem; padding: .8rem 1rem; border: 1px solid var(--bk-line-strong); border-radius: 10px; color: var(--bk-text); background: var(--bk-paper-dim); font: inherit; font-size: 1rem; }
.book-search-dialog input:focus-visible { outline: 2px solid var(--bk-brass); outline-offset: 0; border-color: var(--bk-brass); }
#book-search-status { margin: .35rem 0 .5rem; color: var(--bk-muted); font-size: .8rem; }
#book-search-results, #bookmarks-list { margin: 0; padding: 0; list-style: none; }
.book-search-result { display: block; padding: .85rem 0; border-top: 1px solid var(--bk-line); color: var(--bk-text-2); text-decoration: none; border-radius: 4px; }
.book-search-result:hover, .book-search-result:focus-visible { color: var(--bk-text); outline: none; background: color-mix(in srgb, var(--bk-brass) 7%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--bk-brass) 7%, transparent); }
.book-search-result strong { display: block; margin-bottom: .25rem; color: var(--bk-text); font-family: var(--bk-serif); font-size: 1rem; font-weight: 700; }
.book-search-result strong small { color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.book-search-result span { display: block; color: var(--bk-text-2); font-family: var(--bk-serif); font-size: .92rem; line-height: 1.5; }
.book-search-result mark { padding: 0 .1em; background: color-mix(in srgb, var(--bk-brass) 28%, transparent); color: inherit; border-radius: 2px; }
.book-dialog__empty { margin: 1rem 0 .5rem; color: var(--bk-muted); font-family: var(--bk-serif); font-size: 1rem; line-height: 1.55; }
.book-dialog__empty kbd { padding: .05rem .3rem; border: 1px solid var(--bk-line-strong); border-radius: 4px; font-family: var(--bk-sans); font-size: .72rem; }
.book-saved-row { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; border-top: 1px solid var(--bk-line); padding: .8rem 0; }
.book-saved-row a { color: var(--bk-text); font-family: var(--bk-serif); font-size: 1rem; font-weight: 700; text-decoration: none; }
.book-saved-row a:hover { color: var(--bk-brass-text); }
.book-saved-row a small { display: block; margin-top: .15rem; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .7rem; font-weight: 500; letter-spacing: .04em; }
.book-saved-row button { min-height: 36px; padding: 0 .8rem; border: 1px solid var(--bk-line); border-radius: 999px; background: var(--bk-paper); color: var(--bk-text-2); font: inherit; font-size: .76rem; cursor: pointer; }
.book-saved-row button:hover { color: var(--bk-text); border-color: var(--bk-brass); }

/* ------------------------------------------------------------------ */
/* 7. Landing page                                                      */
/* ------------------------------------------------------------------ */
.book-landing-main { width: 100%; max-width: none; margin: 0; padding: 0; }
.book-landing-hero { position: relative; margin: 0; padding: clamp(3rem, 7vw, 6rem) var(--bk-gutter) clamp(3rem, 6vw, 5rem); color: var(--bk-on-ink); background: radial-gradient(70% 90% at 100% 0%, rgba(212, 169, 85, .16), transparent 60%), radial-gradient(50% 60% at 0% 100%, rgba(70, 97, 125, .35), transparent 65%), linear-gradient(160deg, #0d1726 0%, #152438 100%); text-align: left; overflow: hidden; }
.book-landing-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--bk-brass-line), transparent); }
.book-landing-hero p { text-align: left; hyphens: none; }
.book-frontispiece { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 27vw, 380px); gap: clamp(2rem, 5vw, 5rem); align-items: center; max-width: 1180px; margin: 0 auto; }
.book-frontispiece > * { min-width: 0; }
.book-landing-copy { position: relative; }
.book-landing-copy .title-label { margin: 0 0 1.4rem; color: var(--bk-brass); font-family: var(--bk-sans); font-size: .72rem; font-weight: 700; letter-spacing: .18em; line-height: 1.5; text-transform: uppercase; opacity: 1; }
.book-landing-copy .title-label::before { content: none; }
.book-landing-hero h1 { margin: 0; padding: 0; color: #fff; font-family: var(--bk-serif); font-size: clamp(2.7rem, 5.6vw, 4.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.02; text-align: left; text-wrap: balance; }
.book-landing-hero h1::before { content: none; }
.book-landing-hero h1 em { font-style: italic; font-weight: 700; color: #fff; }
.book-landing-subtitle { max-width: 28rem; margin: 1.25rem 0 0; color: var(--bk-on-ink-2); font-family: var(--bk-serif); font-size: clamp(1.15rem, 1.7vw, 1.4rem); font-style: italic; line-height: 1.45; }
.book-landing-author { margin: 1.5rem 0 0; color: var(--bk-brass); font-family: var(--bk-sans); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.book-landing-blurb { max-width: 32rem; margin: 1.4rem 0 0; color: var(--bk-on-ink-2); font-family: var(--bk-serif); font-size: 1.05rem; line-height: 1.6; }
.book-reader-choice { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 2rem 0 0; }
.book-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; box-sizing: border-box; padding: .6rem 1.25rem; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: var(--bk-on-ink); background: transparent; font-family: var(--bk-sans); font-size: .86rem; font-weight: 600; text-decoration: none; transition: background .18s var(--bk-ease), border-color .18s var(--bk-ease), transform .18s var(--bk-ease), color .18s var(--bk-ease); }
.book-btn:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .06); color: #fff; transform: translateY(-1px); }
.book-btn--primary { border-color: var(--bk-brass); background: var(--bk-brass); color: #12100a; }
.book-btn--primary:hover { background: #d6a94a; border-color: #d6a94a; color: #12100a; }
.book-btn .pm-btn__arrow, .book-btn .arrow { font-size: 1.05em; line-height: 1; }
.book-landing-hero .book-continue { margin: 1.25rem 0 0; max-width: 32rem; border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); color: var(--bk-on-ink); }
.book-landing-hero .book-continue span { color: var(--bk-on-ink-2); }
.book-frontispiece-art { position: relative; width: 100%; justify-self: stretch; }
.book-frontispiece-art::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -14px; height: 14px; background: radial-gradient(50% 100% at 50% 0%, rgba(0, 0, 0, .55), transparent 70%); pointer-events: none; }
.book-frontispiece-art img { display: block; width: 100%; height: auto; margin: 0; border: 1px solid rgba(255, 255, 255, .12); border-radius: 3px 8px 8px 3px; box-shadow: -1px 0 0 rgba(255, 255, 255, .06) inset, 0 30px 60px -20px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4); }

/* Edition facts */
.book-edition { border-bottom: 1px solid var(--bk-line); background: var(--bk-canvas); }
.book-edition__inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; max-width: 1180px; margin: 0 auto; padding: 1.75rem var(--bk-gutter); }
.book-edition__fact { min-width: 0; padding-left: 1rem; border-left: 1px solid var(--bk-brass-line); }
.book-edition__fact strong { display: block; font-family: var(--bk-serif); font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: var(--bk-text); font-variant-numeric: tabular-nums; }
.book-edition__fact span { display: block; margin-top: .25rem; color: var(--bk-muted); font-family: var(--bk-sans); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* Contents */
.book-contents { box-sizing: border-box; max-width: 1180px; margin: 0 auto; padding: clamp(2.5rem, 5vw, 4.5rem) var(--bk-gutter) clamp(3.5rem, 7vw, 6rem); }
.book-contents__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin: 0 0 1.75rem; padding: 0 0 1.1rem; border-bottom: 2px solid var(--bk-ink); }
html.dark .book-contents__head { border-color: var(--bk-line-strong); }
.book-landing #book-contents-heading { margin: 0; padding: 0; border: 0; color: var(--bk-text); font-family: var(--bk-serif); font-size: clamp(1.7rem, 2.6vw, 2.2rem); font-weight: 700; letter-spacing: -.015em; text-align: left; scroll-margin-top: calc(var(--bk-nav-h) + 1rem); }
.book-contents__hint { color: var(--bk-muted); font-family: var(--bk-sans); font-size: .76rem; font-weight: 500; letter-spacing: .04em; }
.book-landing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4rem; margin: 0; padding: 0; list-style: none; }
.book-landing-part { margin: 0; padding: 0; }
/* Left column: front matter then chapters. Right column: closing then back matter. */
.book-landing-part:nth-child(1) { grid-column: 1; grid-row: 1; }
.book-landing-part:nth-child(2) { grid-column: 1; grid-row: 2; }
.book-landing-part:nth-child(3) { grid-column: 2; grid-row: 1; }
.book-landing-part:nth-child(4) { grid-column: 2; grid-row: 2; }
.book-landing-part > h3 { margin: 1.5rem 0 .35rem; padding: 0 0 .5rem; border-bottom: 1px solid var(--bk-line); color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.book-landing-part > ol { margin: 0; padding: 0; list-style: none; }
.book-landing-part > ol > li { margin: 0; padding: 0; border-bottom: 1px solid var(--bk-line); }
.book-landing-grid a { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: .75rem; align-items: baseline; min-height: 56px; box-sizing: border-box; padding: .85rem .25rem .85rem 0; color: var(--bk-text); background: transparent; text-decoration: none; transition: background .15s var(--bk-ease); }
.book-landing-grid a:hover { background: color-mix(in srgb, var(--bk-brass) 6%, transparent); }
.book-landing-grid a:hover .book-content-title { color: var(--bk-brass-text); }
.book-content-number { color: var(--bk-brass-text); font-family: var(--bk-sans); font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.book-content-title { font-family: var(--bk-serif); font-size: 1.05rem; font-weight: 400; line-height: 1.4; transition: color .15s var(--bk-ease); }
.book-content-meta { color: var(--bk-muted); font-family: var(--bk-sans); font-size: .68rem; font-weight: 500; letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.book-landing-child a { grid-template-columns: 2.25rem minmax(0, 1fr) auto; }
.book-landing-child .book-content-title { padding-left: .9rem; border-left: 1px solid var(--bk-line-strong); color: var(--bk-text-2); font-size: .95rem; }

/* Reader controls sit in the contents header on the landing page. */
.book-landing .book-route-toolbar { min-height: 0; margin: 0; padding: 0; border: 0; }
.book-landing .book-colophon { max-width: none; margin-top: 3.5rem; }

/* ------------------------------------------------------------------ */
/* 8. Responsive                                                        */
/* ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .book-route-body { --bk-rail-w: 15.5rem; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .book-reader-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 30rem; }
}
@media (max-width: 1000px) {
  .book-edition__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-landing-grid { grid-template-columns: 1fr; }
  .book-landing-part:nth-child(n) { grid-column: 1; grid-row: auto; }
}
@media (min-width: 901px) {
  .book-runhead { left: var(--bk-rail-w); }
}
@media (max-width: 900px) {
  .book-shell { display: block; }
  .book-rail { position: relative; top: auto; max-height: none; overflow: visible; padding: 0 var(--bk-gutter); border-right: 0; border-bottom: 1px solid var(--bk-line); }
  .book-rail > .book-rail__summary { display: inline-flex; margin: .4rem 0; padding-left: .6rem; list-style: none; }
  .book-rail__summary::-webkit-details-marker { display: none; }
  .book-rail__summary::marker { content: ""; }
  .book-rail__inner { padding: .25rem 0 1.25rem; }
  .book-rail__head { padding-left: 0; }
  .book-route-toc { columns: 1; }
  .book-route-toc a { min-height: 44px; display: flex; align-items: center; }
  .book-route-toolbar { min-height: 56px; }
  .book-route-toolbar__crumb { display: none; }
  .book-runhead { padding-left: 1.25rem; padding-right: 1.25rem; }
}
@media (max-width: 760px) {
  .book-route-body { --bk-gutter: 1.25rem; }
  .book-landing-hero { padding-top: 2.5rem; padding-bottom: 2.75rem; }
  .book-frontispiece { grid-template-columns: 1fr; gap: 2.5rem; }
  .book-frontispiece-art { width: min(100%, 360px); max-width: 100%; justify-self: center; order: 2; }
  .book-landing-copy { order: 1; }
  .book-reader-choice { margin-top: 1.5rem; }
  .book-reader-choice a { width: 100%; }
  .book-edition__inner { grid-template-columns: 1fr 1fr; gap: 1.25rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .book-landing-grid a { min-height: 52px; }
  .book-route-article { font-size: 1.05rem; line-height: 1.65; }
  .book-route-article h1.part-heading { margin-top: 2rem; font-size: 2.2rem; }
  .book-route-article h2 { font-size: 1.5rem; }
  .book-route-prevnext { grid-template-columns: 1fr; }
  .book-route-prevnext a + a { padding-left: 0; border-left: 0; border-top: 1px solid var(--bk-line); }
  .book-route-prevnext .book-next { text-align: left; }
  .book-runhead__nav { display: none; }
  .book-route-toolbar .label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .book-route-toolbar button { width: 44px; padding: 0; justify-content: center; }
  .book-route-toolbar .book-rail__summary { width: auto; padding: 0 .8rem; }
}
@media (max-width: 420px) {
  .book-edition__inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .book-route-body *, .book-route-body *::before, .book-route-body *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ */
/* 9. Print                                                             */
/* ------------------------------------------------------------------ */
@media print {
  .book-route-body { background: #fff; color: #111; }
  .site-nav, .book-progress, .book-runhead, .book-rail, .book-route-toolbar, .book-route-prevnext, .book-continue, .book-search-dialog, .site-footer, .book-colophon button { display: none !important; }
  .book-shell { display: block; }
  .book-route-main { padding: 0; background: #fff; }
  .book-page, .book-route-article { max-width: none; }
  .book-route-article { font-size: 11pt; line-height: 1.5; color: #111; }
  .book-route-article h1.part-heading { font-size: 24pt; margin-top: 0; }
  .book-route-article h2 { font-size: 15pt; break-after: avoid; }
  .book-route-article h3 { font-size: 12.5pt; break-after: avoid; }
  .book-route-article figure, .book-route-article blockquote, .book-route-article .table-scroll-wrapper, .book-route-article pre { break-inside: avoid; }
  .book-route-article figure img { box-shadow: none; }
  .book-route-article a { color: #111; text-decoration: none; }
  .book-route-article a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
  .book-landing-hero { color: #111; background: #fff; padding: 0; }
  .book-landing-topline, .book-reader-choice, .book-frontispiece-art, .book-edition { display: none; }
  .book-frontispiece { display: block; margin: 0; }
  .book-landing-hero h1, .book-landing-hero h1 em, .book-landing-hero p { color: #111; }
  .book-contents { margin: 0; padding: 2rem 0; }
  .book-landing-grid { display: block; }
  .book-landing-grid li { break-inside: avoid; }
}
/* Finis: the leaf the book closes on. Appended to both the chapter edition's
 * reader.<hash>.css and the complete edition's complete.<hash>.css, so it uses
 * the house --pm-* tokens (css/site-theme.css) rather than either edition's
 * own. The book used to stop on its last reference with the window's bottom
 * edge for a margin; it now ends on the robot, the title, a brass rule and the
 * edition, set as quietly as the title page that opens it, with a way back to
 * the beginning. */
.book-finis { box-sizing: border-box; max-width: 42rem; margin: 5rem auto 0; padding: 4.5rem 1.25rem 1.5rem; border-top: 1px solid var(--pm-border, #e2e8ef); text-align: center; }
.book-finis__mark { display: block; width: 56px; height: 56px; margin: 0 auto 1.5rem; }
.book-finis .book-finis__title { margin: 0; color: var(--pm-text, #1c2a3a); font-family: "Charter", Georgia, serif; font-size: clamp(1.8rem, 4.5vw, 2.35rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.08; text-align: center; text-indent: 0; text-wrap: balance; }
.book-finis .book-finis__title em { font-style: italic; }
.book-finis .book-finis__subtitle { margin: .55rem 0 0; color: var(--pm-text-2, #3f4f61); font-family: "Charter", Georgia, serif; font-size: 1.1rem; font-style: italic; line-height: 1.4; text-align: center; text-indent: 0; }
.book-finis__ornament { margin: 1.75rem auto; color: var(--pm-brass, #b8862b); line-height: 0; }
.book-finis__ornament svg { width: 96px; height: 12px; fill: currentColor; }
.book-finis .book-finis__line, .book-finis .book-finis__links { margin: 0; color: var(--pm-text-muted, #55657a); font-family: var(--pm-font, "Poppins", sans-serif); font-size: .7rem; font-weight: 600; letter-spacing: .16em; line-height: 1.7; text-align: center; text-indent: 0; text-transform: uppercase; }
.book-finis__sep { padding: 0 .6em; color: var(--pm-brass, #b8862b); }
.book-finis .book-finis__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 2rem; }
.book-finis .book-finis__links a { padding: .6rem .3rem; border-bottom: 1px solid transparent; color: var(--pm-text-2, #3f4f61); text-decoration: none; transition: color .15s ease, border-color .15s ease; }
.book-finis .book-finis__links a:hover { border-bottom-color: currentColor; color: var(--pm-brass-text, #7d5a17); }
/* Chapter edition: the page-turn bar follows the leaf closely. */
.book-finis + .book-route-prevnext { margin-top: 2.5rem; }
/* On a phone each phrase takes its own line rather than stranding a middle
   dot at the end of one. */
@media (max-width: 480px) {
  .book-finis { margin-top: 3.5rem; padding: 3.5rem 1rem 1rem; }
  .book-finis .book-finis__sep { display: none; }
  .book-finis .book-finis__line > span:not(.book-finis__sep) { display: block; }
  .book-finis .book-finis__links { flex-direction: column; margin-top: 1.5rem; }
}
@media print {
  .book-finis { padding-bottom: 2rem; border-top: 0; break-before: page; }
  .book-finis .book-finis__links { display: none; }
}
