/* 64xo terminal — SIXTYFOUR instrument skin.
   The document system applied to a screen: the brand's two grounds (Stage and
   Paper) governed by the sun via chrono.js, Plex Mono for the I/O — which is
   what mono is for in the system — Archivo only in the lockup, hairlines for
   structure, one Signal element. No CRT effects: this page, the error pages,
   and the video app are three instruments on one panel. */
@font-face{font-family:"64 Mono";src:url(/assets/fonts/IBMPlexMono-Regular.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"64 Mono";src:url(/assets/fonts/IBMPlexMono-Medium.woff2) format("woff2");font-weight:500;font-display:swap}

:root{
  /* night pole — chrono.js interpolates toward the day pole every 60s */
  --ground:#0C0C0C;   /* Stage */
  --fg:#F2F0EA;       /* Tint — the deck's text-on-Stage */
  --dim:#77776F;      /* Steel */
  --accent:#F2A922;   /* Signal, full strength on Stage */
  --hairline:#3D3D3B; /* Graphite carries the Rule role on dark */
  --pad:clamp(16px,4vw,44px);
}
*{box-sizing:border-box}
/* The ground has exactly one owner: html. Its background propagates to the
   whole canvas, so the crossfade covers the viewport rather than just the
   body box — which is only as tall as the content. */
html{background-color:var(--ground);transition:background-color .8s linear}
html,body{margin:0;min-height:100%}
body{
  font:400 16px/1.6 "64 Mono",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
  background:transparent; color:var(--fg); padding:0 var(--pad);
  transition:color .8s linear;
}
@media (max-width:640px){body{font-size:14px}}

/* the horizontal lockup, same register as "SIXTYFOUR / video" */
#brand{
  display:flex;align-items:baseline;gap:.5em;
  padding:20px 0 14px;margin-bottom:24px;
  border-bottom:1px solid var(--hairline);
  font-family:Archivo,Arial,"Helvetica Neue",sans-serif;
  font-weight:600;font-size:15px;letter-spacing:.02em;color:var(--fg)}
#brand .app{font-weight:400;color:var(--dim)}
#brand .meta{margin-left:auto;font:400 11px/1 "64 Mono",monospace;
  letter-spacing:.14em;text-transform:uppercase;color:var(--dim)}

#crt{position:relative;max-width:80ch;margin:0 auto;padding-bottom:40vh}
#out .row,#line{white-space:pre-wrap;word-break:break-word;min-height:1.6em}

/* semantics of a line */
.row{opacity:.86}
.sent{opacity:.62}
.sent .lbl{color:var(--dim)}
.hi,.err,.ask{opacity:1;font-weight:500}
.err{color:var(--accent)}
.dim{color:var(--dim);opacity:1}
.acc{color:var(--accent);opacity:1}
a{color:var(--accent)}

/* prompt line */
#line{opacity:1}
#label{color:var(--dim)}
#label .sig{color:var(--accent);font-weight:500}
#cursor{color:var(--accent);animation:blink 1.06s steps(1) infinite;transition:transform .06s}
#cursor.solid{animation:none}
@keyframes blink{0%,50%{opacity:1}50.01%,100%{opacity:0}}

/* The real input. It must stay inside the viewport — iOS refuses to raise the
   soft keyboard for an offscreen field — and at 16px, or iOS zooms the page on
   focus. Its own text is never seen; #echo mirrors it. */
#cmd{position:fixed;bottom:0;left:0;width:1px;height:1px;padding:0;border:0;
  opacity:0;font-size:16px;background:none;color:transparent}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* enter acknowledgement: a hairline strike under the submitted line, fading.
   The platen gesture from the old skin — the one effect worth keeping. */
.strike{position:relative}
.strike::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  background:currentColor;animation:strike .2s ease-out forwards}
@keyframes strike{to{opacity:0}}

/* boot: a plain fade — the page arrives like a document, not a tube */
body.boot #screen{animation:arrive .25s ease-out}
@keyframes arrive{from{opacity:0}to{opacity:1}}

/* mobile chips */
#chips{position:fixed;left:0;right:0;bottom:0;display:flex;gap:8px;flex-wrap:wrap;
  padding:10px var(--pad) calc(10px + env(safe-area-inset-bottom));
  background-color:var(--ground);border-top:1px solid var(--hairline);z-index:5;
  transition:background-color .8s linear,border-color .8s linear}
/* 44px minimum touch target — thumbs are not mice */
#chips button{font:inherit;font-size:.9em;color:var(--dim);background:none;
  border:1px solid var(--hairline);padding:10px 16px;min-height:44px;min-width:44px;border-radius:0;
  touch-action:manipulation}
@media (hover:hover) and (pointer:fine){#chips{display:none!important}}

/* game frame */
.crawl{opacity:1;line-height:1.15;letter-spacing:.12em}

/* noscript page */
#plain{max-width:70ch;margin:0 auto;color:var(--fg);opacity:.9}
#plain h1{font-weight:500;font-size:1.1em;letter-spacing:.08em}

@media (prefers-reduced-motion:reduce){
  *,*::after{animation:none!important;transition:none!important}
  #cursor{animation:blink 1.06s steps(1) infinite!important}
}
@media (prefers-contrast:more){
  .row,.sent{opacity:1}
}
