.term footer{background:var(--ink);padding:12px var(--gutter) 14px;border-top:1px solid var(--rule);font-size:11px;line-height:1.5}
.footer__links,.footer__bar{display:flex;gap:0 18px;flex-wrap:wrap;font-size:11px}
.footer__links a{text-decoration:none;padding:4px 0}
.footer__links a:hover{color:var(--cyan)}
.footer__bar{margin-top:2px;color:rgba(247,246,243,.6)}
/* terminal: always on at the bottom of the screen. It is the contact form. */
.term{position:sticky;bottom:calc(var(--dock-min) + var(--open-extra,0px) - var(--term-h,100svh));min-height:var(--term-h,100svh);display:flex;flex-direction:column;z-index:60;pointer-events:none;
  font-family:var(--mono);font-size:15px;line-height:1.6}
.term{overflow-anchor:none}   /* its size changes must not make the browser re-anchor and nudge the scroll position */
.term__top,.term footer{pointer-events:auto}
#kb-cover{display:none;position:absolute;left:0;width:100%;background:#080808;z-index:7;pointer-events:none}
.term__top{position:relative;background:#080808;border-top:1px solid rgba(247,246,243,.24);box-shadow:0 -2px 0 rgba(0,255,255,.4),0 -4px 0 rgba(255,0,255,.28);
  margin:calc(var(--p,0) * var(--win-mt,0px)) calc(var(--p,0) * var(--win-mx,0px)) 0;border-radius:calc(var(--p,0) * 10px)}
.term__top{padding-bottom:env(safe-area-inset-bottom)}
@media (pointer:coarse){.term__top{will-change:transform}}   /* its own layer: Safari on iPhone otherwise stops painting it after the keyboard closes during a scroll, leaving only the cursor */
.term[data-rise="true"] .term__top{padding-bottom:0}
.term__top:focus-within{border-top-color:var(--cyan)}
.term__fill{flex:1}
.term footer{background:rgba(14,14,14,.86)}
.term__log{display:flex;flex-direction:column}
.term__log>:first-child{margin-top:auto}
.term[data-rise="true"] .term__top{border:1px solid rgba(247,246,243,.24);box-shadow:0 30px 80px rgba(0,0,0,.6)}
.term[data-rise="true"] .term__top:focus-within{border-color:rgba(0,255,255,.6)}
@media (pointer:fine){.term[data-rise="true"] .term__top{--gutter:28px}}
.term[data-rise="true"] .term__log{height:calc(var(--fold-log) + var(--rise))!important;max-height:none!important}
.term__top{transition:margin .35s ease,border-radius .35s ease}.term .term__log,.term[data-rise="true"] .term__log{transition:height .35s ease}
.term[data-kb="true"] .term__log,.term[data-kb="true"] .term__top{transition:none!important}
@media (pointer:coarse){.term[data-rise="true"] .term__top{border-width:1px 0 0;border-radius:0;box-shadow:none;padding-top:env(safe-area-inset-top)}.term[data-rise="true"] footer{background:#080808;padding-bottom:calc(14px + env(safe-area-inset-bottom))}}
.term__bar{display:flex;gap:14px;align-items:center;padding:9px var(--gutter) 0;color:rgba(247,246,243,.72)}
.term__tag{color:var(--ink);background:var(--cyan);padding:2px 8px;border-radius:3px}
.term__back{display:none;position:absolute;top:6px;right:var(--gutter);padding:4px 10px;min-height:28px;border:1px solid var(--rule);border-radius:999px;color:rgba(247,246,243,.8)}
.term__back:hover{border-color:var(--cyan);color:var(--cyan)}
.term[data-rise="true"] .term__back{display:block}
.term__log{overflow:auto;white-space:pre-wrap;height:4.8em;max-height:4.8em;padding:8px var(--gutter) 0;transition:max-height .25s,height .25s}
.term[data-open="true"] .term__log{height:auto;max-height:40svh}
@media(min-width:701px){.term__log{--log:clamp(4.8em,calc(100svh - 574px),15.2em);height:var(--log);max-height:var(--log)}.term[data-open="true"] .term__log{height:auto;min-height:var(--log);max-height:max(var(--log),56svh)}}
.term__log .in{color:var(--paper)}
.term__log .in::before{content:"> ";color:var(--cyan)}
.term__log .q{color:rgba(247,246,243,.66)}
.term__log .ok{color:var(--cyan)}
.term__log .err{color:var(--magenta)}
.term__form{display:flex;gap:10px;align-items:center;padding:10px var(--gutter);min-height:54px}
.term__form label{color:var(--cyan);white-space:nowrap}
.term__form input:not(.gotcha){flex:1;min-width:0;background:none;border:0;outline:0;color:var(--paper);font:inherit;font-size:16px;caret-color:var(--cyan)}
.term__form input::placeholder{color:rgba(247,246,243,.5)}
.term__cursor{margin:0}
.term__form:focus-within .term__cursor{display:none}
.term__help{border:1px solid var(--rule);border-radius:999px;padding:6px 12px;min-height:32px;color:rgba(247,246,243,.7)}
.term__help:hover{border-color:var(--cyan);color:var(--cyan)}
.gotcha{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.begin__hint{color:var(--cyan);margin:0}
.credit{margin:10px 0 0;font-size:10px;color:rgba(247,246,243,.65)}
.term__send{border:1px solid var(--cyan);color:var(--cyan);border-radius:999px;padding:6px 14px;min-height:32px}
.term__send:hover{background:var(--cyan);color:var(--ink)}
.term__form{border-top:1px solid var(--rule);margin-top:8px}
@media(max-width:700px){.term__log{height:3.2em;max-height:3.2em;padding-top:0;margin-top:8px}.term[data-open="true"] .term__log{max-height:48svh}.term__help{display:none}}

/* Measure the small viewport even while mobile browser controls move. */
.term::before{content:"";position:absolute;height:100svh;width:0;pointer-events:none}
:root{--dock-min:54px}
.term,.begin{--gutter:max(20px,calc((100vw - 1440px)/2 + 40px))}
.term .mono,.begin .mono{font:400 12px/1.45 var(--mono);letter-spacing:.08em;text-transform:uppercase}
.term .footer__links,.term .footer__bar,.begin .credit{font-size:11px}
.term button{background:none;cursor:pointer}
.term .term__cursor{display:inline-block;width:.55em;height:1em;background:var(--cyan);animation:terminal-blink .5s steps(1) infinite}
.term__form:focus-within .term__cursor{display:none}
@keyframes terminal-blink{50%{opacity:0}}
main{transition:opacity .35s ease}
main.away{opacity:0;pointer-events:none}
#contact.begin{display:flex;align-items:flex-start;flex-direction:column;justify-content:flex-end;min-height:0;padding:16px var(--gutter) 26px;background:linear-gradient(180deg,rgba(14,14,14,.4),rgba(14,14,14,.82) 30%)}
#contact .cta{margin:12px 0 0;font:600 clamp(48px,11vw,180px)/.9 var(--sans);letter-spacing:-.035em;text-shadow:-4px 0 var(--cyan),4px 0 var(--magenta)}
.begin__brief{max-width:65ch;margin:16px 0 0}
@media(prefers-reduced-motion:reduce){.term .term__cursor{display:none}main,.term__top,.term .term__log{transition:none!important}}
.page-nav{display:flex;align-items:center;gap:10px}
@media(max-width:450px){.topbar__inner{gap:8px}.page-nav{gap:6px}.page-nav .topbar__cta{padding-inline:8px;font-size:10px}}
