/* Ninely 2.7.37 · WCAG-focused theme parity and clear learning surfaces.
 * Corrects components introduced with hard-coded white surfaces in v2.7.36.
 * Do not apply blanket filter/inversion: it breaks imagery and answer states. */
:root{color-scheme:light;--nin-a11y-focus:#4d3cc9}
:root[data-theme="dark"]{
 color-scheme:dark;
 --bg:#101522;--surface:#1c2433;--surface-2:#29364a;
 --text:#f7f9ff;--muted:#d2dbe9;--border:#58667d;
 --nin-a11y-focus:#d3c3ff;
}
:where(.view,.auth-gate) input::placeholder,
:where(.view,.auth-gate) textarea::placeholder{opacity:1;color:#64748b}
:root[data-theme="dark"] :where(.view,.auth-gate) input::placeholder,
:root[data-theme="dark"] :where(.view,.auth-gate) textarea::placeholder{color:#b5c5da}
:where(.view,.auth-gate) input:focus-visible,
:where(.view,.auth-gate) textarea:focus-visible,
:where(.view,.auth-gate) select:focus-visible,
:where(.view,.auth-gate) button:focus-visible,
:where(.view,.auth-gate) a:focus-visible{
 outline:3px solid var(--nin-a11y-focus);outline-offset:2px;
}
/* Modern cards should be legible in both themes, with true text contrast. */
:root[data-theme="dark"] .nin-focus-lesson{color:#f6f8ff!important}
:root[data-theme="dark"] .nin-focus-lesson p,
:root[data-theme="dark"] .nin-focus-lesson li,
:root[data-theme="dark"] .nin-learn-brief__body p{color:#e0e7f1!important}
:root[data-theme="dark"] .nin-focus-lesson__lead{border-bottom-color:#58667d}
:root[data-theme="dark"] .nin-focus-lesson__lead h3,
:root[data-theme="dark"] .nin-focus-lesson__lead>p{color:#f6f8ff!important}
:root[data-theme="dark"] .nin-focus-lesson__step,
:root[data-theme="dark"] .nin-micro-check,
:root[data-theme="dark"] .nin-brief-step,
:root[data-theme="dark"] .nin-focus-lesson__more,
:root[data-theme="dark"] .nin-learn-brief,
:root[data-theme="dark"] .nin-official-practice__link{
 background:#1c2433!important;border-color:#58667d!important;color:#f6f8ff!important;
}
:root[data-theme="dark"] .nin-focus-lesson__concept,
:root[data-theme="dark"] .nin-micro-check__question,
:root[data-theme="dark"] .nin-learn-brief summary,
:root[data-theme="dark"] .nin-learn-brief summary strong,
:root[data-theme="dark"] .nin-official-practice__link strong,
:root[data-theme="dark"] #simpleModalCard:has(.nin-focus-lesson)>h2{color:#f6f8ff!important}
:root[data-theme="dark"] .nin-focus-lesson__example,
:root[data-theme="dark"] .nin-learn-brief__example{
 background:#2b2b4a!important;border-color:#7166b1!important;color:#f2eeff!important;
}
:root[data-theme="dark"] .nin-focus-lesson__remember{
 background:#1c3549!important;border-color:#5787a7!important;color:#f3faff!important;
}
:root[data-theme="dark"] .nin-focus-lesson__remember strong{color:#d4ebff!important}
:root[data-theme="dark"] .nin-focus-lesson__more summary,
:root[data-theme="dark"] .nin-focus-subtopics button,
:root[data-theme="dark"] .nin-learn-brief summary small,
:root[data-theme="dark"] .nin-official-practice__link small{color:#e0e7f1!important}
:root[data-theme="dark"] .nin-focus-subtopics button{background:#283548!important;border-color:#7184a1!important}
:root[data-theme="dark"] .nin-focus-lesson__eyebrow,
:root[data-theme="dark"] .nin-focus-lesson__number,
:root[data-theme="dark"] .nin-micro-check__label,
:root[data-theme="dark"] .nin-brief-step small,
:root[data-theme="dark"] .nin-learn-brief__example small{color:#d6caff!important}
:root[data-theme="dark"] .nin-micro-check__choices button,
:root[data-theme="dark"] .nin-micro-recall-input{
 background:#243147!important;border-color:#8190a7!important;color:#f8faff!important;
}
:root[data-theme="dark"] .nin-micro-check__choices button.is-selected,
:root[data-theme="dark"] .nin-micro-check__choices button:hover{
 background:#3b335c!important;border-color:#c7b4ff!important;color:#fff!important;
}
:root[data-theme="dark"] .nin-micro-recall-button{
 background:#3a335b!important;color:#ece5ff!important;border-color:#9681d1!important;
}
:root[data-theme="dark"] .nin-learn-brief__remember{color:#e7eaff!important}
:root[data-theme="dark"] #simpleModalCard:has(.nin-focus-lesson){background:#1c2433!important;color:#f6f8ff!important}
:root[data-theme="dark"] #simpleModalCard:has(.nin-focus-lesson) .simple-modal-actions{
 background:#1c2433!important;border-top-color:#58667d!important;
}
:root[data-theme="dark"] .quiz-body .quiz-question,
:root[data-theme="dark"] .quiz-body .quiz-topic-label,
:root[data-theme="dark"] .quiz-body .question-passage p,
:root[data-theme="dark"] .quiz-body .feedback{color:#f6f8ff!important}
:root[data-theme="dark"] .quiz-body .answer-button,
:root[data-theme="dark"] .quiz-body .answer-input{
 color:#f5f8ff!important;background:#243147!important;border-color:#8292ad!important;
}
:root[data-theme="dark"] .quiz-body .answer-button.is-selected{
 color:#fff!important;background:#403763!important;border-color:#c9b5ff!important;
}
:root[data-theme="dark"] .quiz-body .question-tools .hint-button{
 color:#e4ebff!important;border-color:#7984a0!important;
}
:root[data-theme="dark"] .nin-focus-lesson__more>summary,
:root[data-theme="dark"] .nin-brief-step p{color:#f6f8ff!important}
/* Readability for six-tab navigation, XP journey, and form metadata. */
:root[data-theme="dark"] #view-learn .course-hero__copy p,
:root[data-theme="dark"] #view-learn .unit-card p,
:root[data-theme="dark"] #view-exam .nin-official-practice__disclaimer,
:root[data-theme="dark"] #view-progress .nin-quest-xp-row,
:root[data-theme="dark"] #view-profile .profile-shortcut-grid small,
:root[data-theme="dark"] .nav-button small{color:#d2dbe9!important}
:root[data-theme="dark"] .nin-new-lesson small,
:root[data-theme="dark"] .nin-daily-flow b,
:root[data-theme="dark"] .nin-quest-overline,
:root[data-theme="dark"] .nin-quest-emblem,
:root[data-theme="dark"] .nin-progress-eyebrow{color:#cbbdff!important}
:root[data-theme="dark"] .nin-daily-stage--review>span{color:#86ebc1!important}
:root[data-theme="dark"] .nin-daily-card .nin-daily-flow b {color:#35227b!important}
:root[data-theme="dark"] .nav-button.is-active small,
:root[data-theme="dark"] .nav-button[aria-current="page"] small{color:#d8ceff!important}
:root[data-theme="dark"] .auth-form .field-label,
:root[data-theme="dark"] .auth-form h2,
:root[data-theme="dark"] .auth-card__form-panel h2{color:#f7f9ff!important}
:root[data-theme="dark"] .auth-card__form-panel input{
 color:#f8faff!important;background:#243147!important;border-color:#8494ac!important;
}
/* Light-theme labels need contrast too – avoid nearly-white secondary text. */
:root:not([data-theme="dark"]) .nin-focus-lesson__eyebrow,
:root:not([data-theme="dark"]) .nin-micro-check__label {color:#41358d}
:root:not([data-theme="dark"]) .nin-official-practice__link small,
:root:not([data-theme="dark"]) .nin-learn-brief summary small{color:#40516b!important}
@media(prefers-reduced-motion:reduce){.nin-new-lesson,.nin-quest-level-track i{transition:none!important}}
