/* The G1 operator preset;
   tokens.json carries the same values. Spacing sits on the I-2 scale. Every
   text pair passes WCAG AA in light and dark; the shifts from the preset and
   the ratios are in DESIGN.md. A product overrides the accent set and nothing
   else. */
:root {
  --space-0: 0;
  --space-2: 2px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;

  /* type: one family, the five G1 stops */
  --font-sans:
    Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue,
    Arial, sans-serif;
  --text-title-size: 20px;
  --text-title-weight: 600;
  --text-title-line: 28px;
  --text-section-size: 14px;
  --text-section-weight: 600;
  --text-section-line: 20px;
  --text-row-size: 13px;
  --text-row-weight: 500;
  --text-row-line: 18px;
  --text-meta-size: 12px;
  --text-meta-weight: 500;
  --text-meta-line: 16px;
  --text-label-size: 11px;
  --text-label-weight: 500;
  --text-label-line: 16px;
  --text-label-tracking: 0.04em;

  --radius-control: 6px;
  --radius-container: 8px;
  --radius-pill: 9999px;

  /* neutrals: three surfaces, three inks, two lines; --ink-3 is slate-500 (AA) */
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --surface-muted: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  /* semantic tones: fg, bg and border each; each fg one ramp step darker than
     the preset's (AA), info on the sky ramp, its own hue */
  --success: #15803d;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --info: #0369a1;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;

  /* the one accent: the set a product overrides */
  --accent: #635bff;
  --accent-hover: #5b52e6;
  --accent-ink: #ffffff;

  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06);

  /* shell: sidebar or rail, topbar, gutter, and the touch floor at 390 */
  --shell-sidebar: 260px;
  --shell-rail: 48px;
  --shell-topbar: 64px;
  --shell-gutter: 32px;
  --shell-gutter-phone: 16px;
  --target-min: 44px;
}

/* Dark: the slate ramp inverted, so --surface is the band and --surface-raised
   the panel one step lighter; --ink-3 is lifted until it reads AA on the panel.
   Each tone takes its own ramp: fg -400, bg -950, border -800. No accent token
   here, so a product's :root accent carries into dark. */
[data-theme="dark"] {
  --surface: #020617;
  --surface-raised: #0f172a;
  --surface-muted: #1e293b;
  --ink: #f1f5f9;
  --ink-2: #94a3b8;
  --ink-3: #728299;
  --line: #334155;
  --line-strong: #475569;
  --success: #4ade80;
  --success-bg: #052e16;
  --success-border: #166534;
  --warning: #fbbf24;
  --warning-bg: #451a03;
  --warning-border: #92400e;
  --error: #f87171;
  --error-bg: #450a0a;
  --error-border: #991b1b;
  --info: #38bdf8;
  --info-bg: #082f49;
  --info-border: #075985;
}
