@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --bg-card: #ffffff;
  --text: #1c1a17;
  --text-muted: #453d33;
  --text-dim: #6b6255;
  --text-faint: #756c60;
  --accent: #7a2e2e;
  --accent-hover: #8f3a3a;
  --accent-dark: #5c2020;
  --on-accent: #fbf6f0;
  --border: #ddd8cd;
  --border-soft: #eae5db;
  --pop: #3f6b4a;
  --schol: #35507a;
  --minor: #8a5a2e;
  --badge-live: #7a2e2e;
  --badge-live-text: #fbf6f0;
  --error: #a13a2f;
  --error-bg: #f7e9e4;
  --error-border: #e0c4b8;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, 'Iowan Old Style', serif;
  line-height: 1.65;
}
a { color: inherit; }
.ui { font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.eyebrow {
  display: block;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.72em;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.wrap { max-width: 860px; margin: 0 auto; padding: 40px 22px 90px; }

header.site { text-align: center; padding: 8px 0 30px; margin-bottom: 26px; }
header.site .eyebrow { margin-bottom: 12px; }
.wordmark-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
header.site.compact .logo-mark { width: 20px; height: 20px; }
header.site.compact .wordmark-row { justify-content: flex-start; gap: 7px; }
header.site h1.wordmark {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 2.6em;
  letter-spacing: 0.3px;
  margin: 0;
  color: var(--accent);
}
header.site a.home-link { text-decoration: none; display: inline-block; }
header.site .rule {
  height: 2px; width: 46px;
  background: var(--accent);
  margin: 16px auto 14px;
}
header.site p.tagline {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 1.05em;
  color: var(--text-dim);
  margin: 0 0 6px;
}
header.site.compact { padding: 4px 0 10px; margin-bottom: 18px; text-align: left; }
header.site.compact .eyebrow { display: inline-block; font-size: 0.8em; color: var(--accent); }
.why { max-width: 620px; margin: 24px auto 38px; }
.why h1, .why h2 {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 1.7em;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
  margin: 0 0 18px;
}
.why p {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05em;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 14px;
  text-align: left;
}
.why p:last-child { margin-bottom: 0; }

.not-found { max-width: 620px; margin: 10px auto 34px; text-align: center; }
.not-found .nf-code {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 5.2em;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 4px;
}
.not-found h2 {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 1.5em;
  color: var(--text);
  margin: 0 0 14px;
}
.not-found p {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05em;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 620px) {
  .not-found .nf-code { font-size: 3.6em; }
}

.breadcrumb {
  font-family: Inter, sans-serif;
  font-size: 0.8em;
  color: var(--text-faint);
  margin: 0 0 22px;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }

.edition-toggle { display: flex; gap: 8px; margin: 0 0 24px; font-family: Inter, sans-serif; }
.edition-opt {
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 6px 14px;
  border-radius: 3px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.edition-opt.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.edition-opt:not(.active):hover { border-color: var(--accent); color: var(--accent); }

.search-box { display: flex; gap: 8px; margin: 0 0 6px; }
#searchInput {
  flex: 1;
  font-size: 1em;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  font-family: Inter, sans-serif;
  color: var(--text);
}
#searchInput::placeholder { color: var(--text-faint); }
#searchInput:focus { outline: none; border-color: var(--accent); }
#searchBtn {
  font-family: Inter, sans-serif;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 0.82em;
  padding: 0 22px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: background 0.15s ease;
}
#searchBtn:hover { background: var(--accent-hover); }
.search-hint {
  font-family: Inter, sans-serif;
  font-size: 0.82em;
  color: var(--text-faint);
  margin-bottom: 30px;
}
.suggestions { position: relative; }
.suggest-list {
  position: absolute;
  z-index: 10;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 100%;
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(28,26,23,0.12);
  font-family: Inter, sans-serif;
  display: none;
}
.suggest-list.show { display: block; }
.suggest-item { display: block; text-decoration: none; }
.suggest-item-inner {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.92em;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.suggest-item:last-child .suggest-item-inner { border-bottom: none; }
.suggest-item:hover .suggest-item-inner, .suggest-item.active .suggest-item-inner { background: var(--border-soft); }
.suggest-item .cat { color: var(--text-faint); font-size: 0.85em; }

nav.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  font-family: Inter, sans-serif;
}
.cat-chip {
  font-size: 0.76em;
  font-weight: 500;
  letter-spacing: 0.4px;
  padding: 6px 13px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip-feature {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.cat-chip-feature:hover { background: var(--accent); color: var(--on-accent); }

#browseView h2.cat-heading {
  font-family: Inter, sans-serif;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 10px;
  margin: 34px 0 16px;
  scroll-margin-top: 20px;
}

.glossary-filter-box { margin: 4px 0 6px; }
#glossaryFilter, #bibFilter {
  width: 100%;
  box-sizing: border-box;
  font-size: 1em;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  font-family: Inter, sans-serif;
  color: var(--text);
}
#glossaryFilter::placeholder, #bibFilter::placeholder { color: var(--text-faint); }
#glossaryFilter:focus, #bibFilter:focus { outline: none; border-color: var(--accent); }
#glossaryList h2.cat-heading, #bibList h2.cat-heading {
  font-family: Inter, sans-serif;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 10px;
  margin: 34px 0 16px;
}
.glossary-group { margin: 0; }
.glossary-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.glossary-entry dt {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  color: var(--text);
  font-size: 1em;
  margin: 0 0 6px;
}
.glossary-entry dd {
  font-family: Inter, sans-serif;
  font-size: 0.88em;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}
.glossary-empty {
  font-family: Inter, sans-serif;
  font-size: 0.9em;
  color: var(--text-faint);
  text-align: center;
  padding: 30px 0;
}

.bib-topic-heading {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.05em;
  margin: 20px 0 8px;
}
.bib-topic-heading a { color: var(--text); text-decoration: none; }
.bib-topic-heading a:hover { color: var(--accent); }
.bib-source-list { list-style: none; margin: 0 0 4px; padding: 0; }
.bib-source-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 6px;
}
.bib-source-text {
  font-family: Inter, sans-serif;
  font-size: 0.88em;
  color: var(--text-muted);
  flex: 1 1 auto;
}
.bib-source-link {
  font-family: Inter, sans-serif;
  font-size: 0.76em;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
.bib-source-link:hover { text-decoration: underline; }

.cite-actions { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; }
.cite-btn {
  font-family: Inter, sans-serif;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--schol);
  background: transparent;
  border: 1px solid var(--schol);
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.cite-btn:hover { background: var(--schol); color: var(--on-accent); }
.cite-btn:disabled { opacity: 0.6; cursor: default; }
.cite-btn.cite-copied { border-color: var(--pop); color: var(--pop); }
.cite-btn.cite-error { border-color: var(--error); color: var(--error); }

.citation-checker-box { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 6px; }
#citationInput {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.95em;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  font-family: Inter, sans-serif;
  color: var(--text);
  resize: vertical;
  line-height: 1.5;
}
#citationInput::placeholder { color: var(--text-faint); }
#citationInput:focus { outline: none; border-color: var(--accent); }
#citationCheckBtn {
  align-self: flex-start;
  font-family: Inter, sans-serif;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 0.82em;
  padding: 12px 26px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: background 0.15s ease;
}
#citationCheckBtn:hover { background: var(--accent-hover); }
.citation-note {
  font-family: Inter, sans-serif;
  font-size: 0.8em;
  color: var(--text-faint);
  margin: 0 0 24px;
}
#citationResults { margin-top: 8px; }
#citationResults .spinner { margin: 20px auto; }
.citation-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  border-left: 3px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.citation-result-card.status-verified { border-left-color: var(--pop); }
.citation-result-card.status-corrected { border-left-color: var(--minor); }
.citation-result-card.status-unverifiable { border-left-color: var(--error); }
.citation-status-badge {
  display: inline-block;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.status-verified .citation-status-badge { color: var(--pop); }
.status-corrected .citation-status-badge { color: var(--minor); }
.status-unverifiable .citation-status-badge { color: var(--error); }
.citation-original {
  font-family: 'Source Serif 4', serif;
  color: var(--text);
  margin: 0 0 6px;
  font-size: 0.98em;
}
.citation-note-text {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.citation-corrected {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  color: var(--text);
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}
.citation-corrected strong { color: var(--minor); }
.citation-error {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  color: var(--error);
}
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .topic-grid { grid-template-columns: 1fr; } }
.topic-card {
  display: block;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 15px 17px;
  transition: border-color 0.15s ease;
}
.topic-card:hover { border-color: var(--accent); }
.topic-card h3 {
  margin: 0 0 6px;
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.05em;
  color: var(--text);
}
.topic-card .verses {
  font-family: Inter, sans-serif;
  font-size: 0.74em;
  letter-spacing: 0.3px;
  color: var(--text-faint);
  text-transform: uppercase;
}

.back-btn {
  font-family: Inter, sans-serif;
  letter-spacing: 0.6px;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.82em;
  text-transform: uppercase;
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.15s ease;
}
.back-btn:hover { color: var(--accent); }

.detail-header .cat-badge {
  font-family: Inter, sans-serif;
  display: inline-block;
  font-weight: 600;
  font-size: 0.74em;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-decoration: none;
}
a.cat-badge:hover { color: var(--accent); }
.live-badge {
  font-family: Inter, sans-serif;
  display: inline-block;
  font-size: 0.7em;
  letter-spacing: 0.4px;
  color: var(--badge-live-text);
  background: var(--badge-live);
  padding: 3px 10px;
  border-radius: 3px;
  margin-left: 10px;
  vertical-align: middle;
}
.detail-header h1, .detail-header h2 {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 1.85em;
  letter-spacing: 0.1px;
  margin: 0 0 14px;
  line-height: 1.18;
  color: var(--text);
}
.verse-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.verse-chip {
  font-family: Inter, sans-serif;
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.3px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 3px;
  color: var(--accent);
}

.pull-quote {
  margin: 26px 0 32px;
  padding-left: 26px;
  border-left: 2px solid var(--accent);
}
.pull-quote .mark {
  font-family: 'Source Serif 4', serif;
  font-size: 2.8em;
  line-height: 0.4;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
  opacity: 0.6;
}
.pull-quote blockquote {
  margin: 0;
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.4em;
  line-height: 1.45;
  color: var(--text);
}
.pull-quote cite {
  display: block;
  margin-top: 10px;
  font-family: Inter, sans-serif;
  font-style: normal;
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim);
}

section.block {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
section.block h4 {
  margin: 0 0 10px;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.76em;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-dim);
}
section.block p { color: var(--text-muted); margin: 0; }
section.block.popular { border-left: 3px solid var(--pop); }
section.block.popular h4 { color: var(--pop); }
section.block.scholarly { border-left: 3px solid var(--schol); }
section.block.scholarly h4 { color: var(--schol); }
section.block.study { border-left: 3px solid var(--accent); }
section.block.study h4 { color: var(--accent); }

.study-questions-list {
  font-family: 'Source Serif 4', serif;
  font-size: 0.95em;
  line-height: 1.55;
  color: var(--text-muted);
  padding-left: 20px;
  margin: 0;
}
.study-questions-list li { margin-bottom: 12px; }
.study-questions-list li:last-child { margin-bottom: 0; }

section.block.key-terms { border-left: 3px solid var(--schol); }
section.block.key-terms h4 { color: var(--schol); }
.key-term-grid { display: flex; flex-direction: column; gap: 12px; }
.key-term-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
}
.key-term-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}
.key-term-original {
  font-family: 'Source Serif 4', 'Times New Roman', serif;
  font-size: 1.3em;
  font-weight: 600;
  color: var(--text);
}
.key-term-translit {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 0.95em;
  color: var(--text-muted);
}
.key-term-strongs {
  font-family: Inter, sans-serif;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--schol);
  border: 1px solid var(--schol);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: auto;
}
.key-term-gloss {
  font-family: 'Source Serif 4', serif;
  font-size: 0.95em;
  color: var(--text);
  margin: 0 0 6px;
}
.key-term-note {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

section.block.doctrine-timeline { border-left: 3px solid var(--minor); }
section.block.doctrine-timeline h4 { color: var(--minor); }
.doctrine-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
  margin-left: 4px;
}
.doctrine-timeline-item {
  position: relative;
  padding: 0 0 18px 20px;
}
.doctrine-timeline-item:last-child { padding-bottom: 0; }
.doctrine-timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--minor);
}
.doctrine-timeline-year {
  display: block;
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.76em;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--minor);
  margin-bottom: 2px;
}
.doctrine-timeline-label {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 0.98em;
  color: var(--text);
  margin: 0 0 3px;
}
.doctrine-timeline-detail {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

section.block.confessions { border-left: 3px solid var(--schol); }
section.block.confessions h4 { color: var(--schol); }
.confession-grid { display: flex; flex-direction: column; gap: 12px; }
.confession-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
}
.confession-tradition {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--schol);
  margin: 0 0 8px;
}
.confession-quote {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 0.98em;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 8px;
  padding: 0;
  border: none;
}
.confession-source {
  font-family: Inter, sans-serif;
  font-size: 0.78em;
  color: var(--text-faint);
  margin: 0;
}

.minority-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--minor);
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.minority-item h5 {
  margin: 0 0 6px;
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  color: var(--minor);
  font-size: 1em;
}
.minority-item p { margin: 0; color: var(--text-muted); }

.sources-list {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  color: var(--text-muted);
  padding-left: 18px;
  margin: 0;
}
.sources-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  margin-bottom: 4px;
}

.patriarch-chart-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 14px 8px;
  margin-bottom: 6px;
}
.patriarch-chart-wrap svg.bible-map { display: block; width: 100%; min-width: 640px; height: auto; }
.patriarch-chart-wrap img.bible-map-img { display: block; width: 100%; min-width: 640px; height: auto; border-radius: 3px; }

/* Timeline charts (patriarchs/history/canon/councils): a fixed, non-
   scrolling label column beside a horizontally-scrollable SVG, so a
   patriarch's or event's name stays on screen while its bar scrolls —
   fixing a mobile-portrait issue where scrolling right to see a date
   also scrolled the row's own name off the left edge. */
.timeline-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.chart-scroll-wrap {
  display: flex;
  align-items: stretch;
  padding: 16px 0 10px;
}
.chart-labels {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-soft);
}
.chart-label-row {
  display: flex;
  align-items: center;
  padding: 0 10px 0 14px;
  font-family: Inter, sans-serif;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--text);
  box-sizing: border-box;
  overflow: hidden;
}
/* flex:N 0 0 rather than a fixed height: the SVG beside this column
   shrinks/grows responsively (width:100% below), so its rendered height
   varies with viewport width too. Sizing each row by flex-grow, in the
   same ratio as the SVG's TOP/ROW_H viewBox units, means these rows are
   stretched (via align-items:stretch above) to match whatever height the
   SVG actually renders at, at any screen size, without needing JS to keep
   the two back in sync. */
.chart-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; padding-right: 14px; }
.chart-scroll svg.patriarch-chart,
.chart-scroll svg.event-chart { display: block; width: 100%; height: auto; }
.chart-scroll svg.patriarch-chart { min-width: 460px; }
.chart-scroll svg.event-chart { min-width: 520px; }
.chart-footnote {
  font-family: Inter, sans-serif;
  font-size: 0.78em;
  color: var(--text-faint);
  margin: 0 0 20px;
}
.chart-heading {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.76em;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-dim);
  margin: 26px 0 10px;
}
.chart-intro-note {
  font-family: Inter, sans-serif;
  font-size: 0.84em;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.notes-block p { margin: 0 0 12px; }
.notes-block p:last-child { margin-bottom: 0; }
.note-date {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  color: var(--text-faint);
}

.geneal-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 2px;
  justify-content: center;
  padding: 6px 2px;
}
.geneal-name {
  font-family: Inter, sans-serif;
  font-size: 0.86em;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 10px;
  white-space: nowrap;
}
.geneal-arrow {
  color: var(--text-faint);
  font-size: 0.9em;
  margin: 0 1px;
}
.geneal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 620px) {
  .geneal-split { grid-template-columns: 1fr; }
}
.geneal-col h5 {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.82em;
  color: var(--text-dim);
  margin: 0 0 8px;
}
.geneal-list {
  margin: 0;
  padding-left: 20px;
  font-family: 'Source Serif 4', serif;
  font-size: 0.94em;
  color: var(--text-muted);
}
.geneal-list li { margin-bottom: 4px; }

.canon-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 20px;
}
.canon-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-family: Inter, sans-serif;
  font-size: 0.82em;
}
.canon-table th, .canon-table td {
  padding: 9px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}
.canon-table thead th {
  background: var(--bg);
  font-weight: 600;
  font-size: 0.92em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.canon-table th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-card);
  white-space: nowrap;
}
.canon-table tbody tr:last-child th, .canon-table tbody tr:last-child td { border-bottom: none; }
.canon-yes { color: var(--pop); font-weight: 600; }
.canon-no { color: var(--text-faint); }
.canon-mixed { color: var(--minor); font-weight: 600; }

.creed-text {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 0 0 16px;
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  color: var(--text);
  font-size: 0.96em;
  line-height: 1.65;
}
.creed-text p { margin: 0 0 10px; color: var(--text); }
.creed-text p:last-child { margin-bottom: 0; }
.creed-filioque {
  font-style: normal;
  font-family: Inter, sans-serif;
  font-size: 0.82em;
  font-weight: 600;
  color: var(--accent);
  background: rgba(122, 46, 46, 0.09);
  padding: 1px 5px;
  border-radius: 3px;
}

.verse-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 20px 20px;
  margin-bottom: 20px;
}
.verse-card .chart-heading { margin-top: 0; }
.verse-trans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.verse-trans {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 10px 12px;
}
.verse-trans-label {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 5px;
}
.verse-trans-text {
  font-family: 'Source Serif 4', serif;
  font-size: 0.94em;
  color: var(--text);
  line-height: 1.5;
}
.verse-footnote {
  font-family: Inter, sans-serif;
  font-size: 0.76em;
  font-style: italic;
  color: var(--text-faint);
  margin: 6px 0 0;
  line-height: 1.4;
}
.verse-modern, .verse-significance {
  font-family: 'Source Serif 4', serif;
  font-size: 0.95em;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.6;
}
.verse-significance { margin-bottom: 0; font-size: 0.88em; color: var(--text-faint); }
.verse-significance a { color: var(--accent); }


.dig-deeper h4 { color: var(--accent); }
.dig-deeper-intro {
  font-family: Inter, sans-serif;
  font-size: 0.88em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.dig-deeper-box { display: flex; gap: 8px; margin-bottom: 4px; }
.dig-input {
  flex: 1;
  font-size: 0.95em;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  font-family: Inter, sans-serif;
  color: var(--text);
}
.dig-input::placeholder { color: var(--text-faint); }
.dig-input:focus { outline: none; border-color: var(--accent); }
.dig-btn {
  font-family: Inter, sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.78em;
  padding: 0 18px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: background 0.15s ease;
}
.dig-btn:hover { background: var(--accent-hover); }
.dig-note {
  font-family: Inter, sans-serif;
  font-size: 0.76em;
  color: var(--text-faint);
  margin: 8px 0 0;
}
.dig-answer { margin-top: 16px; }
.dig-answer .live-badge { margin-left: 0; margin-bottom: 10px; }
.dig-answer p { color: var(--text-muted); margin: 0 0 10px; }
.dig-answer .sources-list { margin-top: 10px; }
.dig-error {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  color: var(--error);
}

section.block.book-search { border-left: 3px solid var(--accent); }
section.block.book-search h4 { color: var(--accent); }
.book-search-intro {
  font-family: Inter, sans-serif;
  font-size: 0.88em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.book-search-box { display: flex; gap: 8px; margin-bottom: 4px; }
.book-search-input {
  flex: 1;
  font-size: 0.95em;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  font-family: Inter, sans-serif;
  color: var(--text);
}
.book-search-input::placeholder { color: var(--text-faint); }
.book-search-input:focus { outline: none; border-color: var(--accent); }
.book-search-btn {
  font-family: Inter, sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.78em;
  padding: 0 18px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: background 0.15s ease;
}
.book-search-btn:hover { background: var(--accent-hover); }
.book-search-results { margin-top: 16px; }
.book-search-results .spinner { margin: 10px auto; }
.book-result-card {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}
.book-result-card:first-child { border-top: none; padding-top: 0; }
.book-result-thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 78px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.book-result-thumb-placeholder {
  flex: 0 0 auto;
  width: 52px;
  height: 78px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.4em;
  color: var(--text-faint);
}
.book-result-body { flex: 1 1 auto; min-width: 0; }
.book-result-title {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
  font-size: 0.98em;
}
.book-result-subtitle {
  font-family: 'Source Serif 4', serif;
  color: var(--text-muted);
  font-size: 0.9em;
  margin: 0 0 4px;
}
.book-result-meta {
  font-family: Inter, sans-serif;
  font-size: 0.78em;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.book-result-desc {
  font-family: Inter, sans-serif;
  font-size: 0.82em;
  color: var(--text-muted);
  margin: 0 0 6px;
  line-height: 1.45;
}
.book-result-link {
  font-family: Inter, sans-serif;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.book-result-link:hover { text-decoration: underline; }
.book-search-empty, .book-search-error {
  font-family: Inter, sans-serif;
  font-size: 0.85em;
  color: var(--text-faint);
  margin: 10px 0 0;
}
.book-search-error { color: var(--error); }

.related-section { margin-top: 44px; }
.related-section h2.cat-heading {
  font-family: Inter, sans-serif;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 10px;
  margin: 0 0 16px;
}

#loadingState, #emptyState {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-family: Inter, sans-serif;
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#emptyDebugText {
  font-family: Inter, sans-serif;
  font-size: 0.78em; color: var(--error); white-space: pre-wrap; max-width: 600px;
  margin: 14px auto 0; text-align: left; background: var(--error-bg);
  border: 1px solid var(--error-border); border-radius: 4px; padding: 10px 14px; display: none;
}

footer.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}
footer.site-footer .eyebrow { margin-bottom: 14px; }
footer.site-footer p {
  font-family: Inter, sans-serif;
  font-size: 0.78em;
  color: var(--text-faint);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 10px;
}
footer.site-footer .footer-links { font-family: Inter, sans-serif; font-size: 0.8em; margin-top: 10px; }
footer.site-footer .footer-links a { color: var(--text-dim); text-decoration: none; margin: 0 8px; }
footer.site-footer .footer-links a:hover { color: var(--accent); text-decoration: underline; }

.back-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
  box-shadow: 0 4px 14px rgba(28,26,23,0.28);
  z-index: 500;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-hover); }
.back-to-top svg { width: 20px; height: 20px; display: block; }
@media (max-width: 620px) {
  .back-to-top { bottom: 18px; right: 18px; width: 42px; height: 42px; }
}
