/* ===================================================================
   Synagogue profile page (/portal/shul/{synId}).
   One hero for every width (cover → crest + name → actions), tabs, then
   a two-column body on desktop: content + a sticky "give" card.
   Foundation in /portal/css/{tokens,base,components,shell}.css.

   --shul-brand is set from the synagogue's branding color once it loads
   (portal blue until then). It tints the cover and small accents only —
   the donate button stays portal blue so it keeps its contrast whatever
   color a synagogue picks.
   =================================================================== */

:root { --shul-brand: var(--blue-700); }

body { background: var(--white); }
#app { min-height: 100vh; padding-bottom: 96px; }

.shul-wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero-cover {
  position: relative;
  height: 148px;
  background-color: var(--shul-brand);
  background-image:
    radial-gradient(120% 140% at 85% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(135deg, var(--shul-brand), color-mix(in oklch, var(--shul-brand) 72%, #000));
  background-size: cover;
  background-position: center;
}
.hero-cover.has-photo::after {
  /* Keeps the share/back buttons legible over any photo. */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), transparent 45%);
  pointer-events: none;
}
.hero-cover-actions {
  position: absolute;
  top: 12px;
  inset-inline: 12px;
  display: flex;
  justify-content: space-between;
  z-index: 1;
}
.cover-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}
.cover-btn:hover { background: rgba(15, 23, 42, 0.5); }
.cover-btn--end { margin-inline-start: auto; }

.hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: end;
  margin-top: -40px;
  position: relative;
}
.crest {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: var(--white);
  border: 4px solid var(--white);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--shul-brand);
  overflow: hidden;
}
.crest img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.hero-text { grid-column: 1 / -1; margin-top: 12px; min-width: 0; }
.hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--gray-900);
}
.hero-tagline {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-600);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin-top: 8px;
  font-size: 14px;
  color: var(--gray-600);
}
.hero-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.hero-meta > span + span::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gray-300);
  margin-inline: 10px;
}
.hero-meta i { color: var(--gray-400); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hero-badges:empty { display: none; }
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}
.badge-pill i { color: var(--success-dark); }
.badge-pill--tax { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }
.badge-pill--tax i { color: var(--blue-600); }

/* Actions — giving (mobile only; the give card owns it on desktop) +
   relationship actions (pledge / sponsor a day / follow). */
.hero-actions { grid-column: 1 / -1; margin-top: 18px; }
.hero-give { display: flex; gap: 8px; }
.btn-give {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  background: var(--blue-600);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn-give:hover { background: var(--blue-700); transform: translateY(-1px); }
.btn-bit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-800);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.btn-bit:hover { border-color: var(--gray-300); background: var(--gray-50); }
.btn-bit img { width: 26px; height: 26px; border-radius: 7px; display: block; flex: none; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--gray-500);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 5px; }
.hero-trust i { color: var(--success-dark); }

.hero-sec { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--gray-700);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
.btn-chip:hover { border-color: var(--gray-300); background: var(--gray-50); color: var(--gray-900); }
.btn-chip i { color: var(--gray-500); }
.btn-chip.is-on { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.btn-chip.is-on i { color: var(--white); }
.btn-chip:disabled { opacity: 0.6; cursor: progress; }

/* ── Tabs ─────────────────────────────────────────────────────── */
.shul-tabs-bar { margin-top: 24px; }
.shul-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
  scrollbar-width: none;
}
.shul-tabs::-webkit-scrollbar { display: none; }
.shul-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--gray-500);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}
.shul-tab:hover { color: var(--gray-800); }
.shul-tab[aria-selected="true"] { color: var(--gray-900); border-bottom-color: var(--gray-900); }
.shul-tab--link { margin-inline-start: auto; color: var(--gray-600); }
.shul-tab--link i { color: var(--gold-600); }
.shul-tab-count {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.shul-tab[aria-selected="true"] .shul-tab-count { background: var(--gray-900); color: var(--white); }

/* ── Body ─────────────────────────────────────────────────────── */
.shul-body { padding-top: 24px; padding-bottom: 48px; }
.shul-main { min-width: 0; }
.shul-aside { display: none; }

.panel-head { margin-bottom: 16px; }
.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}
.panel-sub { margin: 4px 0 0; font-size: 14px; color: var(--gray-500); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: 20px;
}
/* Cards stack with a gap. A gap (not `.card + .card` margins) so a hidden
   first card doesn't push the first visible one down. */
.shul-panel[data-panel="info"] { display: flex; flex-direction: column; gap: 16px; }
.card-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

/* About paragraph */
.about-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--gray-700);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.about-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-600);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* Prayer times */
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head .card-title { margin: 0; }
.card-meta { font-size: 13px; color: var(--gray-500); }
.day-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -4px 14px;
  padding: 2px 4px;
}
.day-pills::-webkit-scrollbar { display: none; }
.day-pill {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 58px;
  padding: 7px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--gray-700);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.day-pill:hover { border-color: var(--gray-300); }
.day-pill .dp-name { font-size: 14px; font-weight: 600; }
.day-pill .dp-date { font-size: 12px; color: var(--gray-500); }
.day-pill.is-shabbat .dp-name { color: var(--gold-700); }
.day-pill[aria-selected="true"] { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.day-pill[aria-selected="true"] .dp-name,
.day-pill[aria-selected="true"] .dp-date { color: var(--white); }
.day-labels { margin: -4px 0 10px; font-size: 14px; font-weight: 600; color: var(--gold-700); }
.ptimes { list-style: none; margin: 0; padding: 0; }
.ptime {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-top: 1px solid var(--gray-100);
  font-size: 15px;
}
.ptime:first-child { border-top: 0; }
.ptime-name { display: inline-flex; align-items: center; gap: 8px; color: var(--gray-800); }
.ptime-time { font-weight: 700; color: var(--gray-900); font-feature-settings: 'tnum'; letter-spacing: 0.2px; }
.ptime.is-zman .ptime-name { color: var(--gray-600); }
.ptime.is-zman .ptime-name i { color: var(--gold-600); }
.ptime.is-zman .ptime-time { font-weight: 600; color: var(--gray-700); }
.ptime.is-past .ptime-name, .ptime.is-past .ptime-time { color: var(--gray-400); }
.ptime.is-next { background: var(--blue-50); margin: 0 -10px; padding-inline: 12px; border-radius: 10px; border-top-color: transparent; }
.ptime.is-next + .ptime { border-top-color: transparent; }
.next-tag {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--blue-600);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 600;
}

/* Location + navigation */
.location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}
.location-text { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--gray-800); }
.location-text i { color: var(--gray-400); flex: none; }
.location-actions { display: flex; gap: 8px; }

/* About — a facts grid */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin: 0;
}
.fact dt { font-size: 13px; color: var(--gray-500); margin-bottom: 2px; }
.fact dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--gray-900); }

/* Ways to give — list rows */
.ways { list-style: none; margin: 0; padding: 0; }
.ways li + li { border-top: 1px solid var(--gray-100); }
.way {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--r-lg);
  transition: background 150ms ease;
}
.way:hover { background: var(--gray-50); }
.way-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.way-text { flex: 1; min-width: 0; }
.way-title { display: block; font-size: 15px; font-weight: 600; color: var(--gray-900); }
.way-sub { display: block; font-size: 13px; color: var(--gray-500); margin-top: 1px; }
.way-chev { color: var(--gray-400); flex: none; }

/* Campaigns */
.shul-sub-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: 12px;
  margin-bottom: 16px;
}
.shul-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--gray-600);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.shul-sub-tab.active { background: var(--white); color: var(--gray-900); box-shadow: var(--shadow-sm); }
.shul-sub-tab .sub-cnt { font-size: 12px; color: var(--gray-500); }

.campaign-card {
  display: block;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.campaign-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); }
.campaign-media {
  position: relative;
  aspect-ratio: 16 / 7;
  background-color: var(--shul-brand);
  background-image: linear-gradient(135deg, var(--shul-brand), color-mix(in oklch, var(--shul-brand) 72%, #000));
  background-size: cover;
  background-position: center;
}
.campaign-card.is-ended .campaign-media { filter: grayscale(0.6); }
.campaign-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.95);
  color: var(--gray-800);
  font-size: 12px;
  font-weight: 600;
}
.campaign-body { padding: 16px 18px 18px; }
.campaign-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--gray-900); line-height: 1.35; }
.campaign-sub { margin: 4px 0 0; font-size: 14px; color: var(--gray-500); line-height: 1.5; }
.campaign-progress { margin-top: 14px; }
.campaign-raised { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--gray-500); }
.campaign-raised strong { font-size: 18px; font-weight: 700; color: var(--gray-900); font-feature-settings: 'tnum'; }
.progress-bar { height: 6px; margin-top: 8px; border-radius: var(--r-pill); background: var(--gray-100); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: var(--r-pill); background: var(--success); }
.campaign-foot { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--gray-500); }
.campaign-foot b { color: var(--gray-800); font-weight: 600; }

.campaigns-empty {
  padding: 16px;
  border-radius: var(--r-xl);
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 14px;
  text-align: center;
}

/* Ambassadors */
.amb-block { margin-top: 32px; }
.amb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.amb-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  color: inherit;
  text-decoration: none;
}
.amb-card:hover { border-color: var(--gray-300); }
.amb-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  background: var(--gray-100);
  color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.amb-name { font-size: 14px; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amb-bar { height: 4px; margin-top: 6px; border-radius: var(--r-pill); background: var(--gray-100); overflow: hidden; }
.amb-bar > div { height: 100%; background: var(--success); }
.amb-meta { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.amb-cta {
  display: inline-flex;
  margin-top: 14px;
  padding: 9px 16px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--r-pill);
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.amb-cta:hover { border-color: var(--gray-500); }

/* Updates */
.shul-updates-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.shul-update { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-xl); padding: 18px 20px; }
.shul-update-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.shul-update-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--gray-900); }
.shul-update-when { flex: none; font-size: 13px; color: var(--gray-500); font-feature-settings: 'tnum'; }
.shul-update-body { font-size: 15px; line-height: 1.65; color: var(--gray-700); white-space: pre-wrap; word-break: break-word; }
.shul-update-img { display: block; max-width: 100%; margin: 10px 0; border-radius: var(--r-lg); }
.shul-update-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--blue-600); text-decoration: none; }
.shul-update-link:hover { text-decoration: underline; }

/* Wishlist */
.wishlist-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .wishlist-list { grid-template-columns: 1fr 1fr; } }
.wishlist-item {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
}
.wishlist-item.funded { background: var(--success-light); border-color: #bbf7d0; }
.wishlist-item-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 12px; border-radius: var(--r-lg); background: var(--gray-100); }
.wishlist-item-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--gray-900); }
.wishlist-item-desc { flex: 1; margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--gray-600); }
.wishlist-item-progress { height: 6px; margin-bottom: 8px; border-radius: var(--r-pill); background: var(--gray-100); overflow: hidden; }
.wishlist-item-fill { height: 100%; background: var(--success); }
.wishlist-item-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-size: 13px; color: var(--gray-500); }
.wishlist-item-price { font-size: 17px; font-weight: 700; color: var(--gray-900); font-feature-settings: 'tnum'; }
.wishlist-item-cta {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-900);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.wishlist-item-cta:hover { background: var(--gray-800); }
.wishlist-item.funded .wishlist-item-cta { background: transparent; color: var(--success-dark); border: 1px solid #bbf7d0; cursor: default; }

/* Team */
.team-rabbi-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
}
.team-rabbi-avatar {
  width: 80px; height: 80px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gray-100);
  color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 700;
}
.team-rabbi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-rabbi-meta { flex: 1; min-width: 0; }
.team-rabbi-title { margin-bottom: 2px; font-size: 13px; font-weight: 600; color: var(--gray-500); }
.team-rabbi-name { margin-bottom: 6px; font-size: 20px; font-weight: 700; color: var(--gray-900); }
.team-rabbi-bio { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--gray-700); white-space: pre-wrap; }
.team-rabbi-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.team-rabbi-contact a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-pill);
  color: var(--gray-800);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.team-rabbi-contact a:hover { background: var(--gray-50); }
.team-roles-eyebrow { margin: 24px 0 12px; font-size: 14px; font-weight: 700; color: var(--gray-700); }
.team-roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.team-role-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-xl); }
.team-role-avatar {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gray-100);
  color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: 700;
}
.team-role-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-role-name { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.team-role-label { margin-top: 2px; font-size: 13px; color: var(--gray-600); }

/* Panel empty states */
.shul-empty { padding: 48px 24px; text-align: center; color: var(--gray-500); }
.shul-empty i { margin-bottom: 12px; color: var(--gray-300); }
.shul-empty h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--gray-700); }
.shul-empty p { margin: 0; font-size: 14px; }

/* ── Give card (desktop rail) ─────────────────────────────────── */
.give-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-2xl);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.give-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
}
.give-sub { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--gray-600); }
.give-donors {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--gray-700);
}
.give-donors i { color: var(--gray-400); }
/* Amount picker */
.give-picker { margin-top: 18px; }
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: var(--gray-100);
  border-radius: 12px;
}
.seg button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--gray-600);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--white); color: var(--gray-900); box-shadow: var(--shadow-sm); }
.amount-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.amount-btn {
  min-height: 46px;
  padding: 0 6px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--gray-900);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  font-feature-settings: 'tnum';
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.amount-btn:hover { border-color: var(--gray-400); }
.amount-btn[aria-pressed="true"] {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-700);
  box-shadow: 0 0 0 1px var(--blue-600) inset;
}
.amount-btn--other { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.give-impact {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gold-50);
  color: var(--gray-800);
  font-size: 13.5px;
  line-height: 1.5;
}
.give-impact b { color: var(--gold-700); }

.give-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.give-buttons .btn-give, .give-buttons .btn-bit { width: 100%; }
.give-trust {
  list-style: none;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.give-trust li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--gray-600); }
.give-trust i { flex: none; margin-top: 1px; color: var(--success-dark); }
.give-share {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}
.give-share-label { margin-inline-end: auto; font-size: 13.5px; font-weight: 600; color: var(--gray-700); }
.share-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  background: var(--white);
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.share-btn:hover { background: var(--gray-50); color: var(--gray-900); }

/* ── Donor wall band ──────────────────────────────────────────── */
.shul-donor-wall { padding: 48px 0; background: var(--gray-50); border-top: 1px solid var(--gray-100); }
.shul-donor-wall-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
}
.shul-donor-wall-sub { margin: 4px 0 20px; font-size: 14px; color: var(--gray-500); }
.shul-donor-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.shul-donor-wall-name {
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}
.shul-donor-wall-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.shul-donor-wall-cta:hover { border-color: var(--gray-900); }

/* ── Mobile sticky donate bar ─────────────────────────────────── */
.bottom-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(10px + var(--safe-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-200);
  transform: translateY(110%);
  transition: transform 200ms ease;
}
.bottom-bar.is-visible { transform: none; }
.bottom-bar .btn-give { min-height: 48px; }

/* ── States ───────────────────────────────────────────────────── */
.state-error { padding: 64px 20px; text-align: center; color: var(--gray-500); }
.state-error i { margin-bottom: 16px; color: var(--gray-300); }
.state-error h2 { margin: 0 0 8px; font-size: 20px; color: var(--gray-900); }

/* ── Tablet+ ──────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .shul-wrap { padding-inline: 24px; }
  .hero-cover { height: 180px; }
  .hero-cover.has-photo { height: 220px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Desktop ──────────────────────────────────────────────────── */
@media (min-width: 900px) {
  #app { padding-bottom: 0; }
  .shul-wrap { padding-inline: 32px; }

  .hero { padding-top: 24px; }
  .hero-cover {
    height: 200px;
    max-width: calc(1200px - 64px);
    margin-inline: auto;
    border-radius: var(--r-3xl);
    overflow: hidden;
  }
  .hero-cover.has-photo { height: 300px; }
  /* "Back to directory" is redundant next to the site header on desktop. */
  .hero-cover-actions .cover-btn--back { display: none; }
  .hero-inner {
    grid-template-columns: auto 1fr auto;
    column-gap: 22px;
    margin-top: -56px;
    padding-inline: 24px;
  }
  .crest { width: 128px; height: 128px; border-radius: 28px; border-width: 6px; }
  .crest i { width: 52px !important; height: 52px !important; }
  /* Crest overlaps the cover; text + actions start just below it. */
  .hero-inner { align-items: start; }
  .hero-text { grid-column: auto; margin-top: 0; padding-top: 70px; }
  .hero-name { font-size: 34px; letter-spacing: -0.8px; }
  .hero-actions { grid-column: auto; margin-top: 0; padding-top: 72px; }
  .hero-give, .hero-trust { display: none; }
  .hero-sec { margin-top: 0; flex-wrap: nowrap; }

  .shul-tabs-bar { margin-top: 32px; }
  .shul-tabs { gap: 32px; }

  .shul-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: start;
    padding-top: 32px;
    padding-bottom: 72px;
  }
  .shul-aside { display: block; position: sticky; top: 88px; }

  .campaign-card { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
  .campaign-media { aspect-ratio: auto; min-height: 100%; }

  .bottom-bar { display: none; }
}

@media (min-width: 1200px) {
  .shul-body { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-bar, .btn-give, .campaign-card { transition: none; }
}

/* Skeleton shimmer used before data arrives. */
.fx-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: fxShimmer 1.4s ease-in-out infinite;
}
@keyframes fxShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===================================================================
   2026-10 stage 2 — "heritage" look (portal/css/heritage.css holds the
   palette + type). The shul's name on parchment is the hero; a real
   photo is the only cover. One tekhelet button; gold only for meaning.
   =================================================================== */

body { background: var(--gray-50); }
.bn-topbar { background: var(--gray-50); backdrop-filter: none; -webkit-backdrop-filter: none; }
.bn-brand { font-weight: 700; }
.bn-brand-dot { display: none; }
.bn-cta { box-shadow: none; border-radius: 10px; }
.bn-mobile-drawer { background: var(--gray-50); }

.fx-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
  background-size: 200% 100%;
}

/* ── Masthead ──────────────────────────────────────────────────── */
/* No photo → no band (a brand-colour gradient standing in for a photo was
   the most generic thing on the page). The share button stays; "back to
   all synagogues" is in the site header already. */
.hero-cover:not(.has-photo) { height: 0; background: none; }
.hero-cover:not(.has-photo) .cover-btn--back { display: none; }
.hero-cover:not(.has-photo) .hero-cover-actions { top: 24px; inset-inline: 16px; }
.hero-cover:not(.has-photo) .cover-btn {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}
.hero-cover:not(.has-photo) .cover-btn:hover { background: var(--white); }
.hero-cover.has-photo::after { background: linear-gradient(180deg, rgba(27, 34, 48, 0.28), transparent 45%); }
.hero-cover:not(.has-photo) + .shul-wrap .hero-inner { margin-top: 0; padding-top: 24px; }

.crest {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 1.5px solid var(--gold-500);
  box-shadow: none;
  color: var(--gray-900);
}
/* With a photo the crest still overlaps it, on a paper ring. */
.hero-cover.has-photo + .shul-wrap .crest { box-shadow: 0 0 0 4px var(--gray-50); }
/* A real logo keeps its shape: soft square on white, never cropped round. */
.crest:has(img) {
  border-radius: 14px;
  border: 1px solid var(--gray-200);
  background: var(--white);
}
.crest img { border-radius: 12px; }
.crest-monogram {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  transform: translateY(1px);
}
.hero-text { margin-top: 14px; }
.hero-name {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: normal;
  text-wrap: balance;
}
.hero-tagline { font-size: 16px; color: var(--gray-700); }
.hero-meta { font-size: 15px; color: var(--gray-500); }
.hero-meta i { color: var(--gray-500); }
/* Badges read as plain confirmation lines, not pills. */
.hero-badges { flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 10px; }
.badge-pill,
.badge-pill--tax {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 500;
}
.badge-pill i, .badge-pill--tax i { color: var(--success); }
.badge-pill--tax { color: var(--success); }
/* A short gold rule under the name block. */
.hero-text::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 16px;
  background: var(--gold-500);
}

/* Give buttons: flat, one colour, no icon, no lift. */
.btn-give {
  min-height: 52px;
  border-radius: 10px;
  box-shadow: none;
  font-size: 17px;
}
.btn-give:hover { transform: none; }
.btn-give > i, .btn-give > svg { display: none; }
.btn-bit {
  min-height: 52px;
  border: 1.5px solid var(--gray-900);
  border-radius: 10px;
  color: var(--gray-900);
  font-weight: 700;
}
.btn-bit:hover { background: var(--white); border-color: var(--gray-900); }
.hero-trust { font-size: 14px; }
.hero-trust i, .give-trust i { color: var(--success); }
.btn-chip { font-size: 15px; font-weight: 500; }
.btn-chip:hover { background: var(--white); }

/* ── Tabs ──────────────────────────────────────────────────────── */
.shul-tab { font-size: 16px; font-weight: 500; }
.shul-tab[aria-selected="true"] { font-weight: 700; }
.shul-tab--link i { color: var(--gold-500); }

/* ── Content cards on parchment ───────────────────────────────── */
.card { border-radius: 12px; }
.card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}
.panel-title { font-size: 24px; }
.card-meta { font-size: 14px; }
.about-text { font-size: 16px; color: var(--gray-700); }
.day-pill { border-radius: 10px; }
.day-pill .dp-name { font-size: 15px; }
.day-pill .dp-date { font-size: 13px; font-variant-numeric: tabular-nums; }
.day-pill[aria-selected="true"] { background: var(--gray-900); border-color: var(--gray-900); }
.ptime { font-size: 16px; padding-block: 12px; border-top-color: var(--gray-200); }
.ptime-time { font-size: 18px; letter-spacing: normal; font-variant-numeric: tabular-nums; }
.next-tag {
  margin-inline-start: 8px;
  border-radius: 6px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 13px;
  font-weight: 700;
}
.ptime.is-next { background: transparent; margin: 0; padding-inline: 2px; border-radius: 0; border-top-color: var(--gray-200); }
.ptime.is-next + .ptime { border-top-color: var(--gray-200); }
.fact dt { font-size: 14px; }
.fact dd { font-size: 16px; }
.ways li + li { border-top-color: var(--gray-200); }
.way:hover { background: var(--gray-50); }
.way-icon { border-radius: 50%; background: var(--gray-100); color: var(--gray-700); }
.way-title { font-size: 16px; }
.way-sub { font-size: 14px; }
.campaign-card { border-radius: 12px; }
.campaign-card:hover { box-shadow: none; border-color: var(--gray-300); }
.campaign-title { font-family: var(--font-display); font-size: 20px; }
.progress-bar-fill { background: var(--blue-600); }
.shul-update, .team-role-card, .amb-card, .wishlist-item { border-radius: 12px; }
.team-rabbi-name { font-family: var(--font-display); font-size: 24px; }
.wishlist-item.funded { background: var(--success-light); border-color: var(--teal-200); }
.wishlist-item.funded .wishlist-item-cta { border-color: var(--teal-200); }
.wishlist-item-cta { border-radius: 10px; }

/* ── Give card (desktop rail) ─────────────────────────────────── */
.give-card { border-radius: 16px; box-shadow: none; }
.give-title { font-size: 24px; }
.give-sub { font-size: 15px; }
.seg { border-radius: var(--r-pill); }
.seg button { min-height: 40px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: var(--gray-700); }
.seg button[aria-pressed="true"] { font-weight: 700; }
.amount-grid { gap: 10px; }
.amount-btn {
  min-height: 52px;
  border-radius: 10px;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.amount-btn:hover { border-color: var(--gray-300); }
.amount-btn[aria-pressed="true"] { color: var(--blue-600); }
.amount-btn--other { font-size: 15px; font-weight: 500; color: var(--gray-500); }
/* What the amount does: one line after a short gold dash, no box. */
.give-impact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--gray-700);
  font-size: 15px;
}
.give-impact[hidden] { display: none; }
.give-impact::before { content: ''; flex: 0 0 14px; height: 1.5px; background: var(--gold-500); }
.give-impact b { color: var(--gray-900); }
.give-trust { border-top-color: var(--gray-200); }
.give-trust li { font-size: 14px; }
.give-share { border-top-color: var(--gray-200); }
.give-share-label { font-size: 14px; }

/* ── Donor wall band + mobile pay bar ─────────────────────────── */
.shul-donor-wall { background: var(--gray-100); border-top: 1px solid var(--gray-200); }
.shul-donor-wall-title { font-size: 26px; }
.shul-donor-wall-name { font-family: var(--font-display); font-size: 16px; font-weight: 500; color: var(--gray-900); border-radius: 10px; }
.bottom-bar {
  background: var(--white);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 -8px 24px rgba(27, 34, 48, 0.06);
}

@media (min-width: 900px) {
  .hero { padding-top: 32px; }
  .hero-cover.has-photo { border-radius: 16px; }
  .hero-cover:not(.has-photo) { overflow: visible; }
  .hero-cover:not(.has-photo) + .shul-wrap .hero-inner { padding-top: 8px; }
  /* Desktop has the give card's own share row; nothing to float here. */
  .hero-cover:not(.has-photo) .hero-cover-actions { display: none; }
  .crest { width: 96px; height: 96px; border-width: 1.5px; }
  .crest:has(img) { border-radius: 20px; }
  .hero-cover.has-photo + .shul-wrap .crest { width: 128px; height: 128px; }
  .crest-monogram { font-size: 46px; }
  /* No cover to clear: text sits beside the crest, vertically centred. */
  .hero-cover:not(.has-photo) + .shul-wrap .hero-inner { align-items: center; }
  .hero-cover:not(.has-photo) + .shul-wrap .hero-text,
  .hero-cover:not(.has-photo) + .shul-wrap .hero-actions { padding-top: 0; }
  .hero-name { font-size: 44px; letter-spacing: normal; }
}

/* ── 2026-10-19: today line + give card in the phone header ─────────
   The approved stage-2 mockup: today's prayers under the name, and the
   amount picker right on the page on phones (placeGiveCard() moves the
   rail's give card into #hero-give-slot below 900px). */
.hero-today {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--gray-700);
  font-feature-settings: 'tnum';
}
.hero-today b { color: var(--gray-900); font-weight: 700; }
.hero--card .hero-give,
.hero--card .hero-trust { display: none; }
@media (max-width: 899px) {
  .hero-give-slot .give-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .hero-give-slot .give-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
  }
  /* The name is right above; the share button sits on the header. */
  .hero-give-slot .give-sub,
  .hero-give-slot .give-share { display: none; }
  .hero-give-slot .give-picker { margin-top: 10px; }
  .hero-give-slot .amount-btn { min-height: 56px; font-size: 20px; }
  .hero-give-slot .give-buttons { margin-top: 14px; }
  .hero-give-slot .give-trust {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 12px;
    padding-top: 0;
    border-top: 0;
  }
  .hero-give-slot .give-trust li { font-size: 13.5px; }
}
