/*
 * Every colour on the site and the staff console, light and dark, plus the sun/moon button.
 * art/Theme (site/theme.js) sets <html data-theme> before the page is drawn; the media query below
 * is only for a browser that blocked that script, so it follows the device anyway.
 * --solid / --on-solid: a dark surface with light things on it (cover tiles, chips, the developer
 * banner), dark in both themes. --gold: the sun's colour where it must show on the page (a trophy). --ink on --paper is the inverse: small accents that flip with the theme.
 * Each status colour (--pass…) fills dots and borders; its -ink twin is strong enough to read as text
 * on a card, and --on-status is text on top of that twin.
 */
:root{
  --paper:#f3f4ef; --card:#ffffff; --ink:#14161f; --muted:#5d6170; --line:#d9dbd3;
  --blue:#2440f0; --on-blue:#ffffff; --sun:#ffd23f; --gold:#a87400; --bad:#c0392b;
  --solid:#14161f; --on-solid:#f3f4ef;
  --cozy:#ff8a5b; --smashy:#ff4d6d; --tense:#7a5cff; --tidy:#1fb58f;
  --pass:#1fb58f; --fail:#ff4d6d; --warn:#f0a020; --skip:#9aa0ad; --todo:#7a5cff;
  --pass-ink:#0b7a5e; --fail-ink:#c81e45; --warn-ink:#985900; --skip-ink:#5d6170; --todo-ink:#5a3ee0; --on-status:#ffffff;
  --pixel-edge:none;
  color-scheme:light;
}
:root[data-theme="dark"]{
  --paper:#101119; --card:#1a1c27; --ink:#eceef5; --muted:#a4a9bb; --line:#2f3244;
  --blue:#8a98ff; --on-blue:#0c0e17; --sun:#ffd23f; --gold:#ffd23f; --bad:#ff7b7b;
  --solid:#262a3b; --on-solid:#eceef5;
  --cozy:#ff9468; --smashy:#ff5f7c; --tense:#9580ff; --tidy:#2cc49f;
  --pass:#2cc49f; --fail:#ff6b85; --warn:#f6b23c; --skip:#8d93a3; --todo:#a592ff;
  --pass-ink:#4fdcb2; --fail-ink:#ff8fa3; --warn-ink:#ffc35c; --skip-ink:#a4a9bb; --todo-ink:#b9a9ff; --on-status:#101119;
  --pixel-edge:drop-shadow(1px 0 0 #ffffff2e) drop-shadow(-1px 0 0 #ffffff2e) drop-shadow(0 1px 0 #ffffff2e) drop-shadow(0 -1px 0 #ffffff2e);
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){:root:not([data-theme]){
  --paper:#101119; --card:#1a1c27; --ink:#eceef5; --muted:#a4a9bb; --line:#2f3244;
  --blue:#8a98ff; --on-blue:#0c0e17; --gold:#ffd23f; --bad:#ff7b7b; --solid:#262a3b; --on-solid:#eceef5;
  --cozy:#ff9468; --smashy:#ff5f7c; --tense:#9580ff; --tidy:#2cc49f;
  --pass:#2cc49f; --fail:#ff6b85; --warn:#f6b23c; --skip:#8d93a3; --todo:#a592ff;
  --pass-ink:#4fdcb2; --fail-ink:#ff8fa3; --warn-ink:#ffc35c; --skip-ink:#a4a9bb; --todo-ink:#b9a9ff; --on-status:#101119;
  --pixel-edge:drop-shadow(1px 0 0 #ffffff2e) drop-shadow(-1px 0 0 #ffffff2e) drop-shadow(0 1px 0 #ffffff2e) drop-shadow(0 -1px 0 #ffffff2e);
  color-scheme:dark}}

/* Pixel art keeps its dark outline; on a dark page a faint light edge keeps the shape readable. */
.avatar,.badge-art,.achievement-art{filter:var(--pixel-edge)}

/* The sun/moon button: the moon while light (press for dark), the sun while dark. */
.theme-toggle{border:0;background:none;color:var(--muted);padding:7px;border-radius:999px;display:inline-grid;place-items:center}
.theme-toggle:hover{color:var(--ink);background:var(--line)}
.theme-toggle svg.i{width:20px;height:20px}
.theme-toggle .i-sun,:root[data-theme="dark"] .theme-toggle .i-moon{display:none}
:root[data-theme="dark"] .theme-toggle .i-sun{display:block}
