/* Shared by every page: the light/dark switch and the phone menu in the top bar. */
.theme-btn,.menu-btn{appearance:none;-webkit-appearance:none;cursor:pointer;color:#fff;font-family:inherit}
.theme-btn{width:26px;height:26px;padding:0;border-radius:50%;border:2px solid currentColor;background:linear-gradient(90deg,currentColor 50%,transparent 50%);flex:none;transition:transform .2s}
.theme-btn:hover{transform:rotate(180deg)}
.menu-btn{display:none;background:none;border:2px solid currentColor;font-size:14px;font-weight:600;padding:8px 14px}
html.light .theme-btn,html.light .menu-btn{color:#000}
#nav .links a.pill{text-transform:uppercase;letter-spacing:.06em}
@media (max-width:900px){
 .menu-btn{display:inline-block}
 #nav .links{display:none;position:absolute;left:0;right:0;top:100%;flex-direction:column;align-items:stretch;gap:0;background:rgba(0,0,0,.97);border-bottom:1px solid var(--line);padding:6px 24px 20px}
 #nav.open .links{display:flex}
 #nav.open{background:rgba(0,0,0,.97)}
 #nav .links a{display:block;padding:14px 0;font-size:17px;border-bottom:1px solid var(--line)}
 #nav .links a.pill{margin-top:16px;text-align:center;border-bottom:0;padding:14px}
 #nav .links .theme-btn{margin-top:16px;align-self:flex-start}
 html.light #nav .links,html.light #nav.open{background:rgba(255,255,255,.98)}
}

/* Page-to-page transition (assets/warp.js): the real content is hidden while the digits stand in for it. */
html.warp-out body>*:not(canvas){opacity:0!important;transition:opacity .2s ease!important;pointer-events:none}
html.warp-in body>*:not(canvas){opacity:0!important;transition:none!important}
html.warp-fade body>*:not(canvas){transition:opacity .35s ease!important}
#warp{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:70;pointer-events:none}

/* Top bar stays see-through when the page is scrolled: a light frosted tint, so the binary shows through and the menu stays readable. */
#nav.solid:not(.open){background:rgba(0,0,0,.18);border-bottom-color:transparent;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
html.light #nav.solid:not(.open){background:rgba(255,255,255,.18)}

/* Red sections: the red is laid over the moving binary instead of hiding it.
   On black the red is "screened" (digits stay white), on white it is "multiplied" (digits stay dark). */
html section.block.redtex,html section.block.red{background:transparent!important}
section.block.redtex::before,section.block.red::before{content:"";position:absolute;left:0;top:0;right:0;bottom:0;background:#D41D1E;mix-blend-mode:screen;pointer-events:none}
html.light section.block.redtex::before,html.light section.block.red::before{mix-blend-mode:multiply}
section.block.redtex>*,section.block.red>*{position:relative;z-index:1}
