:root {
  --bg: #0e1117;
  --panel: #161b25;
  --border: #262d3a;
  --text: #e6e9ef;
  --muted: #9aa4b6;
  --accent: #5eead4;
  --ok: #34d399;
  --fail: #f87171;
  --radius: 12px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --border: #e2e5ea;
    --text: #1a1d23;
    --muted: #5c6675;
    --accent: #0d9488;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.site-header {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
}

.logo {
  display: block;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
}

h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.code-404 {
  font-size: 3.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

main {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.checks li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
}

.status[data-status="ok"] { color: var(--ok); }
.status[data-status="fail"] { color: var(--fail); }

.counter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.counter button {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.25rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.counter button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#count {
  min-width: 4rem;
  text-align: center;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.link-button {
  margin-top: 0.75rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
}

.hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.card p.back-link {
  margin-top: 1.25rem;
}

a {
  color: var(--accent);
}

code {
  padding: 0.1em 0.35em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85em;
}

.env {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}

.env dt { color: var(--muted); }
.env dd { margin: 0; word-break: break-all; }

footer {
  max-width: 720px;
  margin: 2rem auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

footer p { margin: 0.25rem 0; }

/* Bump the number in the footer to verify a redeploy actually shipped. */
.deploy-marker code {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .env { grid-template-columns: 1fr; gap: 0 0; }
  .env dd { margin-bottom: 0.5rem; }
}
