/* ==========================================================================
   coRise Events — public page (/events/)
   Layout and behaviour ported from ANZCAA (styles/public/events.css,
   detail.css, dialog.css, responsive.css), dressed in coRise tokens from
   /styles.css. Loaded after /styles.css.
   ========================================================================== */

:root {
  --ev-ink: var(--corise-ink);
  --ev-ink-soft: #3A3A38;
  --ev-muted: var(--corise-ink-muted);
  --ev-secondary: var(--corise-ink-secondary);
  --ev-line: var(--corise-line);
  --ev-line-strong: #CFCDC6;
  --ev-surface: var(--corise-paper);
  --ev-surface-2: var(--corise-bone-alt);
  --ev-white: #FFFFFF;
  --ev-accent: var(--corise-amber);
  --ev-accent-ink: var(--corise-ochre-ink);
  --ev-accent-soft: var(--corise-ochre-bg);
  --ev-accent-line: var(--corise-ochre-border);
  --ev-success-ink: var(--corise-sage-ink);
  --ev-success-soft: var(--corise-sage-bg);
  --ev-success-line: var(--corise-sage-border);
  --ev-danger: #C2410C;
  --ev-danger-ink: var(--corise-rose-ink);
  --ev-danger-soft: var(--corise-rose-bg);
  --ev-danger-line: var(--corise-rose-border);
  --ev-scrim: rgb(17 17 17 / 45%);

  /* Category covers: deep and light ends; the deep end carries white text (AA). */
  --cat-networking: #1F3A47;
  --cat-networking-light: #3F6B7C;
  --cat-career: #6B4A0C;
  --cat-career-light: #B8862C;
  --cat-workshop: #264D2B;
  --cat-workshop-light: #568A5C;
  --cat-catchup: #6E3B1C;
  --cat-catchup-light: #B9814A;
  --cat-sports: #14433F;
  --cat-sports-light: #2A7A6C;
  --cat-webinar: #3B2A5E;
  --cat-webinar-light: #6D57A8;

  --ev-radius: 16px;
}

.page-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
html {
  scroll-padding-top: 90px;
}
.nav-item.is-current {
  color: var(--corise-ink);
  font-weight: 600;
}

/* ---------- Banner ---------- */
.events-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0 24px;
  min-height: 180px;
  padding: 26px 28px 22px;
  border-radius: var(--ev-radius);
  background: var(--corise-ink);
  color: var(--ev-white);
}
.events-banner::after {
  /* the coRise dot, large and quiet */
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(208, 138, 44, 0.55), rgba(208, 138, 44, 0) 70%);
  pointer-events: none;
}
.banner-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.banner-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--corise-amber);
  margin-bottom: 8px;
}
.banner-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
body.lang-zh .banner-title {
  font-family: var(--font-heading-zh);
}
body.lang-en .banner-title {
  font-family: var(--font-display-en);
  font-weight: 400;
}
.banner-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
}
.banner-count {
  position: relative;
  z-index: 1;
}
.banner-count strong {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--ev-accent-ink);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.sample-notice {
  font-size: 12px;
  color: var(--ev-muted);
  background: var(--ev-surface);
  border-left: 3px solid var(--ev-line-strong);
  padding: 11px 15px;
  margin-bottom: 24px;
  border-radius: 0 6px 6px 0;
}

/* ---------- Filters ---------- */
.filter-panel {
  padding: 18px 22px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-white);
  display: grid;
  gap: 12px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.filter-label {
  min-width: 64px;
  font-size: 13px;
  color: var(--ev-muted);
  font-weight: 600;
}
.filter-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.filter-options button {
  border: 1px solid var(--ev-line);
  border-radius: 999px;
  background: var(--ev-surface);
  color: var(--ev-secondary);
  padding: 6px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.filter-options button:hover {
  background: var(--ev-accent-soft);
  border-color: var(--ev-accent-line);
  color: var(--ev-accent-ink);
}
.filter-options button[aria-pressed="true"] {
  background: var(--ev-ink);
  border-color: var(--ev-ink);
  color: var(--ev-white);
}
.filter-select {
  display: none;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ev-line);
  border-radius: 10px;
  background: var(--ev-white);
  color: var(--ev-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-heading h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
body.lang-zh .section-heading h2 {
  font-family: var(--font-heading-zh);
}
body.lang-en .section-heading h2 {
  font-family: var(--font-display-en);
  font-weight: 500;
}
.section-heading p {
  color: var(--ev-muted);
  font-size: 13px;
  margin-top: 8px;
}
.upcoming-section {
  margin-top: 40px;
}
.upcoming-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 36px;
}

/* ---------- Calendar ---------- */
.calendar-panel {
  padding: 20px 17px;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  background: var(--ev-white);
}
.calendar-panel .eyebrow {
  font-size: 10px;
  margin-bottom: 14px;
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 14px;
}
.calendar-nav h3 {
  font-size: 14px;
  font-weight: 600;
}
.calendar-nav button {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--ev-line);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--ev-ink);
  cursor: pointer;
}
.calendar-nav button:hover {
  background: var(--ev-accent-soft);
}
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  text-align: center;
}
.calendar-weekdays {
  font-size: 11px;
  color: var(--ev-muted);
  margin-bottom: 8px;
}
.calendar-day {
  border: 0;
  background: transparent;
  border-radius: 8px;
  height: 37px;
  min-width: 0;
  font: inherit;
  font-size: 12px;
  color: var(--ev-ink);
  position: relative;
  cursor: pointer;
}
.calendar-day:disabled {
  color: #B3B1AB;
  cursor: default;
}
.calendar-day[data-has-events="true"] {
  background: var(--ev-accent-soft);
  color: var(--ev-accent-ink);
  font-weight: 700;
}
.calendar-day[data-has-events="true"]::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: calc(50% - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ev-accent);
}
.calendar-day[data-is-past="true"] {
  background: var(--ev-surface-2);
  color: var(--ev-secondary);
  font-weight: 600;
}
.calendar-day[data-is-past="true"]::after {
  background: transparent;
  border: 1.5px solid #A8A59D;
  width: 5px;
  height: 5px;
  left: calc(50% - 2.5px);
  bottom: 3.5px;
}
.calendar-day[aria-pressed="true"] {
  background: var(--ev-ink);
  color: var(--ev-white);
}
.calendar-day[aria-pressed="true"]::after {
  background: var(--ev-white);
  border-color: var(--ev-white);
}
.calendar-day[aria-current="date"] {
  box-shadow: inset 0 0 0 1px var(--ev-accent);
}
.calendar-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ev-muted);
  padding-top: 16px;
  line-height: 1.7;
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}
.legend-dot.is-upcoming {
  background: var(--ev-accent);
}
.legend-dot.is-past {
  border: 1.5px solid #A8A59D;
}
.legend-tz {
  margin-left: auto;
}
.calendar-empty {
  border-top: 1px solid var(--ev-line);
  padding-top: 14px;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ev-secondary);
}
.calendar-empty .text-link {
  font-size: 12px;
  margin-top: 6px;
}
.calendar-toggle {
  display: none;
}

/* ---------- Results & cards ---------- */
.upcoming-results {
  min-width: 0;
  outline: none;
}
.results-heading {
  min-height: 36px;
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  border-bottom: 1px solid var(--ev-line);
  font-size: 13px;
  color: var(--ev-muted);
  padding-bottom: 13px;
}
.text-link {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ev-accent-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.text-link:hover {
  text-decoration: underline;
}
.event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.event-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--ev-line);
}
.event-card:first-child {
  padding-top: 18px;
}
.event-card-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Square thumbnail: poster (2:1) on top when there is one, date and city on
   the category colour below. The gradient fills the square either way. */
.event-banner {
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  color: var(--ev-white);
  font: inherit;
  text-align: left;
}
.event-banner img {
  width: 100%;
  aspect-ratio: 2 / 1;
  flex: none;
  object-fit: cover;
  display: block;
}
.banner-date {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 4px;
  padding: 0 12px 14px;
  line-height: 1.15;
}
.event-banner:has(img) .banner-date {
  justify-content: center;
  padding-bottom: 0;
}
.banner-day {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.banner-city {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}
.event-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.event-chips span {
  font-size: 10px;
  font-weight: 700;
  color: var(--ev-secondary);
  background: var(--ev-surface-2);
  border: 1px solid var(--ev-line);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.cover-networking { background: linear-gradient(145deg, var(--cat-networking), var(--cat-networking-light)); }
.cover-career { background: linear-gradient(145deg, var(--cat-career), var(--cat-career-light)); }
.cover-workshop { background: linear-gradient(145deg, var(--cat-workshop), var(--cat-workshop-light)); }
.cover-catchup { background: linear-gradient(145deg, var(--cat-catchup), var(--cat-catchup-light)); }
.cover-sports { background: linear-gradient(145deg, var(--cat-sports), var(--cat-sports-light)); }
.cover-webinar { background: linear-gradient(145deg, var(--cat-webinar), var(--cat-webinar-light)); }

.event-card-copy {
  min-width: 0;
}
.event-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  min-height: 17px;
}
.next-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ev-accent-ink);
  font-weight: 600;
  letter-spacing: 0.1em;
}
.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--ev-line);
  white-space: nowrap;
}
.tag-sample { color: var(--ev-muted); font-weight: 500; }
.tag-closed { color: var(--ev-secondary); background: var(--ev-surface-2); }
.tag-soldout { color: var(--ev-danger-ink); background: var(--ev-danger-soft); border-color: var(--ev-danger-line); }
.tag-scarcity,
.tag-waitlist { color: var(--ev-accent-ink); background: var(--ev-accent-soft); border-color: var(--ev-accent-line); }
.live-label,
.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.live-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ev-danger-ink);
  background: var(--ev-danger-soft);
  border: 1px solid var(--ev-danger-line);
  padding: 1px 8px 1px 6px;
  border-radius: 20px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ev-danger);
  flex: none;
  animation: live-pulse 1.8s ease-in-out infinite;
}
.live-tag .live-dot {
  background: #FFD9CC;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.event-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 9px;
}
.event-title-button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.event-title-button:hover {
  color: var(--ev-accent-ink);
}
.event-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ev-ink-soft);
  margin: -3px 0 8px;
}
.event-summary span {
  margin-right: 5px;
}
.event-date {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}
.event-meta {
  font-size: 12px;
  color: var(--ev-muted);
  line-height: 1.65;
}
.event-card-footer {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
  margin-top: 14px;
}
.prices {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
}
.public-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--ev-ink);
}
.public-price small {
  font-size: 11px;
  font-weight: 600;
  color: var(--ev-muted);
}
.public-price.is-free {
  color: var(--ev-success-ink);
}
.public-price.is-unknown {
  font-size: 12px;
  font-weight: 600;
  color: var(--ev-muted);
}
.member-price {
  color: var(--ev-accent-ink);
  font-weight: 700;
}
.price-condition {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--ev-muted);
  margin-top: 2px;
}
.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--ev-ink);
  color: var(--ev-white);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card-action:hover {
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.22);
  transform: translateY(-1px);
}
.action-networking { background: var(--cat-networking); }
.action-career { background: var(--cat-career); }
.action-workshop { background: var(--cat-workshop); }
.action-catchup { background: var(--cat-catchup); }
.action-sports { background: var(--cat-sports); }
.action-webinar { background: var(--cat-webinar); }
.ended-badge {
  font-size: 10px;
  color: var(--ev-muted);
  background: var(--ev-surface-2);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.empty-results {
  text-align: center;
  padding: 50px 20px;
  border-bottom: 1px solid var(--ev-line);
}
.empty-results h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}
.empty-results p {
  font-size: 14px;
  color: var(--ev-muted);
  margin-bottom: 22px;
}
.empty-number {
  display: block;
  font-size: 45px;
  color: #C9C6BE;
  margin-bottom: 12px;
}
.loading-line {
  height: 22px;
  background: var(--ev-surface-2);
  border-radius: 6px;
  margin: 22px 0;
}
.loading-line.short {
  width: 60%;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.button-primary {
  background: var(--ev-ink);
  color: var(--ev-white);
}
.button-primary:hover:not(:disabled) {
  background: #333;
}
.button-secondary {
  border-color: var(--ev-line);
  background: var(--ev-white);
  color: var(--ev-ink);
}
.button-secondary:hover {
  background: var(--ev-surface);
}

/* ---------- Past events ---------- */
.past-section {
  margin-top: 62px;
  padding: 26px 28px;
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
}
.past-section .section-heading {
  margin-bottom: 18px;
}
.past-section h2 {
  font-size: 24px;
}
.source-label {
  font-size: 10px;
  color: var(--ev-muted);
  border: 1px solid var(--ev-line);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.past-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.past-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--ev-line);
}
.past-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ev-accent);
}
.dot-1 { background: var(--cat-networking-light); }
.dot-2 { background: var(--cat-catchup-light); }
.dot-3 { background: var(--cat-sports-light); }
.past-copy {
  flex: 1;
  min-width: 230px;
}
.past-copy h3 {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
}
.past-copy h3 a {
  color: inherit;
  text-decoration: none;
}
.past-copy h3 a:hover {
  color: var(--ev-accent-ink);
}
.past-copy p {
  font-size: 11.5px;
  color: var(--ev-muted);
  line-height: 1.6;
}
.recap {
  font-size: 12px;
  max-width: 100%;
}
.recap summary {
  color: var(--ev-accent-ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.recap summary::-webkit-details-marker {
  display: none;
}
.recap[open] {
  flex-basis: 100%;
  padding-left: 22px;
}
.recap[open] p {
  margin-top: 12px;
  color: var(--ev-secondary);
  max-width: 700px;
  line-height: 1.8;
  font-size: 13px;
}
.recap ul {
  margin: 10px 0 0 16px;
  color: var(--ev-secondary);
  font-size: 12.5px;
  line-height: 1.8;
}
.past-empty {
  font-size: 13px;
  color: var(--ev-muted);
  padding: 12px 0;
  border-top: 1px solid var(--ev-line);
}
.recap-link {
  color: var(--ev-accent-ink);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Detail (dialog) ---------- */
.event-dialog {
  /* styles.css resets every margin to 0; a modal dialog centres on margin:auto. */
  margin: auto;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  border: 0;
  border-radius: var(--ev-radius);
  padding: 0;
  overflow-y: auto;
  color: var(--ev-ink);
  background: var(--ev-white);
}
.event-dialog::backdrop {
  background: var(--ev-scrim);
}
.dialog-toolbar {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}
.dialog-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ev-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover {
  background: var(--ev-white);
  color: var(--ev-ink);
}
.event-dialog .sample-notice {
  margin: 16px 28px 0;
}
.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
}
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-hero {
  color: var(--ev-white);
  padding: 28px 30px 30px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}
.detail-tags span {
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 2px 10px;
  border-radius: 20px;
}
.detail-hero h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
  padding-right: 32px;
}
.detail-hero > p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
  padding: 24px 28px 28px;
}
.detail-copy h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.description {
  color: var(--ev-secondary);
  line-height: 1.9;
  font-size: 13.5px;
  white-space: pre-line;
}
.event-facts {
  margin-top: 24px;
}
.event-facts > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--ev-line);
}
.event-facts dt {
  font-size: 13px;
  color: var(--ev-muted);
}
.event-facts dd {
  font-size: 14px;
}
.event-facts dd span,
.event-facts dd small {
  display: block;
  margin-top: 5px;
}
.event-facts dd small {
  font-size: 11px;
  color: var(--ev-muted);
}
.event-facts .text-link {
  margin-top: 10px;
}
.registration-panel {
  padding: 22px;
  background: var(--ev-surface);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
}
.ticket-prices {
  margin: 16px 0;
}
.ticket-prices > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ticket-prices dt {
  font-size: 13px;
  color: var(--ev-muted);
}
.ticket-prices dd {
  font-weight: 700;
  font-size: 20px;
}
.ticket-prices dd small {
  font-weight: 400;
  font-size: 10px;
}
.member-ticket dd {
  color: var(--ev-accent-ink);
}
.membership-note {
  background: var(--ev-accent-soft);
  color: var(--ev-accent-ink);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.security-note {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--ev-success-line);
  border-radius: 10px;
  background: var(--ev-success-soft);
  color: var(--ev-success-ink);
  font-size: 12px;
  line-height: 1.5;
}
.registration-state {
  font-size: 13px;
  color: var(--ev-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
}
.scarcity-note {
  font-size: 12px;
  font-weight: 700;
  color: var(--ev-accent-ink);
  margin-bottom: 10px;
}
.registration-panel .button {
  width: 100%;
  margin-top: 5px;
}
.small-note {
  font-size: 11px;
  text-align: center;
  color: var(--ev-muted);
  margin-top: 11px;
  line-height: 1.7;
}
.calendar-link {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  font-size: 12px;
}

/* Waitlist (notification list) */
.waitlist-card {
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.waitlist-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ev-accent-ink);
  background: var(--ev-accent-soft);
  border-radius: 20px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.waitlist-headline {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 4px;
}
.waitlist-subline {
  font-size: 12px;
  color: var(--ev-muted);
  line-height: 1.5;
}
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.waitlist-form label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ev-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.waitlist-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ev-line-strong);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  background: var(--ev-white);
  color: var(--ev-ink);
}
.waitlist-input:focus {
  outline: none;
  border-color: var(--ev-accent);
  box-shadow: 0 0 0 2px rgba(208, 138, 44, 0.2);
}
.registration-panel .button.waitlist-btn {
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  margin-top: 0;
}
.waitlist-success {
  background: var(--ev-success-soft);
  border: 1px solid var(--ev-success-line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ev-success-ink);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}
.waitlist-error {
  color: var(--ev-danger);
  font-size: 12px;
}

/* Focus ring wins over component rules. */
.page-shell button:focus-visible,
.page-shell a:focus-visible,
.page-shell summary:focus-visible,
.event-dialog button:focus-visible,
.event-dialog a:focus-visible {
  outline: 2px solid var(--ev-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .upcoming-layout {
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 24px;
  }
  .calendar-panel {
    padding: 16px 12px;
  }
  .event-card h3 {
    font-size: 16px;
  }
  .event-card-footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  html {
    scroll-padding-top: 70px;
  }
  .page-shell {
    padding: 0 16px 40px;
  }
  .events-banner {
    margin: 16px 0 14px;
    min-height: 0;
    padding: 18px 18px 16px;
    border-radius: 12px;
  }
  .banner-sub,
  .banner-count {
    display: none;
  }
  .banner-title {
    font-size: 20px;
  }
  .filter-panel {
    padding: 14px;
  }
  .filter-row {
    display: block;
  }
  .filter-label,
  .filter-options {
    display: none;
  }
  .filter-select {
    display: block;
  }
  /* City stays as pills on a phone: a 4-column grid. */
  .filter-row-city .filter-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
  }
  .filter-row-city .filter-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .filter-row-city .filter-options button {
    height: 38px;
    padding: 0 4px;
    border-radius: 10px;
    font-size: 12px;
  }
  .filter-row-city .filter-select {
    display: none;
  }
  .upcoming-section {
    margin-top: 30px;
  }
  .section-heading {
    align-items: start;
    gap: 10px;
  }
  .section-heading h2 {
    font-size: 24px;
  }
  .upcoming-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .calendar-panel {
    padding: 13px 16px;
  }
  .calendar-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ev-ink);
    cursor: pointer;
  }
  .calendar-toggle > span {
    font-size: 20px;
    font-weight: 400;
  }
  .calendar-content {
    display: none;
  }
  .is-expanded .calendar-content {
    display: block;
    margin-top: 18px;
  }
  .calendar-content > .eyebrow {
    display: none;
  }
  .calendar-day {
    height: 40px;
    font-size: 13px;
  }
  .event-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
  }
  .banner-date {
    gap: 1px;
    padding: 0 8px 9px;
  }
  .banner-day {
    font-size: 11px;
    line-height: 1.15;
  }
  .banner-city {
    font-size: 10px;
  }
  .event-meta {
    font-size: 11px;
  }
  .event-card-footer {
    align-items: start;
  }
  .event-card-footer .card-action {
    font-size: 12px;
    padding: 7px 14px;
  }
  .past-section {
    padding: 20px 16px;
    margin-top: 36px;
  }
  .past-copy {
    min-width: calc(100% - 25px);
  }
  .past-row {
    gap: 10px;
  }
  .past-row .ended-badge {
    margin-left: 17px;
  }
  .event-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 24px);
  }
  .detail-hero {
    padding: 22px 20px;
  }
  .detail-hero h2 {
    font-size: 20px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .event-facts > div {
    grid-template-columns: 80px 1fr;
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .card-action { transition: none; }
  .card-action:hover { transform: none; }
}
