/*
 * Pegasus Sync — design token registry.
 *
 * The ONLY file in the plugin allowed to hold colour literals; every other
 * stylesheet references these through var(). That split is what the toolchain
 * enforces (stylelint bans hex outside tokens.css), and it is what makes a
 * palette change one edit instead of a hunt through a thousand lines.
 *
 * It also holds the spacing scale and the reading measure. Those are not
 * colours, but the alternative was a second registry file for four values —
 * and the spacing tokens were already being referenced from three stylesheets
 * without ever having been defined, so every `var(--pgs-gap-sm, 8px)` in the
 * plugin was silently resolving to its fallback.
 *
 * Values track the WordPress admin palette so the plugin looks native rather
 * than pasted on. Scoped to our own roots rather than :root — a plugin has no
 * business redefining custom properties document-wide, where a theme or another
 * plugin could inherit them by accident.
 *
 * Names describe the JOB, not the colour: `--pgs-danger-bg`, never
 * `--pgs-light-red`. A token whose name is its value survives exactly until the
 * first redesign.
 */

.pegasus-page,
.pegasus-erp-card,
.pegasus-qty-unit,
.pegasus-copy,
.pegasus-setup-wizard {
	/* Spacing scale, 4px base. Measured 2026-08-13: the dashboard was using 13
	 * distinct padding values, four of them off any base (3, 5, 9, 18px). */
	--pgs-gap-xs: 4px;
	--pgs-gap-sm: 8px;
	--pgs-gap-md: 12px;
	--pgs-gap-lg: 16px;
	--pgs-gap-xl: 24px;

	/* Reading measure. Body copy ran 169 characters per line at 1440px, which
	 * is more than twice the 45-75 that stays readable — and Greek runs ~25%
	 * longer than the English these components were spaced for. Applies to
	 * prose only; tables and KPI rows keep the full column width. */
	--pgs-measure: 68ch;

	/* Signal palette — green/amber/red/blue, reused across pills, KPI accents,
	 * severity text and card borders. */
	--pgs-ok: #00a32a;
	--pgs-warn: #dba617;
	--pgs-danger: #d63638;
	--pgs-info: #72aee6;
	--pgs-accent: #2271b1;

	/* Text */
	--pgs-text: #50575e;
	--pgs-text-strong: #1d2327;
	--pgs-muted: #646970;
	--pgs-muted-soft: #8c8f94;
	--pgs-text-ok: #0b6623;

	/* Surfaces + borders */
	--pgs-surface: #fff;
	--pgs-surface-alt: #f6f7f7;
	--pgs-surface-sunken: #f0f0f1;
	--pgs-border: #dcdcde;
	--pgs-border-soft: #e0e0e0;
	--pgs-border-strong: #c3c4c7;

	/* Success tints */
	--pgs-ok-bg: #eaf7ec;
	--pgs-ok-bg-alt: #e6f4ea;
	--pgs-ok-bg-soft: #eef9ef;
	--pgs-ok-border: #b7e0bc;
	--pgs-ok-soft: #46a361;
	--pgs-ok-strong: #1f7a3a;
	--pgs-ok-text-strong: #1e6c2f;

	/* Warning tints */
	--pgs-warn-bg: #fff8e5;
	--pgs-warn-bg-soft: #fff8e1;
	--pgs-warn-bg-alt: #fcf3d4;
	--pgs-warn-border: #f0dc8a;
	--pgs-warn-text: #8a6d00;
	--pgs-warn-text-strong: #6a5510;

	/* Danger tints */
	--pgs-danger-bg: #fdecea;
	--pgs-danger-bg-soft: #fcf2f2;
	--pgs-danger-border: #f1b5b7;
	--pgs-danger-strong: #a32020;
	--pgs-danger-text: #9c1016;

	/* Accent tints */
	--pgs-info-bg: #f0f6fc;
	--pgs-accent-bg: #e8edff;
	--pgs-accent-border: #b0c0f5;
	--pgs-accent-strong: #135e96;
	--pgs-accent-text: #1e3e99;

	/* Product-tab panel tints — deeper than the admin ones because they sit on
	 * WooCommerce's own panel background rather than on our cards. */
	--pgs-ok-text-deep: #0a4f1e;
	--pgs-ok-bg-panel: #d1f1d8;
	--pgs-ok-bg-panel-soft: #f6fbf7;
	--pgs-warn-text-deep: #6b4f00;
	--pgs-danger-text-deep: #8a1f1f;
	--pgs-danger-bg-panel: #fde2e1;
	--pgs-border-panel: #a7aaad;

	/* Shadow tints — the alpha channel rides in the token so use sites never
	 * reach for rgb()/rgba(), which the linter bans outside this file. */
	--pgs-shadow: #0000001f;
	--pgs-shadow-soft: #0000000a;
	--pgs-shadow-drop: #00000026;
}
