/* =========================================================================
   Dimopedia v2 — design tokens (T006 / T007)

   Layer 1 of 2. main.css consumes these only through var(--dp-*).
   Loaded AFTER GeneratePress' own structural CSS (dep: 'generate-style').

   Model (unchanged from dimopedia-child):
   - header + footer are a CONSTANT navy brand bar in both appearances;
     only body / cards / article surfaces switch with [data-theme].
   - light is the default for first-time visitors; dark only when the
     visitor has explicitly chosen it (localStorage 'dp-theme' = 'dark').
   - system font stacks only — ZERO @font-face / Google Fonts (CWV).
   ========================================================================= */

:root {
	/* --- brand constants (identical in light + dark) --- */
	--dp-navy: #17212e;
	--dp-navy-ink: #0f161f;

	/* --- accent (terracotta) --- */
	--dp-accent: #d97d3d;
	--dp-accent-hover: #c46a2e;
	--dp-accent-soft: #f7e4d6;

	/* --- surfaces / text (light) --- */
	--dp-bg: #ffffff;
	--dp-bg-alt: #f6f4ef;
	--dp-card-bg: #ffffff;
	--dp-text: #1b2530;
	--dp-text-muted: #5b6472;
	--dp-border: #e6e2d8;
	--dp-shadow: 0 1px 2px rgba(23, 33, 46, 0.06), 0 4px 16px rgba(23, 33, 46, 0.06);

	/* --- on-navy foreground (constant) --- */
	--dp-on-navy: #f2efe9;
	--dp-on-navy-muted: #c9cdd4;

	/* --- type --- */
	--dp-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--dp-font-mono: ui-monospace, "JetBrains Mono", "SF Mono", "Fira Code", Consolas, "Roboto Mono", monospace;
	--dp-lh-body: 1.7;
	--dp-lh-tight: 1.25;

	/* modular scale, ~1.20 ratio, 16px base */
	--dp-fs-xs: 0.79rem;   /* meta, badges */
	--dp-fs-sm: 0.9rem;
	--dp-fs-base: 1rem;
	--dp-fs-md: 1.08rem;   /* article body */
	--dp-fs-lg: 1.25rem;
	--dp-fs-xl: 1.5rem;
	--dp-fs-2xl: 1.9rem;
	--dp-fs-3xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.6rem); /* article H1 */

	/* --- spacing (4px base) --- */
	--dp-sp-1: 0.25rem;
	--dp-sp-2: 0.5rem;
	--dp-sp-3: 0.75rem;
	--dp-sp-4: 1rem;
	--dp-sp-5: 1.5rem;
	--dp-sp-6: 2rem;
	--dp-sp-7: 3rem;
	--dp-sp-8: 4rem;

	/* --- radius --- */
	--dp-radius: 14px;
	--dp-radius-sm: 8px;
	--dp-radius-pill: 999px;

	/* --- layout --- */
	--dp-measure: 720px;   /* article reading column */
	--dp-wide: 1100px;     /* hub / homepage grids, TOC rail breakpoint */
	--dp-toc-w: 240px;     /* desktop right-rail TOC width */
}

/* Dark: redefine colour roles only. Navy + accent + type + spacing +
   radius + layout are unchanged. Guarded so an explicit light choice
   ([data-theme="light"]) still wins. */
:root[data-theme="dark"] {
	--dp-bg: #10151c;
	--dp-bg-alt: #161d26;
	--dp-card-bg: #161d26;
	--dp-text: #e7e9ec;
	--dp-text-muted: #9aa4b2;
	--dp-border: #263041;
	--dp-accent: #e8935a;
	--dp-accent-hover: #f2a876;
	--dp-accent-soft: rgba(232, 147, 90, 0.16);
	--dp-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.35);
}
