:root {
  --bg: #0E1215;
  --bg-2: #12181C;
  --panel: #161D22;
  --panel-2: #1C252B;
  --line: #26313A;
  --line-2: #354350;
  --ink: #EEF2F1;
  --ink-2: #B3BEC5;
  --mute: #7E8B94;
  --teal: #2BB8A3;
  --teal-2: #45D2BC;
  --teal-bg: #0F332E;
  --run: #2FB344;
  --wait: #D99A25;
  --pause: #4C86D9;
  --fail: #E05252;
  --done: #8A949F;
  --term: #4A525B;
  --untr: #F06A6A;
  --untr-bg: #3A1417;
  --r: 12px;
  --r-s: 7px;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: var(--teal-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code, pre { font-family: var(--mono); }
code { font-size: .86em; color: var(--ink); background: var(--panel-2); padding: .08em .38em; border-radius: 5px; border: 1px solid var(--line); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--mute); }
:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--teal); color: #041a16; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.brand b { color: var(--teal-2); font-weight: 800; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 2px; }
.brand-mark i { width: 9px; height: 9px; border-radius: 2px; background: var(--teal); }
.brand-mark i:nth-child(2) { background: var(--wait); }
.brand-mark i:nth-child(3) { background: var(--pause); }
.brand-mark i:nth-child(4) { background: var(--run); }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-gh { margin-left: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; font: 600 15px var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #04201b; }
.btn-primary:hover { background: var(--teal-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--mute); background: var(--panel); }
.btn-small { height: 36px; padding: 0 14px; font-size: 14px; background: var(--teal); color: #04201b; }
.btn-small:hover { background: var(--teal-2); }
.btn-small.btn-ghost { background: transparent; color: var(--ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* hero */
.hero { padding: 72px 0 88px; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 15px; font-weight: 500; margin-bottom: 22px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-run { background: var(--run); box-shadow: 0 0 0 4px color-mix(in srgb, var(--run) 22%, transparent); }
.hero h1 { font-size: clamp(42px, 6.2vw, 80px); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.lede { margin-top: 26px; font-size: 19px; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 36px; margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-facts div { display: flex; flex-direction: column-reverse; }
.hero-facts dt { font-size: 14px; color: var(--mute); }
.hero-facts dd { margin: 0; font: 700 34px/1.1 var(--sans); letter-spacing: -.03em; }

.hero-visual { position: relative; min-height: 460px; padding-bottom: 150px; }
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.tile { aspect-ratio: 1; border-radius: 5px; background: var(--panel-2); transition: background-color .9s ease, opacity .9s ease; }
.tile[data-s="running"] { background: var(--run); }
.tile[data-s="waiting"] { background: var(--wait); }
.tile[data-s="paused"] { background: var(--pause); }
.tile[data-s="completed"] { background: #3A444D; }
.tile[data-s="failed"] { background: var(--fail); }
.tile[data-s="teal"] { background: var(--teal); }
.tile[data-s="idle"] { background: var(--panel-2); }
.aips { position: absolute; left: 7%; right: -4%; bottom: -28px; background: #0A0E10; border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 6px color-mix(in srgb, var(--bg) 70%, transparent); overflow: hidden; }
.aips-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.aips-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.aips-bar code { background: none; border: 0; color: var(--mute); margin-left: 8px; font-size: 12.5px; padding: 0; }
.aips-table { width: 100%; border-collapse: collapse; font: 500 13px/1 var(--mono); }
.aips-table th { text-align: left; color: var(--mute); font-weight: 500; padding: 10px 14px 8px; }
.aips-table td { padding: 7px 14px; color: var(--ink-2); white-space: nowrap; }
.aips-table tr:last-child td { padding-bottom: 14px; }
.aips-table td.st-cell { font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 0 0 14px; font-size: 13px; color: var(--mute); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.s-running { background: var(--run); } .s-waiting { background: var(--wait); } .s-paused { background: var(--pause); } .s-completed { background: #3A444D; } .s-failed { background: var(--fail); }
.c-running { color: var(--run); } .c-waiting { color: var(--wait); } .c-paused { color: var(--pause); } .c-completed { color: var(--done); } .c-failed { color: var(--fail); } .c-terminated { color: var(--term); } .c-created { color: var(--ink-2); }

/* thesis */
.thesis { padding: 76px 0; border-block: 1px solid var(--line); background: var(--bg-2); }
.thesis-line { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.18; letter-spacing: -.025em; font-weight: 600; max-width: 24em; }
.thesis-line em { font-style: normal; color: var(--teal-2); }
.loop { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; counter-reset: loop; }
.loop span { font: 500 14px var(--mono); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); position: relative; }
.loop span:not(:last-child)::after { content: ""; position: absolute; right: -8px; top: 50%; width: 8px; height: 1px; background: var(--line-2); }
.loop .loop-back { border-color: var(--teal); color: var(--teal-2); }
.loop .loop-back::before { content: "↺ "; }

/* sections */
.sec { padding: 120px 0 0; }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.sec-head h2, .sec h2 { font-size: clamp(32px, 4.2vw, 52px); letter-spacing: -.035em; }
.sec-head p { margin-top: 18px; color: var(--ink-2); font-size: 18px; }
.sec h3 { font-size: 20px; letter-spacing: -.015em; }

/* metaphor map */
.map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.map-list { border-right: 1px solid var(--line); max-height: 560px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.map-row { display: grid; grid-template-columns: 1fr 22px 1.2fr; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink-2); padding: 13px 20px; font: 500 15px var(--sans); cursor: pointer; }
.map-row:last-child { border-bottom: 0; }
.map-row .arrow { color: var(--mute); text-align: center; }
.map-row .m { color: var(--ink); font-weight: 600; }
.map-row:hover { background: var(--panel-2); }
.map-row[aria-selected="true"] { background: var(--teal-bg); color: var(--ink); box-shadow: inset 3px 0 0 var(--teal); }
.map-row[aria-selected="true"] .arrow { color: var(--teal-2); }
.map-detail { padding: 36px 40px; display: flex; flex-direction: column; gap: 18px; }
.map-detail .pair { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.map-detail .pair .os { font-size: 22px; color: var(--mute); text-decoration: line-through; text-decoration-color: var(--line-2); text-decoration-thickness: 2px; }
.map-detail .pair .ms { font-size: clamp(30px, 3vw, 40px); font-weight: 700; letter-spacing: -.03em; }
.map-detail p { color: var(--ink-2); font-size: 17px; max-width: 34em; }
.map-detail pre { margin: 6px 0 0; }

/* code blocks */
.code { background: #0A0E10; border: 1px solid var(--line); border-radius: var(--r-s); padding: 18px 20px; margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); overflow-x: auto; }
.code code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.code-sm { font-size: 12.5px; padding: 14px 16px; margin-top: 16px; }
.c-k { color: #8FC7F0; } .c-s { color: #9AD7A5; } .c-c { color: var(--mute); } .c-w { color: var(--wait); }

/* run console */
.sec-run { padding-top: 140px; }
.goal { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: baseline; padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; background: var(--panel); border-bottom: 0; }
.goal-who { font: 600 13px var(--mono); color: var(--teal-2); }
.goal p { font-size: 19px; font-weight: 500; line-height: 1.45; }
.goal-meta { grid-column: 2; font: 400 12.5px var(--mono); color: var(--mute); }
.console { border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); background: var(--bg-2); overflow: hidden; }
.console-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px 12px 26px; border-bottom: 1px solid var(--line); background: var(--panel); }
.console-title { display: flex; align-items: center; gap: 12px; }
.task-id { font: 600 13px var(--mono); color: var(--ink-2); }
.status-chip { font: 600 12px var(--mono); padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.status-chip.is-running { color: var(--run); border-color: color-mix(in srgb, var(--run) 45%, transparent); background: color-mix(in srgb, var(--run) 12%, transparent); }
.status-chip.is-waiting { color: var(--wait); border-color: color-mix(in srgb, var(--wait) 45%, transparent); background: color-mix(in srgb, var(--wait) 12%, transparent); }
.status-chip.is-done { color: var(--teal-2); border-color: color-mix(in srgb, var(--teal) 45%, transparent); background: var(--teal-bg); }
.status-chip.is-failed { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 45%, transparent); background: color-mix(in srgb, var(--fail) 12%, transparent); }
.console-ctrl { display: flex; align-items: center; gap: 10px; }
.clock { font: 500 13px var(--mono); color: var(--mute); min-width: 58px; text-align: right; }
.console-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.05fr); min-height: 560px; }
.pane { padding: 20px; min-width: 0; }
.pane + .pane { border-left: 1px solid var(--line); }
.pane-h { font: 600 13px var(--sans) !important; color: var(--mute); letter-spacing: 0 !important; margin-bottom: 16px !important; }

.tree { display: flex; flex-direction: column; align-items: center; gap: 28px; position: relative; }
.tree-kids { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; position: relative; }
.tree-kids::before { content: ""; position: absolute; top: -16px; left: 25%; right: 25%; height: 1px; background: var(--line-2); }
.tree-kids::after { content: ""; position: absolute; top: -28px; left: 50%; width: 1px; height: 12px; background: var(--line-2); }
.proc { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); opacity: .28; transition: opacity .4s, border-color .4s, background .4s, transform .4s; font-size: 13px; }
.proc-root { width: min(220px, 100%); }
.proc.on { opacity: 1; }
.proc.flash { transform: scale(1.03); }
.proc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.proc-pid { font: 600 12px var(--mono); color: var(--mute); }
.proc-state { font: 600 10.5px var(--mono); padding: 2px 6px; border-radius: 4px; background: var(--panel-2); }
.proc-name { font-weight: 600; margin-top: 4px; font-size: 14px; }
.proc-meta { font: 400 11.5px var(--mono); color: var(--mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc[data-state="RUNNING"] { border-color: color-mix(in srgb, var(--run) 55%, transparent); }
.proc[data-state="RUNNING"] .proc-state { color: var(--run); background: color-mix(in srgb, var(--run) 14%, transparent); }
.proc[data-state="WAITING"] { border-color: color-mix(in srgb, var(--wait) 55%, transparent); }
.proc[data-state="WAITING"] .proc-state { color: var(--wait); background: color-mix(in srgb, var(--wait) 14%, transparent); }
.proc[data-state="COMPLETED"] .proc-state { color: var(--done); }
.proc[data-state="TERMINATED"] .proc-state { color: var(--mute); }
.proc[data-state="TERMINATED"] { opacity: .55; }
.usage { margin-top: 26px; display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.usage div { display: flex; justify-content: space-between; font-size: 13px; }
.usage span { color: var(--mute); }
.usage b { font: 500 12.5px var(--mono); }

.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 500px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.log li { display: grid; grid-template-columns: 44px 34px 1fr; gap: 8px; font-size: 13px; line-height: 1.45; padding: 6px 8px; border-radius: 6px; animation: logIn .35s ease both; }
.log li .t { font: 400 11.5px/1.7 var(--mono); color: var(--mute); }
.log li .p { font: 600 11.5px/1.7 var(--mono); color: var(--ink-2); }
.log li .m { color: var(--ink-2); }
.log li .m b { color: var(--ink); font-weight: 600; }
.log li.k-policy { background: color-mix(in srgb, var(--wait) 9%, transparent); }
.log li.k-policy .m b { color: var(--wait); }
.log li.k-danger { background: var(--untr-bg); }
.log li.k-danger .m b { color: var(--untr); }
.log li.k-ok .m b { color: var(--teal-2); }
.log li.k-fail .m b { color: var(--fail); }
@keyframes logIn { from { opacity: 0; transform: translateY(4px); } }

.focus { display: flex; flex-direction: column; gap: 14px; }
.focus-empty { color: var(--mute); font-size: 15px; }
.fcard { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 16px; animation: logIn .35s ease both; }
.fcard h4 { margin: 0 0 8px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.fcard p { font-size: 14px; color: var(--ink-2); }
.fcard .kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 13px; margin-top: 10px; }
.fcard .kv span { color: var(--mute); }
.fcard .kv code { font-size: 12px; word-break: break-all; }
.fcard pre { margin: 10px 0 0; font-size: 11.5px; padding: 12px; white-space: pre-wrap; word-break: break-word; }
.fcard-approval { border-color: color-mix(in srgb, var(--wait) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wait) 10%, transparent); }
.fcard-approval .ask { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font: 500 11.5px var(--mono); padding: 3px 7px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); }
.chip-risk { color: var(--wait); border-color: color-mix(in srgb, var(--wait) 45%, transparent); }
.approve-row { display: flex; gap: 8px; margin-top: 14px; }
.approve-row .btn { flex: 1; justify-content: center; }
.btn-reject { background: transparent; color: var(--ink); border-color: var(--line-2); height: 40px; }
.btn-reject:hover { border-color: var(--fail); color: var(--fail); }
.btn-approve { height: 40px; }
.approve-note { font-size: 12.5px !important; color: var(--mute) !important; margin-top: 10px; }
.shot { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 10px; background: #F6F7F8; color: #1a1f24; font-size: 12px; }
.shot-bar { background: #E4E7EA; padding: 5px 8px; font: 500 10.5px var(--mono); color: #57606a; }
.shot-body { padding: 12px; }
.shot-body b { display: block; font-size: 13px; margin-bottom: 6px; }
.shot-row { display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid #dde1e5; }
.shot-row .pill { font-weight: 700; color: #9a6400; }
.causes { margin: 10px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); display: grid; gap: 8px; }
.causes li::marker { color: var(--teal-2); font-weight: 700; }
.bigfig { display: flex; gap: 24px; margin-top: 6px; }
.bigfig div b { display: block; font-size: 28px; letter-spacing: -.03em; }
.bigfig div span { font-size: 12.5px; color: var(--mute); }

/* pipeline */
.pipeline { list-style: none; margin: 0 0 64px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); counter-reset: step; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pipeline li { counter-increment: step; padding: 20px 18px 22px; border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 8px; position: relative; }
.pipeline li:last-child { border-right: 0; background: var(--teal-bg); }
.pipeline li::before { content: counter(step); font: 600 12px var(--mono); color: var(--mute); }
.pipeline b { font-size: 17px; letter-spacing: -.01em; }
.pipeline span { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.pipeline li:nth-child(4) { background: color-mix(in srgb, var(--wait) 8%, var(--panel)); }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.split h3 { margin-bottom: 6px; }
.split .muted { font-size: 14.5px; margin-bottom: 16px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.cap-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cap-table th { text-align: left; font-weight: 600; color: var(--mute); font-size: 13px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.cap-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.cap-table tr:last-child td { border-bottom: 0; }
.cap-table td:first-child code { white-space: nowrap; }
.risk { font: 600 12px var(--mono); }
.risk-low { color: var(--done); } .risk-medium { color: var(--wait); } .risk-high { color: #E87921; }
.appr-never { color: var(--mute); } .appr-auto { color: var(--ink-2); } .appr-required { color: var(--ink); font-weight: 600; }
.decision { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel); }
.decision-row { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.decision-row:last-child { border-bottom: 0; }
.decision-row span { color: var(--mute); }
.decision-row code { background: none; border: 0; padding: 0; }
.t-wait { color: var(--wait) !important; font-weight: 600; }

/* knowledge fs */
.fs { display: grid; grid-template-columns: 280px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); min-height: 460px; }
.fs-tree { border-right: 1px solid var(--line); padding: 16px 10px; font: 500 13.5px var(--mono); overflow-y: auto; max-height: 560px; }
.fs-root { color: var(--mute); padding: 4px 10px 10px; }
.fs-dir > button, .fs-file { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; text-align: left; color: var(--ink-2); font: inherit; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.fs-dir > button:hover, .fs-file:hover { background: var(--panel-2); color: var(--ink); }
.fs-dir > button .car { width: 10px; color: var(--mute); transition: transform .15s; display: inline-block; }
.fs-dir[aria-expanded="true"] > button .car { transform: rotate(90deg); }
.fs-dir ul { list-style: none; margin: 0; padding: 0 0 0 18px; display: none; }
.fs-dir[aria-expanded="true"] ul { display: block; }
.fs-file.sel { background: var(--teal-bg); color: var(--ink); }
.fs-file .lock { margin-left: auto; font-size: 11px; color: var(--fail); }
.fs-file .flag { margin-left: auto; font-size: 10.5px; color: var(--untr); }
.fs-count { margin-left: auto; color: var(--mute); font-size: 11.5px; }
.fs-doc { padding: 30px 36px; min-width: 0; }
.fs-path { font: 500 13px var(--mono); color: var(--mute); }
.fs-doc h3 { font-size: 28px; margin-top: 10px; }
.fm { margin-top: 18px; background: #0A0E10; border: 1px solid var(--line); border-radius: var(--r-s); padding: 14px 16px; font: 400 13px/1.7 var(--mono); color: var(--ink-2); white-space: pre-wrap; }
.fm .c-k { color: #8FC7F0; }
.fs-body { margin-top: 18px; color: var(--ink-2); font-size: 16px; display: grid; gap: 12px; max-width: 40em; }
.fs-body a { cursor: pointer; }
.fs-deny { margin-top: 20px; padding: 16px; border: 1px dashed color-mix(in srgb, var(--fail) 55%, transparent); border-radius: var(--r-s); color: var(--ink-2); font-size: 15px; }
.fs-deny code { color: var(--fail); }

.retrieval { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; margin-top: 64px; align-items: start; }
.retrieval-copy p { color: var(--ink-2); margin-top: 14px; }
.search { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 16px; }
.search-box { font: 500 15px var(--mono); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: #0A0E10; display: flex; gap: 12px; }
.hits { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.hit { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: 1fr 150px; gap: 6px 18px; align-items: center; }
.hit-path { font: 500 13px var(--mono); color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hit-snip { grid-column: 1; font-size: 13.5px; color: var(--mute); }
.bars { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: center; font: 500 10.5px var(--mono); color: var(--mute); }
.bar i { height: 5px; border-radius: 3px; background: var(--panel-2); position: relative; overflow: hidden; display: block; }
.bar i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--c, var(--teal)); border-radius: 3px; transform-origin: left; transform: scaleX(0); transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.hits.in .bar i::after { transform: scaleX(1); }
.hidden-note { margin-top: 12px; font-size: 13.5px; color: var(--mute); }
.badge { font: 600 11px var(--mono); padding: 2px 7px; border-radius: 5px; }
.badge-untrusted { background: var(--untr-bg); color: var(--untr); border: 1px solid color-mix(in srgb, var(--untr) 50%, transparent); }
.badge-verified { background: var(--teal-bg); color: var(--teal-2); border: 1px solid color-mix(in srgb, var(--teal) 40%, transparent); }

/* firewall */
.sec-firewall .fw-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.fw-grid > div p { color: var(--ink-2); margin-top: 18px; font-size: 18px; }
.fw-grid > div p.muted { color: var(--mute); font-size: 16px; }
.email { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.email figcaption { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.email figcaption code { background: none; border: 0; padding: 0; color: var(--ink-2); }
.email-body { padding: 22px 18px; display: grid; gap: 16px; font-size: 16.5px; }
.email-body p { padding: 14px 16px; border-radius: 8px; }
.email-fact { background: var(--teal-bg); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); }
.email-inj { background: var(--untr-bg); border: 1px solid color-mix(in srgb, var(--untr) 40%, transparent); color: #F4B7B7; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--untr) 70%, transparent); }
.tag { display: block; font: 600 11.5px var(--mono); margin-bottom: 6px; text-decoration: none; }
.email-inj .tag { display: block; }
.tag-fact { color: var(--teal-2); }
.tag-inj { color: var(--untr); }
.email-foot { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }

/* memory */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tier { padding: 26px 26px 28px; background: var(--panel); }
.tier + .tier { border-left: 1px solid var(--line); }
.tier-os { font: 500 13px var(--mono); color: var(--teal-2); margin: 6px 0 12px; }
.tier p:last-child { color: var(--ink-2); font-size: 15.5px; }
.ops { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 28px; }
.ops li { font-size: 15px; color: var(--ink-2); display: flex; gap: 12px; align-items: baseline; }
.ops code { min-width: 108px; text-align: center; color: var(--teal-2); }
.inval { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; margin-top: 64px; align-items: start; }
.inval-copy p { color: var(--ink-2); margin: 12px 0 22px; }
.inval-copy .btn + .btn { margin-left: 8px; }
.inval-stage { position: relative; }
.toast { border: 1px solid color-mix(in srgb, var(--wait) 55%, transparent); background: color-mix(in srgb, var(--wait) 10%, var(--panel)); border-radius: 10px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; animation: logIn .3s ease both; }
.toast b { color: var(--wait); }
.toast code { font-size: 12px; }
.mems { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mems li { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--panel); transition: border-color .4s, background .4s, opacity .4s; }
.mems li div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.mems li div b { font-family: var(--mono); font-weight: 600; }
.mems li div span { color: var(--mute); }
.mems li p { margin: 6px 0 8px; font-size: 15px; }
.mems li > code { font-size: 11.5px; color: var(--mute); background: none; border: 0; padding: 0; }
.mems li.stale { border-color: color-mix(in srgb, var(--wait) 55%, transparent); background: color-mix(in srgb, var(--wait) 6%, var(--panel)); }
.mems li.stale p { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--wait); }
.mems li.stale div span::after { content: "  stale: source changed"; color: var(--wait); font-weight: 600; }

/* architecture */
.arch { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: var(--bg-2); display: grid; gap: 12px; }
.arch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.arch-row span { flex: 1; text-align: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 14.5px; color: var(--ink-2); background: var(--panel); min-width: 160px; }
.arch-arrow { text-align: center; font: 500 12px var(--mono); color: var(--mute); position: relative; padding: 4px 0; }
.arch-gw span { border-color: var(--line-2); color: var(--ink); }
.arch-label { font: 600 13px var(--sans); color: var(--teal-2); margin-bottom: 10px; }
.arch-kernel { border: 1px solid color-mix(in srgb, var(--teal) 55%, transparent); background: var(--teal-bg); border-radius: 10px; padding: 18px; }
.arch-kernel ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.arch-kernel li { padding: 10px; text-align: center; font-size: 13.5px; border-radius: 7px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid color-mix(in srgb, var(--teal) 25%, transparent); }
.arch-planes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.arch-planes > div { border: 1px solid var(--line-2); border-radius: 10px; padding: 16px; background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.arch-planes .arch-label { color: var(--ink); }
.arch-planes span { font-size: 13.5px; color: var(--ink-2); padding: 6px 10px; border-radius: 6px; background: var(--panel-2); }
.arch-disk span { font: 500 13px var(--mono); border-style: dashed; }

.kgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--line); }
.kcard { padding: 32px 32px 32px 0; border-bottom: 1px solid var(--line); }
.kcard:nth-child(even) { padding: 32px 0 32px 32px; border-left: 1px solid var(--line); }
.kcard > p { color: var(--ink-2); margin-top: 10px; font-size: 15.5px; }
.states { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.st { font: 600 11px var(--mono); padding: 4px 8px; border-radius: 5px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.st-run { color: var(--run); } .st-wait { color: var(--wait); } .st-pause { color: var(--pause); } .st-fail { color: var(--fail); } .st-done { color: var(--done); } .st-term { color: var(--mute); }
.evs { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.evs li { font: 500 12px var(--mono); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); }

/* cli */
.cli-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.cli-grid > div > p { color: var(--ink-2); margin-top: 18px; font-size: 17px; }
.boot { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: b; display: grid; gap: 0; }
.boot li { counter-increment: b; display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; color: var(--ink-2); }
.boot li::before { content: counter(b); font: 600 12px var(--mono); color: var(--mute); width: 18px; }
.boot li:last-child { color: var(--teal-2); font-weight: 600; border-bottom: 0; }
.term { border: 1px solid var(--line-2); border-radius: var(--r); background: #0A0E10; overflow: hidden; }
.term-tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.term-tabs button { font: 500 13px var(--mono); color: var(--mute); background: none; border: 0; padding: 7px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.term-tabs button:hover { color: var(--ink); }
.term-tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); }
.term-out { margin: 0; padding: 20px 22px; font: 400 13px/1.7 var(--mono); color: var(--ink-2); min-height: 340px; white-space: pre; overflow-x: auto; }
.term-out .pr { color: var(--teal-2); }
.term-out .dim { color: var(--mute); }
.term-out .g { color: var(--run); } .term-out .y { color: var(--wait); } .term-out .r { color: var(--fail); } .term-out .b { color: var(--pause); }

/* threats */
.threats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.threat { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.threat:nth-child(odd) { padding-right: 32px; }
.threat:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
.threat b { font-size: 16px; }
.threat span { color: var(--ink-2); font-size: 15px; }

/* build */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 48px; border-block: 1px solid var(--line); }
.stats div { padding: 26px 0; display: flex; flex-direction: column-reverse; gap: 4px; }
.stats div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.stats dt { color: var(--mute); font-size: 14px; }
.stats dd { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.splits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.split-card { border: 1px solid var(--line); border-radius: var(--r); padding: 22px; background: var(--panel); display: flex; flex-direction: column; gap: 10px; }
.split-id { font: 700 13px var(--mono); color: var(--teal-2); }
.split-card h3 { font-size: 18px; }
.split-card > p:not(.split-id):not(.split-paths) { color: var(--ink-2); font-size: 14.5px; }
.split-paths { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.split-paths code { font-size: 11.5px; }
.stack { margin-top: 56px; }
.stack ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.innov { margin-top: 64px; }
.innov > p { margin-top: 8px; }
.innov-list { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: iv; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.innov-list li { counter-increment: iv; display: grid; grid-template-columns: 34px 1fr; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
.innov-list li::before { content: counter(iv, decimal-leading-zero); font: 500 12.5px/1.9 var(--mono); color: var(--mute); }
.innov-list b { color: var(--ink); font-weight: 600; }
.quick { margin-top: 64px; }
.quick h3 { margin-bottom: 14px; }

/* close */
.close { padding: 160px 0 120px; }
.close-words { font-size: clamp(34px, 5.4vw, 72px); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; max-width: 16em; }
.close-words span { color: var(--line-2); transition: color .5s ease; }
.close-words span.lit { color: var(--ink); }
.close-words span.close-last.lit { color: var(--teal-2); }
.close-sub { margin-top: 28px; font-size: 20px; color: var(--ink-2); max-width: 32em; }

.foot { border-top: 1px solid var(--line); padding: 32px 0; }
.foot-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot p { color: var(--mute); font-size: 14px; flex: 1; min-width: 240px; }
.foot a { font-size: 14px; }

/* grid children may hold pre/code; never let them force the track wider */
.hero-grid > *, .split > *, .retrieval > *, .fw-grid > *, .inval > *, .cli-grid > *, .map > *, .kgrid > *, .threats > *, .fs > *, .console-body > * { min-width: 0; }

/* responsive */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .console-body { grid-template-columns: 1fr 1fr; }
  .pane-focus { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--line); }
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pipeline li:nth-child(4) { border-right: 0; }
  .pipeline li:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .arch-kernel ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .arch-planes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .splits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { padding: 40px 0 72px; }
  .hero-grid, .split, .retrieval, .fw-grid, .inval, .cli-grid, .map { grid-template-columns: minmax(0, 1fr); }
  .sec-firewall .fw-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { min-height: 0; margin-top: 12px; padding-bottom: 0; }
  .aips { position: relative; left: 0; right: 0; bottom: 0; margin-top: -60px; }
  .map-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
  .map-detail { padding: 24px 20px; }
  .console-body { grid-template-columns: 1fr; min-height: 0; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--line); }
  .log { max-height: 320px; }
  .fs { grid-template-columns: 1fr; }
  .fs-tree { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
  .fs-doc { padding: 22px 20px; }
  .tiers { grid-template-columns: 1fr; }
  .tier + .tier { border-left: 0; border-top: 1px solid var(--line); }
  .ops { grid-template-columns: 1fr; }
  .kgrid, .threats, .innov-list { grid-template-columns: minmax(0, 1fr); }
  .kcard, .kcard:nth-child(even) { padding: 26px 0; border-left: 0; }
  .threat, .threat:nth-child(odd), .threat:nth-child(even) { padding: 16px 0; border-left: 0; grid-template-columns: 1fr; gap: 4px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div + div { padding-left: 0; border-left: 0; }
  .stats div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline li { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .pipeline li:last-child { border-bottom: 0; }
  .hit { grid-template-columns: 1fr; }
  .bars { grid-column: 1; grid-row: auto; }
  .sec { padding-top: 88px; }
  .goal { grid-template-columns: 1fr; padding: 18px; }
  .goal-meta { grid-column: 1; }
  .console-top { padding: 12px 16px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .splits { grid-template-columns: 1fr; }
  .arch-kernel ul, .arch-planes { grid-template-columns: 1fr 1fr; }
  .arch-row span { min-width: 0; flex-basis: 100%; }
  .mosaic { gap: 3px; }
  .aips-table th:nth-child(5), .aips-table td:nth-child(5) { display: none; }
  .hero-facts { gap: 22px; }
  .hero-facts dd { font-size: 28px; }
  .nav-gh { padding: 0 12px; }
  .map-row { grid-template-columns: 1fr 18px 1fr; padding: 12px 14px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
