:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #172e4f;
  background: #f3f6fb;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #065ba8;
}
header,
.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px max(5vw, 20px);
  background: #002b5b;
  color: white;
}
.contact {
  justify-content: flex-start;
  gap: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
  background: #07549d;
  font-size: 0.85rem;
}
header a,
.contact a {
  color: white;
  text-decoration: none;
}
.brand {
  font-size: 1.5rem;
  font-weight: 750;
}
nav {
  display: flex;
  gap: 22px;
}
main {
  min-height: 75vh;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
}
h2,
h3 {
  line-height: 1.25;
}
.hero {
  text-align: center;
  padding: 64px 20px;
  background: linear-gradient(120deg, #00376e, #0968ac);
  color: white;
}
.hero p {
  font-size: 1.2rem;
}
.panel {
  max-width: 1100px;
  margin: 28px auto;
  padding: 28px;
  background: white;
  border: 1px solid #e0e7f0;
  border-radius: 18px;
  box-shadow: 0 15px 40px #1738540b;
}
.event-grid {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}
.event-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  border: 1px solid #dee6ef;
  border-radius: 12px;
  overflow: hidden;
}
.event-card > div {
  padding: 20px;
}
.event-card img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
}
.event-card h3 {
  margin-top: 0;
  font-size: 1.4rem;
}
.button,
button {
  display: inline-block;
  padding: 12px 20px;
  background: #0862a8;
  color: white;
  border: 0;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
form {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}
input {
  padding: 10px;
  border: 1px solid #94a7bb;
  border-radius: 6px;
  font: inherit;
}
label {
  display: grid;
  gap: 7px;
}
footer {
  text-align: center;
  padding: 32px;
}
.hero-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}
article img {
  max-width: 100%;
}
p {
  line-height: 1.65;
}
.notice {
  background: #fff1d0;
  padding: 20px;
}
pocket-signup {
  display: block;
  margin-top: 24px;
}
[data-island] {
  margin-top: 24px;
}
article .v-application {
  background: transparent;
}
html {
  scroll-behavior: smooth;
}
@media (max-width: 700px) {
  header {
    display: block;
  }
  nav {
    margin-top: 18px;
    flex-wrap: wrap;
    gap: 14px;
  }
  .panel {
    margin: 14px;
    padding: 18px;
  }
  .event-card {
    grid-template-columns: 1fr;
  }
  .event-card img {
    max-height: 220px;
  }
  .contact {
    gap: 18px;
  }
}

/* Restore content spacing after the island's framework reset loads. */
main article .prose p,
main article .prose ul,
main article .prose ol {
  margin: 0 0 1em;
}
main article .prose h2,
main article .prose h3 {
  margin: 1.4em 0 0.5em;
}
main article .prose ul,
main article .prose ol {
  padding-left: 1.4em;
}
main article h1 {
  margin: 0 0 0.4em;
}
main .event-card h3 {
  margin: 0 0 0.3em;
}
main .event-card p {
  margin: 0 0 0.8em;
}
.event-date {
  color: #5a6b82;
  font-size: 0.95rem;
  margin: 0 0 1em;
}
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 99px;
  background: #fff1d0;
  color: #6b4a00;
  font-size: 0.8rem;
  font-weight: 600;
}
main .notice {
  margin: 0 0 1.2em;
  border-radius: 8px;
}
.custom-page {
  margin: 0 auto;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #f5a623;
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .hero {
    padding: 28px 20px;
  }
  .contact {
    flex-wrap: wrap;
  }
}

/* Server-rendered event checkout. */
.checkout {
  margin-block: 2rem;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: #fff;
  color: #172333;
  scroll-margin-top: 1rem;
}
.checkout [hidden] {
  display: none !important;
}
.checkout-details,
.checkout-payment {
  display: block;
}
.checkout fieldset {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.checkout label {
  display: grid;
  gap: 0.35rem;
  margin-block: 1rem;
  font-weight: 600;
}
.checkout input,
.checkout select,
.checkout textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #64748b;
  border-radius: 0.4rem;
  background: #fff;
  color: #172333;
  font: inherit;
}
.checkout input:user-invalid {
  border-color: #b42318;
}
.checkout :focus-visible {
  outline: 3px solid #1769bc;
  outline-offset: 3px;
}
.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1rem;
}
.checkout button {
  min-height: 44px;
  cursor: pointer;
}
.checkout button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.checkout .checkout-attendee {
  padding: 1rem;
  margin-block: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #f1f5f9;
}
.checkout legend {
  font-weight: 700;
}
.checkout-price {
  font-size: 1.2rem;
}
.checkout-original {
  color: #475569;
}
.checkout-error {
  border-left: 4px solid #b42318;
  color: #8b1710;
  background: #fff0ee;
  padding: 1rem;
  white-space: pre-wrap;
}
.checkout-success {
  border-left: 4px solid #16753b;
  background: #ecfdf3;
  padding: 1rem;
  color: #14532d;
}
.checkout-captcha {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 1rem;
}
.checkout details {
  margin-block: 1rem;
}
.checkout-coupon [role="status"] {
  min-height: 1.5em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 40rem) {
  .checkout-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* Member and payment status pages use the site's native controls. */
#member-checkout {
  margin-block: 2rem;
  padding: clamp(1rem, 4vw, 2rem);
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: white;
  color: #172e4f;
  scroll-margin-top: 1rem;
}
#member-checkout [hidden],
#response-status [hidden] {
  display: none !important;
}
#member-payment {
  display: block;
  max-width: 680px;
  width: 100%;
}
#member-payment-element {
  margin-block: 1rem;
  min-width: 0;
}
#member-payment button,
#member-register {
  min-height: 44px;
  margin-block: 1rem;
}
#member-checkout button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.checkout .add-attendee,
.checkout .remove-attendee,
.checkout .checkout-edit {
  background: #eef3f8;
  color: #174b76;
  border: 1px solid #94a7bb;
}
.checkout-actions button[type="submit"] {
  font-weight: 700;
  padding-inline: 1.75rem;
}
blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  border-left: 4px solid #94a7bb;
  background: #eef3f8;
}
.custom-page > .notice,
.custom-page > p:has(> .button) {
  margin-left: max(5vw, 20px);
  margin-right: max(5vw, 20px);
}

/* DREIA events visual layer. APPEND to site.css; retain existing CMS/island rules.
   Opt in through ep-* classes. No bare header/nav/form/article selectors. */
:root {
  --ep-navy: #002b5b;
  --ep-blue: #0862a8;
  --ep-blue-hover: #074d85;
  --ep-ink: #172e4f;
  --ep-muted: #53657b;
  --ep-bg: #f3f6fb;
  --ep-paper: #fff;
  --ep-line: #dce4ee;
  --ep-input: #64748b;
  --ep-coral: #f96f59;
  --ep-soft: #edf3fa;
  --ep-accent: #ffb454;
  --ep-good: #176044;
  --ep-good-bg: #eaf6ef;
  --ep-warn: #775214;
  --ep-warn-bg: #fff4db;
  --ep-error: #b42318;
  --ep-error-bg: #fff0ee;
  --ep-font:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ep-xs: 0.8125rem;
  --ep-sm: 0.875rem;
  --ep-base: 1rem;
  --ep-lead: 1.125rem;
  --ep-h3: 1.25rem;
  --ep-h2: clamp(1.5rem, 2.5vw, 2rem);
  --ep-h1: clamp(2rem, 4vw, 3.5rem);
  --ep-s1: 0.25rem;
  --ep-s2: 0.5rem;
  --ep-s3: 0.75rem;
  --ep-s4: 1rem;
  --ep-s5: 1.5rem;
  --ep-s6: 2rem;
  --ep-s7: 3rem;
  --ep-s8: 4rem;
  --ep-r-sm: 0.5rem;
  --ep-r: 1rem;
  --ep-r-lg: 1.5rem;
  --ep-shadow: 0 6px 24px rgb(0 43 91 / 0.06);
  --ep-shadow-hover: 0 12px 32px rgb(0 43 91 / 0.12);
  --ep-width: 75rem;
  --ep-gutter: 1rem;
}
/* 1. Shell and keyboard access */
.ep-shell {
  font-family: var(--ep-font);
  color: var(--ep-ink);
  background: var(--ep-bg);
}
.ep-shell .ep-wrap {
  width: min(calc(100% - 2 * var(--ep-gutter)), var(--ep-width));
  margin-inline: auto;
}
.ep-shell .ep-skip {
  position: absolute;
  left: 1rem;
  top: -8rem;
  z-index: 100;
  padding: 1rem;
  background: var(--ep-paper);
  color: var(--ep-navy);
}
.ep-shell .ep-skip:focus {
  top: 1rem;
}
.ep-shell
  :where(
    .ep-header,
    .ep-contact,
    .ep-footer,
    .ep-listing,
    .ep-detail,
    .ep-checkout,
    .ep-member
  )
  :focus-visible {
  outline: 3px solid var(--ep-navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
}
.ep-shell :where(.ep-header, .ep-contact, .ep-footer) :focus-visible {
  outline-color: var(--ep-accent);
  box-shadow: none;
}
.ep-shell .ep-contact {
  padding: 0;
  background: var(--ep-blue);
  font: 500 var(--ep-xs)/1.4 var(--ep-font);
}
.ep-contact .ep-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.ep-shell .ep-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: #fff;
  text-decoration: none;
}
.ep-shell .ep-header {
  display: block;
  padding: 0;
  background: var(--ep-navy);
  color: #fff;
  border-top: 1px solid #365778;
}
.ep-header .ep-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}
.ep-shell .ep-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.ep-brand span {
  font-size: var(--ep-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #dce9f7;
}
.ep-shell .ep-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  width: 100%;
  margin: 0;
}
.ep-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  font-size: var(--ep-sm);
  border-bottom: 2px solid transparent;
}
.ep-nav a:hover,
.ep-nav a[aria-current="page"] {
  border-color: var(--ep-coral);
}
.ep-shell .ep-footer {
  text-align: left;
  background: var(--ep-navy);
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}
.ep-footer .ep-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.ep-footer p {
  margin: 0.5rem 0 0;
  font-size: var(--ep-sm);
  max-width: 42ch;
}
.ep-footer a {
  color: #fff;
  text-underline-offset: 0.2em;
}
.ep-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 1.5rem;
  margin: 0;
}
.ep-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* 2. Shared native components */
.ep-shell .ep-button,
.ep-shell .ep-checkout button,
.ep-shell .ep-member button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--ep-r-sm);
  background: var(--ep-blue);
  color: #fff;
  font: 650 var(--ep-base)/1.4 var(--ep-font);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease;
}
.ep-shell .ep-button:hover,
.ep-shell .ep-checkout button:hover,
.ep-shell .ep-member button:hover {
  background: var(--ep-blue-hover);
}
.ep-shell .ep-button--secondary,
.ep-shell
  .ep-checkout
  :is(.add-attendee, .remove-attendee, .checkout-edit, .coupon-apply) {
  border-color: var(--ep-input);
  background: #fff;
  color: var(--ep-navy);
}
.ep-shell .ep-button--secondary:hover,
.ep-shell
  .ep-checkout
  :is(.add-attendee, .remove-attendee, .checkout-edit, .coupon-apply):hover {
  background: var(--ep-soft);
}
.ep-shell :where(.ep-checkout, .ep-member) button:disabled {
  opacity: 1;
  color: #53657b;
  background: #e6ebf1;
  border-color: #dce4ee;
  cursor: not-allowed;
}
.ep-shell .ep-eyebrow {
  margin: 0 0 0.75rem;
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  background: var(--ep-coral);
  color: var(--ep-navy);
  font-size: var(--ep-xs);
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ep-shell .ep-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.25rem 0.625rem;
  border-radius: 99px;
  background: var(--ep-good-bg);
  color: var(--ep-good);
  font-size: var(--ep-xs);
  font-weight: 700;
  line-height: 1.4;
}
.ep-shell .ep-badge--interest {
  background: var(--ep-soft);
  color: var(--ep-navy);
}
.ep-shell .ep-badge--closed {
  background: var(--ep-warn-bg);
  color: var(--ep-warn);
}
.ep-shell .ep-notice {
  padding: 1rem;
  margin: 1.5rem 0;
  border: 1px solid #e3cd9e;
  border-radius: var(--ep-r-sm);
  color: var(--ep-warn);
  background: var(--ep-warn-bg);
  line-height: 1.6;
}
.ep-notice a {
  color: inherit;
  text-underline-offset: 0.2em;
}
/* 3. Listing: compact editorial hero, separate filter, independent cards */
.ep-shell .ep-listing-hero {
  text-align: left;
  padding: 1.25rem 0;
  color: var(--ep-ink);
  background: linear-gradient(115deg, #fff 45%, #e7eff8);
  border-bottom: 1px solid var(--ep-line);
}
.ep-listing-hero h1 {
  max-width: 18ch;
  margin: 0 0 1rem;
  font-size: var(--ep-h1);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.ep-listing-hero .ep-intro {
  max-width: 54ch;
  margin: 0;
  color: var(--ep-muted);
  font-size: var(--ep-lead);
  line-height: 1.6;
}
.ep-shell .ep-listing-body {
  padding-block: 1.5rem;
}
.ep-listing-body h2 {
  margin: 0;
  font-size: var(--ep-h2);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.ep-shell .ep-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r);
  background: #fff;
}
.ep-filter label {
  display: grid;
  gap: 0.5rem;
  flex: 1 1 10rem;
  font-size: var(--ep-sm);
  font-weight: 650;
}
.ep-filter input {
  max-width: min(100%, max(220px, 12em));
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ep-input);
  border-radius: var(--ep-r-sm);
  color: var(--ep-ink);
  background: #fff;
  font: inherit;
  font-size: 1rem;
}
.ep-shell .ep-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0;
}
.ep-shell .ep-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--ep-shadow);
  transition: box-shadow 180ms ease;
}
.ep-card:hover {
  box-shadow: var(--ep-shadow-hover);
}
.ep-shell .ep-card-media {
  display: block;
  aspect-ratio: 16/9;
  background: var(--ep-soft);
}
.ep-shell .ep-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}
.ep-shell .ep-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}
.ep-card-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.ep-date-chip {
  display: grid;
  place-items: center;
  min-width: 52px;
  padding: 0.5rem;
  border: 1px solid var(--ep-line);
  border-radius: 0.625rem;
  background: var(--ep-bg);
  font-size: var(--ep-xs);
  font-weight: 700;
  line-height: 1.2;
}
.ep-date-chip strong {
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.ep-shell .ep-card h3 {
  margin: 0;
  font-size: var(--ep-h3);
  line-height: 1.3;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.ep-card h3 a {
  color: var(--ep-ink);
  text-decoration: none;
}
.ep-card h3 a:hover {
  color: var(--ep-blue);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.ep-shell .ep-card-date {
  margin: 0;
  color: var(--ep-muted);
  font-size: var(--ep-sm);
  line-height: 1.5;
}
.ep-shell .ep-card-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: var(--ep-muted);
  font-size: var(--ep-sm);
  line-height: 1.6;
}
.ep-card-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--ep-line);
}
.ep-card-price {
  font-weight: 750;
}
.ep-card-price small {
  display: block;
  color: var(--ep-muted);
  font-size: var(--ep-xs);
  font-weight: 400;
}
/* 4. Event detail: title first on mobile; contained art; facts; one sticky CTA */
.ep-shell .ep-detail {
  max-width: var(--ep-width);
  margin: 0 auto;
  padding: 1.5rem var(--ep-gutter);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ep-shell .ep-event-hero {
  display: grid;
  gap: 1.5rem;
  padding: 0;
  background: transparent;
  color: var(--ep-ink);
}
.ep-detail h1 {
  margin: 0 0 1rem;
  font-size: var(--ep-h1);
  line-height: 1.1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.ep-shell .ep-event-art {
  margin: 0;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r);
  overflow: hidden;
  background: var(--ep-soft);
}
.ep-shell .ep-event-art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 28rem;
  object-fit: contain;
}
.ep-shell .ep-facts {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r);
  background: #fff;
}
.ep-facts div {
  min-width: 0;
}
.ep-facts dt {
  color: var(--ep-muted);
  font-size: var(--ep-xs);
  font-weight: 650;
  margin-bottom: 0.4rem;
}
.ep-facts dd {
  margin: 0;
  font-size: var(--ep-base);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ep-facts a {
  color: var(--ep-blue);
  text-underline-offset: 0.2em;
}
.ep-shell .ep-register-bar {
  position: static;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  margin: 1.5rem 0;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r-sm);
  background: #fff;
  box-shadow: var(--ep-shadow);
}
.ep-register-bar p {
  margin: 0;
  font-weight: 750;
}
.ep-register-bar small {
  display: block;
  font-size: var(--ep-xs);
  color: var(--ep-muted);
  font-weight: 400;
}
:where(.ep-shell) .ep-prose {
  max-width: 68ch;
  margin-block: 2rem;
  font-size: var(--ep-lead);
  line-height: 1.75;
}
:where(.ep-shell) .ep-prose :where(p, ul, ol, blockquote) {
  margin: 0 0 1.25em;
}
:where(.ep-shell) .ep-prose :where(h2, h3) {
  margin: 1.75em 0 0.6em;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
:where(.ep-shell) .ep-prose h2 {
  font-size: var(--ep-h2);
}
:where(.ep-shell) .ep-prose h3 {
  font-size: var(--ep-h3);
}
:where(.ep-shell) .ep-prose :where(ul, ol) {
  padding-left: 1.4em;
}
.ep-prose li + li {
  margin-top: 0.5em;
}
.ep-prose a {
  color: var(--ep-blue);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
:where(.ep-shell) .ep-prose blockquote {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--ep-coral);
  background: var(--ep-soft);
  border-radius: 0 var(--ep-r-sm) var(--ep-r-sm) 0;
}
.ep-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ep-r-sm);
}
.ep-prose table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
}
.ep-prose :where(td, th) {
  padding: 0.75rem;
  border: 1px solid var(--ep-line);
  text-align: left;
}
/* 5. Checkout: sections, real live total, no duplicated estimate or fake stepper */
.ep-shell .ep-checkout,
.ep-shell .ep-member {
  margin-block: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r);
  background: #fff;
  color: var(--ep-ink);
  box-shadow: var(--ep-shadow);
  scroll-margin-top: 8rem;
  min-width: 0;
}
.ep-shell .ep-checkout [hidden],
.ep-shell .ep-member [hidden] {
  display: none !important;
}
.ep-checkout h2,
.ep-member h2 {
  margin: 0 0 0.75rem;
  font-size: var(--ep-h2);
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.ep-shell .ep-checkout :is(.checkout-details, .checkout-payment) {
  display: block;
}
.ep-checkout fieldset {
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
.ep-shell .ep-checkout label {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  font-size: var(--ep-sm);
  font-weight: 650;
}
.ep-shell .ep-checkout :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--ep-input);
  border-radius: var(--ep-r-sm);
  background: #fff;
  color: var(--ep-ink);
  font: 400 1rem/1.5 var(--ep-font);
}
.ep-checkout textarea {
  resize: vertical;
}
.ep-shell .ep-checkout :is(input, select, textarea):user-invalid,
.ep-shell .ep-checkout [aria-invalid="true"] {
  border: 2px solid var(--ep-error);
}
.ep-shell .ep-checkout input[readonly] {
  background: var(--ep-bg);
}
.ep-checkout .ep-checkout-section {
  margin: 1.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ep-line);
  font-size: var(--ep-h3);
}
.ep-checkout .ep-checkout-help {
  margin: 0.5rem 0 1.5rem;
  font-size: var(--ep-sm);
  color: var(--ep-muted);
}
.ep-checkout summary {
  min-height: 44px;
  padding-block: 0.65rem;
  color: var(--ep-blue);
  cursor: pointer;
  font-weight: 600;
}
.ep-shell .ep-checkout .checkout-attendee {
  padding: 1rem;
  margin: 1.5rem 0;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r-sm);
  background: var(--ep-bg);
}
.ep-checkout .checkout-attendee legend {
  padding-inline: 0.5rem;
  font-weight: 700;
}
.ep-shell .ep-checkout .checkout-coupon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: end;
  margin-block: 1rem;
}
.ep-shell .ep-checkout .checkout-coupon label {
  margin: 0;
}
.ep-checkout #checkout-coupon-status {
  grid-column: 1/-1;
  min-height: 1.5em;
  margin: 0;
  font-size: var(--ep-sm);
  line-height: 1.5;
}
.ep-shell .ep-checkout .ep-order-summary {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r-sm);
  background: var(--ep-bg);
}
.ep-order-summary h3 {
  margin: 0 0 0.75rem;
  font-size: var(--ep-h3);
}
.ep-shell .ep-checkout .checkout-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: var(--ep-base);
}
.ep-checkout .checkout-total {
  margin-left: auto;
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ep-checkout .checkout-original {
  color: var(--ep-muted);
  font-size: var(--ep-sm);
}
.ep-shell .ep-checkout .checkout-summary {
  padding: 1rem;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-r-sm);
  background: var(--ep-bg);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.ep-shell .ep-checkout .checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}
.ep-checkout .checkout-actions button {
  width: 100%;
}
.ep-checkout .checkout-captcha {
  margin: 1rem 0;
  max-width: 100%;
  overflow-x: auto;
}
.ep-shell .ep-checkout .checkout-error {
  padding: 1rem;
  border: 1px solid var(--ep-error);
  border-left-width: 4px;
  border-radius: var(--ep-r-sm);
  background: var(--ep-error-bg);
  color: var(--ep-error);
  white-space: pre-wrap;
}
.ep-shell .ep-checkout .checkout-success {
  padding: 1rem;
  border: 1px solid var(--ep-good);
  border-left-width: 4px;
  border-radius: var(--ep-r-sm);
  background: var(--ep-good-bg);
  color: var(--ep-good);
}
.ep-checkout :is(.checkout-payment-element, .checkout-payment-status) {
  margin-block: 1rem;
  min-width: 0;
}
.ep-shell .ep-member #member-payment {
  width: 100%;
  max-width: 42rem;
}
.ep-shell .ep-member #member-message {
  line-height: 1.7;
}
/* 6. Responsive and motion. A single in-flow sticky bar avoids fixed overlays. */
@media (min-width: 40rem) {
  :root {
    --ep-gutter: 1.5rem;
  }
  .ep-shell .ep-event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ep-shell .ep-checkout,
  .ep-shell .ep-member {
    padding: 2rem;
  }
  .ep-shell .ep-checkout .checkout-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .ep-shell .ep-checkout .checkout-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
  .ep-checkout .checkout-actions button {
    width: auto;
  }
  .ep-shell .ep-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 60rem) {
  .ep-shell .ep-nav {
    width: auto;
  }
  .ep-shell .ep-listing-hero {
    padding-block: 3rem;
  }
  .ep-shell .ep-listing-body {
    padding-block: 2rem;
  }
  .ep-shell .ep-event-hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
  }
  .ep-shell .ep-detail {
    padding-block: 3rem;
  }
  .ep-shell .ep-detail > .ep-checkout,
  .ep-shell .ep-detail > #eventche > .ep-member {
    max-width: 50rem;
  }
}
@media (min-width: 70rem) {
  .ep-shell .ep-event-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.ep-shell) {
    scroll-behavior: auto;
  }
  .ep-shell
    :where(.ep-button, .ep-card, .ep-checkout button, .ep-member button) {
    transition: none;
    animation: none;
  }
}

/* Council adjustments: calendar artwork, mobile registration and desktop order. */
.ep-contact .ep-wrap {
  justify-content: space-between;
}
.ep-card-art {
  position: relative;
}
.ep-card-art .ep-date-chip {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
}
.ep-date-chip {
  padding: 0 0 0.4rem;
  overflow: hidden;
  background: #fff;
  color: var(--ep-navy);
  box-shadow: var(--ep-shadow);
}
.ep-date-chip-month {
  width: 100%;
  padding: 0.3rem 0.6rem;
  background: var(--ep-navy);
  color: #fff;
  text-align: center;
}
.ep-date-chip strong {
  padding: 0.3rem 0.6rem 0;
}
.ep-shell .ep-card-location {
  margin: 0;
  font-size: var(--ep-sm);
  color: var(--ep-muted);
}
.ep-shell .ep-checkout .checkout-details > fieldset {
  display: grid;
  gap: 0;
}
.ep-checkout-fields,
.ep-checkout-confirm {
  min-width: 0;
}
.ep-shell .ep-checkout button[type="submit"] {
  background: var(--ep-navy);
  color: #fff;
  box-shadow: var(--ep-shadow);
}
.ep-shell .ep-checkout button[type="submit"]:hover {
  background: var(--ep-blue-hover);
}
.ep-shell .ep-checkout button[type="submit"]:disabled {
  background: var(--ep-line);
  color: var(--ep-muted);
  box-shadow: none;
}
@media (min-width: 60rem) {
  .ep-shell .ep-checkout .checkout-details > fieldset:has(> .ep-order-summary) {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr);
    column-gap: 2rem;
    align-items: start;
  }
  .ep-checkout .ep-order-summary {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 8rem;
  }
  .ep-checkout .ep-checkout-fields,
  .ep-checkout .ep-checkout-confirm {
    grid-column: 1;
  }
  .ep-shell .ep-detail > .ep-checkout {
    max-width: none;
  }
}
@media (max-width: 719px) {
  /* In flow, never stuck: a bottom-stuck bar covers the hero when text is enlarged. */
  .ep-shell .ep-detail .ep-register-bar {
    position: static;
    margin: 0;
    border-radius: 0;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Reset the legacy direct card-child padding on artwork only. */
.ep-shell .ep-card > .ep-card-art {
  padding: 0;
}

/* Only generated custom-page fallbacks receive gutters; CMS sections own theirs. */
.ep-shell .ep-custom-fallback,
.ep-shell .custom-page > h1:not(.sr-only) {
  margin-inline: max(5vw, 20px);
}
.ep-attendees-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block: 1.5rem 0.75rem;
}
.ep-attendees-heading .ep-checkout-section {
  margin: 0;
}
.checkout-captcha iframe {
  display: block;
}
.ep-checkout #checkout-coupon-status:has([data-coupon-result="null"]) {
  color: var(--ep-error);
}
html:has(.ep-shell) {
  scroll-padding-bottom: 1rem;
}
.ep-shell :where(input, select, textarea, button, #eventche) {
  scroll-margin-block: 1rem;
}
/* Unstyled top-level CMS text and checkout slots use fallback gutters.
   Authored sections and their full-bleed layouts remain untouched. */
:where(.ep-shell .custom-page > [class^="ev-page-"]) > :where(h2:not([class]):not([style]), h3:not([class]):not([style]), p:not([class]):not([style]), ul:not([class]):not([style]), ol:not([class]):not([style])),
:where(.ep-shell .custom-page > [class^="ev-page-"]) > .ep-checkout {
  margin-inline: max(5vw, 20px);
}

/* 9. Front page flair: bold gradient hero, glow accents, livelier cards. */
.ep-shell .ep-listing-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  padding-block: 2.5rem 4.5rem;
  border-bottom: 0;
  background:
    radial-gradient(60rem 28rem at 88% -10%, rgb(249 111 89 / 0.55), transparent 60%),
    radial-gradient(40rem 24rem at 5% 120%, rgb(8 98 168 / 0.9), transparent 65%),
    linear-gradient(135deg, #001a3d 0%, #002b5b 45%, #0862a8 100%);
}
.ep-listing-hero::before,
.ep-listing-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.ep-listing-hero::before {
  width: 22rem;
  height: 22rem;
  right: -6rem;
  top: -8rem;
  border: 2px solid rgb(255 255 255 / 0.14);
  box-shadow: 0 0 0 3rem rgb(255 255 255 / 0.04), 0 0 0 6rem rgb(255 255 255 / 0.03);
}
.ep-listing-hero::after {
  width: 16rem;
  height: 16rem;
  left: -5rem;
  bottom: -9rem;
  background: radial-gradient(circle, rgb(249 111 89 / 0.5), transparent 70%);
}
.ep-listing-hero h1 {
  color: #fff;
  background: linear-gradient(100deg, #fff 55%, #ffc4b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ep-listing-hero .ep-intro {
  color: #dbe7f5;
}
/* Curved lip where the hero meets the page. */
.ep-listing-hero .ep-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.25rem;
  background: var(--ep-bg, #f3f6fb);
  clip-path: ellipse(75% 100% at 50% 100%);
}
.ep-shell .ep-listing-body {
  position: relative;
}
.ep-listing-body h2 {
  display: inline-block;
  padding-bottom: 0.35rem;
  border-bottom: 4px solid #f96f59;
  border-image: linear-gradient(90deg, #f96f59, #0862a8) 1;
}
.ep-shell .ep-card {
  border-color: transparent;
  box-shadow: 0 1px 2px rgb(0 43 91 / 0.06), 0 10px 28px rgb(0 43 91 / 0.1);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.ep-shell .ep-card::after {
  content: "";
  order: -1;
  height: 4px;
  background: linear-gradient(90deg, #002b5b, #0862a8 55%, #f96f59);
}
.ep-shell .ep-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgb(0 43 91 / 0.08), 0 18px 40px rgb(0 43 91 / 0.18);
}
.ep-shell .ep-card-media {
  background: linear-gradient(135deg, #002b5b, #0862a8);
}
.ep-shell .ep-card-body .button:not(.ep-button--secondary),
.ep-shell .ep-card .ep-button:not(.ep-button--secondary) {
  background: linear-gradient(120deg, #0862a8, #0a4f8a);
}
@media (prefers-reduced-motion: reduce) {
  .ep-shell .ep-card, .ep-shell .ep-card:hover { transition: none; transform: none; }
}

/* Particle canvas sits above the gradients, below the hero text and curved lip. */
.ep-listing-hero .ep-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ep-listing-hero { pointer-events: auto; }

/* 10. Header polish: refined utility bar, gradient nav bar with brand mark, pill links. */
.ep-shell .ep-contact {
  background: linear-gradient(90deg, #00214a, #0862a8);
  font-size: 0.8rem;
}
.ep-contact .ep-wrap {
  align-items: center;
}
.ep-contact p {
  margin: 0;
}
.ep-contact-tag {
  display: none;
  color: #cfe0f3;
  letter-spacing: 0.02em;
}
.ep-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-left: auto !important;
}
.ep-shell .ep-contact a svg {
  margin-right: 0.4rem;
  opacity: 0.9;
}
.ep-shell .ep-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.ep-shell .ep-header {
  border-top: 0;
  background: linear-gradient(180deg, #002b5b, #001f45);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.08) inset, 0 6px 20px rgb(0 20 50 / 0.25);
}
.ep-header .ep-wrap {
  padding-block: 0.5rem;
}
.ep-shell .ep-brand {
  align-items: center;
  gap: 0.6rem;
}
.ep-brand b {
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ep-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #f96f59, #ff9c7d);
  color: #002b5b;
  font-style: normal;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 4px 12px rgb(249 111 89 / 0.4);
}
.ep-brand span {
  padding: 0.15rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 999px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Nav: one scrollable row on phones, pills with a coral active state. */
.ep-shell .ep-nav {
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin-inline: -0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.ep-nav::-webkit-scrollbar {
  display: none;
}
.ep-nav a {
  flex: none;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.ep-nav a:hover {
  background: rgb(255 255 255 / 0.12);
}
.ep-nav a[aria-current="page"] {
  background: #f96f59;
  color: #002b5b;
}
@media (min-width: 48rem) {
  .ep-contact-tag {
    display: block;
  }
}
@media (min-width: 60rem) {
  .ep-shell .ep-header {
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .ep-shell .ep-nav {
    margin: 0;
    overflow: visible;
  }
  .ep-shell .ep-brand {
    font-size: 1.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ep-nav a {
    transition: none;
  }
}

/* 11. Header v2: wordmark only, uppercase tracked nav, soft-square active state, CTA, floating bar on desktop. */
.ep-brand-mark { display: none; }
.ep-shell .ep-brand {
  gap: 0.75rem;
  letter-spacing: 0.04em;
}
.ep-brand b {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.ep-brand span {
  padding: 0 0 0 0.75rem;
  border: 0;
  border-left: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 0;
  color: #f96f59;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
}
.ep-shell .ep-nav {
  gap: 0.15rem;
}
.ep-nav a {
  padding: 0 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ep-nav a:hover {
  background: rgb(255 255 255 / 0.08);
}
.ep-nav a[aria-current="page"] {
  background: rgb(249 111 89 / 0.16);
  color: #ff9c86;
}
.ep-nav a.ep-nav-cta,
.ep-nav a.ep-nav-cta:hover {
  margin-left: 0.5rem;
  min-height: 40px;
  padding: 0 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #f96f59, #ffa78f);
  color: #002b5b;
  font-weight: 800;
  box-shadow: 0 6px 18px rgb(249 111 89 / 0.35);
}
.ep-nav a.ep-nav-cta:hover {
  filter: brightness(1.06);
}
@media (min-width: 60rem) {
  .ep-shell .ep-header {
    top: 0.75rem;
    margin: 0.75rem max(1rem, 3vw) 0;
    background: transparent;
    box-shadow: none;
  }
  .ep-header .ep-wrap {
    width: 100%;
    max-width: calc(var(--ep-width) + 4rem);
    margin-inline: auto;
    padding: 0.35rem 1.5rem;
    border: 1px solid rgb(249 111 89 / 0.28);
    border-radius: 22px;
    background: rgb(0 31 69 / 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 32px rgb(0 20 50 / 0.35);
  }
}

/* Listing: let the floating header sit over the hero gradient instead of on a pale gap. */
@media (min-width: 60rem) {
  body:has(.ep-listing-hero) .ep-header {
    margin-bottom: -4.6rem;
  }
  body:has(.ep-listing-hero) .ep-listing-hero {
    padding-top: calc(3rem + 4.6rem);
  }
}

/* Frosted-glass utility bar on the front page: out of flow, hero gradient runs beneath it. */
body.ep-shell:has(.ep-listing-hero) .ep-contact {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 36px;
  background: rgb(255 255 255 / 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgb(255 255 255 / 0.16);
}
/* Phones: the solid header starts below the bar. */
body.ep-shell:has(.ep-listing-hero) .ep-header {
  padding-top: 36px;
}
@supports not (backdrop-filter: blur(1px)) {
  body.ep-shell:has(.ep-listing-hero) .ep-contact {
    background: rgb(0 33 74 / 0.75);
  }
}
@media (min-width: 60rem) {
  /* Floating header sits 36px (bar) + 12px down; hero is pulled up to the page top. */
  body.ep-shell:has(.ep-listing-hero) .ep-header {
    padding-top: 0;
    margin-top: calc(36px + 0.75rem);
    top: calc(0.75rem);
  }
  body.ep-shell:has(.ep-listing-hero) .ep-listing-hero {
    margin-top: calc(-1 * (36px + 0.75rem - 16.6px));
    padding-top: calc(3rem + 4.6rem + 36px + 0.75rem - 16.6px);
  }
}
/* Stop the header's top margin collapsing through <body> and exposing a pale strip above the hero. */
body.ep-shell:has(.ep-listing-hero) {
  display: flow-root;
}
/* Keep the hero's negative top margin from collapsing into the header's negative bottom margin. */
body.ep-shell:has(.ep-listing-hero) main {
  display: flow-root;
}

/* Native confirmation and printable admission cards. */
.ep-status { max-width: 1120px; margin: 0 auto; overflow-wrap: anywhere; }
.ep-status-header { display: block; padding: 1rem 0 2rem; background: transparent; color: var(--ep-navy, #132340); }
.ep-status-header h1 { color: var(--ep-navy, #132340); font-size: clamp(2rem, 6vw, 3.5rem); margin: .6rem 0; }
.ep-status-header p { max-width: 70ch; white-space: pre-line; }
.ep-status-grid { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.ep-status-card { padding: clamp(1.1rem, 3vw, 2rem); border-top: 3px solid var(--ep-coral, #ef745f); }
.ep-status-card h2, .ep-status-card h3 { margin-top: .5rem; }
.ep-status-card dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; }
.ep-status-card dd { margin: 0; font-weight: 600; }
.ep-status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.ep-status-note { font-size: .875rem; color: #526078; }
.ep-status-ticket { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; break-inside: avoid; }
.ep-status-qr { flex: 0 0 150px; background: white; }
.ep-status [hidden] { display: none !important; }
@media (min-width: 760px) { .ep-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .ep-status *, .ep-status *::before, .ep-status *::after { animation: none !important; transition: none !important; } }
@media print {
 body.ep-shell { background: white; color: black; }
 .ep-header, .ep-contact, .ep-footer, .ep-skip, .ep-status-actions, .ep-status-note, .ep-status > .ep-card { display: none !important; }
 .ep-status-grid { display: block; }
 .ep-status-card { box-shadow: none; border: 1px solid #777; margin-bottom: 1rem; }
 .ep-status-ticket { display: flex; }
 .ep-status-header { padding: 0; }
 .ep-status-qr { print-color-adjust: exact; }
}
.ep-status-panel { max-width: 1200px; }
.ep-status-header h1 { color: inherit; }

/* Review fixes: mobile nav wraps instead of clipping the CTA; interior pages get a solid strip behind the floating header. */
@media (max-width: 59.99rem) {
  .ep-shell .ep-nav {
    flex-wrap: wrap;
    overflow: visible;
    margin-inline: 0;
    row-gap: 0.25rem;
  }
}
@media (min-width: 60rem) {
  body.ep-shell:not(:has(.ep-listing-hero)):not(:has(.custom-page)) .ep-header {
    top: 0;
    margin: 0;
    padding: 0.75rem max(1rem, 3vw) 0;
    background: var(--ep-bg);
    box-shadow: none;
  }
}

/* Custom event pages start UNDER the header (desktop). The header and glass utility bar float over the top of the
   page content, so authors can run full-bleed heroes to the very top. Pad your own hero with
   var(--ep-header-offset) (the height of the bar + header, 0 where the header is not overlaid, e.g. phones). */
:root {
  --ep-header-offset: 0px;
}
@media (min-width: 60rem) {
  body.ep-shell:has(.custom-page) {
    --ep-header-offset: 105px; /* 36px utility bar + 12px gap + 57px header */
    display: flow-root;
  }
  body.ep-shell:has(.custom-page) main {
    display: flow-root;
  }
  body.ep-shell:has(.custom-page) .ep-contact {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: 36px;
    background: rgb(255 255 255 / 0.1);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid rgb(255 255 255 / 0.16);
  }
  body.ep-shell:has(.custom-page) .ep-header {
    top: 0.75rem;
    margin: calc(36px + 0.75rem) max(1rem, 3vw) -4.6rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  body.ep-shell:has(.custom-page) .custom-page {
    margin-top: calc(-1 * (36px + 0.75rem - 16.6px));
  }
}

/* Council status-page fixes: contrast, sticky positioning, admission printouts and touch targets. */
body.ep-shell:has(.ep-listing-hero) .ep-contact,
body.ep-shell:has(.custom-page) .ep-contact {
  background: rgb(0 20 50 / .75);
}
@media (min-width: 60rem) {
  body.ep-shell:has(.custom-page) .ep-header { top: 0; }
  body.ep-shell:has(.custom-page) #eventche {
    scroll-margin-top: calc(var(--ep-header-offset) + .75rem);
  }
}
.ep-status-actions a { min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 760px) {
  .ep-status-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
}
@media print {
  .ep-status-ticket .ep-status-actions { display: block !important; }
  .ep-status-ticket .ep-status-actions button { display: none !important; }
  .ep-status-join { display: block !important; color: #000 !important; background: none !important; }
  .ep-status-join::after { content: " (" attr(href) ")"; overflow-wrap: anywhere; }
}

/* Admission passes: a stub with the QR, then the guest and event. Print outputs only these cards. */
.ep-ticket-list { display: grid; gap: 1rem; }
.ep-status-tickets + .ep-card { margin-top: 1rem; }
.ep-ticket {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 220px;
  overflow: hidden;
  border: 1px solid #d5deea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(0 31 69 / 0.08);
  break-inside: avoid;
}
.ep-ticket-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 0.85rem;
  background: #002756;
  color: #fff;
  text-align: center;
}
.ep-ticket-stub::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 0;
  bottom: 14px;
  border-right: 2px dashed rgb(255 255 255 / 0.4);
}
.ep-ticket-brand { flex: 0 0 auto; margin: 0; color: #f96f59; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em; white-space: nowrap; }
.ep-ticket-qr { display: block; padding: 6px; border-radius: 8px; background: #fff; }
.ep-ticket-mark { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.ep-ticket-ref { margin: 0; max-width: 100%; font-size: 0.68rem; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.ep-ticket-body { padding: 1.1rem 1.25rem 1.15rem; }
.ep-ticket-kicker { margin: 0; color: #f96f59; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.ep-ticket h3 { margin: 0.2rem 0 0.15rem; color: #002756; font-size: clamp(1.35rem, 2vw, 1.7rem); }
.ep-ticket-type { margin: 0; color: #334155; font-weight: 650; }
.ep-ticket dl { display: grid; gap: 0.35rem; margin: 0.85rem 0 0; }
.ep-ticket dl div { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 0.35rem 0.75rem; }
.ep-ticket dt { margin: 0; color: #64748b; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ep-ticket dd { margin: 0; color: #132340; font-weight: 650; }
.ep-ticket-actions { margin-top: 0.9rem; }
.ep-ticket-void { box-shadow: none; }
.ep-ticket-void .ep-ticket-stub { background: #64748b; }
.ep-ticket-void .ep-ticket-kicker { color: #9a3412; }
@media (max-width: 640px) {
  .ep-ticket { grid-template-columns: 1fr; }
  .ep-ticket-stub { flex-direction: row; justify-content: flex-start; text-align: left; }
  .ep-ticket-stub::after { top: auto; right: 14px; bottom: 0; left: 14px; border-right: 0; border-bottom: 2px dashed rgb(255 255 255 / 0.4); }
  .ep-ticket-ref { margin-left: auto; max-width: 42%; text-align: right; }
}
@media print {
  .ep-status-header, .ep-status-grid, .ep-status > .ep-card, .ep-status > .ep-status-actions, #status-copy-result,
  .ep-status-tickets > h2, .ep-status-tickets > p { display: none !important; }
  .ep-ticket-list { display: block; }
  .ep-ticket {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    width: 100%;
    margin: 0 0 16pt;
    border: 1px solid #002756;
    box-shadow: none;
    break-inside: avoid;
    page-break-after: always;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .ep-ticket-actions button { display: none !important; }
}

/* Slim utility strip. It still grows if the association line or links wrap. */
body.ep-shell:has(.ep-listing-hero) .ep-contact,
body.ep-shell:has(.custom-page) .ep-contact {
  position: relative;
  top: auto;
  height: auto;
  min-height: 1.75rem;
  padding-block: 0.1rem;
}
@media (min-width: 60rem) {
  body.ep-shell:has(.ep-listing-hero) .ep-contact a,
  body.ep-shell:has(.custom-page) .ep-contact a {
    min-height: 1.5rem;
  }
}
body.ep-shell:has(.ep-listing-hero) .ep-header {
  padding-top: 0;
}
.ep-contact .ep-wrap,
.ep-contact-links {
  align-items: center;
}
.ep-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
#events-error[hidden] {
  display: none;
}
.ep-filter .htmx-indicator {
  margin: 0.75rem 0 0;
}
@media (min-width: 60rem) {
  body.ep-shell:has(.ep-listing-hero) .ep-header {
    margin-top: 0.75rem;
    padding-top: 0;
  }
  body.ep-shell:has(.ep-listing-hero) .ep-listing-hero {
    margin-top: 0;
  }
  body.ep-shell:has(.custom-page) .ep-header {
    margin-top: 0.75rem;
  }
  body.ep-shell:has(.custom-page) .custom-page {
    margin-top: 0;
  }
  body.ep-shell:has(.custom-page) {
    --ep-header-offset: 5.5rem;
  }
  body.ep-shell:has(.custom-page) .ep-custom-lead,
  body.ep-shell:has(.custom-page) .custom-page > h1:not(.sr-only) {
    padding-top: calc(var(--ep-header-offset) + 0.75rem);
  }
  body.ep-shell:has(.custom-page) .ep-custom-fallback {
    scroll-margin-top: calc(var(--ep-header-offset) + 0.75rem);
  }
}

/* Compact mobile navigation keeps the event content in the first screen. */
.ep-menu-toggle { display: none; }
@media (max-width: 59.99rem) {
  .ep-shell .ep-header { position: relative; margin: 0; padding: 0; border-radius: 0; }
  .ep-header .ep-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding-block: .5rem; }
  .ep-shell .ep-brand { flex: 0 1 auto; min-height: 44px; gap: .5rem; }
  .ep-brand b { font-size: 1.25rem; }
  .ep-brand span { font-size: .625rem; padding-left: .5rem; letter-spacing: .12em; }
  .ep-menu-toggle:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .5rem .75rem; border: 1px solid #71849d; border-radius: 8px; background: transparent; color: white; font: inherit; font-size: .875rem; cursor: pointer; }
  .ep-shell .ep-nav { flex: 1 0 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .375rem; padding-block: .25rem; }
  .ep-menu-ready:not(.ep-menu-open) .ep-nav { display: none; }
  .ep-nav a { justify-content: center; font-size: .75rem; letter-spacing: .04em; white-space: normal; text-align: center; padding: .5rem; }
  .ep-nav a.ep-nav-cta { margin: 0; padding: .5rem; min-height: 44px; box-shadow: none; }
  .ep-shell .ep-contact { font-size: .7rem; border-radius: 0; }
  .ep-contact .ep-wrap { justify-content: center; }
  .ep-contact-links { justify-content: center; margin-inline: 0 !important; gap: .125rem .75rem; }
  .ep-contact-links a { min-height: 32px; }
}
