/*
 * Text-contrast fixes (WCAG 2.1 AA, 4.5:1 for body text) — tokens T4, T9 and T11 from docs/contrast-proposal.md.
 * T1–T3 and T5–T8 are global colour-value edits in the page stylesheets; T10 (glass chips on teal) is edited in place.
 * The rules below are scoped because the same colours pass elsewhere. Loaded last on every page. Brand teal #067b9d unchanged.
 */

/* T4: brand-teal text on light teal tints -> #06799b (visually identical, just over 4.5:1). */
html body .motorit-home-account-head-v1 > span,
html body .motorit-seller-access-menu-head-v1 > span,
html body .motorit-home-magazine-v124-meta > span,
html body .motorit-home-magazine-v124-kicker,
html body .motorit-home-mini-card > span,
html body .motorit-home-more,
html body .motorit-home-ai-icon,
html body .motorit-sr46-modal-card > small,
html body .motorit-vehicle-intelligence-v1__coverage-count > strong,
html body .motorit-vehicle-card > summary > span,
html body .motorit-why__feature-card > span,
html body .motorit-why__eyebrow,
html body .motorit-why__kicker,
html body .mcv2-empty-icon,
html body .msv2-empty-icon { color: #06799b !important; }

/* T9: translucent white text on teal -> rgba(255,255,255,.96). */
html body .motorit-dealer-login__remember, html body .motorit-dealer-login__remember > span,
html body .motorit-dealer-login__secondary, html body .motorit-dealer-login__secondary > p,
html body .motorit-dealer-login__lede, html body .motorit-dealer-login__hub-link,
html body .motorit-private-login__remember, html body .motorit-private-login__remember > span,
html body .motorit-private-login__secondary, html body .motorit-private-login__secondary > p,
html body .motorit-private-login__lede, html body .motorit-private-login__hub-link,
html body .motorit-dealer-register-card > p,
html body .motorit-dealer-register-links > a,
html body .motorit-dealer-register-terms, html body .motorit-dealer-register-terms > span,
html body .motorit-dealer-register-group > label > span,
html body .motorit-private-register-card > p,
html body .motorit-private-register-links > a,
html body .motorit-private-register-terms, html body .motorit-private-register-terms > span,
html body .motorit-recent-hero > p,
html body .motorit-sr46-hero-inner > p,
html body .msv2-hero > p,
html body .mcv2-hero > div > p,
html body .motorit-home-hero-intro,
html body .motorit-why__hero-copy,
html body .motorit-legal__eyebrow,
html body .motorit-vehicle-intelligence-v1__head > p,
html body .motorit-vehicle-price-card__rating > span,
html body .motorit-vehicle-price-card__values > div > span,
html body .motorit-vehicle-price-card__eyebrow,
html body .woocommerce-ResetPassword > div,
html body .motorit-private-reset__hub-link,
html body .motorit-private-reset__lede,
html body .motorit-v8-reset-hub-link,
html body .motorit-v8-reset-lede,
html body .motorit-v8-reset-note,
html body .motorit-login-hub__eyebrow,
html body .motorit-login-hub__lede,
html body .motorit-login-hub__context-label { color: rgba(255, 255, 255, 0.96) !important; }

/* T11: the light-blue "smarter" word in the home hero -> #94d8ff. */
html body .motorit-home-heading-xl > span { color: #94d8ff !important; }

/* ---- Signed-in pages (owner 25 Oct 2026): same method, found and sized by tools/m6/contrast-fix.js ---- */
/* Log out: teal text on a white pill (4.85:1, WCAG AA). Hover / focus / active: teal fill, white text.
   (Update 60: replaced the old crimson contrast workaround.) */
html body .mgh1-logout { background-color: #ffffff !important; color: #067b9d !important; }
html body .mgh1-logout:hover,
html body .mgh1-logout:focus,
html body .mgh1-logout:focus-visible { background-color: #04627e !important; color: #ffffff !important; }
html body .mgh1-logout:active { background-color: #033b4d !important; color: #ffffff !important; }

/* Browser / form accent (checkboxes, radios, range) and keyboard focus ring. */
html { accent-color: #067b9d; }
html body :focus-visible { outline-color: #067b9d; }

/* Selected billing / similar toggles stay filled teal, including :focus (the leaked button:focus rule is :focus, not only :focus-visible). */
html body .mcv3-primary:focus,
html body .mcv3-primary:focus-visible,
html body .mcv3-primary[aria-pressed="true"] { background: #067b9d; background-color: #067b9d; border-color: #067b9d; color: #ffffff; }
html body .mcv3-primary:hover,
html body .mcv3-primary:focus:hover { background: #047b91; background-color: #047b91; border-color: #047b91; color: #ffffff; }
html body .mcv3-primary:active { background: #04627e; background-color: #04627e; border-color: #04627e; color: #ffffff; }

/* Primary Motorit buttons: explicit focus/active so a leftover unscoped button:focus cannot turn them red. */
html body .motorit-btn-primary:focus,
html body .motorit-btn-primary:focus-visible,
html body button.motorit-btn:focus:not(.motorit-btn-secondary) { background: #047b91; border-color: #047b91; color: #ffffff; }
html body .motorit-btn-primary:active,
html body button.motorit-btn:active:not(.motorit-btn-secondary) { background: #04627e; border-color: #04627e; color: #ffffff; }
/* Own message timestamp: opacity .75 -> .8 on the teal bubble. */
html body .motorit-messages-bubble small { opacity: 0.8 !important; }
/* Dealer dashboard hero side card: glass -> T10 chip, text .86 -> .96. */
html body .motorit-i61-shell.motorit-i61-shell .i61-hero-main > aside { background-color: rgba(0, 43, 61, 0.1) !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-hero-main > aside > p { color: rgba(255, 255, 255, 0.96) !important; }
/* Pale pills on the dark dashboard cards were meant to have teal text but a broader rule made it white (invisible);
   the pill rules below restore teal, darkened just enough for the pill. Everything else: smallest same-hue change. */
html body .mcv3-upgrade > p { color: #5c7487 !important; }
html body .motorit-sell__hero-copy > p { color: rgba(255, 255, 255, 0.96) !important; }
html body .motorit-kicker { color: #067899 !important; }
html body .motorit-package-kicker { color: #067899 !important; }
html body .motorit-package-price { color: #067899 !important; }
html body .motorit-package-recommended { color: #067899 !important; }
html body .msv2-benefit > span { color: #62767f !important; }
html body .motorit-garage-section-kicker { color: #047f95 !important; }
html body .motorit-garage-section-actions > button[data-garage-compare-selected] { background-color: #048197 !important; }
html body .motorit-garage-section-actions > button.secondary { color: #04798f !important; }
html body .motorit-messages-thread-meta { color: #5d708b !important; }
html body .motorit-messages-notice > small { color: #627794 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-hero-main > div > span { background-color: rgba(0, 43, 61, 0.1) !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-hero-main > div > p { color: rgba(255, 255, 255, 0.96) !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-hero-main > div > nav > a:not(.is-primary):not(.is-sub) { background-color: rgba(0, 43, 61, 0.1) !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-hero-main > aside > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-head > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-head > em { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-signals > div > span { color: #067798 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-dark > span { color: #067798 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-card > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-priority > a > em { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-mini > div > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-card > div > span { color: #067798 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-card > aside > em { background-color: rgba(0, 43, 61, 0.1) !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-inv-head > div > span { color: #067798 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-inv-grid > div > span { color: #067798 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-live-inventory-head > div > span { color: #067798 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-stock-status { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-stock-title-row > em { color: #067798 !important; }
html body .motorit-i61-shell.motorit-i61-shell .i61-stock-meta > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i63-conv-head > div > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i63-conv-stats > div > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i63-section-title > div > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i63-priority-lead > div > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i63-next-action > span { color: #06799b !important; }
html body .motorit-i61-shell.motorit-i61-shell .i63-workflow > div > span { color: #06799b !important; }
html body .motorit-sell-coach__checklist > span { color: #067b9d !important; }
/* T12 (proposed, same approach as T8; not yet owner-approved): highlighted dealer workspace tab. The old page used
   #0597b1 (Settings, 3.46:1) and #0aa6c2 (Commerce, 2.90:1) behind white text; both fail AA, so the tab uses the brand teal
   #067b9d (4.85:1). Remove these two rules to get the old colours back exactly. */
html body .mc12-nav > a.active.is-active { background: #067b9d !important; border-color: #067b9d !important; }
html body .mc12-nav > a.is-active[href*="workspace=commerce"] { background: #067b9d !important; border-color: #067b9d !important; }
/* T13 (proposed, same approach as T8/T12): Commerce workspace muted text. The old panel's --mcv3-muted #637d90 is
   4.31:1 on white / 4.14:1 on var(--motorit-tint-surface, #f8fbfe) (fails AA for small text); #56707f is 5.1:1 / 4.9:1. Remove to restore the old colour. */
html body .motorit-commerce-v3 { --mcv3-muted: #56707f; }
