/* One stable header across the shared front page and department pages. */
.masthead{position:relative;isolation:isolate;z-index:40;min-height:65px;display:flex;align-items:center;justify-content:flex-start;gap:24px;padding:18px 32px;background:#291d28;color:#f6e4c5;border-bottom:1px solid #c9977333}
.masthead .brand{display:flex;align-items:center;white-space:nowrap;text-decoration:none;flex-shrink:0}
.masthead nav{display:flex;align-items:center;align-self:stretch;gap:20px;margin-left:auto;white-space:nowrap}
.masthead nav a{position:relative;isolation:isolate;width:fit-content;max-width:100%;padding:20px 0;color:#d6bba9;font:13px/1.5 Georgia,serif;text-decoration:none;overflow:visible}
.masthead nav a[aria-current]{color:#ffedcc}.masthead nav a[aria-current]:after{position:absolute;bottom:0;left:0;right:0;height:2px;background:#e4bd91;content:""}
#sections-toggle{display:none;background:transparent;color:inherit;border:1px solid #c9977355;border-radius:24px;padding:10px 15px;min-height:44px;font:13px Georgia,serif;cursor:pointer}
.department-word{position:relative;z-index:2;display:inline-block;background:transparent;padding:3px 4px;text-shadow:0 1px 3px #21151f;transition:color .25s,transform .25s,text-shadow .25s}
.department-flourish{position:absolute;pointer-events:none;inset:-12px -5px;display:flex;align-items:center;justify-content:space-around;max-width:calc(100% + 10px);opacity:0;transform:scale(.8);transition:opacity .2s,transform .4s;z-index:1;background:radial-gradient(ellipse,#d68f6320,transparent 72%)}
.department-flourish i{font-style:normal;font-size:24px!important;color:#efbf8b;text-shadow:0 0 18px currentColor;opacity:.8}
.department-flourish i:nth-child(1){align-self:flex-start;margin-top:2px}.department-flourish i:nth-child(2){align-self:flex-end;margin-bottom:-2px}.department-flourish i:nth-child(3){align-self:flex-start;margin-top:5px}
.masthead nav a:last-child .department-flourish{right:0;max-width:100%}
.masthead nav a:hover .department-flourish,.masthead nav a:focus-visible .department-flourish,.masthead nav a.departing .department-flourish{opacity:1;transform:scale(1)}
.masthead nav a:hover .department-word,.masthead nav a:focus-visible .department-word{color:#ffe7b7;transform:translateY(-2px);text-shadow:0 0 12px #e0a86b66}
.masthead [data-department=rabbit-hole] i{color:#8cdedc}.masthead [data-department=machine-room] i{color:#9deca3;font-family:monospace}.masthead [data-department=mums-garage] i{color:#ffbd72}.masthead [data-department=unearthed] i{color:#c7d99a}.masthead [data-department=scriptoria] i{color:#d8b6f1}
.masthead [data-department=machine-room]:hover .department-word{color:#b5e8ba;text-shadow:2px 0 #76b6ad55,-2px 0 #c5a3e655}.masthead [data-department=rabbit-hole]:hover .department-word{color:#a7dfdc}.masthead [data-department=scriptoria]:hover .department-word{color:#e6c8fa}.masthead [data-department=unearthed]:hover .department-word{color:#d4dfb4}
@media(prefers-reduced-motion:no-preference){.masthead nav a:hover i{animation:header-rise 1.8s ease-in-out infinite alternate}.masthead nav a i:nth-child(2){animation-delay:-.6s}.masthead nav a i:nth-child(3){animation-delay:-1.2s}.masthead [data-department=rabbit-hole]:hover i,.masthead [data-department=mums-garage]:hover i{animation:header-turn 3s linear infinite!important}.masthead [data-department=machine-room]:hover i{animation:header-signal 1.2s steps(3) infinite!important}.masthead [data-department=unearthed]:hover i{animation:header-unfurl 1.6s ease-in-out infinite alternate!important}}
@keyframes header-rise{to{transform:translateY(-12px) rotate(12deg)}}@keyframes header-turn{to{transform:rotate(360deg)}}@keyframes header-signal{35%{transform:translate(5px,-3px)}70%{transform:translate(-3px,2px)}}@keyframes header-unfurl{from{transform:scale(.7) rotate(-35deg)}to{transform:scale(1.15) rotate(15deg)}}
@container(max-width:1100px){.masthead{gap:22px;padding-inline:22px}.masthead nav{gap:18px}}
@container(max-width:850px){.masthead{flex-wrap:wrap;justify-content:space-between;padding:14px 18px;min-height:0;gap:10px}#sections-toggle{display:block}.masthead nav{display:none;order:3;width:100%;margin:0;padding:12px 0 0;overflow:visible;white-space:normal;min-height:0}.masthead nav.menu-open{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px}.masthead nav a{padding:12px 4px;white-space:normal;font-size:14px;min-height:44px}}
@media(prefers-reduced-motion:reduce){.department-word,.department-flourish{transition:none!important;transform:none!important}.department-flourish i{animation:none!important}}

/* Department lettering changes shape inside a fixed, equal-size navigation slot. */
@font-face{font-family:'Rubik Glitch';src:url('fonts/rubik-glitch/RubikGlitch-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
.masthead nav{gap:12px}.masthead nav a{width:160px;flex:0 0 160px;min-height:52px;display:grid;place-items:center;padding:16px 0}
.masthead .department-word{position:relative;width:160px;height:24px;padding:0;display:block;line-height:24px;color:inherit!important;text-shadow:none!important;transform:none!important;transition:none}
.department-base{position:absolute;left:50%;top:50%;width:max-content;white-space:pre;line-height:24px;font-weight:400;transform:translate(calc(-50% + var(--ink-offset,0px)),-50%);opacity:1;transition:opacity .3s,filter .35s,clip-path .45s;clip-path:inset(-8px -8px -8px -8px)}
.department-style{position:absolute;left:50%;top:50%;width:160px;height:18px;background:currentColor;mask-size:100% 100%;mask-position:center;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;-webkit-mask-repeat:no-repeat;opacity:0;clip-path:inset(-6px 100% -6px 0);transform:translate(-50%,-50%) var(--morph-from,scale(.94,1.18));transition:opacity .35s,clip-path .58s cubic-bezier(.2,.75,.2,1),transform .58s cubic-bezier(.2,.75,.2,1);pointer-events:none}
.native-lettering{background:none;overflow:visible}.department-ink{position:absolute;left:50%;top:50%;width:max-content;white-space:pre;font-family:'Rubik Glitch';line-height:24px;font-weight:400;transform:translate(calc(-50% + var(--ink-offset,0px)),-50%) scaleX(var(--ink-scale,1))}
.masthead [data-department=tea-house]{--nav-accent:#f1c49b;--morph-from:skewX(-9deg) scale(.96,1.08)}
.masthead [data-department=rabbit-hole]{--nav-accent:#a7dfdc;--morph-from:perspective(100px) rotateY(28deg) scale(.96,1.1)}
.masthead [data-department=machine-room]{--nav-accent:#b5e8ba;--morph-from:translateX(-5px) scale(1.04,.75)}
.masthead [data-department=mums-garage]{--nav-accent:#f4c08e;--morph-from:rotate(-3deg) scale(1.08,.9)}
.masthead [data-department=unearthed]{--nav-accent:#d4dfb4;--morph-from:translateY(5px) scale(.98,.88)}
.masthead [data-department=scriptoria]{--nav-accent:#e6c8fa;--morph-from:skewX(8deg) scale(.94,1.1)}
.masthead nav a[data-lettering-ready=true]:is(:hover,:focus-visible,[aria-current=page]){color:var(--nav-accent)}
.masthead nav a[data-lettering-ready=true]:is(:hover,:focus-visible,[aria-current=page]) .department-base{opacity:0;filter:blur(1.5px);clip-path:inset(-8px 0 -8px 100%)}
.masthead nav a[data-lettering-ready=true]:is(:hover,:focus-visible,[aria-current=page]) .department-style{opacity:1;clip-path:inset(-6px -6px -6px -6px);transform:translate(-50%,-50%) scale(1)}
.masthead nav a:is(:hover,:focus-visible,[aria-current=page]) .department-flourish{opacity:.45;background:none;filter:none}
@container(max-width:1390px){.masthead{flex-wrap:wrap;justify-content:space-between;gap:10px;padding:14px 18px}#sections-toggle{display:block}.masthead nav{display:none;order:3;width:100%;margin:0;padding:12px 0 0;white-space:normal;min-height:0}.masthead nav.menu-open{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px}.masthead nav a{width:100%;min-width:0;padding:12px 0;min-height:44px}}
@container(max-width:360px){.masthead .department-word{transform:scale(.9)!important}}
@media(prefers-reduced-motion:reduce){.department-base,.department-style{transition:none;filter:none!important}}

.department-ink{word-spacing:4px}.department-style{height:var(--optical-height,18px)}.masthead [data-department=tea-house]{--optical-height:24px}.masthead [data-department=rabbit-hole]{--optical-height:26px}.masthead [data-department=mums-garage]{--optical-height:22px}.masthead .department-word{height:28px}
@container(max-width:400px){.masthead .department-word{transform:scale(.82)!important}}
