/* ==========================================================================
   Michigan Public Health — Calendar of Events
   Shipped stylesheet (index.php + event.php)

   Visual language is inherited from the Career Outcomes page: UM blue
   hero bands, a maize rule, spring-wood surfaces, Playfair for editorial
   voice and Nunito Sans for data. Layout and the list -> detail pattern
   follow the Lincoln College events reference, adapted for our volume
   (~75 upcoming events, up to 8 on a single day) by grouping by day.

   Everything is prefixed `ev-` so it can sit inside the SPH template
   without colliding with Bootstrap or main.css.

   Section map:
     1.  Tokens
     2.  Base + layout primitives
     3.  Type + small parts (eyebrow, rule, chips, buttons, icons)
     4.  Index hero
     5.  Filter bar
     6.  Coming up (featured cards)
     7.  Month / day / event list
     8.  Event card + inline preview
     9.  Empty state + CTA band
     10. Detail hero
     11. Detail body + facts card
     12. Related events
     13. Reduced motion / print
   ========================================================================== */


/* 1. TOKENS -------------------------------------------------------------- */
.ev-page {
  /* Brand — same values the SPH template publishes */
  --um-blue: #00274c;
  --um-maize: #ffcb05;
  --azure: #2f65a7;
  --light-blue: #d6e1ee;
  --spring-wood: #f4f1ea;

  /* Ink */
  --ink: #131516;
  --ink-2: #4a5158;
  --ink-3: #5f676f;
  --ink-invert: #ffffff;
  --ink-invert-2: rgba(255, 255, 255, 0.8);

  /* Surfaces */
  --surface: #ffffff;
  --surface-alt: var(--spring-wood);
  --surface-dark: var(--um-blue);
  --surface-deep: #031d36;
  --rule: rgba(0, 39, 76, 0.14);
  --rule-strong: rgba(0, 39, 76, 0.28);
  --rule-invert: rgba(255, 255, 255, 0.18);

  /* State */
  --danger: #b3261e;
  --danger-bg: #fbe9e7;
  --warn-bg: #fff4cc;

  /* Type */
  --font-sans: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  /* Date numerals: lining digits that don't depend on OpenType (see DATE NUMERALS) */
  --font-date: "EV Date Numerals", "Playfair Display", Georgia, serif;

  /* Layout — wider than career outcomes; the list wants the room */
  --live-area: 1320px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0, 39, 76, 0.06), 0 6px 24px rgba(0, 39, 76, 0.07);
  --shadow-lift: 0 2px 4px rgba(0, 39, 76, 0.08), 0 14px 36px rgba(0, 39, 76, 0.14);

  /* Height of the sticky filter bar, measured by JS so the day rail can
     stick just beneath it. Falls back to a sensible guess. */
  --ev-bar-h: 5.5rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
}


/* 2. BASE + LAYOUT ------------------------------------------------------- */
.ev-page *,
.ev-page *::before,
.ev-page *::after { box-sizing: border-box; }

.ev-page img { max-width: 100%; height: auto; display: block; }
.ev-page a { color: var(--azure); text-underline-offset: 0.18em; }
.ev-page a:hover { color: var(--um-blue); }
.ev-page :focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; border-radius: 2px; }
.ev-page [hidden] { display: none !important; }

/* #maincontent is the target of the site's "Skip to content" link. It takes
   focus (tabindex="-1") so keyboard and screen-reader users really land
   there, but a focus ring around the whole page would just be noise. */
.ev-page .ev-shell:focus,
.ev-page .ev-shell:focus-visible { outline: none; }

/* SITE CSS RESET -----------------------------------------------------------
   The SPH stylesheet (Bootstrap 4 + main.css) styles bare elements: every
   h1-h6 gets Playfair, a colour and a 1.5rem bottom margin, h4 is also
   uppercase azure, p gets line-height 1.5, labels get a bottom margin.
   :where() keeps this reset at single-class weight, so each component's own
   rules (also single-class, later in the file) still win over it. */
.ev-page :where(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  font-family: var(--font-sans);
  font-size: inherit;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}
.ev-page :where(ul, ol, dl, p, figure) { margin-top: 0; }
.ev-page :where(p) { line-height: inherit; }
.ev-page :where(dd) { margin-left: 0; }
.ev-page :where(label) { margin-bottom: 0; }
.ev-page hr.ev-rule { border: 0; opacity: 1; }

/* main.css has `p:last-of-type { margin-bottom: 0 }`. That selector is
   heavier (element + pseudo-class) than one class, so it beats a component's
   own margin on whichever paragraph happens to be last in its parent. These
   restate the bottom margins with the .ev-page prefix (two classes) so they
   win. Keep them in step with the component rules below. */
.ev-page .ev-eyebrow { margin-bottom: 0.875rem; }
.ev-page .ev-hero__lede { margin-bottom: 2rem; }
.ev-page .ev-banner { margin-bottom: 2rem; }
.ev-page .ev-card__excerpt { margin-bottom: 1rem; }
.ev-page .ev-card__host { margin-bottom: 1.25rem; }
.ev-page .ev-empty p { margin-bottom: 1.5rem; }
.ev-page .ev-cta__item p { margin-bottom: 1.25rem; }
.ev-page .ev-prose p { margin-bottom: 1.25em; }

.ev-inner {
  width: min(100% - (var(--gutter) * 2), var(--live-area));
  margin-inline: auto;
}

.ev-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}


/* 3. TYPE + SMALL PARTS -------------------------------------------------- */
.ev-eyebrow {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azure);
  margin: 0 0 0.875rem;
}

.ev-rule {
  width: 88px;
  height: 4px;
  background: var(--um-maize);
  border: 0;
  margin: 0 0 1.75rem;
}

.ev-h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--um-blue);
  margin: 0;
}

/* Icons — inline SVG from the sprite in the page */
.ev-icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}

/* Chips */
.ev-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.4em 0.65em;
  border-radius: 999px;
  background: var(--light-blue);
  color: var(--um-blue);
  white-space: nowrap;
}
.ev-chip .ev-icon { font-size: 1.1em; }
.ev-chip--quiet { background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-2); }
.ev-chip--maize { background: var(--um-maize); color: var(--um-blue); }
.ev-chip--cpe { background: #e6f2ea; color: #1d5b33; }
.ev-chip--danger { background: var(--danger-bg); color: var(--danger); }
.ev-chip--warn { background: var(--warn-bg); color: #6b4e00; }
.ev-chip--invert { background: rgba(255, 255, 255, 0.12); color: var(--ink-invert); }

/* Buttons */
.ev-btn {
  --btn-bg: var(--um-blue);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.ev-page a.ev-btn { color: var(--btn-fg); }
.ev-btn:hover { --btn-bg: var(--azure); }
.ev-page a.ev-btn:hover { color: var(--btn-fg); }
.ev-btn .ev-icon { font-size: 1.05em; }

.ev-btn--maize { --btn-bg: var(--um-maize); --btn-fg: var(--um-blue); }
.ev-btn--maize:hover { --btn-bg: #fff; }

.ev-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--um-blue);
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
}
.ev-btn--ghost:hover { --btn-bg: var(--surface); --btn-fg: var(--um-blue); box-shadow: inset 0 0 0 1.5px var(--um-blue); }

.ev-btn--ghost-invert {
  --btn-bg: transparent;
  --btn-fg: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}
.ev-btn--ghost-invert:hover { --btn-bg: rgba(255, 255, 255, 0.1); --btn-fg: #fff; box-shadow: inset 0 0 0 1.5px #fff; }

.ev-btn--block { width: 100%; }

.ev-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 800;
  text-decoration: none;
}
.ev-arrow-link .ev-icon { transition: transform 0.25s var(--ease); }
.ev-arrow-link:hover .ev-icon { transform: translateX(3px); }


/* DATE NUMERALS
   Playfair's default figures are old-style: 3, 4, 5, 7 and 9 drop below the
   baseline and collide with the month label underneath. Switching to lining
   figures with `font-variant-numeric` needs the font's OpenType `lnum`
   feature, and the SPH server's Playfair webfont was subset without it. (A
   copy of Playfair installed on a laptop has it, which is why dates looked
   right locally and wrong on the server.)

   So the date numerals (--font-date) load "EV Date Numerals": Playfair Display Bold's
   lining digits made the default shapes, 0-9 only, ~3.6 KB. unicode-range
   means it's only fetched for digits; anything else falls through to
   Playfair. Built by scripts/make-date-font.py (SIL OFL; see fonts/OFL.txt). */
@font-face {
  font-family: "EV Date Numerals";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ev-date-numerals.woff2") format("woff2");
  unicode-range: U+0030-0039;
}
/* The hero stats are Nunito Sans; equal-width digits stop them jittering
   while they count up */
.ev-stat dd { font-variant-numeric: lining-nums tabular-nums; }


/* 4. INDEX HERO ---------------------------------------------------------- */
.ev-hero {
  position: relative;
  background: var(--surface-dark);
  color: var(--ink-invert);
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}
/* A quiet calendar-grid texture, so the band isn't a flat slab. Pure CSS,
   fades out toward the copy. */
.ev-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 45%;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40%);
          mask-image: linear-gradient(to right, transparent, #000 40%);
}
.ev-hero .ev-eyebrow { color: var(--um-maize); }

.ev-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.ev-hero__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  max-width: 12ch;
}
.ev-hero__lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
  color: var(--ink-invert-2);
  max-width: 52ch;
  margin: 0 0 2rem;
}
.ev-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}
.ev-hero__actions .ev-arrow-link { color: var(--ink-invert); }
.ev-hero__actions .ev-arrow-link:hover { color: var(--um-maize); }

/* Hero entrance (driven by events.js + GSAP, same moves as Career Outcomes).
   Each title line sits in its own mask so it can rise into view. */
.ev-hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.ev-hero__line > span { display: block; }
.ev-hero .ev-rule { transform-origin: left center; }

/* Start states. Only while <html> has .ev-motion, which the inline head
   script sets before first paint (never for reduced-motion visitors) and
   events.js removes if GSAP doesn't show up. */
.ev-motion .ev-page .ev-hero__line > span,
.ev-motion [data-ev-hero] .ev-rule,
.ev-motion .ev-page [data-ev-in] { opacity: 0; }

/* Failsafe: if events.js never runs at all, reveal after 3s anyway.
   events.js adds .ev-motion-ready the moment it starts, which cancels this. */
.ev-motion:not(.ev-motion-ready) .ev-page .ev-hero__line > span,
.ev-motion:not(.ev-motion-ready) [data-ev-hero] .ev-rule,
.ev-motion:not(.ev-motion-ready) .ev-page [data-ev-in] { animation: ev-failsafe 0.4s 3s forwards; }
@keyframes ev-failsafe { to { opacity: 1; } }

/* Stats — the data preview the old page never gave */
.ev-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule-invert);
}
.ev-stat {
  padding: 1.25rem 1rem 0 0;
}
.ev-stat + .ev-stat { padding-left: 1.25rem; border-left: 1px solid var(--rule-invert); }
.ev-stat dt {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-invert-2);
  margin: 0 0 0.35rem;
}
.ev-stat dd {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.ev-stat a { color: inherit; text-decoration: none; }
.ev-stat a:hover { color: var(--um-maize); }


/* 5. FILTER BAR ---------------------------------------------------------- */
.ev-filters {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.25s var(--ease);
}
.ev-filters.is-stuck { box-shadow: 0 8px 24px rgba(0, 39, 76, 0.1); }

.ev-filters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-block: 1rem;
}

/* Upcoming / Past */
.ev-modes {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.ev-modes a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 800;
  text-decoration: none;
}
.ev-page .ev-modes a { color: var(--ink-2); }
.ev-page .ev-modes a:hover { color: var(--um-blue); background: var(--surface); }
.ev-page .ev-modes a[aria-current="page"] { background: var(--um-blue); color: #fff; }

.ev-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}
.ev-search .ev-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.ev-search input {
  width: 100%;
  min-height: 46px;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.ev-search input::placeholder { color: var(--ink-3); }
.ev-search input:focus { outline: none; border-color: var(--azure); box-shadow: 0 0 0 3px rgba(47, 101, 167, 0.2); }

.ev-filters__toggle { display: none; }

.ev-filters__selects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 10 1 auto;
}

.ev-select { position: relative; flex: 1 1 150px; min-width: 0; }
.ev-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 0.625rem 2.25rem 0.625rem 0.875rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-overflow: ellipsis;
}
.ev-select select:focus { outline: none; border-color: var(--azure); box-shadow: 0 0 0 3px rgba(47, 101, 167, 0.2); }
/* An active filter reads as "on" at a glance */
.ev-select.is-active select { border-color: var(--um-blue); background: var(--light-blue); }
.ev-select .ev-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--um-blue);
}

/* Online / in person segmented control */
.ev-seg {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--rule);
  border: 0;
  margin: 0;
}
.ev-seg legend { padding: 0; }
.ev-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ev-seg label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 40px;
  padding: 0 0.875rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.ev-seg input:checked + label { background: var(--um-blue); color: #fff; }
.ev-seg input:focus-visible + label { outline: 3px solid var(--azure); outline-offset: 1px; }

.ev-filters__submit { flex: none; }
.ev-js .ev-filters__submit { display: none; }

/* Active filter summary */
.ev-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-bottom: 0.875rem;
  margin-top: -0.25rem;
  font-size: 0.9375rem;
}
.ev-active__count { font-weight: 800; color: var(--um-blue); margin: 0; }
.ev-active__list { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.ev-active__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 30px;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--um-blue);
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}
.ev-active__pill:hover { background: var(--azure); }
.ev-active__pill .ev-icon { font-size: 0.875em; }
.ev-page a.ev-active__clear { color: var(--azure); }
.ev-active__clear {
  border: 0;
  background: none;
  padding: 0.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--azure);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}


/* 6. COMING UP (feature cards) ------------------------------------------- */
.ev-featured { padding-block: clamp(2.5rem, 5vw, 4rem) 0; }
.ev-featured__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ev-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ev-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.ev-feature:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.ev-feature__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--um-blue);
  overflow: hidden;
}
.ev-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.ev-feature:hover .ev-feature__media img { transform: scale(1.04); }
/* No flyer: a typographic date tile instead of an empty box */
.ev-feature__tile {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1.5rem;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(47, 101, 167, 0.55), transparent 60%),
    var(--um-blue);
}
.ev-feature__tile-num {
  font-family: var(--font-date);
  font-weight: 700;
  font-size: 4.5rem;
  line-height: 1;
  margin-bottom: 0.375rem;
}
.ev-feature__tile-mon {
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--um-maize);
}
.ev-feature__date {
  position: absolute;
  left: 1rem;
  top: 1rem;
}
.ev-feature__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}
.ev-feature__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3125rem;
  line-height: 1.25;
  margin: 0;
}
.ev-feature__title a { color: var(--um-blue); text-decoration: none; }
/* Whole card is the hit area, title stays the accessible link */
.ev-feature__title a::after { content: ""; position: absolute; inset: 0; }
.ev-feature__title a:hover { color: var(--azure); }
.ev-feature__meta {
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.ev-feature__meta li { display: flex; gap: 0.5em; align-items: baseline; }
.ev-feature__meta .ev-icon { color: var(--azure); }


/* 7. MONTH / DAY / LIST -------------------------------------------------- */
.ev-results { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem); }

.ev-month + .ev-month { margin-top: clamp(3rem, 6vw, 4.5rem); }
.ev-month__head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0 0 1.75rem;
}
.ev-month__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.4vw, 2.625rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--um-blue);
  margin: 0;
  white-space: nowrap;
}
.ev-month__title span { color: var(--ink-3); font-weight: 400; }
/* The Lincoln-style rule that runs out to the edge */
.ev-month__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-strong);
}
.ev-month__count {
  order: 3;
  flex: none;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
}

.ev-day {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0 clamp(1rem, 3vw, 2.5rem);
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}
.ev-day:first-of-type { border-top: 0; padding-top: 0; }

.ev-day__date {
  position: sticky;
  top: calc(var(--ev-bar-h) + 1.25rem);
  align-self: start;
  display: grid;
  grid-template-columns: auto;
  justify-items: start;
  line-height: 1;
  color: var(--um-blue);
  margin: 0;
  font-weight: 400;
}
.ev-day__dow {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.ev-day__num {
  font-family: var(--font-date);
  font-weight: 700;
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0.15rem 0 0.1rem;
}
.ev-day__mon {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ev-day__flag { margin-top: 0.625rem; }

.ev-day__events {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}


/* 8. EVENT CARD + PREVIEW ------------------------------------------------ */
.ev-card {
  display: grid;
  /* Fixed meta + action tracks so the time/place column lines up down the
     whole list regardless of button label ("Register" vs "More info"). */
  grid-template-columns: minmax(0, 1fr) 18rem 16.5rem;
  grid-template-areas:
    "main meta actions"
    "preview preview preview";
  column-gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid transparent;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.ev-card:hover,
.ev-card.is-open { box-shadow: var(--shadow-lift); border-left-color: var(--um-maize); }

.ev-card__main { grid-area: main; min-width: 0; }
.ev-card__main .ev-chips { margin-bottom: 0.5rem; }
.ev-card__title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.1875rem;
  line-height: 1.3;
  margin: 0;
  text-wrap: pretty;
}
.ev-card__title a { color: var(--um-blue); text-decoration: none; }
.ev-card__title a:hover { color: var(--azure); text-decoration: underline; }
.ev-card__notes {
  margin: 0.3rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.ev-meta li { display: flex; gap: 0.55em; align-items: baseline; }
.ev-meta li + li { margin-top: 0.35rem; }
.ev-meta .ev-icon { color: var(--azure); transform: translateY(0.1em); }
.ev-meta strong { color: var(--ink); font-weight: 700; }
.ev-card__meta { grid-area: meta; }

.ev-card__actions {
  grid-area: actions;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
/* Never squeeze a button narrower than its label */
.ev-card__actions > * { flex: none; }

/* Preview toggle is a JS-only affordance */
.ev-card__peek { display: none; }
.ev-js .ev-card__peek { display: inline-flex; }
.ev-card__peek .ev-icon { transition: transform 0.3s var(--ease); }
.ev-card__peek[aria-expanded="true"] .ev-icon { transform: rotate(180deg); }

.ev-card__preview { grid-area: preview; display: none; }
.ev-js .ev-card__preview {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
.ev-js .ev-card.is-open .ev-card__preview { grid-template-rows: 1fr; }
.ev-card__preview-inner { overflow: hidden; min-height: 0; }
.ev-card__preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.ev-card__preview-body.no-flyer { grid-template-columns: minmax(0, 1fr); }
.ev-card__excerpt {
  margin: 0 0 1rem;
  font-size: 0.9875rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 72ch;
}
.ev-card__host { margin: 0 0 1.25rem; font-size: 0.875rem; color: var(--ink-3); }
.ev-card__host strong { color: var(--ink-2); }
.ev-card__preview-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-start; }
/* keep the text link level with the button when the menu opens below it */
.ev-card__preview-actions .ev-arrow-link { min-height: 44px; }
.ev-card__flyer {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--rule);
  align-self: start;
}

/* Status */
.ev-card.is-canceled .ev-card__title a { text-decoration: line-through; color: var(--ink-3); }
.ev-card.is-canceled { background: #fcfbf9; }


/* 9. EMPTY STATE + CTA BAND --------------------------------------------- */
.ev-empty {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ev-empty h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--um-blue);
  margin: 0 0 0.5rem;
}
.ev-empty p { color: var(--ink-2); margin: 0 auto 1.5rem; max-width: 46ch; }

.ev-cta {
  background: var(--surface-dark);
  color: var(--ink-invert);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.ev-cta__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.ev-cta__item { border-top: 3px solid var(--um-maize); padding-top: 1.5rem; }
.ev-cta__item h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: #fff;
}
.ev-cta__item p { color: var(--ink-invert-2); margin: 0 0 1.25rem; }
.ev-cta .ev-arrow-link { color: var(--um-maize); }
.ev-cta .ev-arrow-link:hover { color: #fff; }


/* 10. DETAIL HERO -------------------------------------------------------- */
.ev-dhero {
  position: relative;
  background: var(--surface-dark);
  color: var(--ink-invert);
  padding-block: clamp(2rem, 4vw, 3rem) clamp(7rem, 12vw, 9rem);
  overflow: hidden;
  isolation: isolate;
}
.ev-dhero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 55%;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 50%);
          mask-image: linear-gradient(to right, transparent, #000 50%);
}
.ev-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  font-size: 0.9375rem;
  font-weight: 800;
  text-decoration: none;
}
.ev-page a.ev-back { color: var(--ink-invert-2); }
.ev-page a.ev-back:hover { color: var(--um-maize); }
.ev-back .ev-icon { transition: transform 0.25s var(--ease); }
.ev-back:hover .ev-icon { transform: translateX(-3px); }

.ev-dhero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.ev-dhero .ev-chips { margin-bottom: 1.25rem; }
.ev-dhero__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
  max-width: 22ch;
  text-wrap: balance;
}
.ev-dhero__lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-invert-2);
  max-width: 56ch;
  margin: 0;
}
/* Big typographic date — the detail page's "art" */
.ev-bigdate {
  justify-self: end;
  display: grid;
  justify-items: end;
  line-height: 1;
  text-align: right;
  user-select: none;
}
.ev-bigdate__num {
  font-family: var(--font-date);
  font-weight: 700;
  font-size: clamp(7rem, 14vw, 12rem);
  letter-spacing: -0.04em;
  color: #fff;
  opacity: 0.86;
}
.ev-bigdate__mon {
  font-size: clamp(1rem, 1.8vw, 1.375rem);
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--um-maize);
  margin-top: 0.25rem;
}


/* 11. DETAIL BODY + FACTS CARD ------------------------------------------ */
.ev-detail { padding-bottom: clamp(3rem, 7vw, 5rem); background: var(--surface); }
.ev-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.ev-detail__body { padding-top: clamp(2.5rem, 5vw, 3.5rem); min-width: 0; }

.ev-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: #4d3800;
  font-weight: 600;
}
.ev-banner--danger { background: var(--danger-bg); color: var(--danger); }
.ev-banner .ev-icon { margin-top: 0.2em; flex: none; }
.ev-banner a { color: inherit; font-weight: 800; }

.ev-prose { max-width: 68ch; font-size: 1.125rem; line-height: 1.75; color: var(--ink); }
.ev-prose > :first-child { margin-top: 0; }
.ev-prose p { margin: 0 0 1.25em; }
.ev-prose > p:first-child {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--um-blue);
  font-weight: 600;
}
.ev-prose :where(h3, h4) {
  font-family: var(--font-serif);
  color: var(--um-blue);
  margin: 1.75em 0 0.5em;
  line-height: 1.25;
}
.ev-prose h3 { font-size: 1.5rem; }
.ev-prose h4 { font-size: 1.25rem; }
.ev-prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.ev-prose table { border-collapse: collapse; margin: 0 0 1.25em; font-size: 1rem; }
.ev-prose :where(td, th) { border: 1px solid var(--rule-strong); padding: 0.5em 0.75em; text-align: left; vertical-align: top; }
.ev-prose ul, .ev-prose ol { margin: 0 0 1.25em; padding-left: 1.25em; }
.ev-prose li + li { margin-top: 0.35em; }

.ev-flyer {
  margin: 2.5rem 0 0;
  max-width: 68ch;
}
.ev-flyer a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ev-flyer figcaption { margin-top: 0.625rem; font-size: 0.875rem; color: var(--ink-3); }

.ev-host {
  max-width: 68ch;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.ev-host h2 {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.5rem;
}
.ev-host p { margin: 0; font-weight: 700; color: var(--ink); line-height: 1.45; }

/* The overlapping, sticky facts card */
.ev-facts {
  position: sticky;
  top: 1.5rem;
  margin-top: calc(-1 * clamp(5rem, 9vw, 6.5rem));
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.ev-facts__head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ev-facts__head h2 {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--um-blue);
  margin: 0;
}
.ev-facts__list { margin: 0; padding: 0.5rem 1.5rem; }
.ev-facts__row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.875rem 0;
}
.ev-facts__row + .ev-facts__row { border-top: 1px solid var(--rule); }
.ev-facts__row .ev-icon { font-size: 1.25rem; color: var(--azure); margin-top: 0.1rem; }
.ev-facts__row dt {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.15rem;
}
.ev-facts__row dd { margin: 0; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.ev-facts__row dd span { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.9375rem; }
.ev-facts__actions {
  display: grid;
  gap: 0.625rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--surface-alt);
}

/* Add to calendar menu (details/summary — works without JS) */
.ev-cal summary { list-style: none; }
.ev-cal summary::-webkit-details-marker { display: none; }
.ev-cal[open] summary .ev-icon:last-child { transform: rotate(180deg); }
/* The menu opens in place, in normal flow, rather than floating. Both
   places it lives clip overflow: the facts card (rounded corners) and the
   list preview panel (its open/close animation). A floating menu was
   opening but getting cut off — it looked like the button did nothing. */
.ev-cal__menu {
  margin: 0.375rem 0 0;
  padding: 0.375rem;
  list-style: none;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.ev-cal__menu a {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.625rem 0.75rem;
  border-radius: 4px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.ev-cal__menu a:hover { background: var(--light-blue); color: var(--um-blue); }
/* In the list preview the menu opens inline-width */
.ev-card .ev-cal__menu { min-width: 14rem; }

.ev-share {
  border: 0;
  background: none;
  padding: 0.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--azure);
  cursor: pointer;
  display: inline-flex;
  gap: 0.4em;
  align-items: center;
}
.ev-share:hover { color: var(--um-blue); }


/* Recording / related video */
.ev-video { max-width: 68ch; margin-top: 2.5rem; }
.ev-video h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  color: var(--um-blue);
  margin: 0 0 1rem;
}
.ev-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.ev-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Not-found page: hero only */
.ev-dhero--short { padding-bottom: clamp(3rem, 7vw, 5rem); }
.ev-dhero--short .ev-dhero__lede a { color: var(--um-maize); }

/* 12. RELATED ------------------------------------------------------------ */
.ev-related { background: var(--surface-alt); padding-block: clamp(3rem, 7vw, 5rem); }
.ev-related__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}


/* RESPONSIVE ------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ev-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main actions"
      "meta actions"
      "preview preview";
    row-gap: 0.875rem;
  }
  .ev-card__actions { flex-direction: column; align-self: start; }
  .ev-card__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; }
  .ev-card__meta li + li { margin-top: 0; }
}

@media (max-width: 960px) {
  .ev-hero__grid,
  .ev-dhero__grid,
  .ev-detail__grid { grid-template-columns: minmax(0, 1fr); }
  .ev-hero__title { max-width: none; }
  .ev-bigdate { display: none; }
  .ev-dhero { padding-bottom: clamp(2.5rem, 6vw, 3.5rem); }
  .ev-facts { position: static; margin-top: 2rem; order: -1; }
  .ev-detail__body { padding-top: 0.5rem; }
  .ev-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-cards > :nth-child(3) { display: none; }
  .ev-cta__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  /* Filters fold behind a toggle; search stays out front */
  .ev-filters__row { gap: 0.625rem; padding-block: 0.75rem; }
  .ev-modes { flex-basis: 100%; }
  .ev-modes a { flex: 1; justify-content: center; }
  .ev-search { flex-basis: 0; flex-grow: 1; }
  .ev-js .ev-filters__toggle { display: inline-flex; min-height: 46px; padding-inline: 0.875rem; }
  .ev-filters__toggle .ev-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--um-maize);
    color: var(--um-blue);
    font-size: 0.75rem;
  }
  .ev-filters__selects { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
  .ev-js .ev-filters__selects:not(.is-open) { display: none; }
  .ev-seg { grid-column: 1 / -1; width: 100%; }
  .ev-seg label { flex: 1; justify-content: center; }

  .ev-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ev-stat { padding-right: 0.5rem; }
  .ev-stat + .ev-stat { padding-left: 0.875rem; }
  .ev-stat dt { font-size: 0.6875rem; }

  /* The date rail becomes a sticky header row above each day */
  .ev-day { grid-template-columns: minmax(0, 1fr); padding-block: 0 1.5rem; border-top: 0; }
  .ev-day__date {
    grid-template-columns: auto auto auto 1fr;
    align-items: baseline;
    gap: 0.5rem;
    z-index: 2;
    margin: 0 calc(-1 * var(--gutter)) 0.75rem;
    padding: 0.625rem var(--gutter);
    background: var(--surface-alt);
    top: var(--ev-bar-h);
    border-bottom: 1px solid var(--rule);
  }
  .ev-day__num { font-size: 1.5rem; margin: 0; order: 2; }
  .ev-day__dow { order: 1; }
  .ev-day__mon { order: 3; }
  .ev-day__flag { order: 4; margin: 0; justify-self: end; }

  .ev-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "meta" "actions" "preview";
    padding: 1.125rem 1.125rem 1.25rem;
  }
  .ev-card__actions { flex-direction: row; justify-content: flex-start; }
  .ev-card__actions .ev-btn { flex: 1; }
  .ev-card__preview-body { grid-template-columns: minmax(0, 1fr); }
  .ev-card__flyer { order: -1; }

  .ev-cards { grid-template-columns: minmax(0, 1fr); }
  .ev-cards > :nth-child(3) { display: block; }
  .ev-featured .ev-cards > :nth-child(n+2) { display: none; }
}


/* 13. REDUCED MOTION / PRINT -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ev-page *,
  .ev-page *::before,
  .ev-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .ev-filters, .ev-featured, .ev-cta, .ev-card__actions, .ev-facts__actions, .ev-related, .ev-hero::before, .ev-dhero::before { display: none !important; }
  .ev-hero, .ev-dhero { background: none; color: #000; padding-block: 1rem; }
  .ev-card, .ev-facts { box-shadow: none; border: 1px solid #ccc; }
  .ev-facts { position: static; margin-top: 1rem; }
  .ev-day__date { position: static; }
}
