/* MEGA TEAM V69: semantic color and contrast fixes only. No layout or course logic changes. */
@media screen {
html[data-theme=light]{color-scheme:light;--v69-text:#123044;--v69-muted:#486274;--v69-accent:#086d61;--v69-input:#f7fafb;--v69-panel:#fff;--v69-line:#b9d0d9;--v69-danger:#a1263a}
html[data-theme=dark]{color-scheme:dark;--v69-text:#edf7fb;--v69-muted:#aec5d4;--v69-accent:#58e0c0;--v69-input:#0b1c30;--v69-panel:#10283d;--v69-line:#37556a;--v69-danger:#ffadb9}
/* Use the Academy's existing dark-letter logo on light backgrounds. Preserve all artwork. */
html[data-theme=light] :is(.mega-brand-icon,.mt52-brand,.mt58-verify-brand,.mt28-mark,.brand-mark) img[src*="/img/logo.png"]{content:url('/img/logo-dark.png')}
/* Consistent semantic text tokens, inherited by public and student/partner UI. */
html[data-theme=light]{--academy-sub:#4e6476;--academy-emerald-deep:#086d61;--mt-sub:#4e6476;--mt-accent:#086d61;--muted:#4e6476}
html[data-theme=dark]{--academy-sub:#aec5d4;--academy-emerald-deep:#58e0c0;--mt-sub:#aec5d4;--mt-accent:#58e0c0}
body.mega-body .mega-footer :is(nav,a,small,.mega-copyright){color:var(--v69-muted)}
body.mega-body .mega-footer a:hover{color:var(--v69-accent)}
body.mega-body .mt-auth-main :is(.mt-auth-field-hint,.mt-auth-description,.mt-auth-footnote,.mt-auth-alternate){color:var(--v69-muted)}
body.mega-body .mt-auth-form :is(input:not([type=hidden]),select){color:var(--v69-text);background:var(--v69-input);border-color:var(--v69-line)}
body.mega-body .mt-auth-form :is(input,textarea)::placeholder{color:var(--v69-muted);opacity:1}
body.mega-body .mt-auth-form select option{background:var(--v69-panel);color:var(--v69-text)}
body.mega-body .mt-auth-alert-error{color:var(--v69-danger)}
body.mega-body .mt-auth-main :is(.mt-auth-label-row a,.mt-auth-password-toggle,.mt-auth-alternate a,.mt-auth-eyebrow){color:var(--v69-accent)}
/* Dark teal retains original identity and guarantees readable white CTA text. */
body.mega-body :is(.mt-auth-submit,.mega-nav-cta,.academy-btn-primary,.mt53-copy),#mt-profile-submit{background:linear-gradient(125deg,#076d62,#087d6d);color:#fff!important}
body.mega-body :is(.mt-auth-submit,.mega-nav-cta,.academy-btn-primary,.mt53-copy):hover,#mt-profile-submit:hover{background:linear-gradient(125deg,#065e55,#076d62)}
/* Keep the intentionally dark artwork panels dark in both modes. */
body.mega-body .mt-auth-story{color:#fff}
body.mega-body .mt-auth-story-bottom h2{color:#fff}
body.mega-body .mt-auth-story-bottom p{color:#c5d9e4}
body.mega-body .mt-auth-story-bottom li{color:#e4f4f5}
html[data-theme=light] body.mega-body .academy-hero-note{color:#40596c}
html[data-theme=light] body.mega-body .academy-hero-note span{color:#086d61}
html[data-theme=light] body.mega-body .mt-auth-form .mt59-country{background:var(--v69-input)!important;color:var(--v69-text)!important;border-color:var(--v69-line)!important}
/* Legacy inline status colors used in course and lesson pages. */
html[data-theme=light] :is(body.mega-body,body.mt29-shell) .pill[style*="color:#bfdbfe"]{color:#194b91!important}
html[data-theme=light] :is(body.mega-body,body.mt29-shell) .pill[style*="color:#bbf7d0"]{color:#166534!important}
html[data-theme=light] :is(body.mega-body,body.mt29-shell) .pill[style*="color:#facc15"]{color:#795000!important}
html[data-theme=light] :is(body.mega-body,body.mt29-shell) .pill[style*="color:#fecaca"]{color:#9b2135!important}
/* Admin question-bank styles had dark-only fallback tokens. */
body.mt29-shell{--mt29-text:var(--m29-text);--mt29-panel:var(--m29-card);--mt29-border:var(--m29-stroke);--mt29-bg:var(--m29-bg);--dash-muted:var(--m29-soft);--muted:var(--m29-soft)}
html[data-theme=light] body.mt29-shell{--m29-muted:#4e6878;--mt30-muted:#486274}
body.mt29-shell .mt44-bank select option{color:var(--v69-text);background:var(--v69-panel)}
body.mt29-shell .mt44-bank :is(.mt65-count,.mt65-saved-filename){color:var(--v69-accent)!important}
body.mt29-shell .mt44-bank .mt44-muted{color:var(--v69-muted);opacity:1}
body.mt29-shell .mt44-bank .mt65-filename-unknown{color:var(--v69-muted);opacity:1}
html[data-theme=light] body.mt29-shell .mt36-required{color:#086d61}
html[data-theme=light] body.mt29-shell .mt36-form-alert>i{color:#a1263a}
html[data-theme=light] body.mt29-shell .mt36-form-alert-success>i{color:#086d61}
/* Rank colors remain differentiated but readable on white cards. */
html[data-theme=light] .mt64-tier:nth-child(1){--mt64-tier-color:#4e6476!important}
html[data-theme=light] .mt64-tier:nth-child(2){--mt64-tier-color:#945526!important}
html[data-theme=light] .mt64-tier:nth-child(3){--mt64-tier-color:#526b82!important}
html[data-theme=light] .mt64-tier:nth-child(4){--mt64-tier-color:#805900!important}
html[data-theme=light] .mt64-tier:nth-child(5){--mt64-tier-color:#286773!important}
html[data-theme=light] .mt64-tier:nth-child(6){--mt64-tier-color:#176285!important}
html[data-theme=light] .mt64-tier :is(h3,.mt64-tier-number){color:var(--mt64-tier-color)}
/* Certificate outer tools only, never the issued certificate canvas/QR. */
html[data-theme=light] .mt58-cert-tools button{background:#087667;border-color:#087667;color:#fff}
html[data-theme=light] .mt58-verify-card .mt58-return{color:#086d61}
/* Standalone protected exam inherits the selected Academy appearance. */
html[data-theme=light] body.mt69-quiz{background:#f2f7f9;color:#123044}
html[data-theme=light] body.mt69-quiz :is(p,header span){color:#486274}
html[data-theme=light] body.mt69-quiz header{border-color:#c4d7df}
html[data-theme=light] body.mt69-quiz header a{color:#086d61}
html[data-theme=light] body.mt69-quiz .card{background:#fff;border-color:#c4d7df}
html[data-theme=light] body.mt69-quiz .card:after{color:#17364a12}
html[data-theme=light] body.mt69-quiz .option{border-color:#b9d0d9;color:#123044}
html[data-theme=light] body.mt69-quiz .option:has(input:checked){background:#def4ed;border-color:#087667;color:#123044}
body.mt69-quiz .btn:not(.secondary):not(.mt49-certificate){background:#087667;border-color:#087667;color:white}
html[data-theme=light] body.mt69-quiz :is(.secondary,.mt49-result-actions .secondary,.mt49-certificate){background:#eaf3f5;border-color:#b9d0d9;color:#123044}
html[data-theme=light] body.mt69-quiz :is(.secondary,.mt49-result-actions .secondary,.mt49-certificate):hover{background:#dcebed;color:#123044}
html[data-theme=light] body.mt69-quiz .mt49-result-actions{border-color:#c4d7df}
html[data-theme=light] body.mt69-quiz .pass{color:#087667}
html[data-theme=light] body.mt69-quiz .fail{color:#a1263a}
/* Visible keyboard focus, no change to size, flex order or click targets. */
:is(body.mega-body,body.mt29-shell,body.mt28-admin,body.mt27-admin,body.mt69-quiz,body.mt58-verify,body.mt58-cert-page) :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--v69-accent,#087667);outline-offset:3px}
}
