:root {
  --bg: #f6f1e7;
  --ink: #1d2520;
  --muted: #5f6a62;
  --line: #d8ccba;
  --panel: #fffaf1;
  --panel-strong: #ffffff;
  --accent: #2f6f4e;
  --accent-soft: rgba(47, 111, 78, 0.16);
  --amber: #b06d2f;
  --blue: #365f87;
  --warn: #9d4b36;
  --shadow: 0 18px 45px rgba(31, 42, 36, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, #fff9e8 0, transparent 34rem), var(--bg);
}
button, input, select { font: inherit; }
input, select, textarea { min-width: 0; }
button, .button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  padding: 10px 13px;
  font-weight: 760;
  cursor: pointer;
  text-decoration: none;
}
button:hover, button.active, .button.primary, button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.ghost { background: transparent; }
button.ghost:hover { background: var(--accent-soft); color: var(--ink); }
button.secondary { margin-top: 18px; width: 100%; background: #eff6f1; border-color: rgba(47, 111, 78, 0.28); color: var(--accent); }
button.small { padding: 6px 9px; font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(34px, 5vw, 56px); letter-spacing: 0; }
h2 { margin-bottom: 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.04; letter-spacing: 0; }
h3 { line-height: 1.18; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 231, 0.94);
  backdrop-filter: blur(14px);
}
nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
nav button { white-space: nowrap; }
main { width: min(100%, 1440px); margin: 0 auto; padding: clamp(16px, 3vw, 28px); }
.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.panel, .card {
  min-width: 0;
  background: rgba(255, 250, 241, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.panel { padding: clamp(18px, 3vw, 24px); }
.card { padding: 16px; box-shadow: none; }
.lede { max-width: 74ch; color: var(--muted); font-size: 18px; line-height: 1.55; }
.compact-lede { margin-bottom: 0; font-size: 15px; }
.hero, .tree-page, .journey-page {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.55fr);
  gap: 20px;
  align-items: start;
}
.hero { grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr); }
.metrics-grid, .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.stat { border-left: 4px solid var(--accent); padding-left: 12px; }
.stat strong { display: block; font-size: 30px; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.prompt {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  background: #17211b;
  color: #f6f0df;
  border-radius: 8px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.operating-loop { margin-top: 20px; }
.loop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.loop-step {
  display: grid;
  gap: 8px;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 15px;
}
.loop-step strong { color: var(--ink); font-size: 16px; }
.loop-step span { color: var(--muted); line-height: 1.45; }
.section-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mode-tabs button { min-width: 92px; }
.save-state {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}
.tree-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(100%, 360px);
}
.tree-header-actions button { min-width: 0; }
.tree-workspace { min-width: 0; }
.tree-mode-list {
  grid-template-columns: minmax(0, 1fr);
}
.tree-mode-list .profile {
  position: static;
}
.tree-stage {
  min-height: 500px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf6ed;
}
.tree-stage[data-mode="pedigree"], .tree-stage[data-mode="list"] { padding: 12px; }
.profile { position: sticky; top: 110px; min-width: 0; }
.profile.is-hidden { display: none; }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.profile h3 { margin-bottom: 16px; font-size: 26px; }
.profile dl {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 9px 12px;
  margin: 0;
}
.profile dt { color: var(--muted); font-weight: 760; }
.profile dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}
.profile-actions button { flex: 1 1 92px; }
.profile-form {
  display: grid;
  gap: 16px;
}
.profile-form h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}
.form-context {
  margin: -4px 0 0;
  border: 1px solid #2f7c6e;
  border-radius: 8px;
  background: #10352d;
  color: #d8f5ed;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 760;
}
.form-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-form label,
.notes-field {
  display: grid;
  gap: 5px;
  color: #d2dcd6;
  font-size: 12px;
  font-weight: 760;
}
.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  min-height: 39px;
  border: 1px solid #6b8178;
  border-radius: 8px;
  background: #f7faf8;
  color: #102019;
  color-scheme: light;
  padding: 8px 10px;
}
.profile-form input::placeholder,
.profile-form textarea::placeholder {
  color: #56645f;
  opacity: 1;
  font-weight: 650;
}
.profile-form input:hover,
.profile-form select:hover,
.profile-form textarea:hover { border-color: #315f55; }
.profile-form input:focus-visible,
.profile-form select:focus-visible,
.profile-form textarea:focus-visible {
  border-color: #2f7c6e;
  outline: 3px solid #2f7c6e;
  outline-offset: 2px;
}
.profile-form textarea {
  min-height: 92px;
  resize: vertical;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.form-actions button { flex: 1 1 150px; }
button.danger {
  border-color: rgba(157,75,54,0.38);
  background: #fff6f2;
  color: var(--warn);
}
button.danger:hover {
  border-color: var(--warn);
  background: var(--warn);
  color: white;
}
.pedigree-scroll, .fan-scroll, .table-scroll { width: 100%; overflow: auto; }
.pedigree-scroll { min-height: 470px; }
.pedigree-chart { position: relative; min-width: 100%; }
.pedigree-wires { position: absolute; inset: 0; pointer-events: none; }
.wire { fill: none; stroke: #97a79b; stroke-width: 2; }
.wire-gap { stroke-dasharray: 5 5; stroke: #b79048; }
.generation-label {
  position: absolute;
  top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}
.pedigree-slot { position: absolute; }
.pedigree-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  padding: 8px 10px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 42, 36, 0.08);
}
.pedigree-card:hover, .pedigree-card.selected { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.pedigree-card.research-gap { border-style: dashed; background: #fff8e7; box-shadow: none; cursor: default; }
.avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e7efe9;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}
.card-text { min-width: 0; }
.card-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.card-text span { display: block; color: var(--muted); font-size: 12px; }
.fan-controls {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: fit-content;
  padding: 12px;
}
.fan-scroll { min-height: 490px; padding: 0 12px 16px; }
.fan-settings {
  border-radius: 999px;
  background: var(--panel-strong);
  box-shadow: 0 8px 18px rgba(31, 42, 36, 0.12);
}
.fan-generation-control {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  padding: 4px 6px 4px 12px;
  box-shadow: 0 8px 18px rgba(31, 42, 36, 0.12);
  color: var(--muted);
  font-size: 13px;
}
.fan-generation-control button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
}
.fan-generation-control button.on { background: var(--accent); color: white; }
.fan-svg { display: block; max-width: none; overflow: visible; }
.fan-sector {
  fill: var(--fan-fill);
  stroke: var(--fan-stroke);
  stroke-width: 1.5;
  cursor: pointer;
  transition: filter 0.12s, stroke-width 0.12s;
}
.fan-sector:hover { filter: brightness(0.98) saturate(1.08); stroke-width: 2.4; }
.fan-sector.selected { stroke: #101713; stroke-width: 3; }
.fan-sector.gap { fill: #fff8e7; stroke-dasharray: 6 5; cursor: default; }
.fan-line-green { --fan-fill: #e0efe8; --fan-stroke: #6e9281; }
.fan-line-blue { --fan-fill: #e0f1f8; --fan-stroke: #6ba8c4; }
.fan-line-gold { --fan-fill: #f7eed4; --fan-stroke: #c19d42; }
.fan-line-red { --fan-fill: #f9e6dc; --fan-stroke: #df816b; }
.fan-label {
  pointer-events: none;
  fill: #28231d;
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  stroke: rgba(255,255,255,0.72);
  stroke-width: 2.2px;
  paint-order: stroke fill;
  stroke-linejoin: round;
}
.fan-label .name { font-weight: 850; fill: #28231d; }
.fan-label .dates { font-weight: 720; fill: #4c473f; }
.fan-label.gap .name { fill: #1f1c18; font-weight: 850; }
.fan-label.gap .dates { fill: #574f43; }
.fan-label.gen-1 { font-size: 12px; }
.fan-label.gen-2 { font-size: 11px; }
.fan-label.gen-3 { font-size: 10px; }
.fan-label.gen-4, .fan-label.gen-5, .fan-label.gen-6 { font-size: 8.8px; }
.fan-compact .fan-label.gen-1 { font-size: 10px; }
.fan-compact .fan-label.gen-2 { font-size: 9px; }
.fan-compact .fan-label.gen-3, .fan-compact .fan-label.gen-4, .fan-compact .fan-label.gen-5, .fan-compact .fan-label.gen-6 { font-size: 7.8px; }
.fan-center { cursor: pointer; }
.fan-center circle { fill: #fffaf1; stroke: var(--accent); stroke-width: 2.5; }
.fan-center.selected circle { stroke: #101713; stroke-width: 3; }
.fan-center text { pointer-events: none; text-anchor: middle; fill: var(--ink); font-size: 11px; font-weight: 850; }
.fan-center .dates { fill: var(--muted); font-size: 10.5px; font-weight: 650; }
.list-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(130px, 0.8fr) minmax(150px, 1fr) minmax(150px, 0.9fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}
.list-toolbar > * { min-width: 0; }
.list-toolbar label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 760; }
.search, .list-toolbar input, .list-toolbar select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
}
.list-count { margin: 8px 0; color: var(--muted); font-size: 13px; font-weight: 760; }
.list-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}
th, td { border-bottom: 1px solid var(--line); padding: 11px 12px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
th button { border: 0; background: transparent; padding: 0; color: inherit; text-transform: inherit; letter-spacing: inherit; font-size: inherit; }
td span { display: block; color: var(--muted); font-size: 12px; }
.mobile-list { display: none; }
.person-row-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}
.person-row-card h3 { margin-bottom: 9px; font-size: 18px; }
.person-row-card dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 6px 10px; margin: 0; }
.person-row-card dt { color: var(--muted); font-weight: 760; }
.person-row-card dd { margin: 0; overflow-wrap: anywhere; }
.badge {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.badge.good { color: var(--accent); border-color: rgba(47,111,78,0.35); }
.badge.warn { color: var(--warn); border-color: rgba(157,75,54,0.35); }
.journey-page { grid-template-columns: minmax(0, 1fr) minmax(290px, 0.32fr); }
.journey-stage {
  overflow: hidden;
  background: #0b141d;
  color: #f6fbff;
  border-color: rgba(140, 187, 220, 0.25);
}
.journey-stage .eyebrow { color: #7ee0d2; }
.journey-header { margin-bottom: 10px; }
.journey-now {
  flex: 0 0 auto;
  min-width: 88px;
  border: 1px solid rgba(126, 224, 210, 0.34);
  border-radius: 999px;
  padding: 8px 13px;
  color: #d8fff9;
  text-align: center;
  font-size: 20px;
  font-weight: 850;
}
.globe-frame {
  position: relative;
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  background: #08121b;
}
#globe { display: block; width: 100%; height: clamp(420px, 58vw, 680px); }
.journey-banner {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 3px;
  max-width: 560px;
  border: 1px solid rgba(226, 241, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 18, 27, 0.72);
  backdrop-filter: blur(10px);
  color: white;
  padding: 12px 14px;
}
.journey-banner strong { color: #ffe08a; }
.journey-banner span { font-size: 18px; font-weight: 820; }
.journey-banner small { color: #bed1df; }
.journey-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}
.timeline { width: 100%; accent-color: #6ee7d8; }
.journey-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 13px; color: #cfe3ef; font-size: 13px; }
.journey-legend span { display: inline-flex; align-items: center; gap: 6px; text-transform: capitalize; }
.journey-legend i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }
.event-panel { max-height: calc(100vh - 132px); overflow: hidden; }
.event-feed { display: grid; gap: 8px; max-height: 680px; overflow: auto; padding-right: 4px; }
.event-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: white;
  padding: 10px 11px;
  text-align: left;
  color: var(--ink);
}
.event-item span { font-weight: 760; }
.event-item small { color: var(--muted); line-height: 1.35; }
.event-item.past { border-left-color: #9bb7a7; }
.event-item.active { border-left-color: var(--amber); outline: 3px solid rgba(176,109,47,0.14); }
.worker-state {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e7f0e9;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.worker-state.blocked, .worker-state.review { background: #f7e9df; color: var(--warn); }
.source-pack { border-top: 4px solid var(--blue); }
.question-list { line-height: 1.6; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }

.roots-journey-canvas {
  --j-bg: #05070f;
  --j-panel: rgba(13, 17, 30, .78);
  --j-panel-solid: #0d111e;
  --j-line: rgba(122, 138, 180, .18);
  --j-ink: #e8ecf6;
  --j-ink-soft: #8d97b4;
  --j-gold: #e8c47a;
  --j-gold-soft: rgba(232, 196, 122, .5);
  --j-serif: Georgia, "Times New Roman", serif;
  --j-sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  position: relative;
  width: 100vw;
  min-height: 100dvh;
  overflow: hidden;
  background: #05070f;
  color: var(--j-ink);
  font: 14px/1.45 var(--j-sans);
}
.roots-journey-canvas #stage {
  position: absolute;
  inset: 0;
  background: #05070f;
}
.roots-journey-canvas #stage canvas { display: block; width: 100%; height: 100%; }
.roots-journey-canvas #labels {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.roots-journey-canvas .plabel {
  position: absolute;
  transform: translate(-50%, -100%);
  color: var(--j-ink);
  font-size: 14.5px;
  letter-spacing: .02em;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,.95), 0 0 14px rgba(0,0,0,.8);
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  transition: opacity .3s;
}
.roots-journey-canvas .plabel .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: 0;
}
.roots-journey-canvas .plabel.focused { font-size: 16.5px; font-weight: 700; }
.roots-journey-canvas .plabel .age {
  margin-left: 4px;
  color: var(--j-ink-soft);
  font-size: 11px;
}
.roots-journey-canvas .plabel .rel {
  display: block;
  margin-top: -1px;
  margin-left: 14px;
  color: var(--j-gold);
  font-size: 10.5px;
  letter-spacing: .04em;
}
.roots-journey-canvas #hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(5,7,15,.85), transparent);
}
.roots-journey-canvas #hud-top .right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: auto;
}
.roots-journey-canvas .journey-context {
  display: inline-block;
  border: 1px solid var(--j-line);
  border-radius: 6px;
  background: var(--j-panel);
  color: var(--j-ink-soft);
  padding: 5px 9px;
  font-size: 11px;
  backdrop-filter: blur(8px);
}
.roots-journey-canvas .chip-btn {
  min-height: 0;
  border: 1px solid var(--j-line);
  border-radius: 99px;
  background: var(--j-panel);
  color: var(--j-ink-soft);
  padding: 4px 14px;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.roots-journey-canvas .chip-btn:hover {
  border-color: var(--j-gold-soft);
  color: var(--j-ink);
}
.roots-journey-canvas .chip-btn.active {
  border-color: var(--j-gold-soft);
  color: var(--j-gold);
}
.roots-journey-canvas .journey-load-chip input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.roots-journey-canvas #year-display {
  position: absolute;
  left: 50%;
  top: 54px;
  z-index: 9;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}
.roots-journey-canvas #year-display .yr {
  color: var(--j-ink);
  font-family: var(--j-serif);
  font-size: 58px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1;
  text-shadow: 0 0 30px rgba(232,196,122,.25), 0 2px 12px rgba(0,0,0,.8);
  font-variant-numeric: tabular-nums;
}
.roots-journey-canvas #year-display .season {
  margin-top: 4px;
  color: var(--j-ink-soft);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.roots-journey-canvas #year-display .alive {
  margin-top: 6px;
  color: var(--j-ink-soft);
  font-size: 12px;
}
.roots-journey-canvas #year-display .alive b {
  color: var(--j-gold);
  font-weight: 700;
}
.roots-journey-canvas #banner {
  position: absolute;
  left: 50%;
  bottom: 154px;
  z-index: 11;
  max-width: min(620px, 90vw);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s, transform .5s;
}
.roots-journey-canvas #banner.show { opacity: 1; }
.roots-journey-canvas #banner .b-kind {
  margin-bottom: 7px;
  color: var(--j-gold);
  font-size: 10.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
}
.roots-journey-canvas #banner .b-main {
  font-family: var(--j-serif);
  font-size: 24px;
  line-height: 1.3;
  text-shadow: 0 2px 16px rgba(0,0,0,.9);
}
.roots-journey-canvas #banner .b-sub {
  margin-top: 6px;
  color: var(--j-ink-soft);
  font-size: 12.5px;
}
.roots-journey-canvas #feed {
  position: absolute;
  right: 0;
  top: 104px;
  bottom: 150px;
  z-index: 8;
  display: flex;
  width: 384px;
  flex-direction: column;
  padding-right: 14px;
  transition: transform .35s;
}
.roots-journey-canvas #feed.hidden { transform: translateX(396px); }
.roots-journey-canvas #feed h2,
.roots-journey-canvas #cast h2 {
  padding: 0 10px 8px;
  color: var(--j-ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.roots-journey-canvas #feed-list,
.roots-journey-canvas #cast-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-bottom: 30px;
  mask-image: linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 30px), transparent);
}
.roots-journey-canvas .feed-item {
  display: flex;
  gap: 10px;
  border-radius: 9px;
  padding: 7px 10px;
  cursor: pointer;
  opacity: .45;
  transition: opacity .3s, background .2s;
}
.roots-journey-canvas .feed-item:hover {
  background: var(--j-panel);
  opacity: .9;
}
.roots-journey-canvas .feed-item.past { opacity: .8; }
.roots-journey-canvas .feed-item.current {
  background: var(--j-panel);
  outline: 1px solid var(--j-line);
  opacity: 1;
}
.roots-journey-canvas .feed-item .fi-year {
  min-width: 46px;
  padding-top: 1px;
  color: var(--j-gold);
  font-family: var(--j-serif);
  font-size: 15px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.roots-journey-canvas .feed-item .fi-year.approx { color: var(--j-ink-soft); }
.roots-journey-canvas .feed-item .fi-glyph {
  flex: none;
  width: 18px;
  padding-top: 1px;
  font-size: 13.5px;
  text-align: center;
}
.roots-journey-canvas .feed-item .fi-text {
  color: var(--j-ink);
  font-size: 14px;
  line-height: 1.45;
}
.roots-journey-canvas .feed-item .fi-text b { font-weight: 650; }
.roots-journey-canvas .feed-item .fi-place {
  color: var(--j-ink-soft);
  font-size: 12.5px;
}
.roots-journey-canvas #cast {
  position: absolute;
  left: 0;
  top: 104px;
  bottom: 150px;
  z-index: 8;
  display: flex;
  width: 250px;
  flex-direction: column;
  padding-left: 14px;
  transition: transform .35s;
}
.roots-journey-canvas #cast.hidden { transform: translateX(-260px); }
.roots-journey-canvas .cast-place {
  padding: 10px 10px 3px;
  color: var(--j-ink-soft);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.roots-journey-canvas .cast-person {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 13.5px;
  cursor: pointer;
}
.roots-journey-canvas .cast-person:hover,
.roots-journey-canvas .cast-person.focused {
  background: var(--j-panel);
}
.roots-journey-canvas .cast-person.focused { outline: 1px solid var(--j-gold-soft); }
.roots-journey-canvas .cast-person .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.roots-journey-canvas .cast-person .age {
  margin-left: auto;
  color: var(--j-ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.roots-journey-canvas .cast-person.moving .age::before {
  content: "✈ ";
  font-size: 9px;
}
.roots-journey-canvas #legend {
  position: absolute;
  left: 16px;
  bottom: 150px;
  z-index: 8;
  display: none;
  border: 1px solid var(--j-line);
  border-radius: 12px;
  background: var(--j-panel);
  color: var(--j-ink-soft);
  padding: 10px 14px;
  font-size: 11px;
  backdrop-filter: blur(8px);
}
.roots-journey-canvas #legend.show { display: block; }
.roots-journey-canvas #legend h3 {
  margin: 6px 0 3px;
  color: var(--j-ink);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.roots-journey-canvas #legend .lg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.roots-journey-canvas #legend .lg-swatch {
  flex: none;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}
.roots-journey-canvas #legend .lg-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.roots-journey-canvas #legend .lg-glyph {
  flex: none;
  width: 14px;
  text-align: center;
  font-size: 12px;
}
.roots-journey-canvas #legend .lg-side {
  margin-left: 5px;
  opacity: .75;
  color: var(--j-ink-soft);
  font-size: 10px;
}
.roots-journey-canvas #person-card {
  position: absolute;
  left: 16px;
  top: 90px;
  z-index: 13;
  display: none;
  width: 270px;
  border: 1px solid var(--j-line);
  border-radius: 14px;
  background: var(--j-panel);
  padding: 14px 16px;
  backdrop-filter: blur(12px);
}
.roots-journey-canvas #person-card.show { display: block; }
.roots-journey-canvas #person-card h3 {
  padding-right: 20px;
  font-family: var(--j-serif);
  font-size: 17px;
  font-weight: 600;
}
.roots-journey-canvas #person-card .pc-line {
  margin: 2px 0 8px;
  color: var(--j-ink-soft);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.roots-journey-canvas #person-card .pc-fact {
  padding: 2px 0;
  color: var(--j-ink);
  font-size: 12px;
}
.roots-journey-canvas #person-card .pc-fact .g {
  display: inline-block;
  width: 16px;
}
.roots-journey-canvas #person-card .pc-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--j-ink-soft);
  padding: 0;
  font-size: 15px;
}
.roots-journey-canvas #person-card .pc-open {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--j-gold);
  padding: 0;
  font-size: 11.5px;
}
.roots-journey-canvas #hud-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  padding: 10px 20px 16px;
  background: linear-gradient(to top, rgba(5,7,15,.92) 60%, transparent);
}
.roots-journey-canvas #timeline-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.roots-journey-canvas #controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.roots-journey-canvas .ctl-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--j-line);
  border-radius: 99px;
  background: var(--j-panel);
  color: var(--j-ink);
  padding: 0;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.roots-journey-canvas .ctl-btn:hover { border-color: var(--j-gold-soft); }
.roots-journey-canvas .ctl-btn.primary {
  width: 52px;
  height: 52px;
  border-color: var(--j-gold-soft);
  color: var(--j-gold);
  font-size: 19px;
}
.roots-journey-canvas .speed-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.roots-journey-canvas .speed-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--j-ink-soft);
  padding: 3px 8px;
  font: inherit;
  font-size: 11px;
}
.roots-journey-canvas .speed-btn.active {
  border-color: var(--j-line);
  background: var(--j-panel);
  color: var(--j-gold);
}
.roots-journey-canvas #ctl-spacer { flex: 1; }
.roots-journey-canvas #now-label {
  color: var(--j-ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.roots-journey-canvas #scrubber {
  position: relative;
  height: 58px;
  cursor: crosshair;
}
.roots-journey-canvas #scrubber canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.roots-journey-canvas #scrub-handle {
  position: absolute;
  top: 0;
  bottom: 14px;
  width: 2px;
  background: var(--j-gold);
  box-shadow: 0 0 8px var(--j-gold-soft);
  pointer-events: none;
}
.roots-journey-canvas #scrub-handle::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: -4px;
  border: 5px solid transparent;
  border-bottom-color: var(--j-gold);
}
.roots-journey-canvas #scrub-tip {
  position: absolute;
  bottom: 64px;
  display: none;
  transform: translateX(-50%);
  border: 1px solid var(--j-line);
  border-radius: 6px;
  background: var(--j-panel-solid);
  color: var(--j-ink);
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}
.roots-journey-canvas #intro {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(5,7,15,.5), rgba(5,7,15,.92));
  text-align: center;
  transition: opacity .8s;
}
.roots-journey-canvas #intro.gone {
  opacity: 0;
  pointer-events: none;
}
.roots-journey-canvas #intro .box {
  max-width: 500px;
  padding: 30px;
}
.roots-journey-canvas #intro h1 {
  font-family: var(--j-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: .02em;
}
.roots-journey-canvas #intro .sub {
  margin: 14px 0 20px;
  max-width: none;
  color: #aab4d2;
  font-size: 14px;
  line-height: 1.6;
}
.roots-journey-canvas #intro .who {
  max-width: 340px;
  margin: 0 auto 24px;
  border: 1px solid var(--j-line);
  border-radius: 14px;
  background: var(--j-panel);
  padding: 14px 16px;
  text-align: left;
  backdrop-filter: blur(8px);
}
.roots-journey-canvas #intro .who label {
  display: block;
  margin-bottom: 8px;
  color: var(--j-gold);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.roots-journey-canvas #intro .who select {
  width: 100%;
  border: 1px solid var(--j-line);
  border-radius: 9px;
  background: var(--j-panel-solid);
  color: var(--j-ink);
  padding: 9px 10px;
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
}
.roots-journey-canvas #intro .who .who-hint {
  margin-top: 9px;
  color: #aab4d2;
  font-size: 11.5px;
  line-height: 1.5;
}
.roots-journey-canvas #intro button {
  border: 1px solid var(--j-gold-soft);
  border-radius: 99px;
  background: transparent;
  color: var(--j-gold);
  padding: 12px 34px;
  font: inherit;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.roots-journey-canvas #intro button:hover { background: rgba(232,196,122,.1); }
.roots-journey-canvas #intro .skip {
  display: block;
  margin: 18px auto 0;
  border: 0;
  color: var(--j-ink-soft);
  padding: 0;
  font-size: 19px;
  letter-spacing: .04em;
  text-transform: none;
}
@media (max-width: 1150px) {
  .roots-journey-canvas #cast { display: none; }
}
@media (max-width: 900px) {
  .roots-journey-canvas #feed { display: none; }
  .roots-journey-canvas #year-display .yr { font-size: 48px; }
  .roots-journey-canvas #intro .sub { font-size: 18px; }
  .roots-journey-canvas #intro .who select { font-size: 20px; }
  .roots-journey-canvas #intro .who .who-hint { font-size: 15px; }
  .roots-journey-canvas #intro button { font-size: 16px; }
}
@media (max-width: 560px) {
  .roots-journey-canvas #hud-top {
    justify-content: flex-end;
    padding: 12px 14px;
  }
  .roots-journey-canvas #hud-top .left { display: none; }
  .roots-journey-canvas #hud-top .right {
    max-width: 260px;
    gap: 5px;
  }
  .roots-journey-canvas .chip-btn {
    padding: 5px 9px;
    font-size: 10.5px;
    line-height: 1.2;
  }
  .roots-journey-canvas #btn-cast,
  .roots-journey-canvas #btn-feed,
  .roots-journey-canvas #btn-legend { display: none; }
  .roots-journey-canvas #year-display { top: 86px; }
  .roots-journey-canvas #year-display .yr { font-size: 34px; }
  .roots-journey-canvas #year-display .season {
    font-size: 9px;
    letter-spacing: .18em;
  }
  .roots-journey-canvas #year-display .alive { font-size: 12px; }
  .roots-journey-canvas #banner {
    bottom: 122px;
    max-width: calc(100vw - 28px);
  }
  .roots-journey-canvas #banner .b-main { font-size: 18px; }
  .roots-journey-canvas #person-card {
    top: auto;
    right: 8px;
    bottom: 116px;
    left: 8px;
    width: auto;
    max-height: 45vh;
    overflow: auto;
    border-radius: 6px;
  }
  .roots-journey-canvas #hud-bottom { padding: 8px 10px 58px; }
  .roots-journey-canvas #controls { gap: 6px; }
  .roots-journey-canvas .ctl-btn {
    width: 36px;
    height: 36px;
  }
  .roots-journey-canvas .ctl-btn.primary {
    width: 42px;
    height: 42px;
  }
  .roots-journey-canvas .speed-group {
    max-width: 130px;
    overflow-x: auto;
  }
  .roots-journey-canvas #intro .box {
    max-width: 360px;
    padding: 22px;
  }
  .roots-journey-canvas #intro h1 { font-size: 29px; }
  .roots-journey-canvas #intro .sub {
    font-size: 13px;
    line-height: 1.5;
  }
  .roots-journey-canvas #intro .who {
    padding: 14px 16px;
    border-radius: 14px;
  }
  .roots-journey-canvas #intro .who label { font-size: 10.5px; }
  .roots-journey-canvas #intro .who select {
    padding: 9px 10px;
    font-size: 14.5px;
  }
  .roots-journey-canvas #intro .who .who-hint {
    font-size: 11.5px;
    line-height: 1.5;
  }
  .roots-journey-canvas #intro button {
    max-width: 100%;
    padding: 11px 24px;
    font-size: 12px;
    letter-spacing: .1em;
  }
}
@media (max-width: 1050px) {
  .tree-page, .journey-page, .hero { grid-template-columns: 1fr; }
  .profile { position: static; }
  .event-panel { max-height: none; }
  .event-feed { max-height: 360px; }
}
@media (max-width: 1100px) {
  .tree-stage[data-mode="list"] {
    overflow: visible;
  }
  .tree-stage[data-mode="list"] .list-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tree-stage[data-mode="list"] .list-toolbar label:first-child {
    grid-column: 1 / -1;
  }
  .tree-stage[data-mode="list"] .table-scroll {
    display: none;
  }
  .tree-stage[data-mode="list"] .mobile-list {
    display: grid;
    gap: 10px;
  }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 14px; padding: 14px 16px; }
  nav { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  nav button { min-width: 0; padding: 9px 7px; font-size: 14px; }
  main { padding: 14px; }
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  .lede { font-size: 16px; }
  .metrics-grid, .grid { grid-template-columns: 1fr; }
  .hero-actions > * { flex: 1 1 180px; justify-content: center; }
  .loop-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: stretch; }
  .section-header > button { width: 100%; }
  .tree-header-actions { justify-content: stretch; min-width: 0; }
  .tree-header-actions button { flex: 1 1 140px; }
  .tree-stage { min-height: 430px; }
  .pedigree-scroll { min-height: 390px; }
  .profile dl { grid-template-columns: 1fr; }
  .profile dt { margin-top: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
  .form-grid { grid-template-columns: 1fr; }
  .fan-controls { width: 100%; gap: 6px; }
  .fan-settings { flex: 0 0 auto; padding: 8px 10px; }
  .fan-generation-control { min-width: 0; padding-left: 8px; gap: 4px; }
  .fan-generation-control > span { display: none; }
  .fan-scroll { min-height: 390px; }
  .tree-stage[data-mode="list"] .list-toolbar { grid-template-columns: 1fr; }
  .tree-stage[data-mode="list"] .list-toolbar label:first-child { grid-column: auto; }
  .table-scroll { display: none; }
  .mobile-list { display: grid; gap: 10px; }
  .globe-frame { min-height: 360px; }
  #globe { height: 420px; }
  .journey-controls { grid-template-columns: 1fr; }
  .journey-banner { left: 10px; right: 10px; bottom: 10px; }
  .journey-banner span { font-size: 15px; }
}
@media (max-width: 430px) {
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 16px; }
  .mode-tabs button { flex: 1 1 30%; min-width: 0; }
  .person-row-card dl { grid-template-columns: 1fr; }
}
/* Journey player */
.journey-app {
  display: grid;
  gap: 18px;
}
.journey-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.journey-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 13px;
  font-weight: 760;
  cursor: pointer;
  overflow: hidden;
}
.journey-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.journey-player {
  overflow: hidden;
  background: #07101a;
  color: #f5fbff;
  border-color: rgba(139, 190, 224, 0.25);
  padding: 0;
}
.journey-player .eyebrow,
.journey-command .eyebrow,
.journey-floating-panel .eyebrow {
  color: #7ee0d2;
}
.journey-player-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) repeat(3, minmax(92px, auto)) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(210, 232, 250, 0.12);
  background: rgba(8, 18, 29, 0.92);
}
.journey-player-bar label {
  display: grid;
  gap: 5px;
  color: #9db6c7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.journey-player-bar select,
.journey-scrubber select {
  min-height: 38px;
  border: 1px solid rgba(210, 232, 250, 0.22);
  border-radius: 8px;
  background: #0c1a27;
  color: #f5fbff;
  padding: 7px 9px;
}
.journey-metrics {
  min-height: 54px;
  border: 1px solid rgba(210, 232, 250, 0.14);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.035);
}
.journey-metrics strong {
  display: block;
  color: #fff0a5;
  font-size: 22px;
  line-height: 1;
}
.journey-metrics span,
.journey-source-name {
  color: #a9bdca;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.journey-metrics.warn strong { color: #ffb0a8; }
.journey-source-name {
  align-self: center;
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.journey-stage-shell {
  position: relative;
  min-height: clamp(620px, 68vh, 820px);
  background: radial-gradient(circle at 50% 52%, rgba(40, 111, 146, 0.3), transparent 34rem), #05070f;
  overflow: hidden;
}
.journey-globe,
#globe.journey-globe {
  display: block;
  width: 100%;
  height: clamp(620px, 68vh, 820px);
}
.journey-globe canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.journey-stage-tools {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.journey-stage-tools button,
.journey-follow {
  border: 1px solid rgba(210, 232, 250, 0.2);
  border-radius: 999px;
  background: rgba(8, 18, 29, 0.76);
  color: #d6e7f3;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.journey-stage-tools button.active {
  background: #dbeef4;
  border-color: #dbeef4;
  color: #0a1620;
}
.journey-follow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  font-weight: 760;
}
.journey-banner {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 4px;
  width: min(560px, calc(100% - 36px));
  border: 1px solid rgba(226, 241, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 18, 27, 0.76);
  backdrop-filter: blur(12px);
  color: white;
  padding: 13px 15px;
}
.journey-banner strong { color: #ffe08a; font-size: 18px; }
.journey-banner span { font-size: 20px; line-height: 1.2; font-weight: 850; }
.journey-banner small { color: #bed1df; line-height: 1.35; }
.journey-floating-panel {
  position: absolute;
  z-index: 3;
  width: min(300px, calc(100% - 32px));
  max-height: min(560px, calc(100% - 104px));
  overflow: hidden;
  border: 1px solid rgba(226, 241, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 18, 27, 0.74);
  backdrop-filter: blur(14px);
  padding: 14px;
  color: #eef8ff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}
.journey-floating-panel.is-hidden { display: none; }
.journey-feed-panel { top: 74px; right: 16px; }
.journey-cast-panel { top: 74px; left: 16px; transform: translateY(58px); }
.journey-legend-panel { right: 16px; bottom: 112px; }
.journey-feed-list,
.journey-cast-list {
  display: grid;
  gap: 8px;
  max-height: 478px;
  overflow: auto;
  padding-right: 4px;
}
.journey-feed-item {
  display: grid;
  grid-template-columns: 22px minmax(60px, auto) minmax(0, 1fr);
  gap: 3px 8px;
  width: 100%;
  border: 1px solid rgba(226, 241, 255, 0.12);
  border-left: 4px solid #8d97b4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #edf7ff;
  padding: 9px 10px;
  text-align: left;
}
.journey-feed-item:hover,
.journey-feed-item.active {
  border-color: rgba(255, 224, 138, 0.55);
  background: rgba(255, 224, 138, 0.11);
}
.journey-feed-item b { grid-row: span 2; font-size: 15px; }
.journey-feed-item strong { color: #fff0a5; font-size: 13px; }
.journey-feed-item span { min-width: 0; font-weight: 800; line-height: 1.2; }
.journey-feed-item small { grid-column: 2 / -1; color: #aac2d2; line-height: 1.3; }
.journey-cast-row,
.journey-line-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(226, 241, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 8px 9px;
}
.journey-cast-row i,
.journey-line-row i,
.journey-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.journey-cast-row strong,
.journey-line-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.journey-cast-row span {
  display: block;
  color: #aac2d2;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.journey-legend,
.journey-lines {
  display: grid;
  gap: 8px;
}
.journey-legend {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}
.journey-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d5e8f4;
  text-transform: capitalize;
  font-size: 13px;
}
.journey-line-row b { color: #fff0a5; }
.journey-unresolved {
  margin-top: 12px;
  color: #b9c8d4;
  font-size: 12px;
}
.journey-unresolved details {
  border-top: 1px solid rgba(226, 241, 255, 0.12);
  padding-top: 10px;
}
.journey-unresolved summary { cursor: pointer; color: #ffb0a8; font-weight: 800; }
.journey-unresolved p { margin: 8px 0 0; }
.journey-unresolved span { display: block; color: #8fa5b4; }
.journey-ok { margin-bottom: 0; color: #9ee4c4; }
.journey-scrubber {
  display: grid;
  grid-template-columns: auto auto minmax(130px, auto) minmax(120px, auto) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px 8px;
  border-top: 1px solid rgba(210, 232, 250, 0.12);
  background: rgba(8, 18, 29, 0.95);
}
.journey-scrubber label {
  display: grid;
  gap: 3px;
  color: #9db6c7;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.journey-time {
  display: grid;
  gap: 2px;
  min-width: 118px;
}
.journey-time strong { color: #fff0a5; font-size: 26px; line-height: 1; }
.journey-time span { color: #b7cad6; font-size: 12px; }
.timeline { width: 100%; accent-color: #6ee7d8; }
.journey-ticks {
  position: relative;
  height: 24px;
  margin: 0 18px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 224, 210, 0.16), rgba(255, 224, 138, 0.16));
}
.journey-ticks button {
  position: absolute;
  top: 4px;
  width: 6px;
  height: 16px;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: var(--tick-color);
  padding: 0;
  transform: translateX(-50%);
  opacity: 0.75;
}
.journey-ticks button:hover { opacity: 1; box-shadow: 0 0 0 5px rgba(255,255,255,0.12); }
@media (max-width: 1050px) {
  .journey-command { align-items: flex-start; flex-direction: column; }
  .journey-actions { justify-content: flex-start; }
  .journey-player-bar { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(80px, 1fr)); }
  .journey-source-name { grid-column: 1 / -1; justify-self: start; }
  .journey-stage-shell,
  .journey-globe,
  #globe.journey-globe { height: 680px; min-height: 680px; }
  .journey-floating-panel { width: min(280px, calc(100% - 32px)); }
}
@media (max-width: 760px) {
  .journey-player-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px; }
  .journey-player-bar label { grid-column: 1 / -1; }
  .journey-stage-shell,
  .journey-globe,
  #globe.journey-globe { min-height: 560px; height: 560px; }
  .journey-stage-tools { left: 10px; right: 10px; top: 10px; }
  .journey-stage-tools button { padding: 8px 10px; }
  .journey-follow { padding: 7px 9px; }
  .journey-floating-panel {
    position: relative;
    inset: auto;
    transform: none;
    width: auto;
    max-height: 310px;
    margin: 10px;
  }
  .journey-feed-panel { margin-top: -320px; }
  .journey-cast-panel,
  .journey-legend-panel { display: none; }
  .journey-cast-panel:not(.is-hidden),
  .journey-legend-panel:not(.is-hidden) { display: block; }
  .journey-banner { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .journey-banner span { font-size: 16px; }
  .journey-scrubber { grid-template-columns: 1fr 1fr; padding: 12px; }
  .journey-scrubber .timeline { grid-column: 1 / -1; }
  .journey-time { grid-column: 1 / -1; }
  .journey-ticks { margin: 0 12px 12px; }
}
@media (max-width: 430px) {
  .journey-player-bar { grid-template-columns: 1fr 1fr; }
  .journey-source-name { grid-column: 1 / -1; }
  .journey-actions { width: 100%; }
  .journey-actions > * { flex: 1 1 140px; justify-content: center; }
  .journey-stage-shell,
  .journey-globe,
  #globe.journey-globe { min-height: 540px; height: 540px; }
}

.journey-embed-section {
  padding: 0;
  overflow: hidden;
}
.journey-embed-shell {
  height: clamp(720px, calc(100dvh - 120px), 860px);
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #05070f;
}
.roots-original-journey-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #05070f;
}
@media (max-width: 760px) {
  .journey-embed-section {
    border-radius: 0;
  }
  .journey-embed-shell {
    height: clamp(680px, calc(100dvh - 120px), 760px);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
}

/* Roots archive brand system ------------------------------------------------ */
:root {
  color-scheme: dark;
  --bg: #04120f;
  --ink: #f4efe4;
  --muted: #aab8b1;
  --line: rgba(116, 190, 177, 0.2);
  --panel: #081a16;
  --panel-strong: #0b211b;
  --accent: #65c9bd;
  --accent-soft: rgba(101, 201, 189, 0.13);
  --amber: #e0ad48;
  --blue: #77b8d8;
  --warn: #e59a78;
  --gold: #e0ad48;
  --gold-soft: rgba(224, 173, 72, 0.16);
  --gold-line: rgba(224, 173, 72, 0.46);
  --deep: #020b09;
  --surface-raised: #0e2620;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-family: var(--sans);
}

html { background: var(--deep); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0.005em;
}

body::selection { background: var(--gold); color: var(--deep); }

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.018em;
}

h2 {
  max-width: 23ch;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 0.98;
}

h3 { font-size: clamp(20px, 2vw, 28px); }

p, li, dd { color: var(--muted); }

button,
.button {
  min-height: 42px;
  border-color: var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 10px 17px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

button:hover,
.button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button.active,
.button.primary,
button.primary {
  border-color: var(--gold);
  background: var(--gold);
  color: #102019;
  box-shadow: 0 10px 28px rgba(224, 173, 72, 0.12);
}

button.active:hover,
.button.primary:hover,
button.primary:hover {
  border-color: #efc66d;
  background: #efc66d;
  color: #102019;
}

button.ghost { border-color: var(--line); background: transparent; color: var(--accent); }
button.ghost:hover { border-color: var(--accent); background: var(--accent-soft); color: #bdf5ed; }
button.secondary {
  margin-top: 18px;
  width: 100%;
  border-color: rgba(101, 201, 189, 0.45);
  background: transparent;
  color: var(--accent);
}

.topbar {
  position: sticky;
  min-height: 76px;
  padding: 11px clamp(18px, 3.2vw, 48px);
  border-bottom-color: rgba(224, 173, 72, 0.18);
  background: rgba(4, 18, 15, 0.94);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: max-content;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-copy { display: grid; gap: 1px; }
.brand-copy h1 { font-size: clamp(30px, 3vw, 42px); line-height: 0.9; }
.brand-copy p {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

nav {
  flex-wrap: nowrap;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 11, 9, 0.42);
}

nav button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 15px;
  font-size: 13px;
}

nav button:hover { border: 0; background: var(--accent-soft); color: var(--accent); transform: none; }
nav button.active,
nav button.active:hover {
  border: 0;
  background: rgba(224, 173, 72, 0.13);
  box-shadow: none;
  color: #f0c56c;
}

main {
  width: min(100%, 1500px);
  padding: clamp(22px, 3vw, 42px);
}

.panel,
.card {
  border-color: var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel { padding: clamp(22px, 2.8vw, 38px); }
.card { padding: 22px; box-shadow: none; }
.card:hover { border-color: rgba(224, 173, 72, 0.38); background: var(--surface-raised); }

.eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.2em;
}

.lede { color: var(--muted); font-size: clamp(16px, 1.6vw, 20px); line-height: 1.65; }
.compact-lede { font-size: 15px; }

.hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

.hero-copy {
  position: relative;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-color: var(--gold-line);
  background: #061813;
}

.hero-copy h2 {
  max-width: 18ch;
  margin-bottom: 16px;
  font-size: clamp(44px, 4.2vw, 60px);
  line-height: 0.96;
}

.hero-copy .lede { max-width: 55ch; font-size: clamp(15px, 1.35vw, 18px); line-height: 1.55; }
.hero-actions { margin: 20px 0 26px; }
.hero-actions button { min-height: 46px; padding-inline: 20px; }

.metrics-grid { gap: 0; border-top: 1px solid var(--gold-line); padding-top: 18px; }
.stat { border-left: 1px solid var(--gold-line); padding: 2px 18px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { color: var(--ink); font-family: var(--serif); font-size: 32px; font-weight: 500; }
.stat span { color: var(--accent); font-size: 10px; letter-spacing: 0.13em; }

.prompt-panel { display: flex; flex-direction: column; justify-content: center; background: #071511; }
.prompt {
  max-height: 220px;
  border: 1px solid rgba(224, 173, 72, 0.2);
  border-radius: 14px;
  background: #020b09;
  color: #d8dfd8;
  font-size: 12px;
  line-height: 1.55;
}

.operating-loop { margin-top: clamp(16px, 2vw, 24px); }
.operating-loop h2 { font-size: clamp(30px, 3.2vw, 46px); }
.loop-grid { gap: 14px; }
.loop-step {
  min-height: 132px;
  border-color: var(--line);
  border-radius: 14px;
  background: #061713;
  padding: 20px;
}
.loop-step strong { color: var(--gold); font-family: var(--serif); font-size: 20px; font-weight: 500; }
.loop-step span { color: var(--muted); }

.tree-page { grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr); gap: 22px; }
.tree-workspace { background: #061713; }
.tree-stage {
  border-color: rgba(224, 173, 72, 0.25);
  border-radius: 16px;
  background: #03100d;
}
.tree-stage[data-mode="pedigree"],
.tree-stage[data-mode="list"] { padding: 16px; }
.mode-tabs { padding: 5px; border: 1px solid var(--line); border-radius: 999px; width: fit-content; }
.mode-tabs button { min-width: 100px; border: 0; }
.mode-tabs button.active { background: var(--gold); color: var(--deep); }
.profile { top: 116px; background: #0a1e19; padding: 28px; }
.profile dl { grid-template-columns: 112px minmax(0, 1fr); }
.profile h3 { font-size: 34px; }
.profile dt { color: var(--gold); }
.profile dd { color: var(--ink); }

.generation-label { color: var(--gold); letter-spacing: 0.15em; }
.wire { stroke: rgba(101, 201, 189, 0.54); }
.wire-gap { stroke: var(--gold); }
.pedigree-card {
  min-height: 72px;
  border-color: rgba(224, 173, 72, 0.3);
  border-radius: 12px;
  background: #0a1d18;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}
.pedigree-card:hover,
.pedigree-card.selected { border-color: var(--gold); outline-color: var(--gold-soft); background: #102b23; }
.pedigree-card.research-gap { background: #17180f; }
.avatar { background: rgba(101, 201, 189, 0.12); color: var(--accent); }
.card-text strong { color: var(--ink); font-family: var(--serif); font-size: 15px; font-weight: 500; }
.card-text span { color: var(--accent); }

.fan-controls { padding: 14px; }
.fan-settings,
.fan-generation-control { border-color: var(--line); background: #0a1d18; color: var(--muted); box-shadow: none; }
.fan-generation-control button.on { background: var(--gold); color: var(--deep); }
.fan-line-green { --fan-fill: #173229; --fan-stroke: #65c9bd; }
.fan-line-blue { --fan-fill: #142c33; --fan-stroke: #77b8d8; }
.fan-line-gold { --fan-fill: #342b18; --fan-stroke: #e0ad48; }
.fan-line-red { --fan-fill: #34231d; --fan-stroke: #d98d72; }
.fan-sector:hover { filter: brightness(1.15) saturate(1.08); }
.fan-sector.selected { stroke: #f4efe4; }
.fan-sector.gap { fill: #15170f; }
.fan-label { fill: var(--ink); font-family: var(--sans); stroke: rgba(4, 18, 15, 0.84); }
.fan-label .name,
.fan-label.gap .name { fill: var(--ink); }
.fan-label .dates,
.fan-label.gap .dates { fill: var(--accent); }
.fan-center circle { fill: #0b211b; stroke: var(--gold); }
.fan-center text { fill: var(--ink); }
.fan-center .dates { fill: var(--accent); }

.search,
.list-toolbar input,
.list-toolbar select {
  border-color: var(--line);
  border-radius: 12px;
  background: #020b09;
  color: var(--ink);
}
.tree-stage[data-mode="list"] .list-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tree-stage[data-mode="list"] .list-toolbar label:first-child { grid-column: span 2; }
.list-toolbar label { color: var(--accent); }
.list-count { color: var(--muted); }
.list-table { background: #071713; }
th, td { border-bottom-color: var(--line); }
th { color: var(--gold); }
td { color: var(--ink); }
td span { color: var(--muted); }
.person-row-card { border-color: var(--line); border-radius: 14px; background: #071713; }
.person-row-card dt { color: var(--gold); }
.person-row-card dd { color: var(--ink); }

.badge { border-color: var(--line); color: var(--muted); }
.badge.good { border-color: rgba(101, 201, 189, 0.5); color: var(--accent); }
.badge.warn { border-color: rgba(229, 154, 120, 0.55); color: var(--warn); }
.worker-state { background: var(--accent-soft); color: var(--accent); }
.worker-state.blocked,
.worker-state.review { background: rgba(229, 154, 120, 0.12); color: var(--warn); }
.source-pack { border-top-color: var(--gold); }
.question-list { padding-left: 22px; }
.question-list li { margin-block: 8px; }

.downloads button { min-height: 52px; border-color: var(--gold); color: var(--gold); }
.downloads button:hover { background: var(--gold); color: var(--deep); }

.review-page { display: grid; gap: 22px; }
.review-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; }
.review-hero h2 { max-width: 16ch; }
.review-metrics { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); }
.review-metrics div { display: grid; gap: 4px; min-width: 112px; padding: 18px; background: var(--deep); }
.review-metrics strong { color: var(--gold); font-family: var(--serif); font-size: 34px; font-weight: 500; }
.review-metrics span { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 22px; align-items: start; }
.review-side { display: grid; gap: 22px; position: sticky; top: 116px; }
.review-list, .gap-list { display: grid; gap: 14px; }
.review-card { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: #061713; }
.review-card h3 { margin: 14px 0 8px; }
.review-card-head, .review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review-contract { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 9px 14px; margin: 18px 0; padding: 16px 0; border-block: 1px solid var(--line); }
.review-contract dt { color: var(--gold); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.review-contract dd { margin: 0; color: var(--muted); }
.review-card details { margin: 14px 0; }
.review-card summary { cursor: pointer; color: var(--accent); }
.citation { display: grid; gap: 5px; margin-top: 12px; padding: 14px; border-left: 2px solid var(--gold); background: var(--deep); }
.citation span { color: var(--muted); font-size: 12px; }
.citation q { color: var(--ink); font-family: var(--serif); }
.review-actions { margin-top: 18px; }
.review-actions button[data-decision="accepted"] { border-color: var(--accent); color: var(--accent); }
.review-actions button[data-decision="rejected"] { border-color: var(--warn); color: var(--warn); }
.local-decision { margin: 12px 0 0; color: var(--accent); font-size: 12px; }
.gap-list article, .negative-search { display: grid; gap: 8px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.gap-list article:last-child, .negative-search:last-child { border-bottom: 0; }
.gap-list .badge { width: fit-content; }
.gap-list strong, .negative-search strong { color: var(--ink); }
.gap-list p, .negative-search p { margin: 0; }
.negative-search span { color: var(--accent); font-size: 11px; }

.journey-embed-shell {
  border-color: rgba(224, 173, 72, 0.26);
  border-radius: 18px;
  background: var(--deep);
  box-shadow: var(--shadow);
}
.roots-original-journey-frame { background: var(--deep); }

.demo-badge {
  align-self: center;
  margin-left: 8px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.journey-player,
.journey-stage,
.journey-stage-shell { background: var(--deep); border-color: rgba(224, 173, 72, 0.24); }
.journey-command,
.journey-player-bar,
.journey-scrubber { background: #061713; }
.journey-player .eyebrow,
.journey-command .eyebrow,
.journey-floating-panel .eyebrow { color: var(--gold); }
.journey-metrics,
.journey-floating-panel,
.journey-feed-item,
.journey-cast-row,
.journey-line-row { border-color: var(--line); background: rgba(8, 26, 22, 0.88); }
.journey-metrics strong,
.journey-feed-item strong,
.journey-line-row b,
.journey-time strong { color: var(--gold); }
.journey-player-bar select,
.journey-scrubber select { border-color: var(--line); background: #020b09; color: var(--ink); }
.journey-stage-tools button,
.journey-follow { border-color: var(--line); background: rgba(4, 18, 15, 0.84); color: var(--ink); }
.journey-stage-tools button.active { background: var(--gold); color: var(--deep); }
.timeline { accent-color: var(--accent); }

@media (max-width: 1050px) {
  .hero,
  .tree-page,
  .review-layout,
  .review-hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 420px; }
  .profile { position: static; }
  .review-side { position: static; }
}

@media (max-width: 820px) {
  .review-metrics { grid-template-columns: repeat(3, 1fr); }
  .review-metrics div { min-width: 0; padding: 12px; }
  .review-contract { grid-template-columns: 1fr; }
  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 14px;
    min-height: 0;
    padding: 12px 14px 10px;
  }
  .brand-mark { width: 42px; height: 42px; }
  .brand-copy h1 { font-size: 30px; }
  .brand-copy p { font-size: 8px; }
  nav {
    width: auto;
    max-width: calc(100vw - 150px);
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav button { flex: 0 0 auto; padding-inline: 13px; }
  main { padding: 18px 14px 34px; }
  .hero-copy { min-height: auto; }
  .hero-copy h2 { font-size: clamp(40px, 10vw, 54px); }
  .loop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tree-stage[data-mode="list"] .list-toolbar { grid-template-columns: 1fr; }
  .tree-stage[data-mode="list"] .list-toolbar label:first-child { grid-column: auto; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand-lockup { width: 100%; }
  .demo-badge { margin-left: auto; }
  nav { width: 100%; max-width: none; }
  .panel { padding: 20px; border-radius: 15px; }
  .hero-copy { min-height: auto; }
  .hero-copy h2 { font-size: 40px; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding-inline: 10px; }
  .stat strong { font-size: 28px; }
  .stat span { font-size: 8px; }
  .loop-grid { grid-template-columns: 1fr; }
  .mode-tabs { width: 100%; }
  .mode-tabs button { min-width: 0; }
  .journey-embed-shell { border-radius: 0; }
}
