/* === Terminal easter egg ===
   Hidden by default; type "sudo" anywhere on the page (not while
   typing in a field) to reveal a fake terminal — a scripted boot
   sequence followed by a tiny interactive shell with a handful of
   real commands. Escape, typing "sudo" again, or "exit"/"quit" closes
   it. Deliberately always-dark regardless of [data-theme], unlike the
   specimen sheet — this reads as a distinct "device" rather than a
   theme-aware document, so its palette lives in local custom
   properties scoped to .terminal-overlay instead of tokens.css,
   the same way the VHS scanline overlay hardcodes its own one-off
   colors. Not linked from anywhere on purpose. */
.terminal-overlay {
  --term-bg: #0b0f0b;
  --term-window: #0f140f;
  --term-border: #2b3a2c;
  --term-fg: #8fd68f;
  --term-dim: #4f7a52;
  --term-accent: #d78a51;

  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 5, 3, 0.72);
  padding: var(--space-5);
}
.terminal-overlay[hidden] {
  display: none;
}
.terminal-window {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 44rem;
  height: min(30rem, 80vh);
  background: var(--term-window);
  border: var(--border-thick) solid var(--term-border);
  border-radius: var(--radius);
}
.terminal-titlebar {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--border-hair) solid var(--term-border);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--term-dim);
}
.terminal-titlebar__hint {
  white-space: nowrap;
}
.terminal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--term-fg);
}
.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-line--boot {
  color: var(--term-dim);
}
.terminal-line--cmd {
  color: var(--term-accent);
}
.terminal-line--out {
  color: var(--term-fg);
}
.terminal-inputline {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-top: var(--border-hair) solid var(--term-border);
}
.terminal-prompt {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--term-accent);
  white-space: nowrap;
}
.terminal-input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--term-fg);
  caret-color: var(--term-fg);
}
.terminal-input:disabled {
  opacity: 0.4;
}
