:root {
  color-scheme: dark;
  --bg: #050907;
  --surface: #0a100e;
  --surface-2: #0e1714;
  --line: rgba(184, 210, 201, 0.14);
  --line-strong: rgba(184, 210, 201, 0.25);
  --text: #edf5f1;
  --muted: #91a59e;
  --faint: #60736c;
  --teal: #35e6d0;
  --teal-dark: #159b8b;
  --amber: #f5b544;
  --red: #ff647c;
  --green: #48df92;
  --blue: #70a7ff;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { overflow-x: hidden; }
button, textarea, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.labbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 9, 7, 0.94);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; width: max-content; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 760; }
.brand img { width: 27px; height: 27px; }
.brand small { padding: 2px 5px; border: 1px solid rgba(53, 230, 208, 0.35); border-radius: 4px; color: var(--teal); font: 700 9px var(--mono); }
.labbar__status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.labbar__status span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(72, 223, 146, 0.65); }
.labbar__status.is-busy span { background: var(--amber); animation: blink 0.75s ease infinite alternate; }
.labbar__actions { justify-self: end; display: flex; align-items: center; gap: 16px; }
.labbar__actions > a { color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 650; }
.labbar__actions > a:hover { color: var(--text); }
.guide-launch { min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); background: transparent; cursor: pointer; }
.guide-launch:hover { border-color: rgba(53, 230, 208, 0.45); background: rgba(53, 230, 208, 0.05); }
.guide-launch span { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #03110e; background: var(--teal); font: 800 10px var(--mono); }
.guide-launch strong { font-size: 10px; }
.language { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 6px; }
.language button { min-width: 32px; height: 26px; border: 0; border-radius: 4px; color: var(--faint); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.language button.is-active { color: #03110e; background: var(--teal); }

.workspace { min-height: calc(100vh - 58px); display: grid; grid-template-columns: 300px minmax(500px, 1fr) 320px; }
.setup, .inspector { min-width: 0; padding: 18px; background: var(--surface); }
.setup { border-right: 1px solid var(--line); }
.inspector { border-left: 1px solid var(--line); }
.field { min-width: 0; display: grid; grid-template-rows: auto minmax(360px, 1fr) auto; background-color: #070d0b; background-image: linear-gradient(rgba(108, 143, 131, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(108, 143, 131, 0.045) 1px, transparent 1px); background-size: 34px 34px; }

.panel-title { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 16px; }
.panel-title > span { padding-top: 2px; color: var(--teal); font: 700 10px var(--mono); }
.panel-title strong, .panel-title small { display: block; }
.panel-title strong { font-size: 13px; }
.panel-title small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 14px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #07100d; }
.mode-switch button { min-height: 32px; padding: 0 7px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 750; }
.mode-switch button.is-active { color: #03110e; background: var(--teal); }

.scenario-list { display: grid; gap: 6px; margin-bottom: 18px; }
.scenario { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 8px; text-align: left; color: var(--text); border: 1px solid var(--line); border-radius: 7px; background: #0b1310; cursor: pointer; }
.scenario:hover { border-color: var(--line-strong); }
.scenario.is-active { border-color: rgba(53, 230, 208, 0.55); background: rgba(53, 230, 208, 0.075); }
.scenario__mark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 6px; color: #04100d; font: 800 10px var(--mono); background: var(--teal); }
.scenario__mark.commerce { background: var(--amber); }
.scenario__mark.biolens { background: var(--blue); }
.scenario__mark.universal { color: var(--text); border: 1px solid var(--line-strong); background: #17211d; }
.scenario strong, .scenario small { display: block; }
.scenario strong { font-size: 12px; }
.scenario small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.control-label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: #07100d; outline: none; }
textarea { min-height: 104px; padding: 11px; resize: vertical; font-size: 12px; line-height: 1.5; }
select { height: 38px; padding: 0 9px; font-size: 11px; }
textarea:focus, select:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 2px rgba(53, 230, 208, 0.08); }
.gate-form { display: grid; gap: 10px; }
.gate-form__intro { padding: 10px; border-left: 2px solid var(--teal); background: rgba(53, 230, 208, 0.045); }
.gate-form__intro strong, .gate-form__intro small { display: block; }
.gate-form__intro strong { font-size: 11px; }
.gate-form__intro small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.gate-form label > span:first-child, .gate-advanced label > span:first-child { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.gate-form input, .gate-form select { width: 100%; height: 36px; min-width: 0; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); background: #07100d; outline: none; font-size: 10px; }
.gate-form input:focus, .gate-form select:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 2px rgba(53, 230, 208, 0.08); }
.gate-form__amount { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 7px; }
.gate-checks { display: grid; gap: 6px; margin-top: 2px; }
.gate-checks label { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #09110e; cursor: pointer; }
.gate-checks input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--teal); }
.gate-checks span strong, .gate-checks span small { display: block; }
.gate-checks span strong { font-size: 9px; }
.gate-checks span small { margin-top: 2px; color: var(--faint); font-size: 7px; line-height: 1.35; }
.gate-advanced { border-top: 1px solid var(--line); }
.gate-advanced summary { padding: 9px 0 0; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; }
.gate-advanced > div { display: grid; grid-template-columns: 1fr 88px; gap: 7px; padding-top: 9px; }
.action-help { margin: 6px 0 0; color: var(--faint); font-size: 9px; line-height: 1.45; }
.intake-assistant { margin-top: 14px; border: 1px solid rgba(53, 230, 208, 0.42); border-radius: 7px; background: #091411; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22); overflow: hidden; }
.intake-assistant[hidden] { display: none; }
.intake-assistant__head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.intake-progress { display: flex; align-items: center; gap: 6px; color: var(--faint); font: 750 10px var(--mono); }
.intake-progress span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; }
.intake-progress span.is-done, .intake-progress span.is-active { color: #03110e; border-color: var(--teal); background: var(--teal); }
.intake-progress i { width: 22px; height: 1px; background: var(--line-strong); }
.icon-button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 15px; }
.icon-button:hover { color: var(--text); border-color: var(--line-strong); }
.intake-understanding { padding: 11px 12px 10px; }
.intake-kicker { display: block; margin-bottom: 5px; color: var(--teal); font: 750 9px var(--mono); }
.intake-understanding > strong { display: block; font-size: 14px; }
.intake-understanding > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.intake-facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.intake-facts span { max-width: 100%; padding: 5px 7px; border-left: 2px solid var(--teal-dark); color: var(--muted); background: rgba(53, 230, 208, 0.055); font: 650 9px var(--mono); overflow-wrap: anywhere; }
.intake-question { padding: 11px 12px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.12); }
.intake-question[hidden] { display: none; }
.intake-question__count { margin-bottom: 6px; color: var(--teal); font: 750 9px var(--mono); }
.intake-question > strong, .intake-question > small { display: block; }
.intake-question > strong { font-size: 13px; line-height: 1.4; }
.intake-question > small { margin-top: 4px; color: var(--faint); font-size: 10px; line-height: 1.45; }
.intake-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.intake-options button { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text); background: #07100d; cursor: pointer; font-size: 11px; font-weight: 750; text-align: left; }
.intake-options button:hover, .intake-options button.is-selected { border-color: var(--teal); background: rgba(53, 230, 208, 0.09); }
.intake-text-answer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-top: 9px; }
.intake-text-answer[hidden] { display: none; }
.intake-text-answer input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text); background: #07100d; outline: none; font-size: 11px; }
.intake-text-answer input:focus { border-color: var(--teal); }
.intake-text-answer button { padding: 0 13px; border: 0; border-radius: 5px; color: #03110e; background: var(--teal); cursor: pointer; font-size: 10px; font-weight: 800; }
.intake-assistant__actions { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--line); }
.intake-assistant__actions[hidden] { display: none; }
.intake-assistant__actions > button { min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.intake-assistant__actions > button:disabled { opacity: 0.35; cursor: default; }
.intake-assistant__actions .intake-analyze { margin-left: auto; color: #03110e; border-color: var(--teal); background: var(--teal); }
.research-panel { padding: 12px; border-top: 1px solid rgba(245, 181, 68, 0.34); background: rgba(245, 181, 68, 0.025); }
.research-panel[hidden] { display: none; }
.research-panel__head > span, .research-panel__head > strong { display: block; }
.research-panel__head > span { color: var(--amber); font: 800 8px var(--mono); }
.research-panel__head > strong { margin-top: 5px; font-size: 14px; }
.research-panel__head > p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.research-gaps { display: grid; gap: 6px; margin: 11px 0 0; padding: 0; list-style: none; }
.research-gaps li { min-height: 46px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 8px; border-left: 2px solid var(--amber); background: rgba(255, 255, 255, 0.025); }
.research-gaps li > span { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid rgba(245, 181, 68, 0.45); border-radius: 50%; color: var(--amber); font: 800 8px var(--mono); }
.research-gaps strong, .research-gaps small { display: block; }
.research-gaps strong { font-size: 10px; }
.research-gaps small { margin-top: 2px; color: var(--faint); font-size: 8px; line-height: 1.4; }
.research-scope { margin-top: 10px; padding: 8px 9px; border-left: 2px solid var(--teal); background: rgba(53, 230, 208, 0.035); }
.research-scope strong { display: block; color: var(--teal); font-size: 9px; }
.research-scope p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.research-source { display: block; margin-top: 11px; }
.research-source > span:first-child, .research-source > small { display: block; }
.research-source > span:first-child { font-size: 9px; font-weight: 800; }
.research-source > small { margin-top: 3px; color: var(--faint); font-size: 8px; line-height: 1.4; }
.research-source__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-top: 7px; }
.research-source__row input { min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text); background: #07100d; outline: none; font-size: 10px; }
.research-source__row input:focus { border-color: var(--teal); }
.research-source__row button { min-width: 66px; border: 1px solid rgba(53, 230, 208, 0.46); border-radius: 5px; color: var(--teal); background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.research-sources { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.research-sources:empty { display: none; }
.research-sources > span { max-width: 100%; display: inline-flex; align-items: center; gap: 5px; padding: 4px 5px 4px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 700 8px var(--mono); overflow-wrap: anywhere; }
.research-sources button { width: 17px; height: 17px; padding: 0; border: 0; color: var(--faint); background: transparent; cursor: pointer; }
.research-warning, .research-footnote { display: block; color: var(--faint); font-size: 8px; line-height: 1.45; }
.research-warning { margin: 8px 0 0; }
.research-limited { width: 100%; min-height: 40px; margin-top: 11px; border: 0; border-radius: 5px; color: #171004; background: var(--amber); cursor: pointer; font-size: 10px; font-weight: 850; }
.research-limited:disabled { opacity: 0.55; cursor: wait; }
.research-footnote { margin-top: 6px; text-align: center; }

.context-editor { margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: #09110e; }
.context-editor > summary { cursor: pointer; list-style: none; }
.context-editor > summary::-webkit-details-marker { display: none; }
.context-editor__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 34px 10px 11px; }
.context-editor__head::after { content: "+"; position: absolute; top: 50%; right: 12px; color: var(--teal); font: 700 15px var(--mono); transform: translateY(-50%); }
.context-editor[open] .context-editor__head::after { content: "−"; }
.context-editor__body { padding: 0 11px 11px; border-top: 1px solid var(--line); }
.context-editor__head strong, .context-editor__head small { display: block; }
.context-editor__head strong { font-size: 11px; }
.context-editor__head small { margin-top: 2px; color: var(--faint); font-size: 8px; line-height: 1.4; }
.context-editor__badge { flex: 0 0 auto; padding: 3px 5px; border: 1px solid rgba(53, 230, 208, 0.28); border-radius: 4px; color: var(--teal); background: rgba(53, 230, 208, 0.06); font: 700 7px var(--mono); text-transform: uppercase; }
.context-notes-label { display: block; margin: 12px 0 5px; color: var(--muted); font-size: 8px; font-weight: 700; }
.context-notes { min-height: 76px; padding: 9px; font-size: 10px; line-height: 1.45; }
.context-suggestions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.context-suggestion { min-height: 25px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: rgba(255, 255, 255, 0.018); cursor: pointer; font-size: 8px; }
.context-suggestion::before { content: "+"; margin-right: 4px; color: var(--teal); font: 700 9px var(--mono); }
.context-suggestion:hover { color: var(--text); border-color: rgba(53, 230, 208, 0.35); background: rgba(53, 230, 208, 0.06); }
.structured-context { margin-top: 10px; border-top: 1px solid var(--line); }
.structured-context summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0 0; cursor: pointer; list-style: none; }
.structured-context summary::-webkit-details-marker { display: none; }
.structured-context summary span strong, .structured-context summary span small { display: block; }
.structured-context summary span strong { color: var(--muted); font-size: 9px; }
.structured-context summary span small { margin-top: 2px; color: var(--faint); font-size: 7px; }
.structured-context summary b { min-width: 20px; padding: 3px 5px; border-radius: 4px; color: var(--teal); background: rgba(53, 230, 208, 0.08); text-align: center; font: 700 7px var(--mono); }
.structured-context__body { padding-top: 9px; }
.context-fields { display: grid; gap: 7px; margin-top: 9px; }
.context-row { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) 28px; align-items: end; gap: 5px; }
.context-row label { min-width: 0; }
.context-row label span { display: block; margin-bottom: 3px; color: var(--faint); font-size: 7px; text-transform: uppercase; }
.context-row input { width: 100%; height: 32px; min-width: 0; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: #07100d; outline: none; font: 500 9px var(--mono); }
.context-row input:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 2px rgba(53, 230, 208, 0.08); }
.context-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 14px; }
.context-remove:hover { color: var(--red); border-color: rgba(255, 100, 124, 0.35); }
.add-context { width: 100%; min-height: 31px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; border: 1px dashed var(--line-strong); border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 8px; font-weight: 700; }
.add-context span:first-child { color: var(--teal); font: 800 12px var(--mono); }
.add-context:hover { color: var(--text); border-color: rgba(53, 230, 208, 0.4); background: rgba(53, 230, 208, 0.04); }
.advanced { margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; background: #09110e; }
.advanced summary { position: relative; display: block; padding: 11px 34px 11px 11px; cursor: pointer; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: "+"; position: absolute; top: 50%; right: 12px; color: var(--teal); font: 700 15px var(--mono); transform: translateY(-50%); }
.advanced[open] summary::after { content: "−"; }
.advanced summary span, .advanced summary small { display: block; }
.advanced summary span { font-size: 11px; font-weight: 750; }
.advanced summary small { margin-top: 2px; color: var(--faint); font-size: 8px; line-height: 1.4; }
.advanced__body { padding: 0 11px 11px; border-top: 1px solid var(--line); }
.parameter { margin: 15px 0; }
.parameter > div { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10px; }
.parameter label { color: var(--muted); }
.parameter output { color: var(--teal); font: 700 10px var(--mono); }
input[type="range"] { width: 100%; accent-color: var(--teal); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 45px; border-top: 1px solid var(--line); }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 11px; }
.switch-row small { color: var(--faint); font-size: 9px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: relative; display: block; width: 32px; height: 18px; border-radius: 10px; background: #26332e; cursor: pointer; transition: background 0.2s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #8fa29a; transition: transform 0.2s ease, background 0.2s ease; }
.switch input:checked + span { background: rgba(53, 230, 208, 0.24); }
.switch input:checked + span::after { transform: translateX(14px); background: var(--teal); }
.run { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin-top: 16px; border: 0; border-radius: 7px; color: #03110e; background: var(--teal); cursor: pointer; font-size: 12px; font-weight: 800; }
.run:disabled { color: var(--muted); background: #26332e; cursor: wait; }
.run__pulse { width: 7px; height: 7px; border: 2px solid currentColor; border-radius: 50%; }
.run.is-running .run__pulse { animation: pulse 0.8s ease infinite alternate; }
.privacy { margin: 8px 0 0; color: var(--faint); font-size: 8px; line-height: 1.4; text-align: center; }

.field__head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(7, 13, 11, 0.84); }
.field__heading { display: flex; align-items: flex-start; gap: 10px; }
.field__step { padding-top: 2px; color: var(--teal); font: 700 10px var(--mono); }
.field__head p { margin: 0 0 3px; color: var(--teal); font: 700 9px var(--mono); }
.field__head h1 { margin: 0; font-size: 18px; letter-spacing: 0; }
.field__meta { display: flex; gap: 6px; }
.field__meta span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface); font: 650 8px var(--mono); }
.canvas-wrap { position: relative; min-height: 360px; overflow: hidden; }
#consequence-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-label { position: absolute; top: 13px; color: var(--faint); font: 700 8px var(--mono); pointer-events: none; }
.canvas-label--intent { left: 7%; }
.canvas-label--effects { left: 46%; }
.canvas-label--outcomes { right: 7%; }
.canvas-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; pointer-events: none; }
.canvas-empty span { width: 32px; height: 32px; border: 1px solid rgba(53, 230, 208, 0.6); transform: rotate(45deg); animation: core 2.4s ease-in-out infinite; }
.canvas-empty strong { margin-top: 20px; font-size: 12px; }
.canvas-empty small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.canvas-empty.is-hidden { display: none; }

.field.is-gate { grid-template-rows: auto minmax(560px, 1fr); }
.gate-result { min-height: 560px; padding: 22px; overflow: auto; }
.gate-result__empty { min-height: 460px; display: grid; place-content: center; justify-items: center; text-align: center; }
.gate-shield { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(53, 230, 208, 0.55); border-radius: 7px; color: var(--teal); background: rgba(53, 230, 208, 0.06); font: 800 18px var(--mono); }
.gate-result__empty strong { margin-top: 17px; font-size: 14px; }
.gate-result__empty small { max-width: 340px; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.gate-quickstart { display: grid; grid-template-columns: repeat(3, 1fr); width: min(510px, 100%); margin-top: 25px; border: 1px solid var(--line); border-radius: 7px; background: rgba(5, 9, 7, 0.65); }
.gate-quickstart > span { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 10px; text-align: left; }
.gate-quickstart > span + span { border-left: 1px solid var(--line); }
.gate-quickstart b { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; border: 1px solid rgba(53, 230, 208, 0.45); border-radius: 50%; color: var(--teal); font: 750 8px var(--mono); }
.gate-quickstart small { margin: 0; color: var(--text); font-size: 8px; font-weight: 700; line-height: 1.3; }
.gate-result__content { width: min(720px, 100%); margin: 0 auto; }
.gate-decision { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.gate-decision span, .gate-decision strong { display: block; }
.gate-decision span { color: var(--faint); font: 750 8px var(--mono); }
.gate-decision strong { margin-top: 6px; font-size: 24px; }
.gate-decision p { max-width: 320px; margin: 0; color: var(--muted); text-align: right; font-size: 11px; line-height: 1.5; }
.gate-decision[data-decision="ALLOW"] strong { color: var(--green); }
.gate-decision[data-decision="REQUIRE_HUMAN"] strong, .gate-decision[data-decision="MODIFY"] strong { color: var(--amber); }
.gate-decision[data-decision="BLOCK"] strong { color: var(--red); }
.gate-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; padding: 0; list-style: none; }
.gate-flow li { min-width: 0; min-height: 116px; padding: 10px; border: 1px solid var(--line); border-right: 0; background: rgba(5, 9, 7, 0.72); }
.gate-flow li:first-child { border-radius: 7px 0 0 7px; }
.gate-flow li:last-child { border-right: 1px solid var(--line); border-radius: 0 7px 7px 0; }
.gate-flow li > span { color: var(--teal); font: 750 8px var(--mono); }
.gate-flow strong, .gate-flow small { display: block; }
.gate-flow strong { margin-top: 12px; font-size: 10px; }
.gate-flow small, .gate-flow ul { margin: 5px 0 0; padding: 0; color: var(--muted); font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.gate-flow ul { padding-left: 13px; }
.gate-consequences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.gate-consequence { min-width: 0; padding: 10px; border-top: 2px solid var(--teal-dark); background: rgba(255, 255, 255, 0.025); }
.gate-consequence[data-severity="high"] { border-color: var(--red); }
.gate-consequence[data-severity="medium"] { border-color: var(--amber); }
.gate-consequence strong, .gate-consequence small { display: block; }
.gate-consequence strong { font-size: 9px; }
.gate-consequence small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.gate-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.gate-primary, .gate-redeem { min-height: 40px; padding: 0 14px; border: 0; border-radius: 6px; color: #03110e; background: var(--teal); cursor: pointer; font-size: 10px; font-weight: 800; }
.gate-primary:disabled, .gate-redeem:disabled { color: var(--faint); background: #26332e; cursor: not-allowed; }
#gate-review-portal { color: var(--teal); font-size: 9px; font-weight: 700; text-decoration: none; }
.gate-permit { margin-top: 16px; padding: 14px; border: 1px solid rgba(72, 223, 146, 0.35); border-radius: 7px; background: rgba(72, 223, 146, 0.045); }
.gate-permit > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gate-permit > div:first-child span { color: var(--green); font: 750 8px var(--mono); }
.gate-permit > div:first-child strong { max-width: 70%; overflow: hidden; font: 700 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.gate-permit > p { margin: 7px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.gate-permit__token { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 5px; margin-top: 10px; }
.gate-permit__token code { min-width: 0; overflow: hidden; padding: 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: #050907; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.gate-permit__token button { border: 1px solid var(--line-strong); border-radius: 5px; color: var(--text); background: transparent; cursor: pointer; font-size: 15px; }
.gate-redeem { margin-top: 10px; background: var(--green); }
.gate-execution { padding: 9px; border-left: 2px solid var(--green); color: var(--green) !important; background: rgba(72, 223, 146, 0.04); }

.branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: rgba(5, 9, 7, 0.88); }
.branch { min-width: 0; min-height: 96px; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); cursor: pointer; }
.branch.is-active { border-color: currentColor; background: var(--surface-2); }
.branch[data-verdict="SAFE"] { color: var(--green); }
.branch[data-verdict="RISKY"] { color: var(--amber); }
.branch[data-verdict="BLOCKED"] { color: var(--red); }
.branch__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.branch__top span { font: 750 9px var(--mono); }
.branch__top strong { font-size: 11px; }
.branch p { height: 32px; margin: 8px 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; }
.mini-risk { height: 4px; overflow: hidden; border-radius: 3px; background: #202b27; }
.mini-risk span { display: block; height: 100%; border-radius: inherit; background: currentColor; }

.verdict { min-height: 92px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #0b1310; }
.verdict > span, .verdict strong, .verdict small { display: block; }
.verdict > span { color: var(--faint); font: 750 8px var(--mono); }
.verdict strong { margin-top: 8px; font-size: 21px; }
.verdict small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.verdict[data-verdict="SAFE"] { color: var(--green); border-color: rgba(72, 223, 146, 0.4); }
.verdict[data-verdict="RISKY"] { color: var(--amber); border-color: rgba(245, 181, 68, 0.4); }
.verdict[data-verdict="BLOCKED"] { color: var(--red); border-color: rgba(255, 100, 124, 0.4); }
.decision-summary { min-height: 48px; margin: 10px 0 0; padding: 10px; border-left: 2px solid var(--line-strong); color: var(--muted); background: rgba(255, 255, 255, 0.025); font-size: 10px; line-height: 1.5; }
.verdict[data-verdict="SAFE"] + .decision-summary { border-left-color: var(--green); }
.verdict[data-verdict="RISKY"] + .decision-summary { border-left-color: var(--amber); }
.verdict[data-verdict="BLOCKED"] + .decision-summary { border-left-color: var(--red); }
.router-card { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #08110e; }
.router-card[hidden] { display: none; }
.router-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.router-card__head span { color: var(--faint); font: 750 8px var(--mono); }
.router-card__head strong { color: var(--teal); font: 800 9px var(--mono); }
.router-card[data-handling="GATE"] .router-card__head strong { color: var(--amber); }
.router-card[data-handling="BLOCK"] .router-card__head strong { color: var(--red); }
.router-card[data-handling="ALLOW"] .router-card__head strong { color: var(--green); }
.router-packs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.router-packs span { max-width: 100%; overflow: hidden; padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 650 7px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.router-packs span.is-primary { color: var(--teal); border-color: rgba(53, 230, 208, 0.34); background: rgba(53, 230, 208, 0.06); }
.router-meta { display: grid; grid-template-columns: 1fr 1fr 52px; gap: 6px; margin: 9px 0 0; }
.router-meta div { min-width: 0; }
.router-meta dt, .router-meta dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.router-meta dt { color: var(--faint); font-size: 7px; text-transform: uppercase; }
.router-meta dd { margin: 2px 0 0; color: var(--text); font-size: 8px; }
.risk-meter { margin: 15px 0; }
.risk-meter > div:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.risk-meter strong { color: var(--text); font: 700 10px var(--mono); }
.risk-track { height: 5px; overflow: hidden; border-radius: 3px; background: #202b27; }
.risk-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--amber); transition: width 0.55s ease; }
.inspection-block { padding: 13px 0; border-top: 1px solid var(--line); }
.inspection-block h2 { margin: 0 0 10px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0; }
.causal-chain { margin: 0; padding: 0; list-style: none; counter-reset: chain; }
.causal-chain li { position: relative; min-height: 31px; padding: 0 0 8px 22px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.causal-chain li::before { counter-increment: chain; content: counter(chain); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--teal); font: 700 7px var(--mono); }
.causal-chain li:not(:last-child)::after { content: ""; position: absolute; top: 15px; bottom: 0; left: 7px; width: 1px; background: var(--line); }
.uncertainty { padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #09110e; }
.uncertainty > div { display: flex; justify-content: space-between; font-size: 9px; }
.uncertainty p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.evidence-card[hidden] { display: none; }
.evidence-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evidence-card__head h2 { margin: 0; }
.evidence-card__head > strong { flex: 0 0 auto; padding: 3px 6px; border: 1px solid rgba(53, 230, 208, 0.32); border-radius: 4px; color: var(--teal); font: 800 8px var(--mono); }
.evidence-summary { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.evidence-list { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.evidence-list:empty { display: none; }
.evidence-list li { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 7px; align-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: #08110e; }
.evidence-list li > span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--faint); background: rgba(255, 255, 255, 0.035); font: 750 7px var(--mono); }
.evidence-list li[data-status="verified_relevant"] { border-color: rgba(72, 223, 146, 0.3); }
.evidence-list li[data-status="verified_relevant"] > span { color: #04120d; background: var(--green); }
.evidence-list li[data-status="blocked"], .evidence-list li[data-status="fetch_failed"] { border-color: rgba(255, 100, 124, 0.22); }
.evidence-list a, .evidence-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-list a { color: var(--text); font-size: 9px; font-weight: 750; text-decoration: none; }
.evidence-list a:hover { color: var(--teal); text-decoration: underline; }
.evidence-list small { margin-top: 2px; color: var(--faint); font-size: 7px; }
.evidence-list li[data-status="verified_relevant"] small { color: var(--green); }
.evidence-list li[data-status="blocked"] small, .evidence-list li[data-status="fetch_failed"] small { color: var(--red); }
.evidence-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.evidence-state > span { color: var(--faint); font: 750 7px var(--mono); text-transform: uppercase; }
.evidence-state > strong { max-width: 70%; color: var(--muted); font-size: 9px; text-align: right; overflow-wrap: anywhere; }
.evidence-card[data-state="consistent"] .evidence-state > strong { color: var(--green); }
.evidence-card[data-state="single_source"] .evidence-state > strong,
.evidence-card[data-state="insufficient"] .evidence-state > strong { color: var(--amber); }
.evidence-card[data-state="mixed"] .evidence-state > strong,
.evidence-card[data-state="contested"] .evidence-state > strong { color: var(--red); }
.evidence-state-summary { margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.evidence-buckets { margin-top: 9px; }
.evidence-bucket[hidden] { display: none; }
.evidence-bucket { padding: 8px 0; border-top: 1px solid var(--line); }
.evidence-bucket:first-child:not([hidden]) { border-top: 0; }
.evidence-bucket > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.evidence-bucket h3 { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.35; text-transform: uppercase; }
.evidence-bucket > div > span { flex: 0 0 auto; min-width: 17px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--faint); font: 750 7px var(--mono); text-align: center; }
.evidence-bucket ul { display: grid; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.evidence-bucket li { min-width: 0; padding-left: 10px; border-left: 2px solid var(--line-strong); color: var(--muted); font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.evidence-bucket li strong, .evidence-bucket li small { display: block; }
.evidence-bucket li strong { margin-bottom: 3px; color: var(--text); font-size: 8px; }
.evidence-bucket li small { margin-top: 3px; color: var(--faint); font: 650 7px var(--mono); }
.evidence-bucket[data-tone="supported"] li { border-left-color: var(--green); }
.evidence-bucket[data-tone="supported"] h3 { color: var(--green); }
.evidence-bucket[data-tone="contested"] li { border-left-color: var(--red); }
.evidence-bucket[data-tone="contested"] h3 { color: var(--red); }
.evidence-bucket[data-tone="isolated"] li,
.evidence-bucket[data-tone="human"] li { border-left-color: var(--amber); }
.evidence-bucket[data-tone="isolated"] h3,
.evidence-bucket[data-tone="human"] h3 { color: var(--amber); }
.evidence-disclaimer { display: block; margin-top: 8px; color: var(--faint); font-size: 7px; line-height: 1.45; }
.governor { margin: 0; }
.governor div { display: grid; grid-template-columns: 1fr minmax(0, 1.3fr); gap: 8px; padding: 5px 0; font-size: 9px; }
.governor dt { color: var(--faint); }
.governor dd { margin: 0; overflow: hidden; color: var(--text); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.human-review { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #08110e; }
.human-review__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.human-review__head span { color: var(--faint); font: 750 8px var(--mono); }
.human-review__head strong { color: var(--muted); font: 800 9px var(--mono); }
.human-review[data-status="pending"] .human-review__head strong,
.human-review[data-status="submitting"] .human-review__head strong { color: var(--amber); }
.human-review[data-status="approved"] .human-review__head strong { color: var(--green); }
.human-review[data-status="changes_requested"] .human-review__head strong { color: var(--amber); }
.human-review[data-status="rejected"], .human-review[data-status="error"] { border-color: rgba(255, 100, 124, 0.32); }
.human-review[data-status="rejected"] .human-review__head strong,
.human-review[data-status="error"] .human-review__head strong { color: var(--red); }
.human-review > p { margin: 7px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.human-review__decision { margin: 9px 0 0; padding-top: 7px; border-top: 1px solid var(--line); }
.human-review__decision[hidden] { display: none; }
.human-review__decision div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 7px; padding: 3px 0; font-size: 8px; line-height: 1.4; }
.human-review__decision dt { color: var(--faint); }
.human-review__decision dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
#submit-review { width: 100%; min-height: 36px; margin-top: 9px; border: 1px solid rgba(53, 230, 208, 0.5); border-radius: 6px; color: #03110e; background: var(--teal); cursor: pointer; font-size: 9px; font-weight: 800; }
#submit-review:disabled { color: var(--faint); border-color: var(--line); background: transparent; cursor: not-allowed; }
.report-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.copy, .share { width: 100%; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.share { border-color: rgba(53, 230, 208, 0.5); color: #03110e; background: var(--teal); }
.copy:disabled, .share:disabled { color: var(--faint); border-color: var(--line); background: transparent; cursor: not-allowed; }
.share-note { margin: 8px 0 0; color: var(--faint); font-size: 8px; line-height: 1.45; }
.public-link { display: block; margin-top: 9px; color: var(--teal); font-size: 9px; font-weight: 700; text-decoration: none; }
.public-link[hidden] { display: none; }

body.has-tutorial { overflow: hidden; }
.tutorial-shortcut { position: fixed; left: 16px; bottom: 16px; z-index: 35; min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid rgba(53, 230, 208, 0.42); border-radius: 6px; color: var(--text); background: #0b1512; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34); cursor: pointer; }
.tutorial-shortcut:hover { border-color: var(--teal); background: #0e1c18; }
.tutorial-shortcut span { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: #03110e; background: var(--teal); font: 800 11px var(--mono); }
.tutorial-shortcut strong { font-size: 10px; }
.tutorial { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.tutorial__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(1, 4, 3, 0.82); backdrop-filter: blur(9px); cursor: default; }
.tutorial__panel { position: relative; width: min(1040px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; border: 1px solid rgba(184, 210, 201, 0.24); border-radius: 8px; background: #08100d; box-shadow: 0 26px 90px rgba(0, 0, 0, 0.58); }
.tutorial__head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tutorial__head span, .tutorial__head strong { display: block; }
.tutorial__head span { color: var(--teal); font: 750 8px var(--mono); }
.tutorial__head strong { margin-top: 4px; font-size: 14px; }
.tutorial__close { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 19px; }
.tutorial__close:hover { color: var(--text); border-color: var(--line-strong); }
.tutorial__body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr); min-height: 490px; }
.tutorial__visual { display: grid; place-content: center; justify-items: center; padding: 30px; border-right: 1px solid var(--line); background-color: #060c0a; background-image: linear-gradient(rgba(108, 143, 131, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(108, 143, 131, 0.045) 1px, transparent 1px); background-size: 28px 28px; }
.tutorial-demo { width: min(480px, 100%); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #07100d; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35); }
.tutorial-demo__bar { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 750; }
.tutorial-demo__bar > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px rgba(53, 230, 208, 0.6); }
.tutorial-demo__bar b { margin-left: auto; padding: 2px 4px; border: 1px solid rgba(53, 230, 208, 0.32); border-radius: 3px; color: var(--teal); font: 700 7px var(--mono); }
.tutorial-demo__screen { position: relative; min-height: 286px; padding: 18px; }
.tutorial-demo__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.tutorial-demo__modes span { min-height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--faint); font-size: 8px; font-weight: 750; transition: color 0.25s ease, background 0.25s ease; }
.tutorial-demo[data-step="0"] [data-demo-mode-gate], .tutorial-demo[data-step="1"] [data-demo-mode-gate] { color: #03110e; background: var(--teal); }
.tutorial-demo__form { margin-top: 14px; padding: 13px; border-left: 2px solid var(--teal); background: rgba(53, 230, 208, 0.045); transition: opacity 0.25s ease, transform 0.25s ease; }
.tutorial-demo__form > small { color: var(--faint); font: 700 7px var(--mono); }
.tutorial-demo__form > strong { display: block; margin-top: 7px; font-size: 11px; }
.tutorial-demo__form > div { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 5px; margin-top: 11px; }
.tutorial-demo__form i { height: 23px; border: 1px solid var(--line); border-radius: 4px; background: #091512; }
.tutorial-demo__form button { width: 100%; min-height: 30px; margin-top: 9px; border: 0; border-radius: 5px; color: #03110e; background: var(--teal); font-size: 8px; font-weight: 800; }
.tutorial-demo__engine { position: absolute; inset: 118px 20px auto; display: flex; align-items: center; justify-content: center; gap: 26px; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.tutorial-demo__engine span { width: 18px; height: 18px; border: 2px solid var(--teal); border-radius: 50%; animation: tutorial-node 1.2s ease-in-out infinite alternate; }
.tutorial-demo__engine span:nth-child(2) { animation-delay: 0.2s; }
.tutorial-demo__engine span:nth-child(3) { animation-delay: 0.4s; }
.tutorial-demo__decision { position: absolute; inset: 68px 18px auto; min-height: 150px; padding: 18px; border: 1px solid rgba(245, 181, 68, 0.38); border-radius: 7px; background: #0b1310; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; }
.tutorial-demo__decision small { color: var(--faint); font: 700 7px var(--mono); }
.tutorial-demo__decision strong { display: block; margin-top: 9px; color: var(--amber); font-size: 19px; }
.tutorial-demo__decision p { margin: 13px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.5; }
.tutorial-demo[data-decision="ALLOW"] .tutorial-demo__decision { border-color: rgba(72, 223, 146, 0.42); }
.tutorial-demo[data-decision="ALLOW"] .tutorial-demo__decision strong { color: var(--green); }
.tutorial-demo[data-decision="BLOCK"] .tutorial-demo__decision { border-color: rgba(255, 100, 124, 0.44); }
.tutorial-demo[data-decision="BLOCK"] .tutorial-demo__decision strong { color: var(--red); }
.tutorial-demo[data-step="1"] .tutorial-demo__form { opacity: 0.18; }
.tutorial-demo[data-step="1"] .tutorial-demo__engine { opacity: 1; }
.tutorial-demo[data-step="2"] .tutorial-demo__modes, .tutorial-demo[data-step="2"] .tutorial-demo__form { opacity: 0.08; }
.tutorial-demo[data-step="2"] .tutorial-demo__decision { opacity: 1; transform: translateY(0); }
.tutorial-demo__caption { min-height: 50px; padding: 10px 12px; border-top: 1px solid var(--line); }
.tutorial-demo__caption > span { display: block; color: var(--text); font-size: 9px; font-weight: 700; }
.tutorial-demo__caption > i { display: block; height: 3px; margin-top: 9px; overflow: hidden; border-radius: 2px; background: #1a2722; }
.tutorial-demo__caption b { display: block; width: 0; height: 100%; background: var(--teal); }
.tutorial-demo.is-playing .tutorial-demo__caption b { animation: tutorial-progress 4s linear forwards; }
.tutorial-play { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); background: #08110e; cursor: pointer; }
.tutorial-play span { color: var(--teal); font-size: 10px; }
.tutorial-play strong { font-size: 9px; }
.tutorial__copy { align-self: center; padding: 30px; }
.tutorial__step { color: var(--faint); font: 750 8px var(--mono); }
.tutorial__step b { color: var(--teal); }
.tutorial__copy h2 { margin: 14px 0 0; font-size: 24px; line-height: 1.15; }
.tutorial__copy > p { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.tutorial__copy > ul { display: grid; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; }
.tutorial__copy > ul li { position: relative; padding-left: 19px; color: var(--text); font-size: 10px; line-height: 1.5; }
.tutorial__copy > ul li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
.tutorial__copy aside { margin-top: 21px; padding: 11px; border-left: 2px solid var(--teal); background: rgba(53, 230, 208, 0.04); }
.tutorial__copy aside strong { color: var(--teal); font: 750 8px var(--mono); }
.tutorial__copy aside p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.tutorial-sandbox { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.tutorial-sandbox__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tutorial-sandbox__head span, .tutorial-sandbox__head strong { display: block; }
.tutorial-sandbox__head span { color: var(--teal); font: 750 7px var(--mono); }
.tutorial-sandbox__head strong { margin-top: 4px; font-size: 11px; line-height: 1.35; }
.tutorial-sandbox__range { display: block; margin-top: 13px; }
.tutorial-sandbox__range > span { display: block; color: var(--muted); font-size: 8px; font-weight: 700; }
.tutorial-sandbox__range input { width: 100%; height: 18px; margin: 5px 0 0; accent-color: var(--teal); cursor: ew-resize; }
.tutorial-presets { display: grid; gap: 6px; margin-top: 10px; }
.tutorial-presets button { min-height: 43px; display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: transparent; cursor: pointer; text-align: left; }
.tutorial-presets button > i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--amber); }
.tutorial-presets button:first-child > i { background: var(--green); }
.tutorial-presets button:last-child > i { background: var(--red); }
.tutorial-presets button span, .tutorial-presets button strong, .tutorial-presets button small { display: block; }
.tutorial-presets button strong { font-size: 9px; }
.tutorial-presets button small { margin-top: 2px; color: var(--faint); font-size: 7px; }
.tutorial-presets button:hover, .tutorial-presets button.is-active { border-color: rgba(53, 230, 208, 0.55); background: rgba(53, 230, 208, 0.06); }
.tutorial-presets button.is-active { box-shadow: inset 2px 0 var(--teal); }
.tutorial-customize { margin-top: 9px; border: 1px solid var(--line); border-radius: 6px; }
.tutorial-customize summary { padding: 9px; color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 750; }
.tutorial-customize[open] summary { color: var(--text); border-bottom: 1px solid var(--line); }
.tutorial-customize__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 9px 0; color: var(--muted); font-size: 8px; font-weight: 700; }
.tutorial-customize__head output { color: var(--text); font: 800 13px var(--mono); }
.tutorial-customize .tutorial-sandbox__range { margin: 0; padding: 2px 9px 0; }
.tutorial-customize .tutorial-known { padding: 0 9px 9px; }
.tutorial-known { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; cursor: pointer; }
.tutorial-known input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--teal); }
.tutorial-known span, .tutorial-known strong, .tutorial-known small { display: block; }
.tutorial-known strong { font-size: 9px; }
.tutorial-known small { margin-top: 2px; color: var(--faint); font-size: 7px; line-height: 1.35; }
.tutorial-live { margin-top: 11px; padding: 10px; border: 1px solid rgba(245, 181, 68, 0.34); border-left-width: 3px; border-radius: 6px; background: rgba(245, 181, 68, 0.04); transition: border-color 0.2s ease, background 0.2s ease; }
.tutorial-live span { display: block; color: var(--faint); font: 750 7px var(--mono); }
.tutorial-live strong { display: block; margin-top: 4px; color: var(--amber); font-size: 12px; }
.tutorial-live p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.tutorial-live[data-decision="ALLOW"] { border-color: rgba(72, 223, 146, 0.42); background: rgba(72, 223, 146, 0.04); }
.tutorial-live[data-decision="ALLOW"] strong { color: var(--green); }
.tutorial-live[data-decision="BLOCK"] { border-color: rgba(255, 100, 124, 0.44); background: rgba(255, 100, 124, 0.04); }
.tutorial-live[data-decision="BLOCK"] strong { color: var(--red); }
.tutorial-use-case { width: 100%; min-height: 34px; margin-top: 9px; border: 1px solid rgba(53, 230, 208, 0.45); border-radius: 6px; color: #03110e; background: var(--teal); cursor: pointer; font-size: 8px; font-weight: 800; }
.tutorial-use-case:hover { filter: brightness(1.08); }
.tutorial__footer { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); }
.tutorial__footer > div { display: flex; gap: 7px; }
.tutorial-dots button { width: 26px; height: 5px; padding: 0; border: 0; border-radius: 3px; background: #26332e; cursor: pointer; }
.tutorial-dots button.is-active { background: var(--teal); }
.tutorial-secondary, .tutorial-primary { min-height: 38px; padding: 0 15px; border-radius: 6px; cursor: pointer; font-size: 10px; font-weight: 800; }
.tutorial-secondary { border: 1px solid var(--line-strong); color: var(--text); background: transparent; }
.tutorial-secondary:disabled { visibility: hidden; }
.tutorial-primary { border: 0; color: #03110e; background: var(--teal); }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 40; max-width: 320px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); background: #101a17; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); font-size: 10px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@keyframes blink { to { opacity: 0.35; } }
@keyframes pulse { to { transform: scale(1.35); } }
@keyframes core { 50% { transform: rotate(135deg) scale(1.16); border-color: var(--teal); } }
@keyframes tutorial-node { to { transform: scale(1.35); box-shadow: 0 0 18px rgba(53, 230, 208, 0.6); } }
@keyframes tutorial-progress { to { width: 100%; } }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: 250px minmax(460px, 1fr) 280px; }
}
@media (max-width: 920px) {
  .labbar { grid-template-columns: 1fr auto; }
  .labbar__status { display: none; }
  .workspace { grid-template-columns: 250px minmax(0, 1fr); }
  .inspector { grid-column: 1 / -1; display: grid; grid-template-columns: 160px 1fr 1fr; gap: 14px; border-top: 1px solid var(--line); border-left: 0; }
  .inspector .panel-title, .inspector .router-card, .inspector .evidence-card, .inspector .report-actions, .inspector .share-note, .inspector .public-link { grid-column: 1 / -1; }
  .risk-meter { align-self: center; }
  .inspection-block { border-top: 0; }
}
@media (max-width: 680px) {
  .labbar { padding: 8px 12px; }
  .labbar__actions > a { display: none; }
  .guide-launch strong { display: none; }
  .guide-launch { width: 30px; padding: 0; justify-content: center; }
  .tutorial-shortcut { left: 10px; bottom: 10px; min-height: 34px; padding: 0 9px; }
  .workspace { display: block; }
  .setup { border-right: 0; border-bottom: 1px solid var(--line); }
  .scenario-list { grid-template-columns: repeat(2, 1fr); }
  .scenario { min-height: 68px; align-items: flex-start; flex-direction: column; gap: 5px; }
  .scenario__mark { width: 27px; height: 23px; }
  .scenario small { display: none; }
  .context-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; }
  .intake-options { grid-template-columns: 1fr; }
  .intake-assistant__actions { flex-wrap: wrap; }
  .intake-assistant__actions .intake-analyze { width: 100%; margin-left: 0; }
  .field { min-height: 690px; grid-template-rows: auto 430px auto; }
  .field.is-gate { min-height: 0; grid-template-rows: auto auto; }
  .field__head { padding: 12px; }
  .field__head h1 { font-size: 15px; }
  .field__meta span:last-child { display: none; }
  .branches { grid-template-columns: 1fr; }
  .gate-result { min-height: 0; padding: 15px 12px; }
  .gate-result__empty { min-height: 300px; }
  .gate-quickstart { grid-template-columns: 1fr; }
  .gate-quickstart > span + span { border-top: 1px solid var(--line); border-left: 0; }
  .gate-decision { display: block; }
  .gate-decision p { max-width: none; margin-top: 8px; text-align: left; }
  .gate-flow { grid-template-columns: 1fr; }
  .gate-flow li { min-height: 76px; border-right: 1px solid var(--line); border-bottom: 0; }
  .gate-flow li:first-child { border-radius: 7px 7px 0 0; }
  .gate-flow li:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 7px 7px; }
  .gate-flow strong { margin-top: 5px; }
  .gate-consequences { grid-template-columns: 1fr; }
  .gate-actions { align-items: stretch; flex-direction: column; }
  .gate-primary, #gate-review-portal { width: 100%; text-align: center; }
  .branch { min-height: 72px; }
  .branch p { height: auto; }
  .inspector { display: block; border-top: 1px solid var(--line); }
  .inspection-block { border-top: 1px solid var(--line); }
  .tutorial { align-items: end; padding: 0; }
  .tutorial__panel { width: 100%; max-height: calc(100vh - 18px); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 8px 8px 0 0; }
  .tutorial__head { padding: 12px 14px; }
  .tutorial__body { display: block; min-height: 0; }
  .tutorial__visual { padding: 18px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tutorial-demo { width: min(400px, 100%); }
  .tutorial-demo__screen { min-height: 230px; padding: 12px; }
  .tutorial-demo__decision { inset: 56px 12px auto; }
  .tutorial__copy { padding: 20px 16px; }
  .tutorial__copy h2 { font-size: 20px; }
  .tutorial__copy aside { display: none; }
  .tutorial-sandbox { margin-top: 16px; }
  .tutorial__footer { position: sticky; bottom: 0; background: #08100d; }
  .tutorial-dots button { width: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
