/*
 * Zela design tokens — the single declaration site.
 *
 * application.css consumes these; marketing.css will consume the same file.
 * Two consumers is the whole reason they live apart: a palette change is one
 * edit here, not one edit per stylesheet.
 *
 * Not declared here, on purpose:
 *   --primary / --accent  ThemesController renders them per tenant at request
 *                         time (see app/controllers/themes_controller.rb).
 *                         --ring below references --primary and resolves fine,
 *                         because custom properties resolve at use time, not
 *                         at parse time — link order does not matter.
 *   --pct                 rule-scoped on .coverage-ring, written by the
 *                         css-value Stimulus controller.
 */

:root {
  --bg: #faf8f5;
  --surface: #fffefb;
  --surface-2: #faf7f4;
  --border: #e5e1dc;
  --border-strong: #d6d1ca;
  --text: #18181b;
  --text-2: #52525b;
  /* Tertiary text carries real content (hints, meta, table headers) — kept at
     4.5:1+ on every plane it sits on. test/assets/design_token_contrast_test.rb
     multiplies this out rather than trusting this sentence, which is how the
     state colours below got away with failing it for as long as they did. */
  --text-3: #71717a;

  /* Dark sidebar palette */
  --shell: #14110f;
  --shell-2: #201c19;
  --shell-border: #2e2926;
  --shell-text: #a8a29e;
  --shell-text-hi: #f5f3f1;
  /* Hover border for shell controls. Was #52525b written into the rule --
     the value of --text-2, borrowed into the dark shell where --text-2 has
     no business being. It is its own decision, so it is its own token, and
     it warms with the shell rather than tracking a light-plane text colour. */
  --shell-border-hover: #5b544e;

  --ok: #15803d;    --ok-bg: #f1faee;    --ok-bd: #c3e8bf;
  --bad: #b91c1c;   --bad-bg: #fdf2ef;   --bad-bd: #f6ccc4;
  --warn: #b45309;  --warn-bg: #fdf8ea;  --warn-bd: #f0dda6;
  --idle: #6b6560;  --idle-bg: #f5f2ee;  --idle-bd: #e2ddd6;
  /* In-flight work (live Jira statuses: In Progress / In Review / …) */
  --info: #1d4ed8;  --info-bg: #eef4fd;  --info-bd: #c3d8f7;

  --ui: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  --space-1: 0.25rem;  /* 4px  — icon gaps, pill padding      */
  --space-2: 0.5rem;   /* 8px  — chip rows, inline clusters   */
  --space-3: 0.75rem;  /* 12px — intra-card element gaps      */
  --space-4: 1rem;     /* 16px — field groups, list rows      */
  --space-5: 1.5rem;   /* 24px — card padding, card stacks    */
  --space-6: 2rem;     /* 32px — sub-section gaps             */
  --space-7: 3rem;     /* 48px — page-level section gaps      */

  --r: 10px;
  --r-lg: 14px;
  --topbar-h: 52px;
  --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-sm: 0 1px 3px rgba(24, 24, 27, 0.06), 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(24, 24, 27, 0.08), 0 2px 4px rgba(24, 24, 27, 0.04);
  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
