/* hub_core/ui_shared/static/tokens.css
 *
 * Retracted in place (TENANCY-SPEC.md P7, §9 row P7, §6.1 SPEC-DECISION,
 * 2026-09-25) -- this file's own header used to read "frontend_flask/
 * static/tokens.css". `git mv`'d here so the hub, farm_app and buy_app can
 * all serve the SAME design tokens from one blueprint (`hub_core/ui_shared`,
 * `ui_shared_bp`, static_url_path "/ui-static") instead of three copies --
 * see that package's own `__init__.py` and `templates/_head_assets.html`.
 *
 * Redesign P1 (docs/redesign/SPEC.md §3.1) -- design-system colour/spacing
 * tokens, loaded FIRST in base.html's <head> (before app.css). Light is the
 * primary theme; dark is a considered second set, not an inversion filter,
 * applied under BOTH
 * `@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) }`
 * (an OS-level dark preference, no in-app toggle exists -- SPEC decision
 * A11) and `:root[data-theme="dark"]` (reserved for a future explicit
 * toggle; unused this phase, kept so the two paths can never drift). Every
 * colour in the app lives here as a token; nothing outside this file uses a
 * bare hex value except map_view.html's Mapbox layer colours (SPEC §3.1).
 * Retracted in place (REDESIGN PHASE P11) -- this used to also except "the
 * legacy `frontend_flask/static/style.css` (whose own three colliding
 * variable names were renamed to `--legacy-*` rather than deleted -- see
 * that file's own header comment), until P11 folds it in." P11 folded it
 * in: style.css is deleted, and its renamed `--legacy-*` custom properties
 * now live in app.css's own trailing "Folded from static/style.css"
 * section (unchanged hex values, still legacy-only names, still separate
 * from the tokens above -- see that section's own header for why).
 *
 * Values are the SPEC's own §3.1 list verbatim; the dark set is exactly
 * docs/mockups/app-redesign.html lines 45-76.
 */

:root {
  color-scheme: light;

  --ground: #F6F7F3;
  --surface: #FFFFFF;
  --surface-2: #EEF1EA;
  --ink: #1B2620;
  --ink-2: #3A463F;
  --muted: #5F6B64;
  --line: #DCE2DA;
  --line-strong: #B9C3BB;

  --accent: #1D499B;
  --accent-ink: #FFFFFF;
  --accent-soft: #E4EBF8;
  --accent-soft-ink: #163A7C;
  --focus: #1D499B;

  /* status -- separate from the accent; each ships with a glyph or word,
     never colour alone (SPEC §3.5). */
  --settled: #1F6B3A;      --settled-soft: #E1F0E5;
  --warn: #8A5200;         --warn-soft: #FBEFD6;
  --far: #1D499B;          --far-soft: #E4EBF8;
  /* hardening P15 (UX-review §5 E) -- was #6B6F6C (4.373:1 on
     --void-soft, below SPEC §3.5's 4.5:1 floor); #666A67 clears
     4.708:1 on --void-soft and 5.49:1 on plain white. Dark's own --void
     (#A5ACA7, both blocks below) is untouched -- already 5.79:1 on its
     own --void-soft. */
  --void: #666A67;         --void-soft: #ECEEEB;
  --critical: #B3261E;     --critical-soft: #FBE4E1;
  --credit: #1F6B3A;

  /* meters: single-hue sequential; the tick is ink, never a verdict colour. */
  --meter-track: #E3E8E0;
  --meter-opening: #9DB3DC;
  --meter-fill: #1D499B;

  --shadow: 0 1px 2px rgba(27,38,32,.06), 0 8px 24px rgba(27,38,32,.06);

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;

  --rail-w: 224px;
  --drawer-w: 440px;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #151B18; --surface: #1D2420; --surface-2: #242C27;
    --ink: #EAF0EB; --ink-2: #C9D2CB; --muted: #96A29A;
    --line: #2F3934; --line-strong: #4A564F;
    --accent: #8FB0F0; --accent-ink: #0D1B36; --accent-soft: #223559; --accent-soft-ink: #C7D7F7; --focus: #8FB0F0;
    --settled: #8CD3A5; --settled-soft: #1E3A29;
    --warn: #F0C070; --warn-soft: #3E3013;
    --far: #8FB0F0; --far-soft: #223559;
    --void: #A5ACA7; --void-soft: #2B302D;
    --critical: #F09A93; --critical-soft: #45201D;
    --credit: #8CD3A5;
    --meter-track: #2A332E; --meter-opening: #4F6A9E; --meter-fill: #8FB0F0;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #151B18; --surface: #1D2420; --surface-2: #242C27;
  --ink: #EAF0EB; --ink-2: #C9D2CB; --muted: #96A29A;
  --line: #2F3934; --line-strong: #4A564F;
  --accent: #8FB0F0; --accent-ink: #0D1B36; --accent-soft: #223559; --accent-soft-ink: #C7D7F7; --focus: #8FB0F0;
  --settled: #8CD3A5; --settled-soft: #1E3A29;
  --warn: #F0C070; --warn-soft: #3E3013;
  --far: #8FB0F0; --far-soft: #223559;
  --void: #A5ACA7; --void-soft: #2B302D;
  --critical: #F09A93; --critical-soft: #45201D;
  --credit: #8CD3A5;
  --meter-track: #2A332E; --meter-opening: #4F6A9E; --meter-fill: #8FB0F0;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
