/* Site-wide dark mode — applies to marketing, student portal, exam, and auth */

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.font-sans {
  background-color: #0b1220 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .site-theme-icon--sun {
  display: none !important;
}

html[data-theme="dark"] .site-theme-icon--moon {
  display: block !important;
}

html:not([data-theme="dark"]) .site-theme-icon--moon {
  display: none !important;
}

/* ---------- Tailwind light-token remaps ---------- */
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] [class*="bg-white/"] {
  background-color: #111827 !important;
}

html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] [class*="bg-slate-50"] {
  background-color: #0b1220 !important;
}

html[data-theme="dark"] .bg-slate-100,
html[data-theme="dark"] .hover\:bg-slate-50:hover,
html[data-theme="dark"] .hover\:bg-slate-100:hover {
  background-color: #1e293b !important;
}

html[data-theme="dark"] .bg-brand-50,
html[data-theme="dark"] .hover\:bg-brand-50:hover {
  background-color: rgba(37, 99, 235, 0.16) !important;
}

html[data-theme="dark"] [class*="bg-brand-100"],
html[data-theme="dark"] [class*="bg-sky-100"] {
  background-color: rgba(37, 99, 235, 0.18) !important;
}

html[data-theme="dark"] .from-white,
html[data-theme="dark"] .via-white,
html[data-theme="dark"] .to-white,
html[data-theme="dark"] [class*="from-slate-50"],
html[data-theme="dark"] [class*="via-slate-50"],
html[data-theme="dark"] [class*="to-slate-50"] {
  --tw-gradient-from: #0b1220 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(11 18 32 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), #0f172a, var(--tw-gradient-to);
}

html[data-theme="dark"] .to-white {
  --tw-gradient-to: #0b1220 var(--tw-gradient-to-position);
}

html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-gray-900 {
  color: #f8fafc !important;
}

html[data-theme="dark"] .text-slate-700,
html[data-theme="dark"] .text-slate-600,
html[data-theme="dark"] .hover\:text-slate-800:hover {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-400 {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-300,
html[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
html[data-theme="dark"] .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: #334155 !important;
}

html[data-theme="dark"] .shadow-soft,
html[data-theme="dark"] .shadow-card,
html[data-theme="dark"] .shadow-sm,
html[data-theme="dark"] .shadow-md {
  --tw-shadow-color: rgb(0 0 0 / 0.4);
  --tw-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  --tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748b;
}

html[data-theme="dark"] option {
  background-color: #0f172a;
  color: #e2e8f0;
}

/* ---------- Marketing chrome ---------- */
html[data-theme="dark"] .site-header {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(11, 18, 32, 0.94) !important;
}

html[data-theme="dark"] .site-nav__brand,
html[data-theme="dark"] .site-nav__end {
  background: transparent !important;
}

html[data-theme="dark"] .brand-logo--dark .brand-logo__wordmark {
  color: #f8fafc;
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .site-nav__utility-btn,
html[data-theme="dark"] .site-lang-switch__btn,
html[data-theme="dark"] .site-nav__menu-btn {
  color: #cbd5e1;
}

html[data-theme="dark"] .nav-link-active {
  color: #93c5fd;
}

html[data-theme="dark"] .site-nav__utility-btn {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .site-lang-switch {
  background: transparent !important;
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="dark"] .site-lang-switch__btn {
  background: transparent;
  color: #94a3b8;
}

html[data-theme="dark"] .site-lang-switch__btn.is-active {
  background: #2563eb !important;
  color: #fff !important;
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .site-nav__utility-btn:hover,
html[data-theme="dark"] .site-nav__menu-btn:hover {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.16);
}

html[data-theme="dark"] .site-nav__sign-in {
  background: transparent;
  border-color: #3b82f6;
  color: #93c5fd;
}

html[data-theme="dark"] .site-nav__sign-in:hover {
  background: rgba(37, 99, 235, 0.16);
}

html[data-theme="dark"] .mobile-nav-drawer {
  background: #0f172a;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .mobile-nav-drawer__header,
html[data-theme="dark"] .mobile-nav-drawer__utilities,
html[data-theme="dark"] .mobile-nav-drawer__footer {
  border-color: #1e293b;
}

html[data-theme="dark"] .mobile-nav-link,
html[data-theme="dark"] .mobile-nav-accordion__trigger,
html[data-theme="dark"] .mobile-nav-sublink,
html[data-theme="dark"] .mobile-nav-drawer__label {
  color: #cbd5e1;
}

html[data-theme="dark"] .mobile-nav-cta--ghost {
  background: transparent;
  border-color: #3b82f6;
  color: #93c5fd;
}

html[data-theme="dark"] [data-dropdown-menu] {
  background: #111827 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] [data-dropdown-menu] a {
  color: #cbd5e1;
}

html[data-theme="dark"] [data-dropdown-menu] a:hover {
  background: rgba(37, 99, 235, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] .site-search-dialog__panel {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .site-search-dialog__title,
html[data-theme="dark"] .site-search-result {
  color: #e2e8f0;
}

html[data-theme="dark"] .site-search-dialog__input {
  background: #0b1220;
  border-color: #334155;
  color: #f8fafc;
}

html[data-theme="dark"] .service-card,
html[data-theme="dark"] .country-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .products-tab {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .country-card__name,
html[data-theme="dark"] .products-tab__label,
html[data-theme="dark"] .goal-card__title {
  color: #f8fafc;
}

html[data-theme="dark"] .service-list li,
html[data-theme="dark"] .country-card__exams,
html[data-theme="dark"] .products-tab__summary,
html[data-theme="dark"] .goal-card__desc,
html[data-theme="dark"] .contact-help-list li {
  color: #94a3b8;
}

html[data-theme="dark"] .products-tab.is-active {
  background: rgba(37, 99, 235, 0.16);
  border-color: #3b82f6;
}

html[data-theme="dark"] .goal-card {
  background: #111827;
  border-color: #334155;
}

html[data-theme="dark"] .goal-card__icon {
  background: rgba(15, 23, 42, 0.9);
}

@media (max-width: 1023px) {
  html[data-theme="dark"] .site-sticky-cta {
    background: rgba(15, 23, 42, 0.94);
    border-color: #334155;
  }
}

html[data-theme="dark"] .site-chat-panel {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .site-chat-msg--bot {
  background: #1e293b;
  color: #e2e8f0;
}

html[data-theme="dark"] .site-chat-panel__form input {
  background: #0b1220;
  border-color: #334155;
  color: #f8fafc;
}

/* ---------- Student portal ---------- */
html[data-theme="dark"] .student-portal,
html[data-theme="dark"] .student-auth-page {
  background: #0b1220;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-topbar,
html[data-theme="dark"] .student-panel,
html[data-theme="dark"] .student-metric-card,
html[data-theme="dark"] .student-table-wrap,
html[data-theme="dark"] .student-welcome__hero,
html[data-theme="dark"] .student-section-page__placeholder,
html[data-theme="dark"] .student-radio-card,
html[data-theme="dark"] .student-alert,
html[data-theme="dark"] .student-result-item {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-result-options li {
  border-color: #334155;
}

html[data-theme="dark"] .student-result-options li.is-correct {
  background: #064e3b;
  border-color: #047857;
}

html[data-theme="dark"] .student-result-options li.is-wrong {
  background: #7f1d1d;
  border-color: #b91c1c;
}

html[data-theme="dark"] .student-panel--accent {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.16) 0%, #111827 100%);
  border-color: #1d4ed8;
}

html[data-theme="dark"] .student-topbar {
  border-bottom: 1px solid #1e293b;
}

html[data-theme="dark"] .student-topbar__title,
html[data-theme="dark"] .student-topbar__name,
html[data-theme="dark"] .student-welcome__headline,
html[data-theme="dark"] .student-panel__title,
html[data-theme="dark"] .student-panel__subtitle,
html[data-theme="dark"] .student-metric-card__value,
html[data-theme="dark"] .student-stat-block__value,
html[data-theme="dark"] .student-form-page__intro h2,
html[data-theme="dark"] .student-analysis__header h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .student-topbar__eyebrow,
html[data-theme="dark"] .student-topbar__role,
html[data-theme="dark"] .student-topbar__link,
html[data-theme="dark"] .student-welcome__quote,
html[data-theme="dark"] .student-note-card__body {
  color: #f8fafc;
}

html[data-theme="dark"] .student-note-card__stem {
  color: #94a3b8;
}

html[data-theme="dark"] .student-panel__text,
html[data-theme="dark"] .student-panel__meta,
html[data-theme="dark"] .student-metric-card__label,
html[data-theme="dark"] .student-stat-block__label,
html[data-theme="dark"] .student-form-page__note {
  color: #94a3b8;
}

html[data-theme="dark"] .student-topbar__logout,
html[data-theme="dark"] .student-btn,
html[data-theme="dark"] .fc-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-btn.student-btn--primary,
html[data-theme="dark"] a.student-btn.student-btn--primary,
html[data-theme="dark"] button.student-btn.student-btn--primary,
html[data-theme="dark"] .fc-btn.fc-btn--primary,
html[data-theme="dark"] .fc-page .student-btn.student-btn--primary {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .student-chip,
html[data-theme="dark"] .student-badge {
  background: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .student-kpi,
html[data-theme="dark"] .student-card,
html[data-theme="dark"] .student-home__date {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-home__title,
html[data-theme="dark"] .student-kpi__value,
html[data-theme="dark"] .student-card__title-wrap h3,
html[data-theme="dark"] .student-task__title,
html[data-theme="dark"] .student-qperf__intro h3,
html[data-theme="dark"] .student-qperf__usage h4,
html[data-theme="dark"] .student-qperf__score h4,
html[data-theme="dark"] .student-ring-card h4,
html[data-theme="dark"] .student-donut-center strong,
html[data-theme="dark"] .student-analysis__header h3,
html[data-theme="dark"] .student-analysis .student-card h4,
html[data-theme="dark"] .student-changes-card__value,
html[data-theme="dark"] .student-usage-strip strong {
  color: #f8fafc;
}

html[data-theme="dark"] .student-home__subtitle,
html[data-theme="dark"] .student-kpi__label,
html[data-theme="dark"] .student-card__title-wrap p,
html[data-theme="dark"] .student-qperf__intro p,
html[data-theme="dark"] .student-empty,
html[data-theme="dark"] .student-task__time,
html[data-theme="dark"] .student-donut-center span {
  color: #94a3b8;
}

html[data-theme="dark"] .student-home__banner {
  background: rgba(139, 92, 246, 0.18);
  color: #ddd6fe;
}

html[data-theme="dark"] .student-home__banner a {
  color: #c4b5fd;
}

html[data-theme="dark"] .student-usage-strip article {
  background: #111827;
  border-color: #334155;
}

html[data-theme="dark"] .student-usage-strip span,
html[data-theme="dark"] .student-analysis__header p {
  color: #94a3b8;
}

html[data-theme="dark"] .student-analysis__insight {
  background: linear-gradient(180deg, rgba(91, 33, 182, 0.22) 0%, #111827 100%);
  border-color: #5b21b6;
}

html[data-theme="dark"] .student-analysis__insight strong {
  color: #ddd6fe;
}

html[data-theme="dark"] .student-analysis__insight p {
  color: #c4b5fd;
}

html[data-theme="dark"] .student-planner__tabs button {
  background: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .student-planner__tabs button.is-active {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .student-task {
  border-top-color: #1e293b;
}

html[data-theme="dark"] .student-course-bar__track {
  background: #1e293b;
}

html[data-theme="dark"] .student-stat-pills li {
  color: #cbd5e1;
}

html[data-theme="dark"] .quiz-card,
html[data-theme="dark"] .quiz-mode-card__body,
html[data-theme="dark"] .quiz-name-field input,
html[data-theme="dark"] .quiz-search,
html[data-theme="dark"] .quiz-count-row input {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .quiz-taxonomy {
  background: #0b1220;
  border-color: #1e293b;
}

html[data-theme="dark"] .quiz-check {
  background: #111827;
  border-color: #1e293b;
  color: #e2e8f0;
}

html[data-theme="dark"] .quiz-card h2,
html[data-theme="dark"] .quiz-card__head {
  color: #e2e8f0;
}

html[data-theme="dark"] .quiz-mode-card input:checked + .quiz-mode-card__body {
  background: rgba(37, 99, 235, 0.16);
  border-color: #2563eb;
  color: #93c5fd;
}

html[data-theme="dark"] .quiz-pill span,
html[data-theme="dark"] .quiz-pill--locked {
  border-color: #2563eb;
  color: #93c5fd;
  background: transparent;
}

html[data-theme="dark"] .quiz-pill input:checked + span,
html[data-theme="dark"] .quiz-diff input:checked + span,
html[data-theme="dark"] .quiz-switch:checked {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .quiz-tabs button.is-active,
html[data-theme="dark"] .quiz-card__head svg,
html[data-theme="dark"] .quiz-name-field span {
  color: #60a5fa;
}

html[data-theme="dark"] .quiz-tabs button.is-active {
  border-bottom-color: #2563eb;
}

html[data-theme="dark"] .quiz-limit-banner {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.28);
  color: #bfdbfe;
}

html[data-theme="dark"] .library-nav,
html[data-theme="dark"] .library-article,
html[data-theme="dark"] .library-result,
html[data-theme="dark"] .library-search input {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .library-tree__root,
html[data-theme="dark"] .library-index-head h1,
html[data-theme="dark"] .library-article h1,
html[data-theme="dark"] .library-prose,
html[data-theme="dark"] .library-prose h2,
html[data-theme="dark"] .library-prose h3,
html[data-theme="dark"] .library-result strong {
  color: #f8fafc;
}

html[data-theme="dark"] .library-pearl {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.28);
  color: #bfdbfe;
}

html[data-theme="dark"] .library-prose th {
  background: #0b1220;
}

html[data-theme="dark"] .student-progress-bar {
  background: #1e293b;
}

html[data-theme="dark"] .student-quiz-form select,
html[data-theme="dark"] .student-quiz-form input[type="number"],
html[data-theme="dark"] .student-auth-input {
  background: #0b1220;
  border-color: #334155;
  color: #f8fafc;
}

html[data-theme="dark"] .student-table th,
html[data-theme="dark"] .student-table td {
  border-color: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .student-auth-panel,
html[data-theme="dark"] .student-auth-panel__card {
  background: #111827;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-auth-panel__title {
  color: #f8fafc;
}

html[data-theme="dark"] .student-auth-panel__subtitle,
html[data-theme="dark"] .student-auth-footer,
html[data-theme="dark"] .student-auth-label {
  color: #94a3b8;
}

/* ---------- Exam interface ---------- */
html[data-theme="dark"] .student-exam:not(.is-reversed) {
  background: #0b1220 !important;
  color: #e8eef7 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-stem,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-option,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-option__label,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-option__text,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-menu-drawer,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-menu-drawer a,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal:not(.exam-modal--lab) .exam-modal__body,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal:not(.exam-modal--lab) .exam-modal__body p,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal:not(.exam-modal--lab) .exam-modal__body li,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal:not(.exam-modal--lab) .exam-modal__body strong,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-settings-row label {
  color: #e8eef7 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-qnav__btn:not(.is-active) {
  color: var(--exam-qnav-color, #f8fafc) !important;
  background: var(--exam-qnav-btn-bg, #1e293b) !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-qnav,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-qnav__list,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-options-box,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal:not(.exam-modal--lab),
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal:not(.exam-modal--lab) .exam-modal__body,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-menu-drawer {
  background: #151c2c !important;
  border-color: #334155 !important;
  color: #e8eef7 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-qnav {
  background: #0b1220 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-qnav__btn {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-qnav__btn.is-active {
  background: #3b82c4 !important;
  color: #fff !important;
}

html[data-theme="dark"] body.student-exam .exam-qnav__dot {
  background: #cbd5e1 !important;
}

html[data-theme="dark"] .exam-settings-row {
  border-bottom-color: #334155 !important;
}

html[data-theme="dark"] .exam-settings-row span {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .exam-zoom-btns button {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .exam-zoom-btns button.is-active {
  background: #2563eb !important;
  color: #fff !important;
}

html[data-theme="dark"] .exam-item-nav__legend {
  color: #94a3b8 !important;
}

html[data-theme="dark"] body.student-exam .exam-item-nav button {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] body.student-exam .exam-item-nav button.is-current {
  background: #3b82c4 !important;
  border-color: #3b82c4 !important;
  color: #fff !important;
}

html[data-theme="dark"] .exam-modal__textarea {
  background: #0f172a;
  border-color: #334155;
  color: #e8eef7;
}

html[data-theme="dark"] .exam-notes-help {
  color: #94a3b8;
}

html[data-theme="dark"] body.student-exam .exam-modal__btn {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] body.student-exam .exam-modal__btn--secondary {
  background: #1e293b;
  color: #e2e8f0;
}

html[data-theme="dark"] .exam-hl-palette {
  background: #151c2c;
  border-color: #334155;
  color: #e8eef7;
}

html[data-theme="dark"] .exam-hl-palette__divider {
  background: #334155;
}

html[data-theme="dark"] body.student-exam .exam-hl-action {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal--lab {
  background: #151c2c !important;
  color: #e8eef7 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-modal--lab .exam-modal__body {
  background: #0f172a !important;
  color: #e8eef7 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab__panel,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-table thead th {
  background: #151c2c !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-table th,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-table td,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-row--d0 .exam-lab-name,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-row--d0 .exam-lab-range {
  color: #f1f5f9 !important;
  border-bottom-color: #334155 !important;
}

html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-row--d1 .exam-lab-name,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-row--d1 .exam-lab-range,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-row--d2 .exam-lab-name,
html[data-theme="dark"] body.student-exam:not(.is-reversed) .exam-lab-row--d2 .exam-lab-range {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .exam-calculator {
  background: #1e293b;
}

html[data-theme="dark"] .exam-calculator__displays {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] .exam-calculator__expr,
html[data-theme="dark"] .exam-calculator__main {
  background: #0b1220;
  border-color: #475569;
  color: #f1f5f9;
}

html[data-theme="dark"] .student-topbar__menu {
  background: #111827;
  border-color: #334155;
  color: #cbd5e1;
}

html[data-theme="dark"] .student-auth-check,
html[data-theme="dark"] .student-auth-footer {
  color: #94a3b8;
  border-color: #1e293b;
}

html[data-theme="dark"] .goal-card--blue,
html[data-theme="dark"] .goal-card--green,
html[data-theme="dark"] .goal-card--purple,
html[data-theme="dark"] .goal-card--orange,
html[data-theme="dark"] .goal-card--teal,
html[data-theme="dark"] .goal-card--pink,
html[data-theme="dark"] .goal-card--indigo,
html[data-theme="dark"] .goal-card--amber {
  background: #111827;
  border-color: #334155;
}

html[data-theme="dark"] .goal-card--blue .goal-card__title,
html[data-theme="dark"] .goal-card--green .goal-card__title,
html[data-theme="dark"] .goal-card--purple .goal-card__title,
html[data-theme="dark"] .goal-card--orange .goal-card__title,
html[data-theme="dark"] .goal-card--teal .goal-card__title,
html[data-theme="dark"] .goal-card--pink .goal-card__title,
html[data-theme="dark"] .goal-card--indigo .goal-card__title,
html[data-theme="dark"] .goal-card--amber .goal-card__title {
  color: #f8fafc;
}

html[data-theme="dark"] .goal-card__tags span {
  background: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .student-auth-panel__tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

html[data-theme="dark"] .mobile-nav-accordion,
html[data-theme="dark"] .qbank-mockup,
html[data-theme="dark"] .role-card,
html[data-theme="dark"] .job-card,
html[data-theme="dark"] .price-card,
html[data-theme="dark"] .countries-hub-card,
html[data-theme="dark"] .cjob-card,
html[data-theme="dark"] .exam-table-wrap,
html[data-theme="dark"] .uk-jump a,
html[data-theme="dark"] .uk-cta,
html[data-theme="dark"] .uk-nav-card,
html[data-theme="dark"] .uk-subnav__link,
html[data-theme="dark"] .site-sticky-cta__btn--ai,
html[data-theme="dark"] .site-chat-panel,
html[data-theme="dark"] .site-chat-msg--bot,
html[data-theme="dark"] .site-chat-panel__form {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .uk-subnav {
  background: rgba(11, 18, 32, 0.94);
  border-color: #1e293b;
}

html[data-theme="dark"] .uk-pathway {
  background: #0f172a;
  border-color: #1d4ed8;
}

html[data-theme="dark"] .uk-pathway__body,
html[data-theme="dark"] .uk-cta__text,
html[data-theme="dark"] .country-prose,
html[data-theme="dark"] .train-card__desc {
  color: #94a3b8;
}

html[data-theme="dark"] .country-prose strong,
html[data-theme="dark"] .uk-jump a,
html[data-theme="dark"] .uk-nav-card,
html[data-theme="dark"] .role-card {
  color: #f8fafc;
}

html[data-theme="dark"] .country-hero-btn--light {
  background: #1e293b;
  color: #f8fafc;
}

html[data-theme="dark"] .site-sticky-cta__btn--ai {
  color: #e2e8f0;
}

html[data-theme="dark"] .site-sticky-cta__btn--ai:hover,
html[data-theme="dark"] .site-sticky-cta__btn--ai.is-open {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  border-color: #3b82f6;
}

html[data-theme="dark"] .exam-table th,
html[data-theme="dark"] .exam-table td {
  border-color: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .onboard-step__num {
  background: #1e293b;
  color: #94a3b8;
}

html[data-theme="dark"] .onboard-step:not(:last-child)::after {
  background: #334155;
}

html[data-theme="dark"] .qbank-feature,
html[data-theme="dark"] .qbank-mockup__header,
html[data-theme="dark"] .qbank-mockup__body {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

body.student-exam .exam-option,
body.student-exam .exam-option__label,
body.student-exam .exam-option__text {
  color: var(--exam-text, #e8eef7) !important;
}

body.student-exam .exam-option {
  background: var(--exam-option-bg, #151c2c) !important;
}

body.student-exam .exam-option:hover {
  background: var(--exam-option-bg, #151c2c) !important;
}

body.student-exam .exam-option.is-selected {
  background: var(--exam-option-bg, #151c2c) !important;
}

body.student-exam .exam-option.is-correct,
body.student-exam .exam-option.is-correct:hover {
  background: var(--exam-option-correct, #14532d) !important;
  color: var(--exam-text, #e8eef7) !important;
}

body.student-exam .exam-option.is-incorrect,
body.student-exam .exam-option.is-incorrect:hover {
  background: var(--exam-option-incorrect, #7f1d1d) !important;
  color: var(--exam-text, #e8eef7) !important;
}

body.student-exam .exam-feedback,
body.student-exam .exam-feedback.is-correct,
body.student-exam .exam-feedback.is-incorrect {
  background: var(--exam-feedback-bg, #111827) !important;
  color: var(--exam-feedback-text, #e2e8f0) !important;
}

body.student-exam .exam-feedback__body,
body.student-exam .exam-feedback__pearl,
body.student-exam .exam-feedback__ref {
  color: var(--exam-feedback-muted, #cbd5e1) !important;
}

html[data-theme="dark"] .student-notebook,
html[data-theme="dark"] .student-notebook__search,
html[data-theme="dark"] .student-notebook .note-editable,
html[data-theme="dark"] .student-notebook-modal__panel {
  background: #111827;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-notebook__sidebar,
html[data-theme="dark"] .student-notebook .note-toolbar {
  background: #0b1220;
  border-color: #334155;
}

html[data-theme="dark"] .student-notebook__search,
html[data-theme="dark"] .student-notebook-modal__panel input,
html[data-theme="dark"] .student-notebook .note-editor.note-frame {
  border-color: #334155;
  background: #0f172a;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-notebook__title,
html[data-theme="dark"] .student-notebook__heading,
html[data-theme="dark"] .student-notebook__placeholder h2,
html[data-theme="dark"] .student-notebook-modal__panel h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .student-notebook__item-main,
html[data-theme="dark"] .student-notebook__hint,
html[data-theme="dark"] .student-notebook__meta,
html[data-theme="dark"] .student-notebook__empty-list,
html[data-theme="dark"] .student-notebook__placeholder,
html[data-theme="dark"] .student-notebook-modal__panel p {
  color: #cbd5e1;
}

html[data-theme="dark"] .student-notebook__item:not(.is-active) .student-notebook__item-main:hover {
  background: #1e293b;
}

html[data-theme="dark"] .student-notebook__item.is-active .student-notebook__item-main {
  background: #1e3a8a;
  color: #fff;
}

html[data-theme="dark"] .student-notebook__btn--ghost {
  background: #1e293b;
  color: #e2e8f0;
}

html[data-theme="dark"] .student-notebook__prose {
  color: #e2e8f0;
}

html[data-theme="dark"] .student-notebook__prose th,
html[data-theme="dark"] .student-notebook__menu-list {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] .student-notebook__prose th,
html[data-theme="dark"] .student-notebook__prose td {
  border-color: #334155;
}

html[data-theme="dark"] .student-notebook__menu-btn:hover,
html[data-theme="dark"] .student-notebook__menu-btn[aria-expanded="true"],
html[data-theme="dark"] .student-notebook__menu-list button:hover {
  background: #1e293b;
  color: #f8fafc;
}

html[data-theme="dark"] .student-notebook__menu-list button {
  color: #e2e8f0;
}

html[data-theme="dark"] .student-notebook__status.is-success {
  background: #064e3b;
  color: #a7f3d0;
}

html[data-theme="dark"] .student-notebook__status.is-error {
  background: #7f1d1d;
  color: #fecaca;
}

html[data-theme="dark"] .testres-tab.is-active {
  background: #1e3a8a;
  color: #dbeafe;
}

html[data-theme="dark"] .testres-meta,
html[data-theme="dark"] .testres-workspace,
html[data-theme="dark"] .testres-control,
html[data-theme="dark"] .testres-mode,
html[data-theme="dark"] .testres-table-foot,
html[data-theme="dark"] .testres-analysis-card > p {
  color: #94a3b8;
}

html[data-theme="dark"] .testres-meta strong,
html[data-theme="dark"] .testres-perf__title h2,
html[data-theme="dark"] .testres-table td strong,
html[data-theme="dark"] .testres-analysis-card h3 {
  color: #f8fafc;
}

html[data-theme="dark"] .testres-workspace {
  background: #1e293b;
}

html[data-theme="dark"] .testres-chip-btn,
html[data-theme="dark"] .testres-control select,
html[data-theme="dark"] .testres-perf,
html[data-theme="dark"] .testres-table-card,
html[data-theme="dark"] .testres-analysis-card,
html[data-theme="dark"] .testres-breakdown li,
html[data-theme="dark"] .testres-review {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .testres-table th {
  background: #1d4ed8;
}

html[data-theme="dark"] .testres-table td {
  border-bottom-color: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .testan-card,
html[data-theme="dark"] .testan-table-card {
  background: #111827;
  border-color: #334155;
}

html[data-theme="dark"] .testan-card__head h3,
html[data-theme="dark"] .testan-donut strong,
html[data-theme="dark"] .testan-parent td:first-child {
  color: #f8fafc;
}

html[data-theme="dark"] .testan-donut::before {
  background: #111827;
}

html[data-theme="dark"] .testan-legend li,
html[data-theme="dark"] .testan-table td,
html[data-theme="dark"] .testan-child td:first-child {
  color: #cbd5e1;
}

html[data-theme="dark"] .testan-table td {
  border-bottom-color: #1e293b;
}

html[data-theme="dark"] .testan-child:nth-child(even) {
  background: #0f172a;
}

html[data-theme="dark"] .prevtests-hero,
html[data-theme="dark"] .prevtests-tool,
html[data-theme="dark"] .prevtests-table-card {
  background: #111827;
  border-color: #334155;
}

html[data-theme="dark"] .prevtests-hero__title h2,
html[data-theme="dark"] .prevtests-table td strong,
html[data-theme="dark"] .prevtests-score,
html[data-theme="dark"] .prevtests-tool select,
html[data-theme="dark"] .prevtests-tool input {
  color: #f8fafc;
}

html[data-theme="dark"] .prevtests-hero__title p,
html[data-theme="dark"] .prevtests-table-foot,
html[data-theme="dark"] .prevtests-empty,
html[data-theme="dark"] .prevtests-empty-row td,
html[data-theme="dark"] .prevtests-date {
  color: #94a3b8;
}

html[data-theme="dark"] .prevtests-hero__icon {
  background: #1e3a8a;
  color: #93c5fd;
}

html[data-theme="dark"] .prevtests-stat--saved {
  background: #1e3a8a;
  color: #bfdbfe;
}

html[data-theme="dark"] .prevtests-stat--completed {
  background: #064e3b;
  color: #6ee7b7;
}

html[data-theme="dark"] .prevtests-stat--suspended {
  background: #7c2d12;
  color: #fdba74;
}

html[data-theme="dark"] .prevtests-table th {
  background: #172554;
}

html[data-theme="dark"] .prevtests-table td {
  border-bottom-color: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .prevtests-score__track {
  background: #1e293b;
}

html[data-theme="dark"] .prevtests-pill--subject {
  background: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .prevtests-action--results {
  background: #1e3a8a;
  color: #93c5fd;
}

html[data-theme="dark"] .prevtests-action--analysis {
  background: #064e3b;
  color: #6ee7b7;
}

html[data-theme="dark"] .prevtests-pager button {
  color: #cbd5e1;
}

html[data-theme="dark"] .fc-page__intro h2,
html[data-theme="dark"] .fc-page__intro h3,
html[data-theme="dark"] .fc-deck-card__title,
html[data-theme="dark"] .fc-empty h3,
html[data-theme="dark"] .fc-card-row__preview,
html[data-theme="dark"] .fc-flip__body,
html[data-theme="dark"] .fc-menu__list a,
html[data-theme="dark"] .fc-menu__list button,
html[data-theme="dark"] .fc-field > span,
html[data-theme="dark"] .fc-color-field legend,
html[data-theme="dark"] .fc-color-swatch__label {
  color: #e2e8f0;
}

html[data-theme="dark"] .fc-empty,
html[data-theme="dark"] .fc-deck-card,
html[data-theme="dark"] .fc-form,
html[data-theme="dark"] .fc-flip,
html[data-theme="dark"] .fc-menu__list,
html[data-theme="dark"] .fc-color-swatch,
html[data-theme="dark"] .fc-field input[type="text"],
html[data-theme="dark"] .fc-editor-pane .note-editor.note-frame,
html[data-theme="dark"] .fc-editor-pane .note-editor.note-frame .note-editing-area .note-editable {
  background: #111827;
  border-color: #1e293b;
}

html[data-theme="dark"] .fc-empty p,
html[data-theme="dark"] .fc-page__intro p,
html[data-theme="dark"] .fc-deck-card__meta,
html[data-theme="dark"] .fc-card-row__label,
html[data-theme="dark"] .fc-color-field__help,
html[data-theme="dark"] .fc-flip__side,
html[data-theme="dark"] .fc-flip__hint {
  color: #94a3b8;
}

html[data-theme="dark"] .fc-menu__toggle {
  color: #cbd5e1;
}

html[data-theme="dark"] .fc-menu__toggle:hover,
html[data-theme="dark"] .fc-menu__toggle[aria-expanded="true"],
html[data-theme="dark"] .fc-menu__list a:hover,
html[data-theme="dark"] .fc-menu__list button:hover {
  background: #1e293b;
  color: #f8fafc;
}

html[data-theme="dark"] .fc-field input[type="text"] {
  color: #e2e8f0;
}

html[data-theme="dark"] .fc-color-swatch.is-selected,
html[data-theme="dark"] .fc-color-swatch:has(input:checked) {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* ---------- MCiQ Route Atlas homepage ---------- */
html[data-theme="dark"] .mciq-home {
  --mciq-navy: #ffffff;
  --mciq-blue: #3b82f6;
  --mciq-gold: #c9a227;
  --mciq-muted: #9db2cc;
  --mciq-line: rgba(255, 255, 255, 0.1);
  --mciq-soft: #13233d;
  background: #0b1220;
  color: #e8eef7;
}

html[data-theme="dark"] .mciq-home-kicker {
  color: #c9a227;
}

html[data-theme="dark"] .mciq-home-kicker__dot {
  background: #3b82f6;
}

/* Photo stays on the right (same as light) — full-bleed cover was over-zooming */
html[data-theme="dark"] .mciq-home-hero {
  background: #0b1220;
  padding-bottom: 6rem;
}

html[data-theme="dark"] .mciq-home-hero__media {
  inset: 0 0 0 36%;
}

html[data-theme="dark"] .mciq-home-hero__img {
  object-fit: cover;
  object-position: center 28%;
  filter: brightness(0.88) contrast(1.04) saturate(0.95);
  transform: none;
}

html[data-theme="dark"] .mciq-home-hero__fade {
  background:
    linear-gradient(
      90deg,
      #0b1220 0%,
      #0b1220 8%,
      rgba(11, 18, 32, 0.92) 22%,
      rgba(11, 18, 32, 0.45) 42%,
      rgba(11, 18, 32, 0.12) 62%,
      transparent 82%
    ),
    linear-gradient(
      180deg,
      rgba(11, 18, 32, 0.35) 0%,
      transparent 20%,
      transparent 65%,
      #0b1220 100%
    ),
    radial-gradient(ellipse at 65% 40%, rgba(59, 130, 246, 0.18), transparent 50%);
}

html[data-theme="dark"] .mciq-home-hero__title,
html[data-theme="dark"] .mciq-home-services__title,
html[data-theme="dark"] .mciq-svc-card__title,
html[data-theme="dark"] .mciq-route-bar__label span,
html[data-theme="dark"] .mciq-home-banner p,
html[data-theme="dark"] .mciq-home-footer__brand strong {
  color: #ffffff;
}

html[data-theme="dark"] .mciq-home-services__title span,
html[data-theme="dark"] .mciq-svc-card__tagline,
html[data-theme="dark"] .mciq-svc-card__discover {
  color: #60a5fa;
}

html[data-theme="dark"] .mciq-home-hero__lead,
html[data-theme="dark"] .mciq-home-hero__perks,
html[data-theme="dark"] .mciq-home-services__lead,
html[data-theme="dark"] .mciq-svc-card__desc,
html[data-theme="dark"] .mciq-svc-card__panel li {
  color: #9db2cc;
}

html[data-theme="dark"] .mciq-home-hero__perks svg,
html[data-theme="dark"] .mciq-route-bar__label svg {
  color: #3b82f6;
}

html[data-theme="dark"] .mciq-home-hero .mciq-btn--primary,
html[data-theme="dark"] .mciq-route-bar .mciq-btn--primary,
html[data-theme="dark"] .mciq-home-banner .mciq-btn--primary {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
  border-radius: 999px;
}

html[data-theme="dark"] .mciq-home-hero .mciq-btn--primary:hover,
html[data-theme="dark"] .mciq-route-bar .mciq-btn--primary:hover,
html[data-theme="dark"] .mciq-home-banner .mciq-btn--primary:hover {
  background: #3b82f6;
  border-color: #3b82f6;
}

html[data-theme="dark"] .mciq-home-hero .mciq-btn--ghost {
  color: #e2e8f0;
  background: transparent;
  border-color: rgba(226, 232, 240, 0.45);
  border-radius: 999px;
}

html[data-theme="dark"] .mciq-home-hero .mciq-btn--ghost:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: #60a5fa;
  color: #fff;
}

html[data-theme="dark"] .mciq-btn__play {
  background: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .mciq-btn--outline {
  color: #93c5fd;
  background: transparent;
  border-color: rgba(96, 165, 250, 0.55);
}

html[data-theme="dark"] .mciq-btn--outline:hover {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
}

html[data-theme="dark"] .mciq-btn--primary {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

html[data-theme="dark"] .mciq-route-bar {
  background: #132033;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .mciq-route-select {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
}

html[data-theme="dark"] .mciq-route-select__prefix {
  color: #8aa0b8;
}

html[data-theme="dark"] .mciq-route-select select {
  color: #ffffff;
  background: transparent;
  color-scheme: dark;
}

html[data-theme="dark"] .mciq-route-select select option {
  background: #111827;
  color: #f8fafc;
}

/* Seamless join under route bar — no light seam */
html[data-theme="dark"] .mciq-home-services {
  background: #0b1220;
  padding-top: 4.5rem;
}

html[data-theme="dark"] .mciq-svc-card {
  background: #111827;
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .mciq-svc-card__corner {
  background: #13233d;
}

html[data-theme="dark"] .mciq-svc-card__icon {
  background: #13233d;
  color: #60a5fa;
}

html[data-theme="dark"] .mciq-svc-card__num,
html[data-theme="dark"] .mciq-svc-card__chevron {
  color: #7c93ad;
}

html[data-theme="dark"] .mciq-svc-card__accordion {
  border-top-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .mciq-svc-card__trigger {
  color: #e8eef7;
}

html[data-theme="dark"] .mciq-svc-card__check {
  color: #2dd4a8;
}

html[data-theme="dark"] .mciq-svc-card__discover-arrow {
  background: #13233d;
  color: #60a5fa;
}

html[data-theme="dark"] .mciq-svc-card:hover .mciq-svc-card__discover-arrow,
html[data-theme="dark"] .mciq-svc-card__discover:hover .mciq-svc-card__discover-arrow {
  background: #1a3258;
}

html[data-theme="dark"] .mciq-home-banner {
  background: #13233d;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .mciq-home-footer {
  background: #070b14;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

html[data-theme="dark"] .mciq-home-footer__brand em,
html[data-theme="dark"] .mciq-home-footer__tag {
  color: #8aa0b8;
}

@media (max-width: 900px) {
  html[data-theme="dark"] .mciq-home-hero__media {
    inset: auto 0 0 0;
    height: 52%;
    opacity: 1;
  }

  html[data-theme="dark"] .mciq-home-hero__img {
    object-position: center 22%;
  }

  html[data-theme="dark"] .mciq-home-hero__fade {
    background:
      linear-gradient(180deg, #0b1220 0%, rgba(11, 18, 32, 0.92) 22%, rgba(11, 18, 32, 0.35) 48%, transparent 68%),
      linear-gradient(0deg, #0b1220 0%, rgba(11, 18, 32, 0.9) 30%, transparent 55%);
  }

  html[data-theme="dark"] .mciq-home-hero__copy {
    padding-bottom: 10rem;
  }
}
