/* Display tiers (js/ui/gfx.js sets <html data-gfx="cga|ega|vga|svga|early3d|modern"> from the video card).
   modern = style.css untouched. Everything here is static: no full-page filter / backdrop-filter / blend
   modes, no added looping animation. Scanlines + vignette are ONE fixed overlay (body::after).
   Posterize filters (#gfx-cga / #gfx-ega / #gfx-svga, injected by gfx.js) only touch small art elements. */

/* VT323 (a DEC terminal face) for CGA body text, enlarged so its small x-height reads like the default
   font at the same px sizes. Only downloaded once an element actually uses it (i.e. in CGA). */
@font-face { font-family: 'GfxTerm'; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 122%;
  src: url(https://fonts.gstatic.com/s/vt323/v18/pxiKyp0ihIEF2isfFJU.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'GfxTerm'; font-style: normal; font-weight: 400; font-display: swap; size-adjust: 122%;
  src: url(https://fonts.gstatic.com/s/vt323/v18/pxiKyp0ihIEF2isRFJXGdg.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ================================================================ palettes */
:root[data-gfx="cga"] {
  /* CGA palette 1, high intensity: black, cyan, magenta, white */
  --mask: #000; --mask-2: #000; --mask-3: #000; --trace: #55ffff;
  --gold: #ff55ff; --gold-2: #ff55ff; --silk: #fff; --silk-dim: #55ffff; --ink: #000;
  --stock: #000; --stock-2: #000;
  --ops: #55ffff; --mult: #ff55ff; --heat: #ff55ff; --ok: #55ffff; --bsod: #000;
  --t-cpu: #55ffff; --t-gpu: #ff55ff; --t-mem: #ff55ff; --t-net: #55ffff; --t-sec: #fff; --t-oc: #ff55ff; --t-mal: #fff;
  --f-body: 'GfxTerm', 'Courier New', monospace; --f-mono: 'GfxTerm', 'Courier New', monospace;
  --g-page: #000; --g-page-img: none;
  --g-panel: #000; --g-line: #55ffff; --g-line-2: #ff55ff; --g-frame: 4px double #55ffff;
  --g-field: #000; --g-text: #fff; --g-on: #000;
  --g-card: #000; --g-card-ink: #fff; --g-card-line: #fff;
  --g-btn: #ff55ff; --g-btn-ink: #000; --g-btn-hi: #55ffff; --g-btn-line: #fff; --g-btn-shadow: none;
  --g-o: #55ffff; --g-m: #ff55ff; --g-b: #55ffff; --g-f: #fff;
  --g-seg-ops: #55ffff; --g-seg-mult: #ff55ff; --g-seg-thru: #fff; --g-seg-bw: #55ffff; --g-seg-ghost: 0;
  --g-art: url(#gfx-cga);
  --g-scrim: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 4px 4px;
  --g-dither: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  --g-bar: #55ffff; --g-bar-2: #fff; --g-hp: #ff55ff;
  --g-warm: #fff;
}
:root[data-gfx="ega"] {
  /* the 16 EGA colours, Turbo Vision style: blue windows on a dithered desktop, grey dialogs, green buttons */
  --mask: #0000aa; --mask-2: #0000aa; --mask-3: #0000aa; --trace: #aaaaaa;
  --gold: #ffff55; --gold-2: #aa5500; --silk: #fff; --silk-dim: #aaaaaa; --ink: #000;
  --stock: #fff; --stock-2: #fff;
  --ops: #55ffff; --mult: #ff5555; --heat: #ffff55; --ok: #55ff55; --bsod: #0000aa;
  --t-cpu: #55ffff; --t-gpu: #ff5555; --t-mem: #ff55ff; --t-net: #55ff55; --t-sec: #aaaaaa; --t-oc: #ffff55; --t-mal: #aa5500;
  --g-page: #000; --g-page-img: repeating-conic-gradient(#0000aa 0 25%, #000 0 50%) 0 0 / 4px 4px;
  --g-panel: #0000aa; --g-line: #aaaaaa; --g-line-2: #ffff55; --g-frame: 4px double #aaaaaa;
  --g-field: #000; --g-text: #fff; --g-on: #000;
  --g-card: #fff; --g-card-ink: #000; --g-card-line: #000;
  --g-btn: #00aa00; --g-btn-ink: #000; --g-btn-hi: #55ff55; --g-btn-line: #000; --g-btn-shadow: 4px 4px 0 #000;
  --g-o: #0000aa; --g-m: #aa0000; --g-b: #aa00aa; --g-f: #aa5500;
  --g-seg-ops: #55ffff; --g-seg-mult: #ff5555; --g-seg-thru: #ffff55; --g-seg-bw: #55ff55; --g-seg-ghost: .16;
  --g-art: url(#gfx-ega);
  --g-scrim: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 4px 4px;
  --g-dither: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  --g-bar: #55ffff; --g-bar-2: #55ff55; --g-hp: #ff5555; --g-warm: #ffff55;
}
:root[data-gfx="vga"] {
  /* mode 13h: EGA's flat layout, but 256 colours (6-bit DAC values) — a banded installer-blue backdrop,
     teal windows, grey Windows 3.1 buttons */
  --mask: #004c54; --mask-2: #004c54; --mask-3: #004c54; --trace: #00a8a8;
  --gold: #fcfc54; --gold-2: #a87c00; --silk: #fff; --silk-dim: #a8c8c8; --ink: #000;
  --stock: #fff; --stock-2: #fff;
  --ops: #54d4fc; --mult: #fc5470; --heat: #fcb440; --ok: #5cfc7c; --bsod: #000080;
  --t-cpu: #54d4fc; --t-gpu: #fc5470; --t-mem: #d47cfc; --t-net: #5cfc7c; --t-sec: #a8c8c8; --t-oc: #fcb440; --t-mal: #a87c00;
  --g-page: #000; --g-page-img: linear-gradient(180deg, #0000fc 0 6%, #0000e0 6% 12%, #0000c4 12% 18%, #0000a8 18% 24%, #00008c 24% 30%, #000070 30% 36%, #000054 36% 42%, #00003c 42% 48%, #000028 48% 54%, #000014 54% 60%, #000 60%);
  --g-panel: #004c54; --g-line: #00a8a8; --g-line-2: #fcfc54; --g-frame: 4px double #00a8a8;
  --g-field: #00242a; --g-text: #fff; --g-on: #000;
  --g-card: #fff; --g-card-ink: #000; --g-card-line: #000;
  --g-btn: #c0c0c0; --g-btn-ink: #000; --g-btn-hi: #e0e0e0; --g-btn-line: #000; --g-btn-shadow: 3px 3px 0 #000;
  --g-o: #0050c0; --g-m: #c00030; --g-b: #8000a0; --g-f: #a05000;
  --g-seg-ops: #54d4fc; --g-seg-mult: #fc5470; --g-seg-thru: #fcfc54; --g-seg-bw: #5cfc7c; --g-seg-ghost: .16;
  --g-art: url(#gfx-svga);
  --g-scrim: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 4px 4px;
  --g-dither: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  --g-bar: #54d4fc; --g-bar-2: #5cfc7c; --g-hp: #fc5470; --g-warm: #fcfc54;
}
:root[data-gfx="svga"] {
  /* the same purple PCB, snapped to the 216-colour web-safe cube */
  --mask: #330033; --mask-2: #330066; --mask-3: #663399; --trace: #663399;
  --gold: #ffcc66; --gold-2: #cc9933; --silk: #ffffff; --silk-dim: #cccccc; --ink: #1a0d1a;
  --stock: #ffffcc; --stock-2: #ffffcc;
  --ops: #33ccff; --mult: #ff3366; --heat: #ff9933; --ok: #66ff99; --bsod: #0000cc;
  --t-cpu: #33ccff; --t-gpu: #ff3366; --t-mem: #cc99ff; --t-net: #33cc99; --t-sec: #99cc66; --t-oc: #ff9933; --t-mal: #669966;
}

/* ================================================================ CRT overlay: scanlines + vignette + bezel */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"], [data-gfx="svga"], [data-gfx="early3d"]) body::after {
  content: ''; position: fixed; inset: 0; z-index: 10000; pointer-events: none;
  background: var(--crt-scan), var(--crt-vig, linear-gradient(transparent, transparent));
  border-radius: var(--crt-r, 0); box-shadow: 0 0 0 80px #000;
}
:root[data-gfx="cga"] { --scan-a: .55; --crt-scan: repeating-linear-gradient(180deg, rgba(255,255,255,0.055) 0 var(--scan-gap, 2px), rgba(0,0,0,0.55) var(--scan-gap, 2px) var(--scan-period, 3px));
  --crt-vig: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 62%, rgba(0,0,0,.55) 100%); --crt-r: 28px / 22px; }
:root[data-gfx="ega"] { --scan-a: .4; --crt-scan: repeating-linear-gradient(180deg, rgba(255,255,255,0.04) 0 var(--scan-gap, 2px), rgba(0,0,0,0.4) var(--scan-gap, 2px) var(--scan-period, 3px));
  --crt-vig: radial-gradient(ellipse 78% 74% at 50% 50%, transparent 64%, rgba(0,0,0,.45) 100%); --crt-r: 22px / 18px; }
:root[data-gfx="vga"] { --scan-a: .3; --crt-scan: repeating-linear-gradient(180deg, rgba(255,255,255,0.03) 0 var(--scan-gap, 2px), rgba(0,0,0,0.3) var(--scan-gap, 2px) var(--scan-period, 3px));
  --crt-vig: radial-gradient(ellipse 79% 76% at 50% 50%, transparent 65%, rgba(0,0,0,.42) 100%); --crt-r: 18px / 15px; }
:root[data-gfx="svga"] { --scan-a: .2; --crt-scan: repeating-linear-gradient(180deg, rgba(255,255,255,0.025) 0 var(--scan-gap, 2px), rgba(0,0,0,0.2) var(--scan-gap, 2px) var(--scan-period, 3px));
  --crt-vig: radial-gradient(ellipse 80% 78% at 50% 50%, transparent 66%, rgba(0,0,0,.38) 100%); --crt-r: 14px / 12px; }
:root[data-gfx="early3d"] { --crt-scan: repeating-linear-gradient(180deg, transparent 0 var(--scan-gap4, 3px), rgba(0,0,0,.08) var(--scan-gap4, 3px) var(--scan-period4, 4px)); }
:root[data-gfx="early3d"] body::after { box-shadow: none; }

/* low-res 3D: rig3d renders at a tiny pixel ratio in these tiers; upscale without smoothing */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"], [data-gfx="svga"]) .rig3d-canvas { image-rendering: pixelated; }

/* ================================================================ FLAT tiers (CGA + EGA): shared structure */
/* no blur, no glow, no rounded corners; borders carry the shape */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) *,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) *::before,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) *::after { border-radius: 0 !important; text-shadow: none !important; box-shadow: none !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) body { background: var(--g-page-img), var(--g-page); color: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) body::before,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #bg-canvas,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #bg-pulses { display: none; }

/* buttons */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn { background: var(--g-btn); color: var(--g-btn-ink); border: 2px solid var(--g-btn-line); filter: none; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .btn:not(.ghost) { box-shadow: var(--g-btn-shadow) !important; margin: 0 4px 4px 0; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn::after { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn:hover:not(:disabled) { background: var(--g-btn-hi); filter: none; transform: none; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .btn:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: none !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn:disabled { background: var(--g-field); color: var(--silk-dim); border: 2px dashed var(--silk-dim); filter: none; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .btn:disabled { box-shadow: none !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn.ghost { background: transparent; color: var(--g-text); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn.ghost:hover:not(:disabled) { background: transparent; color: var(--gold); border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn.red { background: var(--g-field); color: var(--mult); border: 2px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .btn.red:hover:not(:disabled) { background: var(--mult); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .icon-btn { border: 2px solid var(--g-line); color: var(--silk-dim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .icon-btn:hover { color: var(--g-on); background: var(--gold); border-color: var(--gold); }

/* topbar */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .topbar { background: var(--g-field); border-bottom: 2px solid var(--g-line); backdrop-filter: none; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar { background: #aaaaaa; color: #000; border-bottom: 2px solid #000; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar :is(.logo, .daytrack .day, .daytrack .day .era, .credits, .top-stat .label, .top-stat) { color: #000; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar .logo small { color: #0000aa; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar .credits { color: #0000aa; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar .icon-btn { color: #000; border-color: #000; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar .node-pip { color: #000; border-color: #555555; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar .node-pip.done { color: #0000aa; border-color: #0000aa; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .topbar .lvl { background: #0000aa; color: #fff; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .node-pip { border-width: 2px; padding: 2px 6px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .topbar { gap: 8px 14px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .topbar .icon-btn { padding: 4px 8px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .topbar .lvl { padding: 3px 5px 3px 4px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .node-pip.done { border-color: var(--ok); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .node-pip.now { background: var(--gold); color: var(--g-on); border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .node-pip.virus.now { background: var(--mult); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .integrity-bar { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .integrity-bar > i { background: repeating-linear-gradient(90deg, var(--ok) 0 6px, transparent 6px 8px); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .lvl { background: var(--g-field); border-left-width: 4px; }

/* panels: double-line text-mode windows */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.panel, .shelf) { background: var(--g-panel); border: var(--g-frame); }
:root:is([data-gfx="ega"], [data-gfx="vga"]) :is(.panel, .shelf) { box-shadow: 6px 6px 0 #000 !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .shelf::after { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .panel-h { border-image: none; border-bottom: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .silk-label .ref { border: 2px solid currentColor; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .h2 { color: var(--gold); }

/* expansion mods */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.mod { background: var(--g-field); border: 2px solid var(--rc); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.mod .mart { filter: var(--g-art); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.mod.empty { background: transparent; border: 2px dashed var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.mod.empty .mart { background: var(--g-dither), var(--g-line); filter: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.mod.disabled { filter: none; border-style: dashed; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.mod.disabled .mart { opacity: .35; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.clickable:hover { border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.flash { outline: 2px solid var(--g-text); }

/* objective / install / progress */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.progress, .meter) { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .progress > i { background: repeating-linear-gradient(90deg, var(--g-bar) 0 8px, transparent 8px 10px) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .progress.dl > i { background: repeating-linear-gradient(90deg, var(--g-bar-2) 0 8px, transparent 8px 10px) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .progress > i::after,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .hpbar > i::after,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .progress.dl::before { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .progress .ghost { background: var(--g-dither), var(--g-text); opacity: .9; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .stage.run.locked .progress > i { background: var(--g-dither), var(--silk-dim) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .stage.run.slowed .progress > i { filter: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .stage-n { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .stage.install .stage-n { background: var(--t-net); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .stage.install.done .stage-n { background: var(--ok); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .stage.install.disk-full .stage-n { background: var(--mult); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .led { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .led.on { background: var(--ok); border-color: var(--ok); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .led.last { background: var(--heat); border-color: var(--heat); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .breach-meter > i { background: repeating-linear-gradient(90deg, var(--heat) 0 6px, transparent 6px 8px); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .coach { background: var(--g-field); border: 2px dashed var(--gold); }

/* virus */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .virus-art { background: var(--g-field); border: 2px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .virus-art::after { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.virus-art, .ticket .vart, .preview-boss .pb-art) .vsprite { filter: var(--g-art); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .hpbar { background: var(--g-field); border: 2px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .hpbar > i { background: repeating-linear-gradient(90deg, var(--g-hp) 0 8px, transparent 8px 10px) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .hpbar > .sh { background: repeating-linear-gradient(90deg, var(--ops) 0 2px, transparent 2px 4px); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .hpbar .ghost { background: var(--g-dither), var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .intent { background: var(--g-field); border: 2px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .intent::before { background: var(--g-field); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .virus-art.dead::before { color: var(--ok); }

/* the LED readout: a plain text-mode box, segments in the tier palette */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout { background: var(--g-field); border: var(--g-frame); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.lcd.ops, .lcd.mult, .lcd.thru, .lcd.bwmain) { background: var(--g-field); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.lcd.ops, .lcd.mult, .lcd.thru, .lcd.bwmain)::after { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout .num.seg,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout.hitstop .lcd.thru .num.seg { filter: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .lcd.ops .num.seg { color: var(--g-seg-ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .lcd.mult .num.seg { color: var(--g-seg-mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .lcd.thru .num.seg { color: var(--g-seg-thru); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.lcd.bwmain, .lcd.bw) .num { color: var(--g-seg-bw); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .segs .ghost { opacity: var(--g-seg-ghost); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout::after { outline: 2px solid var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout:is(.throttled, .clears) { border-color: var(--heat); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout.busy { border-color: var(--t-net); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout.clears .proj { color: var(--heat); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout.locked :is(.lcd.ops, .lcd.mult, .lcd.thru) .num { filter: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .readout .op.sep { background: var(--g-line); }

/* pipeline */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .slot,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pipeline .slot:not(.filled) { background: var(--g-field); border: 2px dashed var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .slot.filled { background: none; border-color: transparent; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .slot::after { background: repeating-linear-gradient(90deg, transparent 0 3px, var(--gold) 3px 5px), var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .slot.next { border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .slot-ghost { color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .slot.active .card { outline: 3px solid var(--gold); outline-offset: 2px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .slot.snap .card { animation: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pipe-lock { background: var(--g-dither), var(--g-panel); border: 2px dashed var(--silk-dim); color: var(--silk-dim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pipe-lock .slot-n { color: var(--silk-dim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pop { color: var(--g-on); border: 2px solid var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.pop.xmult, .pop.hurt) { background: var(--mult); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pop.xops { background: var(--ops); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pop.coolpop { background: var(--ops); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pop.note { background: var(--g-text); color: var(--g-on); }

/* right column */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .soft { background: var(--g-field); border: 2px solid var(--g-line); color: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .soft::before { content: '[■]'; font-size: 14px; color: var(--ops); font-family: var(--f-mono); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .soft:hover { border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .soft.empty { background: transparent; border: 2px dashed var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .soft.empty::before { content: ''; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .soft.empty .disk-ghost,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .soft.empty .disk-ghost::after { border-color: var(--silk-dim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pile { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pile:hover { border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .core { border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .core.on { background: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .core.over { background: var(--ok); border-color: var(--ok); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #exec-btn:not(:disabled) { outline: 2px solid var(--gold); outline-offset: 2px; }
/* thermal gauge: the SVG's presentation attributes / gradient stops are overridable from CSS */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .g-glow { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge #g-cool stop { stop-color: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge path[stroke="url(#g-cool)"][opacity] { stroke: var(--g-line); opacity: 1; stroke-dasharray: 2 3; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge path[stroke="#12091c"] { stroke: var(--g-field); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge path[stroke="#6b5f80"] { stroke: var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge path[stroke="#ff4f5e"] { stroke: var(--mult); opacity: 1; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge path[stroke="#f3efe6"] { stroke: var(--g-text); opacity: 1; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge path[stroke="#fff"] { stroke: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge #g-hatch rect[fill="#ff4f5e"] { fill: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge #g-hatch rect[fill="#5a1a28"] { fill: var(--g-field); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge .g-lim { fill: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge-wrap { --hc: var(--ops) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge-wrap.heat-warm { --hc: var(--g-warm) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge-wrap:is(.heat-strain, .heat-over) { --hc: var(--mult) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .g-alarm { background: var(--mult); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .gauge-wrap.frost .g-read .t { filter: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .heat-steps .cool b { color: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .heat-rule.bad { background: var(--mult); color: var(--g-on); border: 2px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .heat-rule.bad span { color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .thermal-panel.hot { border-color: var(--mult); }

/* cards: a text-mode box (CGA: black / EGA: white dialog), tag colour on the rim */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card { background: var(--g-card); color: var(--g-card-ink); border: 2px solid var(--g-card-line); }
:root[data-gfx="cga"] .card { border-color: var(--tc); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card::before { height: 4px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card::after { bottom: 2px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .art { background-size: 0 0; background-color: var(--g-field); border: 2px solid var(--tc); overflow: visible; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .art::before { content: ''; position: absolute; inset: 0; background-image: inherit; background-size: cover; background-position: center; filter: var(--g-art); pointer-events: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .cost { background: var(--gold); color: var(--g-on); border: 2px solid var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .heat { background: var(--g-field); color: var(--heat); border: 1px solid var(--heat); z-index: 1; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .heat.cool { background: var(--g-field); color: var(--ops); border-color: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .art .t { z-index: 1; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .upfoil { background: var(--ops); color: var(--g-on); border: 2px solid var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card :is(.desc, .now) .o { color: var(--g-o); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card :is(.desc, .now) .m { color: var(--g-m); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card :is(.desc, .now) .b { color: var(--g-b); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card :is(.desc, .now) .f { color: var(--g-f); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.card .foil, .card .glare) { display: none !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.r-rare .name { text-decoration: underline 2px var(--gold); text-underline-offset: 2px; }
/* can't afford: a 50% dither over the card instead of a desaturate filter */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.cant { filter: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.cant::after { box-shadow: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.cant .foil { display: block !important; background: var(--g-dither); -webkit-mask: none; mask: none; opacity: .75; mix-blend-mode: normal; z-index: 2; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.locked::before { background: var(--g-dither), var(--g-field); color: var(--mult); border: 2px dashed var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.mal { background: var(--g-card); border: 2px dashed var(--t-mal); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.mal::before { background: repeating-linear-gradient(90deg, var(--t-mal) 0 6px, transparent 6px 10px); height: 4px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.mal :is(.name, .desc) { color: var(--g-card-ink); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.mal .cost { background: var(--t-mal); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card.mal .art { animation: none; }
/* no perspective tilt on a 2D adapter: hovered cards just lift */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .hand .card.tilt { transform: translateY(-14px) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.pick-row, .deck-grid, .item) .card.tilt { transform: translateY(-6px) !important; }

/* board (2D): posterize only the board picture and part art, never the labels / moving bits */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mobo:not(.r3d-on .mobo) { background-size: 0 0; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mobo:not(.r3d-on .mobo)::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: inherit; background-size: 100% 100%; filter: var(--g-art); pointer-events: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.chip.part .art, .fan, .grille) { filter: var(--g-art); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.mobo .heatmap, .dieglow, .fanblur, .vapor, .bubbles, .fiberglow, .spark, .platter) { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .rgbline, :root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .rgbstick { background: repeating-linear-gradient(90deg, var(--mult) 0 4px, var(--ops) 4px 8px); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .pumpring { border-color: var(--mult) var(--ops) var(--mult) var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-panel:has(.mobo.rgb)::before { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.part .lbl { background: var(--g-field); color: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.part.empty { border: 2px dashed var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .chip.part.disabled > i { filter: var(--g-art); opacity: .35; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.chip.part .off, .mobo .off) { background: var(--g-dither); color: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-lcd { background: var(--g-field); border: 2px solid var(--g-line); color: var(--silk-dim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-lcd b { color: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-lcd b.bad { color: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-lcd .tmp { color: var(--g-text) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-lcd .os { background: var(--g-field); border: 2px solid var(--g-line); border-bottom: 0; color: var(--g-text); top: -17px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-banner { background: var(--mult); color: var(--g-on); border: 2px solid var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mb-banner.warn { background: var(--g-field); color: var(--heat); border-color: var(--heat); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mobo.throttle { outline: 3px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mobo.throttle::after { background: var(--g-dither); opacity: .5; animation: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mobo[class*="case-"] { --case: var(--g-line); outline-width: 4px; outline-style: double; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .case-tag,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mobo:is(.case-laptop, .case-rack, .case-mesh, .case-glass, .case-bench) .case-tag { background: var(--g-line); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ghost-part { outline-color: var(--ok); }
/* 3D mount */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .rig3d-mount.r3d-on { background: #000; border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .r3d-on .mobo .mb-lcd { backdrop-filter: none; background: var(--g-field); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .r3d-on .mobo .chip.part:hover { outline-color: var(--gold); background-color: transparent !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .r3d-on .mobo .chip.part.empty { outline: 2px dashed var(--g-line); }

/* contracts */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .boot-node { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .boot-node.now { background: var(--g-field); border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .boot-trace { background: var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket { background: var(--g-card); color: var(--g-card-ink); border: 2px solid var(--g-card-line); }
:root[data-gfx="cga"] .ticket { border-color: var(--tc, var(--g-line)); }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .ticket { box-shadow: 6px 6px 0 #000 !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket:hover:not(:disabled) { transform: translateY(-4px); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .band.art-band { filter: var(--g-art); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket:hover:not(:disabled) .art-band { filter: var(--g-art); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket :is(.kind, .client, .terms span, .install-line .dim) { color: var(--g-tk-dim, var(--silk-dim)); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .rule { background: transparent; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket :is(.terms, .terms div, .install-line) { border-color: var(--g-tk-line, var(--g-line)); border-width: 2px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .install-line .silk-label { color: var(--g-tk-net, var(--t-net)); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .install-line .disk-warn { color: var(--g-m); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .install-line.wont-fit { background: transparent; outline: 2px dashed var(--g-m); outline-offset: -2px; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .perk { background: var(--g-field); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .perk.early { background: var(--g-field); border-top: 2px dashed var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .deal { background: var(--g-field); color: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .deal span { color: var(--silk-dim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .deal b { color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket .deal-hot b { background: var(--heat); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket.virus { background: var(--g-field); color: var(--g-text); border: 2px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket.virus :is(.kind, .client, .terms span, .install-line .dim) { color: var(--silk-dim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket.virus :is(.terms, .terms div, .install-line) { border-color: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket.virus .install-line .silk-label { color: var(--t-net); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ticket.virus .rule { background: transparent; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.ticket .vart, .preview-boss .pb-art) { background: var(--g-field); border: 2px solid var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.mode-virus, .mode-hack, .mode-corruption, .mode-ddos) { color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mode-hack { background: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mode-corruption { background: var(--t-mem); }

/* shop + reward */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card { background: var(--g-field); border: 2px solid var(--rc, var(--g-line)); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card:hover:not(:disabled) { border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.mod-card:disabled, .mod-card.incompat) { opacity: 1; filter: none; border-style: dashed; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .item.incompat .price { opacity: 1; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.mod-card:disabled, .mod-card.incompat)::after { content: ''; position: absolute; inset: 0; background: var(--g-dither); opacity: .7; pointer-events: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .item.sold { opacity: 1; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .item.sold::after { content: ''; position: absolute; inset: 0; background: var(--g-scrim); pointer-events: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card .mc-art,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card.is-mod .mc-art,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .part-pick .mc-art.hw { filter: var(--g-art); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card.is-hw .mc-art { background-color: var(--g-field); border-bottom: 2px solid var(--rc, var(--g-line)); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card.soft-card { background: var(--g-field); border-color: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card.rarity-legendary { border-color: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .mod-card .grants, :root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #tip .s.grants { color: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .item .price { background: var(--g-field); border: 2px solid var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .item .price.no { color: var(--silk-dim); border-color: var(--silk-dim); text-decoration: line-through; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .service { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .service:hover:not(:disabled) { border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.sysinfo dd .dv, .sysinfo .deck-diffs i) { color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .patch-diff { background: var(--g-field); border: 2px solid var(--ok); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .part-pick { background: var(--g-field); border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .receipt { background: #fff; color: #000; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .receipt::before { display: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .receipt :is(.meta, .r-logo small, .r-foot, .lv) { color: #000; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .receipt .r-logo { color: #000; border-bottom-color: #000; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .receipt .bad { background: var(--mult); color: #000; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .receipt .stamp { color: var(--g-m); border-color: var(--g-m); mix-blend-mode: normal; background: #fff; }

/* overlays, tooltips, terminal */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .modal-bg,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .job-over,
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .job-over[data-result="lost"] { background: var(--g-scrim); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .modal { background: var(--g-panel); border: var(--g-frame); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .job-over .box { background: var(--g-panel); border: var(--g-frame); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .job-over .box.lose { border-color: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .stampbig { background: var(--g-field); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .bit { background: var(--c); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #tip { background: var(--g-field); border: 2px solid var(--gold); color: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #tip.cardtip { border: 0; background: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #tip .tg i { color: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #toast { color: var(--g-on); border: 2px solid var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .term { background: var(--g-field); border: var(--g-frame); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .term-bar { background: var(--g-line); color: var(--g-on); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .choice { border: 2px solid var(--g-line); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .choice:hover:not(:disabled) { background: transparent; border-color: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .bsod .btn { background: var(--g-btn); }

/* cascade fx: solid palette sparks, no glows */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer .ftrace { filter: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer :is(.spark-p, .ember) { background: var(--c); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer .bigpop { color: var(--g-text); -webkit-text-stroke: 2px #000; paint-order: stroke fill; }

/* fx.js colours arrive as --c custom properties / stroke attributes: remap them to the palette */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#4cc3ff"] { --c: var(--ops) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#4cc3ff"] { stroke: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#9fe3ff"] { --c: var(--ops) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#9fe3ff"] { stroke: var(--ops); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#ff4f5e"] { --c: var(--mult) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#ff4f5e"] { stroke: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#ff8a93"] { --c: var(--mult) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#ff8a93"] { stroke: var(--mult); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#ffffff"] { --c: var(--g-text) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#ffffff"] { stroke: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#fff6c0"] { --c: var(--g-text) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#fff6c0"] { stroke: var(--g-text); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#3fd8b0"] { --c: var(--t-net) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#3fd8b0"] { stroke: var(--t-net); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#e2b65c"] { --c: var(--gold) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#e2b65c"] { stroke: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#ffd36e"] { --c: var(--gold) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#ffd36e"] { stroke: var(--gold); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#ff8a2a"] { --c: var(--heat) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#ff8a2a"] { stroke: var(--heat); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer [style*="#b6e35a"] { --c: var(--t-sec) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer path[stroke="#b6e35a"] { stroke: var(--t-sec); }

/* screen flashes are set via style.background, which serializes to rgb() */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer .fx-flash[style*="rgb(255, 79, 94)"] { background: var(--mult) !important; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) #fx-layer .fx-flash[style*="rgba(255, 246, 216"] { background: var(--g-text) !important; opacity: .5; }

/* ================================================================ CGA specifics */
:root[data-gfx="cga"] .card .desc { line-height: 1.02; }
:root[data-gfx="cga"] .card .name { font-family: var(--f-body); font-weight: 400; line-height: 1; }
:root[data-gfx="cga"] .ticket h3 { font-weight: 400; font-size: 22px; }
:root[data-gfx="cga"] :is(.chip.mod .nm, .soft b, .mod-card h4, .part-pick h4, .stage-head, .obj-client) { font-weight: 400; }
:root[data-gfx="cga"] .chip.mod .nm { line-height: 1; }
:root[data-gfx="cga"] .card .art .t { color: #000; }
/* card text on black: keep the tag rim, cyan keyword fills read as labels */
:root[data-gfx="cga"] .card .desc .kw { color: #fff; text-decoration: underline 1px; }
:root[data-gfx="cga"] .card.selected { outline-color: #fff; }

/* ================================================================ EGA specifics */
:root:is([data-gfx="ega"], [data-gfx="vga"]) { --g-tk-dim: #555555; --g-tk-line: #555555; --g-tk-net: #00aaaa; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .card .art .t { color: #000; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .card .heat { background: #000; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .card.cant .foil { background: repeating-conic-gradient(#aaaaaa 0 25%, transparent 0 50%) 0 0 / 2px 2px; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .ticket .rule { border-left-color: var(--tc, #0000aa); }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .ticket .deal { background: #0000aa; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .ticket .perk { background: #0000aa; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .card.mal :is(.name, .desc) { color: #000; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .modal { box-shadow: 8px 8px 0 #000 !important; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .job-over .box { box-shadow: 8px 8px 0 #000 !important; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .readout { background: #000; }
:root:is([data-gfx="ega"], [data-gfx="vga"]) .lcd .silk-label { color: #aaaaaa; }

/* ================================================================ SVGA: today's look on a 256-colour card */
/* flat fills (gradients become solid web-safe colours), hard drop shadows, bevelled buttons, no glows */
:root[data-gfx="svga"] :is(.panel, .shelf) {
  background: var(--screw) 2px 2px / 10px 10px no-repeat, var(--screw) calc(100% - 2px) 2px / 10px 10px no-repeat,
    var(--screw) 2px calc(100% - 2px) / 10px 10px no-repeat, var(--screw) calc(100% - 2px) calc(100% - 2px) / 10px 10px no-repeat, #330066;
  box-shadow: 3px 3px 0 #000; border-color: #663399;
}
:root[data-gfx="svga"] .topbar { background: #330066; box-shadow: 0 2px 0 #000; backdrop-filter: none; }
:root[data-gfx="svga"] .btn { background: #ffcc66; border: 2px solid; border-color: #ffffcc #996633 #996633 #ffffcc; box-shadow: 2px 2px 0 #000; }
:root[data-gfx="svga"] .btn::after { display: none; }
:root[data-gfx="svga"] .btn:hover:not(:disabled) { filter: none; background: #ffcc99; }
:root[data-gfx="svga"] .btn:active:not(:disabled) { border-color: #996633 #ffffcc #ffffcc #996633; box-shadow: none; transform: translate(1px, 1px); }
:root[data-gfx="svga"] .btn.ghost { background: transparent; border: 2px solid #cccccc; box-shadow: none; }
:root[data-gfx="svga"] .btn.red { background: #ff3366; border-color: #ff99cc #990033 #990033 #ff99cc; }
:root[data-gfx="svga"] .card { background: #ffffcc; box-shadow: 2px 2px 0 #996633, 4px 4px 0 rgba(0,0,0,.6); }
:root[data-gfx="svga"] .card.up { box-shadow: 0 0 0 2px #33ccff, 4px 4px 0 rgba(0,0,0,.6); }
:root[data-gfx="svga"] .card.r-uncommon { box-shadow: 0 0 0 1px #99ccff, 4px 4px 0 rgba(0,0,0,.6); }
:root[data-gfx="svga"] .card.r-rare { box-shadow: 0 0 0 2px #ffcc66, 4px 4px 0 rgba(0,0,0,.6); }
:root[data-gfx="svga"] .hand .card:hover { box-shadow: 2px 2px 0 #996633, 6px 6px 0 rgba(0,0,0,.6); }
:root[data-gfx="svga"] .card .cost { background: #ffcc66; box-shadow: 0 0 0 2px #663300; }
:root[data-gfx="svga"] :is(.card .art, .chip.part .art, .chip.mod .mart, .mod-card .mc-art, .ticket .band.art-band, .tl-art, .vsprite, .part-pick .mc-art.hw) { filter: url(#gfx-svga); }
:root[data-gfx="svga"] .card .foil { display: none !important; }
:root[data-gfx="svga"] .ticket { box-shadow: 4px 4px 0 rgba(0,0,0,.6); }
:root[data-gfx="svga"] .ticket:hover:not(:disabled) .art-band { filter: url(#gfx-svga); }
:root[data-gfx="svga"] .chip.mod { background: #330033; }
:root[data-gfx="svga"] .mod-card { background: #330033; box-shadow: inset 3px 0 0 var(--rc, var(--trace)), 3px 3px 0 #000; }
:root[data-gfx="svga"] .mod-card.soft-card { background: #003366; }
:root[data-gfx="svga"] .readout { background: #000; box-shadow: 0 0 0 3px #330066, 0 0 0 4px #663399, 3px 3px 0 4px #000; }
:root[data-gfx="svga"] :is(.lcd.ops, .lcd.mult, .lcd.thru, .lcd.bwmain) { background: #000; box-shadow: inset 0 0 0 1px #330066; }
:root[data-gfx="svga"] :is(.lcd.ops, .lcd.mult, .lcd.thru, .lcd.bwmain)::after { display: none; }
:root[data-gfx="svga"] .readout .num.seg, :root[data-gfx="svga"] .readout.hitstop .lcd.thru .num.seg { filter: none; }
:root[data-gfx="svga"] .lcd.ops .num.seg { color: #33ccff; }
:root[data-gfx="svga"] .lcd.mult .num.seg { color: #ff3366; }
:root[data-gfx="svga"] .lcd.thru .num.seg { color: #ffffcc; }
:root[data-gfx="svga"] .segs .ghost { opacity: .14; }
:root[data-gfx="svga"] :is(.progress, .hpbar) { box-shadow: none; }
:root[data-gfx="svga"] .progress > i { background-image: repeating-linear-gradient(90deg, #33ccff 0 10px, #0099cc 10px 12px); box-shadow: none; }
:root[data-gfx="svga"] .progress.dl > i { background-image: repeating-linear-gradient(90deg, #33cc99 0 10px, #009966 10px 12px); }
:root[data-gfx="svga"] .hpbar > i { background-image: none; background-color: #ff3366; }
:root[data-gfx="svga"] .integrity-bar > i { background-image: none; background-color: var(--ok); }
:root[data-gfx="svga"] :is(.progress > i, .hpbar > i)::after { box-shadow: none; }
:root[data-gfx="svga"] .progress.dl::before { display: none; }
:root[data-gfx="svga"] .modal-bg { background: rgba(0,0,0,.7); }
:root[data-gfx="svga"] .modal { box-shadow: 6px 6px 0 #000; }
:root[data-gfx="svga"] .job-over, :root[data-gfx="svga"] .job-over[data-result="lost"] { background: rgba(0,0,0,.6); }
:root[data-gfx="svga"] .job-over .box { background: #330066; box-shadow: 6px 6px 0 #000; }
:root[data-gfx="svga"] .job-over h2 { text-shadow: 2px 2px 0 #000; }
:root[data-gfx="svga"] :is(.title-word .o, .g-read .t, .mb-lcd .tmp, .virus-art.dead::before, .heat-steps .bad b, .lcd.thru .silk-label) { text-shadow: none; }
:root[data-gfx="svga"] .g-glow { display: none; }
:root[data-gfx="svga"] .virus-art { background: #000; }
:root[data-gfx="svga"] :is(.virus-art .vsprite, .ticket .vart .vsprite) { filter: url(#gfx-svga); }
:root[data-gfx="svga"] .mobo .heatmap, :root[data-gfx="svga"] .dieglow { display: none; }
:root[data-gfx="svga"] .mb-panel:has(.mobo.rgb)::before { display: none; }
:root[data-gfx="svga"] .r3d-on .mobo .mb-lcd { backdrop-filter: none; background: #000; }
:root[data-gfx="svga"] #tip { background: #000; box-shadow: 3px 3px 0 #000; }
:root[data-gfx="svga"] #fx-layer .ftrace { filter: none; }
:root[data-gfx="svga"] .slot.active .card { box-shadow: 0 0 0 2px var(--gold), 4px 4px 0 rgba(0,0,0,.6); }
:root[data-gfx="svga"] .card .glare { display: none !important; }
:root[data-gfx="svga"] .hand .card.tilt { transform: translateY(-14px) !important; }
:root[data-gfx="svga"] :is(.pick-row, .deck-grid, .item) .card.tilt { transform: translateY(-6px) !important; }

/* ================================================================ "display upgraded" moment (gfx.js upgraded()) */
#gfx-up { position: fixed; inset: 0; z-index: 9990; display: grid; place-items: center; pointer-events: none; }
#gfx-up::before { /* degauss colour wash: opacity + transform only */
  content: ''; position: absolute; inset: -10%; opacity: 0; will-change: transform, opacity;
  background: linear-gradient(100deg, rgba(255,60,200,.35), rgba(60,255,210,.3) 30%, rgba(90,120,255,.35) 60%, rgba(255,230,60,.3));
  animation: gfx-wash .9s ease-out;
}
#gfx-up .gfx-up-box {
  padding: 14px 26px 12px; background: #000; border: 4px double #fff; color: #fff; text-align: center;
  font-family: 'Silkscreen', 'Courier New', monospace; text-transform: uppercase; letter-spacing: .06em;
  animation: gfx-box .9s steps(1);
}
#gfx-up .gfx-up-box b { display: block; font-weight: 400; font-size: 26px; }
#gfx-up .gfx-up-box span { display: block; margin-top: 4px; font-size: 11px; color: #55ffff; }
:root[data-gfx="modern"] #gfx-up .gfx-up-box, :root[data-gfx="early3d"] #gfx-up .gfx-up-box { border: 1px solid var(--gold); border-radius: 6px; box-shadow: 0 0 40px rgba(226,182,92,.35); }
:root[data-gfx="modern"] #gfx-up .gfx-up-box span, :root[data-gfx="early3d"] #gfx-up .gfx-up-box span { color: var(--gold); }
html.gfx-degauss #app { animation: gfx-degauss .85s cubic-bezier(.25, .7, .3, 1); }
@keyframes gfx-degauss {
  0% { transform: none; }
  8% { transform: scale(1.03, .96) skewX(4deg); }
  18% { transform: scale(.98, 1.025) skewX(-3deg) translateX(8px); }
  30% { transform: scale(1.015, .99) skewX(2deg) translateX(-5px); }
  44% { transform: skewX(-1.2deg) translateX(3px); }
  60% { transform: skewX(.6deg) translateX(-1px); }
  78% { transform: skewX(-.2deg); }
  100% { transform: none; }
}
@keyframes gfx-wash { 0% { opacity: .95; transform: translateX(-6%) skewX(-8deg); } 35% { opacity: .6; transform: translateX(5%) skewX(6deg); } 100% { opacity: 0; transform: none; } }
@keyframes gfx-box { 0% { opacity: 0; } 12% { opacity: 1; } 18% { opacity: .2; } 26% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html.gfx-degauss #app { animation: none; }
  #gfx-up::before { display: none; }
}
#gfx-up.still::before { display: none; }

/* the menu toggle gfx.js injects next to "Rig view" */
.gfx-toggle { width: 100%; }

/* event feedback (js/ui/notify.js) on the CRT tiers: flat panels, hard frames, posterized art, no glows */
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ntf:not(.ntf-level), :root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ntf-lvbox { background: var(--g-panel); border: var(--g-frame); border-color: var(--nc); border-radius: 0; box-shadow: var(--g-btn-shadow, none); }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ntf-level::before { background: var(--g-dither); opacity: .5; border-radius: 0; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ntf-lv em { text-shadow: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ntf-art { filter: var(--g-art); border-radius: 0; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) :is(.nfloat, .nfly) { border-radius: 0; box-shadow: none; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .ntf-burst i { border-radius: 0; background: var(--tc); width: 4px; }
:root[data-gfx="cga"] .nfly { background: #000; color: #fff; border: 1px solid #fff; border-top: 3px solid var(--tc); }
:root[data-gfx="svga"] .ntf:not(.ntf-level), :root[data-gfx="svga"] .ntf-lvbox { border-radius: 2px; }

:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .now { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
:root:is([data-gfx="cga"], [data-gfx="ega"], [data-gfx="vga"]) .card .now b { color: inherit; }

/* ================================================================ VGA (EGA's flat layout, 256-colour accents) */
:root[data-gfx="vga"] body { background-attachment: fixed; }
:root[data-gfx="vga"] .topbar { background: #c0c0c0; }
:root[data-gfx="vga"] .topbar :is(.logo small, .credits) { color: #000080; }
:root[data-gfx="vga"] .topbar .lvl { background: #000080; }
:root[data-gfx="vga"] :is(.ticket .deal, .ticket .perk) { background: #004c54; }
:root[data-gfx="vga"] .readout { background: #00242a; }
