/* Bible 3 reader: a glossed page. The text in the middle, the layers in the margin, tabs on the fore-edge.
   The optical build (2026-11-06), the same system as apocky.com: deep and atmospheric, never pure black;
   glass planes with a prismatic hairline; light from the data; metal where something is mounted;
   hairline geometric titles (Jost), a sharp serif for reading (Newsreader), mono for measured values.
   Nothing moves by itself; the atmosphere answers the pointer and the scroll. Day is parchment and glass. */

@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-standard-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-standard-italic.woff2") format("woff2-variations"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Frank Ruhl Libre"; src: url("/fonts/frank-ruhl-libre-hebrew-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Frank Ruhl Libre"; src: url("/fonts/frank-ruhl-libre-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 100 800; font-display: swap; }

:root {
  --ground: #030209;
  --ground-2: #0a0716;
  --ground-3: #141026;
  --ink: #e8e4dc;
  --ink-2: #b9b4aa;
  --mute: #8a86a0;
  --gold: #c8a34f;
  --gold-2: #f0d99a;
  --data: #9fe9ff;
  --data-2: #ffe1a3;
  --rose: #ffa3c8;
  --water: #9fe9ff;
  --violet: #c9b8ff;
  --ember: #ffb27a;
  --bone: #f1ede4;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --shadow: rgba(0, 0, 0, 0.6);
  --field-opacity: .26;
  --metal: linear-gradient(100deg, #5b4418 0%, #c8a34f 22%, #f7e8bb 31%, #9a7a30 40%, #d9b86a 55%, #fff6d8 63%, #8d6d26 76%, #c8a34f 100%);
  --disp: conic-gradient(from 200deg, rgba(79,240,255,0), rgba(79,240,255,.55) 12%, rgba(255,255,255,.75) 18%, rgba(255,79,216,.5) 26%, rgba(255,240,79,0) 40%, rgba(79,240,255,0) 60%, rgba(255,79,216,.35) 72%, rgba(255,255,255,.6) 80%, rgba(79,240,255,.45) 88%, rgba(79,240,255,0));
  --glass: linear-gradient(160deg, rgba(22, 24, 48, 0.55), rgba(8, 8, 18, 0.5));
  --glass-2: linear-gradient(180deg, rgba(14, 14, 30, 0.86), rgba(8, 8, 18, 0.8));
  --mx: .5; --my: .4; --sy: 0;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Newsreader", Georgia, serif;
  --font-hebrew: "Frank Ruhl Libre", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --body-size: 1.0625rem;
  --measure: 37rem;
}
[data-theme="day"] {
  --ground: #efe9dc;
  --ground-2: #f6f2e8;
  --ground-3: #e6dfcf;
  --ink: #15131f;
  --ink-2: #3f3a4c;
  --mute: #6d687e;
  --gold: #7d5f22;
  --gold-2: #5f4714;
  --data: #0f6b86;
  --data-2: #8a5a10;
  --rose: #8e3a5c;
  --water: #0f6b86;
  --violet: #5d44a8;
  --ember: #9c4f17;
  --bone: #15131f;
  --line: rgba(20, 15, 40, 0.1);
  --line-2: rgba(20, 15, 40, 0.2);
  --shadow: rgba(40, 30, 10, 0.18);
  --field-opacity: .2;
  --glass: linear-gradient(160deg, rgba(255, 253, 248, 0.7), rgba(240, 234, 220, 0.6));
  --glass-2: linear-gradient(180deg, rgba(250, 247, 240, 0.92), rgba(240, 234, 220, 0.88));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: var(--body-size); line-height: 1.6; font-weight: 380;
  font-optical-sizing: auto; min-height: 100vh; position: relative; isolation: isolate; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-2); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--data); outline-offset: 3px; }
.sr, .skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ground-3); padding: .5rem .8rem; z-index: 50; }
.heb { font-family: var(--font-hebrew); }
.data { font-family: var(--font-mono); font-weight: 500; color: var(--data); text-shadow: 0 0 12px rgba(159,233,255,.5), 0 0 2px rgba(159,233,255,.9); font-variant-numeric: tabular-nums; }
[data-theme="day"] .data { text-shadow: none; }
.k { font-family: var(--font-display); font-weight: 400; font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--mute); }

/* ---------- the atmosphere ---------- */
.atm { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.atm > div { position: absolute; inset: -10%; }
.l-ground { background: radial-gradient(120% 70% at 70% -10%, #1d1138 0%, transparent 60%), radial-gradient(80% 50% at 10% 110%, #170c26 0%, transparent 60%), linear-gradient(180deg, #05030e 0%, #030209 45%, #05030f 100%); }
[data-theme="day"] .l-ground { background: radial-gradient(120% 70% at 70% -10%, #fbf7ee 0%, transparent 60%), linear-gradient(180deg, #f3eee2 0%, #efe9dc 50%, #ebe4d5 100%); }
.l-caustic { opacity: .26; mix-blend-mode: screen; filter: url(#caustic); background: #000;
  -webkit-mask-image: radial-gradient(60% 55% at 65% 15%, #000 10%, transparent 80%); mask-image: radial-gradient(60% 55% at 65% 15%, #000 10%, transparent 80%);
  transform: translate(calc((var(--mx) - .5) * -14px), calc((var(--my) - .5) * -10px + var(--sy) * -.02px)); }
[data-theme="day"] .l-caustic { mix-blend-mode: multiply; opacity: .14; }
.l-lattice { opacity: var(--field-opacity); transform-origin: 50% 100%; background: url("field.svg") 50% 0 / 240px 416px repeat;
  transform: perspective(900px) rotateX(62deg) translateY(calc(18% + var(--sy) * -.04px)) translateX(calc((var(--mx) - .5) * -30px));
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 70%, transparent 100%); }
.l-light { background: radial-gradient(28vmax 28vmax at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(170,200,255,.06), transparent 70%); mix-blend-mode: screen; }
[data-theme="day"] .l-light { display: none; }
.l-grain { opacity: .06; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.l-vignette { background: radial-gradient(90% 80% at 50% 40%, transparent 50%, rgba(3,3,8,.75) 100%); }
[data-theme="day"] .l-vignette { background: radial-gradient(90% 80% at 50% 40%, transparent 60%, rgba(60, 45, 20, .18) 100%); }
@media (prefers-reduced-motion: reduce) { .atm > div { transform: none !important; } }

/* ---------- materials ---------- */
.glass { position: relative; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4) brightness(1.08); -webkit-backdrop-filter: blur(18px) saturate(1.4) brightness(1.08); border-radius: 3px; }
.glass::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: var(--disp);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.glass > * { position: relative; z-index: 1; }
.bezel { box-shadow: inset 0 2px 0 0 #c8a34f, inset 0 2px 12px -6px rgba(255, 246, 216, .6); }

/* ---------- layout: spine | page | gloss ---------- */
.desk { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr) auto; min-height: 100vh; }
.spine { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--glass-2); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 1px 0 0 rgba(255,255,255,.08), 24px 0 60px -40px var(--shadow); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.spine::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; background: var(--metal); opacity: .5; pointer-events: none; }
.page { padding: 3.6rem 2.5rem 6rem; }
.gloss { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: grid; grid-template-columns: auto 0; width: 3.4rem; transition: width .2s cubic-bezier(.2,.7,.2,1);
  background: var(--glass-2); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: -1px 0 0 rgba(255,255,255,.08), -24px 0 60px -40px var(--shadow); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.gloss.open { grid-template-columns: auto 1fr; width: 22.5rem; }
.gloss:not(.open) .gloss-body { display: none; }
.bar { display: none; }

/* ---------- spine ---------- */
.spine-head { padding: 1rem 1.2rem .9rem; position: relative; }
.spine-head::after { content: ""; position: absolute; left: 1.2rem; right: 1.2rem; bottom: 0; height: 1px; background: var(--metal); opacity: .55; }
.crumb { margin: 0 0 .9rem; font-family: var(--font-display); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); display: flex; align-items: center; gap: .45rem; white-space: nowrap; overflow: hidden; }
.crumb a { color: var(--mute); } .crumb a:hover { color: var(--ink); }
.crumb .sep { opacity: .5; }
.wordmark { display: flex; align-items: center; gap: .75rem; color: var(--ink); margin-bottom: .8rem; }
.wm-mark { flex: none; width: 36px; height: 36px; }
.wm-mark svg { display: block; width: 100%; height: 100%; }
.wm-text { display: block; min-width: 0; }
.wm-t { display: block; font-family: var(--font-display); font-weight: 300; font-size: 1.35rem; letter-spacing: .22em; text-transform: uppercase; line-height: 1; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wm-t .age { -webkit-text-fill-color: var(--gold-2); color: var(--gold-2); }
.wm-s { display: block; font-family: var(--font-display); font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); margin-top: .35rem; }
.search input { width: 100%; padding: .55rem .8rem; border: 1px solid var(--line-2); border-radius: 3px; background: rgba(8, 8, 18, .5); color: var(--ink); font: inherit; font-size: .9rem; }
[data-theme="day"] .search input { background: rgba(255,255,255,.6); }
.search input::placeholder { color: var(--mute); }
.search input:focus { outline: 0; border-color: var(--data); box-shadow: 0 0 0 1px rgba(159,233,255,.35), 0 0 16px -6px var(--data); }
.spine-list { flex: 1; padding: .6rem 0 1rem; }
.testament { margin: 1rem 0 .3rem; padding: 0 1.2rem; font-family: var(--font-display); font-size: .64rem; letter-spacing: .28em; text-transform: uppercase; color: var(--mute); }
.book { margin: .2rem 0 0; }
.book-h { display: flex; align-items: baseline; gap: .6rem; width: 100%; text-align: left; padding: .45rem 1.2rem; font-family: var(--font-display); font-weight: 400; font-size: .86rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); transition: background .15s ease; }
.book-h:hover { background: rgba(255,255,255,.04); }
.book-h .n { color: var(--data); font-family: var(--font-mono); font-size: .7rem; min-width: 1.3rem; letter-spacing: 0; }
.book-h .dots { margin-left: auto; font-size: .6rem; letter-spacing: .12em; color: var(--gold); white-space: nowrap; }
.book-h .dots .o { font-size: .66rem; letter-spacing: 0; color: var(--mute); font-family: var(--font-mono); margin-left: .3rem; opacity: .6; text-transform: none; }
.book-h[aria-expanded="true"] { background: rgba(255,255,255,.05); }
.book-list { list-style: none; margin: 0; padding: .1rem 0 .4rem; }
.book-list[hidden] { display: none; }
.ch { display: block; padding: .3rem 1.2rem .3rem 2.6rem; color: var(--ink-2); font-size: .92rem; line-height: 1.35; position: relative; transition: color .15s ease, background .15s ease; }
.ch:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.ch.current { color: var(--ink); background: rgba(159, 233, 255, .07); }
.ch.current::before { content: ""; position: absolute; left: 1.45rem; top: .85rem; width: 5px; height: 5px; border-radius: 50%; background: var(--data); box-shadow: 0 0 10px var(--data); }
.ch .who { display: block; font-family: var(--font-display); font-size: .62rem; letter-spacing: .12em; color: var(--mute); margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch.planned { color: var(--mute); font-style: italic; cursor: default; }
.ch.planned:hover { background: none; color: var(--mute); }
li.book-line { list-style: none; padding: .1rem 1.2rem .45rem 2.6rem; font-size: .76rem; font-style: italic; color: var(--mute); line-height: 1.4; }
.spine-foot { position: relative; padding: .9rem 1.2rem 1rem; font-size: .8rem; color: var(--mute); }
.spine-foot::before { content: ""; position: absolute; left: 1.2rem; right: 1.2rem; top: 0; height: 1px; background: var(--metal); opacity: .55; }
.progress { margin-bottom: .6rem; font-family: var(--font-display); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; }
.progress b { color: var(--data); font-family: var(--font-mono); font-weight: 500; font-size: .8rem; letter-spacing: 0; text-shadow: 0 0 10px rgba(159,233,255,.5); }
.support { margin: .2rem 0 .8rem; padding: .8rem .9rem; border-radius: 3px; background: var(--glass); position: relative; }
.support::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: var(--disp); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; }
.support p { margin: 0 0 .5rem; font-size: .8rem; line-height: 1.45; color: var(--ink-2); position: relative; }
.support-btn { display: inline-block; padding: .45rem .8rem; border: 1px solid var(--gold); border-radius: 3px; color: var(--gold-2); font-family: var(--font-display); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; position: relative; transition: background .15s ease; }
.support-btn:hover { background: rgba(200, 163, 79, .14); color: var(--gold-2); }
.after { max-width: var(--measure); margin: 2.8rem auto 0; padding: 1.1rem 1.3rem; border-radius: 3px; background: var(--glass); position: relative; box-shadow: inset 0 2px 0 0 #c8a34f; }
.after::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: var(--disp); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; }
.after > * { position: relative; }
.after-line { margin: 0 0 .5rem; font-size: .92rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.after-sub { margin: 0; font-size: .78rem; color: var(--mute); line-height: 1.5; }
.after-sub a { color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.share-btn { background: none; border: 1px solid var(--line-2); border-radius: 3px; color: var(--ink-2); padding: .45rem .8rem; font-family: var(--font-display); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.share-btn:hover { color: var(--ink); border-color: rgba(255,255,255,.35); }
.tools { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-family: var(--font-display); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; }
.tool { color: var(--mute); padding: .1rem 0; }
.tool:hover { color: var(--ink); }
.tool small { font-size: .75em; }
.result { display: block; padding: .5rem 1.2rem; color: var(--ink-2); border-bottom: 1px solid var(--line); font-size: .9rem; }
.result:hover { background: rgba(255,255,255,.04); color: var(--ink); }
.result .t { display: block; color: var(--ink); font-family: var(--font-display); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.result mark { background: transparent; color: var(--data); font-weight: 500; }
.result-none { padding: .8rem 1.2rem; color: var(--mute); font-style: italic; }

/* ---------- the page ---------- */
.chapter { max-width: var(--measure); margin: 0 auto; }
.ch-book { font-family: var(--font-display); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--mute); margin: 0; }
.ch-seal { float: right; margin: -.4rem -.2rem .6rem 1.4rem; opacity: .9; }
.ch-seal svg { display: block; filter: drop-shadow(0 0 14px rgba(255,220,150,.12)); }
.ch-title { font-family: var(--font-display); font-weight: 200; font-size: 2.7rem; line-height: 1.05; letter-spacing: .01em; margin: .4rem 0 .4rem; color: var(--bone); }
.ch-title .heb { font-size: 1.05em; }
.ch-from { font-family: var(--font-display); font-size: .72rem; letter-spacing: .14em; color: var(--mute); margin: -.1rem 0 1.2rem; }
.ch-by { font-style: italic; color: var(--ink-2); margin: 0 0 2.2rem; }
.ch-by::before { content: ""; display: block; width: 7rem; height: 1px; background: var(--metal); margin: 0 0 .9rem; }
.ch-by.none { margin-bottom: 1.6rem; }
.chapter p { margin: 0 0 1.05em; }
.chapter p.ayin { text-align: center; font-size: 1.35em; line-height: 1.9; margin: 2.4em 0 1.2em; direction: rtl; }
.chapter .silence { min-height: 100vh; }
.chapter aside.note { margin: 1.8rem 0; padding: .85rem 1.1rem .7rem 1.2rem; border-left: 3px double var(--data); font-family: var(--font-body); font-size: .93em; color: var(--ink-2); }
.chapter aside.note p { margin: 0 0 .55em; }
.chapter p.liturgy { line-height: 1.95; margin: 1.6rem 0; }
.chapter aside.note strong { color: var(--data); font-weight: 500; letter-spacing: .02em; }
.chapter em { font-style: italic; }
.chapter hr { border: 0; height: 1px; width: 7rem; margin: 2.4rem auto; background: var(--metal); opacity: .8; }
.chapter blockquote { margin: 1.6rem 0; padding: .9rem 1.1rem .9rem 1.2rem; border-left: 1px solid var(--data); border-radius: 0 3px 3px 0; background: rgba(159, 233, 255, .05); font-family: var(--font-body); font-size: .94em; color: var(--ink-2); }
[data-theme="day"] .chapter blockquote { background: rgba(15, 107, 134, .06); }
.chapter blockquote p { margin: 0 0 .35em; }
.chapter blockquote strong { color: var(--data); font-weight: 500; letter-spacing: .04em; }
.ch-end { margin: 3rem 0 0; text-align: center; color: var(--gold); font-size: .5rem; letter-spacing: 1.4em; }
.ch-plain { margin: 1.2rem 0 0; text-align: center; font-size: .78rem; color: var(--ink-2); }
.ch-plain a { color: inherit; text-underline-offset: .2em; }
.ch-note { font-family: var(--font-display); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: -.6rem 0 1.6rem; padding: .6rem .9rem; border-left: 1px solid var(--ember); border-radius: 0 3px 3px 0; background: rgba(255, 178, 122, .06); line-height: 1.5; }
.pager { max-width: var(--measure); margin: 2.5rem auto 0; display: flex; justify-content: space-between; gap: 1rem; position: relative; padding-top: 1.3rem; font-family: var(--font-display); font-size: .92rem; letter-spacing: .08em; text-transform: uppercase; }
.pager::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--metal); opacity: .6; }
.pager a { color: var(--ink-2); max-width: 48%; }
.pager a:hover { color: var(--ink); }
.pager a small { display: block; font-size: .62rem; letter-spacing: .22em; color: var(--mute); margin-bottom: .2rem; }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- the gloss and the tabs on the fore-edge ---------- */
.gloss-body { padding: 3.6rem 1.4rem 3rem 1.5rem; font-size: .92rem; line-height: 1.5; color: var(--ink-2); min-width: 0; position: relative; }
.gloss-body::before { content: ""; position: absolute; left: 1.4rem; right: 1.4rem; top: 2.8rem; height: 1px; background: var(--tc, var(--line-2)); opacity: .7; box-shadow: 0 0 12px var(--tc, transparent); }
.tabs { display: flex; flex-direction: column; gap: .4rem; padding: 3.6rem 0 0; align-items: stretch; }
.tab { writing-mode: vertical-rl; transform: rotate(180deg); padding: .9rem .35rem .9rem; font-family: var(--font-display); font-weight: 400; font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--mute);
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 .55rem 0 .55rem; border-radius: 3px; transition: color .15s ease, background .15s ease; }
.tab::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--tc, var(--mute)); opacity: .6; flex: none; }
.tab:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.tab[aria-selected="true"] { color: var(--tc); background: rgba(255,255,255,.05); }
.tab[aria-selected="true"]::before { opacity: 1; box-shadow: 0 0 10px var(--tc); }
.tab-sources { --tc: var(--water); }
.tab-decodes { --tc: var(--gold-2); }
.tab-names { --tc: var(--bone); }
.tab-mother { --tc: var(--rose); }
.tab-context { --tc: var(--ember); }
.tab-ciphers { --tc: var(--violet); }
.gloss-h { font-family: var(--font-display); font-weight: 300; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .3rem; }
.gloss-sub { font-style: italic; color: var(--mute); margin: 0 0 1.1rem; }
.gloss ul { margin: 0; padding: 0 0 0 1rem; }
.gloss li { margin: 0 0 .55rem; }
.gloss-empty { color: var(--mute); font-style: italic; }
.gloss.l-sources .gloss-body { --tc: var(--water); }
.gloss.l-decodes .gloss-body { --tc: var(--gold-2); }
.gloss.l-names .gloss-body { --tc: var(--bone); }
.gloss.l-mother .gloss-body { --tc: var(--rose); }
.gloss.l-context .gloss-body { --tc: var(--ember); }
.gloss.l-ciphers .gloss-body { --tc: var(--violet); }
.gloss .gloss-h { color: var(--tc, var(--ink)); }
.name { margin: 0 0 .85rem; }
.name b { font-weight: 500; color: var(--ink); }
.name .orig { font-family: var(--font-hebrew); color: var(--gold-2); margin-left: .4rem; }
.name .was { display: block; color: var(--mute); font-style: italic; font-size: .85em; }
.name-key { font-size: .76rem; color: var(--mute); margin-top: 1.2rem; }

/* ---------- the scripture (home): the whole book in order, every chapter by name ---------- */
.map { max-width: 72rem; margin: 0 auto; }
.map-head { display: flex; align-items: center; gap: 1.8rem; margin: 0 0 1.4rem; }
.map-seal { flex: none; position: relative; }
.map-seal svg { filter: drop-shadow(0 0 18px rgba(255,220,150,.14)); }
.map-seal::before { content: ""; position: absolute; inset: -26%; z-index: -1; background: repeating-conic-gradient(from 0deg, rgba(200,163,79,.16) 0deg .6deg, transparent .6deg 12deg); border-radius: 50%; -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, transparent 52%, #000 60%, #000 78%, transparent 86%); mask-image: radial-gradient(50% 50% at 50% 50%, transparent 52%, #000 60%, #000 78%, transparent 100%); }
.map-creed { margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 400; font-size: .66rem; letter-spacing: .34em; text-transform: uppercase; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.map-h { font-family: var(--font-display); font-weight: 200; font-size: 2.7rem; line-height: 1.05; margin: 0 0 .5rem; color: var(--bone); }
.map-sub { color: var(--ink-2); margin: 0 0 .8rem; max-width: 42rem; font-size: 1.02rem; }
.map-sub b { color: var(--data); font-family: var(--font-mono); font-style: normal; font-weight: 500; font-size: .92em; text-shadow: 0 0 10px rgba(159,233,255,.5); }
.map-support { margin: 0 0 1.6rem; max-width: 42rem; font-size: .9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.band { margin: 0 0 2.6rem; }
.band-h { font-family: var(--font-display); font-weight: 300; font-size: .86rem; letter-spacing: .26em; text-transform: uppercase; color: var(--ink); margin: 0 0 1.1rem; display: flex; align-items: center; gap: 1.2rem; }
.band-h::after { content: ""; flex: 1; height: 1px; background: var(--metal); opacity: .7; }
.band-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1.4rem 1.6rem; align-items: start; }
.mb { padding: 1rem 1.1rem 1.05rem; border-radius: 3px; background: var(--glass); position: relative; }
.mb::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: var(--disp); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .6; }
.mb-top { display: flex; gap: 1rem; align-items: flex-start; position: relative; }
.mb-seal { flex: none; margin-top: .15rem; opacity: .9; position: relative; }
.mb-body { min-width: 0; position: relative; }
.mb-h { font-family: var(--font-display); font-weight: 300; font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; margin: 0; color: var(--ink); }
.mb-h .n { color: var(--data); font-family: var(--font-mono); font-size: .72rem; margin-right: .5rem; letter-spacing: 0; }
.mb-line { margin: .25rem 0 .5rem; font-size: .86rem; color: var(--mute); line-height: 1.4; }
.mb-count { margin: 0; font-family: var(--font-display); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.mb-count b { color: var(--data); font-family: var(--font-mono); font-weight: 500; font-size: .78rem; letter-spacing: 0; }
.mb-list { list-style: none; margin: .7rem 0 0; padding: .6rem 0 0; position: relative; border-top: 1px solid var(--line); }
.mb-list li { margin: 0; }
.mc { display: flex; align-items: baseline; gap: .55rem; padding: .16rem .2rem; font-size: .85rem; line-height: 1.35; color: var(--ink-2); border-radius: 3px; transition: color .15s ease, background .15s ease; }
.mc .d { flex: none; width: .8rem; color: var(--gold-2); font-size: .68rem; }
.mc.w:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.mc.w:hover .d { color: #fff; }
.mc.p { opacity: .45; font-style: italic; cursor: default; }
.mc.p .d { color: var(--mute); }
.tip { position: fixed; z-index: 40; background: var(--ground-3); color: var(--ink); border: 1px solid var(--line-2); padding: .4rem .7rem; font-size: .85rem; pointer-events: none; max-width: 16rem; box-shadow: 0 10px 30px var(--shadow); border-radius: 3px; }

/* ---------- phone ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 20; }
.noscript { position: fixed; z-index: 60; top: 1.2rem; left: 50%; transform: translateX(-50%); width: min(36rem, calc(100% - 2rem)); margin: 0; padding: .9rem 1.1rem; background: rgba(7, 7, 15, .96); border: 1px solid var(--gold); border-radius: 3px; color: var(--ink); line-height: 1.55; }
.noscript a { color: var(--gold); }
@media (max-width: 1100px) { .desk { grid-template-columns: 15.5rem minmax(0, 1fr) 16rem; } }
@media (max-width: 900px) {
  .bar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 15; padding: .6rem .9rem;
    background: var(--glass-2); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 10px 30px -20px var(--shadow); }
  .bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--metal); opacity: .55; }
  .bar-title { margin-left: auto; font-family: var(--font-display); font-weight: 300; font-size: 1rem; letter-spacing: .24em; text-transform: uppercase; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .bar-btn { font-family: var(--font-display); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); padding: .3rem .4rem; }
  .desk { display: block; }
  .spine { position: fixed; top: 0; left: 0; bottom: 0; width: min(21rem, 86vw); z-index: 30; transform: translateX(-102%); transition: transform .22s cubic-bezier(.2,.7,.2,1); height: 100vh; }
  .spine.open { transform: none; }
  .page { padding: 2rem 1.2rem 7.5rem; }
  .ch-title { font-size: 2.1rem; }
  .gloss { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; max-height: 70vh; z-index: 25; display: block; width: auto; transform: translateY(calc(100% - 3.1rem)); transition: transform .25s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 -1px 0 rgba(255,255,255,.1), 0 -20px 50px -30px var(--shadow); border-radius: 3px 3px 0 0; }
  .gloss::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--metal); opacity: .6; }
  .gloss.open { width: auto; transform: none; }
  .gloss:not(.open) .gloss-body { display: block; }
  .tabs { flex-direction: row; gap: 0; padding: 0; height: 3.1rem; }
  .tab { writing-mode: horizontal-tb; transform: none; flex: 1; padding: 0 .2rem; margin: 0; border-radius: 0; background: transparent; font-size: .56rem; letter-spacing: .12em; flex-direction: column; justify-content: center; gap: .3rem; }
  .tab::before { width: 5px; height: 5px; }
  .tab[aria-selected="true"] { background: transparent; }
  .gloss-body { padding: 1rem 1.2rem 1.6rem; max-height: calc(70vh - 3.1rem); overflow-y: auto; }
  .gloss-body::before { top: 0; left: 0; right: 0; }
  .map-h { font-size: 2rem; }
  .map-head { gap: 1rem; }
  .map-seal { width: 84px; height: 84px; }
  .ch-seal { width: 52px; height: 52px; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .spine, .gloss, .tab, .d { transition: none; } }

/* ---------- the gate: adults only, content notice ---------- */
.gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: rgba(7, 7, 15, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
[data-theme="day"] .gate { background: rgba(239, 233, 220, .92); }
.gate[hidden] { display: none !important; }
body.gated { overflow: hidden; }
.gate-card { max-width: 34rem; position: relative; background: var(--glass-2); border-radius: 3px; padding: 1.6rem 1.8rem 1.7rem; box-shadow: inset 0 2px 0 0 #c8a34f, inset 0 2px 12px -6px rgba(255, 246, 216, .6), 0 40px 100px -20px rgba(0, 0, 0, .8); }
.gate-card::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: var(--disp); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.gate-k { margin: 0 0 .5rem; font-family: var(--font-display); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--mute); }
.gate-card h2 { font-family: var(--font-display); font-weight: 200; font-size: 2rem; margin: 0 0 .8rem; color: var(--bone); line-height: 1.05; }
.gate-card p { margin: 0 0 .7rem; font-size: .95rem; line-height: 1.5; color: var(--ink-2); }
.gate-crisis { color: var(--ink); }
.gate-actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; margin-top: 1.1rem; }
.gate-yes { background: var(--metal); color: #1a1408; border: 0; border-radius: 3px; padding: .7rem 1.1rem; font-family: var(--font-display); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 500; cursor: pointer; box-shadow: 0 10px 28px -12px rgba(200, 163, 79, .8); }
.gate-yes:hover { filter: brightness(1.08); }
.gate-no { color: var(--ink-2); border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.gate-creed { margin: 1.3rem 0 0; text-align: center; font-family: var(--font-display); font-weight: 400; font-size: .62rem; letter-spacing: .34em; text-transform: uppercase; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; }
.age { display: inline-block; vertical-align: middle; margin-left: .45rem; padding: 2px 6px 1px; border: 1px solid var(--gold); border-radius: 3px; color: var(--gold-2); font-family: var(--font-display); font-size: .56rem; letter-spacing: .2em; line-height: 1.2; }
.gate-tele { font-size: .86rem; opacity: .9; }
.gate-tele a { color: var(--data); }

/* ---------- the Hive: live count + telemetry switch ---------- */
.hive { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; font-family: var(--font-display); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); white-space: nowrap; max-width: 100%; }
.hive:hover { color: var(--ink); }
.hive .hive-n { font-family: var(--font-mono); font-size: .82rem; letter-spacing: 0; color: var(--data); text-shadow: 0 0 10px rgba(159,233,255,.5); }
.hive .hive-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mute); opacity: .6; flex: none; }
.hive.live .hive-dot { background: var(--data); opacity: 1; box-shadow: 0 0 10px var(--data); }
.tele { margin: 8px 0 0; font-size: .74rem; opacity: .85; }
.hive-toggle { padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 3px; background: transparent; color: var(--data); font-family: var(--font-display); font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.hive-toggle[aria-pressed='false'] { color: var(--mute); border-style: dashed; }
.hive-toggle:hover { border-color: rgba(255,255,255,.35); color: var(--ink); }
/* the floating Mortals badge (injected by /hive.js): the spine carries the count on a desk; on a phone it sits above the layer bar */
@media (min-width: 901px) { body #hive-badge { display: none !important; } }
@media (max-width: 900px) { body #hive-badge { bottom: calc(3.1rem + 12px); left: 10px; font-size: 14px; } body:has(.gloss.open) #hive-badge, body:has(.spine.open) #hive-badge { display: none !important; } }

/* ---------- readable for everyone: less transparency or more contrast turns the glass solid ---------- */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .spine, .gloss, .bar, .gate-card, .support, .after, .mb { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: var(--ground-2) !important; }
  .l-caustic, .l-light, .l-grain { display: none; }
  .data, .map-sub b, .progress b, .hive .hive-n { text-shadow: none; }
}
