/* One compact color control and a tactile header across every page. */
.forest-header .wrap:first-child{align-items:center;overflow:visible}
.forest-header .nav{gap:9px;flex-wrap:wrap;justify-content:flex-end}
.forest-header .nav>a{padding:9px 13px;border:1px solid var(--line);border-radius:10px;background:linear-gradient(155deg,color-mix(in srgb,var(--surface) 88%,white),var(--surface-2));box-shadow:inset 0 2px 1px #ffffff9c,0 3px 0 var(--mode-rim),0 7px 12px var(--mode-shade);font-weight:700;text-decoration:none;transition:transform 150ms ease,box-shadow 150ms ease,background 150ms ease}
.forest-header .nav>a:hover,.forest-header .nav>a:focus-visible{background:linear-gradient(155deg,var(--surface),var(--mode-soft));color:var(--text);text-decoration:none;transform:translateY(-2px);box-shadow:inset 0 2px 1px #ffffffa0,0 5px 0 var(--mode-rim),0 11px 16px var(--mode-shade)}
.forest-header .nav>a:active{transform:translateY(2px);box-shadow:inset 0 1px 1px #ffffff80,0 1px 0 var(--mode-rim),0 3px 6px var(--mode-shade)}
.forest-header .nav .theme-toggle{margin:0}
.forest-header .forest-logo{display:inline-flex;align-items:center;gap:10px;text-decoration:none;perspective:500px}
.forest-header .forest-logo:hover{color:var(--text)}
.forest-header .brand-mark{position:relative;display:grid;place-items:center;flex:none;width:48px;height:48px;border:1px solid color-mix(in srgb,var(--mode-rim) 70%,white);border-radius:13px;background:linear-gradient(145deg,#ffffffca,var(--mode-soft) 75%,var(--mode-surface2));box-shadow:inset 0 2px 1px #ffffffdd,inset 0 -2px 4px #00000012,0 4px 0 var(--mode-rim),0 9px 13px var(--mode-shade);transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transform-style:preserve-3d;transition:transform 220ms ease,box-shadow 220ms ease}
.forest-header .brand-mark:before{content:"";position:absolute;inset:2px;border-radius:11px;background:radial-gradient(circle at var(--gx,25%) 5%,#ffffffae,transparent 55%);pointer-events:none}
.forest-header .brand-mark .forest-cube{position:relative;width:34px;height:37px;transform:translateZ(12px);filter:drop-shadow(1px 5px 2px #0004)}
.forest-header .brand-name{font-weight:800;letter-spacing:-.045em;text-shadow:0 1px 0 color-mix(in srgb,var(--surface) 80%,white),1px 2px 0 color-mix(in srgb,var(--mode-rim) 40%,transparent),2px 4px 5px var(--mode-shade)}
.forest-header .forest-logo:hover .brand-mark,.forest-header .forest-logo:focus-visible .brand-mark{box-shadow:inset 0 2px 1px #ffffffee,inset 0 -2px 4px #00000012,0 6px 0 var(--mode-rim),0 13px 18px var(--mode-shade)}
.forest-header .palette-menu{position:relative;flex:none;z-index:30;font:700 13px var(--body);color:var(--text)}
.forest-header .palette-trigger{display:flex;align-items:center;justify-content:center;gap:8px;min-width:159px;min-height:44px;padding:8px 11px;border:1px solid var(--control-border);border-radius:10px;background:linear-gradient(155deg,color-mix(in srgb,var(--surface) 85%,white),var(--surface-2));box-shadow:inset 0 2px 1px #ffffff9c,0 3px 0 var(--mode-rim),0 7px 12px var(--mode-shade);cursor:pointer;list-style:none;white-space:nowrap;transition:transform 150ms ease,box-shadow 150ms ease}
.forest-header .palette-trigger::-webkit-details-marker{display:none}
.forest-header .palette-trigger:hover,.forest-header .palette-trigger:focus-visible{transform:translateY(-2px);box-shadow:inset 0 2px 1px #ffffffaa,0 5px 0 var(--mode-rim),0 11px 16px var(--mode-shade)}
.forest-header .palette-trigger:active{transform:translateY(2px);box-shadow:inset 0 1px 1px #ffffff80,0 1px 0 var(--mode-rim)}
.forest-header .palette-chevron{margin-left:auto;transition:transform 150ms ease}
.forest-header .palette-menu[open] .palette-chevron{transform:rotate(180deg)}
.forest-header .palette-choices{position:absolute;top:calc(100% + 9px);right:0;display:flex;flex-direction:column;width:211px;gap:5px;padding:7px;border:1px solid var(--line);border-radius:13px;background:var(--surface);box-shadow:inset 0 2px 1px #ffffffaa,0 4px 0 var(--mode-rim),0 16px 30px var(--mode-shade)}
.forest-header .palette-choices button{width:100%;justify-content:flex-start;white-space:nowrap;min-height:42px;box-shadow:none}
.forest-header .palette-choices button[aria-pressed=true]{box-shadow:inset 0 1px 0 #ffffff88}
.forest-header .palette-choices .palette-full{display:inline}
.forest-header .palette-choices .palette-short{display:none}
.forest-header .palette-choices .palette-check{margin-left:auto}
:root[data-theme=dark] .forest-header .nav>a,:root[data-theme=dark] .forest-header .palette-trigger,:root[data-theme=dark] .forest-header .brand-mark{box-shadow:inset 0 2px 1px #ffffff3a,0 3px 0 var(--mode-rim),0 7px 12px var(--mode-shade)}
@media(max-width:900px){.forest-header .wrap:first-child{flex-wrap:wrap}.forest-header .nav{margin-left:auto}.forest-header .nav>a{font-size:13px}}
@media(max-width:700px){.forest-header .wrap:first-child{padding-bottom:14px}.forest-header .nav a[href='/about']{display:flex}.forest-header .nav{width:100%;margin-left:0;justify-content:center;gap:7px}.forest-header .nav>a{padding:8px 10px;min-height:40px}.forest-header .forest-logo{margin-right:auto}.forest-header .brand-mark{width:42px;height:42px}.forest-header .brand-mark .forest-cube{width:30px;height:33px}.forest-header .palette-trigger{min-width:142px;min-height:42px}.forest-header .palette-choices{right:0}.forest-header .nav .theme-toggle{width:42px!important;height:42px!important;min-width:42px}}
@media(max-width:390px){.forest-header .nav{gap:5px}.forest-header .nav>a{padding:7px 8px;font-size:12px}.forest-header .palette-trigger{min-width:133px;padding:7px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.forest-header .nav>a,.forest-header .palette-trigger,.forest-header .brand-mark,.forest-header .palette-chevron{transition:none}.forest-header .nav>a:hover,.forest-header .palette-trigger:hover{transform:none}}
