:root {
  color-scheme: dark;
  --bg: #080b0d;
  --ink: #e8e6df;
  --muted: #8c989e;
  --cyan: #35d7e7;
  --red: #f07878;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--bg);
}

.terminal {
  width: min(100% - 2rem, 82ch);
  margin: 0;
  padding: 2rem 0 5rem 1rem;
  font-size: clamp(0.82rem, 2.8vw, 1rem);
  line-height: 1.6;
}

.command {
  margin-top: 2rem;
  color: var(--cyan);
  font-weight: 700;
}

.command:first-child {
  margin-top: 0;
}

.output {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.strong {
  font-weight: 700;
}

.table {
  margin-top: 0.25rem;
}

.table [role="row"] {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.45fr) minmax(0, 1fr);
  column-gap: 1rem;
}

.table [role="cell"]:first-child,
.listing > span:first-child,
.link-line {
  color: var(--muted);
}

.negative {
  color: var(--red);
}

.listing {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.75rem;
}

.listing > span:last-child {
  grid-column: 2;
  color: var(--muted);
}

a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

a:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

.link-line a {
  margin-left: 0.75rem;
}

.prompt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cursor {
  display: inline-block;
  width: 0.62em;
  height: 1.15em;
  background: var(--cyan);
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  0%, 46% { opacity: 1; }
  47%, 100% { opacity: 0; }
}

@media (min-width: 48rem) {
  .terminal {
    padding-top: 4rem;
    padding-left: 3rem;
  }

  .listing {
    grid-template-columns: 9ch minmax(0, 1fr) auto;
  }

  .listing > span:last-child {
    grid-column: auto;
  }
}

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