/* Fonts and tokens. docs/DESIGN.md explains each token; values change here, never in the rules that use them.
   JavaScript reads the few it needs (grain, motion) through js/tokens.js. */
@font-face{font-family:"Courier Prime";src:url("../fonts/CourierPrime-Regular.ttf") format("truetype");font-display:swap;font-weight:400}
/* Cyrillic: Courier Prime 3.018 has none; a build with Cyrillic covers only those letters. */
@font-face{font-family:"Courier Prime";src:url("../fonts/CourierPrime-Cyrillic-Regular.ttf") format("truetype");font-display:swap;font-weight:400;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

:root{
  /* Light only, everywhere: also asks phone browsers not to force a dark version. */
  color-scheme:only light;

  /* Colour: black ink on white paper, no accent colour. */
  --paper:#fff;--ink:#111;--ink-secondary:#525252;--danger:#a33;
  --line:rgba(17,17,17,.2);--line-soft:rgba(17,17,17,.14);--line-faint:rgba(17,17,17,.1);--tint-hover:rgba(17,17,17,.06);
  --surface-veil:rgba(255,255,255,.42);--surface-glass:rgba(255,255,255,.55);--blur-glass:3px;--blur-enter:4px;

  /* The grain: one particle on both canvases. Each frame the canvas is washed with the trail colour,
     so a moving grain leaves a short fading trace. */
  --grain-size:1.35px;--grain-ink:rgba(17,17,17,.85);--grain-trail:rgba(255,255,255,.55);

  /* Type: one typewriter family for words, one mono family for small system text. */
  --font-ui:"Courier Prime",Consolas,"Nirmala UI",monospace;
  --font-mono:Consolas,"Cascadia Mono","Nirmala UI",monospace;
  --type-title:clamp(22px,1.2rem + 1vw,30px);--type-label:16px;--type-control:14px;--type-intro:12px;--type-caption:12px;--type-micro:11px;
  --leading-tight:1.3;--leading-ui:1.4;--leading-text:1.5;
  --track-intro:.32em;--track-data:.1em;--track-name:.04em;

  /* Space: a 4px grid. */
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;

  /* Controls and icons. */
  --control-size:44px;--icon-size:20px;--icon-stroke:1.5;--hairline:1px;--focus-ring:1px dashed var(--ink-secondary);

  /* Motion: fades and short rises; transform and opacity only.
     --dur-exit is the particles' flight off the screen and back (screens/router.js, particles/plate.js). */
  --dur-fast:.2s;--dur-ui:.3s;--dur-slow:1.1s;--dur-pop:1.8s;--dur-exit:1.8s;--ease-pop:cubic-bezier(.22,.61,.36,1);

  /* Layers. */
  --z-sheet:5;--z-tools:6;

  /* Page frame: the margin of every page; the language and sound tools and "Back" sit on it. */
  --page-pad:var(--space-6);

  /* Work screen: the gap between cards (the lattice of grains runs down its middle) and inside a card. */
  --work-gap:var(--space-8);--card-gap:var(--space-3);

  /* Project page: the square cover and the gap of its frame; the width of the text; the width of a
     collection's shelf (4 units of 216px at --work-gap). */
  --plate-max:320px;--plate-frame:var(--space-2);--case-max:640px;--shelf-max:960px;

  background:var(--paper);color:var(--ink);font-synthesis:none;
}
/* Small phones: a tighter frame. */
@media (max-width:480px){:root{--page-pad:var(--space-4);--work-gap:var(--space-4)}}
