/* LessonSky RC134 – one dark palette shared by the actual learner workspaces.
 * Applied ONLY when the appearance controller sets .lessonsky-dark.
 * Do not affect the light theme, assessment focus sizing, mobile nav or data.
 */
html.lessonsky-dark {
  color-scheme:dark;
  --sk134-bg:#0a1729;
  --sk134-card:#142a46;
  --sk134-card-2:#1b3554;
  --sk134-line:#436389;
  --sk134-ink:#f2f7ff;
  --sk134-muted:#c2d4ea;
  --sk134-blue:#a8ceff;
  /* The old UI Safe Mode references these variables. Its original light-only
     variables caused white-on-white labels even on otherwise dark components. */
  --ls-safe-bg:#0a1729;
  --ls-safe-surface:#142a46;
  --ls-safe-surface-2:#1b3554;
  --ls-safe-text:#f2f7ff;
  --ls-safe-muted:#c2d4ea;
  --ls-safe-border:#436389;
  --ls-safe-shadow:0 10px 26px rgba(0,8,24,.24);
}

/* Shared learner variables (including the exam overview, which is not sk80-workspace). */
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-workspace,.sk79-workspace,.sk80-workspace,.sk81-tools,.sk81-universities,.sk81-rank,.sk-content-practice-shell){
  --c78-ink:var(--sk134-ink);
  --c78-muted:var(--sk134-muted);
  --c78-line:var(--sk134-line);
  --c78-surface:var(--sk134-card);
  --ls-surface:var(--sk134-card);
  --ls-surface-2:var(--sk134-card-2);
  --ls-text:var(--sk134-ink);
  --ls-text-strong:var(--sk134-ink);
  --ls-muted:var(--sk134-muted);
  --ls-line:var(--sk134-line);
  color:var(--sk134-ink)!important;
}

/* Learning pages and the Tools screen – true navy rather than stray white. */
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-hero,.sk80-hero){
  background:linear-gradient(130deg,#1a3857,#29496f 61%,#3a4a78)!important;
  border-color:#6484ad!important;color:#f3f8ff!important;
  box-shadow:0 16px 36px rgba(0,8,22,.22)!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-hero,.sk80-hero) :is(h1,h2,h3,.sk78-eyebrow,.sk-kicker){color:#f5f9ff!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-hero,.sk80-hero) p{color:#d8e7f9!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-workspace,.sk80-workspace,.sk81-tools) :is(h1,h2,h3,h4,strong,b,legend){color:#f3f8ff!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-workspace,.sk80-workspace,.sk81-tools) :is(p,small,.sk78-muted,.sk80-history-count){color:var(--sk134-muted)!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-workspace,.sk80-workspace,.sk81-tools) :is(.sk78-eyebrow,.sk78-kicker,.sk-kicker){color:#a8ceff!important}

/* All lesson/detail/selector and tools card backgrounds. */
:is(html.lessonsky-dark body,body.lessonsky-dark) :is(
  .sk79-subject-tile,.sk78-card,.sk78-detail,.sk78-publication,.sk78-empty,
  .sk78-map,.sk78-map details,.sk78-steps li,.sk79-official,.sk79-check fieldset,
  .sk79-lab,.sk78-report form,.sk78-table-wrap,.sk78-resource-list>div,
  .sk80-panel,.sk80-hub-card,.sk80-tile,.sk80-exam-tile,.sk80-school,
  .sk80-preference,.sk80-add,.sk80-result,.sk80-note,.sk80-count-row,
  .sk81-tool-card,.sk81-university,.sk81-match,.sk81-report-panel,
  .sk83-preference-finder,.sk83-pick-item){
  background:linear-gradient(155deg,var(--sk134-card),var(--sk134-card-2))!important;
  border-color:var(--sk134-line)!important;
  color:var(--sk134-ink)!important;
  box-shadow:none!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-section-head,.sk79-subject-tile,.sk81-tool-card,.sk80-exam-tile,.sk80-section-head)
:is(h2,h3,h4,strong,b){color:#f4f9ff!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk79-subject-tile,.sk80-hub-card,.sk80-exam-tile,.sk80-tile,.sk81-tool-card,.sk81-university,.sk81-match,.sk83-pick-item)
:is(p,small){color:#c7d9ee!important;opacity:1!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk79-subject-symbol,.sk80-exam-icon,.sk81-tool-icon){
  background:#274969!important;border-color:#52769e!important;color:#f4faff!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk79-arrow,.sk81-tool-card>span:last-child){color:#cce3ff!important}

/* Course tabs stay readable in both states – current tab is intentionally bright. */
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-tabs,.sk80-tabs){background:#132b47!important;border:1px solid #49668b!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-tabs a,.sk80-tabs a){background:transparent!important;color:#c9dcf2!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-tabs a[aria-current="page"],.sk80-tabs a[aria-current="page"]){
  background:#e8f1ff!important;color:#17365a!important;box-shadow:none!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-tabs a:hover,.sk80-tabs a:hover):not([aria-current="page"]){
  background:#29496e!important;color:#fff!important;
}

/* Topic explanation, example and misconception are semantic siblings. */
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-lesson-section,.sk78-report,.sk80-date-form,.sk80-history-body,.sk81-report-row,.sk86-university-history){
  border-color:var(--sk134-line)!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-example,.sk79-check-result,.sk78-activity){
  background:#1d3d58!important;color:#eff7ff!important;border-color:#6e9fca!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk79-misconception{
  background:#3b3329!important;color:#fff1d9!important;border-color:#c59652!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-detail,.sk78-example,.sk79-misconception,.sk78-activity,.sk79-check-result) :is(h2,h3,h4,strong){color:#f5f9ff!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-detail,.sk78-example,.sk79-misconception,.sk78-activity,.sk79-check-result) :is(p,small){color:#d3e0f1!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-search,.sk79-breadcrumb,.sk80-section-head) :is(span,small,a,label){color:#c4dbf3!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-map-center,.sk79-lab svg){background:#234a72!important;color:#fff!important}

/* Input/control surfaces (do not recolor radio / checkbox / range tracks). */
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-workspace,.sk79-workspace,.sk80-workspace,.sk81-universities,.sk81-rank,.sk81-tools,.sk80-language-dialog,.sk-content-practice-shell)
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),select,textarea){
  background:#0e2036!important;border-color:#557399!important;color:#f4f8ff!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-workspace,.sk79-workspace,.sk80-workspace,.sk81-tools,.sk-content-practice-shell)
:is(input,textarea)::placeholder{color:#aac0d9!important;opacity:1!important}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-secondary,.sk80-button,.sk81-pagination a,.sk78-pagination a,.sk80-language-option){
  background:#244364!important;border-color:#6487ad!important;color:#f3f9ff!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-primary,.sk80-button.primary,.sk81-universities button,.sk81-rank button,.sk82-review-tracking form button){
  background:#315fa4!important;border-color:#79a5dd!important;color:#fff!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk80-notice.is-error,.sk-career-status){
  background:#492b2b!important;border-color:#b87d7c!important;color:#ffe4e4!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk80-language-dialog{
  background:#142b45!important;border-color:#597ca2!important;color:#f3f9ff!important;
}

/* Exam overview: white pastel exam cards, very dark counters and pale sublabels
   in the screenshots came from RC80/old safe-mode hard-coded declarations. */
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell){
  --ls-surface:var(--sk134-card);
  --ls-surface-2:var(--sk134-card-2);
  --ls-text:var(--sk134-ink);
  --ls-muted:var(--sk134-muted);
  --ls-line:var(--sk134-line);
  background:transparent!important;color:var(--sk134-ink)!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell) :is(
  .sk80-exam-picker,.sk-assessment-start-center,.sk-assessment-latest,
  .sk-assessment-start-card,.sk-assessment-blueprint,.sk-assessment-live-card,
  .sk-assessment-distribution span,.sk-assessment-blueprint-list>span,
  .sk-assessment-live-metrics>div,.sk-content-practice-stats>span,.sk-subject-test-card,
  .sk-topic-question-row,.sk80-history,.sk80-history-body){
  background:linear-gradient(145deg,#142a46,#1c3654)!important;
  border-color:var(--sk134-line)!important;color:#f4f9ff!important;
  box-shadow:none!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
.sk80-exam-tile{
  background:linear-gradient(140deg,#1a3453,#243d5f)!important;
  border-color:#52739c!important;border-top:4px solid var(--s80-accent,#6ca7ee)!important;
  color:#f5faff!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
.sk80-exam-tile :is(strong,small,span){color:#f3f8ff!important;opacity:1!important}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
.sk80-exam-tile small{color:#d2e1f2!important}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
.sk80-exam-icon{background:#2b517a!important;border-color:#749ac8!important;color:#fff!important}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
:is(.sk-content-practice-stats b,.sk-assessment-live-metrics strong,.sk-assessment-start-card h3,.sk-assessment-latest h2,.sk-subject-test-summary-copy b,.sk-topic-question-row b){
  color:#f6faff!important;opacity:1!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
:is(.sk-content-practice-stats small,.sk-assessment-live-metrics small,.sk-assessment-start-card small,.sk-assessment-latest p,.sk-subject-test-summary-copy small,.sk-subject-test-hint,.sk-topic-question-row small){
  color:#cbdcf0!important;opacity:1!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
:is(.sk-assessment-latest,.sk-assessment-start-center,.sk-subject-test-list,.sk80-exam-picker) :is(h2,h3,strong,b){color:#f3f8ff!important}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-content-practice-shell:not(.sk-assessment-focus-shell)
:is(.sk-topic-question-row,.sk-subject-test-link,.sk-subject-test-summary-action){color:#e6f1ff!important}

/* The selected desktop primary item must never be a white label on a white pill. */
:is(html.lessonsky-dark body,body.lessonsky-dark) :is(.ls-site-header,.ls-global-header,.ls-app-header,#masthead)
:is(a[aria-current="page"],.current-menu-item>a,.current_page_item>a,a.is-active){
  background:#315fa4!important;color:#fff!important;border-color:#769dce!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) [data-sk82-primary-nav]
a[data-sk82-tools-nav]:not([aria-current="page"]){color:#e7f1ff!important;background:transparent!important}

/* Desktop floating account dock inherited nearly white text on white buttons. */
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-account-dock{
  background:rgba(13,29,49,.96)!important;border-color:#4a6789!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-account-dock a{
  background:#203d5d!important;color:#f3f8ff!important;border-color:#54769b!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark) .sk-account-dock a.is-logout{
  background:#50303b!important;color:#ffdbe3!important;border-color:#b06b7f!important;
}

/* Focus visibility and system/OS accessibility settings take precedence. */
:is(html.lessonsky-dark body,body.lessonsky-dark)
:is(.sk78-workspace,.sk80-workspace,.sk81-tools,.sk-content-practice-shell)
:is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #afd5ff!important;outline-offset:3px!important}
@media(prefers-reduced-motion:reduce){
  :is(html.lessonsky-dark body,body.lessonsky-dark)
  :is(.sk79-subject-tile,.sk80-exam-tile,.sk81-tool-card){transition:none!important;transform:none!important}
}
@media(forced-colors:active){
  :is(html.lessonsky-dark body,body.lessonsky-dark)
  :is(.sk79-subject-tile,.sk80-exam-tile,.sk81-tool-card,.sk-content-practice-stats>span){forced-color-adjust:auto!important;box-shadow:none!important}
}

/* Exam introduction itself must not inherit design-components' light hero gradient. */
:is(html.lessonsky-dark body,body.lessonsky-dark)
.sk-content-practice-shell:not(.sk-assessment-focus-shell) .sk-content-practice-hero{
  --ls-hero-1:#193a5f;
  --ls-hero-2:#285c7a;
  --ls-hero-3:#425582;
  background:linear-gradient(135deg,#193a5f 0%,#285c7a 58%,#425582 100%)!important;
  border:1px solid #608bb2!important;
  color:#f4f9ff!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
.sk-content-practice-shell:not(.sk-assessment-focus-shell) .sk-content-practice-hero :is(h1,h2,h3,p,.sk-kicker,small){
  color:#f4f9ff!important;opacity:1!important;
}
:is(html.lessonsky-dark body,body.lessonsky-dark)
.sk-content-practice-shell:not(.sk-assessment-focus-shell) .sk-content-practice-hero .sk-btn{
  background:#244e76!important;color:#f4f9ff!important;border-color:#7099c5!important;
}
