/* The 2026 design's tokens (D-246), shared by every web app on Bunyad (D-247). The values match the desktop app's
   theme, so a business sees one design in the app, the Panel and its dashboard. Product-neutral: an app that wants
   its own accent overrides --accent and its family after this file. */

:root {
  color-scheme: light dark;

  /* surfaces: warm, paper-biased neutrals */
  --canvas: #F4F2ED;
  --surface: #FCFBF8;
  --raised: #FFFFFF;
  --sunken: #EEEBE4;
  --line: #E4E0D7;
  --line-strong: #D2CCC0;

  /* ink, strongest first */
  --ink-1: #1B1A17;
  --ink-2: #4A4741;
  --ink-3: #7C7871;
  --ink-4: #A29E95;

  /* ultramarine, chosen to sit outside the red, amber and green that mean a status */
  --accent: #2D46C8;
  --accent-strong: #1F34A3;
  --accent-wash: #ECEEFC;
  --accent-line: #C7CEF4;
  --on-accent: #FFFFFF;

  /* status colours; red is rationed so it still means something */
  --danger: #C0342B;
  --danger-bg: #FBEDEB;
  --danger-line: #F0C4BF;
  --amber: #A5650C;
  --amber-bg: #FDF3E1;
  --amber-line: #EFD6A5;
  --green: #1D7248;
  --green-bg: #E9F4EE;
  --green-line: #B9DDC8;

  /* the dark chrome (side rail, brand bar): dark in both themes */
  --rail: #16171C;
  --rail-2: #1E2027;
  --rail-line: #2C2E37;
  --rail-ink: #E8E6E1;
  --rail-ink-2: #8D8B86;
  --rail-ink-3: #5E5C58;
  --rail-accent: #8B9BFF;

  /* table rows */
  --row-alt: #FAF8F4;
  --row-hover: #F1EFE9;
  --row-sel: #E7EAFB;

  --shadow-sm: 0 1px 1px rgba(40, 34, 20, .04), 0 1px 3px rgba(40, 34, 20, .05);
  --shadow-md: 0 1px 2px rgba(40, 34, 20, .05), 0 4px 14px rgba(40, 34, 20, .07);
  --shadow-lg: 0 2px 6px rgba(20, 16, 8, .10), 0 18px 50px rgba(20, 16, 8, .20);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 11px;
  --row-h: 32px;

  --ui: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}

/* Dark follows the operating system only: the pages run no script, so there is no switch (D-247). */
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #131419;
    --surface: #1A1C22;
    --raised: #20222A;
    --sunken: #101116;
    --line: #2B2E38;
    --line-strong: #3B3F4C;

    --ink-1: #EDEBE5;
    --ink-2: #B6B3AB;
    --ink-3: #87847D;
    --ink-4: #67655F;

    --accent: #8090FF;
    --accent-strong: #A3AEFF;
    --accent-wash: #21253C;
    --accent-line: #39406A;
    --on-accent: #0E1020;

    --danger: #EC8378;
    --danger-bg: #2C1C1A;
    --danger-line: #563430;
    --amber: #DFA85A;
    --amber-bg: #2A2317;
    --amber-line: #4C3F24;
    --green: #66C293;
    --green-bg: #152520;
    --green-line: #2C4A3B;

    --rail: #0D0E12;
    --rail-2: #181A20;
    --rail-line: #282A33;

    --row-alt: #1D1F26;
    --row-hover: #232630;
    --row-sel: #242942;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, .45);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .6);
  }
}
