/* ==========================================================================
   The Spirit and Soul theme
   Dark ("Default") is the site's standard look; "Light" is chosen by the visitor
   and stored per browser. Both palettes are defined below.
   Content classes used inside papers (keep these when moving to WordPress):
   .scripture .note .lead .subtitle .ref-line .q .a .qa-tag .callout .label .points .paper-figure .video-embed
   ========================================================================== */

/* @wp-start */
:root {
  /* light palette (parchment) */
  --bg: #f8f4ec;
  --bg-soft: #efe8da;
  --surface: #fffdf8;
  --ink: #1b2230;
  --ink-soft: #465063;
  --muted: #6c7484;
  --line: #e2d9c7;
  --brand: #1d4b5c;
  --brand-2: #2a6577;
  --accent: #b07a2a;
  --accent-soft: #f4e6c8;
  --gold: #c99a3c;
  --teal: #2f7d7d;
  --scripture-bg: #fbf5e7;
  --scripture-line: #c99a3c;
  --note-bg: #e9f2f1;
  --note-line: #2f7d7d;
  --q-bg: #eef0f8;
  --q-line: #5866a8;
  --mark: rgba(201, 154, 60, .26);
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 8px 24px rgba(20, 24, 40, .07);
  --shadow-lg: 0 2px 6px rgba(20, 24, 40, .08), 0 20px 50px rgba(20, 24, 40, .14);
  --radius: 14px;
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-read: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --read-size: 1.1875rem;
  --header-h: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* default palette (night sky) */
  --bg: #0b1220; --bg-soft: #101a2b; --surface: #142236; --ink: #e9e5da; --ink-soft: #c2c4c4;
  --muted: #8e9aa8; --line: #22344a; --brand: #9fd3d3; --brand-2: #b7e0e0; --accent: #e6be72;
  --accent-soft: #33291a; --gold: #e6be72; --teal: #7cc4c4; --scripture-bg: #13233a; --scripture-line: #d9b46a;
  --note-bg: #102a33; --note-line: #6fb8b8; --q-bg: #171f3a; --q-line: #8f9be0;
  --mark: rgba(230, 190, 114, .26); color-scheme: dark;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.3);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 20px 50px rgba(0,0,0,.45);
}
/* @wp-end */

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--font-ui); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.2rem/1 var(--font-display); letter-spacing: .01em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand span b { color: var(--accent); font-weight: 600; }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--bg-soft); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
}
.menu-toggle { display: none; }
@media (max-width: 820px) {
  .menu-toggle { display: inline-grid; margin-left: auto; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; gap: 2px;
    box-shadow: var(--shadow); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
}
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .1s linear; }

/* ---------------------------------------------------------------- hero (home) */
.hero {
  position: relative; isolation: isolate; color: #fff8ec; overflow: hidden;
  background: #070b16 url("../img/hero.svg") center bottom / cover no-repeat;
  padding-block: clamp(72px, 12vw, 150px) clamp(110px, 16vw, 200px);
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 30%, rgba(11,23,48,.15), rgba(11,23,48,.55)); }
.hero .wrap { max-width: 900px; text-align: center; }
.eyebrow { display: inline-block; font: 600 .78rem/1 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.hero h1 { font: 500 clamp(2.3rem, 5.6vw, 4.2rem)/1.06 var(--font-display); margin: 0 0 22px; letter-spacing: -.01em; text-wrap: balance; }
.hero h1 em { font-style: italic; color: #ffd99a; }
.hero p.sub { font: 400 clamp(1.05rem, 1.8vw, 1.25rem)/1.6 var(--font-read); color: #f1e6d6; max-width: 660px; margin: 0 auto 30px; text-wrap: pretty; }
.hero-verse { margin: 34px auto 0; max-width: 620px; font: italic 400 1rem/1.6 var(--font-read); color: #f5dfbf; opacity: .92; }
.hero-verse cite { display: block; font: 600 .76rem/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 10px; font-style: normal; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 .95rem/1 var(--font-ui); padding: 13px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, #f3d38f, #d9a94f); color: #1d1607; box-shadow: 0 8px 24px rgba(217,169,79,.3); }
.btn-primary:hover { color: #1d1607; box-shadow: 0 10px 30px rgba(217,169,79,.45); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff8ec; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.btn-soft:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: .86rem; }

/* ---------------------------------------------------------------- sections & cards */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head h2 { font: 500 clamp(1.7rem, 3vw, 2.3rem)/1.15 var(--font-display); margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 560px; }
.lift { margin-top: clamp(-120px, -9vw, -70px); position: relative; z-index: 2; padding-top: 0; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card .badge-icon {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: #fff3df;
  background: linear-gradient(140deg, var(--brand) 0%, #6a4a7a 60%, var(--accent) 100%);
}
.card .badge-icon svg { width: 30px; height: 30px; }
.card h3 { font: 600 1.22rem/1.25 var(--font-display); margin: 4px 0 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.card .meta { margin-top: auto; padding-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 22px; align-items: start; padding: 30px; }
.card.featured > :not(.badge-icon) { grid-column: 2; }
.card.featured .badge-icon { grid-row: 1 / span 4; width: 64px; height: 64px; }
.card.featured h3 { font-size: 1.55rem; }
.tag { display: inline-block; font: 600 .7rem/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 640px) {
  .card.featured { display: flex; padding: 24px; }
}

.split { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.panel h3 { font: 600 1.15rem/1.3 var(--font-display); margin: 0 0 6px; }
.panel p { color: var(--ink-soft); margin: 0 0 16px; }
.band {
  background: linear-gradient(120deg, #13224a 0%, #3b2f5c 55%, #a8623a 120%); color: #fbeedd;
  border-radius: 22px; padding: clamp(28px, 5vw, 48px); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.band h2 { font: 500 clamp(1.5rem, 3vw, 2rem)/1.2 var(--font-display); margin: 0 0 6px; color: #fff6e6; }
.band p { margin: 0; color: #e9d9c5; max-width: 560px; }

/* ---------------------------------------------------------------- page header (inner pages) */
.page-hero {
  position: relative; overflow: hidden; color: #fff6e8; isolation: isolate;
  background: linear-gradient(160deg, #070d1a 0%, #0f2238 45%, #1f4a5c 80%, #b08a4a 125%);
  padding-block: clamp(44px, 7vw, 76px) clamp(40px, 6vw, 64px);
}
.page-hero::before {
  content: ""; position: absolute; z-index: -1; right: -10%; bottom: -60%; width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,214,150,.45), rgba(255,214,150,0) 62%);
}
.page-hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0; opacity: .5;
  background: repeating-conic-gradient(from 200deg at 85% 120%, rgba(255,240,210,.09) 0 4deg, transparent 4deg 13deg);
  mask-image: linear-gradient(to left, #000 20%, transparent 80%); -webkit-mask-image: linear-gradient(to left, #000 20%, transparent 80%);
}
.crumbs { font-size: .85rem; color: #d8cbe0; margin-bottom: 14px; }
.crumbs a { color: #f3dfbf; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: #fff; }
.page-hero h1 { font: 500 clamp(1.9rem, 4.4vw, 3.1rem)/1.12 var(--font-display); margin: 0; max-width: 900px; text-wrap: balance; }
.page-hero .summary { font: 400 1.1rem/1.6 var(--font-read); color: #eadfd2; max-width: 720px; margin: 16px 0 0; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; font-size: .88rem; color: #e1d3c5; }
.paper-meta span { display: inline-flex; gap: 6px; align-items: center; }
.paper-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* "Default | Light" colour-scheme switch */
.scheme-switch { display: inline-flex; border-radius: 999px; padding: 3px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); }
.scheme-switch button {
  border: 0; background: transparent; color: #f3e6d4; font: 600 .86rem/1 var(--font-ui);
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
}
.scheme-switch button[aria-pressed="true"] { background: #fff6e6; color: #1d2f5e; }
.version-bar .scheme-switch { background: var(--bg-soft); border: 0; }
.version-bar .scheme-switch button { color: var(--ink-soft); padding: 8px 14px; letter-spacing: .04em; text-transform: none; }
.version-bar .scheme-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.version-bar .bar-sep { margin-left: 6px; }
.paper-actions { align-items: center; }

/* Light scheme: soft parchment header band instead of the night-sky one */
:root[data-theme="light"] .page-hero { background: linear-gradient(160deg, #fbf8f1 0%, #eef3ef 55%, #ecdcbc 100%); color: var(--ink); }
:root[data-theme="light"] .page-hero::before { background: radial-gradient(circle, rgba(242,192,108,.45), rgba(242,192,108,0) 62%); }
:root[data-theme="light"] .page-hero::after { background: repeating-conic-gradient(from 200deg at 85% 120%, rgba(194,122,61,.08) 0 4deg, transparent 4deg 13deg); }
:root[data-theme="light"] .page-hero .summary, :root[data-theme="light"] .paper-meta { color: var(--ink-soft); }
:root[data-theme="light"] .crumbs, :root[data-theme="light"] .crumbs a { color: var(--accent); }
:root[data-theme="light"] .page-hero .btn-ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.6); }
:root[data-theme="light"] .page-hero .scheme-switch { background: rgba(255,255,255,.6); border-color: var(--line); }
:root[data-theme="light"] .page-hero .scheme-switch button { color: var(--ink-soft); }
:root[data-theme="light"] .page-hero .scheme-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; }

/* ---------------------------------------------------------------- reader layout */
.reader { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); padding-block: 44px 80px; }
.reader.no-toc { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; padding-right: 6px; font-size: .88rem; }
.toc h2 { font: 600 .74rem/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-soft); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-tools { display: flex; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.toc-tools button { flex: 1; font: 600 .8rem/1 var(--font-ui); padding: 9px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.toc-tools button:hover { border-color: var(--accent); color: var(--accent); }
.toc-fab { display: none; }
@media (max-width: 980px) {
  .reader { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: fixed; inset: auto 12px 12px 12px; top: auto; max-height: 70vh; z-index: 55; background: var(--surface);
    border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 14px; box-shadow: var(--shadow-lg);
    transform: translateY(120%); transition: transform .25s ease; visibility: hidden;
  }
  .toc.open { transform: none; visibility: visible; }
  .toc-fab {
    display: inline-flex; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 56; align-items: center; gap: 8px;
    padding: 12px 16px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; font: 600 .9rem/1 var(--font-ui); box-shadow: var(--shadow-lg); cursor: pointer;
  }
  :root[data-theme="dark"] .toc-fab { color: #0f1422; }
}

/* ---------------------------------------------------------------- prose */
/* @wp-start */
.prose { font: 400 var(--read-size)/1.75 var(--font-read); color: var(--ink); max-width: 72ch; text-wrap: pretty; }
.prose.wide { max-width: 80ch; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2 {
  font: 500 1.75em/1.2 var(--font-display); margin: 2.2em 0 .7em; letter-spacing: -.005em; text-wrap: balance;
  padding-top: .9em; border-top: 1px solid var(--line);
}
.prose h2::before { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--accent)); margin: -.95em 0 .9em; transform: translateY(-1px); }
.prose h3 { font: 600 1.2em/1.3 var(--font-display); margin: 1.8em 0 .6em; color: var(--brand); }
.prose h2 + h3 { margin-top: .4em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); font-weight: 600; }
.prose u { text-decoration: none; background: linear-gradient(transparent 58%, var(--mark) 58%); border-radius: 2px; }
.prose strong { font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose figure { margin: 1.6em 0; }
.prose img { border-radius: 10px; background: #fff; padding: 10px; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9em; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.wp-block-table { overflow-x: auto; }
.prose .lead { font-size: 1.16em; color: var(--ink-soft); line-height: 1.65; }
.prose .subtitle { font: italic 500 1.1em/1.4 var(--font-display); color: var(--muted); margin: -.3em 0 1.2em; }
.prose .signature { font-style: italic; color: var(--ink-soft); margin-top: 1.8em; }

/* scripture */
.prose .scripture, .prose blockquote {
  margin: 1.4em 0 1.6em; padding: 1.1em 1.3em 1.1em 1.4em; background: var(--scripture-bg);
  border-left: 3px solid var(--scripture-line); border-radius: 4px 14px 14px 4px; font-size: .95em; line-height: 1.7;
  position: relative;
}
.prose .scripture p { margin: 0 0 .7em; }
.prose .scripture p:last-child { margin-bottom: 0; }
.prose .scripture cite {
  display: inline-block; font: 650 .74em/1.2 var(--font-ui); font-style: normal; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 8px; border-radius: 6px; margin-right: 6px; vertical-align: .12em;
}
.prose sup { font: 700 .62em/1 var(--font-ui); color: var(--accent); vertical-align: .55em; margin-right: 1px; }
.prose .ref-line { font: 600 .82em/1.3 var(--font-ui); letter-spacing: .04em; color: var(--brand); display: inline-flex; gap: 8px; align-items: center; background: var(--note-bg); padding: 7px 12px; border-radius: 999px; margin: .4em 0 .2em; }
.prose .ref-line::before { content: "📖"; font-size: 1.05em; }
.prose p.ref-line + .scripture { margin-top: .7em; }

/* author commentary */
.prose .note {
  background: var(--note-bg); border-left: 3px solid var(--note-line); border-radius: 4px 12px 12px 4px;
  padding: .85em 1.15em; font-size: .97em; color: var(--ink-soft);
}

/* fill-in blanks (inputs once enhanced by site.js) */
.prose .blank { letter-spacing: -.05em; color: var(--muted); }
.prose input.blank-input {
  font: 500 .9em/1.3 var(--font-ui); color: var(--brand); background: transparent;
  border: 0; border-bottom: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); padding: 2px 4px; margin: 0 2px;
  min-width: 9ch; width: 14ch; max-width: 100%; border-radius: 4px 4px 0 0; transition: background .15s, border-color .15s;
}
.prose input.blank-input:focus { outline: none; background: var(--accent-soft); border-bottom-style: solid; border-color: var(--accent); }
.prose input.blank-input.filled { border-bottom-style: solid; }

/* ---------------------------------------------------------------- timeline */
.timeline {
  margin: 1.8em 0 2em; padding: 18px 18px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); font-family: var(--font-ui); overflow-x: auto;
}
.timeline-track { position: relative; min-width: 620px; }
.timeline .timeline-eras {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative;
  min-width: 620px; cursor: crosshair;
}
.timeline .timeline-eras li {
  margin: 0; padding: 12px 10px 12px; font-size: .78rem; line-height: 1.35; color: var(--muted);
  border-top: 6px solid; position: relative;
}
.timeline .timeline-eras li strong { display: block; font-size: .88rem; font-weight: 650; color: var(--ink); margin-bottom: 3px; }
.timeline .timeline-eras li:nth-child(1) { border-color: #8aa0d6; }
.timeline .timeline-eras li:nth-child(2) { border-color: #c96f4a; background: linear-gradient(180deg, rgba(201,111,74,.10), transparent 70%); }
.timeline .timeline-eras li:nth-child(3) { border-color: #d9a441; background: linear-gradient(180deg, rgba(217,164,65,.10), transparent 70%); }
.timeline .timeline-eras li:nth-child(4) { border-color: #6a4a7a; }
.timeline .timeline-eras li + li::before { content: ""; position: absolute; left: -1px; top: -12px; height: 18px; border-left: 2px solid var(--ink-soft); }
.timeline figcaption { font-size: .78rem; color: var(--muted); margin-top: 10px; }
.timeline-marks { list-style: none; margin: 0; padding: 0; position: relative; min-width: 620px; height: 0; }
.timeline-marks li, .tl-mark {
  position: absolute; bottom: 0; left: var(--pos); transform: translateX(-50%); margin: 0;
  font: 600 .72rem/1.35 var(--font-ui); color: var(--brand); text-align: center; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--brand-2); border-radius: 8px; padding: 4px 8px; box-shadow: var(--shadow);
}
.timeline-marks li::after, .tl-mark::after {
  content: ""; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--brand-2);
}
.timeline.has-marks .timeline-marks { margin-bottom: 14px; }
/* JS-managed marks */
.tl-layer { position: relative; min-width: 620px; display: flex; flex-direction: column-reverse; }
.tl-row { position: relative; height: 30px; }
.tl-mark { cursor: default; display: inline-flex; gap: 6px; align-items: center; }
.tl-mark.answer { border-color: var(--accent); color: var(--accent); }
.tl-mark.answer::after { border-top-color: var(--accent); }
.tl-mark button { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0 0 0 2px; line-height: 1; }
.tl-mark button:hover { color: var(--accent); }
.tl-mark input { font: 600 .72rem/1.2 var(--font-ui); border: 0; outline: none; background: transparent; color: var(--ink); width: 13ch; }
.tl-hint { font-size: .74rem; color: var(--muted); }
.timeline-static .timeline-marks { height: auto; display: flex; }
.timeline-static .timeline-eras { min-width: 0; }
.timeline-static .timeline-eras li { padding: 10px 6px; font-size: .7rem; }
.timeline-static .timeline-eras li strong { font-size: .78rem; }

/* ---------------------------------------------------------------- study page */
.prose ol.questions { padding-left: 1.6em; }
.prose ol.questions > li { margin: 0 0 1.1em; padding-left: .2em; }
.answer { margin: .55em 0 0; }
.answer > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; user-select: none;
  font: 600 .8rem/1 var(--font-ui); color: var(--brand-2); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.answer > summary::-webkit-details-marker { display: none; }
.answer > summary::before { content: "+"; font-weight: 700; width: 1em; text-align: center; color: var(--accent); }
.answer[open] > summary::before { content: "−"; }
.answer > summary:hover { border-color: var(--accent); }
.answer[open] > :not(summary) { animation: reveal .25s ease; }
.answer > p, .answer > ol, .answer > figure { margin: .7em 0 0; }
.answer > p:first-of-type { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: .6em .9em; font-weight: 500; display: inline-block; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tl-btn {
  display: inline-flex; align-items: center; gap: 6px; margin: .55em 0 0; cursor: pointer;
  font: 600 .8rem/1 var(--font-ui); color: var(--accent); padding: 7px 12px; border-radius: 999px; border: 1px dashed var(--accent); background: transparent;
}
.tl-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-style: solid; }
.study-timeline-dock { z-index: 20; }
@media (min-width: 981px) and (min-height: 700px) {
  .study-timeline-dock { position: sticky; top: calc(var(--header-h) + 8px); }
}
.study-timeline-dock .timeline { margin: 0 0 1.5em; }

.prose .ref-line a { color: inherit; text-decoration: none; }
.prose .ref-line a::after { content: " ↗"; color: var(--accent); }
.prose .ref-line:has(a):hover { background: var(--accent-soft); }

/* contact / memorial page */
.prose .memorial-photo { margin: 0 0 1.4em; max-width: 360px; }
.prose .memorial-photo img { display: block; width: 100%; height: auto; padding: 8px; border-radius: 16px; box-shadow: var(--shadow); }
.prose .memorial-photo figcaption { font: 500 .8rem/1.4 var(--font-ui); color: var(--muted); margin-top: 8px; text-align: center; }
@media (min-width: 700px) { .prose .memorial-photo { float: right; margin: .2em 0 1em 1.6em; width: 42%; } }
.prose h2 { clear: both; }
.prose .video-embed { margin: 1.2em 0 1em; }
.prose .video-embed .video-facade, .prose .video-embed iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; overflow: hidden;
  background: #000; box-shadow: var(--shadow);
}
.prose .video-facade img { width: 100%; height: 100%; object-fit: cover; padding: 0; border: 0; border-radius: 0; background: #000; transition: transform .3s, opacity .3s; opacity: .9; }
.prose .video-facade:hover img { transform: scale(1.02); opacity: 1; }
.prose .video-facade .play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%);
  border-radius: 16px; background: rgba(15, 20, 34, .82); box-shadow: 0 6px 24px rgba(0,0,0,.4); transition: background .2s;
}
.prose .video-facade .play::after { content: ""; position: absolute; left: 31px; top: 15px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.prose .video-facade:hover .play { background: #d9923f; }
.prose .video-embed figcaption { font: 500 .8rem/1.4 var(--font-ui); color: var(--muted); margin-top: 8px; }

/* scripture readings page */
.version-bar {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 1.4em; padding: 10px 12px 10px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow); font: 600 .78rem/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  width: fit-content; max-width: 100%;
}
.version-switch { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 3px; }
.version-switch button {
  border: 0; background: transparent; color: var(--ink-soft); font: 650 .86rem/1 var(--font-ui); letter-spacing: .04em;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.version-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
:root[data-theme="dark"] .version-switch button[aria-pressed="true"] { color: #0f1422; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .version-switch button[aria-pressed="true"] { color: #0f1422; } }
.readings .ver { display: none; }
.readings[data-ver="kjv"] .ver-kjv, .readings[data-ver="nkjv"] .ver-nkjv, .readings[data-ver="esv"] .ver-esv { display: block; }
.prose .reading-back { font: 600 .82rem/1 var(--font-ui); margin: -.2em 0 1.2em; }
.prose .reading-back a { text-decoration: none; }
.prose .passage {
  margin: 0 0 1.4em; padding: 1.1em 1.3em 1.2em 1.4em; background: var(--scripture-bg);
  border-left: 3px solid var(--scripture-line); border-radius: 4px 14px 14px 4px;
}
.prose .passage h3 { margin: 0 0 .5em; font: 650 .8rem/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.prose .passage p { margin: 0; line-height: 1.8; }
.prose .passage sup { margin: 0 2px 0 6px; }
.prose .passage sup:first-child { margin-left: 0; }
.prose .ver-link a { font-weight: 600; }
.prose .ver-source { font: 600 .75rem/1 var(--font-ui); color: var(--muted); margin-top: .6em; }
.prose .ver-notices { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: .8em; color: var(--muted); }
/* @wp-end */

/* ---------------------------------------------------------------- downloads */
.dl-list { display: grid; gap: 14px; }
.dl-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.dl-item .badge-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff3df; background: linear-gradient(140deg, var(--brand), #6a4a7a 60%, var(--accent)); }
.dl-item .badge-icon svg { width: 26px; height: 26px; }
.dl-item h3 { font: 600 1.08rem/1.3 var(--font-display); margin: 0 0 4px; }
.dl-item h3 a { color: var(--ink); text-decoration: none; }
.dl-item p { margin: 0; color: var(--muted); font-size: .9rem; }
.dl-item .extra { margin-top: 8px; font-size: .86rem; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.filetype { display: inline-block; font: 700 .64rem/1 var(--font-ui); letter-spacing: .08em; padding: 4px 6px; border-radius: 5px; color: #fff; background: var(--brand-2); vertical-align: .1em; }
.filetype.pdf { background: #b5473a; } .filetype.docx { background: #2f5ea8; } .filetype.pptx { background: #c4622d; }
.filetype.odt { background: #2a7f6f; } .filetype.zip { background: #6b5a8a; }
.dl-group { margin-top: 48px; }
.dl-group h2 { font: 500 1.5rem/1.2 var(--font-display); margin: 0 0 6px; }
.dl-group > p { color: var(--muted); margin: 0 0 18px; }
.file-rows { display: grid; gap: 10px; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.file-row:hover { border-color: var(--accent); color: var(--ink); transform: translateX(2px); }
.file-row .grow { flex: 1; min-width: 0; }
.file-row strong { display: block; font-weight: 600; }
.file-row small { color: var(--muted); }
.file-row .size { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.help-box { margin-top: 48px; }
@media (max-width: 700px) {
  .dl-item { grid-template-columns: auto 1fr; }
  .dl-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-block: 44px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-end; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin: 6px 0 0; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } .site-footer nav { justify-content: flex-start; } }

.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
@media (max-width: 980px) { .has-toc .to-top { bottom: 76px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------------------------------------------------------------- print / PDF */
@media print {
  @page { margin: 18mm 18mm 20mm; }
  :root { --read-size: 11.5pt; }
  body { background: #fff; color: #111; }
  .site-header, .site-footer, .toc, .toc-fab, .to-top, .progress, .paper-actions, .tl-btn, .answer > summary, .no-print, .tl-hint { display: none !important; }
  .page-hero { background: none !important; color: #111; padding: 0 0 14pt; border-bottom: 1.5pt solid #c27a3d; }
  .page-hero::before, .page-hero::after { display: none; }
  .page-hero h1 { font-size: 22pt; color: #111; }
  .page-hero .summary, .paper-meta, .crumbs { color: #444; }
  .crumbs { display: none; }
  .reader { display: block; padding: 14pt 0 0; }
  .wrap { max-width: none; padding: 0; }
  .prose { max-width: none; color: #111; }
  .prose h2 { break-after: avoid; border-top: 0; padding-top: 0; }
  .prose h2::before { display: none; }
  .prose h3 { break-after: avoid; color: #1d2f5e; }
  .prose .scripture, .prose .note, .timeline { break-inside: avoid; box-shadow: none; }
  .prose .scripture { background: #faf4e8; }
  .prose .note { background: #f0f2f8; }
  .timeline { border-color: #ccc; overflow: visible; }
  .timeline .timeline-eras, .timeline-track, .tl-layer, .timeline-marks { min-width: 0; }
  .answer { display: block; }
  .answer > :not(summary) { display: block !important; }
  a { color: inherit; text-decoration: none; }
  .prose .blank { color: #555; }
}

/* ================================================================ Spirit and Soul additions */
.brand span b { color: var(--accent); font-weight: 600; }
.brand { font-size: 1.35rem; }
.hero h1 em { color: #f3d896; }
.eyebrow { color: #e6be72; }

/* home: summary + section cards + theme switch */
.home-summary { max-width: 760px; margin: 0 auto; text-align: center; }
.home-summary p { font: 400 clamp(1.08rem, 1.7vw, 1.25rem)/1.75 var(--font-read); color: var(--ink-soft); margin: 0; }
.theme-panel { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; font: 600 .78rem/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.theme-panel .scheme-switch { background: var(--bg-soft); border-color: var(--line); }
.theme-panel .scheme-switch button { color: var(--ink-soft); letter-spacing: .02em; text-transform: none; }
.theme-panel .scheme-switch button[aria-pressed="true"] { background: var(--brand); color: var(--bg); }
.section-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.section-card { padding: 28px; }
.section-card .tag { color: var(--teal); }
.section-card h3 { font-size: 1.7rem; }
.badge-icon, .card .badge-icon, .dl-item .badge-icon {
  background: linear-gradient(150deg, #0f2238 0%, #1f4a5c 60%, #b08a4a 130%) !important; color: #f3e4bf !important;
}

/* section page: summary box above the paper */
.section-summary {
  margin: 0 0 2.2em; padding: 22px 24px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.section-summary::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--teal), var(--gold)); }
.section-summary h2 { font: 600 .78rem/1 var(--font-ui) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--teal) !important;
  margin: 0 0 10px !important; padding: 0 !important; border: 0 !important; }
.section-summary h2::before { display: none !important; }
.section-summary p { margin: 0; font-size: 1.02em; line-height: 1.7; color: var(--ink); }
.section-summary .paper-dl { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.series { font: 600 .82rem/1.3 var(--font-ui); letter-spacing: .06em; color: #c9e6e6; margin: 0 0 10px; text-transform: uppercase; }
:root[data-theme="light"] .series { color: var(--teal); }

/* paper content */
.prose h2, .prose h3 { font-family: var(--font-display); }
.prose h2 { font-weight: 600; font-size: 1.95em; }
.prose h3 { font-weight: 700; font-size: 1.35em; color: var(--brand); }
.prose .q, .prose .a {
  padding: .75em 1em .75em 1em; border-radius: 12px; margin: .9em 0; display: flex; gap: .7em; align-items: baseline;
}
.prose .q { background: var(--q-bg); border-left: 3px solid var(--q-line); }
.prose .a { background: var(--note-bg); border-left: 3px solid var(--note-line); }
.prose .qa-tag {
  flex: none; display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
  font: 700 .72em/1 var(--font-ui); color: var(--bg); background: var(--q-line); transform: translateY(-.1em);
}
.prose .a .qa-tag { background: var(--note-line); }
.prose .callout { padding: 1em 1.2em; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.prose .callout-tag { display: block; font: 700 .72em/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .55em; }
.prose .callout.warning { border-color: color-mix(in srgb, #d9734f 55%, var(--line)); }
.prose .callout.warning .callout-tag { color: #d9734f; }
.prose .callout.hypothesis, .prose .callout.conclusion, .prose .callout.summary { border-left: 4px solid var(--gold); }
.prose .label { font: 700 .78em/1.2 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin: 1.8em 0 .5em; }
.prose ul.points { list-style: none; padding-left: 0; }
.prose ul.points li { padding-left: 1.1em; position: relative; }
.prose ul.points li::before { content: ""; position: absolute; left: 0; top: .72em; width: .42em; height: .42em; border-radius: 50%; background: var(--gold); }
.prose .paper-figure { margin: 1.6em 0; }
.prose .paper-figure img { display: block; margin: 0 auto; max-height: 720px; width: auto; }
.prose .scripture cite { background: var(--accent-soft); color: var(--accent); }
.prose .scripture p:first-child:has(> cite:only-child) { margin-bottom: .5em; }
.prose :is(p, li) a { word-break: break-word; }

/* video embeds (click to play) */
.prose .video-embed { margin: 1.2em 0 1em; }
.prose .video-embed .video-facade, .prose .video-embed iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; overflow: hidden; background: #000; box-shadow: var(--shadow);
}
.prose .video-facade img { width: 100%; height: 100%; object-fit: cover; padding: 0; border: 0; border-radius: 0; background: #000; opacity: .88; transition: opacity .3s, transform .3s; }
.prose .video-facade:hover img { opacity: 1; transform: scale(1.02); }
.prose .video-facade .play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); border-radius: 16px; background: rgba(7, 11, 22, .82); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.prose .video-facade .play::after { content: ""; position: absolute; left: 31px; top: 15px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.prose .video-facade:hover .play { background: #c99a3c; }
.prose .video-embed figcaption { font: 500 .8rem/1.4 var(--font-ui); color: var(--muted); margin-top: 8px; }

@media print {
  .section-summary { box-shadow: none; }
  .prose .q, .prose .a, .prose .callout { break-inside: avoid; box-shadow: none; }
  .video-embed .play { display: none; }
}
/* light theme: daytime banner */
:root[data-theme="light"] .hero { background-color: #dcebee; background-image: url("../img/hero-light.svg"); color: var(--ink); }
:root[data-theme="light"] .hero::after { background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.1), rgba(255,255,255,.35)); }
:root[data-theme="light"] .hero h1 { color: #14303b; }
:root[data-theme="light"] .hero h1 em { color: #a87422; }
:root[data-theme="light"] .hero p.sub { color: #2e4650; }
:root[data-theme="light"] .hero .eyebrow { color: #9a6a1f; }
:root[data-theme="light"] .hero-verse { color: #3b4f57; }
:root[data-theme="light"] .hero-verse cite { color: #9a6a1f; }
:root[data-theme="light"] .hero .btn-ghost { color: #14303b; border-color: rgba(20,48,59,.3); background: rgba(255,255,255,.5); }
