/*
 * The playground and the data grid are built from surefold/watershed, with colours and faces of their own.
 * On this site they take the site's: the same paper, ink, accent and IBM Plex as every other page, in light and
 * in dark. scripts/update-watershed.py links this from both pages.
 *
 * It sets the tokens those pages draw with, and only while nothing else has been chosen: the grid's Theme list
 * (data-wg-theme) and the playground's own light or dark (data-theme) still do what they say.
 */
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Regular-Latin1.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Italic-Latin1.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2"); font-weight: 500 650; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/IBMPlexSans-Bold-Latin1.woff2") format("woff2"); font-weight: 651 800; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2"); font-weight: 500 800; font-style: normal; font-display: swap; }

/* The site's faces, whatever the colours. Said twice over so that it outweighs the pages' own :root. */
:root:root {
  --display: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Light: styles.css's --bg, --surface, --band, --text, --muted, --border and --accent. */
:root:root:not([data-wg-theme]):not([data-theme="dark"]) {
  --paper: #f5f6f7; --surface: #ffffff; --band: #eceef0; --head: #eceef0; --code-bg: #eceef0;
  --ink: #15181c; --muted: #505862; --rule: #d9dde2; --still: #8a939d;
  --water: #b45309; --select: #fdf0e1;
  --rain: #23794a; --sediment: #b45309;
  --up: rgba(35, 121, 74, 0.26); --down: rgba(180, 83, 9, 0.24);
  color-scheme: light;
}

/* Dark: the same tokens as styles.css gives them in the dark. */
@media (prefers-color-scheme: dark) {
  :root:root:not([data-wg-theme]):not([data-theme="light"]) {
    --paper: #0e1012; --surface: #171a1e; --band: #131619; --head: #131619; --code-bg: #0a0c0e;
    --ink: #e6e8eb; --muted: #9aa3ad; --rule: #262b31; --still: #6f7882;
    --water: #f5b041; --select: #2e2412;
    --rain: #5bc68b; --sediment: #f5b041;
    --up: rgba(91, 198, 139, 0.3); --down: rgba(245, 176, 65, 0.28);
    color-scheme: dark;
  }
}
:root:root[data-theme="dark"]:not([data-wg-theme]) {
  --paper: #0e1012; --surface: #171a1e; --band: #131619; --head: #131619; --code-bg: #0a0c0e;
  --ink: #e6e8eb; --muted: #9aa3ad; --rule: #262b31; --still: #6f7882;
  --water: #f5b041; --select: #2e2412;
  --rain: #5bc68b; --sediment: #f5b041;
  --up: rgba(91, 198, 139, 0.3); --down: rgba(245, 176, 65, 0.28);
  color-scheme: dark;
}
