:root {
  --palette-ink: #14202b;
  --palette-harbour: #1f4e6b;
  --palette-paper: #fbfaf7;
  --palette-stone: #e6e2d9;
  --palette-amber: #b8641f;

  --color-bg: var(--palette-paper);
  --color-surface: #f2efe8;
  --color-surface-raised: #ffffff;
  --color-text: var(--palette-ink);
  --color-text-muted: #53606b;
  --color-border: #ddd8cc;
  --color-primary: var(--palette-harbour);
  --color-on-primary: #ffffff;
  --color-accent: var(--palette-amber);
  --color-focus: #2b7bb9;
  --color-warning: #8a4b0c;
  --color-success: #2e7d4f;
  --color-error: #b3261e;

  --flow-ggr: #6a5bd0;
  --flow-ngr: #c9487a;
  --flow-txn: #1a8f6a;
  --flow-fix: #cf5a2e;
  --flow-onward: #a8a49a;
  --flow-neutral: #7a776f;
  --flow-short: #c23b3a;
  --flow-withdrawn: #5dbf9c;
  --flow-link-opacity: .38;

  --font-heading: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-2xs: .6875rem; --text-xs: .75rem; --text-s: .875rem; --text-m: 1rem; --text-l: 1.125rem; --text-xl: 1.375rem;
  --text-2xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); --text-3xl: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  --text-4xl: clamp(2.3rem, 1.6rem + 3.2vw, 3.75rem);
  --leading-tight: 1.15; --leading-body: 1.6; --weight-regular: 400; --weight-medium: 500; --weight-bold: 600;

  --space-3xs: .25rem; --space-2xs: .5rem; --space-xs: .75rem; --space-s: 1rem; --space-m: 1.5rem;
  --space-l: 2.5rem; --space-xl: 4rem; --space-2xl: clamp(4rem, 3rem + 4vw, 7rem);

  --radius-s: 4px; --radius-m: 8px; --radius-l: 16px; --border-width: 1px;
  --shadow-s: 0 1px 2px rgb(0 0 0 / .08); --max-width: 72rem; --measure: 65ch;
  --tap: 44px; --chart-min-width: 640px;
  --transition: 180ms ease;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0f1519;
    --color-surface: #172027;
    --color-surface-raised: #1d2830;
    --color-text: #e8ecee;
    --color-text-muted: #a3b0b8;
    --color-border: #2c3a44;
    --color-primary: #7fb3d1;
    --color-on-primary: #0f1519;
    --color-accent: #e3a064;
    --color-focus: #7cbcf0;
    --color-warning: #f0b468;
    --color-success: #6cc893;
    --color-error: #f08a82;
    --flow-ggr: #9a90ec;
    --flow-ngr: #e07da2;
    --flow-txn: #3cc293;
    --flow-fix: #eb8559;
    --flow-onward: #6e6b64;
    --flow-neutral: #8f8c84;
    --flow-short: #e86a69;
    --flow-withdrawn: #2f8c6c;
    --flow-link-opacity: .45;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --color-bg: #0f1519;
  --color-surface: #172027;
  --color-surface-raised: #1d2830;
  --color-text: #e8ecee;
  --color-text-muted: #a3b0b8;
  --color-border: #2c3a44;
  --color-primary: #7fb3d1;
  --color-on-primary: #0f1519;
  --color-accent: #e3a064;
  --color-focus: #7cbcf0;
  --color-warning: #f0b468;
  --color-success: #6cc893;
  --color-error: #f08a82;
  --flow-ggr: #9a90ec;
  --flow-ngr: #e07da2;
  --flow-txn: #3cc293;
  --flow-fix: #eb8559;
  --flow-onward: #6e6b64;
  --flow-neutral: #8f8c84;
  --flow-short: #e86a69;
  --flow-withdrawn: #2f8c6c;
  --flow-link-opacity: .45;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) { :root { --transition: 0ms; } }
