:root{--page-bg:#f3f2ed;--theme-ink:#65705d;--theme-border:#cbd0c2}
body{transition:background-color .35s ease,color .35s ease}
.header nav .theme-toggle{width:31px;height:31px;padding:6px;border:1px solid var(--theme-border);border-radius:50%;display:grid;place-items:center;color:var(--theme-ink);flex-shrink:0;transition:background .25s,border-color .25s,transform .25s}
.theme-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.header nav .theme-toggle:hover{background:#ffffff70;transform:rotate(12deg)}
html[data-theme="dark"]{--page-bg:#191918;--theme-ink:#d8d4c7;--theme-border:#49473f;background:var(--page-bg)}
html[data-theme="dark"] body{background:#191918;color:#eeece6}
html[data-theme="dark"] .header,html[data-theme="dark"] .notebook-page .header{background:linear-gradient(#191918f7 55%,#19191800)}
html[data-theme="dark"] #particles{background:radial-gradient(ellipse at 50% 50%,#29282540,transparent 62%)}
html[data-theme="dark"] .grain{opacity:.022}
html[data-theme="dark"] a:hover,html[data-theme="dark"] button:hover{color:#fffdf6}
html[data-theme="dark"] ::selection{background:#5a574b;color:#fffdf4}
html[data-theme="dark"] :focus-visible{outline-color:#d8d4c7}
html[data-theme="dark"] .header #language{border-color:#49473f}
html[data-theme="dark"] #language span{color:#858279}
html[data-theme="dark"] .header nav .theme-toggle:hover{background:#38362f}
html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .tiny-note,html[data-theme="dark"] .section-label,html[data-theme="dark"] .time,html[data-theme="dark"] .about-signature span{color:#aaa79e}
html[data-theme="dark"] .hero-bottom .text-link{border-color:#777368}
html[data-theme="dark"] .stage-footer{color:#aaa79e;border-color:#3c3b36}
html[data-theme="dark"] .down-arrow{color:#d8d4c7}
html[data-theme="dark"] .chapter-nav a{background:#55534c}
html[data-theme="dark"] .chapter-nav a.active{background:#d8d4c7}
html[data-theme="dark"] .about-copy p,html[data-theme="dark"] .timeline p{color:#aaa79e}
html[data-theme="dark"] .muted{color:#858279!important}
html[data-theme="dark"] .timeline{border-color:#49473f}
html[data-theme="dark"] .timeline article:before{background:#d8d4c7;box-shadow:0 0 0 5px #191918}
html[data-theme="dark"] .demo-label,html[data-theme="dark"] .demo-note,html[data-theme="dark"] .art-label{color:#959187}
html[data-theme="dark"] .project-card,html[data-theme="dark"] .featured-note{background:linear-gradient(130deg,#ffffff0d,#242422c9 45%,#24242285);border-color:#ffffff16;box-shadow:inset 0 1px 0 #ffffff09,0 14px 38px #00000012}
html[data-theme="dark"] .project-card:hover,html[data-theme="dark"] .featured-note:hover{background:linear-gradient(130deg,#ffffff12,#2e2e2ac9);border-color:#ffffff35;box-shadow:inset 0 1px 0 #ffffff10,0 18px 40px #00000025;color:#eeece6}
html[data-theme="dark"] .project-art{background:radial-gradient(ellipse at 50% 80%,#d8d4c711,transparent 75%)}
html[data-theme="dark"] .project-art svg,html[data-theme="dark"] .feedback-art svg{filter:grayscale(1);opacity:.85}
html[data-theme="dark"] .board-icon,html[data-theme="dark"] .card-arrow{color:#d8d4c7}
html[data-theme="dark"] .project-info p,html[data-theme="dark"] .notes-head p{color:#aaa79e}
html[data-theme="dark"] #filters button,html[data-theme="dark"] #archive button,html[data-theme="dark"] .archive-toggle{color:#aaa79e}
html[data-theme="dark"] #filters button.active{background:#36352e;color:#eeece6}
html[data-theme="dark"] #filters button span{color:#aaa79e}
html[data-theme="dark"] .archive-toggle{border-color:#3c3b36}
html[data-theme="dark"] .list-heading{color:#aaa79e}
html[data-theme="dark"] .article-card{background:linear-gradient(115deg,#ffffff08,#242422a0);border-color:#ffffff13}
html[data-theme="dark"] .article-card:hover{background:#2e2e2ae0;color:#eeece6}
html[data-theme="dark"] .article-number,html[data-theme="dark"] .article-meta,html[data-theme="dark"] .article-arrow{color:#aaa79e}
html[data-theme="dark"] .article-card p{color:#aaa79e}
html[data-theme="dark"] .article-meta .tag{background:#36352e;color:#d8d4c7}
html[data-theme="dark"] #articles{scrollbar-color:#58554b transparent}
html[data-theme="dark"] dialog{color:#eeece6;background:#242422f2;border-color:#ffffff20;box-shadow:0 30px 100px #00000065}
html[data-theme="dark"] dialog::backdrop{background:#0a0a0990}
html[data-theme="dark"] dialog p,html[data-theme="dark"] dialog li,html[data-theme="dark"] .close-dialog{color:#aaa79e}
html[data-theme="dark"] dialog pre{background:#191918;color:#d8d4c7}
html[data-theme="dark"] .notebook-breadcrumb,html[data-theme="dark"] .notebook-intro,html[data-theme="dark"] .hero-subtitle{color:#aaa79e}
html[data-theme="dark"] .notebook-rule{color:#aaa79e;border-top-color:#3c3b36;border-bottom-color:#302f2b}
html[data-theme="dark"] .notebook-page .header nav .current{color:#eeece6}
html[data-theme="dark"] .notebook-page .header nav .current:after{background:#d8d4c7}
html[data-theme="dark"] .search-label,html[data-theme="dark"] .sidebar-caption,html[data-theme="dark"] .search-wrap svg{color:#aaa79e;stroke:#aaa79e}
html[data-theme="dark"] .search-wrap{border-color:#49473f}
html[data-theme="dark"] .search-wrap:focus-within{border-color:#d8d4c7}
html[data-theme="dark"] .search-wrap input{color:#eeece6}
html[data-theme="dark"] .search-wrap input::placeholder,html[data-theme="dark"] .search-wrap kbd{color:#858279}
html[data-theme="dark"] .notebook-sidebar button{background:transparent;color:#aaa79e}
html[data-theme="dark"] .notebook-sidebar button:hover{background:#2e2e2a;color:#eeece6}
html[data-theme="dark"] .notebook-sidebar button.active{background:#36352e;color:#eeece6}
html[data-theme="dark"] .archive-caption,html[data-theme="dark"] .sidebar-bottom{border-color:#3c3b36}
html[data-theme="dark"] .sidebar-dot{background:#d8d4c7}
html[data-theme="dark"] .sidebar-bottom p,html[data-theme="dark"] .sample-explainer{color:#959187}
html[data-theme="dark"] .tiny-rule{background:#555248}
html[data-theme="dark"] .featured-caption,html[data-theme="dark"] .featured-copy p,html[data-theme="dark"] .featured-foot{color:#aaa79e}
html[data-theme="dark"] .collection-toolbar{border-color:#3c3b36}
html[data-theme="dark"] .collection-toolbar #collection-count,html[data-theme="dark"] .sort-label,html[data-theme="dark"] .sort-label select,html[data-theme="dark"] .active-selection,html[data-theme="dark"] .active-selection button{color:#aaa79e}
html[data-theme="dark"] .notebook-entry{border-color:#34332e}
html[data-theme="dark"] .notebook-entry:hover{background:#ffffff06;color:#eeece6}
html[data-theme="dark"] .entry-index,html[data-theme="dark"] .entry-topline,html[data-theme="dark"] .entry-type,html[data-theme="dark"] .entry-body p,html[data-theme="dark"] .entry-arrow{color:#aaa79e}
html[data-theme="dark"] .entry-tags span{background:#302f29;color:#d8d4c7;border-color:#ffffff0b}
html[data-theme="dark"] .collection-end span,html[data-theme="dark"] .reader-rule{background:#3c3b36;border-color:#3c3b36}
html[data-theme="dark"] .collection-end p,html[data-theme="dark"] .reader-date{color:#959187}
html[data-theme="dark"] .notebook-footer,html[data-theme="dark"] .reader-bottom{border-color:#3c3b36}
html[data-theme="dark"] .notebook-footer p,html[data-theme="dark"] .notebook-footer>a:last-child,html[data-theme="dark"] .reader-bottom{color:#aaa79e}
html[data-theme="dark"] .notebook-empty{color:#aaa79e;border-color:#555248}
@media(max-width:680px){html[data-theme="dark"] #filters button{background:#ffffff06}}
@media(prefers-reduced-motion:reduce){body{transition:none}}

/* Keep the notes archive reachable beside theme and language on small screens. */
.list-heading #all-notes-link{font-size:10px;padding:0}
@media(max-width:680px){
 body:not(.notebook-page) .header nav a[href^="notes.html"]{display:block;font-size:10px;white-space:nowrap}
 body:not(.notebook-page) .header nav{gap:11px}
 body:not(.notebook-page) .header .brand{font-size:21px}
 body:not(.notebook-page) .header nav .theme-toggle{width:28px;height:28px;padding:5px}
 body:not(.notebook-page) .header{padding-left:5vw;padding-right:5vw}
}
@media(max-width:360px){body:not(.notebook-page) .header .brand{font-size:18px}body:not(.notebook-page) .header nav{gap:8px}}
.archive-entry-link{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 3px 6px;color:#738168;font-size:11px;border-top:1px solid #d4daca;margin-top:12px}
.archive-entry-link span:last-child{font-size:19px}
html[data-theme="dark"] .archive-entry-link{color:#d8d4c7;border-color:#3c3b36}
@media(min-width:681px){#articles{max-height:calc(100svh - 390px)}}
