/* mybench brand tokens for the web (the mybench site).
   Light values on :root; dark under prefers-color-scheme and [data-theme="dark"] (an explicit
   [data-theme="light"] keeps light). Values follow the desktop app's Theme.qml where it has them. */

:root {
  /* Brand */
  --mb-blue: #0A64D8;            /* platform blue: fills with white text (primary buttons), the mark on light grounds */
  --mb-blue-text: #0A64D8;       /* links and blue text on the page background */
  --mb-blue-hover: #0957BD;
  --mb-blue-pressed: #084CA6;
  --mb-blue-soft: rgba(10, 100, 216, 0.12);   /* selected rows, pressed tools */
  --mb-blue-pale: #A9CBFF;       /* second pulse of the mark on blue or dark grounds */
  --mb-on-blue: #FFFFFF;
  --mb-teal: #0A6E7E;            /* mybench Web: fills with white text, the w on light grounds */
  --mb-teal-text: #0A6E7E;       /* mybench Web links */
  --mb-teal-pale: #9FE3E6;       /* second pulse of the w on teal or dark grounds */

  /* Neutrals */
  --mb-bg: #F4F5F7;              /* page */
  --mb-surface: #FFFFFF;         /* cards, panels */
  --mb-surface-2: #E8E9EC;       /* the app's window grey: sidebars, wells */
  --mb-border: #DCDFE4;
  --mb-text: #1F1F1F;
  --mb-text-2: #5E6470;          /* secondary text */
  --mb-ink: #14161A;             /* wordmark on light grounds */

  /* Meaning (same as the app) */
  --mb-positive: #1A7F37;        /* pass, connected */
  --mb-caution: #9A6700;         /* late, out of tolerance */
  --mb-negative: #CF222E;        /* fail, error */
  --mb-run: #1F883D;             /* Run button fill */
  --mb-stop: #CF222E;            /* Stop button fill */

  /* Signal colours: a channel's identity only (traces, an 8 px swatch beside its name) */
  --mb-ch0: #1E8E5A;             /* CH0 / AI0 */
  --mb-ch1: #0B7FAB;             /* CH1 / AI1 */
  --mb-ao0: #C25E0A;             /* AO0 */
  --mb-ao1: #B4318F;             /* AO1 */
  --mb-math: #9A7A00;
  --mb-ref: #6D4FD8;

  /* Type: Inter for UI text, Inter Display (Inter at large optical size) for headings and the wordmark,
     JetBrains Mono for values, units and code. Google Fonts: family=Inter:opsz,wght@14..32,400..700 */
  --mb-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mb-font-display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mb-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --mb-text-xs: 12px;
  --mb-text-s: 13px;
  --mb-text-m: 14px;             /* body */
  --mb-text-l: 16px;
  --mb-text-xl: 20px;            /* card titles */
  --mb-text-2xl: 26px;           /* page titles */
  --mb-text-3xl: 36px;           /* hero */
  --mb-weight-regular: 400;
  --mb-weight-medium: 500;
  --mb-weight-semibold: 600;

  /* Shape and space (4 px grid; radii as in the app) */
  --mb-radius-xs: 3px;
  --mb-radius-s: 6px;            /* controls: buttons, fields */
  --mb-radius-m: 8px;            /* cards */
  --mb-radius-l: 10px;           /* popups, dialogs, tiles */
  --mb-radius-xl: 14px;          /* large panels */
  --mb-space-2xs: 2px;
  --mb-space-xs: 4px;
  --mb-space-s: 8px;
  --mb-space-m: 12px;
  --mb-space-l: 16px;
  --mb-space-xl: 24px;
  --mb-space-2xl: 32px;
  --mb-space-3xl: 48px;
  --mb-shadow-popup: 0 8px 24px rgba(20, 22, 26, 0.16);
  --mb-focus-ring: 0 0 0 2px var(--mb-blue-text);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mb-blue: #2A72D9;
    --mb-blue-text: #7FB0FF;
    --mb-blue-hover: #3A80E3;
    --mb-blue-pressed: #225FB8;
    --mb-blue-soft: rgba(76, 141, 240, 0.20);
    --mb-blue-pale: #A9CBFF;
    --mb-on-blue: #FFFFFF;
    --mb-teal: #0A6E7E;
    --mb-teal-text: #6FD3DC;
    --mb-teal-pale: #9FE3E6;
    --mb-bg: #17181B;
    --mb-surface: #1F2125;
    --mb-surface-2: #282828;
    --mb-border: #2C2F35;
    --mb-text: #E8E8E8;
    --mb-text-2: #9AA0AB;
    --mb-ink: #FFFFFF;
    --mb-positive: #3FB950;
    --mb-caution: #D29922;
    --mb-negative: #F85149;
    --mb-ch0: #4CC38A;
    --mb-ch1: #3FB8E0;
    --mb-ao0: #F2994A;
    --mb-ao1: #E26FC0;
    --mb-math: #E8C547;
    --mb-ref: #A78BFA;
    --mb-shadow-popup: 0 8px 24px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --mb-blue: #2A72D9;
  --mb-blue-text: #7FB0FF;
  --mb-teal: #0A6E7E;
  --mb-teal-text: #6FD3DC;
  --mb-teal-pale: #9FE3E6;
  --mb-blue-hover: #3A80E3;
  --mb-blue-pressed: #225FB8;
  --mb-blue-soft: rgba(76, 141, 240, 0.20);
  --mb-blue-pale: #A9CBFF;
  --mb-on-blue: #FFFFFF;
  --mb-bg: #17181B;
  --mb-surface: #1F2125;
  --mb-surface-2: #282828;
  --mb-border: #2C2F35;
  --mb-text: #E8E8E8;
  --mb-text-2: #9AA0AB;
  --mb-ink: #FFFFFF;
  --mb-positive: #3FB950;
  --mb-caution: #D29922;
  --mb-negative: #F85149;
  --mb-ch0: #4CC38A;
  --mb-ch1: #3FB8E0;
  --mb-ao0: #F2994A;
  --mb-ao1: #E26FC0;
  --mb-math: #E8C547;
  --mb-ref: #A78BFA;
  --mb-shadow-popup: 0 8px 24px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
