/* Study guide kit: "candlelit study" on screen, a light printable page in print.
   Text floor 17px everywhere (18px+ sentences, 20px+ buttons and row titles). */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/cormorant-garamond-500-normal-latin.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/cormorant-garamond-600-normal-latin.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('/fonts/cormorant-garamond-500-italic-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-400-normal-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600-normal-latin.woff2') format('woff2'); }

:root {
  --bg: #0c0a08; --bg-2: #13100c; --panel: #1a1511; --panel-2: #221b15;
  --line: rgba(236, 208, 143, 0.14); --line-2: rgba(236, 208, 143, 0.28);
  --ink: #f4ede1; --ink-dim: #d2c7b5; --ink-faint: #ab9f8c;
  --gold: #d6af64; --gold-bright: #efd394; --gold-deep: #9a7634;
  --scarlet: #c9584b; --navy: #1c2636; --sage: #8fae8b;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hebrew: 'SBL Hebrew', 'Ezra SIL', 'Taamey Frank CLM', 'Times New Roman', 'David', 'Arial Hebrew', serif;
  --greek: 'Gentium Plus', 'GFS Didot', 'Times New Roman', serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --r: 18px; --r-lg: 28px;
  --scale: 1;
  --wrap: 760px;
  color-scheme: dark;
}
html[data-size="l"] { --scale: 1.12; }
html[data-size="xl"] { --scale: 1.26; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: calc(19px * var(--scale)); line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-underline-offset: 3px; }
a:hover { color: #fff3d1; }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wide { width: min(100% - 40px, 1100px); margin-inline: auto; }

/* ---------------------------------------------------------------- top bar */
.g-bar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(14px, 3vw, 28px); background: rgba(12, 10, 8, 0.86);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.g-bar__home { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0.01em; min-width: 0; }
.g-bar__home img { width: 38px; height: 38px; border-radius: 50%; flex: none; }
.g-bar__home span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-bar__tools { margin-left: auto; display: flex; gap: 8px; flex: none; }
.g-progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); }

.g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--ink);
  font: 600 20px/1.1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.g-btn:hover { background: rgba(236, 208, 143, 0.1); border-color: var(--gold); color: var(--ink); }
.g-btn:active { transform: scale(0.97); }
.g-btn--gold { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1b1408; border-color: transparent; box-shadow: 0 10px 30px -12px rgba(214, 175, 100, 0.7); }
.g-btn--gold:hover { background: linear-gradient(180deg, #f6dfaa, var(--gold-bright)); color: #1b1408; }
.g-btn--icon { width: 52px; padding: 0; }
.g-btn svg { width: 22px; height: 22px; flex: none; }
.g-bar .g-btn { min-height: 48px; font-size: 18px; padding: 0 16px; }
.g-bar .g-btn--icon { width: 48px; padding: 0; }
@media (max-width: 640px) { .g-bar .g-btn__label { display: none; } .g-bar .g-btn { width: 48px; padding: 0; } .g-bar__home span { font-size: 20px; } }

/* ---------------------------------------------------------------- hero */
.g-hero { position: relative; min-height: min(92vh, 860px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.g-hero__art { position: absolute; inset: 0; z-index: -2; }
.g-hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transform: scale(1.08); animation: g-drift 26s var(--ease) forwards; }
@keyframes g-drift { to { transform: scale(1); } }
.g-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,10,8,0.94) 0%, rgba(12,10,8,0.7) 42%, rgba(12,10,8,0.1) 78%), linear-gradient(0deg, var(--bg) 0%, rgba(12,10,8,0) 45%); }
.g-hero__body { padding: 120px 0 56px; }
.g-kicker { display: inline-flex; align-items: center; gap: 12px; font: 600 17px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-bright); }
.g-kicker img { width: 46px; height: 46px; border-radius: 50%; }
.g-hero h1 { margin: 18px 0 0; font: 600 clamp(64px, 11vw, 132px)/0.92 var(--serif); letter-spacing: -0.02em; }
.g-hero h1 em { font-style: italic; color: var(--gold-bright); font-weight: 500; }
.g-hero__sub { margin: 10px 0 0; font: 500 clamp(32px, 4.6vw, 52px)/1.08 var(--serif); font-style: italic; color: var(--gold-bright); }
.g-hero__meta { margin: 22px 0 0; color: var(--ink-dim); font-size: 19px; max-width: 34em; }
.g-hero__cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.g-hero__note { margin-top: 14px; color: var(--ink-faint); font-size: 17px; }

/* ---------------------------------------------------------------- panels */
.g-section-gap { height: clamp(48px, 8vw, 96px); }
.g-eyebrow { font: 600 17px/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.g-h2 { font: 600 clamp(40px, 6vw, 60px)/1.04 var(--serif); margin: 0 0 18px; letter-spacing: -0.01em; }
.g-h3 { font: 600 clamp(28px, 3.6vw, 34px)/1.15 var(--serif); margin: 36px 0 12px; color: var(--gold-bright); }
.g-lede { font-size: calc(21px * var(--scale)); color: var(--ink-dim); margin: 0 0 18px; }
.g-p { margin: 0 0 18px; }
.g-p strong, .g-li strong { color: #fff6e3; font-weight: 600; }
.g-p em { color: var(--gold-bright); }

.g-thesis {
  position: relative; padding: clamp(28px, 4vw, 44px); border-radius: var(--r-lg);
  background: radial-gradient(120% 140% at 0% 0%, rgba(214,175,100,0.16), transparent 60%), var(--panel);
  border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8);
}
.g-thesis__q { font: 500 italic clamp(28px, 3.4vw, 36px)/1.25 var(--serif); color: var(--ink); margin: 0 0 18px; }
.g-thesis__a { margin: 0; font-size: calc(20px * var(--scale)); color: var(--ink-dim); }
.g-thesis__a strong { color: var(--gold-bright); }

/* glance cards */
.g-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.g-glance__card { padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.g-glance__n { font: 600 34px/1 var(--serif); color: var(--gold); }
.g-glance__t { margin: 10px 0 0; font-size: 18px; color: var(--ink-dim); line-height: 1.55; }
.g-glance__t strong { color: var(--ink); }

/* ---------------------------------------------------------------- controls: filters, settings, timeline */
.g-controls { position: sticky; top: 69px; z-index: 30; padding: 12px 0; background: linear-gradient(180deg, var(--bg) 70%, rgba(12,10,8,0)); }
.g-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, #000 92%, transparent); mask: linear-gradient(90deg, #000 92%, transparent); }
.g-chips::-webkit-scrollbar { display: none; }
.g-chip { flex: none; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-dim); font: 600 18px/1 var(--sans); cursor: pointer; transition: all 0.25s var(--ease); }
.g-chip:hover { color: var(--ink); border-color: var(--gold); }
.g-chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1b1408; }

.g-timeline { display: grid; gap: 2px; counter-reset: tl; }
.g-tl { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; color: var(--ink); text-decoration: none; transition: background 0.2s var(--ease); }
.g-tl:hover { background: var(--panel); }
.g-tl.is-here { background: rgba(214, 175, 100, 0.12); }
.g-tl__t { font: 600 18px/1 var(--sans); color: var(--gold); font-variant-numeric: tabular-nums; }
.g-tl__label { font-size: 19px; line-height: 1.35; }
.g-tl__go { font-size: 17px; color: var(--ink-faint); white-space: nowrap; }
.g-tl[hidden] { display: none; }
.g-timeline--collapsed .g-tl:nth-child(n+9) { display: none; }
.g-linkbtn { background: none; border: 0; color: var(--gold-bright); font: 600 19px/1.3 var(--sans); padding: 12px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; min-height: 48px; }

/* settings drawer */
.g-sheet { position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 88vh; overflow: auto; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); background: var(--panel-2); border-top: 1px solid var(--line-2); border-radius: 28px 28px 0 0; transform: translateY(105%); transition: transform 0.45s var(--ease); box-shadow: 0 -30px 80px rgba(0,0,0,0.6); }
.g-sheet.is-open { transform: none; }
@media (min-width: 760px) { .g-sheet { inset: 84px 20px auto auto; width: 420px; border-radius: 24px; border: 1px solid var(--line-2); transform: translateY(-12px) scale(0.98); opacity: 0; pointer-events: none; transition: transform 0.35s var(--ease), opacity 0.35s var(--ease); } .g-sheet.is-open { transform: none; opacity: 1; pointer-events: auto; } }
.g-sheet h2 { margin: 0 0 6px; font: 600 30px/1.1 var(--serif); }
.g-sheet__hint { margin: 0 0 18px; color: var(--ink-faint); font-size: 17px; }
.g-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 19px; }
.g-seg { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.g-seg button { min-width: 52px; min-height: 48px; border: 0; background: transparent; color: var(--ink-dim); font: 600 18px/1 var(--sans); cursor: pointer; }
.g-seg button[aria-pressed="true"] { background: var(--gold); color: #1b1408; }
.g-switch { position: relative; width: 62px; height: 36px; flex: none; }
.g-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.g-switch span { position: absolute; inset: 0; border-radius: 999px; background: #3a3128; border: 1px solid var(--line-2); transition: background 0.25s var(--ease); pointer-events: none; }
.g-switch span::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); transition: transform 0.3s var(--ease); }
.g-switch input:checked + span { background: var(--gold); }
.g-switch input:checked + span::after { transform: translateX(26px); background: #1b1408; }
.g-switch input:focus-visible + span { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
.g-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.g-scrim.is-open { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------------- study sections */
.g-sec { position: relative; padding-top: 10px; }
.g-sec[hidden] { display: none; }
.g-sec__head { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: baseline; margin-bottom: 18px; }
.g-sec__n { font: 600 64px/0.9 var(--serif); color: var(--gold-deep); grid-row: span 2; }
.g-sec__title { margin: 0; font: 600 clamp(34px, 4.6vw, 46px)/1.08 var(--serif); }
.g-sec__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--ink-faint); font-size: 17px; }
.g-time { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(214,175,100,0.1); border: 1px solid var(--line-2); color: var(--gold-bright); font: 600 17px/1 var(--sans); text-decoration: none; }
.g-time:hover { background: rgba(214,175,100,0.2); color: #fff3d1; }
.g-time svg { width: 16px; height: 16px; }
.g-collapse { margin-left: auto; }
.g-sec.is-folded .g-sec__body { display: none; }
.g-fold { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-faint); font: 600 17px/1 var(--sans); cursor: pointer; }
.g-fold:hover { color: var(--ink); border-color: var(--gold); }

.g-figure { margin: 34px calc(50% - 50vw + max(20px, (100vw - 1100px) / 2)); perspective: 1400px; }
@media (max-width: 900px) { .g-figure { margin-inline: 0; } }
.g-figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: inherit; }
/* Paintings sit in a lit frame: rounded, a warm key light from the upper left, a soft vignette,
   a bevelled rim and a deep shadow. With a mouse, the frame tilts and the light follows the pointer. */
.g-frame { position: relative; display: block; border-radius: 28px; overflow: hidden; isolation: isolate;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transform-style: preserve-3d;
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
  box-shadow: 0 0 0 1px rgba(236, 208, 143, 0.18), 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 48px -18px rgba(0, 0, 0, 0.85), 0 70px 120px -50px rgba(0, 0, 0, 0.9); }
.g-frame.is-tilting { transition: transform 0.12s linear, box-shadow 0.4s var(--ease); box-shadow: 0 0 0 1px rgba(236, 208, 143, 0.26), 0 4px 8px rgba(0, 0, 0, 0.5), 0 40px 70px -24px rgba(0, 0, 0, 0.9), 0 90px 140px -60px rgba(0, 0, 0, 0.95); }
.g-frame::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  background: radial-gradient(130% 95% at 50% 38%, transparent 52%, rgba(8, 6, 4, 0.55) 100%), linear-gradient(180deg, rgba(255, 238, 200, 0.07), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.28));
  box-shadow: inset 0 1.5px 0 rgba(255, 240, 205, 0.42), inset 0 0 0 1px rgba(255, 236, 190, 0.14), inset 0 -3px 10px rgba(0, 0, 0, 0.5), inset 0 0 50px rgba(0, 0, 0, 0.35); }
.g-frame__light { position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(70% 70% at var(--mx, 22%) var(--my, 18%), rgba(255, 226, 160, 0.75), rgba(255, 226, 160, 0.12) 45%, transparent 70%),
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.16) 48%, transparent 58%);
  background-size: 100% 100%, 260% 100%; background-position: 0 0, var(--sheen, 100%) 0; transition: background-position 1.4s var(--ease); }
.g-figure.is-in .g-frame__light, .g-reduced .g-frame__light { --sheen: 0%; }
@media (max-width: 640px) { .g-frame { border-radius: 20px; } }
.g-figure figcaption { width: min(100% - 40px, var(--wrap)); margin: 12px auto 0; color: var(--ink-faint); font-size: 17px; font-style: italic; }

/* verse card */
.g-verse { position: relative; margin: 22px 0; padding: 26px 26px 20px 30px; border-radius: var(--r); background: linear-gradient(180deg, rgba(214,175,100,0.07), rgba(214,175,100,0.02)); border: 1px solid var(--line); border-left: 3px solid var(--gold); }
.g-verse__text { margin: 0; font: 500 calc(25px * var(--scale))/1.45 var(--serif); color: #fbf4e6; }
.g-verse__text sup { font: 600 17px/1 var(--sans); color: var(--gold); margin-right: 4px; vertical-align: 0.4em; }
.g-verse mark { background: none; color: var(--gold-bright); background-image: linear-gradient(var(--gold), var(--gold)); background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 1.1s var(--ease) 0.2s; padding-bottom: 2px; }
.g-verse.is-in mark, .g-reduced .g-verse mark { background-size: 100% 2px; }
.g-verse__foot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 14px; }
.g-verse__ref { font: 600 18px/1.2 var(--sans); color: var(--gold); letter-spacing: 0.02em; }
.g-verse__note { width: 100%; margin: 6px 0 0; font-size: 17px; color: var(--ink-faint); }
.g-seer { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font: 600 17px/1 var(--sans); }
.g-seer:hover { border-color: var(--gold); color: var(--gold-bright); }
.g-seer svg { width: 16px; height: 16px; }
.g-ref { color: var(--gold-bright); text-decoration: underline; text-decoration-color: rgba(239,211,148,0.4); text-underline-offset: 4px; white-space: nowrap; }

/* insight from the hosts */
.g-insight { display: grid; grid-template-columns: 52px 1fr; gap: 16px; margin: 24px 0; padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.g-insight__who { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); border: 1px solid var(--line-2); font: 600 20px/1 var(--serif); color: var(--gold-bright); }
.g-insight__text { margin: 0; font: 500 italic calc(23px * var(--scale))/1.45 var(--serif); color: var(--ink); }
.g-insight__by { margin: 8px 0 0; font-size: 17px; color: var(--ink-faint); }

/* hebrew & greek root cards */
.g-roots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 22px 0; }
.g-root { position: relative; display: flex; flex-direction: column; padding: 22px; border-radius: var(--r); background: radial-gradient(130% 100% at 100% 0%, rgba(28,38,54,0.9), transparent 70%), var(--panel); border: 1px solid var(--line); text-align: left; color: var(--ink); font: inherit; cursor: pointer; transition: border-color 0.25s var(--ease), transform 0.35s var(--ease); }
.g-root:hover { border-color: var(--gold); transform: translateY(-2px); }
.g-root__word { font-size: 46px; line-height: 1.15; color: var(--gold-bright); }
.g-root__word[lang="he"] { font-family: var(--hebrew); direction: rtl; text-align: right; }
.g-root__word[lang="el"] { font-family: var(--greek); }
.g-root__tr { margin-top: 6px; font: 500 italic 24px/1.2 var(--serif); }
.g-root__gloss { margin-top: 8px; font-size: 18px; color: var(--ink-dim); line-height: 1.5; }
.g-root__strongs { margin-top: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; font: 600 17px/1 var(--sans); color: var(--gold); }
.g-root__more { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 18px; color: var(--ink-dim); line-height: 1.55; }
.g-root.is-open .g-root__more { display: block; }
.g-root__note { margin: 0 0 10px; color: var(--ink); }

/* go deeper */
.g-deeper { margin: 22px 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.g-deeper > summary { list-style: none; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 22px; cursor: pointer; font: 600 20px/1.3 var(--sans); color: var(--ink); }
.g-deeper > summary::-webkit-details-marker { display: none; }
.g-deeper > summary::before { content: ''; flex: none; width: 12px; height: 12px; border-right: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: rotate(-45deg); transition: transform 0.3s var(--ease); }
.g-deeper[open] > summary::before { transform: rotate(45deg); }
.g-deeper__tag { margin-left: auto; font: 600 17px/1 var(--sans); color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
.g-deeper__body { padding: 0 22px 18px; }

/* tables and lists */
.g-table-wrap { margin: 22px 0; overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
.g-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 18px; }
.g-table th { text-align: left; padding: 14px 16px; background: var(--panel-2); color: var(--gold-bright); font: 600 17px/1.3 var(--sans); letter-spacing: 0.04em; }
.g-table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.g-table td:first-child { color: var(--ink); font-weight: 600; }
.g-list { margin: 0 0 18px; padding-left: 26px; }
.g-li { margin: 0 0 10px; }
.g-list--n { list-style: decimal; }
.g-list li::marker { color: var(--gold); font-weight: 600; }

/* three readings, tabs */
.g-tabs { margin: 22px 0; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.g-tabs__list { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); }
.g-tabs__tab { flex: 1 0 auto; min-height: 60px; padding: 0 20px; border: 0; background: transparent; color: var(--ink-faint); font: 600 18px/1.2 var(--sans); cursor: pointer; border-bottom: 3px solid transparent; }
.g-tabs__tab[aria-selected="true"] { color: var(--gold-bright); border-bottom-color: var(--gold); }
.g-tabs__panel { padding: 24px; }
.g-tabs__panel h4 { margin: 0 0 10px; font: 600 28px/1.15 var(--serif); }
.g-tabs__panel p { margin: 0; color: var(--ink-dim); }

/* strength meter for hard texts */
.g-meter { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 8px; }
.g-meter i { width: 18px; height: 8px; border-radius: 4px; background: #3a3128; }
.g-meter[data-v="1"] i:nth-child(-n+1), .g-meter[data-v="2"] i:nth-child(-n+2), .g-meter[data-v="3"] i:nth-child(-n+3), .g-meter[data-v="4"] i:nth-child(-n+4) { background: var(--scarlet); }
.g-meter[data-good] i { background: #3a3128; }
.g-meter[data-good][data-v="4"] i { background: var(--sage); }

/* ---------------------------------------------------------------- family tree (3 x 14) */
.g-tree { margin: 26px 0; padding: 22px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.g-tree__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.g-tree__sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.g-set { padding: 14px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.g-set__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.g-set__name { font: 600 22px/1.2 var(--serif); color: var(--gold-bright); }
.g-set__count { font: 600 18px/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.g-set__count.is-off { color: var(--scarlet); }
.g-names { display: flex; flex-direction: column; gap: 6px; }
.g-name { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 12px; border-radius: 12px; border: 1px solid transparent; background: rgba(255,255,255,0.03); color: var(--ink); font: 500 18px/1.2 var(--sans); text-align: left; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.g-name:hover { border-color: var(--line-2); }
.g-name b { width: 30px; flex: none; color: var(--ink-faint); font: 600 17px/1 var(--sans); font-variant-numeric: tabular-nums; }
.g-name--hinge { background: rgba(214,175,100,0.16); border-color: var(--gold); color: var(--gold-bright); font-weight: 600; }
.g-name--woman::after { content: attr(data-woman); margin-left: auto; padding: 3px 9px; border-radius: 999px; background: rgba(201,88,75,0.18); color: #f0a49a; font: 600 17px/1.2 var(--sans); }
.g-name--ghost { display: none; border: 1px dashed rgba(201,88,75,0.6); background: transparent; color: #e7a097; text-decoration: line-through; text-decoration-color: rgba(231,160,151,0.6); }
.g-tree.show-ghosts .g-name--ghost { display: flex; }
.g-name--ghost b { color: #e7a097; }
.g-name.is-picked { outline: 2px solid var(--gold-bright); }
.g-tree__info { margin-top: 16px; min-height: 64px; padding: 16px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-dim); font-size: 18px; }
.g-tree__info strong { color: var(--gold-bright); }

/* ---------------------------------------------------------------- map */
.g-map { margin: 26px 0; padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.g-map__bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.g-map svg { width: 100%; height: auto; display: block; border-radius: 16px; background: radial-gradient(120% 120% at 30% 40%, #2a2219, #15110d); }
.g-map .land { fill: #3a2f23; stroke: rgba(236,208,143,0.25); stroke-width: 1.2; }
.g-map .sea { fill: #16202c; }
.g-map .river { fill: none; stroke: #4f6d86; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.g-map .lake { fill: #23384c; stroke: #4f6d86; stroke-width: 1.2; }
.g-map .region { font: italic 500 34px var(--serif); fill: rgba(236,208,143,0.42); letter-spacing: 0.2em; text-anchor: middle; pointer-events: none; }
.g-map .route { fill: none; stroke-width: 3.2; stroke-dasharray: 9 8; stroke-linecap: round; opacity: 0; transition: opacity 0.5s var(--ease); }
.g-map .layer.is-on .route { opacity: 1; animation: g-dash 1.6s linear infinite; }
.g-reduced .g-map .layer.is-on .route { animation: none; }
@keyframes g-dash { to { stroke-dashoffset: -34; } }
.g-map .pin { cursor: pointer; opacity: 0; transition: opacity 0.5s var(--ease); }
.g-map .layer.is-on .pin { opacity: 1; }
.g-map .pin circle { stroke: #1b1408; stroke-width: 2; }
.g-map .pin text { font: 600 31px var(--sans); fill: var(--ink); paint-order: stroke; stroke: #15110d; stroke-width: 5px; }
.g-map .pin:focus-visible circle { stroke: #fff; stroke-width: 4; }
.g-map .base-pin circle { fill: var(--ink-faint); stroke: #1b1408; stroke-width: 2; }
.g-map .base-pin text { font: 600 30px var(--sans); fill: var(--ink-dim); paint-order: stroke; stroke: #15110d; stroke-width: 5px; }
.g-map__info { margin-top: 14px; min-height: 64px; padding: 16px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 18px; color: var(--ink-dim); }
.g-map__info strong { color: var(--gold-bright); }
.g-map__note { margin: 10px 0 0; font-size: 17px; color: var(--ink-faint); }
.g-map__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
@media (max-width: 700px) { .g-map__scroll > div { min-width: var(--mw, 900px); } }
.g-controls__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- questions & self-check */
.g-q { counter-reset: q; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.g-q li { counter-increment: q; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: calc(19px * var(--scale)); }
.g-q li::before { content: counter(q); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(214,175,100,0.14); color: var(--gold-bright); font: 600 20px/1 var(--serif); }
.g-quiz { display: grid; gap: 16px; }
.g-quiz__item { padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.g-quiz__q { margin: 0 0 14px; font: 600 24px/1.3 var(--serif); }
.g-quiz__opts { display: grid; gap: 8px; }
.g-opt { min-height: 56px; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 500 19px/1.35 var(--sans); text-align: left; cursor: pointer; transition: all 0.2s var(--ease); }
.g-opt:hover:not(:disabled) { border-color: var(--gold); }
.g-opt.is-right { border-color: var(--sage); background: rgba(143,174,139,0.18); }
.g-opt.is-wrong { border-color: var(--scarlet); background: rgba(201,88,75,0.14); }
.g-opt:disabled { cursor: default; }
.g-quiz__why { display: none; margin: 14px 0 0; color: var(--ink-dim); font-size: 18px; }
.g-quiz__item.is-done .g-quiz__why { display: block; }
.g-quiz__score { font: 600 22px/1.3 var(--serif); color: var(--gold-bright); }

/* passages, next, footer */
.g-passages { display: flex; flex-wrap: wrap; gap: 8px; }
.g-passages a, .g-passages span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 500 18px/1 var(--sans); }
.g-passages a:hover { border-color: var(--gold); color: var(--gold-bright); }
.g-next { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: linear-gradient(120deg, rgba(28,38,54,0.9), rgba(26,21,17,0.9)), var(--panel); border: 1px solid var(--line-2); }
@media (max-width: 640px) { .g-next { grid-template-columns: 1fr; } }
.g-next h3 { margin: 4px 0 6px; font: 600 36px/1.1 var(--serif); }
.g-next p { margin: 0; color: var(--ink-dim); }
.g-foot { margin-top: 80px; padding: 40px 0 60px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 17px; }
.g-foot p { margin: 0 0 10px; }
.g-foot a { color: var(--ink-dim); }
.g-toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; transform: translate(-50%, 30px); opacity: 0; padding: 14px 22px; border-radius: 999px; background: var(--gold-bright); color: #1b1408; font: 600 18px/1 var(--sans); transition: all 0.35s var(--ease); pointer-events: none; }
.g-toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* hiding by reader settings */
html[data-hide-roots] .g-roots, html[data-hide-roots] .g-root-only { display: none; }
html[data-hide-maps] .g-map, html[data-hide-maps] .g-tree { display: none; }
html[data-hide-art] .g-figure { display: none; }
html[data-hide-times] .g-time, html[data-hide-times] #follow { display: none; }

/* motion: reveal on scroll */
.g-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.g-reveal.is-in { opacity: 1; transform: none; }
.g-reduced .g-reveal { opacity: 1; transform: none; transition: none; }
.g-reduced .g-hero__art img { animation: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .g-reveal { opacity: 1; transform: none; transition: none; } .g-hero__art img { animation: none; transform: none; } .g-map .route { animation: none !important; } }

/* ---------------------------------------------------------------- print: light, every panel open */
@media print {
  @page { size: letter; margin: 0.6in 0.65in; }
  :root { --ink: #1d1712; --ink-dim: #3b3128; --ink-faint: #5c5043; --gold: #7a5a1f; --gold-bright: #6a4c17; --gold-deep: #8a6a2c; --line: #d9ccb4; --line-2: #c4b393; --panel: #fbf7ee; --panel-2: #f3ead8; --bg-2: #fbf7ee; --scale: 1; }
  :root { color-scheme: light; }
  html, body { background: #fff; color: var(--ink); font-size: 13pt; line-height: 1.55; }
  .g-p strong, .g-li strong, .g-thesis__a strong, .g-glance__t strong, .g-table td strong { color: var(--ink); }
  .g-p em, .g-thesis__q { color: var(--ink); }
  .g-bar, .g-controls, .g-sheet, .g-scrim, .g-toast, .g-hero__cta, .g-fold, .g-linkbtn, .g-map__bar, .g-tree__bar .g-btn, .g-quiz, .g-noprint, .g-seer, .g-time { display: none !important; }
  .g-hero { min-height: 0; display: block; }
  .g-hero::before { display: none; }
  .g-hero__art { position: static; }
  .g-hero__art img { animation: none; transform: none; height: 3.4in; border-radius: 10px; }
  .g-hero__body { padding: 18pt 0 6pt; }
  .g-hero h1 { font-size: 46pt; color: var(--ink); }
  .g-hero__sub { font-size: 24pt; color: var(--gold); }
  .g-reveal { opacity: 1 !important; transform: none !important; }
  .g-sec[hidden], .g-sec.is-folded .g-sec__body { display: block !important; }
  .g-sec { break-before: auto; }
  .g-sec__head, .g-verse, .g-insight, .g-root, .g-quiz__item, .g-q li, .g-figure { break-inside: avoid; }
  .g-figure { margin: 12pt 0; perspective: none; break-inside: avoid; }
  .g-frame { transform: none !important; border-radius: 16pt; box-shadow: 0 0 0 1px rgba(90, 70, 30, 0.25), 0 6pt 14pt -6pt rgba(40, 28, 10, 0.45) !important; }
  .g-figure img { height: 2.5in; aspect-ratio: auto; }
  .g-frame__light { --mx: 22%; --my: 18%; --sheen: 0%; }
  .g-verse { background: #fbf7ee; border-color: var(--line); }
  .g-verse__text { color: #1d1712; font-size: 15pt; }
  .g-verse mark { color: #6a4c17; background-size: 100% 1.5px !important; }
  .g-thesis, .g-glance__card, .g-insight, .g-root, .g-deeper, .g-tree, .g-map, .g-next, .g-tabs, .g-q li { background: #fbf7ee !important; box-shadow: none; }
  .g-root { display: block; } .g-root__more { display: block; } .g-root__dict { display: none; } .g-root__strongs span:last-child { display: none; }
  .g-deeper > summary::before { display: none; }
  .g-tabs__list { display: none; } .g-tabs__panel[hidden] { display: block !important; } .g-tabs__panel { border-top: 1px solid var(--line); }
  .g-name--ghost { display: flex; } .g-name { min-height: 0; padding: 2pt 6pt; font-size: 13pt; }
  .g-map svg { background: #f3ead8; } .g-map .land { fill: #e8dcc4; stroke: #b9a684; } .g-map .sea { fill: #dfe6ea; } .g-map .lake { fill: #c9d6de; } .g-map .route, .g-map .pin { opacity: 1 !important; animation: none !important; }
  .g-map .pin text, .g-map .base-pin text { fill: #1d1712; stroke: #f3ead8; } .g-map .region { fill: rgba(106,76,23,0.5); }
  .g-insight__who { background: #efe4cc; }
  a { color: var(--ink); text-decoration: none; }
  .g-foot { margin-top: 20pt; }
  .g-print-only { display: block !important; }
}
.g-print-only { display: none; }

/* ---------------------------------------------------------------- print: page flow (no split cards, no stranded headings) */
@media print {
  .g-section-gap { height: 16pt !important; }
  p, li { orphans: 3; widows: 3; }
  .g-sec__head, .g-h2, .g-h3, .g-eyebrow, .g-lede, .g-tree__bar, .g-deeper > summary, .g-tabs__panel h4 { break-after: avoid; page-break-after: avoid; }
  .g-glance { display: block; } .g-glance__card { margin: 0 0 8pt; padding: 10pt 14pt; display: grid; grid-template-columns: 26pt 1fr; gap: 8pt; align-items: baseline; } .g-glance__t { margin: 0; }
  .g-glance__card, .g-verse, .g-insight, .g-root, .g-thesis, .g-map, .g-set, .g-tree__info, .g-next, .g-quiz__item, .g-q li, .g-tabs__panel, .g-table tr, .g-tl { break-inside: avoid; page-break-inside: avoid; }
  .g-verse--long { break-inside: auto; page-break-inside: auto; }
  .g-roots { grid-template-columns: 1fr 1fr; }
  .g-timeline--collapsed .g-tl:nth-child(n+9) { display: grid !important; }
  .g-tl { padding: 4pt 8pt; }
  .g-tree { break-inside: auto; }
  .g-map svg { max-height: 6.2in; }
  .g-sec__n { font-size: 40pt; }
}
