:root {
  color-scheme: dark;
  --void: #010407;
  --deep: #020a0e;
  --panel: rgba(5, 18, 24, 0.88);
  --panel-strong: #07141a;
  --line: rgba(78, 185, 204, 0.2);
  --line-hot: rgba(32, 231, 255, 0.6);
  --text: #f1f8f9;
  --muted: #789099;
  --cyan: #20e7ff;
  --lime: #b8ff3d;
  --magenta: #ff3ea5;
  --amber: #ffb21d;
  --violet: #8a7dff;
  --danger: #ff5364;
  --rail: 82px;
  --top: 68px;
  --mobile-nav: 0px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--void); color: var(--text); }
body { overflow: hidden; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; letter-spacing: .01em; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.is-hidden { display: none !important; }
.eyebrow { margin: 0 0 7px; color: var(--cyan); font: 800 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .17em; }
h1, h2, p { margin-top: 0; }
em { color: var(--lime); font-style: normal; }

body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .26;
  background-image: linear-gradient(rgba(32, 231, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(32, 231, 255, .025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 52% 35%, #000 20%, transparent 90%);
}

.boot-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; place-items: center; background: #010407; transition: opacity .5s ease; }
.boot-screen.done { opacity: 0; pointer-events: none; }
.boot-screen p { margin: 24px 0 14px; color: var(--cyan); font: 800 11px ui-monospace, monospace; letter-spacing: .35em; }
.boot-mark { position: relative; width: 112px; height: 112px; border: 1px solid rgba(32,231,255,.28); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 80px rgba(32,231,255,.12); }
.boot-mark::before, .boot-mark::after { content: ""; position: absolute; inset: 9px; border: 1px dashed var(--cyan); border-radius: 50%; animation: rotate 4s linear infinite; }
.boot-mark::after { inset: 23px; border-style: solid; border-color: var(--lime); animation-direction: reverse; animation-duration: 3s; }
.boot-mark span { width: 19px; height: 19px; border: 3px solid white; transform: rotate(45deg); }
.boot-mark b { position: absolute; bottom: -7px; background: var(--void); padding: 0 8px; color: var(--lime); font: 800 10px ui-monospace, monospace; }
.boot-line { width: 240px; height: 2px; background: rgba(32,231,255,.12); overflow: hidden; }
.boot-line i { display: block; width: 38%; height: 100%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: boot 1.2s ease-in-out infinite; }

.access-gate { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at center, rgba(5,44,55,.65), rgba(1,4,7,.97) 55%); }
.gate-card { width: min(560px, 100%); padding: 44px; text-align: center; }
.gate-card h1 { margin-bottom: 14px; font-size: clamp(30px, 6vw, 52px); letter-spacing: -.06em; }
.gate-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.gate-card label { display: block; margin: 28px 0 8px; text-align: left; color: #a7bbc1; font: 800 10px ui-monospace, monospace; letter-spacing: .13em; text-transform: uppercase; }
.token-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.token-row input, .command-palette > input { min-width: 0; height: 50px; border: 1px solid var(--line); border-radius: 4px; background: #02080b; color: white; padding: 0 15px; }
.gate-card small { display: block; margin-top: 18px; color: #587078; }
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--danger) !important; font-size: 12px; text-align: left; }
.gate-orbit { position: relative; width: 96px; height: 96px; margin: 0 auto 22px; border: 1px solid rgba(32,231,255,.34); border-radius: 50%; }
.gate-orbit::before, .gate-orbit::after { content: ""; position: absolute; inset: 14px -18px; border: 1px solid rgba(184,255,61,.5); border-radius: 50%; transform: rotate(50deg); }
.gate-orbit::after { transform: rotate(-50deg); border-color: rgba(255,62,165,.5); }
.gate-orbit span { position: absolute; inset: 31px; background: var(--cyan); clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); box-shadow: 0 0 25px var(--cyan); }

.hud-card { position: relative; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(145deg, rgba(7,22,28,.93), rgba(2,10,14,.91)); box-shadow: inset 0 1px rgba(255,255,255,.025), 0 22px 70px rgba(0,0,0,.18); overflow: hidden; }
.hud-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), transparent 12%, transparent 88%, var(--lime)) top/100% 1px no-repeat; opacity: .5; }
.button, .icon-button, .avatar-button { min-height: 42px; border: 1px solid var(--line); border-radius: 4px; background: rgba(6,18,23,.82); cursor: pointer; font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; transition: .18s ease; }
.button { padding: 0 18px; }
.button:hover, .icon-button:hover { border-color: var(--cyan); color: white; box-shadow: 0 0 20px rgba(32,231,255,.12); transform: translateY(-1px); }
.button.primary { color: #001014; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 24px rgba(32,231,255,.17); }
.button.accent { color: #071000; border-color: var(--lime); background: var(--lime); }
.button.ghost { color: #c3d1d5; background: rgba(5,14,18,.5); }
.icon-button { min-width: 42px; padding: 0 11px; color: var(--muted); }
.avatar-button { width: 42px; border-radius: 50%; color: #03100c; background: linear-gradient(140deg, var(--lime), var(--cyan)); border: none; }

.app-shell { min-height: 100vh; }
.topbar { position: fixed; z-index: 50; inset: 0 0 auto 0; height: var(--top); display: grid; grid-template-columns: minmax(250px, 340px) minmax(160px, 1fr) auto auto; align-items: center; gap: 20px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(2,8,11,.9); backdrop-filter: blur(20px); }
.brand { min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; }
.brand-sigil { position: relative; width: 38px; height: 38px; flex: none; border: 1px solid var(--cyan); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 22px rgba(32,231,255,.13); }
.brand-sigil::before { content: ""; position: absolute; inset: 5px; border: 1px dashed var(--lime); border-radius: 50%; animation: rotate 9s linear infinite; }
.brand-sigil i { width: 10px; height: 10px; background: white; transform: rotate(45deg); }
.brand b { display: block; font-size: 13px; letter-spacing: .11em; }
.brand small { display: block; margin-top: 3px; color: var(--cyan); font: 700 8px ui-monospace, monospace; letter-spacing: .15em; }
.mission-title { padding-left: 20px; border-left: 1px solid var(--line); }
.mission-title .eyebrow { margin-bottom: 3px; }
.mission-title strong { font-size: 12px; letter-spacing: .12em; }
.runtime-strip { display: flex; gap: 7px; }
.status-chip { min-height: 28px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font: 800 8px ui-monospace, monospace; letter-spacing: .12em; }
.status-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 7px var(--amber); }
.status-chip.online { color: #bcd1d6; border-color: rgba(184,255,61,.25); }
.status-chip.online i { background: var(--lime); box-shadow: 0 0 7px var(--lime); }
.status-chip.offline i { background: #52636a; box-shadow: none; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.side-rail { position: fixed; z-index: 40; top: var(--top); bottom: 0; left: 0; width: var(--rail); display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 12px 8px; border-right: 1px solid var(--line); background: rgba(2,8,11,.92); }
.rail-button { min-height: 61px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #5d747c; cursor: pointer; }
.rail-button span { display: block; margin-bottom: 6px; color: #81979e; font: 700 18px ui-monospace, monospace; }
.rail-button small { display: block; font: 800 8px ui-monospace, monospace; letter-spacing: .08em; }
.rail-button:hover, .rail-button.active { color: white; border-color: var(--line); background: rgba(32,231,255,.055); }
.rail-button.active span { color: var(--cyan); text-shadow: 0 0 14px var(--cyan); }
.rail-spacer { flex: 1; }

.workspace { position: fixed; top: var(--top); right: 0; bottom: var(--mobile-nav); left: var(--rail); overflow: hidden; }
.panel { display: none; width: 100%; height: 100%; padding: 14px; }
.panel.active { display: block; animation: panel-in .24s ease both; }
.panel-heading { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin-bottom: 3px; }
.panel-heading h2 { margin: 0; font-size: 13px; letter-spacing: .08em; }

.command-grid { height: 100%; display: grid; grid-template-rows: minmax(350px, 1.4fr) minmax(190px, .6fr); gap: 12px; }
.hero-stage { min-height: 0; position: relative; background: radial-gradient(circle at 67% 46%, rgba(15,77,87,.3), transparent 36%), linear-gradient(115deg, rgba(3,12,16,.97) 15%, rgba(2,9,13,.82) 70%); }
#hologramCanvas { position: absolute; inset: 0 0 0 32%; width: 68%; height: 100%; opacity: .9; }
.holo-shell { position: absolute; z-index: 1; left: 68%; top: 47%; width: min(31vw, 390px); aspect-ratio: 1; transform: translate(-50%,-50%); border: 1px solid rgba(32,231,255,.16); border-radius: 50%; box-shadow: inset 0 0 55px rgba(32,231,255,.04), 0 0 75px rgba(32,231,255,.04); animation: holo-float 7s ease-in-out infinite; }
.holo-shell::before, .holo-shell::after { content: ""; position: absolute; inset: 9%; border: 1px dashed rgba(32,231,255,.35); border-radius: 50%; animation: rotate 22s linear infinite; }
.holo-shell::after { inset: 22%; border-style: solid; border-color: rgba(184,255,61,.24); animation-direction: reverse; animation-duration: 13s; }
.holo-shell i { position: absolute; inset: 0; border: 1px solid transparent; border-top-color: rgba(32,231,255,.55); border-right-color: rgba(32,231,255,.12); border-radius: 50%; animation: rotate 9s linear infinite; }
.holo-shell i:nth-child(2) { inset: 14%; border-top-color: var(--lime); transform: rotate(110deg); animation-direction: reverse; animation-duration: 6s; }
.holo-shell i:nth-child(3) { inset: 31%; border-top-color: var(--amber); border-left-color: rgba(255,178,29,.18); animation-duration: 4.5s; }
.holo-shell i:nth-child(4) { inset: 40%; border-color: rgba(255,62,165,.3); animation-direction: reverse; animation-duration: 3s; }
.holo-shell span { position: absolute; inset: 44%; border: 2px solid white; transform: rotate(45deg); box-shadow: 0 0 18px var(--cyan), inset 0 0 9px var(--lime); }
.scanlines { position: absolute; inset: 0; pointer-events: none; opacity: .15; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(32,231,255,.09) 4px); }
.hero-copy { position: absolute; z-index: 2; left: clamp(25px, 4vw, 72px); top: 50%; width: min(470px, 45%); transform: translateY(-50%); }
.hero-copy h1 { margin: 0 0 17px; font-size: clamp(42px, 5.8vw, 86px); line-height: .83; letter-spacing: -.065em; }
.hero-copy > p:not(.eyebrow) { width: min(430px, 100%); color: #8ba0a7; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.hero-telemetry { position: absolute; z-index: 2; right: 18px; bottom: 17px; display: flex; border: 1px solid var(--line); background: rgba(2,8,11,.72); }
.hero-telemetry span { min-width: 72px; padding: 9px 13px; border-right: 1px solid var(--line); }
.hero-telemetry span:last-child { border: 0; }
.hero-telemetry small, .hero-telemetry b { display: block; font: 800 8px ui-monospace, monospace; letter-spacing: .1em; }
.hero-telemetry small { color: #58717a; margin-bottom: 3px; }
.online-text { color: var(--lime); }

.power-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.power-card { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: 6px; background: rgba(5,16,21,.88); text-align: left; cursor: pointer; transition: .2s ease; }
.power-card::after { content: ""; position: absolute; right: -50px; bottom: -80px; width: 150px; height: 150px; border: 1px solid currentColor; border-radius: 50%; opacity: .08; box-shadow: 0 0 60px currentColor; }
.power-card:hover { transform: translateY(-4px); border-color: currentColor; box-shadow: 0 15px 35px rgba(0,0,0,.25); }
.power-card.cyan { color: var(--cyan); }.power-card.lime { color: var(--lime); }.power-card.magenta { color: var(--magenta); }.power-card.amber { color: var(--amber); }
.power-card small { position: absolute; top: 15px; right: 16px; font: 800 9px ui-monospace, monospace; }
.power-icon { display: grid; place-items: center; width: 41px; height: 41px; margin-bottom: 13px; border: 1px solid currentColor; border-radius: 50%; font: 800 15px ui-monospace, monospace; box-shadow: inset 0 0 17px color-mix(in srgb, currentColor 16%, transparent); }
.power-card h2 { margin: 0 0 7px; color: white; font-size: 15px; letter-spacing: .04em; }
.power-card p { min-height: 34px; margin: 0 0 13px; color: #728991; font-size: 11px; line-height: 1.45; }
.power-card b { font: 800 8px ui-monospace, monospace; letter-spacing: .1em; }

.code-panel { grid-template-columns: clamp(220px, 22vw, 340px) 1fr; gap: 12px; }
.code-panel.active { display: grid; }
.file-pane, .editor-pane, .roster-pane, .agent-console, .terminal-shell { min-height: 0; }
.file-search { display: flex; align-items: center; gap: 8px; margin: 10px; padding: 0 11px; height: 40px; border: 1px solid var(--line); background: #02080b; }
.file-search span { color: var(--cyan); }
.file-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: white; }
.file-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 10px 10px; }
.file-action { min-height: 30px; flex: 1; border: 1px solid var(--line); border-radius: 4px; background: #041016; color: #647d85; font: 800 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; cursor: pointer; transition: .18s ease; }
.file-action:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 16px rgba(32,231,255,.12); }
.file-tree { height: calc(100% - 122px); overflow: auto; padding: 5px 8px 18px; }
.tree-item { min-height: 34px; display: flex; align-items: center; gap: 7px; width: 100%; border: 0; border-radius: 3px; background: transparent; color: #98abb1; padding: 5px 7px; text-align: left; cursor: pointer; font-size: 11px; }
.tree-item:hover, .tree-item.active { background: rgba(32,231,255,.08); color: white; }
.tree-item.active { border-left: 2px solid var(--cyan); }
.tree-icon { width: 17px; color: var(--cyan); font-family: ui-monospace, monospace; text-align: center; }
.tree-children.collapsed { display: none; }
.editor-pane { display: grid; grid-template-rows: 46px minmax(0,1fr) 28px; }
.editor-tabs { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); background: rgba(2,7,10,.67); }
.editor-tab { min-width: 0; max-width: 360px; display: flex; align-items: center; gap: 8px; flex: 1; border: 0; border-right: 1px solid var(--line); border-top: 2px solid var(--cyan); background: rgba(7,22,28,.85); color: #c5d2d5; padding: 0 14px; text-align: left; font: 700 10px ui-monospace, monospace; }
.editor-tab span { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.save-button { margin: 4px 4px 4px auto; min-height: 36px; color: var(--lime); }
#editor { min-height: 0; width: 100%; height: 100%; }
.editor-status { display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding: 0 11px; border-top: 1px solid var(--line); color: #66808a; font: 700 8px ui-monospace, monospace; }
#saveState { color: var(--lime); }

.agents-layout { height: 100%; display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 12px; }
.counter { min-width: 34px; height: 27px; display: grid; place-items: center; border: 1px solid var(--cyan); color: var(--cyan); font: 800 10px ui-monospace, monospace; }
.roster-pane { display: grid; grid-template-rows: auto auto minmax(0,1fr); }
.agent-filter { display: flex; gap: 5px; padding: 9px; border-bottom: 1px solid var(--line); }
.filter { min-height: 31px; flex: 1; border: 1px solid var(--line); background: #041016; color: #647d85; font: 800 8px ui-monospace, monospace; cursor: pointer; }
.filter.active { border-color: var(--cyan); color: var(--cyan); }
.agent-roster { overflow: auto; padding: 7px; }
.agent-card { width: 100%; min-height: 70px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; margin-bottom: 5px; padding: 8px; border: 1px solid transparent; border-radius: 4px; background: rgba(3,12,16,.68); text-align: left; cursor: pointer; }
.agent-card:hover, .agent-card.active { border-color: var(--agent-color); background: color-mix(in srgb, var(--agent-color) 7%, rgba(3,12,16,.8)); }
.agent-card .mini-emblem { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--agent-color); border-radius: 50%; color: var(--agent-color); font: 900 9px ui-monospace, monospace; box-shadow: inset 0 0 13px color-mix(in srgb, var(--agent-color) 15%, transparent); }
.agent-card strong { display: block; margin-bottom: 3px; color: white; font-size: 11px; }.agent-card small { color: #6c838b; font-size: 9px; }
.agent-card .agent-number { color: var(--agent-color); font: 800 8px ui-monospace, monospace; }
.agent-console { display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; }
.agent-hero { min-height: 104px; display: grid; grid-template-columns: 66px 1fr auto; align-items: center; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 10% 50%, rgba(32,231,255,.08), transparent 30%); }
.agent-emblem { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--agent-accent, var(--cyan)); border-radius: 50%; color: var(--agent-accent, var(--cyan)); font: 900 13px ui-monospace, monospace; box-shadow: inset 0 0 20px color-mix(in srgb, var(--agent-accent, var(--cyan)) 15%, transparent), 0 0 25px color-mix(in srgb, var(--agent-accent, var(--cyan)) 10%, transparent); }
.agent-hero h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.02em; }.agent-hero p:not(.eyebrow) { margin: 0; color: #81969d; font-size: 11px; }
.runtime-badge { padding: 8px 10px; border: 1px solid var(--amber); color: var(--amber); font: 800 8px ui-monospace, monospace; letter-spacing: .08em; }
.runtime-badge.online { border-color: var(--lime); color: var(--lime); }
.chat-log { overflow: auto; padding: 20px; }
.message { width: min(760px, 88%); margin: 0 0 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 5px; background: rgba(3,12,16,.78); color: #b6c6ca; line-height: 1.58; white-space: pre-wrap; }
.message.user { margin-left: auto; border-color: rgba(184,255,61,.25); background: rgba(21,36,13,.45); }.message.agent { border-left: 2px solid var(--agent-accent, var(--cyan)); }
.message small { display: block; margin-bottom: 6px; color: var(--agent-accent, var(--cyan)); font: 800 8px ui-monospace, monospace; letter-spacing: .1em; }
.prompt-chips { display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; }
.prompt-chips button, .quick-commands button { min-height: 33px; flex: none; border: 1px solid var(--line); border-radius: 3px; background: rgba(3,12,16,.8); color: #789099; padding: 0 11px; font: 700 8px ui-monospace, monospace; cursor: pointer; }
.prompt-chips button:hover, .quick-commands button:hover { color: var(--cyan); border-color: var(--cyan); }
.chat-composer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 12px 14px; border-top: 1px solid var(--line); background: rgba(2,8,11,.7); }
.chat-composer textarea { resize: none; min-height: 50px; border: 1px solid var(--line); border-radius: 4px; background: #02080b; color: white; padding: 10px 12px; }

.terminal-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; }
#terminalOutput { margin: 0; overflow: auto; padding: 20px; color: #a7b9be; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.terminal-cyan { color: var(--cyan); }.terminal-error { color: var(--danger); }
.terminal-input-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px 14px; border-top: 1px solid var(--line); }
.terminal-input-row label { color: var(--lime); font: 800 10px ui-monospace, monospace; }
.terminal-input-row input { min-width: 0; height: 43px; border: 1px solid var(--line); background: #02080b; color: white; padding: 0 12px; font-family: ui-monospace, monospace; }
.quick-commands { display: flex; gap: 7px; padding: 0 14px 12px; overflow-x: auto; }

.forge-layout { height: 100%; display: grid; grid-template-rows: minmax(300px,1.2fr) minmax(180px,.8fr); gap: 12px; }
.forge-visual { position: relative; background: radial-gradient(circle at 75% 45%, rgba(255,62,165,.11), transparent 35%), #030b0f; }
.wave-grid { position: absolute; inset: 0 0 0 38%; opacity: .5; background: linear-gradient(90deg, transparent 49%, rgba(32,231,255,.12) 50%, transparent 51%) 0 0/42px 100%, linear-gradient(0deg, transparent 49%, rgba(32,231,255,.08) 50%, transparent 51%) 0 0/100% 42px; }
.wave-grid::after { content: ""; position: absolute; left: 5%; right: 5%; top: 50%; height: 110px; transform: translateY(-50%); background: linear-gradient(90deg, var(--cyan), var(--lime), var(--amber), var(--magenta)); clip-path: polygon(0 48%,4% 41%,8% 55%,12% 31%,16% 61%,20% 44%,24% 52%,28% 16%,32% 72%,36% 39%,40% 57%,44% 26%,48% 67%,52% 33%,56% 59%,60% 17%,64% 77%,68% 42%,72% 55%,76% 29%,80% 64%,84% 37%,88% 54%,92% 43%,96% 57%,100% 48%,100% 52%,96% 61%,92% 47%,88% 59%,84% 43%,80% 69%,76% 35%,72% 60%,68% 48%,64% 83%,60% 23%,56% 65%,52% 39%,48% 73%,44% 32%,40% 63%,36% 45%,32% 78%,28% 22%,24% 58%,20% 50%,16% 67%,12% 37%,8% 61%,4% 47%,0 52%); filter: drop-shadow(0 0 13px var(--cyan)); }
.forge-copy { position: absolute; z-index: 2; left: clamp(24px, 4vw, 64px); top: 50%; width: min(490px, 44%); transform: translateY(-50%); }
.forge-copy h1 { margin-bottom: 15px; font-size: clamp(42px,6vw,78px); line-height: .9; letter-spacing: -.06em; }.forge-copy > p:not(.eyebrow) { color: #82969d; line-height: 1.65; }
.forge-tools { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.forge-tools button { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: rgba(5,16,21,.9); color: white; text-align: left; cursor: pointer; }
.forge-tools button:hover { border-color: var(--magenta); transform: translateY(-3px); }.forge-tools span { color: var(--magenta); font: 800 9px ui-monospace, monospace; }.forge-tools h2 { margin: 13px 0 7px; font-size: 14px; }.forge-tools p { margin: 0; color: #6e858d; font-size: 11px; line-height: 1.45; }

.mobile-nav { display: none; }
.command-overlay { position: fixed; z-index: 200; inset: 0; display: grid; place-items: start center; padding-top: 12vh; background: rgba(0,3,5,.72); backdrop-filter: blur(8px); }
.command-palette { width: min(660px, calc(100% - 28px)); max-height: 70vh; padding-bottom: 9px; box-shadow: 0 30px 100px #000; }
.command-palette > input { width: calc(100% - 24px); margin: 12px; }
#commandList { padding: 0 12px; }
.command-item { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid rgba(78,185,204,.09); background: transparent; color: #a4b5ba; text-align: left; cursor: pointer; }
.command-item:hover { color: white; }.command-item kbd { color: var(--cyan); font: 800 8px ui-monospace, monospace; }
.toast-region { position: fixed; z-index: 300; right: 18px; bottom: calc(18px + var(--mobile-nav) + var(--safe-bottom)); display: grid; gap: 8px; pointer-events: none; }
.toast { width: min(360px, calc(100vw - 36px)); padding: 13px 15px; border: 1px solid var(--cyan); border-radius: 4px; background: rgba(3,14,18,.96); color: #b9c9cd; box-shadow: 0 15px 45px #000; font-size: 11px; animation: toast-in .25s ease; }.toast.error { border-color: var(--danger); }

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes boot { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes holo-float { 50% { transform: translate(-50%, -53%) scale(1.025); } }

@media (max-width: 1080px) {
  :root { --rail: 68px; }
  .topbar { grid-template-columns: minmax(200px, 1fr) auto auto; gap: 10px; }
  .mission-title { display: none; }
  .status-chip { padding: 0 7px; }.status-chip { font-size: 0; }.status-chip i { margin: 0; }
  .command-grid { grid-template-rows: minmax(330px, 1fr) auto; overflow: auto; }
  .power-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .power-card { min-height: 168px; }
  .hero-copy { width: 50%; }.hero-copy h1 { font-size: clamp(38px, 7vw, 68px); }
  .agents-layout { grid-template-columns: 290px 1fr; }
  .forge-tools { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 780px) {
  :root { --rail: 0px; --top: 60px; --mobile-nav: 72px; }
  body { overflow: hidden; }
  .topbar { padding: 0 11px; grid-template-columns: minmax(0,1fr) auto; }
  .brand small { display: none; }.brand b { font-size: 11px; }.brand-sigil { width: 35px; height: 35px; }
  .runtime-strip { display: none; }
  .top-actions .icon-button, .top-actions .button { display: none; }
  .side-rail { display: none; }
  .mobile-nav { position: fixed; z-index: 70; display: grid; grid-template-columns: repeat(5,1fr); left: 0; right: 0; bottom: 0; min-height: calc(var(--mobile-nav) + var(--safe-bottom)); padding: 7px 4px var(--safe-bottom); border-top: 1px solid var(--line); background: rgba(2,8,11,.97); backdrop-filter: blur(18px); }
  .mobile-nav button { min-width: 0; min-height: 54px; border: 0; border-radius: 4px; background: transparent; color: #607981; font: 800 7px ui-monospace, monospace; letter-spacing: .04em; }
  .mobile-nav span { display: block; margin-bottom: 5px; font-size: 15px; }.mobile-nav button.active { color: var(--cyan); background: rgba(32,231,255,.07); }
  .panel { padding: 7px; }
  .command-grid { grid-template-rows: minmax(430px, 58vh) auto; gap: 8px; }
  .hero-stage { min-height: 430px; }
  #hologramCanvas { inset: 0; width: 100%; opacity: .75; }
  .holo-shell { left: 58%; top: 35%; width: min(78vw, 330px); opacity: .75; }
  .hero-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(2,8,11,.96) 0%, rgba(2,8,11,.16) 68%); }
  .hero-copy { left: 22px; right: 22px; bottom: 65px; top: auto; width: auto; transform: none; }.hero-copy h1 { font-size: clamp(42px, 13vw, 64px); }.hero-copy > p:not(.eyebrow) { font-size: 12px; }
  .hero-telemetry { right: 10px; bottom: 9px; }.hero-telemetry span { min-width: 62px; padding: 7px 9px; }
  .power-grid { grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 7px; }.power-card { min-height: 170px; padding: 16px; }.power-card p { display: none; }
  .code-panel.active { display: block; overflow: auto; }.file-pane { height: 38%; min-height: 230px; margin-bottom: 8px; }.editor-pane { height: 61%; min-height: 430px; }
  .agents-layout { display: block; overflow: auto; }.roster-pane { height: 42%; min-height: 290px; margin-bottom: 8px; }.agent-console { height: 68%; min-height: 520px; }
  .agent-hero { grid-template-columns: 52px 1fr; min-height: 88px; padding: 12px; }.agent-emblem { width: 50px; height: 50px; }.runtime-badge { grid-column: 1 / -1; justify-self: start; margin-top: -7px; }
  .chat-log { padding: 12px; }.message { width: 95%; }
  .terminal-input-row { grid-template-columns: 1fr auto; }.terminal-input-row label { grid-column: 1 / -1; }
  .forge-layout { overflow: auto; grid-template-rows: minmax(430px,56vh) auto; }.forge-copy { left: 22px; right: 22px; top: auto; bottom: 30px; width: auto; transform: none; }.forge-copy h1 { font-size: 52px; }.wave-grid { inset: 0; }.forge-visual::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,#020a0e 0%,transparent 70%); }.forge-tools { grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 7px; }.forge-tools button { min-height: 145px; padding: 15px; }
  .token-row { grid-template-columns: 1fr; }.gate-card { padding: 30px 20px; }
}

@media (max-width: 460px) {
  .brand { gap: 8px; }.brand b { font-size: 10px; letter-spacing: .04em; }
  .top-actions { gap: 4px; }.avatar-button { width: 38px; min-height: 38px; }
  .hero-copy { left: 17px; right: 17px; }.hero-copy h1 { font-size: 46px; }.hero-actions .button { flex: 1; padding: 0 10px; }
  .hero-telemetry span { min-width: 56px; }.hero-telemetry span:nth-child(2) { display: none; }
  .power-grid, .forge-tools { grid-template-columns: 1fr; }.power-card { min-height: 132px; }.power-card p { display: block; min-height: 0; }
  .file-pane { height: 34%; }.editor-pane { height: 65%; }
  .agent-card { min-height: 64px; }.agent-roster { padding: 5px; }
  .chat-composer { grid-template-columns: 1fr; }.chat-composer .button { min-height: 46px; }
  .prompt-chips { padding-bottom: 7px; }
}

@media (pointer: coarse) {
  .button, .icon-button, .avatar-button { min-height: 46px; }
  .rail-button, .tree-item, .agent-card, .filter, .prompt-chips button, .quick-commands button { min-height: 44px; }
  .power-card:hover, .forge-tools button:hover { transform: none; }
}

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