/* ItsBible · /css/pages.css · every page but the home: the reader, the study panel, Ask and Plus, topics, plans,
 * the book index, About, Start and 404. It loads after /site.css (tokens, type, masthead, buttons, .prose) and keeps
 * the page components' own rules, now drawn from the open Bible's tokens, then lays the reading on leaves of Bible
 * paper over the linen ground. */

/* Cormorant italic, for the reader's italic display lines (the home and guides do without it) */
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorantitalic.woff2") format("woff2-variations"); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorantitalic-ext.woff2") format("woff2-variations"); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cormorantitalic-vi.woff2") format("woff2-variations"); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

/* The page components' names for the tokens */
:root {
  --bg: var(--color-paper-3); --surface: var(--color-paper); --wash: var(--color-paper-2);
  --ink: var(--color-ink); --muted: var(--color-muted); --faint: var(--color-muted);
  --accent: var(--color-accent); --accentink: var(--color-gilt-ink);
  --border: color-mix(in oklab, var(--color-rule) 75%, transparent); --borderhi: var(--color-rule);
  --display: var(--font-display); --serif: var(--font-body); --sans: var(--font-body);
  --maxw: 44rem;
  --hlgold: #f4e7c6; --hlsage: #e2ebd8; --hlrose: #f5e1da; --hlsky: #dee8f1;
  --swgold: #d4b26a; --swsage: #9db487; --swrose: #d69a89; --swsky: #8eaecd;
}
:root[data-theme="dark"] { --hlgold: #3b3222; --hlsage: #27301f; --hlrose: #3b2723; --hlsky: #202b36; --swgold: #c9ad79; --swsage: #8fa878; --swrose: #c98b7a; --swsky: #7d9fc0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hlgold: #3b3222; --hlsage: #27301f; --hlrose: #3b2723; --hlsky: #202b36; --swgold: #c9ad79; --swsage: #8fa878; --swrose: #c98b7a; --swsky: #7d9fc0; } }

/* ---------- The page components (from the pre-2026-11 stylesheet, kept as they were) ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
main { display: block; padding-bottom: 4rem; }
a { color: var(--accentink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.15; letter-spacing: 0.005em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); margin: 0 0 0.8rem; }
h2 { font-size: 1.9rem; margin: 2.8rem 0 0.6rem; }
h3 { font-size: 1.4rem; margin: 1.6rem 0 0.4rem; }
p { text-wrap: pretty; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; margin-top: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.wrapwide { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.wrapxl { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* labels: small, tracked, quiet */
.label, .kicker, .rubric, .runninghead, .datechip, .toc-k { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.6rem; }
.runninghead { display: flex; gap: 0.6rem; justify-content: center; }
.runninghead.left { justify-content: flex-start; }
.sectionhead { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); text-align: center; margin: 4.5rem 0 2rem; }
.sectionhead::after { content: ""; display: block; width: 2.5rem; height: 1px; margin: 1rem auto 0; background: var(--accent); }
.fine { color: var(--faint); font-size: 0.82rem; line-height: 1.5; margin: 1rem 0 0; }
.mark { width: 0.95rem; height: 1.3rem; color: var(--accent); flex: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.55rem 1.25rem; border: 1px solid var(--borderhi); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 0.93rem; text-decoration: none; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); color: var(--bg); }
.btn.quiet { border-color: transparent; color: var(--muted); padding-left: 0.8rem; padding-right: 0.8rem; }
.btn.quiet:hover { color: var(--ink); border-color: var(--border); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg { width: 1em; height: 1em; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.3rem; }
.chips .label { width: 100%; margin: 0; }
.chip { min-height: 2.75rem; padding: 0.45rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; transition: border-color 0.2s ease; }
.chip:hover { border-color: var(--accent); }

/* home: the verse of the day */
.hero { padding: 6rem 0 5rem; text-align: center; }
.hero .label { margin-bottom: 1.6rem; }
.hero .mark { display: block; width: 1.1rem; height: 1.5rem; margin: 0 auto 1.8rem; }
.verse { margin: 0 auto; max-width: 40rem; font-family: var(--display); font-size: clamp(1.9rem, 4.2vw, 2.85rem); font-weight: 500; line-height: 1.28; color: var(--ink); text-wrap: balance; animation: rise 0.9s ease both; }
.ref { display: flex; justify-content: center; align-items: baseline; gap: 0.8rem; margin: 1.6rem 0 0; color: var(--faint); font-size: 0.85rem; }
.ref a { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accentink); text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 2.4rem; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* home: a returning reader's place and streak, the daily verse invite, and notes from the email links */
.welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 1.2rem; margin: -1.5rem 0 2.6rem; animation: rise 0.6s ease both; }
.pill { display: inline-flex; align-items: baseline; gap: 0.5rem; min-height: 2.75rem; padding: 0.6rem 1.15rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 0.92rem; text-decoration: none; transition: border-color 0.2s ease; }
.pill:hover { border-color: var(--accent); color: var(--ink); }
.pill .wk { color: var(--muted); }
.pill .wv { font-family: var(--display); font-size: 1.15rem; font-weight: 600; line-height: 1; }
.pill .wv::after { content: " \2192"; font-family: var(--sans); font-size: 0.85rem; font-weight: 400; color: var(--accentink); }
[dir="rtl"] .pill .wv::after { content: " \2190"; }
.wstreak { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accentink); }
.homenote { max-width: 32rem; margin: -1.5rem auto 2.4rem; padding: 0.75rem 1.1rem; border: 1px solid var(--borderhi); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 0.95rem; animation: rise 0.5s ease both; }
.linkish { padding: 0; border: none; background: none; color: var(--accentink); font: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.dailyinvite { display: flex; justify-content: center; margin-top: 1.6rem; }
.invite { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 2.75rem; padding: 0.4rem 0.6rem; border: none; background: none; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; transition: color 0.2s ease; }
.invite:hover { color: var(--ink); }
.invite svg { width: 1.1rem; height: 1.1rem; color: var(--accent); }
.dailyinvite .dailyform { width: min(100%, 28rem); text-align: start; animation: rise 0.4s ease both; }

/* home: ask and a psalm, side by side */
.duo { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--wash); }
.duogrid { display: grid; grid-template-columns: 1.25fr 1fr; }
.askinline, .psalm { padding: 3rem 2.5rem 2.8rem; }
.askinline { padding-inline-start: 0; border-inline-end: 1px solid var(--border); }
.psalm { padding-inline-end: 0; text-decoration: none; color: var(--ink); }
.askinline h2, .psalm h2 { margin: 0 0 1rem; font-size: 2rem; }
.askinline textarea, .askform textarea, .askcard textarea { width: 100%; resize: vertical; min-height: 3.5rem; padding: 0.6rem 0; border: none; border-bottom: 1px solid var(--borderhi); border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-family: var(--serif); font-size: 1.1rem; line-height: 1.55; }
.askinline textarea:focus, .askform textarea:focus, .askcard textarea:focus { outline: none; border-bottom-color: var(--ink); }
.askrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.askrow .fine { margin: 0; }
.psalmtext { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; line-height: 1.7; color: var(--muted); }
.more { display: inline-block; margin-top: 1rem; font-size: 0.85rem; color: var(--accentink); }
.more::after { content: " \2192"; }
.psalm:hover .more { color: var(--ink); }

/* home: the books, as a quiet index */
.testaments { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.testaments h3 { margin: 0 0 1.4rem; font-size: 1.7rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border); }
.genre { margin-bottom: 1.3rem; }
.genre .label { margin-bottom: 0.35rem; font-size: 0.66rem; color: var(--faint); }
.books { display: flex; flex-wrap: wrap; gap: 0 1.15rem; margin: 0; line-height: 2; }
.books a { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 0.98rem; white-space: nowrap; }
.books a:hover { color: var(--accentink); text-decoration: underline; }

/* home: a real answer */
.showcase { margin-top: 2rem; }
.showgrid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; padding-top: 2.5rem; }
.sample { padding: 2.2rem 2.4rem 1.4rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.sampleq { margin: 0 0 1rem; font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--muted); }
.sample .label { margin-bottom: 0.4rem; }
.why h2 { margin: 0 0 1.2rem; font-size: 2.2rem; }
.pillars { list-style: none; counter-reset: p; padding: 0; margin: 0 0 1.8rem; }
.pillars li { counter-increment: p; position: relative; padding-block: 0 1rem; padding-inline: 2.2rem 0; color: var(--muted); }
.pillars li::before { content: counter(p, upper-roman); position: absolute; inset-inline-start: 0; top: 0.05rem; font-family: var(--display); font-size: 1.1rem; color: var(--accent); }
.pillars li b { color: var(--ink); font-weight: 600; }

/* home: feelings */
.wordline { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 2rem; margin: 0; line-height: 2; font-family: var(--display); font-size: 1.5rem; }
.wordline a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordline a:hover { color: var(--accentink); }

/* answers and verses */
.answerslot:empty { display: none; }
.answerslot { margin: 2.2rem 0; scroll-margin-top: 6rem; }
.answer { animation: rise 0.5s ease both; }
.answer h2 { margin: 0 0 1rem; font-size: 2rem; }
.answer > p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; }
.answer > p.fine { font-family: var(--sans); font-size: 0.82rem; line-height: 1.5; }
.answer > h2 + p::first-letter, .illumcap::first-letter { float: inline-start; margin-block-start: 0.06em; margin-inline-end: 0.1em; font-family: var(--display); font-size: 3.9em; font-weight: 500; line-height: 0.8; color: var(--accent); }
p.illumcap { display: flow-root; }
.answer .chips { justify-content: flex-start; margin: 1.8rem 0 0.4rem; }
.answer .chips .chip { text-align: left; }
.versecard { margin: 1.2rem 0; padding-block: 0.2rem; padding-inline: 1.4rem 0; border-inline-start: 2px solid var(--accent); }
figure.versecard { margin-left: 0; margin-right: 0; }
.versecard blockquote { margin: 0; font-family: var(--serif); font-size: 1.1rem; line-height: 1.7; }
.versecard footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.8rem; margin-top: 0.5rem; color: var(--faint); font-size: 0.82rem; }
.versecard footer a { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accentink); text-decoration: none; }
.versenote { margin: 0.4rem 0 0; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 0.92rem; }
sup.vnum { margin-right: 0.35em; color: var(--accent); font-family: var(--sans); font-size: 0.6em; font-weight: 600; }
.copybtn { padding: 0; border: none; background: none; color: var(--muted); font: inherit; font-size: 0.82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 0.16em; }
.copybtn:hover { color: var(--ink); }
.thinking { padding: 2.5rem 0; text-align: center; color: var(--muted); font-family: var(--display); font-style: italic; font-size: 1.25rem; }
.thinking svg { display: block; width: 9rem; height: 1.8rem; margin: 0 auto 0.8rem; color: var(--accent); }
.thinking svg path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: ink 2.4s ease-in-out infinite; }
@keyframes ink { 0% { stroke-dashoffset: 260; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -260; } }
.status { padding: 2rem 0; text-align: center; color: var(--muted); font-family: var(--display); font-style: italic; font-size: 1.2rem; }

/* inner page heads */
.pagedawn, .askdawn { padding: 4.5rem 0 1rem; }
.pagehead { display: grid; grid-template-columns: 1.4fr 1fr; gap: 4rem; align-items: end; }
.pagehead h1 { margin-bottom: 0.6rem; }

/* ask */
.askgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.askfolio { text-align: center; padding: 1rem 0 0.5rem; }
.askfolio .lede { margin: 0 auto 2rem; }
.asknote { max-width: 34rem; margin: 0 auto 1.2rem; padding: 0.7rem 1rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 0.95rem; }
.askform { max-width: 36rem; margin: 0 auto; text-align: start; }
.askform textarea { font-size: 1.2rem; }
.askleft { color: var(--faint); font-size: 0.85rem; }
.askmain .answerslot { padding: 2.2rem 2.4rem 1.4rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.askmain .answerslot:has(.plusbox), .askmain .answerslot:has(> .status), .askmain .answerslot:has(> .thinking) { padding: 0; border: none; background: none; }
/* ask: a thread of questions and answers; the composer moves under the latest answer */
.threaded .askfolio h1, .threaded .askfolio .lede, .threaded .starters { display: none; }
.threaded .askfolio { padding-bottom: 0; }
.turn { scroll-margin-top: 6rem; animation: rise 0.35s ease both; }
.turn + .turn { margin-top: 2.8rem; }
.turn > .question { margin: 0 0 1.1rem; padding-inline-start: 1rem; border-inline-start: 2px solid var(--accent); font-family: var(--display); font-size: 1.6rem; font-style: italic; line-height: 1.3; }
.turn .answerslot { margin: 0; }
.threaded .askform { max-width: none; margin-top: 2.2rem; }
.askside { position: sticky; top: 6rem; display: grid; gap: 1.6rem; padding-top: 1rem; }
.sidecard, .askcard, .psalmcard, .explainrail { display: block; padding: 1.5rem 1.6rem 1.2rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--ink); text-decoration: none; }
.askcard h2, .psalmcard h3 { margin: 0 0 0.8rem; font-size: 1.6rem; }
.askcard .btn { width: 100%; margin-top: 0.9rem; }
.askhints { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.9rem; }
.sidecard .pillars { margin: 0.6rem 0 0.2rem; }
.sidecard .pillars li { font-size: 0.92rem; }
.qlist { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.qlist li + li { border-top: 1px solid var(--border); }
.qlist button { width: 100%; min-height: 2.9rem; padding: 0.5rem 0; border: none; background: none; color: var(--ink); font: inherit; font-family: var(--serif); font-style: italic; text-align: start; cursor: pointer; }
.qlist button:hover { color: var(--accentink); }

/* plus */
.answer > p.leftnote { margin-top: 0.4rem; }
.lastfree { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; margin: 1.6rem 0 0.4rem; padding: 1rem 1.2rem; border: 1px solid var(--borderhi); border-inline-start: 2px solid var(--accent); border-radius: 4px; background: var(--wash); animation: rise 0.5s ease both; }
.lastfree p { flex: 1 1 14rem; margin: 0; font-size: 0.95rem; color: var(--ink); }
.plusbox { padding: 2rem 2rem 1.5rem; border: 1px solid var(--borderhi); border-radius: 4px; background: var(--surface); animation: rise 0.5s ease both; }
.plusbox h2 { margin: 0 0 1rem; font-size: 1.9rem; }
.plusbox .label { color: var(--accentink); }
.pluslist { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.pluslist li { position: relative; padding-block: 0.3rem; padding-inline: 1.5rem 0; font-size: 0.97rem; }
.pluslist li::before { content: ""; position: absolute; inset-inline-start: 0.1rem; top: 0.95rem; width: 0.55rem; height: 1px; background: var(--accent); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.planbtn { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; min-height: 4.6rem; padding: 0.9rem 1.1rem; border: 1px solid var(--borderhi); border-radius: 4px; background: var(--bg); color: var(--ink); font: inherit; text-align: start; cursor: pointer; transition: border-color 0.2s ease; }
.planbtn:hover, .planbtn.primary { border-color: var(--ink); }
.planbtn:disabled { opacity: 0.6; cursor: progress; }
.planbtn .price { font-family: var(--display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.planbtn .per { color: var(--muted); font-size: 0.85rem; }
.planbtn .save { margin-top: 0.3rem; color: var(--accentink); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.askside .plans { grid-template-columns: 1fr 1fr; }
.restore { margin-top: 1.1rem; font-size: 0.92rem; }
.restore summary { display: flex; align-items: center; min-height: 2.75rem; color: var(--accentink); cursor: pointer; }
.restoreform { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.restoreform input { flex: 1 1 13rem; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--borderhi); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; }
.restoreform .fine { width: 100%; margin-top: 0.3rem; }

/* reader */
.progresstrack { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 2px; pointer-events: none; }
.progresstrack > div { height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; will-change: transform; }
[dir="rtl"] .progresstrack > div { transform-origin: right; }
.readwrap { padding-top: 2rem; }
.readerbar { position: sticky; top: var(--headh, 4.4rem); z-index: 10; display: flex; align-items: center; gap: 0.5rem; max-width: 44rem; margin: 0 auto 2.2rem; padding: 0.5rem 0; background: var(--bg); border-bottom: 1px solid var(--border); transition: transform 0.3s ease; }
.readerbar .crumbs { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readtools { display: flex; align-items: center; gap: 0.4rem; flex: none; margin-inline-start: auto; }
.btn.icon { width: 2.6rem; min-height: 2.6rem; padding: 0; }
.btn.icon svg { width: 1.1rem; height: 1.1rem; }
details.aa { position: relative; }
details.aa > summary { list-style: none; font-family: var(--display); font-size: 1.15rem; }
details.aa > summary::-webkit-details-marker { display: none; }
details.aa[open] > summary { border-color: var(--ink); }
.aapanel { position: absolute; top: calc(100% + 0.5rem); inset-inline-end: 0; z-index: 30; display: flex; gap: 0.4rem; padding: 0.45rem; border: 1px solid var(--borderhi); border-radius: 999px; background: var(--surface); box-shadow: 0 10px 30px rgba(28, 26, 23, 0.14); animation: rise 0.2s ease both; }
.aapanel .btn { width: 2.75rem; min-height: 2.75rem; padding: 0; font-family: var(--display); }
/* The panel hangs from the right of the whole toolbar, so on a phone it never runs off the left edge. */
.readtools { position: relative; }
details.voices { position: static; }
details.voices > summary { list-style: none; }
details.voices > summary::-webkit-details-marker { display: none; }
details.voices[open] > summary { border-color: var(--ink); }
.voicepanel { position: absolute; top: calc(100% + 0.5rem); inset-inline-end: 0; z-index: 30; width: min(17rem, 82vw); padding: 0.8rem; border: 1px solid var(--borderhi); border-radius: 1.1rem; background: var(--surface); box-shadow: 0 10px 30px rgba(28, 26, 23, 0.14); animation: rise 0.2s ease both; }
.voicepanel .rubric { margin: 0 0 0.45rem 0.7rem; color: var(--accentink); }
.voiceopt { display: grid; gap: 0.05rem; width: 100%; padding: 0.55rem 0.7rem; border: 1px solid transparent; border-radius: 0.75rem; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease; }
.voiceopt:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.voiceopt[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.voiceopt .vname { font-family: var(--display); font-size: 1.15rem; line-height: 1.2; }
.voiceopt .vabout { color: var(--muted); font-size: 0.8rem; }
.voicepanel .vhint { margin: 0.5rem 0.7rem 0.1rem; color: var(--muted); font-size: 0.78rem; }
.aasmall { font-size: 0.95rem; }
.aabig { font-size: 1.5rem; }
.explainbtn .short { display: none; }
/* while reading down a chapter the header steps aside and the reader bar takes its place */
header.site { transition: transform 0.3s ease; }
.headoff header.site { transform: translateY(-100%); }
.headoff .readerbar { transform: translateY(calc(-1 * var(--headh, 4.4rem))); }
select { min-height: 2.6rem; padding-block: 0; padding-inline: 0.9rem 2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.93rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 1rem center, right 0.7rem center; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; cursor: pointer; }
.explainbtn { margin-inline-start: auto; min-height: 2.6rem; }
.readgrid { display: grid; grid-template-columns: 10rem minmax(0, 42rem) 14rem; justify-content: center; gap: 3rem; align-items: start; }
.chapterrail, .explainrail { position: sticky; top: 9.5rem; }
.railgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.2rem; max-height: 60vh; overflow-y: auto; }
.railgrid a { display: grid; place-items: center; height: 1.9rem; border-radius: 999px; color: var(--faint); font-size: 0.8rem; text-decoration: none; }
.railgrid a:hover { color: var(--ink); }
.railgrid a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.railintro p { margin: 0.3rem 0 0.9rem; color: var(--muted); font-size: 0.9rem; }
.railintro .btn { width: 100%; font-size: 0.88rem; }
.scripture { font-family: var(--serif); font-size: var(--readsize, 1.2rem); line-height: 1.85; }
.scripture h1 { margin: 0.5rem 0 0.4rem; text-align: center; font-size: 2.8rem; }
.chapterrule { display: flex; justify-content: center; margin: 0 0 2rem; color: var(--accent); }
.chapterrule svg { width: 6rem; height: 0.8rem; }
.scripture p { margin: 0 0 0.45rem; }

/* study: the panel beside the text while a chapter or picked verses are explained; a sheet on small screens */
.studypanel { display: none; }
.studying .studypanel { display: block; }
.studying .railintro { display: none; }
.readwrap.studying { max-width: 86rem; }
.studying .readerbar { max-width: none; }
.studying .readgrid { grid-template-columns: 9rem minmax(0, 40rem) minmax(min(21rem, 100%), 27rem); gap: 2.6rem; }
.studying .explainrail { max-height: calc(100vh - 10.5rem); overflow-y: auto; overscroll-behavior: contain; padding: 0 1.6rem 1rem; animation: rise 0.35s ease both; }
.studyhead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 -1.6rem; padding: 0.7rem 0.9rem 0.6rem 1.6rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.studyhead .rubric { margin: 0; color: var(--accentink); letter-spacing: 0.16em; }
.studyclose { flex: none; width: 2.75rem; height: 2.75rem; border: none; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.studyclose:hover { color: var(--ink); background: var(--wash); }
#explainout { margin: 1.2rem 0 0; }
.explainrail .answer h2 { font-size: 1.6rem; line-height: 1.2; }
.explainrail .answer > p.prose { font-size: 0.98rem; line-height: 1.72; }
.explainrail .versecard blockquote { font-size: 0.98rem; }
.explainrail .thinking { padding: 3rem 0; font-size: 1.1rem; }
.explainrail .plusbox { padding: 1.3rem 1.2rem 1rem; border: none; }
.explainrail .plusbox h2 { font-size: 1.5rem; }
.explainrail .plans { grid-template-columns: 1fr 1fr; }
@media (max-width: 1320px) {
  .studying .chapterrail { display: none; }
  .studying .readgrid { grid-template-columns: minmax(0, 40rem) minmax(min(20rem, 100%), 26rem); }
}

/* highlights kept on this device: a quiet wash; neighbours of one color read as one passage */
.scripture p[data-hl="gold"] { --hl: var(--hlgold); }
.scripture p[data-hl="sage"] { --hl: var(--hlsage); }
.scripture p[data-hl="rose"] { --hl: var(--hlrose); }
.scripture p[data-hl="sky"] { --hl: var(--hlsky); }
.scripture p[data-hl] { background: var(--hl); box-shadow: -0.4rem 0 0 var(--hl), 0.4rem 0 0 var(--hl); }
.scripture p[data-hl="gold"]:has(+ p[data-hl="gold"]), .scripture p[data-hl="sage"]:has(+ p[data-hl="sage"]),
.scripture p[data-hl="rose"]:has(+ p[data-hl="rose"]), .scripture p[data-hl="sky"]:has(+ p[data-hl="sky"]) { margin-bottom: 0; padding-bottom: 0.45rem; border-end-start-radius: 0; border-end-end-radius: 0; }
.scripture p[data-hl="gold"] + p[data-hl="gold"], .scripture p[data-hl="sage"] + p[data-hl="sage"],
.scripture p[data-hl="rose"] + p[data-hl="rose"], .scripture p[data-hl="sky"] + p[data-hl="sky"] { border-start-start-radius: 0; border-start-end-radius: 0; }

/* picked verses and the bar that acts on them */
.scripture p[id^="v"] { cursor: pointer; border-radius: 3px; transition: background-color 0.2s ease; -webkit-tap-highlight-color: transparent; }
.scripture p.picked, .scripture p.studied { --hl: color-mix(in srgb, var(--accent) 16%, var(--bg)); background: var(--hl); box-shadow: -0.4rem 0 0 var(--hl), 0.4rem 0 0 var(--hl); }
.scripture p.studied:not(.picked) { --hl: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
/* neighbours read as one passage: the gap between them is filled instead of left as a stripe */
.scripture p.picked:has(+ p.picked), .scripture p.studied:not(.picked):has(+ p.studied:not(.picked)) { margin-bottom: 0; padding-bottom: 0.45rem; border-end-start-radius: 0; border-end-end-radius: 0; }
.scripture p.picked + p.picked, .scripture p.studied:not(.picked) + p.studied:not(.picked) { border-start-start-radius: 0; border-start-end-radius: 0; }
.scripture p.picked sup.vnum { color: var(--accentink); }
.scripture:focus-visible { outline: 1px dashed var(--borderhi); outline-offset: 0.8rem; border-radius: 4px; }
.scripture:focus-visible:has(p.cursor) { outline: none; }
.scripture:focus-visible p.cursor { outline: 2px solid var(--accent); outline-offset: 0.25rem; }
.scripture p.versehint { display: none; margin: -1.2rem 0 1.6rem; text-align: center; color: var(--faint); font-family: var(--sans); font-size: 0.78rem; line-height: 1.5; }
.versebar { position: fixed; inset-inline: 0; bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 36; width: min(30rem, calc(100% - 1.5rem)); margin: 0 auto; padding: 0.35rem 0.9rem 0.9rem; border: 1px solid var(--borderhi); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 44px rgba(28, 26, 23, 0.16); animation: rise 0.25s ease both; }
.vbtop { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.vbref { margin: 0; font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accentink); }
.vbclose { flex: none; width: 2.75rem; height: 2.75rem; margin-inline-end: -0.6rem; border: none; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.vbclose:hover { color: var(--ink); }
.vbacts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.vbacts .btn, .vbform .btn { min-height: 2.75rem; font-size: 0.92rem; }
.vbform { display: flex; gap: 0.5rem; }
.vbform input { flex: 1; min-width: 0; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--borderhi); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
.vbform input:focus { outline: none; border-color: var(--accent); }

.vbtools { display: flex; align-items: center; gap: 0.2rem; margin: 0 0 0.55rem; }
.swatches { display: flex; margin-inline-end: auto; margin-inline-start: -0.4rem; }
.swatch { display: grid; place-items: center; width: 2.5rem; height: 2.75rem; padding: 0; border: none; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.swatch::before { content: ""; width: 1.4rem; height: 1.4rem; border-radius: 999px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(28, 26, 23, 0.08); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.swatch:hover::before { transform: scale(1.12); }
.swatch[aria-pressed="true"]::before { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--sw); }
.swatch[data-col="gold"] { --sw: var(--swgold); }
.swatch[data-col="sage"] { --sw: var(--swsage); }
.swatch[data-col="rose"] { --sw: var(--swrose); }
.swatch[data-col="sky"] { --sw: var(--swsky); }
.tool { min-height: 2.75rem; padding: 0.4rem 0.65rem; font-size: 0.86rem; }
.tool svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 370px) { .tool span { display: none; } }

.imagesheet { width: min(25rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0.7rem 1rem 1.1rem; border: 1px solid var(--borderhi); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 70px rgba(19, 18, 16, 0.3); }
.imagesheet[open] { animation: rise 0.3s ease both; }
.imagesheet:focus-visible { outline: none; }
.imagesheet::backdrop { background: rgba(19, 18, 16, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.imgclose { display: flex; justify-content: flex-end; margin: 0 -0.5rem 0.3rem 0; }
.imagesheet img { display: block; width: 100%; height: auto; max-height: 64dvh; object-fit: contain; border-radius: 3px; box-shadow: 0 8px 28px rgba(28, 26, 23, 0.14); }
.imgacts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.1rem; }
.imgacts:has(> [hidden]) { grid-template-columns: 1fr; }

/* listening: the verse being read */
.scripture p.speaking { --hl: color-mix(in srgb, var(--accent) 11%, var(--bg)); background: var(--hl); box-shadow: -0.4rem 0 0 var(--hl), 0.4rem 0 0 var(--hl); }
.listenbtn[aria-pressed="true"] { border-color: var(--accent); color: var(--accentink); }

/* the end of a chapter: counted as read, then what comes next */
.chapterend { margin: 4.5rem 0 2.5rem; padding-top: 2.8rem; border-top: 1px solid var(--border); text-align: center; font-family: var(--sans); font-size: 1rem; line-height: 1.6; }
.scripture .chapterend p { margin: 0; }
.endmark { display: block; width: 1rem; height: 1.35rem; margin: 0 auto 1.1rem; color: var(--accent); }
.chapterend.done .endmark path { stroke-dasharray: 44; animation: draw 1.6s ease both; }
@keyframes draw { from { stroke-dashoffset: 44; } to { stroke-dashoffset: 0; } }
.endlabel { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.endline, .endstat { display: none; }
.endline { font-family: var(--display); font-style: italic; font-size: 1.8rem; line-height: 1.25; color: var(--ink); text-wrap: balance; }
.scripture .endstat { margin-top: 0.55rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accentink); }
.chapterend.done .endlabel { display: none; }
.chapterend.done .endline, .chapterend.done .endstat:not(:empty) { display: block; animation: rise 0.8s ease both; }
.chapterend.done .endstat { animation-delay: 0.3s; }
.endnav { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-top: 2rem; }
.endnext { min-width: min(100%, 16rem); min-height: 3.2rem; font-size: 1rem; }
.endnext span { transition: transform 0.25s ease; }
.endnext:hover span { transform: translateX(3px); }
[dir="rtl"] .endnext:hover span { transform: translateX(-3px); }
.endprev { display: inline-flex; align-items: center; gap: 0.4em; min-height: 2.75rem; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.endprev:hover { color: var(--ink); }
.endmore { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.8rem; text-align: start; }
.endmore:has(> .enddaily[hidden]) { grid-template-columns: minmax(0, 26rem); justify-content: center; }
.endmore > div { padding: 1.4rem 1.4rem 1.3rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.scripture .endmore > div > p:not(.rubric) { margin: 0.1rem 0 1rem; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.endmore .rubric { margin-bottom: 0.4rem; }
.endstudy .btn { width: 100%; }

.dailyform { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dailyform input { flex: 1 1 11rem; min-width: 0; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--borderhi); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; }
.dailyform input:focus { outline: none; border-color: var(--accent); }
.dailyform .btn { flex: 1 0 auto; }
.dailyform.compact .btn { flex-basis: 100%; }
.scripture .dailynote, .dailynote { width: 100%; margin: 0.15rem 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.dailynote:empty { display: none; }
.dailyform.sent > input, .dailyform.sent > .btn { display: none; }
.dailyform.sent .dailynote { color: var(--ink); font-family: var(--display); font-style: italic; font-size: 1.15rem; animation: rise 0.5s ease both; }

/* an answer while it is being written */
.answer.draft > p.prose { animation: rise 0.45s ease both; }
.answer.settled { animation: none; }
.answer.settled .versecard, .answer.settled .chips, .answer.settled > .fine { animation: rise 0.5s ease both; }
.drafting { margin: 1.4rem 0 0.4rem; color: var(--faint); font-family: var(--display); font-style: italic; font-size: 1.05rem; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* topics */
.topicgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); margin-top: 2rem; }
.card { display: block; padding: 1.7rem 1.6rem 1.5rem; color: var(--ink); text-decoration: none; }
.topicgrid .card { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background 0.2s ease; }
.topicgrid .card:hover { background: var(--surface); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.5rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.minicap { display: block; margin-bottom: 0.4rem; font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--accent); }
.grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); margin: 1.5rem 0; border-top: 1px solid var(--border); }
.grid .card { padding-left: 0; border-bottom: 1px solid var(--border); }
.topicview:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; align-items: start; padding-top: 2rem; }
.topicview h2 { margin-top: 0.4rem; font-size: 2.3rem; }
.topicview .side { position: sticky; top: 6rem; }
.backlink { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.backlink:hover { color: var(--ink); }

/* read: the reader's own Bible, then the books */
.pagehead:has(.hubside) { align-items: center; }
.hubside .rubric { margin-bottom: 0.2rem; }
@media (max-width: 960px) { .returning .hubside { display: none; } } /* a returning reader's own place comes first */
.beginlist { list-style: none; margin: 0; padding: 0; }
.beginlist li + li { border-top: 1px solid var(--border); }
.beginlist a { display: grid; gap: 0.1rem; padding: 0.7rem 0; color: var(--ink); text-decoration: none; }
.beginlist b { font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.beginlist span { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.beginlist a:hover b { color: var(--accentink); }
.hub { padding-top: 2.5rem; }
.hubme { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); animation: rise 0.5s ease both; }
.hubme > * { padding: 1.5rem 1.7rem 1.4rem; }
.hubme > * + * { border-inline-start: 1px solid var(--border); }
.hubcontinue { display: grid; align-content: center; gap: 0.2rem; color: var(--ink); text-decoration: none; }
.hubcontinue .rubric { margin: 0; }
.hubwhere { font-family: var(--display); font-size: 2.2rem; font-weight: 500; line-height: 1.1; }
.hubwhere::after { content: " \2192"; font-family: var(--sans); font-size: 1.1rem; color: var(--accentink); transition: margin 0.2s ease; }
[dir="rtl"] .hubwhere::after { content: " \2190"; }
.hubcontinue:hover .hubwhere { color: var(--accentink); }
.hubstat { display: grid; align-content: center; justify-items: center; text-align: center; }
.hubnum { font-family: var(--display); font-size: 2.6rem; font-weight: 500; line-height: 1; color: var(--ink); }
.hubstat .rubric { margin: 0.4rem 0 0; font-size: 0.66rem; }
.hubplanlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); gap: 1rem; }
.hubplan { display: grid; gap: 0.5rem; padding: 1.3rem 1.4rem 1.2rem; border-top: 2px solid var(--ink); color: var(--ink); text-decoration: none; background: var(--surface); }
.hubplan:hover .hubplannext { color: var(--ink); }
.hubplantitle { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; }
.hubplan .progress { display: block; margin: 0.2rem 0; overflow: hidden; }
.hubplan .progress > span { display: block; height: 100%; background: var(--accent); transform-origin: left; }
[dir="rtl"] .hubplan .progress > span { transform-origin: right; }
.hubplannext { color: var(--accentink); font-size: 0.9rem; }
.hubplannext::after { content: " \2192"; }
[dir="rtl"] .hubplannext::after { content: " \2190"; }
.hubmore { margin: 1.4rem 0 0; text-align: center; font-size: 0.9rem; }
.hllist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1rem; margin: 0; padding: 0; }
.hl a { display: grid; gap: 0.6rem; height: 100%; padding: 1.2rem 1.3rem 1.1rem; border: 1px solid var(--border); border-inline-start: 3px solid var(--sw); border-radius: 4px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color 0.2s ease; }
.hl a:hover { border-color: var(--borderhi); border-inline-start-color: var(--sw); }
.hl[data-col="gold"] { --sw: var(--swgold); }
.hl[data-col="sage"] { --sw: var(--swsage); }
.hl[data-col="rose"] { --sw: var(--swrose); }
.hl[data-col="sky"] { --sw: var(--swsky); }
.hltext { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-size: 1rem; line-height: 1.65; }
.hlref { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accentink); }
@media (max-width: 760px) {
  .hubme { grid-template-columns: 1fr 1fr; }
  .hubcontinue { grid-column: 1 / -1; }
  .hubme > .hubstat:first-of-type { border-inline-start: none; }
  .hubme > .hubstat { border-top: 1px solid var(--border); }
}

/* plans */
.plangrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 2rem; padding-top: 2rem; }
.plancard { padding: 0 0 1rem; border-top: 2px solid var(--ink); }
.plancard.going { border-top-color: var(--accent); }
.plancover { padding: 1.4rem 0 0.4rem; }
.plancover .band { display: none; }
.covertitle { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 500; line-height: 1.15; }
.coverdays { display: block; margin-top: 0.3rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.plancard > p { margin: 0.4rem 0 1rem; color: var(--muted); }
.progress { height: 2px; margin: 0.4rem 0 0.4rem; background: var(--border); }
.progress > div { height: 100%; background: var(--accent); }
.progresslabel { margin: 0 0 1rem; color: var(--faint); font-size: 0.82rem; }
.planGo { width: 100%; margin-bottom: 0.4rem; }
details.plan { margin-top: 0.8rem; border-top: 1px solid var(--border); }
details.plan summary { display: flex; align-items: center; min-height: 2.9rem; color: var(--muted); font-size: 0.85rem; cursor: pointer; list-style: none; }
details.plan summary::-webkit-details-marker { display: none; }
details.plan summary::after { content: "+"; margin-inline-start: auto; color: var(--faint); font-size: 1.1rem; }
details.plan[open] summary::after { content: "\2212"; }
.dayrow { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0; border-top: 1px solid var(--border); font-size: 0.92rem; }
.dayrow input { width: 1.1rem; height: 1.1rem; accent-color: var(--ink); flex: none; }
.dayrow label { flex: 1; cursor: pointer; }
.dayrow input:checked + label { color: var(--faint); text-decoration: line-through; }
.dayrow a { font-size: 0.85rem; }

.colophontext { max-width: 34rem; margin: 0 auto; font-family: var(--display); font-style: italic; font-size: 1.05rem; }
.colophontext .label, .colophontext .rubric { display: block; margin-bottom: 0.3rem; font-family: var(--sans); font-style: normal; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }

@media (max-width: 960px) {
  .duogrid, .showgrid, .pagehead, .askgrid, .topicview:not([hidden]) { grid-template-columns: 1fr; }
  .askinline { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border); }
  .psalm { padding-left: 0; }
  .testaments { grid-template-columns: 1fr; gap: 2.5rem; }
  .askside, .topicview .side { position: static; }
  .showgrid { gap: 2.5rem; }
}
@media (max-width: 1100px) {
  .readgrid, .studying .readgrid { grid-template-columns: minmax(0, 42rem); }
  .chapterrail, .explainrail { display: none; }
  .scripture p.versehint { display: block; }
  .studying .explainrail { display: block; position: fixed; inset: auto 0 0; z-index: 35; max-height: 66vh; max-height: 66dvh; padding: 0 1.25rem calc(1.2rem + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 16px 16px 0 0; box-shadow: 0 -16px 48px rgba(28, 26, 23, 0.16); animation: sheet 0.3s ease both; }
  .studying .studyhead { margin: 0 -1.25rem; padding-inline: 1.25rem 0.6rem; }
  .studying .readerbar { position: static; transform: none !important; } /* frees the top of the screen so the verses stay in view above the sheet */
  .readwrap.studying { padding-bottom: 70vh; }
  .studying .scripture p { scroll-margin-top: 7.5rem; }
}
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 640px) {
  .endmore { grid-template-columns: 1fr; }
  .endline { font-size: 1.6rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .askinline, .psalm { padding-top: 2.2rem; padding-bottom: 2.2rem; }
  .askrow { flex-direction: column-reverse; align-items: stretch; }
  .sample { padding: 1.4rem 1.2rem 0.8rem; }
  .askmain .answerslot { padding: 1.4rem 1.1rem 0.8rem; }
  .turn { scroll-margin-top: 7.5rem; }
  .turn > .question { font-size: 1.35rem; }
  .plans { grid-template-columns: 1fr; }
  .crumbroot, .crumbn { display: none; } /* the book is enough here: the chapter is the title just below */
  .explainbtn .long { display: none; }
  .explainbtn .short { display: inline; }
  .sectionhead { margin-top: 3.5rem; }
  .wordline { font-size: 1.25rem; }
  #explainout { scroll-margin-top: 13rem; }
  .answerslot { scroll-margin-top: 7.5rem; }
}
@media print {
  header.site, footer.site, .readerbar, .actions, .progresstrack, .chapterrail, .explainrail, .versebar, .scripture p.versehint, .chapterend { display: none; }
  body { background: #fff; color: #000; }
}
.answer > p.rubric { font-family: var(--sans); font-size: 0.72rem; line-height: 1.4; }
.explainrail .rubric, .chapterrail .rubric { letter-spacing: 0.14em; }
.railintro .btn { font-size: 0.85rem; padding-left: 0.6rem; padding-right: 0.6rem; white-space: nowrap; }

/* generated pages: books, chapters, topics */
.bookpage { padding-top: 4rem; }
.bookpage .label a, .topicpage .label a { color: var(--muted); text-decoration: none; }
.chaptergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr)); gap: 0.4rem; margin: 2rem 0; }
.chaptergrid a { display: grid; place-items: center; height: 3rem; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); text-decoration: none; font-family: var(--serif); }
.chaptergrid a:hover { border-color: var(--ink); }
.booknav { display: flex; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.booknav a { color: var(--muted); text-decoration: none; }
.booknav a:hover { color: var(--ink); }
.crumbs { margin: 0; color: var(--faint); font-size: 0.9rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 0.35rem; }
.scripture .fine a { color: var(--muted); }
.topicpage { padding-top: 3rem; }
.othershead { margin-top: 2rem; }
.others { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin: 0; font-family: var(--display); font-size: 1.2rem; }
.others a { color: var(--ink); text-decoration: none; }
.others a:hover { color: var(--accentink); }
.scripture p:target { background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; }
.scripture p { scroll-margin-top: 9.5rem; }
@media (max-width: 640px) { .scripture p { scroll-margin-top: 12rem; } .readerbar .crumbs { flex: 1; } }

/* languages */
:lang(zh) { --display: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif; --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif; }
:lang(ko) { --display: "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif; --serif: "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif; }
:lang(ar) { --display: "Geeza Pro", "Noto Naskh Arabic", "Amiri", serif; --serif: "Geeza Pro", "Noto Naskh Arabic", "Amiri", serif; --sans: "Geeza Pro", system-ui, sans-serif; }
:lang(zh) .label, :lang(zh) .rubric, :lang(zh) .sectionhead, :lang(ko) .label, :lang(ko) .rubric, :lang(ko) .sectionhead, :lang(ar) .label, :lang(ar) .rubric, :lang(ar) .sectionhead { letter-spacing: 0.04em; }
:lang(zh) .verse, :lang(ko) .verse, :lang(ar) .verse { line-height: 1.6; }
/* Arabic letters join, so no tracking and no letter pulled out of its word */
:lang(ar), :lang(ar) * { letter-spacing: 0 !important; }
:lang(ko) { word-break: keep-all; } /* Korean breaks lines between words, not inside them */
:lang(ar) .answer > h2 + p::first-letter, :lang(ar) .illumcap::first-letter { float: none; margin: 0; font: inherit; color: inherit; }
:lang(ar) .minicap { display: none; }
[dir="rtl"] select { background-position: left 0.7rem center, left 1rem center; }
[dir="rtl"] .more::after { content: " \2190"; }

/* Home: a verse for each feeling, under the feeling links (people search "bible verses for fear") */
.feelverses { display: grid; gap: 0 2rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); margin-top: 1rem; }
.feelverses figcaption { font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, inherit); margin-bottom: .3rem; }
.feelverses footer { font-size: .9rem; margin-top: .4rem; }
.plansline { margin-top: 1rem; }

/* ---------- The open Bible over the page components ---------- */
main { padding-bottom: var(--space-3xl); }
h1 { letter-spacing: var(--tracking-display); line-height: 1.06; }
.lede { color: var(--color-ink-2); }
.label, .kicker, .rubric, .runninghead, .datechip, .toc-k, .sectionhead { color: var(--color-gilt-ink); letter-spacing: 0.16em; }
a:hover { color: var(--color-ink); }

/* Buttons and chips: the home's pills */
.btn { white-space: normal; font-weight: 600; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.btn.primary:hover { background: var(--color-ink-2); border-color: var(--color-ink-2); color: var(--color-paper); }
.chip { background: var(--color-paper); }
.chip:hover { border-color: var(--color-gilt-ink); }

/* What sat in white boxes now lies on the linen as leaves of Bible paper */
.sidecard, .askcard, .psalmcard, .plusbox, .lastfree, .asknote, .card, .askmain .answerslot:not(:has(.plusbox, > .status, > .thinking)) { background: var(--color-paper); border-color: color-mix(in oklab, var(--color-rule) 60%, transparent); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.askinline textarea, .askform textarea, .askcard textarea { padding: 0.7rem 0.9rem; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper); }
.askinline textarea:focus, .askform textarea:focus, .askcard textarea:focus { border-color: var(--color-gilt-ink); box-shadow: 0 0 0 2px color-mix(in oklab, var(--color-focus) 40%, transparent); }
.restoreform input, .dailyform input, .vbform input { background: var(--color-paper); }

/* The chapter is the open Bible: the text lies on a leaf of Bible paper with the crimson ribbon at its head, the
   first letter in the ribbon's crimson and the verse numbers in gilt; the chapters and the study page sit beside it. */
.readwrap { padding-top: var(--space-lg); }
.readerbar { background: color-mix(in oklab, var(--color-paper-3) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.scripture, .bookpage { position: relative; background: var(--color-paper); border: 1px solid color-mix(in oklab, var(--color-rule) 55%, transparent); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.scripture { padding: clamp(28px, 4vw, 56px) clamp(22px, 4.4vw, 64px) clamp(24px, 3vw, 40px); }
.scripture::before, .bookpage::before { content: ""; position: absolute; top: -6px; inset-inline-end: clamp(16px, 3vw, 36px); width: 13px; height: clamp(88px, 12vw, 140px); background: var(--color-seal); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 9px), 0 100%); pointer-events: none; }
.scripture h1 { margin-top: 0; }
.answer > h2 + p::first-letter, .illumcap::first-letter { color: var(--color-seal); }
sup.vnum { color: var(--color-gilt-ink); font-family: var(--font-body); }
.scripture p.speaking { --hl: color-mix(in oklab, var(--color-accent) 20%, var(--color-paper)); }
.scripture p.picked, .scripture p.studied { --hl: color-mix(in oklab, var(--color-accent) 22%, var(--color-paper)); }
.listenbtn { border-color: color-mix(in oklab, var(--color-seal) 55%, transparent); color: var(--color-seal); }
.listenbtn:hover, .listenbtn[aria-pressed="true"] { border-color: var(--color-seal); color: var(--color-seal); }
.listenbtn[aria-pressed="true"] { background: color-mix(in oklab, var(--color-seal) 12%, var(--color-paper)); }
.railgrid a:hover { color: var(--color-ink); background: color-mix(in oklab, var(--color-accent) 14%, transparent); }
.railgrid a[aria-current="page"] { background: var(--color-seal); color: var(--color-seal-ink); }
.versebar { border-color: var(--color-rule); box-shadow: 0 18px 48px -18px oklch(25% 0.03 70 / 0.45); }
@media (min-width: 1101px) { .explainrail { border-color: color-mix(in oklab, var(--color-rule) 60%, transparent); border-radius: var(--radius-card); box-shadow: var(--shadow-card); } }
@media (max-width: 40rem) {
  .readwrap { padding-inline: 0; }
  .readerbar { padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); }
  .scripture { border-inline: 0; border-radius: 0; padding-inline: max(20px, env(safe-area-inset-left, 0px)); }
}

/* A book: its chapters as a table of contents on a leaf */
.bookpage { width: min(100% - 2 * max(var(--gutter), env(safe-area-inset-left, 0px)), 52rem); max-width: none; margin: var(--space-xl) auto var(--space-2xl); padding: clamp(28px, 4.5vw, 56px) clamp(20px, 5vw, 64px); }
.chaptergrid a { border-color: var(--color-rule); background: var(--color-paper); font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; transition: border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.chaptergrid a:hover { border-color: var(--color-seal); color: var(--color-seal); }

/* A topic: its verses as slips of Bible paper, gilt at the edge */
.topicpage .versecard { padding: 18px 22px 16px; background: var(--color-paper); border: 1px solid color-mix(in oklab, var(--color-rule) 55%, transparent); border-inline-start: 3px solid var(--color-accent); border-radius: var(--radius-card); box-shadow: 0 12px 30px -24px oklch(25% 0.03 70 / 0.5); }

/* About and Start read as a leaf (/site.css .prose) */
.wrap.prose { width: min(100% - 2 * max(var(--gutter), env(safe-area-inset-left, 0px)), 46rem); max-width: none; margin: var(--space-xl) auto var(--space-2xl); padding: clamp(24px, 5vw, 64px) clamp(20px, 5.5vw, 72px); }
.wrap.prose h1 { margin-bottom: 0.35em; }
/* One column on phones may never grow past the screen: the track floors at zero, and a long word (Korean keeps its
   phrases whole) breaks rather than widening the page. */
@media (max-width: 960px) { .duogrid, .showgrid, .pagehead, .askgrid, .topicview:not([hidden]) { grid-template-columns: minmax(0, 1fr); } }
main { overflow-wrap: break-word; }
.askside, .askside > *, .askmain { min-width: 0; }
.plans, .askside .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .plans, .askside .plans { grid-template-columns: minmax(0, 1fr); } }
/* Phone targets and fields: icon buttons at 44px, the other-feelings links as 44px rows, inputs at 16px or more */
.btn.icon { width: 44px; min-height: 44px; }
.others a, .versecard footer a { display: inline-flex; align-items: center; min-height: 44px; }
.restoreform input, .dailyform input, .vbform input { font-size: max(16px, 1rem); }
@media print { .scripture, .bookpage, .prose { box-shadow: none; border: 0; } .scripture::before, .bookpage::before { display: none; } }
