/* THE BOOK — minimal, stunning, responsive */
:root {
  --bg: #f6f1e7;
  --bg-2: #efe7d6;
  --ink: #1a1614;
  --ink-soft: #4a423b;
  --ink-mute: #7a6f63;
  --rule: rgba(26,22,20,.14);
  --accent: #b8420f;        /* rubric red */
  --accent-soft: #d97a4a;
  --gold: #b08a3e;
  --paper-grain: rgba(0,0,0,.025);
  --shadow: 0 30px 80px -40px rgba(50,30,10,.35);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Apple Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html[data-theme="dark"] {
  --bg: #0c0a08;
  --bg-2: #15110d;
  --ink: #ece3d2;
  --ink-soft: #c2b59f;
  --ink-mute: #847665;
  --rule: rgba(236,227,210,.12);
  --accent: #ff8a4c;
  --accent-soft: #ffb487;
  --gold: #d8b76a;
  --paper-grain: rgba(255,255,255,.022);
  --shadow: 0 30px 80px -40px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  letter-spacing: 0.005em;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body[data-loading="true"] .view { opacity: 0; transform: translateY(8px); }
body { transition: background .5s ease, color .5s ease; }

/* paper-grain backdrop */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 800px at 70% -10%, var(--bg-2), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, var(--bg-2), transparent 55%);
  opacity: .9;
}
#fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: .5;
}

/* TOP BAR */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: calc(10px + var(--safe-top)) 18px 10px;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  justify-self: center;
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .22em;
  font-size: 12px;
  text-transform: uppercase;
}
.brand-mark { color: var(--accent); font-size: 14px; line-height: 1; }
.iconbtn {
  width: 38px; height: 38px; border-radius: 10px;
  background: transparent; border: 1px solid var(--rule);
  color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.iconbtn:hover { background: var(--bg-2); }
.iconbtn:active { transform: scale(.96); }
.iconbtn svg { width: 18px; height: 18px; }
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; pointer-events: none;
}
.progress > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .12s linear;
}

/* NAV (slide-in) */
.nav {
  position: fixed; top: 0; left: 0;
  height: 100dvh; width: min(86vw, 360px);
  background: var(--bg);
  border-right: 1px solid var(--rule);
  z-index: 40;
  transform: translateX(-105%);
  transition: transform .35s cubic-bezier(.6,.05,.2,1);
  padding: calc(20px + var(--safe-top)) 22px 22px;
  overflow-y: auto;
}
.nav.open { transform: translateX(0); box-shadow: var(--shadow); }
.scrim {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .3s ease;
}
.scrim.show { opacity: 1; }
.nav-eyebrow, .nav-foot {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 8px 0 18px;
}
.nav-foot { margin-top: 26px; font-style: normal; }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters li { border-top: 1px solid var(--rule); }
.chapters li:last-child { border-bottom: 1px solid var(--rule); }
.chapters a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 16px 4px;
  color: var(--ink);
  text-decoration: none;
  align-items: baseline;
}
.chapters a:hover { color: var(--accent); }
.chapters .num {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: .12em;
  padding-top: 4px;
}
.chapters .lbl {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 500;
}
.chapters a.active .lbl { color: var(--accent); font-style: italic; }
.chapters a.active .num { color: var(--accent); }

/* MAIN VIEW */
.view {
  position: relative; z-index: 2;
  transition: opacity .5s ease, transform .5s ease;
}

/* HOME */
.home {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(18px, 4vw, 42px) clamp(16px, 4vw, 42px) 72px;
}
.hero {
  text-align: center;
  padding: clamp(18px, 5vw, 44px) clamp(12px, 3vw, 26px) clamp(20px, 5vw, 46px);
}
.kicker {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 18px;
}
.title {
  margin: 0;
  font-weight: 500;
  line-height: .92;
  font-size: clamp(58px, 13vw, 140px);
  letter-spacing: -.02em;
}
.title .t1 { display: block; font-style: italic; color: var(--ink-soft); font-weight: 400; font-size: .42em; letter-spacing: .04em; margin-bottom: -.1em; }
.title .t2 { display: block; }
.lede {
  max-width: 42ch; margin: 18px auto 22px;
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink-soft);
  font-style: italic;
}
.cta { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn {
  font-family: var(--sans);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500; font-size: 14px; letter-spacing: .04em;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { border-color: var(--rule); color: var(--ink-soft); }
.btn.ghost:hover { color: var(--ink); }

.home-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px auto 0;
}
.home-options[hidden] { display: none; }
.home-pulse {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
}
.home-pulse span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in oklab, var(--ink) 24%, transparent);
  border-radius: 999px;
  padding: 6px 11px;
  color: color-mix(in oklab, var(--ink) 78%, var(--ink-soft));
  background: color-mix(in oklab, var(--bg) 35%, transparent);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.home-pulse b {
  color: var(--accent);
}
.start-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 16px;
}
.start-card {
  min-width: 0;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg-2) 58%, transparent), color-mix(in oklab, var(--bg) 88%, transparent));
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.start-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--accent) 55%, var(--rule));
  background: color-mix(in oklab, var(--bg-2) 72%, transparent);
}
.start-card span,
.home-section-head p {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.start-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  line-height: .98;
  font-weight: 500;
}
.start-card p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}
.start-card em {
  margin-top: auto;
  align-self: flex-start;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--rule));
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.section-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin: 0 0 26px;
}
.section-chip {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 12px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  background: color-mix(in oklab, var(--bg-2) 38%, transparent);
}
.section-chip:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--rule));
}
.section-chip span,
.section-chip em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.section-chip b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.15;
}
.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.home-section-head p {
  margin: 0;
}
.home-section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.book-intro {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, var(--safe-top)) 18px max(18px, var(--safe-bot));
  background:
    radial-gradient(circle at 50% 30%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 34%),
    color-mix(in oklab, var(--bg) 88%, rgba(0,0,0,.34));
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.book-intro.show { opacity: 1; pointer-events: auto; }
.book-intro-card {
  position: relative;
  width: min(520px, 94vw);
  border: 1px solid color-mix(in oklab, var(--accent) 34%, var(--rule));
  border-radius: 18px;
  padding: clamp(24px, 6vw, 38px);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 96%, var(--gold) 4%), var(--bg)),
    var(--bg);
  box-shadow: 0 34px 90px -34px rgba(0,0,0,.58);
  text-align: center;
  transform: translateY(10px) scale(.98);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
}
.book-intro.show .book-intro-card { transform: translateY(0) scale(1); }
.book-intro-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-mute);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.book-intro-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 24px;
  box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 12%, transparent);
}
.book-intro h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 11vw, 78px);
  line-height: .9;
  font-weight: 500;
}
.book-intro-lede {
  max-width: 42ch;
  margin: 18px auto;
  color: var(--ink-soft);
  font-style: italic;
}
.book-intro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 22px;
  text-align: left;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.book-intro-grid span {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px;
  background: color-mix(in oklab, var(--bg-2) 48%, transparent);
}
.book-intro-grid b { color: var(--accent); font-weight: 600; }
.book-intro-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cards {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.cards a {
  display: block; padding: 26px 24px 28px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 92%, var(--bg-2)) 0%, var(--bg) 100%);
  color: var(--ink); text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.cards a:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--accent) 60%, var(--rule));
  box-shadow: var(--shadow);
}
.cards .cnum {
  font-family: var(--sans); font-size: 11px;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-mute);
}
.cards h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 28px; line-height: 1.1;
  margin: 10px 0 10px;
  letter-spacing: -.005em;
}
.cards p {
  margin: 0; font-size: 16px; color: var(--ink-soft); font-style: italic;
}
.cards a::after {
  content: "→"; position: absolute; right: 22px; bottom: 22px;
  color: var(--accent); font-family: var(--sans); font-size: 18px;
  transition: transform .3s ease;
}
.cards a:hover::after { transform: translateX(4px); }

@media (max-width: 980px) {
  .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .home {
    padding-inline: 14px;
  }
  .start-grid,
  .section-strip {
    grid-template-columns: 1fr;
  }
  .start-card {
    min-height: 0;
  }
  .home-section-head {
    display: grid;
    align-items: start;
  }
}

.article.world-hub {
  max-width: 980px;
}
.world-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 26px 0 8px;
}
.world-stat {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 14px 16px;
  background: color-mix(in oklab, var(--bg) 92%, var(--bg-2));
}
.world-stat span,
.world-section-head p,
.world-facts span {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.world-stat b {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.1;
}
.world-section {
  margin: 44px 0 0;
}
.world-section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.world-section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.08;
}
.world-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.world-card {
  display: block;
  min-height: 100%;
  padding: 22px 20px 24px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 94%, var(--bg-2)) 0%, var(--bg) 100%);
  color: var(--ink);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
.world-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--accent) 55%, var(--rule));
  box-shadow: var(--shadow);
}
.world-card h3 {
  margin: 9px 0 9px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
}
.world-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
}
.world-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-right: 24px;
}
.world-card-meta span {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 8px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-soft);
  background: color-mix(in oklab, var(--bg) 86%, var(--accent) 14%);
}
.world-card::after {
  content: "→";
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--accent);
  font-family: var(--sans);
}
.world-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.world-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.world-facts div {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 16px;
  background: color-mix(in oklab, var(--bg) 92%, var(--bg-2));
}
.world-facts b {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}
.world-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}
.world-chips span {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 10px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  background: color-mix(in oklab, var(--bg) 92%, var(--accent) 8%);
}
.world-empty {
  color: var(--ink-soft);
}
.sexuality-hub .world-card-meta span,
.sexuality-page .world-facts b,
.violence-hub .world-card-meta span,
.violence-page .world-facts b,
.abortion-hub .world-card-meta span,
.abortion-page .world-facts b,
.authorship-hub .world-card-meta span,
.authorship-page .world-facts b {
  overflow-wrap: anywhere;
}
.sexuality-sources ul,
.violence-sources ul,
.abortion-sources ul,
.authorship-sources ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.sexuality-sources a,
.violence-sources a,
.abortion-sources a,
.authorship-sources a {
  color: var(--accent);
}
.religion-timeline-page {
  max-width: 1060px;
}
.timeline-intro-panel {
  margin: 0 auto 26px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 96%, var(--bg-2)) 0%, var(--bg) 100%);
  text-align: center;
}
.timeline-intro-panel .article-eyebrow {
  margin-top: 0;
}
.timeline-intro-panel .article-title {
  margin-left: auto;
  margin-right: auto;
}
.timeline-intro-panel .article-meta {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.timeline-intro-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 18px;
}
.timeline-intro-actions .world-page-actions {
  justify-content: center;
  margin: 0;
}
.timeline-intro-actions .timeline-modebar {
  margin: 0;
}
.timeline-facts {
  max-width: 760px;
  margin: 0 auto;
}
.timeline-modebar {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 4px;
  margin: 2px 0 20px;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 88%, var(--bg-2));
}
.timeline-modebar button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.timeline-modebar button.active {
  background: color-mix(in oklab, var(--accent) 16%, var(--bg));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 42%, transparent);
}
.timeline-cautions {
  margin: 28px 0 34px;
  padding: 4px 0 4px 18px;
  border-left: 2px solid color-mix(in oklab, var(--accent) 70%, var(--rule));
}
.timeline-cautions h2,
.timeline-sources h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
}
.timeline-cautions ul,
.timeline-sources ul {
  margin: 0;
  padding-left: 18px;
}
.timeline-cautions li,
.timeline-sources li {
  margin: 8px 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
}
.religion-timeline {
  list-style: none;
  max-width: 780px;
  margin: 26px auto 0;
  padding: 0;
  display: grid;
  gap: 30px;
}
.religion-time-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  position: relative;
}
.religion-time-item::before {
  content: "";
  position: absolute;
  top: -30px;
  bottom: auto;
  left: 50%;
  width: 1px;
  height: 30px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--rule), transparent);
  pointer-events: none;
}
.religion-time-item:first-child::before {
  display: none;
}
.religion-time-date {
  grid-column: 1;
  justify-self: center;
  width: min(100%, 440px);
  position: relative;
  z-index: 1;
  padding: 14px 18px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--rule));
  border-radius: 8px;
  background: color-mix(in oklab, var(--bg) 94%, var(--accent) 6%);
  font-family: var(--sans);
  text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.05);
}
.religion-time-date span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.religion-time-date b {
  display: block;
  margin-top: 7px;
  color: var(--ink-mute);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.35;
  text-transform: uppercase;
}
.religion-time-card {
  grid-column: 1;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 26px);
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 96%, var(--bg-2)) 0%, var(--bg) 100%);
}
.religion-time-item.is-left .religion-time-card {
  grid-column: 1;
}
.religion-time-item.is-right .religion-time-card {
  grid-column: 1;
}
.religion-time-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.religion-family,
.timeline-confidence,
.timeline-evidence span {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.timeline-confidence {
  flex-shrink: 0;
  border: 1px solid color-mix(in oklab, var(--accent) 42%, var(--rule));
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.religion-time-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 500;
  line-height: 1.06;
}
.religion-region {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
}
.timeline-evidence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.timeline-evidence p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}
.timeline-detail {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.timeline-detail span {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.timeline-detail p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.62;
}
.timeline-detail p + p {
  margin-top: 11px;
}
.timeline-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 18px;
  padding: 0 14px;
  border: 1px solid color-mix(in oklab, var(--accent) 45%, var(--rule));
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.timeline-link.disabled {
  border-color: var(--rule);
  color: var(--ink-mute);
}
.timeline-sources {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.timeline-sources a {
  color: var(--accent);
}
.timeline-swipe-wrap {
  margin: 24px 0 36px;
}
.religion-timeline-page[data-mode="scroll"] .timeline-swipe-wrap {
  display: none;
}
.religion-timeline-page[data-mode="swipe"] .timeline-cautions,
.religion-timeline-page[data-mode="swipe"] .religion-timeline,
.religion-timeline-page[data-mode="swipe"] .timeline-sources {
  display: none;
}
.timeline-swipe-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto 12px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 92%, var(--bg-2));
}
.timeline-swipe-head > div {
  min-width: 0;
  text-align: center;
  font-family: var(--sans);
}
.timeline-swipe-head span {
  display: block;
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.timeline-swipe-head b {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 13px;
}
.timeline-swipe-viewport {
  position: relative;
  min-height: clamp(420px, 54vh, 650px);
  outline: none;
  touch-action: pan-y;
}
.timeline-slide {
  display: none;
  min-height: clamp(420px, 54vh, 650px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(14px, 2vw, 20px);
  background: color-mix(in oklab, var(--bg) 96%, var(--bg-2));
}
.timeline-slide.is-active {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: center;
  animation: rise .32s cubic-bezier(.2,.7,.2,1) both;
}
.timeline-slide-date {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-right: 1px solid var(--rule);
  font-family: var(--sans);
}
.timeline-slide-date span {
  color: var(--accent);
  font-size: clamp(20px, 4vw, 38px);
  font-weight: 800;
  line-height: 1;
}
.timeline-slide-date b {
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}
.timeline-slide .religion-time-card {
  grid-column: auto;
  border: 0;
  padding: clamp(12px, 2vw, 20px);
  background: transparent;
}
.timeline-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.timeline-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: var(--ink-mute);
  opacity: .35;
  cursor: pointer;
}
.timeline-dot.is-active {
  background: var(--accent);
  opacity: 1;
  transform: scale(1.32);
}

.home-foot {
  margin-top: 56px; text-align: center;
  font-family: var(--sans); font-size: 12px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute);
}

/* ARTICLE */
.article {
  max-width: 720px; margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 32px) 120px;
}
.article-eyebrow {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent);
  margin: 8px 0 12px;
}
.article-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 6.4vw, 64px);
  line-height: 1.04; letter-spacing: -.01em;
  margin: 0 0 18px;
}
.article-meta {
  font-family: var(--sans);
  font-size: 12px; color: var(--ink-mute);
  letter-spacing: .04em;
  margin: 0 0 28px;
}
.rule {
  height: 1px; background: var(--rule);
  margin: 8px 0 36px;
  position: relative;
}
.rule::after {
  content: "✦"; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  background: var(--bg);
  padding: 0 12px;
  color: var(--accent); font-size: 14px;
}

/* PROSE */
.prose { font-size: 19px; }
.prose > * { margin: 0 0 1.05em; }
.prose h1 { display: none; }
.prose h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.2;
  margin: 2.4em 0 .6em;
  letter-spacing: -.005em;
}
.prose h2::before {
  content: ""; display: block; width: 36px; height: 2px;
  background: var(--accent); margin-bottom: 14px; opacity: .85;
}
.prose h3 {
  font-family: var(--serif); font-style: italic;
  font-weight: 500; font-size: 22px;
  margin: 2em 0 .4em;
  color: var(--ink-soft);
}
.prose p { color: var(--ink); }
.prose p > strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink-soft); }
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05em;
}
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--accent); }
.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
}
.prose a:hover { color: var(--accent-soft); }
.prose hr {
  border: none; height: auto; background: transparent;
  margin: 2.8em auto;
  max-width: 200px;
  text-align: center;
  color: var(--accent);
  opacity: .8;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .6em;
}
.prose hr::after { content: "✦ ✦ ✦"; }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .9em;
  background: var(--bg-2);
  padding: 1px 6px; border-radius: 4px;
}
.prose pre {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 14px;
}
.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 16px;
  margin: 1.4em 0;
}
.prose th, .prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}
.prose th { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }

/* Words of Jesus */
.words-jesus-prose h2 {
  margin-top: 2.8em;
}
.jesus-saying {
  margin: 1.1em 0 1.35em;
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid color-mix(in oklab, var(--accent) 24%, var(--rule));
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 92%, var(--accent) 8%), var(--bg));
  box-shadow: 0 18px 50px -36px rgba(0,0,0,.45);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.jesus-saying:hover {
  border-color: color-mix(in oklab, var(--accent) 56%, var(--rule));
}
.jesus-saying.is-selected {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 84%, var(--accent) 16%), var(--bg));
  box-shadow: inset 4px 0 0 var(--accent), 0 24px 58px -38px rgba(0,0,0,.5);
}
.jesus-saying h3 {
  margin: 0 0 .65em;
  color: var(--accent);
}
.prose .jesus-saying blockquote,
.jesus-quote {
  margin: .8em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid color-mix(in oklab, var(--accent) 75%, var(--rule));
  color: var(--ink);
  font-size: 1.02em;
}
.jesus-context {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 12px;
  font-family: var(--sans);
}
.jesus-context span {
  display: block;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: color-mix(in oklab, var(--bg-2) 54%, transparent);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}
.jesus-context b {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.jesus-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--sans);
}
.jesus-tools button,
.jesus-tools a {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font: 600 11px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.jesus-tools button:hover,
.jesus-tools a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Contradictions page */
.contradictions-prose > h1 {
  font-size: clamp(28px, 4vw, 40px);
}
.contradiction-tools {
  position: sticky;
  top: calc(58px + var(--safe-top));
  z-index: 4;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 26px;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.contradiction-tools button {
  min-height: 32px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 11px;
  background: transparent;
  color: var(--ink-soft);
  font: 600 11px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.contradiction-tools button.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.contradiction-card {
  margin: 1.05em 0 1.25em;
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 92%, var(--bg-2)), var(--bg));
  box-shadow: 0 20px 56px -42px rgba(0,0,0,.45);
}
.contradiction-card[data-strength="hard"] {
  border-color: color-mix(in oklab, var(--accent) 42%, var(--rule));
}
.contradiction-card h3 {
  margin-top: 0;
  color: var(--ink);
}
.contradiction-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--sans);
}
.contradiction-meta span,
.contradiction-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 11px;
  line-height: 1;
}
.contradiction-meta span:first-child {
  border-color: color-mix(in oklab, var(--accent) 38%, var(--rule));
  color: var(--accent);
}
.contradiction-card p {
  margin-bottom: .65em;
}
.contradiction-card p strong:first-child {
  font-family: var(--sans);
  font-size: .72em;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
}

/* drop cap on first paragraph after rule */
.prose > p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 4.6em;
  line-height: .85;
  padding: 6px 10px 0 0;
  color: var(--accent);
  font-weight: 500;
}

/* lede: first paragraph slightly larger, lighter color */
.prose > p:first-of-type {
  font-size: 1.06em;
  color: var(--ink);
}
.essay-one-story .prose > p:first-of-type,
.essay-one-story .prose > p:nth-of-type(2) {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.46;
  color: var(--ink-soft);
}
.essay-one-story .prose h2 {
  margin-top: 2.7em;
}
.essay-one-story .prose h2::before {
  width: 52px;
}
.essay-one-story .prose ol {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 18px 18px 42px;
  background: color-mix(in oklab, var(--bg-2) 44%, transparent);
}
.essay-one-story .prose ol li {
  padding-left: 4px;
  margin-bottom: .55em;
}
/* extra breathing room before each h2 except the first */
.prose h2 + p { margin-top: .2em; }
/* italic intro phrase highlight */
.prose p > em:first-child { color: var(--accent-soft); font-style: italic; }
/* small caps eyebrow available via class */
.prose .eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2.4em; margin-bottom: -.4em;
}

/* PAGER */
.pager {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pager a {
  display: block; padding: 18px 20px;
  border: 1px solid var(--rule); border-radius: 12px;
  text-decoration: none; color: var(--ink);
  transition: border-color .2s ease, background .2s ease;
}
.pager a:hover { border-color: var(--accent); background: var(--bg-2); }
.pager .lab {
  display: block;
  font-family: var(--sans); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-mute);
  margin-bottom: 6px;
}
.pager .ttl { font-family: var(--serif); font-size: 18px; font-style: italic; }
.pager .next { text-align: right; }
.pager .empty { visibility: hidden; }

/* TO TOP */
.totop {
  position: fixed; right: 18px; bottom: calc(18px + var(--safe-bot));
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  z-index: 25;
  opacity: 0; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.totop[aria-visible="true"] { opacity: 1; transform: translateY(0); }
.totop svg { width: 18px; height: 18px; }

/* anims */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.article, .home { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }

@media (max-width: 540px) {
  body { font-size: 18px; }
  .prose { font-size: 18px; }
  .title { font-size: clamp(52px, 18vw, 92px); }
  .pager { grid-template-columns: 1fr; }
  .book-intro-grid { grid-template-columns: 1fr; }
  .jesus-context { grid-template-columns: 1fr; }
  .religion-time-item { grid-template-columns: 1fr; gap: 8px; }
  .religion-time-item::before { display: none; }
  .religion-time-date,
  .religion-time-item.is-left .religion-time-card,
  .religion-time-item.is-right .religion-time-card {
    grid-column: 1;
    grid-row: auto;
  }
  .timeline-evidence { grid-template-columns: 1fr; }
  .religion-time-top { flex-direction: column; align-items: flex-start; }
  .timeline-modebar { width: 100%; }
  .timeline-swipe-head { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .timeline-slide.is-active { grid-template-columns: 1fr; }
  .timeline-slide-date {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 4px 6px 16px;
  }
  .timeline-slide-date span { font-size: 28px; }
  .timeline-swipe-viewport,
  .timeline-slide {
    min-height: 0;
  }
}

/* ═══════════════════════════════════════════
   Jesus Carousel
   ═══════════════════════════════════════════ */
.jesus-carousel-host {
  padding: 0;
  margin: 0;
}
.jesus-carousel {
  display: flex;
  flex-direction: column;
  width: 100%;
  -webkit-user-select: none;
  user-select: none;
}
.jc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 10px;
  font-family: var(--sans);
  min-height: 28px;
}
.jc-section {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 12px;
}
.jc-counter {
  font-size: 12px;
  color: var(--ink-mute);
  white-space: nowrap;
  flex-shrink: 0;
}
.jc-swipe-hint {
  flex: 1;
  text-align: center;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: .6;
  pointer-events: none;
}
.jc-viewport {
  /* clip slides horizontally without locking vertical overflow */
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
  /* let the browser handle vertical scroll; JS handles horizontal swipe */
  touch-action: pan-y;
}
.jc-track {
  display: flex;
  transition: transform .32s cubic-bezier(.25, .46, .45, .94);
  will-change: transform;
}
.jc-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 0 4px;
}
/* override scroll-list margin on carousel cards */
.jesus-carousel-host .jesus-saying {
  margin: 0;
  position: relative;
}
.jc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 6px;
  gap: 12px;
}
.rand-carousel .jc-footer {
  max-width: 520px;
  margin: 0 auto;
  padding-top: 18px;
}
.rand-carousel .jc-btn {
  width: 38px;
  height: 38px;
  font-size: 20px;
}
.jc-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.jc-btn:hover  { border-color: var(--accent); color: var(--accent); }
.jc-btn:active { background: color-mix(in oklab, var(--accent) 10%, transparent); }
.jc-btn:disabled { opacity: .3; pointer-events: none; }
.rand-new-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid color-mix(in oklab, var(--accent) 48%, var(--rule));
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 10%, var(--bg));
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s;
}
.rand-new-btn:hover {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 15%, var(--bg));
  transform: translateY(-1px);
}
.rand-new-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.jc-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  align-items: center;
  flex: 1;
}
.jc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-mute);
  opacity: .35;
  transition: opacity .15s, transform .15s, background .15s;
  cursor: pointer;
  flex-shrink: 0;
}
.jc-dot.is-active {
  background: var(--accent);
  opacity: 1;
  transform: scale(1.28);
}

/* Favorite star on Jesus card */
.jesus-saying { position: relative; }
.jc-star {
  position: absolute;
  top: 11px;
  right: 11px;
  font-size: 15px;
  color: var(--accent);
  pointer-events: none;
  z-index: 2;
  line-height: 1;
  animation: jcStarPop .22s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes jcStarPop {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Favorite star on Bible verses */
.v.is-faved .vn::after {
  content: "★";
  display: inline-block;
  font-size: 8px;
  color: var(--accent);
  margin-left: 2px;
  vertical-align: super;
  opacity: .8;
}

/* Context menu faved state */
.ctx button.is-faved .ki { color: var(--accent); }
.ctx button.is-faved    { color: var(--accent); }
.ctx-note {
  max-width: 260px;
  padding: 8px 12px 10px;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.45;
}

/* Site directory */
.directory-page {
  max-width: 1180px;
}
.directory-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 14px;
}
.directory-stats div {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 13px 14px;
  background: color-mix(in oklab, var(--bg-2) 46%, transparent);
}
.directory-stats span,
.directory-note span {
  display: block;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.directory-stats b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1;
}
.directory-note {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0 0 22px;
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.directory-note p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.dir-card {
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: color-mix(in oklab, var(--bg-2) 42%, transparent);
  overflow: clip;
}
.dir-card[open] {
  border-color: color-mix(in oklab, var(--accent) 45%, var(--rule));
  background: color-mix(in oklab, var(--bg-2) 62%, transparent);
}
.dir-card summary {
  display: grid;
  gap: 8px;
  padding: 17px 18px;
  cursor: pointer;
  list-style: none;
}
.dir-card summary::-webkit-details-marker { display: none; }
.dir-card-kicker {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.dir-card-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  line-height: .98;
}
.dir-card-summary {
  min-height: 2.9em;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}
.dir-card-meta,
.dir-child-side {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.dir-card-meta span,
.dir-reviewed,
.dir-voice {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dir-voice.is-nate {
  color: #8bd7a1;
  border-color: color-mix(in oklab, #8bd7a1 40%, var(--rule));
}
.dir-voice.is-browser {
  color: var(--accent);
  border-color: color-mix(in oklab, var(--accent) 45%, var(--rule));
}
.dir-voice.is-pending {
  color: #e8a16d;
  border-color: color-mix(in oklab, #e8a16d 42%, var(--rule));
}
.dir-voice.is-interface {
  color: var(--ink-mute);
}
.dir-reviewed {
  color: #8bd7a1;
  border-color: color-mix(in oklab, #8bd7a1 38%, var(--rule));
}
.dir-card-body {
  padding: 0 14px 14px;
}
.dir-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.dir-card-actions span {
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 12px;
}
.dir-child-list {
  display: grid;
  gap: 8px;
  max-height: 470px;
  overflow: auto;
  padding-right: 2px;
}
.dir-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: color-mix(in oklab, var(--bg) 54%, transparent);
}
.dir-child:hover {
  border-color: color-mix(in oklab, var(--accent) 45%, var(--rule));
}
.dir-child-main {
  min-width: 0;
}
.dir-child-main b,
.dir-child-main small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.dir-child-main b {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.25;
}
.dir-child-main small {
  margin-top: 3px;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 820px) {
  .directory-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .directory-stats div {
    padding: 11px 12px;
  }
  .directory-grid {
    grid-template-columns: 1fr;
  }
  .directory-note {
    grid-template-columns: 1fr;
  }
  .dir-child {
    grid-template-columns: 1fr;
  }
  .dir-child-side {
    justify-content: flex-start;
  }
}

/* Glossary */
.glossary-page {
  max-width: 1180px;
}
.glossary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 16px;
}
.glossary-stats div,
.glossary-focus {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: color-mix(in oklab, var(--bg-2) 48%, transparent);
}
.glossary-stats div {
  padding: 13px 14px;
}
.glossary-stats span,
.glossary-focus span,
.glossary-search span,
.glossary-count,
.glossary-term header span,
.glossary-see span {
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.glossary-stats b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1;
}
.glossary-focus {
  margin: 0 0 16px;
  padding: 16px 18px;
}
.glossary-focus h2 {
  margin: 5px 0 8px;
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 48px);
  line-height: .98;
  font-weight: 500;
}
.glossary-focus p {
  max-width: 820px;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
}
.glossary-tools {
  display: grid;
  gap: 10px;
  margin: 16px 0 18px;
  padding: 14px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.glossary-search {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.glossary-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: color-mix(in oklab, var(--bg) 62%, transparent);
  font: 600 15px/1.2 var(--sans);
  outline: none;
}
.glossary-search input:focus {
  border-color: color-mix(in oklab, var(--accent) 58%, var(--rule));
}
.glossary-filters,
.glossary-alpha,
.glossary-tags,
.glossary-see {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.glossary-filter,
.glossary-letter,
.glossary-tags span,
.glossary-see a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ink-soft);
  background: color-mix(in oklab, var(--bg-2) 38%, transparent);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.1;
  text-decoration: none;
}
.glossary-filter,
.glossary-letter {
  cursor: pointer;
}
.glossary-filter span {
  color: var(--accent);
}
.glossary-filter.is-active,
.glossary-letter.is-active {
  color: var(--bg);
  border-color: var(--accent);
  background: var(--accent);
}
.glossary-filter.is-active span {
  color: var(--bg);
}
.glossary-count {
  margin: 2px 0 0;
}
.glossary-count b {
  color: var(--accent);
}
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.glossary-term {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg-2) 54%, transparent), color-mix(in oklab, var(--bg) 86%, transparent));
}
.glossary-term[hidden] {
  display: none;
}
.glossary-term.is-focused {
  border-color: color-mix(in oklab, var(--accent) 65%, var(--rule));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 36%, transparent) inset;
}
.glossary-term header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.glossary-term header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.glossary-term header a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
}
.glossary-term h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 40px);
  line-height: .98;
  font-weight: 500;
}
.glossary-term p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
}
.glossary-term .glossary-know {
  color: color-mix(in oklab, var(--ink) 80%, var(--ink-soft));
}
.glossary-term .glossary-know b {
  color: var(--accent);
  font-weight: 760;
}
.glossary-tags span {
  min-height: 24px;
  padding: 4px 8px;
  color: var(--ink-mute);
  font-size: 10px;
  text-transform: uppercase;
}
.glossary-see {
  margin: 2px 0 0;
}
.glossary-see a {
  min-height: 26px;
  padding: 4px 8px;
  color: var(--accent);
  font-size: 10px;
}
.glossary-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 20px 18px;
  border: 1px dashed var(--rule);
  border-radius: 8px;
}
.glossary-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
}

/* Comfortable targets for fingers: phones and touch screens */
@media (max-width: 820px), (pointer: coarse) {
  .glossary-filter,
  .glossary-letter {
    min-height: 42px;
    padding: 8px 14px;
    font-size: 12px;
  }
  .glossary-letter {
    min-width: 42px;
    justify-content: center;
  }
  .glossary-see a {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 11px;
  }
  .glossary-term header a {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 820px) {
  .glossary-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .glossary-stats div {
    padding: 10px 11px;
  }
  .glossary-stats b {
    font-size: 15px;
    line-height: 1.25;
  }
  .glossary-grid {
    grid-template-columns: 1fr;
  }
  .glossary-tools {
    padding-inline: 0;
  }
  .glossary-filters,
  .glossary-alpha {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-block: 2px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .glossary-filters::-webkit-scrollbar,
  .glossary-alpha::-webkit-scrollbar {
    display: none;
  }
  .glossary-filter,
  .glossary-letter {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* ═══════════════════════════════════════════
   Favorites Page
   ═══════════════════════════════════════════ */
.fav-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.fav-item {
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: color-mix(in oklab, var(--bg-2) 40%, transparent);
  transition: border-color .15s;
}
.fav-item:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--rule)); }
.fav-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.fav-star-icon {
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}
.fav-ref {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  flex: 1;
}
.fav-ref:hover { color: var(--accent); }
.fav-kind {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 3px 7px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  flex-shrink: 0;
}
.fav-remove {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-mute);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.fav-remove:hover { border-color: #c44; color: #c44; }
.fav-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.fav-when {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
}

/* Library favorites card */
.lib-fav-card {
  display: flex;
  flex-direction: column;
}
.lib-fav-card .stat {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   Verse Carousel (swipe mode)
   ═══════════════════════════════════════════ */
.vc-host { padding: 0; }
.verse-carousel { display: flex; flex-direction: column; }
.vc-track {
  display: flex;
  transition: transform .28s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.vc-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 0 4px;
}
.vc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: clamp(220px, 28vh, 340px);
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: clamp(20px, 5vw, 36px) clamp(20px, 5vw, 32px);
  border: 1px solid color-mix(in oklab, var(--accent) 18%, var(--rule));
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 93%, var(--accent) 7%), var(--bg));
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
}
.vc-card:hover    { border-color: color-mix(in oklab, var(--accent) 42%, var(--rule)); }
.vc-card.is-selected {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}
.vc-vn {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.vc-vt {
  display: block;
  font-family: var(--serif);
  font-size: clamp(19px, 5vw, 24px);
  line-height: 1.65;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.vc-note-dot {
  position: absolute;
  bottom: 12px;
  right: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .55;
}
/* progress bar at bottom of carousel nav */
.vc-progress-wrap {
  flex: 1;
  height: 3px;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
}
.vc-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .28s ease;
}
/* mode toggle in reader-settings */
.seg-vm button {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 13px;
}
.vc-host[data-size="s"] .vc-vt { font-size: clamp(18px, 3vw, 22px); line-height: 1.58; }
.vc-host[data-size="m"] .vc-vt { font-size: clamp(20px, 3.4vw, 25px); line-height: 1.62; }
.vc-host[data-size="l"] .vc-vt { font-size: clamp(23px, 3.8vw, 30px); line-height: 1.66; }
.vc-host[data-size="xl"] .vc-vt { font-size: clamp(26px, 4.3vw, 34px); line-height: 1.68; }

/* Listen button in Jesus carousel footer */
.jc-listen {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 0 14px !important;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent) !important;
  border-color: color-mix(in oklab, var(--accent) 40%, var(--rule)) !important;
}
.jc-listen:hover {
  background: color-mix(in oklab, var(--accent) 12%, transparent) !important;
}
.jc-listen svg { width: 12px; height: 12px; flex-shrink: 0; fill: var(--accent); }

/* Essay reader row — holds the Listen/Speed launcher */
.essay-reader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
  min-height: 32px;
}
.essay-reader-row:empty { display: none; }

@media (max-width: 540px) {
  .vc-vt { font-size: 19px; }
  .vc-card { min-height: 180px; padding: 20px; }
  .vc-host[data-size="l"] .vc-vt { font-size: 22px; }
  .vc-host[data-size="xl"] .vc-vt { font-size: 24px; }
}

/* ═══════════════════════════════════════════
   Random Page
   ═══════════════════════════════════════════ */
.rand-carousel {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.rand-track {
  display: flex;
  transition: transform .3s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.rand-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 0 4px;
}
.rand-card {
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--rule));
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--bg) 93%, var(--accent) 7%),
    var(--bg));
  min-height: 300px;
  display: flex;
  align-items: flex-start;
  transition: border-color .2s;
}
.rand-loading {
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.rand-skel { padding: 24px; width: 100%; }
.rand-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.rand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
  font-family: var(--sans);
  gap: 8px;
}
.rand-book-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.rand-testament {
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.rand-ref-big {
  padding: 8px 20px 16px;
  font-family: var(--serif);
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.rand-text {
  padding: 16px 20px 18px;
  font-family: var(--serif);
  font-size: clamp(17px, 4.5vw, 20px);
  line-height: 1.72;
  color: var(--ink);
  border-top: 1px solid var(--rule);
}
.rand-text p {
  margin: 0 0 .5em;
}
.rand-text p:last-child { margin: 0; }
.rand-vn {
  font-size: .6em;
  color: var(--accent);
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  margin-right: 4px;
}
.rand-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg-2) 28%, transparent);
}
.rand-act {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.rand-act:hover  { border-color: var(--accent); color: var(--accent); }
.rand-act:active { background: color-mix(in oklab, var(--accent) 10%, transparent); }
.rand-act.is-faved { border-color: var(--accent); color: var(--accent); }
.rand-act-next {
  width: auto;
  min-width: 92px;
  padding: 0 14px;
  border-radius: 999px;
  margin-left: auto;
  color: var(--accent);
  border-color: color-mix(in oklab, var(--accent) 46%, var(--rule));
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.rand-hint {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  text-align: center;
  flex: 1;
  letter-spacing: .02em;
}
.rand-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 240px;
  padding: 32px 24px;
  color: var(--ink-mute);
  font-family: var(--sans);
  font-size: 14px;
  text-align: center;
  width: 100%;
}

@media (max-width: 540px) {
  .jc-btn { width: 38px; height: 38px; font-size: 20px; }
  .rand-carousel .jc-footer { gap: 8px; }
  .rand-new-btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 11px;
    letter-spacing: .08em;
  }
  .rand-new-btn svg { width: 14px; height: 14px; }
  .fav-text { font-size: 14px; }
  .rand-text { font-size: 17px; padding: 14px 16px 16px; }
  .rand-ref-big { font-size: 22px; padding: 8px 16px 14px; }
  .rand-top { padding: 14px 16px 0; }
  .rand-actions { padding: 10px 12px 12px; gap: 6px; }
  .rand-act { width: 38px; height: 38px; font-size: 17px; }
  .rand-act-next {
    width: auto;
    min-width: 78px;
    padding: 0 10px;
    font-size: 10px;
  }
}

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

::selection { background: var(--accent); color: #fff; }
