/**
 * Toner Cable scheme remaps — loads AFTER the plugin's generated schemes.css,
 * so these rules win (guide §3). Only the properties being changed are
 * declared; everything else falls through to the plugin's role→step defaults,
 * which rebrand automatically from the ramps in theme.json.
 *
 * Source: Brand build plan (Chat 0), approved 2026-07-17. Every re-point below
 * is contrast-verified against the Toner Cable ramps — ratios in
 * figma-token-translation.md, which is PROJECT KNOWLEDGE and is NOT a file in
 * this repo; the in-repo record of these ratios is docs/DECISIONS.md and
 * docs/reports/secondary-600-ada.md. Contract-safe: scheme slugs and role names
 * untouched; only which ramp STEP a role points at changes.
 *
 * 2026-08-06: the secondary SOLID block below was withdrawn when secondary-600
 * became #057DB9. Tertiary is untouched and its re-points still stand.
 *
 * Sibling file: assets/css/theme-tokens.css carries the same three DEFAULT
 * scheme re-points (heading/accent/border) on the --color-* bridge names.
 * Change them in both files or not at all.
 */

/* ── Default scheme (:root) — F1/F2/F3 ──────────────────────────────────────
 * heading: neutral-900 → primary-800   navy headings          15.32:1 on white
 * accent:  primary-500 → primary-600   one interactive blue    9.79:1 under white
 * border:  neutral-400 → neutral-500   3:1 non-text fix        4.69:1 on white
 */
:root {
  --ftm-scheme-heading: var(--wp--custom--color--primary--800);
  --ftm-scheme-accent: var(--wp--custom--color--primary--600);
  --ftm-scheme-border: var(--wp--custom--color--neutral--500);
}

/* ── Primary (solid) — the navy header surface ──────────────────────────────
 * bg:          primary-500 → primary-800   brand navy       white text 15.32:1
 * border:      primary-600 → primary-700   visible on 800
 * accent-text: primary-500 → primary-800   on-white-accent text tracks the bg
 * (muted stays primary-100: 12.10:1 on 800 ✓)
 */
.ftm-scheme-primary {
  --ftm-scheme-bg: var(--wp--custom--color--primary--800);
  --ftm-scheme-border: var(--wp--custom--color--primary--700);
  --ftm-scheme-accent-text: var(--wp--custom--color--primary--800);
}

/* ── Primary tonal / subtle — F1 accent alignment only ──────────────────────
 * accent: primary-500 → primary-600 (fills inside tinted sections use the
 * same interactive blue as default; white-on-600 = 9.79:1).
 */
.ftm-scheme-primary-tonal,
.ftm-scheme-primary-subtle {
  --ftm-scheme-accent: var(--wp--custom--color--primary--600);
}

/* ── Secondary (solid) — the 2026-07-17 AA fix, WITHDRAWN 2026-08-06 ────────
 *
 * The three re-points below are gone. They existed only because white on the
 * OLD secondary-600 (#0284C7) measured 4.10:1 and failed AA; the designer moved
 * secondary-600 to #057DB9 for ADA on 2026-08-06 and white on it is 4.53:1,
 * which clears AA for normal text. bg and accent-text therefore fall through to
 * the plugin's own role→step defaults (600 and 600), and border falls back to
 * its default 700 — the step-below-bg relation the 800 re-point only existed to
 * preserve while bg was darkened.
 *
 * ⚠ ONE ROLE REGRESSES AND IS NOT FIXED HERE. `--ftm-scheme-muted` is
 * secondary-100 by plugin default. On the old 700 bg it measured 5.17:1; on the
 * restored 600 bg it measures 3.94:1 and FAILS AA for normal text. No theme
 * markup carries `.ftm-scheme-secondary` today — only the -subtle variant is
 * used — so nothing renders it, and re-pointing muted is a design decision
 * rather than a revert. Recorded in docs/reports/secondary-600-ada.md and on
 * the designer list; fix it before this scheme's first consumer ships.
 */

/* ── Secondary tonal — link AA fix. STAYS. ─────────────────────────────────
 * link: secondary-700 → secondary-800   4.47 (FAIL) → 5.70 ✓ on sky-200
 *
 * This one is NOT part of the F1 family and did not move on 2026-08-06. Its
 * premise is secondary-700 against secondary-200, re-measured that day at
 * 4.4714:1 — still short of 4.5:1. secondary-600 never entered it.
 */
.ftm-scheme-secondary-tonal {
  --ftm-scheme-link: var(--wp--custom--color--secondary--800);
}

/* F5 (media family, 2026-07-23): secondary-subtle is the site's light-blue
   band. bg 50→100 (the mockups BIND secondary/100 — designer intent, not
   drift); text/heading → navy, matching every frame's content colour on this
   surface. Contrast: primary-800 on secondary-100 = 13.35:1 ✓ AAA;
   secondary-600 CTA fill on secondary-100 = 3.94:1 ✓ (non-text 3:1) — the
   fills on this band moved 700 → 600 on 2026-08-06, and the white label on
   them is 4.53:1 ✓.
   Mirror in theme-tokens.css — change both or neither. */
.ftm-scheme-secondary-subtle {
  --ftm-scheme-bg: var(--wp--custom--color--secondary--100, #e0f2fe);
  --ftm-scheme-text: var(--wp--custom--color--primary--800, #0a205b);
  --ftm-scheme-heading: var(--wp--custom--color--primary--800, #0a205b);
}

/* ── Tertiary (solid) — AA fix ──────────────────────────────────────────────
 * bg:          tertiary-600 → tertiary-700   white on emerald-600 is 3.77
 *                                            (FAIL); white on 700 = 5.48 ✓
 * border:      tertiary-700 → tertiary-800
 * accent-text: tertiary-600 → tertiary-700   tracks the bg
 * (muted tertiary-100 on 700 = 4.84 ✓)
 */
.ftm-scheme-tertiary {
  --ftm-scheme-bg: var(--wp--custom--color--tertiary--700);
  --ftm-scheme-border: var(--wp--custom--color--tertiary--800);
  --ftm-scheme-accent-text: var(--wp--custom--color--tertiary--700);
}

/* ── Tertiary tonal — link AA fix ───────────────────────────────────────────
 * link: tertiary-700 → tertiary-800   4.28 (marginal) → 5.99 ✓ on emerald-200
 */
.ftm-scheme-tertiary-tonal {
  --ftm-scheme-link: var(--wp--custom--color--tertiary--800);
}

/**
 * Header band: bg role → primary-600 (Option A, scoped remap).
 *
 * Mockups are canonical for the header surface (#123B9E = primary-600);
 * the GLOBAL primary scheme stays navy primary-800 per Chat-0 / F-decision
 * 2026-07-20. Scope is the header band only. Contrast: white on
 * primary-600 = 9.79 ✓ (translation table §7).
 *
 * Border + accent-text roles keep the global primary-scheme values; only
 * bg is re-pointed. The theme-tokens.css bridge picks this up via its
 * [class*='ftm-scheme-'] remap — no bridge edit needed.
 */
.site-header .ftm-scheme-primary {
	--ftm-scheme-bg: var(--wp--custom--color--primary--600);
}
