/* ============================================================
   LLM EVOLUTION — a natural-history of ideas (2017-2026)
   Design system: dark "field notebook" aesthetic.
   Models = phenotypes. Ideas = memes (genes).
   ============================================================ */
:root {
  /* palette — mithran.ai design tokens */
  --bg: #0e110f;            /* shell-night */
  --bg2: #151715;           /* raised panel */
  --bg3: #1d201d;           /* input / hover */
  --panel: rgba(21, 23, 21, 0.92);
  --line: rgba(23, 25, 24, 0.28);        /* shell-line */
  --line-soft: rgba(243, 238, 231, 0.12); /* shell-light-line */
  --ink: #f3eee7;           /* shell-paper (text) */
  --ink-dim: #d8d2c9;
  --ink-faint: #9a948a;
  --gold: #e85e3e;          /* shell-orange — signature accent */
  --gold-soft: #d84f2a;     /* deep orange */
  --amber: #e66a45;
  --coral: #f5a48b;         /* coral highlight */
  --paper: #f1ede6;

  /* category colors (memes) — tuned for dark bg in mithran range */
  --cat-architecture: #f5a48b;   /* coral */
  --cat-training: #b7a6f2;       /* soft lavender */
  --cat-alignment: #f2795f;      /* warm coral-red */
  --cat-reasoning: #e8b64c;      /* warm gold */
  --cat-multimodal: #8fbf9f;     /* sage */
  --cat-agents: #f0a04b;         /* apricot */
  --cat-scaling: #f05a4e;        /* strong orange-red */
  --cat-evaluation: #c8b39a;     /* sand */
  --cat-tools: #e06a5a;          /* terracotta */

  /* status colors — mithran range on dark */
  --st-foundational: #e8c66a;
  --st-adopted: #8fbf9f;
  --st-evolved: #e0a4a0;
  --st-superseded: #b7a6f2;
  --st-dead: #f05a4e;
  --st-niche: #c8b39a;
  --st-emerging: #f0a04b;
  --st-abandoned: #e57373;

  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(232,94,62,0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(245,164,139,0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: rgba(232,182,76,0.28); }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ---------- layout ---------- */
#app { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 24px 8px;
}
.brand { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; cursor: pointer; }
.brand .logo {
  font-family: var(--serif); font-size: 21px; letter-spacing: 0.4px; color: var(--paper);
}
.brand .logo b { color: var(--gold); font-weight: 600; }
.brand .tag { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); letter-spacing: 1.6px; text-transform: uppercase; }
.searchbox { display: flex; align-items: center; }
.searchbox input {
  background: var(--bg3); border: 1px solid var(--line); color: var(--ink);
  border-radius: 20px; padding: 7px 16px; font-size: 13px; width: 240px; outline: none;
  transition: border .2s, width .2s, box-shadow .2s;
}
.searchbox input:focus { border-color: var(--gold); width: 300px; box-shadow: 0 0 0 3px rgba(232,182,76,0.10); }

.nav {
  display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto;
  padding: 0 18px;
  border-top: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav button {
  position: relative;
  background: transparent; border: none; color: var(--ink-dim);
  padding: 9px 15px 11px; font-size: 13.5px; letter-spacing: 0.2px;
  white-space: nowrap;
  transition: color .15s;
}
.nav button:hover { color: var(--ink); }
.nav button.active { color: var(--gold); }
.nav button.active::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px;
  background: var(--gold); border-radius: 2px;
}

main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 26px 30px 80px; }
.view { display: none; animation: fadeUp .35s ease; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- hero / view headers ---------- */
.viewhead { margin-bottom: 22px; }
.viewhead h1 {
  font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--paper);
  letter-spacing: 0.3px;
}
.viewhead h1 .accent { color: var(--gold); }
.viewhead p { color: var(--ink-dim); max-width: 760px; margin-top: 6px; font-size: 14.5px; }
.viewhead .meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-top: 8px; letter-spacing: 0.8px; text-transform: uppercase; }

/* ---------- stat chips ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.chip {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.4px;
  border: 1px solid var(--line); border-radius: 20px; padding: 5px 13px;
  color: var(--ink-dim); background: var(--bg2);
}
.chip b { color: var(--gold); font-weight: 600; }

/* ---------- timeline view ---------- */
.timeline-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg2);
  overflow: hidden;
}
.timeline-controls {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg3);
  flex-wrap: wrap;
}
.tl-btn {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 15px; font-size: 13px; transition: all .15s;
}
.tl-btn:hover { border-color: var(--gold); color: var(--gold); }
.tl-btn.play { background: rgba(232,182,76,0.15); border-color: rgba(232,182,76,0.5); color: var(--gold); }
.tl-range { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 200px; }
.tl-range input[type=range] { flex: 1; accent-color: var(--gold); height: 4px; }
.tl-date { font-family: var(--mono); color: var(--gold); font-size: 13px; min-width: 84px; text-align: center; }
.tl-speed { display: flex; gap: 4px; align-items: center; }
.tl-speed label { font-size: 11px; color: var(--ink-faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; }
.tl-speed select { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 12px; }

.timeline-canvas { position: relative; height: 480px; cursor: grab; }
.timeline-canvas:active { cursor: grabbing; }
.timeline-canvas svg { width: 100%; height: 100%; display: block; }
.tl-axis text { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-faint); }
.tl-axis line { stroke: var(--line-soft); }
.model-node { cursor: pointer; }
.model-node circle { transition: r .15s, fill .15s; }
.model-node:hover circle { stroke: var(--gold); stroke-width: 2.5px; }
.model-node text { font-family: var(--sans); font-size: 10.5px; fill: var(--ink-dim); pointer-events: none; }
.model-node:hover text { fill: var(--ink); }
.meme-marker { cursor: pointer; opacity: 0.92; }
.meme-marker:hover { opacity: 1; stroke: var(--ink); stroke-width: 1; }
.tl-tooltip {
  position: absolute; pointer-events: none; z-index: 50;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; font-size: 12.5px; max-width: 260px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); backdrop-filter: blur(6px);
  display: none;
}
.tl-tooltip .tt-title { font-weight: 600; color: var(--paper); }
.tl-tooltip .tt-sub { color: var(--ink-dim); font-size: 11.5px; margin-top: 2px; }
.tl-tooltip .tt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-dim); font-family: var(--mono); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- meme library ---------- */
.lib-filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px;
}
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-group .fg-label { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 1px; }
.filter-group select, .filter-group input {
  background: var(--bg3); color: var(--ink); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 10px; font-size: 12.5px; outline: none;
}
.filter-group select:focus, .filter-group input:focus { border-color: var(--gold); }
.filter-group input[type=text] { width: 170px; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-pill {
  border: 1px solid var(--line); background: var(--bg2); color: var(--ink-dim);
  border-radius: 16px; padding: 4px 12px; font-size: 12px; transition: all .15s;
}
.cat-pill:hover { color: var(--ink); border-color: var(--ink-faint); }
.cat-pill.active { color: var(--gold); font-weight: 600; border-color: rgba(232,182,76,0.55); background: rgba(232,182,76,0.10); }
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.st-pill {
  border: 1px solid var(--line); background: var(--bg2); color: var(--ink-dim);
  border-radius: 16px; padding: 4px 12px; font-size: 12px; transition: all .15s;
}

/* count badges inside filter pills (adaptive facet counts) */
.pill-count {
  display: inline-block;
  margin-left: 6px;
  min-width: 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  color: var(--ink-dim);
  vertical-align: 1px;
}
.cat-pill:hover .pill-count, .st-pill:hover .pill-count { color: var(--ink); }
.cat-pill.active .pill-count, .st-pill.active .pill-count {
  background: rgba(232,182,76,0.18);
  color: var(--gold);
}
/* status pill active state — subtle gold so the whole pill clearly reads as selected */
.st-pill.active {
  background: rgba(232,182,76,0.10);
  color: var(--gold);
  border-color: rgba(232,182,76,0.55);
}


.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.meme-card {
  position: relative;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 16px 14px; cursor: pointer;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  overflow: hidden;
}
.meme-card:hover { transform: translateY(-3px); border-color: var(--gold-soft); box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.meme-card .mc-cat {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--ink-faint); display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.meme-card .mc-cat .dot { width: 8px; height: 8px; border-radius: 50%; }
.meme-card h3 { font-size: 15.5px; font-weight: 600; color: var(--paper); line-height: 1.3; margin-bottom: 6px; }
.meme-card .mc-essence { font-size: 12.5px; color: var(--ink-dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meme-card .mc-people { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; align-items: center; }
.meme-card .mc-person { font-size: 10.5px; color: var(--coral); background: #e85e3e14; border: 1px solid #e85e3e33; padding: 1.5px 7px; border-radius: 10px; white-space: nowrap; }
.meme-card .mc-more { font-size: 10px; color: var(--ink-faint); }
.meme-card .mc-org { font-size: 10px; color: var(--ink-faint); opacity: .75; margin-left: 2px; }
.meme-card .mc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.meme-card .mc-status { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; padding: 3px 9px; border-radius: 12px; border: 1px solid; }
.meme-card .mc-impact { display: flex; gap: 2px; align-items: center; }
.meme-card .mc-impact .star { color: var(--gold); font-size: 12px; }
.meme-card .mc-impact .star.off { color: #3a3f3a; }
.meme-card .mc-era { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); }
.meme-card .mc-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }

/* ---------- deep dive ---------- */
.dive-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5,8,12,0.72); backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 40px 20px;
}
.dive-overlay.open { display: flex; }
.dive-panel {
  width: 100%; max-width: 880px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 34px 40px; position: relative;
  animation: diveIn .3s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
@keyframes diveIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.dive-close {
  position: absolute; top: 14px; right: 16px;
  background: var(--bg3); border: 1px solid var(--line); color: var(--ink-dim);
  width: 32px; height: 32px; border-radius: 50%; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.dive-close:hover { color: var(--ink); border-color: var(--ink-faint); }
.dive-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.dive-cat { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-faint); }
.dive-title { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--paper); line-height: 1.25; margin-bottom: 4px; }
.dive-orgin { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); margin-bottom: 14px; }
.dive-orgin a { color: var(--gold); }
.dive-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.dive-badge { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; padding: 4px 11px; border-radius: 14px; border: 1px solid; }

.dive-section { margin-top: 20px; }
.dive-section > h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.dive-section > h4::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.essence-box {
  background: rgba(232,182,76,0.06); border: 1px solid rgba(232,182,76,0.22);
  border-radius: 10px; padding: 16px 18px; font-size: 15px; line-height: 1.65; color: var(--ink);
}
.essence-box .essence-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--gold-soft); text-transform: uppercase; margin-bottom: 6px; display: block; }
.technical-box { background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; font-size: 13.5px; color: var(--ink-dim); line-height: 1.7; }
.technical-box ul { padding-left: 18px; }
.technical-box li { margin-bottom: 5px; }
.technical-box code { font-family: var(--mono); font-size: 12px; background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; color: var(--gold); }

.impact-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.impact-stars { display: flex; gap: 3px; }
.impact-stars .star { font-size: 20px; color: var(--gold); }
.impact-stars .star.off { color: #3a3f3a; }
.impact-note { color: var(--ink-dim); font-size: 13px; font-style: italic; }
.impact-meter { flex: 1; height: 8px; border-radius: 4px; background: var(--bg3); overflow: hidden; max-width: 260px; }
.impact-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 4px; }

.evo-list { list-style: none; }
.evo-list li { position: relative; padding: 8px 0 8px 26px; border-left: 1px solid var(--line); margin-left: 6px; }
.evo-list li::before {
  content: ""; position: absolute; left: -5px; top: 14px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(232,182,76,.5);
}
.evo-list li .ev-date { font-family: var(--mono); font-size: 11px; color: var(--gold-soft); display: block; }
.evo-list li .ev-text { font-size: 13.5px; color: var(--ink-dim); }

.deadend-box {
  background: rgba(239,83,80,0.07); border: 1px solid rgba(239,83,80,0.3);
  border-radius: 10px; padding: 14px 18px; font-size: 13.5px; color: #f0b4b4; line-height: 1.6;
}
.deadend-box .dd-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: #ef5350; text-transform: uppercase; margin-bottom: 4px; display: block; }

.cite-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cite-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cite-list .cite-type { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.cite-list a { color: var(--gold); word-break: break-all; }
.cite-list a::after { content: " ↗"; font-size: 11px; }
.cite-list .cite-external { margin-left: auto; color: var(--ink-faint); font-size: 11px; white-space: nowrap; }
.cite-external a { color: var(--ink-faint); }
.cite-external a:hover { color: var(--gold); }

.dive-carried { display: flex; flex-wrap: wrap; gap: 6px; }
.dive-carried .mc-chip {
  font-size: 11.5px; color: var(--ink-dim); background: var(--bg3);
  border: 1px solid var(--line); border-radius: 12px; padding: 3px 10px; cursor: pointer;
}
.dive-carried .mc-chip:hover { color: var(--gold); border-color: var(--gold-soft); }

/* ---------- genealogy ---------- */
.gen-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.gen-tab {
  background: var(--bg2); border: 1px solid var(--line); color: var(--ink-dim);
  padding: 8px 16px; border-radius: 8px; font-size: 13px; transition: all .15s;
}
.gen-tab:hover { color: var(--ink); }
.gen-tab.active { color: var(--gold); border-color: rgba(232,182,76,0.4); background: rgba(232,182,76,0.08); }
.gen-pane { display: none; }
.gen-pane.active { display: block; }

.gen-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.gen-summary .tl-btn { font-size: 12px; padding: 6px 12px; }

.gen-group {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px 10px; margin-bottom: 16px;
}
.gen-group-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: 17px; color: var(--paper);
  margin: 0 0 4px; font-weight: 600;
}
.gen-group-title .dot { width: 10px; height: 10px; border-radius: 50%; }
.gen-group-count { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); font-weight: 400; letter-spacing: 0.5px; }

.gen-family { margin: 8px 0 14px; }

/* nested tree */
ul.gn-tree, ul.gn-children { list-style: none; margin: 0; padding: 0; }
ul.gn-tree > li.gn-node { margin-left: 0; }
ul.gn-children {
  margin-left: 22px; padding-left: 14px;
  border-left: 1.5px solid var(--line);
  position: relative;
}
.gn-node { position: relative; margin: 2px 0; }
.gn-node.collapsed > .gn-children { display: none; }
.gn-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; line-height: 1.4;
  transition: background .12s;
}
.gn-row:hover { background: var(--bg3); }
.gn-caret {
  width: 16px; flex-shrink: 0; color: var(--ink-faint);
  font-size: 10px; cursor: pointer; text-align: center; user-select: none;
}
.gn-caret:empty { visibility: hidden; }
.gn-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.gn-name { color: var(--ink); word-break: break-word; }
.gn-node[data-kind="model"] .gn-name { font-weight: 600; }
.gn-dead { color: #f05a4e; font-size: 11px; margin-left: 2px; }
.gn-rel {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 1px 7px; border-radius: 9px; border: 1px solid; margin-left: 4px; white-space: nowrap;
}
.rel-evolved { color: var(--gold-soft); border-color: rgba(232,94,62,0.4); }
.rel-branched { color: #b7a6f2; border-color: rgba(183,166,242,0.4); }
.rel-superseded { color: #f05a4e; border-color: rgba(240,90,78,0.4); }
.rel-adopted { color: #8fbf9f; border-color: rgba(143,191,159,0.4); }

/* standalone chips */
.gen-standalone { margin: 6px 0 8px; }
.gen-standalone summary {
  cursor: pointer; font-size: 12.5px; color: var(--ink-dim);
  font-family: var(--mono); letter-spacing: 0.5px; text-transform: uppercase;
}
.gen-standalone summary:hover { color: var(--gold); }
.gn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gn-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 11px; font-size: 12px; color: var(--ink-dim); cursor: pointer;
  transition: border-color .12s, color .12s;
}
.gn-chip:hover { border-color: var(--gold-soft); color: var(--ink); }
.gn-chip-dot { width: 7px; height: 7px; border-radius: 50%; }

.gen-legend { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-dim); }
/* ---------- scaling ---------- */
.scale-hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 20px; }
.scale-stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.scale-stat .ss-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--ink-faint); text-transform: uppercase; }
.scale-stat .ss-value { font-family: var(--serif); font-size: 24px; color: var(--gold); margin-top: 6px; }
.scale-stat .ss-note { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }
.chart-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.chart-box h3 { font-size: 15px; color: var(--paper); margin-bottom: 4px; }
.chart-box .cb-sub { font-size: 12.5px; color: var(--ink-dim); margin-bottom: 14px; }
.chart-box svg { width: 100%; height: 340px; display: block; }
.axis text { font-family: var(--mono); font-size: 10px; fill: var(--ink-faint); }
.gridline { stroke: var(--line-soft); }
.curve-point { cursor: pointer; }
.curve-point:hover circle { stroke: var(--gold); stroke-width: 2.5px; }

/* ---------- generic ---------- */
.section-title { font-family: var(--serif); font-size: 21px; color: var(--paper); margin: 26px 0 12px; font-weight: 500; }
.section-title .accent { color: var(--gold); }
.prose { color: var(--ink-dim); font-size: 14px; line-height: 1.7; max-width: 820px; }
.prose b { color: var(--ink); }
.prose a { color: var(--gold); }
.empty-state { text-align: center; color: var(--ink-faint); padding: 60px 20px; font-family: var(--serif); font-style: italic; font-size: 16px; }

/* responsive */
@media (max-width: 900px) {
  .topbar-top { flex-wrap: wrap; padding: 10px 16px 6px; }
  .brand { width: 100%; justify-content: space-between; }
  .brand .tag { display: none; }
  .searchbox { width: 100%; }
  .searchbox input { width: 100%; }
  .searchbox input:focus { width: 100%; }
  .nav { padding: 0 10px; }
  .nav button { padding: 8px 11px 10px; font-size: 13px; }
  .timeline-canvas { height: 360px; }
  .dive-panel { padding: 24px 20px; }
}

/* ============================================================
   HOME / opening page
   ============================================================ */
#view-home { max-width: 1060px; margin: 0 auto; }

.home-hero { text-align: center; padding: 46px 10px 10px; }
.home-overline {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 14px;
}
.home-title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.12; color: var(--paper); letter-spacing: 0.2px;
}
.home-title .accent { color: var(--gold); }
.home-sub {
  max-width: 680px; margin: 20px auto 0; color: var(--ink-dim);
  font-size: 15.5px; line-height: 1.7;
}
.home-sub b { color: var(--ink); }
.home-cta { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.home-cta .tl-btn { font-size: 14px; padding: 10px 22px; }
.home-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* animated lineage visual */
.home-visual {
  margin: 34px auto 6px; max-width: 1000px;
  background: radial-gradient(600px 260px at 50% 0%, rgba(232,94,62,0.07), transparent 70%);
  border: 1px solid var(--line-soft); border-radius: 16px; padding: 18px 10px 8px;
}
.hv-trunk { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: hvDraw 2.2s ease forwards; }
.hv-branch { stroke-dasharray: 300; stroke-dashoffset: 300; animation: hvDraw 0.7s ease forwards; }
.hv-dot { opacity: 0; animation: hvPop 0.5s ease forwards; transform-origin: center; transform-box: fill-box; }
.hv-node { opacity: 0; animation: hvNode 0.5s ease forwards; transform-origin: center; transform-box: fill-box; }
.hv-label { opacity: 0; animation: hvFade 0.6s ease forwards; }
@keyframes hvDraw { to { stroke-dashoffset: 0; } }
@keyframes hvPop {
  0% { opacity: 0; transform: scale(0); }
  70% { opacity: 0.9; transform: scale(1.25); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes hvNode {
  0% { opacity: 0; transform: scale(0); }
  60% { opacity: 1; transform: scale(1.5); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes hvFade { to { opacity: 1; } }

/* thesis cards */
.home-thesis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-top: 40px;
}
.thesis-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 20px; transition: transform .2s, border-color .2s;
}
.thesis-card:hover { transform: translateY(-3px); border-color: var(--gold-soft); }
.thesis-ic { font-size: 26px; margin-bottom: 10px; }
.thesis-card h3 { font-family: var(--serif); font-size: 18px; color: var(--paper); margin-bottom: 8px; font-weight: 600; }
.thesis-card p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.65; }
.thesis-card p i { color: var(--ink); }

/* section label + entry cards */
.home-section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold-soft); text-align: center; margin: 48px 0 16px;
}
.home-entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.home-entry {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 16px; cursor: pointer; opacity: 0; animation: hvFade 0.6s ease forwards;
  transition: transform .18s, border-color .18s, background .18s;
}
.home-entry:hover { transform: translateY(-2px); border-color: var(--gold-soft); background: var(--bg3); }
.he-ic { font-size: 24px; flex-shrink: 0; }
.he-body h4 { font-size: 14.5px; color: var(--paper); margin-bottom: 3px; }
.he-body p { font-size: 12.5px; color: var(--ink-dim); line-height: 1.5; }
.he-arrow { margin-left: auto; color: var(--ink-faint); font-size: 16px; transition: color .15s, transform .15s; }
.home-entry:hover .he-arrow { color: var(--gold); transform: translateX(3px); }

.home-note {
  margin-top: 40px; padding: 18px 22px;
  background: rgba(232,182,76,0.05); border: 1px solid rgba(232,182,76,0.18);
  border-radius: 12px; font-size: 13.5px; color: var(--ink-dim); line-height: 1.7; text-align: center;
}
.home-note b { color: var(--gold-soft); }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 30px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg2);
}
.footer-brand { display: flex; align-items: baseline; gap: 12px; }
.footer-brand .logo { font-family: var(--serif); font-size: 16px; color: var(--paper); }
.footer-brand .logo b { color: var(--gold); }
.footer-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--ink-faint); text-transform: uppercase; }
.footer-links { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); }
.footer-links a { color: var(--gold); }
.footer-links a:hover { text-decoration: underline; }
.footer-sep { color: var(--line); }
.footer-credit { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-faint); }
.footer-credit .credit-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); opacity: .8; }
.footer-credit .credit-name { font-family: var(--serif); font-size: 13.5px; color: var(--paper); font-weight: 600; }
.footer-credit .credit-name:hover { color: var(--gold); }
.footer-credit .credit-social { color: var(--ink-dim); font-size: 12px; border: 1px solid var(--line); padding: 2px 9px; border-radius: 10px; }
.footer-credit .credit-social:hover { color: var(--gold); border-color: var(--gold); }
.footer-mithran { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.footer-mithran .credit-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); opacity: .8; }
.footer-mithran .mithran-link { font-family: var(--serif); font-size: 14px; color: var(--coral); font-weight: 600; }
.footer-mithran .mithran-link:hover { color: var(--gold); text-decoration: underline; }
@media (max-width: 700px) {
  .site-footer { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   PEOPLE & LABS
   ============================================================ */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.person-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; cursor: pointer; transition: transform .18s, border-color .18s;
}
.person-card:hover { transform: translateY(-2px); border-color: var(--gold-soft); }
.pc-top { display: flex; align-items: center; gap: 12px; }
.pc-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #e85e3e, #d84f2a);
  display: flex; align-items: center; justify-content: center;
  color: #0e110f; font-weight: 700; font-size: 15px; font-family: var(--serif);
}
.pc-meta h3 { font-size: 15px; color: var(--paper); margin-bottom: 6px; font-weight: 600; }
.pc-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.pc-stat { font-size: 11px; color: var(--ink-dim); }
.pc-stat b { color: var(--gold); font-family: var(--mono); }
.pc-orgs { margin-top: 8px; }
.people-org {
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
  background: var(--bg3); border: 1px solid var(--line); border-radius: 10px;
  padding: 2px 8px; margin-right: 4px;
}
.pc-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pc-memes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.pc-more { font-size: 11px; color: var(--ink-faint); align-self: center; }

.lab-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 12px;
}
.lab-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lab-head h3 { font-family: var(--serif); font-size: 17px; color: var(--paper); font-weight: 600; }
.lab-stats { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.lab-people { margin-top: 8px; font-size: 12.5px; color: var(--ink-dim); }
.lab-people b { color: var(--ink); }
.lab-flows { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 11px; color: var(--ink-dim); }
.lab-flows b { color: var(--ink); }
.lab-flow { font-family: var(--mono); font-size: 10px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; cursor: help; }
.lab-flow.in { color: #8fbf9f; border: 1px solid #8fbf9f44; background: #8fbf9f10; }
.lab-flow.out { color: #e8b64c; border: 1px solid #e8b64c44; background: #e8b64c10; }

#pview-graph { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; overflow-x: auto; }
.collab-edge { transition: opacity .15s; }
.collab-person { cursor: pointer; }
.collab-person:hover circle { stroke: #f5a48b; stroke-width: 2.5px; }
.collab-meme { cursor: pointer; }

/* ---------- Pivot facet explorer ---------- */
.pivot-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.pv-ctl { display: flex; flex-direction: column; gap: 4px; }
.pv-ctl-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); }
.pv-ctl select {
  background: var(--bg3); color: var(--ink); border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 12px; font-size: 13px; font-family: inherit; cursor: pointer; outline: none;
}
.pv-ctl select:hover { border-color: var(--gold); }
.pivot-chips { margin-bottom: 14px; }
.pivot-body { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pivot-pane { min-width: 0; }
.pivot-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; overflow-x: auto; }
.pivot-card h3 { font-family: var(--serif); font-size: 16px; color: var(--paper); margin-bottom: 12px; font-weight: 600; }
.pv-hm { min-width: 560px; }
.pv-hm-row { display: grid; grid-template-columns: 200px repeat(10, 1fr) 40px; gap: 3px; align-items: center; margin-bottom: 3px; }
.pv-hm-label { font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px; }
.pv-hm-col { text-align: center; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.pv-hm-total { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.pv-cell {
  height: 26px; border: 1px solid #ffffff14; border-radius: 6px; color: #0e110f;
  font-size: 10.5px; font-weight: 700; cursor: pointer; text-align: center; line-height: 1;
  display: flex; align-items: center; justify-content: center; min-width: 0;
}
.pv-cell:hover { outline: 2px solid var(--gold); outline-offset: 1px; }
.pv-more { font-size: 11px; color: var(--ink-faint); margin-top: 8px; }
.pv-composition-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.pv-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-dim); }
.pv-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.pv-table-wrap { overflow-x: auto; }
.pv-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.pv-table th { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); text-align: right; padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pv-table th:first-child { text-align: left; }
.pv-table td { padding: 5px 8px; text-align: right; color: var(--ink-dim); border-bottom: 1px solid #ffffff0d; white-space: nowrap; }
.pv-table td:first-child { text-align: left; font-weight: 600; font-size: 12.5px; }
.pv-table .pv-num { cursor: pointer; color: var(--ink); }
.pv-table .pv-num:hover { color: var(--gold); }
.pv-table .pv-zero { color: #3a3f3a; }
.pv-table .pv-total { font-weight: 700; color: var(--gold); }

/* ============================================================
   LAUNCH: hero lineage, start-here, evidence, freshness
   ============================================================ */
.home-evidence { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .4px; color: var(--ink-faint); }
.home-evidence::before { content: "✓ "; color: var(--gold-soft); }

.home-herolineage { margin: 26px 0 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px 16px; overflow-x: auto; }
.herolineage { display: flex; align-items: center; gap: 6px; min-width: 900px; padding: 6px 0; }
.hl-step { display: flex; align-items: center; gap: 6px; position: relative; }
.hl-node { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg3); transition: border-color .15s, transform .15s; }
.hl-node:hover { border-color: var(--gold); transform: translateY(-2px); }
.hl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px #e85e3e66; }
.hl-name { font-size: 12.5px; font-weight: 600; color: var(--paper); white-space: nowrap; }
.hl-year { font-family: var(--mono); font-size: 9.5px; color: var(--ink-faint); }
.hl-arrow { color: var(--ink-faint); font-size: 14px; flex-shrink: 0; }
.hl-ideas { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; white-space: nowrap; }
.hl-idea { font-size: 9px; font-family: var(--mono); color: var(--coral); background: #e85e3e18; border: 1px solid #e85e3e33; padding: 1px 6px; border-radius: 8px; }
@media (max-width: 760px) {
  .home-herolineage { margin: 16px -14px 6px; border-radius: 0; }
}

.starthere-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 10px; }
.starthere-card { display: flex; align-items: flex-start; gap: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px; text-decoration: none; transition: border-color .15s, transform .15s; }
.starthere-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.starthere-card .sh-ic { font-size: 22px; line-height: 1; margin-top: 2px; }
.starthere-card .sh-body h3 { font-size: 15.5px; font-weight: 600; color: var(--paper); margin-bottom: 5px; }
.starthere-card .sh-body p { font-size: 12.5px; color: var(--ink-dim); line-height: 1.5; }
.starthere-card .he-arrow { margin-left: auto; color: var(--gold); font-size: 16px; opacity: 0; transition: opacity .15s, transform .15s; }
.starthere-card:hover .he-arrow { opacity: 1; transform: translateX(3px); }

/* ============================================================
   LAUNCH: footer meta / freshness
   ============================================================ */
.footer-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-faint); flex-wrap: wrap; }
.footer-fresh { font-family: var(--mono); font-size: 10.5px; color: var(--gold-soft); letter-spacing: .4px; }
.footer-link { color: var(--ink-dim); text-decoration: none; }
.footer-link:hover { color: var(--gold); }
.footer-evidence { opacity: .8; }

/* ============================================================
   LAUNCH: share controls
   ============================================================ */
.share-row { display: flex; align-items: center; gap: 8px; margin: 16px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.share-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); margin-right: 4px; }
.share-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg3); color: var(--ink); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, color .15s; }
.share-btn:hover { border-color: var(--gold); color: var(--gold); }
.share-btn.share-x { font-weight: 700; }
.share-btn.share-li { font-weight: 700; font-size: 12px; }
.share-copy-text { font-size: 11px; color: var(--gold-soft); margin-left: 4px; }

/* ============================================================
   LAUNCH: corrections
   ============================================================ */
.correction-block { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.correction-details summary { cursor: pointer; font-size: 12.5px; color: var(--ink-dim); }
.correction-details summary:hover { color: var(--gold); }
.correction-details summary b { color: var(--gold-soft); font-weight: 600; }
.correction-form { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.correction-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-dim); }
.correction-form label i { color: var(--ink-faint); font-style: normal; font-size: 10.5px; }
.correction-form input, .correction-form textarea { background: var(--bg3); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); padding: 8px 11px; font-size: 13px; font-family: inherit; }
.correction-form input:focus, .correction-form textarea:focus { outline: none; border-color: var(--gold); }
.corr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.corr-actions { display: flex; align-items: center; gap: 10px; }
.corr-status { font-size: 12px; }
.corr-status.ok { color: #8fbf9f; }
.corr-status.err { color: #f05a4e; }
@media (max-width: 600px) { .corr-grid { grid-template-columns: 1fr; } }

/* ============================================================
   LAUNCH: dead ends
   ============================================================ */
.fossil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.fossil { background: var(--bg2); border: 1px solid var(--line); border-top-width: 3px; border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: border-color .15s, transform .15s; }
.fossil:hover { border-color: var(--gold); transform: translateY(-2px); }
.fossil-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fossil-cat { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; }
.fossil-status { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px; border: 1px solid; }
.fossil-name { font-family: var(--serif); font-size: 17px; color: var(--paper); margin-bottom: 12px; font-weight: 600; }
.fossil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.fossil-grid > div { display: contents; }
.fossil-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 4px; }
.fossil-grid-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.fossil-cell { }
.fossil-val { font-size: 12.5px; color: var(--ink-dim); }
.fossil-why, .fossil-replaced, .fossil-evo { margin-top: 10px; }
.fossil-why p { font-size: 13px; color: var(--ink-dim); line-height: 1.55; margin: 0; }
.fossil-evo ul { margin-top: 6px; }
.fossil-foot { margin-top: 14px; }

/* ============================================================
   LAUNCH: methodology
   ============================================================ */
.method-prose { max-width: 860px; }
.method-prose section { margin-bottom: 28px; }
.method-prose h2 { font-family: var(--serif); font-size: 19px; color: var(--paper); margin-bottom: 10px; font-weight: 600; }
.method-prose p { font-size: 14px; color: var(--ink-dim); line-height: 1.65; margin-bottom: 8px; }
.method-list { list-style: none; padding: 0; }
.method-list li { font-size: 13.5px; color: var(--ink-dim); line-height: 1.6; padding: 6px 0 6px 4px; border-bottom: 1px solid #ffffff0d; }
.prov-verified { color: #8fbf9f; }
.prov-documented { color: #b7a6f2; }
.prov-estimated { color: #e8b64c; }
.prov-unverified { color: #f05a4e; }
.method-updated { font-family: var(--mono); font-size: 12px; color: var(--gold-soft); }
.method-counts { font-size: 13px; color: var(--ink-dim); }

/* ============================================================
   LAUNCH: surprise
   ============================================================ */
.surprise-card { max-width: 640px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 28px 30px; }
.surprise-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; }
.surprise-card h2 { font-family: var(--serif); font-size: 26px; color: var(--paper); margin-bottom: 6px; font-weight: 600; }
.surprise-sub { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-bottom: 12px; }
.surprise-essence { font-size: 15px; color: var(--ink-dim); line-height: 1.65; margin-bottom: 20px; }
.surprise-actions { display: flex; gap: 10px; }

/* ============================================================
   LAUNCH: genome strip + ancestry
   ============================================================ */
.genome-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.genome-gene { font-size: 11px; font-weight: 600; color: var(--paper); background: var(--bg3); border: 1px solid var(--line); border-left: 3px solid var(--g, var(--gold)); border-radius: 9px; padding: 4px 10px; cursor: pointer; transition: border-color .15s; }
.genome-gene:hover { border-color: var(--gold); }
.ancestry-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.anc-node { font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); border-radius: 9px; padding: 3px 10px; background: var(--bg3); transition: border-color .15s; }
.anc-node:hover { border-color: var(--gold); }
.anc-here { border-color: var(--gold); background: #e85e3e14; }
.anc-arrow { color: var(--ink-faint); font-size: 13px; }

/* genealogy focus highlight */
.gen-focus { outline: 1px solid var(--gold); outline-offset: 4px; border-radius: 10px; }
.gen-focus-node { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.lab-focus { outline: 2px solid var(--gold); outline-offset: 3px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hl-node, .starthere-card, .fossil { transition: none; }
  .hl-step, .hv-branch, .hv-dot, .hv-node, .hv-label { animation: none !important; }
}

