/* Theosophy Trust — book reader
   Shares the site's reading-room palette and type (see free-pdfs.php /
   free-pdf-read.php): Playfair Display for headings, Lora for text, navy /
   gold / cream. Fonts are the site's self-hosted files two levels up. */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../../fonts/playfair-display-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../../fonts/lora-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(../../fonts/lora-italic-latin.woff2) format('woff2');
}

:root {
  --navy: #003366;
  --navy-deep: #00254a;
  --navy-light: #0a3f78;
  --gold: #FAD807;
  --cream: #faf7f0;
  --paper: #ffffff;
  --ink: #2a2a2a;
  --ink-soft: #3b4656;
  --muted: #6c7a8d;
  --rule: #d5dbe8;
  --rule-warm: #e6dfcd;
  --bg-alt: #eef2f8;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
  --ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 18px/1.72 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: underline; text-decoration-color: #b9c4d6; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--navy); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── reading progress (gold hairline under the top bar) ── */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: rgba(0, 51, 102, .12); z-index: 30; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); }

/* ── top bar — the site's navy nav, reduced to what a reader needs ── */
.topbar {
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; min-height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); text-decoration: none; font: 600 19px/1 var(--serif); letter-spacing: .01em; }
.brand img { width: 34px; height: 32px; display: block; }
.brand:hover { color: #fff; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: #dce8ff; text-decoration: none; font: 600 12px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: #fff; border-bottom-color: var(--gold); }

/* ── book hero — same construction as the Free PDFs hero band ── */
.hero {
  background: radial-gradient(120% 150% at 50% 0%, var(--navy-light) 0%, var(--navy) 52%, var(--navy-deep) 100%);
  color: #fff; position: relative; overflow: hidden;
  padding: 48px 28px 52px;
}
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(55% 70% at 50% 118%, rgba(250, 216, 7, .14), transparent 60%); }
.hero-inner { position: relative; max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 211px minmax(0, 1fr); gap: 44px; align-items: center; }
.cover { width: 211px; height: auto; border-radius: 2px; box-shadow: 0 20px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); }
.hero-kicker { margin: 0 0 8px; font: italic 15px/1.4 var(--body); color: #aabfe0; }
.hero h1 { margin: 0 0 10px; font: 700 46px/1.08 var(--serif); color: var(--gold); letter-spacing: .005em; text-shadow: 0 2px 14px rgba(0, 0, 0, .3); }
.hero-sub { margin: 0 0 18px; font: italic 21px/1.4 var(--body); color: #dce8ff; }
.hero-by { margin: 0; font: 17px/1.5 var(--body); color: #fff; }
.hero-by span { color: #aabfe0; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 6px; font: 600 13px/1 var(--ui); letter-spacing: .02em; text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #ffe24a; }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .55); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn-resume { color: var(--gold); border: 1px solid rgba(250, 216, 7, .55); background: rgba(0, 0, 0, .18); }
.btn-resume:hover { border-color: var(--gold); background: rgba(0, 0, 0, .3); }
.btn-resume[hidden] { display: none; }

/* ── two-column reading layout ── */
.layout { max-width: 1180px; margin: 0 auto; padding: 36px 24px 72px; display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 40px; align-items: start; }

.rail { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; padding-right: 6px; scrollbar-width: thin; }
.contents summary { list-style: none; cursor: default; padding: 0 0 12px; font: 600 18px/1.2 var(--serif); color: var(--navy); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.contents summary::-webkit-details-marker { display: none; }
.contents summary::after { content: ""; display: none; }
.contents-current { display: none; }
.toc, .toc ol { list-style: none; margin: 0; padding: 0; }
.toc { border-top: 1px solid var(--rule); padding-top: 12px; font: 14.5px/1.45 var(--body); }
.toc a { display: block; padding: 5px 10px 5px 12px; color: var(--ink-soft); text-decoration: none; border-left: 3px solid transparent; }
.toc a:hover { color: var(--navy); background: var(--bg-alt); }
.toc a[aria-current="true"] { color: var(--navy); font-weight: 600; border-left-color: var(--gold); background: #fffbe6; }
.toc-part { margin-top: 10px; }
.toc-part > a { font: 600 13.5px/1.3 var(--serif); color: var(--navy); }
.toc-part ol { padding-left: 10px; }

.sheet { background: var(--paper); border-radius: 6px; box-shadow: 0 2px 14px rgba(0, 51, 102, .08); padding: 56px 64px 60px; min-width: 0; }
.text { max-width: var(--measure); margin: 0 auto; }

/* ── running text ── */
.text p { margin: 0 0 .4em; text-align: justify; text-indent: 1.5em; hyphens: auto; -webkit-hyphens: auto; }
.text :is(h2, h3, figure, blockquote, hr, table, .sutra, section) + p,
.text p:first-child,
.text p.flush, .text p.center, .text p.attrib, .text p.gloss, .text p.gloss-cont, .text p.dedication { text-indent: 0; }
.text p.center { text-align: center; }
.text p.attrib { text-align: right; color: var(--muted); font-size: 16px; margin-bottom: 1.4em; }
.text small { font-size: .82em; }
.text sup { font-size: .72em; line-height: 0; }

.text h2 { margin: 72px 0 30px; font: 600 31px/1.2 var(--serif); color: var(--navy); text-align: center; letter-spacing: .005em; }
.text h2::after { content: ""; display: block; width: 56px; height: 3px; margin: 16px auto 0; background: var(--gold); border-radius: 2px; }
.text .chapter:first-of-type h2, .text .front + .chapter h2 { margin-top: 8px; }
.text h2.part { margin: 88px 0 8px; padding: 22px 0; font: 500 20px/1.3 var(--serif); color: var(--muted); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); letter-spacing: .04em; }
.text h2.part::after { display: none; }
.text h2.part + .chapter h2 { margin-top: 30px; }

/* chapter epigraphs (quote + attribution) */
.epigraph { margin: 0 0 2.4em; padding: 0 6%; }
.epigraph blockquote { margin: 0; padding: 0; border: 0; font-size: 17.5px; color: var(--ink-soft); }
.epigraph blockquote p { text-indent: 0; margin: 0 0 .5em; }
.epigraph figcaption { text-align: right; font: 15px/1.4 var(--body); color: var(--muted); }
.epigraph figcaption::before { content: "— "; }

/* quoted passages */
.text blockquote { margin: 1.3em 0 1.4em 1.4em; padding: 0 0 0 1.15em; border-left: 2px solid var(--rule-warm); font-size: 17px; color: var(--ink-soft); }
.text blockquote p { text-indent: 0; margin: 0 0 .55em; }

/* the heart of the book: Patanjali's sutras — Sanskrit line, gold rule, numbered rendering */
.text .sutra { margin: 1.5em 0 1.7em; }
.text p.sutra-sa { margin: 0; text-indent: 0; font: italic 17.5px/1.5 var(--body); color: var(--navy); }
.text p.sutra-sa::after { content: ""; display: block; width: 34px; height: 2px; background: var(--gold); margin: 9px 0 10px; }
.text p.sutra-en { margin: 0; text-indent: -1.7em; padding-left: 1.7em; }

/* plates & ornaments */
.plate { margin: 1.8em 0; text-align: center; }
.plate img { display: inline-block; }
hr.sep { border: 0; width: 48px; height: 2px; background: var(--gold); margin: 2.2em auto; opacity: .85; }

/* tables (the yuga tables) */
.tbl { margin: 1.4em auto 1.8em; border-collapse: collapse; font-size: 16px; min-width: 60%; }
.tbl th { font: 600 15px/1.4 var(--body); color: var(--navy); text-align: left; padding: 8px 14px; border-bottom: 2px solid var(--navy); }
.tbl th strong { font-weight: inherit; }
.tbl td { padding: 7px 14px; border-bottom: 1px solid #e8ecf3; vertical-align: top; }
.tbl td + td, .tbl th + th { text-align: right; }
.tbl u { text-decoration: none; border-top: 1px solid var(--ink); padding-top: 2px; }

/* glossary */
.text h3.gloss-letter { margin: 44px 0 14px; padding-bottom: 6px; font: 700 26px/1.1 var(--serif); color: var(--navy); border-bottom: 1px solid var(--rule); }
.text p.gloss { margin: 0 0 .85em; }
.text p.gloss strong { color: var(--navy); }
.text p.gloss-cont { margin: -.3em 0 .85em; padding-left: 1.5em; }

/* front matter: emblem, dedication, book epigraph */
.front { text-align: center; margin: 8px 0 56px; }
.text p.dedication { font-style: italic; color: var(--ink-soft); margin: 0 auto; max-width: 34em; line-height: 1.75; }
.text p.dedication:first-child { margin-bottom: .6em; }
.text p.sutra-note { margin: .4em 0 0; text-indent: 0; padding-left: 1.7em; font-size: 16px; color: var(--ink-soft); }
.nb { white-space: nowrap; }
.front .epigraph { text-align: left; margin: 34px 0 0; }
.front .epigraph blockquote p { text-indent: 0; }
.front .epigraph figcaption { text-align: right; }

.closing { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--rule); }

/* colophon */
.colophon { max-width: var(--measure); margin: 72px auto 0; padding-top: 30px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.6; color: #4a5568; text-align: center; }
.colophon p { margin: 0 0 .6em; text-indent: 0; }
.colophon-h { margin: 0 0 16px; font: 600 19px/1.2 var(--serif); color: var(--navy); }
.colophon-h3 { margin: 26px 0 10px; font: 600 15px/1.3 var(--body); color: var(--navy); }
.others { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; text-align: left; }
.others li { break-inside: avoid; margin: 0 0 10px; }
.others small { display: block; color: var(--muted); font-size: 12.5px; }
.site-foot { margin-top: 28px; font: 12px/1.6 var(--ui); color: var(--muted); }

/* back to top */
.totop { position: fixed; right: 22px; bottom: 22px; width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; text-decoration: none; font: 600 18px/1 var(--ui); box-shadow: 0 6px 18px rgba(0, 37, 74, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
.totop.is-visible { opacity: 1; pointer-events: auto; }
.totop:hover { background: var(--navy-light); }

/* ═══════════════════════════════════════════════════════════════════════
   HEADER layout (body.has-topmenu) — single column, always-visible book bar,
   contents list on the title page, previous/next after every chapter.
   Built for older readers: nothing hidden, bigger type, big targets.
   ═══════════════════════════════════════════════════════════════════════ */
html { --fs: 15px; }
.has-topmenu { --fs: 16.5px; }
html[data-fs="1"] .has-topmenu { --fs: 18.5px; }
html[data-fs="2"] .has-topmenu { --fs: 21px; }
.has-topmenu .text { font-size: var(--fs); line-height: 1.78; }
.has-topmenu .text blockquote, .has-topmenu .epigraph blockquote { font-size: .95em; }
.has-topmenu .text p.sutra-sa { font-size: .97em; }
.has-topmenu .text p.attrib, .has-topmenu .epigraph figcaption { font-size: .88em; }
.has-topmenu .text p.sutra-note { font-size: .9em; }
.has-topmenu .text h2 { font-size: 1.75em; }
.has-topmenu .text h2.part { font-size: 1.1em; }
.has-topmenu .text h3.gloss-letter { font-size: 1.45em; }
.has-topmenu .text { --measure: 700px; }

.bookbar { position: sticky; top: 0; z-index: 25; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: 0 2px 10px rgba(0, 51, 102, .08); }
.bookbar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.bookbar-title { flex: 1 1 auto; min-width: 0; font: 600 18px/1.3 var(--serif); color: var(--navy); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bookbar-title:hover { color: var(--navy-light); }
.goto { display: inline-flex; align-items: center; gap: 10px; font: 600 14px/1 var(--ui); color: var(--ink-soft); }
.goto select { font: 16px/1.3 var(--body); color: var(--ink); background: #fff; border: 1.5px solid #9fb0c8; border-radius: 6px; padding: 10px 36px 10px 12px; min-height: 46px; max-width: 320px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%23003366' stroke-width='2'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.goto select:hover { border-color: var(--navy); }
.textsize { display: inline-flex; gap: 6px; }
.textsize button { width: 46px; height: 46px; border-radius: 6px; border: 1.5px solid #9fb0c8; background: #fff; color: var(--navy); font: 600 17px/1 var(--serif); cursor: pointer; display: inline-flex; align-items: baseline; justify-content: center; gap: 1px; }
.textsize button span { font: 600 12px/1 var(--ui); }
.textsize button:hover { border-color: var(--navy); background: var(--bg-alt); }
.textsize button:disabled { opacity: .4; cursor: default; }

.layout-single { display: block; width: 100%; max-width: 940px; margin: 0 auto; padding: 32px 32px 72px; }
.has-topmenu .sheet { padding: 48px 72px 56px; }
.has-topmenu .hero { padding-bottom: 44px; }

.contents-page { max-width: var(--measure); margin: 0 auto 60px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.contents-page h2 { margin: 0 0 18px; font: 600 28px/1.2 var(--serif); color: var(--navy); text-align: center; }
.contents-page h2::after { content: ""; display: block; width: 56px; height: 3px; margin: 14px auto 0; background: var(--gold); border-radius: 2px; }
.contents-page .toc, .contents-page .toc ol { list-style: none; margin: 0; padding: 0; }
.contents-page .toc { border: 0; padding: 0; font-size: 1em; }
.contents-page .toc a { display: block; padding: 11px 8px; border-left: 0; border-bottom: 1px solid #edf0f5; color: var(--navy); text-decoration: none; font: 1em/1.4 var(--body); }
.contents-page .toc a:hover { background: var(--bg-alt); }
.contents-page .toc a[aria-current="true"] { background: #fffbe6; font-weight: 600; border-left: 0; }
.contents-page .toc-part { margin-top: 14px; }
.contents-page .toc-part > a { font: 600 .95em/1.3 var(--serif); color: var(--muted); border-bottom: 0; padding-bottom: 4px; }
.contents-page .toc-part ol { padding-left: 22px; }

.chapter-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin: 48px 0 8px; padding-top: 22px; border-top: 1px solid var(--rule); }
.chapter-nav a { display: flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 10px 16px; border: 1.5px solid #9fb0c8; border-radius: 8px; color: var(--navy); text-decoration: none; font: 600 16px/1.3 var(--body); }
.chapter-nav a small { display: block; font: 600 11.5px/1 var(--ui); letter-spacing: .04em; color: var(--muted); margin-bottom: 5px; }
.chapter-nav a:hover { border-color: var(--navy); background: var(--bg-alt); }
.chapter-nav .cn-prev { text-align: left; }
.chapter-nav .cn-next { text-align: right; }
.chapter-nav .cn-contents { align-self: center; min-height: 46px; padding: 0 18px; font: 600 14px/1 var(--ui); justify-content: center; }
.chapter-nav .cn-empty { visibility: hidden; }
.has-topmenu .totop { width: 50px; height: 50px; font-size: 22px; }

@media (max-width: 900px) {
  .bookbar-inner { padding: 8px 14px; gap: 10px; flex-wrap: nowrap; }
  .bookbar-title { display: none; }
  .goto { flex: 1 1 0; min-width: 0; }
  .goto span { display: none; }
  .goto select { max-width: none; width: 100%; min-height: 44px; padding: 9px 32px 9px 10px; }
  .textsize { flex: 0 0 auto; }
  .textsize button { width: 42px; height: 44px; }
  .layout-single { padding: 16px 12px 64px; }
  .has-topmenu .sheet { padding: 32px 20px 44px; }
  .chapter-nav { grid-template-columns: 1fr 1fr; }
  .chapter-nav .cn-contents { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 600px) {
  .has-topmenu { --fs: 15.5px; }
  .has-topmenu .sheet { padding: 26px 16px 40px; }
  .chapter-nav { grid-template-columns: 1fr; }
  .chapter-nav .cn-next { text-align: left; }
}
@media print { .bookbar, .chapter-nav { display: none !important; } }

/* ── responsive (sidebar layout) ── */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px 64px; }
  .rail { position: sticky; top: 0; max-height: none; overflow: visible; padding: 0; z-index: 10; }
  .contents { background: var(--paper); border-radius: 6px; box-shadow: 0 2px 14px rgba(0, 51, 102, .08); }
  .contents summary { cursor: pointer; padding: 14px 18px; font-size: 16px; }
  .contents summary::after { display: block; content: "▾"; font: 14px/1 var(--ui); color: var(--muted); transition: transform .15s; }
  .contents[open] summary::after { transform: rotate(180deg); }
  .contents-current { display: block; flex: 1; min-width: 0; margin-left: 10px; font: italic 13.5px/1.3 var(--body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
  .contents[open] .contents-current { display: none; }
  .contents nav { padding: 0 10px 12px; max-height: 60vh; overflow: auto; }
  .toc { border-top: 1px solid var(--rule); }
  .sheet { padding: 36px 26px 44px; }
  .hero { padding: 36px 20px 40px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 26px; }
  .cover { width: 156px; margin: 0 auto; }
  .hero h1 { font-size: 36px; }
  .hero-actions { justify-content: center; }
  .others { columns: 1; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 15px; line-height: 1.7; }
  .topbar { padding: 0 14px; min-height: 52px; gap: 10px; }
  .topnav { gap: 14px; flex-shrink: 0; }
  .topnav a { font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
  .brand { font-size: 16px; gap: 9px; white-space: nowrap; min-width: 0; }
  .brand img { width: 28px; height: 26px; }
  .sheet { padding: 28px 18px 40px; border-radius: 4px; }
  .text h2 { font-size: 26px; margin-top: 56px; }
  .text blockquote { margin-left: .6em; }
  .epigraph { padding: 0 2%; }
  .hero h1 { font-size: 31px; }
}

@media print {
  .progress, .topbar, .rail, .totop, .hero-actions { display: none !important; }
  body { background: #fff; font-size: 11.5pt; }
  .layout { display: block; padding: 0; }
  .sheet { box-shadow: none; padding: 0; }
  .hero { background: none; color: #000; padding: 0 0 18pt; }
  .hero h1, .hero-sub, .hero-by, .hero-kicker { color: #000; text-shadow: none; }
  .text h2 { break-before: page; }
}

/* Semantics retained from the different Calibre / EPUB editions. */
.source-text .source-italic { font-style: italic; }
.source-text .source-bold { font-weight: 700; }
.source-text .footnote { font-size: .88em; text-indent: 0; }
.source-text .edition-front { margin: 0 0 40px; border-bottom: 1px solid var(--rule); padding-bottom: 24px; }
.source-text .edition-front summary { cursor: pointer; color: var(--navy); font-size: .9em; margin-bottom: 20px; }
.source-text img { display: block; max-width: 100%; max-height: 700px; object-fit: contain; margin: 24px auto; }
.source-text table { display: block; overflow-x: auto; max-width: 100%; }
.source-text h1, .source-text h3, .source-text h4 { color: var(--navy); font-family: var(--serif); }
.source-text .unavailable-reference { color: inherit; }
.source-text .chapter { overflow-wrap: anywhere; }

/* Library navigation: available in every reader, including without JavaScript. */
.library-header { position: relative; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.library-header .topnav { align-items: center; gap: 22px; }
.library-header .library-back { white-space: nowrap; }
.book-menu { position: relative; }
.book-menu summary { cursor: pointer; padding: 10px 12px; border: 1px solid #829bb7; border-radius: 5px; color: #fff; font: 600 14px/1.4 var(--ui); white-space: nowrap; }
.book-menu summary:hover, .book-menu[open] summary { background: #154b7e; }
.book-menu-list { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 420px; max-width: calc(100vw - 36px); max-height: 65vh; overflow-y: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 12px 36px rgba(0, 25, 50, .24); padding: 8px; }
.library-header .book-menu-list a { display: block; padding: 12px; color: var(--navy); border: 0; font: 500 16px/1.4 var(--body); text-transform: none; letter-spacing: 0; }
.book-menu-list a span, .book-menu-list a small { display: block; }
.book-menu-list a small { font: 13px/1.5 var(--ui); color: var(--muted); margin-top: 4px; }
.library-header .book-menu-list a:hover { background: var(--bg-alt); }
.library-header .book-menu-list a[aria-current="page"] { background: #fff6c9; font-weight: 700; }
@media (max-width: 600px) {
  .library-header { gap: 8px; }
  .library-header .topnav { width: 100%; justify-content: space-between; gap: 10px; }
  .library-header .topnav > a { font-size: 11px; letter-spacing: 0; text-transform: none; }
  .book-menu { position: static; }
  .book-menu summary { font-size: 12px; padding: 10px; }
  .book-menu-list { left: 14px; right: 14px; top: calc(100% + 4px); width: auto; max-width: none; }
}
@media print { .book-menu { display: none; } }
