:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --accent: #1c1917;
  --accent-fg: #fafaf9;
  --ring: #a8a29e;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --fg: #f5f5f4;
    --muted: #a8a29e;
    --accent: #f5f5f4;
    --accent-fg: #0c0a09;
    --ring: #57534e;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--fg);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  max-width: 32ch;
}

.go {
  display: inline-block;
  padding: 18px 36px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 120ms ease,
    opacity 120ms ease;
}

.go:hover {
  transform: translateY(-1px);
}

.go:active {
  transform: translateY(1px) scale(0.99);
}

.go:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 4px;
}

.hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--ring);
  border-radius: 4px;
  font: inherit;
  font-size: 0.8em;
}

.recent {
  margin-top: 40px;
  width: min(100%, 36ch);
  text-align: left;
}

.recent h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid color-mix(in srgb, var(--ring) 35%, transparent);
  font-size: 0.95rem;
}

.recent a {
  color: var(--fg);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent a:hover,
.recent a:focus-visible {
  text-decoration: underline;
}

.recent button,
.recent a.report {
  flex: none;
  padding: 2px 8px;
  border: 1px solid var(--ring);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.recent button:hover,
.recent button:focus-visible,
.recent a.report:hover,
.recent a.report:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
  text-decoration: none;
}

.recent button:focus-visible,
.recent a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.recent button[disabled] {
  cursor: default;
  opacity: 0.7;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

footer .brand {
  color: var(--fg);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .go {
    transition: none;
  }
  .go:hover,
  .go:active {
    transform: none;
  }
}
