/* KH Labs Agent Gateway: page CSS only for what sits inside the visuals (the reel, the gate windows,
   the playground, the attack list). Tokens come from system.css; verdict colours are the only extra hues. */
/* page palette, repeated from index.html for tools that read stylesheets only */
:root {
  --p-bg: #08090b; --p-surface: #101216; --p-ink: #eef0f3; --p-muted: #8d939c;
  --p-accent: #2f8cff; --p-accent-ink: #000000; --p-action: #2f8cff; --p-action-ink: #000000;
  --p-inv-bg: #eef0f3; --p-inv-surface: #dbdde0; --p-inv-ink: #08090b; --p-inv-muted: #535558;
  --p-inv-accent: #08090b; --p-inv-accent-ink: #eef0f3; --p-inv-action: #08090b; --p-inv-action-ink: #eef0f3;
  --font-display: "Geist", system-ui, sans-serif;
  --font-text: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.045em;
  --ly-scale: 0.98;
}
:root {
  --ok: #3ddc97;      /* allowed */
  --hold: #f5b942;    /* held for a person */
  --bad: #ff5c5c;     /* blocked */
  --sig: #2f8cff;     /* the one colour moment: the request in flight */
  --raise: #101216;
  --raise-2: #16191e;
  --hair: rgba(238, 240, 243, .09);
  --hair-2: rgba(238, 240, 243, .18);
  --ease-x: cubic-bezier(.16, 1, .3, 1);
}
/* the ui fragments (reel, playground) take the page palette, also before system.js runs */
.ui { --fx-bg: #101216; --fx-surface: #16191e; --fx-ink: #eef0f3; --fx-muted: #8d939c; --fx-accent: #2f8cff; --fx-accent-ink: #04101f; }
.hero__media { background: transparent; }
.mono, code, .sc-call, .gw__kv dd, .gw__out, .try__args, .try__rule, .try__blocks { font-family: var(--font-mono); }

/* ================================================================ the reel (hero frame) */
.hero__media .reel { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--raise); border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; color: var(--ink); font-family: var(--font-text); }
.reel__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-2) var(--s-5); box-sizing: border-box; height: 48px; border-bottom: 1px solid var(--hair); font-size: 13px; color: var(--muted); flex: none; }
.reel__src { display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel__live { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.reel__ch { color: var(--ink); font-weight: 500; white-space: nowrap; }
.reel__stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.reel__canvas { position: absolute; left: 50%; top: 50%; width: 600px; height: 560px; transform: translate(-50%, -50%) scale(var(--k, 1)); transform-origin: 50% 50%; }
.reel__rail { flex: none; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; padding: 0 64px 0 var(--s-5); height: 56px; align-items: center; border-top: 1px solid var(--hair); }
.reel__seg { position: relative; height: 44px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font: 500 12px/1 var(--font-text); text-align: left; }
.reel__seg::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--hair-2); }
.reel__seg i { position: absolute; left: 0; top: 10px; height: 2px; width: 100%; background: var(--ok); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.reel__seg span { position: absolute; left: 0; top: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.reel__seg.is-on { color: var(--ink); }
.reel__pause { position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; cursor: pointer; }
.reel__pause svg { width: 12px; height: 12px; fill: currentColor; }
.reel__pause .i-play { display: none; }
.reel__pause[aria-pressed="true"] .i-play { display: block; }
.reel__pause[aria-pressed="true"] .i-pause { display: none; }

/* scenes: a 600x560 canvas, one thing at a time */
.sc { position: absolute; inset: 0; padding: 28px 32px; }
.sc > * { margin: 0; }
.sc--static { display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.sc-kicker { font-size: 14px; color: var(--muted); font-weight: 500; }
.sc-title { font-family: var(--font-display); font-size: 44px; line-height: 1.04; letter-spacing: -0.03em; color: var(--ink); max-width: 15ch; }
.sc-ticket { font-family: var(--font-display); font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
.sc-call { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--raise-2); font-size: 15px; }
.sc-call__tool { color: var(--ok); font-weight: 500; }
.sc-call__args { color: var(--ink); opacity: .82; font-size: 14px; }
.sc-gates { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: 14px; }
.sc-gates li { padding: 10px 12px; border: 1px solid var(--hair-2); border-radius: 6px; color: var(--muted); }
.sc-gates li.is-pass { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.sc-gates li.is-hold { color: var(--hold); border-color: var(--hold); }
.sc-rule { font-family: var(--font-mono); font-size: 18px; }
.sc-rule--hold { color: var(--hold); }
.sc-note { font-size: 15px; color: var(--muted); }

.reel__canvas.is-instant, .reel__canvas.is-instant * { transition: none !important; }
/* live scene parts (story.js builds them) */
.st-layer { position: absolute; inset: 0; }
.st-fade { transition: opacity .5s var(--ease-x), transform .7s var(--ease-x); }
.st-hide { opacity: 0; transform: translateY(14px); }
.st-ticket { position: absolute; left: 32px; right: 32px; top: 60px; }
.st-ticket .sc-kicker { margin-bottom: 14px; }
.st-agent { position: absolute; left: 32px; right: 32px; bottom: 36px; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.st-dots { display: inline-flex; gap: 4px; }
.st-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sig); }
.st-dots i:nth-child(2) { opacity: .6; } .st-dots i:nth-child(3) { opacity: .3; }
.st-callcard { position: absolute; left: 32px; top: 230px; width: 536px; transition: transform 1.1s cubic-bezier(.65, 0, .35, 1), opacity .5s ease, width .0s; }
.st-path { position: absolute; inset: 0; pointer-events: none; }
.st-path path { fill: none; stroke: var(--hair-2); stroke-width: 2; stroke-dasharray: 4 6; }

/* the pipeline: four gates across the canvas */
.pl { position: absolute; left: 32px; right: 32px; top: 64px; height: 120px; }
.pl__line { position: absolute; left: 0; right: 0; top: 58px; height: 2px; background: var(--hair-2); }
.pl__gates { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pl__g { position: relative; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--raise); padding: 12px; display: flex; flex-direction: column; justify-content: space-between; transition: border-color .35s ease, background-color .35s ease, color .35s ease; color: var(--muted); }
.pl__g b { font-weight: 500; font-size: 15px; color: inherit; }
.pl__g small { font-size: 12px; }
.pl__g.is-run { border-color: var(--ink); color: var(--ink); }
.pl__g.is-pass { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.pl__g.is-hold { border-color: var(--hold); color: var(--hold); background: color-mix(in srgb, var(--hold) 10%, var(--raise)); }
.pl__g.is-fail { border-color: var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--raise)); }
.pl__g.is-skip { opacity: .4; }
.pl__chip { position: absolute; top: 46px; left: 0; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--ink); color: var(--bg); font: 500 12px/26px var(--font-mono); white-space: nowrap; transform: translateX(var(--x, -20px)); transition: transform .8s cubic-bezier(.65, 0, .35, 1), opacity .3s ease; z-index: 2; }
.pl__chip.is-hold { background: var(--hold); }
.pl__chip.is-bad { background: var(--bad); }
.st-detail { position: absolute; left: 32px; right: 32px; top: 214px; bottom: 28px; }
.st-big { font-family: var(--font-display); font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 14px; }
.st-rule { font-family: var(--font-mono); font-size: 19px; line-height: 1.35; margin: 0; }
.st-rule.ok { color: var(--ok); } .st-rule.hold { color: var(--hold); } .st-rule.bad { color: var(--bad); }
.st-sub { font-size: 16px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.st-factors { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.st-factors li { display: flex; gap: 10px; color: var(--ink); }
.st-factors b { font-family: var(--font-mono); font-weight: 500; color: var(--hold); min-width: 36px; }
.st-risk { display: flex; gap: 24px; align-items: flex-start; }

/* gauge (shared: reel, gate windows, playground) */
.gauge { position: relative; width: 132px; flex: none; }
.gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge path { fill: none; stroke-width: 9; stroke-linecap: round; }
.gauge__bg { stroke: var(--hair-2); }
.gauge__fg { stroke: var(--gc, var(--ok)); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--v, 0)); transition: stroke-dashoffset 1.1s var(--ease-x), stroke .3s ease; }
.gauge__n { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 400 34px/1 var(--font-display); letter-spacing: -0.02em; color: var(--gc, var(--ok)); }
.gauge[data-d="held"] { --gc: var(--hold); } .gauge[data-d="blocked"] { --gc: var(--bad); }
.gauge--sm { width: 96px; } .gauge--sm .gauge__n { font-size: 26px; }

/* approval tray + cursor */
.st-tray { position: absolute; left: 32px; right: 32px; bottom: 28px; align-content: start; padding: 16px 18px; border: 1px solid var(--hold); border-radius: 10px; background: color-mix(in srgb, var(--hold) 7%, var(--raise)); display: grid; gap: 10px; }
.st-tray__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.st-tray__amt { font: 400 34px/1 var(--font-display); letter-spacing: -0.02em; }
.st-tray__who { font-size: 14px; color: var(--muted); }
.st-tray__note { min-height: 40px; padding: 9px 12px; border: 1px solid var(--hair-2); border-radius: 6px; font-size: 15px; color: var(--ink); background: var(--bg); }
.st-tray__note:empty::before { content: "Note for the audit log"; color: var(--muted); }
.st-tray__act { display: flex; justify-content: flex-end; gap: 8px; }
.st-tray__btn { height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--hair-2); font: 500 14px/34px var(--font-text); color: var(--ink); }
.st-tray__btn--ok { background: var(--ok); color: var(--bg); border-color: var(--ok); transition: transform .09s ease; }
.st-tray__btn--ok.is-press { transform: scale(.95); }
.st-tray.is-done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--raise)); }
.st-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 5; transform: translate(var(--cx, 600px), var(--cy, 560px)); transition: transform 1s cubic-bezier(.65, 0, .35, 1); pointer-events: none; }
.st-cursor svg { width: 22px; height: 22px; fill: var(--ink); stroke: var(--bg); stroke-width: 1.2; }
.st-banner { position: absolute; left: 32px; right: 32px; top: 18px; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--hold); border: 1px dashed color-mix(in srgb, var(--hold) 60%, transparent); }
.st-shard { position: absolute; width: 22px; height: 12px; border-radius: 3px; background: var(--bad); transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .9s ease; }

/* audit chain */
.ch { position: absolute; left: 32px; right: 32px; top: 70px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 22px; }
.ch__b { position: relative; padding: 10px 12px; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--raise-2); font-size: 13px; min-height: 104px; display: flex; flex-direction: column; gap: 4px; transition: border-color .3s ease, background-color .3s ease; }
.ch__b b { font: 400 22px/1 var(--font-display); }
.ch__t { color: var(--muted); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch__d { font-size: 13px; }
.ch__h { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: auto; }
.ch__b::after { content: ""; position: absolute; left: 100%; top: 50%; width: 22px; height: 2px; background: var(--hair-2); transition: background-color .3s ease, transform .5s var(--ease-x); }
.ch__b:nth-child(4n)::after { display: none; }
.ch__b.is-ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.ch__b.is-ok::after { background: var(--ok); }
.ch__b.is-edit { border-color: var(--hold); }
.ch__b.is-bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--raise-2)); }
.ch__b.is-cut::before { content: ""; position: absolute; right: 100%; top: 50%; width: 22px; height: 2px; background: var(--bad); transform: rotate(18deg); transform-origin: 100% 50%; }
.ch__b.is-scan { box-shadow: 0 0 0 2px var(--ink); }
.ch__amt.is-edit { color: var(--hold); }
.st-verify { position: absolute; left: 32px; right: 32px; bottom: 28px; }

/* red-team volley */
.rt { position: absolute; inset: 0; }
.rt__wall { position: absolute; right: 120px; top: 60px; bottom: 150px; width: 6px; border-radius: 3px; background: var(--ok); }
.rt__shot { position: absolute; left: 32px; height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--hair-2); background: var(--raise-2); font-size: 12px; line-height: 22px; white-space: nowrap; color: var(--ink); transition: transform .55s cubic-bezier(.5, 0, .75, 0), opacity .3s ease; }
.rt__shot.is-hit { opacity: .0; }
.rt__stamp { position: absolute; right: 18px; font: 500 11px/20px var(--font-mono); padding: 0 6px; border-radius: 4px; transition: opacity .3s ease; }
.rt__stamp.BLOCKED { color: var(--bad); } .rt__stamp.HELD { color: var(--hold); } .rt__stamp.MASKED { color: var(--ok); }
.rt__count { position: absolute; left: 32px; right: 32px; bottom: 30px; display: flex; align-items: baseline; gap: 18px; }
.rt__num { font: 400 88px/0.9 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.rt__num small { font-size: 36px; color: var(--muted); }
.rt__cap { font-size: 16px; color: var(--muted); line-height: 1.4; }
.rt__cap b { color: var(--ink); font-weight: 500; }

/* shadow mode */
.shd { position: absolute; left: 32px; right: 32px; top: 64px; display: grid; gap: 10px; }
.shd__lane { position: relative; height: 44px; border: 1px solid var(--hair-2); border-radius: 8px; overflow: hidden; }
.shd__lane b { position: absolute; left: 12px; top: 12px; font: 500 13px/20px var(--font-text); z-index: 2; background: var(--raise); padding-right: 8px; }
.shd__dot { position: absolute; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.shd__dot.held { background: var(--hold); } .shd__dot.blocked { background: var(--bad); }
.shd__tiles { position: absolute; left: 32px; right: 32px; top: 200px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shd__t { padding: 14px 16px; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--raise-2); }
.shd__t b { display: block; font: 400 44px/1 var(--font-display); letter-spacing: -0.03em; }
.shd__t span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.35; }
.shd__t.up b { color: var(--hold); } .shd__t.down b { color: var(--bad); }
.shd__diff { position: absolute; left: 32px; right: 32px; bottom: 28px; font: 12px/1.6 var(--font-mono); }
.shd__diff div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shd__diff .a { color: var(--ok); } .shd__diff .d { color: var(--bad); }

/* kill switch */
.kl__switch { position: absolute; left: 32px; top: 70px; width: 200px; height: 96px; border-radius: 48px; border: 2px solid var(--bad); }
.kl__knob { position: absolute; left: 8px; top: 8px; width: 76px; height: 76px; border-radius: 50%; background: var(--bad); transition: transform .45s var(--ease-x); }
.kl.is-on .kl__switch { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.kl.is-on .kl__knob { transform: translateX(100px); }
.kl__token { position: absolute; left: 264px; top: 84px; right: 32px; }
.kl__token code { display: inline-block; font-size: 26px; color: var(--ok); transition: color .4s ease, opacity .4s ease; }
.kl.is-on .kl__token code { color: var(--muted); text-decoration: line-through; opacity: .7; }
.kl__lanes { position: absolute; left: 32px; right: 32px; top: 200px; display: grid; gap: 10px; }
.kl__lane { position: relative; height: 34px; border-bottom: 1px solid var(--hair); }
.kl__call { position: absolute; top: 4px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--ink); color: var(--bg); font: 500 12px/26px var(--font-mono); white-space: nowrap; transition: background-color .3s ease, color .3s ease; }
.kl.is-on .kl__call { background: var(--raise-2); color: var(--muted); }

.st-end { position: absolute; inset: 0; padding: 60px 32px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.st-end__row { display: flex; gap: 12px; flex-wrap: wrap; }
.st-end__btn { height: 44px; padding: 0 20px; border-radius: 22px; border: 1px solid var(--hair-2); background: none; color: var(--ink); font: 500 16px/42px var(--font-text); cursor: pointer; text-decoration: none; }
.st-end__btn:hover { border-color: var(--ink); }

.st-risk + .st-rule { margin-top: 18px; }

/* the phone frame: a 600x400 canvas at about 0.57, so only the big lines stay, set larger */
.reel--phone .reel__canvas { height: 400px; }
.reel--phone .sc { padding: 16px 24px; }
.reel--phone .st-sub, .reel--phone .st-factors, .reel--phone .pl__g small, .reel--phone .st-path, .reel--phone .ch__t, .reel--phone .ch__h,
.reel--phone .shd__diff, .reel--phone .st-tray__who, .reel--phone .st-tray > .st-sub, .reel--phone .kl__lane:nth-child(3), .reel--phone .rt__stamp { display: none; }
.reel--phone .sc-kicker { font-size: 22px; }
.reel--phone .sc-ticket { font-size: 46px !important; }
.reel--phone .st-ticket { top: 24px !important; left: 24px; right: 24px; }
.reel--phone .st-agent { bottom: 16px; font-size: 24px; }
.reel--phone .st-callcard { top: 196px; left: 24px; width: 552px; }
.reel--phone .sc-call { font-size: 26px; }
.reel--phone .sc-call__args { font-size: 22px; }
.reel--phone .pl { top: 16px !important; left: 24px; right: 24px; height: 104px; }
.reel--phone .pl__g { padding: 12px; justify-content: flex-start; }
.reel--phone .pl__g b { font-size: 22px; line-height: 1.05; }
.reel--phone .pl__chip { top: 60px; height: 36px; line-height: 36px; font-size: 19px; border-radius: 18px; }
.reel--phone .pl__line { top: 78px; }
.reel--phone .st-detail { top: 146px !important; left: 24px; right: 24px; bottom: 8px; }
.reel--phone .st-big { font-size: 60px; margin-bottom: 12px; }
.reel--phone .st-rule { font-size: 31px; line-height: 1.2; overflow-wrap: anywhere; }
.reel--phone .gauge { width: 150px; } .reel--phone .gauge__n { font-size: 46px; }
.reel--phone .st-risk + .st-rule { margin-top: 10px; }
.reel--phone .st-tray { top: 140px !important; bottom: 12px; left: 24px; right: 24px; gap: 12px; }
.reel--phone .st-tray__amt { font-size: 52px; }
.reel--phone .st-tray__note { font-size: 24px; min-height: 64px; }
.reel--phone .st-tray__btn { height: 52px; line-height: 50px; font-size: 22px; padding: 0 24px; border-radius: 26px; }
.reel--phone .st-banner { top: 4px; font-size: 18px; padding: 4px 10px; left: 24px; right: 24px; }
.reel--phone .ch { top: 64px; left: 24px; right: 24px; gap: 22px 18px; }
.reel--phone .ch__b { min-height: 84px; }
.reel--phone .ch__b b { font-size: 34px; }
.reel--phone .ch__d { font-size: 20px; }
.reel--phone .ch__b::after { width: 18px; }
.reel--phone .st-verify { bottom: 8px; left: 24px; right: 24px; }
.reel--phone .st-verify .st-big { font-size: 40px; margin-bottom: 6px; }
.reel--phone .st-verify .st-rule { font-size: 24px; }
.reel--phone .rt__wall { top: 16px; bottom: 150px; right: 40px; }
.reel--phone .rt__shot { font-size: 20px; height: 32px; line-height: 30px; border-radius: 16px; width: 300px !important; }
.reel--phone .rt__count { bottom: 10px; }
.reel--phone .rt__num { font-size: 120px; }
.reel--phone .rt__num small { font-size: 48px; }
.reel--phone .rt__cap { font-size: 24px; }
.reel--phone .shd { top: 16px; left: 24px; right: 24px; }
.reel--phone .shd__lane b { font-size: 20px; top: 10px; }
.reel--phone .shd__tiles { top: 132px; left: 24px; right: 24px; }
.reel--phone .shd__t { padding: 12px 14px; }
.reel--phone .shd__t b { font-size: 52px; }
.reel--phone .shd__t span { font-size: 20px; }
.reel--phone .kl__switch { top: 16px; left: 24px; }
.reel--phone .kl__token { top: 24px; left: 260px; }
.reel--phone .kl__token code { font-size: 36px; }
.reel--phone .kl__lanes { top: 132px; left: 24px; right: 24px; }
.reel--phone .kl__call { font-size: 19px; height: 34px; line-height: 34px; border-radius: 17px; }
.reel--phone .kl .sc-kicker { font-size: 20px; }
.reel--phone .kl ~ .st-detail { top: 232px !important; }
.reel--phone .st-end { padding: 24px; }
.reel--phone .sc-title { font-size: 60px; }
.reel--phone .st-end__btn { height: 60px; line-height: 58px; font-size: 24px; padding: 0 28px; border-radius: 30px; }
.reel--phone .sc--static { gap: 14px; padding: 16px 24px; }

/* ================================================================ gate windows (pinned-chapters figures) */
.gw { width: 100%; max-width: 560px; display: grid; gap: var(--s-5); padding: var(--s-5); border: 1px solid var(--hair-2); border-radius: 10px; background: var(--raise); color: var(--ink); font-size: 15px; }
.gw__rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 13px; }
.gw__rail li { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--hair-2); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw__rail li.is-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.gw__rail li.is-on { color: var(--ink); border-color: var(--ink); }
.gw__rail li.is-on.is-hold { color: var(--hold); border-color: var(--hold); }
.gw__body { display: grid; gap: var(--s-3); }
.gw__body--risk { grid-template-columns: auto 1fr; align-items: center; column-gap: var(--s-5); }
.gw__body--risk .gw__out { grid-column: 1 / -1; }
.gw__k { margin: 0; font-size: 13px; color: var(--muted); }
.gw__kv { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.gw__kv dt { color: var(--muted); font-size: 14px; }
.gw__kv dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.gw__m { color: var(--muted); margin-left: 8px; }
.gw__quote { margin: 0; font-style: italic; font-size: 16px; }
.gw__factors { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.gw__factors b { display: inline-block; min-width: 34px; font-family: var(--font-mono); font-weight: 500; color: var(--hold); }
.gw__out { margin: 0; font-size: 14px; padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.gw__out--pass { color: var(--ok); } .gw__out--hold { color: var(--hold); }
.gw .gauge { --gc: var(--hold); }

/* ================================================================ the playground (app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--raise); border: 1px solid var(--hair-2); border-radius: 10px; }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--hair); }
.try__lead { margin: 0; }
.try__controls { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-5); overflow: auto; }
.try__group { display: grid; gap: var(--s-3); }
.try__group + .try__group { padding-top: var(--s-5); border-top: 1px solid var(--hair); }
.try__row { display: grid; gap: var(--s-2); }
.try__label { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.try__label output { font: 400 22px/1 var(--font-display); color: var(--ink); letter-spacing: -0.02em; }
.try__select, .try__pol input { height: 44px; padding: 0 12px; border: 1px solid var(--hair-2); border-radius: 6px; background: var(--bg); color: var(--ink); font: 16px var(--font-text); min-width: 0; }
.try__range { width: 100%; height: 44px; accent-color: var(--ok); margin: 0; }
.try__send { justify-self: start; }
.try__miniv { display: none; margin: 0; font: 14px/1.4 var(--font-mono); overflow-wrap: anywhere; }
.try__miniv[data-d="allowed"] { color: var(--ok); } .try__miniv[data-d="held"] { color: var(--hold); } .try__miniv[data-d="blocked"] { color: var(--bad); }
@media (max-width: 1023px) { .try__miniv { display: block; } }
.try__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.try__chip { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--hair-2); background: none; color: var(--ink); font: 500 14px var(--font-text); cursor: pointer; transition: border-color .15s ease, transform .09s ease; }
.try__chip:hover { border-color: var(--ink); }
.try__chip:active { transform: scale(.97); }
.try__pol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.try__f { display: grid; gap: 6px; min-width: 0; }
.try__f input { width: 100%; }
.try__pol label { font: 13px var(--font-mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.try__spacer { flex: 1 1 auto; }
.try__chainbtns { align-items: center; }
.try__killrow { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.try__kill { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--bad); background: none; color: var(--bad); font: 500 15px var(--font-text); cursor: pointer; transition: background-color .15s ease, color .15s ease, transform .09s ease; }
.try__kill:active { transform: scale(.97); }
.try__kill[aria-pressed="true"] { background: var(--bad); color: var(--bg); }
.try__token { font: 13px var(--font-mono); color: var(--ok); }
.try__token.is-off { color: var(--muted); text-decoration: line-through; }
.try__out { padding: var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); overflow: auto; }
.try__call { display: grid; gap: 4px; }
.try__tool { font: 500 15px var(--font-mono); color: var(--ok); }
.try__args { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.try__gates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.try__gates li { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--hair-2); border-radius: 6px; min-height: 76px; align-content: start; }
.try__gname { font-size: 13px; font-weight: 500; }
.try__gd { font: 12px/1.35 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.try__gates li[data-st="pass"] { border-color: color-mix(in srgb, var(--ok) 55%, transparent); } .try__gates li[data-st="pass"] .try__gname { color: var(--ok); }
.try__gates li[data-st="hold"] { border-color: var(--hold); } .try__gates li[data-st="hold"] .try__gname { color: var(--hold); }
.try__gates li[data-st="fail"] { border-color: var(--bad); } .try__gates li[data-st="fail"] .try__gname { color: var(--bad); }
.try__gates li[data-st="skip"] { opacity: .45; }
.try__verdict { display: grid; grid-template-columns: 1fr auto; column-gap: var(--s-5); row-gap: 4px; align-items: start; padding: var(--s-4) 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.try__verdict .gauge { grid-column: 2; grid-row: 1 / span 3; }
.try__tag { margin: 0; font: 400 40px/1 var(--font-display); letter-spacing: -0.03em; transition: color .2s ease; }
.try__verdict[data-d="allowed"] .try__tag { color: var(--ok); } .try__verdict[data-d="held"] .try__tag { color: var(--hold); } .try__verdict[data-d="blocked"] .try__tag { color: var(--bad); }
.try__rule { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.try__reason { margin: 0; font-size: 15px; color: var(--muted); }
.try__verdict.is-flip .try__tag { animation: try-flip .4s var(--ease-x); }
@keyframes try-flip { from { opacity: .2; transform: translateY(6px); } }
.try__cs { font-weight: 400; }
.try__cs.ok { color: var(--ok); } .try__cs.bad { color: var(--bad); }
.try__blocks { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; gap: 10px; font-size: 12px; overflow: hidden; }
.try__blocks li { flex: 0 0 auto; width: 120px; padding: 8px; border: 1px solid var(--hair-2); border-radius: 6px; display: grid; gap: 2px; position: relative; }
.try__blocks li + li::before { content: ""; position: absolute; right: 100%; top: 50%; width: 10px; height: 1px; background: var(--hair-2); }
.try__blocks li.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.try__blocks li.bad { border-color: var(--bad); }
.try__blocks b { font-family: var(--font-text); font-weight: 500; }
.try__blocks span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.try__chainbtns { display: flex; gap: 8px; margin-top: var(--s-3); flex-wrap: wrap; }
.try__mini { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--hair-2); background: none; color: var(--ink); font: 500 14px var(--font-text); cursor: pointer; }
.try__mini:hover { border-color: var(--ink); }

#gates .mo-pc__visual--lit { background: var(--raise-2); border: 1px solid var(--hair); }
#gates:not(.is-live) .mo-pc__visual--lit { aspect-ratio: auto; padding: var(--s-5); }

/* ================================================================ red-team list */
.rt-list { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--gutter); }
.rt-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 15px; }
.rt-list li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-list li em { font: normal 500 12px/22px var(--font-mono); flex: none; }
.rt-list li em.BLOCKED { color: var(--bad); } .rt-list li em.HELD { color: var(--hold); } .rt-list li em.MASKED { color: var(--ok); }
.proof__figs { margin-top: auto; padding-top: var(--s-7); }
.proof__figs .t-small { margin: var(--s-2) 0 0; }

/* ================================================================ console section */
.console-shot { display: block; margin-top: var(--s-7); flex: 1 1 0; min-height: 0; border-radius: 10px; overflow: hidden; border: 1px solid rgba(8, 9, 11, .18); }
.console-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* ================================================================ phones and tablets */
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--hair); }
  .rt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  #try { --hm: 2; } #gates { --hm: 2; }
  #proof { --hm: 2; }
  .reel__bar { padding: 6px var(--s-3); height: 36px; font-size: 12px; }
  .reel__src { display: none; }
  .reel__rail { height: 44px; padding: 0 52px 0 var(--s-3); }
  .reel__seg span { display: none; }
  .reel__seg::before, .reel__seg i { top: 21px; }
  .try__gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .try__tag { font-size: 32px; }
  .try__out { padding: var(--s-4); }
  .try__controls { padding: var(--s-4); }
  .rt-list { grid-template-columns: minmax(0, 1fr); }
  .rt-list li:nth-child(n+11) { display: none; }
  .gw { padding: var(--s-4); font-size: 14px; }
  .gw__rail { grid-template-columns: repeat(2, 1fr); }
  .gw__body--risk { grid-template-columns: 1fr; }
  .console-shot { flex: none; aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
  .st-fade, .st-callcard, .pl__chip, .gauge__fg, .st-cursor, .rt__shot, .st-shard, .kl__knob, .ch__b, .ch__b::after { transition: none !important; }
  .try__verdict.is-flip .try__tag { animation: none; }
}
.footer__note { margin: 0; max-width: 78ch; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* gate fixes: the static rows (no pin) stay inside two screens; long labels wrap on a phone */
#gates:not(.is-live) .mo-pc__steps { gap: var(--s-5); }
#gates:not(.is-live) .mo-pc__step { padding-top: var(--s-5); }
#gates:not(.is-live) .gw { gap: var(--s-3); padding: var(--s-4); }
#gates:not(.is-live) .gw__kv, #gates:not(.is-live) .gw__factors { gap: 2px 16px; }
.hero__kicker { white-space: normal; }
.reel__prog { display: none; position: relative; height: 2px; background: var(--hair-2); }
.reel__prog i { position: absolute; inset: 0; background: var(--ok); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
@media (max-width: 639px) {
  .reel__seg { display: none; }
  .reel__prog { display: block; grid-column: 1 / -1; }
  #contact .btn--xl { white-space: normal; height: auto; min-height: 64px; padding: 12px 20px; text-align: center; line-height: 1.25; max-width: 100%; }
}
@media (min-width: 1024px) {
  #gates:not(.is-live) { min-height: 200svh; }
  .try__controls { gap: var(--s-4); padding: var(--s-4) var(--s-5); }
  .try__group + .try__group { padding-top: var(--s-4); }
  .try__group { gap: var(--s-2); }
  .try__chip, .try__mini, .try__kill { min-height: 36px; }
  .try__chips { gap: 6px; }
  .try__select, .try__pol input { height: 38px; }
  .try__range { height: 28px; }
  .try__out { gap: var(--s-3); }
}
@media (max-width: 400px) {
  .hero .btn, .actionbar .btn { white-space: normal; height: auto; min-height: 44px; padding-block: 10px; text-align: center; line-height: 1.25; }
}
@media (max-width: 639px) {
  .console-shot { aspect-ratio: 4 / 5; }
  .console-shot img { object-position: 42% 0; }
}
@media (max-width: 639px) {
  #gates:not(.is-live) .gw__body > :not(.gw__out), #gates:not(.is-live) .gw__body--risk .gauge { display: none; }
  #gates:not(.is-live) .gw__body--risk { display: grid; grid-template-columns: 1fr; }
  #gates:not(.is-live) .gw { gap: var(--s-2); padding: var(--s-3); }
  #gates:not(.is-live) .gw__out { border-top: 0; padding-top: 0; }
  #gates:not(.is-live) .mo-pc__visual--lit { padding: var(--s-3); }
  .try__call, .try__blocks, .try__reason, .try__lead .link { display: none; }
  .try__controls, .try__out { gap: var(--s-3); }
  .try__group + .try__group { padding-top: var(--s-3); }
  .try__verdict { padding: var(--s-3) 0; }
}
@media (max-width: 639px) {
  #gates:not(.is-live) .mo-pc__steps { gap: var(--s-3); }
  #gates:not(.is-live) .mo-pc__step { padding-top: var(--s-3); gap: var(--s-1); }
  #gates .mo-pc__text { gap: var(--s-5); }
}
.st-quote { margin-top: 28px; padding: 16px 18px; border-left: 2px solid var(--bad); display: grid; gap: 8px; font: 400 22px/1.25 var(--font-display); color: var(--ink); }
.st-quote .sc-kicker { font: 500 14px/1.4 var(--font-text); }
.reel--phone .st-quote { display: none; }
.rt__grid { position: absolute; left: 32px; right: 32px; top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; font-size: 13px; }
.rt__grid span { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--hair); }
.rt__grid i { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt__grid b { font: 500 11px/18px var(--font-mono); }
.rt__grid b.BLOCKED { color: var(--bad); } .rt__grid b.HELD { color: var(--hold); } .rt__grid b.MASKED { color: var(--ok); }
.rt__wall { transition: opacity .4s ease; }
.reel--phone .rt__grid { top: 12px; left: 24px; right: 24px; font-size: 18px; gap: 0 18px; }
.reel--phone .rt__grid { display: none; }
.reel--phone .rt__grid b { font-size: 15px; line-height: 24px; }
.reel--phone .shd__t:nth-child(n+3) { display: none; }

/* the closing band keeps the page's one primary button (signal blue), not the ground's ink */
html[data-ground] footer.footer--statement { --action: var(--p-action); --action-ink: var(--p-action-ink); }
