:root {
  --bg: #000;
  --fg: #fff;
  --line: #5c5c5c;
  --font: "JetBrains Mono", "Fira Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

.screen {
  min-height: 100vh;
  max-width: 76ch;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(32px + env(safe-area-inset-bottom, 0px));
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  margin-bottom: 16px;
  color: var(--fg);
}

.status h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.credit {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.credit p { margin: 0; }

.credit a {
  color: var(--fg);
  text-underline-offset: 3px;
}

.credit a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.status svg { width: 28px; height: 28px; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.output {
  margin: 0 0 28px;
  font: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.output::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}

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

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  text-align: left;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
}

.choice .key {
  flex: none;
  min-width: 2ch;
  font-weight: 700;
}

.choice .label { flex: 1; }

.choice svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
}

.choice:hover,
.choice:focus-visible {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
  outline: none;
}

.choice:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* Desktop */
@media (min-width: 768px) {
  html, body { font-size: 18px; }

  .screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 80ch;
    padding: 48px 40px;
  }

  .status { margin-bottom: 28px; }
  .status svg { width: 32px; height: 32px; }
  .output { margin-bottom: 36px; }
  .choice { padding: 14px 18px; }
}

@media (min-width: 1200px) {
  html, body { font-size: 20px; }
  .screen { max-width: 84ch; }
}

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