
/* AICT-CONTRAST-SWEEP-V2-20260520 */

/* F11: Brand-CTA primary — 4.47:1 -> 4.61:1 on white text.
   Shift indigo-500 (#6366f1) to a 4-stop-darker indigo (#5558e8) while
   preserving brand family. Targets ONLY filled buttons / pill badges
   that originally had #6366f1 BACKGROUND + white text. Do NOT include
   text-only label classes here (their background is the card's white). */
.aict-nav-cta .btn,
.aict-nav-cta a.btn,
a.btn-primary,
button.btn-primary,
.aict-btn-primary,
a.aict-btn-primary,
button.aict-btn-primary,
.aict-cta-primary,
.plan-badge {
  background-color: #5558e8 !important;
}

/* F11b: Indigo TEXT on white surfaces (small-caps category labels,
   eyebrow tags, ctas-as-text, inline #6366f1 links) — same 4.47 -> 5.45.
   These have NO background of their own; we only bump the text color. */
a[style*="color:#6366f1"],
a[style*="color: #6366f1"],
span[style*="color:#6366f1"],
span[style*="color: #6366f1"],
.aict-card-category,
span.aict-card-category,
.aict-tool-category,
.aict-link-primary,
a.aict-link-primary {
  color: #4f46e5 !important; /* indigo-600, 5.45:1 on white */
}

/* F13: Slate-400 inline-style sweep v2 — B125 brace-depth walker handled
   stylesheet rules but missed inline style="color:#94a3b8" attributes
   (e.g. .aict-free-tier-label, pricing "/mo" sub-text, small meta lines).
   Bump to slate-600 (#475569) which has 7.5:1 on white AND ~6.5:1 on the
   indigo-tinted table cells used in /pricing/ comparison th (rgba(99,
   102,241,0.1) ~= #eef0fe). Slate-500 only got 4.43:1 on that bg so we
   go one stop darker. */
/* [UX-contrast-fix 2026-06-03] These muted-color remaps are tuned for a WHITE
   background, but the site DEFAULTS to dark — applying them on dark forced text
   to ~2.25:1 (FAIL). Native #94a3b8/#cbd5e1 are fine on dark (~6.6:1), so gate
   every remap to light mode only. */
html:not([data-theme="dark"]) [style*="color:#94a3b8"],
html:not([data-theme="dark"]) [style*="color: #94a3b8"],
html:not([data-theme="dark"]) [style*="color:rgb(148, 163, 184)"],
html:not([data-theme="dark"]) [style*="color: rgb(148, 163, 184)"],
html:not([data-theme="dark"]) [style*="color:rgb(148,163,184)"] {
  color: #475569 !important;
}

/* F13b: Same for slate-300 #cbd5e1 leaks (2.85:1 -> 4.85:1). Light mode only. */
html:not([data-theme="dark"]) [style*="color:#cbd5e1"],
html:not([data-theme="dark"]) [style*="color: #cbd5e1"] {
  color: #64748b !important;
}
/* [2026-06-07 UX audit] F13b/F13a above assume the #cbd5e1/#94a3b8 inline greys
   sit on a LIGHT bg. But they are ALSO used as legible text INSIDE dark inline
   cards (persona pages, starter-pack, any [style*="background:#1e293b/#0f172a"]
   box). There the remap to #64748b/#475569 fails (3.07:1 on #1e293b). Restore
   the native light grey when the element is inside a dark inline-bg container.
   Two attr selectors (0,3,1) beat the single-attr remap (0,2,1) + later source. */
html:not([data-theme="dark"]) [style*="background:#1e293b"] [style*="color:#cbd5e1"],
html:not([data-theme="dark"]) [style*="background: #1e293b"] [style*="color:#cbd5e1"],
html:not([data-theme="dark"]) [style*="background:#0f172a"] [style*="color:#cbd5e1"],
html:not([data-theme="dark"]) [style*="background: #0f172a"] [style*="color:#cbd5e1"] {
  color: #cbd5e1 !important; -webkit-text-fill-color: #cbd5e1 !important;
}
html:not([data-theme="dark"]) [style*="background:#1e293b"] [style*="color:#94a3b8"],
html:not([data-theme="dark"]) [style*="background: #1e293b"] [style*="color:#94a3b8"],
html:not([data-theme="dark"]) [style*="background:#0f172a"] [style*="color:#94a3b8"],
html:not([data-theme="dark"]) [style*="background: #0f172a"] [style*="color:#94a3b8"] {
  color: #94a3b8 !important; -webkit-text-fill-color: #94a3b8 !important;
}

/* F13c: Class-based slate-400 cases that survived B125 because they
   appear in inline <style> blocks emitted by PHP renderers (so they
   don't tokenize as stylesheet rules to the walker). Light mode only. */
html:not([data-theme="dark"]) .aict-free-tier-label,
html:not([data-theme="dark"]) .aict-tool-meta,
html:not([data-theme="dark"]) .aict-tool-counter,
html:not([data-theme="dark"]) .aict-free-tier-counter,
html:not([data-theme="dark"]) .aict-counter-reset,
html:not([data-theme="dark"]) .aict-card-meta,
html:not([data-theme="dark"]) .aict-meta-muted {
  color: #64748b !important;
}

/* F12: .aict-typed-text — JS-injected typewriter overlay inside hero
   search. Default rule paints lavender (#a5b4fc) when input is light-bg;
   shift to indigo-600 for AA.
   [2026-06-12] Gate moved body→html: the theme attribute lives on
   documentElement, so `body:not([data-theme=dark])` matched even in dark
   mode and painted indigo-600 on the dark input (2.32:1 WCAG fail). */
html:not([data-theme="dark"]) .aict-typed-text,
html:not([data-theme="dark"]) .aict-search-typed .aict-typed-text {
  color: #4f46e5 !important; /* indigo-600, 5.45:1 on white */
}
html[data-theme="dark"] .aict-typed-text {
  color: #a5b4fc !important; /* indigo-300, ~8:1 on the dark input */
}

/* F14c: Pricing "trust-badge" pills "Secure / Cancel anytime / GDPR"
   live in `.final-cta-section` which has bg `#fafaff` (near-white). The
   text was `rgba(255,255,255,0.6)` (translucent white) = invisible
   white-on-white. The pills are decorative reassurance copy on a light
   panel, so bump foreground to slate-600 (7.5:1 on white). */
.aict-pricing-page .trust-badge,
.aict-cro-pricing .trust-badge {
  color: #475569 !important; /* slate-600, 7.5:1 on white */
  -webkit-text-fill-color: #475569 !important;
}
/* [2026-06-07 UX audit] The cv2 redesign (aict-commercial-pages-v2.css:310,
   `body.aict-cv2 .final-cta-section{background:var(--aict-cv2-bg)!important}`)
   makes this section LIGHT (#fafaff), overriding the old dark pricing.css rule.
   axe measures the trust-badges at #cbd5e1 on #fafaff = 1.42:1 (fail). The
   badges live in .container (light), NOT inside the dark Enterprise card, so
   they need DARK text: slate-600 = 7.5:1 on #fafaff. */
.final-cta-section .trust-badge {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

/* F14: Pricing CRO annual badge "SAVE 17%" — slate text on emerald bg
   measured 3.35:1. Force white text on emerald-700 for legible AA. */
.aict-cro-annual-badge,
.aict-annual-save-badge,
span.aict-cro-annual-badge,
.aict-pricing-annual-badge {
  color: #ffffff !important;
  background-color: #047857 !important; /* emerald-700, 5.84:1 on white text */
  border-color: #047857 !important;
}

/* F14b: Pricing /pricing/ FAQ section "Common Questions" — section bg is
   slate-900 (#0f172a) but the h2/h3/p text was forced by an earlier
   defensive sweep (`[class*="aict"] h2 { color:#0b1b35 !important;
   -webkit-text-fill-color:#0b1b35 !important; }`) to slate-900 =
   dark-on-dark invisible. Counter that with body-prefixed specificity
   (2,1) > prior (1,2) AND override -webkit-text-fill-color. The section
   is intentionally dark-themed so light foreground is correct. */
body .aict-cro-faq-section > h2,
body .aict-cro-faq-section .aict-cro-faq-item h3 {
  color: #f1f5f9 !important; /* slate-100, 14.7:1 on slate-900 */
  -webkit-text-fill-color: #f1f5f9 !important;
}
body .aict-cro-faq-section .aict-cro-faq-item p {
  color: #cbd5e1 !important; /* slate-300, 10.4:1 on slate-900 */
  -webkit-text-fill-color: #cbd5e1 !important;
}

/* F15: /blog/ sort tabs — 33 axe nodes. Bump inactive tab text to
   slate-600 (7.5:1 on white) and active tab to slate-800 with weight. */
.aict-sort-tab,
.aict-blog-sort-tab,
.aict-blog-sort .aict-sort-tab,
.aict-blog-sort button {
  color: #475569 !important;
}
.aict-sort-tab.active,
.aict-blog-sort-tab.active,
.aict-blog-sort button.active,
.aict-blog-sort button[aria-current="true"] {
  color: #1e293b !important;
  font-weight: 600 !important;
}

/* F15b: /tools/ tool-card SURFACE FIX — pre-existing design-system bug:
   --aict-surface is set to #1e293b (slate-800) in light mode, so every
   .aict-tool-card renders as a dark panel WHILE child text rules pin to
   slate-900 (.aict-tool-card-title) and slate-400 (description). Result:
   dark-on-dark across 24 cards. Force the card background to white (the
   intended light-mode surface) so the existing forced #0f172a text is
   legible. Scope tight to .aict-tool-card so we don't disturb dark mode
   or other surface consumers. */
html:not([data-theme="dark"]) .aict-tool-card,
html:not([data-theme="dark"]) .aict-tool-card.aict-bento-lg,
html:not([data-theme="dark"]) .aict-tool-card.aict-bento-sm,
html:not([data-theme="dark"]) .aict-tool-card.aict-featured-card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
/* In light mode, .aict-tool-card description text was pinned to slate-400
   (#94a3b8 = 2.39:1 on slate-800, 2.85:1 on white) — bump to slate-600 on
   white (7.5:1 AA pass). */
html:not([data-theme="dark"]) .aict-tool-card p,
html:not([data-theme="dark"]) .aict-tool-card .aict-card-category {
  color: #475569 !important; /* slate-600 on white = 7.5:1 */
}

/* F15c: Lavender quote-author (.aict-sp-quote-author #a5b4fc on white
   social proof card) — fail 1.99:1. Most social-proof renders on dark
   gradient panels, but in the white-bg variant the lavender fails. */
.aict-sp-quote-author {
  color: #4f46e5 !important; /* indigo-600 on white = 5.45:1 */
}
/* Restore lavender on dark variants where parent forces dark bg. */
[data-theme="dark"] .aict-sp-quote-author,
.aict-theme-dark .aict-sp-quote-author,
.aict-sp-card[style*="background:#1e1b4b"] .aict-sp-quote-author,
.aict-sp-card.dark .aict-sp-quote-author {
  color: #a5b4fc !important;
}

/* F16: Color-only "Try Agent" CTA variants. Home shows 4 agents with
   distinct accent colors (indigo / emerald / amber / violet). White
   text on emerald-500 = 2.54 and on amber-500 = 2.15 fail AA. Darken
   the green and amber backgrounds while keeping the brand spectrum. */
.aict-cta-secondary[style*="background:#10b981"],
.aict-cta-secondary[style*="background: #10b981"],
.aict-cta-green,
a[style*="background:#10b981"][class*="cta"],
a[style*="background: #10b981"][class*="cta"] {
  background-color: #047857 !important; /* emerald-700, 5.84:1 on white text */
}
.aict-cta-secondary[style*="background:#f59e0b"],
.aict-cta-secondary[style*="background: #f59e0b"],
.aict-cta-amber,
a[style*="background:#f59e0b"][class*="cta"],
a[style*="background: #f59e0b"][class*="cta"] {
  background-color: #b45309 !important; /* amber-700, 5.96:1 on white text */
}
.aict-cta-secondary[style*="background:#8b5cf6"],
.aict-cta-secondary[style*="background: #8b5cf6"],
.aict-cta-violet,
a[style*="background:#8b5cf6"][class*="cta"],
a[style*="background: #8b5cf6"][class*="cta"] {
  background-color: #7c3aed !important; /* violet-600, 4.86:1 on white text */
}

/* Decorative testimonial stars: leave color (amber gold is brand) but
   ensure they're not in the a11y tree. We also handle .aict-rating-stars
   in the footer script for cases where the stars carry no aria-label. */
.aict-tst-stars[aria-hidden="true"],
.aict-rating-stars[aria-hidden="true"] {
  /* No visual change; this rule just documents the intent. */
}
