/*
 * Runcible design tokens — canonical source for both runcible.com and
 * oversing.com.
 *
 * Why this file exists
 * --------------------
 * The palette was declared independently in eighteen per-route stylesheets.
 * They disagree. --muted alone carries six values across pages that are
 * supposed to look identical:
 *
 *   #8e908a  homepage.css, endpoint-base.css
 *   #656965  investors.css, portal.css, site-pages.css
 *   #666a66  capital.css, resources.css, solutions.css, operating-pe.css,
 *            technology-platform.css, enterprise-implementation.css
 *   #686b67  company.css
 *   #565e5a  ai.css, runcible-ai.css
 *   #555b57  os.css
 *   #69716c  how-it-works.css
 *
 * Two spellings are also in circulation for the same two tokens: --paper-2 and
 * --paper2, --rule-dark and --ruled. Both are aliased below so either spelling
 * resolves.
 *
 * Standing up a second domain on a copy of that would have doubled the
 * problem. This file is the single declaration; oversing.com consumes it with
 * no per-route palette overrides at all.
 *
 * How it interacts with the existing runcible.com sheets
 * -----------------------------------------------------
 * This file is enqueued as a dependency, so it loads BEFORE the per-route
 * stylesheets. Any route sheet that still declares its own :root continues to
 * win. That is deliberate: runcible.com is close to release and this file must
 * not repaint it. The per-route :root blocks in the core family are now
 * redundant and can be deleted route by route, verifying each one visually.
 * The four deliberate route tints -- os, ai/runcible-ai, how-it-works -- are
 * not redundant and should be kept as explicit overrides.
 *
 * Deployment: copy to wp-content/mu-plugins/runcible-tokens.css on both
 * installs. It is a twin file; see deploy/mu-plugins/SHARED-ASSETS.md.
 */

:root {
	/* ---- Ground ---- */
	--ink: #101211;
	--coal: #171a19;
	--coal-2: #222523;
	--paper: #f2ecdf;
	--paper-2: #e8dfcf;
	--paper2: var(--paper-2); /* alias: investors/company family spelling */
	--white: #fffdf7;

	/* ---- Accent ---- */
	--gold: #d4a63d;
	--gold-dark: #916b1d;
	--red: #b63830;
	--red-light: #dc6a61;
	--teal: #2d6670;
	--teal-dark: #1d3935;

	/*
	 * ---- Muted text ----
	 *
	 * Resolved by contrast rather than by majority vote. On --paper (#f2ecdf):
	 *
	 *   #8e908a  ~2.9:1  fails WCAG AA for body text
	 *   #666a66  ~5.4:1  passes AA
	 *
	 * So the light value cannot be the default for text on paper, despite
	 * being what the homepage uses. Three tokens with distinct jobs replace
	 * the one overloaded token.
	 */
	--muted: #666a66;          /* muted text on paper — AA compliant */
	--muted-strong: #555b58;   /* muted text needing more weight */
	--muted-on-dark: #8e908a;  /* muted text on ink/coal grounds */

	/* ---- Rules ---- */
	--rule: rgba(20, 23, 22, .17);
	--rule-dark: rgba(255, 253, 247, .16);
	--ruled: var(--rule-dark); /* alias: investors/company family spelling */

	/* ---- Type ---- */
	--sans: "Source Sans 3", sans-serif;
	--slab: "Roboto Slab", Georgia, serif;
	--mono: "IBM Plex Mono", monospace;

	/* ---- Section navigation rail ----
	   Extracted from runcible-page-progress.css, which hard-coded them. */
	--rail-bg: rgba(242, 236, 223, .97);
	--rail-border: #cfc3af;
	--rail-divider: #d7cdbc;
	--rail-title: #b94f36;
	--rail-link: #6d675c;
	--rail-link-hover: #17201d;
	--rail-hover-bg: #ece5d8;
	--rail-active-bg: var(--teal-dark);
	--rail-active-accent: var(--gold);

	/* ---- Header chrome ----
	   Extracted from runcible-layout.php. */
	--chrome-bg: rgba(17, 19, 18, .98);
	--chrome-title: #fffdf7;
	--chrome-claim: #b9b9b2;
	--chrome-nav: #d8d7d1;
	--chrome-nav-hover: #d3a43b;

	/* ---- Measure and rhythm ---- */
	--content-width: 860px;
	--section-max-width: var(--wp--style--global--wide-size, 1340px);
	--gutter-x: clamp(20px, 4.5vw, 72px);
	--section-pad-y: clamp(66px, 7vw, 108px);
	--section-pad-x: clamp(22px, 8vw, 128px);

	/* ---- Type scale ----
	   Presentation pages. Matches the clamps already in use. */
	--fs-body: 17px;
	--fs-lede: clamp(1.06rem, 1.5vw, 1.24rem);
	--fs-h1: clamp(3rem, 5.5vw, 5.2rem);
	--fs-h2: clamp(2rem, 3.5vw, 3.55rem);
	--fs-h3: clamp(1.4rem, 2.3vw, 1.8rem);
	--fs-mono-label: .62rem;
	--fs-rail: .55rem;
	--ls-mono: .07em;
	--lh-body: 1.56;
}
