:root {
  --background: #f2f0eb;
  --foreground: #151515;
  --muted: #5f5a54;
  --border: #d0cbc3;
}

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

html {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  color: var(--foreground);
  background: var(--background);
}

body {
  margin: 0;
  min-height: 100vh;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3rem);
}

.site-label {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown-shell {
  max-width: 72rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.countdown-unit {
  padding: clamp(1rem, 2vw, 1.5rem) 0;
}

.countdown-unit + .countdown-unit {
  border-left: 1px solid var(--border);
  padding-left: clamp(1rem, 2vw, 1.5rem);
}

.countdown-value {
  display: block;
  font-size: clamp(3.5rem, 10vw, 8.75rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
}

.countdown-label {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.target-description,
.completion-message,
.noscript-message,
.error-message {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.completion-message {
  color: var(--foreground);
}

.error-layout {
  justify-content: center;
}

.error-block {
  max-width: 36rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.error-code {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-title {
  margin: 0.4rem 0 0;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 0.95;
}

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

@media (max-width: 820px) {
  .layout {
    justify-content: flex-start;
    padding-top: 3rem;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown-unit {
    padding-right: 1rem;
  }

  .countdown-unit:nth-child(2n + 1) {
    padding-left: 0;
    border-left: 0;
  }

  .countdown-unit:nth-child(2n) {
    border-left: 1px solid var(--border);
    padding-left: 1rem;
  }

  .countdown-unit:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .countdown-unit + .countdown-unit {
    padding-left: 0;
  }
}

@media (max-width: 540px) {
  .countdown-value {
    font-size: clamp(3rem, 18vw, 5rem);
  }
}

