/* AWOW v2.1 tokens. Canonical source: awowIO/mono context/design-system/style-guide.html. */
:root {
  /* -- surfaces · cold, never warm ------------------------------------- */
  color-scheme:light;   /* paper is the default ground, ALWAYS. See §3. */
  --paper:#ffffff;      /* page and inner surfaces */
  --paper-2:#fafafa;    /* quiet bands, table heads. Neutral, NOT #f8f8f6 */
  --paper-3:#f2f2f4;    /* third surface, sunken */

  /* -- ink ramp · every step clears 4.5:1 on every surface --------------- */
  --ink:#0a0a0b;        /* primary text, solid buttons, heavy rules */
  --ink-2:#57575e;      /* secondary text · 6.87:1 on paper-2 */
  --ink-3:#6b6b75;      /* tertiary, captions, micro-labels · 5.05:1 on paper-2 */

  /* -- rules ------------------------------------------------------------ */
  --line:#e4e4e8;       /* hairline separation */
  --line-2:#c9c9d0;     /* container borders */

  /* -- accent · FIELD ONLY on paper. Never text, never a line, never a
        small mark. On the dark ground this INVERTS — see §3. ------------- */
  --yl:#ffd400;         /* 1.43:1 on paper · 13.8:1 on ink */
  --yl-deep:#e8a900;    /* only for a mark ON a dark ground */

  /* -- the yellow field, expressed as tokens so one markup serves both
        grounds. Paper values here; the dark block overrides all seven. --- */
  --field-bg:var(--yl);
  --field-accent:var(--ink);   /* headings and numerals on the field */
  --field-body:#3b3209;        /* 8.91:1 on yellow */
  --field-mute:#5d4f07;        /* micro-labels · 5.67:1 on yellow */
  --field-rule:transparent;
  --field-border:var(--ink);
  --field-chip-bg:var(--ink); --field-chip-ink:var(--yl);

  /* -- semantic · used sparingly, always with a label --------------------- */
  --up:#166534;   --up-wash:#eef5f0;
  --warn:#9a6b2f; --warn-wash:#f8f3e9;
  --ref:#3f6a8a;  --ref-wash:#eef3f7;
  --no:#9f1239;

  /* -- type ------------------------------------------------------------- */
  --font:'Archivo',system-ui,-apple-system,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,monospace;

  /* -- spacing ---------------------------------------------------------- */
  --sp-1:4px;  --sp-2:8px;  --sp-3:12px; --sp-4:16px; --sp-5:24px;
  --sp-6:32px; --sp-7:48px; --sp-8:70px; --sp-9:96px;

  /* -- grid ------------------------------------------------------------- */
  --cols:12; --gutter:24px; --margin:46px; --page-width:1500px;
  --doc-width:760px;

  /* -- radius · near zero. Instruments do not have rounded corners ------- */
  --radius:0px;
  --radius-tile:14px;   /* app icon / avatar only */
}

/* ============================================================================
   THE DARK GROUND · v2.1
   Reached ONLY by the toggle. There is deliberately no prefers-color-scheme
   rule anywhere in this system: a reader never lands on dark without asking.
   The accent inverts here — see §3 for why that is arithmetic, not taste.
   ============================================================================ */
:root[data-theme="dark"] {
  color-scheme:dark;
  --paper:#0a0a0b;  --paper-2:#141417;  --paper-3:#1c1c22;
  --ink:#f5f5f7;    --ink-2:#a8a8b2;    --ink-3:#90909b;  /* ink-3 5.82:1 on paper-2 */
  --line:#26262c;   --line-2:#3d3d46;

  /* THE INVERSION. Yellow is 13.8:1 on near-black — it carries text cleanly,
     so here it must NOT be a fill. The field becomes a quiet plate with a
     yellow rule, a yellow heading and yellow numerals. Nothing glows. */
  --field-bg:var(--paper-2);
  --field-accent:var(--yl);
  --field-body:var(--ink-2);
  --field-mute:var(--ink-3);
  --field-rule:var(--yl);
  --field-border:var(--line-2);
  --field-chip-bg:var(--ink); --field-chip-ink:var(--paper);

  --up:#5fd08a;   --up-wash:#12291c;
  --warn:#e2b264; --warn-wash:#2a2113;
  --ref:#8ab4d8;  --ref-wash:#12202b;
  --no:#fb7185;
}

html{-webkit-font-smoothing:antialiased} [hidden]{display:none!important}
.awow-mark{display:block;width:32px;height:32px}.awow-mark.dark{display:none}
:root[data-theme="dark"] .awow-mark.light{display:none}:root[data-theme="dark"] .awow-mark.dark{display:block}
#theme-toggle{font:11px var(--mono);letter-spacing:.06em;text-transform:uppercase;min-height:44px;background:transparent;color:var(--ink);border:1px solid var(--line-2);padding:8px 12px;cursor:pointer}
.awow-links{display:flex;gap:16px;align-items:center;flex-wrap:wrap;font:11px var(--mono);color:var(--ink-2)}
.awow-links a{text-underline-offset:4px}.awow-links a:hover{color:var(--ink)}
