/* ===========================================================================
 * Life Surge — WCAG 2.2 AA contrast: LAYER B, global palette override
 * ===========================================================================
 *
 * Source palette read from wp-content/uploads/elementor/css/post-7.css (kit 7)
 * on 2026-08-21.
 * Audit run: run_20260821_012338_c1d1868d
 *
 * Every replacement below is the SMALLEST HSL-lightness change that reaches
 * 4.5:1 against #FFFFFF, with hue and saturation held constant — so each colour
 * reads as the same brand colour, slightly darker. Ratios were computed with the
 * WCAG relative-luminance formula and independently re-measured.
 *
 * DEFAULT: ON. Suppress for one request with ?lsa-contrast=on while logged in,
 * or site-wide with  define( 'LSA_CONTRAST_AA_PALETTE_OFF', true );
 *
 * ---------------------------------------------------------------------------
 * WHAT TO REVIEW BEFORE SIGN-OFF
 *
 * These tokens are not used only for text. The same --e-global-color-accent may
 * be a heading colour on one widget and a background or icon fill on another,
 * where the current value already passes and shifting it is a visible design
 * change with no accessibility benefit. Review what each token is used for
 * before enabling site-wide.
 *
 * ---------------------------------------------------------------------------
 * SELECTOR NOTE
 *
 * VERIFIED on this install: the palette is defined in
 *   wp-content/uploads/elementor/css/post-7.css
 * on the selector `.elementor-kit-7` — specificity 0,1,0.
 *
 * A bare `[class*="elementor-kit-"]` is ALSO 0,1,0, i.e. an exact tie with
 * Elementor's own rule, which means the winner would be decided by load order
 * alone. That is too fragile to rely on: any plugin or cache layer that reorders
 * stylesheets would silently switch the palette back and the site would quietly
 * fail its own audit.
 *
 * So the selector list below deliberately mixes specificities. A selector list
 * applies the block at each selector's OWN specificity, so listing a
 * higher-specificity member costs no duplication and makes the override
 * order-independent:
 *
 *   :root                                  0,1,0  — Elementor versions that use :root
 *   body                                   0,0,1  — cheap catch-all
 *   [class*="elementor-kit-"]              0,1,0  — ties, wins on order
 *   html [class*="elementor-kit-"]         0,1,1  — beats the kit outright
 *   html body[class*="elementor-kit-"]     0,1,2  — beats it whether the class is
 *                                                   on <body> or a wrapper
 *
 * No !important needed — custom properties inherit, so redefining them on an
 * ancestor is enough. Keeping !important out of Layer B is deliberate: an
 * individual widget that legitimately overrides a colour locally should still
 * be able to.
 * =========================================================================== */

:root,
body,
[class*="elementor-kit-"],
html [class*="elementor-kit-"],
html body[class*="elementor-kit-"] {

  /* --------------------------------------------------------------------------
   * accent — the meta-text grey. The single highest-impact change here.
   * Very likely what sits behind elementor-post-date, elementor-post__badge,
   * elementor-post__read-more and elementor-icon-box-description.
   *
   *   #A8AAAD  2.33:1  FAIL
   *   #73767B  4.56:1  PASS      lightness -0.202  (visibly darker)
   * ------------------------------------------------------------------------ */
  --e-global-color-accent: #73767b;

  /* Same value under a second token id — Elementor duplicates these when a
   * colour is added twice in the editor. Both must move together or the two
   * halves of the site diverge. */
  --e-global-color-686157b: #73767b;

  /* --------------------------------------------------------------------------
   * primary / 436fed4 — brand blue. Fails normal text by a hair (needs 4.5),
   * already passes large text and non-text UI (3:1). The correction is 0.03
   * lightness — imperceptible side by side.
   *
   *   #2185C7  4.00:1  FAIL normal text / PASS large
   *   #1F7CBA  4.52:1  PASS on white, FAIL 3.82:1 on #ececec
   *   #1C70A9  4.51:1  PASS on #ececec (worst case) and 5.33:1 on white
   *                  lightness -0.070 from original
   * ------------------------------------------------------------------------ */
  --e-global-color-primary: #1c70a9;
  --e-global-color-436fed4: #1c70a9;

  /* --------------------------------------------------------------------------
   * 920a0f6 — pure red. Same story: marginal fail, tiny correction.
   *
   *   #FF0000  4.00:1  FAIL
   *   #EE0000  4.53:1  PASS      lightness -0.033
   * ------------------------------------------------------------------------ */
  --e-global-color-920a0f6: #ee0000;

  /* --------------------------------------------------------------------------
   * 662bab2 — success green.
   *
   *   #2ECC71  2.10:1  FAIL
   *   #1F874B  4.54:1  PASS      lightness -0.165  (visibly darker)
   * ------------------------------------------------------------------------ */
  --e-global-color-662bab2: #1f874b;
}

/* ===========================================================================
 * NOT CHANGED — deliberate
 * ===========================================================================
 *
 * --e-global-color-b1a61cf: #FCFF00   1.08:1 on white
 *
 *   Bright yellow. As body text on a light background this is unreadable, and
 *   there is no small correction: reaching 4.5:1 requires #7A7B00, an olive that
 *   is not the same colour. That is a design decision, not an automated fix.
 *
 *   Two legitimate routes:
 *     - keep the yellow and only ever use it on a dark background
 *       (#FCFF00 on #000000 is 19.4:1 — excellent), or
 *     - pick a replacement accent with the design team.
 *
 *   Uncomment only if the olive has been approved:
 *   --e-global-color-b1a61cf: #7a7b00;   4.51:1
 *
 * --e-global-color-0eaaca7: #FFFFFF
 *
 *   White. Flagged by a naive palette-vs-white test, but white text is used on
 *   dark backgrounds where it is correct. Changing it would break far more than
 *   it fixes. Left alone.
 *
 * --e-global-color-095dc5e  #B80801   6.83:1  already passes
 * --e-global-color-2ed2a61  #004E84   8.67:1  already passes
 * --e-global-color-secondary #004E84  8.67:1  already passes
 * --e-global-color-text     #000000  21.00:1  already passes
 * --e-global-color-66c0cd9  #000000  21.00:1  already passes
 * =========================================================================== */
