/* Fonts are hosted with the site: no third-party requests. Licences in fonts/LICENSES.txt */
@font-face { font-family: "IM Fell English SC"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/im-fell-english-sc-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/literata-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/literata-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/literata-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }

html, body { margin: 0; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; }
/* Layout: brand bar, then the live slide (the shared screen), its controls, the "coming up" guide, the share tool, then the 66-book ribbon and schedule facts. */
:root {
  --bg: #F2F4F8;
  --panel: #E6EAF2;
  --card: #FFFFFF;
  --ink: #17203A;
  --muted: #5A6480;
  --faint: #98A0B5;
  --lapis: #2343A6;
  --on-lapis: #FFFFFF;
  --ot: #B5C0DC;
  --nt: #6F86CC;
  --hl: #B5862A;
  --rule: #D3D9E6;
  --live: #D9362B;
  --stage-ink: #F5F1E8;
  --font-display: "IM Fell English SC", "Iowan Old Style", Georgia, serif;
  --font-read: "Literata", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1020; --panel: #151B30; --card: #121828; --ink: #ECE7DA; --muted: #9098B0; --faint: #5A627C;
    --lapis: #94AAF2; --on-lapis: #0C1020; --ot: #333D63; --nt: #5167AE; --hl: #E4B657; --rule: #232B45; --live: #FF6B5E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1020; --panel: #151B30; --card: #121828; --ink: #ECE7DA; --muted: #9098B0; --faint: #5A627C;
  --lapis: #94AAF2; --on-lapis: #0C1020; --ot: #333D63; --nt: #5167AE; --hl: #E4B657; --rule: #232B45; --live: #FF6B5E;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 980px; margin: 0 auto; padding-block: 12px 44px; display: flex; flex-direction: column; gap: 18px; }
.lower { max-width: 680px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; }

/* brand bar */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.brand-tag { font-family: var(--font-read); font-style: italic; font-size: 13px; color: var(--muted); }
.seg-ctl { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg-ctl button { appearance: none; border: 0; background: transparent; color: var(--muted); font: 600 13px/1 var(--font-ui); padding: 9px 12px; cursor: pointer; min-height: 36px; }
.seg-ctl button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg-ctl small { font-weight: 400; opacity: .8; }

/* ---------- the stage ---------- */
.stage {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden; color: var(--stage-ink); background: #0E0F18;
  container-type: size; display: grid; grid-template-rows: auto 1fr auto;
  padding: 4.2cqmin 5cqmin; isolation: isolate; --acc: #F0C98C;
}
.stage[data-s="0"] { --acc: #F0C98C; } .stage[data-s="1"] { --acc: #D8DDB0; } .stage[data-s="2"] { --acc: #CBBEFF; }
.stage[data-s="3"] { --acc: #F6AE6B; } .stage[data-s="4"] { --acc: #F7D58F; } .stage[data-s="5"] { --acc: #A7E0D4; } .stage[data-s="6"] { --acc: #F2CB66; }
.stage:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.stage:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.bg { position: absolute; inset: 0; z-index: -2; opacity: 0; transition: opacity 2.4s ease; }
.bg.on { opacity: 1; }
.bg.s0 { background: linear-gradient(160deg, #2A1A12 0%, #4A2A17 55%, #7A4A24 100%); }
.bg.s1 { background: linear-gradient(160deg, #141C17 0%, #26372B 55%, #4B5A3A 100%); }
.bg.s2 { background: linear-gradient(160deg, #0C1030 0%, #1E2460 55%, #3C3478 100%); }
.bg.s3 { background: linear-gradient(160deg, #1E0D0E 0%, #431816 55%, #7A2E1E 100%); }
.bg.s4 { background: linear-gradient(160deg, #121A33 0%, #33335E 50%, #7A5468 100%); }
.bg.s5 { background: linear-gradient(160deg, #0B1D21 0%, #163C42 55%, #2D6461 100%); }
.bg.s6 { background: linear-gradient(160deg, #120A1F 0%, #2E1550 55%, #5B2A6E 100%); }
.glow { position: absolute; z-index: -1; width: 90cqmax; height: 90cqmax; left: -20cqmax; top: -45cqmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 244, 220, .16), rgba(255, 244, 220, 0)); animation: drift 48s ease-in-out infinite alternate; pointer-events: none; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(55cqmax, 30cqmax); } }
.s-top { display: flex; align-items: center; justify-content: space-between; gap: 2cqmin; min-width: 0; }
.kicker { font-size: max(11px, 2.5cqmin); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.s-right { display: flex; align-items: center; gap: 1.6cqmin; flex-shrink: 0; }
.onair { display: inline-flex; align-items: center; gap: .6em; font-size: max(10px, 2.1cqmin); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .85; white-space: nowrap; }
.onair i { width: .7em; height: .7em; border-radius: 50%; background: #FF5A4E; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
.mute { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: .55em; font: 600 max(12px, 2.3cqmin)/1 var(--font-ui);
  color: #10131F; background: var(--stage-ink); border: 0; border-radius: 999px; padding: .75em 1.1em .75em .9em; min-height: 36px; white-space: nowrap; }
.mute svg { width: 1.25em; height: 1.25em; }
.mute[aria-pressed="true"] { background: rgba(255,255,255,.14); color: var(--stage-ink); }
.mute:disabled { opacity: .55; cursor: default; }
.main { position: relative; min-height: 0; display: grid; }
.main > * { grid-area: 1 / 1; min-height: 0; }
.verse-box { display: flex; align-items: center; overflow: hidden; transition: opacity .5s ease; }
.verse { margin: 0; font-family: var(--font-read); line-height: 1.42; max-width: 34em; text-wrap: pretty; }
.verse sup { font-family: var(--font-ui); font-size: .45em; font-weight: 600; color: var(--acc); margin-right: .35em; vertical-align: .9em; }
.verse .w { opacity: .4; transition: opacity .3s ease; }
.verse .w.said { opacity: 1; }
.verse.in { animation: rise .55s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(1.2cqmin); } to { opacity: 1; transform: none; } }
.title-card { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.2cqmin; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.title-card.show { opacity: 1; }
.main.titled .verse-box { opacity: 0; }
.tc-small { font-size: max(12px, 3cqmin); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.tc-big { font-family: var(--font-display); font-size: 13cqmin; line-height: 1; text-wrap: balance; }
.tc-sub { font-family: var(--font-read); font-style: italic; font-size: max(14px, 4.2cqmin); opacity: .8; }
.s-foot { display: flex; align-items: center; gap: 2.4cqmin; min-width: 0; }
.ref { font-family: var(--font-read); font-size: max(13px, 3.4cqmin); color: var(--acc); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.chap-bar { flex: 1; height: max(3px, .55cqmin); background: rgba(255,255,255,.16); border-radius: 2px; overflow: hidden; min-width: 30px; }
.chap-bar i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .25s linear; }
.url { font-size: max(10px, 2.1cqmin); letter-spacing: .06em; opacity: .75; white-space: nowrap; transition: opacity .6s ease; }
.url.fade { opacity: 0; }
@media (max-width: 560px) {
  .stage { aspect-ratio: 4 / 5; }
  .stage:fullscreen { aspect-ratio: auto; }
  .stage:-webkit-full-screen { aspect-ratio: auto; }
}

/* ---------- controls ---------- */
.controls { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.listen { appearance: none; border: 0; cursor: pointer; font: 600 17px/1 var(--font-ui); color: var(--on-lapis); background: var(--lapis);
  padding: 15px 26px; border-radius: 999px; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; }
.listen svg { width: 18px; height: 18px; }
.listen[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.listen:disabled { opacity: .5; cursor: default; }
.status { font-size: 13px; color: var(--muted); flex: 1 1 220px; min-width: 0; }
.field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.field.grow { flex: 1 1 240px; }
select { font: 14px var(--font-ui); color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 8px; max-width: 100%; min-width: 0; }
.field.grow select { flex: 1 1 auto; }
.ctl { appearance: none; cursor: pointer; font: 500 13px/1 var(--font-ui); color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 12px; display: inline-flex; gap: 7px; align-items: center; min-height: 36px; text-decoration: none; }
.ctl svg { width: 14px; height: 14px; flex-shrink: 0; }
.ctl.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- guide ---------- */
.section-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head h2 { font-family: var(--font-read); font-weight: 500; font-size: 22px; margin: 0; text-wrap: balance; }
.section-head p { margin: 0; font-size: 13px; color: var(--muted); }
.guide { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.guide li { display: grid; grid-template-columns: 8.4em minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.g-when { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); line-height: 1.3; }
.g-when b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.g-book { font-family: var(--font-read); font-size: 18px; min-width: 0; line-height: 1.3; }
.g-book small { display: block; font-family: var(--font-ui); font-size: 12px; color: var(--muted); }
.g-now { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--live); }
.g-now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.icon-btn { appearance: none; cursor: pointer; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); border-radius: 6px; font: 500 13px/1 var(--font-ui); padding: 8px 10px; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.icon-btn svg { width: 14px; height: 14px; }
.guide-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; max-width: 60ch; }

/* ---------- share ---------- */
.share { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 20px; align-items: start; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 18px; }
.share-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.share-when { font-family: var(--font-read); font-size: 18px; line-height: 1.45; margin: 0; }
.share-when em { font-style: normal; color: var(--lapis); }
.share-when small { display: block; font-family: var(--font-ui); font-size: 13px; color: var(--muted); margin-top: 4px; }
.invite { font-size: 14px; line-height: 1.5; background: var(--panel); border-radius: 6px; padding: 10px 12px; margin: 0; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-img { width: 100%; max-width: 300px; aspect-ratio: 1; border-radius: 8px; display: block; background: var(--panel); }
.card-cap { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.toast { font-size: 13px; color: var(--lapis); min-height: 1.4em; margin: 0; }
@media (max-width: 620px) { .share { grid-template-columns: minmax(0, 1fr); } .card-img { max-width: 100%; } }

/* ---------- ribbon + facts ---------- */
#ribbon-label { margin-bottom: 18px; }
.ribbon { position: relative; display: flex; gap: 1px; height: 30px; }
.seg { flex-basis: 0; min-width: 0; border: 0; padding: 0; cursor: pointer; background: var(--ot); }
.seg.nt { background: var(--nt); }
.seg.on { background: var(--hl); }
.seg.pick { box-shadow: inset 0 -4px 0 var(--lapis); }
.marker { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); left: 0; pointer-events: none; transition: left 1s linear; }
.marker::before { content: ""; position: absolute; top: -5px; left: -4px; border: 5px solid transparent; border-top-color: var(--ink); }
.ribbon-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 10px; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin: 0; }
.facts div { background: var(--bg); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.facts dd small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; margin: 0; max-width: 62ch; }
@media (max-width: 420px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .guide li { grid-template-columns: 6.8em minmax(0, 1fr) auto; gap: 4px 10px; }
  .icon-btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .onair i, .glow { animation: none; }
  .verse.in { animation: none; }
  .marker, .verse .w, .bg, .chap-bar i { transition: none; }
}

/* ---------- live room: Amen and who's here ---------- */
.amen { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid var(--hl); background: transparent; color: var(--ink); font: 600 16px/1 var(--font-ui); }
.amen svg { width: 18px; height: 18px; color: var(--hl); }
.amen:disabled { opacity: .6; cursor: default; }
.live-line { margin: 0; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.live-line::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 8px; vertical-align: 1px; }
.amen-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.amen-pop { position: absolute; bottom: 14%; font: 600 max(12px, 2.4cqmin)/1.2 var(--font-ui); color: var(--acc); letter-spacing: .04em;
  white-space: nowrap; animation: amen-rise 4.4s ease-out forwards; }
@keyframes amen-rise { 0% { opacity: 0; transform: translateY(0); } 12% { opacity: 1; } 70% { opacity: .9; } 100% { opacity: 0; transform: translateY(-38cqh); } }
.install-hint { margin: 0; font-size: 13px; color: var(--muted); max-width: 60ch; }
@media (prefers-reduced-motion: reduce) { .amen-pop { animation: amen-fade 3s ease-out forwards; } @keyframes amen-fade { from { opacity: 1; } to { opacity: 0; } } }
.amen-pop { max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 520px) { .onair-count { display: none; } }

/* ---------- story moods ---------- */
.bgl { position: absolute; inset: 0; z-index: -4; opacity: 0; transition: opacity 2.6s ease; background: #0E0F18; }
.bgl.on { opacity: 1; }
.scene { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; pointer-events: none; }
.glow { z-index: -2; }
.scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(100deg, rgba(4, 5, 12, .42) 0%, rgba(4, 5, 12, .1) 75%); }
@media (prefers-reduced-motion: reduce) { .bgl { transition: none; } }

/* ---------- welcome ---------- */
.intro { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.intro h1 { font-family: var(--font-read); font-weight: 500; font-size: clamp(26px, 5.2vw, 40px); line-height: 1.15; margin: 4px 0 0; text-wrap: balance; }
.intro h1 span { color: var(--hl); }
.intro-sub { margin: 0; font-size: 16px; color: var(--muted); max-width: 60ch; }
.verse-strip { margin: 4px 0 0; transition: opacity .5s ease; }
.verse-strip.fade { opacity: 0; }
.verse-strip blockquote { margin: 0; font-family: var(--font-read); font-style: italic; font-size: clamp(17px, 2.6vw, 20px); line-height: 1.45; color: var(--lapis); max-width: 52ch; }
.verse-strip figcaption { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- now reading ---------- */
.now-card { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.now-card .section-label { margin: 0; }
.nc-title { font-family: var(--font-read); font-weight: 500; font-size: 22px; line-height: 1.25; margin: 0; text-wrap: balance; }
.nc-story { margin: 0; font-family: var(--font-read); font-size: 17px; line-height: 1.45; }
.nc-book { margin: 0; font-size: 14px; color: var(--muted); }
.nc-around { margin: 2px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- why listen ---------- */
.why h2 { font-family: var(--font-read); font-weight: 500; font-size: 22px; margin: 0 0 12px; }
.why-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 26px; }
.why-item h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.why-item p { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.why-item blockquote { margin: 0; font-family: var(--font-read); font-style: italic; font-size: 15px; line-height: 1.45; color: var(--lapis); }
.why-item cite { display: block; font-style: normal; font-family: var(--font-ui); font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (max-width: 600px) { .why-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .verse-strip { transition: none; } }

/* ---------- TV mode (?tv): full-screen slide for the YouTube stream and church screens ---------- */
.tv-bar { display: none; }
.tv body { background: #000; padding: 0; overflow: hidden; cursor: none; }
.tv .wrap { max-width: none; padding: 0; gap: 0; }
.tv .brandbar, .tv .intro, .tv .lower, .tv .mute { display: none !important; }
.tv .stage { position: fixed; inset: 0; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; max-width: none; padding-bottom: 19vh; }
.tv .tv-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 2.4vh; padding: 2vh 5cqmin;
  background: rgba(4, 5, 12, .62); color: var(--stage-ink); font: 500 2.6vh/1.3 var(--font-ui); }
.tv .tv-bar img { width: 12vh; height: 12vh; border-radius: 6px; flex-shrink: 0; }
.tv .tv-bar b { display: block; font-size: 3.4vh; color: var(--acc); font-weight: 600; }
.tv .tv-bar span { display: block; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv .s-foot { position: absolute; left: 5cqmin; right: 5cqmin; bottom: 17vh; }

/* ---------- v9: simpler page ---------- */
.lower { gap: 22px; }
.controls { gap: 8px; }
.status { margin: 0; flex: none; }
.toast { margin: 0; min-height: 0; }
.toast:empty { display: none; }
.now-card { gap: 4px; padding: 14px 16px; }
.nc-title { font-size: 20px; }
.nc-story { font-size: 16px; }
.guide li { grid-template-columns: 7.4em minmax(0, 1fr) auto; }
.guide li:nth-child(n+7) { display: none; }
.guide.all li:nth-child(n+7) { display: grid; }
.g-acts { display: flex; gap: 6px; }
.link-btn { appearance: none; border: 0; background: none; padding: 10px 0 0; color: var(--lapis); font: 500 14px var(--font-ui); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.folds { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.fold { border-bottom: 1px solid var(--rule); }
.fold summary { cursor: pointer; padding: 14px 2px; font-size: 15px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
.fold[open] summary::after { content: "\2212"; }
.fold-body { padding: 0 2px 18px; display: flex; flex-direction: column; gap: 14px; }
.fold-body.why-grid { display: grid; }
.fold .ribbon { margin-top: 14px; }

/* small welcome note in the corner, shown once */
.welcome { position: fixed; z-index: 20; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(330px, calc(100% - 32px)); background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px;
  padding: 16px 16px 14px; box-shadow: 0 10px 30px rgba(10, 14, 30, .22); display: flex; flex-direction: column; gap: 8px; animation: welcome-in .4s ease both; }
.welcome h2 { font-family: var(--font-read); font-weight: 500; font-size: 18px; margin: 0; }
.welcome p { margin: 0; font-size: 14px; color: var(--muted); }
.welcome blockquote { margin: 0; font-family: var(--font-read); font-style: italic; font-size: 15px; line-height: 1.4; color: var(--lapis); }
.welcome cite { display: block; font-style: normal; font-family: var(--font-ui); font-size: 12px; color: var(--muted); margin-top: 2px; }
.welcome .ctl { align-self: flex-start; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .welcome { animation: none; } }
@media (max-width: 420px) { .icon-btn span { display: none; } .guide li { grid-template-columns: 6.4em minmax(0, 1fr) auto; } }
@media (max-width: 600px) {
  .welcome { padding: 12px 14px; gap: 6px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .welcome h2 { font-size: 16px; width: 100%; }
  .welcome p { font-size: 13px; flex: 1 1 200px; }
  .welcome blockquote { display: none; }
  .welcome .ctl { align-self: center; }
}

/* ---------- v10 ---------- */
.nc-where { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nc-story b { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); }
.now-card .link-btn { align-self: flex-start; padding-top: 4px; }
.welcome-acts { display: flex; align-items: center; gap: 14px; }
.welcome .link-btn { padding: 0; color: var(--muted); }
.ctl.yt { min-height: 52px; border-radius: 999px; padding: 0 18px; font-size: 15px; }
.ctl.yt svg { width: 20px; height: 20px; color: #E3342F; }
.donate { align-self: flex-start; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; }
.qa h3 { font-size: 15px; font-weight: 600; margin: 6px 0 0; }
.qa p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink); max-width: 62ch; }
@media (max-width: 600px) { .welcome-acts { width: 100%; } }

/* v11: the three-line menu, the "right now" line, and study notes */
.menu-btn { appearance: none; border: 1px solid var(--rule); background: var(--card); color: var(--ink); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn:hover { border-color: var(--lapis); }
.veil { position: fixed; inset: 0; background: rgba(8, 12, 28, .45); z-index: 40; }
.menu { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 86vw); background: var(--card); color: var(--ink); z-index: 41; display: flex; flex-direction: column; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) 0 calc(env(safe-area-inset-bottom, 0px) + 16px); box-shadow: 8px 0 30px rgba(0,0,0,.25); animation: menu-in .18s ease-out; }
@keyframes menu-in { from { transform: translateX(-100%); } to { transform: none; } }
.menu-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 10px; border-bottom: 1px solid var(--rule); }
.menu-head b { font-family: var(--font-display); font-size: 20px; font-weight: 400; }
.x-btn { appearance: none; border: 0; background: none; color: var(--muted); font-size: 28px; line-height: 1; width: 40px; height: 40px; cursor: pointer; border-radius: 8px; }
.x-btn:hover { color: var(--ink); background: var(--panel); }
.menu > button, .menu > a { appearance: none; border: 0; background: none; text-align: left; padding: 13px 18px; font: 500 16px var(--font-ui); color: var(--ink); text-decoration: none; cursor: pointer; border-bottom: 1px solid var(--rule); }
.menu > button:hover, .menu > a:hover, .menu > button:focus-visible { background: var(--panel); }
.menu > #mListen { color: var(--lapis); font-weight: 600; }
.menu-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin-top: auto; cursor: pointer; }
.menu-toggle input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--lapis); flex-shrink: 0; }
.menu-toggle span { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.menu-toggle small { color: var(--muted); font-size: 13px; }
.nc-now { margin: 2px 0; font-family: var(--font-read); font-size: 17px; line-height: 1.45; padding: 8px 12px; background: var(--panel); border-left: 3px solid var(--hl); border-radius: 0 8px 8px 0; }
.nc-now b { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); }
.nc-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.study { position: fixed; z-index: 39; background: var(--card); color: var(--ink); display: flex; flex-direction: column; box-shadow: 0 -8px 30px rgba(0,0,0,.22); left: 0; right: 0; bottom: 0; height: min(58vh, 560px); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: study-up .2s ease-out; }
@keyframes study-up { from { transform: translateY(100%); } to { transform: none; } }
.study-body { overflow-y: auto; padding: 12px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.study-kicker { margin: 4px 0 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.study-outline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.study-outline li { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); gap: 8px; font-family: var(--font-read); font-size: 15px; line-height: 1.4; padding: 4px 8px; border-radius: 6px; }
.study-outline li span { color: var(--muted); font: 500 13px var(--font-ui); font-variant-numeric: tabular-nums; padding-top: 2px; }
.study-outline li.on { background: var(--panel); box-shadow: inset 3px 0 0 var(--hl); }
.study-text p { margin: 0 0 10px; font-family: var(--font-read); font-size: 16px; line-height: 1.6; }
.study-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.study-nav .ctl[disabled] { opacity: .45; cursor: default; }
.study-book summary { cursor: pointer; font-weight: 500; font-size: 14px; padding: 6px 0; color: var(--lapis); }
.study-src { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (min-width: 1000px) {
  .study { left: auto; top: 0; width: 400px; height: auto; border-radius: 0; box-shadow: -8px 0 30px rgba(0,0,0,.18); animation-name: study-in; }
  @keyframes study-in { from { transform: translateX(100%); } to { transform: none; } }
  .studying body { padding-right: 400px; }
}
@media (max-width: 999px) { .studying .wrap { padding-bottom: min(58vh, 560px); } }
@media (prefers-reduced-motion: reduce) { .menu, .study { animation: none; } }
.tv .menu-btn, .tv .study, .tv .menu, .tv .veil, .tv .nc-now { display: none !important; }
.tv-hint { display: none; }
.tv .tv-hint { display: block; position: absolute; top: 3vh; left: 50%; transform: translateX(-50%); z-index: 5; margin: 0; padding: 1.2vh 2.4vh; border-radius: 999px; background: rgba(0,0,0,.7); color: #fff; font: 600 2.4vh var(--font-ui); white-space: nowrap; }
.tv .tv-hint[hidden] { display: none; }

/* v12: the line at the very top that says what this is */
.hero { display: flex; flex-direction: column; gap: 2px; }
.hero-main { margin: 0; font-family: var(--font-read); font-weight: 500; font-size: 19px; line-height: 1.3; display: flex; align-items: baseline; gap: 9px; text-wrap: balance; }
.hero-main i { width: 9px; height: 9px; border-radius: 50%; background: var(--live); flex-shrink: 0; position: relative; top: -1px; animation: hero-pulse 2s ease-in-out infinite; }
@keyframes hero-pulse { 50% { opacity: .35; } }
.hero-sub { margin: 0 0 0 18px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.link-btn.inline { padding: 0; font-size: inherit; font-weight: 500; }
@media (max-width: 600px) { .hero-main { font-size: 17px; } .hero-sub { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .hero-main i { animation: none; } }
.tv .hero { display: none !important; }

/* v12: the separate "Start here" page */
a.brand { color: inherit; text-decoration: none; }
.page .brandbar a.ctl { text-decoration: none; }
.start { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.start h1 { font-family: var(--font-read); font-weight: 500; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; margin: 8px 0 0; text-wrap: balance; }
.start h2 { font-family: var(--font-read); font-weight: 500; font-size: 26px; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
.start-lead { margin: 0; font-family: var(--font-read); font-size: 18px; line-height: 1.5; color: var(--muted); }
.start .qa { display: flex; flex-direction: column; gap: 8px; }
.start .qa h3 { margin: 18px 0 0; font-size: 18px; }
.start .qa p { margin: 0; font-family: var(--font-read); font-size: 17px; line-height: 1.6; }
.start .why-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .start .why-grid { grid-template-columns: minmax(0, 1fr); } }
.start-cta { margin: 24px 0 40px; }
.start-cta a { text-decoration: none; }

/* v16: Bible version menu, the "what you're getting into" line, synopses, verse finder */
.tr-pick { display: flex; flex-direction: column; gap: 3px; font: 600 11px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tr-pick select { appearance: none; -webkit-appearance: none; font: 500 15px var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--ink); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2398A0B5' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px; border: 1px solid var(--rule); border-radius: 8px; padding: 9px 36px 9px 12px; min-height: 40px; cursor: pointer; }
.tr-pick select:focus-visible { outline: 2px solid var(--lapis); outline-offset: 2px; }
.facts-strip { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.facts-strip li { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.facts-strip li[hidden] { display: none; }
.facts-strip small { font: 600 11px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts-strip b { font: 600 16px var(--font-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.facts-strip .link-btn { font-size: 13px; align-self: flex-start; }
.facts-strip:has(#fSinceBox:not([hidden])) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 720px) { .facts-strip, .facts-strip:has(#fSinceBox:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts-strip b { font-size: 15px; } }
.g-syn { display: block; margin-top: 3px; font-family: var(--font-read); font-size: 14px; line-height: 1.4; color: var(--muted); }
.verse-find { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.verse-find input { font: 400 16px var(--font-ui); color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 12px; min-height: 40px; width: 100%; box-sizing: border-box; }
.verse-find input:focus-visible { outline: 2px solid var(--lapis); outline-offset: 1px; }
.verse-find .grow { flex: 1 1 220px; }
.verse-miss { margin: 0; font-size: 14px; color: var(--live); }
.verse-find .field { flex-direction: column; align-items: stretch; gap: 4px; }
