/* Platform design tokens — injected into every iframe; additive-only within a major. */

:root {
  /* color — light theme (default) */
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-surface-2: #eaeef3;
  --color-border: #d8dee6;
  --color-text: #16202b;
  --color-muted: #5b6878;
  --color-accent: #1d4f91;
  --color-accent-2: #0e7490;
  --color-on-accent: #ffffff;
  --color-ok: #15803d;
  --color-warn: #b45309;
  --color-err: #b91c1c;

  /* space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  /* type */
  --font-sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 22px;

  /* elevation + motion + layering */
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.08);
  --motion-fast: 0.08s ease;
  --motion-base: 0.16s ease;
  --z-overlay: 1000;

  /* added 1.1.0 — status + price direction */
  --color-info: #0369a1;
  --color-up: #047857;
  --color-down: #b42318;
  --color-flat: #64748b;

  /* added 1.1.0 — overlay elevation */
  --shadow-2: 0 8px 24px rgba(15, 23, 42, 0.16);

  /* added 1.1.0 — type */
  --text-xs: 12px;

  /* added 1.1.0 — table */
  --table-header-bg: #eef2f6;
  --table-header-text: #3d4c5e;
  --table-row-hover: #e9eff6;
  --table-zebra: #f7f9fb;
  --table-border: #e2e8ee;
  --table-row-h: 34px;
  --table-row-h-dense: 26px;

  /* added 1.1.0 — chart */
  --chart-1: #1d4f91;
  --chart-2: #0e7490;
  --chart-3: #b45309;
  --chart-4: #6d28d9;
  --chart-5: #047857;
  --chart-6: #b42318;
  --chart-7: #475569;
  --chart-8: #0369a1;
  --chart-grid: #e5eaf0;
  --chart-axis: #9aa7b6;
  --chart-label: #5b6878;
}

[data-theme="dark"] {
  --color-bg: #0c1118;
  --color-surface: #131a23;
  --color-surface-2: #1b2430;
  --color-border: #2a3645;
  --color-text: #e3e9f0;
  --color-muted: #8c99aa;
  --color-accent: #4e8ed9;
  --color-accent-2: #2cb1bc;
  --color-on-accent: #ffffff;
  --color-ok: #30a46c;
  --color-warn: #cf9f3f;
  --color-err: #e5534b;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --color-info: #58a6d8;
  --color-up: #2ea878;
  --color-down: #e0584f;
  --color-flat: #8c99aa;
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.55);
  --table-header-bg: #18212c;
  --table-header-text: #aab7c7;
  --table-row-hover: #1f2a38;
  --table-zebra: #161e29;
  --table-border: #243140;
  --chart-1: #6ba3e8;
  --chart-2: #43c3cf;
  --chart-3: #d6a243;
  --chart-4: #a78bfa;
  --chart-5: #34b37a;
  --chart-6: #e0584f;
  --chart-7: #94a3b8;
  --chart-8: #4db8e8;
  --chart-grid: #223041;
  --chart-axis: #415063;
  --chart-label: #8c99aa;
}

/* reset + base layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  background: var(--color-bg);
  color: var(--color-text);
}

/* tabular figures are opt-in (utility or component shadow styles), never set on body */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}
