:root {
  color-scheme: light dark;
  --bg: #f7f3ec;
  --accent: #d9480f;
  --on-accent: #ffffff;
  --text: #2b2620;
  --muted: #6b6257;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130f;
    --accent: #ff7a45;
    --on-accent: #16130f;
    --text: #ece6dd;
    --muted: #a59b8e;
  }
}

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

body {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 1rem;
  text-align: center;
}

.week {
  display: block;
  min-height: 0.9em;
  color: var(--accent);
  font-size: clamp(7rem, min(42vw, 48dvh), 26rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

/* Keep the number clear of the TinyAdz corner card (measured 2026-12-02: 250-312 x 305 px,
   about 15 px from the bottom-right edges). On small screens the card would cover the number,
   so reserve its area; the card can be closed, which leaves the number slightly off-centre. */
@media (max-width: 640px) and (orientation: portrait) {
  main {
    padding-bottom: min(300px, 45dvh);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  main {
    padding-right: 270px;
  }
}

.caption {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 2.2vmin, 1.1rem);
  letter-spacing: 0.01em;
}

footer {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
}

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

footer a {
  text-decoration: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Text pages: privacy notice and 404 */
.prose {
  place-content: start center;
  justify-items: start;
  max-width: 38rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  text-align: left;
  line-height: 1.6;
}

.prose h1 {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 1.75rem;
}

.prose h2 {
  margin: 1.75rem 0 0.25rem;
  font-size: 1.05rem;
}

.prose p {
  margin: 0.5rem 0;
}
