/* tokens.css — "Paper & Ink" design tokens, ported 1:1 from IAppsSigner/Utilities/Theme.swift.
   Do not add colours here that are not in Theme.swift. No gradients, no glow, no pastel washes. */

:root {
	/* Colour: light (default) */
	--paper: #F6F5F1;
	--surface: #FFFFFF;
	--surface-raised: #F2F1ED;
	--stroke: #E6E4DD;
	--stroke-strong: #D1CFC8;
	--ink: #141414;
	--ink-secondary: #6B6B66;
	--ink-tertiary: #9E9E99;
	--accent: #2545E8;
	--accent-text: #2545E8;
	--on-accent: #FFFFFF;
	--success: #10714B;
	--warning: #8F5A00;
	--danger: #B8271D;

	/* Radii — Theme.Radius (always continuous) */
	--r-card: 16px;
	--r-control: 12px;
	--r-chip: 8px;

	/* 4pt grid — Theme.Spacing */
	--sp-xs: 4px;
	--sp-sm: 8px;
	--sp-md: 12px;
	--sp-lg: 16px;
	--sp-xl: 20px;
	--sp-xxl: 24px;
	--sp-xxxl: 32px;

	/* Type */
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	--hairline: 1px;
	--max-w: 1180px;

	color-scheme: light;
}

/* Colour: dark — system default */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #0E0F12;
		--surface: #17181C;
		--surface-raised: #222328;
		--stroke: #26282E;
		--stroke-strong: #383A41;
		--ink: #F2F2F0;
		--ink-secondary: #9E9E99;
		--ink-tertiary: #6B6B68;
		--accent: #2545E8;
		--accent-text: #94A7FF;
		--success: #4CD196;
		--warning: #F5B041;
		--danger: #FF6B5E;
		color-scheme: dark;
	}
}

/* Colour: dark — explicit toggle wins either direction */
:root[data-theme="dark"] {
	--paper: #0E0F12;
	--surface: #17181C;
	--surface-raised: #222328;
	--stroke: #26282E;
	--stroke-strong: #383A41;
	--ink: #F2F2F0;
	--ink-secondary: #9E9E99;
	--ink-tertiary: #6B6B68;
	--accent: #2545E8;
	--accent-text: #94A7FF;
	--success: #4CD196;
	--warning: #F5B041;
	--danger: #FF6B5E;
	color-scheme: dark;
}

:root[data-theme="light"] {
	color-scheme: light;
}
