/*
 * The Static Dev — design tokens.
 *
 * Shared by every page of the suite (home, GitPulse, GitDash, Prettify,
 * Flatify, Diff). Dark is the default and lives on :root; html.light
 * overrides it. Values come from thestatic.dev's CLAUDE.md ("Palette
 * colori"); everything the spec doesn't cover was derived and checked
 * against WCAG AA on the background it actually renders on.
 *
 * Each tool loads this file first, then its own stylesheet, which sets at
 * least --accent (its second brand colour) and adds any tool-only tokens.
 */

:root {
  --ink: #13161C;
  --surface: #1C212B;
  /* Second surface level (tooltips, nested panels). Dark has headroom to go
     lighter, so it repeats the --ink -> --surface step once more. */
  --surface-2: #252C3A;
  --border: #2A303C;
  /* Solved for >= 3:1 (WCAG 1.4.11) against --ink, --surface and
     --surface-2, the three grounds it sits on (.btn, inputs, .tbox). */
  --border-strong: #767A83;
  --text: #E7E9EE;
  --muted: #8B93A1;

  /* The suite accent, fixed across both themes. As a fill or icon only on
     light grounds: as text on white it is 1.86:1. Use --spark-text for
     spark-coloured text. */
  --spark: #F2B33D;
  --spark-text: #F2B33D;

  /* Tool colour. Every tool overrides --accent with its own second brand
     colour; the spark fallback only keeps a page without one usable.
     --accent-fill is the solid background of .btn-p and --on-accent the
     text on it: a tool whose --accent can't carry text at 4.5:1 overrides
     these two instead of the .btn-p rule (see Prettify). */
  --accent: var(--spark);
  --accent-fill: var(--accent);
  --on-accent: #13161C;

  /* Status. Text is always on its own tint, composited over the page, and
     clears >= 4.5:1 there in both themes. */
  --danger: #f87171;
  --danger-bg: rgba(248,113,113,0.12);
  --danger-border: rgba(248,113,113,0.3);
  --ok: #4ade80;
  --ok-bg: rgba(74,222,128,0.12);
  --ok-border: rgba(74,222,128,0.3);

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --sans: var(--mono);
  --radius: 8px;
}

html.light {
  --ink: #EEF0F3;
  --surface: #FFFFFF;
  /* --surface is already pure white, so the second level steps back toward
     --ink instead of going lighter. */
  --surface-2: #F6F8F9;
  --border: #D8DCE3;
  --border-strong: #82868E;
  --text: #1A1E27;
  --muted: #5B6472;

  --spark-text: #8F610A;

  /* #dc2626 (the old value in GitPulse/Flatify/Diff) was 3.76:1 on its own
     tint; #b91c1c is 4.97:1. */
  --danger: #b91c1c;
  --danger-bg: rgba(185,28,28,0.08);
  --danger-border: rgba(185,28,28,0.25);
  --ok: #0f7234;
  --ok-bg: rgba(15,114,52,0.10);
  --ok-border: rgba(15,114,52,0.25);
}
