/* Matrix Terminal — black ground, phosphor-green monospace CRT aesthetic.
   No exact palette given in the source spec (aesthetic hook only); values
   below are chosen for the vibe and verified against the WCAG body-text
   bar (--text/--text-2/--muted all clear >=4.5:1 against every --bg*).
   --success stays phosphor green (in-vibe); --danger/--warning break from
   monochrome on purpose — a green-on-green error state is illegible and
   this app already uses --danger/--warning for real semantic meaning
   (.up/.down, toasts, confirm-armed) elsewhere, so classic terminal
   alert red/amber are used instead, same as an old CRT alarm flashing
   red over green phosphor.
   See: circuitforge-plans/vaportrade-clone/superpowers/specs/
   2026-08-13-ui-redesign-design.md §3 "Theme-pack roadmap". */
/* Box + 3270 (2026-09-02, swapped in from DSEG7 Classic via the
   font-gallery-generator drag-and-drop tool's exported picks -- confirmed
   deliberate, superseding the 2026-09-01 DSEG7 pick). 3270 is the real
   IBM-3270-terminal-emulator font (x3270 project), BSD-3-clause licensed
   (not OFL, but equally permissive -- see static/fonts/threetwoseventy/
   LICENSE.txt) -- an even more literal "terminal" match than DSEG7's
   LCD-readout look for this pack's CRT-terminal identity. Box (BOXRounded
   variable, SIL OFL) reused for --font-display, already self-hosted for
   8bit.css/matrix-terminal.css this round. DSEG7 stays self-hosted
   (static/fonts/dseg7-classic/) since it's unused, not deleted -- no
   other pack references it, but it's cheap to keep in case a future pack
   wants the LCD-readout look. */
@font-face{
  font-family:"Box";
  src:url("/vaportrade/static/fonts/box/Box-Regular.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}
@font-face{
  font-family:"3270";
  src:url("/vaportrade/static/fonts/threetwoseventy/3270-Regular.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}
[data-theme="matrix-terminal"]{
  --bg:#000000; --bg2:#050a05; --bg3:#0a120a; --border:#1e3d1e;
  --text:#33ff33; --text-2:#22cc22; --muted:#3d8f3d;
  --accent-1:#00ff41; --accent-2:#00cc66; --accent-3:#ffb000;
  --success:#33ff33; --danger:#ff3131; --danger-dark:#3d0808; --warning:#ffb000;
  --font-display:"Box",monospace;
  --font-mono:"3270",monospace;
  --font-size-display:1.75rem; --font-size-mono:1.125rem; --font-size-h2:1.25rem;
}
/* CRT scanline overlay — a repeating horizontal-line gradient over the
   whole viewport, same fixed full-viewport ::before pattern neon-casino's
   ambient glow and cf-defcon's grid overlay use. */
[data-theme="matrix-terminal"] body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:1;
  background:repeating-linear-gradient(
    0deg,rgba(0,0,0,.25) 0px,rgba(0,0,0,.25) 1px,transparent 1px,transparent 3px);
}
[data-theme="matrix-terminal"] h1 .grad{
  background:linear-gradient(90deg,#00ff41,#33ff33,#00cc66);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
/* Bespoke terminal button (2026-08-28 button glow-up note: this pack
   opts OUT of the new base button{} animated gradient-border/cut-corner
   look, theme.css -- deliberate flat hacker-terminal restraint,
   incompatible with a diagonal clip-path cut. clip-path:none undoes the
   base rule's cut-corner shape. content:none on ::before/::after is the
   real opt-out -- negative z-index paints ABOVE this element's own
   background per CSS2.1 stacking order (confirmed empirically), not
   behind it, so without this the base rule's ::after would silently
   cover this pack's own var(--bg3) fill. */
[data-theme="matrix-terminal"] button:not(.ghost):not(.danger):not(.dice-roll):not(.app-nav-toggle){
  background:var(--bg3);border:1px solid var(--accent-1);color:var(--accent-1);
  clip-path:none;
}
[data-theme="matrix-terminal"] button:not(.ghost):not(.danger):not(.dice-roll):not(.app-nav-toggle)::before,
[data-theme="matrix-terminal"] button:not(.ghost):not(.danger):not(.dice-roll):not(.app-nav-toggle)::after{
  content:none;
}
[data-theme="matrix-terminal"] .card,
[data-theme="matrix-terminal"] .tile{
  border-color:var(--border);
  box-shadow:0 0 6px rgba(0,255,65,.08) inset;
}
/* Selected-chip override — theme.css's .chip.on ships a Neon-Casino-specific
   hardcoded violet that doesn't belong on a phosphor-green terminal. Same
   override pattern as lisa-frank.css/8bit.css/etc: swap in this pack's own
   --accent-1 instead of the leaked literal. */
[data-theme="matrix-terminal"] .chip.on{
  background:rgba(0,255,65,.15);border-color:var(--accent-1);color:var(--accent-1);
}
/* Blinking terminal cursor accent — a block cursor appended after the
   h1 title text via ::after, since the title markup itself stays
   pack-agnostic. */
[data-theme="matrix-terminal"] h1::after{
  content:"\2588";color:var(--accent-1);margin-left:4px;
  animation:term-cursor-blink 1s steps(1) infinite;
}
@keyframes term-cursor-blink{
  0%,49%{opacity:1}
  50%,100%{opacity:0}
}
@media (prefers-reduced-motion: reduce){
  [data-theme="matrix-terminal"] h1::after{animation:none;opacity:1}
}
:root:is([data-motion="reduced"],[data-motion="off"]) [data-theme="matrix-terminal"] h1::after{animation:none;opacity:1}
