/*
 * The palette, the type and the spacing, in one place.
 *
 * Both themes are defined here and nowhere else: a colour that exists only inside a media query is
 * the classic unreadable screen, so every token is declared on :root first and only redefined below.
 */

:root {
  color-scheme: light;

  --sans: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* The Merchants admin's cool blue-grey, turned a few degrees towards the accent's indigo so the
     neutrals and the accent read as one family. */
  --page: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #f6f7fb;
  --panel-3: #ebeef4;
  --line: #e0e4ee;
  --line-strong: #cdd2e0;
  --ink: #0f162e;
  --ink-2: #4b5368;
  --ink-3: #6f778c;

  /* The Merchants brand blue (#155791, hue 208) moved to hue 224: still blue, a step towards
     purple. The gradient pair is the brand mark's and the sign-in panel's. */
  --accent: #2143a1;
  --accent-hover: #1a3889;
  --accent-ink: #ffffff;
  --accent-soft: #e6ebfa;
  --accent-grad-from: #2445ad;
  --accent-grad-to: #0e164e;

  /* Approvals and anything with a second factor share one colour, so "this needs someone else, or
     something else, before it happens" always looks the same. Pushed towards magenta, away from the
     accent: with an indigo accent the old violet was too near it to mean something of its own. */
  --esc: #8636a1;
  --esc-soft: #f4e7f8;

  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --crit: #b91c1c;
  --crit-soft: #fdecec;

  /* Where a PayPal account's money is withdrawn to, one colour each, as Dicky asked on 2026-10-07:
     Skrill purple, Neteller green, Paysafecard blue. Kept apart from the state colours on purpose, so
     a Neteller account does not read as "fine" and a Paysafecard one does not read as a link. */
  --skrill: #6d28d9;
  --skrill-soft: #f0e9fd;
  --neteller: #4d7c0f;
  --neteller-soft: #eef6dc;
  --paysafecard: #0369a1;
  --paysafecard-soft: #e2f1fa;

  --radius-lg: 12px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 22, 46, .06);
  --shadow: 0 1px 2px rgba(15, 22, 46, .05), 0 8px 24px rgba(15, 22, 46, .08);
  --shadow-lg: 0 12px 40px rgba(15, 22, 46, .2);
  --scrim: rgba(6, 9, 24, .45);

  --topbar-h: 60px;
  --rail-w: 248px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --page: #0a0d1a;
    --panel: #111527;
    --panel-2: #161c31;
    --panel-3: #1d243e;
    --line: #232b48;
    --line-strong: #323b5d;
    --ink: #e6eaf7;
    --ink-2: #a8afc7;
    --ink-3: #8088a2;

    --accent: #7793ee;
    --accent-hover: #94abf4;
    --accent-ink: #0a0f24;
    --accent-soft: #1b2450;
    --accent-grad-from: #22398c;
    --accent-grad-to: #080e30;

    --esc: #e291f3;
    --esc-soft: #341c3b;

    --ok: #4ade80;
    --ok-soft: #0f2e1d;
    --warn: #fbbf24;
    --warn-soft: #33250b;
    --crit: #f87171;
    --crit-soft: #3a1515;

    --skrill: #c4a5ff;
    --skrill-soft: #2a1d47;
    --neteller: #a3d65c;
    --neteller-soft: #1e2a0f;
    --paysafecard: #6cc4f5;
    --paysafecard-soft: #0d2638;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
    --scrim: rgba(2, 4, 12, .6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --page: #0a0d1a;
  --panel: #111527;
  --panel-2: #161c31;
  --panel-3: #1d243e;
  --line: #232b48;
  --line-strong: #323b5d;
  --ink: #e6eaf7;
  --ink-2: #a8afc7;
  --ink-3: #8088a2;

  --accent: #7793ee;
  --accent-hover: #94abf4;
  --accent-ink: #0a0f24;
  --accent-soft: #1b2450;
  --accent-grad-from: #22398c;
  --accent-grad-to: #080e30;

  --esc: #e291f3;
  --esc-soft: #341c3b;

  --ok: #4ade80;
  --ok-soft: #0f2e1d;
  --warn: #fbbf24;
  --warn-soft: #33250b;
  --crit: #f87171;
  --crit-soft: #3a1515;

  --skrill: #c4a5ff;
  --skrill-soft: #2a1d47;
  --neteller: #a3d65c;
  --neteller-soft: #1e2a0f;
  --paysafecard: #6cc4f5;
  --paysafecard-soft: #0d2638;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  --scrim: rgba(2, 4, 12, .6);
}
