
:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid var(--muted);border-radius:24px;background:var(--paper);color:var(--ink);font:600 13px/1.3 'DM Sans',Arial,sans-serif;white-space:nowrap;cursor:pointer;touch-action:manipulation}
.theme-toggle[aria-pressed="true"]{border-color:var(--ink)}
.theme-toggle:focus-visible{outline:3px solid #c36b25;outline-offset:4px}
.theme-toggle[hidden]{display:none}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
:root[data-theme="dark"]{--ink:#e1e8f1;--muted:#afbecf;--paper:#111923;--white:#182432;--line:#3a4b60;--accent:#ffb77b;--nav:#101b28;--blue:#9ec6ff;}

:root[data-theme="dark"] .lede,:root[data-theme="dark"] .session-number{color:#b9c9db}
:root[data-theme="dark"] .metrics,:root[data-theme="dark"] .card,:root[data-theme="dark"] .table-wrap,:root[data-theme="dark"] blockquote,:root[data-theme="dark"] .files details,:root[data-theme="dark"] .image-controls,:root[data-theme="dark"] .notebook-search{background:var(--white)}
:root[data-theme="dark"] th{background:#26374b}
:root[data-theme="dark"] p code,:root[data-theme="dark"] li code,:root[data-theme="dark"] td code{background:#293b50;color:#e1e8f1}
:root[data-theme="dark"] .badge{background:#263b54;color:#c7dcf7;border-color:#526a86}
:root[data-theme="dark"] .badge.warm,:root[data-theme="dark"] .notice{background:#392a1c;color:#ffd7a7;border-color:#8e6b45}
:root[data-theme="dark"] .guide-entry{background:#1c323b}
:root[data-theme="dark"] .image-controls select,:root[data-theme="dark"] .image-controls button,:root[data-theme="dark"] .search-line input{background:#111d2b;color:var(--ink);border-color:#788fa9}
:root[data-theme="dark"] .search-line button{background:#b9d6fa;color:#111d2b;border-color:#b9d6fa}
:root[data-theme="dark"] .skip{background:#e1e8f1;color:#111923}
:root[data-theme="dark"] :focus-visible{outline-color:#ffb77b}
.theme-toggle{flex-shrink:0}
.guide-entry{color:var(--ink)}.guide-entry h2{color:var(--ink)}.guide-entry p{color:var(--muted)}.guide-entry a{color:var(--blue)}.guide-entry .eyebrow{color:var(--muted)}
.topbar{align-items:center;flex-wrap:wrap;gap:12px}
.topbar span:nth-child(2){margin-left:auto}
@media(max-width:700px){.topbar{gap:8px}.topbar span:nth-child(2){margin-left:0}.topbar .theme-toggle{margin-left:auto;font-size:12px;padding:10px}.image-controls select,.image-controls button{min-height:44px}}
@media print{.theme-toggle{display:none}:root[data-theme="dark"]{--ink:#17212b;--muted:#586675;--paper:#fff;--white:#fff;--line:#d9e0e6;--blue:#204db0;color-scheme:light}}

.footer-support{margin-top:12px}.footer-support a{display:inline-flex;align-items:center;min-height:32px}
