/*
 * erXos color and face tokens, shared by every page of the site: the
 * landing page, the release notes and the book. One ink, one paper, one
 * signal colour; dark mode follows prefers-color-scheme.
 */

:root {
  --paper: #efede6;
  --panel: #f7f6f1;
  --ink: #121211;
  --muted: #55534d;
  --rule: #121211;
  --hair: #c9c6bc;
  --signal: #e2471a;
  --signal-dim: #e9d9cf;
  --led-off: #d9d5ca;
  --code-bg: #121211;
  --code-ink: #e9e6dd;
  --code-dim: #8f8b80;
  --code-prompt: #ff6a3d;

  /* The console's case: see Terminal below. */
  --case: #d8d3c4;
  --case-hi: #ebe7da;
  --case-lo: #b9b3a2;
  --case-edge: #a49d8a;
  --case-shadow: rgba(0, 0, 0, 0.18);
  --plate-ink: #3b3a35;
  --case-text: #23221f;
  --case-muted: #55534d;
  --case-alert: #9a2d0b;
  --lamp-off: #9e9886;
  --progress-groove: #f1eee6;
  --glass: #1b1b19;
  --glass-rim: #0c0c0b;
  --key: #ece8dc;
  --key-ink: #121211;
  --key-edge: #9d9784;
  --key-go-ink: #121211;
  --key-go-edge: #9e3010;
  --key-crash-ink: #9a2d0b;
  --grille: #c7c1b0;
  --grille-slot: #b3ad9b;

  --sans: "Archivo", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --gutter: 16px;
  --max: 1180px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f0f0e;
    --panel: #161614;
    --ink: #ece9e1;
    --muted: #a19d92;
    --rule: #ece9e1;
    --hair: #34322e;
    --signal: #ff5a2a;
    --signal-dim: #3a1f15;
    --led-off: #262522;
    --code-bg: #050505;
    --code-ink: #e9e6dd;
    --code-dim: #858176;
    --case: #3a3935;
    --case-hi: #4a4944;
    --case-lo: #2a2926;
    --case-edge: #1f1e1c;
    --case-shadow: rgba(0, 0, 0, 0.5);
    --plate-ink: #d6d2c6;
    --case-text: #ece9e1;
    --case-muted: #b3aea2;
    --case-alert: #ff8a65;
    --lamp-off: #23221f;
    --progress-groove: #23221f;
    --glass: #121211;
    --glass-rim: #050505;
    --key: #55534d;
    --key-ink: #ece9e1;
    --key-edge: #23221f;
    --key-go-ink: #121211;
    --key-go-edge: #9e3010;
    --key-crash-ink: #ffc2ad;
    --grille: #34332f;
    --grille-slot: #262522;
  }
}

:root[data-theme="dark"] {
  --paper: #0f0f0e;
  --panel: #161614;
  --ink: #ece9e1;
  --muted: #a19d92;
  --rule: #ece9e1;
  --hair: #34322e;
  --signal: #ff5a2a;
  --signal-dim: #3a1f15;
  --led-off: #262522;
  --code-bg: #050505;
  --code-ink: #e9e6dd;
  --code-dim: #858176;
  --case: #3a3935;
  --case-hi: #4a4944;
  --case-lo: #2a2926;
  --case-edge: #1f1e1c;
  --case-shadow: rgba(0, 0, 0, 0.5);
  --plate-ink: #d6d2c6;
  --case-text: #ece9e1;
  --case-muted: #b3aea2;
  --case-alert: #ff8a65;
  --lamp-off: #23221f;
  --progress-groove: #23221f;
  --glass: #121211;
  --glass-rim: #050505;
  --key: #55534d;
  --key-ink: #ece9e1;
  --key-edge: #23221f;
  --key-go-ink: #121211;
  --key-go-edge: #9e3010;
  --key-crash-ink: #ffc2ad;
  --grille: #34332f;
  --grille-slot: #262522;
}
