@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap");

:root {
  --shu: #d6402a;
  --ai: #2e4a66;
  --ai-soft: #8ba3ba;
  --paper: #f7f5f0;
  --surface: #fdfcfa;
  --sunken: #efece4;
  --ink: #1a1815;
  --ink-2: #4a463f;
  --muted: #807a6f;
  --border: #e2ded4;
  --border-strong: #c9c4b7;
  --positive: #356b4b;
  --negative: #8c2f39;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-serif: "Newsreader", Georgia, serif;
  --rule: 1px solid var(--border);
  --radius: 3px;
  --shadow-paper: 0 1px 2px rgba(26, 24, 21, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --shu: #f0563c;
    --ai: #7fa0c2;
    --ai-soft: #4d6c8a;
    --paper: #161512;
    --surface: #1e1c18;
    --sunken: #12110e;
    --ink: #edeae2;
    --ink-2: #c9c4b9;
    --muted: #928c80;
    --border: #2e2b25;
    --border-strong: #46423a;
    --positive: #72a684;
    --negative: #c96a73;
    --shadow-paper: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: var(--shu); }
a { color: inherit; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { color: var(--shu); text-decoration-color: var(--shu); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }

.skip-link { position: fixed; z-index: 20; left: 16px; top: -60px; padding: 8px 12px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 12px; }
.skip-link:focus { top: 12px; }

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px;
  border-bottom: var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; }
.brand img { display: block; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--shu); }

main, footer { max-width: 1180px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.hero { padding-top: 88px; padding-bottom: 96px; }
.eyebrow, .micro-label, .section-heading > p, .result-count, .source-line, .chart-note {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: lowercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.eyebrow { display: inline-block; margin-bottom: 28px; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 900px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: clamp(54px, 10vw, 112px);
  line-height: .88;
  letter-spacing: -.075em;
  font-weight: 500;
  text-transform: lowercase;
}
.version-line { margin-bottom: 32px; padding-top: 2px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-transform: lowercase; }
.version-line strong { color: var(--ink-2); font-weight: 500; }
.dek { max-width: 76ch; margin-bottom: 28px; color: var(--ink-2); font-size: 21px; line-height: 1.55; }
code { padding: 1px 4px; border: var(--rule); border-radius: 2px; background: var(--surface); font-family: var(--font-mono); font-size: .78em; color: var(--ink); }
.query { max-width: 76ch; margin: 0 0 48px; padding: 13px 16px; border: var(--rule); border-radius: var(--radius); background: var(--sunken); font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.kw { color: var(--ai); font-weight: 500; }
.cursor { color: var(--shu); animation: blink 1.1s steps(2, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.repo-link { max-width: 76ch; margin: -24px 0 48px; padding: 16px 0; border-top: var(--rule); border-bottom: var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--ink-2); text-decoration: none; font-family: var(--font-mono); font-size: 11px; text-transform: lowercase; }
.repo-link > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.repo-link strong { color: var(--ink); font-size: 12px; font-weight: 500; }
.repo-link:hover, .repo-link:hover strong { color: var(--shu); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--rule); border-bottom: var(--rule); }
.stat { min-height: 150px; padding: 26px 24px; border-right: var(--rule); display: flex; flex-direction: column; justify-content: space-between; }
.stat:last-child { border-right: 0; }
.stat strong { font-family: var(--font-mono); font-weight: 500; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -.04em; }
.stat-accent strong { color: var(--shu); }
.stat span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: lowercase; }
.callout { max-width: 76ch; margin-top: 32px; padding: 18px 20px; border-left: 3px solid var(--ai); background: var(--surface); box-shadow: var(--shadow-paper); }
.callout strong { font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: lowercase; }
.callout p { margin: 6px 0 0; color: var(--ink-2); font-size: 16px; }

.report-section { padding: 96px 0; border-top: var(--rule); }
.section-heading { display: grid; grid-template-columns: 160px minmax(0, 760px); gap: 32px; align-items: start; }
.section-heading > p { margin: 7px 0 0; }
h2 { margin-bottom: 24px; font-family: var(--font-mono); font-size: clamp(30px, 5vw, 52px); font-weight: 500; line-height: 1.05; letter-spacing: -.04em; text-transform: lowercase; }
.section-intro { max-width: 64ch; margin: 0 0 40px 192px; color: var(--ink-2); }
.section-intro strong { color: var(--ink); font-family: var(--font-mono); font-size: .82em; font-weight: 500; }
.indent { margin-left: 192px; }

/* — findings ledger — */
.findings { margin-left: 192px; border-top: var(--rule); }
.finding { display: grid; grid-template-columns: 42px minmax(150px, 220px) 1fr; gap: 16px 24px; align-items: baseline; padding: 22px 0; border-bottom: var(--rule); }
.finding .index { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.finding .number { font-family: var(--font-mono); font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; }
.finding.hot .number { color: var(--shu); }
.finding .number small { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; text-transform: lowercase; }
.finding .read { max-width: 60ch; color: var(--ink-2); font-size: 17px; }
.finding .read strong { color: var(--ink); font-family: var(--font-mono); font-size: .82em; font-weight: 500; }

/* — charts — */
.chart-block { margin-left: 192px; }
.chart-block figure { margin: 0; }
.chart-block figcaption { margin-bottom: 20px; padding-bottom: 12px; border-bottom: var(--rule); display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: lowercase; }
.chart-block figcaption strong { color: var(--ink-2); font-weight: 500; }
.chart-note { margin: 24px 0 0; font-size: 10px; letter-spacing: .02em; }
.chart-note a { color: inherit; }
svg text { font-family: var(--font-mono); }

.km-legend { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 28px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.km-legend span::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 8px; vertical-align: middle; background: var(--ai); }
.km-legend span.s2021::before { background: var(--shu); }
.km-legend span.s2023::before { background: var(--ai-soft); }
.km-legend strong { color: var(--ink); font-weight: 500; }

/* — regime strip — */
.regimes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; border-top: var(--rule); }
.regime { padding: 22px 0 26px; border-bottom: var(--rule); }
.regime .era { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: lowercase; letter-spacing: .06em; }
.regime .years { display: block; margin: 8px 0 14px; font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.regime-band { height: 8px; background: var(--sunken); border-radius: 2px; overflow: hidden; }
.regime-band i { display: block; height: 100%; background: var(--ai); }
.regime-nums { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.regime-nums strong { color: var(--ink); font-weight: 500; }
.regime p { margin: 14px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }

/* — shutdown reason ledger — */
.reason-rows { border-top: var(--rule); }
.reason-row { display: grid; grid-template-columns: minmax(140px, 230px) 1fr 108px; gap: 20px; align-items: center; padding: 11px 0; border-bottom: var(--rule); }
.reason-row .name { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.reason-track { height: 8px; background: var(--sunken); border-radius: 2px; overflow: hidden; }
.reason-track i { display: block; height: 100%; background: var(--ai); }
.reason-value { font-family: var(--font-mono); font-size: 13px; color: var(--ink); text-align: right; }
.reason-value small { display: block; font-size: 9.5px; color: var(--muted); }
.reason-row.empty .name, .reason-row.empty .reason-value { color: var(--muted); }
.reason-row.empty .reason-track { background: transparent; border-bottom: 1px dashed var(--border-strong); border-radius: 0; height: 1px; }

/* — CI bar charts (industry, funding) — */
.ci-bars { display: flex; flex-direction: column; gap: 0; border-top: var(--rule); }
.ci-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 150px; gap: 20px; align-items: center; padding: 14px 0; border-bottom: var(--rule); }
.ci-row .name { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.ci-row .name small { display: block; font-size: 10px; color: var(--muted); }
.ci-track { position: relative; height: 22px; background: var(--sunken); border-radius: 2px; }
.ci-fill { position: absolute; left: 0; top: 5px; bottom: 5px; background: var(--ai); border-radius: 1px; }
.ci-row.hot .ci-fill { background: var(--shu); }
.ci-whisker { position: absolute; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--ink-2); opacity: .7; }
.ci-whisker::before, .ci-whisker::after { content: ""; position: absolute; top: -4px; width: 1.5px; height: 9.5px; background: inherit; }
.ci-whisker::before { left: 0; }
.ci-whisker::after { right: 0; }
.ci-value { font-family: var(--font-mono); font-size: 12px; color: var(--ink); text-align: right; white-space: nowrap; }
.ci-value small { display: block; font-size: 9.5px; color: var(--muted); }

/* — cohort status bands — */
.cohort-rows { border-top: var(--rule); }
.cohort-row { display: grid; grid-template-columns: 58px 1fr 190px; gap: 20px; align-items: center; padding: 13px 0; border-bottom: var(--rule); font-family: var(--font-mono); }
.cohort-row .year { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.cohort-band { display: flex; height: 24px; background: var(--sunken); border-radius: 2px; overflow: hidden; }
.cohort-band i { display: block; height: 100%; }
.cohort-band .dead { background: var(--negative); }
.cohort-band .acq { background: var(--ai); opacity: .75; }
.cohort-row .nums { font-size: 10.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.cohort-row .nums strong { color: var(--ink); font-weight: 500; }
.band-legend { margin-top: 16px; display: flex; gap: 24px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.band-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 1px; vertical-align: baseline; }
.band-legend .dead i { background: var(--negative); }
.band-legend .acq i { background: var(--ai); opacity: .75; }
.band-legend .rest i { background: var(--sunken); border: var(--rule); }

/* — proxy validation table — */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th, .mini-table td { padding: 10px 12px 10px 0; border-bottom: var(--rule); text-align: left; font-size: 13px; }
.mini-table th { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--muted); text-transform: lowercase; }
.mini-table td { color: var(--ink-2); }
.mini-table td:first-child { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.mini-table td.num { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.mini-table td.num.late { color: var(--negative); }

/* — the build — */
.arch { margin: 0 0 48px; padding: 24px; border: var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-paper); overflow-x: auto; }
.arch pre { margin: 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.arch .hl { color: var(--ai); font-weight: 500; }
.arch .hot { color: var(--shu); }
.arch .cm { color: var(--ink); }
.arch .rt { color: var(--muted); }

.pipe-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--rule); border-left: var(--rule); margin-bottom: 48px; }
.pipe-cell { padding: 18px 16px; border-right: var(--rule); border-bottom: var(--rule); display: flex; flex-direction: column; gap: 6px; }
.pipe-cell strong { font-family: var(--font-mono); font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.pipe-cell span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: lowercase; line-height: 1.5; }

.build-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; border-top: var(--rule); margin-bottom: 8px; }
.build-grid article { padding: 26px 0; border-bottom: var(--rule); }
.build-grid h3 { margin-bottom: 10px; }
.build-grid p { margin: 0 0 10px; color: var(--ink-2); font-size: 16.5px; }
.build-grid p:last-child { margin-bottom: 0; }
.build-grid .tag { display: inline-block; margin-bottom: 12px; padding: 3px 7px; border: var(--rule); border-radius: 2px; font-family: var(--font-mono); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

h3 { margin-bottom: 12px; font-family: var(--font-mono); font-size: 19px; font-weight: 500; letter-spacing: -.02em; text-transform: lowercase; }

.source-table-wrap { overflow-x: auto; border-top: var(--rule); border-bottom: var(--rule); margin-bottom: 12px; }
.source-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.source-table th, .source-table td { padding: 13px 12px 13px 0; border-bottom: var(--rule); text-align: left; vertical-align: top; }
.source-table tr:last-child td { border-bottom: 0; }
.source-table th { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--muted); text-transform: lowercase; }
.source-table td { color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.source-table td:first-child { font-family: var(--font-mono); font-size: 12px; color: var(--ai); font-weight: 500; white-space: nowrap; }
.source-table td:last-child { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

.receipt { margin: 48px 0 0; padding: 22px 24px; border: var(--rule); border-radius: var(--radius); background: var(--sunken); font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); line-height: 1.8; }
.receipt strong { color: var(--ink); font-weight: 500; }

/* — registry explorer — */
.filters { margin-bottom: 22px; display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.filters label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: lowercase; }
.filters input, .filters select { width: 100%; height: 42px; margin-top: 6px; padding: 8px 10px; border: var(--rule); border-radius: var(--radius); color: var(--ink); background: var(--surface); font-family: var(--font-mono); font-size: 12px; }
.filters input:focus, .filters select:focus { outline: 2px solid var(--ai); outline-offset: 1px; }
.text-button { height: 42px; padding: 0 14px; border: var(--rule); border-radius: var(--radius); color: var(--ink-2); background: transparent; font-family: var(--font-mono); font-size: 11px; text-transform: lowercase; }
.text-button:hover { color: var(--shu); border-color: var(--shu); }
.result-count { margin: 0 0 14px; text-align: right; }

.record-list { border-top: var(--rule); }
.record { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 18px 0; border-bottom: var(--rule); }
.record-index { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.record-topline { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 4px; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.record-topline .industry { color: var(--ai); font-weight: 500; }
.record h3 { margin: 0 0 3px; font-size: 19px; text-transform: none; }
.record-summary { max-width: 68ch; margin-bottom: 12px; color: var(--ink-2); font-size: 15px; }
.record-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.record-metrics div { display: flex; flex-direction: column; gap: 2px; }
.record-metrics span { color: var(--muted); font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; }
.record-metrics strong { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; }
.record details { margin-top: 12px; border-top: var(--rule); }
.record summary { padding: 9px 0; color: var(--ink-2); cursor: pointer; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; text-transform: lowercase; list-style: none; }
.record summary::-webkit-details-marker { display: none; }
.record details[open] summary { color: var(--ai); }
.evidence { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 14px 0; border-top: var(--rule); }
.evidence-label { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--ai); text-transform: lowercase; }
.evidence-body { min-width: 0; }
.evidence-body p { margin: 0 0 6px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.evidence-body blockquote { margin: 0 0 6px; padding-left: 12px; border-left: 2px solid var(--border-strong); color: var(--ink-2); font-size: 15px; font-style: italic; }
.evidence-body a { font-family: var(--font-mono); font-size: 10.5px; }
.evidence-body .conf { margin-left: 10px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.more-button { display: block; margin: 22px auto 0; padding: 10px 16px; border: 0; background: none; color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; text-transform: lowercase; }
.more-button:hover { color: var(--shu); }
.more-button[hidden] { display: none; }

/* — limitations — */
.limits { margin-left: 192px; border-top: var(--rule); counter-reset: lim; }
.limits li { display: grid; grid-template-columns: 42px 1fr; gap: 24px; padding: 20px 0; border-bottom: var(--rule); list-style: none; }
.limits li::before { counter-increment: lim; content: "0" counter(lim); font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding-top: 4px; }
.limits { padding-left: 0; margin-top: 0; margin-bottom: 0; }
.limits p { margin: 0; color: var(--ink-2); font-size: 16.5px; max-width: 66ch; }
.limits strong { color: var(--ink); font-family: var(--font-mono); font-size: .82em; font-weight: 500; }

.repo-cta { margin: 48px 0 0 192px; padding: 22px 0; border-top: var(--rule); border-bottom: var(--rule); display: grid; grid-template-columns: 160px 1fr auto; gap: 32px; align-items: center; text-decoration: none; }
.repo-cta strong { font-family: var(--font-mono); font-size: 15px; font-weight: 500; text-transform: lowercase; }
.repo-cta > span:last-child { color: var(--muted); font-family: var(--font-mono); }
.repo-cta:hover strong, .repo-cta:hover > span:last-child { color: var(--shu); }

footer { padding-top: 24px; padding-bottom: 40px; border-top: var(--rule); display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-transform: lowercase; }
footer a { margin-right: auto; }
footer .byline { flex-basis: 100%; color: var(--ink-2); }

@media (max-width: 820px) {
  .site-header, main, footer { padding-left: 20px; padding-right: 20px; }
  .site-header nav { display: none; }
  .hero { padding-top: 64px; padding-bottom: 72px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: var(--rule); }
  .section-heading { display: block; }
  .section-heading > p { margin-bottom: 14px; }
  .section-intro, .indent, .findings, .chart-block, .limits, .repo-cta { margin-left: 0; }
  .finding { grid-template-columns: 1fr; gap: 6px; }
  .finding .index { display: none; }
  .pipe-grid { grid-template-columns: 1fr 1fr; }
  .build-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .record-metrics { grid-template-columns: 1fr 1fr; }
  .ci-row { grid-template-columns: minmax(90px, 130px) 1fr 110px; gap: 12px; }
  .regimes { grid-template-columns: 1fr; }
  .reason-row { grid-template-columns: minmax(110px, 150px) 1fr 84px; gap: 12px; }
  .cohort-row { grid-template-columns: 46px 1fr; }
  .cohort-row .nums { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  h1 { font-size: 52px; }
  .dek { font-size: 18px; }
  .report-section { padding: 72px 0; }
  .stat { min-height: 124px; padding: 20px 16px; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .record { grid-template-columns: 1fr; gap: 8px; padding: 26px 0; }
  .record-index { display: none; }
  .record-metrics { grid-template-columns: 1fr; gap: 10px; }
  .evidence { grid-template-columns: 1fr; gap: 8px; }
  .repo-link { align-items: flex-start; }
  .repo-cta { grid-template-columns: 1fr auto; gap: 8px 18px; }
  .repo-cta .micro-label { grid-column: 1 / -1; }
  footer a { width: 100%; margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
