/* MLSD course overrides, loaded after the app CSS from www/_lms.html. */

/* Cards written with inline light backgrounds keep their light look in dark mode,
   so their text must stay dark too. Inline colors still win over these rules. */
[data-theme='dark'] .lesson-reading :is([style*='background:#f'], [style*='background: #f'], [style*='background:#e'], [style*='background: #e'], [style*='background-color:#f'], [style*='background-color: #f']),
[data-theme='dark'] .lesson-reading .lab-submission-start {
	color: #203c35;
}
[data-theme='dark'] .lesson-reading :is([style*='background:#f'], [style*='background: #f'], [style*='background:#e'], [style*='background: #e'], [style*='background-color:#f'], [style*='background-color: #f'], .lab-submission-start) :is(p, li, ul, ol, strong, b, em, i, span, small, h1, h2, h3, h4, h5, h6, td, th, blockquote, summary, code) {
	color: inherit;
}
[data-theme='dark'] .lesson-reading :is([style*='background:#f'], [style*='background: #f'], [style*='background:#e'], [style*='background: #e'], [style*='background-color:#f'], [style*='background-color: #f'], .lab-submission-start) a {
	color: #1d6b55;
}
[data-theme='dark'] .lesson-reading :is([style*='background:#f'], [style*='background: #f'], [style*='background:#e'], [style*='background: #e'], [style*='background-color:#f'], [style*='background-color: #f']) code {
	background: rgba(32, 60, 53, 0.08);
}

/* Display math sits on a light panel in the light theme; give it a dark one here. */
[data-theme='dark'] .lesson-reading .katex-display {
	background: #1b2420;
	border-color: #2e3d36;
}

/* Code blocks have a dark background in both themes; use a dark-surface palette. */
.lesson-reading pre code.hljs { color: #e6edf3; }
.lesson-reading pre code.hljs :is(.hljs-subst, .hljs-params) { color: #e6edf3; }
.lesson-reading pre code.hljs :is(.hljs-keyword, .hljs-doctag, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-variable.language_) { color: #ff7b72; }
.lesson-reading pre code.hljs :is(.hljs-title, .hljs-title.class_, .hljs-title.function_) { color: #d2a8ff; }
.lesson-reading pre code.hljs :is(.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-meta, .hljs-number, .hljs-operator, .hljs-variable, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id) { color: #79c0ff; }
.lesson-reading pre code.hljs :is(.hljs-string, .hljs-regexp, .hljs-meta .hljs-string) { color: #a5d6ff; }
.lesson-reading pre code.hljs :is(.hljs-built_in, .hljs-symbol) { color: #ffa657; }
.lesson-reading pre code.hljs :is(.hljs-comment, .hljs-code, .hljs-formula) { color: #8b949e; }
.lesson-reading pre code.hljs :is(.hljs-name, .hljs-quote, .hljs-selector-tag, .hljs-selector-pseudo) { color: #7ee787; }
.lesson-reading pre code.hljs .hljs-section { color: #79c0ff; font-weight: 600; }
.lesson-reading pre code.hljs .hljs-bullet { color: #f2cc60; }
.lesson-reading pre code.hljs .hljs-addition { color: #aff5b4; background: #033a16; }
.lesson-reading pre code.hljs .hljs-deletion { color: #ffdcd7; background: #67060c; }
