:root {
  --color-text: rgb(0, 200, 0);
  --color-input: white;
  --color-background: black;

  /* The DIR columns are aligned with spaces, so a proportional font would
     shred them. Name real fonts rather than trusting the generic `monospace`
     keyword - it does not always resolve to a monospaced face. */
  --font-mono: Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', 'Liberation Mono',
    'Courier New', monospace;
}

html {
  font-size: 25px;
}

@media (min-width: 0px) {
  html {
    font-size: 1.7rem;
  }
}

@media (min-width: 700px) {
  html {
    font-size: 1.0rem;
  }
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  padding: .25em;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  font-family: var(--font-mono);
  margin: 0;
}

#terminal {
  width: 100%;
  flex-grow: 1;
  align-items: flex-start;
}

#terminal .inputRow {
  display: flex;
  align-items: flex-start; /* Align items to the top */
}

#terminal .inputRow span {
  align-self: flex-start; /* Anchor the span at the top */
  flex: 0 0 auto;         /* the prompt keeps its width... */
  white-space: pre;
}

/* ...and the input takes whatever is left, so prompts of different lengths
   ("S:\>" vs "AI>") both work without hardcoding a width per prompt. */
#terminal .inputCommand,
#terminal .inputTextQuestion {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: var(--color-background);
  caret-color: var(--color-text);
  color: var(--color-input);
  font-family: inherit;
  font-size: 1rem;

  resize: none;
  overflow: hidden;
  height: .8rem;
}

#terminal .textRow {
  width: 100%;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#terminal .image img {
  max-width: 100%;
  padding: .25em 0;
}
