/* Design tokens: fonts and colours for the whole site, simulation canvases included (they read these at runtime).
   Change a hex value here and everything recolours. Keep colour tokens as 6-digit hex (#rrggbb): the canvas code
   parses them that way, and a content test checks it.
   Dark is the default for every visitor (graphite, teal-to-rose scattering, gold electrons), whatever their system
   prefers. Light is the vortex-lattice palette (cool paper, slate electrons, steel-blue to copper scattering, copper
   accent), used when chosen with the toggle and for printing: it appears twice below. Edit both. */

/* ---------- Self-hosted fonts (OFL, see ../fonts/OFL-*.txt), Latin and Latin Extended subsets ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/public-sans-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/public-sans-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/martian-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/martian-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Metric-matched fallbacks: common system fonts scaled to the web fonts' average widths, so text wraps the same
   before and after the web fonts arrive (no layout shift while they load). Invisible once the fonts have loaded.
   Martian Mono advances 0.70 em per character, these monospace fonts 0.60 em; Public Sans prose is 6.2% wider than Arial. */
@font-face {
  font-family: "Martian Mono fallback";
  src: local("Menlo"), local("Courier New"), local("DejaVu Sans Mono"), local("Liberation Mono"), local("Droid Sans Mono"), local("Roboto Mono");
  size-adjust: 116.67%;
}
@font-face {
  font-family: "Public Sans fallback";
  font-weight: 100 500;
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Roboto");
  size-adjust: 106.2%;
}
@font-face {
  font-family: "Public Sans fallback";
  font-weight: 600 900;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Roboto Bold");
  size-adjust: 106.2%;
}

/* ---------- Dark (default) ---------- */
:root {
  --ground: #0d0f14;       /* page background */
  --ground-2: #151821;     /* raised surfaces: research band, cards, glass cards */
  --ink: #ecebe6;          /* primary text */
  --ink-2: #9b9ea8;        /* secondary text, axis labels */
  --rule: #262a36;         /* borders, dividers, grid lines */
  --accent: #f0b44c;       /* buttons, eyebrows, focus ring, field arrow, collision rings */
  --electron: #f0b44c;     /* electrons, trails, real-space path */
  --cold: #6fcfc3;         /* low (nodal) scattering rate */
  --hot: #ec6a8c;          /* high (antinodal) scattering rate */
  --box: #4a5060;          /* zone box and kz axis */
  --trail-blend: lighter;  /* canvas composite mode for trails and heads */

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", "Public Sans fallback", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono: "Martian Mono", "Martian Mono fallback", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- Light: printing (theme.js also switches to light for printing after choosing dark) ---------- */
@media print {
  :root:not([data-theme="dark"]) {
    --ground: #f3f6f6;
    --ground-2: #ffffff;
    --ink: #0f1c23;
    --ink-2: #3e505a;
    --rule: #c9d5d9;
    --accent: #8c2b05;
    --electron: #133241;
    --cold: #0b6a9e;
    --hot: #c2511d;
    --box: #9fb2b8;
    --trail-blend: source-over;
    color-scheme: light;
  }
}

/* ---------- Light: chosen with the toggle (same values as above) ---------- */
:root[data-theme="light"] {
  --ground: #f3f6f6;
  --ground-2: #ffffff;
  --ink: #0f1c23;
  --ink-2: #3e505a;
  --rule: #c9d5d9;
  --accent: #8c2b05;
  --electron: #133241;
  --cold: #0b6a9e;
  --hot: #c2511d;
  --box: #9fb2b8;
  --trail-blend: source-over;
  color-scheme: light;
}
