:root {
  --bg: #07090c;
  --win: #0c0f13;
  --bar: #12161b;
  --fg: #cdd6df;
  --dim: #6c7683;
  --err: #ff7b72;
  --edge: rgba(255, 255, 255, .08);
  --a1: #7ee787;
  --a2: #4fd1c5;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", "Segoe UI Mono", Consolas,
    "Liberation Mono", "DejaVu Sans Mono", monospace;
  color-scheme: dark;
}
.sm { --a1: #7ee787; --a2: #4fd1c5; }
.tw { --a1: #f5b971; --a2: #f2789f; }

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--fg);
  background: var(--bg);
  background:
    radial-gradient(60rem 36rem at 12% -8%, color-mix(in srgb, var(--a1) 12%, transparent), transparent 70%),
    radial-gradient(50rem 34rem at 105% 108%, color-mix(in srgb, var(--a2) 9%, transparent), transparent 70%),
    var(--bg);
  font: 14.5px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.win {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  height: min(640px, calc(100vh - 48px));
  height: min(640px, calc(100dvh - 48px));
  background: var(--win);
  border: 1px solid var(--edge);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .5),
    0 30px 90px -25px rgba(0, 0, 0, .85),
    0 0 90px -40px var(--a1);
  overflow: hidden;
}

.win::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .02) 0 1px, transparent 1px 3px);
}

.bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  background: var(--bar);
  border-bottom: 1px solid var(--edge);
  color: var(--dim);
  font-size: 12.5px;
  user-select: none;
  -webkit-user-select: none;
}
.dots { display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.title {
  position: absolute;
  left: 84px;
  right: 84px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px 20px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #2b323b transparent;
  cursor: text;
  text-shadow: 0 0 6px color-mix(in srgb, currentColor 22%, transparent);
}

#out > div, .line {
  min-height: 1.5em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.line { position: relative; }
.line[hidden] { display: none; }
#cmd {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1.5em;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  pointer-events: none;
}
.host, .acc, .k { color: var(--a1); }
.sig { color: var(--a2); }
.dim { color: var(--dim); }
.err { color: var(--err); }

.cur {
  background: var(--a1);
  color: var(--win);
  text-shadow: none;
  animation: blink 1.1s steps(1, end) infinite;
}
.blurred .cur {
  background: none;
  color: inherit;
  box-shadow: inset 0 0 0 1px var(--a1);
  animation: none;
}
@keyframes blink { 55% { background: none; color: inherit; } }

a {
  color: var(--a2);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
a:hover, a:focus-visible { text-decoration-style: solid; outline: none; }

.chip {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--a1);
  font: inherit;
  text-shadow: inherit;
  cursor: pointer;
  text-decoration: underline dotted color-mix(in srgb, var(--a1) 50%, transparent);
  text-underline-offset: 3px;
}
.chip:hover, .chip:focus-visible {
  color: var(--fg);
  text-decoration-color: var(--fg);
  outline: none;
}

#out > .nf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .6em 4ch;
  margin: .35em 0 .9em;
  white-space: normal;
}
.logo {
  margin: .1em 0 0;
  font: inherit;
  line-height: 1;
  color: var(--a1);
  background: linear-gradient(150deg, var(--a1) 15%, var(--a2) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--a1) 30%, transparent));
}
.info > div { white-space: pre-wrap; }
.sw { margin-top: .6em; text-shadow: none; }
.c0 { color: #3b4350; }
.c1 { color: #ff7b72; }
.c2 { color: #7ee787; }
.c3 { color: #e3b341; }
.c4 { color: #79c0ff; }
.c5 { color: #d2a8ff; }
.c6 { color: #56d4dd; }
.c7 { color: #e6edf3; }

::selection { background: color-mix(in srgb, var(--a1) 30%, transparent); }

.probe {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
}

noscript p { margin: 0 0 .5em; }

@media (max-width: 640px) {
  body { display: block; padding: 0; font-size: 13.5px; }
  .win {
    position: fixed;
    top: var(--vvt, 0px);
    left: 0;
    right: 0;
    width: auto;
    height: 100vh;
    height: var(--vvh, 100dvh);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .bar { height: 34px; }
  .title { left: 70px; right: 14px; text-align: right; }
  .screen { padding: 12px 14px 16px; }
}

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