:root {
  color-scheme: light;
  --bg: #faf9f6;
  --surface: #fff;
  --ink: #242c36;
  --muted: #596474;
  --line: #d8dce0;
  --accent: #285f78;
  --slot: #f1f4f5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171c22; --surface: #202730; --ink: #e9edf0;
    --muted: #adb8c3; --line: #3c4651; --accent: #a5d7eb; --slot: #252e38;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171c22; --surface: #202730; --ink: #e9edf0;
  --muted: #adb8c3; --line: #3c4651; --accent: #a5d7eb; --slot: #252e38;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .12em; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { max-width: 960px; margin: auto; padding: .75rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.breadcrumbs { color: var(--muted); font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs a { color: inherit; }
.breadcrumbs span { padding: 0 .4rem; }
.theme-toggle { flex: none; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; min-height: 40px; padding: 0 .8rem; cursor: pointer; font-size: .875rem; }
.listing { max-width: 760px; margin: 0 auto; padding: clamp(2.5rem, 8vw, 5rem) 1.25rem 5rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.025em; }
h1 { margin: 0 0 1rem; font-size: clamp(2.2rem, 7vw, 3.6rem); }
h2 { margin: 0 0 1.5rem; font-size: 1.5rem; }
h3 { margin: 0 0 .4rem; font-size: 1.4rem; }
.intro { color: var(--muted); font-size: 1.125rem; line-height: 1.65; max-width: 42rem; margin: 0 0 2.75rem; }
.byline { color: var(--muted); margin: 0 0 1.5rem; }
.book-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 1.5rem; }
.book-card p:not(.eyebrow) { line-height: 1.6; }
.text-link { font-weight: 650; }
.primary-link { display: inline-block; background: var(--accent); color: var(--bg); border-radius: 5px; padding: .8rem 1.2rem; font-weight: 700; text-decoration: none; }
.chapter-list { border-top: 1px solid var(--line); margin-top: 3.5rem; padding-top: 2.5rem; }
.chapter-list ol { padding: 0; margin: 0; list-style: none; }
.chapter-item { display: flex; gap: 1.2rem; padding: 1.15rem 0; border-top: 1px solid var(--line); }
.chapter-number { color: var(--muted); font-variant-numeric: tabular-nums; }
.chapter-item a { font-weight: 650; }
.chapter-item p { margin: .35rem 0 0; color: var(--muted); font-size: .875rem; }
.reader { max-width: 720px; padding: 1.4rem 1.25rem 5rem; margin: 0 auto; }
.reader-topline { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .82rem; }
.reader-topline span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.progress { width: 100%; height: 3px; margin: .7rem 0 3rem; display: block; border: 0; background: var(--line); }
.progress::-webkit-progress-bar { background: var(--line); }
.progress::-webkit-progress-value { background: var(--accent); }
.progress::-moz-progress-bar { background: var(--accent); }
.reader h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: .7rem; }
.reader-meta { color: var(--muted); font-size: .9rem; margin: 0 0 2rem; }
.prose { max-width: 680px; font-family: Georgia, "Times New Roman", serif; font-size: 1.125rem; line-height: 1.7; overflow-wrap: break-word; }
.prose p { margin: 0 0 1.4em; }
.engagement-slot:empty { display: none; }
.engagement-slot:not(:empty) { background: var(--slot); border: 1px solid var(--line); border-radius: 6px; margin: 1.5rem 0; padding: 1rem; }
.page-nav { border-top: 1px solid var(--line); margin-top: 3.5rem; padding-top: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.page-nav a, .page-nav span[aria-disabled] { min-width: 5rem; }
.page-nav a:last-child, .page-nav span:last-child { text-align: right; }
.page-nav span { color: var(--muted); }
@media (min-width: 720px) { .reader { padding-top: 2rem; } .header-inner { padding-inline: 2rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
