/**
 * Kimss Design Tokens — canonical semantic variables (enterprise dark baseline).
 * Consumed by: SPA shell (kh aliases), report theme bridge (report/brand aliases),
 * kimss-ui.css components, Tailwind theme-extend, and marketing/legal pages.
 *
 * Do not hardcode hex colors in product UI; reference these tokens instead.
 */
:root {
  color-scheme: dark;

  /* ── Backgrounds / surfaces ─────────────────────────────── */
  --bg-primary: #0f1226;
  --bg-secondary: #171a33;
  --surface-card: #171a33;
  --surface-raised: #1b1f3a;
  --surface-elevated: #232849;
  --surface-overlay: rgba(15, 18, 38, 0.78);
  --surface-overlay-strong: rgba(15, 18, 38, 0.95);

  /* ── Accent / brand ─────────────────────────────────────── */
  --accent-primary: #6366f1;
  --accent-hover: #818cf8;
  --accent-active: #4f46e5;
  --accent-fill: #4f46e5;
  --accent-fill-hover: #4338ca;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-soft-strong: rgba(99, 102, 241, 0.18);
  --accent-mid: rgba(99, 102, 241, 0.32);
  --accent-ring: rgba(99, 102, 241, 0.22);
  --accent-purple: #8b5cf6;
  --accent-purple-hover: #a78bfa;
  --on-accent: #ffffff;

  /* ── Text ───────────────────────────────────────────────── */
  --text-primary: #eef0fa;
  --text-secondary: #a5accc;
  --text-muted: #959bb5;
  --text-disabled: #6b7280;
  --text-nav-inactive: #8b92b0;
  --text-nav-hover: #d6d9eb;
  --text-section-label: #7b85a8;
  --text-on-brand: #ffffff;
  --text-brand-muted: #e0e7ff;

  /* ── Borders ────────────────────────────────────────────── */
  --border-subtle: #2a2f4a;
  --border-strong: #3a4066;
  --border-focus: #6366f1;
  --border-divider: #232849;
  --border-accent-soft: rgba(99, 102, 241, 0.28);

  /* ── Status ─────────────────────────────────────────────── */
  --status-success: #34d399;
  --status-success-soft: rgba(52, 211, 153, 0.12);
  --status-success-border: rgba(52, 211, 153, 0.3);
  --status-warning: #fbbf24;
  --status-warning-soft: rgba(251, 191, 36, 0.16);
  --status-warning-fg: #fde68a;
  --status-danger: #dc2626;
  --status-danger-hover: #ef4444;
  --status-danger-text: #f87171;
  --status-danger-soft: rgba(220, 38, 38, 0.14);
  --status-info: #7dd3fc;
  --status-info-soft: rgba(125, 211, 252, 0.14);

  /* ── Spacing (4px scale) ────────────────────────────────── */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Radius ─────────────────────────────────────────────── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ── Typography ─────────────────────────────────────────── */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "DM Mono", ui-monospace, "Cascadia Code", monospace;
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;

  /* ── Elevation ──────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 8px 24px rgba(99, 102, 241, 0.18);

  /* ── Motion ─────────────────────────────────────────────── */
  --transition-fast: 120ms ease;
  --transition-base: 180ms ease;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* ── Focus ──────────────────────────────────────────────── */
  --focus-ring: 0 0 0 2px rgba(99, 102, 241, 0.35);
  --focus-ring-offset: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent-primary);

  /* ── Layout chrome (shell) ──────────────────────────────── */
  --header-h: 72px;
  --outer-padding: 20px;

  /* ── Scrollbar ──────────────────────────────────────────── */
  --scrollbar-thumb: rgba(99, 102, 241, 0.35);
  --scrollbar-thumb-strong: rgba(99, 102, 241, 0.5);
}

/* Global interactive state conventions (product UI) */
:where(button, a, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

:where(button, input, select, textarea, .k-btn, .k-switch):disabled,
:where(button, input, select, textarea, .k-btn, .k-switch)[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-disabled);
}
