.theme-toggle{padding:8px 11px;min-height:42px;gap:7px;font-size:14px;font-weight:400}.theme-toggle svg{width:18px;height:18px}.top-actions{gap:13px}
html[data-theme="dark"]{color-scheme:dark;--bg:#111827;--surface:#1b2536;--ink:#e7edf7;--muted:#adb9cc;--border:#354156;--purple:#c3b3f5;--purple-light:#342d4c;--green:#9bdfbe;--green-light:#203f35;--amber:#f1ce8c;--amber-light:#463b26;--red:#ffafb7;--red-light:#482c37}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .track-card,html[data-theme="dark"] .filters,html[data-theme="dark"] .source-card,html[data-theme="dark"] .scope-card,html[data-theme="dark"] .gate,html[data-theme="dark"] .fact,html[data-theme="dark"] .timeline-box,html[data-theme="dark"] .note-card,html[data-theme="dark"] .empty,html[data-theme="dark"] .chapter-card,html[data-theme="dark"] .catalog-file,html[data-theme="dark"] .atlas-stats,html[data-theme="dark"] .qa-list details,html[data-theme="dark"] .dialog-head,html[data-theme="dark"] dialog{background:var(--surface);color:var(--ink)}
html[data-theme="dark"] .button,html[data-theme="dark"] .icon-button,html[data-theme="dark"] .source-chips button,html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#202c40;color:var(--ink);border-color:var(--border)}
html[data-theme="dark"] .button:hover,html[data-theme="dark"] .icon-button:hover,html[data-theme="dark"] .source-chips button:hover,html[data-theme="dark"] .round-table tbody tr:hover{background:#2b3750;border-color:#9a89cc}
html[data-theme="dark"] .button.primary{background:#bca9f0;color:#211d36;border-color:#bca9f0}html[data-theme="dark"] .button.primary:hover{background:#d2c2ff}
html[data-theme="dark"] .project-hero{background:linear-gradient(115deg,#203b49,#272d49 68%);border:1px solid #3f4a66}
html[data-theme="dark"] .project-hero .button{background:#ffffff0d;color:#f0edfa;border-color:#69728b}html[data-theme="dark"] .project-hero .button:first-child{background:#c8b7f7;color:#211d36;border-color:#c8b7f7}
html[data-theme="dark"] .hero{border:1px solid #3f4a66}html[data-theme="dark"] .hero p,html[data-theme="dark"] .project-hero p{color:#cbd5e5}
html[data-theme="dark"] .track-warning,html[data-theme="dark"] th,html[data-theme="dark"] .detail-cell,html[data-theme="dark"] .code-text,html[data-theme="dark"] .guard-decision,html[data-theme="dark"] .export-area,html[data-theme="dark"] .hash,html[data-theme="dark"] .equation{background:#162031;border-color:var(--border);color:var(--ink)}
html[data-theme="dark"] td,html[data-theme="dark"] .chapter-actions,html[data-theme="dark"] .source-actions,html[data-theme="dark"] .note-card .button-row,html[data-theme="dark"] .mini-source{border-color:var(--border)}
html[data-theme="dark"] .notice{background:#332d22;border-color:#655638;color:#efd29c}html[data-theme="dark"] .notice.lavender,html[data-theme="dark"] .safe-strip{background:#2d2942;border-color:#51456c;color:#d1c4ef}html[data-theme="dark"] .notice.green{background:#203a33;border-color:#3e6658;color:#b4dfc9}
html[data-theme="dark"] .badge{background:var(--purple-light);color:#d5c7fa}html[data-theme="dark"] .badge.PASS{background:var(--green-light);color:var(--green)}html[data-theme="dark"] .badge.HOLD{background:var(--amber-light);color:var(--amber)}html[data-theme="dark"] .badge.STOP{background:var(--red-light);color:var(--red)}
html[data-theme="dark"] .verify-cell{background:#1c352e;border-color:#395f50}html[data-theme="dark"] .verify-cell p{color:#bbd7c9}html[data-theme="dark"] .verify-cell strong{color:#a1e1c1}
html[data-theme="dark"] .chapter-card p,html[data-theme="dark"] .body-copy,html[data-theme="dark"] .qa-list p,html[data-theme="dark"] .equation-grid p,html[data-theme="dark"] .catalog-meta,html[data-theme="dark"] .chapter-meta,html[data-theme="dark"] .info-label,html[data-theme="dark"] .field label,html[data-theme="dark"] .timeline-date,html[data-theme="dark"] .package-name,html[data-theme="dark"] .source-card .small,html[data-theme="dark"] .snapshot-label,html[data-theme="dark"] .note-meta,html[data-theme="dark"] .mini-source,html[data-theme="dark"] footer{color:var(--muted)}
html[data-theme="dark"] .catalog-name{color:#e0e7f3}html[data-theme="dark"] .catalog-name:hover{color:#d7c9ff}html[data-theme="dark"] .atlas-stats strong{color:#cbb8fc}
html[data-theme="dark"] .chapter-anchors span,html[data-theme="dark"] .scope-values span,html[data-theme="dark"] .catalog-file-icon,html[data-theme="dark"] .file-icon,html[data-theme="dark"] .row-detail{background:#342e49;color:#cbbbf3}
html[data-theme="dark"] .catalog-meta span:last-child,html[data-theme="dark"] .detail-cell h3,html[data-theme="dark"] .dialog-head small{color:#cfbdf6}html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#99a8bf;opacity:1}
html[data-theme="dark"] .track-name .track-square{background:#294354;color:#b1d2e4}html[data-theme="dark"] .track-name .track-square.purple{background:#3d3356;color:#d0bdf8}html[data-theme="dark"] .safe-title>span{background:#224237;color:#b2e9cd}
html[data-theme="dark"] .timeline:before{background:#4c5870}html[data-theme="dark"] .timeline-item:before{border-color:var(--bg);box-shadow:0 0 0 1px #56617a}html[data-theme="dark"] .chapter-card:hover{border-color:#79688f;box-shadow:0 5px 20px #0002}html[data-theme="dark"] dialog::backdrop{background:#070c17c4}html[data-theme="dark"] #toast{background:#ded5f6;color:#241e36}
@media(max-width:760px){.topbar{padding:0 12px}.top-actions{gap:8px}.theme-toggle{min-width:42px;padding:8px}.theme-toggle span{font-size:12px}.crumb{gap:7px}.crumb>span:first-of-type,.crumb-line{display:none}.crumb strong{font-size:12px}}
