/* Required Notice: Copyright 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
   SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 */

/* MAGMA PALETTE: the third palette, the official Magma colormap.
 *
 * It is linked by every page with the other palettes, and exactly one of them is
 * on at a time: the footer switch turns one on and the rest off, and the pin script
 * in the layout has made that choice before the first paint. The rules are
 * unlayered, so they beat the layered tokens in main.css.
 *
 * Every accent is an exact entry of the colormap matplotlib publishes
 * (lib/matplotlib/_cm_listed.py, _magma_data): #000004 is entry 0, #51127c is 64,
 * #9c2e7f is 112, #ca3e72 is 140, #fc8961 is 192 and #fcfdbf is 255. The neutrals
 * are tinted towards the colormap's purple region, hue 306, because entry 0 is
 * black and carries no hue of its own. The semantic states keep their own colours
 * in main.css: a failure is not a palette colour.
 *
 * Magma runs from black to a pale yellow, so the light scheme's gradient ends in
 * #000004 and the dark scheme's in #fcfdbf: both ends are where this scale begins
 * and finishes.
 *
 * The matching favicon lives at favicon-magma.svg in the repository root.
 */

:root {
  --bg: light-dark(oklch(98.2% 0.008 306), oklch(17% 0.02 306));
  --surface: light-dark(oklch(100% 0 0), oklch(21.5% 0.024 306));
  --surface-2: light-dark(oklch(96.2% 0.01 306), oklch(25.5% 0.028 306));
  --ink: light-dark(oklch(21% 0.03 306), oklch(94% 0.01 306));
  --ink-2: light-dark(oklch(45% 0.025 306), oklch(78% 0.02 306));
  --ink-3: light-dark(oklch(57% 0.02 306), oklch(64% 0.02 306));
  --line: light-dark(oklch(91% 0.015 306), oklch(31% 0.025 306));
  --line-strong: light-dark(oklch(83% 0.02 306), oklch(39% 0.03 306));

  --accent: light-dark(#9c2e7f, #fc8961);
  --accent-2: light-dark(#000004, #fcfdbf);
  --on-accent: light-dark(oklch(99% 0.005 306), oklch(22% 0.04 108));
}
