/*
 * DH Workspace design tokens (2026-10-31): the one source for colour, type, spacing, corners and depth.
 * Loaded first on every page through cfg/head_common.php. Other stylesheets use these variables instead of their own
 * hex values; module variables (--bib-*, --dhc-*, --dhm-*, --impact-*, --media-*, --ql-*) are aliases of them.
 * Direction: "Forest & Lime, quiet canvas". Lime means one thing: where you are (the active menu item and tab, the
 * current step, the loading bar). Contrast figures are WCAG ratios against the surface named.
 *
 * Breakpoints (CSS variables cannot be used in media queries, so they are listed here): Bootstrap's
 *   max-width 575.98px (phones) · 767.98px · 991.98px (sidebar becomes the phone menu; tab bar below 767.98px) ·
 *   1199.98px · 1399.98px, and one narrow-phone tweak at 399.98px. No other widths.
 */
:root,
[data-bs-theme=light] {
	/* Brand */
	--dh-forest: #123f3a;          /* sidebar, headers, launch screen; white on it 11.7:1 */
	--dh-forest-deep: #092c2b;     /* text on lime 10.2:1 */
	--dh-leaf: #22745d;            /* primary actions, links; white on it 5.6:1 */
	--dh-leaf-rgb: 34, 116, 93;
	--dh-lime: #d3df25;            /* signature only; never white text on it (1.5:1) */
	--dh-cream: #f3efe4;
	--dh-paper: #fbfcf8;

	/* Surfaces and content */
	--dh-surface: #fbfcf8;
	--dh-surface-raised: #ffffff;
	--dh-surface-sunken: #f2f5f3;
	--dh-ink: #182321;             /* 15.7:1 on paper */
	--dh-muted: #5e7470;           /* secondary text: 5.0:1 on white, 4.8:1 on paper */
	--dh-muted-strong: #4f625d;    /* secondary text on cream: 5.7:1 */
	--dh-line: #dce4df;
	--dh-on-lime: #092c2b;
	--dh-focus: #22745d;           /* 2px focus ring, 5.6:1 */
	--dh-danger: #a63e35;          /* 6.1:1 on paper */
	--dh-success: #1d6b4f;
	--dh-warning-ink: #7a4e00;

	/* Type: Source Sans Pro for everything people operate; Georgia only for display moments (sign-in, wizard and
	   empty-state headlines, the offline page) and for reading scripture. */
	--dh-font-ui: 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--dh-font-display: Georgia, 'Times New Roman', serif;
	--dh-font-reading: Georgia, 'Times New Roman', serif;
	--dh-text-display: clamp(1.75rem, 1.35rem + 1.6vw, 2.125rem);
	--dh-text-title1: 1.5rem;      /* 24px page titles */
	--dh-text-title2: 1.25rem;     /* 20px card titles */
	--dh-text-headline: 1.0625rem; /* 17px section heads, list primary text */
	--dh-text-body: 1rem;          /* 16px */
	--dh-text-callout: .9375rem;   /* 15px dense desktop tables */
	--dh-text-footnote: .8125rem;  /* 13px meta, timestamps */
	--dh-text-caption: .75rem;     /* 12px badges, tab labels: the floor for any text */

	/* Spacing (4px base), corners, depth */
	--dh-space-1: 4px;
	--dh-space-2: 8px;
	--dh-space-3: 12px;
	--dh-space-4: 16px;
	--dh-space-5: 24px;
	--dh-space-6: 32px;
	--dh-space-7: 48px;
	--dh-radius-sm: 6px;           /* fields, buttons */
	--dh-radius-md: 12px;          /* cards */
	--dh-radius-lg: 20px;          /* sheets, dialogs on phones */
	--dh-radius-pill: 999px;
	--dh-shadow-1: 0 1px 2px rgba(9, 44, 43, .08);
	--dh-shadow-2: 0 12px 32px rgba(9, 44, 43, .18);
	--dh-motion: 150ms ease;
}

[data-bs-theme=dark] {
	--dh-surface: #1a1f1e;
	--dh-surface-raised: #222827;
	--dh-surface-sunken: #151918;
	--dh-ink: #e8ecea;             /* 14.0:1 */
	--dh-muted: #a3b1ad;           /* 7.5:1 */
	--dh-muted-strong: #c2ccc9;
	--dh-line: #33403c;
	--dh-focus: #6cc0a5;           /* 7.7:1 */
	--dh-danger: #f08a80;          /* 6.9:1 */
	--dh-success: #6cc0a5;
	--dh-warning-ink: #f2c46b;
	--dh-shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
	--dh-shadow-2: 0 12px 32px rgba(0, 0, 0, .5);
}

@media (prefers-reduced-motion: reduce) {
	:root { --dh-motion: 0ms linear; }
}
