/* Mohr IT-Beratung UG (haftungsbeschränkt) — Platzhalterseite, Terminal-Edition */

:root {
  color-scheme: light dark;

  --brand: #00587c;
  --accent: #d25b73;

  /* Light ("paper terminal") */
  --bg: #eef4f7;
  --glow-1: rgba(0, 88, 124, 0.16);
  --glow-2: rgba(210, 91, 115, 0.10);
  --win-bg: #fbfdfe;
  --win-bar: #e3ecf1;
  --win-border: rgba(0, 88, 124, 0.20);
  --text: #0b2b39;
  --muted: #5b7a89;
  --logo: #00587c;
  --prompt: #0b7a4f;
  --cmd: #00587c;
  --ok: #12855a;
  --warn: #b06a00;
  --fail: #c0405c;
  --hint: #7a94a1;
  --shadow: 0 30px 70px -35px rgba(0, 47, 68, 0.55);
  --scan: rgba(0, 88, 124, 0.028);
}

/* Dunkel: automatisch nach Systemeinstellung, sofern nicht manuell auf hell
   gestellt. Die Werte stehen bewusst zweimal – einmal fuer die Automatik,
   einmal fuer die manuelle Wahl. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #04141c;
    --glow-1: rgba(0, 130, 184, 0.28);
    --glow-2: rgba(210, 91, 115, 0.16);
    --win-bg: #071f2a;
    --win-bar: #0b2b39;
    --win-border: rgba(127, 196, 224, 0.20);
    --text: #d7ecf5;
    --muted: #8fb0bf;
    --logo: #ffffff;
    --prompt: #56d6a0;
    --cmd: #7fc4e0;
    --ok: #56d6a0;
    --warn: #f0b45e;
    --fail: #ff7d97;
    --hint: #6f909f;
    --shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.9);
    --scan: rgba(127, 196, 224, 0.035);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #04141c;
    --glow-1: rgba(0, 130, 184, 0.28);
    --glow-2: rgba(210, 91, 115, 0.16);
    --win-bg: #071f2a;
    --win-bar: #0b2b39;
    --win-border: rgba(127, 196, 224, 0.20);
    --text: #d7ecf5;
    --muted: #8fb0bf;
    --logo: #ffffff;
    --prompt: #56d6a0;
    --cmd: #7fc4e0;
    --ok: #56d6a0;
    --warn: #f0b45e;
    --fail: #ff7d97;
    --hint: #6f909f;
    --shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.9);
    --scan: rgba(127, 196, 224, 0.035);
}

:root[data-theme="light"] {
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: clamp(1rem, 4vw, 2.5rem);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 620px at 12% -10%, var(--glow-1), transparent 62%),
    radial-gradient(820px 560px at 100% 108%, var(--glow-2), transparent 62%);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- Logo ---------- */

.brand {
  display: block;
  width: min(230px, 52vw);
  color: var(--logo);
  flex: none;
}

.brand > svg { display: block; width: 100%; height: auto; }

/* ---------- Fenster ---------- */

.window {
  width: min(100%, 46rem);
  border: 1px solid var(--win-border);
  border-radius: 12px;
  background: var(--win-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-border);
}

.dots { display: flex; gap: 0.4rem; }
.dots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: currentColor; opacity: 0.85;
}
.dots i:nth-child(1) { color: #ff5f57; }
.dots i:nth-child(2) { color: #febc2e; }
.dots i:nth-child(3) { color: #28c840; }

.titlebar .title {
  flex: 1;
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-toggle {
  appearance: none;
  flex: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
  border-color: var(--win-border);
  background: color-mix(in srgb, var(--prompt) 10%, transparent);
}

.theme-toggle .key { color: var(--prompt); }

/* ---------- Bildschirm ---------- */

.screen {
  position: relative;
  padding: clamp(1rem, 3.5vw, 1.6rem);
  max-height: min(60svh, 30rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, var(--scan) 0 1px, transparent 1px 3px);
}

.out {
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.out .ok    { color: var(--ok); }
.out .warn  { color: var(--warn); }
.out .fail  { color: var(--fail); }
.out .muted { color: var(--muted); }
.out .hint  { color: var(--hint); }
.out .cmd   { color: var(--cmd); font-weight: 600; }
.out .acc   { color: var(--accent); }
.out .blk {
  display: inline-block;
  width: 1ch;
  height: 1.05em;
  vertical-align: -0.2em;
  background: var(--prompt);
  animation: blink 1.05s steps(1) infinite;
}
.out .big   { font-weight: 700; letter-spacing: 0.02em; }
.out a      { color: var(--cmd); text-underline-offset: 3px; }

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

.line {
  display: flex;
  align-items: baseline;
  gap: 0.5ch;
  margin-top: 0.35rem;
}

.ps1 { color: var(--prompt); white-space: nowrap; }
.ps1 .path { color: var(--cmd); }
.ps1 .sign { color: var(--accent); }

.input-wrap { position: relative; flex: 1; min-width: 0; }

#cmdline {
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: transparent;
  outline: none;
}

.caret {
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 0.62em;
  height: 1.15em;
  background: var(--prompt);
  opacity: 0.9;
  animation: blink 1.05s steps(1) infinite;
  pointer-events: none;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 clamp(1rem, 3.5vw, 1.6rem) clamp(1rem, 3.5vw, 1.4rem);
}

.chip {
  appearance: none;
  border: 1px dashed var(--win-border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  padding: 0.25em 0.8em;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.chip:hover, .chip:focus-visible {
  color: var(--text);
  border-color: var(--prompt);
  border-style: solid;
  background: color-mix(in srgb, var(--prompt) 10%, transparent);
}

/* ---------- Impressum (immer im DOM, auch ohne JS) ---------- */

.legal {
  width: min(100%, 46rem);
  font-size: 0.85rem;
  color: var(--muted);
}

.legal > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.55em 1em;
  border: 1px dashed var(--win-border);
  border-radius: 10px;
  color: var(--muted);
  transition: color .15s ease, border-color .15s ease;
}

.legal > summary::-webkit-details-marker { display: none; }
.legal > summary::before { content: "$ "; color: var(--prompt); }
.legal[open] > summary { border-style: solid; color: var(--text); }
.legal > summary:hover { color: var(--text); border-color: var(--prompt); }

.legal-inner {
  margin-top: 0.9rem;
  border: 1px solid var(--win-border);
  border-radius: 12px;
  background: var(--win-bg);
  padding: clamp(1.1rem, 3.5vw, 1.75rem);
}

.legal-inner h2 { margin: 0 0 0.35rem; font-size: 0.95rem; color: var(--text); }
.legal-inner h3 {
  margin: 1.35rem 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cmd);
  font-weight: 600;
}
.legal-inner h3::before { content: "# "; opacity: .55; }
.legal-inner p { margin: 0; }
.legal-inner a { color: var(--cmd); }

.legal-grid {
  display: grid;
  gap: 1.1rem clamp(1.5rem, 5vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.fineprint {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--win-border);
  font-size: 0.78rem;
  line-height: 1.6;
}
.fineprint p + p { margin-top: 0.8rem; }
.fineprint strong { color: var(--text); }
.fineprint h3 { margin-top: 1.1rem; }
.fineprint h3:first-child { margin-top: 0; }

/* Überschrift, die auf einen fineprint-Block folgt (z. B. "Datenschutzerklärung" nach der
   Verbraucherstreitbeilegung): eigene Trennlinie wie bei einem fineprint-Block, statt direkt
   am Absatz darüber zu kleben. Der danach folgende fineprint-Block braucht dann keine zweite
   Linie so kurz hinter der Überschrift, seine eigenen h3 sorgen für Struktur. */
.legal-inner .fineprint + h2 {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--win-border);
}
.legal-inner h2 + .fineprint { margin-top: 0.9rem; padding-top: 0; border-top: none; }

.site-footer {
  font-size: 0.75rem;
  color: var(--hint);
  text-align: center;
}

.site-footer .sep { opacity: 0.5; padding: 0 0.5ch; }

@media (max-width: 30rem) {
  body { font-size: 13.5px; }
  .titlebar .title { font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .caret { animation: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
