/* The names every colour and every measure is spelled with. A screen uses the
   names and never a literal, which is what lets ten of them be written at once
   without a second palette turning up in one. Every colour but the accent is
   Material's, and the docs page beside these is drawn from the same set. */
:root {
	--accent: #fd6d13;
	--accent-dim: #e65100;
	--accent-ink: #000000;
	--ground-0: #000000;
	--ground-1: #212121;
	--ground-2: #424242;
	--line: #424242;
	--line-strong: #616161;
	--text: #e0e0e0;
	--text-dim: #9e9e9e;
	--state-recording: #f44336;
	--state-running: #4caf50;
	--state-warning: #ffeb3b;
	--session-open: #8bc34a;
	--failure: #d32f2f;
	--shade: #000000;

	--scrim: rgb(from var(--shade) r g b / 45%);
	--shadow-float: 0 10px 30px rgb(from var(--shade) r g b / 20%);
	--accent-edge: rgb(from var(--accent) r g b / 45%);
	--accent-wash: rgb(from var(--accent) r g b / 10%);
	--state-running-edge: rgb(from var(--state-running) r g b / 45%);
	--state-warning-edge: rgb(from var(--state-warning) r g b / 45%));
	--session-open-edge: rgb(from var(--session-open) r g b / 45%));
	--on-air: var(--accent);
	--font-system: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-ubuntu: "Ubuntu derivative NI-Web", var(--font-system);
	--font: var(--font-ubuntu);
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	--text-scale: 1;
	--fs-mark: 0.625rem;
	--fs-2xs: 0.625rem;
	--fs-xs: 0.75rem;
	--fs-s: 0.8125rem;
	--fs-m: 0.9375rem;
	--fs-l: 1.0625rem;
	--fs-xl: 1.1875rem;
	--fs-2xl: 1.3125rem;
	--fs-3xl: 1.5rem;
	--gap-1: 4px; --gap-2: 8px; --gap-3: 12px; --gap-4: 16px; --gap-5: 24px;
	--radius-sm: 2px;
	--radius: 6px;
	--radius-lg: 10px;
	--radius-pill: 999px;
	--bar-height: 52px;
	--content-width: 60rem;
	--content-pad-y: var(--gap-4);
	--content-pad-x: var(--gap-4);
	--control-height: 36px;
	--tap-height: 44px;
	--dock-height: calc(var(--tap-height) + 2 * var(--gap-1) + 1px);
	--focus-ring: 2px solid var(--accent);
	--focus-offset: 2px;
	--media-ground: #000;
}

/* The face the device draws everything else in, chosen in this browser
   (app/ui/font.js). Without the attribute the page is drawn in Ubuntu. */
:root[data-font="system"] {
	--font: var(--font-system);
}

@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) {
		--accent: #01579b;
		--accent-dim: #0d47a1;
		--accent-ink: #ffffff;
		--ground-0: #f5f5f5;
		--ground-1: #ffffff;
		--ground-2: #eceff1;
		--line: #cfd8dc;
		--line-strong: #607d8b;
		--text: #212121;
		--text-dim: #546e7a;
		--state-recording: #c62828;
		--state-running: #1b5e20;
		--state-warning: #795548;
		--session-open: #00796b;
		--failure: #c62828;
		--shade: #212121;
		color-scheme: light;
	}
}
:root[data-theme="light"] {
	--accent: #01579b;
	--accent-dim: #0d47a1;
	--accent-ink: #ffffff;
	--ground-0: #f5f5f5;
	--ground-1: #ffffff;
	--ground-2: #eceff1;
	--line: #cfd8dc;
	--line-strong: #607d8b;
	--text: #212121;
	--text-dim: #546e7a;
	--state-recording: #c62828;
	--state-running: #1b5e20;
	--state-warning: #795548;
	--session-open: #00796b;
	--failure: #c62828;
	--shade: #212121;
	color-scheme: light;
}

:root { font-size: calc(100% * var(--text-scale)); }
