@charset "UTF-8";

:root {
  color-scheme: dark;
  --ink: #e7ece8;
  --muted: #8d9a95;
  --void: #0c0f10;
  --panel: #121718;
  --line: #283130;
  --acid: #d8ff52;
  --cyan: #68e4da;
  --amber: #ffbd59;
  --red: #ff5a51;
  --violet: #a890ff;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--void);
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background:
  linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
  var(--void); background-size: 32px 32px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.topbar { position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px, 4vw, 64px); background: rgba(12,15,16,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: grid; grid-template-columns: 42px auto; grid-template-rows: 1fr 1fr; column-gap: 12px; text-decoration: none; align-items: center; }
.brand > span { grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--acid); color: var(--acid); font-weight: 800; }
.brand b { font-size: 12px; letter-spacing: .18em; align-self: end; }
.brand small { font: 9px/1.4 ui-monospace, monospace; color: var(--muted); letter-spacing: .12em; align-self: start; }
.topbar nav { display: flex; gap: clamp(12px, 2vw, 30px); }
.topbar nav a { font: 11px ui-monospace, monospace; color: var(--muted); text-decoration: none; text-transform: uppercase; }
.topbar nav a:hover { color: var(--acid); }

main { overflow: clip; }
.hero { min-height: 760px; padding: clamp(72px, 11vw, 150px) clamp(20px, 6vw, 90px) 80px; display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(40px, 7vw, 110px); align-items: center; position: relative; }
.hero::after { content: ""; position: absolute; width: 38vw; aspect-ratio: 1; right: -8vw; top: 10%; border-radius: 50%; background: radial-gradient(circle, rgba(216,255,82,.12), transparent 67%); pointer-events: none; }
.kicker { margin: 0 0 20px; color: var(--acid); font: 11px/1.3 ui-monospace, monospace; letter-spacing: .18em; }
.hero h1 { margin: 0; max-width: 950px; font-size: clamp(58px, 9vw, 142px); line-height: .84; letter-spacing: -.07em; font-weight: 750; }
.hero h1 em { color: transparent; -webkit-text-stroke: 1px var(--acid); font-style: normal; }
.lede { max-width: 690px; margin: 38px 0; color: #b7c1bd; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions a { padding: 14px 20px; border: 1px solid var(--acid); background: var(--acid); color: #101410; text-decoration: none; font-weight: 700; font-size: 13px; }
.hero-actions a.ghost { background: transparent; color: var(--acid); }
.hero-console { align-self: end; border: 1px solid var(--line); background: rgba(18,23,24,.83); padding: 24px; position: relative; z-index: 1; }
.console-title { display: flex; justify-content: space-between; color: var(--muted); font: 10px ui-monospace, monospace; letter-spacing: .15em; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.console-title b { color: var(--cyan); }
.hero-metrics { display: grid; grid-template-columns: 1fr 1fr; }
.hero-metrics div { padding: 24px 0; border-bottom: 1px solid var(--line); }
.hero-metrics div:nth-child(odd) { border-right: 1px solid var(--line); }
.hero-metrics div:nth-child(even) { padding-left: 24px; }
.hero-metrics strong { display: block; font: 44px/1 ui-monospace, monospace; color: var(--ink); }
.hero-metrics span { color: var(--muted); font-size: 11px; }
.coverage { height: 5px; margin: 24px 0 14px; background: #232a29; overflow: hidden; }
.coverage span { display: block; width: var(--coverage); height: 100%; background: var(--acid); }
.hero-console > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.safety-strip { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 22px clamp(20px, 6vw, 90px); border-block: 1px solid #50342f; background: rgba(255,90,81,.07); }
.safety-strip b { color: var(--red); font: 11px ui-monospace, monospace; white-space: nowrap; }
.safety-strip p { margin: 0; color: #d5bbb7; font-size: 13px; line-height: 1.7; }

.section { padding: clamp(78px, 10vw, 140px) clamp(20px, 6vw, 90px); border-bottom: 1px solid var(--line); }
.section-intro { max-width: 850px; margin-bottom: 52px; }
.section-intro h2 { margin: 0 0 20px; font-size: clamp(38px, 5vw, 76px); line-height: .98; letter-spacing: -.05em; }
.section-intro > p:last-child { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.axiom-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.axiom-grid article { min-height: 210px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.axiom-grid article:nth-child(3n) { border-right: 0; }
.axiom-grid article:nth-child(n+4) { border-bottom: 0; }
.axiom-grid span { color: var(--acid); font: 11px ui-monospace, monospace; }
.axiom-grid h3 { margin: 42px 0 10px; font-size: 22px; }
.axiom-grid p { color: var(--muted); line-height: 1.7; margin: 0; font-size: 13px; }

.chain-section { background: rgba(18,23,24,.62); }
.layer-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.layer-rail button { display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: 1fr 1fr; padding: 22px; border: 0; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; }
.layer-rail button:hover { background: #19201f; }
.layer-rail span { grid-row: 1/3; color: var(--acid); font: 11px ui-monospace, monospace; }
.layer-rail strong { font-size: 15px; }
.layer-rail small { color: var(--muted); font: 10px ui-monospace, monospace; }
.layer-rail b { grid-row: 1/3; align-self: center; font: 28px ui-monospace, monospace; color: #53605b; }
.edge-key { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.edge-key span { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font: 10px ui-monospace, monospace; }
.edge-forward { border-left-color: var(--cyan) !important; }
.edge-feedback { border-left-color: var(--violet) !important; }
.edge-gating { border-left-color: var(--amber) !important; }
.edge-parallel { border-left-color: #81a6ff !important; }
.edge-transition { border-left-color: var(--red) !important; }

.matrix-section { padding-inline: 0; }
.matrix-intro, .filters, .matrix-footer { margin-inline: clamp(20px, 6vw, 90px); }
.matrix-intro { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; }
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 220px)) auto; gap: 8px; margin-bottom: 18px; }
.filters label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--panel); padding-left: 12px; }
.filters label > span { color: var(--muted); font: 9px ui-monospace, monospace; letter-spacing: .1em; }
.filters input, .filters select { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--ink); outline: 0; }
.filters select option { background: var(--panel); }
.filters > button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 0 16px; cursor: pointer; }
.matrix-frame { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--acid) #1d2322; }
.matrix-track { display: flex; width: max-content; padding-inline: clamp(20px, 6vw, 90px); }
.matrix-column { width: 116px; flex: 0 0 116px; border-right: 1px solid var(--line); }
.matrix-column:first-child { border-left: 1px solid var(--line); }
.node-head { width: 100%; height: 138px; padding: 12px 9px; border: 0; border-block: 1px solid var(--line); background: #171c1d; color: var(--ink); text-align: left; cursor: pointer; }
.node-head:hover { background: #222928; }
.node-head > span { display: block; color: var(--acid); font: 9px ui-monospace, monospace; }
.node-head strong { display: block; margin: 22px 0 8px; font-size: 13px; line-height: 1.35; }
.node-head small { color: var(--muted); font-size: 9px; }
.role-explanatory { box-shadow: inset 0 3px #596663; }
.role-observable { box-shadow: inset 0 3px var(--cyan); }
.role-trainable { box-shadow: inset 0 3px var(--acid); }
.role-clinical { box-shadow: inset 0 3px var(--violet); }
.matrix-cell { width: 100%; height: 86px; padding: 8px; border: 0; border-bottom: 1px solid var(--line); background: #101415; color: var(--ink); text-align: left; position: relative; overflow: hidden; }
.matrix-cell > span { position: absolute; top: 6px; right: 7px; color: #4a5551; font: 8px ui-monospace, monospace; }
.matrix-cell.filled { cursor: pointer; transition: opacity .2s, background .2s; }
.matrix-cell.filled:hover, .matrix-cell.filled:focus-visible { background: #29302f; outline: 1px solid var(--acid); outline-offset: -1px; z-index: 2; }
.matrix-cell strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 11px; font-size: 11px; line-height: 1.35; }
.matrix-cell small { display: block; margin-top: 5px; color: var(--muted); font: 8px ui-monospace, monospace; }
.matrix-cell.empty { background: rgba(255,255,255,.012); }
.matrix-cell.filtered { opacity: .08; pointer-events: none; filter: grayscale(1); }
.safety-s0 { box-shadow: inset 3px 0 #69cf96; }
.safety-s1 { box-shadow: inset 3px 0 #cbd45c; }
.safety-s2 { box-shadow: inset 3px 0 var(--amber); }
.safety-s3 { box-shadow: inset 3px 0 #ff7c5c; }
.safety-s4 { box-shadow: inset 3px 0 var(--red); background: rgba(255,90,81,.08) !important; }
.matrix-footer { margin-top: 16px; color: var(--muted); font: 11px ui-monospace, monospace; }
.matrix-footer span { color: var(--acid); }

.rating-section { background: #0f1314; }
.rating-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rating-columns > div { border-top: 1px solid var(--line); }
.rating-columns h3 { color: var(--muted); font: 11px ui-monospace, monospace; letter-spacing: .14em; padding: 14px 0; margin: 0; }
.rating-columns article { display: grid; grid-template-columns: 50px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.rating-columns article > b { color: var(--acid); font: 16px ui-monospace, monospace; }
.rating-columns article span { display: grid; gap: 6px; }
.rating-columns article strong { font-size: 13px; }
.rating-columns article small { color: var(--muted); line-height: 1.55; font-size: 11px; }
.rating-columns .risk-s4 > b, .rating-columns .risk-s3 > b { color: var(--red); }

.engine-section { background: linear-gradient(145deg, rgba(104,228,218,.06), transparent 55%); }
.engine-loop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.engine-loop article { min-height: 220px; padding: 28px; background: var(--panel); }
.engine-loop span { color: var(--cyan); font: 12px ui-monospace, monospace; }
.engine-loop h3 { margin: 64px 0 12px; font-size: 24px; }
.engine-loop p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.engine-equation { display: grid; grid-template-columns: 130px 1fr; gap: 12px 28px; margin-top: 26px; padding: 28px; border: 1px solid var(--cyan); }
.engine-equation span { color: var(--cyan); font: 11px ui-monospace, monospace; }
.engine-equation b { font-size: clamp(19px, 2vw, 30px); }
.engine-equation small { grid-column: 2; color: var(--muted); line-height: 1.7; }

.library-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.library-grid > div { min-width: 0; }
.library-grid header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.library-grid header h3 { margin: 0; }
.library-grid header b { color: var(--muted); font: 24px ui-monospace, monospace; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); }
.dot.retired { background: var(--red); }
.library-grid button { display: grid; width: 100%; padding: 17px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.library-grid button:hover strong { color: var(--acid); }
.library-grid button > span { color: var(--muted); font: 9px ui-monospace, monospace; }
.library-grid button strong { margin: 8px 0 6px; font-size: 15px; }
.library-grid button small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-grid button.retired strong { color: #e79b94; }

.source-list { border-top: 1px solid var(--line); }
.source-list a { display: grid; grid-template-columns: 80px 1fr auto; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.source-list a:hover strong { color: var(--acid); }
.source-list a > span { color: var(--acid); font: 11px ui-monospace, monospace; }
.source-list strong { font-size: 14px; }
.source-list p, .source-list small { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.source-list small { display: block; color: #66736e; }
.source-list a > b { color: var(--muted); }

.governance-section ol { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); counter-reset: rounds; }
.governance-section li { counter-increment: rounds; display: grid; grid-template-columns: 70px 180px 1fr; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: center; }
.governance-section li::before { content: "0" counter(rounds); color: var(--acid); font: 11px ui-monospace, monospace; }
.governance-section li b { font-size: 17px; }
.governance-section li span { color: var(--muted); }

footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 36px clamp(20px, 6vw, 90px); color: var(--muted); font-size: 11px; }
footer div { display: flex; gap: 14px; align-items: center; color: var(--ink); }
footer div span { color: var(--acid); font-size: 24px; }

dialog { width: min(760px, calc(100vw - 30px)); max-height: min(900px, calc(100vh - 30px)); padding: 0; border: 1px solid #46514e; background: #101516; color: var(--ink); box-shadow: 0 30px 100px #000; }
dialog::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(5px); }
.dialog-close { position: sticky; z-index: 2; top: 14px; float: right; margin: 14px 14px 0 0; width: 38px; height: 38px; border: 1px solid var(--line); background: #141a1b; color: var(--ink); cursor: pointer; font-size: 24px; }
#dialog-content { padding: 44px clamp(24px, 5vw, 58px) 56px; }
.dialog-kicker { color: var(--acid); font: 10px ui-monospace, monospace; letter-spacing: .14em; }
#dialog-content > h2 { margin: 18px 0 22px; font-size: clamp(32px, 6vw, 62px); line-height: 1; letter-spacing: -.04em; }
.dialog-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 36px; }
.badge { padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font: 9px ui-monospace, monospace; }
.badge.safety-s4, .badge.safety-s3 { border-color: var(--red); color: #ffaaa4; }
#dialog-content > section { padding: 22px 0; border-top: 1px solid var(--line); }
#dialog-content > section > span { color: var(--cyan); font: 9px ui-monospace, monospace; letter-spacing: .12em; }
#dialog-content section h3 { margin: 10px 0; }
#dialog-content section p { margin: 10px 0 0; color: #c0c9c5; line-height: 1.8; }
#dialog-content section small { display: block; margin-top: 10px; color: var(--muted); }
#dialog-content section.boundary { border: 1px solid #583531; padding: 20px; background: rgba(255,90,81,.05); }
#dialog-content section.boundary > span { color: var(--red); }
.detail-meta { display: flex; gap: 20px; padding: 18px 0; color: var(--muted); font: 10px ui-monospace, monospace; }
.detail-meta b { color: var(--ink); }
.detail-sources { border-top: 1px solid var(--line); padding-top: 20px; }
.detail-sources h3, .node-edges h3 { font-size: 13px; color: var(--muted); }
.detail-sources a { display: grid; grid-template-columns: 60px 1fr; gap: 5px 12px; padding: 13px 0; border-top: 1px solid var(--line); text-decoration: none; }
.detail-sources a b { color: var(--acid); font: 10px ui-monospace, monospace; }
.detail-sources a span { font-size: 12px; }
.detail-sources a small { grid-column: 2; color: var(--muted); }
.node-edges { margin-top: 22px; }
.node-edges article { border-left: 2px solid var(--line); padding: 12px 14px; margin: 8px 0; background: #151a1b; }
.node-edges article b { color: var(--muted); font: 9px ui-monospace, monospace; margin-right: 12px; }
.node-edges article span { font: 10px ui-monospace, monospace; }
.node-edges article p { color: var(--muted); font-size: 11px; line-height: 1.55; }

@media (max-width: 900px) {
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-console { align-self: auto; }
  .axiom-grid, .engine-loop { grid-template-columns: 1fr 1fr; }
  .axiom-grid article:nth-child(3n) { border-right: 1px solid var(--line); }
  .axiom-grid article:nth-child(2n) { border-right: 0; }
  .axiom-grid article:nth-child(n+4) { border-bottom: 1px solid var(--line); }
  .axiom-grid article:nth-child(n+5) { border-bottom: 0; }
  .layer-rail { grid-template-columns: 1fr 1fr; }
  .matrix-intro { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
  .rating-columns { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding-top: 76px; }
  .hero h1 { font-size: 54px; }
  .safety-strip { grid-template-columns: 1fr; gap: 8px; }
  .axiom-grid, .engine-loop, .layer-rail { grid-template-columns: 1fr; }
  .axiom-grid article { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .axiom-grid article:last-child { border-bottom: 0 !important; }
  .filters { grid-template-columns: 1fr; }
  .filters .search { grid-column: auto; }
  .engine-equation { grid-template-columns: 1fr; }
  .engine-equation small { grid-column: 1; }
  .governance-section li { grid-template-columns: 46px 1fr; gap: 8px; }
  .governance-section li span { grid-column: 2; }
  .source-list a { grid-template-columns: 60px 1fr; }
  .source-list a > b { display: none; }
  footer { align-items: flex-start; flex-direction: column; }
}

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