/*
 * Design tokens of the Imperivm Modding Wiki, shared by every renderer (Starlight pages and the CKS reference).
 * Adapted from imperivm-resurrected-web, src/css/styles.css, commit 66183a904ce7
 * (MIT, (c) 2026 Saúl Rodríguez; see THIRD-PARTY-NOTICES.md). The upstream red accent is replaced by lapis lazuli.
 *
 * The theme is chosen by data-theme="light|dark" on <html>, set before first paint from the stored choice or the
 * system preference. Without that attribute, the system preference applies.
 * tools/check_contrast.py verifies the text/background pairs below; keep it in step when a colour changes.
 */
:root {
  --header-height: 4.25rem;
  --motion-fast: .16s;
  --motion: .35s;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --margin: clamp(16px, 4.1vw, 66px);
  --f-headline: "League Gothic", "Archivo Narrow", "Arial Narrow", Impact, sans-serif;
  --f-text: "Archivo Variable", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --on-accent: #ffffff;
  --pre-background: #16161a;
  --pre-ink: #ecebe6;
  --pre-type: #9db9f5;

  /* Dark theme (default when no light preference is known). */
  color-scheme: dark;
  --paper: #121110;
  --ink: #f1eee8;
  --ink-soft: #d8d5cf;
  --line: #8f8b84;
  --gray: #bdb9b1;
  --gray-2: #9a968f;
  --hairline: #34322f;
  --mid: #4a4743;
  --code: #262421;
  --box: #1c1a18;
  --accent: #2353b5;
  --accent-hover: #2f5fc4;
  --accent-text: #9db9f5;
  --accent-text-hover: #c3d4fa;
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --line: #3a3a3a;
  --gray: #444444;
  --gray-2: #5f5f5f;
  --hairline: #d6d4cd;
  --mid: #bdbbb4;
  --code: #ecebe6;
  --box: #f1efe9;
  --accent: #2353b5;
  --accent-hover: #173e8c;
  --accent-text: #2353b5;
  --accent-text-hover: #173e8c;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --paper: #faf9f6;
    --ink: #0a0a0a;
    --ink-soft: #2a2a2a;
    --line: #3a3a3a;
    --gray: #444444;
    --gray-2: #5f5f5f;
    --hairline: #d6d4cd;
    --mid: #bdbbb4;
    --code: #ecebe6;
    --box: #f1efe9;
    --accent: #2353b5;
    --accent-hover: #173e8c;
    --accent-text: #2353b5;
    --accent-text-hover: #173e8c;
  }
}
