/*
 * Scan Desk: tokens
 * Feel: a hobby computer's built-in manual, open on a slate blue screen.
 * Muted slate pages, a powder blue tab bar where the current tab sinks into
 * the page, chunky pixel headlines over a very readable sans body, square
 * corners with stepped two-pixel borders, dithered checker dividers and one
 * big striped CRT screen per page. Accents come from a small sixteen-color
 * kit: tomato for the thing to press, mustard for the thing to notice.
 * Retro, nostalgic, a bit cheeky and properly nerdy.
 *
 * Fonts (free, Google Fonts):
 * <link href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=Jersey+15&family=VT323&display=swap" rel="stylesheet">
 */
:root {
  /* Surfaces: slate blue, never black */
  --sd-page: #343d59;
  --sd-sunk: #2a3149;
  --sd-deep: #1e2336;
  --sd-panel: #3e4868;
  --sd-panel-hi: #4a5578;
  --sd-line: #56628a;
  --sd-bezel: #181c2b;

  /* The tab bar */
  --sd-bar: #a3b6cf;
  --sd-bar-hi: #c4d2e3;
  --sd-bar-lo: #7d91ad;
  --sd-bar-ink: #2a3149;

  /* Text */
  --sd-text: #eef1f7;
  --sd-soft: #c2cadb;
  --sd-dim: #8f9ab4;

  /* Accents: a sixteen-color kit, used a few at a time */
  --sd-tomato: #e4593f;
  --sd-tomato-lo: #a83a2a;
  --sd-mustard: #f4c552;
  --sd-mustard-lo: #b88a25;
  --sd-leaf: #6cbf5c;
  --sd-aqua: #52c7cf;
  --sd-sky: #6da2ec;
  --sd-plum: #8d5fa8;
  --sd-sand: #f2dfb4;
  --sd-ok: var(--sd-leaf);
  --sd-warn: var(--sd-mustard);
  --sd-bad: var(--sd-tomato);

  /* Screen stripes (the CRT test card) */
  --sd-stripe-a: #e4593f;
  --sd-stripe-b: #f4c552;

  /* Type */
  --sd-pixel: "Jersey 15", "Silkscreen", ui-monospace, monospace;
  --sd-sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sd-term: "VT323", ui-monospace, "SF Mono", Menlo, monospace;

  --sd-text-hero: clamp(48px, 7vw, 88px);
  --sd-text-h1: clamp(40px, 5vw, 64px);
  --sd-text-h2: clamp(32px, 3.6vw, 44px);
  --sd-text-h3: 28px;
  --sd-text-lead: 19px;
  --sd-text-body: 17px;
  --sd-text-small: 15px;
  --sd-text-term: 22px;
  --sd-text-micro: 18px;

  --sd-lh-body: 1.65;
  --sd-lh-head: 1;

  /* Shape: square corners, stepped borders, no soft shadows */
  --sd-radius: 0;
  --sd-border: 2px;
  --sd-step: 0 0 0 2px var(--sd-bezel), 4px 4px 0 2px var(--sd-bezel);
  --sd-step-sm: 0 0 0 2px var(--sd-bezel), 2px 2px 0 2px var(--sd-bezel);
  --sd-inset: inset 2px 2px 0 var(--sd-bezel);
  --sd-bevel: inset 0 2px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.32);
  --sd-dither: repeating-conic-gradient(var(--sd-line) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
  --sd-dither-bar: repeating-conic-gradient(var(--sd-bar-lo) 0 25%, var(--sd-bar) 0 50%) 0 0 / 4px 4px;
  --sd-scan: repeating-linear-gradient(90deg, var(--sd-stripe-a) 0 3px, var(--sd-stripe-b) 3px 6px);
  --sd-scan-lines: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 4px);

  /* Space */
  --sd-space-1: 4px;
  --sd-space-2: 8px;
  --sd-space-3: 12px;
  --sd-space-4: 16px;
  --sd-space-5: 24px;
  --sd-space-6: 32px;
  --sd-space-7: 48px;
  --sd-space-8: 72px;
  --sd-section: 72px;
  --sd-container: 1120px;
  --sd-narrow: 720px;
  --sd-gutter: 24px;

  /* Motion: stepped, never smooth */
  --sd-tick: steps(2, end) 120ms;
}
