:root {
  --bg: #0b1121;
  --panel: rgba(11, 17, 33, 0.88);
  --panel-border: #1e293b;
  --text: #c9d1d9;
  --command: #e2e8f0;
  --prompt: #22c55e;
  --header: #3b82f6;
  --accent: #22c55e;
  --muted: #64748b;
  --error: #ef4444;
  --string: #a5d6a7;
  --shadow: rgba(2, 6, 23, 0.38);
  --content-width: 500px;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.08), transparent 24%),
    var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.68;
  background: transparent;
}

button,
input,
a {
  font: inherit;
}

.shell {
  min-height: 100vh;
  padding: 0;
}

.terminal {
  min-height: 100vh;
  background: transparent;
}

.terminal__viewport {
  padding: 28px 20px 32px;
}

.terminal__content {
  width: min(100%, var(--content-width));
  margin: 0;
}

.terminal__history {
  display: flex;
  flex-direction: column;
}

.entry {
  margin-bottom: 20px;
  animation: entry-fade 160ms ease-out;
}

.entry--compact {
  margin-bottom: 12px;
}

.entry--command {
  margin-bottom: 10px;
}

.command-line,
.prompt {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.prompt {
  margin-top: 8px;
}

.prompt--hidden {
  display: none;
}

.prompt__prefix,
.command-line__prefix {
  color: var(--prompt);
  user-select: none;
  flex: 0 0 auto;
}

.command-line__text {
  color: var(--command);
  min-height: 1.68em;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--command);
  caret-color: var(--command);
  line-height: inherit;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.prompt__input::placeholder {
  color: var(--muted);
}

.prompt--disabled .prompt__input {
  opacity: 0.45;
  pointer-events: none;
}

.output-block {
  white-space: normal;
}

.output-line {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.output-line--paragraph {
  white-space: normal;
}

.output-line--muted {
  color: var(--muted);
  font-size: 13px;
}

.output-line--help {
  white-space: pre-wrap;
}

.output-line--header {
  color: var(--header);
  font-weight: 700;
}

.output-line--linkish {
  color: var(--header);
}

.output-line--accent {
  color: var(--accent);
}

.output-line--string {
  color: var(--string);
}

.output-line--error {
  color: var(--error);
}

.output-line--banner {
  color: var(--header);
  overflow-x: auto;
  white-space: pre;
  padding-bottom: 2px;
  letter-spacing: 0.03em;
}

.inline-command,
.inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.inline-command {
  color: var(--accent);
  cursor: pointer;
}

.inline-link {
  color: var(--header);
  cursor: pointer;
}

.inline-command:hover,
.inline-command:focus-visible {
  color: #86efac;
  outline: none;
}

.inline-link:hover,
.inline-link:focus-visible {
  color: #60a5fa;
  outline: none;
}

.inline-link--header:hover,
.inline-link--header:focus-visible {
  color: #60a5fa;
}

@keyframes entry-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 12.5px;
    line-height: 1.58;
  }

  .shell {
    padding: 0;
  }

  .terminal__viewport {
    padding: 18px 12px 22px;
  }

  .terminal__content {
    width: 100%;
  }

  .command-line,
  .prompt {
    gap: 6px;
  }

  .prompt__prefix,
  .command-line__prefix {
    font-size: 11px;
  }

  .output-line--muted {
    font-size: 11px;
  }

  .output-line--help {
    font-size: 11px;
    line-height: 1.45;
  }

  .output-line--banner {
    display: block;
    font-size: 8px;
    line-height: 1.15;
    letter-spacing: 0.02em;
    padding-bottom: 10px;
  }
}

@media (max-width: 420px) {
  .output-line--banner {
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry {
    animation: none;
  }
}
