/* ═══════════════════════════════════════════════════════════════
   The Words of Jesus — stylesheet
   Source of truth: brand-kit/BRAND.md
   "A dark room and one voice lit in red. Red belongs to one voice."
   Mobile-first; desktop rules live in min-width queries.
   ═══════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, SIL Open Font License) ─────────────── */
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/Newsreader.woff2') format('woff2');
  font-weight: 300 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/Newsreader-Italic.woff2') format('woff2');
  font-weight: 300 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}

/* ── Tokens (brand-kit/BRAND.md §02) ────────────────────────── */
:root {
  --night: #0D0B09;
  --ash: #1A1714;
  --ash-2: #221e1a;
  --smoke: #8B8378;
  --smoke-2: #5c554c;
  --bone: #EDE6D8;
  --bone-2: #B8AFA1;
  --voice: #E0192E;
  --voice-deep: #B3001B;
  --hairline: rgba(237, 230, 216, 0.12);
  --hairline-strong: rgba(237, 230, 216, 0.22);
  --glow: 0 1px 2px rgba(13, 11, 9, 0.9), 0 0 22px rgba(179, 0, 27, 0.35);

  /* Gospels: bone to smoke. Never red. */
  --matthew: #EDE6D8;
  --mark: #B8AFA1;
  --luke: #8B8378;
  --john: #5c554c;

  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-ui: 'Geist', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --reveal-dur: 1.1s;

  --nav-h: 104px; /* two rows: brand + Menu, then the link row. One row from 1024px. */
  --tabbar-h: 0px;
  --gutter: clamp(20px, 5vw, 48px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --measure: 640px;
}

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  color-scheme: dark;
  background: var(--night);
}
body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--bone);
  background: var(--night);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong, b { font-weight: 600; }
:focus-visible { outline: 1px solid var(--bone); outline-offset: 4px; }
::selection { background: rgba(237, 230, 216, 0.18); }
input[type='search']::-webkit-search-cancel-button, input[type='search']::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Film grain (BRAND §05): 6–8%, slow drift, on every surface */
.grain {
  position: fixed; inset: -200px; z-index: 300; pointer-events: none;
  opacity: 0.07; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: grain-drift 9s steps(9) infinite;
}
@keyframes grain-drift {
  0% { transform: translate(0, 0); } 20% { transform: translate(-60px, 40px); } 40% { transform: translate(40px, -70px); }
  60% { transform: translate(-30px, -30px); } 80% { transform: translate(70px, 20px); } 100% { transform: translate(0, 0); }
}

/* The bloom (BRAND §05): behind his words, offset above, and nowhere else */
.bloom {
  position: absolute; left: 50%; top: -40px; width: 420px; height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(179, 0, 27, 0.42), transparent 70%);
  filter: blur(40px); pointer-events: none; z-index: 0;
  animation: bloom-breathe 9s ease-in-out infinite;
}
@keyframes bloom-breathe { 0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.12); } }
.has-bloom { position: relative; }
.has-bloom > :not(.bloom) { position: relative; z-index: 1; }

/* ── Type roles (BRAND §03) ─────────────────────────────────── */
.eyebrow, .stat-label, .featured-label, .passage-ref, .quote-ref, .modal-ref, .blueprint-passages-label,
.stat-pill .lbl, .sermon-arc-num, .iam-step-num, .iam-ref, .parable-explanation-label, .parable-interpretation-label,
.miracle-significance-label, .journey-significance-label, .prayer-significance-label, .journey-period-header,
.miracle-timeline-period-header, .search-results-count, .parallel-col h4, .sermon-stat-label, .prayer-label,
.blueprint-data-insight strong, .modal-themes h4, .iam-step-dimension, .antithesis-old::before, .antithesis-new::before,
.prayer-hp-section-range, .section-heading, .drawer-group-label, .featured-ref, .parable-passage-ref, .miracle-words-ref,
.blueprint-frequency, .search-result-ref, .command-category-range, .gospel-share-title h3 {
  font-family: var(--font-ui); font-weight: 400;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--smoke); line-height: 1.5;
}
/* His words: Bodoni italic, red, glow. Never below 22px. */
.voice, .featured-text, .passage-text, .quote-text, .modal-text, .parable-passage, .miracle-words, .prayer-quote,
.iam-statement, .iam-step-statement, .antithesis-new, .beatitude-condition, .prayer-text, .command-item .cmd,
.search-result-text, .topical-passage-text, .blueprint-key-quote .passage-text, .parallel-col blockquote {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-variation-settings: 'opsz' 16;
  color: var(--voice); text-shadow: var(--glow);
  font-size: 22px; line-height: 1.35;
}
.featured-text, .modal-text, .blueprint-key-quote .passage-text { font-variation-settings: 'opsz' 30; font-weight: 400; }
.caret { display: inline-block; width: 2px; height: 0.9em; background: var(--voice); margin-left: 3px; vertical-align: -0.1em; animation: caret-blink 1s steps(2) infinite; box-shadow: var(--glow); }
@keyframes caret-blink { 50% { opacity: 0; } }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; color: var(--bone); letter-spacing: -0.01em; font-optical-sizing: auto; }
/* Newsreader: readable optical size and medium weight at heading sizes */
h3, h4, .section-card h3, .theme-card h3, .drawer-link-title, .blueprint-title, .analysis-card h4, .sermon-arc-title,
.cooccurrence-pair, .heatmap td:first-child, .data-table td:first-child, .command-category-head h4, .prayer-hp-section-title,
.parable-title, .miracle-title, .topical-title, .journey-moment-title, .prayer-card-title, .unique-gospel-card h4,
.miracle-timeline-period-header, .miracle-gospel-matrix td:first-child, .journey-insight-box h3, .prayer-title, .brand,
.blueprint-rank, .iam-number, .beatitude-num, .section-card .card-count { font-variation-settings: 'opsz' 18; font-weight: 500; }
.view-header h2, .hero-title, .analysis-section h3, .journey-period-header, .heatmap-section h3, .cooccurrence-section h3 { font-variation-settings: 'opsz' 48; font-weight: 400; }
.stat-number, .stat-pill .num, .sermon-stat-num { font-variation-settings: 'opsz' 36; font-weight: 400; }
.narration, p { color: var(--bone-2); }

/* ── Top bar ────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-h) + var(--safe-t)); padding-top: var(--safe-t);
  background: rgba(13, 11, 9, 0.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; height: var(--nav-h); padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: 60px 44px; grid-template-areas: "brand menu" "links links";
  align-items: center; column-gap: 24px;
}
.brand { grid-area: brand; }
.menu-btn { grid-area: menu; }
.brand { font-family: var(--font-display); font-size: 20px; color: var(--bone); white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; letter-spacing: -0.005em; }
.brand:hover { color: #fff; }
/* The link row scrolls sideways when it must. Even gaps, no separators, edges fade so the scroll is discoverable. */
.nav-links {
  grid-area: links; display: flex; align-items: center; gap: 24px; min-width: 0; align-self: start;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding-inline: var(--gutter);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link { font-family: var(--font-ui); font-weight: 400; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); padding: 12px 0; white-space: nowrap; flex-shrink: 0; transition: color .4s; border-bottom: 1px solid transparent; }
.nav-link:hover { color: var(--bone-2); }
.nav-link.active { color: var(--bone); border-bottom-color: var(--bone); }
.nav-link.rnd { opacity: .6; }
.menu-btn { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone); min-height: 44px; padding: 0 4px; justify-self: end; }

/* ── Drawer ─────────────────────────────────────────────────── */
.drawer-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(13, 11, 9, 0.6); opacity: 0; pointer-events: none; transition: opacity .4s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 160; width: min(380px, 90vw);
  background: var(--ash); border-left: 1px solid var(--hairline);
  opacity: 0; transform: translateY(18px); pointer-events: none; visibility: hidden;
  transition: opacity .5s var(--ease-out), transform .7s var(--ease-out), visibility 0s .5s;
  display: flex; flex-direction: column; padding-top: var(--safe-t); overscroll-behavior: contain;
}
body.drawer-open .drawer { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 24px; border-bottom: 1px solid var(--hairline); }
.drawer-close { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); min-height: 44px; }
.drawer-close:hover { color: var(--bone); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.drawer-group { padding: 18px 0 8px; }
.drawer-group + .drawer-group { border-top: 1px solid var(--hairline); }
.drawer-group-label { padding: 0 0 8px; font-size: 10px; }
.drawer-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; min-height: 52px; border-bottom: 1px solid var(--hairline); color: var(--bone-2); transition: color .3s; }
.drawer-link:last-child { border-bottom: none; }
.drawer-link:hover { color: var(--bone); }
.drawer-link.active { color: var(--bone); }
.drawer-link-title { font-family: var(--font-display); font-size: 22px; line-height: 1.15; color: inherit; }
.drawer-link.active .drawer-link-title { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.drawer-link-desc { font-family: var(--font-ui); font-size: 13px; color: var(--bone-2); line-height: 1.4; }
.drawer-link.rnd { opacity: .6; }

/* ── Bottom tab bar (phones; text only — BRAND §04) ─────────── */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(13, 11, 9, 0.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--hairline); }
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-h); }
.tab-item { display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); -webkit-tap-highlight-color: transparent; transition: color .3s; }
.tab-item.active { color: var(--bone); }

/* ── Layout ─────────────────────────────────────────────────── */
main { max-width: 1160px; margin: 0 auto; padding: calc(var(--nav-h) + var(--safe-t) + 32px) var(--gutter) calc(64px + var(--tabbar-h) + var(--safe-b)); position: relative; z-index: 1; }
.view { display: none; }
.view.active { display: block; animation: view-in .9s var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.view-header { padding: 8px 0 40px; max-width: 760px; }
.view-header h2 { font-size: clamp(40px, 7vw, 72px); line-height: 1; letter-spacing: -0.02em; }
.view-header p { font-size: 18px; color: var(--bone-2); margin-top: 18px; line-height: 1.6; max-width: var(--measure); }
.section-heading { margin: 56px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero { padding: 8px 0 40px; }
.hero .eyebrow { margin-bottom: 22px; }
.hero .eyebrow i { font-style: normal; margin: 0 8px; opacity: .5; }
.hero-title { font-size: clamp(56px, 11vw, 112px); line-height: 0.98; letter-spacing: -0.02em; max-width: 12ch; }
.hero-subtitle { font-size: clamp(17px, 2vw, 19px); color: var(--bone-2); margin-top: 24px; max-width: 520px; line-height: 1.6; }

/* ── Search ─────────────────────────────────────────────────── */
.search-global, .search-bar, .topical-search-bar { max-width: 640px; margin: 0 0 40px; position: relative; }
.search-global input, .search-bar input, .topical-search-bar input {
  width: 100%; padding: 16px 52px 16px 18px;
  font-family: var(--font-ui); font-weight: 300; font-size: 16px; color: var(--bone);
  background: var(--ash); border: 1px solid var(--hairline); border-radius: 12px;
  -webkit-appearance: none; appearance: none; transition: border-color .4s;
}
.search-global input:focus, .search-bar input:focus, .topical-search-bar input:focus { outline: none; border-color: var(--hairline-strong); }
.search-global input::placeholder, .search-bar input::placeholder, .topical-search-bar input::placeholder { color: var(--smoke); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 40px; padding: 0 12px; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); display: none; }
.search-clear:hover { color: var(--bone); }
.search-global.has-value .search-clear { display: inline-flex; align-items: center; }

/* ── A word for today (BRAND §04: Today screen) ─────────────── */
.featured { padding: 40px 0 48px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: 8px; overflow: hidden; }
.featured .bloom { top: -80px; left: 30%; }
.featured-label { margin-bottom: 28px; display: flex; justify-content: space-between; gap: 16px; }
.featured-ref { color: var(--smoke); }
.featured-text { font-size: clamp(26px, 4.2vw, 44px); line-height: 1.2; max-width: 22ch; min-height: 1.2em; cursor: text; }
.featured-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.btn-bone {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px;
  background: var(--bone); color: var(--night); border-radius: 12px;
  font-family: var(--font-ui); font-weight: 400; font-size: 14px; letter-spacing: 0.02em;
  transition: transform .5s var(--ease-out), background .3s;
}
.btn-bone:hover { background: #fff; transform: translateY(-1px); }
.btn-text { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); transition: color .3s; }
.btn-text:hover { color: var(--bone); }

/* ── Numbers (BRAND §03: Number) ────────────────────────────── */
.stats-grid, .stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; padding: 36px 0 32px; border-bottom: 1px solid var(--hairline); margin-bottom: 8px; }
.stat-card, .stat-pill { display: flex; flex-direction: column; gap: 8px; }
.stat-number, .stat-pill .num, .sermon-stat-num { font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 6vw, 72px); line-height: 0.95; color: var(--bone); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-pill .lbl, .stat-label { font-size: 11px; }

/* ── Gospel share ───────────────────────────────────────────── */
.gospel-share { padding: 28px 0 32px; border-bottom: 1px solid var(--hairline); }
.gospel-share-title { margin-bottom: 18px; }
.gospel-bar { display: flex; gap: 2px; height: 3px; }
.gospel-bar-segment { opacity: .9; }
.gospel-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; margin-top: 16px; font-family: var(--font-ui); font-size: 15px; color: var(--bone); }
.gospel-legend li { display: flex; align-items: center; gap: 10px; }
.gospel-legend .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gospel-legend .n { margin-left: auto; color: var(--smoke); font-variant-numeric: tabular-nums; font-size: 12px; letter-spacing: 0.08em; }

/* ── Rows (BRAND §04: lists are rows) ───────────────────────── */
.section-cards { display: flex; flex-direction: column; }
.section-card { display: flex; align-items: baseline; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--hairline); color: inherit; transition: padding-left .5s var(--ease-out); }
.section-card:hover { padding-left: 8px; }
.section-card:hover h3 { color: #fff; }
.section-card-text { flex: 1; min-width: 0; }
.section-card h3 { font-size: clamp(24px, 3vw, 30px); line-height: 1.1; transition: color .3s; }
.section-card p { font-family: var(--font-ui); font-size: 16px; color: var(--bone-2); line-height: 1.55; margin-top: 6px; max-width: var(--measure); }
.section-card .card-count { font-family: var(--font-display); font-size: 20px; color: var(--smoke); white-space: nowrap; }
.section-card.rnd { opacity: .55; }

/* ── Themes ─────────────────────────────────────────────────── */
.themes-grid { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); margin-bottom: 64px; }
.theme-card { padding: 22px 0; border-bottom: 1px solid var(--hairline); cursor: pointer; transition: padding-left .5s var(--ease-out); }
.theme-card:hover { padding-left: 8px; }
.theme-card.expanded { cursor: default; padding-left: 0; }
.theme-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.theme-card h3 { font-size: 26px; line-height: 1.1; }
.theme-card-count { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); white-space: nowrap; }
.theme-keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.keyword { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--smoke); padding: 5px 10px; border: 1px solid var(--hairline); border-radius: 999px; }
.theme-gospel-bar { display: flex; gap: 2px; height: 2px; margin-top: 16px; max-width: 320px; }
.theme-detail { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.theme-passages li { padding: 22px 0; border-bottom: 1px solid var(--hairline); cursor: pointer; }
.theme-passages li:last-child { border-bottom: none; }
.theme-passages li:hover .passage-text { color: #ff2e44; }
.passage-ref { margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.passage-gospel { font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); padding: 3px 8px; border: 1px solid var(--hairline); border-radius: 999px; background: transparent !important; }
.passage-text { font-size: clamp(22px, 2.6vw, 26px); }

.heatmap-section, .cooccurrence-section { margin-bottom: 64px; }
.heatmap-section h3, .cooccurrence-section h3 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 8px; line-height: 1.1; }
.cooccurrence-subtitle { font-size: 16px; color: var(--bone-2); margin-bottom: 24px; max-width: var(--measure); }
.heatmap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 24px; border-top: 1px solid var(--hairline); }
.heatmap table { width: 100%; min-width: 460px; border-collapse: collapse; font-family: var(--font-ui); }
.heatmap th { padding: 14px 10px; text-align: center; font-weight: 400; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); border-bottom: 1px solid var(--hairline); }
.heatmap th:first-child, .heatmap td:first-child { text-align: left; position: sticky; left: 0; background: var(--night); }
.heatmap td { padding: 10px; text-align: center; border-bottom: 1px solid var(--hairline); }
.heatmap td:first-child { font-family: var(--font-display); font-size: 18px; color: var(--bone); white-space: nowrap; }
.heatmap-cell { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 30px; font-size: 13px; font-variant-numeric: tabular-nums; }
.cooccurrence-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.cooccurrence-item { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.cooccurrence-pair { font-family: var(--font-display); font-size: 22px; color: var(--bone); line-height: 1.2; }
.cooccurrence-pair .hl { color: var(--bone); }
.cooccurrence-count { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smoke); white-space: nowrap; }

/* ── Graph / Math ───────────────────────────────────────────── */
#graph-container { width: 100%; height: min(72vh, 850px); min-height: 420px; border: 1px solid var(--hairline); position: relative; overflow: hidden; background: #0a0a14; }
#graph-container iframe, #math-container iframe { width: 100%; height: 100%; border: 0; display: block; }
#math-container { width: 100%; height: min(80vh, 900px); border: 1px solid var(--hairline); overflow: hidden; }
.graph-note { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-2); margin-top: 14px; }
.math-intro { max-width: 760px; margin-bottom: 40px; }
.math-intro-text { font-size: 17px; line-height: 1.7; color: var(--bone-2); }
.math-intro-text + .math-intro-text, #math-intro-more .math-intro-text { margin-top: 18px; }
.math-intro .featured-more { display: inline-block; margin-top: 18px; }
.featured-more { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); cursor: pointer; }
.featured-more:hover { color: var(--bone); }

/* ── Modal / bottom sheet ───────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(13, 11, 9, 0.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); align-items: flex-end; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal {
  background: var(--ash); width: 100%; max-height: 90vh; max-height: 90dvh;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 28px 24px calc(36px + var(--safe-b)); position: relative;
  border-top: 1px solid var(--hairline); border-radius: 20px 20px 0 0;
  animation: sheet-in .7s var(--ease-out);
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .bloom { top: -60px; left: 40%; }
.modal-close { position: absolute; top: 18px; right: 20px; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); min-height: 40px; z-index: 2; }
.modal-close:hover { color: var(--bone); }
.modal-ref { margin-bottom: 26px; padding-right: 72px; }
.modal-text { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.25; min-height: 1.25em; cursor: text; }
.modal-actions { margin-top: 26px; }
.modal-themes { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--hairline); }
.modal-themes h4 { margin-bottom: 12px; }
.modal-theme-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-theme-tag { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone-2); padding: 9px 14px; border: 1px solid var(--hairline); border-radius: 999px; cursor: pointer; transition: border-color .3s, color .3s; }
.modal-theme-tag:hover { border-color: var(--bone); color: var(--bone); }

/* ── Blueprint ──────────────────────────────────────────────── */
#blueprint-container { border-top: 1px solid var(--hairline); margin-bottom: 72px; }
.blueprint-card { border-bottom: 1px solid var(--hairline); }
.blueprint-header { padding: 26px 0; cursor: pointer; display: flex; align-items: flex-start; gap: 20px; }
.blueprint-rank { font-family: var(--font-display); font-size: 28px; color: var(--smoke); width: 44px; flex-shrink: 0; line-height: 1.1; font-variant-numeric: tabular-nums; }
.blueprint-rank-top { color: var(--bone-2); }
.blueprint-header-text { flex: 1; min-width: 0; }
.blueprint-title { font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 36px); line-height: 1.1; color: var(--bone); }
.blueprint-card:first-child .blueprint-title { font-size: clamp(30px, 4.4vw, 44px); }
.blueprint-frequency { margin-top: 10px; color: var(--bone-2); }
.blueprint-weight { font-family: var(--font-ui); font-size: 15px; color: var(--bone-2); margin-top: 6px; line-height: 1.5; max-width: var(--measure); }
.expander { font-family: var(--font-ui); font-weight: 300; font-size: 22px; color: var(--smoke); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color .3s; line-height: 1; }
.expander::before { content: '+'; }
.expanded > .blueprint-header .expander, .expanded > .parable-header .expander, .expanded > .miracle-header .expander,
.expanded > .topical-header .expander, .expanded > .journey-moment-header .expander, .expanded > .prayer-card-header .expander { color: var(--bone); }
.expanded > .blueprint-header .expander::before, .expanded > .parable-header .expander::before, .expanded > .miracle-header .expander::before,
.expanded > .topical-header .expander::before, .expanded > .journey-moment-header .expander::before, .expanded > .prayer-card-header .expander::before { content: '\2212'; }
.blueprint-body { display: none; padding: 0 0 36px 64px; }
.blueprint-card.expanded .blueprint-body { display: block; animation: view-in .9s var(--ease-out); }
.blueprint-summary { font-size: 18px; line-height: 1.65; color: var(--bone-2); margin-bottom: 32px; max-width: var(--measure); }
.blueprint-key-quote { position: relative; padding: 8px 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--hairline); overflow: visible; }
.blueprint-key-quote .passage-text { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; max-width: 24ch; }
.blueprint-key-quote .passage-ref { margin-top: 16px; margin-bottom: 0; }
.blueprint-data-insight { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--hairline); font-family: var(--font-ui); font-size: 15px; color: var(--bone-2); line-height: 1.6; max-width: var(--measure); }
.blueprint-data-insight strong { display: block; margin-bottom: 10px; }
.blueprint-application { margin-bottom: 32px; max-width: var(--measure); }
.blueprint-application li { padding: 10px 0 10px 28px; position: relative; font-size: 16px; line-height: 1.55; color: var(--bone-2); border-bottom: 1px solid var(--hairline); }
.blueprint-application li::before { content: '\2014'; position: absolute; left: 0; color: var(--smoke); }
.blueprint-passages-label { margin-bottom: 4px; }

/* ── Analysis (shared) ──────────────────────────────────────── */
.analysis-section { margin-bottom: 72px; }
.analysis-section h3 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.05; margin-bottom: 14px; }
.analysis-section > p { font-size: 17px; color: var(--bone-2); margin-bottom: 28px; line-height: 1.6; max-width: var(--measure); }
.analysis-card { padding: 22px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: 24px; }
.analysis-card + .analysis-card { border-top: none; margin-top: -24px; }
.analysis-card h4 { font-family: var(--font-display); font-size: 22px; margin-bottom: 14px; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 14px; min-width: 520px; }
.data-table th { padding: 12px 10px; border-bottom: 1px solid var(--hairline); text-align: center; color: var(--smoke); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 400; white-space: nowrap; }
.data-table td { padding: 14px 10px; text-align: center; border-bottom: 1px solid var(--hairline); color: var(--bone-2); font-variant-numeric: tabular-nums; }
.data-table th:first-child, .data-table td:first-child { text-align: left; font-family: var(--font-display); font-size: 18px; color: var(--bone); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.hot { color: var(--bone); font-weight: 400; }
.data-table td.gospel { color: var(--bone) !important; }

.bar-chart { margin: 8px 0 16px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.bar-row.clickable { cursor: pointer; }
.bar-row.clickable:hover .bar-label { color: var(--bone); }
.bar-label { font-family: var(--font-ui); font-size: 15px; color: var(--bone); display: flex; justify-content: space-between; gap: 12px; transition: color .3s; }
.bar-label .val { color: var(--smoke); font-variant-numeric: tabular-nums; font-size: 12px; letter-spacing: 0.08em; }
.bar-track { height: 3px; background: var(--ash-2); overflow: hidden; }
.bar-fill { height: 100%; background: var(--bone) !important; transition: width 1.1s var(--ease-out); display: block; padding: 0; }
.bar-value { display: none; }

.quote-list { border-top: 1px solid var(--hairline); }
.quote-item { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.quote-ref { margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.quote-text { font-size: 22px; line-height: 1.3; max-width: 30ch; }
.quote-meta { font-family: var(--font-ui); font-size: 13px; color: var(--smoke); margin-top: 10px; }

/* Pills (BRAND §04: hairline outline, uppercase; selected = underlined bone) */
.tab-bar { display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter)) 28px; padding: 2px var(--gutter) 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn { padding: 0 14px; min-height: 40px; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); border: 1px solid var(--hairline); border-radius: 999px; white-space: nowrap; flex-shrink: 0; transition: color .3s, border-color .3s; }
.tab-btn:hover { color: var(--bone-2); border-color: var(--hairline-strong); }
.tab-btn.active { color: var(--bone); border-color: var(--bone); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: view-in .7s var(--ease-out); }

.parallel-pair { border-top: 1px solid var(--hairline); margin-bottom: 8px; }
.parallel-header { padding: 14px 0 0; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); }
.parallel-body { display: grid; grid-template-columns: 1fr; }
.parallel-side { padding: 20px 0 28px; }
.parallel-side + .parallel-side { border-top: 1px solid var(--hairline); }
.parallel-side .passage-text { font-size: 22px; }

.unique-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.unique-gospel-card h4 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 24px; margin-bottom: 8px; }
.unique-gospel-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.vocab-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vocab-tag { font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.06em; padding: 6px 11px; border: 1px solid var(--hairline); border-radius: 999px; color: var(--bone-2); }

/* ── "I Am" ─────────────────────────────────────────────────── */
.iam-card { padding: 28px 0; border-bottom: 1px solid var(--hairline); position: relative; }
.iam-number { font-family: var(--font-display); font-size: 20px; color: var(--smoke); margin-bottom: 10px; }
.iam-statement { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin-bottom: 12px; }
.iam-ref { margin-bottom: 10px; }
.iam-dimension { font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone-2); margin-bottom: 12px; }
.iam-meaning { font-size: 16px; line-height: 1.65; color: var(--bone-2); max-width: var(--measure); }
.iam-journey { position: relative; max-width: 760px; }
.iam-step { padding: 30px 0; border-bottom: 1px solid var(--hairline); }
.iam-step-num { margin-bottom: 12px; }
.iam-step-statement { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; margin-bottom: 12px; }
.iam-step-ref { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); margin-bottom: 14px; }
.iam-step-dimension { display: inline-block; padding: 6px 12px; border: 1px solid var(--hairline); border-radius: 999px; margin-bottom: 14px; color: var(--bone-2); }
.iam-step-meaning { font-size: 16px; line-height: 1.65; color: var(--bone-2); }

/* ── Sermon ─────────────────────────────────────────────────── */
.sermon-arc { display: flex; flex-direction: column; margin: 24px 0; border-top: 1px solid var(--hairline); }
.sermon-arc-step { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.sermon-arc-num { margin-bottom: 8px; }
.sermon-arc-title { font-family: var(--font-display); font-size: 24px; color: var(--bone); margin-bottom: 4px; line-height: 1.15; }
.sermon-arc-ref { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smoke); }
.sermon-arc-desc { font-size: 15px; color: var(--bone-2); margin-top: 10px; line-height: 1.5; }
.beatitude-card { display: flex; align-items: flex-start; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.beatitude-card:last-child { border-bottom: none; }
.beatitude-num { font-family: var(--font-display); font-size: 20px; color: var(--smoke); width: 28px; flex-shrink: 0; padding-top: 4px; font-variant-numeric: tabular-nums; }
.beatitude-condition { font-size: clamp(22px, 2.8vw, 28px); line-height: 1.25; }
.beatitude-promise { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--voice); text-shadow: var(--glow); margin-top: 6px; line-height: 1.3; }
.antithesis-card { padding: 26px 0; border-bottom: 1px solid var(--hairline); }
.antithesis-card .sermon-arc-num { color: var(--bone-2); margin-bottom: 16px; }
.antithesis-old { font-family: var(--font-ui); font-size: 16px; color: var(--bone-2); line-height: 1.55; margin-bottom: 18px; max-width: var(--measure); }
.antithesis-old::before { content: 'You have heard it said'; display: block; font-size: 10px; margin-bottom: 8px; }
.antithesis-new { font-size: clamp(22px, 3vw, 28px); line-height: 1.25; max-width: 28ch; }
.antithesis-new::before { content: 'But I say to you'; display: block; font-family: var(--font-ui); font-style: normal; font-size: 10px; color: var(--smoke); text-shadow: none; margin-bottom: 10px; }
.prayer-container { position: relative; padding: 48px 0 40px; margin: 24px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); overflow: hidden; }
.prayer-container .bloom { top: -60px; left: 25%; }
.prayer-container > :not(.bloom) { position: relative; z-index: 1; }
.prayer-label { margin-bottom: 10px; }
.prayer-title { font-family: var(--font-display); font-size: clamp(30px, 4vw, 40px); color: var(--bone); margin-bottom: 40px; line-height: 1.1; }
.prayer-line { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.prayer-text { font-size: clamp(24px, 3vw, 30px); line-height: 1.25; }
.prayer-annotation { font-family: var(--font-ui); font-size: 15px; color: var(--bone-2); line-height: 1.5; max-width: 420px; }
.prayer-divider { display: none; }
.prayer-note { font-size: 16px; color: var(--bone-2); margin-top: 18px; line-height: 1.6; max-width: var(--measure); }
.sermon-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; margin: 24px 0; padding: 24px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.sermon-stat-box { display: flex; flex-direction: column; gap: 8px; }
.sermon-stat-num { font-size: clamp(40px, 5vw, 60px); }
.parallel-compare { display: grid; grid-template-columns: 1fr; gap: 32px; margin: 24px 0; }
.parallel-col { padding-top: 18px; border-top: 1px solid var(--hairline); }
.parallel-col h4 { margin-bottom: 18px; }
.parallel-col blockquote { font-size: 22px; line-height: 1.3; border: 0; }
.parallel-col .col-note { font-family: var(--font-ui); font-size: 15px; color: var(--bone-2); margin-top: 18px; line-height: 1.55; }
.command-category-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.command-category-head h4 { font-family: var(--font-display); font-size: 24px; color: var(--bone); margin: 0; }
.command-item { padding: 16px 0; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 8px; }
.command-item:last-child { border-bottom: none; }
.command-item .cmd { font-size: 22px; line-height: 1.3; }
.command-item .ref { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); }

/* ── Catalogue rows (parables, miracles, topics, journey, prayers) ── */
#parables-container, #miracles-container, #topical-container, #prayers-container { border-top: 1px solid var(--hairline); }
.parable-card, .miracle-card, .topical-card, .journey-moment-card, .prayer-card { border-bottom: 1px solid var(--hairline); }
.parable-header, .miracle-header, .topical-header, .journey-moment-header, .prayer-card-header { display: flex; align-items: flex-start; gap: 16px; padding: 22px 0; cursor: pointer; min-height: 64px; -webkit-tap-highlight-color: transparent; }
.parable-header-text, .miracle-header-text, .topical-header-text, .journey-moment-header-text, .prayer-card-header-text { flex: 1; min-width: 0; }
.parable-title, .miracle-title, .topical-title, .journey-moment-title, .prayer-card-title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 28px); color: var(--bone); line-height: 1.15; }
.parable-meta, .miracle-meta, .topical-meta, .journey-moment-subtitle, .prayer-card-meta { font-family: var(--font-ui); font-size: 13px; color: var(--bone-2); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; line-height: 1.4; letter-spacing: 0.04em; }
.parable-body, .miracle-body, .topical-body, .journey-moment-body, .prayer-card-body { display: none; padding: 0 0 32px; }
.parable-card.expanded .parable-body, .miracle-card.expanded .miracle-body, .topical-card.expanded .topical-body, .journey-moment-card.expanded .journey-moment-body, .prayer-card.expanded .prayer-card-body { display: block; animation: view-in .9s var(--ease-out); }
.parable-category-pill, .miracle-category-pill, .prayer-type-pill, .miracle-period-badge, .prayer-instructional-badge, .topical-count {
  display: inline-block; font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid var(--hairline); border-radius: 999px; color: var(--bone-2); background: transparent !important;
}
.parable-gospel-dots, .miracle-gospel-dots { display: inline-flex; gap: 4px; }
.parable-gospel-dot, .miracle-gospel-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.parable-passage, .miracle-words { font-size: clamp(22px, 2.8vw, 28px); line-height: 1.25; padding: 8px 0 12px; max-width: 30ch; }
.parable-passage-ref, .miracle-words-ref { margin-top: 4px; }
.parable-explanation { padding: 22px 0 0; margin: 22px 0 0; border-top: 1px solid var(--hairline); font-size: 16px; line-height: 1.65; color: var(--bone-2); max-width: var(--measure); }
.parable-explanation-label { margin-bottom: 10px; }
.parable-interpretation, .miracle-significance, .journey-significance, .prayer-significance { padding: 22px 0 0; margin: 22px 0 0; border-top: 1px solid var(--hairline); font-size: 16px; line-height: 1.65; color: var(--bone-2); max-width: var(--measure); }
.parable-interpretation-label, .miracle-significance-label, .journey-significance-label, .prayer-significance-label { margin-bottom: 10px; }
.miracle-location, .miracle-affected { font-family: var(--font-ui); font-size: 15px; color: var(--bone-2); margin: 6px 0; }
.miracle-location strong, .miracle-affected strong { color: var(--bone-2); font-weight: 400; }
.miracle-description { font-size: 16px; line-height: 1.65; color: var(--bone-2); margin: 8px 0 18px; max-width: var(--measure); }
.parable-theme-pills, .miracle-theme-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.parable-theme-pill, .miracle-theme-pill { font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 12px; border: 1px solid var(--hairline); border-radius: 999px; color: var(--bone-2); cursor: pointer; transition: border-color .3s, color .3s; }
.parable-theme-pill:hover, .miracle-theme-pill:hover { border-color: var(--bone); color: var(--bone); }
.miracle-timeline-period { margin-bottom: 48px; }
.miracle-timeline-period-header { padding-bottom: 12px; border-bottom: 1px solid var(--hairline); font-family: var(--font-display); font-size: 26px; text-transform: none; letter-spacing: 0; color: var(--bone); }
.miracle-timeline-period-header span { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); margin-left: 12px; }
.miracle-gospel-matrix { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 13px; min-width: 400px; }
.miracle-gospel-matrix th { padding: 12px 6px; text-align: center; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smoke); font-weight: 400; border-bottom: 1px solid var(--hairline); }
.miracle-gospel-matrix td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--hairline); color: var(--smoke-2); }
.miracle-gospel-matrix td:first-child { text-align: left; font-family: var(--font-display); font-size: 17px; color: var(--bone); }
.miracle-gospel-check { color: var(--bone) !important; }

/* Topical */
.topical-icon { display: none; }
.topical-description { font-size: 16px; line-height: 1.65; color: var(--bone-2); margin: 4px 0 8px; max-width: var(--measure); }
.topical-passage-item { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.topical-passage-item:last-child { border-bottom: none; }
.topical-passage-ref { display: inline-block; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); cursor: pointer; padding: 4px 0; margin-bottom: 8px; transition: color .3s; }
.topical-passage-ref:hover { color: var(--bone); }
.topical-passage-text { font-size: 22px; line-height: 1.3; max-width: 30ch; }
.topical-relevance-bar { height: 2px; background: var(--ash-2); margin-top: 14px; max-width: 240px; }
.topical-relevance-fill { height: 100%; background: var(--smoke) !important; }

/* Journey */
.journey-period { margin-bottom: 56px; position: relative; padding-left: 28px; }
.journey-period::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: -56px; width: 1px; background: var(--hairline-strong); }
.journey-period:last-child::before { bottom: 0; }
.journey-period-dot { position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bone) !important; }
.journey-period-header { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); text-transform: none; letter-spacing: -0.01em; color: var(--bone); line-height: 1.05; margin-bottom: 10px; }
.journey-period-range { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); margin-bottom: 18px; }
.journey-period-narrative { font-size: 17px; color: var(--bone-2); line-height: 1.65; margin-bottom: 18px; max-width: var(--measure); }
.journey-period-stats { display: flex; gap: 20px; margin-bottom: 8px; font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smoke); }
.journey-period > .journey-moment-card:first-of-type { border-top: 1px solid var(--hairline); }
.journey-moment-context { font-family: var(--font-ui); font-size: 15px; color: var(--bone-2); margin: 4px 0 10px; line-height: 1.55; max-width: var(--measure); }
.journey-moment-location { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--smoke); margin: 4px 0 12px; }
.journey-insight-box { padding: 28px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: 48px; }
.journey-insight-box h3 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 10px; line-height: 1.1; }
.journey-insight-box p { font-size: 17px; line-height: 1.65; color: var(--bone-2); max-width: var(--measure); }

/* Prayers */
.prayer-context { font-family: var(--font-ui); font-size: 15px; color: var(--bone-2); margin: 4px 0 10px; line-height: 1.55; max-width: var(--measure); }
.prayer-quote { font-size: clamp(22px, 2.8vw, 28px); line-height: 1.25; padding: 12px 0 8px; margin: 8px 0; max-width: 30ch; }
.prayer-hp-section { padding: 18px 0; border-top: 1px solid var(--hairline); }
.prayer-hp-section-title { font-family: var(--font-display); font-size: 22px; color: var(--bone); margin-bottom: 4px; }
.prayer-hp-section-range { margin-bottom: 10px; }
.prayer-hp-section-focus { font-size: 16px; color: var(--bone-2); line-height: 1.6; max-width: var(--measure); }

/* ── Search results ─────────────────────────────────────────── */
#search-results-container { margin-bottom: 48px; }
.search-results-count { margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.search-result-card { padding: 24px 0; border-bottom: 1px solid var(--hairline); cursor: pointer; }
.search-result-ref { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.search-result-gospel { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.search-result-text { font-size: 22px; line-height: 1.3; max-width: 32ch; }
.search-result-text mark { background: transparent; color: var(--voice); text-decoration: underline; text-decoration-color: var(--bone); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.search-result-expand { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--smoke); margin-top: 12px; cursor: pointer; display: inline-block; padding: 4px 0; }
.search-result-expand:hover { color: var(--bone); }
.search-result-themes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.search-result-theme { font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--hairline); border-radius: 999px; color: var(--smoke); }
.search-empty { padding: 28px 0; color: var(--bone-2); font-size: 16px; }

/* ── Load error ─────────────────────────────────────────────── */
.load-error { max-width: 560px; margin: 24px 0; padding: 24px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.load-error h3 { font-size: 26px; margin-bottom: 10px; }
.load-error p { color: var(--smoke); font-size: 15px; line-height: 1.6; }

/* ── Reveal (BRAND §06) ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--reveal-dur) var(--ease-out), transform var(--reveal-dur) var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .grain { animation: none; }
  .bloom { animation: none; opacity: .8; }
  .caret { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Breakpoints
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --tabbar-h: 54px; }
  .tabbar { display: block; }
  .blueprint-body { padding-left: 0; }
  .blueprint-header { gap: 14px; }
  .blueprint-rank { width: 34px; font-size: 22px; }
  .modal { padding: 26px 20px calc(32px + var(--safe-b)); }
  .brand { font-size: 18px; }
}
@media (max-width: 374px) {
  .hero-title { font-size: 48px; }
  .stat-number, .stat-pill .num { font-size: 40px; }
  .tab-item { font-size: 9px; letter-spacing: 0.1em; }
}
@media (min-width: 641px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .gospel-legend { grid-template-columns: repeat(4, 1fr); }
  .section-card { gap: 40px; padding: 26px 0; }
  .section-card-text { display: flex; align-items: baseline; gap: 32px; }
  .section-card h3 { flex: 0 0 300px; }
  .section-card p { margin-top: 0; }
  .bar-row { flex-direction: row; align-items: center; gap: 24px; }
  .bar-label { width: 240px; flex-shrink: 0; }
  .bar-track { flex: 1; }
  .parallel-body { grid-template-columns: 1fr 1fr; gap: 40px; }
  .parallel-side + .parallel-side { border-top: none; }
  .unique-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .sermon-arc { flex-direction: row; gap: 32px; border-top: none; }
  .sermon-arc-step { flex: 1; border-bottom: none; border-top: 1px solid var(--hairline); padding: 18px 0; }
  .sermon-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .parallel-compare { grid-template-columns: 1fr 1fr; gap: 48px; }
  .prayer-line { flex-direction: row; gap: 40px; align-items: baseline; }
  .prayer-text { flex: 1; }
  .prayer-annotation { flex: 0 0 260px; }
  .modal-overlay { align-items: center; padding: 32px; }
  .modal { max-width: 760px; max-height: 84vh; border: 1px solid var(--hairline); border-radius: 20px; padding: 48px 56px; }
  .tab-bar { margin: 0 0 32px; padding: 0 0 8px; flex-wrap: wrap; overflow: visible; }
  .journey-period { padding-left: 36px; }
  .hero { padding: 24px 0 56px; }
  .featured { padding: 56px 0 64px; }
  .view-header { padding: 16px 0 56px; }
  .themes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
  .theme-card.expanded { grid-column: 1 / -1; }
  .search-global, .search-bar, .topical-search-bar { margin-bottom: 48px; }
  .journey-moment-header, .parable-header, .miracle-header, .topical-header, .prayer-card-header { align-items: center; }
}
@media (min-width: 1024px) {
  :root { --nav-h: 60px; }
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 60px; grid-template-areas: "brand links menu"; column-gap: 32px; }
  .nav-links { align-self: center; margin: 0; padding: 0 20px; scroll-padding-inline: 20px;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
  .nav-link:first-child { margin-left: auto; } /* right-align when the row fits; the auto margin collapses when it scrolls */
  .sermon-stat-grid { grid-template-columns: repeat(6, 1fr); }
  .featured-text { max-width: 24ch; }
  .blueprint-body { max-width: 860px; }
}

/* ═══════════════════════════════════════════════════════════════
   Panels & balance
   Every section is the same ash panel with its own label: unified,
   with a clear edge. Desktop uses the width; phones stack.
   ═══════════════════════════════════════════════════════════════ */
.panel { background: var(--ash); border: 1px solid var(--hairline); border-radius: 12px; padding: 22px 20px; margin-bottom: 16px; position: relative; overflow: hidden; }
.panel-label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); }
.panel-label .featured-ref { color: var(--bone-2); }
.panel > .bloom { z-index: 0; }
.panel > :not(.bloom) { position: relative; z-index: 1; }

/* Today */
.dash-top { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
.hero { padding: 8px 0 8px; }
.hero .search-global { margin: 28px 0 0; }
.featured { padding: 22px 20px 24px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: 0; }
.featured .bloom { top: -60px; left: 35%; }
.featured-label { display: none; }
.featured-text { font-size: clamp(24px, 3vw, 34px); max-width: 26ch; }
.featured-actions { margin-top: 26px; }
.dash-mid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.dash-mid > .panel { margin-bottom: 0; }
.dash-mid + .panel { margin-top: 16px; }
.stats-grid { padding: 4px 0 0; border-bottom: none; margin-bottom: 0; gap: 22px 20px; }
.stat-number { font-size: clamp(40px, 4.4vw, 56px); }
.gospel-share { padding: 22px 20px; border-bottom: 1px solid var(--hairline); }
.gospel-share-title { display: none; }
.section-cards { display: grid; grid-template-columns: 1fr; gap: 0; }
.section-card { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.section-card:hover { padding-left: 6px; }
.section-card-text { display: block; }
.section-card h3 { font-size: 22px; flex: none; }
.section-card p { margin-top: 4px; font-size: 15px; }
.section-card .card-count { font-size: 18px; padding-top: 4px; }

/* Views */
.view-header { padding: 4px 0 24px; }
.view-header h2 { font-size: clamp(36px, 5vw, 56px); }
.view-header p { margin-top: 12px; }
.analysis-section { background: var(--ash); border: 1px solid var(--hairline); border-radius: 12px; padding: 22px 20px; margin-bottom: 16px; }
.analysis-section h3 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.analysis-section > p { margin-bottom: 18px; font-size: 16px; }
.analysis-card { padding: 16px 0; margin-bottom: 16px; }
.analysis-card:last-child { margin-bottom: 0; border-bottom: none; }
.stat-row { padding: 4px 0 0; border-bottom: none; margin-bottom: 16px; gap: 20px; }
.stat-row.panel { padding: 22px 20px; }
.stat-pill .num { font-size: clamp(36px, 4vw, 52px); }
.journey-insight-box { background: var(--ash); border: 1px solid var(--hairline); border-radius: 12px; padding: 22px 20px; margin-bottom: 16px; }
.tab-bar { margin-bottom: 16px; }
#blueprint-container, #parables-container, #miracles-container, #topical-container, #prayers-container, .themes-grid { border-top: none; margin-bottom: 0; }
#blueprint-container { margin-bottom: 0; }
#blueprint-commands { margin-top: 0; }
.blueprint-header { padding: 18px 0; }
.blueprint-card:last-child, .parable-card:last-child, .miracle-card:last-child, .topical-card:last-child, .prayer-card:last-child, .theme-card:last-child { border-bottom: none; }
.parable-header, .miracle-header, .topical-header, .journey-moment-header, .prayer-card-header { padding: 16px 0; min-height: 56px; }
.theme-card { padding: 16px 0; }
.theme-card h3 { font-size: 22px; }
.quote-item { padding: 16px 0; }
.iam-card, .iam-step { padding: 20px 0; }
.iam-journey { max-width: none; }
.heatmap { margin-top: 12px; border-top: none; }
.heatmap-section h3, .cooccurrence-section h3 { font-size: clamp(24px, 3vw, 30px); }
.cooccurrence-list { border-top: none; }
.cooccurrence-item { padding: 14px 0; }
.cooccurrence-pair { font-size: 19px; }
.journey-period { margin-bottom: 32px; }
.journey-period:last-child { margin-bottom: 0; }
.search-results-count { border-bottom: none; padding-bottom: 0; margin-bottom: 4px; }
.prayer-container { padding: 32px 0 24px; margin: 16px 0; }

@media (min-width: 641px) {
  .panel { padding: 26px 28px; }
  .stat-row.panel { padding: 26px 28px; }
  .featured { padding: 26px 28px 28px; }
  .analysis-section, .journey-insight-box { padding: 26px 28px; }
  .dash-mid { grid-template-columns: 3fr 2fr; }
  .section-cards { grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .section-card:nth-last-child(2) { border-bottom: none; }
  .gospel-legend { grid-template-columns: repeat(2, 1fr); }
  .themes-grid { grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
  #parables-container, #miracles-container, #prayers-container, #topical-container { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .parable-card.expanded, .miracle-card.expanded, .prayer-card.expanded, .topical-card.expanded { grid-column: 1 / -1; }
  .blueprint-body { padding-left: 64px; }
}
@media (min-width: 1024px) {
  .dash-top { grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .hero { padding: 12px 8px 12px 0; display: flex; flex-direction: column; justify-content: center; }
  .hero-title { font-size: clamp(48px, 6vw, 76px); }
  .featured { display: flex; flex-direction: column; justify-content: center; }
  .quote-list { column-count: 2; column-gap: 48px; border-top: none; }
  .quote-item { break-inside: avoid; }
  .quote-list .quote-item:first-child { padding-top: 0; }
  .blueprint-body { max-width: none; column-count: 2; column-gap: 48px; }
  .blueprint-body > * { break-inside: avoid; }
  .blueprint-key-quote { break-inside: avoid; }
  .iam-journey, #rel-iam .analysis-card { column-count: 2; column-gap: 48px; }
  .iam-step, .iam-card { break-inside: avoid; }
  .unique-grid { gap: 0 48px; }
  .sermon-arc { gap: 40px; }
  .parallel-compare { gap: 48px; }
}
.stat-number, .stat-pill .num, .sermon-stat-num { overflow-wrap: normal; white-space: nowrap; }
.stat-number { font-size: clamp(32px, 3.4vw, 48px); }
.stats-grid { gap: 20px 16px; }

/* ═══════════════════════════════════════════════════════════════
   Use the whole panel: multi-column flow inside sections
   ═══════════════════════════════════════════════════════════════ */
.analysis-section h3, .analysis-section > p, .analysis-section > .stat-row, .analysis-section > .tab-bar,
.analysis-section > .bar-chart, .analysis-section > .sermon-arc, .analysis-section > .prayer-container,
.analysis-section > .parallel-compare, .analysis-section > .sermon-stat-grid, .analysis-section > .quote-list,
.analysis-section > .analysis-card, .analysis-section > .unique-grid, .analysis-section > .parallel-pair,
.analysis-section > .iam-journey, .analysis-section > .prayer-note, .analysis-section > .command-examples,
.analysis-section > div:not([class]) { grid-column: 1 / -1; }

@media (min-width: 641px) {
  .analysis-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; align-content: start; }
  .analysis-section > p { margin-bottom: 8px; }
  .antithesis-card, .iam-card { grid-column: auto; }
  #sermon-commands .analysis-card { grid-column: auto; }
  #sermon-beatitudes .analysis-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
  #sermon-beatitudes .beatitude-card:nth-last-child(2) { border-bottom: none; }
  .iam-journey { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; column-count: auto; }
  #rel-iam .analysis-card { column-count: auto; }
  .topical-card.expanded .topical-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
  .topical-body > .topical-description { grid-column: 1 / -1; }
  .journey-period { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
  .journey-period > .journey-period-dot, .journey-period > .journey-period-header, .journey-period > .journey-period-range,
  .journey-period > .journey-period-narrative, .journey-period > .journey-period-stats { grid-column: 1 / -1; }
  .journey-period > .journey-moment-card { border-top: 1px solid var(--hairline); }
  .journey-moment-card.expanded { grid-column: 1 / -1; }
  .parable-body, .miracle-body, .prayer-card-body, .journey-moment-body { column-count: 2; column-gap: 48px; }
  .parable-body > *, .miracle-body > *, .prayer-card-body > *, .journey-moment-body > * { break-inside: avoid; }
  .parable-passage, .miracle-words, .prayer-quote { max-width: none; }
  .command-item { break-inside: avoid; }
  .sermon-arc-step { border-top: none; }
}
@media (min-width: 1024px) {
  :root { --measure: 80ch; }
  body { font-size: 18px; }
  .topical-card.expanded .topical-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analysis-section > p, .topical-description, .journey-period-narrative, .miracle-description, .blueprint-summary { max-width: 80ch; }
  .passage-text, .quote-text, .topical-passage-text, .search-result-text { max-width: 44ch; }
  .antithesis-new { max-width: none; }
  .search-result-card { break-inside: avoid; }
  #search-results-list { column-count: 2; column-gap: 48px; }
  .theme-passages { column-count: 2; column-gap: 48px; }
  .theme-passages li { break-inside: avoid; }
  .cg-parallel-note { max-width: none; }
}
@media (min-width: 1280px) {
  .antithesis-card:nth-child(n) { grid-column: auto; }
  #sermon-antitheses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #sermon-commands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #sermon-commands > .stat-row, #sermon-commands > h3, #sermon-commands > p { grid-column: 1 / -1; }
}

/* ── Reader (docs/specs/reader.md): his words and the minimum to move through them ── */
.reader-gospels { display: flex; gap: 28px; border-bottom: 1px solid var(--hairline); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.reader-gospels::-webkit-scrollbar { display: none; }
.reader-gospel { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); padding: 14px 0; margin-bottom: -1px; border-bottom: 1px solid transparent; white-space: nowrap; transition: color .4s; }
.reader-gospel:hover { color: var(--bone-2); }
.reader-gospel.active { color: var(--bone); border-bottom-color: var(--bone); }
.reader-chapters { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 -8px 36px; }
.reader-chapter { font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 18; font-size: 19px; color: var(--smoke); min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; transition: color .3s; }
.reader-chapter:hover { color: var(--bone-2); }
.reader-chapter.active { color: var(--bone); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.reader-column { max-width: 760px; }
.reader-column .bloom { top: -110px; left: 28%; }
.reader-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--hairline); }
.reader-heading h3 { font-size: clamp(30px, 4vw, 40px); line-height: 1; letter-spacing: -0.015em; }
.reader-count { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); white-space: nowrap; }
.reader-passage { padding: 34px 0 38px; border-bottom: 1px solid var(--hairline); scroll-margin-top: calc(var(--nav-h) + var(--safe-t) + 24px); }
.reader-ref { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.reader-ref a { color: var(--smoke); font-variant-numeric: tabular-nums; transition: color .3s; }
.reader-ref a:hover, .reader-passage.is-target .reader-ref a { color: var(--bone); }
.reader-themes-btn { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); min-height: 32px; padding: 0 4px; transition: color .3s; }
.reader-themes-btn:hover { color: var(--bone); }
.reader-words { font-size: clamp(22px, 2.3vw, 25px); line-height: 1.42; font-weight: 400; font-variation-settings: 'opsz' 22; max-width: 34em; }
.reader-words p { color: inherit; }
.reader-words p + p { margin-top: 0.9em; }
.reader-nav { display: flex; justify-content: space-between; gap: 24px; padding: 30px 0 6px; }
.reader-nav-link { font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--smoke); transition: color .3s; }
.reader-nav-link.next { text-align: right; margin-left: auto; }
.reader-nav-link span { display: block; margin-top: 8px; font-family: var(--font-display); font-variation-settings: 'opsz' 18; font-weight: 500; font-size: 24px; letter-spacing: 0; text-transform: none; color: var(--bone-2); transition: color .3s; }
.reader-nav-link:hover, .reader-nav-link:hover span { color: var(--bone); }
