/*
 * Sibilla design tokens. Every color, size and radius of the product is
 * written here and nowhere else: docs/design/check.mjs fails when a color pair
 * stops being readable, or when docs/design/system.md or preview.html disagree
 * with this file.
 *
 * Dark is the default. Light comes from the system preference, and
 * data-theme="light" or data-theme="dark" on any element overrides both.
 */

:root {
	color-scheme: dark;

	--sib-bg: #14171a;
	--sib-surface: #1b1f23;
	--sib-raised: #23282d;
	--sib-border: #31383f;
	--sib-control: #6b7680;
	--sib-text: #eceae4;
	--sib-muted: #a3abb2;
	--sib-primary: #7fb2e5;
	--sib-on-primary: #14171a;
	--sib-link: #7fb2e5;
	--sib-success: #9ccc5a;
	--sib-info: #7fb2e5;
	--sib-warning: #e8b83a;
	--sib-danger: #f0705c;

	/* The banner's two mid tones. They are the same in both themes because a
	   terminal has no theme of ours: they have to be readable on a black and on
	   a white background. */
	--sib-ridge-green: #639036;
	--sib-ridge-blue: #4a7fb5;

	--sib-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--sib-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

	--sib-text-xs: 0.75rem;
	--sib-text-sm: 0.875rem;
	--sib-text-base: 1rem;
	--sib-text-lg: 1.25rem;
	--sib-text-xl: 1.75rem;

	--sib-leading-tight: 1.25;
	--sib-leading: 1.5;
	--sib-weight-normal: 400;
	--sib-weight-bold: 600;

	--sib-space-1: 4px;
	--sib-space-2: 8px;
	--sib-space-3: 12px;
	--sib-space-4: 16px;
	--sib-space-5: 20px;
	--sib-space-6: 24px;
	--sib-space-8: 32px;
	--sib-space-10: 40px;
	--sib-space-12: 48px;

	--sib-radius-sm: 3px;
	--sib-radius: 6px;
	--sib-radius-pill: 999px;

	/* The height of a button and of an input, and the size of a status dot. */
	--sib-control-height: 32px;
	--sib-dot: 8px;

	--sib-focus-width: 2px;
	--sib-focus-offset: 2px;
}

@media (prefers-color-scheme: light) {
	:root {
		color-scheme: light;

		--sib-bg: #faf9f6;
		--sib-surface: #ffffff;
		--sib-raised: #f1efea;
		--sib-border: #dcd9d1;
		--sib-control: #82807a;
		--sib-text: #1c2024;
		--sib-muted: #5a6169;
		--sib-primary: #215f9e;
		--sib-on-primary: #ffffff;
		--sib-link: #215f9e;
		--sib-success: #426b14;
		--sib-info: #215f9e;
		--sib-warning: #855800;
		--sib-danger: #b5311f;
	}
}

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

	--sib-bg: #faf9f6;
	--sib-surface: #ffffff;
	--sib-raised: #f1efea;
	--sib-border: #dcd9d1;
	--sib-control: #82807a;
	--sib-text: #1c2024;
	--sib-muted: #5a6169;
	--sib-primary: #215f9e;
	--sib-on-primary: #ffffff;
	--sib-link: #215f9e;
	--sib-success: #426b14;
	--sib-info: #215f9e;
	--sib-warning: #855800;
	--sib-danger: #b5311f;
}

[data-theme="dark"] {
	color-scheme: dark;

	--sib-bg: #14171a;
	--sib-surface: #1b1f23;
	--sib-raised: #23282d;
	--sib-border: #31383f;
	--sib-control: #6b7680;
	--sib-text: #eceae4;
	--sib-muted: #a3abb2;
	--sib-primary: #7fb2e5;
	--sib-on-primary: #14171a;
	--sib-link: #7fb2e5;
	--sib-success: #9ccc5a;
	--sib-info: #7fb2e5;
	--sib-warning: #e8b83a;
	--sib-danger: #f0705c;
}
