:root {
  color-scheme: dark;
  --background: #100e17;
  --background-soft: #17141f;
  --text: #f4f1f6;
  --muted: #808080;
  --muted-dark: #5f5966;
  --pink: #ff5faf;
  --rose: #ff87af;
  --blush: #ffafd7;
  --mauve: #d787d7;
  --green: #87d787;
  --amber: #d7af5f;
  --red: #ff5f87;
  --blue: #87afd7;
  --line: #3a3046;
  --mono: "DejaVu Sans Mono", "SFMono-Regular", "Cascadia Code", Menlo,
    Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--pink);
  color: var(--background);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 5px 9px;
  transform: translateY(-160%);
  border: 1px solid var(--pink);
  background: var(--background);
  color: var(--text);
}

.skip-link:focus {
  transform: translateY(0);
}

.terminal {
  width: min(112ch, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0 60px;
}

.banner {
  margin-bottom: 30px;
}

.banner pre {
  margin: 0 0 9px;
  overflow-x: auto;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.05;
}

.banner pre span {
  display: block;
}

.banner strong {
  display: block;
  font-size: 15px;
}

.banner > span {
  color: var(--muted);
  font-size: 13px;
}

.pink,
.prompt {
  color: var(--pink);
}

.blush {
  color: var(--blush);
}

.mauve {
  color: var(--mauve);
}

.green {
  color: var(--green);
}

.amber {
  color: var(--amber);
}

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

.blue {
  color: var(--blue);
}

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

.session-output {
  min-height: 250px;
}

.cli-panel {
  position: relative;
  margin: 25px 0 27px;
  padding: 24px 17px 15px;
  border: 1px solid var(--mauve);
  border-radius: 5px;
}

.panel-title {
  position: absolute;
  top: -11px;
  left: 16px;
  display: flex;
  align-items: center;
  padding-right: 8px;
  background: var(--background);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.bird {
  display: inline-block;
  min-width: 58px;
  color: var(--pink);
  font-weight: 400;
  animation: perch 1.2s steps(1, end) infinite;
}

@keyframes perch {
  0%,
  49%,
  100% {
    transform: translateY(0);
  }
  50%,
  74% {
    transform: translateY(-1px);
  }
}

.cli-rows {
  display: grid;
  gap: 1px;
}

.cli-row {
  display: grid;
  grid-template-columns: 22ch minmax(0, 1fr);
  gap: 2ch;
  min-height: 27px;
  align-items: start;
}

.cli-row-key {
  color: var(--muted);
}

.cli-row-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status::before {
  content: "●";
  font-size: 11px;
}

.status.running {
  color: var(--pink);
}

.status.running::before {
  animation: pulse 1.25s steps(1, end) infinite;
}

.status.ok {
  color: var(--green);
}

.status.warning {
  color: var(--amber);
}

.status.failed {
  color: var(--red);
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.progress {
  display: grid;
  grid-template-columns: minmax(10ch, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.gauge {
  display: flex;
  height: 1em;
  overflow: hidden;
  color: var(--muted-dark);
  letter-spacing: 0;
  white-space: nowrap;
}

.gauge-fill {
  overflow: hidden;
  color: var(--pink);
}

.menu {
  display: grid;
}

.menu button {
  display: grid;
  grid-template-columns: 3ch 24ch minmax(0, 1fr);
  gap: 1ch;
  width: 100%;
  min-height: 30px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.menu button:hover,
.menu button:focus {
  outline: 0;
  background: rgba(255, 95, 175, 0.08);
}

.menu-number {
  color: var(--pink);
}

.menu-label {
  color: var(--text);
  font-weight: 700;
}

.menu-detail {
  color: var(--muted);
}

.command-echo {
  margin: 0 0 18px;
}

.command-echo .prompt {
  margin-right: 10px;
}

.output-heading {
  margin: 0 0 6px;
  font-weight: 700;
}

.output-note {
  margin: 6px 0;
  color: var(--muted);
}

.output-note.warning {
  color: var(--amber);
}

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

.plain-table-wrap {
  width: 100%;
  margin: 8px 0;
  overflow-x: auto;
}

.plain-table {
  width: 100%;
  min-width: 76ch;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

.plain-table th,
.plain-table td {
  padding: 7px 12px 7px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.plain-table th {
  color: var(--muted);
  font-weight: 400;
}

.plain-table td {
  color: var(--text);
}

.plain-table .numeric {
  text-align: right;
}

.plain-table .pending {
  color: var(--muted-dark);
}

.plain-table button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pink);
  text-align: left;
}

.plain-table button:hover,
.plain-table button:focus {
  outline: 0;
  text-decoration: underline;
}

.truth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.truth::before {
  content: "○";
  color: var(--muted);
}

.truth.yes {
  color: var(--green);
}

.truth.yes::before {
  content: "●";
  color: var(--green);
}

.truth.no {
  color: var(--muted);
}

.artifact-link {
  color: var(--pink);
  text-decoration: none;
}

.artifact-link:hover,
.artifact-link:focus {
  text-decoration: underline;
}

.next-command {
  margin: 18px 0 3px;
  color: var(--muted);
}

.next-command button,
.terminal-hint button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pink);
}

.next-command button:hover,
.terminal-hint button:hover {
  text-decoration: underline;
}

.command-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 22px;
}

.command-line label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.command-line .prompt {
  margin-right: 9px;
  font-size: 17px;
}

.command-line input {
  flex: 1;
  min-width: 2ch;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--pink);
}

.terminal-hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 680px) {
  body {
    font-size: 12px;
  }

  .terminal {
    width: calc(100% - 28px);
    padding-top: 25px;
  }

  .banner pre {
    font-size: 8px;
  }

  .banner > span {
    font-size: 11px;
  }

  .cli-panel {
    padding-inline: 12px;
  }

  .cli-row {
    grid-template-columns: 15ch minmax(0, 1fr);
    gap: 1ch;
  }

  .menu button {
    grid-template-columns: 2ch minmax(14ch, 1fr);
  }

  .menu-detail {
    display: none;
  }

  .command-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .command-line input {
    flex-basis: calc(100% - 12px);
    margin-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
