/*
 * L2 SURVIVAL SHIM — --pix-* compatibility aliases
 * =================================================
 * ONE copy. This is the only place these tokens are declared. See TOKEN-CONTRACT.md §1.
 *
 * WHY THIS FILE EXISTS
 * The `solutech` theme generated the whole --pix-* layer at RUNTIME, from
 * wp-admin/admin-ajax.php?action=dynamic_styles (handle `pixtheme-dynamic-styles-css`) as a :root{}
 * rule that exists in no .css file on disk. Deactivating solutech deletes the entire layer. Six of
 * those tokens are consumed by PLUGIN assets that survive the switch byte-intact and declare NO
 * fallback, so their declarations become invalid -> unset -> transparent. Measured on the live site:
 * `.research-card-content` goes rgb(136,136,234) -> rgba(0,0,0,0) on 7 cards whose titles stay
 * #ffffff. White on nothing, with every byte of plugin CSS correct.
 *
 * CONSUMERS (verified by grep of every .css/.php/.js/.scss under wp-content/plugins + uploads,
 * on prod, 2026-08-11; both plugins are ACTIVE and enqueue these unconditionally):
 *   --pix-main-color             ai-chatboxes/css/research-cards.css:79
 *                                ai-chatboxes/public/css/aic-tabs.css:92,230,231,234
 *                                ai-chatboxes/public/css/rp-tabs.css:90,209,210,213
 *   --pix-main-color-lighter-2x  ai-chatboxes/css/research-cards.css:87   (card hover)
 *   --pix-black-color-lighter    ai-chatboxes/css/research-cards.css:140  (modal surface)
 *   --pix-font-color             pix-settings/assets/css/pix-styles.css:21
 *   --pix-main-color-hex         pix-settings/assets/lib/vanillaSelectBox/pixVanillaSelectBox.css:13
 *   --pix-main-font              ai-chatboxes/public/js/aic-ai-chat.js:2150,2160,2176,2320,2328
 *                                ai-chatboxes/patch_input_height2.php:18,41   (injected from JS)
 *
 * VALUES are the live `:root` values, captured from
 * https://vania-novikau.me/wp-admin/admin-ajax.php?action=dynamic_styles&pageID=1952 on 2026-08-11.
 *
 * The var(--wp--preset--…, literal) form keeps theme.json as the single source of truth (WordPress
 * 7.0.3 emits --wp--preset--* on :root here, verified in global-styles-inline-css, so the reference
 * resolves). The literal is insurance: a wp_global_styles user-layer row replaces a preset family
 * WHOLESALE, which would otherwise empty the alias and reproduce the exact bug this file prevents.
 * tools/g2-token-drift.mjs is RED if a literal here disagrees with theme.json.
 */

:root {
	/* brand purple — 8 no-fallback declarations across 3 surviving sheets */
	--pix-main-color: var(--wp--preset--color--brand, #8888ea);

	/* research-card hover caption */
	--pix-main-color-lighter-2x: var(--wp--preset--color--brand-lightest, #A0A0FF);
	--pix-button-color:          var(--wp--preset--color--brand, #8888ea);
	--pix-button-color-lighter:  var(--wp--preset--color--brand-lightest, #A0A0FF);
	--pix-buttons-shadow:        0px 5px 15px 0px rgba(0, 0, 0, 0.15);

	/* research modal surface */
	--pix-black-color-lighter: var(--wp--preset--color--surface-dark, #181818);

	/* pix-settings calculator field text */
	--pix-font-color: var(--wp--preset--color--ink-soft, #444444);

	/* NOT A COLOUR. An RGB triple, consumed as rgba(var(--pix-main-color-hex), .15).
	 * Aliasing this to #8888ea yields rgba(#8888ea,.15) -> invalid -> silently dropped,
	 * i.e. "fixed" and still broken. It must stay a bare triple, so it cannot reference a
	 * preset; g2-token-drift.mjs asserts it equals the `brand` swatch. */
	--pix-main-color-hex: 136, 136, 234;

	/* consumed from JavaScript as an inline style on the chat UI; 6 of its 7 uses
	 * have no fallback, and a grep limited to .css cannot see any of them */
	--pix-main-font: var(--wp--preset--font-family--jost, "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

/*
 * NOT ALIASED, ON PURPOSE — recorded so the next reader does not "restore" them.
 * The live :root declared 84 --pix-* properties. The other 78 are referenced ONLY by
 * solutech's own stylesheets, which are removed by the same switch that removes the tokens.
 * Aliasing them would resurrect a dead vocabulary and invite new code to bind to it.
 * Two are image URLs into the deleted theme directory and would 404 if kept:
 *   --pix-svg-search, --pix-svg-loader, --pix-decor-img
 *     -> .../themes/solutech/images/{svg/search-white.svg,decor.svg}
 */

/* =============================================================================
 * ROOT FONT SIZE — the token that makes every rem match the reference
 * -----------------------------------------------------------------------------
 * The reference sets `html, .root { font-size: var(--pix-font-size) }` and
 * resolves it to 18px. Here `--pix-font-size` was never ported, nothing set a
 * root size at all, and `html` fell back to the browser default of 16px.
 *
 * That is a 12.5% error on EVERY rem on the site, which is why the post page
 * read as "close but not right" rather than as one broken rule. Measured on
 * /kant-main7-time-inner-sense/ before this:
 *
 *     html font-size            reference 18px   here 16px
 *     .aic-child-content        36px             32px      <- identical `padding: 2rem`
 *
 * The chatbox stylesheet is BYTE-IDENTICAL between the two sites
 * (aic-l1-styles.css, md5 404d3cf37ab0) — the whole difference came from what a
 * rem was worth. Anything sized in px was unaffected, which is why the header
 * and the section bands measured correctly all along.
 *
 * `body` is left alone: it already computes to 18px on both sites from the
 * theme's own typography, so it was never the discrepancy.
 * ========================================================================== */

:root {
	--pix-font-size: 18px;
}

html {
	font-size: var(--pix-font-size);
}
