/* Neutral background and text; the accent follows the season, which main.js sets as data-season.
   Without it (other pages, or no JavaScript) the accent is the slate of the static icons. */
:root {
  color-scheme: light dark;
  --bg: #f6f6f3;
  --text: #23262b;
  --muted: #63666d;
  --accent: #26384a;
  --on-accent: #ffffff;
}

:root[data-season="winter"] { --accent: #2a6f97; }
:root[data-season="spring"] { --accent: #3b873e; }
:root[data-season="summer"] { --accent: #a87400; }
:root[data-season="autumn"] { --accent: #4f5aa8; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --text: #e9e9e6;
    --muted: #a2a5ab;
    --accent: #a9bccf;
    --on-accent: #131416;
  }

  :root[data-season="winter"] { --accent: #a3d5f0; }
  :root[data-season="spring"] { --accent: #7fd08a; }
  :root[data-season="summer"] { --accent: #f4c430; }
  :root[data-season="autumn"] { --accent: #9ea8f2; }
}

html, body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* The number and the footer links fill the first screen; anything after it is below the fold. */
.screen {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
}

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

.season-icon {
  display: none;
  width: clamp(2rem, 7vmin, 3.25rem);
  height: auto;
  margin-bottom: 0.5rem;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-season="winter"] .season-icon[data-for="winter"],
:root[data-season="spring"] .season-icon[data-for="spring"],
:root[data-season="summer"] .season-icon[data-for="summer"],
:root[data-season="autumn"] .season-icon[data-for="autumn"] {
  display: block;
}

.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;
}

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

.more {
  max-width: 38rem;
  margin: 0 auto;
  /* clearance.js sets --card-room where the text has to scroll above the ad card. */
  padding: 2rem 1.25rem calc(3rem + var(--card-room, 0px));
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.more h2 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.05rem;
}

.more p {
  margin: 0.5rem 0;
}

/* clearance.js moves the footer links to the top when the ad card's corner would cover them. */
.screen.links-top {
  grid-template-rows: auto 1fr;
}

.links-top footer {
  order: -1;
}

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

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

footer a {
  text-decoration: none;
}

footer a + a {
  margin-left: 0.9rem;
}

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: about, privacy notice and 404 */
.prose {
  display: block;
  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;
}
