/* SPDX-License-Identifier: GPL-3.0-only */
/* CONSOLE (web/console/): a ship's bridge, 1600 x 900, scaled to the window as one piece; under it the player. The
   page's colours (web/index.html's) */
@font-face { font-family: "Orbitron"; src: url("../app/orbitron.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
:root { --bg: #06080c; --panel: #0b1017; --panel2: #0f1620; --line: #1b232c; --line2: #2a3642; --fg: #d3e6ef;
        --ice: #cde6f0; --dim: #8fa5b2; --mute: #546874; --red: #eb1c1c; --red2: #ff4a3d; --good: #6ee7a0; --bad: #ff6b5a;
        --grid: #1a2530; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--fg); background: var(--bg);
       font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--ice); text-decoration-color: var(--mute); text-underline-offset: 3px; }
button { font: 600 12px/1 "Orbitron", var(--mono); letter-spacing: .12em; color: var(--ice); background: var(--panel2);
         border: 1px solid var(--line2); padding: 9px 14px; cursor: pointer; }
button:hover { border-color: var(--dim); }
button.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 16px; }
.back { font: 800 13px/1 "Orbitron", var(--mono); letter-spacing: .16em; text-decoration: none; color: var(--ice); }
.back::first-letter { color: var(--red); }
.src { display: flex; gap: 8px; }
.status { color: var(--dim); font-size: 13px; }
.stagebox { position: relative; width: 100%; overflow: hidden; }
.stage { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; font: 12px/1.3 var(--mono);
         background: radial-gradient(circle, rgba(205,230,240,.04) 0 1px, transparent 1.2px) 0 0 / 18px 18px,
                     radial-gradient(120% 90% at 50% 0%, #121b25 0%, #080c11 60%, #05070a 100%); }
.stage .bar { display: flex; align-items: center; gap: 24px; height: 58px; padding: 0 26px; border-bottom: 1px solid var(--line2);
              background: linear-gradient(#121b25, #0b1118); }
.stage .bar img { height: 18px; }
.tag { font: 700 11px/1 "Orbitron"; letter-spacing: .22em; color: var(--red); }
.tag::before { content: "/// "; }
.pt { font: 800 18px/1 "Orbitron"; letter-spacing: .08em; color: var(--ice); white-space: nowrap; }
.pt small { color: var(--mute); font-weight: 600; font-size: 11px; margin-right: 8px; }
.kv { font: 600 10px/1.1 "Orbitron"; letter-spacing: .16em; color: var(--mute); white-space: nowrap; }
.kv b { display: block; font: 700 16px/1.1 "Orbitron"; color: var(--ice); letter-spacing: .06em; margin-top: 3px; }
.kv b small { font-size: 11px; color: var(--mute); }
.stage .lamp { display: inline-flex; align-items: center; gap: 8px; font: 700 11px/1 "Orbitron"; letter-spacing: .16em; color: var(--dim); }
.stage .lamp i { width: 11px; height: 11px; border-radius: 50%; background: #18212a; box-shadow: inset 0 0 0 1px #2a3642; }
.stage .lamp.on i { background: var(--ice); box-shadow: 0 0 6px var(--ice), 0 0 14px rgba(205,230,240,.5); }
.stage .lamp.red.on i { background: var(--red); box-shadow: 0 0 6px var(--red), 0 0 14px rgba(235,28,28,.6); }
.stage .right { margin-left: auto; display: flex; gap: 24px; align-items: center; }
.grid { display: grid; gap: 12px; padding: 12px 14px 0; height: 824px; grid-template-columns: 300px 1fr 300px;
        grid-template-rows: 330px 1fr; grid-template-areas: "nav chain macro" "seq seq mod"; }
.p { position: relative; background: linear-gradient(rgba(10,15,21,.92), rgba(8,12,17,.85)); border: 1px solid var(--line2);
     clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); padding: 30px 14px 12px;
     transition: border-color .3s; }
.p.here, .inst.here h4 { border-color: var(--red); }
.p.here > .tag::after { content: " ◂"; }
.inst.here h4 { color: var(--red); }
.p > .tag { position: absolute; left: 14px; top: 11px; }
.p > .note { position: absolute; right: 18px; top: 10px; font: 600 10px/1 "Orbitron"; letter-spacing: .14em; color: var(--mute); }
.stage svg { display: block; width: 100%; height: 100%; overflow: visible; }
.stage svg text { font-family: "Orbitron"; font-weight: 600; letter-spacing: .08em; }
.nav { grid-area: nav; } .chain { grid-area: chain; } .macro { grid-area: macro; } .seq { grid-area: seq; } .mod { grid-area: mod; }
.chain .row { display: grid; grid-template-columns: repeat(5, 1fr) 70px; gap: 10px; height: 100%; }
.inst { position: relative; border-left: 1px solid var(--grid); padding: 0 4px 0 10px; display: flex; flex-direction: column; min-width: 0; }
.inst:first-child { border-left: 0; padding-left: 0; }
.inst h4 { margin: 0 0 6px; font: 800 12px/1 "Orbitron"; letter-spacing: .16em; color: var(--ice); white-space: nowrap; overflow: hidden; }
.inst h4 span { color: var(--mute); font-weight: 600; font-size: 9px; margin-left: 6px; }
.inst.off h4, .inst.off .cap { color: var(--mute); }
.inst.off .fig { opacity: .35; }
.inst .fig { flex: 1; min-height: 0; }
.inst .cap { font: 600 9px/1.4 "Orbitron"; letter-spacing: .1em; color: var(--dim); margin-top: 6px; white-space: nowrap; overflow: hidden; }
.inst .cap b { color: var(--ice); }
.arrow { position: absolute; left: -9px; top: 3px; color: var(--red); font: 700 11px/1 "Orbitron"; }
.inst:first-child .arrow { display: none; }
.seq .lanes { display: grid; grid-template-rows: 96px 96px 64px 1fr; gap: 8px; height: 100%; }
.foot { position: absolute; left: 26px; bottom: 5px; font: 600 9px/1 "Orbitron"; letter-spacing: .18em; color: var(--mute); }
.stage.wait .grid { opacity: .45; }
.below { max-width: 1140px; margin: 24px auto 64px; padding: 0 16px; }
.below h2 { font: 800 18px/1.2 "Orbitron", var(--mono); letter-spacing: .1em; }
.below .small, .small { font-size: 13px; color: var(--dim); }
.pctl { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.filebtn { font: 600 12px/1 "Orbitron", var(--mono); letter-spacing: .12em; color: var(--ice); background: var(--panel2);
           border: 1px solid var(--line2); padding: 9px 14px; cursor: pointer; }
.filebtn input { display: none; }
.stage.editing #nav, .stage.editing #mac, .stage.editing #dist, .stage.editing #react, .stage.editing #space,
.stage.editing #time { cursor: crosshair; touch-action: none; }
.stage.editing .p, .stage.editing .inst { outline: 1px dashed rgba(235, 28, 28, .25); outline-offset: -3px; }
