/* The Honest Translation (THT): reader, footnotes, book and chapter picker, verse lookup. Loaded after main.css.
   main.css styles every .content-box p and li (serif, 1.0625rem, bright), so rules that must win start with .content-box. */

/* ---------- chapter header ---------- */
.bible-head { text-align: center; margin-bottom: 1.2rem; }
.content-box .bible-kicker { font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.4; color: var(--acc); margin: 0 0 0.4rem; }
.content-box .bible-sub { font-family: var(--font-ui); font-size: 1rem; line-height: 1.5; color: var(--text-soft); margin: -0.5rem 0 1.2rem; text-wrap: balance; }
.content-box .bible-head h1 { margin-bottom: 1.4rem; }
.ch-row { position: relative; }
.ch-row h1 { padding-left: 3.4rem; padding-right: 3.4rem; }
.bk-btn { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0 0.1em; margin: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.22em; border-radius: var(--radius-s); }
.bk-btn .chev { width: 0.42em; height: 0.42em; stroke: var(--acc); flex: 0 0 auto; transition: transform 0.2s ease; }
.bk-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.bk-btn:hover { color: var(--acc-bright); }
.bk-btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.ch-arrow { position: absolute; top: 0.45rem; width: 2.6rem; height: 2.6rem; display: flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-soft); text-decoration: none; }
.ch-arrow.prev { left: 0; }
.ch-arrow.next { right: 0; }
.ch-arrow svg { width: 1.15rem; height: 1.15rem; }
.ch-arrow:hover { color: var(--acc-bright); border-color: var(--acc-dark); background: var(--acc-tint); }
.ch-arrow.off { visibility: hidden; }

/* ---------- verse lookup ---------- */
.ref-go { max-width: 22rem; margin: 0 auto; }
.ref-go.big { max-width: 28rem; }
.ref-field { position: relative; }
.ref-go input { -webkit-appearance: none; appearance: none; width: 100%; box-sizing: border-box; font-family: var(--font-ui); font-size: 0.95rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.62rem 3rem 0.62rem 1.15rem; }
.ref-go.big input { font-size: 1.05rem; padding: 0.8rem 3.3rem 0.8rem 1.3rem; }
.ref-go input::placeholder { color: var(--text-mute); }
.ref-go input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.ref-go input:focus { outline: none; border-color: var(--acc-dark); box-shadow: 0 0 0 3px var(--acc-glow); }
.ref-go button { position: absolute; right: 0.32rem; top: 50%; transform: translateY(-50%); width: 2.15rem; height: 2.15rem; border-radius: 999px; border: 0; background: var(--acc-tint); color: var(--acc-bright); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ref-go button:hover { background: var(--acc-glow); }
.ref-go button svg { width: 1.05rem; height: 1.05rem; }
.content-box .ref-msg { font-family: var(--font-ui); font-size: 0.84rem; line-height: 1.5; color: #f0b37e; margin: 0.5rem 0 0; text-align: center; }

/* ---------- legend ---------- */
.content-box .bible-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15rem 1.3rem; font-family: var(--font-ui); font-size: 0.82rem; line-height: 1.7; color: var(--text-mute); margin: 1.2rem 0 1.6rem; }
.bible-legend .lg { white-space: nowrap; }
.bible-legend .fn { vertical-align: baseline; font-size: 0.95em; }

/* ---------- the text (size and font follow the reader's settings: --tht-fs, .tht-sans) ---------- */
.bible-text p, .bible-text .poem { font-family: var(--font-serif); line-height: 1.85; }
.content-box .bible-text p, .bible-text .poem { font-size: var(--tht-fs, 1.0625rem); }
.tht-sans .bible-text p, .tht-sans .bible-text .poem, .tht-sans .sv-en { font-family: var(--font-ui); }
.bible-text .poem { margin: 0.6rem 0 1.2rem 1.4rem; padding-left: 0.9rem; border-left: 2px solid var(--border-strong); color: var(--text); }
.bible-text .poem .pl { display: block; }
.bible-text .poem .pl + .pl { padding-left: 1.2rem; }
.bible-text .v { scroll-margin-top: calc(var(--header-h) + 4.5rem); border-radius: 4px; transition: background 0.4s ease; }
.bible-text .v.hl { background: var(--acc-glow); box-shadow: 0 0 0 3px var(--acc-glow); }
.content-box .bible-text p em { display: inline; padding: 0; margin: 0; background: none; border: 0; color: inherit; text-align: left; font-size: inherit; }
.vn { font-family: var(--font-ui); font-size: 0.68em; font-weight: 650; vertical-align: super; line-height: 0; margin: 0 0.18em 0 0.1em; }
.vn a { color: var(--acc); text-decoration: none; cursor: pointer; padding: 0 0.1em; }
.vn a:hover { color: var(--acc-bright); text-decoration: underline; }
.fn { font-family: var(--font-ui); font-size: 0.64em; font-weight: 600; font-style: italic; vertical-align: super; line-height: 0; margin-left: 0.04em; }
.fn a { color: var(--acc-bright); text-decoration: none; cursor: pointer; padding: 0 0.14em; border-radius: 3px; }
.fn a[href]:hover { background: var(--acc-tint); }

/* ---------- reader tools: study mode and settings ---------- */
.rd-tools { display: none; position: relative; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem auto 0; }
.tht-js .rd-tools { display: flex; }
.rd-btn { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--font-ui); font-size: 0.88rem; font-weight: 550; line-height: 1.3; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.42rem 0.95rem; cursor: pointer; }
.rd-btn:hover { color: var(--acc-bright); border-color: var(--acc-dark); }
.rd-btn[aria-pressed="true"], .rd-btn[aria-expanded="true"] { color: var(--acc-bright); border-color: var(--acc); background: var(--acc-tint); }
.rd-btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.rd-ic { font-weight: 700; color: var(--acc); line-height: 1; }
.rd-he { font-family: 'SBL Hebrew', 'Ezra SIL', 'Noto Serif Hebrew', 'Times New Roman', serif; font-size: 1.2em; font-weight: 400; }
.rd-set { position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%); z-index: 300; width: min(21rem, calc(100vw - 2rem)); box-sizing: border-box; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--radius-m); box-shadow: var(--shadow-3); padding: 0.95rem 1rem 0.75rem; text-align: left; font-family: var(--font-ui); }
.rd-set[hidden] { display: none; }
.rd-row { margin-bottom: 0.8rem; transition: opacity 0.15s ease; }
.rd-row.dim { opacity: 0.5; }
.rd-lbl { display: block; color: var(--text-mute); font-size: 0.78rem; line-height: 1.35; margin-bottom: 0.32rem; }
.rd-seg { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.rd-seg button { min-width: 2.7rem; font-family: var(--font-ui); font-size: 0.82rem; line-height: 1.3; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 7px; padding: 0.32rem 0.7rem; cursor: pointer; }
.rd-seg button:hover { color: var(--text); }
.rd-seg button.on { color: var(--acc-bright); border-color: var(--acc); background: var(--acc-tint); }
.content-box .rd-note { font-family: var(--font-ui); font-size: 0.74rem; line-height: 1.4; color: var(--text-mute); margin: 0.1rem 0 0; }
.content-box .rd-msg { flex-basis: 100%; font-family: var(--font-ui); font-size: 0.84rem; line-height: 1.5; color: #f0b37e; text-align: center; margin: 0.2rem 0 0; }

/* ---------- study mode: each verse, then its Hebrew word by word (right to left) ---------- */
.study-text { display: none; }
.tht-study .study-text { display: block; }
.tht-study .bible-text { display: none; }
.content-box .st-wait { font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-mute); text-align: center; margin: 2rem 0; }
.st-legend { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 0.75rem 1rem; margin: 0 0 1.2rem; }
.content-box .st-legend p { font-family: var(--font-ui); font-size: 0.86rem; line-height: 1.6; color: var(--text-soft); margin: 0; }
.content-box .st-legend p + p { margin-top: 0.4rem; }
.st-keys { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; }
.content-box .st-legend .st-keys { color: var(--text-mute); font-size: 0.8rem; }
.sv { padding: 0.9rem 0.6rem 1rem; border-bottom: 1px solid var(--border); border-radius: var(--radius-s); scroll-margin-top: calc(var(--header-h) + 4.5rem); transition: background 0.4s ease; }
.sv.hl { background: var(--acc-glow); }
.sv-en { display: block; font-family: var(--font-serif); font-size: var(--tht-fs, 1.0625rem); line-height: 1.75; color: var(--text); }
.sv-en.sv-poem .pl { display: block; }
.sv-en.sv-poem .pl + .pl { padding-left: 1.2rem; }
.sv-he { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.15rem 0.2rem; margin-top: 0.6rem; direction: rtl; }
.w { display: inline-flex; flex-direction: column; align-items: center; text-align: center; font: inherit; color: inherit; background: none; border: 1px solid transparent; border-radius: var(--radius-s); padding: 0.2rem 0.35rem 0.3rem; cursor: pointer; max-width: 10rem; }
.w:hover, .w[aria-expanded="true"] { background: var(--acc-tint); border-color: color-mix(in srgb, var(--acc) 35%, transparent); }
.w:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.wh { font-family: 'SBL Hebrew', 'Ezra SIL', 'Noto Serif Hebrew', 'Times New Roman', serif; font-size: var(--tht-hs, 1.55rem); line-height: 1.55; color: var(--text); }
.wt, .wg { display: block; font-family: var(--font-ui); line-height: 1.3; overflow-wrap: anywhere; -webkit-user-select: none; user-select: none; }
.wt { font-size: calc(var(--tht-hs, 1.55rem) * 0.46); font-style: italic; color: var(--text-mute); margin-top: 0.1rem; }
.wg { font-size: calc(var(--tht-hs, 1.55rem) * 0.48); color: var(--acc-bright); margin-top: 0.12rem; }
.tht-nowt .wt, .tht-nowe .wg { display: none; }
.gi, .gx { color: var(--text-mute); }
.gx { font-style: italic; }
.content-box .st-credit { font-family: var(--font-ui); font-size: 0.78rem; line-height: 1.6; color: var(--text-mute); margin: 1rem 0 0; }

/* word pop-over (shares .bpop with the verse menu) */
.bpop .wp-he { font-family: 'SBL Hebrew', 'Ezra SIL', 'Noto Serif Hebrew', 'Times New Roman', serif; font-size: 1.9rem; line-height: 1.4; text-align: center; color: var(--text); margin: 0.2rem 0 0; }
.bpop .wp-tl { font-style: italic; text-align: center; color: var(--text-mute); margin: 0 0 0.5rem; }
.bpop .wp-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.8rem; margin: 0 0 0.3rem; padding-top: 0.55rem; border-top: 1px solid var(--border); }
.bpop .wp-dl dt { color: var(--text-mute); font-size: 0.8rem; padding-top: 0.08rem; }
.bpop .wp-dl dd { margin: 0; color: var(--text); }
.bpop .wp-dl .he { font-size: 1.2rem; }
.bpop .wp-dl a { color: var(--acc); }
.content-box .fn-full .fn-more, .fnd-body .fn-more { font-family: var(--font-ui); font-size: 0.9rem; }

/* ---------- footnotes at the end of the chapter ---------- */
.bible-section { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.content-box .bible-section > h2 { text-align: center; margin-top: 0.4rem; }
.content-box .fn-list { list-style: none; padding: 0; margin: 0; }
.content-box .fn-list > li { margin: 0; font-family: var(--font-ui); font-size: 0.92rem; line-height: 1.55; scroll-margin-top: calc(var(--header-h) + 4.5rem); }
.fn-row { display: grid; grid-template-columns: 1.4rem 3.3rem 1fr 1rem; align-items: baseline; gap: 0 0.35rem; padding: 0.62rem 0.5rem; border-bottom: 1px solid var(--border); border-radius: var(--radius-s); color: var(--text-soft); text-decoration: none; }
.fn-row::after { content: '\203A'; color: var(--text-mute); text-align: right; }
.fn-row:hover { background: var(--acc-tint); color: var(--text); }
.fn-row:hover::after { color: var(--acc-bright); }
.fn-l { color: var(--acc-bright); font-weight: 650; font-style: italic; }
.fn-ref { color: var(--acc); font-weight: 600; font-variant-numeric: tabular-nums; }
.fn-long .fn-sum { color: var(--text); font-weight: 560; }
.fn-full { padding: 0.4rem 0.5rem 0.8rem 2.1rem; }
.tht-js .fn-full { display: none; }
.tht-js .fn-item.fn-show .fn-full { display: block; }
.content-box .fn-full p { font-size: 0.97rem; line-height: 1.75; margin: 0.5rem 0; }
.content-box .fn-full h3 { margin: 0.4rem 0; font-size: var(--step-1); }
.fn-item:target .fn-row { background: var(--acc-tint); }

/* ---------- footnote pop-up ---------- */
.fn-dialog { margin: auto; padding: 0; width: min(40rem, calc(100vw - 2rem)); max-height: min(82vh, 46rem); background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-m); box-shadow: var(--shadow-3); }
.fn-dialog[open] { display: flex; flex-direction: column; }
.fn-dialog::backdrop { background: rgba(0, 0, 0, 0.62); }
.fnd-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.8rem 0.7rem 1.25rem; border-bottom: 1px solid var(--border); }
.fnd-meta { margin: 0; font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-mute); }
.fnd-meta b { color: var(--acc-bright); font-style: italic; }
.fnd-x { background: none; border: 0; color: var(--text-mute); font-size: 1.5rem; line-height: 1; padding: 0.15rem 0.45rem; cursor: pointer; border-radius: var(--radius-s); }
.fnd-x:hover { color: var(--text); background: var(--surface-2); }
.fnd-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.25rem 1.1rem; font-family: var(--font-serif); font-size: 1.02rem; line-height: 1.75; }
.fnd-body p { margin: 0.6rem 0; }
.fnd-body h3 { font-family: var(--font-ui); font-size: 1.12rem; font-weight: 650; line-height: 1.35; color: var(--acc-bright); margin: 0.3rem 0 0.4rem; }
.fnd-body a { color: var(--acc); }
.fnd-body .src { color: var(--text); }
.fnd-body .qv { color: var(--acc-bright); }
.fnd-verse { margin: 0 0 0.9rem; padding: 0.65rem 0.9rem; border-left: 3px solid var(--acc-dark); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text-soft); font-size: 0.95rem; line-height: 1.65; }
.fnd-verse span { display: block; }
.fnd-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem 0.8rem; border-top: 1px solid var(--border); font-family: var(--font-ui); font-size: 0.88rem; }
.fnd-foot button, .fnd-foot a { background: none; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-soft); padding: 0.38rem 0.85rem; cursor: pointer; text-decoration: none; font: inherit; }
.fnd-foot button:hover:not(:disabled), .fnd-foot a:hover { color: var(--acc-bright); border-color: var(--acc-dark); }
.fnd-foot button:disabled { opacity: 0.35; cursor: default; }

/* ---------- book and chapter picker ---------- */
.bk-panel { position: absolute; top: calc(100% - 0.7rem); left: 50%; transform: translateX(-50%); z-index: 300; width: min(50rem, calc(100vw - 2rem)); background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--radius-m); box-shadow: var(--shadow-3); text-align: left; font-family: var(--font-ui); }
.bk-panel[hidden] { display: none; }
.bk-top { display: none; }
.bk-body { display: grid; grid-template-columns: 21rem 1fr; }
.bk-books { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 0 0.4rem; padding: 1rem 0.6rem 1rem 1rem; max-height: 27rem; overflow-y: auto; border-right: 1px solid var(--border); }
.content-box .bk-panel .bk-h { font-family: var(--font-ui); font-size: 0.78rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4; color: var(--text-mute); margin: 0 0.45rem 0.5rem; }
.content-box .bk-panel ul, .content-box .bk-panel ol { list-style: none; margin: 0; padding: 0; }
.content-box .bk-panel li { margin: 0; font-family: var(--font-ui); font-size: 0.93rem; line-height: 1.35; color: var(--text-soft); }
.bk-b { display: flex; justify-content: space-between; align-items: center; width: 100%; box-sizing: border-box; padding: 0.4rem 0.45rem; border: 0; border-radius: var(--radius-s); background: none; font: inherit; color: var(--text-soft); text-align: left; }
.bk-b.on { color: var(--text); cursor: pointer; }
.bk-b.on:hover { background: var(--surface-2); color: var(--acc-bright); }
.bk-b.on::after { content: '\203A'; font-size: 1.1em; color: var(--text-mute); }
.bk-b.on.sel { color: var(--acc-bright); font-weight: 600; background: var(--acc-tint); }
.bk-b.on.sel::after { color: inherit; }
.bk-b.off { color: var(--text-mute); opacity: 0.55; cursor: default; }
.bk-nc { grid-column: 1 / -1; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border-strong); }
.content-box .bk-panel .bk-nc ul { columns: 2; column-gap: 0.4rem; }
.content-box .bk-panel .bk-nc li { break-inside: avoid; }
.bk-b.nc { color: var(--text-mute); opacity: 0.55; text-decoration: none; }
.bk-b.nc:hover, .bk-b.nc:focus-visible { opacity: 1; color: var(--text); background: var(--surface-2); }
.content-box .fn-suggest { margin: 1.1rem 0 0; font-family: var(--font-ui); font-size: 0.88rem; color: var(--text-mute); }
.content-box h3[id] { scroll-margin-top: calc(var(--header-h) + 4.5rem); }
.content-box h3[id]:target { color: var(--acc-bright); }
.bk-chs { padding: 1rem 0.6rem 1rem 0.8rem; min-width: 0; }
.bk-chs ol { position: relative; max-height: 25rem; overflow-y: auto; overscroll-behavior: contain; }
.bk-chs a { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.4rem 0.5rem; border-radius: var(--radius-s); color: var(--text-soft); text-decoration: none; }
.bk-chs a .n { flex: 0 0 1.7rem; text-align: right; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.bk-chs a .t { min-width: 0; }
.bk-chs a:hover { background: var(--surface-2); color: var(--text); }
.bk-chs a[aria-current="page"] { background: var(--acc-tint); color: var(--acc-bright); }
.bk-chs a[aria-current="page"] .n { color: var(--acc-bright); font-weight: 650; }
.bk-backdrop { position: fixed; inset: 0; z-index: 290; background: transparent; }
.bk-backdrop[hidden] { display: none; }
.bk-switch, .bk-x { font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.35rem 0.85rem; cursor: pointer; }
.bk-x { font-size: 1.25rem; line-height: 1; padding: 0.25rem 0.6rem; }
.bk-cur { font-weight: 650; color: var(--text); }

/* ---------- end of chapter ---------- */
.quran-par { background: var(--acc-tint); border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent); border-radius: var(--radius-m); padding: 1rem 1.2rem; margin-top: 2rem; }
.content-box .quran-par h2 { font-size: var(--step-1); margin: 0 0 0.6rem; text-align: left; }
.content-box .quran-par ul { margin: 0; padding-left: 1.1rem; }
.content-box .quran-par li { margin: 0.25rem 0; color: var(--text-soft); }
.content-box .bible-sources { font-family: var(--font-ui); font-size: 0.82rem; line-height: 1.65; color: var(--text-mute); margin-top: 2rem; }
.bible-sources strong { color: var(--text-soft); }
.ch-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1.6rem; }
.ch-foot .cf { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-m); background: var(--surface-2); text-decoration: none; font-family: var(--font-ui); min-width: 0; }
.ch-foot .cf.next { grid-column: 2; text-align: right; }
.ch-foot .cf:hover { border-color: var(--acc-dark); background: var(--acc-tint); }
.cf-k { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.cf-t { color: var(--text); font-weight: 650; }
.cf-s { color: var(--text-soft); font-size: 0.86rem; line-height: 1.35; }

/* ---------- verse menu pop-over ---------- */
.bpop { position: absolute; z-index: 400; max-width: min(24rem, calc(100vw - 2rem)); background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-m); box-shadow: var(--shadow-3); padding: 0.8rem 1rem 0.6rem; font-family: var(--font-ui); font-size: 0.9rem; line-height: 1.5; }
.bpop[hidden] { display: none; }
.bpop .bpop-close { position: absolute; top: 0.3rem; right: 0.45rem; background: none; border: 0; color: var(--text-mute); font-size: 1.1rem; cursor: pointer; }
.bpop .bpop-title { font-weight: 650; color: var(--acc-bright); margin: 0 1.4rem 0.3rem 0; }
.bpop .vmenu { list-style: none; margin: 0; padding: 0; }
.bpop .vmenu a, .bpop .vmenu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text-soft); padding: 0.42rem 0.2rem; font: inherit; cursor: pointer; text-decoration: none; }
.bpop .vmenu a:hover, .bpop .vmenu button:hover { color: var(--acc-bright); }
.bpop .ext { margin-left: 0.35em; color: var(--text-mute); }
.bpop .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- single-passage view ---------- */
.content-box.bible-passage .bible-head h1 { font-size: var(--step-3); }
.ps-root { margin: 1.8rem 0 1.2rem; }
.ps-card { margin: 0 auto; max-width: 40rem; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px; padding: 1.9rem 2.1rem 1.3rem; }
.content-box .ps-text p, .ps-text .pl { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.75; color: var(--text); margin: 0 0 0.7rem; }
.ps-poem { margin: 0 0 0.7rem; }
.ps-poem .pl { display: block; margin: 0; }
.ps-poem .pl + .pl { padding-left: 1.4rem; }
.ps-vn { font-family: var(--font-ui); font-size: 0.55em; font-weight: 650; color: var(--acc); vertical-align: super; line-height: 0; margin-right: 0.2em; }
.ps-cap { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 1rem; margin-top: 0.9rem; padding-top: 0.85rem; border-top: 1px solid var(--border); font-family: var(--font-ui); }
.ps-ref { color: var(--acc-bright); font-weight: 650; font-size: 1.02rem; }
.ps-credit { color: var(--text-mute); font-size: 0.8rem; }
.ps-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.ps-btn { font-family: var(--font-ui); font-size: 0.88rem; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.48rem 1.05rem; cursor: pointer; text-decoration: none; }
.ps-btn:hover { color: var(--acc-bright); border-color: var(--acc-dark); }
.content-box .ps-help, .content-box .ps-wait, .content-box .ps-err { font-family: var(--font-ui); font-size: 0.88rem; color: var(--text-mute); text-align: center; }
.content-box .ps-err { color: #f0b37e; }

/* ---------- topic pages ---------- */
.he { font-family: 'SBL Hebrew', 'Ezra SIL', 'Noto Serif Hebrew', 'Times New Roman', serif; font-size: 1.08em; unicode-bidi: isolate; }
.src { color: var(--text); }
.qv { color: var(--acc-bright); }
.tht-table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 0.9rem; margin: 1rem 0; }
.tht-table th, .tht-table td { border: 1px solid var(--border); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.tht-table th { background: var(--surface-2); color: var(--text); }

@media (max-width: 760px) {
  .content-box .bible-text p, .bible-text .poem, .sv-en { font-size: var(--tht-fs, 1rem); }
  .sv { padding: 0.8rem 0.2rem 0.9rem; }
  .w { padding: 0.15rem 0.25rem 0.25rem; }
  .bible-text .poem { margin-left: 0.4rem; }
  .tht-table { font-size: 0.82rem; }
  .ch-row h1 { padding-left: 2.9rem; padding-right: 2.9rem; }
  .ch-arrow { width: 2.3rem; height: 2.3rem; top: 0.25rem; }
  .ps-card { padding: 1.3rem 1.15rem 1rem; }
  .content-box .ps-text p, .ps-text .pl { font-size: 1.16rem; }
  .fn-row { grid-template-columns: 1.2rem 2.9rem 1fr 0.8rem; padding: 0.6rem 0.25rem; }
  .fn-full { padding-left: 0.5rem; }
}
@media (max-width: 700px) {
  .bk-panel { position: fixed; top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 86vh; display: flex; flex-direction: column; border-radius: 16px 16px 0 0; border-bottom: 0; }
  .bk-panel[hidden] { display: none; }
  .bk-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border); }
  .bk-body { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .bk-books { display: none; max-height: none; border-right: 0; padding: 0.9rem; }
  .bk-panel.show-books .bk-books { display: grid; }
  .bk-panel.show-books .bk-chs { display: none; }
  .bk-chs { padding: 0.7rem 0.6rem 1.2rem; }
  .bk-chs > .bk-h { display: none; }
  .bk-chs ol { max-height: none; overflow: visible; }
  .bk-chs a { padding: 0.62rem 0.5rem; }
  .bk-backdrop { background: rgba(0, 0, 0, 0.6); }
  html.bk-open, html.fn-open { overflow: hidden; }
  .fn-dialog { width: 100%; max-width: 100%; max-height: 88vh; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; }
  .ch-foot { grid-template-columns: 1fr; }
  .ch-foot .cf.next { grid-column: 1; }
  .ch-foot > span:empty { display: none; }
}
/* code samples */
.tht-code{overflow-x:auto;white-space:pre;background:rgba(127,127,127,.12);border:1px solid rgba(127,127,127,.25);border-radius:10px;padding:12px 14px;font-size:.84rem;line-height:1.5;margin:0 0 1rem}
.tht-code code{background:none;padding:0;font-size:inherit}
