/* Approved AT-60 foundation. Components use roles and scales; raw channels stay in the palette. */
:root {
	/* Palette */
	--at-palette-brand-50: 241, 244, 255;
	--at-palette-brand-100: 227, 233, 255;
	--at-palette-brand-300: 177, 193, 255;
	--at-palette-brand-400: 143, 168, 255;
	--at-palette-brand-500: 83, 102, 221;
	--at-palette-brand-600: 44, 62, 144;
	--at-palette-brand-700: 36, 52, 122;
	--at-palette-brand-800: 30, 44, 106;
	--at-palette-brand-900: 23, 35, 77;
	--at-palette-neutral-0: 255, 255, 255;
	--at-palette-neutral-50: 245, 247, 251;
	--at-palette-neutral-100: 233, 237, 245;
	--at-palette-neutral-200: 211, 219, 234;
	--at-palette-neutral-300: 171, 184, 206;
	--at-palette-neutral-400: 135, 152, 180;
	--at-palette-neutral-500: 95, 113, 138;
	--at-palette-neutral-600: 77, 95, 123;
	--at-palette-neutral-700: 52, 67, 94;
	--at-palette-neutral-800: 35, 49, 75;
	--at-palette-neutral-900: 20, 31, 53;
	--at-palette-neutral-950: 14, 23, 41;
	--at-palette-success-50: 237, 249, 242;
	--at-palette-success-300: 120, 217, 169;
	--at-palette-success-600: 22, 115, 71;
	--at-palette-success-900: 16, 59, 43;
	--at-palette-info-50: 236, 248, 252;
	--at-palette-info-300: 114, 213, 237;
	--at-palette-info-600: 11, 108, 134;
	--at-palette-info-900: 16, 56, 71;
	--at-palette-warning-50: 255, 247, 229;
	--at-palette-warning-300: 245, 206, 120;
	--at-palette-warning-600: 144, 95, 0;
	--at-palette-warning-900: 60, 44, 20;
	--at-palette-danger-50: 255, 240, 242;
	--at-palette-danger-300: 255, 162, 174;
	--at-palette-danger-600: 165, 45, 64;
	--at-palette-danger-900: 67, 30, 42;
	--at-palette-critical-50: 246, 240, 255;
	--at-palette-critical-300: 198, 171, 255;
	--at-palette-critical-600: 112, 64, 184;
	--at-palette-critical-900: 50, 35, 75;

	/* Shared scales */
	--at-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--at-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	--at-font-size-xs: 0.75rem;
	--at-font-size-sm: 0.875rem;
	--at-font-size-base: 1rem;
	--at-font-size-lg: 1.125rem;
	--at-font-size-xl: 1.25rem;
	--at-font-size-2xl: 1.5rem;
	--at-font-size-3xl: 2rem;
	--at-font-size-4xl: 2.5rem;
	--at-font-weight-regular: 400;
	--at-font-weight-medium: 500;
	--at-font-weight-semibold: 600;
	--at-font-weight-bold: 700;
	--at-line-height-tight: 1.25;
	--at-line-height-compact: 1.4;
	--at-line-height-base: 1.5;
	--at-line-height-relaxed: 1.7;
	--at-space-0: 0rem;
	--at-space-1: 0.25rem;
	--at-space-2: 0.5rem;
	--at-space-3: 0.75rem;
	--at-space-4: 1rem;
	--at-space-5: 1.25rem;
	--at-space-6: 1.5rem;
	--at-space-8: 2rem;
	--at-space-10: 2.5rem;
	--at-space-12: 3rem;
	--at-space-16: 4rem;
	--at-radius-none: 0px;
	--at-radius-sm: 4px;
	--at-radius-md: 8px;
	--at-radius-lg: 12px;
	--at-radius-xl: 16px;
	--at-radius-pill: 9999px;
	--at-duration-fast: 120ms;
	--at-duration-normal: 200ms;
	--at-duration-slow: 300ms;
	--at-gradient-brand: linear-gradient(135deg, rgb(var(--at-palette-brand-800)), rgb(var(--at-palette-brand-600)));
	--at-focus-width: 2px;
}

:root,
[data-bs-theme='light'] {
	/* Color roles */
	--at-color-page: rgb(var(--at-palette-neutral-50));
	--at-color-surface: rgb(var(--at-palette-neutral-0));
	--at-color-surface-subtle: rgb(var(--at-palette-neutral-100));
	--at-color-surface-hover: rgb(var(--at-palette-brand-50));
	--at-color-surface-selected: rgb(var(--at-palette-brand-100));
	--at-color-surface-disabled: rgb(var(--at-palette-neutral-100));
	--at-color-surface-inverse: rgb(var(--at-palette-neutral-950));
	--at-color-overlay: rgba(var(--at-palette-neutral-950), 0.48);
	--at-color-text: rgb(var(--at-palette-neutral-900));
	--at-color-text-muted: rgb(var(--at-palette-neutral-600));
	--at-color-on-accent: rgb(var(--at-palette-neutral-0));
	--at-color-on-inverse: rgb(var(--at-palette-neutral-0));
	--at-color-border: rgb(var(--at-palette-neutral-200));
	--at-color-border-control: rgb(var(--at-palette-neutral-500));
	--at-color-action: rgb(var(--at-palette-brand-600));
	--at-color-action-hover: rgb(var(--at-palette-brand-700));
	--at-color-action-active: rgb(var(--at-palette-brand-800));
	--at-color-link: rgb(var(--at-palette-brand-600));
	--at-color-link-hover: rgb(var(--at-palette-brand-700));
	--at-color-focus: rgb(var(--at-palette-brand-600));
	--at-color-success: rgb(var(--at-palette-success-600));
	--at-color-success-surface: rgb(var(--at-palette-success-50));
	--at-color-info: rgb(var(--at-palette-info-600));
	--at-color-info-surface: rgb(var(--at-palette-info-50));
	--at-color-warning: rgb(var(--at-palette-warning-600));
	--at-color-warning-surface: rgb(var(--at-palette-warning-50));
	--at-color-danger: rgb(var(--at-palette-danger-600));
	--at-color-danger-surface: rgb(var(--at-palette-danger-50));
	--at-color-critical: rgb(var(--at-palette-critical-600));
	--at-color-critical-surface: rgb(var(--at-palette-critical-50));

	/* Data visualization */
	--at-chart-series-1: rgb(var(--at-palette-brand-500));
	--at-chart-series-2: rgb(var(--at-palette-info-600));
	--at-chart-series-3: rgb(var(--at-palette-neutral-600));
	--at-chart-series-4: rgb(var(--at-palette-warning-600));
	--at-chart-series-5: rgb(var(--at-palette-danger-600));
	--at-chart-series-6: rgb(var(--at-palette-critical-600));
	--at-chart-heatmap-empty: rgb(var(--at-palette-neutral-100));
	--at-chart-heatmap-1: rgb(var(--at-palette-brand-100));
	--at-chart-heatmap-2: rgb(var(--at-palette-brand-300));
	--at-chart-heatmap-3: rgb(var(--at-palette-brand-500));
	--at-chart-heatmap-4: rgb(var(--at-palette-brand-600));
	--at-chart-heatmap-5: rgb(var(--at-palette-brand-800));

	/* Elevation */
	--at-shadow-none: none;
	--at-shadow-sm: 0 1px 3px rgba(var(--at-palette-neutral-950), 0.08);
	--at-shadow-md: 0 8px 24px rgba(var(--at-palette-neutral-950), 0.12);
	--at-shadow-lg: 0 16px 48px rgba(var(--at-palette-neutral-950), 0.2);
}

[data-bs-theme='dark'] {
	/* Color roles */
	--at-color-page: rgb(var(--at-palette-neutral-950));
	--at-color-surface: rgb(var(--at-palette-neutral-900));
	--at-color-surface-subtle: rgb(var(--at-palette-neutral-800));
	--at-color-surface-hover: rgb(var(--at-palette-neutral-800));
	--at-color-surface-selected: rgb(var(--at-palette-brand-900));
	--at-color-surface-disabled: rgb(var(--at-palette-neutral-800));
	--at-color-surface-inverse: rgb(var(--at-palette-neutral-100));
	--at-color-overlay: rgba(var(--at-palette-neutral-950), 0.72);
	--at-color-text: rgb(var(--at-palette-neutral-100));
	--at-color-text-muted: rgb(var(--at-palette-neutral-300));
	--at-color-on-accent: rgb(var(--at-palette-neutral-950));
	--at-color-on-inverse: rgb(var(--at-palette-neutral-950));
	--at-color-border: rgb(var(--at-palette-neutral-700));
	--at-color-border-control: rgb(var(--at-palette-neutral-400));
	--at-color-action: rgb(var(--at-palette-brand-300));
	--at-color-action-hover: rgb(var(--at-palette-brand-100));
	--at-color-action-active: rgb(var(--at-palette-brand-400));
	--at-color-link: rgb(var(--at-palette-brand-300));
	--at-color-link-hover: rgb(var(--at-palette-brand-100));
	--at-color-focus: rgb(var(--at-palette-brand-300));
	--at-color-success: rgb(var(--at-palette-success-300));
	--at-color-success-surface: rgb(var(--at-palette-success-900));
	--at-color-info: rgb(var(--at-palette-info-300));
	--at-color-info-surface: rgb(var(--at-palette-info-900));
	--at-color-warning: rgb(var(--at-palette-warning-300));
	--at-color-warning-surface: rgb(var(--at-palette-warning-900));
	--at-color-danger: rgb(var(--at-palette-danger-300));
	--at-color-danger-surface: rgb(var(--at-palette-danger-900));
	--at-color-critical: rgb(var(--at-palette-critical-300));
	--at-color-critical-surface: rgb(var(--at-palette-critical-900));

	/* Data visualization */
	--at-chart-series-1: rgb(var(--at-palette-brand-300));
	--at-chart-series-2: rgb(var(--at-palette-info-300));
	--at-chart-series-3: rgb(var(--at-palette-neutral-300));
	--at-chart-series-4: rgb(var(--at-palette-warning-300));
	--at-chart-series-5: rgb(var(--at-palette-danger-300));
	--at-chart-series-6: rgb(var(--at-palette-critical-300));
	--at-chart-heatmap-empty: rgb(var(--at-palette-neutral-800));
	--at-chart-heatmap-1: rgb(var(--at-palette-brand-900));
	--at-chart-heatmap-2: rgb(var(--at-palette-brand-700));
	--at-chart-heatmap-3: rgb(var(--at-palette-brand-500));
	--at-chart-heatmap-4: rgb(var(--at-palette-brand-400));
	--at-chart-heatmap-5: rgb(var(--at-palette-brand-300));

	/* Elevation */
	--at-shadow-none: none;
	--at-shadow-sm: 0 1px 3px rgba(var(--at-palette-neutral-950), 0.24);
	--at-shadow-md: 0 8px 24px rgba(var(--at-palette-neutral-950), 0.36);
	--at-shadow-lg: 0 16px 48px rgba(var(--at-palette-neutral-950), 0.48);
}
