:root {
  color-scheme: light;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: #4a4a48;
  color: #f1f2eb;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #4a4a48;
}

.terminal {
  min-height: 100dvh;
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem;
  font-size: clamp(0.9rem, 1.7vw, 1.05rem);
  line-height: 1.65;
  letter-spacing: -0.02em;
  cursor: text;
}

.terminal__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  color: #d8dad3;
  font-size: 0.75em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1em;
}

.status-indicator i {
  display: block;
  width: 0.45em;
  height: 0.45em;
  background: #566246;
}

.status-indicator--active i {
  animation: status-light-1 1.6s steps(1, end) infinite;
}

.status-indicator--active i:nth-child(2) {
  animation-name: status-light-2;
}

.status-indicator--active i:nth-child(3) {
  animation-name: status-light-3;
}

.status-indicator--active i:nth-child(4) {
  animation-name: status-light-4;
}

.status-indicator--active i:nth-child(5) {
  animation-name: status-light-5;
}

.terminal__output {
  overflow-wrap: anywhere;
}

.terminal__line {
  margin: 0 0 0.7rem;
  white-space: pre-wrap;
}

.terminal__line--command {
  color: #a4c2a5;
}

.terminal__line--muted {
  color: #d8dad3;
}

.terminal__prompt {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-top: 0.7rem;
}

.prompt-prefix {
  flex: 0 0 auto;
  color: #a4c2a5;
  white-space: nowrap;
}

#command-input {
  width: 0;
  min-width: 0;
  flex: 0 0 auto;
  margin-left: 1ch;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f1f2eb;
  font: inherit;
  caret-color: transparent;
}

.cursor {
  width: 0.6ch;
  height: 1em;
  flex: 0 0 auto;
  background: currentColor;
  animation: blink 1s step-end infinite;
}

.terminal:not(:focus-within) .cursor {
  opacity: 0.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@keyframes status-light-1 {
  0%, 6.24%, 93.75%, 100% {
    background: #a4c2a5;
  }

  6.25%, 93.74% {
    background: #566246;
  }
}

@keyframes status-light-2 {
  6.25%, 18.74%, 81.25%, 93.74% {
    background: #a4c2a5;
  }

  0%, 6.24%, 18.75%, 81.24%, 93.75%, 100% {
    background: #566246;
  }
}

@keyframes status-light-3 {
  18.75%, 31.24%, 68.75%, 81.24% {
    background: #a4c2a5;
  }

  0%, 18.74%, 31.25%, 68.74%, 81.25%, 100% {
    background: #566246;
  }
}

@keyframes status-light-4 {
  31.25%, 43.74%, 56.25%, 68.74% {
    background: #a4c2a5;
  }

  0%, 31.24%, 43.75%, 56.24%, 68.75%, 100% {
    background: #566246;
  }
}

@keyframes status-light-5 {
  43.75%, 56.24% {
    background: #a4c2a5;
  }

  0%, 43.74%, 56.25%, 100% {
    background: #566246;
  }
}

@media (max-width: 600px) {
  .terminal {
    padding: 1.25rem;
  }

  .terminal__header {
    margin-bottom: 2rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .status-indicator--active i {
    animation: none;
  }
}
