/* tokens.css — shared design tokens. Corpus's tokens (brand, accent,
   neutrals, status, shape) with the values and dark palette of the approved
   prototype (branch prototype/calendar-grid), plus how much of a User
   type's colour goes into a booked cell. The colours themselves come from
   config, as --ut on the ut-N classes of /usertypes.css.
   Linked as the FIRST stylesheet of every page, never @imported (an @import
   URL carries no build-stamp query and would go stale under the immutable
   /static cache). Custom properties only, no selectors beyond :root.

   Dark mode follows the OS (prefers-color-scheme) unless the root element
   carries data-theme="light" or data-theme="dark". */
:root {
	/* Brand & accent */
	--brand: #1f3a5f;   /* navy — app header background */
	--brand-fg: #ffffff;
	--accent: #1a56c4;  /* the one link/action blue */
	--accent-fg: #ffffff;

	/* Neutrals */
	--fg: #18202b;
	--muted: #5d6673;
	--bg: #f4f6f9;
	--card: #ffffff;
	--border: #dde3ea;
	--hatch: #e9edf2;   /* "Past" / "Not bookable" cells */

	/* Status */
	--error: #c92a2a;
	--success: #22bc66;

	/* User type mixes: a booked cell's fill is --ut-fill of the User type's
	   colour into --card, its text --ut-text of it into --fg. The calendar
	   handler's contrast test reads these values. */
	--ut-fill: 18%;
	--ut-text: 30%;

	/* Shape & type */
	--radius: 6px;
	--radius-pill: 999px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--shadow: 0 8px 28px rgba(16, 28, 45, .18);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--brand: #14273f; --brand-fg: #e9f0f8;
		--accent: #79a6f2; --accent-fg: #0c1624;
		--fg: #e5eaf0; --muted: #9ba7b5; --bg: #0e151e; --card: #16202c; --border: #2a3747; --hatch: #1c2735;
		--error: #ff8787;
		--success: #5cc58a;
		--ut-fill: 30%; --ut-text: 25%;
		--shadow: 0 8px 28px rgba(0, 0, 0, .5);
	}
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--brand: #14273f; --brand-fg: #e9f0f8;
	--accent: #79a6f2; --accent-fg: #0c1624;
	--fg: #e5eaf0; --muted: #9ba7b5; --bg: #0e151e; --card: #16202c; --border: #2a3747; --hatch: #1c2735;
	--error: #ff8787;
	--success: #5cc58a;
	--ut-fill: 30%; --ut-text: 25%;
	--shadow: 0 8px 28px rgba(0, 0, 0, .5);
}
