/* ---------- Colours, fonts, widths: edit these first ---------- */
:root {
  --bg: #f6f5f2;
  --text: #1c1c1a;
  --muted: #77756f;
  --line: #dedcd6;
  --accent: #1c1c1a;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --column: 34rem;   /* text width */
  --wide: 64rem;     /* top image width (includes side padding) */

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark mode follows the visitor's device setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --text: #ecebe6;
    --muted: #8f8d86;
    --line: #2e2d2a;
    --accent: #ecebe6;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* Everything except the top image stays in the narrow text column */
main > :not(.hero) {
  max-width: var(--column);
  margin-inline: auto;
}

/* ---------- Images ---------- */
figure { margin: 0 0 2.75rem; }
figure.inline { margin: 3.5rem auto 0; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

figcaption {
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Title and text ---------- */
h1 {
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}
p { margin: 0 0 1.15rem; }
p:last-of-type { margin-bottom: 0; }
a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Dates ---------- */
.dates { margin-top: 3.5rem; }
h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--muted);
}
ul { list-style: none; margin: 0; padding: 0; }
li {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
li:last-child { border-bottom: 1px solid var(--line); }
li time { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }
li .what small { display: block; color: var(--muted); font-size: 0.9rem; }
li a.signup {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
li a.signup:hover { text-decoration-thickness: 2px; }
.empty {
  display: none;
  color: var(--muted);
  font-size: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 3.5rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  main { padding-top: 1.5rem; }
  li { grid-template-columns: 1fr auto; }
  li time { grid-column: 1 / -1; }
}
