/* Every colour, size and space the product uses, once.
 *
 * The palette is the PRD's "night soil" (thoughts/research/2026-12-01-prd.md, Visual design):
 * a near-black board where the only bright things are the players. Every surface imports this
 * file, and no other stylesheet writes a colour of its own: a ratchet in harness.config.mjs
 * refuses a hex colour anywhere else under public/. The board's canvas reads these same
 * properties at run time (src/client/board/colours.js), so there is one source of colour.
 * ops/web-contrast.mjs measures every text and background pair the stylesheets use.
 *
 * Night soil is the only set. The dark blocks below keep the scaffold's format, so a page that
 * asks for dark gets the same values; they change nothing.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* The PRD's roles, under the names every stylesheet already uses. */
  --paper: #0f1210;   /* Background: the screen, and the gaps between cells */
  --paper-2: #181c19; /* Panel: tray, cards */
  --cell: #1a1f1b;    /* Free cell */
  --line: #2c332d;    /* Borders, dividers */
  --ink: #f2f1ea;     /* Text; also eyes and the pale outline of an exposed segment */
  --muted: #9aa39b;   /* Quiet text: labels, hints */
  --ink-2: #9aa39b;   /* The scaffold's page copy, which is quiet text */
  --danger: #ff4d6d;  /* Cells at risk and bites, and nothing else */
  --gold: #ffd166;    /* Eggs' hatch ring, rewards */
  --safe: #8fd6b0;    /* Connected, ready, locked in */
  --accent: #8fd6b0;  /* The page's links and buttons: safe */
  --accent-ink: #0f1210;
  --rock: #3b423c;    /* A dull stone on the board */
  --rock-2: #2a302b;  /* A stone's shaded underside */
  --shell: #f4ebd8;   /* An egg's shell */
  --shell-2: #d6c7aa; /* An egg's shaded underside, and its broken pieces */

  /* The players, by their colour index (game.players[p].colour). Each always comes with its
     shape: 0 circle, 1 triangle, 2 square, 3 diamond. */
  --p0: #ff7a59;      /* Coral, circle */
  --p1: #5ab0ff;      /* Sky, triangle */
  --p2: #c3e35b;      /* Lime, square */
  --p3: #b994ff;      /* Violet, diamond */

  /* Type: headings and numbers in Space Grotesk bold, everything else in Inter. Numbers that
     change use tabular figures. The smallest text in play is --size-xs, 11.5px. */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --size-xs: 0.71875rem;
  --size-0: 0.875rem;
  --size-1: 1rem;
  --size-2: 1.25rem;
  --size-3: 1.75rem;
  --size-4: 2.5rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --radius-sm: 0.375rem;
  --radius: 0.75rem;
  --radius-pill: 999px;
  --measure: 38rem;

  /* Every control is at least this tall (PRD, Accessibility). */
  --tap: 44px;
  /* The board on a desktop is at most this wide (PRD, Layouts by screen size). */
  --board-max: 720px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
}
