/* mikeol10.ch - Terminal. Tokens und Regeln: KONZEPT.md §4, ADR-0008. */

:root {
  --bg: #0a0e0c;
  --fg: #c9d1cd;
  --dim: #7d8f86;       /* 5.7:1 auf --bg (alt #6b7d74: 4.4:1, unter WCAG AA) */
  --accent: #22c55e;
  --accent-2: #4ade80;
  --err: #f87171;
  --border: #1f2a24;
  --cols: 80ch;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", Menlo, monospace;
  font-size: 16px;
  line-height: 1.45;
}

#screen {
  max-width: calc(var(--cols) + 32px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* --- Ausgabe -------------------------------------------------------------- */

#output { flex: 1 1 auto; }

.ln {
  margin: 0;
  min-height: 1.45em;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.banner  { color: #e6edf3; }
.cmdline { color: var(--accent); }
.dim     { color: var(--dim); }
.err     { color: var(--err); }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover, a:focus-visible { color: var(--accent-2); }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ASCII-Grafik darf breiter als 80 Spalten sein: sie scrollt in ihrem eigenen
   Kasten, statt das Layout zu sprengen. */
.art {
  margin: 0;
  font: inherit;
  line-height: 1.15;
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}

/* --- Eingabezeile --------------------------------------------------------- */

#prompt {
  display: flex;
  align-items: baseline;
  gap: 1ch;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

#prompt-label { color: var(--accent); white-space: nowrap; }

#cmd {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: max(16px, 1em);   /* unter 16px zoomt iOS beim Antippen */
  caret-color: var(--accent);
  outline: none;
}

#prompt:focus-within { border-top-color: var(--dim); }

#screen.busy #cmd { caret-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Kleine Bildschirme --------------------------------------------------- */

@media (max-width: 480px) {
  body { font-size: 14px; }
  #screen { padding: 12px; }
}

/* Statische Seiten (404) ohne Eingabezeile */
#screen.static { justify-content: flex-start; }

/* --- Programme (Scene-Player, ADR-0014) ---------------------------------- */

.abort {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.abort:hover { color: var(--accent-2); }
.abort[hidden] { display: none; }
