/* LessonSky RC133 — Dark contrast repair for the actual RC132 production components.
 * Scope: only the explicit user-selected dark mode. Never recolor the light theme.
 * Highest-specificity overrides intentionally resolve RC95/UI Safe Mode's light-only
 * !important surfaces without changing any PHP data, markup, answer, or navigation.
 */
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] {
  --sk133-bg:#0b1a2e;
  --sk133-card:#142945;
  --sk133-raised:#1b3454;
  --sk133-stroke:#425f84;
  --sk133-text:#f1f7ff;
  --sk133-muted:#c5d6ec;
  --sk133-accent:#9fc8ff;
  color-scheme:dark;
}

/* The greeting is already dark: its previously *white* action buttons were
 * inheriting white button text, making the action names disappear. */
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-dashboard-head.sk-experience-hero .sk-dashboard-actions :is(a.sk-btn,button.sk-btn) {
  background:#234c7b!important;
  color:#f5f9ff!important;
  border:1px solid #719cd2!important;
  box-shadow:0 5px 14px rgba(5,16,43,.22)!important;
  opacity:1!important;
  text-shadow:none!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-dashboard-head.sk-experience-hero .sk-dashboard-actions :is(a.sk-btn,button.sk-btn):hover {
  background:#32629a!important;border-color:#acd2ff!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-dashboard-head.sk-experience-hero :is(h1,.sk-kicker,p) {
  color:#f5f9ff!important;opacity:1!important;
}

/* The collapsed student guide was an invisible white-on-white strip. */
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk-role-guide-disclosure {
  background:linear-gradient(135deg,#122641,#192f4d)!important;
  border:1px solid #45648b!important;color:#edf5ff!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk-role-guide-disclosure>summary {
  background:transparent!important;color:#ecf4ff!important;border-color:#426187!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk-role-guide-disclosure[open]>summary {
  background:#192f4e!important;border-color:#45648b!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk-role-guide-toggle-copy strong {
  color:#f4f8ff!important;opacity:1!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk-role-guide-toggle-copy small {
  color:#bfd2eb!important;opacity:1!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk-role-guide-toggle-action {
  background:#28527c!important;color:#f4faff!important;border:1px solid #5887b4!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-role-guide-disclosure :is(.sk-role-guide-panel,.sk-guide-section) {
  background:#162c49!important;color:#edf6ff!important;border-color:#436086!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-role-guide-disclosure :is(h2,h3,h4,strong,summary) {color:#f5f9ff!important}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-role-guide-disclosure :is(p,small,li) {color:#c7d8ef!important}

/* The dashboard uses ExamCalendar80, not the older .sk-exam-card component.
 * All five pastel tone variants need paired dark backgrounds AND text. */
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar {
  background:linear-gradient(150deg,#10223d,#152c4a)!important;
  color:#f1f7ff!important;border:1px solid #36567c!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-section-head :is(h2,h3) {
  color:#f4f9ff!important;opacity:1!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile {
  background:linear-gradient(145deg,#1b3557,#152c48)!important;
  border:1px solid #4b6991!important;border-left:4px solid var(--sk133-tone,#78b5ff)!important;
  color:#edf6ff!important;opacity:1!important;
  box-shadow:inset 0 1px 0 rgba(234,244,255,.055),0 7px 18px rgba(2,9,23,.12)!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile.tone-0{--sk133-tone:#80bfff}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile.tone-1{--sk133-tone:#68d8bb}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile.tone-2{--sk133-tone:#c2a4ff}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile.tone-3{--sk133-tone:#ffc98a}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile.tone-4{--sk133-tone:#ffa9cd}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile h3 {
  color:#f4f9ff!important;font-weight:800!important;opacity:1!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile .sk80-countdown {
  color:#e1f0ff!important;font-weight:900!important;opacity:1!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile :is(time,small) {
  color:#c5d8ef!important;opacity:1!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk80-calendar .sk80-section-head :is(.sk80-button,a.sk80-button,button.sk80-button) {
  background:#244c7a!important;color:#f4f8ff!important;border:1px solid #6b96c5!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk80-calendar .sk80-section-head :is(a.sk80-button,button.sk80-button):hover{
  background:#305f92!important;
}

/* Make repeated information/health messages legible without removing state. */
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  :is(.sk-module-health-notice,.sk-dashboard-more-menu-panel) {
  background:#172f4e!important;color:#edf5ff!important;border:1px solid #46678e!important;
}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-dashboard-more-menu-panel :is(a,button) {color:#eff6ff!important}
html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"]
  .sk-dashboard-more-menu-panel :is(a,button):hover {background:#2a4b74!important}

/* Assessment Focus: legacy Safe Mode forced white backgrounds while the account
 * dark mode inherited pale text. Scope every repair to real assessment markup. */
html.lessonsky-dark body.lessonsky-assessment-focus {
  background:#091629!important;color:#eef6ff!important;color-scheme:dark;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell {
  --sk-focus-bg:#091629;
  --sk-focus-ink:#f2f8ff;
  --sk-focus-line:#425e83;
  --ls-text:#eaf3ff;
  --ls-text-strong:#f5faff;
  --ls-muted:#c2d3ea;
  --ls-muted-2:#afc4df;
  --ls-line:#3f5b81;
  --ls-line-strong:#6b8ebc;
  --ls-surface:#172d49;
  --ls-surface-2:#1b3656;
  --ls-primary:#9bc7ff;
  --ls-primary-soft:#244873;
  background:#091629!important;color:#eef6ff!important;color-scheme:dark;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell .sk-assessment-focus-nav {
  background:#142842!important;color:#f0f7ff!important;border:1px solid #49678d!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-focus-nav :is(strong,b){color:#f5f9ff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-focus-nav :is(span,small){color:#bbd0ea!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-focus-nav>a {color:#eff6ff!important;background:#264a73!important;border-color:#6589b2!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell .sk-assessment-live-card {
  background:linear-gradient(135deg,#162d4a,#1c3657)!important;
  color:#f2f8ff!important;border:1px solid #46668d!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-live-card :is(h2,h3,strong,b,.sk-kicker) {color:#f5faff!important;opacity:1!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-live-card :is(p,small,span) {color:#c5d8ef!important;opacity:1!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-progress>div:first-child :is(strong,span) {color:#f0f7ff!important}

/* Left question list, center question canvas, and the three right cards. */
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  :is(.sk-assessment-question-map-panel,.sk-content-question-card,.sk-assessment-solution-panel) {
  background:linear-gradient(155deg,#162b47,#12253f)!important;
  color:#f0f7ff!important;border:1px solid #435f85!important;
  box-shadow:0 9px 25px rgba(3,10,27,.19)!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-tools-rail>section {
  background:linear-gradient(155deg,#172e4b,#142943)!important;
  color:#f1f7ff!important;border:1px solid #48668d!important;
  box-shadow:0 9px 25px rgba(3,10,27,.19)!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-panel-head :is(strong,b) {color:#f5faff!important;opacity:1!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-panel-head :is(small,span:not(.sk-assessment-panel-icon)) {color:#c2d5ee!important;opacity:1!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-panel-icon {color:#ffffff!important;background:#315f98!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-map-legend span {color:#c6d8ec!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-map-foot :is(b,strong){color:#f3f8ff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-map-foot small{color:#c4d6ec!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-number-grid>span {background:#203a5a!important;border-color:#55749d!important;color:#f1f7ff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-number-grid>span.is-current {background:#336caa!important;border-color:#a2c8f5!important;color:#fff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-number-grid>span.is-complete {background:#164e44!important;border-color:#5db99b!important;color:#c3f9e2!important}

/* Choice cards: both normal and checked states must be readable. */
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-stem {color:#f7fbff!important;opacity:1!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-route span {background:#274c73!important;border-color:#5278a4!important;color:#ebf5ff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-options>label {
  color:#eef6ff!important;background:#1b3554!important;
  border:1px solid #547299!important;
  box-shadow:none!important;opacity:1!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-options>label>span:last-child {
  color:#edf6ff!important;opacity:1!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-options>label:hover {background:#254668!important;border-color:#93b8e7!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-options>label:has(input:checked) {
  background:linear-gradient(115deg,#2d5686,#254876)!important;
  border:2px solid #a9d1ff!important;box-shadow:inset 0 1px 0 rgba(235,246,255,.1)!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-options>label:has(input:checked)>span:last-child {color:#fff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-options input[type=radio] {accent-color:#9fd2ff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-option-key {color:#fff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-content-options>label:focus-within {outline:3px solid #a4d1ff!important;outline-offset:2px!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-action-dock {
  background:linear-gradient(180deg,rgba(19,40,66,0),#162b46 33%)!important;
  border-top:1px solid #436087!important;color:#eaf4ff!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-action-dock>span {color:#c4d8f0!important}

/* Right rail: card headings, timer, tool rows, counters and font controls. */
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-rail-timer b {color:#f5faff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-rail-timer.is-untimed b {color:#80d9d9!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-rail-timer span {color:#c4d8ed!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-tool-row {
  background:#1f3b5d!important;color:#f4f9ff!important;border:1px solid #55749c!important;
  opacity:1!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-tool-row>b {color:#f2f8ff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-tool-row>em {color:#cad9ef!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-tool-row>span {color:#aacfff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-tool-row:is(button):hover {background:#294f7a!important;border-color:#a1bde0!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-tool-row.is-danger :is(b,span){color:#ff93aa!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-font-tools button {
  background:#142b48!important;border-color:#55749b!important;color:#f2f8ff!important;
}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-progress-card>strong {color:#f6faff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-progress-card li {color:#c7d7ee!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-progress-card li b {color:#f4faff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-mini-progress {background:#2e496c!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-solution-panel :is(strong,b,summary){color:#f6faff!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-solution-panel :is(p,small){color:#cad9ee!important}
html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell
  .sk-assessment-solution-panel>details[open] {background:#182e4b!important;border-color:#6386af!important;color:#f4f9ff!important}

/* Do not alter high-contrast OS accessibility colors or the supported theme. */
@media (forced-colors:active){
  html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-calendar .sk80-tile,
  html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell .sk-content-options>label,
  html.lessonsky-dark body.lessonsky-assessment-focus .sk-assessment-focus-shell .sk-assessment-tools-rail>section {
    forced-color-adjust:auto!important;box-shadow:none!important;
  }
}
@media (prefers-reduced-motion:reduce){
  html.lessonsky-dark body .sk-shell[data-sk-l10n-surface="dashboard"] .sk80-tile,
  html.lessonsky-dark body.lessonsky-assessment-focus .sk-content-options>label{transition:none!important;transform:none!important}
}
