/* Mycelium / Ariadne design tokens.
 *
 * The only stylesheet with literal colors; everything else uses var(--*).
 * (sigil.svg carries the dark values so it works standalone.)
 * Dark ("lamplight") is the native theme: warm umber, lit like her portrait.
 * Light ("paper") is for print and bright rooms. Both blocks list the same
 * tokens in the same order. tests/test_brand.py enforces WCAG contrast.
 */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300..700&family=Geist+Mono:wght@400..600&family=EB+Garamond:ital,wght@0,400..700;1,400..600&display=swap");

:root {
  color-scheme: dark;

  /* Surfaces: warm dark, never blue-black */
  --void: #0e0c0a;            /* page background */
  --substrate: #13110e;       /* recessed wells, canvas */
  --surface: #181512;         /* panels */
  --surface-raised: #221e19;  /* hover, popovers */
  --hairline: #332d26;        /* borders, rules, grid lines */

  /* Ink: text on any surface above (text pairs >= 4.5:1) */
  --ink: #f1ebe1;             /* primary text */
  --ink-2: #c4baaa;           /* secondary text */
  --ink-3: #9d9282;           /* muted text, captions */

  /* Signal: meaning-bearing color (graphic pairs >= 3:1, also used as text) */
  --thread: #e9c27a;          /* Ariadne's thread: the chosen path, rules in force */
  --thread-glow: #e9c27a40;   /* thread halo (25% alpha) */
  --hypha: #7cc9b3;           /* the network itself: structure, links, focus */
  --hypha-dim: #7cc9b31f;     /* faint filaments (12% alpha) */
  --tension: #f27a95;         /* a conflict the engine resolved by suspending a rule */
  --contested: #b7a8f2;       /* equal-weight ambiguity: needs a human precedence call */
  --tolerated: #eba35c;       /* a conflict left standing: weights need review */
  --yields: #6f665a;          /* a suspended rule (graphic only, never text) */

  /* Type: set like a journal in Garamond; sans only where tables and controls need it; mono is machine output */
  --font-serif: "EB Garamond", "Iowan Old Style", Garamond, Georgia, serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Shape and motion: print has no rounded corners; rules over boxes */
  --radius: 0px;
  --radius-sm: 0px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --void: #f5f0e7;
    --substrate: #ece5d8;
    --surface: #faf7f1;
    --surface-raised: #ffffff;
    --hairline: #d9d0bf;
    --ink: #1a1612;
    --ink-2: #474036;
    --ink-3: #685f53;
    --thread: #83540a;
    --thread-glow: #b9791a2e;
    --hypha: #1d6a5a;
    --hypha-dim: #1d6a5a1a;
    --tension: #b3204f;
    --contested: #5a43c4;
    --tolerated: #8f4e0c;
    --yields: #9a9185;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --void: #f5f0e7;
  --substrate: #ece5d8;
  --surface: #faf7f1;
  --surface-raised: #ffffff;
  --hairline: #d9d0bf;
  --ink: #1a1612;
  --ink-2: #474036;
  --ink-3: #685f53;
  --thread: #83540a;
  --thread-glow: #b9791a2e;
  --hypha: #1d6a5a;
  --hypha-dim: #1d6a5a1a;
  --tension: #b3204f;
  --contested: #5a43c4;
  --tolerated: #8f4e0c;
  --yields: #9a9185;
}
