/* Cyber goes Baarlo — terminal portal
   Adapted from the reference look. No external fonts/CDNs are loaded, so the
   Content-Security-Policy can stay strict and nothing leaks to third parties. */

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

:root {
  --bg: #0a0a0a;
  --border: #1f1f1f;
  --text: #e8e8e8;
  --muted: #6a6a6a;
  --accent: #c8f542;   /* lime */
  --accent2: #42f5a7;  /* green */
  --dim: #333;
  --error: #ff5555;
  --font: ui-monospace, "JetBrains Mono", "Fira Code", "SFMono-Regular",
          "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
}

html { font-size: clamp(15px, 1.1vw + 10px, 18px); }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}

header {
  padding: 1.4em 0 1em;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.site-title {
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
.site-sub { font-size: 0.7em; color: var(--muted); margin-top: 0.3em; letter-spacing: 0.1em; }

#output {
  flex: 1;
  overflow-y: auto;
  padding: 1em 0 0.5em;
  scroll-behavior: smooth;
  line-height: 1;
}
#output::-webkit-scrollbar { width: 3px; }
#output::-webkit-scrollbar-track { background: transparent; }
#output::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 2px; }

.line {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}
.line.echo { color: var(--muted); margin-top: 0.9em; }
.line.echo .pchar { color: var(--accent); }
.line.error { color: var(--error); }
.line.success { color: var(--accent2); }
.line.accent { color: var(--accent); }
.line.dim { color: var(--muted); }

.section { margin: 0.4em 0 0.6em; }
.section h2 {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.5;
  margin-bottom: 0.15em;
}
.row { display: flex; gap: 1em; align-items: baseline; line-height: 1.6; }
.row .k { color: var(--accent); min-width: 9em; flex-shrink: 0; }
.row .v { color: #bbb; word-break: break-word; }
.row .done { color: var(--accent2); }
.row .todo { color: var(--muted); }

.frag {
  display: inline-block;
  background: #161a12;
  border: 1px solid var(--dim);
  border-radius: 2px;
  padding: 0.05em 0.5em;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.banner {
  color: var(--accent);
  white-space: pre;
  line-height: 1.05;
  font-size: clamp(0.42em, 1.8vw, 0.8em);
  overflow-x: auto;
}

#input-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 0 1em;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.prompt-symbol { color: var(--accent); flex-shrink: 0; user-select: none; }
#input-wrap { flex: 1; position: relative; }
#cmd {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1em;
  line-height: 1.5;
  caret-color: var(--accent);
}
#ghost {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  font-family: var(--font);
  font-size: 1em;
  line-height: 1.5;
  white-space: pre;
}
#ghost .typed { color: transparent; }
#ghost .hint { color: var(--dim); }

/* Subtle scanlines */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 999;
}

@media (prefers-reduced-motion: reduce) {
  #output { scroll-behavior: auto; }
}
