:root {
  --bg: #0a0d0a;
  --fg: #8fd18a;
  --dim: #5f9159;
  --hi: #dcffd6;
  --glow: rgba(110, 255, 110, .28);
  --mono: "IBM Plex Mono", "Cascadia Mono", "JetBrains Mono", Consolas, "DejaVu Sans Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); color-scheme: dark; }

body {
  margin: 0;
  font: clamp(12px, 3.3vw, 16px)/1.5 var(--mono);
  color: var(--fg);
  background: var(--bg);
  text-shadow: 0 0 .45em var(--glow);
  -webkit-text-size-adjust: 100%;
}

/* Röhrenmonitor: Zeilenraster und abgedunkelte Ränder */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .45));
}

::selection { background: var(--fg); color: var(--bg); text-shadow: none; }

main {
  max-width: 80ch;
  margin: 0 auto;
  padding: clamp(16px, 5vw, 56px) 16px 25vh;
}

h1, h2, p, pre { margin: 0; font: inherit; }
pre { white-space: pre; overflow-x: auto; }

.dim { color: var(--dim); }
.hi, strong { color: var(--hi); font-weight: inherit; }
.ps { color: var(--dim); }
a { color: var(--hi); text-underline-offset: .25em; }
a:hover, a:focus-visible { background: var(--hi); color: var(--bg); text-shadow: none; text-decoration: none; outline: 0; }

/* Boot */
.boot-lines { margin-top: 1.5em; }
.bl { white-space: pre-wrap; }
.st { color: var(--dim); white-space: pre; }
.st.ok { color: var(--hi); }
.welcome { margin-top: 1.5em; }
.wl { display: block; }

.hint { display: none; }
.booting .hint {
  display: block;
  position: fixed;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  color: var(--dim);
}

/* System */
header, .blk, #shell { margin-top: 3em; }
h1 { font-size: 1.75em; color: var(--hi); }
header p { margin-top: .5em; }

.cmd { color: var(--hi); min-height: 1.5em; }
.note { margin-top: .5em; }
.out { margin-top: 1.5em; }
.ln { display: block; min-height: 1.5em; }

.prose { max-width: 64ch; }
.prose p + p { margin-top: 1em; }

/* Blockcursor */
.cur::after {
  content: "";
  display: inline-block;
  width: .6em;
  height: 1.15em;
  margin-left: .1em;
  vertical-align: text-bottom;
  background: currentColor;
  box-shadow: 0 0 .45em var(--glow);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Eingabezeile */
#hist div { white-space: pre-wrap; overflow-wrap: anywhere; }
#prompt { display: flex; gap: 1ch; align-items: baseline; }
#cli {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--hi);
  font: inherit;
  text-shadow: inherit;
  caret-color: var(--hi);
  caret-shape: block;
}
#cli::placeholder { color: var(--dim); opacity: .7; }
@media (pointer: coarse) { #cli { font-size: 16px; } } /* verhindert Zoom auf iOS */

footer { margin-top: 4em; }

/* Zustände der Animation (nur mit JavaScript und ohne reduzierte Bewegung) */
.booting #os { display: none; }
.anim #os { animation: on .5s ease-out; }
@keyframes on { from { opacity: 0; } }

.anim .bl, .anim .wl, .anim .blk .ln, .anim .blk .note { visibility: hidden; }
.anim .bl.on, .anim .wl.on, .anim .blk .ln.on, .anim .blk .note.on { visibility: visible; }
