@font-face {
  font-family: "MC DOS";
  src: url("MCDOS.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "MC DOS", "Courier New", monospace;
  font-size: 16px;
  line-height: 1;
  color: #aaa;
  background: #000;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
::selection { color: #000; background: #aaa; }

#screen {
  min-height: 100svh;
  padding: 24px;
  overflow-x: auto;
}

.line { min-height: 1em; white-space: pre-wrap; overflow-wrap: anywhere; }
.listing { white-space: pre; }
#prompt { display: flex; align-items: baseline; margin: 0; }
[hidden] { display: none !important; }
#path { white-space: pre; }
#entry { position: relative; flex: 1; min-width: 2ch; overflow: hidden; }

#command {
  display: block;
  width: 100%;
  height: 1em;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  caret-color: transparent;
}

#cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1ch;
  height: 1em;
  background: #aaa;
  pointer-events: none;
  mix-blend-mode: difference;
}

#entry:focus-within #cursor { animation: blink 1s step-end infinite; }
#entry:not(:focus-within) #cursor { background: transparent; border: 1px solid #aaa; }
@keyframes blink { 50% { opacity: 0; } }

a { color: inherit; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 1px solid #aaa; outline-offset: 3px; }

#stop {
  margin: 1em 0 0;
  padding: 0.5em 1ch;
  border: 1px solid #aaa;
  background: #000;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

#more button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

#more-quit { margin-left: 2ch; }

@media (pointer: coarse) {
  #more button { min-height: 44px; }
}

@media (min-width: 1100px) {
  :root { font-size: 24px; }
  #screen { padding: 32px; }
}

@media (max-width: 600px) {
  #screen { padding: 16px 8px; }
}

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