/* The design tokens of StockOne (design-01): a copy of frontend/src/ui/tokens.css without the npm font imports (the page loads Nunito from Google Fonts). Change both. */
/* The design tokens of StockOne, taken from the Penpot file `stockone`, page design-01 (Landing / 1440 / Light and Dark).
   Light is the default; `data-theme="dark"` on any ancestor switches a subtree to the dark values (the Storybook toolbar sets it). */

:root,
[data-theme='light'] {
  /* surfaces */
  --so-bg: #faf8f5; /* the page, the muted fields */
  --so-surface: #ffffff; /* cards, the header, the app window */
  --so-border: #eae7e0;
  /* text */
  --so-text: #3f414e;
  --so-muted: #6e7380;
  --so-accent: #606db5; /* accent text: eyebrows, active tabs, links, big numbers */
  /* the brand: periwinkle buttons and bars, the same in both themes */
  --so-primary: #8e97fd;
  --so-on-primary: #25305a;
  --so-primary-soft: #eeefff;
  --so-info-soft: #edf2fb;
  /* states */
  --so-success: #386e58;
  --so-success-soft: #e2eedd;
  --so-success-strong: #b3d7bc;
  --so-on-success-strong: #274638;
  --so-warning: #865c23;
  --so-warning-soft: #fff0d9;
  --so-danger: #b44745;
  --so-danger-soft: #ffe5da;
  --so-danger-strong: #b44745;
  --so-on-danger-strong: #ffffff;
  /* the marketplaces */
  --so-wb: #8b2bd9;
  --so-ozon: #005bff;
  --so-ym: #9b7000;
  --so-ink: #3f414e; /* barcode bars */

  /* radii */
  --so-radius-xs: 8px; /* tabs, chips, table header, small badges */
  --so-radius-sm: 10px; /* fields, banners */
  --so-radius-md: 12px; /* stat tiles, callouts, the contact field */
  --so-radius-lg: 14px; /* messages, counters */
  --so-radius-xl: 18px; /* situation cards, FAQ */
  --so-radius-2xl: 24px; /* app windows, pricing cards */
  --so-radius-3xl: 28px; /* showcase frames, illustrations, choice pills */
  --so-radius-pill: 38px; /* buttons */

  /* type */
  --so-font-display: 'Nunito', system-ui, sans-serif;
  --so-font: 'Nunito Sans', system-ui, sans-serif;

  color-scheme: light;
}

[data-theme='dark'] {
  --so-bg: #03174c;
  --so-surface: #12245b;
  --so-border: #2c3b73;
  --so-text: #e1e2f5;
  --so-muted: #b2b8d4;
  --so-accent: #b3b9ff;
  --so-primary-soft: #1f265e;
  --so-info-soft: #142d66;
  --so-success: #a6d4c4;
  --so-success-soft: #173e50;
  --so-warning: #ffcf86;
  --so-warning-soft: #3b3354;
  --so-danger: #ffb4ad;
  --so-danger-soft: #4d304b;
  --so-wb: #cb9aff;
  --so-ozon: #80acff;
  --so-ym: #f8cc66;
  --so-ink: #e1e2f5;
  color-scheme: dark;
}

/* the dark theme follows the system on the public pages (the Penpot boards Landing / * / Dark) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --so-bg: #03174c;
    --so-surface: #12245b;
    --so-border: #2c3b73;
    --so-text: #e1e2f5;
    --so-muted: #b2b8d4;
    --so-accent: #b3b9ff;
    --so-primary-soft: #1f265e;
    --so-info-soft: #142d66;
    --so-success: #a6d4c4;
    --so-success-soft: #173e50;
    --so-warning: #ffcf86;
    --so-warning-soft: #3b3354;
    --so-danger: #ffb4ad;
    --so-danger-soft: #4d304b;
    --so-wb: #cb9aff;
    --so-ozon: #80acff;
    --so-ym: #f8cc66;
    --so-ink: #e1e2f5;
    color-scheme: dark;
  }
}
