/* MVN v32: user-selected dark theme legibility.
 * Verified in isolated browser across WCAG automated cases.
 * Last-loaded skin preserves independent light-theme styling.
 */
html[data-mvn-theme="dark"] body {
    --hx-ink: #e8f5ed;
    --hx-muted: #c1d2c7;
    --hx-subtle: #b9cec3;
    --hx-surface: #182522;
    --hx-surface-soft: #21342c;
    --hx-surface-muted: #253b32;
    --hx-border: #40584d;
    --mvn-v3-text: #e8f5ed;
    --mvn-v3-text-soft: #c8dacd;
    --mvn-v3-muted: #bdd2c5;
    --mvn-v3-surface: #182522;
    --mvn-v3-surface-soft: #21342c;
    --mvn-v3-primary: #a4e9bb;
    --mvn-v3-primary-700: #b0ecc3;
    --mvn-v3-primary-50: #21392f;
    --mvn-v3-border: #425f51;
    --muted: #c5d6cc;
    --ink: #e8f5ed;
    color: #e8f5ed;
    background: #101917;
}
html[data-mvn-theme="dark"] body.mvn-public-v2,
html[data-mvn-theme="dark"] body.mvn-public-v2 :is(
    .mvn-public-header,.mvn-public-hero,.mvn-public-journey,
    .mvn-public-section,.mvn-public-card,.mvn-public-journey article,
    .mvn-public-matching-grid,.mvn-public-assurance,.mvn-registration-progress,
    .mvn-registration-panel,.mvn-public-secondary,.mvn-public-brand,
    .mvn-public-journey > article,.mvn-public-shell
) {
    background-color: #182522 !important;
    border-color: #40584d !important;
}
html[data-mvn-theme="dark"] body.mvn-public-v2 :is(
    h1,h2,h3,h4,p,small,span,strong,em,label,dt,dd,li
) {
    color: #e5f4eb !important;
}
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-public-brand small,
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-public-matching-grid .mvn-public-eyebrow {
    color: #aee8c7 !important;
}
html[data-mvn-theme="dark"] body.mvn-public-v2 :is(
    .mvn-public-primary,.mvn-public-apply
) {
    color: #fff !important;
    background: #155c42 !important;
    border-color: #155c42 !important;
}
html[data-mvn-theme="dark"] body.mvn-public-v2 :is(
    .mvn-public-secondary,.mvn-public-signin,.mvn-registration-step
) {
    color: #ebf7f0 !important;
    background-color: #24362e !important;
    border-color: #486353 !important;
}
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-registration-step.is-active {
    background: #25483a !important;
}

/* Guest authentication cards and language selector. */
html[data-mvn-theme="dark"] body.mvn-humanized :is(
    .auth-heading h1,.auth-heading h2,.auth-card label,
    .auth-card small,.auth-card p,.auth-card strong,
    .auth-brand h2,.auth-brand p,.auth-brand strong,.auth-brand-title
) {
    color: #e9f5ee !important;
}
html[data-mvn-theme="dark"] body.mvn-humanized .auth-heading .eyebrow {
    color: #b6efcd !important;
}
html[data-mvn-theme="dark"] body :is(
    .mvn-language-current,.mvn-language-current-code,
    .mvn-language-menu,.mvn-language-list
) {
    background: #20352b !important;
    color: #e6f6ec !important;
    border-color: #486456 !important;
}

/* Consistent dark application containers. */
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    .mvn-side,.mvn-side-brand,.mvn-top,.mvn-top-v3,.mvn-side-footer-v3,
    .mvn-page-context,.mvn-side-user-v3,.mvn-side-nav,
    .mvn-admin5-card,.mvn-admin5-kpi,
    .mvn-access-user-card,.mvn-access-editor,.mvn-report2-distribution,
    .mvn-profile-side-card,.mvn-profile-edit-section,
    .mvn-platform-card,.mvn-webhook-card,
    .mvn-platform-page .card,.mvn-dash-card,
    .card,.mvn-card,.table-wrap
) {
    background-color: #182522 !important;
    border-color: #40584d !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-brand,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-footer-v3 {
    background: #14241e !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    .mvn-side-brand strong,.mvn-side-brand small,.mvn-side-user strong,
    .mvn-side-user small,.mvn-side-footer a,.mvn-side-footer a span,
    .mvn-side-footer small,.mvn-nav-heading,.mvn-nav-label,
    .mvn-nav-link,.mvn-nav-disclosure-v3 summary
) {
    color: #e2f2e8 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-content-v3 :is(
    h1,h2,h3,h4,p,span,small,strong,label,li,dt,dd,summary,
    time,.mvn-eyebrow,.mvn-kicker,.mvn-page-context strong
) {
    color: #e5f3ea !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-content-v3 :is(
    input,select,textarea
) {
    color: #e8f5ed !important;
    background: #182522 !important;
    border-color: #496253 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-content-v3 :is(
    button,.btn,a
) {
    color: #e8f5ed !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    .mvn-appearance-panel,.mvn-user-menu,
    .mvn-user-popover,.mvn-language-current
) {
    background: #182522 !important;
    color: #e8f5ed !important;
    border-color: #496253 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-readiness-ring,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-edit-section-head > span {
    color: #e8f5ed !important;
}
/* Follow-up fixes for nested legacy light surfaces. */
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-public-menu nav a,
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-public-signin,
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-registration-step span,
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-public-journey a {
    color: #e8f5eb !important;
}
html[data-mvn-theme="dark"] body.mvn-public-v2 .mvn-registration-step:not(.is-active) span {
    color: #d2e7d9 !important;
}
html[data-mvn-theme="dark"] body.mvn-humanized :is(.auth-card .btn-light,.auth-card .btn-green,.auth-card .mvn-closed-registration) {
    background: #1c352b !important;
    border-color: #456351 !important;
    color: #e9f5ed !important;
}
html[data-mvn-theme="dark"] body.mvn-humanized .auth-card a {
    color: #b8f1d2 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    .mvn-access-user-summary,
    .mvn-access-user-summary .mvn-user-identity,
    .mvn-access-counts,
    .mvn-access-counts > span,
    .mvn-member-detail-strip,
    .mvn-member-detail-strip > span,
    .mvn-access-editor > summary,
    .mvn-user-tier,
    .mvn-role-badges > .badge,
    .mvn-access-editor .mvn-summary-action,
    .mvn-profile-side-card header,
    .mvn-profile-side-card .mvn-profile-checklist,
    .mvn-profile-picture-control,
    .mvn-account-status-badge
) {
    background-color: #21362c !important;
    border-color: #405d4c !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    .mvn-user-menu-copy strong,
    .mvn-user-menu-copy small,
    .mvn-page-context strong,
    .mvn-page-context small,
    .mvn-top-v3 strong,
    .mvn-top-v3 small
) {
    color: #e8f5ed !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-nav :is(.mvn-nav-link.active,.mvn-nav-link[aria-current="page"]) {
    background: #254737 !important;
    color: #e8f5ed !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    input, select, textarea, .mvn-user-menu input, .mvn-audit-filters input,
    .mvn-search-box input, .mvn-platform-page input
) {
    color: #e8f5ed !important;
    background: #192b24 !important;
    border-color: #456351 !important;
    opacity: 1;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    button.btn-light, a.btn-light,
    .mvn-content-v3 .btn-light
) {
    color: #e8f5ed !important;
    background: #25392f !important;
    border-color: #4b6556 !important;
}
html[data-mvn-theme="dark"] body :is(
    .btn-green, .mvn-public-primary, .mvn-public-apply
) {
    color: #fff !important;
    background: #166047 !important;
    border-color: #166047 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-checklist .done > i {
    color: #a6edc3 !important;
}
/* High-specificity treatment for older controls with !important white fills. */
html[data-mvn-theme="dark"] body.mvn-app-body input,
html[data-mvn-theme="dark"] body.mvn-app-body select,
html[data-mvn-theme="dark"] body.mvn-app-body textarea,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-platform-page input,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-access-user-card input,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-edit-section input,
html[data-mvn-theme="dark"] body.mvn-app-body #privacy-export-password,
html[data-mvn-theme="dark"] body.mvn-app-body #privacy-request-type {
    background-color: #1a2e25 !important;
    background-image: none !important;
    color: #f1f9f4 !important;
    -webkit-text-fill-color: #f1f9f4 !important;
    border-color: #537260 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-access-user-card .mvn-user-title-row .badge,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-access-user-card .mvn-user-meta,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-access-user-card .mvn-user-meta span {
    background-color: #284537 !important;
    color: #f2faf4 !important;
    border-color: #476953 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-nav details[open] > summary,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-nav a[aria-current="page"],
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-nav .mvn-nav-link.active {
    background-color: #1c4732 !important;
    color: #fff !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-nav .mvn-nav-link.active .mvn-nav-label,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-side-nav [aria-current="page"] .mvn-nav-label {
    color: #fff !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-mobile-nav-v3 a.active > span {
    color: #fff !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(
    .mvn-profile-side-card.card header,.mvn-report2-period-buttons a,
    .mvn-report2-training-summary .btn-light,.mvn-report2-footer .btn-light,
    .mvn-report2-tabs a,.mvn-care-badge,.mvn-access-editor > summary,
    .btn-light,.mvn-account-status-badge
) {
    background: #254132 !important;
    border-color: #456453 !important;
    color: #eaf7ef !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-side-card .mvn-care-badge {
    color: #eaf7ef !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-report2-period-buttons a.active,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-report2-tabs a.active {
    background: #15583f !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body :is(.btn-green,.mvn-profile-utility-form .btn-green) {
    background: #12553d !important;
    color: #fff !important;
}
html[data-mvn-theme="dark"] body.mvn-humanized .mvn-closed-registration > span {
    color: #e5f4ed !important;
}

/* v32: last two steady-state WCAG color-contrast regressions. */
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-report2-nav a[href="#report-overview"],
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-report2-nav a[href="#report-members"],
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-report2-nav a[href="#report-service"],
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-report2-nav a[href="#report-training"] {
    color: #f1f9f4 !important;
    background-color: #1c4936 !important;
    border-color: #456452 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-compliance-meter header {
    background-color: #21362a !important;
    border-color: #476253 !important;
}
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-compliance-meter header strong,
html[data-mvn-theme="dark"] body.mvn-app-body .mvn-profile-compliance-meter header small {
    color: #f1f9f4 !important;
}
