:root {
  --bg: #f4f5f2;
  --bg-2: #eceee9;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --surface-3: #eef5e8;
  --line: #d0d5dd;
  --line-soft: #e6e8ec;
  --text: #17202a;
  --text-2: #3e4a57;
  --muted: #667085;
  --green: #4f7d18;
  --green-2: #35620d;
  --cyan: #175cd3;
  --amber: #9a5b00;
  --red: #b42318;
  --shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  --radius: 8px;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 88px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.55; }
body::before, body::after { display: none; }

a { color: inherit; }
button, input, select { font: inherit; }
button, label[for] { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
img, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.015em; }
.shell { width: min(1480px, calc(100% - 48px)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.empty { color: var(--muted); font-style: normal; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 99; padding: 10px 14px; background: var(--text); color: var(--bg); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.nav { position: sticky; top: 0; z-index: 60; min-height: 64px; display: flex; align-items: center; gap: 28px; padding: 0 max(24px, calc((100vw - 1360px) / 2)); background: #ffffff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; min-width: max-content; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: var(--green); color: #ffffff; font-weight: 800; font-size: 18px; }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand b { font-size: 15px; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.nav-links { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-links a { padding: 9px 11px; color: var(--text-2); text-decoration: none; font-size: 13px; border-radius: 5px; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.mode-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.mode-chip i, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: none; }
.status-cyan { background: var(--cyan); box-shadow: none; }

.button { border: 1px solid transparent; border-radius: 6px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; text-decoration: none; font-weight: 650; font-size: 13px; transition: border-color 120ms ease, background 120ms ease; }
.button:hover:not(:disabled) { border-color: var(--line-strong, #aab2bd); }
.button:disabled { opacity: 0.44; cursor: not-allowed; }
.button-primary { background: var(--green); color: #ffffff; border-color: var(--green); }
.button-primary:hover:not(:disabled) { background: #426a14; border-color: #426a14; }
.button-quiet { background: #ffffff; color: var(--text); border-color: var(--line); }
.button-small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button-block { width: 100%; }
.text-button { border: 0; background: none; color: var(--cyan); font: 11px var(--mono); }

.hero { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(540px, 1.08fr); gap: clamp(38px, 6vw, 92px); align-items: center; min-height: 700px; padding-block: 90px 72px; }
.kicker, .section-index { color: var(--green-2); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.hero h1 { margin: 20px 0 25px; max-width: 760px; font-size: clamp(50px, 6.5vw, 92px); font-stretch: 112%; }
.hero h1 span { color: var(--green-2); }
.hero-lede { max-width: 720px; color: var(--text-2); font-size: clamp(17px, 1.6vw, 22px); line-height: 1.52; }
.hero-actions { display: flex; gap: 10px; margin: 30px 0 42px; }
.hero-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.hero-facts div { min-height: 100px; padding: 18px; background: rgba(11, 25, 39, 0.92); }
.hero-facts dt { font: 600 27px var(--mono); color: var(--text); }
.hero-facts dd { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.hero-media { position: relative; overflow: hidden; margin: 0; border: 1px solid #31506c; border-radius: 20px; background: #09131f; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; opacity: 0.84; }
.hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 58%, rgba(6, 14, 23, 0.86)); }
.hero-media figcaption { position: absolute; z-index: 2; inset: auto 22px 18px; display: flex; justify-content: space-between; gap: 20px; color: var(--text-2); font: 11px var(--mono); }
.hero-media figcaption span:first-child { color: var(--text); }
.hero-reticle { position: absolute; z-index: 2; left: 51%; top: 52%; width: 78px; height: 78px; border: 1px solid rgba(54, 198, 221, 0.68); border-radius: 50%; transform: translate(-50%, -50%); }
.hero-reticle::before, .hero-reticle::after { content: ""; position: absolute; background: rgba(54, 198, 221, 0.65); }
.hero-reticle::before { width: 104px; height: 1px; left: -14px; top: 38px; }
.hero-reticle::after { width: 1px; height: 104px; left: 38px; top: -14px; }

.workflow { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.workflow article { position: relative; min-height: 150px; padding: 23px; border-right: 1px solid var(--line); }
.workflow article:last-child { border-right: 0; }
.workflow article:not(:last-child)::after { content: ""; position: absolute; top: 28px; right: -4px; z-index: 2; width: 7px; height: 7px; border-top: 1px solid var(--cyan); border-right: 1px solid var(--cyan); transform: rotate(45deg); background: var(--surface); }
.workflow span { color: var(--green-2); font: 11px var(--mono); }
.workflow h2 { margin: 27px 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.workflow p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.product-section, .evidence-section { padding-block: 125px 20px; }
.section-head { display: grid; grid-template-columns: minmax(330px, 0.75fr) minmax(380px, 1fr); align-items: end; gap: 70px; margin-bottom: 35px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.section-head h2, .architecture h2, .team h2 { margin: 9px 0 0; font-size: clamp(38px, 4.8vw, 66px); }
.section-head > p { max-width: 700px; margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.65; }
.section-index { margin: 0; }

.workbench { display: grid; gap: 18px; }
.workbench-video, .tooling-grid, .twin-grid { grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr); }
.panel { min-width: 0; overflow: hidden; background: rgba(14, 27, 42, 0.94); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12); }
.panel-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(16, 32, 49, 0.86); font-size: 13px; }
.panel-heading > div { display: flex; align-items: center; gap: 10px; }
.panel-heading .mono { color: var(--muted); font-size: 10px; }
.panel > :not(.panel-heading):not(.video-stage):not(.twin-view) { margin-left: 18px; margin-right: 18px; }
.panel > :last-child { margin-bottom: 18px; }

.video-source-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.video-source-actions .button { white-space: nowrap; }
.video-source-actions .button-quiet.is-active { border-color: var(--green); background: var(--surface-3); color: var(--green-2); }
.video-source-actions .button-primary.is-active { box-shadow: inset 0 0 0 2px #d8e7c8; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); background: rgba(6, 15, 24, 0.6); border-radius: 8px; }
.seg-btn { min-height: 27px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: 10px var(--mono); }
.seg-btn.is-active, .seg-btn:hover { background: var(--surface-3); color: var(--text); }

.video-stage { position: relative; aspect-ratio: 16/9; background: #03070b; overflow: hidden; }
.video-stage video, .video-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.video-stage canvas { pointer-events: none; }
.video-legend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; padding: 7px 9px; border: 1px solid rgba(98, 125, 153, 0.35); border-radius: 7px; background: rgba(4, 10, 17, 0.72); backdrop-filter: blur(8px); font: 9px var(--mono); }
.video-legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.video-legend .legend-ghost::before { background: var(--cyan); opacity: 0.62; }
.video-legend .legend-part::before { background: var(--amber); }
.caption { margin-top: 12px; color: var(--muted); font-size: 12px; }
.control-row, .form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 17px; }
.form-grid { grid-template-columns: repeat(2, 1fr); }
label { color: var(--text-2); font-size: 11px; }
input, select { width: 100%; min-height: 38px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #091522; color: var(--text); font-size: 12px; }
.toggle-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 13px; }
.toggle-row label { display: inline-flex; align-items: center; gap: 7px; }
.toggle-row input { width: auto; min-height: auto; margin: 0; accent-color: var(--green); }
.inline-status { margin: 12px 0; color: var(--muted); font: 10px var(--mono); }
.analysis-strip { margin-top: 18px; }
.strip-title, .sub-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; margin-bottom: 8px; color: var(--text-2); font-size: 11px; }
.strip-title span:last-child, .sub-head span:last-child { color: var(--muted); font: 9px var(--mono); }
#energy { width: 100%; height: 82px; border: 1px solid var(--line); border-radius: 8px; background: #08131f; }
.filmstrip { display: grid; grid-auto-flow: column; grid-auto-columns: 116px; gap: 8px; min-height: 78px; overflow-x: auto; padding-bottom: 8px; }
.filmstrip canvas, .filmstrip img, .filmstrip figure { width: 116px; border-radius: 6px; border: 1px solid var(--line); }
.frame-button { position: relative; overflow: hidden; width: 116px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #08131f; color: var(--text); }
.frame-button img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.frame-button span { position: absolute; right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 4px; background: rgba(4, 10, 17, 0.78); font: 8px var(--mono); }

.pipeline { list-style: none; margin: 16px 18px 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pipeline li { min-height: 49px; display: grid; grid-template-columns: 13px 1fr auto; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line-soft); }
.pipeline li:last-child { border-bottom: 0; }
.pipeline i { width: 7px; height: 7px; border-radius: 50%; background: #40516a; }
.pipeline li.is-running i { background: var(--cyan); box-shadow: 0 0 0 5px rgba(54, 198, 221, 0.1); }
.pipeline li.is-done i { background: var(--green); }
.pipeline span { font-size: 12px; }
.pipeline small { color: var(--muted); font: 9px var(--mono); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.metric-grid div { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #0a1724; }
.metric-grid span { display: block; color: var(--muted); font-size: 9px; }
.metric-grid b { display: block; margin-top: 5px; font: 16px var(--mono); }
.tabs { display: flex; gap: 3px; margin-top: 15px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { min-width: max-content; padding: 10px 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: 10px var(--mono); }
.tab.is-active { color: var(--text); border-color: var(--green); }
.tab-body { min-height: 260px; margin-top: 12px; }
.tab-pane { display: none; }
.tab-pane.is-active { display: block; }
.instruction-list { margin: 0; padding: 0 0 0 30px; }
.instruction-list li { margin-bottom: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #0a1724; font-size: 12px; }
.code { max-height: 350px; overflow: auto; margin: 0; padding: 14px; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); border-radius: 9px; background: #07111c; color: #c8d9e9; font: 10px/1.55 var(--mono); }
.approval-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; padding: 13px; border: 1px solid rgba(234, 178, 77, 0.36); border-radius: 10px; background: rgba(234, 178, 77, 0.07); }
.approval-card div { display: grid; gap: 4px; }
.approval-card b { font-size: 12px; }
.approval-card span { color: var(--muted); font-size: 10px; }

.drop-zone { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 8px; margin-top: 18px; padding: 24px; text-align: center; border: 1px dashed #3e5872; border-radius: 12px; background: #091522; transition: border-color 160ms ease, background 160ms ease; }
.drop-zone:hover, .drop-zone.is-over { border-color: var(--cyan); background: rgba(54, 198, 221, 0.06); }
.drop-symbol { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 50%; background: rgba(118, 185, 0, 0.13); color: var(--green-2); font: 25px/1 var(--mono); }
.drop-zone strong { color: var(--text); font-size: 14px; }
.drop-zone small { max-width: 430px; color: var(--muted); font-size: 10px; }
.tool-frames { display: grid; grid-auto-flow: column; grid-auto-columns: 100px; gap: 7px; overflow-x: auto; margin-top: 12px; }
.tool-frames img, .tool-frames canvas, .tool-frames video { width: 100px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: 7px; }
.evidence-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.evidence-list div { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.evidence-list dt { color: var(--muted); font-size: 9px; }
.evidence-list dd { margin: 4px 0 0; font: 11px var(--mono); }
.selected-tool { min-height: 170px; margin-top: 18px; }
.tool-placeholder { min-height: 150px; display: grid; place-items: center; align-content: center; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: #091522; }
.tool-placeholder span { color: var(--green); font: 11px var(--mono); text-transform: uppercase; }
.tool-placeholder p { margin: 9px 0 0; font-size: 12px; }
.candidate-list { display: grid; gap: 8px; margin-top: 12px; }
.candidate, .tool-candidate { display: grid; grid-template-columns: 34px 1fr auto; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #0a1724; }
.candidate.is-selected, .tool-candidate.is-selected, .tool-candidate.is-best { border-color: rgba(118, 185, 0, 0.76); }
.tool-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: rgba(118, 185, 0, 0.12); color: var(--green-2); font: 10px var(--mono); }
.tool-candidate h3 { margin: 3px 0 6px; font-size: 17px; letter-spacing: -0.015em; }
.tool-candidate p { margin: 0 0 5px; color: var(--text-2); font-size: 10px; }
.tool-candidate .muted { font-size: 9px; }
.eyebrow { margin: 0; color: var(--green-2) !important; font: 9px var(--mono) !important; letter-spacing: 0.07em; text-transform: uppercase; }
.btn { min-height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; font-size: 11px; }
.btn-primary { background: var(--green); border-color: var(--green); color: #07110b; }
.btn-ghost { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-sm { min-height: 30px; font-size: 10px; }
.tool-frame { margin: 0; }
.tool-frame img { width: 100px; height: 72px; object-fit: cover; }
.tool-frame figcaption { margin-top: 3px; overflow: hidden; color: var(--muted); font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.tool-evidence-grid, .tool-selection-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: 0; }
.tool-evidence-grid div, .tool-selection-grid div { padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: #091522; }
.tool-evidence-grid dt, .tool-selection-grid dt { color: var(--muted); font-size: 9px; }
.tool-evidence-grid dd, .tool-selection-grid dd { margin: 3px 0 0; font: 10px var(--mono); }
.tool-tags { color: var(--cyan); font: 9px var(--mono); }
.selected-tool > h3 { margin: 8px 0; font-size: 25px; }
.warning-stack { display: grid; gap: 7px; margin-top: 12px; }
.warning-stack > * { padding: 9px 10px; border-left: 2px solid var(--amber); background: rgba(234, 178, 77, 0.07); color: var(--text-2); font-size: 10px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.technical-details { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: #0a1724; }
.technical-details summary { padding: 11px 13px; color: var(--text-2); font: 10px var(--mono); cursor: pointer; }
.technical-details > :not(summary) { margin: 0 11px 11px; }
.parameter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.parameter-grid > * { padding: 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 10px; }
.tool-preview { min-height: 1px; }
.catalog-block { display: grid; grid-template-columns: 330px 1fr; gap: 34px; margin-top: 18px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(11, 25, 39, 0.86); }
.catalog-copy h3 { margin: 10px 0 14px; font-size: 28px; }
.catalog-copy p:last-child { color: var(--text-2); font-size: 13px; }
.catalog-grid { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 7px; }
.catalog-item, .tool-catalog-item { min-height: 88px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #0d1c2b; }
.tool-library-item { min-height: 88px; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #0d1c2b; color: var(--text); }
.tool-library-item:hover { border-color: var(--cyan); }
.tool-library-item b, .tool-library-item span, .tool-library-item small { display: block; }
.tool-library-item span, .tool-library-item small { margin-top: 5px; color: var(--muted); font-size: 9px; }

.twin-view { position: relative; height: 600px; background: linear-gradient(#08131e, #0d1d2d); overflow: hidden; }
.twin-view canvas { width: 100% !important; height: 100% !important; }
.viewer-hud { position: absolute; z-index: 4; top: 12px; left: 12px; display: flex; gap: 6px; }
.viewer-loading { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; color: var(--text-2); background: rgba(7, 16, 26, 0.82); font: 11px var(--mono); }
.viewer-hud span { padding: 6px 8px; border: 1px solid rgba(85, 116, 147, 0.36); border-radius: 6px; background: rgba(4, 10, 17, 0.7); font: 9px var(--mono); backdrop-filter: blur(8px); }
.viewer-hint { position: absolute; z-index: 4; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 7px 10px; border-radius: 7px; background: rgba(4, 10, 17, 0.7); color: var(--text-2); font: 9px var(--mono); white-space: nowrap; }
.twin-controls { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.twin-controls label { flex: 1; }
.plan-summary { display: grid; gap: 4px; margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #0a1724; }
.plan-summary b { font-size: 13px; }
.plan-summary span { color: var(--muted); font-size: 10px; }
.gate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 10px; padding: 0; list-style: none; }
.gate-grid > * { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 10px; }
.gate-grid i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.gate-grid .is-clear i, .gate-grid [data-state="clear"] i { background: var(--green); }
.queue { list-style: none; margin-top: 12px; padding: 0; }
.phase-queue { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.phase-queue li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; min-height: 48px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.phase-queue li:last-child { border-bottom: 0; }
.phase-queue button { border: 0; background: transparent; color: var(--cyan); font-size: 10px; }
.joint-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.joint-grid > * { padding: 7px 4px; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: #0a1724; font: 9px var(--mono); }
.compact { margin-left: 18px; margin-right: 18px; }

.evidence-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.evidence-cards article { min-height: 245px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(14, 27, 42, 0.92); }
.evidence-cards span { color: var(--green-2); font: 10px var(--mono); }
.evidence-cards strong { display: block; margin: 28px 0 16px; font: 34px var(--mono); }
.evidence-cards p { color: var(--text-2); font-size: 13px; }
.evidence-cards small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.run-gallery { display: grid; grid-template-columns: 1.05fr 1.05fr 0.9fr; gap: 12px; margin-top: 12px; }
.run-gallery figure { position: relative; min-height: 330px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #07121d; }
.run-gallery img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; filter: saturate(0.92) contrast(1.03); }
.run-gallery figcaption { position: absolute; inset: auto 0 0; display: grid; gap: 5px; padding: 56px 20px 19px; background: linear-gradient(transparent, rgba(4, 10, 17, 0.96)); }
.run-gallery span { color: var(--green-2); font: 9px var(--mono); letter-spacing: 0.08em; }
.run-gallery b { font-size: 17px; }
.run-gallery small { max-width: 48ch; color: var(--text-2); font-size: 10px; line-height: 1.45; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.boundary-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #0a1724; }
.boundary-grid h3 { font-size: 18px; }
.boundary-grid ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 12px; }
.boundary-grid li { margin: 7px 0; }

.architecture { display: grid; grid-template-columns: 0.66fr 1.34fr; gap: 70px; align-items: start; padding-block: 120px; }
.architecture > div > p:last-child { margin-top: 25px; color: var(--text-2); }
.architecture ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.architecture li { display: grid; grid-template-columns: 120px 1fr 1.5fr; align-items: center; min-height: 78px; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #0b1927; }
.architecture li:last-child { border-bottom: 0; }
.architecture li span { color: var(--green-2); font: 10px var(--mono); }
.architecture li b { font-size: 14px; }
.architecture li small { color: var(--muted); }
.team { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 60px; align-items: end; padding-block: 20px 110px; }
.team p:last-child { color: var(--text-2); }
.team ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.team li { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #0b1927; }
.team b { font-size: 12px; }
.team span { color: var(--muted); font-size: 10px; }
.footer { min-height: 110px; display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 28px max(24px, calc((100vw - 1480px) / 2)); border-top: 1px solid var(--line); background: #060d15; }
.footer > div { display: flex; gap: 20px; align-items: center; }
.footer span { color: var(--muted); font-size: 11px; }
.footer a { color: var(--text-2); font-size: 11px; text-decoration: none; }

/* Standalone workspaces and homepage launcher */
.nav-links a.is-active, .nav-links a.is-current { color: var(--text); background: var(--surface-3); box-shadow: inset 0 -2px var(--green); }
.home-tools-hero { min-height: calc(100svh - 72px); display: grid; align-content: start; gap: clamp(24px, 3.5vh, 38px); padding-block: clamp(30px, 4.5vh, 48px); }
.home-tools-copy { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr); align-items: end; gap: 70px; }
.home-tools-copy h1 { margin: 12px 0 0; font-size: clamp(48px, 5.6vw, 82px); }
.home-tools-copy h1 span { color: var(--green-2); }
.home-tools-copy > p { max-width: 660px; margin: 0; color: var(--text-2); font-size: clamp(15px, 1.4vw, 19px); line-height: 1.58; }
.tool-launch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-launch-card { position: relative; min-width: 0; display: grid; grid-template-rows: auto clamp(125px, 16vh, 175px) 1fr auto; overflow: hidden; color: var(--text); text-decoration: none; border: 1px solid #324b66; border-radius: 18px; background: rgba(14, 27, 42, 0.96); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.tool-launch-card:hover { transform: translateY(-5px); border-color: var(--green); box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3); }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.tool-card-top span { color: var(--green-2); font: 11px var(--mono); }
.tool-card-top em { color: var(--muted); font: normal 9px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.tool-card-visual { position: relative; overflow: hidden; background: #07111c; border-bottom: 1px solid var(--line); }
.tool-card-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(7, 16, 26, 0.7)); }
.tool-card-visual img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.03); }
.tool-launch-tooling .tool-card-visual img { object-fit: contain; padding: 18px; background: #e9eef1; }
.tool-launch-plan .tool-card-visual img { object-position: center 42%; }
.tool-card-copy { padding: 18px 20px 8px; }
.tool-card-copy h2 { margin: 0 0 9px; font-size: clamp(24px, 2.2vw, 32px); }
.tool-card-copy > p { margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.5; }
.tool-launch-card > strong { display: flex; align-items: center; justify-content: space-between; margin: 10px 20px 17px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); font-size: 13px; }
.tool-launch-card > strong span { color: var(--green-2); font-size: 20px; transition: transform 160ms ease; }
.tool-launch-card:hover > strong span { transform: translateX(4px); }
.project-overview { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(520px, 1.22fr); gap: clamp(44px, 7vw, 100px); align-items: center; padding-block: 110px 80px; }
.project-overview-copy h2 { margin: 10px 0 20px; font-size: clamp(38px, 4.5vw, 65px); }
.project-overview-copy > p { max-width: 680px; color: var(--text-2); font-size: 16px; line-height: 1.65; }
.project-overview .hero-facts { margin-top: 30px; }

.tool-page-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); gap: clamp(38px, 7vw, 100px); align-items: end; padding-block: 88px 54px; border-bottom: 1px solid var(--line); }
.tool-page-hero h1, .tool-page-head h1 { margin: 15px 0 0; max-width: 900px; font-size: clamp(48px, 6vw, 86px); }
.tool-page-hero h1 span { color: var(--green-2); }
.tool-page-intro > p, .tool-page-hero .hero-lede { color: var(--text-2); font-size: 17px; line-height: 1.65; }
.page-back { display: inline-block; margin-bottom: 22px; color: var(--cyan); font: 10px var(--mono); text-decoration: none; }
.page-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.page-facts div { min-height: 115px; padding: 19px; background: #0b1927; }
.page-facts dt { color: var(--text); font: 22px var(--mono); }
.page-facts dd { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.tool-page-section, .tool-workspace { padding-top: 46px; }
.tool-page-head { grid-template-columns: minmax(320px, 0.72fr) minmax(440px, 1.28fr); }
.tool-page-intro .caption { font-size: 11px; }
.tool-page-boundary { display: flex; align-items: center; gap: 22px; margin-top: 18px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px; background: #0a1724; }
.tool-page-boundary span { flex: 0 0 auto; color: var(--green-2); font: 10px var(--mono); }
.tool-page-boundary p { margin: 0; color: var(--text-2); font-size: 12px; }
.tool-page-boundary a { color: var(--cyan); }
.tool-page-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.tool-page-badges li { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: #0b1927; color: var(--text-2); font: 9px var(--mono); }
.compact-head { margin-bottom: 26px; }
.tool-page-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-block: 18px 90px; }
.tool-page-notes article { display: grid; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #0a1724; }
.tool-page-notes span { color: var(--green-2); font: 9px var(--mono); }
.tool-page-notes b { font-size: 15px; }
.tool-page-notes p { margin: 0; color: var(--muted); font-size: 11px; }
.tool-boundary { padding-top: 75px; }
.next-tool { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding-block: 28px 90px; }
.next-tool a { display: grid; gap: 5px; min-height: 90px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #0a1724; text-decoration: none; }
.next-tool a:last-child { text-align: right; }
.next-tool span { color: var(--green-2); font: 9px var(--mono); text-transform: uppercase; }
.next-tool b { font-size: 17px; }

@media (max-width: 1180px) {
  .nav { flex-wrap: wrap; row-gap: 0; padding-block: 9px; }
  .nav-links { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-top: 7px; border-top: 1px solid var(--line-soft); scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; }
  .mode-chip { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 70px; }
  .hero-media { max-height: 650px; }
  .workflow { grid-template-columns: repeat(3, 1fr); }
  .workflow article:nth-child(3) { border-right: 0; }
  .workflow article:nth-child(n+4) { border-top: 1px solid var(--line); }
  .workbench-video, .tooling-grid, .twin-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(4, 1fr); }
  .evidence-cards { grid-template-columns: repeat(2, 1fr); }
  .run-gallery { grid-template-columns: repeat(2, 1fr); }
  .run-gallery figure:last-child { grid-column: 1 / -1; }
  .home-tools-copy { grid-template-columns: 1fr; gap: 18px; }
  .project-overview { grid-template-columns: 1fr; }
  .tool-page-hero { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 940px) {
  .home-tools-hero { min-height: auto; width: 100%; padding-left: 24px; padding-right: 0; overflow: hidden; }
  .home-tools-copy { width: calc(100% - 24px); }
  .tool-launch-grid { display: flex; gap: 12px; overflow-x: auto; padding: 0 24px 14px 0; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .tool-launch-card { flex: 0 0 min(84vw, 440px); grid-template-rows: auto 170px 1fr auto; scroll-snap-align: start; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1480px); }
  .nav { min-height: 62px; padding-inline: 12px; }
  .nav-links { gap: 3px; }
  .nav-links a { padding: 7px 9px; font-size: 11px; }
  .brand small, .nav-actions .button { display: none; }
  .hero { padding-block: 56px 38px; gap: 34px; }
  .hero h1 { font-size: clamp(44px, 15vw, 65px); }
  .hero-lede { font-size: 16px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .hero-media { border-radius: 14px; }
  .workflow { grid-template-columns: 1fr; }
  .workflow article { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow article::after { display: none; }
  .workflow h2 { margin-top: 12px; }
  .product-section, .evidence-section { padding-top: 85px; }
  .section-head { grid-template-columns: 1fr; gap: 22px; }
  .section-head h2, .architecture h2, .team h2 { font-size: 42px; }
  .tool-page-hero h1, .tool-page-head h1 { font-size: 46px; }
  .video-source-actions { width: 100%; }
  .video-source-actions .button { flex: 1 1 150px; }
  .control-row, .form-grid, .metric-grid { grid-template-columns: 1fr; }
  .tool-actions { flex-direction: column; }
  .catalog-block { grid-template-columns: 1fr; padding: 18px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .twin-view { height: 440px; }
  .twin-controls, .approval-card { align-items: stretch; flex-direction: column; }
  .viewer-hud { max-width: calc(100% - 24px); flex-wrap: wrap; }
  .viewer-hint { max-width: calc(100% - 24px); white-space: normal; text-align: center; }
  .evidence-cards, .run-gallery, .boundary-grid { grid-template-columns: 1fr; }
  .run-gallery figure:last-child { grid-column: auto; }
  .run-gallery figure, .run-gallery img { min-height: 280px; }
  .architecture, .team { grid-template-columns: 1fr; gap: 35px; }
  .architecture li { grid-template-columns: 78px 1fr; }
  .architecture li small { grid-column: 2; }
  .team ul { grid-template-columns: 1fr; }
  .footer, .footer > div { align-items: flex-start; flex-direction: column; }
  .home-tools-hero { padding-left: 12px; }
  .home-tools-copy { width: calc(100% - 12px); }
  .home-tools-copy h1 { font-size: 48px; }
  .tool-launch-grid { padding-right: 12px; }
  .tool-launch-card { flex-basis: 88vw; }
  .project-overview { padding-top: 80px; }
  .tool-page-hero { padding-top: 56px; }
  .page-facts, .tool-page-notes, .next-tool { grid-template-columns: 1fr; }
  .tool-page-head { grid-template-columns: 1fr; }
  .tool-page-boundary { align-items: flex-start; flex-direction: column; }
}

/* Light industrial interface */
.shell { width: min(1360px, calc(100% - 48px)); }
.nav-links a.is-active, .nav-links a.is-current { color: var(--green-2); background: var(--surface-3); box-shadow: none; font-weight: 700; }
.status-dot, .pipeline li.is-running i { box-shadow: none; }
.text-button, .phase-queue button { color: var(--cyan); font-family: var(--sans); font-weight: 600; }

.hero-facts { background: var(--line); }
.hero-facts div { background: var(--surface); }
.hero-facts dt, .evidence-cards strong { font-family: var(--sans); }
.hero-media { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; aspect-ratio: auto; }
.hero-media video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; opacity: 1; background: #101820; }
.hero-media::after, .hero-reticle, .workflow article:not(:last-child)::after, .tool-card-visual::after { display: none; }
.hero-media figcaption { position: static; display: flex; padding: 13px 15px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-family: var(--sans); font-size: 11px; }
.hero-media figcaption span:first-child { color: var(--text); font-weight: 700; }

.workflow { border-radius: 8px; background: var(--surface); }
.workflow article { background: var(--surface); }
.workflow span, .architecture li span { color: var(--green-2); font-family: var(--sans); font-weight: 700; }
.section-head h2, .architecture h2, .team h2 { font-size: clamp(34px, 4vw, 54px); }
.section-head { border-color: var(--line); }
.section-head > p { color: var(--text-2); }

.panel { background: var(--surface); border-color: var(--line); border-radius: 8px; box-shadow: none; }
.panel-heading { background: var(--surface-2); border-color: var(--line); }
.seg { background: var(--surface-2); border-color: var(--line); }
.seg-btn { color: var(--muted); font-family: var(--sans); }
.seg-btn.is-active, .seg-btn:hover { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
input, select { min-height: 42px; border-color: var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
input::placeholder { color: #98a2b3; }
.inline-status, .strip-title span:last-child, .sub-head span:last-child, .pipeline small, .tab, .technical-details summary { font-family: var(--sans); }
#energy { background: var(--surface-2); }
.frame-button { background: #101820; color: #ffffff; }
.pipeline { border-radius: 7px; background: var(--surface); }
.pipeline i { background: #98a2b3; }
.pipeline li.is-running { background: #eff4ff; }
.pipeline li.is-running i { background: var(--cyan); }
.pipeline li.is-done { background: var(--surface-3); }
.metric-grid div, .instruction-list li { background: var(--surface-2); }
.tab { color: var(--muted); }
.tab.is-active { color: var(--green-2); border-color: var(--green); font-weight: 700; }
.code { border-radius: 6px; background: #f2f4f7; color: #26313c; }
.approval-card { border-color: #e9c782; background: #fff8e8; }

.drop-zone { border-color: #98a2b3; border-radius: 8px; background: var(--surface-2); }
.drop-zone:hover, .drop-zone.is-over { border-color: var(--green); background: var(--surface-3); }
.drop-symbol { border-radius: 6px; background: var(--surface-3); color: var(--green-2); font-family: var(--sans); }
.tool-placeholder, .tool-evidence-grid div, .tool-selection-grid div { background: var(--surface-2); }
.candidate, .tool-candidate { background: var(--surface); }
.candidate.is-selected, .tool-candidate.is-selected, .tool-candidate.is-best { border-color: var(--green); background: var(--surface-3); }
.tool-rank { background: var(--surface-3); color: var(--green-2); }
.eyebrow, .tool-tags, .tool-frame figcaption { font-family: var(--sans) !important; text-transform: none; letter-spacing: 0; }
.btn { border-radius: 6px; }
.btn-primary { background: var(--green); border-color: var(--green); color: #ffffff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.warning-stack > * { border-color: var(--amber); background: #fff8e8; color: var(--text-2); }
.technical-details { border-radius: 7px; background: var(--surface); }
.catalog-block { border-radius: 8px; background: var(--surface); }
.catalog-item, .tool-catalog-item, .tool-library-item { background: var(--surface-2); color: var(--text); }
.tool-library-item:hover { border-color: var(--green); background: var(--surface-3); }

.twin-view { background: #101820; }
.viewer-loading { color: var(--text); background: rgba(255, 255, 255, 0.9); font-family: var(--sans); }
.viewer-hud span, .viewer-hint { border: 1px solid rgba(208, 213, 221, 0.95); border-radius: 5px; background: rgba(255, 255, 255, 0.93); color: #17202a; box-shadow: none; backdrop-filter: none; }
.plan-summary, .joint-grid > * { background: var(--surface-2); }
.gate-grid > * { background: #fef3f2; border-color: #fecdca; color: #912018; }
.gate-grid .is-clear, .gate-grid [data-state="clear"] { background: var(--surface-3); border-color: #b7d69a; color: var(--green-2); }
.phase-queue { background: var(--surface); }

.evidence-cards article, .boundary-grid article { background: var(--surface); border-radius: 8px; }
.evidence-cards span, .run-gallery span { color: var(--green-2); font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
.run-gallery figure { display: grid; grid-template-rows: minmax(230px, 1fr) auto; min-height: 0; border-radius: 8px; background: var(--surface); }
.run-gallery img { min-height: 230px; filter: none; }
.run-gallery figcaption { position: static; padding: 15px 17px; border-top: 1px solid var(--line); background: var(--surface); }
.run-gallery small { color: var(--muted); }
.architecture ol { border-radius: 8px; }
.architecture li { background: var(--surface); }
.team li { background: var(--surface); }
.footer { background: #ffffff; border-color: var(--line); }

.home-tools-hero { min-height: calc(100svh - 64px); }
.home-tools-copy h1 span, .tool-page-hero h1 span { color: var(--green-2); }
.tool-launch-card { border-color: var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); transition: border-color 120ms ease, background 120ms ease; }
.tool-launch-card:hover { transform: none; border-color: var(--green); box-shadow: var(--shadow); }
.tool-card-top { background: var(--surface-2); }
.tool-card-top span { color: var(--text); font-family: var(--sans); font-weight: 700; }
.tool-card-top em { color: var(--muted); font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.tool-card-visual { background: #eef0ed; }
.tool-card-visual img { filter: none; }
.tool-launch-card > strong { margin: 0; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--green-2); }
.project-overview { border-top: 1px solid var(--line); }

.tool-page-hero { padding-block: 52px 42px; }
.tool-page-hero h1, .tool-page-head h1 { font-size: clamp(42px, 5vw, 68px); }
.page-back { color: var(--cyan); font-family: var(--sans); font-weight: 650; }
.page-facts { background: var(--line); }
.page-facts dt { font-family: var(--sans); font-weight: 700; }
.page-facts div, .tool-page-boundary, .tool-page-notes article, .next-tool a { background: var(--surface); }
.tool-page-badges li { background: var(--surface-2); color: var(--text-2); font-family: var(--sans); }
.tool-page-boundary span, .tool-page-notes span, .next-tool span { color: var(--green-2); font-family: var(--sans); font-weight: 700; text-transform: none; }
.next-tool a:hover { border-color: var(--green); background: var(--surface-3); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
