/* Contrast audit: explicit foreground/surface pairs for report and exam states.
   Screen-only so the independent printable/downloadable report stays unchanged. */
@media screen {
 html:not([data-appearance="simple"]) #main :is(.insight-report,.profile-card){background:#142335;color:#edf6ff;border-color:#52697c}
 html:not([data-appearance="simple"]) #main .insight-report :is(.report-heading p,.report-meta,.report-identity span,.report-outcomes span,.chart-heading>span,.report-caption,.topic-evidence,.topic-ref,.report-footnote){color:#c1d2e2!important}
 html:not([data-appearance="simple"]) #main .insight-report :is(.report-identity strong,.topic-chart-title>strong,.topic-chart-line>strong){color:#edf6ff!important}
 html:not([data-appearance="simple"]) #main .insight-report .report-eyebrow{color:#a6deea!important}
 html:not([data-appearance="simple"]) #main .insight-report :is(.report-identity,.report-outcomes,.topic-chart-row){border-color:#52697c}
 html:not([data-appearance="simple"]) #main .topic-bar-track{background:#33495e}
 html:not([data-appearance="simple"]) #main :is(.topic-status.strong,.map-key.answered){background:#234638;color:#c0f3d6;border-color:#78b99a}
 html:not([data-appearance="simple"]) #main :is(.topic-status.developing,.map-key.skipped){background:#493e28;color:#ffe2a6;border-color:#c6aa70}
 html:not([data-appearance="simple"]) #main :is(.topic-status.revision,.map-key.expired){background:#492f35;color:#ffd1c9;border-color:#d49991}
 html:not([data-appearance="simple"]) #main .topic-status.insufficient{background:#304155;color:#dce6ef}
 html:not([data-appearance="simple"]) #main :is(.topic-bar-fill.strong,.outcome-dot.correct){background:#78d5ac}
 html:not([data-appearance="simple"]) #main .topic-bar-fill.developing{background:#e8bd6e}
 html:not([data-appearance="simple"]) #main :is(.topic-bar-fill.revision,.outcome-dot.wrong){background:#f29992}
 html:not([data-appearance="simple"]) #main :is(.topic-bar-fill.insufficient,.outcome-dot.unanswered){background:#a6b8cc}
 html:not([data-appearance="simple"]) #main .verdict:not(.wrong){color:#a5e4c3!important}
 html:not([data-appearance="simple"]) #main :is(.verdict.wrong,.low){color:#ffb7aa!important}
 html:not([data-appearance="simple"]) #main :is(.ar-block,.match-grid th){background:#22364b;color:#edf6ff;border-color:#8aa3ba}
 html:not([data-appearance="simple"]) #main .match-grid :is(td,th){border-color:#52697c}
 html:not([data-appearance="simple"]) #main :is(.score small,.practice-mode-card small,.exam-journey-nav>span){color:#c1d2e2!important}
 html:not([data-appearance="simple"]) #main :is(.type-tag,.difficulty){background:#304155;color:#dce6ef}
 html:not([data-appearance="simple"]) #main .map-key{background:#213347;color:#d1dfeb;border-color:#7892aa}
 html:not([data-appearance="simple"]) #main .map-key.review{background:#3a3154;color:#e3d5ff;border-color:#b39cda}
 html:not([data-appearance="simple"]) #main .map-key.current{outline-color:#d9f3ff}
 html:not([data-appearance="simple"]) #main .map-review-mark{color:#e3d5ff;text-shadow:none}
 html:not([data-appearance="simple"]) #main :is(.progress,.global-track){background:#33495e}
 html:not([data-appearance="simple"]) #main .global-track>#globalBar{background:#a6deea}
 html:not([data-appearance="simple"]) #main .timer-question svg .ring-track{stroke:#52697c}
 html:not([data-appearance="simple"]) #main .profile-card input{background:#101f31;color:#edf6ff;border-color:#7892aa}
 html:not([data-appearance="simple"]) #main .profile-card input::placeholder{color:#b6c8da;opacity:1}
 html:not([data-appearance="simple"]) .toast{background:#213c50;color:#f2f8ff;border:1px solid #89bed2}
 /* Expired questions remain readable even though their controls are locked. */
 #main .option:disabled{opacity:1;cursor:not-allowed}
 html[data-appearance="simple"] #main .verdict:not(.wrong){color:#226251}
 html[data-appearance="simple"] #main .verdict.wrong{color:#a84436}
 html[data-appearance="simple"] #main .topic-status.strong{background:#e2f3ed;color:#1b644f}
 html[data-appearance="simple"] #main .topic-status.developing{background:#fcf0d8;color:#755315}
 html[data-appearance="simple"] #main .topic-status.revision{background:#fbe9e6;color:#943e38}
 html[data-appearance="simple"] #main .topic-status.insufficient{background:#eef1f5;color:#4b5d71}
 html[data-appearance="simple"] #main :is(.topic-ref,.report-footnote,.report-identity span){color:#526176}
 /* The auth dialog intentionally retains a solid light form in either mode. */
 #authDialog .auth-content :is(.auth-description,.auth-footnote,.auth-message,.field-optional){color:#526176}
}
@media screen {
 html[data-appearance="simple"] .nb-marketing .nb-button-clear{background:#fff;color:#24485e;border-color:#b7cad7;box-shadow:none}
 html[data-appearance="simple"] .nb-marketing .nb-button-clear:hover{background:#edf3f8;color:#193d4d}
}
/* Admin tables and inbox use the same explicit pairs as the student workspace. */
@media screen {
 html:not([data-appearance="simple"]) #main .admin-workspace{--admin-surface:#142335;--admin-raised:#22364b;--admin-field:#101f31;--admin-text:#edf6ff;--admin-muted:#c1d2e2;--admin-border:#7892aa;--admin-accent:#a6deea;--admin-on-accent:#102a38;--admin-danger:#ffd1c9;--admin-danger-bg:#492f35;color:var(--admin-text)}
 html[data-appearance="simple"] #main .admin-workspace{--admin-surface:#fff;--admin-raised:#edf3f8;--admin-field:#fff;--admin-text:#202d40;--admin-muted:#526176;--admin-border:#8296ab;--admin-accent:#25566c;--admin-on-accent:#fff;--admin-danger:#943e38;--admin-danger-bg:#fbe9e6;color:var(--admin-text)}
 #main .admin-workspace :is(h1,h2,h3,label,td,strong,[role=status]){color:var(--admin-text)!important}
 #main .admin-workspace :is(p,small,.muted){color:var(--admin-muted)!important}
 #main .admin-workspace .admin-table-wrap{background:var(--admin-surface);border-color:var(--admin-border)}
 #main .admin-workspace .admin-table-wrap :is(th,td){border-color:var(--admin-border)}
 #main .admin-workspace .admin-table-wrap th{background:var(--admin-raised);color:var(--admin-text)}
 #main .admin-workspace .admin-table-wrap tbody tr:nth-child(even){background:var(--admin-raised)}
 #main .admin-workspace :is(input:not([type=checkbox]),select){background:var(--admin-field)!important;color:var(--admin-text)!important;border-color:var(--admin-border)!important;box-shadow:none}
 html:not([data-appearance="simple"]) #main .admin-workspace :is(input,select){color-scheme:dark}
 html[data-appearance="simple"] #main .admin-workspace :is(input,select){color-scheme:light}
 #main .admin-workspace input::placeholder{color:var(--admin-muted);opacity:1}
 #main .admin-workspace input[type=checkbox]{accent-color:var(--admin-accent)}
 #main .admin-workspace :is(.primary,.secondary){color:var(--admin-text)!important;background:var(--admin-raised)!important;border:1px solid var(--admin-border);box-shadow:none}
 #main .admin-workspace .primary{color:var(--admin-on-accent)!important;background:var(--admin-accent)!important}
 #main .admin-workspace button:disabled{color:var(--admin-muted)!important;background:var(--admin-surface)!important;opacity:1;border-style:dashed;cursor:not-allowed}
 #main .admin-workspace :is(button,input,select,.admin-table-wrap):focus-visible{outline:3px solid var(--admin-accent);outline-offset:3px}
 #main .admin-workspace :is(.panel.empty,.admin-messages article){background:var(--admin-surface);border:1px solid var(--admin-border);border-radius:12px;padding:22px;margin-block:16px}
 #main .admin-workspace .admin-message-body{color:var(--admin-text)!important}
 #main .admin-workspace [role=alert]{color:var(--admin-danger)!important;background:var(--admin-danger-bg);padding:16px;border:1px solid var(--admin-danger);border-radius:10px}
 #main .admin-workspace a{color:var(--admin-accent)}
 @media(hover:hover){#main .admin-workspace button:hover:not(:disabled){outline:1px solid var(--admin-accent);outline-offset:2px}}
}
@media screen {html[data-appearance="simple"] body>header button{background:#edf3f8!important;color:#203b50!important;border:1px solid #b7cad7!important;box-shadow:none!important}html[data-appearance="simple"] body>header button svg{stroke:currentColor!important}}

#main .access-toggle{min-width:112px;min-height:44px;border-radius:24px;font-weight:700;border:1px solid currentColor;cursor:pointer}#main .access-toggle.approved{background:#155b3e!important;color:#e3ffef!important}#main .access-toggle.free-only{background:#822c38!important;color:#fff0f2!important}#main .access-toggle::before{content:"";display:inline-block;width:12px;height:12px;border-radius:50%;background:currentColor;margin-right:8px}#main .access-toggle:disabled{opacity:.6;cursor:wait}
