/* =================================================================
   The Five Layer AI Cake — editorial atlas poster
   Warm ivory on deep paper-black. Serif display, tabular mono.
   ================================================================= */
:root {
  --bg:        #0e0b08;   /* warm near-black */
  --bg-2:      #17120d;   /* card */
  --bg-3:      #211a13;   /* lifted */
  --line:      #2b231a;
  --ink:       #f2ead8;   /* cream */
  --ink-dim:   #a39684;
  --ink-faint: #6b5f52;
  --accent:    #e5a84e;   /* amber foil */
  --accent-2:  #c94a3b;   /* tomato (secondary) */

  /* Layer colors — muted sunset, editorial not neon */
  --l-silicon: #c54b3a;
  --l-cloud:   #dd7a38;
  --l-models:  #c9a227;
  --l-tooling: #6b8e55;
  --l-apps:    #3d6d9c;

  --serif: "Fraunces", "Instrument Serif", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 900px 600px at 20% -10%, rgba(229,168,78,0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(201,74,59,0.06), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}

/* Paper grain — very subtle */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(rgba(242,234,216,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.6;
}

/* =================================================================
   FLASH RIBBON — the attention-space ticker.
   Bigger, orange-warm, category-neon-tinted. Bloomberg-on-acid.
   Categories drive a subtle neon accent + a tiny cat tag:
     geo      — crimson-orange (policy)
     capital  — pure amber gold  (money — house color)
     tech     — cyan-tinted orange (architecture)
     supply   — warm orange     (infra, chips, energy)
     physical — neon lime-orange (robots, AV)
   ================================================================= */
.flash-ribbon {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 11px 48px; min-height: 44px;
  background:
    linear-gradient(90deg,
      color-mix(in oklab, var(--cat-glow, var(--accent)) 14%, var(--bg)),
      var(--bg) 40%,
      var(--bg) 60%,
      color-mix(in oklab, var(--cat-glow, var(--accent)) 10%, var(--bg))
    );
  border-bottom: 1px solid color-mix(in oklab, var(--cat-glow, var(--accent)) 60%, var(--line));
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: 0.1em;
  color: var(--ink);
  overflow: hidden; cursor: pointer;
  user-select: none;
  transition: background 0.5s ease, border-color 0.5s ease;
}
/* per-category neon tint vars */
.flash-ribbon[data-category="geo"]      { --cat-glow: #ff5533; --cat-text: #ffb088; }
.flash-ribbon[data-category="capital"]  { --cat-glow: #ffb13a; --cat-text: #ffd89c; }
.flash-ribbon[data-category="tech"]     { --cat-glow: #ff9e40; --cat-text: #6ee7ff; }
.flash-ribbon[data-category="supply"]   { --cat-glow: #ff7a2e; --cat-text: #ffc28e; }
.flash-ribbon[data-category="physical"] { --cat-glow: #ff8a3d; --cat-text: #c6ff5b; }
/* futures — market-watcher's drafted odds. Violet is the one thing on the
   ribbon that hasn't happened yet; without this rule --cat-glow fell through
   to nothing and the slot lost its light. */
.flash-ribbon[data-category="futures"]  { --cat-glow: #a06bff; --cat-text: #c9a6ff; }
.flash-ribbon[data-category="default"]  { --cat-glow: var(--accent); --cat-text: var(--accent); }
.flash-ribbon[data-category="sponsor"]  { --cat-glow: #b8935a; --cat-text: #d9bd8f; }
.flash-ribbon .flash-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.flash-ribbon .flash-link:hover { color: var(--accent); }

.flash-ribbon.paused { opacity: 0.55; }
.flash-ribbon.flash-enter .flash-text,
.flash-ribbon.flash-enter .flash-flag,
.flash-ribbon.flash-enter .flash-cat {
  animation: flash-in 0.45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes flash-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.flash-live {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cat-glow, var(--accent-2));
  box-shadow: 0 0 10px var(--cat-glow, var(--accent-2)), 0 0 22px color-mix(in oklab, var(--cat-glow, var(--accent-2)) 60%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.flash-cat {
  font: 700 9.5px var(--mono); letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cat-glow);
  border: 1px solid color-mix(in oklab, var(--cat-glow) 50%, var(--line));
  padding: 3px 7px; border-radius: 2px;
  background: color-mix(in oklab, var(--cat-glow) 8%, transparent);
}
.flash-flag { font-size: 15px; filter: drop-shadow(0 0 6px color-mix(in oklab, var(--cat-glow) 35%, transparent)); }
.flash-text {
  flex: 1; text-transform: uppercase;
  color: var(--cat-text, var(--ink));
  text-shadow: 0 0 16px color-mix(in oklab, var(--cat-glow) 18%, transparent);
  font-weight: 500;
}
.flash-count {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint);
  letter-spacing: 0.16em;
}

/* =================================================================
   TOPBAR — slim editorial strip, not a chrome band
   ================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 48px;
  background: rgba(14,11,8,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.title {
  font-family: var(--serif);
  font-weight: 600; font-size: 17px;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 12px;
  white-space: nowrap;
}
.title .mono {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700;
  border: 1px solid var(--accent);
  padding: 3px 6px; border-radius: 2px;
}
.title .name { letter-spacing: -0.015em; }

/* External-link affordance for non-tab routes (the ↗ signals "page, not view"). */
.topbar-extlink {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600;
  color: var(--ink-dim); text-decoration: none;
  border: 1px solid rgba(229, 168, 78, 0.25);
  padding: 3px 8px; border-radius: 2px;
  margin-left: 6px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.topbar-extlink:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(229, 168, 78, 0.05);
}

.tabs { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.tab {
  background: transparent; color: var(--ink-dim);
  border: none; padding: 8px 14px;
  font: 500 12px var(--sans); letter-spacing: 0.04em;
  cursor: pointer; border-radius: 0;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab.share-btn {
  margin-left: 16px;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 4px; padding: 6px 12px;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.tab.share-btn:hover { background: rgba(229,168,78,0.1); }
.tab.share-btn.active { background: rgba(229,168,78,0.15); }

/* =================================================================
   LAYOUT — one column poster, no sidebar
   ================================================================= */
body { display: block; height: auto; overflow: auto; }
main { position: relative; z-index: 1; }
.view { display: none; }
.view.active { display: block; }

/* Controls — compact horizontal strip under topbar */
.controls {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(23,18,13,0.5);
}
.controls label {
  display: flex; align-items: center; gap: 8px;
  font: 500 10px var(--mono); color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.controls select, .controls input {
  background: transparent; color: var(--ink);
  border: none; border-bottom: 1px solid var(--line);
  padding: 4px 8px 4px 0; font: 13px var(--sans);
  min-width: 140px;
}
.controls select:focus, .controls input:focus { outline: none; border-bottom-color: var(--accent); }
.controls .search input { min-width: 200px; }
.controls .toggle {
  color: var(--ink-dim); text-transform: none; letter-spacing: normal; cursor: pointer;
  font-family: var(--sans); font-size: 12px;
}
.controls .toggle input { accent-color: var(--accent); }

.legend { display: none; } /* legend lives INSIDE the cake now */
.hint { display: none; }

/* =================================================================
   CAKE VIEW — the hero. An actual stacked cake.
   ================================================================= */
.view-cake { padding: 0; }

.poster { max-width: 1320px; margin: 0 auto; padding: 72px 48px 120px; }

/* Hero */
.hero { margin-bottom: 68px; }
.hero .eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 24px;
  display: inline-block; padding-bottom: 6px; border-bottom: 1px solid var(--accent);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(54px, 8.8vw, 128px);
  line-height: 0.95; letter-spacing: -0.025em;
  margin: 0;
  font-variation-settings: "opsz" 144;
}
.hero h1 em {
  font-style: italic; font-weight: 500;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero .deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.35;
  color: var(--ink-dim);
  max-width: 780px;
  margin: 28px 0 0;
  font-weight: 400;
}
.hero .bylines {
  margin-top: 36px;
  display: flex; gap: 32px; flex-wrap: wrap;
  font: 500 11px var(--mono); color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.hero .bylines strong { color: var(--ink); font-weight: 500; }

/* The actual cake — five stacked slabs with real thickness */
.cake {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 60px 120px -40px rgba(0,0,0,0.6),
    0 0 0 1px var(--line);
}
.slab {
  position: relative;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 160px;
  padding: 30px 36px;
  border-bottom: 1px solid rgba(0,0,0,0.45);
  overflow: hidden;
  cursor: default;
  isolation: isolate;
}
.slab:last-child { border-bottom: none; }

/* Slab color fill + top "icing" edge + bottom shadow — richer, less washed */
.slab::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--layer-color) 78%, #000) 0%,
      var(--layer-color) 18%,
      var(--layer-color) 70%,
      color-mix(in oklab, var(--layer-color) 55%, #000) 100%);
}
.slab::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.05) 0%,
      rgba(255,255,255,0) 3%,
      rgba(0,0,0,0) 60%,
      rgba(0,0,0,0.3) 100%),
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(229,168,78,0.12), transparent 60%);
}
/* Thin bright "icing" edge at the top of each slab */
.slab {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.25);
}

/* Per-layer tints via inline CSS variable */
.slab[data-layer="apps"]    { --layer-color: var(--l-apps); }
.slab[data-layer="tooling"] { --layer-color: var(--l-tooling); }
.slab[data-layer="models"]  { --layer-color: var(--l-models); }
.slab[data-layer="cloud"]   { --layer-color: var(--l-cloud); }
.slab[data-layer="silicon"] { --layer-color: var(--l-silicon); }

/* Scroll-reveal — slabs & flow bands fade/slide in on first viewport entry */
.slab.reveal, .flow-band {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(.2,.65,.2,1) var(--reveal-delay, 0ms),
    transform 0.7s cubic-bezier(.2,.65,.2,1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.slab.in-view, .flow-band.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .slab.reveal, .flow-band { transition: none; opacity: 1; transform: none; }
}

/* Left side — number + name */
.slab-side {
  display: flex; flex-direction: column; justify-content: center;
  padding-right: 24px;
  border-right: 1px solid rgba(0,0,0,0.2);
}
.slab-num {
  font-family: var(--serif); font-weight: 300;
  font-size: 88px; line-height: 0.8;
  color: var(--ink); opacity: 0.92;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 0 rgba(0,0,0,0.18);
}
.slab-name {
  font-family: var(--serif); font-weight: 600;
  font-size: 22px; line-height: 1.1;
  color: var(--ink); margin-top: 8px;
  letter-spacing: -0.01em;
}
.slab-tag {
  font-family: var(--serif); font-style: italic;
  font-size: 13px; line-height: 1.4;
  color: rgba(242,234,216,0.78);
  margin-top: 6px;
  max-width: 220px;
}

/* Right side — companies as varying-size editorial chips */
.slab-body {
  display: flex; flex-wrap: wrap; align-content: center;
  gap: 10px 16px;
  padding-left: 24px;
  align-items: baseline;
}
.co {
  display: inline-flex; align-items: baseline; gap: 4px;
  color: var(--ink); cursor: pointer;
  font-family: var(--serif); font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1; padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease,
              text-shadow 0.18s ease, transform 0.18s cubic-bezier(.2,.8,.2,1);
  transform-origin: left center;
  text-decoration: none;
}
.co:hover {
  border-bottom-color: rgba(255,255,255,0.85);
  color: #fff;
  text-shadow: 0 0 18px rgba(229,168,78,0.35);
  transform: translateY(-1px);
}
.co .vi-mark {
  display: inline-block;
  font-family: var(--mono); font-size: 8px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.22); padding: 2px 4px; border-radius: 2px;
  margin-left: 3px; letter-spacing: 0; vertical-align: middle;
  transform: translateY(-3px);
}
.co .phys-mark {
  display: inline-block; font-size: 0.55em;
  margin-left: 3px; vertical-align: middle;
  transform: translateY(-3px);
  filter: saturate(0.8);
}

/* Size by influence — hero companies punch through */
.co.size-10 { font-size: 44px; font-weight: 700; }
.co.size-9  { font-size: 36px; font-weight: 600; }
.co.size-8  { font-size: 28px; font-weight: 600; }
.co.size-7  { font-size: 22px; font-weight: 500; }
.co.size-6  { font-size: 19px; }
.co.size-5  { font-size: 17px; }
.co.size-4  { font-size: 15px; color: rgba(242,234,216,0.85); }
.co.size-3  { font-size: 14px; color: rgba(242,234,216,0.75); font-style: italic; }
.co.size-2  { font-size: 13px; color: rgba(242,234,216,0.65); font-style: italic; }
.co.size-1  { font-size: 12px; color: rgba(242,234,216,0.55); font-style: italic; }

/* Slab count pill — small factoid in corner */
.slab-meta {
  position: absolute; top: 18px; right: 22px;
  font: 500 10px var(--mono); color: rgba(255,255,255,0.65);
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* Money flow band between adjacent slabs — the big reveal.
   The SVG trapezoid narrows from the layer above to the layer below by the
   flow amount (85 is wide, 3 is thin). The inner pill floats over it. */
.flow-band {
  position: relative;
  height: 64px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  isolation: isolate;
}
.flow-band .flow-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.flow-band .flow-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 20px;
  background: linear-gradient(90deg,
    rgba(14,11,8,0.9), rgba(14,11,8,1) 20%, rgba(14,11,8,1) 80%, rgba(14,11,8,0.9));
  border: 1px solid rgba(229,168,78,0.3);
  border-radius: 999px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.flow-band:hover .flow-inner {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229,168,78,0.15), 0 8px 24px rgba(229,168,78,0.12);
  transform: scale(1.035);
}
.flow-band:hover .flow-svg path { opacity: 1.1; }
.flow-band .flow-svg path { transition: opacity 0.25s; }
.flow-band .flow-amt {
  font-family: var(--serif);
  font-weight: 600; font-size: 22px;
  color: var(--accent);
  letter-spacing: -0.01em;
  text-transform: none;
}
.flow-band .flow-amt small {
  font-size: 14px; opacity: 0.8; margin-left: 1px;
}
.flow-band .flow-arrow {
  color: var(--accent); font-size: 16px; line-height: 1;
}
.flow-band .flow-label {
  font-size: 10px; color: var(--ink-dim);
  letter-spacing: 0.14em;
}
@media (max-width: 900px) {
  .flow-band { height: 80px; }
  .flow-band .flow-inner { flex-direction: column; gap: 2px; padding: 8px 14px; }
  .flow-band .flow-amt { font-size: 18px; }
  .flow-band .flow-label { font-size: 9px; text-align: center; max-width: 220px; }
}

/* =================================================================
   TIMELINE VIEW — editorial restyle
   ================================================================= */
.view-timeline { padding: 0; overflow: auto; }
.tl-wrap { position: relative; min-width: 1600px; background: var(--bg); }
.tl-axis {
  position: sticky; top: 0; z-index: 3;
  height: 44px; background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.tl-axis .yr {
  position: absolute; top: 0; bottom: 0;
  font: 500 11px var(--mono); color: var(--ink-faint);
  padding: 14px 8px; border-left: 1px solid var(--line);
  letter-spacing: 0.08em;
}
.tl-lanes { position: relative; z-index: 0; }
.tl-lane {
  position: relative; height: 100px;
  border-bottom: 1px solid var(--line);
}
.tl-lane .label {
  position: sticky; left: 0; z-index: 2;
  width: 170px; height: 100%; padding: 18px 18px;
  background: linear-gradient(90deg, var(--bg-2), rgba(23,18,13,0.9));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center;
  font-family: var(--serif);
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em;
}
.tl-lane .label .sub {
  font: 400 10px var(--mono);
  color: var(--ink-faint); margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.12em;
}

.tl-lane .track { position: absolute; left: 170px; right: 0; top: 0; bottom: 0; }
.tl-dot {
  position: absolute; transform: translate(-50%, -50%);
  width: 8px; height: 8px; border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--bg), 0 0 12px currentColor;
}
.tl-dot:hover { transform: translate(-50%, -50%) scale(1.8); }
.tl-dot.lg { width: 14px; height: 14px; }
.tl-dot.idea {
  background: transparent !important;
  border: 1.5px solid currentColor;
  box-shadow: 0 0 8px currentColor;
}
.tl-dot.idea .idea-mark {
  position: absolute; top: -14px; left: -6px;
  font-size: 11px; filter: saturate(0);
}
.tl-dot .lbl {
  position: absolute; left: 14px; top: -4px; white-space: nowrap;
  font: 500 11px var(--sans); color: var(--ink);
  background: var(--bg-3); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 3px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.tl-dot:hover .lbl { opacity: 1; }

.tl-eras {
  position: absolute; left: 170px; right: 0; top: 44px; bottom: 0;
  pointer-events: none; z-index: 0;
}
.tl-era {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px dashed var(--line);
}
.tl-era .name {
  position: absolute; top: 10px; left: 12px;
  font: 700 10px var(--mono); letter-spacing: 0.22em;
  color: var(--accent); text-transform: uppercase;
  pointer-events: auto;
}
.tl-pivots {
  position: absolute; left: 170px; right: 0; top: 44px; bottom: 0;
  pointer-events: none; z-index: 5;
}
.tl-pivot {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(229,168,78,0.45), rgba(229,168,78,0.08), rgba(229,168,78,0.45));
}
.tl-pivot .cap {
  position: absolute; top: 0; left: 4px; max-width: 180px;
  font: 600 9px var(--mono); color: var(--accent);
  pointer-events: auto; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(90deg, rgba(14,11,8,0.95), rgba(14,11,8,0.65));
  padding: 2px 6px 2px 4px;
  border-left: 2px solid var(--accent);
  overflow: hidden; text-overflow: ellipsis;
  transition: max-width 0.25s ease, background 0.25s ease;
  cursor: help;
}
.tl-pivot .cap:hover {
  max-width: 340px; z-index: 10;
  background: rgba(14,11,8,0.98);
  text-overflow: clip;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
/* Show full note as a second line on hover */
.tl-pivot .cap:hover::after {
  content: attr(data-note);
  display: block;
  font: 400 10px var(--serif); font-style: italic;
  color: var(--ink-dim); text-transform: none; letter-spacing: 0;
  white-space: normal; margin-top: 4px;
  max-width: 320px;
}
.tl-pivot .cap:hover { max-width: 360px; padding-bottom: 6px; }

/* =================================================================
   GRAPH VIEW
   ================================================================= */
.view-graph {
  position: relative; min-height: 80vh;
  background: radial-gradient(ellipse at 50% 40%, rgba(229,168,78,0.04), transparent 60%);
  overflow-x: auto; overflow-y: hidden;
}
#graph-svg { display: block; }
.graph-help {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 44px; width: fit-content; max-width: calc(100vw - 48px); z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  font: 500 10px var(--mono); color: var(--ink-dim);
  background: var(--bg-2); padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.12em;
}
.graph-help .leg-line {
  display: inline-block; width: 28px; height: 0;
  margin-right: 4px;
}
.graph-help .leg-money { border-top: 1.6px dashed rgba(229,168,78,0.7); }
.graph-help .leg-acq   { border-top: 2px solid rgba(201,74,59,0.85); }
.graph-help .leg-prod  { border-top: 1px solid rgba(242,234,216,0.25); }
.graph-help .leg-sep { opacity: 0.4; }
.node circle { stroke: var(--bg); stroke-width: 2; cursor: pointer; }
.node text { fill: var(--ink); font: 500 12px var(--sans); pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.link { fill: none; stroke-linecap: round; }
.link-product { stroke: rgba(242,234,216,0.08); stroke-width: 1; }
.link-money   { stroke: rgba(229,168,78,0.55); stroke-width: 1.4; stroke-dasharray: 4 3; }
.link-acq     { stroke: rgba(201,74,59,0.75); stroke-width: 1.8; }
/* People layer */
.p-link {
  stroke: rgba(229,168,78,0.35); stroke-width: 0.8;
  stroke-dasharray: 2 2; fill: none;
  pointer-events: none;
}
.p-node { cursor: pointer; transition: transform 0.15s; }
.p-node:hover { transform: scale(1.8); }
.p-node:hover circle { fill: var(--accent); }
.p-node:hover text { fill: #0e0b08; }

.graph-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; text-transform: none; letter-spacing: normal;
  font-family: var(--sans); font-size: 11px; color: var(--ink-dim);
}
.graph-toggle input { accent-color: var(--accent); }
.node.vi circle:first-child { stroke: var(--accent); stroke-width: 1.5; opacity: 0.6; }
.node .vi-badge { fill: var(--accent); font: 700 10px var(--mono); stroke: none; }

/* =================================================================
   STATS VIEW
   ================================================================= */
.view-stats { padding: 56px 48px 120px; }
.stats {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.stats-header { grid-column: 1 / -1; margin-bottom: 12px; }
.stats-header h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: 64px; line-height: 1; margin: 0;
  letter-spacing: -0.02em;
}
.stats-header h1 em { font-style: italic; color: var(--accent); }
.stats-header p {
  font-family: var(--serif); font-style: italic;
  font-size: 18px; color: var(--ink-dim);
  margin: 12px 0 0; max-width: 600px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px; padding: 28px;
}
.stat-card h3 {
  margin: 0 0 6px;
  font-family: var(--serif); font-weight: 600;
  font-size: 20px; letter-spacing: -0.01em;
}
.stat-card .sub {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-dim); font-size: 13px; margin-bottom: 20px;
}

.bar-row {
  display: grid; grid-template-columns: 140px 1fr 60px;
  align-items: center; gap: 14px; margin: 8px 0;
  font-size: 13px;
}
.bar-row .lbl { color: var(--ink); white-space: nowrap; }
.bar-row .bar {
  height: 6px; border-radius: 0; background: var(--bg-3);
  overflow: hidden; position: relative;
}
.bar-row .bar i { display: block; height: 100%; }
.bar-row .num { text-align: right; font-family: var(--mono); color: var(--ink-dim); font-size: 12px; }

.spark {
  display: flex; align-items: flex-end; height: 120px; gap: 3px;
  margin-top: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.spark .col {
  flex: 1; background: var(--accent); opacity: 0.75;
  border-radius: 0; min-height: 2px; position: relative;
}
.spark .col:hover { opacity: 1; }
.spark .col .tt {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  font: 500 10px var(--mono); color: var(--ink);
  background: var(--bg-3); border: 1px solid var(--line);
  padding: 3px 6px; border-radius: 3px;
  opacity: 0; pointer-events: none; white-space: nowrap;
}
.spark .col:hover .tt { opacity: 1; }
.spark-axis {
  display: flex; justify-content: space-between; margin-top: 6px;
  font: 500 10px var(--mono); color: var(--ink-faint); letter-spacing: 0.08em;
}

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td {
  padding: 10px 8px; text-align: left;
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.tbl th {
  color: var(--ink-faint); font-weight: 500; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-family: var(--mono);
}
.tbl tr:hover td { background: rgba(229,168,78,0.03); }
.inline-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-family: var(--mono);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-right: 4px;
}
.inline-chip .dot { width: 6px; height: 6px; border-radius: 50%; }

/* =================================================================
   STORY VIEW
   ================================================================= */
.view-story { padding: 80px 48px 120px; display: flex; justify-content: center; }
.story {
  max-width: 820px; width: 100%;
}
.story .era-tag {
  display: inline-block; padding: 4px 14px;
  font: 700 10px var(--mono); color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  margin-bottom: 28px;
  text-transform: uppercase; letter-spacing: 0.24em;
}
.story .year {
  font-family: var(--serif); font-weight: 300;
  font-size: 140px; line-height: 0.85; margin: 0;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
}
.story h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: 44px; line-height: 1.05;
  margin: 20px 0 18px;
  letter-spacing: -0.02em;
}
.story .note {
  font-family: var(--serif); font-style: italic;
  font-size: 22px; line-height: 1.45;
  color: var(--ink-dim);
  margin-bottom: 32px;
  max-width: 680px;
}
.story .layer-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  font: 500 11px var(--mono); margin-right: 8px;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.story .layer-pill .dot { width: 8px; height: 8px; border-radius: 50%; }

.story-nav {
  display: flex; gap: 16px; margin-top: 48px; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.story-nav button {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  padding: 10px 22px; border-radius: 0; cursor: pointer;
  font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
}
.story-nav button:hover { border-color: var(--accent); color: var(--accent); }
.story-nav .read-aloud {
  margin-right: auto; border-color: var(--accent); color: var(--accent);
  background: rgba(229,168,78,0.06);
}
.story-nav .read-aloud:hover { background: rgba(229,168,78,0.14); }
.story-nav .read-aloud:disabled { opacity: 0.35; cursor: default; }
.story-nav .read-aloud:disabled:hover { background: rgba(229,168,78,0.06); }
.story-nav .progress {
  flex: 1; height: 2px; background: var(--line); overflow: hidden;
}
.story-nav .progress i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.story-nav .counter {
  font: 500 11px var(--mono); color: var(--ink-dim);
  min-width: 60px; text-align: right;
  letter-spacing: 0.12em;
}
/* Acts — the eras as narrative structure (Act II · Deep Learning · 3 of 7) */
.act-line {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px;
}
.act-line .act-no {
  font: 700 11px var(--mono); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.act-line .act-name {
  font: italic 300 18px var(--serif); color: var(--ink-dim);
}
.act-line .act-pos {
  font: 500 10px var(--mono); letter-spacing: 0.14em; color: var(--muted);
  margin-left: auto;
}

/* Living captions — the script reveals as the voice speaks */
.story-captions {
  margin-top: 26px; max-width: 60ch;
  font: italic 300 19px/1.75 var(--serif);
}
.story-captions .cap { opacity: 0.18; transition: opacity 0.5s, color 0.5s; }
.story-captions .cap.past { opacity: 0.55; color: var(--ink-dim); }
.story-captions .cap.on { opacity: 1; color: var(--accent); }

.story-nav select {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  padding: 10px 12px; border-radius: 0; cursor: pointer;
  font: 500 12px var(--mono); letter-spacing: 0.08em;
}
.story-nav select:hover { border-color: var(--accent); color: var(--accent); }

/* =================================================================
   THE ARGUMENT — theses surfaced in their view (SCHEMA §21).
   Fraunces 300 italic on the claim names: the atlas's signature,
   spent where it belongs — on what the cake actually argues.
   ================================================================= */
.thesis-band {
  padding: 16px 48px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
}
/* views that already pad their own content */
.view-stats .thesis-band,
.view-physical .thesis-band { padding-left: 0; padding-right: 0; }
/* graph: flow above the SVG, never float over it — the diaspora edges
   are the argument's evidence, so covering them defeats the point */
.view-graph .thesis-band { padding-top: 22px; }
.thesis-band .mono-label {
  font: 500 10px var(--mono); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
}
.thesis-name {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 300 italic 17px var(--serif); color: var(--ink-dim);
  transition: color 0.2s;
}
.thesis-name:hover, .thesis-name.active { color: var(--accent); }
.thesis-claim {
  flex-basis: 100%; margin-top: 2px; max-width: 64ch;
  font: 400 14px/1.65 var(--sans); color: var(--ink-dim);
}
.thesis-claim p { margin: 0 0 10px; }
.thesis-evidence { display: flex; flex-wrap: wrap; gap: 6px; }
.thesis-co {
  background: none; border: 1px solid var(--line); color: var(--muted);
  padding: 3px 9px; cursor: pointer;
  font: 500 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.thesis-co:hover { border-color: var(--accent); color: var(--accent); }

/* =================================================================
   PEOPLE VIEW — editorial cards for the human graph.
   Grid of 3 columns on desktop, monogram + serif name + role + links.
   Sorted by "heat" so rising figures float to the top.
   ================================================================= */
.view-people { padding: 56px 48px 120px; overflow: auto; }
.people-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 1320px; margin: 0 auto;
}
.person-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 24px;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
}
.person-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.person-card[data-heat="rising"] { border-left: 3px solid var(--accent-2); }
.person-card[data-heat="hot"] { border-left: 3px solid var(--accent); }
.person-card[data-heat="mature"] { border-left: 3px solid var(--ink-faint); }
.person-card[data-heat="quiet"] { border-left: 3px solid var(--line); opacity: 0.82; }

.person-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.person-mono {
  font-family: var(--mono); font-weight: 700; font-size: 12px;
  letter-spacing: 0.16em; color: var(--accent);
  border: 1px solid var(--accent); padding: 4px 8px; border-radius: 3px;
}
.person-heat {
  font-family: var(--mono); font-size: 9px; color: var(--ink-faint);
  letter-spacing: 0.2em;
}
.person-card[data-heat="rising"] .person-heat { color: var(--accent-2); }
.person-card[data-heat="hot"] .person-heat { color: var(--accent); }
.person-name {
  font-family: var(--serif); font-weight: 600;
  font-size: 22px; line-height: 1.1;
  margin: 0 0 4px; letter-spacing: -0.01em;
}
.person-role {
  font-family: var(--serif); font-style: italic;
  font-size: 13px; color: var(--ink); margin-bottom: 2px;
}
.person-now {
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px;
}
.person-note {
  font-family: var(--serif);
  font-size: 13px; line-height: 1.5; color: var(--ink-dim);
  margin: 0 0 18px;
}
.person-links { display: flex; gap: 6px; flex-wrap: wrap; }
.person-links .pill {
  font-family: var(--mono); font-size: 10px;
  padding: 4px 9px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--ink-dim); text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.15s, border-color 0.15s;
}
.person-links .pill:hover { color: var(--accent); border-color: var(--accent); }
.person-links .pill-accent {
  color: var(--accent); border-color: rgba(229,168,78,0.4);
  background: rgba(229,168,78,0.06);
}

/* =================================================================
   ACADEMY VIEW — learning hub cards with direct links.
   ================================================================= */
.view-academy { padding: 56px 48px 120px; overflow: auto; }
.academy-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  max-width: 1320px; margin: 0 auto;
}
.academy-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 22px;
  text-decoration: none; color: var(--ink);
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
  display: block;
}
.academy-card:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--bg-2), rgba(229,168,78,0.04));
  transform: translateY(-2px);
}
.academy-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.academy-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); padding: 3px 8px; border-radius: 2px;
}
.academy-go { color: var(--ink-faint); font-size: 18px; }
.academy-card:hover .academy-go { color: var(--accent); }
.academy-name {
  font-family: var(--serif); font-weight: 600;
  font-size: 19px; line-height: 1.1;
  margin: 0 0 4px; letter-spacing: -0.01em;
}
.academy-by {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: var(--ink-dim); margin-bottom: 14px;
}
.academy-note {
  font-family: var(--serif);
  font-size: 13px; line-height: 1.5; color: var(--ink-dim);
  margin: 0 0 14px;
}
.academy-url {
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.14em;
}

@media (max-width: 900px) {
  .people-grid, .academy-grid { grid-template-columns: 1fr; }
}

/* =================================================================
   PHYSICAL AI VIEW — embodiment era, organized by form factor.
   Each band has its own accent color; cards inherit via CSS var.
   Vertically stacks because form factors ARE strata: humanoids on
   top (peak speculation), down through world models to XR.
   ================================================================= */
.view-physical, .view-infra { padding: 48px 48px 120px; overflow: auto; }
.phys-bands {
  display: flex; flex-direction: column; gap: 48px;
  max-width: 1320px; margin: 0 auto;
}
.phys-band {
  border-left: 4px solid var(--band-color);
  padding-left: 28px;
}
.phys-band-head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 22px;
}
.phys-icon {
  font-size: 36px; line-height: 1;
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--band-color) 18%, var(--bg-2));
  border: 1px solid color-mix(in oklab, var(--band-color) 35%, var(--line));
  border-radius: 8px;
}
.phys-band-meta { flex: 1; }
.phys-band-meta h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: 30px; line-height: 1.05; margin: 0 0 6px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.phys-band-meta p {
  font-family: var(--serif); font-style: italic;
  font-size: 14px; line-height: 1.45;
  color: var(--ink-dim); margin: 0;
  max-width: 680px;
}
.phys-band-count {
  font-family: var(--mono); font-size: 11px; color: var(--band-color);
  letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--band-color); padding: 4px 10px; border-radius: 2px;
}
.phys-band-body {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.phys-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 18px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}
.phys-card:hover {
  border-color: var(--band-color);
  background: color-mix(in oklab, var(--band-color) 6%, var(--bg-2));
  transform: translateY(-2px);
}
.phys-card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.phys-card-region {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--ink-faint);
  padding: 2px 6px; border: 1px solid var(--line); border-radius: 2px;
}
.phys-card-heat {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.phys-card-heat.vi {
  color: var(--accent); border: 1px solid var(--accent);
  padding: 2px 5px; border-radius: 2px;
}
.phys-card-name {
  font-family: var(--serif); font-weight: 600;
  font-size: 18px; line-height: 1.1;
  margin: 0 0 4px; letter-spacing: -0.01em;
}
.phys-card-est {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-faint); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 10px;
}
.phys-card-note {
  font-family: var(--serif);
  font-size: 13px; line-height: 1.5; color: var(--ink-dim);
  margin: 0;
}

/* Timeline strip at bottom */
.phys-timeline {
  max-width: 1320px; margin: 64px auto 0;
  padding-top: 40px; border-top: 1px solid var(--line);
}
.phys-tl-head {
  font-family: var(--serif); font-weight: 600;
  font-size: 22px; margin: 0 0 20px;
}
.phys-tl-body {
  display: flex; flex-direction: column; gap: 2px;
}
.phys-ev {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 20px; padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
  transition: background 0.15s;
}
.phys-ev:hover { background: rgba(229,168,78,0.03); }
.phys-ev-year {
  font-family: var(--serif); font-weight: 300; font-size: 32px;
  color: var(--accent); line-height: 1;
  letter-spacing: -0.02em;
}
.phys-ev-title {
  font-family: var(--serif); font-weight: 600; font-size: 16px;
  margin-bottom: 4px;
}
.phys-ev-kind {
  font-family: var(--mono); font-size: 8px;
  background: var(--accent-2); color: #fff;
  padding: 2px 5px; border-radius: 2px;
  letter-spacing: 0.2em; margin-left: 4px;
  vertical-align: 2px;
}
.phys-ev-note {
  font-family: var(--serif); font-style: italic;
  font-size: 13px; color: var(--ink-dim); line-height: 1.5;
}

@media (max-width: 900px) {
  .phys-band-body { grid-template-columns: 1fr; }
  .phys-ev { grid-template-columns: 60px 1fr; }
}

/* =================================================================
   INSPECTOR — slide-over, editorial
   ================================================================= */
.inspector {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw); z-index: 100;
  background: var(--bg-2); border-left: 1px solid var(--line);
  overflow: auto; padding: 32px 36px;
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}
.inspector .close {
  position: absolute; top: 14px; right: 18px;
  background: transparent; color: var(--ink-dim); border: none;
  font-size: 22px; cursor: pointer; line-height: 1;
}
.inspector .close:hover { color: var(--accent); }
.inspector h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: 32px; line-height: 1.1; margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.inspector .meta {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-faint); margin-bottom: 20px;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.inspector .visit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(229,168,78,0.14), rgba(229,168,78,0.06));
  border: 1px solid var(--accent); border-radius: 6px;
  font: 600 12px var(--mono); color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.14em;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.inspector .visit:hover {
  background: rgba(229,168,78,0.2);
  transform: translateY(-1px);
}
.inspector .aff-badge {
  font-family: var(--mono); font-size: 9px;
  background: var(--accent); color: #0e0b08;
  padding: 2px 5px; border-radius: 2px;
  font-weight: 700; letter-spacing: 0.1em;
}
.p-path { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.p-step {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 4px;
  background: var(--bg-3); border: 1px solid var(--line);
  font: 500 11px var(--mono); color: var(--ink-dim);
  letter-spacing: 0.04em; cursor: pointer;
}
.p-step:hover { border-color: var(--accent); color: var(--accent); }
.p-step.current {
  border-color: var(--accent); color: var(--accent);
  background: rgba(229,168,78,0.08);
}
.p-step .p-now {
  font-size: 8px; text-transform: uppercase; color: var(--accent-2);
  letter-spacing: 0.2em; margin-left: 2px;
}
.p-arrow { color: var(--ink-faint); font-family: var(--mono); }
.inspector .row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.inspector .row .k {
  color: var(--ink-faint); font-family: var(--mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
}
.inspector .ev {
  padding: 14px 0; border-bottom: 1px dashed var(--line);
}
.inspector .ev .y {
  font-family: var(--mono); color: var(--accent);
  font-size: 11px; letter-spacing: 0.1em;
}
.inspector .ev .t {
  font-family: var(--serif); font-weight: 500;
  font-size: 16px; margin-top: 4px;
  letter-spacing: -0.01em;
}
.inspector .ev .n {
  font-family: var(--serif); font-style: italic;
  font-size: 13px; color: var(--ink-dim); margin-top: 4px;
  line-height: 1.5;
}
/* person pills inside events + event rows inside person inspector */
.inspector .ev-people {
  margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px;
}
.inspector .p-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.04em; cursor: pointer;
  color: var(--accent); transition: border-color 0.15s;
}
.inspector .p-tag:hover { border-color: var(--accent); }
.inspector .p-events .ev[data-co]:hover { background: rgba(229,168,78,0.04); }

/* =================================================================
   STATUSBAR
   ================================================================= */
.statusbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 48px;
  font: 500 10px var(--mono); color: var(--ink-faint);
  background: rgba(14,11,8,0.9); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.statusbar .grow { flex: 1; }

@media (max-width: 900px) {
  .poster { padding: 40px 24px 120px; }
  .slab { grid-template-columns: 1fr; padding: 24px; }
  .slab-side { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.2); padding: 0 0 16px; }
  .slab-body { padding: 16px 0 0; }
  .co.size-10 { font-size: 32px; }
  .co.size-9 { font-size: 26px; }
  .co.size-8 { font-size: 22px; }
  .stats { grid-template-columns: 1fr; }
}

/* =================================================================
   PRINT — poster mode. Cmd+P from the Cake view gives you something
   you'd actually pin on a wall. Preserves dark palette via color-adjust.
   ================================================================= */
@media print {
  @page { size: A3 portrait; margin: 12mm; }
  html, body {
    background: var(--bg) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }
  body::before { display: none; }
  .topbar, .controls, .statusbar, .inspector, .graph-help { display: none !important; }
  .view { display: none !important; }
  .view-cake { display: block !important; }
  .poster { padding: 0 !important; max-width: 100%; }
  .hero { margin-bottom: 28px; page-break-inside: avoid; }
  .hero h1 { font-size: 72pt !important; }
  .hero .deck { font-size: 14pt !important; max-width: none; }
  .hero .bylines { font-size: 8pt !important; }
  .cake { box-shadow: 0 0 0 1px #2b231a !important; }
  .slab {
    min-height: auto; padding: 18px 24px;
    page-break-inside: avoid;
  }
  .slab-num { font-size: 48pt !important; }
  .slab-name { font-size: 14pt !important; }
  .slab-tag { font-size: 9pt !important; }
  .co.size-10 { font-size: 24pt !important; }
  .co.size-9  { font-size: 20pt !important; }
  .co.size-8  { font-size: 17pt !important; }
  .co.size-7  { font-size: 14pt !important; }
  .co.size-6  { font-size: 12pt !important; }
  .co.size-5  { font-size: 11pt !important; }
  .co.size-4  { font-size: 10pt !important; }
  .co.size-3, .co.size-2, .co.size-1 { font-size: 9pt !important; }
}
/* =================================================================
   CONTROLS v2 — append at end of styles.css
   Overrides the existing .controls strip layout and adds three rows:
   presets / filter-row (existing filters) / filter-sentence.
   ================================================================= */

/* Override: .controls becomes a vertical stack of three rows.
   Existing .controls label, .controls select, .controls input, .controls .toggle
   rules still match and still style the form inside .filter-row. */
.controls {
  flex-direction: column !important;
  padding: 0 !important;
  align-items: stretch !important;
  gap: 0 !important;
}

/* Row 1 — Presets */
.controls .presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.controls .presets-label {
  font: 500 10px var(--mono);
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-right: 6px;
}
.controls .preset-chip {
  background: transparent;
  border: 1px solid rgba(229, 168, 78, 0.35);
  color: var(--accent);
  font: 500 12px var(--sans);
  padding: 4px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.controls .preset-chip:hover {
  background: rgba(229, 168, 78, 0.1);
}
.controls .preset-chip.active {
  background: var(--accent);
  color: #120f0c;
  border-color: var(--accent);
}
.controls .preset-chip.preset-reset {
  color: var(--ink-dim);
  border-color: var(--line);
  margin-left: auto;
}
.controls .preset-chip.preset-reset:hover {
  color: var(--ink);
  border-color: var(--ink-dim);
  background: transparent;
}

/* Row 2 — existing filter controls, wrapped */
.controls .filter-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 48px;
}

/* Row 3 — Live filter sentence */
.controls .filter-sentence {
  padding: 10px 48px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  min-height: 24px;
}
.controls .filter-sentence:empty::before {
  content: 'Showing the cake.';
  color: var(--ink-dim);
  font-style: italic;
}
.controls .filter-sentence .count {
  font-family: var(--mono);
  font-weight: 700;
  font-style: normal;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.controls .filter-sentence .clear-inline {
  display: inline-block;
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  cursor: pointer;
  font-style: normal;
}
.controls .filter-sentence .clear-inline:hover {
  color: var(--accent);
}

/* Responsive — on narrow screens, tighten padding */
@media (max-width: 720px) {
  .controls .presets,
  .controls .filter-row,
  .controls .filter-sentence {
    padding-left: 24px;
    padding-right: 24px;
  }
  .controls .preset-chip.preset-reset {
    margin-left: 0;
  }
}
