/* Map YC — HTMTN paper + GRT + Roboto. Tokens: grtcalculator.com/math/ */

:root {
  --bg: #ffffff;
  --bg-2: #f7f8fc;
  --bg-3: #eef0f6;
  --ink: #0f1117;
  --ink-dim: #5a5f72;
  --ink-mute: #8a8fa3;
  --line: rgba(15, 17, 23, 0.09);
  --line-strong: rgba(15, 17, 23, 0.14);
  --orange: #ff6600;
  --orange-2: #e65c00;
  --blue: #1a4fdb;
  --blue-2: #1240c2;
  --active: #ff6600;
  --public: #c39200;
  --acquired: #1a4fdb;
  --inactive: #8b90a0;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1160px;
  --read: 612px; /* w_φ = CWF · f = 34 · 18 */
  --pad: 24px;
  --header-h: 64px;
  --header-bg: rgba(255, 255, 255, 0.92);
  --card: #ffffff;
  --bg-table: #ffffff;
  --tip-bg: #ffffff;
  --row-alt: rgba(15, 17, 23, 0.03);
  --row-hover: rgba(255, 102, 0, 0.08);
  --radius: 12px;
  --shadow: 0 10px 28px -18px rgba(15, 17, 23, 0.18);

  /* GRT — grtcalculator.com/math/
     φ = 1.618
     q_lower = 1 + (φ−1)/φ² ≈ 1.236
     CWF = 34
     f = 18px Roboto
     w_φ = 34 · 18 = 612px   readable column
     Tuned q at w_φ ≈ 1.618
     h = f · φ ≈ 29.1px
     Scale @ 16px root: 0.695 / 1.125 / 1.820 / 2.945 / 4.766 / 7.706
  */
  --phi: 1.618;
  --q-lower: 1.236;
  --type-caption: 0.695rem;
  --type-body: 1.125rem;
  --type-lead: 1.820rem;
  --type-h2: 2.945rem;
  --type-hero: 4.766rem;
  --type-display: 7.706rem;
  --space-xs: 0.695rem;
  --space-sm: 1.125rem;
  --space-md: 1.820rem;
  --space-lg: 2.945rem;
  --space-xl: 4.766rem;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f7f8fc;
  --bg-3: #eef0f6;
  --ink: #0f1117;
  --ink-dim: #5a5f72;
  --ink-mute: #8a8fa3;
  --line: rgba(15, 17, 23, 0.09);
  --line-strong: rgba(15, 17, 23, 0.14);
  --orange: #ff6600;
  --orange-2: #e65c00;
  --blue: #1a4fdb;
  --blue-2: #1240c2;
  --active: #ff6600;
  --public: #c39200;
  --acquired: #1a4fdb;
  --inactive: #8b90a0;
  --header-bg: rgba(255, 255, 255, 0.94);
  --card: #ffffff;
  --bg-table: #ffffff;
  --tip-bg: #ffffff;
  --row-alt: rgba(15, 17, 23, 0.03);
  --row-hover: rgba(255, 102, 0, 0.08);
}

html[data-theme="dark"] {
  --bg: #0f1117;
  --bg-2: #16181f;
  --bg-3: #1e212b;
  --ink: #f4f5f8;
  --ink-dim: #9aa0b3;
  --ink-mute: #6d7386;
  --line: rgba(244, 245, 248, 0.1);
  --line-strong: rgba(244, 245, 248, 0.18);
  --orange: #ff6600;
  --orange-2: #ff8533;
  --blue: #6b8cff;
  --blue-2: #8aa4ff;
  --active: #ff6600;
  --public: #efc14b;
  --acquired: #6b8cff;
  --inactive: #5e6473;
  --header-bg: rgba(15, 17, 23, 0.92);
  --card: #16181f;
  --bg-table: #16181f;
  --tip-bg: #1e212b;
  --row-alt: rgba(244, 245, 248, 0.035);
  --row-hover: rgba(255, 102, 0, 0.1);
}

html[data-theme="matrix"] {
  --bg: #000000;
  --bg-2: #001a0a;
  --bg-3: #002510;
  --ink: #00ff66;
  --ink-dim: #00cc52;
  --ink-mute: #00aa44;
  --line: rgba(0, 255, 102, 0.18);
  --line-strong: rgba(0, 255, 102, 0.32);
  --orange: #00ff66;
  --orange-2: #66ff99;
  --blue: #66ff99;
  --blue-2: #b8ffd0;
  --active: #00ff66;
  --public: #b8ffd0;
  --acquired: #33cc77;
  --inactive: #007a3a;
  --header-bg: rgba(0, 0, 0, 0.94);
  --card: #00140a;
  --bg-table: #00140a;
  --tip-bg: #001a0a;
  --row-alt: rgba(0, 255, 102, 0.05);
  --row-hover: rgba(0, 255, 102, 0.12);
}

html[data-theme="flashlight"] {
  --bg: #ffffff;
  --bg-2: #f7f8fc;
  --bg-3: #eef0f6;
  --ink: #0f1117;
  --ink-dim: #5a5f72;
  --ink-mute: #8a8fa3;
  --line: rgba(15, 17, 23, 0.09);
  --line-strong: rgba(15, 17, 23, 0.14);
  --orange: #ff6600;
  --orange-2: #e65c00;
  --blue: #1a4fdb;
  --header-bg: rgba(255, 255, 255, 0.94);
  --card: #ffffff;
  --bg-table: #ffffff;
  --tip-bg: #ffffff;
}

html { color-scheme: light; }
html[data-theme="dark"],
html[data-theme="matrix"],
html[data-theme="flashlight"] { color-scheme: dark; }
html[data-theme="light"],
html[data-theme="light"] body {
  background: #ffffff !important;
  color: #0f1117 !important;
  color-scheme: light;
}
html[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.94) !important;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}
body {
  font-family: var(--sans);
  font-size: var(--type-body);
  line-height: 1.618;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
html[data-theme="matrix"] body {
  font-family: ui-monospace, "SFMono-Regular", Menlo, "Courier New", monospace;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--blue); text-decoration: underline; }
img, svg { display: block; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.prose, .lede, .honest, .sec-head > p {
  max-width: var(--read);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 var(--space-sm);
}
.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
h1 {
  font-size: clamp(var(--type-h2), 8vw, var(--type-hero));
  line-height: 1.05;
  margin: 0 0 var(--space-sm);
}
h2 {
  font-size: clamp(var(--type-lead), 4.4vw, var(--type-h2));
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
}
h3 {
  font-size: var(--type-lead);
  line-height: 1.236;
  margin: 0 0 var(--space-xs);
}
p { color: var(--ink-dim); }
.lede {
  font-size: var(--type-lead);
  line-height: 1.236;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 var(--space-md);
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  height: var(--header-h);
  min-height: var(--header-h);
  padding: 0;
  flex-wrap: nowrap;
}
.site-header nav {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}
.site-header .nav-cta {
  flex: 0 0 auto;
  margin-left: var(--space-xs);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; color: inherit; }
.brand-mark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--type-body);
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand-mark em { color: var(--orange); font-style: normal; }
.brand-sub {
  font-size: var(--type-caption);
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
nav {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
}
nav a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-dim);
  text-decoration: none;
  white-space: nowrap;
}
nav a:hover, nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }

/* hero */
.hero {
  position: relative;
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 12% -10%, rgba(255, 102, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  align-items: baseline;
  margin-bottom: var(--space-sm);
}
.asof {
  font-size: var(--type-caption);
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin: var(--space-lg) 0 var(--space-md);
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-sm) var(--space-xs);
}
.stat b {
  display: block;
  font-family: var(--sans);
  font-size: clamp(var(--type-lead), 4vw, var(--type-h2));
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.stat small {
  display: block;
  margin-top: 4px;
  color: var(--ink-mute);
  font-size: 13px;
  line-height: 1.35;
}

.coverage { margin: var(--space-sm) 0 0; max-width: var(--read); }
.coverage-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.bar { height: 6px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 99px; display: flex; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--orange); }
.honest {
  margin: var(--space-sm) 0 0;
  font-size: var(--type-body);
  line-height: 1.618;
  color: var(--ink-mute);
}

/* sections */
section {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--line);
}
section:nth-of-type(even) { background: var(--bg-2); }
.sec-head { margin-bottom: var(--space-lg); }
.sec-head h2 { max-width: var(--read); }
.sec-head p {
  margin: 0;
  font-size: var(--type-body);
  line-height: 1.618;
}

/* outcomes */
.outcomes-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.donut { width: 220px; height: 220px; }
.donut-center { font-family: var(--sans); }
.legend { width: 100%; display: grid; gap: 8px; }
.legend-row { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 14px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; }
.legend-row b { font-variant-numeric: tabular-nums; font-weight: 500; }
.legend-row em { font-style: normal; color: var(--ink-mute); font-size: 12px; }
.hstack { height: 14px; display: flex; width: 100%; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.hstack i { display: block; height: 100%; }

.note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
  max-width: 54em;
  margin: 0 0 var(--space-sm);
}

.ob-scroll { overflow-x: auto; padding-bottom: 8px; }
.ob {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 920px;
  height: 220px;
}
.ob-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font: inherit;
  min-width: 0;
}
.ob-col:hover .ob-stack { outline: 1px solid var(--ink); }
.ob-col.is-zero .ob-stack { opacity: 0.45; }
.ob-stack {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px 4px 0 0;
}
.ob-seg { width: 100%; min-height: 0; }
.ob-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  height: 42px;
}

.tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--tip-bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  max-width: 260px;
  display: none;
}
.tip.show { display: block; }
.tip { white-space: pre-line; }
body.mm-focus .tip { z-index: 90; }

/* explorer — compact */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: var(--space-sm);
  font-size: 13px;
  line-height: 1.3;
}
.search {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font: 13px/1.3 var(--sans);
  padding: 7px 10px;
  border-radius: 8px;
  height: 34px;
}
.search:focus { outline: 2px solid color-mix(in srgb, var(--orange) 55%, transparent); border-color: var(--orange); }
.pills { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pill {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 5px 10px;
  cursor: pointer;
  line-height: 1.2;
}
.pill[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.pill.edgar[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #1a0d00; }
.filter-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
  margin-left: auto;
  white-space: nowrap;
  flex: 0 0 auto;
}

.search-results { margin: 0 0 var(--space-sm); color: var(--ink); }
.search-results[hidden],
#batch-list[hidden],
body.is-text-query #batch-list { display: none !important; }
.search-results .company-row,
.search-results tbody tr { min-height: 40px; color: var(--ink); }
.search-results td.name { font-weight: 500; color: var(--ink); }

.co {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 420px;
}
.co-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--bg-2);
  flex: 0 0 20px;
  margin-top: 2px;
}
.co-logo-empty {
  display: inline-block;
  background: var(--bg-3);
}
.co-text { min-width: 0; }
.co-name { font-weight: 500; color: var(--ink); line-height: 1.25; }
.co-one {
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-dim);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.company-table td.name { vertical-align: top; max-width: 420px; white-space: normal; height: auto; }

.logo-attr {
  margin: var(--space-sm) 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-mute);
}
.logo-attr a { color: inherit; }



.batch-list { border-top: 1px solid var(--line); font-size: 14px; line-height: 1.35; }
.batch-row {
  width: 100%;
  display: grid;
  grid-template-columns: 52px minmax(0, 1.1fr) 86px minmax(0, 1.5fr) 64px;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 9px 4px;
  cursor: pointer;
  font: 14px/1.3 var(--sans);
  min-width: 0;
}
.batch-row:hover { background: var(--bg-2); }
.batch-row[aria-expanded="true"] { background: var(--bg-3); }
.batch-code { font-weight: 700; color: var(--orange); font-size: 13px; }
.batch-name {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.batch-n { font-size: 11px; font-weight: 500; color: var(--ink-dim); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; align-items: center; }
.chip {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-dim);
  line-height: 1.2;
  white-space: nowrap;
}
.chip.Active { color: var(--active); border-color: rgba(255, 102, 0, 0.35); }
.chip.Public { color: var(--public); border-color: rgba(195, 146, 0, 0.35); }
.chip.Acquired { color: var(--acquired); border-color: rgba(26, 79, 219, 0.28); }
.chip.Inactive { color: var(--ink-mute); }
.chip.edgar { color: var(--orange-2); }
.mini { height: 8px; display: flex; width: 100%; background: var(--bg-3); min-width: 0; border-radius: 99px; overflow: hidden; }
.mini i { display: block; height: 100%; }
.batch-body {
  display: none;
  border-bottom: 1px solid var(--line-strong);
  background: var(--bg-table);
  padding: 4px 0 10px;
}
.batch-body.open { display: block; }

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  font-size: 13px;
  line-height: 1.3;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.3; }
table.company-table { display: table; }
table.company-table thead { display: table-header-group; }
table.company-table tbody { display: table-row-group; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  position: static;
  background: var(--bg-table);
}
.table-wrap tbody tr,
.table-wrap tbody tr.company-row {
  display: table-row;
  color: var(--ink);
  visibility: visible;
  opacity: 1;
}
.table-wrap tbody td {
  display: table-cell;
  color: var(--ink);
  height: 40px;
  min-height: 40px;
  vertical-align: middle;
}
.company-table td.name {
  vertical-align: top;
  max-width: 420px;
  white-space: normal;
  height: auto;
}
.table-wrap tbody tr:nth-child(even) { background: var(--row-alt); }
.table-wrap tbody tr:hover { background: var(--row-hover); }
td.name { font-weight: 500; color: var(--ink); }
td.web { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
td.web .web-link { font-size: 12px; }
td.muted, .muted { color: var(--ink-mute); }
.status { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.status.Active { color: var(--active); }
.status.Public { color: var(--public); }
.status.Acquired { color: var(--acquired); }
.status.Inactive { color: var(--ink-mute); }
.mono { font-size: 12px; font-variant-numeric: tabular-nums; }

/* timeline */
.tl {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 220px;
  margin: var(--space-xs) 0 var(--space-xs);
}
.tl-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 6px;
  min-width: 0;
}
.tl-col.is-peak .tl-bar { background: var(--orange); }
.tl-bar {
  width: 100%;
  background: #f0d4b0;
  border: 1px solid rgba(255, 102, 0, 0.35);
  border-radius: 3px 3px 0 0;
}
html[data-theme="dark"] .tl-bar { background: #3a2a1c; }
html[data-theme="matrix"] .tl-bar {
  background: #003318;
  border-color: rgba(0, 255, 102, 0.4);
}
.tl-n { font-size: 10px; font-weight: 500; color: var(--ink-dim); }
.tl-y { font-size: 10px; color: var(--ink-mute); }
.tl-caption { font-size: 13px; color: var(--ink-mute); margin: 0 0 var(--space-md); }

.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm) var(--space-md); }
.listing-year { font-size: 12px; font-weight: 700; color: var(--orange); margin-bottom: 4px; letter-spacing: 0.04em; }
.listing-item { font-size: 14px; color: var(--ink-dim); }
.listing-item b { color: var(--ink); font-weight: 500; }

.funds { width: 100%; }
.funds td:nth-child(3), .funds th:nth-child(3) { text-align: right; }

.file-grid { display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 14px; }
.file-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 90px 70px 1fr;
  gap: 14px;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.file-path { font-size: 13px; font-weight: 500; }
.file-size, .file-kind { font-size: 12px; color: var(--ink-mute); }
.file-desc { font-size: 14px; color: var(--ink-dim); }

.public-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 16px;
  margin-top: var(--space-sm);
}
.public-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--card);
}
.public-item:hover { text-decoration: none; border-color: var(--orange); }
.public-item span { font-size: 11px; font-weight: 500; color: var(--ink-mute); }

footer {
  padding: var(--space-lg) 0 var(--space-xl);
  color: var(--ink-mute);
  font-size: var(--type-caption);
}
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.empty { padding: var(--space-sm); color: var(--ink-mute); font-size: 14px; }
.err {
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: var(--space-sm);
  color: var(--ink);
  margin: var(--space-sm) 0;
}

.notfound { min-height: 70vh; display: grid; align-content: center; padding: var(--space-xl) 0; }
.notfound h1 { font-size: clamp(var(--type-h2), 8vw, var(--type-hero)); }

/* ── mindmap ── */
#mindmap { background: var(--bg); }
.mindmap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.mindmap-toolbar .search { max-width: 420px; }
.mindmap-hint {
  font-size: 13px;
  color: var(--ink-mute);
}
.mindmap-hint button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--orange);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mindmap-hint button:hover { color: var(--blue); }
.mindmap-stage {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 560px;
}
.mindmap-stage.is-open {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}
.mindmap-canvas-wrap {
  position: relative;
  min-height: 560px;
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 48%, rgba(255, 102, 0, 0.05), transparent 62%),
    var(--card);
}
#mindmap-svg { width: 100%; height: 560px; }
.mm-spoke { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.mm-spoke.is-hit { stroke: var(--orange); stroke-width: 1.6; opacity: 0.85; }
.mm-spoke.is-dim { opacity: 0.18; }
.mm-center {
  cursor: pointer;
}
.mm-center-ring { fill: var(--card); stroke: var(--orange); stroke-width: 3; }
.mm-label {
  font-family: var(--sans);
  font-weight: 700;
  fill: var(--ink);
  pointer-events: none;
}
.mm-sub {
  font-family: var(--sans);
  font-weight: 500;
  fill: var(--ink-dim);
  pointer-events: none;
}
.mm-batch { cursor: pointer; }
.mm-batch.is-dim { opacity: 0.22; }
.mm-batch.is-hit .mm-batch-halo,
.mm-batch.is-open .mm-batch-halo { stroke: var(--orange); stroke-width: 2.4; }
.mm-batch-halo { fill: var(--card); stroke: var(--line-strong); stroke-width: 1; }
.mm-batch-code {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  fill: var(--ink);
  pointer-events: none;
}
.mm-co { cursor: pointer; }
.mm-co-label {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  fill: var(--ink-dim);
  pointer-events: none;
}

.mindmap-panel {
  border-left: 1px solid var(--line);
  background: var(--bg-2);
  max-height: 560px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.mindmap-panel[hidden] { display: none !important; }
.mindmap-panel-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xs);
  align-items: flex-start;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg-2);
  z-index: 1;
}
.mindmap-panel-head h3 { font-size: var(--type-body); margin: 0; line-height: 1.25; }
.mindmap-panel-head .kicker { margin-bottom: 4px; }
.mindmap-panel-sub { margin: 4px 0 0; font-size: 13px; }
.mindmap-close {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-dim);
  border-radius: 8px;
  padding: 6px 10px;
  font: 11px/1 var(--sans);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.mindmap-close:hover { color: var(--ink); border-color: var(--ink); }
.mindmap-panel-list { padding: 0 0 var(--space-sm); }
.mm-group {
  padding: var(--space-xs) var(--space-sm) 0;
}
.mm-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
  margin: var(--space-xs) 0 6px;
}
.mm-co-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 72px minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.3;
}
.mm-co-row.is-hit { background: var(--row-hover); margin: 0 -var(--space-sm); padding-left: var(--space-sm); padding-right: var(--space-sm); }
.mm-co-row .co { max-width: none; }
.mm-co-row .name,
.mm-co-row .co-name { font-weight: 500; color: var(--ink); overflow: hidden; }
.mm-co-row .status,
.mm-co-row .web,
.mm-co-row .edgar { padding-top: 2px; }
.mm-co-row .web { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.mindmap-tree {
  display: none;
  margin-top: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.mm-tree-row {
  width: 100%;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 72px 80px;
  gap: 8px;
  align-items: center;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  cursor: pointer;
  font: 13px/1.3 var(--sans);
}
.mm-tree-row:last-child { border-bottom: 0; }
.mm-tree-row:hover, .mm-tree-row.is-open { background: var(--bg-2); }
.mm-tree-row.is-hit { box-shadow: inset 3px 0 0 var(--orange); }
.mm-tree-row.is-dim { opacity: 0.35; }

@media (max-width: 1100px) {
  .brand-sub { display: none; }
  nav { gap: 12px; }
}

@media (max-width: 860px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .site-header .wrap {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    padding: 8px 0;
    gap: 8px 12px;
  }
  nav { gap: 10px; flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr 1fr; }
  .sec-head, .outcomes-grid { grid-template-columns: 1fr; }
  .filters { flex-wrap: wrap; }
  .search { flex: 1 1 100%; max-width: none; }
  .filter-meta { margin-left: 0; white-space: normal; width: 100%; }
  .batch-row { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .batch-row .mini { display: none; }
  .batch-row .chips { grid-column: 1 / -1; }
  .file-row { grid-template-columns: 1fr auto; }
  .file-kind, .file-desc { grid-column: 1 / -1; }
  .listings { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.2rem, 12vw, var(--type-hero)); }
  .hero { padding-top: var(--space-lg); }
  section { padding-top: var(--space-lg); }
  .mindmap-stage.is-open { grid-template-columns: 1fr; }
  .mindmap-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 420px;
  }
  #mindmap-svg { height: 420px; }
  .mindmap-canvas-wrap, .mindmap-stage { min-height: 420px; }
  .mindmap-tree { display: block; }
  .mm-co-row { grid-template-columns: minmax(0, 1fr) 72px; }
  .mm-co-row .web, .mm-co-row .edgar { display: none; }
}

body.mm-focus { overflow: hidden; }

.mindmap-expand {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 12px;
  height: 34px;
  font: 12px/1 var(--sans);
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.mindmap-expand:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.mindmap-exit {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  font: 18px/1 var(--sans);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.mindmap-exit:hover { border-color: var(--ink); color: var(--ink); }
.mindmap-stage.is-focus .mindmap-exit { display: block; }

.mm-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  gap: 4px;
}
.mm-zoom button {
  min-width: 36px;
  height: 32px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  font: 13px/1 var(--sans);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.mm-zoom button:hover { border-color: var(--orange); color: var(--orange); }

#mindmap-svg { cursor: grab; touch-action: none; }
#mindmap-svg.is-panning { cursor: grabbing; }

.mindmap-stage.is-focus {
  position: fixed;
  inset: 0;
  z-index: 80;
  border-radius: 0;
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  box-shadow: none;
  border: 0;
}
.mindmap-stage.is-focus.is-open {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
}
.mindmap-stage.is-focus .mindmap-canvas-wrap {
  min-height: 100vh;
  height: 100%;
  overflow: hidden;
}
.mindmap-stage.is-focus #mindmap-svg {
  height: calc(100vh - 64px);
  max-height: 100%;
}
.mindmap-stage.is-focus .mindmap-panel {
  max-height: 100vh;
  height: 100vh;
}
.mindmap-stage.is-focus .mm-batch-code { font-size: 13px; }
.mindmap-stage.is-focus .mm-co-label { font-size: 11px; }

@media (max-width: 860px) {
  .mindmap-stage.is-focus,
  .mindmap-stage.is-focus.is-open {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .mindmap-stage.is-focus .mindmap-canvas-wrap {
    min-height: 0;
  }
  .mindmap-stage.is-focus #mindmap-svg {
    height: calc(100vh - 64px);
  }
  .mindmap-stage.is-focus.is-open #mindmap-svg {
    height: 52vh;
  }
  .mindmap-stage.is-focus .mindmap-panel {
    max-height: 42vh;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ── word clouds ── */
.mm-cloud, .batch-cloud {
  padding: 8px 10px;
  background: var(--card);
}
.mm-cloud {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}
.mm-cloud[hidden] { display: none !important; }
.batch-cloud { border-bottom: 1px solid var(--line); }
.mm-cloud svg, .batch-cloud svg, .cloud-mini svg {
  width: 100%;
  height: auto;
  display: block;
}
.mm-cloud text, .batch-cloud text, .cloud-card text {
  font-family: var(--sans);
  cursor: pointer;
}
.mm-cloud text:hover, .batch-cloud text:hover, .cloud-card text:hover {
  fill: var(--orange);
}
.cloud-empty {
  margin: 0;
  color: var(--ink-mute);
  font-size: 13px;
}
.cloud-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: var(--space-md);
}
.cloud-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 8px 10px 10px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.cloud-card:hover { border-color: var(--orange); }
.cloud-card-code { font-weight: 700; color: var(--orange); font-size: 12px; }
.cloud-card-name { font-size: 12px; color: var(--ink-dim); }
.cloud-mini { margin-top: 4px; }

/* focus mode: cloud stays inside the panel */
.mindmap-stage.is-focus .mm-cloud {
  position: relative;
}

.mindmap-panel { overflow: hidden; }
.mindmap-panel-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.cloud-play {
  margin: var(--space-lg) 0 var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: var(--space-sm);
  box-shadow: var(--shadow);
}
.cloud-play-head .kicker { margin-bottom: 4px; }
.cloud-play-head h3 {
  font-size: var(--type-body);
  margin: 0;
  line-height: 1.25;
}
#cloud-play-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-dim);
}
.cloud-play-stage {
  min-height: 280px;
  margin-top: var(--space-xs);
  border-radius: 8px;
  background: var(--bg-2);
}
.cloud-play-stage:focus {
  outline: 2px solid color-mix(in srgb, var(--orange) 55%, transparent);
  outline-offset: 2px;
}
.cloud-play-stage svg {
  width: 100%;
  height: auto;
  display: block;
}
.cloud-play-stage text { font-family: var(--sans); cursor: pointer; }
.cloud-play-stage text:hover { fill: var(--orange); }
.cloud-play-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: var(--space-sm);
}
#cloud-play-btn {
  flex: 0 0 auto;
  min-width: 72px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 12px;
  height: 34px;
  font: 12px/1 var(--sans);
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
#cloud-play-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
#cloud-play-btn[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #1a0d00;
}
#cloud-play-btn[aria-pressed="true"]:hover {
  color: #1a0d00;
}
#cloud-play-scrub {
  flex: 1;
  min-width: 160px;
  accent-color: var(--orange);
}
