/* hidden terminal (B3) */
.term{position:fixed;left:0;right:0;bottom:0;height:50vh;height:50dvh;z-index:50;display:flex;flex-direction:column;
  background:var(--paper);color:var(--ink);border-top:2px solid var(--ink);
  font:13px/1.5 "Geist Mono",ui-monospace,monospace}
.term[hidden]{display:none}
.term-bar{display:flex;justify-content:space-between;align-items:center;padding:8px var(--gut);border-bottom:1px solid var(--ink)}
.term-x{font:inherit;letter-spacing:inherit;text-transform:inherit;background:none;color:inherit;border:1px solid;padding:2px 8px;cursor:pointer}
.term-x:hover{background:var(--ink);color:var(--paper)}
.term-out{flex:1;overflow-y:auto;padding:12px var(--gut);overscroll-behavior:contain}
.term-row{font:inherit;white-space:pre-wrap;word-break:break-word;margin:0}
.term-row.cmd{margin-top:6px}
.term-row.dim{opacity:.6}
.term-line{display:flex;gap:10px;align-items:center;padding:10px var(--gut);border-top:1px solid var(--ink)}
.term-in{flex:1;min-width:0;font:inherit;color:inherit;background:transparent;border:0;outline:0;caret-color:var(--ink);
  font-size:16px} /* 16px avoids iOS zoom on focus */
.term-line:focus-within{outline:2px solid var(--ink);outline-offset:-2px}
html.term-open{overflow:hidden}

/* small button that opens the terminal; only shown where the footer hint is hidden (mobile) */
.term-open-btn{display:none;justify-self:start;background:none;color:inherit;border:1px solid;padding:6px 14px;cursor:pointer;font-size:14px}

@media (max-width:700px){
  .term{height:100vh;height:100dvh;border-top:0}
  .term-open-btn{display:inline-block}
}
