:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a2027;
  --muted: #5c6773;
  --border: #e3e7ec;
  /* Palette: coolors.co/ffd275-e8ae68-a57f60-e3a587-db5a42 (all warm) */
  /* Interactive (links, buttons, focus) — red-orange (db5a42, darkened for contrast) */
  --accent: #c0432b;
  --accent-hover: #a2371f;
  --accent-soft: #fbe6df;
  /* Give Support identity — warm brown (a57f60, darkened) */
  --give: #8a6850;
  --give-soft: #efe7df;
  /* Get Support identity — amber/ochre (e8ae68, darkened) */
  --get: #b07d2b;
  --get-soft: #fbf1dc;
  /* Event-type badge — neutral slate */
  --badge-bg: #eef1f4;
  --badge-text: #48566a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.05);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* Body text: Roboto (falls back to the device UI font if it can't load) */
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* Headings: Inter */
h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Accessibility ---- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Respect users who prefer reduced motion (disables the card hover-lift, etc.) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Layout toggle (Classic ⇄ Row view) — sits on the hero gradient */
.layout-toggle {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(36, 19, 9, 0.18);
  border-radius: 999px;
}
.layout-opt {
  font-size: 0.85rem;
  font-weight: 600;
  color: #241309;
  text-decoration: none;
  padding: 6px 15px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.layout-opt.is-active { background: #241309; color: #fff; }
.layout-opt:not(.is-active):hover { background: rgba(255, 255, 255, 0.6); }

/* Hero / welcome */
.hero {
  background: linear-gradient(120deg, #db5a42 0%, #e3a587 38%, #e8ae68 72%, #ffd275 100%);
  /* Dark text: white failed WCAG on the light warm gradient (~2:1); this is ~5.4:1 */
  color: #241309;
  padding: 56px 0 48px;
}
.hero h1 {
  margin: 0 0 14px;
  max-width: 900px;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.tagline strong { color: #241309; font-weight: 700; }
.tagline {
  margin: 0;
  max-width: 640px;
  font-size: 1.1rem;
  color: #241309;
}

/* Controls */
.controls { margin: 28px 0 8px; }

.search {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.search:focus { outline: 2px solid var(--accent); border-color: transparent; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-top: 16px;
}
.filter { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.filter span { font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.filter select,
.filter input[type="date"] {
  padding: 9px 12px;
  font-size: 0.95rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  min-width: 180px;
}
.filter input[type="date"] { min-width: 150px; }
/* Date filters on their own line */
.date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-top: 14px;
}

/* Timing segmented control (Upcoming / Anytime / All) — sits by the dates */
.timing-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px; /* match the date inputs so the labels line up */
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.timing-opt {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  height: 100%;
  padding: 0 13px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.timing-opt.is-active { background: var(--accent); color: #fff; }
.timing-opt:not(.is-active):hover { background: var(--accent-soft); color: var(--accent); }

/* Kid/pet toggles — deliberately small and low-key */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}
.mini-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}
.mini-filter input { width: 14px; height: 14px; accent-color: var(--accent); }
.toggle-row .reset { margin-left: auto; }

.reset {
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.reset:hover { background: #f6d6ca; }

.count { margin: 18px 0 4px; color: var(--muted); font-size: 0.9rem; }

/* Result section headings */
.section-heading {
  margin: 28px 0 4px;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-soft);
}
.section-sub { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; }

/* Give / Get section toggles */
.section-toggle { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 6px; }
.seg {
  flex: 1 1 240px; position: relative; text-align: left; cursor: pointer;
  padding: 15px 18px; border-radius: 14px; border: 2px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; gap: 3px;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}
.seg-title { font-weight: 700; font-size: 1.12rem; }
.seg-sub { font-size: 0.8rem; color: var(--muted); }
.seg-count {
  position: absolute; top: 14px; right: 16px;
  font-weight: 700; font-size: 1.1rem; min-width: 1.5em; text-align: right;
}
.seg-give.is-on { border-color: var(--give); background: var(--give-soft); }
.seg-give.is-on .seg-title, .seg-give.is-on .seg-count { color: var(--give); }
.seg-get.is-on { border-color: var(--get); background: var(--get-soft); }
.seg-get.is-on .seg-title, .seg-get.is-on .seg-count { color: var(--get); }
.seg:not(.is-on) { opacity: 0.55; }
.seg:not(.is-on) .seg-title { text-decoration: line-through; }
.seg:not(.is-on)::after {
  content: "Hidden — tap to show"; position: absolute; bottom: 13px; right: 16px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted);
}

/* Two-column Give / Get layout */
.columns { display: flex; gap: 28px; align-items: flex-start; padding-bottom: 8px; }
.column { flex: 1 1 0; min-width: 0; }
.column[hidden] { display: none; }
.col-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); padding-bottom: 0; }
.column-heading {
  margin: 16px 0 14px; font-size: 1.2rem; letter-spacing: -0.01em;
  padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.column-heading.give { border-bottom-color: var(--give); }
.column-heading.get { border-bottom-color: var(--get); }
.col-empty { color: var(--muted); font-size: 0.9rem; padding: 12px 0; }

@media (max-width: 820px) { .columns { flex-direction: column; } }

/* Event grid */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding-bottom: 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.14), 0 2px 6px rgba(16, 24, 40, 0.08);
  border-color: var(--accent);
}

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.01em; }
.org { font-weight: 600; font-size: 0.9rem; }
.org a { color: var(--accent); text-decoration: none; }
.org a:hover { text-decoration: underline; }

.badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  white-space: nowrap;
}

.desc { margin: 0; color: var(--muted); font-size: 0.95rem; }

.meta { display: flex; flex-direction: column; gap: 7px; font-size: 0.9rem; }
.meta-item { display: flex; gap: 8px; }
.meta-item .icon { flex-shrink: 0; width: 18px; text-align: center; }
.meta-item .val { color: var(--text); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag {
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f0f2f5;
  color: var(--muted);
}
.tag.kids { background: #e6effc; color: #1d4ed8; }
.tag.pets { background: #f0e9fb; color: #6d28d9; }

.card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; }
.contact { font-size: 0.82rem; color: var(--muted); word-break: break-word; }
.contact a { color: var(--accent); text-decoration: none; }
.contact a:hover { text-decoration: underline; }
.card-link {
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

.empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 1.05rem; }

/* Subscribe band */
.subscribe {
  background: var(--accent-soft);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
}
.subscribe-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.subscribe-copy h2 { margin: 0 0 4px; font-size: 1.35rem; letter-spacing: -0.01em; }
.subscribe-copy p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 10px; }
.subscribe-form input[type="email"] {
  padding: 12px 14px;
  font-size: 1rem;
  min-width: 240px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.subscribe-form input[type="email"]:focus { outline: 2px solid var(--accent); border-color: transparent; }
.btn-subscribe {
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.btn-subscribe:hover { background: var(--accent-hover); }
.subscribe-note { margin: 14px auto 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
.subscribe-note--active { color: var(--accent); font-weight: 600; }

/* Embedded MailerLite form: give it room in the centered column so it doesn't
   collapse. Its colours (button, etc.) are set in MailerLite's form designer —
   the widget's CSS loads cross-origin and can't be overridden from here. */
.subscribe-embed { width: 100%; max-width: 380px; }
.subscribe-embed .ml-embedded,
.subscribe-embed .ml-form-embedWrapper,
.subscribe-embed form,
.subscribe-embed .form-control {
  width: 100% !important;
  max-width: 100% !important;
}

.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;
}

/* Suggest-an-event form, tucked in a disclosure */
.suggest {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0;
}
.suggest-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.suggest-details summary span { color: var(--accent); }
.suggest-form { margin-top: 16px; max-width: 640px; }
.suggest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}
.suggest-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.suggest-grid input,
.suggest-grid textarea {
  padding: 9px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.suggest-grid input:focus,
.suggest-grid textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.suggest-wide { grid-column: 1 / -1; }
.suggest-form .btn-subscribe { margin-top: 14px; }
.hidden-field { display: none; }
@media (max-width: 560px) { .suggest-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
}
.site-footer p { margin: 0; color: var(--muted); font-size: 0.85rem; max-width: 720px; }
.version-line { margin-top: 10px !important; font-size: 0.8rem; color: var(--muted); }
.version-line [data-updated] { font-weight: 600; color: var(--text); }

@media (max-width: 560px) {
  .filter select { min-width: 0; width: 100%; }
  .filter { flex: 1 1 100%; }
}

/* Legal / privacy page */
.legal { max-width: 760px; padding-top: 28px; padding-bottom: 48px; }
.legal h2 { margin: 28px 0 8px; font-size: 1.25rem; }
.legal p, .legal li { color: var(--text); font-size: 0.98rem; }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a, .back-to-home { color: var(--accent); }
.back-to-home { font-weight: 600; text-decoration: none; }
.back-to-home:hover { text-decoration: underline; }

