/*
  Design tokens. One family with the GraphQL IDE (graphql-ide/src/scss/_brand.scss,
  _themes.scss) and the admin (graphql-admin application.css): the same --bq-*
  names and values, so the products look alike.

    IDE:      --bq-bg, surface-N, elevated, text, text-muted, text-active, border,
              border-strong, accent, accent-hover, accent-contrast, soft, gradient
    admin:    --bq-link, teal, teal-dark, yellow, focus-ring, row-hover, code-bg,
              code-text, shadow, shadow-lg
    explorer: --bq-text-strong, usd, teal-text, teal-soft, success, danger, chart-N and the type,
              space and radius scales

  The theme follows the system (prefers-color-scheme) unless the visitor picked
  one: <html data-theme="light|dark"> (ApplicationController#set_theme).
  Components use these variables only, never a hex.
*/
:root {
  --bq-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bq-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bq-fs-xs: 0.8125rem;
  --bq-fs-sm: 0.875rem;
  --bq-fs-md: 1rem;
  --bq-fs-lg: 1.125rem;
  --bq-fs-xl: 1.375rem;
  --bq-fs-2xl: 1.875rem;
  --bq-fs-3xl: 2.5rem;
  --bq-fs-table: 0.9375rem;
  --bq-fs-label: 0.75rem;
  --bq-space-1: 0.25rem;
  --bq-space-2: 0.5rem;
  --bq-space-3: 0.75rem;
  --bq-space-4: 1rem;
  --bq-space-5: 1.5rem;
  --bq-space-6: 2rem;
  --bq-space-7: 3rem;
  --bq-radius-sm: 4px;
  --bq-radius-md: 8px;
  --bq-radius-lg: 14px;
  --bq-radius-pill: 999px;
  --bq-page-width: 1440px;
  --bq-header-h: 64px;

  /* Brand gradients (Brand Guidelines, as in the IDE) and brand accents. */
  --bq-gradient: linear-gradient(135deg, #aee0e5 0%, #be3178 100%);
  --bq-gradient-dim: linear-gradient(135deg, #3db3bf 0%, #6c1c44 100%);
  --bq-teal: #3db3bf;
  --bq-yellow: #ffd500;
  --bq-chart-2: #be3178;
  --bq-chart-3: #627eea;
  --bq-chart-4: #f0897c;
  --bq-chart-5: #e6a23c;
  --bq-chart-6: #95ea87;

  /* Light (IDE values, then admin, then explorer additions). */
  color-scheme: light;
  --bq-bg: #f6f7f8;
  --bq-surface: #ffffff;
  --bq-surface-2: #f1f3f5;
  --bq-surface-3: #e9ecef;
  --bq-elevated: #ffffff;
  --bq-text: #24292e;
  /* IDE has #6e7781: 4.2:1 on --bq-bg, below WCAG AA; one step darker here. */
  --bq-text-muted: #636c76;
  --bq-text-active: #93254b;
  --bq-border: #e1e4e8;
  --bq-border-strong: #d0d7de;
  --bq-accent: #93254b;
  --bq-accent-hover: #b42d5b;
  --bq-accent-contrast: #ffffff;
  --bq-soft: linear-gradient(135deg, #fff6f9 0%, #fdeaf1 100%);
  --bq-soft-flat: #fbeef3;
  --bq-link: #93254b;
  --bq-teal-dark: #2b8f99;
  --bq-focus-ring: rgba(202, 53, 104, 0.35);
  --bq-row-hover: rgba(61, 179, 191, 0.07);
  --bq-code-bg: #f5eef3;
  --bq-code-text: #6c1c44;
  --bq-shadow: 0 1px 2px rgba(20, 24, 40, 0.04), 0 1px 3px rgba(20, 24, 40, 0.06);
  --bq-shadow-lg: 0 4px 14px rgba(20, 24, 40, 0.08);
  --bq-text-strong: #1b1f24;
  --bq-teal-text: #237f88;
  --bq-teal-soft: rgba(61, 179, 191, 0.12);
  --bq-success: #18774a;
  --bq-usd: #18774a;
  --bq-success-soft: #e3f4ea;
  --bq-danger: #b3262f;
  --bq-danger-soft: #fbe9ea;
  --bq-warning: #8a5d00;
  --bq-warning-soft: #fdf3dc;
  --bq-chart-1: #2b8f99;
  --bq-chart-grid: #e9ecef;
  --bq-chart-other: #8a929c;
}

/* Dark: the system's, unless light was picked; or picked. Same values twice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bq-bg: #06090d;
    --bq-surface: #0b0f16;
    --bq-surface-2: #11151c;
    --bq-surface-3: #191d26;
    --bq-elevated: #151a23;
    --bq-text: #c3cad6;
    --bq-text-muted: #7e8696;
    --bq-text-active: #ffffff;
    --bq-border: #1b1f2b;
    --bq-border-strong: #3b4663;
    --bq-soft: #12131c;
    --bq-soft-flat: #1a1420;
    --bq-link: #d8537e;
    --bq-teal-dark: #aee0e5;
    --bq-focus-ring: rgba(216, 83, 126, 0.45);
    --bq-row-hover: rgba(61, 179, 191, 0.08);
    --bq-code-bg: #191d26;
    --bq-code-text: #e25284;
    --bq-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
    --bq-shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.55);
    --bq-text-strong: #ffffff;
    --bq-teal-text: #3db3bf;
    --bq-success: #95ea87;
    --bq-usd: #95ea87;
    --bq-success-soft: rgba(149, 234, 135, 0.12);
    --bq-danger: #f0897c;
    --bq-danger-soft: rgba(240, 137, 124, 0.13);
    --bq-warning: #e6b34a;
    --bq-warning-soft: rgba(230, 179, 74, 0.13);
    --bq-chart-1: #3db3bf;
    --bq-chart-grid: #1b1f2b;
    --bq-chart-other: #6f7787;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bq-bg: #06090d;
  --bq-surface: #0b0f16;
  --bq-surface-2: #11151c;
  --bq-surface-3: #191d26;
  --bq-elevated: #151a23;
  --bq-text: #c3cad6;
  --bq-text-muted: #7e8696;
  --bq-text-active: #ffffff;
  --bq-border: #1b1f2b;
  --bq-border-strong: #3b4663;
  --bq-soft: #12131c;
  --bq-soft-flat: #1a1420;
  --bq-link: #d8537e;
  --bq-teal-dark: #aee0e5;
  --bq-focus-ring: rgba(216, 83, 126, 0.45);
  --bq-row-hover: rgba(61, 179, 191, 0.08);
  --bq-code-bg: #191d26;
  --bq-code-text: #e25284;
  --bq-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
  --bq-shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.55);
  --bq-text-strong: #ffffff;
  --bq-teal-text: #3db3bf;
  --bq-success: #95ea87;
  --bq-usd: #95ea87;
  --bq-success-soft: rgba(149, 234, 135, 0.12);
  --bq-danger: #f0897c;
  --bq-danger-soft: rgba(240, 137, 124, 0.13);
  --bq-warning: #e6b34a;
  --bq-warning-soft: rgba(230, 179, 74, 0.13);
  --bq-chart-1: #3db3bf;
  --bq-chart-grid: #1b1f2b;
  --bq-chart-other: #6f7787;
}
