/* MVN v31: measurable AA text-contrast repairs on the light UI.
 * Scoped fixes retain the existing visual language and do not alter dark mode.
 * Based on automated WCAG 2.1 AA color-contrast checks in isolated QA.
 */

/* Public welcome page: small brand and reassurance text. */
body.mvn-public-v2 .mvn-public-brand small,
body.mvn-public-v2 .mvn-public-assurance p {
    color: #4b6258 !important;
}

/* The bright green accent was unreadable on the white login card. */
body.mvn-humanized .auth-heading .eyebrow {
    color: #1d604a !important;
}

/* App-wide muted text defaults must remain legible on pale surfaces. */
html:not([data-mvn-theme="dark"]) body.mvn-app-body {
    --muted: #52665d;
    --mvn-v3-muted: #52665d;
    --hx-subtle: #52665d;
}

html:not([data-mvn-theme="dark"]) body.mvn-app-body .page-head p,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-access-results-heading p,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-access-editor > summary small,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-profile-editor-meta span,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-profile-picture-control .field > small {
    color: #4b6258 !important;
}

html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-admin5-total span,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-admin5-toolbar time,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-report2-distribution > header > span {
    color: #4e6358 !important;
}

/* The desktop sidebar was changed to white by the visual redesign,
 * but some older selectors still rendered pale text on that surface. */
html:not([data-mvn-theme="dark"]) body.mvn-admin-shell .mvn-nav-heading,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-nav-heading {
    color: #4b6258 !important;
}

html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-side-brand a small,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-side-brand a div small,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-side-user-v3 strong,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-side-user-v3 small {
    color: #27463a !important;
}

/* Remaining WCAG AA failures measured after the first pass. */
body.mvn-public-v2 .mvn-public-card-number,
body.mvn-public-v2 .mvn-public-journey > article > span,
body.mvn-public-v2 .mvn-registration-step:not(.is-active) > span {
    color: #4d6259 !important;
}

body.mvn-public-v2 .mvn-public-matching-grid .mvn-public-eyebrow {
    color: #1b6148 !important;
}

html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-side-footer-v3 a,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-side-footer-v3 a span,
html:not([data-mvn-theme="dark"]) body.mvn-app-body .mvn-side-footer-v3 small {
    color: #385849 !important;
}

/* v32: alternative light palettes, verified by axe with transitions settled. */
html[data-mvn-theme="ocean"] body.mvn-humanized .auth-powered {
    color: #4b6577 !important;
}
html[data-mvn-theme="sand"] body.mvn-app-body .mvn-admin5-completed > div > span,
html[data-mvn-theme="sand"] body.mvn-app-body .mvn-admin5-empty > div > small {
    color: #505c55 !important;
}
