/* man.cat: an 80-column terminal and nothing else. */
:root {
  --bg:#0b0e12; --fg:#c9cdc4; --bright:#ffffff; --dim:#7d8590;
  --green:#56d364; --link:#58a6ff;
}
* { box-sizing:border-box; }
html,body { margin:0; background:var(--bg); }
body {
  color:var(--fg);
  font-family:"SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "DejaVu Sans Mono", monospace;
  /* 80 columns must fit the viewport; shrink the glyphs, never the columns */
  font-size:min(15.5px, calc((100vw - 20px) / 48.5));
  line-height:1.42;
}

#term {
  width:80ch; max-width:calc(100vw - 20px);
  margin:0 auto; padding:14px 0 18px;
  cursor:text;
}

pre, #screen, #promptline {
  font:inherit; white-space:pre-wrap; word-break:break-word; margin:0;
}
#screen .block { margin:0 0 2px; }

/* man-page furniture */
b { color:var(--bright); font-weight:700; }
.dim { color:var(--dim); }
.p { color:var(--green); font-weight:700; }
a[data-man] {
  color:var(--link); text-decoration:underline;
  text-decoration-style:dotted; text-underline-offset:3px; cursor:pointer;
}
a[data-man]:hover { background:rgba(88,166,255,.14); }

#cursor { color:var(--green); animation:blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity:0; } }
#term.locked #cursor { animation:none; }

/* the real input hides offscreen; the prompt line is its mirror */
#kbd {
  position:fixed; top:0; left:-9999px; width:10px; height:10px;
  opacity:0; border:none; background:none; color:transparent;
}

::selection { background:#2d4f7c; color:#fff; }

@media (prefers-reduced-motion: reduce){
  #cursor { animation:none; }
}
