:root {
  --bg: #f6f8fb;
  --bg-2: #eef2f7;
  --surface: #ffffff;
  --text: #0b1220;
  --muted: #4b5567;
  --line: #dde3ec;
  --accent: #0f7bff;
  --accent-2: #0ea5a0;
  --accent-soft: #e3efff;
  --ok: #16a34a;
  --warn: #d97706;
  --grid: rgba(15, 23, 42, .05);
  --shadow: 0 30px 80px -40px rgba(15, 23, 42, .35);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #05070b;
    --bg-2: #0a0e15;
    --surface: #0d121b;
    --text: #e8edf5;
    --muted: #93a0b4;
    --line: #1c2533;
    --accent: #5cc8ff;
    --accent-2: #5eead4;
    --accent-soft: #0e2536;
    --ok: #4ade80;
    --warn: #fbbf24;
    --grid: rgba(148, 163, 184, .06);
    --shadow: 0 40px 120px -40px rgba(0, 0, 0, .8);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
code, .mono { font-family: var(--mono); }
.wide { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.nav .wide { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.nav nav { display: flex; align-items: center; gap: 18px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav nav a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, border-color .15s ease; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.nav .btn { padding: 8px 14px; font-size: 14px; color: var(--bg); }

/* hero */
.hero { position: relative; padding: 76px 0 64px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 40%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 40%, transparent 100%); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 720px; height: 720px; right: -200px; top: -320px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); pointer-events: none; }
.hero .wide { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.02fr; gap: 48px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px var(--mono); color: var(--accent-2); border: 1px solid var(--line); background: var(--surface); padding: 6px 10px; border-radius: 999px; }
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.03em; margin: 18px 0 16px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18.5px; color: var(--muted); margin: 0 0 26px; max-width: 560px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.stack span { font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: var(--surface); }

/* terminal */
.term { background: #070a10; color: #d7e0ee; border: 1px solid #1c2533; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; font: 13.5px/1.65 var(--mono); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid #1c2533; background: #0b0f17; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3342; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; color: #7d8aa0; font-size: 12px; }
.term pre { margin: 0; padding: 16px 18px 18px; white-space: pre-wrap; word-break: break-word; }
.t-p { color: #5eead4; } .t-d { color: #7d8aa0; } .t-a { color: #5cc8ff; } .t-ok { color: #4ade80; } .t-w { color: #fbbf24; } .t-u { color: #e8edf5; font-weight: 600; }
.cursor { display: inline-block; width: 8px; height: 15px; background: #5eead4; vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* stats */
.stats { border-bottom: 1px solid var(--line); background: var(--surface); }
.stats .wide { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 24px 16px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 700 30px/1.1 var(--mono); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 14px; }

/* sections */
.section { padding: 88px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 62px; }
.section.alt { background: var(--bg-2); }
.head { max-width: 720px; margin-bottom: 36px; }
.label { font: 600 12.5px var(--mono); color: var(--accent-2); letter-spacing: .04em; text-transform: uppercase; }
.head h2 { font-size: clamp(28px, 3.8vw, 42px); line-height: 1.1; letter-spacing: -.025em; margin: 12px 0 12px; }
.head p { color: var(--muted); font-size: 17.5px; margin: 0; }

/* architecture */
.arch { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; overflow-x: auto; }
.arch svg { display: block; width: 100%; min-width: 760px; height: auto; }
.arch text { font-family: var(--mono); fill: var(--text); }
.arch .muted { fill: var(--muted); }
.arch .box { fill: var(--bg); stroke: var(--line); }
.arch .hub { fill: var(--accent-soft); stroke: var(--accent); }
.arch .edge { stroke: var(--muted); stroke-width: 1.3; fill: none; stroke-dasharray: 4 4; }
.arch .edge-strong { stroke: var(--accent); stroke-width: 1.6; fill: none; }
.arch .gate { fill: color-mix(in srgb, var(--warn) 14%, var(--bg)); stroke: var(--warn); }
.arch-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 15px; color: var(--muted); }
.note strong { color: var(--text); display: block; margin-bottom: 4px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.tag { font: 12px var(--mono); color: var(--accent); background: var(--accent-soft); padding: 4px 8px; border-radius: 6px; }
.meta-line { margin-top: 12px; font: 12.5px var(--mono); color: var(--text); }
.callout { margin-top: 16px; border: 1px dashed var(--line); border-radius: 12px; padding: 14px 18px; color: var(--muted); font-size: 15px; background: var(--surface); }
.callout strong { color: var(--text); }

/* directory */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.search span { font: 13px var(--mono); color: var(--accent-2); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 15px var(--mono); padding: 11px 0; outline: none; }
.count { font: 13px var(--mono); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { font: 12.5px var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.chip[aria-pressed="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.chip b { font-weight: 600; margin-left: 4px; opacity: .8; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.agent { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.agent h3 { margin: 0; font-size: 15.5px; line-height: 1.3; }
.agent code { font-size: 12px; color: var(--accent); word-break: break-all; }
.agent p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.agent .foot { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; font: 11.5px var(--mono); color: var(--muted); }
.agent .foot .lead-n { color: var(--accent-2); }
.more { margin-top: 18px; text-align: center; }
.is-hidden { display: none !important; }

/* tools */
.tgroups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.tgroup { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.tgroup h3 { margin: 0 0 10px; font-size: 16px; display: flex; justify-content: space-between; gap: 10px; }
.tgroup h3 span { font: 12.5px var(--mono); color: var(--muted); font-weight: 500; }
.tool { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.tool:first-of-type { border-top: 0; }
.tool code { color: var(--accent); font-size: 12.5px; word-break: break-all; }
.tool span { color: var(--muted); }

/* models / checks / platforms */
.models { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.model { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.model code { font-size: 12.5px; color: var(--accent); word-break: break-all; }
.model b { display: block; font: 700 24px var(--mono); margin-top: 6px; }
.model span { font-size: 13px; color: var(--muted); }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 15px; color: var(--muted); }
.check strong { display: block; color: var(--text); margin-bottom: 4px; }
.check strong::before { content: "✓ "; color: var(--ok); font-family: var(--mono); }
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.soon { display: inline-block; margin-top: 10px; font: 11.5px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.final { text-align: center; }
.final .head { margin: 0 auto 26px; }
.final .actions { justify-content: center; }
footer { color: var(--muted); font-size: 14px; padding: 26px 0 40px; }
footer .wide { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 1000px) {
  .hero .wide { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .models, .platforms { grid-template-columns: repeat(2, 1fr); }
  .checks, .arch-notes { grid-template-columns: 1fr 1fr; }
  .nav nav a:not(.btn) { display: none; }
}
@media (max-width: 700px) {
  .cards, .tgroups, .grid, .checks, .arch-notes { grid-template-columns: 1fr; }
  .stats .wide { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat b { font-size: 24px; }
  .section { padding: 64px 0; }
  .hero { padding-top: 48px; }
  .tool { grid-template-columns: 1fr; gap: 2px; }
  .term { font-size: 12.5px; }
}
@media (max-width: 420px) { .models, .platforms { grid-template-columns: 1fr; } }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .cards-3 { grid-template-columns: 1fr; } }

/* reactor core (orchestrator animation, see reactor.js) */
.reactor-sec { padding: 72px 0 80px; border-bottom: 1px solid var(--line); }
.reactor { border: 1px solid #1c2533; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.rc-stage { position: relative; background: radial-gradient(ellipse 70% 80% at 50% 40%, #0a1524 0%, #030608 55%, #000 100%); }
.rc-stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 40% 50% at 50% -5%, rgba(125,211,252,.2), transparent 60%); pointer-events: none; }
.rc-canvas { position: relative; aspect-ratio: 1000 / 560; }
.rc-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rc-tele { font-family: var(--mono); letter-spacing: .3em; transition: opacity .5s; }
.rc-title { position: absolute; top: 4.5%; left: 0; right: 0; text-align: center; font-family: var(--mono); pointer-events: none; }
.rc-title b { display: block; color: #BAE6FD; font-size: 11px; font-weight: 500; letter-spacing: .6em; }
.rc-title span { display: block; color: #5A7A9A; font-size: 8px; letter-spacing: .4em; margin-top: 4px; }
.rc-label { --c: #7DD3FC; position: absolute; transform: translateX(-50%); min-width: 104px; padding: 6px 10px; text-align: center; font-family: var(--mono); background: rgba(5,10,18,.72); border: 1px solid rgba(125,211,252,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; transition: border-color .3s, box-shadow .3s; }
.rc-label.is-active { border-color: var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 35%, transparent); }
.rc-label b { display: block; color: var(--c); font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.rc-label span { display: block; color: #5A7A9A; font-size: 8px; letter-spacing: .2em; margin-top: 2px; }
.rc-label i { display: block; position: relative; height: 1.5px; margin-top: 5px; background: color-mix(in srgb, var(--c) 15%, transparent); }
.rc-label em { position: absolute; inset: 0 auto 0 0; background: var(--c); box-shadow: 0 0 4px var(--c); transition: width .6s; }
.rc-log { font: 13px/1.5 var(--mono); color: #d7e0ee; padding: 12px 16px; border-top: 1px solid #1c2533; background: #070a10; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-log .t-p { color: #7DD3FC; }
@media (max-width: 760px) {
  .rc-stage { padding-bottom: 44px; }
  .rc-label { min-width: 0; padding: 3px 5px; }
  .rc-label b { font-size: 8.5px; letter-spacing: .06em; }
  .rc-label span, .rc-label i { display: none; }
  .rc-label.rc-low { margin-top: 26px; }
  .rc-title b { font-size: 9px; letter-spacing: .4em; }
  .rc-title span, .rc-tele { display: none; }
  .rc-log { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { .rc-label, .rc-label em, .rc-tele { transition: none; } }
