:root {
  --bg: #faf6ef;
  --ink: #2c2416;
  --muted: #6b5f4f;
  --paper: var(--bg);
  --panel: #fffdf8;
  --border: #ddd3c4;
  --accent: #8b4513;
  --accent-hover: #6d3610;
  --accent-warm: #8b6914;
  --canvas: #f0ebe0;
  --link: #3d5a80;
  --link-hover: #2c4360;
  --text: var(--ink);
  --chrome-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --reading-font: Georgia, "Times New Roman", serif;
  --hud-glow: transparent;
  --input-bg: #fff;
  --btn-surface: #fff;
  --btn-text: #fff;
  --reading-ink: var(--ink);
}

/* Explorer: command-surface HUD (Iron Man–inspired, original artwork) */
.explore-body {
  --bg: #060a10;
  --ink: #dce8f0;
  --muted: #7a9aad;
  --paper: var(--bg);
  --panel: #0a101c;
  --border: rgba(77, 208, 225, 0.28);
  --accent: #4dd0e1;
  --accent-hover: #80deea;
  --accent-warm: #e8a838;
  --canvas: #050810;
  --link: #5ec8e8;
  --link-hover: #8ae0f5;
  --text: var(--ink);
  --chrome-font: "JetBrains Mono", "SF Mono", "Consolas", "Liberation Mono", monospace;
  --reading-font: Georgia, "Times New Roman", serif;
  --hud-glow: rgba(77, 208, 225, 0.14);
  --input-bg: rgba(6, 10, 16, 0.72);
  --btn-surface: rgba(8, 14, 24, 0.82);
  --btn-text: #060a10;
  --reading-ink: #e8eef2;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--chrome-font);
  font-size: 15px;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hint, .empty, .estimate-note, .edition-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input[type="search"] {
  flex: 1;
  font: inherit;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--ink);
  min-width: 0;
}

.search-form input[type="search"]::placeholder {
  color: var(--muted);
}

.search-form button {
  font: inherit;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--btn-text);
  cursor: pointer;
  font-family: var(--chrome-font);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-form button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 12px var(--hud-glow);
}

/* Graph explorer layout */
.explore-body {
  overflow: hidden;
}

.explore-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.explore-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  box-shadow: inset 0 -1px 0 var(--hud-glow);
  flex-shrink: 0;
}

.explore-header .site-title {
  font-family: var(--chrome-font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.explore-header .site-title:hover {
  color: var(--accent);
}

.explore-header .header-link {
  font-family: var(--chrome-font);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
}

.explore-header .header-link:hover {
  color: var(--accent);
}

.explore-search {
  flex: 1;
  max-width: 28rem;
}

.explore-nav {
  display: flex;
  gap: 0.25rem;
}

.nav-btn {
  font: inherit;
  font-family: var(--chrome-font);
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--btn-surface);
  color: var(--ink);
  cursor: pointer;
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--hud-glow);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.explore-main {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.left-rail,
.right-rail {
  width: min(14rem, 22vw);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--hud-glow), inset 0 1px 0 rgba(77, 208, 225, 0.06);
  border-color: var(--border);
  border-style: solid;
  overflow-x: hidden;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  min-height: 0;
}

.left-rail {
  border-right-width: 1px;
}

.right-rail {
  width: min(18rem, 26vw);
  border-left-width: 1px;
}

.left-rail.rail-collapsed,
.right-rail.rail-collapsed {
  display: none;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.rail-title {
  font-family: var(--chrome-font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.rail-toggle {
  font: inherit;
  font-family: var(--chrome-font);
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--btn-surface);
  color: var(--muted);
  cursor: pointer;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1;
  padding: 0;
}

.rail-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px var(--hud-glow);
}

.rail-section {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.rail-section-title {
  font-family: var(--chrome-font);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.rail-collapsible {
  margin: 0;
}

.rail-collapsible > summary {
  list-style: none;
  cursor: pointer;
  margin: 0 0 0.5rem;
  user-select: none;
}

.rail-collapsible > summary::-webkit-details-marker {
  display: none;
}

.rail-collapsible > summary::before {
  content: "▸ ";
  font-size: 0.7rem;
  color: var(--muted);
}

.rail-collapsible[open] > summary::before {
  content: "▾ ";
}

.rail-collapsible[open] > summary {
  margin-bottom: 0.5rem;
}

.rail-collapsible:not([open]) > summary {
  margin-bottom: 0;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.menu-btn {
  font: inherit;
  font-family: var(--chrome-font);
  font-size: 0.78rem;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--btn-surface);
  color: var(--ink);
  cursor: pointer;
}

.menu-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--hud-glow);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-item input {
  accent-color: var(--accent);
}

.filter-input {
  width: 100%;
  font: inherit;
  font-family: var(--chrome-font);
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--input-bg);
  color: var(--ink);
}

.filter-input::placeholder {
  color: var(--muted);
}

.graph-settings {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-family: var(--chrome-font);
}

.setting-row {
  display: block;
  color: var(--ink);
}

.setting-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.setting-input {
  width: 100%;
  font: inherit;
  font-family: var(--chrome-font);
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--input-bg);
  color: var(--ink);
}

.setting-range {
  width: 100%;
  accent-color: var(--accent);
}

.setting-value {
  color: var(--muted);
  font-size: 0.82rem;
}

.graph-legend {
  font-size: 0.72rem;
  font-family: var(--chrome-font);
}

.legend-group + .legend-group {
  margin-top: 0.5rem;
}

.legend-heading {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.legend-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.12rem 0;
}

.legend-swatch {
  display: inline-block;
  flex-shrink: 0;
}

.legend-swatch-node {
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid;
  border-radius: 50%;
}

.legend-swatch-edge {
  width: 1.1rem;
  height: 0.18rem;
  border-radius: 1px;
}

.legend-swatch-edge.dashed {
  background: repeating-linear-gradient(
    90deg,
    currentColor 0 3px,
    transparent 3px 5px
  ) !important;
  background-color: transparent !important;
  color: inherit;
}

.graph-truncation-note {
  margin: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-family: var(--chrome-font);
  color: var(--muted);
  background: rgba(232, 168, 56, 0.08);
  border-bottom: 1px solid var(--border);
}

.graph-truncation-note.hidden {
  display: none;
}

.center-column {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.graph-viewport {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  outline: none;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  transition: opacity 0.28s ease;
}

.graph-viewport.lens-switching {
  opacity: 0.72;
}

.graph-hud-carousel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 7.5rem;
  padding: 0.35rem 0.55rem 0.5rem;
  pointer-events: none;
  background: linear-gradient(to top, rgba(6, 10, 16, 0.94) 35%, rgba(6, 10, 16, 0.55) 70%, transparent);
}

.graph-hud-carousel-track {
  display: flex;
  flex: 1 1 auto;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  min-height: 5.5rem;
  max-height: 6.5rem;
  pointer-events: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.graph-hud-card {
  flex: 0 0 auto;
  width: 10.5rem;
  max-width: 42vw;
  min-height: 5.25rem;
  max-height: 6.25rem;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--panel);
  box-shadow: 0 0 12px rgba(77, 208, 225, 0.08), inset 0 0 10px rgba(77, 208, 225, 0.04);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.graph-hud-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--hud-glow);
}

.graph-hud-card-focus {
  border-color: var(--accent-warm);
  box-shadow: 0 0 16px rgba(232, 168, 56, 0.35), inset 0 0 12px rgba(232, 168, 56, 0.08);
}

.graph-hud-card-visited:not(.graph-hud-card-focus) {
  border-color: rgba(77, 208, 225, 0.55);
}

.graph-hud-card-type {
  font-family: var(--chrome-font);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.graph-hud-card-title {
  font-family: var(--chrome-font);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-hud-card-snippet {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.3;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.graph-hud-carousel-more {
  margin: 0;
  padding: 0 0.15rem;
  font-family: var(--chrome-font);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.graph-lens-strip {
  flex-shrink: 0;
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-top: 1px solid var(--border);
  background: var(--panel);
  box-shadow: inset 0 1px 0 var(--hud-glow);
  overflow-x: auto;
  scrollbar-width: thin;
}

.graph-lens-tab {
  flex: 1 0 auto;
  min-width: 4.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--btn-surface);
  color: var(--muted);
  font-family: var(--chrome-font);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.graph-lens-tab:hover {
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--hud-glow);
}

.graph-lens-tab-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(77, 208, 225, 0.1);
  box-shadow: 0 0 14px var(--hud-glow), inset 0 0 12px rgba(77, 208, 225, 0.06);
  font-weight: 600;
}

.graph-canvas-stage {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.graph-canvas-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.graph-focus-hud {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92%, 42rem);
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(232, 168, 56, 0.45);
  border-radius: 2px;
  background: rgba(6, 10, 16, 0.82);
  color: var(--ink);
  font-family: var(--chrome-font);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 12px rgba(232, 168, 56, 0.12);
}

.graph-trail-filters {
  position: absolute;
  top: 2.35rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
  max-width: min(96%, 48rem);
  pointer-events: none;
}

.graph-trail-chip {
  pointer-events: auto;
  padding: 0.22rem 0.5rem;
  border: 1px solid rgba(232, 168, 56, 0.55);
  border-radius: 2px;
  background: rgba(232, 168, 56, 0.08);
  color: #e8c878;
  font-family: var(--chrome-font);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.graph-trail-chip-active {
  background: rgba(232, 168, 56, 0.22);
  border-color: #e8a838;
  color: #ffe6a8;
}

.graph-trail-chip-testament {
  border-color: rgba(232, 168, 56, 0.75);
}

.graph-text-stack {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 8.5rem;
  pointer-events: none;
}

.graph-text-stack-card {
  pointer-events: auto;
  padding: 0.25rem 0.45rem;
  border: 1px solid rgba(102, 187, 106, 0.55);
  border-radius: 2px;
  background: rgba(6, 10, 16, 0.88);
  color: #9be7a0;
  font-family: var(--chrome-font);
  font-size: 0.65rem;
  text-align: left;
  cursor: pointer;
  transform: translateX(calc(var(--stack-index, 0) * 4px));
}

.graph-text-stack-card-active,
.graph-carousel-card-active {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--hud-glow);
}

.graph-time-bar {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.55rem;
  height: 1.35rem;
  pointer-events: none;
}

.graph-time-track {
  position: relative;
  height: 100%;
  border-top: 2px solid rgba(232, 168, 56, 0.65);
}

.graph-time-tick {
  position: absolute;
  top: -0.35rem;
  width: 2px;
  height: 0.65rem;
  background: rgba(232, 168, 56, 0.85);
  transform: translateX(-50%);
}

.graph-time-tick-label {
  position: absolute;
  top: 0.75rem;
  transform: translateX(-50%);
  font-size: 0.58rem;
  color: var(--muted);
  white-space: nowrap;
}

.graph-places-lead {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.graph-places-lead-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, rgba(232, 168, 56, 0.85), rgba(232, 168, 56, 0.05));
  transform-origin: left center;
  box-shadow: 0 0 8px rgba(232, 168, 56, 0.35);
}

.graph-places-lead-target {
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid rgba(232, 168, 56, 0.9);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(232, 168, 56, 0.45);
}

.graph-carousel {
  flex-shrink: 0;
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border-top: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.94);
  overflow-x: auto;
  scrollbar-width: thin;
  pointer-events: auto;
}

.graph-carousel-card {
  flex: 0 0 auto;
  min-width: 5.5rem;
  max-width: 10rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--btn-surface);
  color: var(--ink);
  font-family: var(--chrome-font);
  font-size: 0.68rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.graph-carousel-card-type {
  display: block;
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.graph-canvas-stage .graph-canvas {
  flex: 1 1 auto;
}

.right-rail.map-highlight-pulse #dynamic-window {
  box-shadow: inset 0 0 0 2px rgba(232, 168, 56, 0.55);
}

.graph-canvas {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  background: var(--canvas);
  background-image:
    linear-gradient(rgba(77, 208, 225, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 208, 225, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  position: relative;
  overflow: hidden;
  contain: layout paint;
}

.graph-canvas.graph-canvas-3d {
  background: var(--canvas);
  background-image:
    radial-gradient(circle at 50% 45%, rgba(77, 208, 225, 0.08), transparent 55%),
    radial-gradient(circle at 1px 1px, rgba(77, 208, 225, 0.06) 1px, transparent 0);
  background-size: 100% 100%, 28px 28px;
}

.graph-canvas.graph-canvas-3d canvas {
  outline: none;
}

.graph-canvas canvas {
  display: block;
}

.rail-detail-section {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  flex-direction: column;
}

.dynamic-window-header {
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.dynamic-window-title {
  font-family: var(--chrome-font);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0;
}

.dynamic-window.hidden {
  display: none;
}

.timeline-section-header {
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.timeline-section-title {
  font-family: var(--chrome-font);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0;
}

.timeline-body {
  padding: 0.65rem 0.85rem 0.85rem;
  overflow: auto;
}

.timeline-estimate-note {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}

.timeline-axis-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.timeline-axis-end {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.timeline-axis-track {
  position: relative;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(77, 208, 225, 0.08);
  border: 1px solid var(--border);
  overflow: hidden;
}

.timeline-span {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
  border-radius: 999px;
  background: #4dd0e1;
  opacity: 0.85;
  box-shadow: 0 0 8px rgba(77, 208, 225, 0.45);
}

.timeline-span-static {
  background: #7eb8d4;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 0;
  max-height: 14rem;
  overflow-y: auto;
}

.timeline-list-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(77, 208, 225, 0.12);
  font-size: 0.82rem;
  font-family: var(--chrome-font);
}

.timeline-list-item:last-child {
  border-bottom: none;
}

.timeline-list-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.timeline-list-name:hover {
  color: var(--accent);
}

.timeline-list-name-static {
  cursor: default;
}

.timeline-list-name-static:hover {
  color: var(--ink);
}

.timeline-list-range {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.timeline-list-item-selected .timeline-list-name {
  font-weight: 600;
  color: var(--accent-warm);
}

.dynamic-window-body {
  padding: 0.85rem 1rem;
  overflow: auto;
}

.reading-pane {
  max-width: none;
}

.reading-ref {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.reading-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.reading-text {
  margin: 0.75rem 0 0.5rem;
  padding: 0 0 0 1rem;
  border-left: 4px solid var(--accent-warm);
  font-family: var(--reading-font);
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--reading-ink);
}

.reading-list {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
}

.reading-list li {
  padding: 0.2rem 0;
}

.reading-tree {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.reading-tree[data-depth="0"] {
  margin-top: 0.75rem;
}

.reading-tree-item {
  margin: 0.1rem 0;
}

.reading-tree-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.reading-tree-toggle,
.reading-tree-link {
  font: inherit;
  font-size: 0.92rem;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0.15rem 0.1rem;
  text-align: left;
}

.reading-tree-toggle {
  width: 1.1rem;
  flex-shrink: 0;
  color: var(--muted);
}

.reading-tree-spacer {
  display: inline-block;
  width: 1.1rem;
  flex-shrink: 0;
}

.reading-tree-link:hover,
.reading-tree-toggle:hover {
  color: var(--accent);
}

.reading-tree-children {
  padding-left: 1.1rem;
}

.reading-tree-children.hidden {
  display: none;
}

.reading-tree-verse-text {
  margin: 0.35rem 0 0.5rem 1.35rem;
  font-family: var(--reading-font);
  font-size: 1.05rem;
  color: var(--reading-ink);
}

.concepts-block {
  font-size: 0.88rem;
}

.concepts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.concepts-list li {
  padding: 0.25rem 0;
}

.concepts-subheading {
  font-size: 0.82rem;
  margin: 0.5rem 0 0.2rem;
  color: var(--muted);
}

.concepts-sublist {
  list-style: none;
  padding: 0.15rem 0 0.15rem 0.85rem;
  margin: 0;
}

.concept-link {
  display: inline;
  font: inherit;
  font-size: inherit;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.concept-link:hover {
  color: var(--accent);
}

.easton-definition {
  font-family: var(--reading-font);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--reading-ink);
}

.easton-term {
  margin: 0 0 0.35rem;
}

.rail-section.hidden {
  display: none;
}

.map-embed {
  width: 100%;
  height: 12rem;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.map-attribution {
  margin: 0.35rem 0 0;
}

.rail-reveal {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font: inherit;
  font-family: var(--chrome-font);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  writing-mode: vertical-rl;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--hud-glow);
}

.rail-reveal-left {
  left: 0;
}

.rail-reveal-right {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.rail-reveal.hidden {
  display: none;
}

.related-list,
.suggestions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list li,
.suggestions-list li {
  padding: 0.15rem 0;
}

.related-link,
.suggestion-link {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.related-link:hover,
.suggestion-link:hover {
  border-color: var(--border);
  background: rgba(77, 208, 225, 0.08);
  box-shadow: inset 0 0 0 1px var(--hud-glow);
}

.related-static {
  display: block;
  font-size: 0.88rem;
  padding: 0.35rem 0.45rem;
  color: var(--muted);
}

.related-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.empty-item {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.25rem 0;
}

.detail-panel {
  width: min(22rem, 38vw);
  border-left: 1px solid var(--border);
  background: var(--panel);
  overflow-y: auto;
  flex-shrink: 0;
}

.graph-canvas.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 16, 0.55);
  pointer-events: none;
}

.detail-panel {
  width: min(22rem, 38vw);
  border-left: 1px solid var(--border);
  background: var(--panel);
  overflow-y: auto;
  flex-shrink: 0;
}

.panel-content {
  padding: 1rem 0.85rem 0.5rem;
}

.panel-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
}

.breadcrumb-sep {
  color: var(--muted);
}

.breadcrumb-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--link);
  cursor: pointer;
  font: inherit;
  font-family: var(--chrome-font);
  text-decoration: underline;
}

.breadcrumb-link:hover {
  color: var(--link-hover);
}

.panel-title {
  font-family: var(--reading-font);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  line-height: 1.25;
  color: var(--reading-ink);
}

.panel-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--chrome-font);
  margin: 0.25rem 0;
}

.panel-text {
  margin: 1rem 0 0.5rem;
  padding: 0 0 0 0.85rem;
  border-left: 3px solid var(--accent-warm);
  font-family: var(--reading-font);
  font-size: 1.05rem;
  color: var(--reading-ink);
}

.panel-section {
  margin-top: 1.25rem;
}

.panel-section h2 {
  font-family: var(--chrome-font);
  font-size: 0.72rem;
  margin: 0 0 0.35rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-section ul {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
}

.panel-section li {
  padding: 0.2rem 0;
}

.panel-hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.map-link {
  font-size: 0.85rem;
}

.explore-footer {
  padding: 0.45rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}

.explore-footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--chrome-font);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.search-results-banner {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  max-height: 30vh;
  overflow-y: auto;
}

.search-results-banner h2 {
  font-size: 0.95rem;
  margin: 0.75rem 0 0.25rem;
  color: var(--muted);
}

.search-results-banner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-results-banner li {
  padding: 0.15rem 0;
}

@media (max-width: 900px) {
  .explore-main {
    flex-direction: column;
  }

  .left-rail,
  .right-rail {
    width: 100%;
    max-height: 28vh;
    border-left: none;
    border-right: none;
    overflow-y: auto;
  }

  .left-rail {
    border-bottom: 1px solid var(--border);
    order: 2;
  }

  .center-column {
    order: 1;
    min-height: 58vh;
  }

  .graph-viewport {
    min-height: 48vh;
  }

  .graph-canvas {
    min-height: 42vh;
    touch-action: pan-x pan-y pinch-zoom;
  }

  .graph-hud-carousel {
    max-height: 6.75rem;
    padding: 0.3rem 0.45rem 0.4rem;
  }

  .graph-hud-carousel-track {
    min-height: 4.75rem;
    max-height: 5.75rem;
  }

  .graph-hud-card {
    width: 9.5rem;
    min-height: 4.5rem;
    max-height: 5.5rem;
  }

  .graph-lens-strip {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 0.55rem 0.5rem;
    gap: 0.45rem;
  }

  .graph-lens-tab {
    min-width: 5.25rem;
    min-height: 2.35rem;
    font-size: 0.82rem;
  }

  .right-rail {
    border-top: 1px solid var(--border);
    order: 3;
    max-height: none;
  }

  .rail-reveal {
    top: auto;
    bottom: 4.5rem;
    transform: none;
  }

  #show-left-rail.rail-reveal {
    left: 0.5rem;
  }

  #show-right-rail.rail-reveal {
    right: 0.5rem;
  }

  .explore-header {
    flex-wrap: wrap;
  }

  .explore-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }
}

/* Not-found page: one problem line, one next step (search), one fallback link. */
.not-found-body .explore-header {
  gap: 1rem;
}

.not-found {
  max-width: 34rem;
  margin: 12vh auto 0;
  padding: 0 1.25rem;
}

.not-found h1 {
  font-family: var(--chrome-font);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.6rem;
}

.not-found p {
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

.not-found .not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.not-found .search-form {
  flex: 1 1 18rem;
}

.not-found .secondary-link {
  color: var(--link);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Curriculum spine home (calm structure palette, distinct from explorer HUD) */
.spine-home-body {
  --bg: #f4f1ea;
  --ink: #1f2933;
  --muted: #5c6b7a;
  --panel: #fffcf7;
  --border: #d8cfc0;
  --link: #2f5d50;
  --structure-accent: #5b4f8a;
  --structure-soft: rgba(91, 79, 138, 0.12);
  --bible-accent: #8b6914;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100vh;
}

.spine-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.spine-brand {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.spine-search {
  flex: 1 1 16rem;
  max-width: 28rem;
}

.spine-link {
  color: var(--bible-accent);
  font-size: 0.95rem;
}

.spine-main.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--structure-accent);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.guide-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1.25rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--structure-soft) 0%, rgba(139, 105, 20, 0.08) 100%);
  border: 1px solid rgba(91, 79, 138, 0.22);
}

@media (min-width: 720px) {
  .guide-hero {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    padding: 2rem 2rem;
  }
}

.guide-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  margin: 0 0 0.65rem;
  line-height: 1.2;
}

.guide-hero-mission {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 36rem;
}

.guide-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--structure-accent);
  color: #fff;
  border-color: var(--structure-accent);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: transparent;
  color: var(--structure-accent);
  border-color: rgba(91, 79, 138, 0.45);
}

.btn-secondary:hover {
  background: var(--structure-soft);
}

.guide-hero-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.hero-orbit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 6rem;
}

.orbit-node {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.orbit-structure {
  background: rgba(91, 79, 138, 0.18);
  color: var(--structure-accent);
  border: 1px solid rgba(91, 79, 138, 0.35);
}

.orbit-bible {
  background: rgba(139, 105, 20, 0.14);
  color: var(--bible-accent);
  border: 1px solid rgba(139, 105, 20, 0.35);
}

.orbit-connector {
  width: 2.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--structure-accent), var(--bible-accent));
  border-radius: 2px;
}

.spine-link-bible {
  font-weight: 600;
}

.spine-guides-compact {
  margin-bottom: 1.75rem;
}

.spine-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--structure-accent);
  margin: 0 0 0.5rem;
}

.spine-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.spine-lead {
  color: var(--muted);
  line-height: 1.65;
  max-width: 42rem;
}

.guide-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guide-card:hover {
  border-color: var(--structure-accent);
  box-shadow: 0 4px 18px rgba(31, 41, 51, 0.08);
}

.guide-card-active {
  border-color: var(--structure-accent);
  background: var(--structure-soft);
}

.guide-card-soon {
  opacity: 0.72;
  pointer-events: none;
}

.guide-card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.guide-card-title {
  font-weight: 600;
}

.guide-card-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.part-card {
  padding: 1.1rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.part-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--structure-accent);
  opacity: 0.85;
}

.part-card-2::before { background: #6a5acd; }
.part-card-3::before { background: #7b4397; }
.part-card-4::before { background: #5b4f8a; }

.part-card:hover {
  border-color: var(--structure-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.1);
}

.part-icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.35rem;
  border-radius: 8px;
  background: var(--structure-soft);
  position: relative;
}

.part-icon-1 {
  background: linear-gradient(145deg, rgba(91, 79, 138, 0.25), rgba(91, 79, 138, 0.08));
  mask: radial-gradient(circle at 50% 45%, #000 38%, transparent 40%);
  -webkit-mask: radial-gradient(circle at 50% 45%, #000 38%, transparent 40%);
}

.part-icon-2 {
  background: linear-gradient(145deg, rgba(106, 90, 205, 0.22), rgba(106, 90, 205, 0.06));
  box-shadow: inset 0 -6px 0 rgba(106, 90, 205, 0.35);
}

.part-icon-3 {
  background: repeating-linear-gradient(
    90deg,
    rgba(123, 67, 151, 0.35) 0,
    rgba(123, 67, 151, 0.35) 4px,
    transparent 4px,
    transparent 8px
  );
}

.part-icon-4 {
  background: linear-gradient(180deg, rgba(91, 79, 138, 0.2) 0%, rgba(139, 105, 20, 0.15) 100%);
  border: 1px solid rgba(91, 79, 138, 0.2);
}

.part-num {
  font-size: 0.75rem;
  color: var(--structure-accent);
  font-weight: 600;
}

.part-title {
  font-weight: 600;
}

.part-sub,
.part-page {
  font-size: 0.85rem;
  color: var(--muted);
}

.interval-rail {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.interval-rail.compact {
  gap: 0.5rem;
}

.interval-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--structure-soft);
  border: 1px solid rgba(91, 79, 138, 0.25);
  text-decoration: none;
  color: var(--ink);
}

.interval-n {
  font-weight: 700;
  color: var(--structure-accent);
  min-width: 1.25rem;
}

.interval-concepts {
  list-style: none;
  padding: 0.35rem 0 0 2rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.interval-concepts a {
  color: var(--link);
}

.spine-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.spine-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.license-callout {
  max-width: 40rem;
  line-height: 1.55;
}

.concept-cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.concept-card {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
}

.concept-name {
  display: block;
  font-weight: 600;
  color: var(--structure-accent);
}

.concept-gloss {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.session-chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.session-chip {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--structure-soft);
  font-size: 0.85rem;
}

.spine-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.9rem;
  align-items: center;
}

.spine-crumb a {
  color: var(--link);
}

/* Interval journey path */
.spine-journey {
  margin-top: 2.25rem;
}

.journey-header {
  margin-bottom: 0.75rem;
}

.journey-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.journey-scroller {
  overflow-x: auto;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.journey-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: min-content;
  padding: 0.5rem 0.25rem 1rem;
}

.journey-step {
  position: relative;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.journey-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 5.5rem;
  padding: 0.65rem 0.4rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 12px;
  border: 2px solid rgba(91, 79, 138, 0.28);
  background: var(--panel);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.journey-node:hover,
.journey-node:focus-visible {
  border-color: var(--structure-accent);
  box-shadow: 0 6px 20px rgba(91, 79, 138, 0.18);
  transform: translateY(-3px);
  outline: none;
}

.journey-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--structure-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.journey-title {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journey-connector {
  flex: 0 0 1.25rem;
  align-self: center;
  height: 3px;
  margin-top: 1.5rem;
  background: linear-gradient(90deg, var(--structure-accent), rgba(139, 105, 20, 0.55));
  border-radius: 2px;
  opacity: 0.65;
}

.journey-popover {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.35rem);
  transform: translateX(-50%) translateY(0.25rem);
  min-width: 11rem;
  max-width: 14rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--ink);
  color: #f4f1ea;
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.journey-step:hover .journey-popover,
.journey-step:focus-within .journey-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.journey-popover-label {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
}

.journey-concept-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.journey-concept-chips a {
  color: #e8dcc8;
  text-decoration: none;
  font-weight: 600;
}

.journey-concept-chips a:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .journey-node {
    width: 4.75rem;
  }

  .guide-hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* Concept focus spotlight (explorer) */
.explore-body .concept-spotlight {
  margin: 0 0.5rem 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(171, 71, 188, 0.35);
  background: linear-gradient(135deg, rgba(91, 79, 138, 0.22) 0%, rgba(10, 16, 28, 0.95) 55%);
}

.explore-body .concept-spotlight.hidden {
  display: none;
}

.explore-body .concept-spotlight-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.explore-body .concept-spotlight-text {
  flex: 1 1 14rem;
  min-width: 0;
}

.explore-body .concept-spotlight-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ce93d8;
}

.explore-body .concept-spotlight-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #f3e5f5;
  font-family: var(--chrome-font);
}

.explore-body .concept-spotlight-gloss {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #b0bec5;
  font-family: var(--reading-font);
}

.explore-body .concept-spotlight-verses {
  flex: 1 1 12rem;
}

.explore-body .concept-spotlight-verses-label {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #e8a838;
}

.explore-body .concept-spotlight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.explore-body .scripture-chip,
.explore-body .scripture-chip-gold {
  border: 1px solid rgba(232, 168, 56, 0.55);
  background: rgba(232, 168, 56, 0.12);
  color: #ffe082;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--chrome-font);
}

.explore-body .scripture-chip:hover {
  background: rgba(232, 168, 56, 0.22);
}

.explore-body .concept-spotlight-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.explore-body .reading-concept-gloss {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--reading-ink);
}

.explore-body .reading-scripture-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
