:root {
  --bg: #f7f7fa;
  --card-bg: #ffffff;
  --accent: #3b6aa0;
  --accent-soft: #e0ebf7;
  --text-main: #222222;
  --text-muted: #666666;
  --border-soft: #dde1ea;
  --danger: #b33a3a;
  --success: #2f7d4c;
  --shadow-soft: 0 10px 25px rgba(0,0,0,0.06);
  --radius-lg: 18px;
  --radius-md: 10px;
  --radius-pill: 999px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #eef3ff, #f7f7fa 40%, #f7f7fa 100%);
  color: var(--text-main);
}
.page { max-width: 1200px; margin: 0 auto; padding: 32px 16px 48px; }
header.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 32px;
}
@media (max-width: 900px) {
  header.hero { grid-template-columns: 1fr; }
}
.hero-title {
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  color: #1f2933;
}
.hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.6;
}
.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}
.badge {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--border-soft);
  background: #ffffffaa;
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}
.btn {
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(59,106,160,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(59,106,160,0.4);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
}
.btn-ghost:hover { background: var(--accent-soft); }
.hero-visual {
  background: linear-gradient(145deg, #ffffff, #e7f0ff);
  border-radius: 26px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 10% 0%, rgba(255,255,255,0.9), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(59,106,160,0.18), transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(47,125,76,0.18), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}
.hero-visual-inner { position: relative; z-index: 1; }
.hero-visual-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.hero-visual-main {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: #1f2933;
}
.hero-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.hero-chip {
  background: rgba(255,255,255,0.9);
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(221,225,234,0.9);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-chip-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.hero-chip-main { font-weight: 600; color: #1f2933; }
.hero-visual-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.hero-visual-tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(47,125,76,0.08);
  color: var(--success);
  border: 1px solid rgba(47,125,76,0.18);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-visual-tag-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
}
.hero-visual-ref { font-weight: 500; color: var(--accent); }
main {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  gap: 24px;
}
@media (max-width: 1000px) {
  main { grid-template-columns: 1fr; }
}
.panel {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(221,225,234,0.9);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}
.panel-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.panel-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.gospel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.gospel-tab {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: #f4f6fb;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.gospel-tab.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.gospel-tab span.ref { font-weight: 600; }
.gospel-tab span.name { font-weight: 500; }
.gospel-tab span.badge-mini {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
}
.gospel-content {
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-soft);
  padding: 12px 12px 10px;
  background: #fafbff;
}
.gospel-section { margin-bottom: 10px; }
.gospel-section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.gospel-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #1f2933;
}
.gospel-section-body {
  font-size: 0.86rem;
  color: #333333;
  line-height: 1.5;
}
.gospel-section-body strong { font-weight: 600; }
.gospel-section-body .verse-ref {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.timeline {
  margin-top: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 10px 10px 8px;
  background: #ffffff;
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
  flex-wrap: wrap;
}
.timeline-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.timeline-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-pill {
  font-size: 0.75rem;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: #f5f7fb;
  cursor: pointer;
  color: var(--text-muted);
}
.filter-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.timeline-items {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 8px;
}
@media (max-width: 800px) {
  .timeline-items { grid-template-columns: 1fr; }
}
.timeline-item {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  padding: 8px 9px;
  background: #f9fafc;
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.12s ease, opacity 0.2s ease;
}
.timeline-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.timeline-item.dim { opacity: 0.3; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-soft);
}
.timeline-item.core::before { background: var(--success); }
.timeline-item.unique::before { background: var(--danger); }
.timeline-item-header {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}
.timeline-item-label { font-weight: 600; color: #1f2933; }
.timeline-item-gospels {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.timeline-item-body {
  color: #444444;
  line-height: 1.4;
}
.timeline-item-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.side-panel-section { margin-bottom: 14px; }
.side-panel-title {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #1f2933;
}
.side-panel-body {
  font-size: 0.8rem;
  color: #444444;
  line-height: 1.5;
}
.side-panel-body ul {
  padding-left: 18px;
  margin: 4px 0 0;
}
.side-panel-body li { margin-bottom: 3px; }
.side-panel-body strong { font-weight: 600; }
.side-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.side-tag {
  font-size: 0.75rem;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: #f4f6fb;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}
.side-tag.highlight {
  background: rgba(47,125,76,0.08);
  border-color: rgba(47,125,76,0.25);
  color: var(--success);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-soft);
}
.legend-dot.core { background: var(--success); }
.legend-dot.unique { background: var(--danger); }
.verse-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.verse-modal {
  background: #ffffff;
  border-radius: 18px;
  max-width: 420px;
  width: calc(100% - 32px);
  padding: 16px 16px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  border: 1px solid rgba(221,225,234,0.9);
}
.verse-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}
.verse-modal-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2933;
}
.verse-modal-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
}
.verse-modal-body {
  font-size: 0.82rem;
  color: #444444;
  line-height: 1.5;
}
.verse-modal-footer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
footer {
  margin-top: 22px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Security gate */
#security-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #d0dff5 0%, #eef3ff 60%, #dde7f8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.5s ease;
}
#security-gate.gate-fade { opacity: 0; }
#gate-card {
  background: #fff;
  border: 2px solid #3b6aa0;
  box-shadow: 0 0 0 1px rgba(59, 106, 160, 0.18), 0 8px 40px rgba(0, 0, 0, 0.18);
  padding: 40px 48px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
}
#gate-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(59, 106, 160, 0.2);
  pointer-events: none;
}
#gate-title {
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1f2933;
  margin: 0 0 6px;
}
#gate-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3b6aa0;
  margin-bottom: 14px;
}
.gate-divider {
  font-size: 0.65rem;
  color: #3b6aa0;
  letter-spacing: 0.2em;
  margin: 12px 0;
  user-select: none;
}
#gate-prompt {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 14px;
}
#gate-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  text-align: center;
  padding: 9px 14px;
  background: #eef3ff;
  border: 1px solid #3b6aa0;
  color: #1f2933;
  outline: none;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: 6px;
}
#gate-input:focus {
  border-color: #2f7d4c;
  box-shadow: 0 0 0 2px rgba(47, 125, 76, 0.2);
}
#gate-submit {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 36px;
  background: #3b6aa0;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(59, 106, 160, 0.3);
}
#gate-submit:hover {
  background: #2c5282;
  box-shadow: 0 6px 18px rgba(59, 106, 160, 0.4);
}
#gate-error {
  font-size: 0.85rem;
  color: #b33a3a;
  min-height: 1.2em;
  margin-top: 4px;
}
