/* THE STARTUP FILES — research platform
   Layout: a calm research workspace. Cool off-white canvas, white surfaces with hairline borders,
   one sky-blue accent for interaction and data. Inter throughout; JetBrains Mono only for figures and IDs. */
:root {
  /* Colour */
  --bg: #F7FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F6FA;
  --surface-3: #E9F1F7;
  --fg: #172B3A;
  --fg-2: #3E5466;
  --muted: #5A6778;
  --line: #E4EBF1;
  --line-2: #D3DFE8;
  --primary: #69B7E8;
  --primary-deep: #2563A6;
  --primary-soft: #EAF5FC;
  --primary-ink: #FFFFFF; --on-accent: #FFFFFF;
  --hero-bg: linear-gradient(180deg, #FFFFFF 0%, #F7FAFC 100%); --feature-bg: linear-gradient(160deg, #EAF5FC 0%, #FFFFFF 70%);
  --ok: #17784E; --ok-soft: #E7F5EE;
  --no: #C2453A; --no-soft: #FCEDEB;
  --warn: #8F5A0B; --warn-soft: #FBF3E4;
  --violet: #6E5BC6; --violet-soft: #F0EDFA;
  /* Funds */
  --rm: #2563A6; --gr: #0B7A70; --nk: #8F5A0B; --wt: #6E5BC6; --accent: #2563A6;
  /* Aliases kept for older inline styles */
  --gold: var(--primary-deep); --cobalt: var(--primary-deep); --vermilion: var(--no); --ink: var(--fg); --ink-2: var(--fg-2); --ink-3: var(--muted);
  /* Effects */
  --shadow-sm: 0 1px 2px rgba(23, 43, 58, 0.05);
  --shadow: 0 1px 2px rgba(23, 43, 58, 0.04), 0 6px 20px -8px rgba(23, 43, 58, 0.10);
  --shadow-lg: 0 2px 4px rgba(23, 43, 58, 0.04), 0 16px 40px -16px rgba(23, 43, 58, 0.18);
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  /* Type */
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: var(--sans);
  /* Layout */
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --maxw: 1200px;
  --nav-h: 60px;
  color-scheme: light;
}
/* Dark theme: set by the toggle on <html data-tsf-theme="dark">. Light stays the default for everyone.
   Layers: page #0D1722, inset panels #111F2D, cards #172838, raised fills #1D3245. */
:root[data-tsf-theme="dark"] {
  --bg: #0D1722; --surface: #172838; --surface-2: #111F2D; --surface-3: #1D3245;
  --fg: #F1F6FA; --fg-2: #A7B8C8; --muted: #91A4B6; --line: #263B4D; --line-2: #33495D;
  --primary: #69B7E8; --primary-deep: #82C8F2; --primary-soft: #16324A; --primary-ink: #0D1722; --on-accent: #0D1722;
  --ok: #4CC38A; --ok-soft: #133024; --no: #F08A7E; --no-soft: #3A1F1F; --warn: #E6B865; --warn-soft: #332815;
  --violet: #AE9FF2; --violet-soft: #252142;
  --rm: #82C8F2; --gr: #4FD1C0; --nk: #E6B865; --wt: #AE9FF2; --accent: #82C8F2;
  --shadow-sm: none; --shadow: 0 1px 2px rgba(0, 0, 0, 0.25); --shadow-lg: 0 10px 28px -14px rgba(0, 0, 0, 0.55);
  --hero-bg: var(--surface-2); --feature-bg: var(--primary-soft);
  color-scheme: dark;
}
/* Smooth switch, only while toggling */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .25s ease, border-color .25s ease, color .25s ease, fill .25s ease, stroke .25s ease !important; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.6 var(--sans); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.015em; color: var(--fg); }
p { margin: 0; }
.mono { font-family: var(--mono); font-feature-settings: "tnum", "zero"; letter-spacing: 0; }
.small { font-size: 0.85rem; } .tiny { font-size: 0.72rem; }
.muted { color: var(--muted); }
.neg { color: var(--no); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary-deep); color: var(--primary-ink); padding: 8px 12px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 12px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Navigation ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--surface); z-index: 60; }
.masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.masthead-in { max-width: var(--maxw); margin: 0 auto; height: var(--nav-h); padding-left: var(--gutter); padding-right: var(--gutter-r); display: flex; align-items: center; gap: 28px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 600 0.98rem/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; color: var(--fg); }
.wm-logo { width: 26px; height: 26px; border-radius: 7px; background: var(--primary); display: grid; place-items: center; flex: none; }
.wm-logo svg { width: 15px; height: 15px; stroke: var(--on-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wm-the { font-weight: 400; color: var(--muted); }
.mainnav { display: flex; gap: 4px; margin-right: auto; }
.mainnav a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 0.88rem; font-weight: 500; color: var(--fg-2); padding: 7px 11px; border-radius: var(--r-sm); white-space: nowrap; transition: background .15s, color .15s; }
.mainnav a .mono { display: none; }
.mainnav a .ico { color: var(--muted); transition: color .15s; }
.mainnav a:hover { background: var(--surface-2); color: var(--fg); }
.mainnav a.on { background: var(--primary-soft); color: var(--primary-deep); }
.mainnav a.on .ico { color: var(--primary-deep); }
.score-pill { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px 5px 10px; font-size: 0.8rem; transition: border-color .15s, transform .25s; }
.score-pill:hover { border-color: var(--line-2); }
.score-pill .mono { color: var(--fg); font-weight: 600; font-size: 0.82rem; }
.score-label { color: var(--muted); }
.score-badges { display: flex; gap: 3px; padding-left: 8px; border-left: 1px solid var(--line); }
.score-badges i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.score-badges i.on { background: var(--primary); }
.score-pill.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.06); } }

main { display: block; min-height: 70vh; transition: opacity .14s ease; }
main.leaving { opacity: 0; }

/* ---------- Page sections ---------- */
.band { padding-block: clamp(40px, 6vw, 72px); }
.band-ivory, .band-parchment { background: transparent; }
.band-parchment { border-top: 1px solid var(--line); }
.band-forest { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--fg); }
.sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2 { font-size: 1.15rem; font-weight: 600; }
.sec-no { font: 500 0.72rem/1 var(--mono); color: var(--muted); padding: 4px 7px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.sec-head .more { margin-left: auto; font-size: 0.86rem; font-weight: 500; color: var(--primary-deep); text-decoration: none; }
.sec-head .more:hover { text-decoration: underline; }
.small-head { margin-bottom: 14px; }
.small-head h3 { font-size: 1.05rem; }
.eyebrow { font-size: 0.78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.eyebrow.mono { font-family: var(--sans); }
.eyebrow a { text-decoration: none; color: var(--fg-2); } .eyebrow a:hover { color: var(--primary-deep); }
.lede { font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.6; color: var(--fg-2); max-width: 62ch; }
.note-line { margin-top: 20px; color: var(--muted); max-width: 70ch; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.two-col > * { min-width: 0; }
.more { color: var(--primary-deep); font-weight: 500; text-decoration: none; } .more:hover { text-decoration: underline; }

/* ---------- Home ---------- */
.hero { position: relative; padding-block: clamp(48px, 8vw, 96px) clamp(40px, 6vw, 64px); background: var(--hero-bg); border-bottom: 1px solid var(--line); }
.hero-net { display: none; }
.hero-in { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 500; color: var(--primary-deep); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); padding: 5px 11px; border-radius: 999px; }
.hero-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero-title { font-size: clamp(2.4rem, 5.4vw, 3.9rem); font-weight: 650; line-height: 1.04; letter-spacing: -0.035em; margin: 20px 0 16px; }
.hero-title span { color: var(--muted); font-weight: 500; }
.hero-sub { font-size: clamp(1.02rem, 1.5vw, 1.18rem); line-height: 1.55; color: var(--fg-2); max-width: 56ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-size: 0.86rem; color: var(--muted); }
.hero-stats b { font: 600 0.95rem var(--mono); color: var(--fg); margin-right: 6px; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; max-width: 880px; }
.door { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 20px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s; }
.door:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.door-no { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r); background: var(--primary-soft); color: var(--primary-deep); }
.door-no .ico { width: 20px; height: 20px; }
.door-b .door-no { background: var(--surface-2); color: var(--fg-2); }
.door-txt { display: grid; gap: 3px; min-width: 0; }
.door-t { font-size: 1rem; font-weight: 600; color: var(--fg); }
.door-d { font-size: 0.86rem; color: var(--muted); }
.door-go { color: var(--muted); font-size: 1.1rem; transition: transform .2s, color .2s; }
.door:hover .door-go { transform: translateX(3px); color: var(--primary-deep); }
.scroll-cue { display: none; }

.vehicles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vehicle { --c: var(--primary-deep); display: grid; grid-template-columns: auto 1fr; grid-template-areas: "mark n" "name name" "b b"; gap: 4px 12px; align-items: center; padding: 18px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .2s, box-shadow .2s; }
.vehicle:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.vehicle .fmark { grid-area: mark; }
.vehicle-n { grid-area: n; justify-self: end; font: 600 1.7rem/1 var(--mono); color: var(--fg); letter-spacing: -0.02em; }
.vehicle-name { grid-area: name; font-size: 1rem; font-weight: 600; margin-top: 14px; }
.vehicle-b { grid-area: b; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.vehicle-src { display: none; }

.desk-strip { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.desk-item { --c: var(--primary-deep); display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; text-decoration: none; border-bottom: 1px solid var(--line); transition: background .15s; }
.desk-item:last-child { border-bottom: 0; }
.desk-item:hover { background: var(--surface-2); }
.desk-item .mono { font-size: 0.78rem; color: var(--primary-deep); font-weight: 600; }
.desk-item h3 { font-size: 0.95rem; font-weight: 500; }
.desk-item .dk-kind { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

/* ---------- Evidence labels and fund marks ---------- */
.ev { display: inline-flex; align-items: center; gap: 5px; font: 500 0.7rem/1 var(--sans); padding: 4px 7px; border-radius: 999px; white-space: nowrap; vertical-align: 0.1em; background: var(--surface-2); color: var(--fg-2); }
.ev::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ev-verified { color: var(--ok); background: var(--ok-soft); }
.ev-reported { color: var(--primary-deep); background: var(--primary-soft); }
.ev-estimated { color: var(--warn); background: var(--warn-soft); }
.ev-analysis { color: var(--violet); background: var(--violet-soft); }
.ev-nd { color: var(--muted); background: var(--surface-2); }
.fn { font: 500 0.74rem/1 var(--sans); color: var(--muted); margin-left: 6px; text-decoration: none; border-bottom: 1px dotted var(--line-2); white-space: normal; vertical-align: 0.1em; transition: color .15s; }
.fn::before { content: "↗ "; }
.fn:hover { color: var(--primary-deep); border-bottom-color: var(--primary); }
.fmark { --c: var(--primary-deep); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); font: 600 0.7rem/1 var(--mono); flex: none; }
.fmark-sm { width: 22px; height: 22px; border-radius: 6px; font-size: 0.58rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; text-decoration: none; font: 500 0.88rem/1 var(--sans); padding: 10px 16px; border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ink, .btn-gold { background: var(--primary-deep); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-ink:hover:not(:disabled), .btn-gold:hover:not(:disabled) { background: color-mix(in srgb, var(--primary-deep) 88%, #000); }
.btn-line, .btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--line-2); }
.btn-line:hover:not(:disabled), .btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { color: var(--fg-2); }
.btn-big { padding: 12px 20px; font-size: 0.94rem; }
.btn-sm { padding: 7px 11px; font-size: 0.8rem; }

/* ---------- Investigation: cover ---------- */
.cover { padding-block: clamp(36px, 5vw, 56px); }
.cover-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; }
.cover-file { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow-sm); }
.stamp { display: inline-flex; align-items: center; gap: 8px; font: 500 0.76rem/1 var(--sans); color: var(--primary-deep); background: var(--primary-soft); padding: 6px 10px; border-radius: 999px; }
.cover-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); letter-spacing: -0.03em; margin: 16px 0 10px; }
.cover-dek { font-size: 1rem; color: var(--fg-2); max-width: 52ch; }
.cover-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 24px; }
.cover-meta span { font: 500 0.76rem/1 var(--sans); color: var(--fg-2); background: var(--surface-2); padding: 6px 9px; border-radius: var(--r-sm); }
.cover-progress { display: grid; gap: 8px; margin-bottom: 22px; }
.cover-progress .cp-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); }
.cover-progress b { color: var(--fg); font-family: var(--mono); font-weight: 600; }
.cover-chapters { list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; gap: 2px; }
.cover-chapters li { --c: var(--primary-deep) !important; }
.cover-chapters a, .cover-chapters .cc-lock { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: var(--r); text-decoration: none; transition: background .15s; }
.cover-chapters a:hover { background: var(--surface-2); }
.cc-n { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font: 600 0.72rem/1 var(--mono); border: 1.5px solid var(--line-2); color: var(--muted); background: var(--surface); }
.cc-t { font-size: 0.93rem; font-weight: 500; }
.cc-s { font: 500 0.74rem/1 var(--sans); color: var(--muted); white-space: nowrap; }
.cover-chapters .st-done .cc-n { background: var(--ok); border-color: var(--ok); color: var(--on-accent); }
.cover-chapters .st-done .cc-s { color: var(--ok); }
.cover-chapters .st-active { background: var(--primary-soft); }
.cover-chapters .st-active .cc-n { border-color: var(--primary-deep); color: var(--primary-deep); }
.cover-chapters .st-active .cc-s { color: var(--primary-deep); }
.cover-chapters .st-locked { opacity: .55; cursor: not-allowed; }
.cover-chapters .st-locked .cc-n { border-style: dashed; }

/* ---------- Investigation: chapter ---------- */
.game { --ch: var(--primary-deep) !important; display: grid; grid-template-columns: 248px minmax(0, 1fr); max-width: var(--maxw); margin: 0 auto; gap: clamp(24px, 4vw, 48px); padding: 32px var(--gutter-r) 72px var(--gutter); }
.game > * { min-width: 0; }
.rail { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.rail-case { display: grid; gap: 2px; text-decoration: none; padding: 2px 4px 12px; }
.rail-case .mono { font-family: var(--sans); color: var(--muted); font-size: 0.76rem; }
.rail-case b { font-size: 0.98rem; font-weight: 600; }
.rail-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 2px; }
.rail-list a, .rail-list .rl-lock { --c: var(--primary-deep) !important; display: grid; grid-template-columns: 24px minmax(0, 1fr) 14px; gap: 10px; align-items: center; padding: 8px; text-decoration: none; font-size: 0.86rem; color: var(--fg-2); border-radius: var(--r-sm); transition: background .15s, color .15s; }
.rail-list a .mono, .rail-list .rl-lock .mono { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-2); font-size: 0.66rem; color: var(--muted); }
.rail-list a:hover { background: var(--surface-2); color: var(--fg); }
.rail-list a.on { background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.rail-list a.on .mono { border-color: var(--primary-deep); color: var(--primary-deep); }
.rail-list a.done .mono { background: var(--ok); border-color: var(--ok); color: var(--on-accent); }
.rail-list .tick { color: var(--ok); font-size: 0.8rem; }
.rail-list .rl-lock { opacity: .5; cursor: not-allowed; }
.rail-list .rl-lock .mono { border-style: dashed; }
.rail-list .ico { width: 13px; height: 13px; }
.meter { height: 6px; background: var(--surface-3); border-radius: 999px; position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--primary); border-radius: 999px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.meter-thin { height: 4px; }
.rail-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 8px; }
.rail-meta b { font-family: var(--mono); color: var(--fg); font-weight: 600; }

.chapter { min-width: 0; max-width: 800px; }
.ch-head { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.ch-no { display: inline-flex; font: 500 0.78rem/1 var(--sans); color: var(--primary-deep); background: var(--primary-soft); padding: 5px 9px; border-radius: 999px; }
.ch-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin: 14px 0 10px; letter-spacing: -0.025em; }
.ch-intro { font-size: 1.02rem; color: var(--fg-2); max-width: 62ch; }
.ch-body { display: grid; gap: 24px; }
.ch-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.ch-nav .next { opacity: .55; } .ch-nav .next.ready { opacity: 1; }

.case-file { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 26px); position: relative; }
.case-file::before { content: "Case file"; position: absolute; right: 16px; top: 16px; font: 500 0.7rem/1 var(--sans); color: var(--muted); background: var(--surface-2); padding: 5px 8px; border-radius: var(--r-sm); }
.redact-name { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.redact { font: 600 1.5rem/1.1 var(--sans); background: var(--fg); color: var(--fg); padding: 2px 10px; border-radius: var(--r-sm); transition: background .6s, color .6s; }
.redact.lifted { background: transparent; color: var(--fg); padding-left: 0; }
.clues { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.clue { padding: 12px 14px; background: var(--surface-2); border-radius: var(--r); display: grid; gap: 6px; align-content: start; min-width: 0; }
.clue-k { font: 500 0.72rem/1 var(--sans); color: var(--muted); }
.clue p { font-size: 0.93rem; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.dossier-link a { font-weight: 500; color: var(--primary-deep); }

.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 24px); }
.q-label { font: 500 0.76rem/1 var(--sans); color: var(--muted); margin-bottom: 10px; }
.q-text { font-size: clamp(1.08rem, 1.8vw, 1.25rem); font-weight: 600; margin-bottom: 16px; max-width: 52ch; }
.q-opts { display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; text-align: left; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 0.93rem; transition: border-color .15s, background .15s; }
.opt:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.opt-l { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 0.72rem; color: var(--muted); background: var(--surface); }
.opt.on { border-color: var(--primary-deep); background: var(--primary-soft); } .opt.on .opt-l { background: var(--primary-deep); color: var(--on-accent); border-color: var(--primary-deep); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); } .opt.right .opt-l { background: var(--ok); color: var(--on-accent); border-color: var(--ok); }
.opt.wrong { border-color: var(--no); background: var(--no-soft); } .opt.wrong .opt-l { background: var(--no); color: var(--on-accent); border-color: var(--no); }
.opt.partial { border-color: var(--warn); background: var(--warn-soft); }
.opt:disabled { cursor: default; }
.q-out { margin-top: 14px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--r); display: grid; gap: 8px; font-size: 0.92rem; animation: rise .3s ease; }
.verdict { font-weight: 600; }
.verdict.ok { color: var(--ok); } .verdict.no { color: var(--no); }
.verdict .mono { color: var(--primary-deep); margin-left: 6px; }
.q-actions { margin-top: 16px; display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.order { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.order-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px 8px 12px; font-size: 0.92rem; }
.order-n { color: var(--muted); font-size: 0.78rem; }
.order-item.right { border-color: var(--ok); background: var(--ok-soft); } .order-item.wrong { border-color: var(--no); background: var(--no-soft); }
.order-date { color: var(--muted); font-size: 0.8rem; }
.order-btns { display: flex; gap: 4px; }
.ob { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; color: var(--fg-2); transition: border-color .15s, background .15s; }
.ob:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); } .ob:disabled { opacity: .3; cursor: default; }

.grid-q { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.gq-row:last-child { border-bottom: 0; }
.gq-text { font-size: 0.92rem; }
.gq-out { grid-column: 1 / -1; color: var(--fg-2); font-size: 0.86rem; }
.gq-out:empty { display: none; }
.gq-row.right .gq-text::before { content: "✓ "; color: var(--ok); } .gq-row.wrong .gq-text::before { content: "✕ "; color: var(--no); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-b { padding: 6px 10px; background: transparent; border: 0; border-radius: 5px; cursor: pointer; font-size: 0.8rem; font-weight: 500; color: var(--fg-2); transition: background .15s; }
.seg-b:hover:not(:disabled) { background: var(--surface); }
.seg-b.on { background: var(--surface); color: var(--primary-deep); box-shadow: var(--shadow-sm); }
.seg-b.is-answer { box-shadow: inset 0 -2px 0 var(--ok); }
.seg-b:disabled { cursor: default; }

.founder-files { display: grid; gap: 8px; }
.ffile { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); overflow: hidden; }
.ffile-tab { width: 100%; display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; background: none; border: 0; cursor: pointer; text-align: left; transition: background .15s; }
.ffile-tab:hover { background: var(--surface-2); }
.ffile-tab .mono { color: var(--muted); font-size: 0.76rem; }
.ffile-name { font-size: 1rem; font-weight: 600; }
.ffile-cta { color: var(--primary-deep); font-size: 0.78rem; font-weight: 500; }
.ffile-body { display: none; padding: 0 16px 16px 98px; gap: 8px; font-size: 0.92rem; }
.ffile.open .ffile-body { display: grid; animation: rise .25s ease; }

.rnote { background: var(--surface-2); border: 1px solid var(--line); padding: 18px 20px; border-radius: var(--r); }
.rnote-h { font: 600 0.76rem/1 var(--sans); color: var(--primary-deep); margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.rnote dl { margin: 0; display: grid; gap: 4px 20px; grid-template-columns: 170px 1fr; font-size: 0.92rem; }
.rnote dt { font-weight: 500; color: var(--muted); }
.rnote dd { margin: 0 0 8px; }
.rnote ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 106px; top: 14px; bottom: 14px; width: 1px; background: var(--line-2); }
.tl-head { width: 100%; display: grid; grid-template-columns: 92px 28px 1fr; align-items: center; gap: 0; padding: 9px 0; background: none; border: 0; text-align: left; cursor: pointer; }
.tl-date { font-size: 0.78rem; color: var(--muted); }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); justify-self: center; position: relative; transition: background .2s, transform .2s; }
.tl-item.open .tl-dot, .tl-head:hover .tl-dot { background: var(--primary); transform: scale(1.2); }
.tl-title { font-size: 0.94rem; font-weight: 500; }
.tl-amt { font-size: 0.78rem; color: var(--primary-deep); margin-left: 6px; font-weight: 500; } .tl-amt.muted { color: var(--muted); font-weight: 400; }
.tl-body { display: none; padding: 0 0 12px 120px; gap: 6px; font-size: 0.88rem; color: var(--fg-2); }
.tl-item.open .tl-body { display: grid; animation: rise .25s ease; }
.tl-wrap { border-top: 1px solid var(--line); padding-top: 20px; }

.bm { display: grid; grid-template-columns: 1fr 24px 1.2fr 24px 1.2fr; gap: 12px; align-items: start; background: var(--surface-2); padding: 18px; border-radius: var(--r-lg); }
.bm-col { display: grid; gap: 8px; min-width: 0; }
.bm-h { font: 500 0.74rem/1 var(--sans); color: var(--muted); }
.bm-node { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 4px; font-size: 0.88rem; }
.bm-node .ev { justify-self: start; }
.bm-dash { border-style: dashed; background: transparent; }
.bm-cust { border-color: color-mix(in srgb, var(--primary) 60%, var(--line)); }
.bm-cost { border-color: color-mix(in srgb, var(--no) 45%, var(--line)); }
.bm-arrow { align-self: center; color: var(--muted); font-size: 1.2rem; text-align: center; }
.bm-note { grid-column: 1 / -1; color: var(--muted); }
.locked-note { color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px; text-align: center; font-size: 0.9rem; }

.fin { display: grid; gap: 14px; }
.fin-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--r-sm); flex-wrap: wrap; justify-self: start; }
.fin-tab { background: none; border: 0; padding: 7px 12px; font: 500 0.8rem/1 var(--mono); color: var(--muted); cursor: pointer; border-radius: 5px; transition: background .15s, color .15s; }
.fin-tab:hover { color: var(--fg); }
.fin-tab.on { color: var(--primary-deep); background: var(--surface); box-shadow: var(--shadow-sm); }
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.finchart { width: 100%; height: auto; display: block; }
.finchart .grid { stroke: var(--line); }
.finchart .zero { stroke: var(--line-2); stroke-width: 1; }
.finchart .axis { font: 10px var(--mono); fill: var(--muted); }
.finchart .xlab { font: 600 11px var(--mono); fill: var(--fg-2); }
.finchart .val { font: 500 10px var(--mono); fill: var(--fg-2); }
.finchart .bar-rev { fill: color-mix(in srgb, var(--primary) 55%, var(--surface)); transition: fill .2s; }
.finchart .bar-loss { fill: color-mix(in srgb, var(--no) 40%, var(--surface)); transition: fill .2s; }
.finchart .hit { fill: transparent; }
.finchart .bar-g { cursor: pointer; outline: none; }
.finchart .bar-g.on .bar-rev, .finchart .bar-g:hover .bar-rev, .finchart .bar-g:focus .bar-rev { fill: var(--primary-deep); }
.finchart .bar-g.on .bar-loss, .finchart .bar-g:hover .bar-loss, .finchart .bar-g:focus .bar-loss { fill: var(--no); }
.finchart .bar-g.on .xlab { fill: var(--fg); }
.chart-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.8rem; color: var(--fg-2); align-items: center; }
.chart-key .k::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.k-rev::before { background: var(--primary-deep); } .k-loss::before { background: var(--no); }
.fin-side { background: var(--surface-2); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 0; align-content: start; }
.fin-year { font-size: 1rem; font-weight: 600; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fin-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fin-row:last-child { border-bottom: 0; }
.fin-k { font-size: 0.84rem; color: var(--fg-2); }
.fin-v { font: 600 0.9rem var(--mono); }
.fin-note { grid-column: 1 / -1; color: var(--muted); }
.delta { font: 500 0.74rem var(--mono); } .delta.up { color: var(--ok); } .delta.down { color: var(--no); }
.fin-q { background: var(--primary-soft); color: var(--fg); padding: 12px 16px; border-radius: var(--r); font-size: 0.92rem; }
.fin-q .mono { color: var(--primary-deep); margin-right: 6px; }

/* ---------- Tables ---------- */
.tablebox { overflow-x: auto; min-width: 0; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
th { text-align: left; font: 500 0.74rem/1.3 var(--sans); color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.peer { min-width: 680px; } .peer tr.self td { background: var(--primary-soft); }
.fin-table { min-width: 620px; } .fin-table td:not(:first-child), .fin-table th:not(:first-child) { text-align: right; }
.idx { min-width: 960px; }
.idx a { text-decoration: none; } .idx a:hover b { color: var(--primary-deep); }
.idx td .fmark { margin-right: 2px; }

.positions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.pos { display: grid; gap: 6px; text-align: left; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; align-content: start; transition: border-color .15s, background .15s; }
.pos b { font-size: 0.98rem; font-weight: 600; }
.pos .small { color: var(--muted); }
.pos:hover:not(:disabled) { border-color: var(--primary); }
.pos.on { border-color: var(--primary-deep); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary-deep); }
.thesis textarea { width: 100%; margin-top: 6px; font: 400 0.95rem/1.55 var(--sans); padding: 12px 14px; border: 1px solid var(--line-2); background: var(--surface); resize: vertical; border-radius: var(--r); color: var(--fg); }
.thesis textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.count { color: var(--muted); font-size: 0.82rem; margin-right: auto; font-variant-numeric: tabular-nums; }
.brief { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.brief > .mono { color: var(--primary-deep); font-family: var(--sans); font-weight: 600; font-size: 0.8rem; }
.brief-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }
.brief-grid > div { display: grid; gap: 6px; align-content: start; background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.brief-grid .big { font: 600 1.25rem var(--mono); color: var(--fg); }
.brief-grid .big.neg { color: var(--no); }
.brief-grid .small { color: var(--fg-2); }
.brief .fn { margin-left: 0; }
.brief .ev { justify-self: start; }
.editorial { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; display: grid; gap: 14px; }
.ed-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ed-cols h4 { font-size: 0.95rem; margin-bottom: 8px; }
.ed-cols ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.9rem; color: var(--fg-2); }
.ed-verdict { font-size: 1rem; border-left: 3px solid var(--primary); padding-left: 16px; max-width: 62ch; color: var(--fg-2); }

.scorecard { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); }
.scorecard .mono.small { color: var(--muted); font-family: var(--sans); }
.sc-points { font: 600 clamp(2.6rem, 6vw, 3.6rem)/1 var(--mono); color: var(--primary-deep); margin: 10px 0 6px; white-space: nowrap; letter-spacing: -0.03em; }
.sc-points span { font-size: 0.36em; color: var(--muted); margin-left: 8px; font-weight: 400; letter-spacing: 0; }
.sc-rank { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; }
.sc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.sc-stats > div { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.sc-stats dt { font-size: 0.78rem; color: var(--muted); }
.sc-stats dd { margin: 4px 0 0; font: 600 1.1rem var(--mono); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.badge { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted); background: transparent; }
.badge-glyph { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1.5px dashed var(--line-2); font: 600 1.05rem/1 var(--sans); }
.badge-name { font-size: 0.93rem; font-weight: 600; color: var(--fg-2); }
.badge-desc { font-size: 0.8rem; }
.badge.on { border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); box-shadow: var(--shadow-sm); }
.badge.on .badge-glyph { border: 0; background: var(--primary); color: var(--on-accent); }
.badge.on .badge-name { color: var(--fg); }
.final-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Directory ---------- */
.dir-head { padding-block: clamp(32px, 5vw, 52px) 28px; }
.dir-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); letter-spacing: -0.03em; margin: 10px 0 10px; }
.dir-head .lede { color: var(--fg-2); }
.fund-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.fchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); cursor: pointer; font-size: 0.86rem; font-weight: 500; transition: background .15s, border-color .15s; }
.fchip .mono { color: var(--muted); font-size: 0.76rem; }
.fchip:hover { border-color: var(--line-2); background: var(--surface-2); }
.fchip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-deep); }
.fchip .fmark { width: 24px; height: 24px; border-radius: 999px; font-size: 0.58rem; }
.filters { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--nav-h)); z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.filters-in { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 12px; align-items: center; }
.filters input, .filters select { font: 400 0.85rem/1.2 var(--sans); padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: var(--r-sm); min-width: 0; transition: border-color .15s; }
.filters input:hover, .filters select:hover { border-color: var(--line-2); }
.filters input:focus, .filters select:focus { outline: 2px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 0; border-color: var(--primary); }
.filters input { flex: 1 1 240px; padding-left: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px 50%; }
.filters select { flex: 0 1 auto; max-width: 220px; }
.filters-end { display: flex; gap: 10px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.viewtog { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.viewtog button { border: 0; background: transparent; padding: 6px 11px; font-size: 0.8rem; font-weight: 500; cursor: pointer; border-radius: 5px; color: var(--fg-2); }
.viewtog button.on { background: var(--surface); color: var(--primary-deep); box-shadow: var(--shadow-sm); }
.dir-body { padding-top: 24px; padding-bottom: 72px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ccard { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 6px; padding: 16px; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); position: relative; transition: border-color .15s, box-shadow .2s, transform .2s; min-height: 184px; }
.ccard:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }
.cc-file { font: 500 0.7rem/1 var(--mono); color: var(--muted); }
.cc-name { font-size: 1.02rem; font-weight: 600; }
.cc-desc { color: var(--fg-2); font-size: 0.86rem; line-height: 1.5; }
.cc-meta { color: var(--muted); font-size: 0.76rem; display: flex; gap: 8px; align-items: baseline; }
.cc-meta::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--s, var(--primary)); transform: translateY(-1px); }
.cc-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.cc-status { margin-left: auto; font: 500 0.7rem/1 var(--sans); color: var(--muted); padding: 4px 7px; border-radius: 999px; background: var(--surface-2); }
.cc-status.st-reported { color: var(--primary-deep); background: var(--primary-soft); }
.cc-status.st-briefed { color: var(--ok); background: var(--ok-soft); }
.cc-status.st-researched { color: var(--primary-ink); background: var(--primary-deep); }
.ccard-multi .cc-file { color: var(--primary-deep); }
.ccard-feature { grid-column: span 2; min-height: 220px; padding: 22px; background: var(--feature-bg); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.ccard-feature .cc-file { color: var(--primary-deep); }
.ccard-feature .cc-name { font-size: 1.5rem; letter-spacing: -0.02em; }
.ccard-feature .cc-desc { font-size: 0.95rem; }
.cc-stats { display: flex; gap: 24px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.cc-stats span { display: grid; gap: 2px; } .cc-stats b { font: 600 1rem var(--mono); color: var(--fg); } .cc-stats i { font-style: normal; font-size: 0.74rem; color: var(--muted); }
.cc-go { margin-left: auto; color: var(--primary-deep); font-weight: 500; font-size: 0.86rem; }
.empty { text-align: center; padding: 48px 20px; display: grid; gap: 12px; justify-items: center; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty-t { font-size: 1.1rem; font-weight: 600; }
.empty p { max-width: 52ch; color: var(--fg-2); }

/* ---------- Company file ---------- */
.dossier, .report { --acc: var(--primary-deep) !important; }
.dz-head { padding-block: clamp(28px, 4vw, 44px) 24px; }
.dz-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 8px; }
.dz-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -0.03em; line-height: 1.1; }
.dz-marks { display: flex; gap: 6px; }
.dz-dek { font-size: 1.02rem; color: var(--fg-2); max-width: 64ch; }
.dz-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.dz-meta > span { font-size: 0.8rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 10px; border-radius: var(--r-sm); }
.dz-meta b { color: var(--fg); font-weight: 600; margin-left: 4px; }
.dz-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); padding-block: 32px 80px; }
.dz-toc { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; }
.dz-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.dz-toc a { display: flex; gap: 8px; padding: 6px 10px; text-decoration: none; font-size: 0.84rem; color: var(--muted); border-radius: var(--r-sm); transition: color .15s, background .15s; }
.dz-toc a .mono { font-size: 0.7rem; padding-top: 2px; }
.dz-toc a:hover { color: var(--fg); background: var(--surface-2); } .dz-toc a.on { color: var(--primary-deep); background: var(--primary-soft); font-weight: 500; }
.dz-body { min-width: 0; max-width: 820px; display: grid; gap: 20px; }
.dz-sec { display: grid; gap: 14px; scroll-margin-top: calc(var(--nav-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 26px); min-width: 0; }
.dz-sec > h2 { font-size: 1.12rem; display: flex; gap: 10px; align-items: center; }
.dz-sec > h2 .mono { font-size: 0.72rem; color: var(--primary-deep); background: var(--primary-soft); padding: 3px 6px; border-radius: 5px; font-weight: 600; }
.dz-lede { font-size: 1rem; line-height: 1.65; color: var(--fg-2); }
.facts { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts > div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.facts > div:last-child { border-bottom: 0; }
.facts > div:nth-child(odd) { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.facts dt { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.h3 { font-size: 0.98rem; margin-top: 6px; }
.two-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 0.9rem; }
.two-lists ul, .dz-sec > ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.founders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.founder { background: var(--surface-2); border-radius: var(--r); padding: 16px; display: grid; gap: 6px; align-content: start; font-size: 0.9rem; }
.f-name { font-size: 1rem; font-weight: 600; }
.founder .ev { justify-self: start; }
.founders-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.founders-list li { padding: 12px 14px; background: var(--surface-2); border-radius: var(--r); display: grid; gap: 2px; font-size: 0.9rem; }
.founders-list li .muted { font-size: 0.82rem; }
.pull { margin: 0; font-size: 1rem; border-left: 3px solid var(--primary); padding: 2px 0 2px 16px; color: var(--fg-2); }
.cap-sum { display: flex; gap: 8px; flex-wrap: wrap; }
.cap-sum > * { font-size: 0.8rem; color: var(--fg-2); background: var(--surface-2); padding: 5px 9px; border-radius: var(--r-sm); }
.memb { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.memb li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.memb li:last-child { border-bottom: 0; }
.memb .fn { margin-left: 0; }
.nd-box { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 6px; justify-items: start; background: var(--surface-2); }
.nd-box p { color: var(--fg-2); font-size: 0.9rem; }
.peers-inline { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.peers-inline a { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.82rem; background: var(--surface); transition: border-color .15s, color .15s; }
.peers-inline a:hover { border-color: var(--primary); color: var(--primary-deep); }
.prompts { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 0.95rem; color: var(--fg-2); }
.view { display: grid; gap: 14px; font-size: 0.95rem; line-height: 1.65; }
.srcs { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.srcs li { counter-increment: s; display: grid; grid-template-columns: 30px 90px 1fr; gap: 4px 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); align-items: baseline; font-size: 0.86rem; }
.srcs li:last-child { border-bottom: 0; }
.srcs li::before { content: counter(s, decimal-leading-zero); font: 500 0.72rem var(--mono); color: var(--muted); }
.srcs li > .small { grid-column: 3; }
.srcs li:not(:has(.src-kind)) { grid-template-columns: 30px 1fr; } .srcs li:not(:has(.src-kind)) > .small { grid-column: 2; }
.src-kind { color: var(--muted); font-size: 0.74rem; }
.fn-plain { color: var(--primary-deep); text-decoration: none; } .fn-plain:hover { text-decoration: underline; }
.rel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rel > div { min-width: 0; }
.rel h3 { font: 500 0.78rem/1 var(--sans); color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.rel ul { list-style: none; margin: 0; padding: 0; }
.rel li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rel li:last-child { border-bottom: 0; }
.rel li a { display: grid; gap: 2px; text-decoration: none; min-width: 0; font-size: 0.86rem; }
.rel li a:hover b { color: var(--primary-deep); }
.rel li b { font-weight: 600; font-size: 0.9rem; }

/* ---------- Research desk ---------- */
.report-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.report-list li { --c: var(--primary-deep); }
.report-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "no kind go" "no title go" "no q go"; gap: 3px 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s; }
.report-list li:last-child a { border-bottom: 0; }
.report-list a:hover { background: var(--surface-2); }
.rl-no { grid-area: no; font: 600 0.8rem var(--mono); color: var(--primary-deep); padding-top: 2px; }
.rl-kind { grid-area: kind; font-family: var(--sans); color: var(--muted); font-size: 0.78rem; }
.rl-title { grid-area: title; font-size: 1.02rem; font-weight: 600; }
.rl-q { grid-area: q; color: var(--fg-2); max-width: 72ch; font-size: 0.9rem; }
.rl-go { grid-area: go; align-self: center; font-weight: 500; font-size: 0.86rem; white-space: nowrap; color: var(--primary-deep); }
.dtl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.dtl li { --c: var(--primary) !important; display: grid; gap: 4px; padding: 12px 14px 12px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); position: relative; font-size: 0.88rem; align-content: start; }
.dtl li::before { content: ""; position: absolute; left: 13px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.dtl b { font-weight: 600; font-size: 0.92rem; }
.dtl a { text-decoration: none; } .dtl a:hover b { color: var(--primary-deep); }
.dtl .small { color: var(--fg-2); }
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.pubs a { display: grid; gap: 4px; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; }
.pubs b { font-size: 1rem; font-weight: 600; }
.rp { padding-block: 32px 88px; display: grid; gap: 20px; max-width: 920px; }
.rp > * { min-width: 0; }
.rp-q { background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); padding: 18px 22px; border-radius: var(--r-lg); }
.rp-q .mono { color: var(--primary-deep); font-family: var(--sans); font-size: 0.78rem; font-weight: 600; }
.rp-question { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 500; line-height: 1.45; margin-top: 6px; }
.rp > section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 26px); }
.rp-h { font-size: 1.08rem; display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.rp-h .mono { color: var(--primary-deep); font-size: 0.72rem; font-weight: 600; background: var(--primary-soft); padding: 3px 6px; border-radius: 5px; }
.rp > section .tablebox { border-radius: var(--r); }
.rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rp-cols > * { min-width: 0; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.findings li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r); align-items: baseline; }
.findings p { font-size: 0.94rem; line-height: 1.55; }
.next-report { display: grid; gap: 4px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; transition: border-color .15s, box-shadow .2s; }
.next-report:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.next-report .mono { color: var(--primary-deep); font-size: 0.78rem; }
.next-report b { font-size: 1.05rem; font-weight: 600; }
.stack { display: grid; gap: 14px; }
.stack-row { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: center; }
.stack-lab { display: flex; gap: 8px; align-items: center; }
.stack-lab b { font-size: 0.92rem; font-weight: 600; } .stack-lab .mono { color: var(--muted); font-size: 0.78rem; }
.stack-bar { display: flex; height: 28px; gap: 2px; border-radius: var(--r-sm); overflow: hidden; }
.stack-bar span { display: grid; place-items: center; min-width: 3px; transition: filter .15s; }
.stack-bar span:hover { filter: brightness(1.08); }
.stack-bar i { font: 600 0.7rem var(--mono); color: #FFFFFF; font-style: normal; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 0.8rem; color: var(--fg-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.data-table { margin-top: 16px; } .data-table summary { cursor: pointer; color: var(--primary-deep); font-family: var(--sans); font-weight: 500; }
.data-table .idx { min-width: 560px; }
.data-table .tablebox { margin-top: 10px; }
.overlap { width: 100%; min-width: 620px; height: auto; display: block; }
.ov-line { fill: none; stroke-width: 1.5; opacity: .55; }
.ov-fund { font: 600 12px var(--sans); fill: var(--fg); }
.ov-code { font: 600 10px var(--mono); fill: var(--on-accent); }
.ov-node { fill: var(--primary-deep); }
.ov-co { font: 500 11px var(--sans); fill: var(--fg-2); }
.overlap a:hover .ov-co { fill: var(--primary-deep); }
.ov-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.ov-list li { display: flex; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 0.88rem; }
.ov-list a { color: var(--fg); text-decoration: none; } .ov-list a:hover { color: var(--primary-deep); }
.cohorts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cohort { min-width: 0; }
.cohort > .mono { color: var(--muted); font-family: var(--sans); font-weight: 600; font-size: 0.78rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cohort ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; margin-top: 8px; }
.cohort li { display: grid; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r); border-left: 3px solid var(--s); }
.cohort li a { text-decoration: none; } .cohort li b { font-size: 0.9rem; font-weight: 600; }
.cohort li .small { color: var(--fg-2); } .cohort li .tiny { color: var(--muted); }

/* ---------- Quick cases ---------- */
.qc-head { padding-block: 4px; }
.qc-score { margin-top: 14px; font-family: var(--sans); color: var(--muted); }
.qc-list { display: grid; gap: 16px; max-width: 820px; }
.qc-card { margin: 0; }
.qc-clues { margin: 4px 0 18px; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: c; }
.qc-clues li { counter-increment: c; display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 9px 12px; background: var(--surface-2); border-radius: var(--r); font-size: 0.92rem; line-height: 1.5; }
.qc-clues li::before { content: counter(c); font: 600 0.72rem/1.9 var(--mono); color: var(--primary-deep); }
.qc-promo { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.qc-promo h2 { margin: 4px 0; font-size: 1.15rem; }
.qc-promo .mono { font-family: var(--sans); color: var(--primary-deep); font-weight: 600; }

/* ---------- Footer, toasts, misc ---------- */
.colophon { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 0.86rem; }
.colophon-in { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); display: grid; grid-template-columns: 1fr 2fr; gap: 12px 48px; }
.colophon-title { font-weight: 600; color: var(--fg); font-size: 0.95rem; margin-bottom: 4px; }
.disclaimer { max-width: 72ch; }
.colophon .mono { grid-column: 2; font-family: var(--sans); }
.toast-stack { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; z-index: 80; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 0.88rem; border-radius: var(--r); animation: rise .3s ease; transition: opacity .5s, transform .5s; display: flex; gap: 12px; align-items: center; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-badge { border-color: var(--primary); }
.toast-glyph { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--primary); color: var(--on-accent); font-weight: 600; }
.nf { padding-block: 40px; display: grid; gap: 16px; justify-items: start; }
.nf h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.report .dz-head h1 { margin: 10px 0 10px; }

/* Reveal: content is visible by default; only elements below the fold get the pre-state. */
[data-reveal].pre { transform: translateY(8px); }
[data-reveal].in { transform: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 30ms); }
[hidden] { display: none !important; }
.ev, .fn { justify-self: start; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .vehicles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game { grid-template-columns: 1fr; }
  .rail { position: static; }
  .rail-list { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .rail-list li { flex: none; }
  .rail-list a, .rail-list .rl-lock { grid-template-columns: auto auto auto; white-space: nowrap; border: 1px solid var(--line); }
  .dz-grid { grid-template-columns: 1fr; }
  .dz-toc { position: static; }
  .dz-toc ol { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .dz-toc a { white-space: nowrap; border: 1px solid var(--line); background: var(--surface); }
  .fin-grid { grid-template-columns: 1fr; }
  .brief-grid { grid-template-columns: 1fr 1fr; }
  .cohorts { grid-template-columns: 1fr; }
  .cover-in { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --nav-h: 104px; }
  .masthead-in { flex-wrap: wrap; height: auto; gap: 10px 12px; padding-block: 10px 8px; }
  .wordmark { flex: 1 1 auto; }
  .mainnav { order: 3; width: 100%; margin-right: 0; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: var(--r); }
  .mainnav a { flex: 1 1 0; justify-content: center; padding: 7px 6px; font-size: 0.8rem; gap: 5px; }
  .mainnav a.on { background: var(--surface); box-shadow: var(--shadow-sm); }
  .filters-in { gap: 6px; }
  .filters select { flex: 1 1 45%; max-width: none; }
  .filters-end { margin-left: 0; width: 100%; }
  .doors, .two-col, .ed-cols, .positions, .scorecard, .founders, .two-lists, .rel, .rp-cols, .colophon-in, .ov-list { grid-template-columns: 1fr; }
  .desk-item { grid-template-columns: 52px minmax(0, 1fr); }
  .desk-item .dk-kind { display: none; }
  .ccard-feature { grid-column: auto; }
  .bm { grid-template-columns: 1fr; } .bm-arrow { transform: rotate(90deg); }
  .rnote dl { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .tl::before { left: 5px; }
  .tl-head { grid-template-columns: 22px 1fr; grid-template-areas: "dot date" "dot title"; row-gap: 2px; }
  .tl-dot { grid-area: dot; justify-self: start; } .tl-date { grid-area: date; } .tl-title { grid-area: title; }
  .tl-body { padding-left: 22px; }
  .ffile-body { padding-left: 16px; }
  .ffile-tab { grid-template-columns: 1fr auto; } .ffile-tab > .mono:first-child { grid-column: 1 / -1; }
  .gq-row { grid-template-columns: 1fr; }
  .stack-row { grid-template-columns: 1fr; gap: 6px; }
  .findings li { grid-template-columns: 1fr; gap: 6px; }
  .report-list a { grid-template-columns: 1fr; grid-template-areas: "no" "kind" "title" "q" "go"; }
  .rl-go { justify-self: start; }
  .badges { grid-template-columns: 1fr; }
  .colophon .mono { grid-column: 1; }
  .srcs li { grid-template-columns: 26px 1fr; } .srcs li > .src-kind, .srcs li > .small { grid-column: 2; }
}
@media (max-width: 480px) {
  .vehicles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .vehicle { padding: 14px; }
  .vehicle-b { display: none; }
  .mainnav a .ico { display: none; }
  .score-label { display: none; }
}
@media (min-width: 761px) and (max-width: 1020px) { .badges { grid-template-columns: 1fr 1fr; } .positions { grid-template-columns: 1fr; } }
.cc-s { display: inline-flex; gap: 5px; align-items: center; } .cc-s .ico { width: 12px; height: 12px; }
.cc-meta, .cc-meta.mono, .ccard .cc-stats i { font-family: var(--sans); }
.band-parchment + .band-ivory { border-top: 0; padding-top: 8px; }

/* ---------- Theme toggle ---------- */
.theme-tog { position: relative; width: 30px; height: 30px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.theme-tog:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--fg); }
.theme-tog .ico { width: 15px; height: 15px; }
.theme-tog .i-moon { display: none; }
:root[data-tsf-theme="dark"] .theme-tog .i-sun { display: none; }
:root[data-tsf-theme="dark"] .theme-tog .i-moon { display: block; }
.theme-tog::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; white-space: nowrap; font: 500 0.74rem/1 var(--sans); color: var(--fg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 7px 9px; border-radius: var(--r-sm); opacity: 0; transform: translateY(-3px); pointer-events: none; transition: opacity .15s, transform .15s; z-index: 70; }
.theme-tog:hover::after, .theme-tog:focus-visible::after { opacity: 1; transform: none; }
.mast-end { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .mast-end { margin-left: auto; } }

/* ---------- QA fixes ---------- */
.ch-body > *, .dz-toc, .dz-body > *, .mkt { min-width: 0; }
.locked-panel { display: grid; gap: 10px; justify-items: start; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 28px; }
.locked-panel h2 { font-size: 1.15rem; }
.locked-panel p { color: var(--fg-2); max-width: 52ch; }
.lp-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.lp-ico .ico { width: 18px; height: 18px; }
@media (max-width: 1020px) {
  .masthead-in { gap: 14px; }
  .mainnav a { padding: 7px 8px; }
  .mainnav a .ico { display: none; }
  .score-label { display: none; }
}
@media (pointer: coarse) {
  .theme-tog { width: 38px; height: 38px; }
  .fin-tab { padding: 11px 14px; }
  .btn-sm, .viewtog button, .seg-b { min-height: 36px; }
  .ob { width: 38px; height: 38px; }
}

/* ---------- Sources list ---------- */
.srcs li, .srcs li:not(:has(.src-kind)) { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 16px; transition: background .15s; }
.srcs li:hover { background: var(--surface-2); }
.srcs li::before { align-self: start; padding-top: 2px; }
.src-main { display: grid; gap: 2px; min-width: 0; }
.src-title { color: var(--fg); font-weight: 500; font-size: 0.9rem; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.src-title:hover { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 3px; }
.src-title::after { content: " ↗"; color: var(--muted); font-size: 0.8em; }
.src-pub { font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.src-meta { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.src-date { font: 500 0.76rem/1 var(--mono); color: var(--fg-2); background: var(--surface-2); border: 1px solid var(--line); padding: 5px 8px; border-radius: var(--r-sm); }
.srcs li:hover .src-date { background: var(--surface); }
.srcs .src-kind { font: 500 0.7rem/1 var(--sans); text-transform: capitalize; color: var(--primary-deep); background: var(--primary-soft); padding: 4px 8px; border-radius: 999px; }
@media (max-width: 760px) {
  .srcs li, .srcs li:not(:has(.src-kind)) { grid-template-columns: 24px minmax(0, 1fr); padding: 11px 14px; }
  .src-meta { grid-column: 2; justify-content: flex-start; }
}
.dz-sec > ul.peers-inline { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 0; }
.dz-sec > ul.founders-list { display: grid; padding-left: 0; }
.dz-sec > ul.memb { padding-left: 0; }

/* ---------- Newsletter ---------- */
.nl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px 32px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 28px; }
.nl-h { font-weight: 600; font-size: 1.05rem; color: var(--fg); }
.nl-d { color: var(--fg-2); font-size: 0.9rem; margin-top: 4px; }
.nl-d a { color: var(--primary-deep); }
.nl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-row input[type="email"] { flex: 1 1 220px; min-width: 0; font: 400 0.92rem/1.2 var(--sans); padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); }
.nl-row input[type="email"]:focus { outline: 2px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 0; border-color: var(--primary); }
.nl-row .btn { padding: 11px 18px; }
.nl-lab, .nl-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nl-msg { grid-column: 1 / -1; font-size: 0.86rem; min-height: 0; }
.nl-msg:empty { display: none; }
.nl-msg.ok { color: var(--ok); font-weight: 500; } .nl-msg.err { color: var(--no); }
.nl-compact { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 28px; margin-bottom: 28px; }
.nl-foot-wrap { padding-bottom: 0; }
.doors { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }
@media (max-width: 1020px) { .doors { grid-template-columns: 1fr; max-width: 560px; } }
@media (max-width: 760px) { .nl { grid-template-columns: 1fr; padding: 20px; } }

.finchart .bar-profit { fill: color-mix(in srgb, var(--ok) 55%, var(--surface)); }
.finchart .bar-g.on .bar-profit, .finchart .bar-g:hover .bar-profit { fill: var(--ok); }
.k-profit::before { background: var(--ok); }

/* ---------- Case picker (compact tiles) ---------- */
.pick-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.ph-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-block: 28px 22px; }
.ph-in h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.ph-in p { color: var(--fg-2); margin-top: 4px; }
.ph-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-stats > * { font-size: 0.84rem; color: var(--fg-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; }
.ph-stats b { font-family: var(--mono); color: var(--fg); }
.ph-stats a:hover { border-color: var(--primary); color: var(--primary-deep); }
.pick-body { padding-block: 22px 56px; }
.pick-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pk { --hue: var(--primary-deep); position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; min-height: 196px; padding: 16px 16px 14px; overflow: hidden; text-decoration: none; color: var(--fg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--hue) 9%, var(--surface)) 0%, var(--surface) 55%); border: 1px solid color-mix(in srgb, var(--hue) 16%, var(--line)); border-radius: var(--r-lg); transition: transform .2s, box-shadow .2s, border-color .2s; }
.pk:hover, .pk:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--hue) 55%, var(--line)); }
.pk-num { position: absolute; right: 10px; top: 2px; font: 700 3.4rem/1 var(--mono); letter-spacing: -0.06em; color: color-mix(in srgb, var(--hue) 13%, transparent); pointer-events: none; }
.pk-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--hue); color: #fff; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--hue) 60%, transparent); }
.pk-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-t { font-size: 1rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; margin-top: 6px; position: relative; }
.pk-hook { font-size: 0.83rem; line-height: 1.4; color: var(--fg-2); position: relative; transition: opacity .2s; }
.pk-more { position: absolute; inset: 0 0 34px; padding: 16px; font-size: 0.82rem; line-height: 1.5; color: var(--fg); background: color-mix(in srgb, var(--surface) 94%, var(--hue)); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; display: flex; align-items: center; }
@media (hover: hover) { .pk:hover .pk-more, .pk:focus-visible .pk-more { opacity: 1; transform: none; } }
.pk-f { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.pk-tag { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pk-dots { display: inline-flex; gap: 3px; margin-left: auto; }
.pk-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.pk-dots.d-starter i:nth-child(-n+1), .pk-dots.d-intermediate i:nth-child(-n+2), .pk-dots.d-advanced i { background: var(--hue); }
.pk-st { font: 600 0.7rem/1 var(--sans); padding: 4px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.pk-st.on { background: color-mix(in srgb, var(--hue) 14%, var(--surface)); color: var(--hue); }
.pk-st.ok { background: var(--ok-soft); color: var(--ok); }
.pk-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--hue) 10%, transparent); }
.pk-bar i { display: block; height: 100%; background: var(--hue); }
:root[data-tsf-theme="dark"] .pk-num { color: color-mix(in srgb, var(--hue) 22%, transparent); }
@media (max-width: 1180px) { .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 920px) { .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pk { min-height: 170px; padding: 14px 12px 12px; } .pk-num { font-size: 2.6rem; } .pk-t { font-size: 0.93rem; } .pk-tag { display: none; } }
.stamp-back { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pk-tag { flex: 1 1 auto; }
.pk-dots { margin-left: 0; flex: none; }
.pk-st { flex: none; }
.pk { grid-template-columns: minmax(0, 1fr); } .pk > * { min-width: 0; }

/* brief state while a file loads on demand */
.loading-view { padding-block: 64px; min-height: 40vh; }
.loading-view h1 { opacity: .55; }
