/* One neutral surface system; color lives in light, ink and interaction. */
:root{--accent-base:#965f38;--spectrum-1:#ba854c;--spectrum-2:#b47b90;--spectrum-3:#8981b1;--spectrum-4:#729da9}
html{background:var(--paper)}
body{min-height:100svh;--accent:color-mix(in srgb,var(--accent-base) 65%,#fff0d8);--accent-soft:color-mix(in srgb,var(--accent) 60%,var(--paper));--prism:linear-gradient(110deg,var(--spectrum-1),var(--spectrum-2) 35%,var(--spectrum-3) 66%,var(--spectrum-4));--entry-shift:76px}
html[data-theme="light"] body{--accent:var(--accent-base);--accent-soft:color-mix(in srgb,var(--accent) 45%,var(--paper))}
.home-page{--home-photo-opacity:var(--home-photo-opacity-dark,.12)}
html[data-theme="light"] .home-page{--home-photo-opacity:var(--home-photo-opacity-light,.16)}
.subject-copy h3{color:var(--ink)}
.doc-shell .category.active,.doc-shell .category:hover,.series-link.active,.article-back{color:var(--accent)}
.doc-shell .category .count,.tutorial-card .entry-date{color:var(--muted)}
.article-head:before{background:var(--prism)}
.article-head:after{background:linear-gradient(180deg,var(--accent) 0 65%,transparent 65%)}
.field-sprig{color:var(--accent)}
.field-sprig .specimen-leaf{fill:var(--accent)}
.field-sprig .specimen-stem{stroke:color-mix(in srgb,var(--spectrum-2) 50%,var(--accent))}
.section-heading .heading-number{background-image:var(--prism)}
.section-heading .heading-ink{background-image:linear-gradient(90deg,color-mix(in srgb,var(--amber) 23%,transparent),color-mix(in srgb,var(--maple) 15%,transparent))}
.article-layout .toc a[aria-current="location"]{color:var(--accent);border-left-color:var(--accent)}
.article-layout .toc a[aria-current="location"]:before,.series-sidebar .series-link.active:before{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 12%,transparent)}
.series-sidebar .series-link.active{border-left-color:var(--accent)}
.prose a{color:var(--accent)}
.prose blockquote{border-color:var(--accent-soft)}
.recent .tutorial-card{transition:padding-left .25s ease}
.recent .tutorial-card:hover{padding-left:9px}
.recent .tutorial-card:hover:before{background:var(--spectrum-2);border-color:var(--spectrum-2)}
.prose .hljs-keyword{color:#d4ab99}.prose .hljs-type{color:#c9b5d1}.prose .hljs-string{color:#c5c2a1}.prose .hljs-title,.prose .hljs-built_in{color:#b9c6cb}.prose .hljs-number,.prose .hljs-literal{color:#d4bd88}.prose .hljs-comment{color:#96968d}
html[data-theme="light"] .prose .hljs-keyword,html[data-theme="light"] .prose .hljs-type{color:#955343}html[data-theme="light"] .prose .hljs-string{color:#657042}html[data-theme="light"] .prose .hljs-title,html[data-theme="light"] .prose .hljs-built_in{color:#70608c}html[data-theme="light"] .prose .hljs-number,html[data-theme="light"] .prose .hljs-literal{color:#94632b}html[data-theme="light"] .prose .hljs-comment{color:#77715f}
@media(prefers-reduced-motion:reduce){.recent .tutorial-card{transition:none}.recent .tutorial-card:hover{padding-left:0}}

/* Neutral charcoal keeps the forest's warmth without tinting every surface brown. */
html:not([data-theme="light"]) ::selection{background:#4c4434;color:#f1eadc}
html:not([data-theme="light"]) .search{border-color:var(--line)}
html:not([data-theme="light"]) .search:focus-within{border-color:var(--accent)}
html:not([data-theme="light"]) .search input::placeholder{color:var(--muted)}
html:not([data-theme="light"]) .category-main .topic-head h2{color:var(--heading-ink)}
html:not([data-theme="light"]) .prose{--prose-marker:rgba(191,157,103,.24)}
html:not([data-theme="light"]) .prose pre{box-shadow:inset 0 1px 0 #ffffff03}
html:not([data-theme="light"]) .search-dialog{box-shadow:0 24px 80px #0006}
html:not([data-theme="light"]) .search-dialog::backdrop{background:#0e0e0cc2}
html:not([data-theme="light"]) .search-result:focus,html:not([data-theme="light"]) .search-result.selected{background:#37342d;color:var(--ink)}
