:root {
  --ink: #1c2126; --ink-2: #4b5560; --ink-3: #7c8792;
  --bg: #eef0f2; --panel: #ffffff; --line: #d5dae0; --soft: #f5f6f8;
  --gold: #cfae70; --black: #14171a;
  --bad: #d32f2f; --warn: #e69a00; --ok: #178f5f; --twin: #1f6fd0; --ghost: #7b3fc4;
  --hmi-bg: #d9dcdf; --hmi-line: #8a929a; --hmi-val: #12335e;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, h3, p { margin: 0; }

/* ---------- shell ---------- */
.top { background: var(--black); color: #fff; display: flex; align-items: center; gap: 24px; padding: 10px 20px; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 20; }
.brand { cursor: pointer; display: flex; flex-direction: column; line-height: 1.15; }
.brand-mark { font-weight: 800; letter-spacing: .14em; font-size: 20px; color: var(--gold); }
.brand-sub { font-size: 11px; color: #b9c0c7; }
.steps { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.steps button { background: transparent; color: #cfd5db; border: 1px solid #3a4148; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.steps button b { display: inline-block; min-width: 18px; color: var(--gold); }
.steps button.on { background: var(--gold); color: var(--black); border-color: var(--gold); font-weight: 600; }
.steps button.on b { color: var(--black); }
main { flex: 1; padding: 16px 20px 8px; max-width: 1500px; width: 100%; margin: 0 auto; }
.screen { display: none; }
.screen.on { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.foot { padding: 8px 20px 12px; font-size: 11px; color: var(--ink-3); display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.foot span { max-width: 700px; }

.btn { font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 18px; border: 1px solid transparent; cursor: pointer; }
.btn.primary { background: var(--black); color: #fff; border-color: var(--black); }
.btn.primary:hover { background: #2a3037; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .85; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.big { font-size: 20px; padding: 16px 30px; border-radius: 12px; }
.btn:disabled { opacity: .45; cursor: default; }
.cta-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.panel.pad { padding: 14px 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--soft); }
.chip { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: #e3e6ea; color: var(--ink-2); white-space: nowrap; }
.chip.busy { background: #fff1d0; color: #8a5a00; animation: blink 1s steps(2) infinite; }
.chip.ok { background: #d9f2e6; color: #0f6a45; }
.chip.twin-chip { background: #dbe9fb; color: #124a94; }
.chip.rec { background: #fde2e2; color: var(--bad); animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .45; } }

.act-head { margin-bottom: 12px; }
.act-head h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.act-head p { color: var(--ink-2); margin-top: 2px; max-width: 1000px; }
.actno { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--black); font-size: 16px; }
.grid { display: grid; gap: 14px; }
.col, .side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------- home ---------- */
.hero { max-width: 980px; margin: 5vh auto 0; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a6d2f; margin-bottom: 12px; }
.hero h1, .partner h1 { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.08; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; border-bottom: 5px solid var(--gold); }
.lede { font-size: 19px; color: var(--ink-2); margin: 18px auto 26px; max-width: 800px; }
.hero-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; text-align: left; }
.hcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; border-top: 4px solid var(--gold); }
.hcard b { display: block; margin-bottom: 4px; }
.hcard span { color: var(--ink-2); font-size: 14px; }

/* ---------- network map ---------- */
.map-wrap { padding: 6px; }
.netmap { width: 100%; height: auto; display: block; }
.band-0 { fill: #f7f8f9; } .band-1 { fill: #eff1f3; }
.band-ext { fill: #fff; }
.band-label { font-size: 12px; font-weight: 700; fill: #98a1ab; letter-spacing: .05em; text-transform: uppercase; }
.edge { stroke: #aab3bc; stroke-width: 1.6; transition: opacity .4s; }
.edge-exposed { stroke: var(--bad); stroke-dasharray: 5 4; }
.edge.cut { stroke: var(--ok); stroke-dasharray: 2 7; stroke-width: 2.5; opacity: .8 !important; }
.flow { stroke: var(--bad); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 12; animation: flow .6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -14; } }
.node { cursor: default; transition: opacity .3s; }
.node[data-vis="hidden"] { opacity: 0; pointer-events: none; }
.node[data-vis="known"] { cursor: pointer; }
.node-box { fill: #fff; stroke: #67727d; stroke-width: 1.6; }
.node-icon { fill: none; stroke: #39424b; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.node-label, .node-ip, .node-q { text-anchor: middle; font-size: 15px; fill: var(--ink); }
.node-label { font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-opacity: .85; }
.node-ip { font-family: var(--mono); font-size: 12px; fill: var(--ink-3); display: none; }
.node-q { font-size: 22px; font-weight: 800; fill: var(--ink-3); display: none; }
.node-badge { display: none; stroke: #fff; stroke-width: 2; }
.node[data-vis="unknown"] .node-box { stroke-dasharray: 4 3; stroke: #9aa3ad; animation: blink .5s steps(2) infinite; }
.node[data-vis="unknown"] .node-icon, .node[data-vis="unknown"] .node-label { display: none; }
.node[data-vis="unknown"] .node-q, .node[data-vis="unknown"] .node-ip { display: block; }
.node.selected .node-box { stroke: var(--black); stroke-width: 3; fill: #fdf6e6; }
.type-cloud .node-box { stroke: none; fill: none; } .type-cloud .node-icon { stroke-width: 2; transform: scale(1.5); }
.netmap.twin .node-box { stroke: var(--twin); fill: #f1f7ff; }
.netmap.twin .type-cloud .node-box { fill: none; }
.netmap.twin .node-icon { stroke: #174f96; }
.netmap.twin .edge { stroke: #8fb3e3; }
.node[data-status="twinning"] .node-box { stroke: var(--twin); fill: #cfe3fb; stroke-width: 3; }
.node[data-status="warn"] .node-box { stroke: var(--warn) !important; fill: #fff3d6 !important; stroke-width: 3; }
.node[data-status="warn"] .node-badge { display: block; fill: var(--warn); animation: blink .9s steps(2) infinite; }
.node[data-status="bad"] .node-box { stroke: var(--bad) !important; fill: #fde3e3 !important; stroke-width: 3.5; animation: pulse-bad .7s ease-in-out infinite alternate; }
.node[data-status="bad"] .node-badge { display: block; fill: var(--bad); animation: blink .6s steps(2) infinite; }
@keyframes pulse-bad { to { fill: #f9b9b9; } }
.node[data-status="ghost"] .node-box { stroke: var(--ghost) !important; stroke-dasharray: 5 3; fill: #f4ecfd !important; stroke-width: 2.5; }
.node[data-status="fixed"] .node-box { stroke: var(--ok) !important; fill: #ddf5ea !important; stroke-width: 3; }
.node[data-status="fixed"] .node-badge { display: block; fill: var(--ok); }

/* ---------- act 1 ---------- */
.twin-grid { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: start; }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.counters div { background: var(--soft); border-radius: 8px; padding: 8px 6px; text-align: center; }
.counters b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.counters span { font-size: 11px; color: var(--ink-2); line-height: 1.2; display: block; }
.yaml, .telemetry { margin: 0; padding: 10px 14px; font: 12px/1.5 var(--mono); background: #12161a; color: #c9e3c0; height: 240px; overflow: auto; white-space: pre; }
.detail-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.detail-fp { font-size: 16px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { font: 12px var(--mono); background: #e8ecf0; border-radius: 4px; padding: 2px 7px; }
.finding { margin-top: 8px; padding: 8px 10px; border-radius: 6px; font-size: 14px; font-weight: 500; border-left: 4px solid; }
.finding.crit { background: #fde9e9; border-color: var(--bad); color: #7d1515; }
.finding.warn { background: #fff4d9; border-color: var(--warn); color: #6b4700; }

/* ---------- HMI ---------- */
.hmi { background: var(--hmi-bg); border-color: #b4bac0; }
.hmi-head { display: flex; justify-content: space-between; padding: 6px 12px; background: #c3c8cd; font: 700 12px var(--mono); letter-spacing: .06em; color: #333b43; }
.hmi-alarms { min-height: 30px; padding: 4px 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.alarm { font: 700 12px var(--mono); padding: 3px 10px; border-radius: 3px; }
.alarm-none { color: #69737c; background: transparent; font-weight: 500; }
.alarm-crit { background: var(--bad); color: #fff; animation: blink .6s steps(2) infinite; }
.alarm-warn { background: #ffcf33; color: #2b2000; animation: blink 1s steps(2) infinite; }
.alarm-sec { background: var(--twin); color: #fff; animation: blink 1s steps(2) infinite; }
.hmi-svg { width: 100%; height: auto; display: block; }
.pipe { stroke: var(--hmi-line); stroke-width: 6; fill: none; } .pipe.thin { stroke-width: 3; }
.vessel { fill: #e9ebed; stroke: var(--hmi-line); stroke-width: 2; }
.water { fill: #a9bccd; }
.pump-tri.run { fill: #f4f5f6; stroke: #59626b; } .pump-tri.stop { fill: #59626b; stroke: #59626b; }
.h-name { font: 700 11px var(--mono); fill: #4a535c; text-anchor: middle; }
.h-lbl { font: 600 10px var(--mono); fill: #69737c; }
.vbox-bg { fill: #eceef0; stroke: #a5adb5; }
.vbox-lbl { font: 600 9.5px var(--mono); fill: #5d6770; }
.vbox-val { font: 700 17px var(--mono); fill: var(--hmi-val); text-anchor: end; }
.vbox[data-sev="warn"] .vbox-bg { fill: #ffcf33; animation: blink 1s steps(2) infinite; }
.vbox[data-sev="crit"] .vbox-bg { fill: var(--bad); animation: blink .6s steps(2) infinite; }
.vbox[data-sev="crit"] .vbox-val, .vbox[data-sev="crit"] .vbox-lbl { fill: #fff; }
.vbox[data-sev="dev"] .vbox-bg { stroke: #c46a00; stroke-width: 2.5; fill: #ffe9c7; }
.trends { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trend-meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.trend-val { font-family: var(--mono); color: var(--ink); }
.trend-svg { width: 100%; height: 64px; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; display: block; }
.trend-line { fill: none; stroke: #2a5d9f; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-line.bad { stroke: var(--bad); }
.trend-lim { stroke: var(--warn); stroke-dasharray: 4 3; stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- act 2 ---------- */
.scen-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.scen { text-align: left; font: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; border-left: 5px solid #c4cad0; }
.scen b { display: block; font-size: 14px; } .scen span { font-size: 12px; color: var(--ink-2); }
.scen.active { border-color: var(--black); border-left-color: var(--bad); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.scen.done { border-left-color: var(--ok); } .scen.done b::after { content: "  ✓"; color: var(--ok); }
.attack-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.control { margin-bottom: 14px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px 16px; align-items: start; }
.control .takeaway { grid-column: 1 / -1; margin-top: 0; }
.control .def-row:empty::before { content: "Defensive actions unlock once the attack is under way."; color: var(--ink-3); font-size: 13px; grid-column: 1 / -1; align-self: center; }
.blurb { font-size: 15px; margin-bottom: 10px; }
.status { font-weight: 700; font-size: 14px; }
.status.ok { color: var(--ok); } .status.bad { color: var(--bad); animation: blink .8s steps(2) infinite; } .status.warn { color: #9a6700; }
.def-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin: 0; grid-column: 1 / -1; }
.def-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.def { text-align: left; font: inherit; border-radius: 8px; padding: 9px 12px; cursor: pointer; border: 2px solid var(--twin); background: #eef5ff; color: #0e3a75; }
.def b { display: block; } .def span { font-size: 12.5px; opacity: .85; }
.def:not(:disabled):hover { background: #dcebff; }
.def:not(:disabled) { animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { box-shadow: 0 0 0 4px rgba(31,111,208,.22); } }
.def:disabled { border-color: var(--line); background: var(--soft); color: var(--ink-3); cursor: default; }
.def.applied:disabled { border-color: var(--ok); background: #e2f6ec; color: #0e5c3b; }
.takeaway { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #fbf5e6; border: 1px solid var(--gold); }
.takeaway p { margin: 4px 0 10px; }
.log { background: #12161a; padding: 8px 10px; height: 190px; overflow: auto; font-size: 13px; }
.log:empty::before { content: "Waiting for the red agent…"; color: #69737c; }
.log-line { display: grid; grid-template-columns: 86px 1fr; gap: 8px; padding: 4px 0; color: #d5dbe1; border-bottom: 1px solid #242a31; animation: fade .3s; }
.who { font: 700 11px var(--mono); padding-top: 2px; }
.who-red .who { color: #ff7b72; } .who-blue .who { color: #6cb6ff; } .who-sys .who { color: #e3b341; } .who-you .who { color: #56d364; }
.who-blue { background: rgba(31,111,208,.18); margin: 0 -10px; padding: 6px 10px; }

/* ---------- act 3 ---------- */
.tt-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.inject-top { display: flex; justify-content: space-between; align-items: center; }
.inject-clock { font: 800 22px var(--mono); color: var(--black); background: var(--gold); padding: 2px 10px; border-radius: 6px; display: inline-block; }
.inject-clock.small { font-size: 12px; padding: 1px 6px; }
.progress { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.inject-text { font-size: 19px; line-height: 1.4; margin: 14px 0; }
.q { font-weight: 700; margin: 14px 0 8px; }
.opts { display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; text-align: left; font: inherit; font-size: 15.5px; padding: 11px 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--panel); cursor: pointer; }
.opt i { font-style: normal; font-weight: 800; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); }
.opt:not(:disabled):hover { border-color: var(--black); background: #fdf8ec; }
.opt:disabled { opacity: .5; cursor: default; }
.opt.picked { opacity: 1; border-color: var(--black); background: #fbf1d9; } .opt.picked i { background: var(--black); color: #fff; }
.result { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--soft); border-left: 4px solid var(--black); animation: fade .3s; }
.result p { margin: 4px 0 12px; font-size: 16px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pill { font: inherit; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); cursor: pointer; }
.pill.on { background: var(--black); color: #fff; border-color: var(--black); }
.inject .cta-row { margin-top: 18px; } .inject .cta-row .hint { margin: 0; flex: 1; min-width: 220px; }
.telemetry { height: 200px; color: #9fd0ff; }
.debrief h3 { font-size: 22px; margin-bottom: 10px; }
.verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.verdict { padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; border-left: 5px solid; }
.verdict.good { background: #e2f6ec; border-color: var(--ok); } .verdict.mid { background: #fff4d9; border-color: var(--warn); } .verdict.bad { background: #fde9e9; border-color: var(--bad); }
.db-row { margin-top: 14px; }
.db-q { font-weight: 700; font-size: 14px; margin-bottom: 4px; } .lat { font-weight: 500; color: var(--ink-3); font-size: 12px; margin-left: 6px; }
.bar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); padding: 1px 0; }
.bar-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--soft); border-radius: 3px; height: 10px; } .bar-fill { display: block; height: 100%; background: #b3bcc5; border-radius: 3px; }
.bar-n { font-family: var(--mono); text-align: right; }
.bar.mine { color: var(--ink); font-weight: 700; } .bar.mine .bar-fill { background: var(--gold); }
.pitch { margin-top: 18px; padding: 14px 16px; border-radius: 8px; background: var(--black); color: #fff; font-size: 15px; }
.pitch b { color: var(--gold); } .pitch .cta-row { margin-top: 12px; }
.pitch .btn.primary { background: var(--gold); color: var(--black); border-color: var(--gold); }

/* ---------- partner ---------- */
.partner { max-width: 1150px; margin: 3vh auto 0; text-align: center; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; margin-bottom: 20px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; border-top: 4px solid var(--gold); }
.pcard.get { border-top-color: var(--ok); } .pcard.ask { border-top-color: var(--twin); }
.pcard h3 { margin-bottom: 8px; } .pcard ul { margin: 0; padding-left: 18px; } .pcard li { margin: 6px 0; font-size: 14.5px; }
.contact { background: var(--black); color: #fff; border-radius: 10px; padding: 16px; margin-bottom: 16px; font-size: 17px; }
.contact b { color: var(--gold); } .contact-line { margin-top: 4px; }

/* ---------- idle ---------- */
.idle { position: fixed; inset: 0; background: rgba(10,12,14,.72); display: grid; place-items: center; z-index: 50; }
.idle-box { background: #fff; border-radius: 12px; padding: 26px 34px; text-align: center; } .idle-box p { margin: 8px 0 16px; }

@media (max-width: 980px) {
  .twin-grid, .attack-grid, .tt-grid, .control, .pgrid, .hero-cards { grid-template-columns: 1fr; }
  .scen-row { grid-template-columns: 1fr 1fr; }
  .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------- device pop-up (act 2) ---------- */
.map-wrap { position: relative; }
.map-hint { margin: 0; padding: 0 14px 8px; font-size: 12px; }
.tip { position: absolute; width: min(340px, calc(100% - 12px)); background: #12161a; color: #e6eaee; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 5; animation: tipfade .15s; }
@keyframes tipfade { from { opacity: 0; } }
.tip-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 14px; }
.tip-state { font: 700 10px var(--mono); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.tip-state.ok { background: #1d4d38; color: #8be0b8; } .tip-state.bad { background: var(--bad); color: #fff; }
.tip-state.warn { background: #ffcf33; color: #2b2000; } .tip-state.ghost { background: var(--ghost); color: #fff; }
.tip-fp { color: var(--gold); font-weight: 600; margin: 3px 0 6px; }
.tip table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 11.5px; }
.tip td { padding: 2px 0; vertical-align: top; } .tip td:first-child { color: #8d98a3; padding-right: 10px; white-space: nowrap; }
.tip-find { margin-top: 7px; padding: 5px 8px; border-radius: 5px; background: #4a1717; color: #ffb4b4; font-weight: 600; }

/* ---------- contact, QR, lead form ---------- */
.qr { display: block; width: 64px; height: 64px; border-radius: 4px; background: #fff; }
.qr.big { width: 150px; height: 150px; border-radius: 8px; border: 1px solid var(--line); }
.cbar { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 14px; padding: 6px 20px; background: var(--black); color: #fff; border-top: 3px solid var(--gold); }
.cbar-qr { border: 0; padding: 3px; background: #fff; border-radius: 6px; cursor: zoom-in; }
.cbar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cbar-text b { color: var(--gold); } .cbar-text > span { font-size: 13px; color: #cfd5db; }
.btn.gold { background: var(--gold); color: var(--black); border-color: var(--gold); white-space: nowrap; }
.c-block { line-height: 1.4; } .c-name { font-weight: 700; } .c-org { font-size: 13px; opacity: .8; } .c-mail, .c-url { font-size: 13.5px; }

.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.lead label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: left; }
.lead label i { font-weight: 400; font-style: normal; opacity: .7; }
.lead input { font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 7px; background: #fff; min-width: 0; }
.lead input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(207,174,112,.45); }
.lead-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.lead-msg { font-size: 13.5px; font-weight: 600; } .lead-msg.ok { color: var(--ok); } .lead-msg.err { color: var(--bad); }
.lead-privacy { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; text-align: left; }

.home-contact { margin-top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.5fr); gap: 18px; align-items: center; text-align: left; }
.hc-mid p { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; } .hc-mid .eyebrow { margin-bottom: 4px; }
.hero { margin-top: 3vh; } .hero-cards { margin-top: 28px; }

.contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; text-align: left; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--gold); }
.pc-left { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; max-width: 260px; }
.pc-form h3 { margin-bottom: 10px; }

.modal { position: fixed; inset: 0; background: rgba(10,12,14,.72); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal-box { position: relative; background: #fff; border-radius: 12px; padding: 24px 26px; width: min(760px, 100%); max-height: 94vh; overflow: auto; }
.modal-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.modal-left { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; max-width: 220px; }
.modal-left .qr.big { width: 200px; height: 200px; }
.modal-x { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink-2); }

@media (max-width: 760px) {
  .home-contact, .contact, .modal-grid, .lead-grid { grid-template-columns: 1fr; }
  .hc-left, .pc-left, .modal-left { margin: 0 auto; }
  .cbar { flex-wrap: wrap; padding: 6px 12px; } .cbar-text > span { font-size: 12px; }
}

/* sign-up server unreachable → in-person fallback */
.lead-offline, .when-offline { display: none; }
.leads-offline .lead, .leads-offline .when-online { display: none; }
.leads-offline .when-offline { display: inline; }
.leads-offline .lead-offline { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 10px; background: #fbf5e6; border: 1px solid var(--gold); text-align: left; font-size: 16px; }
.lead-offline b { font-size: 18px; }
.lead label i { white-space: nowrap; }

/* ---------- HMI explanations ---------- */
.hmi { overflow: visible; }
.hmi-head { border-radius: 9px 9px 0 0; }
.hmi-body { position: relative; }
.hmi-area { fill: transparent; stroke: none; }
.hmi-hot { cursor: help; }
.hmi-hot:hover .vbox-bg, .hmi-area:hover { stroke: var(--black); stroke-width: 2; stroke-dasharray: 3 2; }
.hmi-foot { font-size: 12px; color: #56606a; padding: 2px 12px 8px; }
.hmi-tip { position: absolute; z-index: 12; width: min(330px, calc(100% - 12px)); background: #12161a; color: #e6eaee; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.35); pointer-events: none; animation: tipfade .12s; }
.hmi-tip b { color: var(--gold); font-size: 14px; }
.hmi-tip p { margin: 5px 0 0; }
.hmi-tip .k { display: inline-block; font: 700 10px var(--mono); text-transform: uppercase; padding: 1px 6px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.hmi-tip .k.ok { background: #1d4d38; color: #8be0b8; } .hmi-tip .k.cy { background: #4a1717; color: #ffb4b4; }
.timeline { margin-top: 14px; }
.timeline .log { height: 170px; }

/* ---------- framing (home) ---------- */
.framing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; text-align: left; font-size: 14px; color: var(--ink-2); }
.framing b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 3px; }
.hero .hero-cards { margin-top: 16px; }

/* ---------- brief ("why now") ---------- */
.brief-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.brief-title { font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.legend { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: -1px; }
.dot.water { background: var(--twin); } .dot.ai { background: var(--gold); }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 0 0 12px 16px; font-size: 14px; line-height: 1.35; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; box-sizing: content-box; }
.tl-water::before { background: var(--twin); } .tl-ai::before { background: var(--gold); }
.tl-when { display: block; font: 700 11px var(--mono); letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; }
.tl-ai .tl-when { color: #8a6d2f; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.stat b { font-size: 30px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.stat i { font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: auto; padding-top: 4px; }
.teaming { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.team { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; text-align: left; font: inherit; font-size: 13.5px; color: var(--ink-2); background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; cursor: pointer; }
.team:hover { border-color: var(--black); background: #fdf8ec; }
.team b { display: block; color: var(--ink); margin-bottom: 1px; }
.team .actno { width: 26px; height: 26px; font-size: 14px; }
.brief-cta { margin-top: 14px; }
.brief-cta .hint { margin: 0; max-width: 640px; }

/* ---------- per-act background box ---------- */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin-bottom: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.intro .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a6d2f; margin-bottom: 2px; }
.intro .k.ai { color: #124a94; }
@media (max-width: 980px) { .brief-grid, .stats, .intro, .framing { grid-template-columns: 1fr; } }

/* ---------- debrief cost chips ---------- */
.bar { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(60px, .7fr) 36px; padding: 3px 0; border-bottom: 1px solid var(--soft); }
.bar-costs { display: flex; flex-wrap: wrap; gap: 3px; }
.cost { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.cost.good { background: #e2f6ec; color: #0e5c3b; } .cost.mid { background: #fff4d9; color: #6b4700; } .cost.bad { background: #fde9e9; color: #7d1515; }
.bar.mine .bar-lbl { white-space: normal; }
@media (max-width: 760px) { .bar { grid-template-columns: 1fr 1fr; } .bar-track, .bar-n { display: none; } }
