/* He Lives library. Tokens first; every color below comes from a theme variable. */
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-display: swap; src: url('/fonts/cormorant-garamond-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url('/fonts/cormorant-garamond-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 200 900; font-display: swap; src: url('/fonts/source-serif-4-latin-wght-normal.woff2') format('woff2-variations'), url('/fonts/source-serif-4-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 200 900; font-display: swap; src: url('/fonts/source-serif-4-latin-wght-italic.woff2') format('woff2-variations'), url('/fonts/source-serif-4-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 200 800; font-display: swap; src: url('/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2') format('woff2-variations'), url('/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: italic; font-weight: 200 800; font-display: swap; src: url('/fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2') format('woff2-variations'), url('/fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'OpenDyslexic'; font-weight: 400; font-display: swap; src: url('/fonts/opendyslexic-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'OpenDyslexic'; font-weight: 700; font-display: swap; src: url('/fonts/opendyslexic-latin-700.woff2') format('woff2'); }

:root {
  --display: 'Cormorant Garamond', 'Palatino Linotype', Palatino, Georgia, serif;
  --serif: 'Source Serif 4', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --dyslexic: 'OpenDyslexic', 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r1: 6px; --r2: 10px;
  /* reader settings, changed by /assets/prefs.js */
  --read-font: var(--serif);
  --fs: 19px;
  --lh: 1.7;
  --ls: 0em;
  --ws: 0em;
  --measure: 38rem;
  --fx-weight: 600;
  /* Night: the brand. Parchment on near-black, one gold. */
  --bg: #07060a; --surface: #121016; --ink: #ece6d8; --muted: #a39a8c; --accent: #e8b86d; --accent-ink: #1a1008;
  --line: rgba(236, 230, 216, 0.14); --dawn: #fff4d6; --mark: rgba(232, 184, 109, 0.16); --focus: #e8b86d;
  color-scheme: dark;
}
/* Dusk: lower contrast and no pure black or white, for light sensitivity and visual snow. */
[data-theme='dusk'] { --bg: #1d1b20; --surface: #25232a; --ink: #cdc5b6; --muted: #9a9284; --accent: #d2aa6b; --accent-ink: #1d1b20; --line: rgba(205, 197, 182, 0.16); --dawn: #e9dcbf; --mark: rgba(210, 170, 107, 0.16); --focus: #d2aa6b; color-scheme: dark; }
[data-theme='paper'] { --bg: #f7f2e8; --surface: #efe8da; --ink: #241e17; --muted: #5f5547; --accent: #845511; --accent-ink: #fffaf0; --line: rgba(36, 30, 23, 0.16); --dawn: #b5781c; --mark: rgba(181, 120, 28, 0.16); --focus: #845511; color-scheme: light; }
[data-theme='sepia'] { --bg: #eadcc2; --surface: #e0d0b2; --ink: #33281c; --muted: #5e4f3c; --accent: #7a4a0e; --accent-ink: #fbf3e2; --line: rgba(51, 40, 28, 0.18); --dawn: #a0661a; --mark: rgba(122, 74, 14, 0.16); --focus: #7a4a0e; color-scheme: light; }
[data-theme='contrast'] { --bg: #000; --surface: #111; --ink: #fff; --muted: #e0e0e0; --accent: #ffd34d; --accent-ink: #000; --line: rgba(255, 255, 255, 0.5); --dawn: #fff; --mark: rgba(255, 211, 77, 0.3); --focus: #ffd34d; color-scheme: dark; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --bg: #f7f2e8; --surface: #efe8da; --ink: #241e17; --muted: #5f5547; --accent: #845511; --accent-ink: #fffaf0; --line: rgba(36, 30, 23, 0.16); --dawn: #b5781c; --mark: rgba(181, 120, 28, 0.16); --focus: #845511; color-scheme: light; }
}
[data-font='sans'] { --read-font: var(--sans); }
[data-font='dyslexic'] { --read-font: var(--dyslexic); }
[data-fx='off'] { --fx-weight: inherit; }
[data-fx='light'] { --fx-weight: 520; }
[data-fx='strong'] { --fx-weight: 720; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--serif); text-rendering: optimizeLegibility; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
.i { flex: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -100px; background: var(--accent); color: var(--accent-ink); padding: var(--s2) var(--s4); border-radius: var(--r1); z-index: 50; }
.skip:focus { top: var(--s2); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Header: brand, where you are, search, settings. */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: var(--s2); max-width: 90rem; margin: 0 auto; padding: var(--s2) var(--s4); min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: var(--ink); text-decoration: none; font: 600 22px/1 var(--display); letter-spacing: 0.01em; white-space: nowrap; }
.brand .mark { color: var(--accent); }
.crumbs { flex: 1; min-width: 0; font: 14px/1.3 var(--ui); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }
.crumbs .sep { margin: 0 var(--s1); opacity: 0.6; }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-width: 44px; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r2); background: transparent; color: var(--ink); font: 15px/1 var(--ui); text-decoration: none; cursor: pointer; }
.tool:hover { border-color: var(--accent); }
.tool[aria-pressed='true'] { background: var(--mark); border-color: var(--accent); }
.tool .lbl { white-space: nowrap; }
@media (max-width: 640px) { .top .tool .lbl { display: none; } .crumbs { font-size: 13px; } .brand span { display: none; } }

/* Page shells */
.wrap { max-width: 72rem; margin: 0 auto; padding: var(--s6) var(--s4) var(--s8); }
.narrow { max-width: 44rem; }
.kicker { font: 600 12px/1.2 var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s2); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 64px); font-weight: 500; letter-spacing: -0.005em; }
h2 { font-size: clamp(28px, 4vw, 36px); }
h3 { font-size: 24px; }
.lede { font-size: 19px; color: var(--muted); max-width: 40rem; margin: var(--s3) 0 0; }
.muted { color: var(--muted); }
.meta { font: 14px/1.5 var(--ui); color: var(--muted); }
section + section { margin-top: var(--s7); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); border-bottom: 1px solid var(--line); padding-bottom: var(--s2); margin-bottom: var(--s4); }
.sec-head a { font: 15px var(--ui); white-space: nowrap; }

/* Home */
.hero { padding: var(--s7) 0 var(--s6); }
.hero h1 { display: flex; align-items: center; gap: var(--s4); font-size: clamp(56px, 12vw, 104px); }
.hero h1 .mark { color: var(--accent); width: 0.62em; height: 0.62em; }
.hero p { font-size: clamp(19px, 2.4vw, 23px); color: var(--muted); max-width: 36rem; margin: var(--s3) 0 var(--s5); }
.searchbox { display: flex; gap: var(--s2); max-width: 40rem; }
.searchbox input { flex: 1; min-width: 0; min-height: 52px; padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); font: 18px var(--ui); }
.searchbox input::placeholder { color: var(--muted); opacity: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 52px; padding: 0 var(--s5); border: 0; border-radius: var(--r2); background: var(--accent); color: var(--accent-ink); font: 600 17px/1 var(--ui); text-decoration: none; cursor: pointer; }
.btn.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.continue { margin-top: var(--s5); font: 16px var(--ui); }
.continue[hidden] { display: none; }

/* The library index: typographic, two columns on wide screens. */
.shelves { display: grid; grid-template-columns: 1fr; gap: var(--s6) var(--s7); }
@media (min-width: 860px) { .shelves { grid-template-columns: 1fr 1fr; } }
.shelf { min-width: 0; }
.shelf h3 a { color: var(--ink); text-decoration: none; }
.shelf h3 a:hover { color: var(--accent); }
.shelf p { margin: var(--s2) 0 var(--s3); color: var(--muted); }
.shelf ul { list-style: none; margin: 0; padding: 0; columns: 2 12rem; column-gap: var(--s5); }
.shelf li { break-inside: avoid; padding: 3px 0; }
.shelf .count { font: 13px var(--ui); color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: var(--s4); align-items: baseline; justify-content: space-between; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.list > li > :first-child { min-width: 0; }
.list .meta { white-space: nowrap; }
@media (max-width: 640px) { .list > li { flex-wrap: wrap; row-gap: var(--s1); } .list .meta { white-space: normal; } }
.list .sub { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }

/* Bible index and chapter grid */
.testaments { display: grid; gap: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 860px) { .testaments { grid-template-columns: 1fr 1fr; } }
.division { margin: var(--s5) 0 var(--s2); font: 600 13px var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.books { list-style: none; margin: 0; padding: 0; columns: 2 10rem; column-gap: var(--s5); }
.books li { padding: 4px 0; break-inside: avoid; }
.chapters { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: var(--s2); margin: 0; padding: 0; }
.chapters a { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: var(--r1); color: var(--ink); text-decoration: none; font: 16px var(--ui); }
.chapters a:hover { border-color: var(--accent); color: var(--accent); }
.chapters a.read { background: var(--mark); }

/* Reader: contents | text | notes and media */
.reader { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 90rem; margin: 0 auto; padding: var(--s5) var(--s4) 120px; gap: var(--s6); }
@media (min-width: 1100px) { .reader { grid-template-columns: 15rem minmax(0, var(--measure)) minmax(0, 18rem); justify-content: center; padding-bottom: var(--s8); } }
.toc { display: none; }
@media (min-width: 1100px) {
  .toc { display: block; position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); overflow: auto; font: 14px/1.45 var(--ui); padding-right: var(--s2); }
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: 5px var(--s2); border-radius: var(--r1); color: var(--muted); text-decoration: none; }
.toc li a:hover { color: var(--ink); background: var(--surface); }
.toc li a[aria-current] { color: var(--ink); background: var(--mark); }
.toc .l2 a { padding-left: var(--s5); } .toc .l3 a { padding-left: var(--s6); font-size: 13px; }
.text-col { min-width: 0; max-width: var(--measure); width: 100%; justify-self: center; }
.page-head { margin-bottom: var(--s5); }
.page-head h1 { font-size: clamp(36px, 6vw, 56px); }
.page-head .meta { margin-top: var(--s2); }
.text { font-family: var(--read-font); font-size: var(--fs); line-height: var(--lh); letter-spacing: var(--ls); word-spacing: var(--ws); hyphens: manual; overflow-wrap: break-word; }
.text b { font-weight: var(--fx-weight); }
.text p, .text .vp { margin: 0 0 0.9em; }
.text .h { font-family: var(--display); font-weight: 600; font-size: 1.3em; line-height: 1.2; margin: 1.4em 0 0.5em; letter-spacing: 0; }
.text .h.l3 { font-size: 1.12em; } .text .h.l4 { font: 600 0.75em/1.3 var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.text .h b, .text .vn b { font-weight: inherit; }
.text .xref { font: italic 0.82em/1.4 var(--ui); color: var(--muted); margin: -0.3em 0 0.8em; }
.text .q { margin: 0; padding-left: 1.5em; text-indent: -1em; }
.text .q.i2 { padding-left: 3em; } .text .q.i3 { padding-left: 4.5em; }
.text .q + :not(.q) { margin-top: 0.9em; }
.text blockquote { margin: 0 0 0.9em; padding-left: 1.2em; border-left: 2px solid var(--line); }
.text .vn { font: 600 0.62em/1 var(--ui); color: var(--muted); vertical-align: 0.42em; margin-right: 0.18em; user-select: none; }
.text .v { scroll-margin-top: 88px; }
.text .v:target, .text .v.hl { background: var(--mark); border-radius: 3px; box-shadow: 0 0 0 2px var(--mark); }
.text .v.playing { background: var(--mark); border-radius: 3px; }
[data-vnum='off'] .text .vn { display: none; }
[data-vline='on'] .text .v { display: block; margin-bottom: 0.45em; }
[data-vline='on'] .text .vp { margin: 0; }
.text .sect-title { font: 600 1.55em/1.2 var(--display); margin: 1.6em 0 0.6em; }
.text sup.fn { font: 600 0.62em/1 var(--ui); vertical-align: 0.5em; }
.text sup.fn a { text-decoration: none; padding: 0 1px 0 0; }
[data-notes='off'] .text sup.fn, [data-notes='off'] .notes { display: none; }
.notes { border-top: 1px solid var(--line); margin-top: var(--s6); padding-top: var(--s4); font: 15px/1.55 var(--ui); color: var(--muted); }
.notes h2 { font: 600 13px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--s3); }
.notes ol { margin: 0; padding-left: 1.6em; }
.notes li { margin-bottom: var(--s2); }
.notes li:target { color: var(--ink); }
.pager { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line); font: 16px var(--ui); }
.pager a { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; text-decoration: none; }
.pager a:hover span { text-decoration: underline; }
.pager .next { margin-left: auto; text-align: right; }

/* Right rail: art, maps, videos, articles, downloads */
.rail { min-width: 0; font: 15px/1.5 var(--ui); }
@media (min-width: 1100px) { .rail { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); overflow: auto; } }
.rail h2 { font: 600 12px var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: var(--s5) 0 var(--s2); }
.rail h2:first-child { margin-top: 0; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li { margin-bottom: var(--s2); }
.figure { margin: 0 0 var(--s4); }
.figure img { display: block; width: 100%; border-radius: var(--r1); background: var(--surface); }
.figure figcaption { font: 13px/1.4 var(--ui); color: var(--muted); margin-top: var(--s1); }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r1); overflow: hidden; background: var(--surface); border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.88; }
.yt .play { position: absolute; inset: auto auto var(--s2) var(--s2); display: inline-flex; align-items: center; gap: var(--s1); background: var(--bg); color: var(--ink); border-radius: var(--r1); padding: var(--s1) var(--s2); font: 600 13px var(--ui); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-title { display: block; margin: var(--s1) 0 var(--s4); font-size: 14px; }

/* Phone bottom bar: thumb-reach controls on reading pages. */
.dock { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: var(--s1); padding: var(--s2) var(--s3) max(var(--s2), env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.dock .tool { flex: 1; flex-direction: column; gap: 2px; min-height: 52px; border: 0; font-size: 12px; padding: 0 var(--s1); }
.dock .tool .lbl { display: inline; }
.dock .tool[aria-disabled='true'] { opacity: 0.35; pointer-events: none; }
@media (min-width: 1100px) { .dock { position: static; display: none; } }
.desk-tools { display: none; }
@media (min-width: 1100px) { .desk-tools { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); } }

/* Settings and sounds sheets */
dialog.sheet { border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); color: var(--ink); padding: 0; width: min(30rem, calc(100vw - 24px)); max-height: min(86vh, 46rem); font: 16px/1.45 var(--ui); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
@media (max-width: 640px) { dialog.sheet { margin: auto 12px 12px; width: auto; max-width: none; } }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font: 600 18px var(--ui); }
.sheet-body { padding: var(--s3) var(--s4) var(--s5); }
.field { margin: var(--s4) 0; border: 0; padding: 0; }
.field legend, .field > label:first-child { display: block; font: 600 14px var(--ui); margin-bottom: var(--s2); padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: var(--s2); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r1); font-size: 15px; }
.seg input:checked + span { border-color: var(--accent); background: var(--mark); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.swatch { width: 18px; height: 18px; border-radius: 50%; margin-right: var(--s2); border: 1px solid var(--line); }
input[type='range'] { width: 100%; accent-color: var(--accent); min-height: 32px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.sample { margin-top: var(--s2); padding: var(--s3); border: 1px dashed var(--line); border-radius: var(--r1); font-family: var(--read-font); font-size: var(--fs); line-height: var(--lh); letter-spacing: var(--ls); word-spacing: var(--ws); }
.sample b { font-weight: var(--fx-weight); }

/* Reading ruler: a soft band that follows the line being read. */
.ruler { position: fixed; left: 0; right: 0; height: calc(var(--fs) * var(--lh) * 1.15); pointer-events: none; z-index: 15; background: var(--mark); display: none; }
[data-ruler='on'] .ruler { display: block; }
[data-ruler='dim'] .ruler { display: block; background: transparent; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.42); }

/* Search */
.results { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.results li { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.results .ref { font: 600 15px var(--ui); }
.results .snip { margin-top: var(--s1); }
.results mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

/* Galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--s5); }
.gallery .figure img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery.maps .figure img { object-fit: contain; background: var(--surface); }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--s5); }

.foot { border-top: 1px solid var(--line); margin-top: var(--s7); }
.foot-in { max-width: 72rem; margin: 0 auto; padding: var(--s5) var(--s4) 120px; font: 14px/1.6 var(--ui); color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
@media (min-width: 1100px) { .foot-in { padding-bottom: var(--s6); } }
.foot a { color: var(--muted); }

.notice { border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s3) var(--s4); background: var(--surface); font: 15px/1.5 var(--ui); margin: var(--s4) 0; }

/* Print: black on white, no chrome, text only. */
@media print {
  :root, [data-theme] { --bg: #fff; --surface: #fff; --ink: #000; --muted: #333; --accent: #000; --line: #999; --mark: transparent; color-scheme: light; }
  @page { margin: 18mm 16mm; }
  body { font-size: 11.5pt; }
  .top, .dock, .toc, .rail, .pager, .desk-tools, .foot, .skip, .ruler, dialog, .no-print { display: none !important; }
  .reader, .wrap { display: block; padding: 0; max-width: none; }
  .text-col { max-width: none; }
  .text { font-size: 11.5pt; line-height: 1.5; }
  a { color: #000; text-decoration: none; }
  .text sup.fn a { text-decoration: none; }
  .print-break { break-before: page; }
  .text .h, .sect-title, h1, h2 { break-after: avoid; }
  .text p, .text .vp { orphans: 3; widows: 3; }
}

/* The verse or paragraph being read aloud. A soft band, no motion. */
.text .reading { background: var(--mark); border-radius: 3px; box-shadow: 0 0 0 3px var(--mark); }
[hidden] { display: none !important; }
kbd { font: 600 0.85em var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }

/* Signs and wonders */
.miracles blockquote { margin: 0 0 var(--s4); padding-left: var(--s4); border-left: 2px solid var(--accent); }
.miracles blockquote p { margin: 0 0 var(--s1); }
.miracles .case { margin-top: var(--s6); }
.miracles .case h3 { margin-bottom: var(--s2); }
.miracles dl { margin: var(--s4) 0 0; }
.miracles dt { font: 600 14px/1.4 var(--ui); margin-top: var(--s3); }
.miracles dd { margin: var(--s1) 0 0; }
.miracles dd ul { margin: 0; padding-left: 1.2em; }
.miracles .grades dd { color: var(--muted); }

/* The evidence for Christ */
.evidence.narrow { max-width: 42rem; --fig-max: min(28rem, 60vh); }
#grades { scroll-margin-top: 5rem; }
.evidence .prose { font: var(--fs)/var(--lh) var(--read-font); letter-spacing: var(--ls); word-spacing: var(--ws); max-width: var(--measure); }
.evidence .prose b, .ev-quote b { font-weight: var(--fx-weight); }
.evidence .lede { color: var(--ink); margin-bottom: var(--s5); }
.ev-grade { font: max(16px, calc(var(--fs) * 0.82))/1.5 var(--ui); margin: 0 0 var(--s3); color: var(--ink); }
.ev-grade a { display: inline-block; padding: 10px 0; font-weight: 600; }
.ev-short { max-width: 44rem; margin: var(--s6) 0 0; padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); }
.ev-short h2 { margin: 0 0 var(--s2); }
.ev-short ol { margin: 0; padding-left: 1.4em; }
.ev-short a { display: inline-flex; padding: 10px 0; }
.ev-hero { display: block; width: 100%; height: auto; max-height: 56vh; object-fit: cover; object-position: 50% 30%; border-radius: var(--r1); background: var(--surface); }
.ev-hero + .meta { margin: var(--s1) 0 var(--s6); }
.evidence > h1 { text-wrap: balance; }
.ev-hero ~ h1 { font-size: clamp(48px, 9vw, 96px); line-height: 1; }
.ev-verse { margin: var(--s6) 0; padding: 0; max-width: 44rem; }
.ev-verse p { font: 500 max(var(--fs), clamp(26px, 4vw, 38px))/1.25 var(--display); margin: 0 0 var(--s2); text-wrap: pretty; }
.ev-verse footer, .ev-quote footer { font: max(15px, calc(var(--fs) * 0.75))/1.5 var(--ui); color: var(--muted); }
.ev-quote { margin: var(--s4) 0; padding-left: var(--s4); border-left: 2px solid var(--accent); }
.ev-quote p { font: calc(var(--fs) * 1.1)/var(--lh) var(--read-font); letter-spacing: var(--ls); word-spacing: var(--ws); margin: 0 0 var(--s1); }
[data-font='sans'] .ev-verse p, [data-font='dyslexic'] .ev-verse p { font-family: var(--read-font); font-weight: 400; }
.ev-parts { list-style: none; margin: var(--s7) 0; padding: 0; border-top: 1px solid var(--line); }
.ev-row { position: relative; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 15rem; gap: var(--s5); align-items: center; padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.ev-row .n { font: 500 44px/1 var(--display); color: var(--accent); }
.ev-row h2 a { color: inherit; text-decoration: none; }
.ev-row h2 a::after { content: ''; position: absolute; inset: 0; }
.ev-row:hover h2 a { text-decoration: underline; text-decoration-thickness: 1px; }
.ev-row p.prose { margin: var(--s2) 0 0; color: var(--muted); max-width: 34rem; }
.ev-row p.meta { margin: var(--s2) 0 0; }
.ev-row img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 12%; border-radius: var(--r1); background: var(--surface); }
.ev-close { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: var(--s6); align-items: center; margin-top: var(--s8); }
.evidence .exhibit { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.evidence .exhibit h2 { margin-bottom: var(--s2); }
.evidence .notice ul, .evidence dd ul { margin: 0; padding-left: 1.2em; } .evidence .notice p { margin: 0; }
.evidence .notice a { display: inline-flex; padding: 11px 0; font-size: max(15px, calc(var(--fs) * 0.78)); }
.evidence dl { margin: var(--s4) 0 0; }
.evidence .exhibit > .meta { font-size: max(14px, calc(var(--fs) * 0.75)); }
.evidence dt { font: 600 max(14px, calc(var(--fs) * 0.78))/1.4 var(--ui); margin-top: var(--s3); }
.evidence dd { margin: var(--s1) 0 0; }
.evidence .grades dd { color: var(--muted); }
.evidence .grades ~ p, .ev-close p { max-width: 40rem; }
.ev-close .ev-verse { margin: var(--s5) 0 0; }
.ev-close .ev-verse p { font-size: max(var(--fs), clamp(24px, 3vw, 30px)); max-width: none; }
@media (max-width: 700px) {
  .ev-row { grid-template-columns: 1fr; gap: var(--s3); }
  .ev-row img { grid-row: 1; }
  .ev-row .n { font-size: 36px; }
  .ev-close { grid-template-columns: 1fr; gap: var(--s4); }
}
@media print { .evidence { --fs: 11.5pt; --lh: 1.5; } .ev-quote p, .ev-grade { font-size: 11.5pt; } .ev-verse p, .ev-close .ev-verse p { font-size: 14pt; } .evidence .notice { display: none; } }
