/* The site's tokens (REDESIGN_2026-11-06 §5, PHASE3_PLAN step 1): every colour, layer, radius and
   spacing step. Loaded before style.css; nothing else may write a raw colour or z-index
   (ops/site/rawcheck.py). tests/contrast.rs reads this file: text 4.5:1, control edges 3:1.
   Look B "Club", olive accent (APP_REVIEW D-AR.20-22). */
:root {
  --bg: #f1eee8;        /* the page */
  --rail: #e5e0d6;      /* side bar, rail, phone tab bar, board bar */
  --panel: #ffffff;     /* cards, panes, inputs */
  --panel2: #e8e3da;    /* wells, pane headers, segment grooves */
  --panel3: #ddd6ca;    /* plain buttons, raised */
  --hover: #e4ded4;     /* a row or plain button under the pointer */
  --line: #e3ddd2;      /* thin lines in quiet panes */
  --control: #7d7569;   /* the edge of an input, the ring of a chosen segment: 3:1 */
  --ink: #28241f;       /* text */
  --dim: #655d52;       /* secondary text */
  --accent: #5c6420;    /* main action, current move, current place, brand tile. Nothing else. */
  --on-accent: #ffffff;
  --acc-soft: #e9ebd5;  /* chosen row, open menu */
  --error: #a3322a;     /* a form problem (results are words, never red or green) */
  --good: #286c44;      /* a won result written in words */
  /* The areas (D-AR.17): Puzzles, Guess, Repertoire; their marks and tiles. */
  --pz: #d9731b; --gs: #139c8c; --rp: #7b52c4; --on-area: #ffffff;
  --pz-soft: #fbe5cf; --gs-soft: #d3efea; --rp-soft: #ebe2f8;
  /* Shadows: cards and the frame only, never inside quiet panes (REDESIGN §5). */
  --shadow: 0 1px 0 rgb(40 30 20 / 0.08), 0 2px 6px rgb(40 30 20 / 0.06);
  --shade: rgb(0 0 0 / 0.2);        /* under a floating sheet, menu or toast */
  --shade-deep: rgb(0 0 0 / 0.3);
  --scrim-soft: rgb(0 0 0 / 0.28);  /* behind a sheet */
  --scrim: rgb(0 0 0 / 0.45);       /* behind a full-page notice */
  color-scheme: light;

  /* The same in both modes. */
  --board-light: #ece4d0; --board-dark: #a88a62; /* D-ST.6 */
  /* The explorer's results bar (EXPLORER.md D-EX.6): each segment 3:1 against the one it meets,
     its text 4.5:1. */
  --wdl-white: #f4efe4; --wdl-draw: #8b857a; --wdl-black: #2b2824;
  --on-wdl-light: #1a1815; --on-wdl-dark: #ffffff;
  /* The side to move and the pieces' own colours, drawn as dots. */
  --piece-white: #f4f1ea; --piece-black: #1b1b1b;
  /* The board's arrow and square colours (the colour swatches beside them). */
  --mark-green: #15781b; --mark-red: #882020; --mark-blue: #003088; --mark-yellow: #e68f00;
  /* Game review (F13): the marks, the good and "also holds" arrows, the graph. */
  --m-in: #a87b00; --m-mi: #e07b24; --m-bl: #d0443c; --m-good: #2f9e5a; --m-also: #5b7fb0;
  --g-lo: #4a4a4a; --g-hi: #f2f2f2; --g-mid: #999999;
  /* Guess the move's marks, 3 / 2 / 1 / 0 (T-121): solid chips with white text. */
  --gm3: #1b6e3c; --gm2: #6b6a12; --gm1: #9a4f00; --gm0: #b3261e; --on-gm: #ffffff;
  /* Solid right / wrong (Mayhem): white text on them. */
  --ok-solid: #2e7d4f; --bad-solid: #b03a2e; --on-solid: #ffffff;
  /* Mixed in to deepen a colour (a main button's edge). */
  --black: #000000;

  /* Today's role names, kept so existing rules work; pages move to the names above in phase 4. */
  --surface: var(--panel); --raised: var(--panel2); --track: var(--panel2);
  --knob: var(--panel); --on-knob: var(--ink); --border: var(--line);
  --muted: var(--dim); --text: var(--ink); --strong: var(--ink);

  /* Spacing, radii, layers. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-control: 6px; --r-panel: 10px; --r-card: 14px; --r-sheet: 18px;
  /* Layers, low to high (values as before step 1, named). */
  --z-page: 1; --z-page2: 2; --z-page3: 3;
  --z-sticky: 5; --z-sticky2: 6;
  --z-bar: 10; --z-bar2: 15; --z-bar3: 20;
  --z-scrim: 29;
  --z-sheet: 30; --z-sheet2: 34; --z-sheet3: 35; --z-sheet4: 36;
  --z-toast: 40; --z-toast2: 45;
  --z-top: 60;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #302e2a; --rail: #262421; --panel: #3b3834; --panel2: #46423d; --panel3: #524d47;
    --hover: #4c4842; --line: #4a4640; --control: #9d9589;
    --ink: #f1ede7; --dim: #c6bfb4;
    --accent: #c3cc7a; --on-accent: #1c1f06; --acc-soft: #4a4d33;
    --error: #f7a59c; --good: #8fd3a8;
    --pz: #f29a45; --gs: #35c2b0; --rp: #ad8cec; --on-area: #1b1a17;
    --pz-soft: #5a3e22; --gs-soft: #1f4a44; --rp-soft: #45385e;
    --shadow: 0 1px 0 rgb(0 0 0 / 0.25), 0 3px 10px rgb(0 0 0 / 0.25);
    --knob: var(--panel3);
    --m-in: #d9a92b; --g-lo: #232220; --g-hi: #b9b7b2; --g-mid: #6d6b66;
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
    --bg: #302e2a; --rail: #262421; --panel: #3b3834; --panel2: #46423d; --panel3: #524d47;
    --hover: #4c4842; --line: #4a4640; --control: #9d9589;
    --ink: #f1ede7; --dim: #c6bfb4;
    --accent: #c3cc7a; --on-accent: #1c1f06; --acc-soft: #4a4d33;
    --error: #f7a59c; --good: #8fd3a8;
    --pz: #f29a45; --gs: #35c2b0; --rp: #ad8cec; --on-area: #1b1a17;
    --pz-soft: #5a3e22; --gs-soft: #1f4a44; --rp-soft: #45385e;
    --shadow: 0 1px 0 rgb(0 0 0 / 0.25), 0 3px 10px rgb(0 0 0 / 0.25);
    --knob: var(--panel3);
    --m-in: #d9a92b; --g-lo: #232220; --g-hi: #b9b7b2; --g-mid: #6d6b66;
    color-scheme: dark;
}
