/* =====================================================================
   GATHERING OF FRAGMENTS OF TRUTH BROADCAST: site styles

   1.  Colours, fonts and spacing (change the site's look here)
   2.  Base
   3.  Buttons and small parts
   4.  Header and navigation
   5.  Section layout and torn-edge dividers
   6.  Home page
   7.  Cards
   8.  Inner page banners
   9.  Library pages
   10. Reading page
   11. About and Contact
   12. Search pop-up
   13. Footer
   14. Motion and accessibility
   ===================================================================== */

/* ---------- 1. Colours, fonts and spacing ---------- */
:root {
  --ink: #050e24;
  --navy-900: #081a3d;
  --navy-800: #0d2656;
  --royal-700: #143a82;
  --royal-600: #1c4fa8;
  --royal-500: #2f6bd1;
  --sky-300: #9cc0f2;
  --mist-200: #c6d7f1;
  --mist-100: #e3ecfa;
  --white: #fff;
  --gold: #d9b566;
  --gold-bright: #efd592;
  --ivory: #f8f2e3;
  --ivory-deep: #efe5cd;
  --sepia: #3a2f1c;

  --line: rgb(156 192 242 / .2);
  --line-gold: rgb(217 181 102 / .42);
  --panel: rgb(255 255 255 / .05);
  --panel-strong: rgb(255 255 255 / .09);

  --font-display: "Cormorant Garamond", "Palatino Linotype", Georgia, serif;
  --font-read: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 10px;
  --topbar-h: 36px;
  --shadow: 0 18px 44px rgb(2 8 26 / .42);

  /* The shape of the torn edge between sections */
  --tear: polygon(0 100%, 0 58%, 4% 38%, 7% 56%, 12% 30%, 17% 52%, 21% 44%, 26% 66%, 31% 28%, 36% 50%, 41% 36%, 45% 60%, 50% 26%, 54% 48%, 59% 38%, 64% 64%, 69% 30%, 74% 54%, 78% 42%, 83% 62%, 88% 26%, 92% 50%, 96% 34%, 100% 56%, 100% 100%);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--mist-100);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main { display: block; }
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-bright); text-underline-offset: .18em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.12; color: var(--white); text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(100%, var(--wrap)); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 200; padding: .7rem 1.2rem; background: var(--gold-bright); color: var(--ink); font-weight: 600; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; }

/* ---------- 3. Buttons and small parts ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .85em 1.5em; border-radius: 4px; border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; line-height: 1.2; text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--ink); box-shadow: 0 8px 24px rgb(217 181 102 / .22); }
.btn-gold:hover { box-shadow: 0 12px 30px rgb(217 181 102 / .36); }
.btn-ghost { border-color: rgb(255 255 255 / .42); color: var(--white); }
.btn-ghost:hover { background: rgb(255 255 255 / .1); border-color: var(--white); }
.btn-sm { padding: .68em 1.1em; font-size: .9rem; }
.btn-disabled { border: 1px dashed var(--line-gold); color: var(--mist-200); cursor: default; }
.btn-disabled:hover { transform: none; }

.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6em; margin-bottom: .9rem;
  color: var(--gold-bright); font-family: var(--font-ui); font-size: .8rem; font-weight: 600; letter-spacing: .18em; line-height: 1.5; text-transform: uppercase;
}
.tag-sample {
  display: inline-block; padding: .22em .65em; border-radius: 2px;
  background: var(--ivory); color: #614610; font-family: var(--font-ui);
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--white); transition: background-color .2s ease, color .2s ease;
}
.icon-btn:hover { background: rgb(255 255 255 / .12); color: var(--gold-bright); }
.link-btn { display: inline-flex; align-items: center; gap: .4em; color: var(--gold-bright); text-decoration: underline; text-underline-offset: .2em; }

/* ---------- 4. Header and navigation ---------- */
.site-header { position: sticky; top: calc(var(--topbar-h) * -1); z-index: 100; background: var(--ink); box-shadow: 0 1px 0 var(--line-gold), 0 12px 30px rgb(2 8 26 / .35); }

.topbar { height: var(--topbar-h); background: var(--ink); border-bottom: 1px solid var(--line); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.topbar-note { margin: 0; color: var(--sky-300); }
.topbar-links { display: flex; gap: 1.5rem; }
.topbar-links a { display: inline-flex; align-items: center; gap: .45em; color: var(--mist-100); font-weight: 500; text-decoration: none; }
.topbar-links a:hover { color: var(--gold-bright); }
.topbar-links .icon { color: var(--gold); width: 1.15em; height: 1.15em; }

.mainbar { background: var(--navy-900); }
.mainbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--white); text-decoration: none; flex: none; }
.brand-mark { width: 34px; height: 43px; flex: none; }
.brand-text { display: grid; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; max-width: 9.4em; }
.brand-sub { margin-top: .22rem; font-size: .7rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-bright); }

.nav { margin-left: auto; }
.nav-head { display: none; }
.nav-list { display: flex; align-items: center; gap: .1rem; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; gap: .42em; padding: .55rem .5rem;
  color: var(--mist-100); font-size: .92rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.nav-link .icon { color: var(--gold); width: 1.1em; height: 1.1em; }
.nav-link:hover { color: var(--white); border-bottom-color: var(--line-gold); }
.nav-link[aria-current="page"] { color: var(--white); border-bottom-color: var(--gold); }
.nav-toggle { display: inline-grid; place-items: center; width: 22px; height: 30px; margin-left: -.35rem; color: var(--sky-300); border-radius: 3px; }
.nav-toggle .icon { width: .85em; height: .85em; transition: transform .2s ease; }
.has-menu.open .nav-toggle .icon { transform: rotate(180deg); }

.nav-menu {
  position: absolute; top: 100%; left: 0; min-width: 260px; padding-top: .9rem;
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-menu:hover > .nav-menu, .has-menu.open > .nav-menu { visibility: visible; opacity: 1; transform: none; }
.align-end > .nav-menu { left: auto; right: 0; }
.nav-menu ul { padding: .5rem; background: var(--navy-800); border: 1px solid var(--line-gold); border-radius: var(--radius); box-shadow: var(--shadow); }
.is-wide > .nav-menu { min-width: 480px; }
.is-wide > .nav-menu ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .25rem; }
.is-wide .menu-all { grid-column: 1 / -1; }
.nav-menu a { display: flex; align-items: center; gap: .7em; padding: .62rem .75rem; border-radius: 6px; color: var(--mist-100); font-size: .94rem; text-decoration: none; }
.nav-menu a .icon { color: var(--gold); }
.nav-menu a:hover { background: var(--royal-700); color: var(--white); }
.menu-all { margin-top: .25rem; padding-top: .25rem; border-top: 1px solid var(--line); }
.menu-all a { font-weight: 600; color: var(--gold-bright); }

.header-actions { display: flex; align-items: center; }
.menu-open { display: none; }

@media (max-width: 1239px) {
  .brand-name { max-width: none; }
  .topbar-note { display: none; }
  .topbar-links { width: 100%; justify-content: center; }
  .header-actions { margin-left: auto; }
  .menu-open { display: inline-grid; }
  .nav {
    position: fixed; inset: 0; z-index: 120; margin: 0; padding: 1rem var(--gutter) 3rem;
    background: var(--navy-900); overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0; transform: translateX(24px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: .75rem; border-bottom: 1px solid var(--line-gold); margin-bottom: .5rem; }
  .nav-list { display: block; width: min(100%, 620px); margin-inline: auto; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-link { flex: 1; padding: 1rem .25rem; font-size: 1.1rem; border-bottom: 0; }
  .nav-link .icon { width: 1.3em; height: 1.3em; }
  .nav-link[aria-current="page"] { color: var(--gold-bright); }
  .nav-toggle { width: 48px; height: 48px; margin: 0; }
  .nav-toggle .icon { width: 1.2em; height: 1.2em; }
  .nav-menu { position: static; display: none; flex-basis: 100%; min-width: 0 !important; padding: 0 0 .75rem; visibility: visible; opacity: 1; transform: none; transition: none; }
  .has-menu:hover > .nav-menu { display: none; }
  .has-menu.open > .nav-menu { display: block; }
  .nav-menu ul { display: block !important; padding: .25rem; background: rgb(255 255 255 / .04); border: 0; box-shadow: none; }
}
@media (max-width: 640px) {
  :root { --topbar-h: 0px; }
  .topbar { display: none; }
  .mainbar-inner { min-height: 66px; }
  .brand { gap: .55rem; }
  .brand-mark { width: 27px; height: 34px; }
  .brand-name { font-size: 1.04rem; }
  .brand-sub { font-size: .6rem; }
}
@media (max-width: 400px) { .site-header .brand-name { font-size: .92rem; } }

/* ---------- 5. Section layout and torn-edge dividers ---------- */
.section { position: relative; padding-block: clamp(4rem, 8vw, 7rem); background: var(--bg, var(--navy-900)); }
.section-alt { --bg: var(--navy-800); }
.section-royal { --bg: var(--royal-700); }
.torn::before, .torn::after {
  content: ""; position: absolute; left: 0; right: 0; height: 46px; bottom: calc(100% - 1px);
  clip-path: var(--tear); pointer-events: none;
}
.torn::before { z-index: 2; background: var(--bg, var(--navy-900)); }
.torn::after { z-index: 1; bottom: calc(100% + 1px); background: var(--gold); opacity: .7; }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-title { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.section-sub { max-width: 58ch; margin: .8rem 0 0; color: var(--mist-200); font-family: var(--font-read); font-size: 1.12rem; }
.section-link { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; text-decoration: none; }
.section-link:hover { text-decoration: underline; }

/* ---------- 6. Home page ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 75% at 74% 42%, rgb(47 107 209 / .62), transparent 72%),
    radial-gradient(45% 55% at 8% 96%, rgb(28 79 168 / .55), transparent 75%),
    linear-gradient(170deg, var(--navy-900), var(--ink) 92%);
}
.hero::before { /* faint ruled lines, like a prepared manuscript page */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: repeating-linear-gradient(180deg, transparent 0 38px, rgb(156 192 242 / .055) 38px 39px);
  mask-image: linear-gradient(90deg, #000, transparent 62%);
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: min(calc(100svh - 112px), 800px); padding-block: clamp(3rem, 6vw, 5rem) clamp(4.5rem, 8vw, 7rem);
}
.hero-title { font-size: clamp(3.1rem, 6.7vw, 6.1rem); font-weight: 600; line-height: .98; letter-spacing: -.012em; }
.hero-title .of { font-style: italic; font-weight: 500; color: var(--gold-bright); }
.hero-sub {
  display: flex; align-items: center; gap: .9rem; margin: 1.3rem 0 1.5rem;
  font-family: var(--font-ui); font-size: clamp(.95rem, 1.6vw, 1.2rem); font-weight: 600; letter-spacing: .46em; text-transform: uppercase; color: var(--gold-bright);
}
.hero-sub .icon { width: 1.45em; height: 1.45em; }
.hero-sub::after { content: ""; flex: 1; max-width: 200px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.hero-lead { max-width: 37em; margin-bottom: 2rem; font-family: var(--font-read); font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.6; color: var(--mist-100); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.leaf-stage { position: relative; }
.leaf-stage svg { width: 100%; max-height: 74vh; margin-inline: auto; overflow: visible; filter: drop-shadow(0 26px 44px rgb(2 8 26 / .6)) drop-shadow(0 0 46px rgb(239 213 146 / .16)); }
.leaf-text text { font-family: var(--font-read); font-size: 19px; font-weight: 500; fill: var(--sepia); opacity: .78; }
.seam { fill: none; stroke: #c99a3c; stroke-width: 2.4; stroke-linejoin: round; }
.frag { transform-box: fill-box; transform-origin: center; animation: gather 2s cubic-bezier(.16, .84, .3, 1) var(--d, 0s) both; }
@keyframes gather {
  from { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.92); }
  35% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
.leaf-caption { max-width: 28em; margin: .5rem auto 0; text-align: center; font-family: var(--font-display); font-size: 1.14rem; font-style: italic; line-height: 1.35; color: var(--mist-100); }
.leaf-caption cite { display: block; margin-top: .3rem; font-family: var(--font-ui); font-size: .76rem; font-style: normal; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); }

/* The four doorways under the hero */
.portal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.portal {
  --cut: 30px;
  position: relative; display: flex; flex-direction: column; min-height: 310px; padding: 1.75rem 1.5rem 1.5rem;
  color: var(--white); text-decoration: none; isolation: isolate;
  background: var(--line-gold);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: transform .28s ease, background-color .28s ease;
}
.portal::before { /* inner panel, leaving a 1px gold outline around the cut corner */
  content: ""; position: absolute; inset: 1px; z-index: -1;
  background: linear-gradient(160deg, var(--royal-700), var(--navy-900) 88%);
  clip-path: polygon(0 0, calc(100% - var(--cut) + .4px) 0, 100% calc(var(--cut) - .4px), 100% 100%, 0 100%);
  transition: filter .28s ease;
}
.portal:hover { transform: translateY(-6px); background: var(--gold-bright); }
.portal:hover::before { filter: brightness(1.28); }
/* The cut corner would clip a normal focus outline, so the whole card lights up instead */
.portal:focus-visible { outline: none; transform: translateY(-6px); background: var(--gold-bright); }
.portal:focus-visible::before { inset: 3px; filter: brightness(1.28); }
.portal:focus-visible h3 { text-decoration: underline; text-underline-offset: .15em; }
.portal-num { font-family: var(--font-display); font-size: 1.05rem; font-style: italic; color: var(--gold-bright); }
.portal-icon { width: 3.25rem; height: 3.25rem; margin: 1.1rem 0 1.15rem; stroke-width: 1.05; color: var(--gold-bright); }
.portal h3 { font-size: 1.9rem; margin-bottom: .55rem; }
.portal p { margin-bottom: 1.2rem; font-size: .97rem; line-height: 1.5; color: var(--mist-200); }
.portal-go { display: inline-flex; align-items: center; gap: .5em; margin-top: auto; font-size: .9rem; font-weight: 600; color: var(--gold-bright); }
.portal-go .icon { transition: transform .25s ease; }
.portal:hover .portal-go .icon { transform: translateX(5px); }

/* Featured teaching */
.feature { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center; }
.feature-art { position: relative; display: block; overflow: hidden; border: 1px solid var(--line-gold); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-art svg, .feature-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s ease; }
.feature-art:hover svg, .feature-art:hover img { transform: scale(1.035); }
.feature-art .tag-sample { position: absolute; top: 1rem; left: 1rem; }
.feature-title { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: .9rem; }
.feature-title a { color: inherit; text-decoration: none; }
.feature-title a:hover { color: var(--gold-bright); }
.feature-text { font-family: var(--font-read); font-size: 1.12rem; color: var(--mist-100); }
.feature-parts { margin: 1.5rem 0 1.75rem; padding-top: 1.1rem; border-top: 1px solid var(--line-gold); }
.feature-parts h4 { margin-bottom: .55rem; font-family: var(--font-ui); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mist-200); }
.feature-parts ol { counter-reset: part; }
.feature-parts li { counter-increment: part; }
.feature-parts a { display: flex; align-items: center; gap: .7em; padding: .42rem 0; color: var(--white); text-decoration: none; }
.feature-parts a::before { content: counter(part, upper-roman) "."; min-width: 1.7em; font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--gold-bright); }
.feature-parts a .icon { color: var(--gold); }
.feature-parts a:hover span { text-decoration: underline; text-underline-offset: .2em; }

/* Subject index */
.subject-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-gold); border-left: 1px solid var(--line); }
.subject-list li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.subject-list a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.3rem 1.35rem; height: 100%; color: var(--white); text-decoration: none; transition: background-color .22s ease; }
.subject-list a:hover { background: var(--panel-strong); }
.subject-icon { display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border: 1px solid var(--line-gold); border-radius: 50%; color: var(--gold-bright); }
.subject-name { font-family: var(--font-display); font-size: 1.42rem; font-weight: 600; line-height: 1.15; }
.subject-count { font-size: .8rem; color: var(--mist-200); white-space: nowrap; }

/* Featured Scripture */
.scripture {
  --bg: var(--royal-600);
  overflow: visible; text-align: center;
  background: radial-gradient(60% 100% at 50% 0%, rgb(47 107 209 / .45), transparent 75%), linear-gradient(180deg, var(--royal-600), var(--royal-700));
}
.scripture-inner { max-width: 930px; margin-inline: auto; }
.scripture-mark { width: 3.2rem; height: 3.2rem; margin: 0 auto 1.2rem; color: var(--gold-bright); stroke-width: 1; }
.scripture blockquote { margin: 0; min-height: 5em; display: grid; place-items: center; font-family: var(--font-display); font-size: clamp(1.8rem, 3.8vw, 3rem); font-style: italic; font-weight: 500; line-height: 1.24; color: var(--white); }
.scripture-ref { display: inline-block; margin-top: 1rem; font-size: .88rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-underline-offset: .3em; color: var(--gold-bright); }
.scripture-controls { display: flex; justify-content: center; gap: .5rem; margin-top: 1.1rem; }
.scripture-controls .icon-btn { border: 1px solid rgb(255 255 255 / .35); }
.scripture-controls [data-prev] .icon { transform: rotate(180deg); }

/* About preview */
.about-preview { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about-figure { position: relative; margin: 0; }
.about-figure svg { width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--line-gold); border-radius: var(--radius); box-shadow: var(--shadow); }
.about-figure .about-mark { position: absolute; inset: 0; margin: auto; width: 36%; height: auto; aspect-ratio: auto; border: 0; box-shadow: none; filter: drop-shadow(0 10px 22px rgb(2 8 26 / .55)); }
.about-preview p { font-family: var(--font-read); font-size: 1.14rem; }

/* ---------- 7. Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1.4rem; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(170deg, rgb(255 255 255 / .085), rgb(255 255 255 / .035));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: var(--shadow); }
.card-art { position: relative; overflow: hidden; }
.card-art .mosaic, .card-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-art .mosaic, .card:hover .card-art img { transform: scale(1.05); }
.card-art .tag-sample { position: absolute; top: .7rem; left: .7rem; }
.card-play { position: absolute; right: .75rem; bottom: .75rem; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--gold-bright); color: var(--ink); box-shadow: 0 6px 16px rgb(2 8 26 / .5); }
.card-play .icon { width: 1.1em; height: 1.1em; fill: currentColor; stroke-width: 1; }
.card-play-audio .icon { fill: none; stroke-width: 1.7; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem 1.25rem 1.2rem; }
.card-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin-bottom: .55rem; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); }
.card-title { margin-bottom: .5rem; font-size: 1.55rem; line-height: 1.14; }
.card-title a { color: var(--white); text-decoration: none; }
.card .card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { color: var(--gold-bright); }
.card a:focus-visible { outline: none; }
.card:has(a:focus-visible) { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
.card-text { margin-bottom: .9rem; font-size: .97rem; line-height: 1.5; color: var(--mist-200); }
.card-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: auto 0 0; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--mist-200); }

.resource-list { display: grid; gap: 1rem; }
.resource {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 1.4rem; align-items: center;
  padding: 1.1rem 1.3rem 1.1rem 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .22s ease, background-color .22s ease;
}
.resource:hover { border-color: var(--gold); background: var(--panel-strong); }
.resource-cover { position: relative; overflow: hidden; border: 1px solid var(--line-gold); border-radius: 3px; box-shadow: 0 8px 18px rgb(2 8 26 / .45); }
.resource-cover .mosaic, .resource-cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.resource-cover .mosaic circle, .resource-cover .mosaic > g:last-child { display: none; }
.resource-file { position: absolute; inset: 0; margin: auto; width: 2.1rem; height: 2.1rem; color: var(--gold-bright); stroke-width: 1.2; filter: drop-shadow(0 2px 5px rgb(2 8 26 / .9)); }
.resource .card-text { margin-bottom: .5rem; }
.resource .card-meta { padding: 0; border: 0; }
.resource .card-title { font-size: 1.6rem; }

/* ---------- 8. Inner page banners ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--navy-900); padding-block: clamp(3rem, 6vw, 5rem) clamp(4.5rem, 8vw, 6.5rem); }
.page-hero-art { position: absolute; inset: 0; z-index: -2; }
.page-hero-art svg { width: 100%; height: 100%; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(5 14 36 / .97) 18%, rgb(8 26 61 / .84) 58%, rgb(8 26 61 / .5)); }
.page-hero-inner { max-width: var(--wrap); }
.page-hero h1 { max-width: 19em; margin-bottom: .75rem; font-size: clamp(2.7rem, 5.6vw, 4.5rem); }
.page-lead { max-width: 42em; margin: 0; font-family: var(--font-read); font-size: clamp(1.08rem, 1.5vw, 1.24rem); line-height: 1.55; color: var(--mist-100); }
.page-hero .btn { margin-top: 1.5rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .25rem .55rem; margin-bottom: 1.5rem; font-size: .85rem; color: var(--mist-200); }
.crumbs a { color: var(--mist-100); }
.item-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1.2rem 0 0; font-size: .93rem; }
.item-meta a, .item-meta span { display: inline-flex; align-items: center; gap: .45em; color: var(--gold-bright); }

/* ---------- 9. Library pages ---------- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1.25rem; }
.series-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; background: var(--panel); border: 1px solid var(--line-gold); border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.series-card:hover { transform: translateY(-4px); border-color: var(--gold-bright); box-shadow: var(--shadow); }
.series-art svg { width: 100%; aspect-ratio: 8 / 3; }
.series-body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem 1.3rem 1.25rem; }
.series-body h3 { margin-bottom: .45rem; font-size: 1.7rem; }
.series-body p:not(.card-kicker) { margin-bottom: .9rem; font-size: .96rem; line-height: 1.5; color: var(--mist-200); }
.series-count { display: inline-flex; align-items: center; gap: .5em; margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--gold-bright); }

.library { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.lib-side { position: sticky; top: 96px; padding: 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.lib-side-title { display: flex; align-items: center; gap: .5em; margin-bottom: .65rem; padding: 0 .5rem .65rem; border-bottom: 1px solid var(--line-gold); font-size: 1.32rem; }
.lib-side-title .icon { color: var(--gold-bright); width: 1em; height: 1em; }
.lib-topics button { display: flex; align-items: center; gap: .65em; width: 100%; padding: .58rem .55rem; text-align: left; border-radius: 6px; font-size: .96rem; color: var(--mist-100); transition: background-color .18s ease; }
.lib-topics button .icon { color: var(--gold); }
.lib-topics button span { flex: 1; line-height: 1.25; }
.lib-topics button em { font-style: normal; font-size: .78rem; color: var(--mist-200); }
.lib-topics button:hover { background: var(--panel-strong); }
.lib-topics button[aria-pressed="true"] { background: var(--royal-600); color: var(--white); font-weight: 600; }
.lib-topics button[aria-pressed="true"] em { color: var(--white); }
.lib-topics button[aria-pressed="true"] .icon { color: var(--gold-bright); }

.lib-tools { display: flex; flex-wrap: wrap; gap: .8rem 1.25rem; align-items: center; margin-bottom: 1rem; }
.lib-search { position: relative; display: block; flex: 1 1 280px; }
.lib-search > .icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--gold-bright); pointer-events: none; }
.lib-search input { width: 100%; min-height: 48px; padding: .6rem 1rem .6rem 2.85rem; background: rgb(5 14 36 / .55); border: 1px solid rgb(156 192 242 / .42); border-radius: 6px; color: var(--white); }
.lib-search input::placeholder, .search-form input::placeholder { color: var(--mist-200); opacity: 1; }
.lib-search input:focus { border-color: var(--gold-bright); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { min-height: 40px; padding: .35rem 1rem; border: 1px solid rgb(156 192 242 / .42); border-radius: 999px; font-size: .9rem; font-weight: 500; color: var(--mist-100); transition: background-color .18s ease, border-color .18s ease; }
.chip:hover { border-color: var(--gold-bright); }
.chip[aria-pressed="true"] { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--ink); font-weight: 600; }
.lib-count { margin-bottom: 1.15rem; font-size: .92rem; color: var(--mist-200); }
.lib-count .link-btn { margin-left: .6rem; }
.lib-more { display: flex; justify-content: center; margin-top: 1.75rem; }
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--mist-200); }
.empty .icon { width: 2.4rem; height: 2.4rem; margin: 0 auto .75rem; color: var(--gold); stroke-width: 1.2; }

/* ---------- 10. Reading page ---------- */
.item-section { padding-top: clamp(2.5rem, 5vw, 4rem); --bg: var(--navy-800); }
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.item-layout-single { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.item-side { position: sticky; top: 96px; display: grid; gap: 1rem; }
.panel { padding: 1.15rem 1.25rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { margin-bottom: .65rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line-gold); font-size: 1.38rem; }
.panel a { display: flex; align-items: baseline; gap: .6em; padding: .4rem 0; font-size: .95rem; line-height: 1.35; color: var(--mist-100); text-decoration: none; }
.panel a:hover { color: var(--gold-bright); text-decoration: underline; text-underline-offset: .2em; }
.panel a .icon { color: var(--gold); align-self: center; }
.toc span { min-width: 1.2em; font-family: var(--font-display); font-style: italic; font-size: 1.08rem; color: var(--gold-bright); }
.toc a.is-current { color: var(--gold-bright); font-weight: 600; }
.panel-series a[aria-current="page"] { color: var(--gold-bright); font-weight: 600; }

.read-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-bottom: .8rem; font-size: .9rem; color: var(--mist-200); }
.read-tools > span { margin-right: .4rem; }
.read-tools .link-btn { margin-left: auto; }
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 150; height: 3px; background: var(--gold-bright); transform: scaleX(0); transform-origin: left; }

/* The ivory manuscript page for long reading */
.leaf {
  --read-scale: 1;
  padding: clamp(1.5rem, 5vw, 3.75rem) clamp(1.3rem, 6vw, 4.25rem);
  background: linear-gradient(180deg, var(--ivory), var(--ivory-deep));
  color: var(--sepia); border-radius: 4px; box-shadow: var(--shadow), inset 0 0 0 1px rgb(150 112 42 / .35);
  font-family: var(--font-read); font-size: calc(1.17rem * var(--read-scale)); line-height: 1.72;
}
.leaf p, .leaf ul { max-width: 68ch; }
.leaf h2 { margin: 1.6em 0 .55em; font-size: 1.85em; color: #0d2656; }
.leaf h2:first-of-type { margin-top: .2em; }
.leaf h2:first-of-type + p::first-letter { float: left; margin: .05em .1em 0 0; font-family: var(--font-display); font-size: 4.3em; font-weight: 600; line-height: .78; color: var(--royal-700); }
.leaf ul { margin: 0 0 1em; padding-left: 1.3em; list-style: disc; }
.leaf li { margin-bottom: .4em; }
.leaf li::marker { color: #8a6417; }
.leaf-note { padding: .55em .9em; border: 1px dashed #8a6417; border-radius: 3px; font-family: var(--font-ui); font-size: .85rem; color: #5b4310; }
.verse { margin: 1.5em 0; padding: .3em 0 .3em 1.25em; border-left: 3px solid #b18a35; font-family: var(--font-display); font-size: 1.32em; font-style: italic; line-height: 1.35; color: #0d2656; }
.verse p { margin-bottom: .3em; }
.verse cite { font-family: var(--font-ui); font-size: .62em; font-style: normal; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.verse cite a { color: #6c4e0e; }

.player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); border: 1px solid var(--line-gold); border-radius: var(--radius); box-shadow: var(--shadow); }
.player img, .player iframe, .player .mosaic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.player-btn { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--gold-bright); color: var(--ink); box-shadow: 0 10px 30px rgb(2 8 26 / .6); transition: transform .2s ease; }
button.player-btn:hover { transform: scale(1.08); }
.player-btn .icon { width: 2.1rem; height: 2.1rem; fill: currentColor; }
.player-note { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; text-align: center; background: rgb(5 14 36 / .62); }
.player-note .player-btn { position: static; margin: 0; width: 72px; height: 72px; }
.player-note p { margin: 0; color: var(--mist-100); font-size: .98rem; }
.player-note strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); }
.audio-panel { display: flex; align-items: center; gap: 1.2rem; padding: 1.6rem; background: linear-gradient(135deg, var(--royal-700), var(--navy-900)); border: 1px solid var(--line-gold); border-radius: var(--radius); box-shadow: var(--shadow); }
.audio-panel audio { flex: 1; min-width: 0; }
.audio-panel p { margin: 0; color: var(--mist-100); }
.audio-panel strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); }
.audio-icon { width: 3.2rem; height: 3.2rem; color: var(--gold-bright); stroke-width: 1.1; }
.download-panel { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1.75rem; align-items: center; padding: 1.5rem; background: var(--panel); border: 1px solid var(--line-gold); border-radius: var(--radius); }
.download-panel h2 { margin-bottom: .5rem; font-size: 1.9rem; }
.download-panel p { color: var(--mist-200); }
.download-cover .mosaic, .download-cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line-gold); border-radius: 3px; box-shadow: 0 10px 24px rgb(2 8 26 / .5); }

/* ---------- 11. About and Contact ---------- */
.prose { max-width: 44em; font-family: var(--font-read); font-size: 1.14rem; }
.draft-note { display: flex; gap: .8rem; align-items: flex-start; padding: 1.05rem 1.25rem; border: 1px dashed var(--gold); border-radius: var(--radius); background: rgb(217 181 102 / .08); color: var(--mist-100); font-size: .98rem; }
.draft-note .icon { margin-top: .15rem; color: var(--gold-bright); }
.draft-note p { margin: 0; }
.draft-note strong { color: var(--gold-bright); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.about-card { padding: 1.75rem 1.6rem; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 0 0 var(--radius) var(--radius); scroll-margin-top: 110px; }
.about-card > .icon { width: 2.5rem; height: 2.5rem; margin-bottom: .9rem; color: var(--gold-bright); stroke-width: 1.1; }
.about-card h2, .about-card h3 { margin-bottom: .75rem; font-size: 2rem; }
.about-card .draft-note { margin-top: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.name-verse { margin: 0; padding: clamp(1.6rem, 4vw, 2.6rem); background: linear-gradient(180deg, var(--ivory), var(--ivory-deep)); color: #0d2656; border-radius: 4px; box-shadow: var(--shadow); font-family: var(--font-display); font-size: clamp(1.55rem, 2.8vw, 2.15rem); font-style: italic; font-weight: 500; line-height: 1.28; }
.name-verse cite { display: block; margin-top: .8rem; font-family: var(--font-ui); font-size: .8rem; font-style: normal; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #6c4e0e; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.contact-form { padding: clamp(1.4rem, 3vw, 2.25rem); background: var(--panel); border: 1px solid var(--line-gold); border-radius: var(--radius); }
.field { margin-bottom: 1.15rem; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .95rem; color: var(--white); }
.field label small { font-weight: 400; color: var(--mist-200); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: .65rem .85rem; background: rgb(5 14 36 / .6); border: 1px solid rgb(156 192 242 / .5); border-radius: 6px; color: var(--white); }
.field select option { background: var(--navy-900); }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-bright); }
.field [aria-invalid="true"] { border-color: #ffb3a8; }
.field-error { margin: .3rem 0 0; font-size: .88rem; color: #ffc9c1; }
.field-error:empty { display: none; }
.hidden-field { position: absolute; left: -9999px; }
.form-status { margin: 1rem 0 0; padding: .8rem 1rem; border: 1px solid var(--gold); border-radius: 6px; background: rgb(217 181 102 / .1); font-size: .96rem; }
.contact-list { display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: .85rem; }
.contact-list .icon { margin-top: .2rem; color: var(--gold-bright); }
.contact-list strong { display: block; font-family: var(--font-display); font-size: 1.28rem; line-height: 1.2; color: var(--white); }
.contact-list em { font-style: normal; font-size: .93rem; color: var(--mist-200); }

/* ---------- 12. Search pop-up ---------- */
.search-dialog { width: min(680px, calc(100vw - 1.5rem)); max-height: min(80vh, 620px); margin: 10vh auto auto; padding: 0; background: var(--navy-800); color: var(--mist-100); border: 1px solid var(--line-gold); border-radius: var(--radius); box-shadow: 0 30px 80px rgb(2 8 26 / .75); }
.search-dialog::backdrop { background: rgb(3 9 26 / .78); }
.search-form { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem .55rem 1.15rem; border-bottom: 1px solid var(--line-gold); }
.search-form > .icon { color: var(--gold-bright); }
.search-form input { flex: 1; min-width: 0; min-height: 48px; background: none; border: 0; color: var(--white); font-size: 1.08rem; outline: none; }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-results { padding: .75rem; }
.search-hint { margin: .3rem .5rem .7rem; font-size: .92rem; color: var(--mist-200); }
.search-topics { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
.search-topics a, .search-list a { display: flex; align-items: center; gap: .75em; padding: .6rem .65rem; border-radius: 6px; color: var(--mist-100); text-decoration: none; }
.search-topics a:hover, .search-list a:hover { background: var(--royal-700); color: var(--white); }
.search-topics .icon, .search-list .icon { color: var(--gold); }
.search-list strong { display: block; color: var(--white); font-weight: 600; line-height: 1.3; }
.search-list small { color: var(--mist-200); }
.search-all { display: inline-flex; align-items: center; gap: .5em; margin: .6rem .65rem .35rem; font-weight: 600; font-size: .94rem; }

/* ---------- 13. Footer ---------- */
.site-footer { position: relative; background: var(--ink); --bg: var(--ink); padding-top: clamp(3.5rem, 6vw, 5rem); font-size: .95rem; }
.site-footer::before, .site-footer::after { content: ""; position: absolute; left: 0; right: 0; height: 46px; clip-path: var(--tear); pointer-events: none; }
.site-footer::before { z-index: 2; bottom: calc(100% - 1px); background: var(--ink); }
.site-footer::after { z-index: 1; bottom: calc(100% + 1px); background: var(--gold); opacity: .7; }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 2.5rem; }
.footer-verse { margin: 1.3rem 0 0; max-width: 24em; font-family: var(--font-display); font-size: 1.32rem; font-style: italic; line-height: 1.3; color: var(--mist-100); }
.footer-verse cite { display: block; margin-top: .35rem; font-family: var(--font-ui); font-size: .74rem; font-style: normal; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); }
.footer-col h2 { margin-bottom: .7rem; font-family: var(--font-ui); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); }
.footer-col a { display: inline-block; padding: .22rem 0; color: var(--mist-100); text-decoration: none; }
.footer-col a:hover { color: var(--gold-bright); text-decoration: underline; text-underline-offset: .2em; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 2rem; margin-top: 2.75rem; padding-block: 1.1rem 1.4rem; border-top: 1px solid var(--line); font-size: .84rem; color: var(--mist-200); }
.footer-base p { margin: 0; }
.noscript-note { padding: 1rem var(--gutter); background: var(--gold-bright); color: var(--ink); }
.noscript-note a { color: var(--ink); font-weight: 600; margin-right: .75rem; }

/* ---------- Responsive layouts ---------- */
@media (max-width: 1040px) {
  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal { min-height: 270px; }
  .subject-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .library { grid-template-columns: minmax(0, 1fr); }
  .lib-side { position: static; padding: 0; background: none; border: 0; }
  .lib-side-title { display: none; }
  .lib-topics { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
  .lib-topics button { width: auto; white-space: nowrap; padding: .5rem .85rem; border: 1px solid rgb(156 192 242 / .42); border-radius: 999px; }
  .item-layout { grid-template-columns: minmax(0, 1fr); }
  .item-side { position: static; order: -1; }
  .item-side .toc ol { columns: 2; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 2.5rem; gap: .5rem; }
  .leaf-stage svg { max-height: 56vh; }
  .feature, .about-preview, .split, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .about-figure { max-width: 340px; }
}
@media (max-width: 640px) {
  .portal-grid { grid-template-columns: minmax(0, 1fr); }
  .portal { min-height: 0; }
  .portal-icon { margin-block: .7rem .8rem; }
  .subject-list { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .resource { grid-template-columns: 74px minmax(0, 1fr); gap: 1rem; padding: 1rem; }
  .resource-action { grid-column: 1 / -1; }
  .resource-action .btn { width: 100%; }
  .download-panel { grid-template-columns: minmax(0, 1fr); }
  .download-cover { max-width: 170px; }
  .player-btn { width: 64px; height: 64px; }
  .player-note { gap: .4rem; }
  .player-note .player-btn { width: 44px; height: 44px; }
  .player-note .player-btn .icon { width: 1.2rem; height: 1.2rem; }
  .player-note p { font-size: .84rem; line-height: 1.35; }
  .player-note strong { font-size: 1.15rem; }
  .audio-panel { flex-direction: column; align-items: flex-start; }
  .audio-panel audio { width: 100%; }
  .scripture blockquote { min-height: 10em; }
  .read-tools .link-btn { margin-left: 0; flex-basis: 100%; }
  .search-topics { grid-template-columns: 1fr; }
  .item-side .toc ol { columns: 1; }
}

/* ---------- 14. Motion and accessibility ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .7s ease; }
.series-card.reveal.in { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .7s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .item-side, .read-tools, .read-progress { display: none !important; }
  body, .section, .leaf { background: #fff !important; color: #000 !important; box-shadow: none !important; }
}
