/* ============================================================
   NOS: design tokens. SINGLE SOURCE OF TRUTH.
   Token names match fabricated-os so shared modules work unchanged;
   the values are Nudge's brand: black (primary), coral #EF5C5B
   (secondary), blue #A5DBD9 (accent). Coral and blue carry black
   text, never white. A raw hex value in a module is a bug.
   Light is default; [data-theme="dark"] flips the surface.
   ============================================================ */

:root {
  /* color: surfaces */
  --paper: #f4f3ef;        /* page background, warm gray */
  --surface: #ffffff;      /* cards, panels */
  --surface-2: #efede7;    /* quiet fills, chips */
  --surface-3: #faf9f6;    /* card headers, table heads */

  /* color: ink */
  --ink: #111111;
  --muted: #555555;
  --faint: #8a8a8a;

  /* color: rules */
  --rule: #dcd9d0;
  --rule-soft: #ecebe5;

  /* color: brand */
  --brand: #111111;        /* primary buttons: black, white text */
  --brand-on: #ffffff;     /* text on --brand */
  --brand-deep: #b83a39;   /* links (dark coral, passes contrast) */
  --brand-deeper: #8e2a29; /* link hover */
  --brand-soft: #ddf1f0;   /* light blue tint: selected rows, callouts */
  --coral: #ef5c5b;        /* secondary: highlights, active nav (black text) */
  --coral-soft: #fce3e2;
  --blue: #a5dbd9;         /* accent (black text) */

  /* color: status */
  --ok: #1f6b5e;
  --warn: #a06a14;
  --warn-soft: #f5ebd8;
  --alert: #c0392b;
  --alert-soft: #f7e3e1;

  /* sidebar (same in both themes) */
  --side-bg: #000000;
  --side-fg: rgba(255, 255, 255, 0.85);
  --side-fg-dim: rgba(255, 255, 255, 0.5);
  --side-fg-strong: #111111;     /* text on the active (coral) item */
  --side-active: #ef5c5b;
  --side-hover: rgba(255, 255, 255, 0.1);
  --side-rule: rgba(255, 255, 255, 0.18);

  /* type */
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* shape */
  --r-card: 12px;
  --r-btn: 9px;
  --r-chip: 6px;
  --shadow: 0 1px 6px rgba(17, 17, 17, 0.06);
  --shadow-lift: 0 2px 10px rgba(17, 17, 17, 0.08);
  /* chart: one color per sales channel, fixed (validated light vs #ffffff:
     lightness band, chroma, CVD, contrast all pass) */
  --ch-amazon: #00879c;
  --ch-shopify: #e5534f;
  --ch-etsy: #6a4fb3;
}

[data-theme="dark"] {
  /* chart channels, re-stepped for the dark surface (validated vs #1e1e1e) */
  --ch-amazon: #2ea5b8;
  --ch-shopify: #eb625f;
  --ch-etsy: #9580e6;
  --paper: #141414;
  --surface: #1e1e1e;
  --surface-2: #121212;
  --surface-3: #262626;
  --ink: #f2f2f2;
  --muted: #a6a6a6;
  --faint: #6e6e6e;
  --rule: #333333;
  --rule-soft: #2a2a2a;
  --brand: #f2f2f2;
  --brand-on: #111111;
  --brand-deep: #f28a89;
  --brand-deeper: #f5a8a7;
  --brand-soft: #18363a;
  --coral-soft: #3a1c1c;
  --ok: #5fc9b5;
  --warn: #d9a84e;
  --warn-soft: #2e2413;
  --alert: #ef6b5f;
  --alert-soft: #331414;
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 10px rgba(0, 0, 0, 0.4);
}
