/* Syntax palette for every code surface on the site: static blocks, stdlib
 * signature cards, and the playground/REPL editors. Colors come from base16
 * variables so one scheme themes them all; a scheme stylesheet under
 * css/base16/ supplies the variables and js/switcher.js swaps it at runtime.
 * These rules map the tok-* token classes — assigned from the tree-sitter
 * highlight queries' capture names, at build time by docs/go/highlight.go
 * and in the browser editors by docs/js/playground.js — onto the base16
 * slots, following the base16 styling guide: 0E keywords, 0A types, 0D
 * functions, 0C support/builtins, 0B strings, 09 constants, 08
 * variables/tags/properties, 03 comments.
 *
 * The :root blocks are the no-JS fallback schemes — Rosé Pine Moon, with
 * Rosé Pine Dawn under prefers-color-scheme:light. The switcher's stylesheet
 * loads after this one, so once a scheme is active its :root wins over
 * both. */

:root {
  --base00: #232136;
  --base01: #2a273f;
  --base02: #393552;
  --base03: #59546d;
  --base04: #817c9c;
  --base05: #e0def4;
  --base06: #f5f5f7;
  --base07: #d9d7e1;
  --base08: #eb6f92;
  --base09: #f6c177;
  --base0A: #f6c177;
  --base0B: #3e8fb0;
  --base0C: #ea9a97;
  --base0D: #9ccfd8;
  --base0E: #c4a7e7;
  --base0F: #b9b9bc;
}

@media (prefers-color-scheme: light) {
  :root {
    --base00: #faf4ed;
    --base01: #fffaf3;
    --base02: #f2e9de;
    --base03: #9893a5;
    --base04: #6e6a86;
    --base05: #575279;
    --base06: #555169;
    --base07: #26233a;
    --base08: #b4637a;
    --base09: #ea9d34;
    --base0A: #ea9d34;
    --base0B: #286983;
    --base0C: #d7827e;
    --base0D: #56949f;
    --base0E: #907aa9;
    --base0F: #c5c3ce;
  }
}

/* the wrapper around every highlighted (or plain) code surface */
.syntax { color: var(--base05); background-color: var(--base00); -webkit-text-size-adjust: none; }

/* keywords */
.tok-keyword { color: var(--base0E); }
/* types (every capitalized type name) */
.tok-type { color: var(--base0A); }
/* constant literals: true/false/null and numbers */
.tok-number { color: var(--base09); }
/* functions and methods */
.tok-function { color: var(--base0D); }
/* builtins (assert, print, ...) read as support functions */
.tok-builtin { color: var(--base0C); }
/* self */
.tok-self { color: var(--base08); }
/* directives (@deprecated) */
.tok-directive { color: var(--base0F); }
/* language tags on multiline templates, markup tags */
.tok-label { color: var(--base08); }
/* argument/key names (and toml keys, shell variables) */
.tok-property { color: var(--base08); }
/* strings (and docstrings) */
.tok-string { color: var(--base0B); }
/* string escapes */
.tok-escape { color: var(--base0C); }
/* operators */
.tok-operator { color: var(--base0E); }
/* comments */
.tok-comment { color: var(--base03); font-style: italic; }
/* variables and punctuation stay at the default foreground */
.tok-variable, .tok-punct { color: var(--base05); }
