html.gated body>*:not(.gate){visibility:hidden}
html.gated{overflow:hidden;scrollbar-gutter:auto}
/* iOS Safari bars, as the © Easter egg / Studio presentation (css/hang-egg.css html.hegg-flow): iOS 26 Safari does not re-tint its bars
   from a full-screen fixed layer when the theme is toggled (Hang's iPhone: dark gate under light bars and vice versa). While gated the
   gate is the document itself (in flow, one viewport tall, 2px of scroll range for js/theme.js's re-sample nudge), the page is collapsed
   out of flow (and stays hidden), two solid fixed strips in --page sit at the top and bottom edges, and nothing cross-fades on a toggle,
   so Safari never samples a half-way or stale colour. Removed with html.gated on unlock. */
@media (hover:none) and (pointer:coarse){html.gated{overflow:auto}}
html.gated,html.gated body{height:100%}
html.gated body{display:block;min-height:0;overflow:visible;margin:0;padding:0 0 2px;box-sizing:content-box}
html.gated body>:not(.gate):not(.theme-btn){position:absolute!important;top:0!important;left:0!important;right:0!important;width:auto!important;height:0!important;min-height:0!important;overflow:hidden!important;pointer-events:none!important}
html.gated .gate{position:relative;inset:auto;width:100%;height:100%;box-sizing:border-box}
.gate::before,.gate::after{content:"";position:fixed;left:0;right:0;z-index:0;background:var(--page)}
.gate::before{top:0;height:calc(16px + env(safe-area-inset-top,0px))}
.gate::after{bottom:0;height:calc(16px + env(safe-area-inset-bottom,0px))}
.gate-in{position:relative;z-index:1}
html.gated.theme-anim,html.gated.theme-anim body,html.gated.theme-anim .gate,html.gated.theme-anim .gate *,html.gated.theme-anim .gate::before,html.gated.theme-anim .gate::after{transition:none!important}
/* hold page entrance animations (home poster draw-in, strip fade) at frame 0 while gated; they play from the start on unlock */
html.gated body>:not(.gate),html.gated body>:not(.gate) *{animation-play-state:paused!important}
.gate{position:fixed;inset:0;z-index:1000;background:var(--page);color:var(--c-strong);display:grid;place-items:center;font-family:"Instrument Sans",system-ui,sans-serif;padding:24px}
/* Oct 23 (Hang): HANG letters gate. The letter animation (js/hang-cube.js) in the middle; field and help centred below; the group centred both ways */
.gate-in{display:flex;flex-direction:column;align-items:center;text-align:center;width:fit-content;max-width:100%;margin:0 auto}
.gate-stage{width:min(320px,calc(100vw - 48px));aspect-ratio:1;margin:0}
/* Hang, Oct 23 21:52: the letters alone are centred on the page; the passcode lockup hangs below them (48px gap, was 24), out of the centring */
.gate-in{position:relative}
.gate-below{position:absolute; /* help 16px under the field (Hang, 21:52: 12px up from 28); a wrong-passcode message appears under the help, out of flow */top:100%;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 48px);margin-top:48px;display:flex;flex-direction:column;align-items:center}
@media (max-width:640px){.gate-stage{width:min(240px,calc(100vw - 48px))}}
/* Oct 26 (Hang): desktop (>640px) lockup 16vh above centre. The 320px stage is centred, so its top sits at 50vh - 160px; the lift is
   clamped so the stage top keeps >= 32px under DESIGN BY HANG (header bottom 22px + 14px = 36px) on short windows: 50vh - 160px - 68px */
@media (min-width:641px){.gate-in{transform:translateY(calc(-1 * max(0px, min(8vh, 50vh - 228px - env(safe-area-inset-top,0px)))))}}
@media (max-width:640px) and (orientation:portrait){.gate-below{margin-top:60px}} /* phone portrait: lockup 12px lower (Hang, 2026-10-24) */
/* DESIGN BY HANG (absolute in the gate, not a fixed layer, so iOS Safari never samples it for the bars), top left (Hang, Oct 23 21:44), at the homepage header's inset and type (.top: 22px var(--side); 18px var(--m-in) on phones); plain text, not a link */
.gate-top{position:absolute;top:0;left:0;right:0;z-index:2;display:flex;justify-content:flex-start;padding:22px var(--side,32px);padding-top:calc(22px + env(safe-area-inset-top,0px));pointer-events:none}
@media (max-width:900px){.gate-top{padding-inline:var(--m-in,20px)}}
@media (max-width:640px){.gate-top{padding:calc(18px + env(safe-area-inset-top,0px)) var(--m-in,20px) 18px}}
.gate-brand{font:var(--t-label);letter-spacing:var(--t-label-ls);word-spacing:var(--t-label-ws);color:var(--c-strong);text-transform:uppercase;cursor:default;user-select:none;-webkit-user-select:none}
/* input = project-page body copy (--t-body 18/28, 17/26 under 900px), fixed */
.gate-form input{font:var(--t-body);color:var(--c-strong)}
@media (max-width:900px){.gate-form input{font-size:var(--t-body-m-size);line-height:var(--t-body-m-lh)}}
/* field: 224px (264px on phones), the input fills it; placeholder left-aligned, arrow inside at the right end */
.gate-fit{width:224px;max-width:100%}
@media (max-width:640px){.gate-fit{width:264px}}
.gate-form input{text-align:left}
.gate-form input:not(:placeholder-shown){letter-spacing:4px} /* Hang, Oct 23 22:29: room between the passcode dots (was normal, 0); placeholder unchanged */
.gate-form{position:relative}
.gate-form input{display:block;box-sizing:border-box;width:0;min-width:100%;background:none;border:0;box-shadow:inset 0 -1.5px 0 var(--c-strong);border-radius:0;font-family:inherit;padding:12px calc(var(--g-aw,18px) + var(--g-gap,12px)) 12px 0}
.gate-form input::placeholder{color:var(--c-strong);opacity:1} /* Hang, Oct 23: placeholder = the field line colour */
.gate-form input:focus{outline:none}
.gate-form button{position:absolute;right:0;top:0;bottom:1.5px;display:flex;align-items:center;background:none;border:0;cursor:pointer;padding:0;transition:opacity .2s ease}
/* Hang, Oct 23 21:53: the arrow shows by default (no longer hidden until something is typed) */
@media (prefers-reduced-motion:reduce){.gate-form button{transition:none}}
/* arrow = intro card CTA arrow (.poster-title .arr svg: same path, .86em x .6em, 1.5px non-scaling miter stroke, --c-strong, static per arrows.css) at half size */
.gate-form button svg{display:block;width:var(--g-aw,18px);height:calc(var(--g-aw,18px)*.6977);overflow:visible}.gate-form button path{stroke:var(--c-strong);stroke-width:1.5px;vector-effect:non-scaling-stroke;stroke-linejoin:miter;stroke-linecap:butt}
@media (max-width:640px),(orientation:portrait) and (max-width:1024px){.gate{--g-aw:14px;--g-gap:8px}}
.gate-err{position:absolute;top:100%;left:0;right:0;margin:8px 0 0;min-height:20px;font-size:13px;color:#ff6848;margin-top:8px}
.gate-help{margin:16px 0 0;font-size:var(--t-s13);color:var(--faint,#999)}.gate-help a{position:relative;color:inherit;text-decoration:none} /* Hang, Oct 23: link grey, as "Don't have one?" */
/* hover = About card contact links (.contact a in home.css): colour to --ink, underline grows left to right (Hang, Oct 26) */
.gate-help a{background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;transition:color .2s,background-size .3s var(--ease)}
.gate-help a:hover,.gate-help a:focus-visible{color:var(--ink);background-size:100% 1px}
@media (prefers-reduced-motion:reduce){.gate-help a{transition:none}}
/* the site's own theme toggle (js/theme.js) stays visible and above the gate, in its normal position */
html.gated body .theme-btn,html.gated .home .bot .theme-btn{visibility:visible;position:fixed;left:calc(var(--tb-x) + env(safe-area-inset-left,0px));bottom:calc(var(--tb-x) + env(safe-area-inset-bottom,0px));z-index:1001;pointer-events:auto} /* the footer it moves into in landscape is collapsed with pointer-events:none while gated; without this the button went dead after rotating (Hang, 2026-10-24) */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
