@font-face {
  font-family: Onest;
  src: url('/fonts/onest-variable.woff2') format('woff2'),
       url('/fonts/onest-variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --background: #fff;
  --surface: #f5f6f7;
  --text: #17191d;
  --muted: #555d67;
  --border: #e2e5e9;
  --accent: #b51d3a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #17191d;
    --surface: #252830;
    --text: #f5f5f6;
    --muted: #c3c6ce;
    --border: #424650;
    --accent: #ff8398;
  }
}

.event-catalog {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.5 Onest, system-ui, sans-serif;
}

.event-catalog a {
  color: inherit;
  text-underline-offset: .18em;
}

.event-catalog a:hover { color: var(--accent); }
.event-catalog a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.event-catalog__header {
  border-bottom: 1px solid var(--border);
  padding: .9rem max(1rem, calc((100% - 46rem) / 2));
  font-weight: 650;
}

.event-catalog main {
  width: min(46rem, calc(100% - 2rem));
  margin: 1.75rem auto 3rem;
}

.event-catalog h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
}

.event-catalog ul { list-style: none; margin: 0; padding: 0; }
.event-catalog__items { border-top: 1px solid var(--border); }
.event-catalog__items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}
.event-catalog__items a { overflow-wrap: anywhere; }
.event-catalog time { color: var(--muted); font-size: .875rem; }

.event-catalog__pagination { display: flex; flex-wrap: wrap; gap: .4rem; }
.event-catalog nav { margin-top: 1.25rem; }
.event-catalog__pagination a, .event-catalog__pagination span {
  display: grid;
  place-items: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: .5rem;
  background: var(--surface);
}
.event-catalog__pagination [aria-current] {
  background: var(--text);
  color: var(--background);
  font-weight: 650;
}

@media (max-width: 32rem) {
  .event-catalog__items li { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
}
