/** * themes.ts — wiring:c1 theme registry + application engine. * * A "theme" is a palette-only preset: a map of `--fe-*` CSS custom * properties in TWO variants (light + dark). Picking a theme is fully * independent from the light/dark MODE — the mode (config.theme prop / * OS preference) keeps deciding which variant of the selected theme is * active, exactly like the stock palette in styles/variables.css. * * Application strategy (two cooperating layers): * * 1. Inline `--fe-*` variables on the explorer ROOT element * (`applyThemeToEl`) — the documented "consumer overrides by setting * --fe-* on a higher scope" philosophy, resolved to the currently * active variant. Covers the whole `.fe` subtree, works in embeds * without touching the host page's own theme. * * 2. A singleton injected `