/* Midnight glass: deep navy with a cool haze top-left and a warm one from the right; frosted panels with
   hairline borders; blue→violet for whatever is active or chosen; amber only where it means something
   (explained connections, lit places, the verse of the day). */
:root {
  --bg: #070a14;
  --bg-2: #0b1020;
  --panel: rgba(18, 26, 46, 0.72);          /* frosted glass, over a blur */
  --panel-solid: rgba(15, 21, 38, 0.94);    /* menus, tooltips: glass that must stay legible */
  --line: #2a3550;
  --line-2: #3a4a6e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --faint: #64748b;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --grad: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --grad-soft: linear-gradient(135deg, rgba(59,130,246,.22), rgba(139,92,246,.22));
  --glow: 0 0 22px rgba(79,110,246,.45);
  --ember: linear-gradient(135deg, #f59e0b, #f97316);
  --gold: #f5b041;
  --gold-soft: rgba(245, 158, 11, 0.14);
  --cyan: #60a5fa;                          /* links and focus */
  --green: #22c55e;
  --blur: blur(22px) saturate(150%);
  --tile: rgba(30, 41, 72, 0.38);           /* cards inside a panel */
  --stone: #dcc7a1;          /* archaeological finds: limestone */
  --answered: #bcd6ff;       /* hard questions: the colour of their arcs */
  --ot: #f0a868;
  --nt: #74d7ff;
  --radius: 20px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;   /* Bible text and quotations only */
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --panel-w: 420px;
  --topbar-h: 64px;
  --nav-h: 0px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; color: var(--text); font-family: var(--sans); font-size: 14px; overflow: hidden; -webkit-font-smoothing: antialiased; }
html { background: var(--bg); }
body { background:
  radial-gradient(1100px 760px at 0% 0%, rgba(59,130,246,.16), transparent 62%),
  radial-gradient(900px 900px at 104% 58%, rgba(249,115,22,.10), transparent 60%),
  linear-gradient(180deg, var(--bg-2), var(--bg)); background-color: var(--bg); }
::selection { background: rgba(59,130,246,.35); }
button { font: inherit; color: inherit; }
a { color: var(--cyan); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
#arc-base:focus-visible { outline-offset: -3px; }
#search:focus-visible { outline: none; }

.noscript { position: relative; z-index: 200; max-width: 720px; margin: 40px auto; padding: 28px 32px; border-radius: 24px; background: var(--panel-solid); border: 1px solid var(--line); line-height: 1.6; }
.noscript p, .noscript li { color: #cbd5e1; }

/* ---------- Loader ---------- */
#loader { position: fixed; inset: 0; z-index: 100; background: radial-gradient(ellipse at 30% 20%, #142046 0%, var(--bg) 70%); display: grid; place-items: center; transition: opacity .8s ease; }
#loader.done { opacity: 0; pointer-events: none; }
#loader-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader-text { position: relative; text-align: center; }
.loader-text .loader-title { font-family: var(--sans); font-weight: 700; font-size: clamp(32px, 5.4vw, 58px); margin: 0; letter-spacing: -.03em; background: linear-gradient(90deg, #93c5fd, #fff 45%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.loader-text p { color: var(--muted); margin-top: 10px; font-size: 13px; }

/* ---------- Top bar ---------- */
/* brand · views and search (centred) · buttons; the side columns grow equally so the middle stays centred */
#topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 20; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); grid-template-areas: "brand center controls"; align-items: center; gap: 16px; padding: 0 18px; border-bottom: 1px solid rgba(42,53,80,.7); }
/* the frosted glass sits on a layer of its own: a blur on #topbar itself would make it the containing block
   for its fixed children (the phone view bar, the ⋯ menu) and pull them up into the bar */
#topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(9, 13, 27, .58); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.brand { grid-area: brand; display: flex; align-items: center; gap: 12px; min-width: 0; }
.center-group { grid-area: center; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; flex: none; background: radial-gradient(circle at 50% 50%, #fff 0 8%, var(--gold) 9% 18%, transparent 19%), conic-gradient(from 0deg, #ff5d73, #ffb35d, #f9f871, #6bffb8, #6be4ff, #a68bff, #ff5d73); mask: radial-gradient(circle, #000 0 30%, transparent 31% 42%, #000 43%); -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 31% 42%, #000 43%); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand-sub { color: var(--faint); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.controls { grid-area: controls; justify-self: end; display: flex; align-items: center; gap: 8px; }
.text-btn { white-space: nowrap; color: var(--text); }
.seg { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(18,26,46,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.seg-btn { border: 0; background: none; padding: 7px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .25s, color .25s, box-shadow .25s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--grad); color: #fff; box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.28); }
#view-seg .seg-btn svg { display: none; }
#more-btn, .menu-only { display: none; }
.controls-extra { display: contents; }
.icon-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: rgba(148,163,184,.06); padding: 8px 13px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); transition: color .2s, border-color .2s, box-shadow .2s, background .2s; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--text); border-color: rgba(96,165,250,.55); background: rgba(59,130,246,.10); box-shadow: inset 0 0 14px rgba(59,130,246,.18), 0 0 18px rgba(59,130,246,.12); }
.search-wrap { position: relative; }
#search { width: min(360px, 32vw); padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(18,26,46,.55); color: var(--text); outline: none; font: inherit; font-size: 13px; font-weight: 500; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); transition: border-color .2s, box-shadow .2s; }
#search::placeholder { color: var(--faint); }
#search:focus { border-color: rgba(96,165,250,.7); box-shadow: 0 0 0 4px rgba(59,130,246,.16), 0 0 24px rgba(59,130,246,.18); }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 6px; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; z-index: 30; box-shadow: 0 24px 60px rgba(2,6,23,.55); }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 12px; cursor: pointer; color: var(--text); }
.suggest button:hover, .suggest button.sel { background: rgba(59,130,246,.14); }
.suggest small { color: var(--muted); margin-left: 6px; }

/* ---------- Filters ---------- */
#filters { position: fixed; top: calc(var(--bar-h, var(--topbar-h)) + 12px); right: calc(var(--panel-w) + 66px); z-index: 25; width: 340px; padding: 20px; border-radius: var(--radius); background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); display: grid; gap: 18px; box-shadow: 0 30px 80px rgba(2,6,23,.55); }
body.panel-collapsed #filters { right: 16px; }
.filter-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chips { margin-top: 8px; }
.chip { border: 1px solid var(--line); background: rgba(148,163,184,.05); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); transition: color .2s, border-color .2s, background .2s, box-shadow .2s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.active { border-color: rgba(96,165,250,.6); color: var(--text); background: rgba(59,130,246,.16); box-shadow: inset 0 0 12px rgba(59,130,246,.2); }
input[type=range] { width: 100%; accent-color: var(--blue); }

/* ---------- Stage ---------- */
#stage { position: fixed; top: var(--bar-h, var(--topbar-h)); left: 0; right: calc(var(--panel-w) + 24px); bottom: 0; transition: right .35s ease; }
body.panel-collapsed #stage { right: 0; }
.view { position: absolute; inset: 0; z-index: 0; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.view.active { opacity: 1; pointer-events: auto; }
#arcs-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#arc-hl, #arc-fx { pointer-events: none; }
#arc-base { cursor: crosshair; }
#book-labels { position: absolute; inset: 0; pointer-events: none; }
.book-label { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--faint); white-space: nowrap; letter-spacing: .04em; }
.book-label.big { color: var(--muted); }
.book-label.testament { font-size: 13px; font-weight: 600; color: var(--muted); }
#brain-canvas-host { position: absolute; inset: 0; }
#circle-host { position: absolute; inset: 0; }
#circle-host canvas { display: block; }
#circle-host canvas:focus-visible { outline-offset: -3px; }
.circle-legend { position: absolute; left: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border-radius: 16px; background: rgba(15,21,38,.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--muted); pointer-events: none; }
.circle-legend span { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.circle-legend i { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 0 8px currentColor; }
@media (max-width: 820px) { .circle-legend { display: none; } }
#brain-canvas-host canvas { display: block; }
.stage-bar { position: absolute; left: 12px; top: 10px; z-index: 2; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.stage-bar > * { pointer-events: auto; }
.hint { color: var(--faint); font-size: 12px; pointer-events: none; text-shadow: 0 0 6px var(--bg), 0 0 2px var(--bg); }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(18,26,46,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--muted); border-radius: 999px; padding: 5px 12px 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.mini-btn:hover { color: var(--text); border-color: rgba(96,165,250,.5); }
#motion-btn .i-play, #motion-btn.paused .i-pause { display: none; }
#motion-btn.paused .i-play { display: inline; }

/* ---------- Tooltip ---------- */
#tooltip { position: fixed; z-index: 40; max-width: 380px; padding: 14px 16px; border-radius: 18px; pointer-events: none; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(2,6,23,.6), 0 0 40px rgba(59,130,246,.10); font-size: 12.5px; line-height: 1.5; }
#tooltip .tt-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
#tooltip .tt-meta { color: var(--muted); font-size: 11.5px; margin: 3px 0 8px; }
#tooltip .tt-verse { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--line-2); color: #cbd5e1; }
#tooltip .tt-verse b { color: var(--text); font-weight: 600; }
#tooltip .tt-why { margin-top: 10px; padding: 9px 11px; border-radius: 12px; background: var(--gold-soft); border: 1px solid rgba(245,158,11,.3); }
#tooltip .tt-why.auto { background: rgba(59,130,246,.08); border-color: rgba(96,165,250,.25); }
#tooltip .tt-foot { margin-top: 8px; color: var(--faint); font-size: 11px; }

/* ---------- Panel ---------- */
#panel { position: fixed; top: calc(var(--bar-h, var(--topbar-h)) + 12px); right: 12px; bottom: 12px; width: var(--panel-w); z-index: 15; background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 80px rgba(2,6,23,.5), inset 0 1px 0 rgba(255,255,255,.05); transition: transform .35s ease; }
body.panel-collapsed #panel { transform: translateX(calc(100% + 24px)); }
#panel-toggle { position: absolute; left: -46px; top: 16px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); cursor: pointer; display: grid; place-items: center; color: var(--muted); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
#panel-toggle:hover { color: var(--text); border-color: rgba(96,165,250,.55); }
body.panel-collapsed #panel-toggle svg { transform: rotate(180deg); }
#panel-body { height: 100%; overflow-y: auto; padding: 26px 26px 60px; border-radius: 24px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.p-eyebrow { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.p-title { font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin: 4px 0 8px; }
.p-sub { color: var(--muted); line-height: 1.6; }
.p-section { margin-top: 28px; }
.p-section h3 { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.p-section h3 > span { color: var(--faint); font-size: 12px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 16px 16px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--tile); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 500; }
.legend-bar { height: 6px; border-radius: 99px; box-shadow: 0 0 14px rgba(139,92,246,.3); background: linear-gradient(90deg, hsl(265 90% 65%), hsl(220 90% 62%), hsl(170 85% 55%), hsl(95 80% 55%), hsl(50 95% 58%), hsl(25 95% 58%), hsl(0 90% 62%)); }
.legend-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 5px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; background: var(--tile); box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.card.curated { border-color: rgba(245,158,11,.32); background: linear-gradient(180deg, rgba(245,158,11,.09), rgba(30,41,72,.30)); }
.card.clickable { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.card.clickable:hover { border-color: rgba(96,165,250,.55); box-shadow: 0 0 22px rgba(59,130,246,.14), inset 0 1px 0 rgba(255,255,255,.05); }
.card-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; border: 1px solid currentColor; margin-right: 6px; vertical-align: 1px; background: color-mix(in srgb, currentColor 10%, transparent); }
.badge::first-letter { text-transform: uppercase; }
.b-prophecy { color: #ff9ab0; } .b-quotation { color: #7fe3ff; } .b-typology { color: #c5a6ff; }
.b-theme { color: #9dffa6; } .b-person, .b-place, .b-event { color: #ffcf7a; } .b-parallel { color: #9fb3ff; } .b-auto { color: var(--muted); }
.why { margin: 8px 0 0; line-height: 1.6; color: #cbd5e1; }
.verse { margin-top: 10px; padding-left: 10px; border-left: 2px solid var(--line-2); line-height: 1.55; }
.verse .ref { font-weight: 600; color: var(--text); cursor: pointer; }
.verse button.ref { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; }
.verse .ref:hover { color: var(--cyan); }
.verse .txt { color: #cbd5e1; }
.ref-row { padding: 10px 0; border-top: 1px solid var(--line); }
.ref-row:first-child { border-top: 0; }
.ref-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ref-head .votes { color: var(--faint); font-size: 11px; white-space: nowrap; }
.link-btn { border: 0; background: none; padding: 0; color: var(--cyan); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; background: rgba(148,163,184,.06); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); transition: border-color .2s, box-shadow .2s; }
.pill:hover { border-color: rgba(96,165,250,.6); box-shadow: 0 0 14px rgba(59,130,246,.18); }
.pill small { color: var(--muted); }
.more-btn { width: 100%; margin-top: 10px; padding: 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(148,163,184,.05); color: var(--muted); font-weight: 600; cursor: pointer; }
.more-btn:hover { color: var(--text); border-color: rgba(96,165,250,.55); }
.back-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; margin-bottom: 10px; font-size: 12px; }
.back-btn:hover { color: var(--text); }
.chapter-text p { margin: 0 0 8px; line-height: 1.7; color: #dbe2ec; cursor: pointer; padding: 3px 8px; border-radius: 10px; transition: background .2s; }
.chapter-text p:hover { background: rgba(59,130,246,.09); }
.chapter-text sup { color: #93c5fd; margin-right: 4px; font-weight: 700; }
.chapter-text .cnt { color: var(--faint); font-size: 10.5px; margin-left: 4px; }
mark { background: rgba(245,158,11,.28); color: inherit; border-radius: 3px; padding: 0 2px; }
.empty { color: var(--muted); font-style: italic; }
.note { color: var(--faint); font-size: 11.5px; line-height: 1.5; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
.book-grid.nt { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.book-btn { border: 0; background: none; text-align: left; padding: 4px 6px; border-radius: 6px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-btn:hover { color: var(--text); background: rgba(59,130,246,.12); }
.credits { display: grid; gap: 10px; }
/* ownership statement and the links to the legal pages (home panel, About) */
.legal-note { margin-top: 28px; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; font-size: 12px; font-weight: 600; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal-links .link-btn { font-size: 12px; color: var(--cyan); }
.about-ownership { margin: 6px 0 18px; padding: 16px 18px; border-radius: 18px; border: 1px solid transparent;
  background: linear-gradient(160deg, rgba(40,28,22,.9), rgba(18,24,42,.9) 55%) padding-box, linear-gradient(140deg, #f59e0b, rgba(249,115,22,.4) 40%, rgba(42,53,80,.8) 75%) border-box; }
.about-ownership p { margin: 0; color: var(--text) !important; }
.about-ownership .legal-links { margin-top: 10px; }
.credit { padding: 8px 0; border-top: 1px solid var(--line); }
.credit:first-child { border-top: 0; }
.credit .note { margin-left: 4px; }
.credit > .note { margin: 2px 0 0; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 16px -4px 0; border-bottom: 1px solid var(--line); }   /* wraps, so no tab is out of sight */
.tab { flex: none; border: 0; background: none no-repeat bottom / 100% 2px; padding: 9px 9px 10px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab small { color: var(--faint); font-weight: 400; margin-left: 2px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: transparent; background-image: var(--grad); filter: drop-shadow(0 2px 6px rgba(99,102,241,.45)); }
[role=tabpanel] { padding-top: 14px; }

/* ---------- Version picker ---------- */
.version-pick { position: relative; }
#version-btn { gap: 6px; }
#version-btn #version-abbr { color: var(--text); font-weight: 600; letter-spacing: .02em; }
.version-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 35; width: 310px; padding: 6px; border-radius: 18px; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(2,6,23,.55); display: grid; }
.version-menu button { display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 8px; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 12px; cursor: pointer; color: var(--muted); }
.version-menu button b { color: var(--text); }
.version-menu button small { color: var(--faint); }
.version-menu button:hover, .version-menu button:focus-visible { background: rgba(59,130,246,.12); color: var(--text); }
.version-menu button[aria-checked="true"] { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(96,165,250,.35); }

/* ---------- Reading ---------- */
.chip-row, .read-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.read-tools .note { margin-right: 2px; }
.chip-sm { border: 1px solid var(--line); background: rgba(148,163,184,.05); color: var(--muted); padding: 4px 11px; border-radius: 99px; font-size: 11.5px; font-weight: 700; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.chip-sm:hover { color: var(--text); border-color: var(--line-2); }
.chip-sm.on { border-color: rgba(96,165,250,.6); color: var(--text); background: rgba(59,130,246,.16); box-shadow: inset 0 0 10px rgba(59,130,246,.2); }
.sec-head { font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--text); margin: 18px 0 6px 8px; }
.chapter-text .par { display: block; margin: 4px 0 2px 14px; padding-left: 10px; border-left: 2px solid var(--line-2); color: #aab6c8; font-size: 13px; }
.chapter-text .par b { color: var(--muted); font-size: 10.5px; letter-spacing: .04em; margin-right: 4px; }
.chapter-text.parallel p { margin-bottom: 12px; }
.note-mark { color: var(--gold); font-size: 12px; }
.hl { border-radius: 6px; }
.hl-gold { background: rgba(245,199,107,.2); }
.hl-sky { background: rgba(107,228,255,.16); }
.hl-rose { background: rgba(255,154,176,.18); }
.hl-mint { background: rgba(157,255,166,.15); }
.verse-big { font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--text); padding: 2px 6px; margin-left: -6px; }

/* ---------- Verse actions & notes ---------- */
.verse-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.swatches { display: inline-flex; gap: 6px; margin-right: 4px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; display: inline-block; vertical-align: middle; }
.swatch.on { border-color: var(--text); }
.sw-gold { background: #f5c76b; } .sw-sky { background: #6be4ff; } .sw-rose { background: #ff9ab0; } .sw-mint { background: #9dffa6; }
.mini-btn.on { color: var(--gold); border-color: rgba(245,199,107,.5); }
.note-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; background: var(--tile); }
.note-card p { margin: 0; line-height: 1.55; }
.note-meta { display: flex; gap: 12px; align-items: center; margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.note-input { width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(18,26,46,.6); color: var(--text); font: inherit; line-height: 1.55; resize: vertical; }
.note-input:focus { border-color: rgba(96,165,250,.7); box-shadow: 0 0 0 4px rgba(59,130,246,.14); outline: none; }
.note-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.btn { border: 0; background: var(--grad); color: #fff; padding: 8px 18px; border-radius: 99px; cursor: pointer; font-weight: 700; box-shadow: 0 0 18px rgba(79,110,246,.35), inset 0 1px 0 rgba(255,255,255,.25); transition: box-shadow .2s, filter .2s; }
.btn:hover { filter: brightness(1.1); box-shadow: 0 0 26px rgba(79,110,246,.5), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.ghost { border: 1px solid var(--line); background: rgba(148,163,184,.06); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.btn.ghost:hover { border-color: rgba(96,165,250,.55); filter: none; }
.link-btn.danger { color: #ff9ab0; }

/* ---------- Commentary ---------- */
.commentary p, .comm-intro p { line-height: 1.7; color: #cbd5e1; margin: 0 0 10px; }
.comm-intro { padding: 12px 14px; border-radius: 16px; background: var(--tile); border: 1px solid var(--line); margin-bottom: 14px; }
.comm-sec { margin: 18px 0 6px; font-size: 13px; }
.comm-credit { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.ref-link { border: 0; background: none; padding: 0; color: var(--cyan); cursor: pointer; font: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.backup .note-buttons { margin: 10px 0 6px; }

/* ---------- People, places, events ---------- */
.pill.ent-person::before, .pill.ent-place::before, .pill.ent-event::before, .pill.ent-journey::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pill.ent-person::before { background: #c5a6ff; }
.pill.ent-place::before { background: var(--cyan); border-radius: 1px; transform: rotate(45deg); }
.pill.ent-event::before { background: var(--gold); border-radius: 1px; }
.pill.ent-journey::before { background: none; border: 1.5px dashed var(--gold); width: 8px; height: 8px; }
.ent-row { margin-top: 10px; }
.name-link { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted rgba(197,166,255,.55); text-underline-offset: 3px; }
.name-link[data-act="place"] { text-decoration-color: rgba(107,228,255,.55); }
.name-link:hover { color: var(--text); text-decoration-style: solid; }
.family { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--tile); }
.fam-row { display: grid; grid-template-columns: 112px 1fr; gap: 8px; align-items: baseline; }
.fam-label { color: var(--faint); font-size: 11.5px; }
.fam-row.self { padding: 6px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.self-pill { border-color: #c5a6ff; color: var(--text); background: rgba(197,166,255,.12); cursor: default; }
.dict-entry p { line-height: 1.7; color: #cbd5e1; margin: 0 0 10px; }
.stops { margin: 14px 0; padding-left: 26px; display: grid; gap: 12px; }
.stops li::marker { color: var(--gold); font-weight: 600; }
.stops .verse { margin-top: 6px; }
@media (max-width: 520px) { .fam-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Map ---------- */
#map-host { position: absolute; inset: 0; background: transparent; }
#map-host .province-label { width: max-content; transform: translate(-50%, -50%); color: rgba(148,163,214,.42); font-family: var(--serif); font-style: italic; font-size: 13px; letter-spacing: .04em; white-space: nowrap; text-shadow: 0 0 3px var(--bg); }
.leaflet-container { background: transparent; font-family: var(--sans); }
.leaflet-control-attribution { background: rgba(9,13,27,.7) !important; color: var(--faint) !important; font-size: 10px; border-radius: 10px 0 0 0; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar { border: 1px solid var(--line) !important; border-radius: 14px !important; overflow: hidden; box-shadow: none !important; }
.leaflet-bar a { background: var(--panel-solid) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-tooltip.map-label { background: none; border: 0; box-shadow: none; color: #fde8c4; font-size: 11.5px; font-weight: 700; text-shadow: 0 0 4px var(--bg), 0 0 8px var(--bg); padding: 0; }
.leaflet-tooltip.map-label::before { display: none; }
.leaflet-tooltip.stop-num { background: none; border: 0; box-shadow: none; color: var(--gold); font-size: 10px; font-weight: 700; padding: 0; }
.leaflet-tooltip.stop-num::before { display: none; }
.journey-line { animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -28; } }
.map-tools { display: inline-flex; gap: 8px; }
.journeys-menu { left: 0; right: auto; top: calc(100% + 6px); width: 260px; }
.map-list { position: absolute; left: 12px; bottom: 30px; z-index: 500; width: min(300px, calc(100% - 24px)); max-height: 55%; overflow-y: auto; padding: 14px 16px; border-radius: 20px; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(2,6,23,.5); }
.map-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.map-list ul { margin: 6px 0 0; padding-left: 18px; columns: 2; }
.map-list li { margin-bottom: 3px; break-inside: avoid; }
body:not(.motion-on) .journey-line { animation: none; }

/* ---------- Today, plans, devotions, reflection ---------- */
.today-card, .votd { position: relative; border-radius: 20px; border: 1px solid transparent;
  background: linear-gradient(160deg, rgba(40,28,22,.9), rgba(18,24,42,.9) 55%) padding-box,
    linear-gradient(140deg, #f59e0b, rgba(249,115,22,.45) 38%, rgba(42,53,80,.8) 72%) border-box;
  box-shadow: -10px -10px 40px rgba(249,115,22,.12), 0 0 70px rgba(245,158,11,.05); }
.today-card { display: grid; gap: 6px; width: 100%; text-align: left; margin: 0 0 22px; padding: 16px 18px; color: var(--text); cursor: pointer; transition: box-shadow .25s; }
.today-card:hover { box-shadow: -10px -10px 48px rgba(249,115,22,.22), 0 0 80px rgba(245,158,11,.08); }
.today-card .note, .votd .note { color: #c9a27a; }
.today-verse { font-family: var(--serif); font-size: 18px; line-height: 1.4; }
.votd { padding: 16px 18px 14px; margin: 4px 0 6px; }
.votd .verse-big { margin: 0 0 10px; }
.plan-progress { height: 6px; border-radius: 99px; background: rgba(148,163,184,.12); overflow: visible; margin-top: 14px; }
.plan-progress span { display: block; height: 100%; background: var(--grad); border-radius: 99px; box-shadow: 0 0 12px rgba(99,102,241,.6); }
.plan-day { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; background: var(--tile); display: grid; gap: 10px; }
.plan-day.done { border-color: rgba(34,197,94,.35); }
.plan-day .card { margin: 0; }
.plan-mark { justify-self: start; }
.plan-finished { color: var(--gold); }
.catch-up { margin-top: 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(249,115,22,.35); background: rgba(249,115,22,.06); }
.catch-up p { margin: 0; color: var(--muted); line-height: 1.5; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 6px; }
.day-cell { aspect-ratio: 1; border: 1.5px solid var(--line-2); background: rgba(148,163,184,.04); color: var(--muted); border-radius: 50%; padding: 0; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .2s, box-shadow .2s, border-color .2s; }
.day-cell:hover { border-color: rgba(96,165,250,.7); color: var(--text); }
.day-cell.done { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 12px rgba(79,110,246,.55); }
.day-cell.today { border-color: #60a5fa; color: var(--text); box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
.plan-card { padding: 10px 0; border-top: 1px solid var(--line); }
.plan-card:first-of-type { border-top: 0; }
.plan-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.plan-picks { display: grid; gap: 6px; }
.plan-pick { display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); background: var(--tile); border-radius: 16px; padding: 12px 14px; color: var(--text); font-weight: 700; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.plan-pick span { color: var(--muted); font-size: 12px; font-weight: 500; }
.plan-pick:hover { border-color: rgba(96,165,250,.55); box-shadow: 0 0 22px rgba(59,130,246,.14); }
.devo-part { border-top: 1px solid var(--line); padding: 8px 0; }
.devo-part summary { cursor: pointer; color: var(--text); }
.devo-part p { line-height: 1.7; color: #cbd5e1; margin: 8px 0; }
.devo-key { font-family: var(--serif); font-size: 18px; color: var(--text) !important; }
.reflect-summary { color: var(--text); }
.questions { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.55; }
.prayer { font-family: var(--serif); font-size: 17px; font-style: italic; line-height: 1.45; }
.print-only { display: none; }

/* print a chapter's reflection for a group: the passage, then the reflection — nothing else */
@media print {
  body.printing > *:not(#panel) { display: none !important; }
  body.printing { overflow: visible; background: #fff; color: #000; height: auto; }
  body.printing #panel { position: static; width: auto; transform: none !important; border: 0; background: #fff; }
  body.printing #panel-toggle, body.printing .tabs, body.printing .back-btn, body.printing .note-buttons, body.printing .read-tools { display: none !important; }
  body.printing #panel-body { height: auto; overflow: visible; padding: 0; }
  body.printing .print-only { display: block; }
  body.printing .print-passage { margin-top: 18px; padding-top: 12px; border-top: 1px solid #999; columns: 2; font-size: 11pt; }
  body.printing * { color: #000 !important; background: none !important; box-shadow: none !important; }
  body.printing .card { border: 1px solid #999; }
}

/* ---------- Word study (Hebrew / Greek) ---------- */
.word-row { display: flex; flex-wrap: wrap; gap: 6px; }
.word { display: grid; justify-items: center; gap: 1px; border: 1px solid var(--line); background: var(--tile); border-radius: 12px; padding: 7px 9px; cursor: pointer; color: var(--text); min-width: 54px; transition: border-color .2s, box-shadow .2s; }
.word:hover, .word.on { border-color: rgba(96,165,250,.6); background: rgba(59,130,246,.12); box-shadow: 0 0 16px rgba(59,130,246,.18); }
.w-orig { font-family: "SBL Hebrew", "Ezra SIL", "Times New Roman", var(--serif); font-size: 20px; line-height: 1.2; }
.w-tr { font-size: 11px; color: var(--muted); font-style: italic; }
.w-gl { font-size: 11px; color: var(--faint); }
.word-card { margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(96,165,250,.35); border-radius: 16px; background: rgba(59,130,246,.07); }
.orig-lemma { font-family: "SBL Hebrew", "Ezra SIL", "Times New Roman", var(--serif); font-size: 32px; line-height: 1.2; }
.lex-def { color: #cbd5e1; line-height: 1.55; font-size: 13px; }

/* ---------- Illustrations ---------- */
details.art { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 16px; padding: 9px 14px; background: var(--tile); }
details.art summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
details.art summary small { color: var(--faint); margin-left: 4px; }
.art-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.art-item { margin: 0; }
.art-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: rgba(255,255,255,.04); display: block; }
.art-item figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.art-item figcaption .note { display: block; }

/* ---------- Archaeology ---------- */
.stele { display: inline-block; width: 7px; height: 10px; border-radius: 3.5px 3.5px 1px 1px; background: var(--stone); vertical-align: -1px; }
.pill.ent-find::before { content: ""; display: inline-block; width: 6px; height: 9px; border-radius: 3px 3px 1px 1px; background: var(--stone); margin-right: 6px; vertical-align: -1px; }
#finds-btn .stele { margin-right: 1px; opacity: .7; }
#finds-btn[aria-pressed="true"] { color: var(--stone); border-color: rgba(220,199,161,.5); }
#finds-btn[aria-pressed="true"] .stele { opacity: 1; }
.find-eras { flex-wrap: wrap; margin-top: 14px; }
.find-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.find-tools input { flex: 1 1 220px; min-width: 0; padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); background: rgba(18,26,46,.6); color: var(--text); font: inherit; font-size: 12.5px; }
.find-tools input:focus { border-color: rgba(96,165,250,.7); box-shadow: 0 0 0 4px rgba(59,130,246,.14); outline: none; }
.find-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px 10px; margin-top: 8px; }
.find-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; }
.find-thumb { display: block; background: #121a2e; }
.find-card .find-thumb { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; margin-bottom: 7px; outline: 1px solid var(--line); outline-offset: -1px; transition: outline-color .2s, box-shadow .2s; }
.find-card:hover .find-thumb { outline-color: var(--stone); box-shadow: 0 0 24px rgba(220,199,161,.14); }
.find-thumb.none { display: grid; place-items: center; background: linear-gradient(180deg, #1a2036, #0e1426); }
.find-thumb.none .stele { width: 22px; height: 32px; border-radius: 11px 11px 2px 2px; opacity: .35; }
.find-card-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.find-card-meta { color: var(--muted); font-size: 11.5px; }
.find-photo { margin: 14px 0 0; }
.find-photo img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: rgba(7,10,20,.6); border-radius: 18px; }
.find-photo figcaption { margin-top: 6px; color: var(--faint); font-size: 11px; line-height: 1.45; }
.find-photo figcaption a { color: var(--muted); }
.find-nophoto { display: flex; gap: 14px; align-items: center; margin: 14px 0 0; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--tile); color: var(--muted); }
.find-nophoto .stele { flex: none; width: 18px; height: 26px; border-radius: 9px 9px 2px 2px; opacity: .55; }
.find-nophoto p { margin: 0; line-height: 1.5; }
.find-label { margin: 14px 0 0; padding: 14px 16px; display: grid; gap: 10px; border: 1px solid rgba(220,199,161,.22); border-radius: 16px; background: rgba(220,199,161,.05); }
.find-label > div { display: grid; grid-template-columns: 58px 1fr; gap: 10px; }
.find-label dt { color: var(--stone); font-size: 12px; font-weight: 600; padding-top: 1px; }
.find-label dd { margin: 0; line-height: 1.5; min-width: 0; }
.find-label .pill { padding: 1px 8px; font-size: 11.5px; }
.find-detail { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.find-text { margin: 0; line-height: 1.7; color: #cbd5e1; }
.find-parallel { margin: 14px 0 0; padding: 11px 14px; border-radius: 14px; border: 1px solid rgba(96,165,250,.35); background: rgba(59,130,246,.07); color: #c7d7fe; font-size: 12.5px; line-height: 1.55; }
.find-sources { margin: 0; padding-left: 18px; line-height: 1.65; font-size: 12.5px; overflow-wrap: anywhere; }
.find-excluded { margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--line); }
.find-excluded summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.find-excluded summary small { color: var(--faint); margin-left: 4px; }
.find-excluded ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 9px; font-size: 12.5px; line-height: 1.55; color: #cbd5e1; }
.find-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.find-row:first-child { border-top: 0; }
.find-row-photo { align-self: start; padding: 0; border: 0; background: none; cursor: pointer; }
.find-row-photo .find-thumb { width: 64px; height: 80px; object-fit: cover; border-radius: 12px; }
.find-row-body { min-width: 0; }
.find-row-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; text-align: left; color: var(--text); }
.find-row-text { margin: 6px 0 8px; line-height: 1.55; color: #cbd5e1; font-size: 13px; }
/* on the map */
.find-marker { display: grid; place-items: end center; }
.find-marker .stele { width: 11px; height: 15px; border-radius: 5.5px 5.5px 1.5px 1.5px; box-shadow: 0 0 0 1.5px var(--bg), 0 0 8px rgba(220,199,161,.35); transition: transform .2s; transform-origin: bottom center; }
.find-marker b { position: absolute; top: -9px; right: -11px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 99px; background: var(--bg); border: 1px solid var(--stone); color: var(--stone); font-size: 9.5px; line-height: 13px; text-align: center; }
.find-marker.on .stele { background: #fff; transform: scale(1.3); box-shadow: 0 0 0 1.5px var(--bg), 0 0 14px var(--stone); }
.find-marker:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.find-pop-wrap .leaflet-popup-content-wrapper, .find-pop-wrap .leaflet-popup-tip { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(2,6,23,.55); }
.find-pop-wrap .leaflet-popup-content-wrapper { border-radius: 18px; }
.find-pop-wrap .leaflet-popup-content { margin: 10px 12px; font-size: 12.5px; }
.find-pop-wrap a.leaflet-popup-close-button { color: var(--muted); }
.find-pop { display: grid; gap: 2px; }
.find-pop b { font-weight: 600; margin-bottom: 4px; padding-right: 14px; }
.find-pop button { text-align: left; border: 0; background: none; padding: 3px 0; color: var(--cyan); font: inherit; cursor: pointer; }
.find-pop button small { color: var(--muted); }

/* ---------- Hard questions ---------- */
.pill.ent-question::before { content: "?"; font-weight: 700; color: var(--answered); margin-right: 5px; }
.q-list { margin-top: 8px; }
.q-row { display: grid; gap: 4px; width: 100%; text-align: left; margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--tile); color: var(--text); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.q-row:hover { border-color: rgba(147,197,253,.55); box-shadow: 0 0 22px rgba(59,130,246,.14); }
.q-row-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; text-align: left; }
.q-row-refs { color: var(--muted); font-size: 12px; }
.q-row-meta { color: var(--faint); font-size: 11.5px; }
.q-how { display: inline-block; margin: 0 4px 4px 0; padding: 2px 10px; border: 1px solid rgba(147,197,253,.4); border-radius: 99px; background: rgba(59,130,246,.08); color: var(--answered); font-size: 11.5px; font-weight: 600; }
.q-select { max-width: 100%; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(18,26,46,.8); color: var(--text); font: inherit; font-size: 12.5px; }
.q-passage { margin-bottom: 10px; padding: 12px 14px; border: 1px solid rgba(147,197,253,.22); border-radius: 16px; background: rgba(59,130,246,.06); }
.q-says { margin: 4px 0 2px; font-weight: 500; line-height: 1.45; }
.q-passage .verse { margin-top: 6px; }
.q-passage sup { color: var(--gold); margin-right: 2px; }
.q-objection { padding: 14px 16px; border: 1px solid rgba(249,115,22,.28); border-radius: 16px; background: rgba(249,115,22,.05); }
.q-text { margin: 0 0 10px; line-height: 1.7; color: #cbd5e1; }
.q-text:last-child { margin-bottom: 0; }
.q-answer .q-text { color: var(--text); }
.q-other { margin-bottom: 12px; }
.q-other b { display: block; margin-bottom: 4px; font-weight: 600; }
.q-classic { margin: 0 0 12px; padding: 6px 14px; border-left: 2px solid rgba(139,92,246,.7); color: #d5dceb; font-family: var(--serif); font-size: 16px; line-height: 1.45; }
.q-classic p { margin: 0; }
.q-classic cite { display: block; margin-top: 4px; font-family: var(--sans); font-size: 11.5px; font-style: normal; }
.q-tab-row { padding: 12px 0; border-top: 1px solid var(--line); }
.q-tab-row:first-of-type { border-top: 0; }
.q-tab-text { margin: 6px 0; line-height: 1.55; color: #cbd5e1; font-size: 13px; }

/* ---------- Timeline ---------- */
#time-host { position: absolute; inset: 0; }
#time-host canvas { display: block; touch-action: none; }
#time-host canvas:focus-visible { outline-offset: -3px; }
.timeline-list { width: min(380px, calc(100% - 24px)); bottom: 46px; top: 48px; max-height: none; }
.timeline-list p { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.timeline-list ul { columns: 1; padding-left: 0; list-style: none; }
.timeline-list button { border: 0; background: none; color: var(--text); text-align: left; padding: 3px 0; cursor: pointer; font-size: 12.5px; }
.timeline-list button:hover { color: var(--cyan); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(4,7,16,.62); display: grid; place-items: center; padding: 20px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(720px, 100%); max-height: 86vh; overflow-y: auto; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: 24px; padding: 32px 34px; line-height: 1.65; box-shadow: 0 40px 100px rgba(2,6,23,.6); }
.modal-card h2 { font-size: 28px; letter-spacing: -.025em; margin: 0 0 8px; font-weight: 700; }
.modal-card h3 { font-size: 16px; letter-spacing: -.01em; margin: 26px 0 6px; font-weight: 700; }
.modal-card p, .modal-card li { color: #cbd5e1; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 26px; color: var(--muted); cursor: pointer; }

/* ---------- Responsive ---------- */
/* Too narrow for one centred row: brand and buttons on top, views and search centred below. */
@media (max-width: 2239px) {
  #topbar { height: auto; grid-template-columns: 1fr auto; grid-template-areas: "brand controls" "center center"; row-gap: 8px; padding: 8px 18px 10px; }
  .center-group { justify-self: center; }
  #search { width: 420px; }
}
/* Narrower still: back to one row, with the buttons in the ⋯ menu. */
@media (max-width: 1100px) {
  :root { --panel-w: 360px; }
  #topbar { height: var(--topbar-h); grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); grid-template-areas: "brand center controls"; padding: 0 18px; }
  .brand-sub { display: none; }
  #search { width: 220px; }
  #more-btn { display: inline-flex; padding: 8px; }
  .controls-extra { display: none; position: fixed; top: calc(var(--bar-h, var(--topbar-h)) + 8px); right: 10px; z-index: 30; min-width: 230px;
    flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-radius: 20px; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(2,6,23,.6); }
  #topbar.menu-open .controls-extra { display: flex; }
  .version-menu { position: static; width: auto; box-shadow: none; margin-top: 4px; }
  #version-btn { justify-content: flex-start; }
  .controls-extra .icon-btn { justify-content: flex-start; padding: 9px 12px; }
  .menu-only { display: inline; }
}
/* Phones: one-row top bar (brand · search · ⋯ menu), view switch as a bottom navigation bar,
   panel as a bottom sheet sitting just above it. */
@media (max-width: 820px) {
  :root { --topbar-h: 56px; --panel-w: 100vw; --nav-h: calc(58px + env(safe-area-inset-bottom, 0px)); }
  #topbar { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 10px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-title { font-size: 18px; }
  .brand-mark { width: 24px; height: 24px; }
  .center-group { min-width: 0; }
  .search-wrap { flex: 1; min-width: 0; }
  #search { width: 100%; }
  #view-seg { position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; height: var(--nav-h); padding: 7px 12px env(safe-area-inset-bottom, 0px);
    border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--panel-solid); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); gap: 8px; }
  #view-seg .seg-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; padding: 4px; font-size: 11.5px; }
  #view-seg .seg-btn svg { display: block; }
  #stage { right: 0; bottom: var(--nav-h); transition: bottom .35s ease; }
  body:not(.panel-collapsed) #stage { bottom: calc(58vh + var(--nav-h)); }
  #panel { top: auto; left: 0; right: 0; bottom: var(--nav-h); height: 58vh; width: 100vw; border: 0; border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(2,6,23,.5); }
  #panel-body { border-radius: 24px 24px 0 0; padding: 22px 18px 40px; }
  body.panel-collapsed #panel { transform: translateY(100%); }
  #panel-toggle { left: auto; right: 14px; top: -44px; }
  #panel-toggle svg { transform: rotate(90deg); }
  body.panel-collapsed #panel-toggle svg { transform: rotate(-90deg); }
  #filters { right: 12px; left: 12px; width: auto; max-height: 60vh; overflow-y: auto; }
  .hint { display: none; }
  #tooltip { max-width: calc(100vw - 24px); }
}
@media (max-width: 520px) {
  .brand-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* hidden from sight, kept as the page's heading */
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
