/* Night palette for shared lesson components. Example previews keep their own design. */
html[data-theme="dark"] {
  --w3r-blue: #93c5fd;
  --w3r-heading: #f1f5f9;
  --w3r-syntax-text: #bfdbfe;
  --w3r-output-text: #99f6e4;
}
html[data-theme="dark"] :is(.dsh-brand-badge, .dsh-subnav-item.active) {
  background: #047857 !important;
  color: #fff !important;
}
html[data-theme="dark"] footer .text-secondary { color: #b4c1d4 !important; }
html[data-theme="dark"] footer .btn-outline-success { color: #86efac; border-color: #4ade80; }
html[data-theme="dark"] :is(.w3r-card, .w3r-sidebar, .w3r-code-wrap, .w3r-quiz-card) {
  background: #101a2a !important;
  border-color: #40516a !important;
  color: #e5edf7 !important;
}
html[data-theme="dark"] :is(.w3r-sidebar-head, .w3r-sidebar-footer, .w3r-module-title,
  .w3r-spec-box, .w3r-rules-list li, .w3r-pager a, .w3r-copy-btn, .w3r-quiz-opt,
  .w3r-code-bar, .w3r-search, .w3r-search-input) {
  background: #172338 !important;
  border-color: #40516a !important;
  color: #e5edf7 !important;
}
html[data-theme="dark"] :is(.w3r-brand, .w3r-sidebar-footer a, .w3r-spec-label, .w3r-h1, .w3r-h3) {
  color: #93c5fd !important;
}
html[data-theme="dark"] :is(.w3r-sidebar-head p, .w3r-num, .w3r-breadcrumb, .w3r-breadcrumb span, .w3r-pager small) {
  color: #b4c1d4 !important;
}
html[data-theme="dark"] .w3r-card > p { color: #e5edf7 !important; }
html[data-theme="dark"] :is(.w3r-spec-value, .w3r-nav-list a, .w3r-rules-list li > span) { color: #e5edf7 !important; }
html[data-theme="dark"] :is(.w3r-syntax-head, .w3r-check-icon) { color: #86efac !important; }
html[data-theme="dark"] :is(.w3r-h2, .w3r-quiz-card > p) { color: #f1f5f9 !important; }
html[data-theme="dark"] :is(.w3r-nav-list, [class$="-lesson-nav"]) a.active {
  background: #075985 !important;
  color: #fff !important;
}
html[data-theme="dark"] :is(.w3r-nav-list, [class$="-lesson-nav"]) a.active span { color: #fff !important; }
html[data-theme="dark"] :is(aside, nav) [class$="-lesson-num"] { color: #bae6fd !important; }
html[data-theme="dark"] main :is([class$="-badge"], .w3r-chip) {
  background: #1e3a5f !important;
  color: #dbeafe !important;
  border-color: #52749e !important;
}
html[data-theme="dark"] aside [class$="-module"],
html[data-theme="dark"] nav [class$="-module"] { color: #93c5fd !important; }
html[data-theme="dark"] main :is(.w3r-breadcrumb a, .dsh-learning-support a,
  [class$="-pager"] a, [class$="-card"] > p a, [class$="-card"] > ol a,
  [class$="-card"] > ul a, #tp-reference a, .sql-route a, .sql-callout strong) {
  color: #93c5fd !important;
}
html[data-theme="dark"] main [class$="-quiz-btn"] > span { color: #93c5fd !important; }
html[data-theme="dark"] main a[class$="-copy-btn"],
html[data-theme="dark"] main .w3r-btn-group .btn-success {
  background: #075985 !important;
  color: #fff !important;
  border-color: #38bdf8 !important;
}
html[data-theme="dark"] .w3r-concept-card,
html[data-theme="dark"] .w3r-concept-card div[style*="background"] {
  background: #172338 !important;
  border-color: #52749e !important;
  color: #e5edf7 !important;
}
html[data-theme="dark"] .w3r-concept-card :is(h2, p, strong, span, ol, li) { color: #e5edf7 !important; }
html[data-theme="dark"] .android-main .code-tab-btn { color: #cbd5e1 !important; }
html[data-theme="dark"] .android-main .code-tab-btn.active { background: #172338 !important; color: #fff !important; }
html[data-theme="dark"] .cs-flow li { background: #172338 !important; color: #e5edf7 !important; border-color: #40516a !important; }
html[data-theme="dark"] .w3r-quiz-opt.correct { background: #14532d !important; color: #dcfce7 !important; }
html[data-theme="dark"] .w3r-quiz-opt.wrong { background: #7f1d1d !important; color: #fee2e2 !important; }
html[data-theme="dark"] :is(.ga-profile-card .text-secondary, #all-technologies-guide .text-secondary,
  .interview-hero ~ .container .text-secondary) { color: #b4c1d4 !important; }
html[data-theme="dark"] .ga-profile-card .btn-outline-success { color: #86efac; }
html[data-theme="dark"] [class$="-topline"] {
  background: #101a2a !important; color: #b4c1d4 !important; border-color: #40516a !important;
}
html[data-theme="dark"] [class$="-topline"] a { color: #93c5fd !important; }
html[data-theme="dark"] .w3r-sidebar-title { color: #93c5fd !important; }
html[data-theme="dark"] .w3r-sidebar-desc { color: #b4c1d4 !important; }
html[data-theme="dark"] main article > p a { color: #93c5fd !important; }
html[data-theme="dark"] .sql-step-idx { background: #075985 !important; color: white !important; }
html[data-theme="dark"] .sql-practice-box h4 { color: #93c5fd !important; }
html[data-theme="dark"] .php-course .preview-box p,
html[data-theme="dark"] .php-course .preview-box p strong { color: #243247 !important; }
html[data-theme="dark"] .android-screen-content button { background: #075985 !important; color: #fff !important; }
html[data-theme="dark"] [class$="-render-sandbox"] :is(.bg-dark, .card) .text-primary { color: #93c5fd !important; }
html[data-theme="dark"] [class$="-render-sandbox"] :is(.bg-dark, .card) .text-success { color: #86efac !important; }
html[data-theme="dark"] [class$="-render-sandbox"] :is(.bg-dark, .card) .text-secondary { color: #b4c1d4 !important; }
html[data-theme="dark"] :is(.excel-render-sandbox, .pbi-render-sandbox) [style*="color:#64748b"],
html[data-theme="dark"] :is(.excel-render-sandbox, .pbi-render-sandbox) [style*="color: #64748b"] { color: #475569 !important; }
html[data-theme="dark"] .excel-render-sandbox [style*="color:#107c41"],
html[data-theme="dark"] .excel-render-sandbox [style*="color: #107c41"] { color: #086338 !important; }
html[data-theme="dark"] .pbi-render-sandbox [style*="color:#10b981"],
html[data-theme="dark"] .pbi-render-sandbox [style*="color: #10b981"] { color: #047857 !important; }
html[data-theme="dark"] main.flex-grow-1 > section .text-secondary { color: #b4c1d4 !important; }
html[data-theme="dark"] main.flex-grow-1 > section .btn-outline-success { color: #86efac !important; }
html[data-theme="dark"] :is(.dsh-hero-search button, .btn-w3-tryit, #programming-curriculum .btn,
  .interview-cat-btn.active) { background: #075985 !important; color: #fff !important; }
html[data-theme="dark"] .dsh-spotlight-card .badge.text-success { color: #86efac !important; }
html[data-theme="dark"] .topic-difficulty-badge.badge-hard { background: #7f1d1d !important; color: #fee2e2 !important; }
html[data-theme="dark"] .ga-avatar { color: #0b1320 !important; }
html[data-theme="dark"] .dsh-navbar a[href="interview-questions.php"],
html[data-theme="dark"] .btn-tryit-nav { background: #075985 !important; color: #fff !important; }
html[data-theme="dark"] #programming-curriculum .badge { background: #1e3a5f !important; color: #dbeafe !important; }
html[data-theme="dark"] main [class$="-toc"] strong { color: #93c5fd !important; }

/* Rendered examples use a mixture of Bootstrap surfaces and explicit demo colors. */
html[data-theme="dark"] .bs-render-sandbox .text-primary { color: #93c5fd !important; }
html[data-theme="dark"] .bs-render-sandbox .text-success { color: #86efac !important; }
html[data-theme="dark"] .bs-render-sandbox .text-secondary { color: #b4c1d4 !important; }
html[data-theme="dark"] :is(.bs-render-sandbox, .jq-render-sandbox, .react-render-sandbox) .btn-outline-primary {
  --bs-btn-color: #93c5fd;
  --bs-btn-border-color: #60a5fa;
}
html[data-theme="dark"] .react-render-sandbox .btn-outline-danger { --bs-btn-color: #fda4af; }
html[data-theme="dark"] .bs-render-sandbox :is(.nav-link:not(.active), .page-item:not(.active) .page-link, .breadcrumb a),
html[data-theme="dark"] :is(.bs-prose, .bs-code-head, .react-code-head) a { color: #c4b5fd !important; }
html[data-theme="dark"] .bs-render-sandbox .bg-primary.bg-gradient {
  --bs-primary-rgb: 7, 65, 124;
}
/* This demo intentionally overrides the card background with a pale green CSS variable. */
html[data-theme="dark"] .bs-render-sandbox .card[style*="--bs-card-bg"] { color: #243247 !important; }
html[data-theme="dark"] .bs-render-sandbox .card[style*="--bs-card-bg"] .text-success { color: #086338 !important; }
html[data-theme="dark"] :is(.react-render-sandbox, .numpy-benchmark-box) .bg-light,
html[data-theme="dark"] :is(.react-render-sandbox, .numpy-benchmark-box) .bg-light :is(strong, span:not(.badge), .text-muted) {
  color: #243247 !important;
}
html[data-theme="dark"] .numpy-benchmark-box .bg-light .text-success { color: #086338 !important; }
html[data-theme="dark"] .node-main .w3r-card .table-striped :is(td, th) {
  background: #172338 !important;
  color: #e5edf7 !important;
}
html[data-theme="dark"] .node-main .w3r-card .table-striped td code { color: #f9a8d4 !important; }
html[data-theme="dark"] .kt-main #preview [style*="color:#7f52ff"] { color: #c4b5fd !important; }
html[data-theme="dark"] :is(.android-screen-content, .aws-main #preview) [style*="color:#64748b"] { color: #cbd5e1 !important; }
html[data-theme="dark"] :is(.sql-main, .android-screen-content) span[style*="background:#0284c7"] { background: #075985 !important; }
html[data-theme="dark"] .xml-main span[style*="background:#f97316"] { background: #9a3412 !important; }
html[data-theme="dark"] .ds-main #preview [style*="color:#a855f7"] { color: #d8b4fe !important; }
html[data-theme="dark"] .pandas-practice-box code { color: #f9a8d4 !important; }
html[data-theme="dark"] .bs-render-sandbox .text-danger { color: #fda4af !important; }
html[data-theme="dark"] .android-screen-content span[style*="background:#10b981"] { background: #047857 !important; }
