/* the net — lobby (live TV dithered to four inks behind an analyser's console:
   a subject file, field graphs, one button), dive and HUD.
   Ice blue on black, amber for warnings. Shares the home page's fonts. */

:root {
  --ice: #e4f5ff;
  --cyan: #62d6ff;
  --blue: #3d8bff;
  --dim: #3b6bb0;
  --deep: #01040d;
  --amber: #ffb24a;
  --mag: #ff3d8b;
  --fringe: rgba(255, 61, 139, .8);
  --gutter: clamp(12px, 2.2vw, 26px);
  --font-ui: "Handjet", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--deep); color: var(--cyan); overflow: hidden; overscroll-behavior: none; }
body { font: 500 17px/1.2 var(--font-ui); font-variation-settings: "ELSH" 2, "ELGR" 1; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px dashed var(--cyan); outline-offset: 4px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- the lobby: an analyser's console over a dithered feed ---------- */
.lobby {
  position: fixed;
  inset: 0;
  --line: rgba(98, 214, 255, .5);
  --line-d: rgba(59, 107, 176, .55);
  --panel: rgba(1, 4, 13, .84);
  --grid: rgba(255, 178, 74, .22);
  transition: opacity .6s ease .1s;
}
html:not(.mode-lobby) .lobby { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
.traces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font: 600 11px/1.2 var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.ui em { font-style: normal; color: var(--ice); font-variant-numeric: tabular-nums; }
/* the colour fringe goes on the panels, not on the full-screen layer: a filter on
   .ui itself repainted the whole screen through two shadows at device resolution */
.ui.jolt { transform: translateX(var(--jx, 3px)); }
.ui.jolt > :not(.fr) { filter: drop-shadow(-2px 0 0 rgba(255, 61, 139, .6)) drop-shadow(2px 0 0 rgba(61, 139, 255, .7)); }

/* the frame: double rule, like a printed plate */
.fr { position: absolute; pointer-events: none; }
.fr-o { inset: 6px; border: 1px solid var(--line-d); }
.fr-i { inset: 10px; border: 1px solid rgba(98, 214, 255, .22); }

/* tabs across the top: real buttons, shuffled on every visit */
.tabs {
  position: absolute;
  left: 24px; right: 24px; top: 20px;
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 24px;
  white-space: nowrap;
  pointer-events: none;
}
.tabs > span { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-d); background: var(--panel); color: var(--dim); }
.tabs .t-sys { border-color: var(--line); color: var(--ice); font-weight: 800; letter-spacing: .24em; }
.tab-row { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
.tab-row::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line-d);
  background: var(--panel);
  color: var(--cyan);
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  cursor: pointer;
}
.tab::before { content: ""; width: 5px; height: 5px; border: 1px solid currentColor; }
.tab.hot { border-color: var(--ice); color: var(--ice); }
.tab.open { background: var(--cyan); border-color: var(--cyan); color: var(--deep); }
.tab.open::before { background: var(--deep); border-color: var(--deep); }
.tab:hover, .tab:focus-visible { background: var(--ice); border-color: var(--ice); color: var(--deep); outline: none; }
.tab:active { transform: translateY(1px); }
.tab.blink { animation: tabblink .5s steps(2, end) 2; }
.tabs .t-clock { margin-left: auto; color: var(--amber); border-color: rgba(255, 178, 74, .45); font-variant-numeric: tabular-nums; }
@keyframes tabblink { 50% { background: var(--ice); color: var(--deep); } }

/* panels */
.pnl {
  position: absolute;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 8px 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(1, 4, 13, .7), 0 0 0 4px var(--line-d);
}
.pnl-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -8px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(61, 139, 255, .22), rgba(61, 139, 255, .04));
}
.pnl-h b { color: var(--ice); font-weight: 800; letter-spacing: .22em; }
.pnl-h .sub { color: var(--dim); }
.dots { display: flex; gap: 4px; margin-left: auto; }
.dots i { width: 6px; height: 6px; border: 1px solid var(--ice); border-radius: 50%; }
.dots i:nth-child(-n+2) { background: var(--ice); }
.dots i:nth-child(2) { animation: rec 1.3s steps(2, end) infinite; }
/* a window being redrawn flickers in: opacity steps, which the compositor does alone
   (the clip-path wipes repainted the panel on every step) */
@keyframes wipe { 0% { opacity: 0; } 40% { opacity: .35; } 60% { opacity: .1; } 100% { opacity: 1; } }

/* the signal file */
.dossier { left: 24px; top: 58px; width: 300px; }
.eye { position: relative; border: 1px solid var(--line); background: var(--deep); }
.eye-c { display: block; width: 100%; aspect-ratio: 16 / 9; image-rendering: pixelated; }
.eye-tag { position: absolute; left: 5px; bottom: 4px; padding: 1px 4px; background: rgba(1, 4, 13, .8); color: var(--cyan); font-size: 10px; }
.eye-ret { position: absolute; inset: 10px; pointer-events: none;
  background:
    linear-gradient(var(--ice), var(--ice)) left top / 10px 1px no-repeat, linear-gradient(var(--ice), var(--ice)) left top / 1px 10px no-repeat,
    linear-gradient(var(--ice), var(--ice)) right top / 10px 1px no-repeat, linear-gradient(var(--ice), var(--ice)) right top / 1px 10px no-repeat,
    linear-gradient(var(--ice), var(--ice)) left bottom / 10px 1px no-repeat, linear-gradient(var(--ice), var(--ice)) left bottom / 1px 10px no-repeat,
    linear-gradient(var(--ice), var(--ice)) right bottom / 10px 1px no-repeat, linear-gradient(var(--ice), var(--ice)) right bottom / 1px 10px no-repeat;
  opacity: .8;
}
.rows { display: grid; margin: 0; border-top: 1px solid var(--line-d); }
.dossier .rows { grid-template-columns: 1fr 1fr; column-gap: 10px; }
.rows > div { display: grid; grid-template-columns: 1fr; min-width: 0; padding: 3px 0 3px; border-bottom: 1px solid var(--line-d); }
.rows dt { color: var(--dim); font-size: 9px; letter-spacing: .16em; }
.rows dd { margin: 1px 0 0; color: var(--ice); font-size: 12px; letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows dd.typing::after { content: "▮"; color: var(--cyan); }
.rows dd[data-k="ch"] { color: var(--amber); }
.rows dd.warn { color: var(--amber); }
.file2 { display: grid; grid-template-columns: 76px 1fr; gap: 8px; }
.file2 figure { display: grid; gap: 3px; margin: 0; }
.file2 figcaption { color: var(--dim); font-size: 9px; letter-spacing: .16em; }
.lum-c, .wave-c { display: block; width: 100%; height: 40px; border: 1px solid var(--line-d); background: var(--deep); }

/* the input graphs */
.scope { right: 24px; top: 58px; width: 340px; }
.scope-w { position: relative; padding-left: 30px; }
.scope-c { display: block; width: 100%; height: 190px; border: 1px solid var(--line-d); background: rgba(1, 4, 13, .9); }
.ax { position: absolute; left: 0; width: 28px; text-align: right; color: var(--dim); font-size: 9px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ax1 { top: 6%; } .ax2 { top: 24%; } .ax3 { top: 42%; } .ax4 { top: 66%; } .ax5 { top: 84%; }
.scope-key { display: flex; align-items: center; gap: 6px; margin: -2px 0 0; color: var(--dim); font-size: 9px; letter-spacing: .14em; }
.scope-key i { width: 10px; height: 2px; }
.scope-key .k-c { background: var(--cyan); box-shadow: 0 0 4px var(--cyan); }
.scope-key .k-a { margin-left: 8px; background: var(--amber); }
.props { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: start; }
.elem { display: grid; padding: 5px 6px; border: 1px solid var(--line); color: var(--cyan); }
.elem small { font-size: 9px; color: var(--dim); }
.elem b { font: 300 30px/1 var(--font-ui); letter-spacing: 0; color: var(--ice); text-transform: none; font-variant-numeric: tabular-nums; }
.elem span { font-size: 9px; }
.elem em { font-size: 9px; color: var(--amber); letter-spacing: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 10px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.tbl th { padding: 2px 3px; background: rgba(98, 214, 255, .16); color: var(--ice); font-weight: 700; text-align: left; border: 1px solid var(--line-d); }
.tbl td { padding: 2px 3px; color: var(--cyan); border: 1px solid var(--line-d); }
.tbl td:first-child { color: var(--dim); }
.tbl td.hi { background: var(--cyan); color: var(--deep); }
.tbl td.warn { color: var(--amber); }

/* the centre plate: the file, the title, a line typing itself, the jack */
.center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.center > * { pointer-events: auto; }
.center.tear { clip-path: polygon(0 0, 100% 0, 100% var(--ty), 0 var(--ty), 0 calc(var(--ty) + 3%), 100% calc(var(--ty) + 3%), 100% 100%, 0 100%); }
.center.tear .plate { transform: translateX(var(--tx)); }
.center.drift { animation: vhold .42s steps(6, end); }
@keyframes vhold { 0% { transform: none; } 25% { transform: translateY(-12px); } 50% { transform: translateY(8px); opacity: .7; } 75% { transform: translateY(-3px); } 100% { transform: none; } }

.plate {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(600px, calc(100vw - 32px));
  padding: 0 22px 22px;
  font: 600 11px/1.2 var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(1, 4, 13, .7), 0 0 0 4px var(--line-d), 0 20px 60px rgba(1, 4, 13, .7);
  pointer-events: none;
}
.plate > * { pointer-events: auto; }
.plate > .pnl-h { justify-self: stretch; margin: 0 -22px; padding: 5px 12px; }

.title {
  position: relative;
  isolation: isolate;
  margin: 6px 0 0;
  font: 800 clamp(52px, min(10vw, 17vh), 132px)/.9 var(--font-ui);
  font-variation-settings: "ELSH" 2, "ELGR" 1;
  letter-spacing: .08em;
  margin-right: -.08em;
  text-transform: uppercase;
  color: var(--ice);
  white-space: nowrap;
}
.title-src { display: block; }
.title.built .title-src { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.title-neon { position: relative; display: block; }
/* a dithered drop shadow, printed in blue dots */
.title::after {
  content: attr(data-text);
  position: absolute;
  left: .07em; top: .07em;
  z-index: -1;
  color: transparent;
  background: repeating-conic-gradient(var(--blue) 0 25%, transparent 0 50%) 0 0 / 3px 3px;
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  white-space: nowrap;
}
/* the letters hold still; one now and then dies or burns out (title.js). A glow
   and a buzz on every letter repainted the whole title all the time. */
.title-neon .ch { display: inline-block; }
.title-neon .ch.dead { animation: dying .9s steps(1, end) infinite; }
.title-neon .ch.out { color: transparent; -webkit-text-stroke: 1px rgba(98, 214, 255, .45); text-shadow: none; animation: none; }
@keyframes dying { 0% { opacity: 1; } 10% { opacity: .15; } 16% { opacity: 1; } 40% { opacity: .25; } 46% { opacity: 1; } 70% { opacity: .1; } 76% { opacity: 1; } }
.title-neon::before, .title-neon::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0; white-space: nowrap; }
.title-neon.glitch::before, .title-neon.glitch::after { opacity: 1; }
.title-neon.glitch::before, .title-neon.glitch::after { opacity: .8; }
.title-neon.glitch::before { color: var(--mag); clip-path: inset(var(--s1, 20%) 0 var(--s2, 60%) 0); transform: translate(var(--gx, 8px), 0); }
.title-neon.glitch::after { color: var(--cyan); clip-path: inset(var(--s3, 50%) 0 var(--s4, 30%) 0); transform: translate(calc(var(--gx, 8px) * -1.3), var(--gy, 0px)); }
.title-neon.glitch .ch { opacity: .8; }

.tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: stretch;
  min-height: 1.3em;
  margin: 0;
  padding: 4px 8px;
  border-top: 1px solid var(--line-d);
  border-bottom: 1px solid var(--line-d);
  font: 600 13px/1 var(--font-ui);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
}
.tag-pre { color: var(--amber); }
.tag-cur { width: .55em; height: 1em; background: var(--cyan); animation: rec .8s steps(2, end) infinite; }

/* the channel display, like a TV's OSD */
.osd {
  position: fixed;
  left: max(28px, env(safe-area-inset-left));
  bottom: max(26px, env(safe-area-inset-bottom));
  max-width: min(60vw, 420px);
  padding: 6px 10px 7px;
  border: 1px solid rgba(255, 178, 74, .55);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(1, 4, 13, .7), 0 0 0 4px rgba(255, 178, 74, .25);
  color: var(--ice);
  text-transform: uppercase;
  letter-spacing: .14em;
}
.osd p { margin: 0; }
.osd-top { display: flex; align-items: center; gap: 8px; font: 700 18px/1 var(--font-ui); color: var(--amber); }
.osd-top i { width: 8px; height: 8px; background: #ff3d4a; animation: rec 1.1s steps(2, end) infinite; }
.osd[data-live="0"] .osd-top i { background: #6d7fa0; animation: none; }
.osd[data-live="0"] .osd-live { opacity: .45; text-decoration: line-through; }
.osd-name { margin-top: 5px !important; font: 600 15px/1.05 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osd-meta { margin-top: 3px !important; font-size: 11px; letter-spacing: .2em; color: var(--cyan); opacity: .8; }
.osd.flip { animation: wipe 0.5s steps(5, end); }
@keyframes rec { 50% { opacity: .15; } }

/* ---------- the button: the plate's input row ---------- */
.dive {
  position: relative;
  justify-self: stretch;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jack {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px 10px 9px;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(0deg, rgba(98, 214, 255, .04) 0 1px, transparent 1px 3px), rgba(4, 14, 32, .9);
  font: 600 11px/1 var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}
.jack-top { display: flex; align-items: center; gap: 8px; color: var(--amber); font: 700 13px/1.15 var(--font-ui); letter-spacing: .14em; text-align: left; }
.jack-cue { font-size: 9px; }
.jack-sub { min-width: 0; text-wrap: balance; }
.jack-cur { width: 7px; height: 11px; background: var(--amber); animation: rec .8s steps(2, end) infinite; }
.jack-id { margin-left: auto; color: var(--dim); font-size: 11px; }
.jack-face { position: relative; display: block; overflow: hidden; padding: 10px 0 11px; border: 1px solid var(--line-d); background: rgba(61, 139, 255, .1); }
.dive-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-right: -.4em;
  font: 700 34px/1 var(--font-ui);
  font-variation-settings: "ELSH" 2, "ELGR" 1;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--ice);
  white-space: nowrap;
}
.jack-sweep {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 24%;
  background: repeating-conic-gradient(rgba(98, 214, 255, .55) 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  transform: translateX(-110%);
}
@keyframes sweep { 0% { transform: translateX(-110%); } 60%, 100% { transform: translateX(430%); } }
.jack-meter { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.jack-meter i { height: 5px; background: rgba(59, 107, 176, .28); }
.jack-meter i.on { background: var(--cyan); }
.jack-meter i.hot { background: var(--amber); }

.dive:focus-visible { outline: none; }
.dive:hover .jack, .dive:focus-visible .jack { border-color: var(--ice); box-shadow: 0 0 0 2px var(--deep), 0 0 0 3px var(--cyan); }
.dive:hover .jack-face, .dive:focus-visible .jack-face { background: var(--cyan); border-color: var(--cyan); }
.dive:hover .dive-label, .dive:focus-visible .dive-label { color: var(--deep); animation: jit .3s steps(2, end) infinite; }
/* the sweep only runs while the button is pointed at */
.dive:hover .jack-sweep, .dive:focus-visible .jack-sweep { background: repeating-conic-gradient(rgba(1, 4, 13, .5) 0 25%, transparent 0 50%) 0 0 / 2px 2px; animation: sweep 1s steps(28, end) infinite; }
@keyframes jit { 50% { transform: translateX(2px); text-shadow: -2px 0 0 var(--fringe); } }
.dive:active .jack-face { background: var(--ice); }
html:not(.warm) .dive { opacity: .5; pointer-events: none; }

/* ---------- volume: a panel with a segmented meter, same on every screen ---------- */
.vol {
  --v: .55;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 0;
  border: 1px solid var(--line, rgba(98, 214, 255, .5));
  background: rgba(1, 4, 13, .86);
  box-shadow: 0 0 0 3px rgba(1, 4, 13, .7), 0 0 0 4px rgba(59, 107, 176, .55);
  color: var(--cyan);
  font: 600 11px/1 var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.vol-master {
  position: fixed;
  z-index: 60;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
}
.vol-tag {
  align-self: stretch;
  display: flex; align-items: center;
  margin: -5px 0;
  padding: 0 8px;
  border-right: 1px solid var(--line, rgba(98, 214, 255, .5));
  background: linear-gradient(90deg, rgba(61, 139, 255, .28), rgba(61, 139, 255, .06));
  color: var(--ice);
  font-weight: 800;
  letter-spacing: .24em;
}
.vol-mute {
  display: grid; place-items: center; width: 28px; height: 24px; padding: 0; cursor: pointer;
  border: 1px solid rgba(59, 107, 176, .9);
  background: rgba(4, 14, 32, .9);
  color: var(--cyan);
}
.vol-mute:hover, .vol-mute:focus-visible { background: var(--cyan); border-color: var(--cyan); color: var(--deep); outline: none; }
.vol-mute:active { transform: translateY(1px); }
.vol-mute svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: miter; stroke-linecap: square; }
.vol-cone { fill: currentColor; }
.vol-x { display: none; }
.vol[data-level="0"] .vol-w1, .vol[data-level="0"] .vol-w2, .vol[data-level="1"] .vol-w2 { display: none; }
.vol[data-level="0"] .vol-x { display: inline; }
.vol[data-level="0"] .vol-mute { color: var(--amber); border-color: rgba(255, 178, 74, .6); }
.vol-meter {
  position: relative;
  width: 132px;
  height: 18px;
  border: 1px solid rgba(59, 107, 176, .9);
  background: var(--deep);
}
.vol-meter::before, .vol-lit {
  content: "";
  position: absolute;
  left: 3px; top: 3px; bottom: 3px;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px);
  mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px);
}
.vol-meter::before { right: 3px; background: rgba(59, 107, 176, .28); }
.vol-lit {
  width: calc((100% - 6px) * var(--v));
  background: linear-gradient(90deg, var(--cyan) 0 70%, var(--amber) 70% 90%, var(--mag) 90%);
  background-size: 124px 100%;
}
.vol-range { position: absolute; inset: -4px 0; width: 100%; height: calc(100% + 8px); margin: 0; opacity: 0; cursor: pointer; }
.vol-meter:hover { border-color: var(--ice); }
.vol-meter:focus-within { outline: 2px dashed var(--cyan); outline-offset: 3px; }
.vol-num { min-width: 2ch; font: 700 15px/1 var(--font-ui); color: var(--amber); font-variant-numeric: tabular-nums; letter-spacing: .06em; }

/* ---------- the console's windows ---------- */
.wins { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.win {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-width: 0;
  pointer-events: auto;
  font: 600 11px/1.2 var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(1, 4, 13, .965);
  box-shadow: 0 0 0 3px rgba(1, 4, 13, .7), 0 0 0 4px var(--line-d), 0 18px 50px rgba(1, 4, 13, .75);
}
.win.top { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(1, 4, 13, .7), 0 0 0 4px var(--cyan), 0 18px 50px rgba(1, 4, 13, .75); }
.win-h { margin: 0; padding: 0 0 0 8px; height: 26px; flex: none; cursor: grab; touch-action: none; user-select: none; }
.win-h:active { cursor: grabbing; }
.win-sub { color: var(--amber) !important; }
.win-xy { margin-left: auto; }
.win-x {
  align-self: stretch;
  width: 30px; padding: 0;
  border: 0; border-left: 1px solid var(--line);
  background: transparent; color: var(--ice);
  font: 700 13px/1 var(--font-ui);
  cursor: pointer;
}
.win-x:hover, .win-x:focus-visible { background: var(--mag); color: var(--deep); outline: none; }
.win-body { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 8px; padding: 8px; scrollbar-width: thin; scrollbar-color: var(--dim) transparent; }
.win.lifted { opacity: .25; filter: saturate(.3); }
.win.lifted .win-body { visibility: hidden; }
.win.wipe > .win-body { animation: wipe .45s steps(9, end); }
.win-ghost {
  position: absolute;
  pointer-events: none;
  border: 1px dashed var(--ice);
  outline: 1px solid rgba(98, 214, 255, .45);
  outline-offset: 3px;
  background:
    linear-gradient(var(--ice), var(--ice)) left top / 14px 2px no-repeat, linear-gradient(var(--ice), var(--ice)) left top / 2px 14px no-repeat,
    linear-gradient(var(--ice), var(--ice)) right bottom / 14px 2px no-repeat, linear-gradient(var(--ice), var(--ice)) right bottom / 2px 14px no-repeat,
    repeating-conic-gradient(rgba(98, 214, 255, .1) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
}
.win-ghost-l { position: absolute; left: 6px; top: 6px; padding: 2px 6px; background: var(--ice); color: var(--deep); font: 700 11px/1 var(--font-ui); letter-spacing: .14em; }
.win-e, .win-rz { position: absolute; touch-action: none; }
.win-e-r { top: 26px; right: -4px; bottom: 10px; width: 8px; cursor: ew-resize; }
.win-e-b { left: 0; right: 10px; bottom: -4px; height: 8px; cursor: ns-resize; }
.win-rz { right: -1px; bottom: -1px; width: 16px; height: 16px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 0 50%, var(--cyan) 50% 58%, transparent 58% 70%, var(--cyan) 70% 78%, transparent 78%); }
.win-rz:hover { background-color: rgba(98, 214, 255, .2); }
.w-c { display: block; width: 100%; border: 0; background: var(--deep); }
.w-maps { display: grid; grid-template-columns: 1.6fr 1fr; gap: 6px; }
.w-world, .w-zoom { height: 120px; }
.w-tr { height: 54px; }
.w-tall { height: 140px; }
.w-scope { position: relative; }
.w-graph { height: 150px; border: 1px solid var(--line-d); }
.w-video { position: relative; }
.w-rep { aspect-ratio: 16 / 9; height: auto; border: 1px solid var(--line-d); }
.w-hist, .w-mo { height: 70px; }
.w-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.w-ax { position: absolute; right: 6px; padding: 1px 4px; background: rgba(1, 4, 13, .8); color: var(--amber); font-size: 9px; letter-spacing: .08em; }
.w-ax-t { top: 4px; } .w-ax-m { top: calc(50% - 6px); }
.w-cap { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 9px; letter-spacing: .16em; margin-bottom: -4px; }
.sw { display: inline-block; width: 8px; height: 8px; margin-right: 4px; vertical-align: -1px; }
.w-rows dd { font-size: 12px; text-transform: none; letter-spacing: .04em; }
.w-cols { grid-template-columns: 1fr 1fr; column-gap: 10px; }
.w-tbl td, .w-tbl th { white-space: nowrap; }
.w-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.w-note { color: var(--dim); font-size: 9px; letter-spacing: .12em; }
.w-btn, .hb {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid var(--cyan);
  background: rgba(4, 14, 32, .92);
  color: var(--ice);
  font: 700 11px/1 var(--font-ui);
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
}
.w-btn:hover, .w-btn:focus-visible, .hb:hover, .hb:focus-visible { background: var(--cyan); color: var(--deep); outline: none; }
.w-btn:active, .hb:active { background: var(--ice); transform: translateY(1px); }
.w-btn:disabled, .hb:disabled { border-color: var(--line-d); color: var(--dim); background: rgba(4, 14, 32, .6); cursor: default; transform: none; }
.w-btn[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--deep); }

/* ---------- the net's HUD: the same console, now a browser ---------- */
.net-hud {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  color: var(--cyan);
  font: 600 11px/1.2 var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  --line: rgba(98, 214, 255, .5);
  --line-d: rgba(59, 107, 176, .55);
  --panel: rgba(1, 4, 13, .84);
  animation: hudin .5s steps(4, end);
}
@keyframes hudin { from { opacity: 0; } }
.net-hud p { margin: 0; }
.net-hud .hb, .net-hud input, .net-hud .vol, .net-hud .hp-list button { pointer-events: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hud-bar {
  position: absolute;
  left: max(var(--gutter), env(safe-area-inset-left)); right: max(var(--gutter), env(safe-area-inset-right)); top: max(14px, env(safe-area-inset-top));
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 28px;
  white-space: nowrap;
}
.hud-bar > * { flex: none; }
.hud-bar .t-sys, .hud-bar .t-clock { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); background: var(--panel); }
.hud-bar .t-sys { color: var(--amber); font-weight: 800; letter-spacing: .2em; }
.hud-bar .t-clock { color: var(--amber); border-color: rgba(255, 178, 74, .45); font-variant-numeric: tabular-nums; }
.hud-bar .hb { min-height: 0; }
.hb-exit { border-color: var(--mag); color: var(--mag); }
.hb-exit:hover, .hb-exit:focus-visible { background: var(--mag); color: var(--deep); }
.hud-inv[aria-pressed="true"] { background: var(--ice); color: var(--deep); }
.hud-fill { flex: 1 1 auto !important; }
.hud-search { display: flex; gap: 0; }
.hud-q {
  width: clamp(120px, 16vw, 240px);
  padding: 0 8px;
  border: 1px solid var(--cyan); border-right: 0;
  background: rgba(1, 4, 13, .92);
  color: var(--ice);
  font: 600 13px/1 var(--font-ui); letter-spacing: .08em;
}
.hud-q::placeholder { color: var(--dim); }
.hud-q:focus { outline: none; background: rgba(14, 33, 79, .95); }
.hb-go { background: var(--cyan); color: var(--deep); }
.hb-go:hover, .hb-go:focus-visible { background: var(--ice); }

/* the search path: every step so far, and the link that led to it */
.hud-path {
  position: absolute;
  left: max(var(--gutter), env(safe-area-inset-left));
  top: calc(max(14px, env(safe-area-inset-top)) + 40px);
  width: min(340px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100vh - 330px);
  gap: 0;
  padding-bottom: 6px;
  pointer-events: auto;
}
.hp-n { color: var(--amber) !important; }
.hp-list { display: grid; gap: 0; margin: 0; padding: 4px 0 0; list-style: none; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--dim) transparent; }
.hp-list li { position: relative; padding-left: 14px; }
.hp-list li::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: var(--line-d); }
.hp-list li:first-child::before { top: 50%; }
.hp-list li:last-child::before { bottom: 50%; }
.hp-list li::after { content: ""; position: absolute; left: 2px; top: calc(50% - 3px); width: 7px; height: 7px; background: var(--deep); border: 1px solid var(--dim); }
.hp-list li:has([aria-current])::after { background: var(--amber); border-color: var(--amber); }
.hp-list li.gap { padding: 2px 0 2px 22px; color: var(--dim); font-size: 10px; }
.hp-list li.gap::after { display: none; }
.hp-list button {
  display: grid; grid-template-columns: 2.2ch minmax(0, auto) minmax(0, 1fr) auto; align-items: baseline; gap: 7px;
  width: 100%; padding: 3px 5px; border: 1px solid transparent; background: none; color: var(--cyan);
  font: inherit; text-align: left; cursor: pointer;
}
.hp-list button:hover, .hp-list button:focus-visible { border-color: var(--cyan); background: rgba(98, 214, 255, .1); outline: none; }
.hp-list button[aria-current] { border-color: var(--line); background: rgba(98, 214, 255, .14); }
.p-n { color: var(--dim); font-variant-numeric: tabular-nums; }
.p-via { max-width: 13ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--amber); font-size: 10px; letter-spacing: .12em; }
.p-via::after { content: " ▸"; color: var(--dim); }
.p-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ice); font-size: 13px; letter-spacing: .03em; text-transform: none; }
.p-k { color: var(--dim); font-size: 9px; letter-spacing: .16em; }

.hud-focus {
  position: absolute;
  left: max(var(--gutter), env(safe-area-inset-left));
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 2 * var(--gutter)));
  pointer-events: auto;
}
.hf-src { margin-left: 0; text-transform: none; letter-spacing: .06em; }
.hf-title { margin: 0; color: var(--ice); font: 700 19px/1.05 var(--font-ui); letter-spacing: .04em; text-transform: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hf-rows { grid-template-columns: 1fr 1fr; column-gap: 10px; }
.hf-rows dd { text-transform: none; letter-spacing: .04em; }
.hf-via { color: var(--amber) !important; }
.hf-acts, .hf-radio { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hf-radio { padding-top: 6px; border-top: 1px solid var(--line-d); }
.hf-radio .vol { padding-top: 3px; padding-bottom: 3px; box-shadow: none; }
.hf-radio .vol-tag { margin: -3px 0; }
.hf-radio .vol-meter { width: 104px; }
.hb-hot { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 10px rgba(255, 178, 74, .35); }
.hb-hot small { font-size: 9px; letter-spacing: .12em; opacity: .8; }
.hb-hot:hover, .hb-hot:focus-visible { background: var(--amber); color: var(--deep); }
.hb-radio { border-color: var(--mint, #59f5d0); color: #59f5d0; }
.hb-radio:hover, .hb-radio:focus-visible { background: #59f5d0; color: var(--deep); }
.hb-radio .on, .hb-radio[aria-pressed="true"] .off { display: none; }
.hb-radio[aria-pressed="true"] .on { display: inline; }
.hb-radio[aria-pressed="true"] { background: #59f5d0; color: var(--deep); }
.net-hover {
  position: absolute;
  left: 50%;
  bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + 24px);
  transform: translateX(-50%);
  max-width: min(46vw, 720px);
  padding: 3px 8px;
  border: 1px solid var(--line-d);
  background: var(--panel);
  color: var(--ice);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  letter-spacing: .06em;
  font-size: 13px;
}
.net-hover:empty { display: none; }
.net-stats {
  position: absolute;
  top: calc(max(14px, env(safe-area-inset-top)) + 36px);
  right: max(var(--gutter), env(safe-area-inset-right));
  padding: 3px 8px;
  border: 1px solid var(--line-d);
  background: var(--panel);
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.net-stats b { color: var(--ice); font-weight: 700; }
.net-hint {
  position: absolute;
  left: calc(max(var(--gutter), env(safe-area-inset-left)) + 380px);
  right: calc(max(var(--gutter), env(safe-area-inset-right)) + 290px);
  bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + 4px);
  color: #6d8fc6;
  font-size: 10px;
  letter-spacing: .1em;
  text-align: center;
  text-wrap: balance;
  animation: hintout 1s steps(4, end) 16s forwards;
}
.net-hint:hover { animation: none; }
@keyframes hintout { to { opacity: 0; } }

.nogl-note { display: none; }
html.nogl .nogl-note { display: block; position: fixed; left: 50%; bottom: 20%; transform: translateX(-50%); margin: 0; text-align: center; color: var(--ice); }
html.nogl .dive { opacity: .4; pointer-events: none; }

/* ---------- inverted black & white: one switch for every screen ----------
   No filter on the page (that was a full-screen compositor pass on every
   frame). The WebGL stage inverts itself in its last pass, the lobby's
   canvases draw in an inverted palette (title.js), and every colour in this
   file has an inverted twin under html.inv in net-inv.css. Only the small
   canvases inside the movable windows still go through a filter. */
html.inv { background: #fff; }
html.inv .win canvas, html.inv .sw { filter: invert(1) grayscale(1) contrast(1.08); }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .net-hint { display: none; }
  .hud-q { width: 130px; }
}
@media (max-width: 900px) {
  .hud-bar { flex-wrap: wrap; height: auto; row-gap: 4px; }
  .hud-bar > * { height: 28px; }
  .hud-fill { display: none; }
  .hud-search { flex: 1 1 auto; }
  .hud-q { flex: 1; width: auto; min-width: 80px; }
  .hud-bar .t-clock, .hud-bar .t-sys { display: none; }
  .net-stats { top: calc(max(14px, env(safe-area-inset-top)) + 70px); }
  .net-hover { display: none; }
  .hud-path { top: calc(max(14px, env(safe-area-inset-top)) + 74px); width: min(300px, calc(100vw - 2 * var(--gutter))); max-height: 26vh; }
  .hp-list li:not(:nth-last-child(-n+3)) { display: none; }
  .p-k { display: none; }
  .net-stats { display: none; }
  .hud-focus { bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + 48px); }
}
@media (min-width: 1300px) { .plate { width: min(680px, calc(100vw - 780px)); } }
@media (min-width: 1100px) and (max-width: 1299.98px) { .scope { display: none; } .plate { width: min(600px, calc(100vw - 700px)); } }
@media (max-width: 1099.98px) {
  .dossier, .scope { display: none; }
  .tabs { left: 14px; right: 14px; top: 14px; }
  .tabs .t-sys { display: none; }
}
@media (max-width: 1099.98px) and (min-height: 860px) {
  .dossier { display: grid; left: 50%; top: 56px; width: min(300px, calc(100vw - 56px)); transform: translateX(-50%); }
  .dossier .rows, .dossier .file2 { display: none; }
}
@media (max-height: 700px) {
  .dossier .file2, .dossier .rows > div:nth-child(n+5) { display: none; }
  .scope .props, .scope-key { display: none; }
  .scope-c { height: 140px; }
  .plate { gap: 10px; padding-bottom: 14px; }
}
@media (max-height: 560px) { .tagline { display: none; } }
@media (max-height: 460px) {
  .dossier, .scope, .osd-meta { display: none; }
}
@media (max-width: 640px) {
  .hud-bar .hb { padding: 3px 6px; letter-spacing: .08em; }
  .hud-search { order: 9; flex-basis: 100% !important; }
  .hud-path { top: calc(max(14px, env(safe-area-inset-top)) + 70px); }
  .hud-focus .hf-rows { display: none; }
  .hud-focus { gap: 6px; }
  .jack-id { display: none; }
  .jack-top { font-size: 11px; letter-spacing: .1em; }
  .plate { padding: 0 14px 14px; gap: 12px; }
  .plate > .pnl-h { margin: 0 -14px; }
  .title { font-size: clamp(44px, 15vw, 80px); }
  .tagline { font-size: 11px; letter-spacing: .14em; }
  .dive-label { font-size: 30px; letter-spacing: .3em; margin-right: -.3em; }
  .vol-meter { width: 84px; }
  .vol-tag { display: none; }
  .vol { padding-left: 6px; }
  .osd { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 52px); max-width: calc(100vw - 56px); }
  .osd-top { font-size: 16px; }
  .osd-name { font-size: 14px; }
  .w-maps, .w-two, .w-cols, .hf-rows { grid-template-columns: 1fr; }
  .hud-focus { width: calc(100vw - 2 * var(--gutter)); }
  .hf-title { font-size: 16px; }
  .hf-rows > div:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dive:hover .dive-label, .dive:focus-visible .dive-label, .osd.flip, .center.drift, .pnl.wipe > *, .win.wipe > .win-body { animation: none !important; }
  .osd-top i, .jack-cur, .tag-cur, .dots i, .title-neon .ch, .jack-sweep, .tabs .tab { animation: none !important; }
  .dive:hover .jack-sweep, .dive:focus-visible .jack-sweep { animation: none !important; }
}
