/* Business system prototype: design tokens.
   EVERY colour, font, size and corner the system uses is a custom property
   here, and Settings > Appearance writes overrides onto :root (saved in
   localStorage as bs-theme). Components never use a literal colour.
   Status colours and the chart palette are fixed on purpose: they carry
   meaning, so a theme must not repaint them (dataviz rules). */
:root {
  /* Surfaces */
  --canvas: #F2F5F7;
  --surface: #FFFFFF;
  --surface-2: #F7F9FA;
  --surface-3: #EEF2F5;
  --line: #E1E7EC;
  --line-strong: #CCD5DD;

  /* Ink */
  --ink: #13212C;
  --ink-2: #4B5A67;
  --muted: #5D6A76;
  --on-accent: #FFFFFF;

  /* Brand */
  --accent: #0B5C6B;
  --accent-hover: #094C59;
  --accent-soft: #E3F0F1;
  --accent-ink: #0B5C6B;
  --spark: #F0642F;
  --spark-soft: #FDEBE3;
  --spark-strong: #C34C20;

  /* Sidebar */
  --side-bg: #FFFFFF;
  --side-ink: #26343F;
  --side-muted: #66727E;
  --side-active-bg: #E3F0F1;
  --side-active-ink: #0B5C6B;
  --side-line: #E1E7EC;

  /* Header */
  --head-bg: rgba(255, 255, 255, 0.86);

  /* Status (fixed) */
  --good: #0CA30C;
  --good-ink: #006300;
  --good-soft: #E6F6E6;
  --warn: #FAB219;
  --warn-ink: #8A5A00;
  --warn-soft: #FEF4DD;
  --serious: #EC835A;
  --serious-soft: #FCEDE6;
  --bad: #D03B3B;
  --bad-ink: #A12A2A;
  --bad-soft: #FBE9E9;

  /* Chart palette: the dataviz reference eight, fixed order, validated on
     white 2026-11-11. Slot 1 doubles as the default for one-series charts
     through --chart-1, which a theme MAY point at the accent. */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100;
  --c5: #e87ba4; --c6: #008300; --c7: #6250d6; --c8: #e34948;
  --chart-1: var(--accent);
  --chart-grid: #E9EDF1;
  --chart-axis: #8A96A1;

  /* Type */
  --font-head: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Inter Fallback", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;
  /* Corners for the small bits, pills and round dots (Appearance > Shape). */
  --r-small: 6px;
  --r-pill: 999px;
  --r-dot: 50%;
  /* Set one by one in Appearance > Text (Lee, 2026-11-13). */
  --fs-title: 24px;
  --fs-card: 15px;
  --fs-fig: 34px;
  --fs-nav: 13px;
  --fs-btn: 13px;
  --fw-head: 700;

  /* Shape and space */
  --r-surface: 12px;
  --r-control: 8px;
  --gap: 16px;
  --pad: 20px;
  --side-w: 256px;
  --side-mini-w: 68px;
  --head-h: 64px;
  --shadow-1: 0 1px 2px rgba(19, 33, 44, 0.05), 0 1px 1px rgba(19, 33, 44, 0.03);
  --shadow-2: 0 12px 32px -12px rgba(19, 33, 44, 0.22), 0 2px 6px rgba(19, 33, 44, 0.06);
  --shadow-3: -24px 0 60px -20px rgba(19, 33, 44, 0.30);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html[data-density="compact"] {
  --gap: 12px;
  --pad: 14px;
  --head-h: 56px;
}

/* Lee's default look (2026-11-13), as theme.js vars(DEFAULTS) writes it, so a
   first-time visitor sees it from the first frame. Regenerate this block from
   theme.js if the defaults change; a saved look overrides it before paint. */
:root {
  --canvas: #F6F4F3;
  --surface: #FFFFFF;
  --surface-2: #fbfaf9;
  --surface-3: #eeedec;
  --line: #E1E7EC;
  --line-strong: #ccd3d9;
  --ink: #13212C;
  --ink-2: #4B5A67;
  --muted: #5d6b76;
  --accent: #2C5BE0;
  --accent-hover: #254cbc;
  --accent-soft: #e8edfc;
  --accent-ink: #2C5BE0;
  --on-accent: #FFFFFF;
  --spark: #D03B6B;
  --spark-soft: #f9e7ed;
  --spark-strong: #D03B6B;
  --head-bg: #FFFFFFDB;
  --chart-1: #2C5BE0;
  --side-bg: #122143;
  --side-ink: #E7EDF2;
  --side-muted: #93A1AE;
  --side-active-bg: rgba(255,255,255,.12);
  --side-active-ink: #FFFFFF;
  --side-line: rgba(255,255,255,.09);
  --font-head: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Public Sans Fallback", "Segoe UI", system-ui, sans-serif;
  --fw-head: 700;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;
  --fs-title: 20px;
  --fs-card: 14px;
  --fs-fig: 32px;
  --fs-nav: 13px;
  --fs-btn: 13px;
  --r-surface: 7px;
  --r-control: 7px;
  --r-small: 6px;
  --r-pill: 7px;
  --r-dot: 7px;
}
