:root {
	/* Color — deep navy/charcoal, warm white, controlled burgundy accent */
	--rd-navy: #12202e;
	--rd-navy-700: #1c3245;
	--rd-bg: #f7f6f3;
	--rd-surface: #ffffff;
	--rd-text: #1a2430;
	--rd-muted: #5c6b78;
	--rd-border: #e2e3df;

	/* Chrome surfaces. These exist because header/hero/inputs previously used
	   hardcoded light values while their text colour came from --rd-text, which
	   inverts under a dark colour scheme — producing near-white text on a
	   near-white bar. Anything painted behind token-coloured text must itself
	   be a token. */
	--rd-header-bg: rgba(247, 246, 243, 0.92);
	--rd-header-border: rgba(18, 32, 46, 0.10);
	--rd-hero-top: #ffffff;
	--rd-input-bg: #ffffff;
	--rd-surface-2: #fbfaf8;
	--rd-navy-tint: rgba(18, 32, 46, 0.04);
	--rd-primary: #7a1f2b;
	--rd-primary-dark: #5c1620;

	/* Accent used as *text* on a page background, as distinct from --rd-primary
	   which is a fill (white sits on it fine in either scheme). The burgundy is
	   only legible as ink on light surfaces: on the dark palette it measures
	   1.60:1, so the dark scheme lightens it to the point where it clears AA on
	   every dark surface while still reading as the same brand colour. */
	--rd-accent-ink: #7a1f2b;
	--rd-accent: #b08a4e;
	--rd-success: #2f6b4f;
	--rd-success-bg: #eaf3ee;
	--rd-error: #a3312a;
	--rd-error-bg: #fbeceb;
	--rd-focus: #1c6dd0;

	/* Type scale (fluid) */
	--rd-fs-h1: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
	--rd-fs-h2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
	--rd-fs-h3: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
	--rd-fs-lead: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
	--rd-fs-body: 1rem;
	--rd-fs-small: 0.9rem;
	--rd-lh-tight: 1.15;
	--rd-lh-body: 1.65;

	/* Spacing scale */
	--rd-space-1: 0.5rem;
	--rd-space-2: 0.75rem;
	--rd-space-3: 1rem;
	--rd-space-4: 1.5rem;
	--rd-space-5: 2rem;
	--rd-space-6: 3rem;
	--rd-space-7: 4.5rem;
	--rd-space-8: 6.5rem;

	/* Layout */
	--rd-max: 1180px;
	--rd-max-prose: 68ch;
	--rd-radius-sm: 8px;
	--rd-radius: 14px;
	--rd-radius-lg: 20px;
	--rd-shadow: 0 16px 40px rgba(18, 32, 46, 0.08);
	--rd-header-height: 76px;

	/* Motion */
	--rd-ease: 200ms ease;
}

/* Dark palette. Applied only when the document asks for it via data-theme,
   never by the operating system's preference.

   Light is the brand's default experience and dark is a deliberate choice the
   visitor makes, so a visitor whose OS is dark must still meet the brand in
   light on a first visit. That is why this is a selector and not
   @media (prefers-color-scheme: dark) — the media query handed the decision to
   the OS. The stored preference is applied by an inline script in <head>
   (inc/enqueue.php) before first paint, so a returning dark user never sees a
   flash of light. */
:root[data-theme="dark"] {
	--rd-bg: #0f1720;
	--rd-surface: #16212c;
	--rd-text: #e9edf1;
	--rd-muted: #9fb0bd;
	--rd-border: #2a3947;
	--rd-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);

	/* 4.85:1 on #16212c, 5.36:1 on #0f1720, 4.52:1 on #1a2733 — AA on every
	   dark surface in the palette, still recognisably the brand burgundy. */
	--rd-accent-ink: #c9737f;

	--rd-header-bg: rgba(15, 23, 32, 0.92);
	--rd-header-border: rgba(233, 237, 241, 0.12);
	--rd-hero-top: #16212c;
	--rd-input-bg: #101b25;
	--rd-surface-2: #1a2733;
	--rd-navy-tint: rgba(233, 237, 241, 0.05);
}
