:root {
  --bg: #f7f7f5;
  --text: #1f1d1a;
  --muted: #5f5a52;
  --card: #ffffff;
  --line: #cfd3dc;
  --accent: #2f46c8;
  --on-accent: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --text: #e9ecf2;
    --muted: #9aa3b5;
    --card: #171b24;
    --line: #333b4d;
    --accent: #8fa2ff;
    --on-accent: #0f1218;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  text-align: center;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
}

.label {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.9rem 0.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* Digits of equal width, so the boxes do not wobble as the numbers change. */
.num {
  font-size: clamp(1.6rem, 8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.cap {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demo-note {
  margin: 1.5rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn {
  min-height: 2.5rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
