/* ==========================================================================
   events.css — the only styles main.css does not already provide for /events.
   Loaded after main.css, so every :root token is available.

   Scope rule (same as gallery.css): if a rule here would be useful on a second
   page, it belongs in main.css instead. Everything else on the page — chips,
   the empty state, the notice, headings, containers — reuses main.css classes
   unchanged.

   The kind chips carry .chip plus one of the eight existing .chip--* hues, so
   there are no colour rules here at all. public/js/events.js owns that mapping;
   this file only sizes and spaces the chip. Adding a hue for an event kind would
   mean opening the closed chip vocabulary in main.css, which is exactly what the
   reuse avoids.
   ========================================================================== */

/* ------------------------------------------------------------ month groups */

.event-groups {
  margin-top: var(--space-lg);
}

.event-groups > * + * {
  margin-top: var(--space-lg);
}

.event-month__title {
  margin: 0 0 var(--space-sm);
  padding-bottom: var(--space-2xs);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.event-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-list > * + * {
  margin-top: var(--space-xs);
}

/* -------------------------------------------------------------- event rows */

.event {
  display: grid;
  gap: var(--space-2xs) var(--space-md);
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color var(--transition);
}

.event:hover,
.event:focus-within {
  border-color: var(--border-strong);
}

/* The when-column sits alongside the body once there is room for it. Below the
   breakpoint the row stacks, which is why the time comes first in the DOM. */
@media (min-width: 720px) {
  .event {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    align-items: start;
  }
}

.event__when {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--accent);
}

/* The dash between the two ends of a range; the whitespace around it is in the
   text node, so this only needs to mute it. */
.event__range-sep {
  color: var(--text-dim);
}

.event__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  min-width: 0;
}

.event__chip {
  align-self: start;
  margin-bottom: var(--space-3xs);
}

.event__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.event__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}

.event__title a:hover {
  color: var(--accent);
}

.event__summary {
  margin: 0;
  color: var(--text-muted);
}

/* The editorial payload — whether it is actually worth going outside for. */
.event__note {
  margin: 0;
  padding-left: var(--space-2xs);
  border-left: 2px solid var(--accent-line);
  color: var(--text-dim);
  font-size: var(--step--1);
  line-height: 1.6;
}

.event__meta {
  margin: var(--space-3xs) 0 0;
  font-size: var(--step--1);
}

.event__object {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}

.event__object:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-line);
}
