:root {
  --ocean: #0B4F6C;
  --ocean-deep: #083247;
  --ocean-mid: #156785;
  --sand: #FAF7F2;
  --sand-2: #F3EDE3;
  --sand-3: #E7DDD0;
  --coral: #E06D53;
  --coral-dark: #C4553C;
  --palm: #2A7A5B;
  --plum: #7A4E9B;
  --ink: #1C2A32;
  --muted: #5B6A72;
  --line: rgba(11, 79, 108, 0.14);
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(11, 79, 108, 0.12);
  --radius: 18px;
  --max: 1120px;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --seg-music: #0B4F6C;
  --seg-night: #7A4E9B;
  --seg-holiday: #E06D53;
  --seg-wellness: #2A7A5B;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--sand);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--ocean); }
button, input, select { font: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ocean);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner, .wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ocean);
}
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.12rem;
}
.brand-text span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover { color: var(--coral-dark); }
.nav-cta {
  background: var(--ocean);
  color: #fff !important;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}
.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(224,109,83,0.35), transparent 55%),
    linear-gradient(165deg, var(--ocean-deep) 0%, var(--ocean) 48%, #16586f 100%);
  padding: 4.2rem 0 4.8rem;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 90px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath fill='%23FAF7F2' d='M0 50c120 30 240-30 360-20s240 50 360 30 240-50 360-20 240 40 360 10v40H0Z'/%3E%3C/svg%3E") no-repeat bottom / 100% 90px;
  pointer-events: none;
}
.eyebrow {
  display: inline-block;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 600;
  color: #f3d2c7;
  margin-bottom: 0.8rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 560;
  font-size: clamp(2.3rem, 5.6vw, 4.3rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  max-width: 14ch;
}
.hero-lead {
  max-width: 38rem;
  font-size: 1.12rem;
  color: rgba(255,255,255,0.88);
  margin: 0 0 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 550;
  line-height: 1.2;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); }
.btn-light { background: #fff; color: var(--ocean); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-outline {
  background: #fff;
  color: var(--ocean);
  border-color: var(--line);
}
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.88rem; }

/* Disclaimer */
.disclaimer, .disclaimer-inline {
  background: #fff6e8;
  border: 1px solid #efd7a8;
  color: #5a3f12;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
}
.disclaimer { margin: -1.2rem auto 2.4rem; position: relative; z-index: 2; }
.disclaimer strong, .disclaimer-inline strong { color: #3d2a0c; }

section { padding: 3.2rem 0; }
section + section { border-top: 1px solid var(--line); }
.section-kicker {
  color: var(--coral-dark);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 650;
  margin: 0 0 0.45rem;
}
h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 560;
  line-height: 1.15;
  margin: 0 0 0.6rem;
  color: var(--ocean-deep);
}
.lede { color: var(--muted); max-width: 46rem; margin: 0 0 1.4rem; }

/* Pills / filters */
.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1rem; }
.pill, .chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  cursor: pointer;
}
.pill[aria-pressed="true"], .pill.active, .chip.active {
  background: var(--ocean);
  color: #fff;
  border-color: var(--ocean);
}
.pill .count {
  display: inline-block;
  margin-left: 0.25rem;
  opacity: 0.75;
  font-size: 0.8em;
}
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 1rem;
}
.search {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  min-width: 0;
}

/* Calendar */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.8rem; }
.subscribe {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0 0 1.2rem;
  box-shadow: 0 8px 24px rgba(11,79,108,0.05);
}
.subscribe h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.subscribe p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.92rem; }
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
}
.feed-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  background: var(--sand);
}
.feed-card strong { display: block; margin-bottom: 0.45rem; font-size: 0.92rem; }
.feed-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.calendar-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0.8rem;
  box-shadow: var(--shadow);
  min-height: 520px;
}
#calendar { min-height: 500px; }
.fc { --fc-border-color: var(--line); --fc-page-bg-color: transparent; --fc-today-bg-color: #f3e3d4; --fc-button-bg-color: var(--ocean); --fc-button-border-color: var(--ocean); --fc-button-hover-bg-color: var(--ocean-mid); --fc-button-active-bg-color: var(--ocean-deep); --fc-event-border-color: transparent; }
.fc .fc-toolbar-title { font-family: var(--font-serif); font-size: 1.25rem; color: var(--ocean-deep); }
.fc .fc-button { border-radius: 999px; text-transform: none; font-weight: 550; padding: 0.3rem 0.7rem; }
.fc .fc-event { border-radius: 8px; padding: 1px 4px; cursor: pointer; }
.event-music { background: var(--seg-music); }
.event-night { background: var(--seg-night); }
.event-holiday { background: var(--seg-holiday); }
.event-wellness { background: var(--seg-wellness); }
.event-unconfirmed { opacity: 0.82; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5); }

/* Modal */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 32, 47, 0.52);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-card {
  background: #fff;
  width: min(620px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 22px 22px 0 0;
  padding: 1.3rem 1.3rem 1.6rem;
  position: relative;
}
@media (min-width: 740px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 22px; }
}
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  border: 0;
  background: var(--sand-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.modal-card h3 { font-family: var(--font-serif); margin: 0.5rem 0 0.4rem; font-size: 1.6rem; }
.meta-list { margin: 0.6rem 0; padding: 0; list-style: none; color: var(--muted); }
.meta-list li { margin: 0.25rem 0; }

/* Directory */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: 0 10px 28px rgba(11,79,108,0.05);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.card-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.rank {
  font-family: var(--font-serif);
  color: var(--coral-dark);
  font-size: 1.05rem;
  font-weight: 650;
}
.flags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.flag {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.flag-ok { background: #e4f5eb; color: #1c5c3a; }
.flag-gap { background: #fff1d6; color: #7a4d00; }
.flag-low { background: #eee; color: #555; }
.irc {
  display: inline-flex;
  align-items: center;
  background: var(--sand-2);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ocean);
}
.card h3 { margin: 0; font-size: 1.18rem; font-family: var(--font-serif); }
.card .area { color: var(--muted); font-size: 0.92rem; margin: 0; }
.card .notes { margin: 0.2rem 0 0; font-size: 0.94rem; }
.card-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.4rem; }
.cat-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.empty { color: var(--muted); padding: 1rem 0; }

/* FAQ */
.accordion { display: grid; gap: 0.7rem; }
.acc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.acc summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.1rem;
  font-weight: 600;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary .topic {
  display: block;
  color: var(--coral-dark);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-weight: 650;
}
.acc[open] summary { border-bottom: 1px solid var(--line); }
.acc .acc-body { padding: 0.9rem 1.1rem 1.15rem; }
.acc .acc-body p { margin-top: 0; }
.acc .acc-body a { font-weight: 600; }

/* Sources */
.source-groups { display: grid; gap: 1.4rem; }
.source-groups h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.source-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.45rem 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.source-list a { text-decoration: none; font-weight: 550; }
.source-list a:hover { text-decoration: underline; }

/* Footer */
.site-footer {
  background: var(--ocean-deep);
  color: rgba(255,255,255,0.86);
  padding: 2.4rem 0 2rem;
  margin-top: 1rem;
}
.site-footer a { color: #f3d2c7; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
}
.site-footer .disclaimer-inline {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #FFFDF9;
}
.site-footer .disclaimer-inline strong {
  color: #F7D794;
}
.legal { font-size: 0.85rem; margin-top: 1.2rem; color: rgba(255,255,255,0.65); }

.toast {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ocean-deep);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  z-index: 80;
  font-size: 0.9rem;
}
.toast[hidden] { display: none; }

@media (max-width: 800px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
}

/* FullCalendar contrast and month-view typography */
.fc .fc-daygrid-event,
.fc .fc-timegrid-event,
.fc .fc-daygrid-block-event,
.fc .fc-daygrid-dot-event {
  color: #FFFDF9 !important;
  border: 0 !important;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  padding: 1px 4px;
}
.fc .fc-daygrid-event .fc-event-main,
.fc .fc-timegrid-event .fc-event-main,
.fc .fc-daygrid-event .fc-event-time,
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-timegrid-event .fc-event-time,
.fc .fc-timegrid-event .fc-event-title,
.fc .fc-daygrid-dot-event .fc-event-title,
.fc .fc-daygrid-dot-event .fc-event-time,
.fc .fc-h-event .fc-event-title,
.fc .fc-h-event .fc-event-time {
  color: #FFFDF9 !important;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.fc .fc-daygrid-event .fc-event-title {
  font-weight: 600;
}
.fc-daygrid-event-harness { margin-bottom: 1px; }
.fc .fc-more-link { color: var(--ocean); font-weight: 650; }

/* List view: light tint, dark text, strong left accent (never dark-on-dark) */
.fc .fc-list-event.event-music td { background: #E6F1F6; box-shadow: inset 5px 0 0 #0B4F6C; }
.fc .fc-list-event.event-night td { background: #F1EAF6; box-shadow: inset 5px 0 0 #7A4E9B; }
.fc .fc-list-event.event-holiday td { background: #FCEDE8; box-shadow: inset 5px 0 0 #E06D53; }
.fc .fc-list-event.event-wellness td { background: #E7F4EE; box-shadow: inset 5px 0 0 #2A7A5B; }
.fc .fc-list-event .fc-list-event-time,
.fc .fc-list-event .fc-list-event-title,
.fc .fc-list-event .fc-list-event-title a,
.fc .fc-list-event td {
  color: #0B3B4F !important;
}
.fc .fc-list-event:hover td {
  filter: brightness(0.97);
  color: #0B3B4F !important;
}
.fc .fc-list-event:hover .fc-list-event-title a {
  color: #0B3B4F !important;
}

/* Mobile toolbar + menu button */
.menu-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  color: var(--ocean);
  border: 1px solid var(--line);
  box-shadow: none;
  outline: none;
  line-height: 1;
  min-height: 36px;
}
.menu-toggle:focus,
.menu-toggle:hover {
  background: #fff;
  color: var(--ocean-deep);
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.15);
}

@media (max-width: 640px) {
  .fc .fc-header-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    position: sticky;
    top: 62px;
    z-index: 8;
    background: #fff;
    padding: 0.45rem 0 0.4rem;
    margin: 0;
  }
  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .fc .fc-toolbar-title {
    font-size: 1.15rem !important;
    text-align: center;
    width: 100%;
  }
  .fc .fc-button {
    margin: 0 !important;
  }

  /* Keep the list view inside the viewport: no horizontal scroll, wrapping titles */
  #calendar-section,
  .calendar-shell,
  #calendar,
  .fc,
  .fc .fc-view-harness,
  .fc .fc-view,
  .fc .fc-list,
  .fc .fc-scroller,
  .fc .fc-list-table {
    max-width: 100%;
    box-sizing: border-box;
  }
  .calendar-shell,
  #calendar,
  .fc .fc-view-harness,
  .fc .fc-list,
  .fc .fc-scroller {
    overflow-x: hidden;
  }
  .fc .fc-list-table {
    table-layout: fixed;
    width: 100%;
  }
  .fc .fc-list-event-time,
  .fc .fc-list-event-graphic,
  .fc .fc-list-event-title,
  .fc .fc-list-day th,
  .fc .fc-list-day-cushion {
    min-width: 0;
    max-width: 100%;
  }
  .fc .fc-list-event-time {
    width: 6.4rem;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    padding-left: 0.5rem;
    padding-right: 0.35rem;
  }
  .fc .fc-list-table col.fc-col-time { width: 6.4rem; }
  .fc .fc-list-table col.fc-col-graphic { width: 0.7rem; }
  .fc .fc-list-table col.fc-col-title { width: auto; }
  .fc .fc-list-event-graphic {
    width: 0.7rem;
    padding: 0 !important;
    overflow: hidden;
  }
  .fc .fc-list-event-dot { display: none; }
  .fc .fc-list-event-title,
  .fc .fc-list-event-title a {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: visible;
    padding-right: 0.5rem;
  }
  /* The side-text is a second day label that sits in a stray right-hand column on narrow screens. */
  .fc .fc-list-day-side-text {
    display: none;
  }
  .fc .fc-list-day-cushion {
    display: block;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .fc-list-event .proj-badge,
  .proj-badge {
    display: block;
    max-width: 100%;
    width: fit-content;
    margin-left: 0;
    margin-top: 0.2rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.btn-gold {
  background: #F7D794;
  color: var(--ocean-deep);
}
.btn-gold:hover { background: #f3cc7a; color: var(--ocean-deep); }

#calendar-section, #directory, #faq, #sources-section, #calendar, #subscribe {
  scroll-margin-top: 4.75rem;
}

.fc .fc-daygrid-event .fc-event-main {
  display: block;
  white-space: normal;
}
.fc .fc-daygrid-event .fc-event-time {
  display: inline;
  margin-right: 0.28em;
}
.fc .fc-daygrid-event .fc-event-title {
  display: inline;
  white-space: normal;
}


/* Projected weekly occurrence badge */
.event-projected {
  outline: 1px dashed rgba(255, 255, 255, 0.7);
  outline-offset: -1px;
}
.proj-badge {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: #f3cc7a;
  color: #12323b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  vertical-align: middle;
  white-space: nowrap;
}
.fc-daygrid-event .proj-badge {
  display: block;
  margin: 0.1rem 0 0;
  white-space: normal;
  font-size: 0.62rem;
}
.fc-list-event .proj-badge {
  display: inline-block;
  max-width: 100%;
  margin-left: 0.4rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.modal-proj-badge {
  display: inline-block;
  margin: 0.35rem 0 0.2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f3cc7a;
  color: #12323b;
  font-size: 0.8rem;
  font-weight: 700;
}
.load-error {
  background: #fff4e5;
  border-left: 4px solid #c47b17;
  color: #3a2a0a;
}


@media (max-width: 640px) {
  /* Mobile list badges (must follow general .proj-badge rules) */
  .fc-list-event .proj-badge,
  .proj-badge {
    display: block;
    max-width: 100%;
    width: auto;
    margin-left: 0;
    margin-top: 0.2rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
