html[data-theme="dark"] body:not(.hw-nexus):not(.edu-nexus):not(.hp-nexus):not(.engineering-page) .bg-hero {
  background: #0b3526;
}

html[data-theme="dark"] .team-bio-card {
  background: linear-gradient(180deg, #16323f, #0a3a33);
}

html[data-theme="dark"] .desc-table .is-highlight {
  background: #16323f;
}

html[data-theme="dark"] .desc-route {
  border: 2px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .desc-route[data-route="a"] {
  border-color: rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .desc-route[data-route="b"] {
  border-color: rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .attr-ai {
  background: #16323f;
}

html[data-theme="dark"] .edu-pin {
  border: 1px solid rgba(160,232,96,0.18);
  background: #10472f;
}

html[data-theme="dark"] .collab-wall {
  background: radial-gradient(120% 140% at 50% -20%, #16323f 0%, #16323f 45%, #16323f 100%);
}

html[data-theme="dark"] .story {
  background: radial-gradient(120% 130% at 50% -10%, #16323f 0%, #16323f 45%, #16323f 100%);
}

html[data-theme="dark"] .edu-gallery.is-carousel {
  background: #16323f;
}

html[data-theme="dark"] .edu-arrow {
  color: #b8f57e;
  background: #16323f;
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .edu-arrow:focus-visible {
  background: #16323f;
}

html[data-theme="dark"] .edu-dot::before {
  background: #10472f;
}

html[data-theme="dark"] .edu-pdf-link a {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .sgd {
  background: radial-gradient(120% 120% at 50% -10%, #16323f 0%, #16323f 45%, #16323f 100%);
}

html[data-theme="dark"] .sgd-node {
  border: 3px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .labbook .protocol {
  background: #16323f;
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .labbook .protocol-pdf {
  background: #16323f;
}

html[data-theme="dark"] .labbook .protocol-pdf a {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .labbook .protocol-table-wrap {
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .labbook .protocol-table tbody tr:nth-child(odd) td {
  background: #16323f;
}

html[data-theme="dark"] .labbook .protocol-table tbody tr:last-child td {
  background: #16323f;
}

html[data-theme="dark"] .labbook .protocol-table--recipe td.recipe-group {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .labbook .protocol-viewer {
  background: #16323f;
}

html[data-theme="dark"] .labbook .protocol-viewer iframe {
  background: #16323f;
}

html[data-theme="dark"] html, html[data-theme="dark"] body {
  color: #e7f2ea;
}

html[data-theme="dark"] .hw code {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .hw-terms > div {
  border: 1px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .hw-terms:not(.hw-flip) dt { color: #2edab3; }
html[data-theme="dark"] .hw-terms:not(.hw-flip) dd { color: var(--c-text); }

html[data-theme="dark"] .hw-dec-flag {
  border: 1px solid rgba(160,232,96,0.18);
  background: #0b3526;
  color: #eecb86;
}

html[data-theme="dark"] .hw-caution {
  background: #0b3526;
  color: #eecb86;
}

html[data-theme="dark"] .hw-module {
  border: 2px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .hw-module[data-module="primary"] {
  background: #16323f;
}

html[data-theme="dark"] .hw-module[data-module="secondary"] {
  border-color: rgba(160,232,96,0.18);
}

html[data-theme="dark"] .hw-diagram {
  border: 1px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .hw-fold {
  border: 1px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .hw-fold-head:hover {
  background: #16323f;
}

html[data-theme="dark"] .hw-table .is-total {
  background: #16323f;
  color: #b8f57e;
}

html[data-theme="dark"] .cap-field {
  border: 1px solid rgba(160,232,96,0.18);
  background: radial-gradient(120% 90% at 50% 0%, #16323f 0%, #16323f 55%, #16323f 100%),
    repeating-linear-gradient(0deg, rgba(7, 90, 62, 0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(7, 90, 62, 0.05) 0 1px, transparent 1px 40px);
}

html[data-theme="dark"] .cap-pill {
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .cap-pause {
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .cap-pause:hover {
  background: #16323f;
}

html[data-theme="dark"] .cap-rule-score {
  background: #16323f;
  color: #b8f57e;
}

html[data-theme="dark"] .cap-rule-score.is-loss {
  background: #0b3526;
  color: #eecb86;
}

html[data-theme="dark"] .cap-level-box {
  border: 1px solid rgba(160,232,96,0.22);
  background: #16323f;
}

html[data-theme="dark"] .cap-level-box:hover {
  border-color: rgba(160,232,96,0.6);
  background: #1c4352;
}

html[data-theme="dark"] .cap-level input:checked + .cap-level-box {
  border-color: #a0e860;
  background: #a0e860;
  box-shadow: 0 0 0 1px #a0e860, 0 0 18px rgba(160,232,96,0.35);
}

html[data-theme="dark"] .cap-level input:checked + .cap-level-box .cap-level-name { color: #0e242e; }
html[data-theme="dark"] .cap-level input:checked + .cap-level-box .cap-level-name::before { content: "\2713\00a0"; }
html[data-theme="dark"] .cap-level input:focus-visible + .cap-level-box { outline-color: #ffffff; }

html[data-theme="dark"] .cap-btn-quiet {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .cap-btn-quiet:hover {
  background: #16323f;
}

html[data-theme="dark"] .hp-figure {
  background: #16323f;
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .edu-album-track {
  border: 1px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .edu-album-arrow {
  color: #b8f57e;
  background: #16323f;
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .edu-album-step::before {
  background: #0b3526;
}

html[data-theme="dark"] .parts-table .parts-group th {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .parts-table code {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .parts-card {
  border: 1px solid rgba(160,232,96,0.18);
  background: #16323f;
}

html[data-theme="dark"] .parts-meta code,
html[data-theme="dark"] .parts-card > p code {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .parts-built-from code {
  color: #b8f57e;
  background: #16323f;
}

html[data-theme="dark"] .parts-seq {
  background: #16323f;
  border: 1px solid rgba(160,232,96,0.18);
}

html[data-theme="dark"] .parts-table td > a > code,
html[data-theme="dark"] .parts-meta dd > a > code {
  border-color: rgba(160,232,96,0.28);
}

html[data-theme="dark"] .parts-table td > a:hover > code,
html[data-theme="dark"] .parts-table td > a:focus-visible > code,
html[data-theme="dark"] .parts-meta dd > a:hover > code,
html[data-theme="dark"] .parts-meta dd > a:focus-visible > code {
  background: #1d4150;
  border-color: #b8f57e;
}

html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .card,
html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .list-group-item {
  background-color: #16323f;
  color: #e7f2ea;
  border-color: rgba(160, 232, 96, 0.18);
}

html[data-theme="dark"] .cap-panel {
  background: rgba(7, 60, 41, 0.93);
}
html[data-theme="dark"] .cap-panel h2 { color: #d7f5b8; }
html[data-theme="dark"] .cap-rule-text,
html[data-theme="dark"] .cap-rule-text strong,
html[data-theme="dark"] .cap-rule-text em { color: #e7f2ea; }
html[data-theme="dark"] .cap-field {
  border-color: rgba(160, 232, 96, 0.18);
  background:
    radial-gradient(120% 90% at 50% 0%, #0a3a33 0%, #16323f 55%, #0e242e 100%),
    repeating-linear-gradient(0deg, rgba(160, 232, 96, 0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(160, 232, 96, 0.05) 0 1px, transparent 1px 40px);
}

html[data-theme="dark"] .quiz-card {
  background: #16323f;
  color: #e7f2ea;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .quiz-title { color: #d7f5b8; }
html[data-theme="dark"] .quiz-lead { color: var(--c-text-2); }
html[data-theme="dark"] .quiz-open {
  color: #d7f5b8;
  background: transparent;
  border-color: #5fb3e0;
}
html[data-theme="dark"] .quiz-open:hover,
html[data-theme="dark"] .quiz-open:focus-visible { background: rgba(95, 179, 224, 0.18); color: #eafff3; }
html[data-theme="dark"] .quiz-lang button { color: #d7f5b8; background: transparent; }
html[data-theme="dark"] .quiz-lang button:hover { background: rgba(160, 232, 96, 0.14); }
html[data-theme="dark"] .quiz-lang button[aria-pressed="true"] { background: #2779a7; color: #f2fff8; }
html[data-theme="dark"] .quiz-lang { border-color: rgba(160, 232, 96, 0.28); }

html[data-theme="dark"] .polaroid-photo,
html[data-theme="dark"] .polaroid .hw-flip-back { background: #0e3a26; }

html[data-theme="dark"] #page-leader:checked ~ .notebook-tabs .tab-leader,
html[data-theme="dark"] #page-wet:checked ~ .notebook-tabs .tab-wet,
html[data-theme="dark"] #page-dry:checked ~ .notebook-tabs .tab-dry,
html[data-theme="dark"] #page-hp:checked ~ .notebook-tabs .tab-hp,
html[data-theme="dark"] #page-professor:checked ~ .notebook-tabs .tab-professor,
html[data-theme="dark"] #page-advisor:checked ~ .notebook-tabs .tab-advisor {
  background: #1c4352;
  box-shadow: inset 0 -3px 0 #a0e860;
}
html[data-theme="dark"] .notebook-tab { color: #93b0bb; }
html[data-theme="dark"] #page-leader:checked ~ .notebook-tabs label,
html[data-theme="dark"] #page-wet:checked ~ .notebook-tabs label,
html[data-theme="dark"] #page-dry:checked ~ .notebook-tabs label,
html[data-theme="dark"] #page-hp:checked ~ .notebook-tabs label,
html[data-theme="dark"] #page-professor:checked ~ .notebook-tabs label,
html[data-theme="dark"] #page-advisor:checked ~ .notebook-tabs label { color: #93b0bb; }

html[data-theme="dark"] .hwx-seg button[aria-pressed="true"] {
  background: #123a44;
  border-color: #5fb3e0;
  color: #eafff3;
}

html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .navbar-nav .nav-link { color: #d7f5b8; }
html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .navbar-nav .nav-link:hover,
html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .navbar-nav .nav-link:focus { color: #fff6b7; }
html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .navbar-dark .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23d7f5b8' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .navbar-dark .navbar-toggler { border-color: rgba(215, 245, 184, 0.45); }
html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .navbar.bg-dark { background-color: rgba(14, 36, 46, 0.88) !important; }
html[data-theme="dark"] body:not(.engineering-page):not(.hw-nexus):not(.edu-nexus):not(.hp-nexus) .navbar .dropdown-menu {
  background: #16323f;
  border-color: rgba(160, 232, 96, 0.16);
}
html[data-theme="dark"] body:not(.engineering-page):not(.hw-nexus):not(.edu-nexus):not(.hp-nexus) .navbar .dropdown-item { color: #d7f5b8; }
html[data-theme="dark"] body:not(.engineering-page):not(.hw-nexus):not(.edu-nexus):not(.hp-nexus) .navbar .dropdown-item:hover,
html[data-theme="dark"] body:not(.engineering-page):not(.hw-nexus):not(.edu-nexus):not(.hp-nexus) .navbar .dropdown-item:focus {
  background: rgba(160, 232, 96, 0.12) !important;
  color: #b8f57e !important;
}

html[data-theme="dark"] .desc .desc-chain-head { color: #d7f5b8; }
html[data-theme="dark"] .desc .desc-stat-v { color: #d7f5b8; }

html[data-theme="dark"] .list-group-item:hover,
html[data-theme="dark"] .list-group-item.active {
  background-color: #2779a7;
  color: #f2fff8;
  border-color: rgba(160, 232, 96, 0.25);
}

html[data-theme="dark"] body:not(.hw-nexus):not(.edu-nexus):not(.hp-nexus):not(.engineering-page):not(.board-game-page) .navbar .dropdown-item:hover,
html[data-theme="dark"] body:not(.hw-nexus):not(.edu-nexus):not(.hp-nexus):not(.engineering-page):not(.board-game-page) .navbar .dropdown-item:focus {
  background: rgba(160, 232, 96, 0.16) !important;
  color: #fff6b7 !important;
}
html[data-theme="dark"] body:not(.engineering-page):not(.board-game-page) .navbar .dropdown-menu {
  background: #16323f !important;
  color: #d7f5b8 !important;
}

html[data-theme="dark"] .protocol h3.protocol-section,
html[data-theme="dark"] .protocol .protocol-section {
  color: #b8f57e;
  border-color: rgba(160, 232, 96, 0.35);
}

html[data-theme="dark"] .parts-lead p,
html[data-theme="dark"] .parts-card p,
html[data-theme="dark"] .parts-meta dd,
html[data-theme="dark"] .parts-meta dd em,
html[data-theme="dark"] .parts-card p em { color: var(--c-text); }
html[data-theme="dark"] .parts-card h3,
html[data-theme="dark"] .parts-table thead th { color: #2edab3; }
html[data-theme="dark"] .parts-seq code { color: #b8f57e; }

html[data-theme="dark"] .parts-meta dt { color: var(--c-text-2); }
html[data-theme="dark"] .parts-built-from { color: var(--c-text-2) !important; }
html[data-theme="dark"] .parts-card .hw-fold-title { color: #2edab3; }
html[data-theme="dark"] .parts-card .hw-fold-meta { color: var(--c-text-2); }
html[data-theme="dark"] .parts-built-from { border-top-color: rgba(160,232,96,0.18); }

html[data-theme="dark"] .parts-note {
  color: #b8f57e !important;
  border-left-color: rgba(160, 232, 96, 0.45) !important;
}

html[data-theme="dark"] .story p,
html[data-theme="dark"] .story li{ color: var(--c-text-2); }

html[data-theme="dark"] .cap-level-name { color: var(--c-text-2); }

html[data-theme="dark"] .edu-map-orbit-item .edu-map-info-meta,
html[data-theme="dark"] .edu-strip-meta { color: var(--c-text-2); }

html[data-theme="dark"] .home-video-title { color: var(--c-text); }
html[data-theme="dark"] .cap-intro p,
html[data-theme="dark"] .cap-intro em,
html[data-theme="dark"] .cap-intro strong { color: var(--c-text); }
html[data-theme="dark"] .cap-time-value { color: #b8f57e; }
html[data-theme="dark"] .quiz-skip {
  color: #d7f5b8;
  background: transparent;
  border-color: #5fb3e0;
}
html[data-theme="dark"] .quiz-skip:hover,
html[data-theme="dark"] .quiz-skip:focus-visible { background: rgba(95, 179, 224, 0.18); color: #eafff3; }
html[data-theme="dark"] .quiz-btn {
  color: #d7f5b8;
  background: transparent;
  border-color: #5fb3e0;
}
html[data-theme="dark"] .quiz-btn:hover:not(:disabled),
html[data-theme="dark"] .quiz-btn:focus-visible { background: rgba(95, 179, 224, 0.18); color: #eafff3; }
html[data-theme="dark"] .quiz-btn:disabled { color: #8aa399; border-color: #3a5a52; }
html[data-theme="dark"] .hw3d-rail label { color: var(--c-text-2); }
