/* Apex — the Wayne Design System 2.0 look, and the look this bundle ships with.
   Paper ground, ink type, one signal colour; dark slabs only for what sits under the kernel boundary
   (here: the taskbar); flat, bordered instruments; nothing glows.
   Every value below is a hook style.css already declares, mapped onto a --wx-* token from ds/tokens.css
   (vendored unchanged). The page loads ds/tokens.css before style.css, so light and dark follow the
   system through the tokens themselves: tokens.css carries the calibrated night desk under
   prefers-color-scheme: dark, and every pair it ships passed its contrast ruler (text >= 4.5:1, edges >= 3:1).
   The signal (--wx-signal) is used once: the brand mark. A primary button is ink, not signal — this desk
   has a primary act in many windows, and the system keeps signal for the one recommended action.
   State words carry their meaning; the colour repeats it: VERIFIED in lime ink, NO_SIGNAL in the second
   ink, REFUSED in ink, parked in blue. A skin may only paint. */

:root {
  color-scheme: light;

  /* ground, surfaces, edges */
  --bg: var(--wx-paper);
  --bg2: var(--wx-sheet);
  --surface: var(--wx-surface);
  --surface2: var(--wx-well);
  --line: var(--wx-hair);
  --line2: var(--wx-line-quiet);

  /* type */
  --ink: var(--wx-ink);
  --ink2: var(--wx-ink-2);
  --mute: var(--wx-ink-3);
  --mono: var(--wx-mono);
  --ui: var(--wx-sans);
  --font-numeric: tabular-nums;
  --font-features: "tnum" 1;

  /* the accent is ink: buttons are bordered ink on sheet, a primary act is filled ink */
  --acc: var(--wx-ink);
  --acc-ink: var(--wx-ink);
  --acc-bg: var(--wx-sheet);
  --acc-on: var(--wx-paper);

  /* evidence, beside its word */
  --ok: var(--wx-lime-ink);
  --warn: var(--wx-ink-2);
  --bad: var(--wx-ink);
  --purple: var(--wx-blue-ink);
  --park: var(--wx-blue-line);

  /* edges: radius 3 tags · 4 inner · 5 controls · 6 cards and buttons · 8 windows; no shadow, no glow */
  --radius: var(--wx-radius-window);
  --radius-md: var(--wx-radius);
  --radius-btn: var(--wx-radius);
  --radius-sm: var(--wx-radius-inner);
  --radius-xs: var(--wx-radius-tag);
  --radius-pill: var(--wx-pill);
  --radius-round: 50%;
  --shadow: none;
  --glow: 0;
  --quick-shadow: none;

  /* the desk: paper with a 32px ink grid at 4%, no wash */
  --desk-glow-1: transparent;
  --desk-glow-2: transparent;
  --desk-grid: var(--wx-grid);
  --desk-grid-pitch: var(--wx-grid-pitch);

  /* the top bar: surface with an ink rule; the brand mark is the one signal */
  --topbar-h: 40px;
  --bar-face: var(--wx-surface);
  --bar-line: var(--wx-ink);
  --bar-relief-top: none;
  --mark-size: 0.62rem;
  --mark-shape: var(--wx-radius-tag);
  --mark-face: var(--wx-signal);
  --mark-glow: none;

  /* windows: flat, a 1.5px ink edge, a 34px bar with an ink rule */
  --win-edge: 1.5px;
  --win-line: var(--wx-ink);
  --win-head-h: 34px;
  --win-focus-line: var(--wx-ink);
  --chrome: var(--wx-surface);
  --chrome-focus: var(--wx-sheet);
  --chrome-line: var(--wx-ink);
  --chrome-ink: var(--wx-ink);
  --chrome-sub: var(--wx-ink-3);
  --chrome-relief: none;
  --chrome-btn: var(--wx-sheet);
  --chrome-btn-ink: var(--wx-ink);
  --chrome-btn-line: var(--wx-ink);
  --engrave: none;
  --screw-display: none;
  --quick-mark: "\203A ";
  --quick-head-focus: var(--wx-sheet);

  /* lamps: lifecycle state, a ring always drawn; NO_SIGNAL is the hollow ring */
  --lamp-on: var(--wx-lime-line);
  --lamp-off: var(--wx-ink-3);
  --lamp-nosig: transparent;
  --lamp-ring: inset 0 0 0 1px var(--wx-ink-2);

  /* the taskbar is slab: under the kernel boundary. The open window is paper with ink type */
  --taskbar-h: 44px;
  --bar-face-bottom: var(--wx-slab);
  --bar-relief-bottom: none;
  --taskbar-ink: var(--wx-slab-ink-2);
  --taskbar-ink2: var(--wx-slab-ink);
  --taskbar-line: var(--wx-slab-line);
  --taskbar-btn: transparent;
  --taskbar-btn-ink: var(--wx-slab-ink);
  --taskbar-btn-line: var(--wx-slab-line);
  --taskbar-btn-hover: var(--wx-slab-line);
  --taskbar-on: var(--wx-paper);
  --taskbar-on-ink: var(--wx-ink);
  /* the brand chip on the slab is the signal, as the system draws it */
  --taskbar-brand: var(--wx-signal);
  --taskbar-brand-ink: var(--wx-on-signal);
}

/* Both schemes are answered by the tokens themselves (ds/tokens.css switches every --wx-* value for a
   dark system). These blocks only say which scheme the page is drawn in, so form controls follow. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    /* on the night desk paper and slab are both near black: the open window turns to slab ink instead */
    --taskbar-on: var(--wx-slab-ink);
    --taskbar-on-ink: var(--wx-slab);
  }
}
