/* Liquid-glass mobile menu (Ariel's pick, 2026-11-16), ported value for value from the
   agor.me redesign draft (itself copied from iamtechartist.com). Geometry, motion and glass are
   the reference's; colours come from this site's tokens (--menu-* in the page :root).
   Everything below the toggle icon is gated on nav.gm-on, which glass-menu.js sets while the
   page's own CSS shows the menu button, so each page keeps its own mobile breakpoint and the
   desktop nav is untouched. */
[data-menu-toggle] .burger{position:relative;display:block;width:24px;height:16px;margin:0 auto;background:linear-gradient(currentColor,currentColor) right center/70% 2px no-repeat;transition:background-size .3s ease}
[data-menu-toggle] .burger::before,[data-menu-toggle] .burger::after{content:"";position:absolute;left:0;width:100%;height:2px;border-radius:2px;background:currentColor;transition:transform .4s cubic-bezier(.2,.8,.2,1),top .4s cubic-bezier(.2,.8,.2,1)}
[data-menu-toggle] .burger::before{top:0}
[data-menu-toggle] .burger::after{top:14px}
[data-menu-toggle]:hover .burger{background-size:100% 2px}
[data-menu-toggle][aria-expanded="true"] .burger{background-size:0 2px}
[data-menu-toggle][aria-expanded="true"] .burger::before{top:7px;transform:rotate(45deg)}
[data-menu-toggle][aria-expanded="true"] .burger::after{top:7px;transform:rotate(-45deg)}
[data-menu-toggle]{background:none;border:0}
.nav-close{display:none}
@keyframes glass-sheen{from{opacity:0;transform:translateY(-14px)}to{opacity:1;transform:none}}
@keyframes menu-in{from{opacity:0;transform:translateX(28px)}to{opacity:1;transform:none}}
@keyframes x-in{from{opacity:0;transform:rotate(-90deg) scale(.6)}to{opacity:1;transform:none}}

/* A backdrop-filter on the header would make it the card's containing block and backdrop root
   (the scrim would shrink to the bar and the glass would only see the bar), so it is dropped
   while the menu is open or closing. */
nav.gm-on.open,nav.gm-on.gm-closing{-webkit-backdrop-filter:none;backdrop-filter:none}
nav.gm-on.open::after{content:"";position:fixed;inset:0;z-index:1;background:var(--menu-scrim)}
/* On blog/faq/template pages the button centre is 20px below the card top, so a ring centred
   on it lost its top ~3px to the card edge. The close ring now sits at least 4px inside the
   card; the folded burger would then show through the glass as a second X, so it fades out
   while the menu is open (the sanspnash.com / textsupport pattern). */
nav.gm-on.open [data-menu-toggle]{opacity:0;transition:opacity .2s ease .2s}
nav.gm-on [data-menu-panel]{--bx:85%;--by:38px;position:fixed;z-index:2;top:12px;right:12px;left:auto;bottom:auto;width:min(78vw,300px);max-height:calc(100svh - 24px);overflow:hidden auto;display:flex;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:max(76px,calc(var(--by) + 38px)) 0 22px;list-style:none;border-radius:26px;background:linear-gradient(160deg,rgba(255,255,255,.13),rgba(255,255,255,.03) 40%,rgba(255,255,255,.02) 70%,rgba(255,255,255,.07)),var(--menu-tint);-webkit-backdrop-filter:blur(22px) saturate(1.7) brightness(1.05);backdrop-filter:blur(22px) saturate(1.7) brightness(1.05);border:1px solid var(--menu-edge);box-shadow:inset 1.5px 1.5px 0 rgba(255,255,255,.3),inset -1px -1px 0 rgba(255,255,255,.08),inset 0 0 40px -18px rgba(255,255,255,.25),var(--menu-drop);clip-path:circle(22px at var(--bx) var(--by));opacity:0;visibility:hidden;transition:clip-path .44s cubic-bezier(.6,0,.8,.3),opacity .12s ease .34s,visibility 0s linear .46s}
/* The refraction only for Chromium (html.glass-refract, set by glass-menu.js): WebKit parses
   url() inside backdrop-filter but then renders no blur at all, so Safari keeps the plain blur. */
.glass-refract nav.gm-on [data-menu-panel]{backdrop-filter:url(#glass-liquid) blur(18px) saturate(1.7) brightness(1.05)}
nav.gm-on.open [data-menu-panel]{clip-path:circle(128% at var(--bx) var(--by));opacity:1;visibility:visible;transition:clip-path .7s cubic-bezier(.45,.05,.2,1),opacity .14s ease}
nav.gm-on.open [data-menu-panel][data-tall]{clip-path:circle(150% at var(--bx) var(--by))}
nav.gm-on [data-menu-panel]::before{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:radial-gradient(110% 45% at 15% 0%,rgba(255,255,255,.16),rgba(255,255,255,0) 62%),linear-gradient(90deg,rgba(255,255,255,.09),rgba(255,255,255,0) 16%)}
nav.gm-on.open [data-menu-panel]::before{animation:glass-sheen 1s .2s cubic-bezier(.2,.8,.2,1) both}
nav.gm-on [data-menu-panel] li{display:block;margin:0;padding:0}
nav.gm-on [data-menu-panel] a:not(.nav-cta),nav.gm-on [data-menu-panel] a:not(.nav-cta):hover{position:relative;display:block;min-height:0;min-width:0;margin:0;padding:10px 28px;border:0;border-radius:0;background:none;text-align:left;font:600 30px/1.25 var(--menu-font);letter-spacing:-.02em;color:var(--menu-link)}
nav.gm-on [data-menu-panel] a:not(.nav-cta)::after{content:" \2192";display:inline-block;opacity:0;transform:translateX(-6px);transition:opacity .25s ease,transform .3s ease;color:var(--menu-accent)}
nav.gm-on [data-menu-panel] a:not(.nav-cta):hover::after,nav.gm-on [data-menu-panel] a:not(.nav-cta):focus-visible::after{opacity:1;transform:none}
nav.gm-on [data-menu-panel] a.nav-cta{display:flex;align-items:center;justify-content:center;min-height:44px;margin:14px 28px 0;text-align:center}
nav.gm-on.open [data-menu-panel] a{animation:menu-in .55s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(.16s + var(--i,0) * .07s)}
nav.gm-on .nav-close{position:absolute;top:max(4px,calc(var(--by) - 23px));left:calc(var(--bx) - 23px);display:grid;place-items:center;width:46px;height:46px;padding:0;border-radius:50%;border:1px solid var(--menu-x-edge);background:rgba(255,255,255,.04);color:var(--menu-link);cursor:pointer;transition:transform .35s cubic-bezier(.2,.8,.2,1),border-color .25s ease}
nav.gm-on .nav-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
nav.gm-on .nav-close:hover,nav.gm-on .nav-close:focus-visible{transform:rotate(90deg);border-color:var(--menu-accent)}
nav.gm-on.open .nav-close{animation:x-in .5s .05s cubic-bezier(.2,.8,.2,1) both}
@media (prefers-reduced-motion:reduce){nav.gm-on [data-menu-panel],nav.gm-on.open [data-menu-panel]{transition:none}nav.gm-on.open [data-menu-panel] a,nav.gm-on.open .nav-close,nav.gm-on.open [data-menu-panel]::before{animation:none}}
