/**
 * Design tokens — single source of truth for colours, type, spacing and shape.
 * Values taken from the validated prototype (docs/prototip.html).
 *
 * Brand colours are also set in BuddyBoss › Theme Options so native
 * BuddyBoss/LearnDash screens use them; keep both in sync.
 */
:root {
	/* Colour: brand */
	--cac-color-brand: #d52b1e;
	--cac-color-brand-hover: #b3241a;
	--cac-color-on-brand: #fff;
	--cac-color-highlight: #ffe91a;

	/* Colour: text */
	--cac-color-text-strong: #000;
	--cac-color-text: #1f1f1f;
	--cac-color-text-secondary: #3a3a3a;
	--cac-color-text-muted: #555;

	/* Colour: surfaces */
	--cac-color-bg: #fff;
	--cac-color-bg-page: #fffdfa; /* Keep in sync with BuddyBoss › Theme Options › Body Background Color */
	--cac-color-bg-subtle: #fff5f0;
	--cac-color-bg-active: #f9d6cf;
	--cac-color-bg-footer: var(--cac-color-bg-subtle);
	--cac-color-bg-band: var(--cac-color-bg-subtle);
	--cac-color-bg-warm: #f3efe9;

	/* Colour: borders */
	--cac-color-border: #e0e0e0;
	--cac-color-border-control: #8a8a8a;

	/* Colour: feedback */
	--cac-color-error: #a51c12;
	--cac-color-error-bg: #fbecea;
	--cac-color-warning: #8a5300;
	--cac-color-success: #1e6b34;
	--cac-color-focus: #000;

	/* Typography */
	--cac-font-family: Arial, Helvetica, sans-serif;
	--cac-font-size-xs: 0.8125rem;
	/* 13px */
	--cac-font-size-sm: 0.875rem;
	/* 14px */
	--cac-font-size-md: 0.9375rem;
	/* 15px */
	--cac-font-size-base: 1rem;
	/* 16px */
	--cac-font-size-lg: 1.0625rem;
	/* 17px */
	--cac-font-size-xl: 1.375rem;
	/* 22px */
	--cac-font-size-lead: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
	/* 17 → 20px */
	--cac-font-size-2xl: clamp(1.625rem, 1.3rem + 1.4vw, 2rem);
	/* 26 → 32px */
	--cac-font-size-3xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
	/* 28 → 40px */
	--cac-font-size-display: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem);
	/* 30 → 44px */
	--cac-font-weight-regular: 400;
	--cac-font-weight-bold: 700;
	--cac-line-height-tight: 1.25;
	--cac-line-height-base: 1.5;

	/* Spacing (4px scale) */
	--cac-space-1: 0.25rem;
	/* 4px */
	--cac-space-2: 0.5rem;
	/* 8px */
	--cac-space-3: 0.75rem;
	/* 12px */
	--cac-space-4: 1rem;
	/* 16px */
	--cac-space-5: 1.25rem;
	/* 20px */
	--cac-space-6: 1.5rem;
	/* 24px */
	--cac-space-8: 2rem;
	/* 32px */
	--cac-space-12: 3rem;
	/* 48px */

	/* Horizontal page padding for full-width bands (header, footer) */
	--cac-gutter: clamp(1rem, 3vw, 2.5rem);
	/* 16 → 40px */
	/* Page container width (tablet and desktop values below) */
	--cac-container-max: 100%;

	/* Content sections (wider side padding) */
	--cac-gutter-section: clamp(1.25rem, 6vw, 5rem);
	/* 20 → 80px */
	--cac-section-padding: clamp(3.5rem, 7vw, 5rem);
	/* 56 → 80px vertical */

	/* Shape */
	--cac-radius-sm: 4px;
	/* controls, buttons */
	--cac-radius-md: 6px;
	/* cards */
	--cac-radius-lg: 8px;
	/* dialogs */
	--cac-radius-pill: 999px;

	/* Sizing */
	--cac-control-height: 3rem;
	/* 48px */
	--cac-target-min: 2.75rem;
	/* 44px */

	/* Focus */
	--cac-focus-width: 2px;
	--cac-focus-offset: 1px;

	/* BuddyBoss overrides */
	--bb-body-background-color: var(--cac-color-bg);
}

/* Tablet */
@media (min-width: 48rem) {
	:root {
		--cac-container-max: 95%;
	}
}

/* Desktop */
@media (min-width: 64rem) {
	:root {
		--cac-container-max: min(90%, 100rem);
	}
}