/* Bible website — one stylesheet, system fonts only, four reading themes. */

:root {
  --bg: #fbf9f5;
  --fg: #1d1a16;
  --muted: #6a6257;
  --faint: #716a62;
  --line: #e6e0d6;
  --surface: #ffffff;
  --surface-2: #f3efe8;
  --accent: #2c5a86;
  --accent-ink: #ffffff;
  --accent-soft: #e3ecf5;
  --red: #a0262e;
  --focus: #1f6fd1;
  --sel: #fff1b8;
  --sel-line: #c9a227;
  --hl-1: #fde68a;
  --hl-2: #bbf7d0;
  --hl-3: #bfdbfe;
  --hl-4: #fbcfe8;
  --hl-5: #fed7aa;
  --hl-6: #ddd6fe;
  --shadow: 0 8px 30px rgba(30, 25, 15, 0.14);
  --accent-2: #1d7f8e;
  --top: #e9f0f5;
  --grad: linear-gradient(180deg, #e9f0f5 0, #f3f3ef 24rem, var(--bg) 48rem);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-2: rgba(255, 255, 255, 0.86);
  --card-shadow: 0 1px 2px rgba(45, 35, 20, 0.05), 0 12px 32px rgba(45, 35, 20, 0.07);
  --answer: linear-gradient(160deg, #f3f7fa 0%, #eef4f6 100%);
  --answer-line: #dfe8ef;
  --foot-bg: #f6f2ea;
  --radius: 12px;
  --fs: 1.125rem;
  --lh: 1.7;
  /* the reading column: --mn ems of the reading size (about 80 letters a line), wider and slightly larger on big
     screens (--zoom); "Wide" in Reading settings adds --mnw */
  --mn: 38;
  --mnw: 0;
  --zoom: 1;
  --col: calc((var(--mn) + var(--mnw)) * var(--fs) * var(--zoom));
  --brand: #1565c0;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Charter, 'Bitstream Charter', Georgia, 'Noto Serif', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --read-font: var(--serif);
  color-scheme: light;
}
:root[data-theme='sepia'] {
  --bg: #f4ecd8;
  --fg: #3b2f1e;
  --muted: #6e5c41;
  --faint: #716249;
  --line: #e0d3b6;
  --surface: #fbf5e6;
  --surface-2: #eee3c8;
  --accent: #7a4b16;
  --accent-ink: #fffaf0;
  --accent-soft: #eadcbc;
  --red: #9b2a1f;
  --sel: #f6e3a1;
  --hl-1: #f3d77a;
  --hl-2: #c6e3b0;
  --hl-3: #c3d6e8;
  --hl-4: #efc5d3;
  --hl-5: #f1c79a;
  --hl-6: #d9cde9;
  --accent-2: #9a6a2c;
  --top: #eadcbe;
  --grad: linear-gradient(180deg, #eadcbe 0, #f0e6cf 24rem, var(--bg) 48rem);
  --glass: rgba(255, 250, 238, 0.6);
  --glass-2: rgba(255, 250, 238, 0.8);
  --answer: linear-gradient(160deg, #f8f0dd 0%, #f3e9d3 100%);
  --answer-line: #e2d3b3;
  --foot-bg: #eee3c9;
}
:root[data-theme='dark'] {
  --bg: #16181b;
  --fg: #e7e2d9;
  --muted: #a39d93;
  --faint: #969087;
  --line: #2f3236;
  --surface: #1f2226;
  --surface-2: #26292e;
  --accent: #8cb8e8;
  --accent-ink: #0e1620;
  --accent-soft: #233549;
  --brand: #5aa9ff;
  --red: #f08e86;
  --red-hl: #f5b4af;
  --focus: #8cb8e8;
  --sel: #4a4120;
  --sel-line: #d9b44a;
  --hl-1: #4f4514;
  --hl-2: #1f4d34;
  --hl-3: #1e3a5f;
  --hl-4: #5a2341;
  --hl-5: #5e3615;
  --hl-6: #3d3166;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
  --accent-2: #6cc4cf;
  --top: #1c2631;
  --grad: linear-gradient(180deg, #1c2631 0, #181c21 24rem, var(--bg) 48rem);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-2: rgba(255, 255, 255, 0.04);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
  --answer: linear-gradient(160deg, #1d2833 0%, #1a242c 100%);
  --answer-line: #2b3946;
  --foot-bg: #131518;
}
:root[data-theme='black'] {
  --bg: #000000;
  --fg: #ddd8cf;
  --muted: #9c968c;
  --faint: #87827a;
  --line: #24262a;
  --surface: #0d0e10;
  --surface-2: #17191c;
  --accent: #8cb8e8;
  --accent-ink: #000000;
  --accent-soft: #1b2b3c;
  --brand: #5aa9ff;
  --red: #ee8a82;
  --red-hl: #f09a94;
  --focus: #8cb8e8;
  --sel: #3d3518;
  --sel-line: #d9b44a;
  --hl-1: #4d420f;
  --hl-2: #183f2a;
  --hl-3: #18304f;
  --hl-4: #4b1c36;
  --hl-5: #4f2d11;
  --hl-6: #332955;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
  --accent-2: #6cc4cf;
  --top: #0c131b;
  --grad: linear-gradient(180deg, #0c131b 0, #050607 24rem, var(--bg) 48rem);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.03);
  --card-shadow: none;
  --answer: linear-gradient(160deg, #0f161d 0%, #0b1015 100%);
  --answer-line: #1f2b35;
  --foot-bg: #060606;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'] {
    --bg: #16181b;
    --fg: #e7e2d9;
    --muted: #a39d93;
    --faint: #969087;
    --line: #2f3236;
    --surface: #1f2226;
    --surface-2: #26292e;
    --accent: #8cb8e8;
    --accent-ink: #0e1620;
    --accent-soft: #233549;
    --brand: #5aa9ff;
    --red: #f08e86;
  --red-hl: #f5b4af;
    --focus: #8cb8e8;
    --sel: #4a4120;
    --sel-line: #d9b44a;
    --hl-1: #4f4514;
    --hl-2: #1f4d34;
    --hl-3: #1e3a5f;
    --hl-4: #5a2341;
    --hl-5: #5e3615;
    --hl-6: #3d3166;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
    --accent-2: #6cc4cf;
    --top: #1c2631;
    --grad: linear-gradient(180deg, #1c2631 0, #181c21 24rem, var(--bg) 48rem);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-2: rgba(255, 255, 255, 0.04);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
    --answer: linear-gradient(160deg, #1d2833 0%, #1a242c 100%);
    --answer-line: #2b3946;
    --foot-bg: #131518;
  }
}

/* reading size steps (rem, so the browser's own text size still applies) */
:root[data-size='1'] { --fs: 0.9rem; }
:root[data-size='2'] { --fs: 1rem; }
:root[data-size='3'] { --fs: 1.125rem; }
:root[data-size='4'] { --fs: 1.25rem; }
:root[data-size='5'] { --fs: 1.4rem; }
:root[data-size='6'] { --fs: 1.6rem; }
:root[data-size='7'] { --fs: 1.85rem; }
:root[data-size='8'] { --fs: 2.15rem; }
:root[data-lh='1'] { --lh: 1.5; }
:root[data-lh='2'] { --lh: 1.7; }
:root[data-lh='3'] { --lh: 1.95; }
:root[data-font='sans'] { --read-font: var(--sans); }
:root[data-width='wide'] { --mnw: 10; }
@media (min-width: 1200px) { :root { --mn: 40; } }
@media (min-width: 1440px) { :root { --mn: 42; --zoom: 1.04; } }
@media (min-width: 1650px) { :root { --mn: 44; --zoom: 1.08; } }
@media (min-width: 1900px) { :root { --mn: 46; --zoom: 1.12; } }
@media (min-width: 2300px) { :root { --mn: 48; --zoom: 1.18; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 0.5rem; top: -3rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 0.9rem; border-radius: 8px; }
.skip:focus { top: 0.5rem; }
svg.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; flex: none; }

/* ---------- header ---------- */
/* three columns of equal width on each side of the search box, so it sits in the middle of the page */
.site {
  --side: 27.75rem;
  display: grid;
  grid-template-columns: minmax(var(--side), 1fr) minmax(0, 36rem) minmax(var(--side), 1fr);
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 40;
  padding: 0.65rem max(0.75rem, env(safe-area-inset-left)) 0.65rem max(0.75rem, env(safe-area-inset-right));
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--fg); text-decoration: none; font-weight: 680; font-size: 1.3rem; letter-spacing: 0.005em; padding: 0.25rem 0.35rem; margin-left: -0.35rem; border-radius: 8px; }
.brand svg { width: 2.05rem; height: 2.05rem; color: var(--brand); }
.brand .b2 { color: var(--brand); }
.go { display: flex; min-width: 0; width: 100%; position: relative; }
.go input {
  flex: 1;
  min-width: 0;
  height: 2.9rem;
  padding: 0 1rem 0 2.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 1.08rem;
}
.go input::placeholder { color: var(--faint); }
.go .i { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); width: 1.3rem; height: 1.3rem; color: var(--faint); pointer-events: none; }
.go button { position: absolute; right: 0.3rem; top: 0.3rem; height: 2.3rem; padding: 0 0.95rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.go:not(:focus-within) button { display: none; }
.tools { justify-self: end; display: flex; gap: 0.15rem; align-items: center; }
/* language: a small list under the globe (a <details>, so it works without scripts) */
.lang { position: relative; }
.lang > summary { list-style: none; gap: 0.3rem; }
.lang > summary::-webkit-details-marker { display: none; }
.lang[open] > summary { background: var(--surface-2); }
.lang .code { font-size: 0.95rem; font-weight: 650; letter-spacing: 0.04em; }
.lang-list { position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 45; min-width: 11rem; margin: 0; padding: 0.35rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.75rem; border-radius: 9px; color: var(--fg); text-decoration: none; }
.lang-list a:hover { background: var(--accent-soft); }
.lang-list a[aria-current='true'] { font-weight: 650; }
.lang-list a[aria-current='true']::after { content: '✓'; color: var(--accent); }
.ib {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.ib:hover { background: var(--surface-2); text-decoration: none; }
.ib .lbl { font-size: 0.95rem; }
/* the header's buttons: larger than the reading bar's */
.tools .ib { height: 2.9rem; min-width: 2.9rem; font-size: 1.1rem; }
.tools .ib .lbl { font-size: 1.07rem; }
/* below 1360px the header buttons lose their words, so the search box keeps a useful width */
@media (max-width: 1360px) {
  .site { --side: 17rem; }
  /* out of sight, but still the links' names for screen readers */
  .tools .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 900px) {
  .site { --side: 15.75rem; }
  .tools .ib { min-width: 2.6rem; padding: 0 0.4rem; }
}
@media (max-width: 760px) {
  .site { grid-template-columns: auto minmax(0, 1fr) auto; }
  .brand .name { display: none; }
}
@media (max-width: 440px) {
  .tools a.ib:not([data-act]) { display: none; }
}
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; margin: 0; padding: 0.35rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.suggest li a { display: block; padding: 0.55rem 0.75rem; border-radius: 8px; color: var(--fg); text-decoration: none; }
.suggest li a:hover, .suggest li a[aria-selected='true'] { background: var(--accent-soft); }
.suggest small { color: var(--muted); }

/* ---------- reading bar ---------- */
.rbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  /* the whole width of the window (so its glass and line reach the edges); the buttons line up with the text */
  padding: 0.45rem max(0.75rem, calc((100% - var(--col) - 6rem) / 2 + 0.75rem)) 0.35rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: transform 0.2s ease;
}
.rbar.stuck { border-bottom-color: var(--line); }
.rbar.away { transform: translateY(-110%); }
@media (prefers-reduced-motion: reduce) { .rbar { transition: none; } }
.rbar .mid { display: flex; align-items: center; gap: 0.25rem; min-width: 0; }
.pick { font-weight: 650; font-size: 1.02rem; max-width: 60vw; min-width: 0; justify-content: flex-start; }
.pick .bn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .pn, .pick > svg { flex: none; }
.pick .short { display: none; }
@media (max-width: 480px) {
  .pick .bn:has(.short) .long { display: none; }
  .pick .short { display: inline; }
  .rbar { padding-left: 0.35rem; padding-right: 0.35rem; gap: 0.1rem; }
  .rbar .mid { gap: 0.15rem; }
  .rbar .ib { padding: 0 0.45rem; }
  .rbar .nav-arrow { min-width: 2.2rem; }
}
.trbtn { font-weight: 650; letter-spacing: 0.03em; border: 1px solid var(--line); }
.nav-arrow[aria-disabled='true'] { visibility: hidden; }

/* ---------- reading text ---------- */
main { display: block; }
.read { max-width: calc(var(--col) + 2.5rem); margin: 0 auto; padding: 0.5rem 1.25rem 3rem; }
.ch {
  font-family: var(--read-font);
  font-size: calc(var(--fs) * var(--zoom));
  line-height: var(--lh);
  max-width: var(--col);
  margin: 0 auto;
  font-kerning: normal;
  hyphens: manual;
  overflow-wrap: break-word;
}
.ch-title { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 1.4rem 0 0.4rem; }
.ch-title .cn { color: var(--fg); }
.ch-title .bk { font-style: normal; }
.ch-big { font-family: var(--read-font); font-size: calc(var(--fs) * 2.6); line-height: 1; font-weight: 400; margin: 0.2rem 0 1rem; color: var(--fg); }
.ch p { margin: 0 0 0.85em; }
.ch .sh { font-family: var(--sans); font-size: 0.82em; font-weight: 650; letter-spacing: 0.01em; margin: 1.6em 0 0.35em; color: var(--fg); line-height: 1.35; }
.ch .sh2 { font-size: 0.78em; font-weight: 600; color: var(--muted); }
.ch .ms { font-family: var(--sans); text-align: center; font-size: 0.8em; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 1.6em 0 0.2em; }
.ch .mr, .ch .r { font-family: var(--sans); font-size: 0.72em; color: var(--muted); margin: 0 0 0.9em; line-height: 1.45; }
.ch .r a { color: var(--muted); }
.ch .sp { font-family: var(--sans); font-size: 0.78em; font-weight: 650; font-style: italic; color: var(--muted); margin: 1em 0 0.2em; }
.ch .qa { font-family: var(--sans); font-size: 0.8em; font-weight: 650; color: var(--muted); margin: 1.2em 0 0.25em; }
.ch .d { font-style: italic; color: var(--muted); font-size: 0.92em; margin-bottom: 0.6em; }
.ch .q1, .ch .q2, .ch .q3 { margin: 0; padding-left: 2em; text-indent: -1.4em; }
.ch .q2 { padding-left: 3.2em; }
.ch .q3 { padding-left: 4.4em; }
.ch .qr { text-align: right; font-style: italic; margin: 0; }
.ch .qc, .ch .pc { text-align: center; }
.ch .pi, .ch .li1 { padding-left: 1.6em; }
.ch .li2 { padding-left: 3.2em; }
.ch .mi { padding-left: 1.6em; }
.ch .m, .ch .nb, .ch .pmo { text-indent: 0; }
.ch .b { height: 0.75em; }
.ch .q1 + .b, .ch .q2 + .b { height: 0.9em; }
.ch p.q1 + p:not(.q1):not(.q2):not(.q3), .ch p.q2 + p:not(.q1):not(.q2):not(.q3) { margin-top: 0.8em; }
/* poetry as running text, a stanza to a paragraph (Reading settings: Poetry, "Lines as printed" keeps the lines) */
:root:not([data-poetry='lines']) .ch :is(p.q1, p.q2, p.q3) { display: inline; padding: 0; text-indent: 0; }

.vn {
  font-family: var(--sans);
  font-size: 0.6em;
  font-weight: 700;
  color: var(--faint);
  vertical-align: 0.45em;
  line-height: 0;
  margin: 0 0.22em 0 0.08em;
  text-decoration: none;
  padding: 0.35em 0.1em;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.vn:hover { color: var(--accent); }
.vn.c1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html:not(.js) .js-only { display: none !important; }
.aa { font-weight: 700; font-family: var(--serif); font-size: 1.05rem; }
.cnum { float: left; font-family: var(--read-font); font-size: 3.1em; line-height: 0.82; margin: 0.06em 0.12em 0 0; color: var(--fg); font-weight: 400; }
:root[data-vnum='off'] .vn { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:root[data-heads='off'] .ch .sh, :root[data-heads='off'] .ch .r, :root[data-heads='off'] .ch .ms, :root[data-heads='off'] .ch .mr { display: none; }
.wj { color: var(--red); }
:root[data-red='off'] .wj { color: inherit; }
/* on highlights, selection and read-aloud marking: verse numbers in the text colour, red letters lighter in dark themes */
.v[data-hl] .vn, .v.sel .vn, .v.speaking .vn { color: var(--fg); }
:root:not([data-red='off']) .v[data-hl] .wj, :root:not([data-red='off']) .v.sel .wj, :root:not([data-red='off']) .v.speaking .wj { color: var(--red-hl, var(--red)); }
.add { font-style: italic; }
.nd { font-variant: small-caps; letter-spacing: 0.02em; }
.qs { font-style: italic; }
.tl, .bk { font-style: italic; }
.fn { font-family: var(--sans); font-size: 0.62em; font-weight: 700; vertical-align: 0.5em; line-height: 0; margin: 0 0.08em; text-decoration: none; padding: 0.3em 0.12em; }
:root[data-notes='off'] .fn { display: none; }
:root[data-notes='off'] .notes { display: none; }
.vgap .vn { color: var(--accent); }
.vgap-mark { font-family: var(--sans); font-size: 0.7em; color: var(--accent); text-decoration: none; border: 1px dashed var(--accent); border-radius: 6px; padding: 0 0.3em; margin: 0 0.25em; white-space: nowrap; }

/* verse-per-line layout */
:root[data-layout='verse'] .ch p { display: inline; margin: 0; padding: 0; text-indent: 0; }
:root[data-layout='verse'] .ch .v.vs::before { content: ''; display: block; margin-top: 0.55em; }
:root[data-layout='verse'] .ch .b { display: none; }
:root[data-layout='verse'] .ch .sh, :root[data-layout='verse'] .ch .ms, :root[data-layout='verse'] .ch .r, :root[data-layout='verse'] .ch .d { display: block; }
:root[data-layout='verse'] .ch .sh { margin-top: 1.4em; }
:root[data-layout='verse'] .cnum { display: none; }
:root[data-layout='verse'] .vn.c1 { position: static; width: auto; height: auto; clip: auto; overflow: visible; }

/* highlights, selection, flash */
.v[data-hl] { border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.v[data-hl='1'] { background: var(--hl-1); }
.v[data-hl='2'] { background: var(--hl-2); }
.v[data-hl='3'] { background: var(--hl-3); }
.v[data-hl='4'] { background: var(--hl-4); }
.v[data-hl='5'] { background: var(--hl-5); }
.v[data-hl='6'] { background: var(--hl-6); }
.ch-tip { display: none; align-items: center; gap: 0.8rem; max-width: var(--col); margin: 1.1rem auto 0; padding: 0.7rem 0.8rem 0.7rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-family: var(--sans); font-size: 0.92rem; line-height: 1.45; color: var(--muted); user-select: none; -webkit-user-select: none; }
.ch-tip p { margin: 0; flex: 1; }
.ch-tip strong { color: var(--fg); }
html.js:not(.tip-seen) .ch-tip { display: flex; }
@media (hover: hover) and (pointer: fine) {
  .ch .v { cursor: pointer; }
  .ch .v:not(.sel):hover { text-decoration: underline dotted; text-decoration-color: var(--faint); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
}
.v.sel { text-decoration: underline; text-decoration-color: var(--sel-line); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.v.sel:not([data-hl]) { background: var(--sel); }
.v.flash { animation: flash 2.4s ease-out 1; border-radius: 3px; }
@keyframes flash { 0%, 40% { background: var(--sel); } 100% { background: transparent; } }
.v .bm-dot { display: inline-block; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--accent); vertical-align: 0.3em; margin: 0 0.15em; }
.v .note-dot { font-family: var(--sans); font-size: 0.6em; vertical-align: 0.5em; line-height: 0; color: var(--accent); text-decoration: none; margin: 0 0.15em; padding: 0.3em 0.1em; }
@media (prefers-reduced-motion: reduce) { .v.flash { animation: none; background: var(--sel); } }

/* chapter end */
.chap-end { max-width: var(--col); margin: 2rem auto 0; font-family: var(--sans); }
.pager { display: flex; justify-content: space-between; gap: 0.75rem; margin: 2rem auto 0; max-width: var(--col); }
.pager a { flex: 1; display: flex; flex-direction: column; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--fg); background: var(--surface); }
.pager a:hover { border-color: var(--accent); }
.pager a small { color: var(--muted); font-size: 0.8rem; }
.pager .next { text-align: right; }
.notes { max-width: var(--col); margin: 2.2rem auto 0; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.notes h2 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.6rem; }
.notes ol { margin: 0; padding-left: 1.4rem; list-style: lower-alpha; }
.notes li { margin: 0 0 0.45rem; }
.notes li:target { background: var(--sel); border-radius: 6px; }
.notes .back { font-weight: 650; margin-right: 0.35rem; text-decoration: none; }
.credit { max-width: var(--col); margin: 1.5rem auto 0; font-size: 0.8rem; color: var(--faint); font-family: var(--sans); }
.credit a { color: var(--muted); }
.planbox { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 0.9rem 1rem; margin: 2rem auto 0; max-width: var(--col); font-family: var(--sans); }
.planbox p { margin: 0 0 0.5rem; }
/* top of a chapter: the reading plan it belongs to, or the page it was opened from */
.ctx-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 1rem; max-width: var(--col); margin: 0.35rem auto 0.1rem; font-family: var(--sans); font-size: 0.93rem; }
.ctx-bar.plan { padding: 0.6rem 0.85rem; border-radius: 14px; background: var(--accent-soft); }
.ctx-back { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 650; color: var(--accent); text-decoration: none; min-width: 0; }
.ctx-back:hover { text-decoration: underline; }
.ctx-back .i { width: 1.1em; height: 1.1em; }
.ctx-day { color: var(--muted); }
.ctx-reads { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; margin-left: auto; }
.ctx-reads strong { color: var(--fg); }

/* ---------- generic pages ---------- */
.page { max-width: 46rem; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.page h1 { font-size: 1.75rem; line-height: 1.2; margin: 1.2rem 0 0.75rem; font-weight: 700; letter-spacing: -0.01em; }
.page h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
.page h3 { font-size: 1.02rem; margin: 1.4rem 0 0.4rem; }
.page p, .page li { line-height: 1.6; }
.prose { font-size: 1.02rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 0.5rem 0.4rem; text-align: left; vertical-align: top; }
.lead { font-size: 1.08rem; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.grid { display: grid; gap: 0.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { min-height: 2.1rem; padding: 0.25rem 0.8rem; font-size: 0.92rem; }
.btn.danger { color: var(--red); }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 650; letter-spacing: 0.04em; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* utilities (no inline styles: the CSP forbids them) */
.mt0, .page .mt0 { margin-top: 0; }
.mt2 { margin-top: 2rem; }
.m0 { margin: 0; }
.grow { flex: 1; }
.plain { list-style: none; padding: 0; }
.card-h,
.page .card-h { margin: 0 0 0.3rem; font-size: 1.12rem; }
.card-p { margin: 0 0 0.45rem; }
.refinput { min-width: 12rem; height: 2.6rem; padding: 0 0.9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }

/* misc components */
.mt1 { margin-top: 1rem; }
.linkbtn { border: 0; background: none; padding: 0.3rem 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: inherit; }
.note-text { white-space: pre-wrap; margin: 0.3rem 0; }
.hl-chip { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; margin-right: 0.45rem; vertical-align: -0.1rem; border: 1px solid var(--line); }
.hl-chip[data-hlc='1'] { background: var(--hl-1); }
.hl-chip[data-hlc='2'] { background: var(--hl-2); }
.hl-chip[data-hlc='3'] { background: var(--hl-3); }
.hl-chip[data-hlc='4'] { background: var(--hl-4); }
.hl-chip[data-hlc='5'] { background: var(--hl-5); }
.hl-chip[data-hlc='6'] { background: var(--hl-6); }
.cont-link { font-size: 1.15rem; font-weight: 650; text-decoration: none; }
.copyopts { display: grid; gap: 0.45rem; padding: 0.5rem 0 0.25rem; }
.setdetails { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.setdetails summary { font-weight: 600; cursor: pointer; }
.goref { margin: 0 0 1rem; }
.it { font-style: italic; }
.bd { font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--surface-2); padding: 0.05em 0.3em; border-radius: 4px; }

/* every page: the theme's soft gradient at the top, under a header without a band (Reading settings → Background
   → Plain turns it off: data-bg='plain') */
:root:not([data-bg='plain']) body { background: var(--grad) no-repeat, var(--bg); }
:root:not([data-bg='plain']) .site { background: transparent; border-bottom-color: transparent; }
:root:not([data-bg='plain']) .go input { background: var(--glass); }
/* the reading bar is frosted glass on the gradient; with scripts (reader.js marks it .stuck once the page scrolls) it is
   clear until it sticks to the top. Without them it stays glass, so text scrolling under it never shows through. */
:root:not([data-bg='plain']) .rbar { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
:root.js:not([data-bg='plain']) .rbar:not(.stuck) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root:not([data-bg='plain']) .cmp th { background: color-mix(in srgb, var(--bg) 85%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* home (V0.3): today's verse, slim cards, feelings, tiles */
.home { max-width: 58rem; margin: 0 auto; padding: 0 1.75rem; }
.eyebrow { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.home .today { text-align: center; padding: 2.6rem 0 0; }
.today-date { margin: 0 0 0.4rem; font-size: 1.2rem; font-weight: 600; color: var(--accent); }
.home .today .eyebrow { font-size: 0.92rem; }
.wave { display: block; width: 4rem; height: 0.75rem; margin: 1.5rem auto 0; color: var(--accent-2); opacity: 0.6; }
.home .today blockquote { margin: 1.5rem auto 0; max-width: 50rem; font-family: var(--serif); font-size: clamp(1.575rem, 0.99rem + 2.34vw, 2.61rem); line-height: 1.28; letter-spacing: -0.005em; color: var(--fg); text-wrap: balance; }
.today-ref { margin: 1.5rem 0 0; font-size: 1.05rem; color: var(--muted); }
.today-ref a { color: var(--fg); font-weight: 650; text-decoration: none; }
.today-ref a:hover { text-decoration: underline; }
.acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.8rem; }
.act { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.65rem; padding: 0 1rem; border-radius: 999px; font-size: 0.95rem; font-weight: 600; color: var(--fg); background: var(--glass); border: 1px solid var(--line); text-decoration: none; cursor: pointer; }
.act:hover { border-color: var(--accent); text-decoration: none; }
.act .i { width: 1.1rem; height: 1.1rem; color: var(--muted); }
.act.main { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.act.main .i, .act[aria-pressed='true'] .i { color: var(--accent); }
.yours { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.2rem; }
.slim { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.1rem 1.1rem 1.25rem; background: var(--glass-2); border: 1px solid var(--line); border-radius: 20px; min-width: 0; }
.slim .ic { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 16px; background: var(--accent-soft); color: var(--accent); flex: none; }
.slim .ic .i { width: 1.5rem; height: 1.5rem; }
.slim .txt { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.slim .eyebrow { font-size: 0.72rem; }
.slim strong { margin-top: 0.2rem; font-size: 1.2rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.slim small { margin-top: 0.15rem; color: var(--muted); font-size: 0.88rem; }
.slim .btn { flex: none; white-space: nowrap; }
.streak { white-space: nowrap; }
.streak .i { width: 1em; height: 1em; margin: 0 0.15em 0 0.1em; color: #d9822b; vertical-align: -0.12em; }
.ring { --p: 0%; width: 3.25rem; height: 3.25rem; border-radius: 50%; flex: none; background: conic-gradient(var(--accent-2) 0 var(--p), var(--surface-2) var(--p) 100%); display: grid; place-items: center; }
.ring::before { content: ''; grid-area: 1 / 1; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--surface); }
.ring b { grid-area: 1 / 1; font-size: 0.78rem; font-weight: 700; color: var(--accent); z-index: 1; }
/* feelings (feelings page and home) */
.feel-grid { list-style: none; padding: 0; margin: 1.3rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; }
.feel { display: block; text-align: center; padding: 0.95rem 0.6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg); text-decoration: none; font-weight: 600; }
.feel:hover { border-color: var(--accent); text-decoration: none; }
.feel-out { margin: 0 0 1.6rem; padding: 1.7rem 2rem 1.4rem; border-radius: 20px; background: var(--answer); border: 1px solid var(--answer-line); }
.feel-out .feel-h { color: var(--accent); margin: 0; }
.feel-h:focus { outline: none; }
.feel-intro { color: var(--muted); margin: 0.35rem 0 0; }
.feel-q { margin: 0.9rem 0 0; padding: 0; border: 0; }
.feel-q p { margin: 0; font-family: var(--serif); font-size: clamp(1.3rem, 1rem + 1.2vw, 1.85rem); line-height: 1.38; color: var(--fg); text-wrap: pretty; }
.feel-row { display: flex; align-items: center; gap: 0.6rem 1.1rem; flex-wrap: wrap; margin: 1.1rem 0 0; }
.feel-row .ref { font-weight: 650; color: var(--fg); margin-right: auto; text-decoration: none; }
.feel-row .ref:hover { text-decoration: underline; }
.feel-row .lk { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; color: var(--accent); background: none; border: 0; padding: 0.3rem 0; cursor: pointer; text-decoration: none; }
.feel-row .lk:hover { text-decoration: underline; }
.feel-row .lk .i { width: 1.05rem; height: 1.05rem; }
.feel-list { list-style: none; padding: 0; margin: 1rem 0; }
.feel-list .vq { margin: 0 0 1.2rem; }
.feel-help { margin: 1.1rem 0 0; }
.feelbox { margin-top: 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 2.6rem 3rem 2.4rem; box-shadow: var(--card-shadow); }
.feelbox > h2 { margin: 0; text-align: center; font-size: 1.85rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; }
.feelings { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 1.75rem 0 0; }
/* rows of six; a shorter last row sits in the middle */
.feelings > li { flex: 0 0 calc((100% - 5 * 0.6rem) / 6); }
.feelings .feel { display: flex; align-items: center; justify-content: center; height: 2.75rem; padding: 0 0.5rem; border-radius: 999px; font-weight: 560; font-size: 0.97rem; }
.feelings .feel[aria-current='true'], .feel-grid .feel[aria-current='true'] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.feelbox .feel-out { margin: 1.75rem 0 0; }
.explore { margin-top: 3.2rem; }
.explore > h2, .popular h3 { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.9rem; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin: 0; }
/* six tiles (an edition without compare and topics): two rows of three */
.tiles:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); }
.tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 1.1rem 1.1rem 1.15rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.tile:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); box-shadow: var(--card-shadow); }
.tile .ic { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 0.55rem; }
.tile strong { font-size: 1.02rem; }
.tile > span:last-child { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.popular { margin-top: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.chip { display: inline-flex; align-items: center; height: 2.3rem; padding: 0 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; font-size: 0.93rem; font-weight: 550; }
.chip:hover { border-color: var(--accent); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }
@media (max-width: 860px) {
  .tiles, .tiles:has(> :nth-child(6):last-child) { grid-template-columns: repeat(2, 1fr); }
  /* narrower screens: the feelings as a centred run of pills */
  .feelings > li { flex: 0 0 auto; }
  .feelings .feel { padding: 0 1.05rem; }
  .yours { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home { padding: 0 1rem; }
  .home .today { padding-top: 1.5rem; }
  .wave { margin-top: 1.2rem; }
  .home .today blockquote { margin-top: 1.1rem; line-height: 1.3; }
  .today-ref { margin-top: 1.1rem; font-size: 0.98rem; }
  .acts { margin-top: 1.4rem; }
  .act .lbl { display: none; }
  .act.main .lbl { display: inline; }
  .act:not(.main) { width: 2.65rem; padding: 0; justify-content: center; }
  .act.copy { display: none; }
  .yours { margin-top: 2.2rem; gap: 0.75rem; }
  .slim { padding: 0.85rem; gap: 0.85rem; border-radius: 18px; }
  .slim .ic, .ring { width: 3rem; height: 3rem; }
  .ring::before { width: 2.3rem; height: 2.3rem; }
  .slim strong { font-size: 1.08rem; }
  .slim small { font-size: 0.84rem; }
  .slim .of { display: none; }
  .feelbox { margin-top: 1rem; padding: 1.8rem 1rem 1.3rem; border-radius: 24px; }
  .feelbox > h2 { font-size: 1.55rem; }
  .feelings { gap: 0.45rem; margin-top: 1.3rem; }
  .feelings .feel { font-size: 0.93rem; height: 2.5rem; padding: 0 0.9rem; }
  .feel-out { padding: 1.3rem 1.1rem 1.1rem; }
  .feelbox .feel-out { margin-top: 1.2rem; }
  .feel-row .ref { flex-basis: 100%; }
  .explore { margin-top: 2.4rem; }
  .tiles { gap: 0.6rem; }
  .tile { padding: 0.9rem 0.85rem; border-radius: 16px; }
  .tile .ic { width: 2.25rem; height: 2.25rem; margin-bottom: 0.4rem; }
  .tile strong { font-size: 0.97rem; }
  .tile > span:last-child { font-size: 0.82rem; }
  .foot { margin-top: 3rem; }
  .foot-in { padding-top: 1.3rem; padding-bottom: 1.3rem; }
}
/* feelings (feelings page and home) */

/* book index */
.books h2 { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 1.8rem 0 0.6rem; }
.booklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.4rem; }
.booklist a { display: block; padding: 0.55rem 0.75rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.booklist a:hover { border-color: var(--accent); }
.chgrid { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr)); gap: 0.4rem; }
.chgrid a { display: flex; align-items: center; justify-content: center; height: 3rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-variant-numeric: tabular-nums; font-weight: 600; }
.chgrid a:hover, .chgrid a:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.chgrid a.cur { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- dialogs / sheets ---------- */
dialog.sheet {
  border: 0;
  padding: 0;
  width: min(34rem, 100vw);
  max-height: min(42rem, 92vh);
  border-radius: 18px;
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
}
dialog.sheet[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.sheet.wide { width: min(46rem, 100vw); max-height: min(48rem, 92vh); }
/* Reading settings: a large window, its groups in two columns on a wide screen */
dialog.sheet.large { width: min(68rem, calc(100vw - 2rem)); max-height: min(60rem, calc(100vh - 2rem)); border-radius: 22px; }
dialog.sheet.large .sheet-head { padding: 0.95rem 1rem 0.8rem 1.75rem; }
dialog.sheet.large .sheet-head h2 { font-size: 1.3rem; }
dialog.sheet.large .sheet-body { padding: 1rem 1.75rem 1.4rem; }
.settings .setcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.75rem; align-items: start; }
.settings .setgroup { margin-top: 1.15rem; }
.settings .setgroup > .eyebrow { margin: 0 0 0.1rem; }
.settings .setrow { padding: 0.62rem 0; }
.settings .setrow > span:not(.switch), .settings .setrow > label { font-size: 1.02rem; }
.settings .seg button { min-height: 2.4rem; padding: 0.4rem 0.95rem; }
.settings .setdetails:last-child { border-bottom: 0; }
.settings .setnote { margin: 1.1rem 0 0; }
@media (max-width: 900px) {
  .settings .setcols { grid-template-columns: minmax(0, 1fr); }
}
dialog.sheet::backdrop { background: rgba(10, 8, 5, 0.42); }
@media (max-width: 640px) {
  dialog.sheet, dialog.sheet.large { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 88vh; }
  dialog.sheet.large { max-height: 92vh; }
  dialog.sheet.large .sheet-head { padding: 0.7rem 0.75rem 0.5rem 1.1rem; }
  dialog.sheet.large .sheet-head h2 { font-size: 1.1rem; }
  dialog.sheet.large .sheet-body { padding: 0.6rem 1.1rem 1.2rem; }
}
.sheet-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.75rem 0.5rem 1.1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.sheet-head h2 { flex: 1; font-size: 1.05rem; margin: 0; }
.sheet-head h2:focus { outline: none; }
.sheet-head { flex: none; }
.sheet-body { flex: 1 1 auto; min-height: 0; padding: 0.9rem 1.1rem 1.2rem; overflow: auto; overscroll-behavior: contain; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem; gap: 0.15rem; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 0.4rem 0.85rem; cursor: pointer; min-height: 2.25rem; }
.seg button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.setrow:last-child { border-bottom: 0; }
.setrow > span:not(.switch) { font-weight: 600; }
/* a long label wraps beside its switch instead of pushing the switch onto a line of its own (the switch keeps its size) */
.setrow:has(> .switch) { flex-wrap: nowrap; }
.setrow:has(> .switch) > :not(.switch) { flex: 1; min-width: 0; }
@media (max-width: 30rem) {
  .setrow > .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .setrow > .seg button { padding-inline: 0.35rem; }
}
.switch { position: relative; width: 3rem; height: 1.75rem; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background 0.15s; }
.switch span::after { content: ''; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(1.25rem); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.sizebox { display: flex; align-items: center; gap: 0.5rem; }
.sizebox output { min-width: 2.2rem; text-align: center; font-variant-numeric: tabular-nums; }
.preview { font-family: var(--read-font); font-size: var(--fs); line-height: var(--lh); padding: 0.7rem 0.9rem; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 0.4rem; }
.tabs { display: flex; gap: 0.3rem; margin-bottom: 0.7rem; }
.pickgrid { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: 0.35rem; }
.pickgrid button { width: 100%; min-height: 2.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; padding: 0.3rem; }
.pickgrid button:hover, .pickgrid button:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.pickgrid.nums { grid-template-columns: repeat(auto-fill, minmax(2.9rem, 1fr)); }
.pickgrid button.cur { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.picklabel { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin: 0.2rem 0 0.4rem; }
.trlist { list-style: none; padding: 0; margin: 0; }
.trlist li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.trlist li:last-child { border-bottom: 0; }
.trlist a.tr { flex: 1; display: flex; flex-direction: column; padding: 0.45rem 0.55rem; border-radius: 10px; color: var(--fg); text-decoration: none; }
.trlist a.tr:hover { background: var(--accent-soft); }
.trlist a.tr[aria-current='true'] { background: var(--accent-soft); font-weight: 650; }
.trlist small { color: var(--muted); }

/* popover (footnotes, missing verses, cross references) */
.pop {
  position: absolute;
  z-index: 40;
  width: min(24rem, calc(100vw - 1.5rem));
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font: 400 0.95rem/1.5 var(--sans);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pop .pop-ref { font-weight: 650; margin-bottom: 0.25rem; }
.pop p { margin: 0.3rem 0; }
.pop .row { margin-top: 0.5rem; }

/* selection action bar */
.actions {
  position: fixed;
  left: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 35;
  width: min(40rem, calc(100vw - 1rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.5rem 0.55rem 0.55rem;
  font-family: var(--sans);
}
.actions .ref { font-weight: 650; padding: 0.15rem 0.4rem 0.35rem; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.actions .btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(3.6rem, 1fr)); gap: 0.15rem; }
.actions .ib { flex-direction: column; height: auto; padding: 0.35rem 0.5rem; gap: 0.1rem; min-width: 3.6rem; }
.actions .ib .lbl { display: block; font-size: 0.74rem; }
/* six actions (no compare and study) on a phone: two even rows of three, not five and one */
@media (max-width: 34rem) {
  .actions .btns { grid-template-columns: repeat(4, 1fr); }
  .actions .btns:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); }
}
.swatches { display: flex; gap: 0.4rem; padding: 0.4rem 0.4rem 0.2rem; flex-wrap: wrap; }
.swatches button { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.swatches button[data-c='1'] { background: var(--hl-1); }
.swatches button[data-c='2'] { background: var(--hl-2); }
.swatches button[data-c='3'] { background: var(--hl-3); }
.swatches button[data-c='4'] { background: var(--hl-4); }
.swatches button[data-c='5'] { background: var(--hl-5); }
.swatches button[data-c='6'] { background: var(--hl-6); }
.swatches button.none { background: var(--surface); position: relative; }
.swatches button.none::after { content: ''; position: absolute; left: 15%; right: 15%; top: 50%; border-top: 2px solid var(--muted); transform: rotate(-45deg); }
body.has-actions .read { padding-bottom: 12rem; }

/* read-aloud bar (audiobar.js): one line on a wide screen; the options go to a second line on a narrow one */
.audiobar {
  position: fixed;
  left: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 34;
  width: min(110rem, calc(100vw - 1.5rem));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.35rem 0.45rem;
  font-family: var(--sans);
}
.audiobar .aref { flex: 1 1 6rem; min-width: 0; font-weight: 650; padding: 0 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audiobar .aplay { background: var(--accent); color: var(--accent-ink); border-radius: 50%; }
.audiobar .aplay:hover { background: var(--accent); filter: brightness(1.08); }
.audiobar .aopts { order: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 1rem; padding: 0 0.6rem 0 0.4rem; }
.audiobar [data-a='close'] { order: 2; }
.audiobar .aopt { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.audiobar .aopt > .i { width: 1.15rem; height: 1.15rem; }
.audiobar .aopt.chk { color: var(--fg); font-size: 0.9rem; cursor: pointer; }
.audiobar .aopt.chk input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.audiobar select { font: inherit; font-size: 0.92rem; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.4rem; max-width: 100%; }
.audiobar .avoice select { max-width: 15rem; }
.audiobar .chk .short { display: none; }
@media (max-width: 1180px) {
  .audiobar .aopts { order: 3; flex-basis: 100%; padding: 0.45rem 0.4rem 0.2rem; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .audiobar .albl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .audiobar .aopts { gap: 0.4rem 0.6rem; padding-left: 0.25rem; padding-right: 0.25rem; }
  .audiobar select { font-size: 0.88rem; padding: 0.28rem 0.2rem; }
  .audiobar .aopt { gap: 0.3rem; }
  .audiobar .avoice { flex-basis: 100%; }
  .audiobar .avoice select { flex: 1; max-width: none; }
  .audiobar .chk .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .audiobar .chk .short { display: inline; }
}
body.has-audio { padding-bottom: calc(var(--abar-h, 3.3rem) + 1.25rem); }
body.has-audio .actions { bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + var(--abar-h, 3.3rem) + 0.5rem); }
.v.speaking { background: var(--accent-soft); border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
[data-act='listen'][aria-pressed='true'] { color: var(--accent); background: var(--accent-soft); }
.toast { position: fixed; left: 50%; top: 4.4rem; transform: translateX(-50%); z-index: 60; background: var(--fg); color: var(--bg); padding: 0.6rem 1rem; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 2rem); }

/* compare */
.page .pager { max-width: none; margin-inline: 0; }
.vq { margin: 1rem 0 1.4rem; padding: 0.1rem 0 0.1rem 1.2rem; border-left: 4px solid var(--accent); }
.vq p { font-family: var(--read-font); font-size: calc(var(--fs) * 1.3); line-height: 1.55; margin: 0 0 0.6rem; color: var(--fg); }
.vq footer { font-size: 0.9rem; color: var(--muted); }
.vp-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.8rem; }
.vp-xr { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.vp-xr li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-family: var(--read-font); line-height: 1.55; }
.vp-xr a { font-family: var(--sans); font-weight: 650; font-size: 0.92rem; margin-right: 0.35rem; }
.release ul { padding-left: 1.2rem; }
.release li { margin: 0.3rem 0; }
.cmp-back { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.6rem; margin: 1.2rem 0 0.4rem; }
.cmp { width: 100%; border-collapse: collapse; font-family: var(--read-font); font-size: var(--fs); line-height: var(--lh); }
.cmp th { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.06em; text-align: left; color: var(--muted); padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); }
.cmp td { vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.cmp td.vnum { font-family: var(--sans); font-size: 0.75rem; font-weight: 700; color: var(--faint); width: 2.2rem; }
.cmp .absent { color: var(--faint); font-style: italic; font-family: var(--sans); font-size: 0.85em; }
@media (max-width: 760px) {
  .cmp thead { display: none; }
  .cmp tr { display: block; border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
  .cmp td { display: block; border: 0; padding: 0.2rem 0.2rem; }
  .cmp td[data-tr]::before { content: attr(data-tr); display: block; font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
}
.wide { max-width: 80rem; }

/* search */
.sform { display: grid; gap: 0.6rem; margin: 0.5rem 0 1rem; }
.sform .q { display: flex; gap: 0.5rem; }
.sform input[type='search'] { flex: 1; min-width: 0; height: 2.8rem; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 1.05rem; }
.sform select { height: 2.4rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 0.5rem; }
.sopts { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; font-size: 0.95rem; }
.sopts label { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.2rem; }
.sopts input[type='checkbox'], .copyopts input[type='checkbox'] { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); }
.copyopts select { min-height: 2.2rem; }
.perbook { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 1rem; }
.perbook button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0.2rem 0.7rem; min-height: 2.1rem; font-size: 0.85rem; cursor: pointer; }
.perbook .cnt { color: var(--muted); margin-left: 0.4em; font-variant-numeric: tabular-nums; }
.results { list-style: none; padding: 0; margin: 0; }
.results li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.results .rref { font-weight: 650; text-decoration: none; }
.results .rtext { margin: 0.2rem 0 0; font-family: var(--read-font); font-size: 1.05rem; line-height: 1.55; }
mark { background: var(--hl-1); color: inherit; border-radius: 2px; padding: 0 0.05em; }

/* plans */
.plan-days { list-style: none; padding: 0; margin: 0; }
.plan-days li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.plan-days li.today { background: var(--accent-soft); border-radius: 10px; padding-left: 0.5rem; padding-right: 0.5rem; }
.plan-days .dnum { width: 4.2rem; flex: none; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; padding-top: 0.15rem; }
.plan-days .dread { flex: 1; }
.plan-days .dread a { margin-right: 0.35rem; }
.check { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.check input { width: 1.35rem; height: 1.35rem; accent-color: var(--accent); }
.progress { height: 0.5rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0.4rem 0; }
.progress span { display: block; height: 100%; background: var(--accent); }

/* notes page */
.mylist { list-style: none; padding: 0; margin: 0; }
.mylist li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.mylist .meta { font-size: 0.85rem; color: var(--muted); }
textarea.note { width: 100%; min-height: 8rem; padding: 0.7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); line-height: 1.5; }

/* footer: only the pages about the site (the home page's tiles and the menu lead to the rest) */
.foot { border-top: 1px solid var(--line); margin-top: 4.5rem; background: var(--foot-bg); color: var(--muted); font-size: 0.92rem; }
.foot-in { margin: 0 auto; padding: 1.5rem max(0.75rem, env(safe-area-inset-right)) 1.5rem max(0.75rem, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--fg); font-weight: 650; text-decoration: none; }
.foot-brand svg { width: 1.4rem; height: 1.4rem; color: var(--brand); }
.foot-brand .b2 { color: var(--brand); }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.5rem; }
.foot-links a { display: inline-block; padding: 0.3rem 0; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }
/* menu: a wide card that drops down under the header (app.js) */
.menu {
  position: absolute;
  top: calc(100% + 0.2rem);
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 50;
  width: min(66rem, calc(100vw - 1.5rem));
  max-height: calc(100vh - 5rem);
  max-height: calc(100dvh - 5rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.1rem;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 2px 6px rgba(30, 25, 15, 0.06), 0 18px 50px rgba(30, 25, 15, 0.16);
}
.menu-cont { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.9rem; margin: 0 0 0.8rem; border-radius: 16px; background: var(--accent-soft); color: var(--fg); text-decoration: none; }
.menu-cont .ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--surface); color: var(--accent); flex: none; }
.menu-cont .txt { display: flex; flex-direction: column; margin-right: auto; min-width: 0; }
.menu-cont small { color: var(--muted); font-size: 0.8rem; }
.menu-cont strong { font-size: 1.05rem; }
.menu-cont > .i { color: var(--accent); }
.menu-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.menu-tiles:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); }
.mtile { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 0.85rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--fg); text-decoration: none; min-width: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.mtile:hover, .mtile[aria-current='page'] { border-color: var(--accent); text-decoration: none; box-shadow: var(--card-shadow); }
.mtile .ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
.mtile .txt { display: flex; flex-direction: column; min-width: 0; }
.mtile strong { font-size: 0.97rem; line-height: 1.25; }
.mtile small { color: var(--muted); font-size: 0.8rem; line-height: 1.3; margin-top: 0.1rem; }
/* the other pages in the tiles' columns, so no link is left alone on a line */
.menu-more { list-style: none; margin: 0.9rem 0 0; padding: 0.7rem 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.15rem 0.6rem; }
.menu-more a { display: flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.75rem; border-radius: 999px; color: var(--fg); text-decoration: none; font-size: 0.94rem; min-width: 0; }
.menu-more a:hover, .menu-more a[aria-current='page'] { background: var(--accent-soft); }
.menu-more .i { color: var(--muted); }
.menu-set { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 0.8rem; margin: 0.7rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.menu-set-h { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; }
.menu-set-h .i { color: var(--muted); }
.menu-set .btn { margin-left: auto; }
.menu-bg { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; cursor: pointer; }
.menu-set .btn .aa { font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .mtile { transition: none; } }
@media (max-width: 900px) {
  .menu-tiles, .menu-tiles:has(> :nth-child(6):last-child), .menu-more { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .menu { left: 0.5rem; right: 0.5rem; width: auto; padding: 0.8rem; border-radius: 20px; }
  .menu-tiles { gap: 0.45rem; }
  .mtile { padding: 0.65rem; gap: 0.55rem; }
  .mtile .ic { width: 2.1rem; height: 2.1rem; }
  .mtile small { display: none; }
  .menu-set .btn { margin-left: 0; }
}

/* focus mode */
:root.focus .site, :root.focus .rbar, :root.focus .foot, :root.focus .pager, :root.focus .credit, :root.focus .ctx-bar { display: none; }
.focus-exit { position: fixed; top: 0.6rem; right: 0.6rem; z-index: 30; opacity: 0.55; }
.focus-exit:hover, .focus-exit:focus-visible { opacity: 1; }

@media print {
  :root, :root[data-theme] { --bg: #fff; --fg: #000; --muted: #333; --faint: #444; --accent: #000; --red: #000; --surface: #fff; --surface-2: #fff; --line: #bbb; }
  .site, .rbar, .pager, .foot, .actions, .audiobar, .toast, .pop, dialog, .planbox, .ctx-bar, .focus-exit, .skip, .js-only, .bm-dot, .note-dot, .ch-tip { display: none !important; }
  body, :root:not([data-bg='plain']) body { background: #fff; color: #000; }
  .wj { color: #000; }
  .ch { max-width: none; }
  .v.sel, .v.speaking, .v.flash { background: none !important; text-decoration: none !important; animation: none !important; }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3, .h1, .h2 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .credit { color: #333; }
}

/* verse image */
.vi-wrap { display: flex; justify-content: center; background: var(--surface-2); border-radius: 10px; padding: 0.75rem; }
.vi-canvas { display: block; max-width: 100%; max-height: 52vh; width: auto; height: auto; border-radius: 6px; box-shadow: var(--shadow); }
.vi-controls { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin: 0.9rem 0; }
.vi-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.vi-group legend { font-weight: 650; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; padding: 0; }
.vi-opt { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 0.8rem; font-size: 0.95rem; cursor: pointer; }

.table-wrap { overflow-x: auto; }
table.corr { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
table.corr th, table.corr td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); }
table.corr th { font-size: 0.8rem; color: var(--muted); }
table.corr td:first-child { white-space: nowrap; }
table.corr td { overflow-wrap: anywhere; }

/* study panel */
.st-sec { margin: 0.2rem 0 1.2rem; }
.st-sec h3 { font-size: 1.02rem; margin: 0.5rem 0 0.25rem; }
.st-words { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.st-w { display: grid; grid-template-columns: minmax(6rem, 1.3fr) minmax(5rem, 1fr) minmax(5rem, 1fr) 3.6rem; gap: 0.6rem; align-items: baseline; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem; cursor: pointer; color: var(--fg); font: inherit; }
.st-w:hover { border-color: var(--accent); }
.st-w[aria-expanded='true'] { border-color: var(--accent); background: var(--accent-soft); }
.st-w .en { font-weight: 600; }
.st-w .orig { font-size: 1.18rem; font-family: 'SBL Hebrew', 'SBL Greek', 'Ezra SIL', 'Cardo', 'Times New Roman', serif; }
.st-w .tl { color: var(--muted); font-style: italic; }
.st-w .sn { color: var(--muted); font-family: var(--sans); font-size: 0.8rem; text-align: right; }
/* interlinear layout (interlinear.js) */
.inter { display: none; }
:root[data-layout='inter'] .inter { display: block; }
/* the normal text stays until the interlinear words are there (and in editions without them) */
:root[data-layout='inter'] article.ch:has(> .inter) > :not(.ch-title):not(.inter) { display: none; }
.inter-note { margin: 0.3rem 0 0.8rem; font-family: var(--sans); font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.iv { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.15rem 0.1rem; padding: 0.6rem 0 0.7rem; border-bottom: 1px solid var(--line); }
.ivn { font: 700 0.75rem/1 var(--sans); color: var(--faint); min-width: 1.7rem; padding: 0.55rem 0.2rem 0 0; text-decoration: none; }
.iw { display: inline-flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.3rem 0.4rem; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; color: var(--fg); text-align: center; line-height: 1.25; }
.iw:hover, .iw:focus-visible { border-color: var(--line); background: var(--surface); }
.iw .en { font-family: var(--read-font); font-size: var(--fs); }
.iw .or { font-family: 'SBL Hebrew', 'SBL Greek', 'Ezra SIL', 'Cardo', 'Times New Roman', serif; font-size: calc(var(--fs) * 1.08); color: var(--accent); }
.iw .tl { font-size: 0.78rem; color: var(--muted); font-style: italic; }
.iw.nt .en { color: var(--faint); }

.st-lex { padding: 0.5rem 0.8rem 0.8rem; border-left: 3px solid var(--accent); margin: 0.35rem 0 0.7rem 0.35rem; }
.st-lex.inter-lex { border-left: 0; margin: 0; padding: 0; }
.st-lex p { margin: 0.35rem 0; }
.st-head strong { font-size: 1.2rem; margin-right: 0.3rem; }
.st-gloss { font-weight: 650; }
.st-def { white-space: pre-line; font-size: 0.95rem; }
.st-refs { columns: 4 8rem; column-gap: 1rem; padding-left: 0; list-style: none; font-size: 0.92rem; margin: 0.4rem 0 0.6rem; }
.st-x { list-style: none; padding: 0; margin: 0.3rem 0 0; }
.st-x li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.st-x a { font-weight: 650; font-family: var(--sans); font-size: 0.92rem; margin-right: 0.35rem; }
.st-xt { font-family: var(--read-font); }
.st-src { border-top: 1px solid var(--line); padding-top: 0.6rem; }
@media (max-width: 560px) {
  .st-w { grid-template-columns: 1fr auto; }
  .st-w .tl, .st-w .sn { display: none; }
}

/* topics */
.crumbs { font-family: var(--sans); font-size: 0.9rem; margin: 1.2rem 0 0; color: var(--muted); }
.page .crumbs + h1 { margin-top: 0.3rem; }
.tlist { list-style: none; padding: 0; margin: 0.4rem 0 1.2rem; }
.tlist li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.tlist a { font-family: var(--sans); font-weight: 650; font-size: 0.92rem; margin-right: 0.3rem; white-space: nowrap; }
.tlist .tx { font-family: var(--read-font); }
.topic h2 { font-size: 1.05rem; margin: 1.4rem 0 0.2rem; }
.toc { margin: 0.6rem 0 1rem; }
.toc summary { cursor: pointer; font-weight: 600; }
.cols { columns: 3 12rem; column-gap: 1.5rem; padding-left: 0; list-style: none; }
.cols li { break-inside: avoid; padding: 0.15rem 0; }
.az { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 1rem; }
.az .btn { min-width: 2.4rem; justify-content: center; }
.tresults li { padding: 0.3rem 0; }
.stopics { margin: 0.2rem 0 0.6rem; min-height: 1.5em; }
/* results arrive after load: keep the footer below the fold and reserve the topic line so nothing jumps */
body[data-page='search'] main { min-height: 100vh; }

.passage-end { max-width: var(--col); margin: 1.2rem auto 0; padding: 0.8rem 1rem; font-family: var(--sans); }
