/* Every colour, size and space the product uses, once, with a dark set.
 *
 * Every surface imports this file, and no other stylesheet or script writes a colour of its
 * own: ratchets in harness.config.mjs refuse a hex colour anywhere else under public/ or
 * src/client/. ops/web-contrast.mjs measures every text and background pair the stylesheets use,
 * in both sets.
 *
 * The look: Honkblocker's garden. A warm paper ground and a deep ink by day, a slate night by
 * night; a mown lawn in a hedge, wooden fences, ponds for goals, and four geese told apart by
 * colour and by hat (D22), so nobody is told apart by colour alone. The display face is Fredoka
 * (public/fonts/, under the SIL Open Font License in OFL.txt beside it); body text stays in the
 * system face, which reads best small.
 */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fredoka-latin.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: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  /* The ground, a raised surface (a button, a card, a panel), and a sunken one. */
  --paper: #f7f2e8;
  --paper-2: #ffffff;
  --paper-3: #efe6d4;
  --ink: #1d2230;
  --ink-2: #3a4152;
  --muted: #5a6274;
  --line: #e0d5bf;
  /* The one edge every control and panel shares, and its hard shadow. */
  --edge: #1d2230;
  --edge-shadow: #1d2230;
  --accent: #2b5fd9;
  --accent-ink: #ffffff;
  --danger: #b8232a;
  --focus: #0a6cff;
  --warn: #9a4a00;
  --good: #1b7a43;

  /* The board: its frame and grooves, its squares, the wood of a golden square and the hill's
     flag, a placed wall's field stones, and the ghost of one being placed, legal or not. */
  --board: #4f8a34;
  --board-edge: #386524;
  --square: #b6dd7f;
  --square-ink: #386524;
  --wall: #c98b4f;
  --wall-edge: #5e3812;
  --stone: #c4bfb5;
  --stone-2: #a8a39a;
  --stone-3: #d6d1c6;
  --stone-edge: #4a463f;
  --ghost-ok: #fff8e6;
  --ghost-bad: #e5484d;

  /* The garden: the second stripe of the mown lawn, a pond for the centre and the glint on a
     goal's, the beak and feet, a goose's cheek, blush and eye, a hat, the dust a fence kicks up, a
     sulk's cloud and its rain, the cost of a wall floating up, and the edge of a ghost fence that
     may go down. */
  --square-2: #a8d26e;
  --pond: #6cc4ee;
  --pond-edge: #2f86b5;
  --pond-glint: #ffffff;
  --beak: #f6a024;
  --goose-cheek: #ffffff;
  --goose-blush: #ff8fa0;
  --goose-eye: #1d2230;
  --hat: #fff4dc;
  --dust: #e6d6ad;
  --cloud: #98a1b3;
  --rain: #3f86d6;
  --float: #c0262d;
  /* The swan and the mower (T6, T7 of thoughts/shipped/2026-10-25-swan-mower-timer.md): its white,
     its beak and the black knob on it, a furious brow; the mower's paint, its blades, and the lane
     it is coming down. */
  --swan: #ffffff;
  --swan-edge: #1d2230;
  --swan-beak: #f26a1b;
  --swan-knob: #1d2230;
  --mower: #d8352a;
  --mower-edge: #5a1410;
  --blade: #c4c9d1;
  --mow-lane: #fff3c4;
  --ghost-ok-edge: #1d2230;

  /* The four pawns, in turn order, and what is drawn on them. */
  --pawn-1: #ec5b3f;
  --pawn-2: #2d7fe0;
  --pawn-3: #f2c230;
  --pawn-4: #8a5ce8;
  /* Players 5 to 8, for six and eight. */
  --pawn-5: #d6449a;
  --pawn-6: #9a6a3a;
  --pawn-7: #149aa8;
  --pawn-8: #7d8f1f;
  /* A team game's geese: warm shades for the first team and cool for the second, first to fourth
     in each (P3 of thoughts/plans/2026-10-26-player-cards.md, public/play.css). */
  --team-warm-1: #e5482c;
  --team-warm-2: #f2952a;
  --team-warm-3: #f2c230;
  --team-warm-4: #d6449a;
  --team-cool-1: #2a6fd6;
  --team-cool-2: #149aa8;
  --team-cool-3: #8a5ce8;
  --team-cool-4: #23408f;
  --pawn-ink: #ffffff;
  --pawn-edge: #1d2230;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --size-0: 0.875rem;
  --size-1: 1rem;
  --size-2: 1.25rem;
  --size-3: 1.75rem;
  --size-4: clamp(2rem, 10vw, 2.5rem);
  --size-5: clamp(2.5rem, 13vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;

  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  --edge-1: 3px;
  --edge-2: 2px;

  --shadow: 0 4px 0 var(--edge-shadow);
  --shadow-pressed: 0 1px 0 var(--edge-shadow);
  --shadow-panel: 0 3px 0 var(--line);

  --press: 3px;

  --measure: 38rem;
  /* The smallest thing a finger is asked to hit. */
  --tap: 3rem;
  /* How long a goose takes to hop a square, and to jump; how long a fence takes to drop in.
     Reduced motion makes them 0. */
  --glide: 240ms;
  --jump: 380ms;
  --drop: 280ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14171f;
    --paper-2: #1f2430;
    --paper-3: #272d3b;
    --ink: #f2efe8;
    --ink-2: #d4cfc5;
    --muted: #aaa598;
    --line: #343b4b;
    --edge: #8b93a7;
    --edge-shadow: #05070a;
    --accent: #8fb0ff;
    --accent-ink: #0d1630;
    --danger: #ff8f8f;
    --focus: #7cc4ff;
    --warn: #ffb057;
    --good: #74dc92;
    --board: #14281a;
    --board-edge: #08140b;
    --square: #2f4f2b;
    --square-ink: #a9cf9a;
    --wall: #b07a43;
    --wall-edge: #2e1b08;
    --stone: #a59f94;
    --stone-2: #8f8a80;
    --stone-3: #b8b2a7;
    --stone-edge: #1f1d1a;
    --ghost-ok: #f2ecd8;
    --ghost-bad: #ff6b6b;
    --square-2: #2a4827;
    --pond: #2d7fae;
    --pond-edge: #8fd3f5;
    --pond-glint: #ffffff;
    --beak: #f0a030;
    --goose-cheek: #f4f1ea;
    --goose-blush: #ff9aa8;
    --goose-eye: #10131a;
    --hat: #f0e6cf;
    --dust: #8f8466;
    --cloud: #6b7385;
    --rain: #7fb4f0;
    --float: #ff8f8f;
    --swan: #f1f1ee;
    --swan-edge: #0c0e14;
    --swan-beak: #ff7a2e;
    --swan-knob: #0c0e14;
    --mower: #ff5a4a;
    --mower-edge: #3a0b08;
    --blade: #9aa1ab;
    --mow-lane: #fff0b0;
    --ghost-ok-edge: #f2ecd8;
    --pawn-1: #ff7a5c;
    --pawn-2: #5aa6ff;
    --pawn-3: #ffd34d;
    --pawn-4: #a985ff;
    --pawn-5: #ff6ec4;
    --pawn-6: #c99560;
    --pawn-7: #2fc6d4;
    --pawn-8: #a8bd3a;
    --team-warm-1: #ff7a5c;
    --team-warm-2: #ffab4d;
    --team-warm-3: #ffd34d;
    --team-warm-4: #ff6ec4;
    --team-cool-1: #5aa6ff;
    --team-cool-2: #2fc6d4;
    --team-cool-3: #a985ff;
    --team-cool-4: #8fa6ff;
    --pawn-ink: #ffffff;
    --pawn-edge: #05070a;
  }
}

:root[data-theme="dark"] {
  --paper: #14171f;
  --paper-2: #1f2430;
  --paper-3: #272d3b;
  --ink: #f2efe8;
  --ink-2: #d4cfc5;
  --muted: #aaa598;
  --line: #343b4b;
  --edge: #8b93a7;
  --edge-shadow: #05070a;
  --accent: #8fb0ff;
  --accent-ink: #0d1630;
  --danger: #ff8f8f;
  --focus: #7cc4ff;
  --warn: #ffb057;
  --good: #74dc92;
  --board: #14281a;
  --board-edge: #08140b;
  --square: #2f4f2b;
  --square-ink: #a9cf9a;
  --wall: #b07a43;
  --wall-edge: #2e1b08;
  --stone: #a59f94;
  --stone-2: #8f8a80;
  --stone-3: #b8b2a7;
  --stone-edge: #1f1d1a;
  --ghost-ok: #f2ecd8;
  --ghost-bad: #ff6b6b;
  --square-2: #2a4827;
  --pond: #2d7fae;
  --pond-edge: #8fd3f5;
  --pond-glint: #ffffff;
  --beak: #f0a030;
  --goose-cheek: #f4f1ea;
  --goose-blush: #ff9aa8;
  --goose-eye: #10131a;
  --hat: #f0e6cf;
  --dust: #8f8466;
  --cloud: #6b7385;
  --rain: #7fb4f0;
  --float: #ff8f8f;
  --swan: #f1f1ee;
  --swan-edge: #0c0e14;
  --swan-beak: #ff7a2e;
  --swan-knob: #0c0e14;
  --mower: #ff5a4a;
  --mower-edge: #3a0b08;
  --blade: #9aa1ab;
  --mow-lane: #fff0b0;
  --ghost-ok-edge: #f2ecd8;
  --pawn-1: #ff7a5c;
  --pawn-2: #5aa6ff;
  --pawn-3: #ffd34d;
  --pawn-4: #a985ff;
  --pawn-5: #ff6ec4;
  --pawn-6: #c99560;
  --pawn-7: #2fc6d4;
  --pawn-8: #a8bd3a;
  --team-warm-1: #ff7a5c;
  --team-warm-2: #ffab4d;
  --team-warm-3: #ffd34d;
  --team-warm-4: #ff6ec4;
  --team-cool-1: #5aa6ff;
  --team-cool-2: #2fc6d4;
  --team-cool-3: #a985ff;
  --team-cool-4: #8fa6ff;
  --pawn-ink: #ffffff;
  --pawn-edge: #05070a;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --glide: 0ms;
    --jump: 0ms;
    --drop: 0ms;
  }
}
