/* TruDash landing · light control-room system.
   Default CSS = the final state of every scene (works without JS, for reduced motion and on phones).
   html.film = desktop scroll film; app.js sets the starting states and drives the timelines. */

:root {
  --bg: #ffffff; --bg-alt: #f8f9fa; --surface: #f6f7f8; --surface-2: #eff1f3;
  --grid: #eceef1; --line: #e3e6ea; --line-strong: #cdd2d8;
  --ink: #16191e; --ink-2: #434a55; --muted: #6b7280;
  --signal: #e6a328; --signal-ink: #8a5a12; --signal-soft: #fdf3dc; --signal-line: #f0d696;
  --ok: #1c784a; --ok-soft: #e9f6ee; --select: #3462d6;
  --slate: #1d2128; --slate-2: #262b33; --slate-line: #353b45; --slate-ink: #eef0f3; --slate-muted: #a3aab5;
  --shadow: 0 18px 40px -24px rgba(20, 25, 35, 0.35);
  --pad: clamp(16px, 5vw, 72px);
  --z-nav: 60; --z-skip: 80;
}
* { box-sizing: border-box; margin: 0; }
html.lenis, html.lenis body { height: auto; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; } button { font: inherit; color: inherit; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: var(--z-skip); background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; border-radius: 4px; }

/* ---------- nav + chapter bar ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: 92px; padding: 0 var(--pad) 32px; display: flex; align-items: center; gap: 20px; z-index: var(--z-nav); background: linear-gradient(rgba(255,255,255,.94) 60%, rgba(255,255,255,0)); transition: color .4s; }
.nav.dark { color: var(--slate-ink); background: linear-gradient(rgba(29,33,40,.94) 60%, rgba(29,33,40,0)); }
.brand { display: flex; gap: 8px; align-items: center; font-weight: 650; letter-spacing: -0.03em; font-size: 17px; text-decoration: none; }
.nav .sp { flex: 1; }
.btn { display: inline-flex; padding: 10px 15px; border-radius: 8px; font: 600 14px/1.2 "Geist"; background: var(--ink); color: #fff; text-decoration: none; white-space: nowrap; transition: transform .2s, box-shadow .2s; }
.btn:hover { box-shadow: 0 8px 20px -10px rgba(20,25,35,.6); } .btn:active { transform: translateY(1px); }
.nav.dark .btn { background: #fff; color: var(--ink); }
.ghost { display: inline-flex; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line-strong); font: 600 14px/1.2 "Geist"; text-decoration: none; background: var(--bg); }
.chap { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: var(--z-nav); display: flex; gap: 14px; }
.chap a { font: 11px "Geist Mono"; color: var(--muted); display: grid; gap: 6px; min-width: 68px; text-decoration: none; transition: color .3s; }
.chap a::before { content: ""; height: 2px; background: var(--line-strong); border-radius: 2px; transition: background .3s; }
.chap a.on { color: var(--ink); } .chap a.on::before { background: var(--signal); }
.chap.dark a { color: var(--slate-muted); } .chap.dark a.on { color: var(--slate-ink); } .chap.dark a::before { background: var(--slate-line); } .chap.dark a.on::before { background: var(--signal); }

/* ---------- type ---------- */
.kick { font: 12px "Geist Mono"; color: var(--signal-ink); display: inline-flex; gap: 8px; align-items: center; }
.kick::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
h1 { font-size: clamp(42px, 6vw, 88px); line-height: .96; letter-spacing: -0.05em; font-weight: 600; margin-top: 14px; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.2vw, 60px); line-height: 1; letter-spacing: -0.045em; font-weight: 600; text-wrap: balance; margin-top: 12px; }
.lede { font-size: clamp(16px, 1.35vw, 19px); color: var(--ink-2); max-width: 52ch; margin-top: 18px; text-wrap: pretty; }
.ctas { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- 01 hero ---------- */
.s1 { position: relative; overflow: hidden; background: var(--bg); }
.s1::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: 56px 56px; mask-image: radial-gradient(80% 70% at 60% 40%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(80% 70% at 60% 40%, #000 30%, transparent 80%); }
.s1-in { position: relative; padding: 128px var(--pad) 72px; display: grid; gap: clamp(32px, 4vw, 56px); transform-origin: 50% 0; }
.s1-copy { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; }
.s1-copy .kick { grid-column: 1 / -1; }
.s1-copy h1 { margin-top: 0; }
.s1-copy .lede { margin-top: 0; }
.s1-copy .ctas { margin-top: 0; }
.s1-copy .rt { display: grid; gap: 22px; padding-bottom: 6px; }
.hc { position: relative; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.85); padding: 20px 24px 14px; box-shadow: 0 40px 80px -50px rgba(20,25,35,.35); }
.hc .ro { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 10px; }
.hc .ro small { font-size: 12.5px; color: var(--muted); display: block; }
.hc .ro b { font-size: clamp(46px, 5.2vw, 80px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; display: block; }
.hc .ro .d { font: 600 14px "Geist Mono"; color: var(--ok); display: block; margin-top: 6px; min-height: 1.4em; }
.ask { display: inline-flex; gap: 7px; align-items: center; font: 600 12.5px "Geist"; padding: 7px 11px; border-radius: 7px; border: 1px solid var(--signal-line); background: var(--signal-soft); color: var(--signal-ink); white-space: nowrap; }
.ask.idle { background: var(--bg); border-color: var(--line-strong); color: var(--ink); }
.ask .spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: none; }
.ask.busy .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.plot { position: relative; }
.plot svg { width: 100%; height: auto; overflow: visible; display: block; }
.bridge { position: absolute; left: 7%; top: 0; width: min(420px, 44%); background: rgba(255,255,255,.96); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px 4px; box-shadow: var(--shadow); font-size: 12.5px; }
.bh { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; } .bh b { font-size: 13px; } .bh span { font-size: 10.5px; color: var(--muted); }
.br { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) 48px; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid var(--grid); }
.br small { display: block; font: 10px "Geist Mono"; color: var(--muted); }
.br b { font: 600 13px "Geist Mono"; text-align: right; color: var(--ok); }
.br.s b, .br.t b { color: var(--ink); } .br.t { border-top-color: var(--line-strong); font-weight: 600; }
.tr { position: relative; height: 11px; display: block; } .tr i { position: absolute; top: 0; bottom: 0; background: var(--ok); border-radius: 2px; transform-origin: left; }
.br.t .tr i { background: var(--ink); opacity: .18; }
.nb { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #fff; font: normal 600 9.5px "Geist Mono"; margin-right: 6px; vertical-align: 1px; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); display: grid; justify-items: center; gap: 6px; }
.scroll-hint::after { content: ""; width: 1px; height: 22px; background: var(--muted); animation: drip 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 02 one model ---------- */
.sm { position: relative; z-index: 2; height: 100vh; min-height: 640px; background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: 0 -30px 60px -30px rgba(20,25,35,.25); overflow: hidden; }
.sm-in { position: absolute; inset: 0; padding: 96px var(--pad) 22px; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; }
.sm::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(42% 46% at 50% 56%, rgba(52,98,214,.08), transparent 70%), radial-gradient(circle at 1px 1px, rgba(205,210,216,.7) 1px, transparent 1.6px) 0 0 / 26px 26px; }
.sm-head { text-align: center; position: relative; z-index: 2; }
.sm-head h2 { font-size: clamp(30px, 3.6vw, 54px); line-height: 1.02; }
.sm-head h2 em { font-style: normal; color: var(--muted); }
.sm-canvas { width: 100%; height: 100%; min-height: 0; max-height: calc(100vh - 250px); overflow: visible; position: relative; z-index: 1; }
.sm-cap { font-size: 11px; color: var(--muted); text-align: center; position: relative; z-index: 2; }
.sp rect { fill: rgba(255,255,255,.92); stroke: var(--line-strong); transition: stroke .3s; } .sp.hit rect { stroke: var(--signal); stroke-width: 1.6; }
.sp text.n { font: 600 13px "Geist"; fill: var(--ink); } .sp text.r { font: 10px "Geist Mono"; fill: var(--muted); }
.sp text.ck { font: 600 10px "Geist Mono"; fill: var(--ok); } .sp.warn text.ck { fill: var(--signal-ink); }
.sp circle.dt { fill: var(--ok); } .sp.warn circle.dt { fill: var(--signal); }
.lane { fill: none; stroke: var(--line-strong); stroke-width: 1.2; } .lane.hot { stroke: var(--signal); stroke-width: 2; }
.core-ring { fill: none; stroke: rgba(52,98,214,.35); stroke-width: 1.3; stroke-dasharray: 4 7; animation: ringspin 30s linear infinite; }
.core-ring.b { stroke: rgba(230,163,40,.45); stroke-dasharray: 2 9; animation-duration: 46s; animation-direction: reverse; }
@keyframes ringspin { to { stroke-dashoffset: -220; } }
.ln-out { fill: none; stroke: rgba(52,98,214,.4); stroke-width: 1.4; stroke-dasharray: 3 5; }
.gl-e { fill: none; stroke: var(--line-strong); stroke-width: 1.4; } .gl-e.on { stroke: var(--ok); stroke-width: 1.8; } .gl-e.hot { stroke: var(--signal); stroke-width: 2.6; }
.gl-el { font: 9.5px "Geist Mono"; fill: var(--muted); }
.gn circle.o { fill: #fff; stroke: var(--ok); stroke-width: 2.5; } .gn.kpi circle.o { fill: var(--ink); stroke: var(--ink); }
.gn circle.h { fill: var(--signal); opacity: 0; } .gn.hot circle.h { opacity: .25; }
.gn text.n { font: 600 13px "Geist"; fill: var(--ink); } .gn text.t { font: 10px "Geist Mono"; fill: var(--muted); }
.g-count { font: 10.5px "Geist Mono"; fill: var(--muted); } .g-count tspan.b { font: 600 16px "Geist"; fill: var(--ink); }
.mwipe { position: absolute; inset: 0; background: var(--bg-alt); clip-path: circle(0px at 50% 50%); pointer-events: none; z-index: 4; display: none; }
html.film .mwipe { display: block; }

/* ---------- 03 dashboard ---------- */
.s2 { position: relative; z-index: 2; background: var(--bg-alt); overflow: hidden; height: 100vh; min-height: 640px; }
.s2-head { position: absolute; top: 104px; left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; align-items: end; gap: 20px; z-index: 3; }
.s2-head h2 { max-width: 16ch; font-size: clamp(30px, 3.4vw, 48px); }
.tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.tabs span { font-size: 12.5px; padding: 6px 10px; border-radius: 7px; color: var(--muted); white-space: nowrap; transition: background .25s, color .25s; }
.tabs span.on { background: var(--ink); color: #fff; }
.track { position: absolute; left: 0; top: 240px; bottom: 30px; display: flex; }
.board { width: 100vw; height: 100%; padding: 0 var(--pad); flex: none; position: relative; }
.board-in { position: relative; height: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: clamp(124px, 15vh, 150px) minmax(0, 1fr); max-height: 520px; align-content: start; gap: 14px; }
.board-name { display: none; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px; position: relative; overflow: hidden; }
.tile .kl { font-size: 12.5px; color: var(--muted); } .tile .kv { font-size: clamp(24px, 2.4vw, 34px); font-weight: 550; letter-spacing: -0.035em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .kd { font: 600 12px "Geist Mono"; color: var(--ok); }
.tile svg { position: absolute; right: 14px; bottom: 14px; width: 42%; height: 34px; }
.tile svg path { fill: none; stroke: var(--ok); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.tile .flag { position: absolute; right: 12px; top: 12px; font: 600 10.5px "Geist Mono"; color: var(--signal-ink); background: var(--signal-soft); border: 1px solid var(--signal-line); border-radius: 6px; padding: 3px 7px; }
.wide { grid-column: span 2; position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.wide .ph { font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; } .wide .ph span { font: 10.5px "Geist Mono"; color: var(--muted); font-weight: 400; }
.wide svg { width: 100%; height: calc(100% - 30px); margin-top: 6px; overflow: visible; }
.wide.w3 { grid-column: span 3; } .wide.w1 { grid-column: span 1; }
.wide .lg { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 12px; font: 10.5px "Geist Mono"; color: var(--muted); }
.wide .lg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.ax { font: 10px "Geist Mono"; fill: #6b7280; }
.zoomfill { position: absolute; inset: 0; background: var(--slate); opacity: 0; pointer-events: none; z-index: 4; }

/* ---------- 04 agents (slate) ---------- */
.s3 { position: relative; height: 100vh; min-height: 640px; background: var(--slate); color: var(--slate-ink); overflow: hidden; }
.s3-in { position: absolute; inset: 0; padding: 120px var(--pad) 40px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.s3 .kick { color: var(--signal); } .s3 .kick::before { box-shadow: 0 0 0 4px rgba(230,163,40,.18); }
.s3 .lede { color: var(--slate-muted); }
.s3 svg { width: 100%; height: auto; max-height: 78vh; }
.edge { stroke: var(--slate-line); stroke-width: 1.2; } .edge.lit { stroke: var(--signal); stroke-width: 2.2; }
.node .n { fill: var(--slate-2); stroke: #4a515d; stroke-width: 1.5; } .node.lit .n { fill: var(--signal); stroke: #f4d48a; }
.node text { fill: var(--slate-ink); font: 600 13px "Geist"; text-anchor: middle; } .node text.o { fill: var(--slate-muted); font: 10.5px "Geist Mono"; }
.find { margin-top: 26px; border: 1px solid rgba(230,163,40,.35); background: rgba(230,163,40,.08); border-radius: 12px; padding: 12px 14px; max-width: 460px; min-height: 76px; }
.find small { display: block; font-size: 10.5px; color: var(--signal); margin-bottom: 3px; }
.wipe { position: absolute; inset: 0; background: var(--bg); z-index: 5; clip-path: circle(0px at 50% 50%); pointer-events: none; display: none; }
html.film .wipe { display: block; }

/* ---------- 05 brief ---------- */
.s4 { position: relative; background: var(--bg); padding: 104px var(--pad) 48px; min-height: 100vh; }
.sg-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 12px 56px; align-items: end; margin-bottom: 18px; }
.sg-top h2 { font-size: clamp(28px, 3vw, 44px); }
.sg-top .lede { font-size: 16px; }
.sg-top .lede { margin-top: 0; }
.sgd { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-alt); box-shadow: 0 40px 80px -50px rgba(20,25,35,.35); overflow: hidden; }
.sgd-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.sgd-bar .live { display: inline-flex; gap: 7px; align-items: center; font-size: 11px; color: var(--ok); } .sgd-bar .live b { font-weight: 600; }
.sgd-bar .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.sg-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sg-filter button { font: 500 12px "Geist"; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.sg-filter button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sg-filter .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.sgd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.sgd .k { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 8px; }
.sgd .k small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.sgd .k b { font-size: clamp(22px, 2.2vw, 30px); font-weight: 550; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sgd .k svg { width: 96px; height: 26px; }
.sgd .k .kd { font-size: 10.5px; color: var(--muted); text-align: right; }
.sgd .k.flash { animation: kflash .9s ease-out; }
@keyframes kflash { 0% { box-shadow: 0 0 0 0 rgba(230,163,40,.5); border-color: var(--signal); } 100% { box-shadow: 0 0 0 8px rgba(230,163,40,0); } }
.sgd .p { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.sgd .ph { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; } .sgd .ph span { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.sgd .tl { grid-column: 1 / span 3; grid-row: 2 / span 2; } .sgd .own { grid-column: 4; grid-row: 2; }
.sgd .mx { grid-column: 4; grid-row: 3; } .sgd .tb { grid-column: 1 / -1; }
.sgd .tl svg { width: 100%; height: auto; display: block; overflow: visible; }
.tl .tl-l { font: 10.5px "Geist Mono"; fill: #6b7280; } .tl .grid { stroke: #eceef1; } .tl .now { stroke: var(--ok); stroke-dasharray: 3 3; }
.tl circle.b { transition: opacity .3s; } .tl circle.dim { opacity: .12; }
.ob { display: grid; gap: 8px; padding-top: 2px; }
.ob .r { display: grid; grid-template-columns: 38px 1fr 58px; gap: 8px; align-items: center; font-size: 12.5px; }
.ob .r i { display: block; height: 14px; border-radius: 4px; transition: width .7s cubic-bezier(.16,1,.3,1); }
.ob .r b { font: 600 12px "Geist Mono"; text-align: right; }
.ob .r.dim { opacity: .3; }
.mxg { display: grid; grid-template-columns: 62px repeat(5, 1fr); gap: 3px; font: 9.5px "Geist Mono"; color: var(--muted); align-items: center; }
.mxg .h { text-align: center; font-size: 9px; } .mxg .rl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mxg .c { aspect-ratio: 2.4; border-radius: 4px; background: #f1f3f5; transition: background .6s; }
.mxg .c.l1 { background: #e9f6ee; } .mxg .c.l2 { background: #b9e0c8; } .mxg .c.l3 { background: #6fb68c; } .mxg .c.l4 { background: var(--ok); }
.mxg .c.hit { background: var(--signal) !important; transition: none; }
.tbl { display: grid; font-size: 12.5px; }
.tbl .trow { display: grid; font-size: 12px; grid-template-columns: 52px 128px minmax(0, 1fr) 150px 46px 130px; gap: 10px; align-items: center; padding: 5px 4px; border-top: 1px solid var(--grid); }
.tbl .th { font: 10.5px "Geist Mono"; color: var(--muted); border-top: 0; padding-top: 0; }
.tbl .trow .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .trow .src { display: flex; gap: 4px; overflow: hidden; } .tbl .trow .src span { font: 9.5px/1 "Geist Mono"; padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); white-space: nowrap; }
.tbl .trow .o { font: 600 10.5px "Geist Mono"; color: var(--signal-ink); }
.tbl .trow .v { display: grid; grid-template-columns: 1fr 58px; gap: 6px; align-items: center; font: 600 12px "Geist Mono"; color: var(--ok); text-align: right; }
.tbl .trow .v i { height: 6px; border-radius: 3px; background: var(--ok); opacity: .5; justify-self: start; }
.tbl .trow.big { background: var(--signal-soft); border-radius: 8px; } .tbl .trow.big .v i { background: var(--signal); opacity: 1; }
.tbl .trow.new { animation: rowin .8s cubic-bezier(.16,1,.3,1); }
@keyframes rowin { from { background: var(--signal-soft); opacity: 0; transform: translateY(-8px); } }
.tbl .trow.hide { display: none; }
.mono.tm { font: 10.5px "Geist Mono"; color: var(--muted); }

/* ---------- 06 watcher ---------- */
.s5 { position: relative; height: 100vh; min-height: 640px; background: var(--bg); overflow: hidden; }
.s5-in { position: absolute; inset: 0; padding: 130px var(--pad) 40px; display: grid; align-content: center; gap: 22px; }
.sent { font-size: clamp(24px, 3.4vw, 50px); letter-spacing: -0.035em; line-height: 1.3; font-weight: 500; max-width: 22ch; }
.sent em { font-style: normal; font-weight: 650; border-bottom: 3px solid var(--signal); background: var(--signal-soft); padding: 0 .15em; border-radius: 6px 6px 0 0; }
.bars { position: relative; display: grid; grid-template-columns: repeat(36, 1fr); gap: 5px; align-items: end; height: 22vh; max-height: 200px; min-height: 120px; }
.bars i { background: var(--surface-2); border-radius: 3px 3px 0 0; transform-origin: bottom; }
.bars i.c { background: var(--signal-line); } .bars i.h { background: var(--signal); }
.bars .th { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink-2); transform-origin: left; }
.baxis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: -12px; }
.wsum { font-size: 18px; color: var(--ink-2); } .wsum b { color: var(--ink); font-family: "Geist Mono"; }
.act { justify-self: start; padding: 12px 18px; border-radius: 9px; background: var(--ok); color: #fff; font: 600 15px "Geist"; }

/* ---------- 07 deploy ---------- */
.s6 { position: relative; height: 100vh; min-height: 640px; background: var(--bg-alt); overflow: hidden; }
.s6-in { position: absolute; inset: 0; padding: 120px var(--pad) 50px; display: grid; grid-template-rows: auto auto; align-content: center; gap: 30px; }
.perim { position: relative; align-self: start; border: 1.5px dashed var(--line-strong); border-radius: 26px; padding: 56px 3% 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4%; align-items: start; }
.perim .lab { position: absolute; left: 26px; top: -10px; background: var(--bg-alt); padding: 0 8px; font-size: 11px; color: var(--muted); }
.pnl { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.pnl b { font-size: clamp(18px, 1.8vw, 26px); letter-spacing: -0.025em; display: block; } .pnl small { font-size: 11px; color: var(--muted); }
.pnl ul { margin-top: 18px; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); font-size: 15px; }

/* ---------- pilot ---------- */
.pilot { position: relative; background: var(--bg); padding: clamp(64px, 8vw, 110px) var(--pad) clamp(90px, 10vw, 140px); }
.p-head { max-width: 760px; margin-bottom: 40px; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); counter-reset: st; }
.steps li { padding: 22px; display: grid; gap: 8px; align-content: start; font-size: 14.5px; color: var(--ink-2); border-right: 1px solid var(--grid); }
.steps li:first-child { padding-left: 0; } .steps li:last-child { border-right: 0; }
.steps li::before { counter-increment: st; content: "0" counter(st); font: 600 12px "Geist Mono"; color: var(--signal-ink); }
.steps b { color: var(--ink); font-size: 18px; letter-spacing: -0.02em; }
.honest { margin: 0 auto; padding: 20px 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-alt); max-width: 880px; }
.honest b { font-size: 15px; } .honest p { margin-top: 6px; color: var(--ink-2); font-size: 15px; max-width: 75ch; }

/* ---------- cta + footer ---------- */
.cta { position: relative; z-index: 3; background: var(--ink); color: #fff; min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 80px var(--pad); border-radius: 28px 28px 0 0; margin-top: -28px; }
.cta h2 { max-width: 18ch; margin: 0 auto; } .cta p { color: #b8bec8; margin: 16px auto 0; max-width: 52ch; font-size: 18px; }
.cta a { display: inline-block; margin-top: 30px; padding: 15px 26px; border-radius: 10px; background: #fff; color: var(--ink); font: 600 16px "Geist"; text-decoration: none; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px var(--pad) 28px; font-size: 12px; color: #8b929d; background: var(--ink); }

/* ================= static mode: phones, reduced motion, no JS ================= */
html.static .zoomfill { display: none; }
html.static .s1, html.static .sm, html.static .s2, html.static .s3, html.static .s5, html.static .s6 { height: auto; min-height: 0; }
html.static .s1-in, html.static .sm-in, html.static .s3-in, html.static .s5-in, html.static .s6-in { position: relative; inset: auto; }
html.static .sm { border-radius: 0; box-shadow: none; }
html.static .s2 { padding: 100px var(--pad) 60px; }
html.static .s2-head { position: relative; top: 0; left: 0; right: 0; }
html.static .tabs { display: none; }
html.static .track { position: relative; top: 0; display: grid; gap: 28px; margin-top: 28px; }
html.static .board { width: auto; padding: 0; }

html.static .board-name { display: block; font: 600 12px "Geist Mono"; color: var(--muted); margin-bottom: 10px; }
html.static .board-in { height: auto; grid-template-rows: auto 200px; }
html.static .s5-in { padding-top: 100px; padding-bottom: 100px; }
html.static .s6-in { padding-bottom: 100px; }

@media (max-width: 900px) {
  .chap { display: none; }
  .nav { height: 72px; padding-bottom: 16px; }
  .s1-in, .s3-in, .s4 { grid-template-columns: 1fr; }
  .sm-canvas { max-height: none; height: auto; }
  .s1-in { padding-top: 100px; } .sm-in, .s3-in { padding-top: 90px; padding-bottom: 60px; }
  .bridge { position: relative; left: 0; top: 0; width: auto; margin-top: 18px; }
  .s4 { padding-top: 90px; min-height: 0; }
  .sg-top { grid-template-columns: 1fr; }
  .sgd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sgd .tl, .sgd .own, .sgd .mx, .sgd .tb { grid-column: 1 / -1; grid-row: auto; }
  .tbl .trow { grid-template-columns: 44px minmax(0, 1fr) 40px 96px; } .tbl .trow > :nth-child(2), .tbl .trow > :nth-child(4) { display: none; }
  .board-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide { grid-column: span 2; }
  .tile .kv { font-size: 22px; } .tile svg { width: 36%; }
  .perim { grid-template-columns: 1fr; gap: 14px; padding: 28px 14px 16px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; } .steps li:nth-child(3) { padding-left: 0; } .steps li:nth-child(n+3) { border-top: 1px solid var(--grid); }
  .bars { gap: 2px; }
}
@media (max-width: 560px) {
  .nav .btn { padding: 8px 11px; font-size: 13px; }
  .hc .ro { flex-direction: column; align-items: start; }
  .br { grid-template-columns: minmax(0, 1fr) 46px; } .br .tr { display: none; }
  .steps { grid-template-columns: 1fr; } .steps li { padding-left: 0 !important; border-right: 0; border-top: 1px solid var(--grid); }
  .node text { font-size: 20px; } .node text.o { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; } }

/* phones: compact dashboard tiles */
@media (max-width: 560px) {
  .board-in, html.static .board-in { grid-template-rows: auto; grid-auto-rows: auto; }
  .tile { padding: 12px; }
  .tile .kv { font-size: 20px; white-space: nowrap; }
  .tile svg { position: static; display: block; width: 100%; height: 22px; margin-top: 8px; }
  .wide { height: 150px; }
}

@media (max-width: 900px) {
  .s1-in { padding-top: 96px; padding-bottom: 48px; }
  .s1-copy { grid-template-columns: 1fr; } 
  .hc { padding: 14px; }
  .wide, .wide.w3, .wide.w1 { grid-column: span 2; height: 190px; }
}

/* film: the agents section is pulled up one screen so it lands exactly as the dashboard zoom completes */
html.film .s3 { margin-top: -100vh; z-index: 3; visibility: hidden; }


/* hero story switcher */
.hsw { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.hsw button { position: relative; overflow: hidden; font: 600 12.5px "Geist"; padding: 7px 13px 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-2); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.hsw button span { position: relative; z-index: 1; }
.hsw button i { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--signal); transform-origin: left; transform: scaleX(0); }
.hsw button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.hsw-note { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.bridge.low { top: auto; bottom: 8%; }
.ask.busy { min-width: 230px; }
@media (max-width: 560px) { .hsw-note { display: none; } }

/* per-story accent in the hero bridge */
.bridge .br b { color: var(--acc, var(--ok)); } .bridge .br.s b, .bridge .br.t b { color: var(--ink); }
.bridge .tr i, .bridge .nb { background: var(--acc, var(--ok)); } .bridge .br.t .tr i { background: var(--ink); }

/* phones: Connected canvas scrolls sideways at a readable scale; KPI tiles stay on one line */
@media (max-width: 760px) {
  .sm-in { overflow-x: auto; justify-items: stretch; -webkit-overflow-scrolling: touch; }
  .sm-head, .sm-cap { position: sticky; left: 0; width: calc(100vw - 2 * var(--pad)); }
  .sm-canvas { min-width: 1000px; width: 1000px; }
  .sgd .k { grid-template-columns: 1fr; }
  .sgd .k svg, .sgd .k .kd { display: none; }
  .sgd .k b { font-size: 22px; white-space: nowrap; }
}

/* hero fits one desktop screen */
@media (min-width: 901px) {
  .s1-in { padding-top: 104px; padding-bottom: 28px; gap: 22px; }
  .s1-copy { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .s1-copy h1 { font-size: clamp(36px, 4.1vw, 62px); line-height: 1; }
  .s1-copy .lede { font-size: 16px; }
  .hc { padding: 14px 22px 10px; }
  .hsw { margin-bottom: 8px; }
  .hc .ro b { font-size: clamp(38px, 3.8vw, 58px); }
  .hc .ro .d { margin-top: 2px; }
  .bridge { top: -4%; font-size: 12px; } .bridge.low { bottom: 2%; }
  .bridge .br { padding: 3.5px 0; }
}
html.film .s1 { min-height: 100vh; display: grid; }
html.film .s1-in { align-content: center; }


/* dashboard boards are framed like an app window and always fit the screen */
html.film .board-in { max-height: none; height: 100%; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 40px 80px -50px rgba(20,25,35,.35); }
html.film .tile { padding: 12px 14px; }
html.film .wide { display: flex; flex-direction: column; min-height: 0; padding: 14px 16px 30px; }
html.film .wide { overflow: hidden; }
html.film .wide svg { flex: 1 1 0; height: 0; min-height: 0; width: 100%; margin-top: 8px; }
html.film .board-in > .tile { min-height: 0; }
