/* ---------------------------------------------------
   Tokens
--------------------------------------------------- */
:root {
  --bg: #0b0d0c;
  --bg-raised: #12100c;
  --amber: #ffb000;
  --amber-dim: #8a5c00;
  --amber-glow: rgba(255, 176, 0, 0.55);
  --text: #e8e6df;
  --text-dim: #857f72;
  --cyan: #4fd8d8;
  --red: #ff5b4d;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --display: 'VT323', var(--mono);
  --radius: 6px;
  --max-width: 900px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------
   CRT overlay — scanlines + vignette
--------------------------------------------------- */
.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%);
  mix-blend-mode: overlay;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .crt-overlay { opacity: 0.3; }
}

/* ---------------------------------------------------
   Layout shell
--------------------------------------------------- */
.terminal-window {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}

.title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 4px 12px;
  border-bottom: 1px solid #201d17;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.dots { display: flex; gap: 7px; }

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.85;
}
.dot--red { background: #ff5f56; }
.dot--yellow { background: #ffbd2e; }
.dot--green { background: #27c93f; }

.title-text {
  color: var(--text-dim);
  font-size: 13px;
  flex: 1;
}

.status-pill {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #2a2620;
  padding: 3px 10px;
  border-radius: 999px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ddc6e;
  box-shadow: 0 0 6px #3ddc6e;
  flex-shrink: 0;
}

/* ---------------------------------------------------
   Terminal body
--------------------------------------------------- */
.terminal-body {
  flex: 1;
  padding: 28px 4px 24px;
}

.logo-block {
  margin-bottom: 22px;
}

.logo {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  letter-spacing: 0.08em;
  color: var(--amber);
  text-shadow: 0 0 10px var(--amber-glow), 0 0 26px rgba(255,176,0,0.25);
  margin: 0;
  line-height: 1;
}

.tagline {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---------------------------------------------------
   Printed lines
--------------------------------------------------- */
.boot-lines, .history {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history { margin-top: 4px; }

.line {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14.5px;
}

.line--system { color: var(--text-dim); }
.line--body { color: var(--text); }
.line--heading {
  color: var(--amber);
  margin-top: 14px;
  font-weight: 500;
}
.line--label { color: var(--cyan); }
.line--error { color: var(--red); }

.line--command {
  color: var(--text);
  margin-top: 16px;
}
.line--command .prompt-echo {
  color: var(--amber);
  margin-right: 6px;
}

.block-spacer { height: 8px; }

/* Blinking cursor used inline during typing */
.type-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--amber);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .type-cursor { animation: none; opacity: 0.6; }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------------------------------------------------
   Quick chips
--------------------------------------------------- */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 6px;
}

.chip {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber);
  background: transparent;
  border: 1px solid var(--amber-dim);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
}

.chip:hover {
  background: rgba(255, 176, 0, 0.08);
}

.chip:focus-visible,
.cmd-input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------------------------------------------------
   Input row
--------------------------------------------------- */
.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 4px 22px;
  position: relative;
}

.prompt-label {
  color: var(--amber);
  font-size: 14.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14.5px;
  outline: none;
  caret-color: var(--amber);
  min-width: 0;
}

.cmd-input::placeholder {
  color: #4a463c;
}

.cursor-block {
  display: none;
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 560px) {
  body { font-size: 14px; }
  .terminal-window { padding: 0 14px; }
  .title-text { font-size: 11px; }
  .status-pill { font-size: 11px; padding: 2px 8px; }
  .line, .line--command { font-size: 13.5px; }
  .prompt-label { font-size: 13px; }
}
