/* 508 Ministry | 2027 Warm Parchment Faith Ministry Calendar
   Self-hosted Cormorant + Figtree (SIL OFL 1.1) only. Zero external font CDN. */
:root {
  --parchment-bg: #FAF4E6;
  --parchment-deep: #F3E7CC;
  --parchment-card: #FFFDF7;
  --parchment-tint: #F6ECD4;
  --navy: #0B1F3A;
  --navy-mid: #142E54;
  --navy-soft: #22406A;
  --gold: #D4AF37;
  --gold-deep: #A67C18;
  --gold-pale: #F7E9BC;
  --gold-line: rgba(180, 138, 36, 0.34);
  --emerald: #1B5E3F;
  --emerald-bg: #E7F4EC;
  --burgundy: #7D2632;
  --ink: #1A2332;
  --ink-muted: #525E70;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-heirloom: 0 12px 34px rgba(11, 31, 58, 0.08), 0 2px 8px rgba(166, 124, 24, 0.08);
  --shadow-card: 0 6px 20px rgba(11, 31, 58, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: clip; }
body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background-color: var(--parchment-bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 15% 0%, rgba(212, 175, 55, 0.14), transparent 60%),
    radial-gradient(ellipse 80% 50% at 88% 10%, rgba(243, 231, 204, 0.85), transparent 65%),
    repeating-linear-gradient(0deg, rgba(166, 124, 24, 0.018) 0px, rgba(166, 124, 24, 0.018) 1px, transparent 1px, transparent 3px),
    linear-gradient(180deg, #FAF4E6 0%, #F5EBCE 50%, #FAF4E6 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
  font-family: 'Cormorant', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.01em;
}

a { color: var(--navy-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

.cal-shell {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 22px 64px;
}

/* Top bar navigation */
.cal-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(11, 31, 58, 0.04);
}
.cal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.92rem;
}
.cal-brand:hover { text-decoration: none; }
.cal-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border: 1.5px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.cal-nav-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cal-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--parchment-tint);
  border: 1px solid rgba(180, 138, 36, 0.32);
  transition: all 0.16s ease;
}
.cal-nav-pill:hover, .cal-nav-pill.is-active {
  background: var(--navy);
  color: #FFFDF7;
  border-color: var(--gold);
  text-decoration: none;
}

/* Illuminated Masthead */
.cal-masthead {
  position: relative;
  background: linear-gradient(135deg, #0B1F3A 0%, #132C52 55%, #0B1F3A 100%);
  color: #FAF4E6;
  border-radius: 20px;
  padding: 20px 26px;
  margin-bottom: 18px;
  border: 2px solid var(--gold);
  box-shadow: 0 16px 38px rgba(11, 31, 58, 0.2), inset 0 0 0 5px rgba(212, 175, 55, 0.16);
  overflow: hidden;
}
.cal-masthead::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.36);
  border-radius: 15px;
  pointer-events: none;
}
.cal-masthead-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.cal-eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F2D67B;
  margin-bottom: 6px;
}
.cal-eyebrow-pill {
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.45);
  padding: 3px 10px;
  border-radius: 999px;
}
.cal-masthead h1 {
  margin: 0 0 6px;
  font-size: clamp(1.9rem, 3.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.08;
  color: #FFFDF7;
}
.cal-submeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 0.92rem;
  color: rgba(250, 244, 230, 0.88);
}
.cal-lang-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 253, 247, 0.11);
  border: 1px solid rgba(212, 175, 55, 0.36);
  color: #F7E9BC;
}
.cal-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.btn-heirloom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-heirloom:hover { transform: translateY(-1px); text-decoration: none; }
.btn-gold {
  background: linear-gradient(135deg, #E6C463 0%, #D4AF37 52%, #B88A1E 100%);
  color: #0B1F3A;
  border-color: #F4DE93;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}
.btn-gold:hover { box-shadow: 0 8px 22px rgba(212, 175, 55, 0.48); }
.btn-parchment {
  background: #FAF4E6;
  color: #0B1F3A;
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.btn-parchment:hover { background: #FFFDF7; }
.btn-navy {
  background: linear-gradient(135deg, #0B1F3A, #163663);
  color: #FAF4E6;
  border-color: var(--gold);
}
.btn-outline-gold {
  background: rgba(255, 253, 247, 0.08);
  color: #F7E9BC;
  border-color: rgba(212, 175, 55, 0.55);
}
.btn-outline-gold:hover { background: rgba(212, 175, 55, 0.18); }

.sync-status-bar {
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.32);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: #F5E7C4;
}
.sync-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #D4AF37;
  margin-right: 6px;
}
.sync-dot.is-live { background: #3AD28B; box-shadow: 0 0 8px rgba(58, 210, 139, 0.7); }

/* Main Illuminated Two-Column Spread */
.cal-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

/* Parchment Filigree Card Frame */
.parchment-panel {
  position: relative;
  background: linear-gradient(180deg, #FFFDF7 0%, #FAF3E3 100%);
  border: 1.5px solid #D4AF37;
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-heirloom);
}
.parchment-panel::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  pointer-events: none;
}
.parchment-panel > * { position: relative; z-index: 1; }

/* Month Header & Quick Jump Pills */
.month-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.month-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.month-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--gold);
  background: var(--parchment-card);
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.month-nav-btn:hover { background: var(--gold-pale); }
.month-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.month-heading {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--navy);
  min-width: 195px;
  text-align: center;
}
.month-count-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--parchment-deep);
  color: var(--navy);
  border: 1px solid var(--gold-line);
}

.month-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.month-pill {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(180, 138, 36, 0.34);
  background: rgba(255, 253, 247, 0.85);
  color: var(--navy);
  font-family: 'Figtree', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.month-pill:hover { background: var(--gold-pale); border-color: var(--gold); }
.month-pill.is-active {
  background: var(--navy);
  color: #FAF4E6;
  border-color: var(--gold);
}

.cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: #FFFDF7;
  color: var(--ink-muted);
  border: 1px solid rgba(11, 31, 58, 0.14);
  cursor: pointer;
}
.cat-chip.is-active {
  background: var(--gold-pale);
  color: var(--navy);
  border-color: var(--gold-deep);
}
.cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-completed { background: #1B5E3F; }
.dot-campaign { background: #B88A1E; }
.dot-worship { background: #0B1F3A; }
.dot-outreach { background: #8F2D3A; }
.dot-livestream { background: #2D5A8E; }
.dot-prayer { background: #6A4B8A; }
.dot-crusade { background: #B8521E; }

/* 7-Column Calendar Grid */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}
.cal-weekday {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding: 5px 2px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-cell {
  min-height: 68px;
  padding: 5px 5px;
  border-radius: 10px;
  background: #FFFDF8;
  border: 1px solid rgba(180, 138, 36, 0.25);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
  text-align: left;
  font-family: inherit;
  min-width: 0;
}
.cal-cell:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(180, 138, 36, 0.18);
  transform: translateY(-1px);
}
.cal-cell.is-empty {
  background: rgba(243, 231, 204, 0.32);
  border-style: dashed;
  border-color: rgba(180, 138, 36, 0.16);
  cursor: default;
}
.cal-cell.is-empty:hover { transform: none; box-shadow: none; }
.cal-cell.has-events { background: linear-gradient(180deg, #FFFDF8 0%, #FBF3DF 100%); }
.cal-cell.is-selected {
  border: 2px solid var(--navy);
  background: linear-gradient(180deg, #FFF9E8 0%, #F4E4B8 100%);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.28);
}
.cal-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.cal-day-num {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.cal-day-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--navy);
  color: #F7E9BC;
}
.cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cal-mini-pill {
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 2px 5px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #FFFDF7;
  background: var(--navy);
}
.pill-completed { background: #1B5E3F; }
.pill-campaign { background: #9C7114; }
.pill-worship { background: #142E54; }
.pill-outreach { background: #7D2632; }
.pill-livestream { background: #22548A; }
.pill-prayer { background: #5B3E7A; }
.pill-crusade { background: #A34416; }
.pill-milestone { background: #3D5325; }

/* Day / Month Agenda Detail Feed */
.agenda-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1.5px solid var(--gold-line);
}
.agenda-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.agenda-head h3 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--navy);
}
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agenda-card {
  background: #FFFDF9;
  border: 1px solid rgba(180, 138, 36, 0.34);
  border-left: 4px solid var(--gold-deep);
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.agenda-card.cat-completed { border-left-color: var(--emerald); background: linear-gradient(90deg, #F4FBF6 0%, #FFFDF9 35%); }
.agenda-card.cat-campaign { border-left-color: #B88A1E; }
.agenda-card.cat-outreach { border-left-color: #7D2632; }
.agenda-card.cat-worship { border-left-color: var(--navy); }
.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-deep);
  margin-bottom: 4px;
}
.agenda-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #FFFDF7;
  background: var(--navy);
}
.agenda-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.agenda-desc {
  margin: 0;
  font-size: 0.87rem;
  color: var(--ink-muted);
}
.agenda-loc {
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--navy-soft);
  font-weight: 600;
}
.agenda-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--parchment-tint);
  border: 1px solid var(--gold);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.agenda-link:hover { background: var(--gold-pale); text-decoration: none; }

/* Right Column: Founding Pledge + Itemized Completed Audit Log */
.pledge-card {
  background: linear-gradient(155deg, #0B1F3A 0%, #16335E 100%);
  color: #FAF4E6;
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 12px 28px rgba(11, 31, 58, 0.18);
}
.pledge-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F2D67B;
  margin-bottom: 4px;
}
.pledge-card h2 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  line-height: 1.12;
  color: #FFFDF7;
}
.pledge-sub {
  font-size: 0.86rem;
  color: rgba(250, 244, 230, 0.86);
  margin: 0 0 14px;
}
.pledge-meter-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.45);
  overflow: hidden;
  margin-bottom: 10px;
}
.pledge-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #F4DE93 0%, #D4AF37 60%, #E7C766 100%);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.pledge-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.pledge-stats .stat-gold { color: #F5DC87; }
.pledge-stats .stat-rem { color: #D8E4F5; }
.pledge-cta-full {
  width: 100%;
  justify-content: center;
}

.audit-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.audit-head h2 {
  margin: 0;
  font-size: 1.55rem;
  color: var(--navy);
}
.audit-count {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--emerald);
  background: var(--emerald-bg);
  border: 1px solid rgba(27, 94, 63, 0.25);
  padding: 3px 9px;
  border-radius: 999px;
}
.audit-intro {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.audit-item {
  display: flex;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 12px;
  background: #FFFDF9;
  border: 1px solid rgba(180, 138, 36, 0.3);
  transition: border-color 0.14s ease, transform 0.12s ease;
}
.audit-item:hover {
  border-color: var(--gold-deep);
  transform: translateY(-1px);
}
.audit-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--emerald);
  color: #FFFDF7;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 2px;
}
.audit-body { min-width: 0; flex: 1; }
.audit-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.audit-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-deep);
}
.audit-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--parchment-deep);
  color: var(--navy);
}
.audit-title {
  margin: 0 0 3px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.28;
}
.audit-detail {
  margin: 0 0 7px;
  font-size: 0.81rem;
  color: var(--ink-muted);
  line-height: 1.42;
}
.audit-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--parchment-tint);
  border: 1px solid rgba(180, 138, 36, 0.42);
}
.audit-link:hover { background: var(--gold-pale); text-decoration: none; }

/* Free 3D Leather Digital Bibles + 32-Page Faith Comic Books Shelf */
.shelf-section {
  margin-top: 28px;
}
.shelf-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--gold-line);
}
.shelf-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.shelf-header h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
  color: var(--navy);
}
.shelf-header p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  max-width: 720px;
}
.shelf-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 12px;
}
.shelf-row-title h3 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--navy);
}
.shelf-row-sub {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--emerald);
}
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  background: #FFFDF8;
  border: 1.5px solid rgba(180, 138, 36, 0.38);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  color: var(--ink);
}
.resource-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 14px 28px rgba(11, 31, 58, 0.12);
  text-decoration: none;
}
.resource-cover-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #0B1F3A, #1B3863);
  overflow: hidden;
}
.resource-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.resource-ribbon {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #F0CF6B, #C99A22);
  color: #0B1F3A;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.resource-ribbon--bottom {
  top: auto;
  bottom: 9px;
  left: 9px;
}
.resource-body {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.resource-title {
  margin: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
}
.resource-meta {
  font-size: 0.77rem;
  color: var(--ink-muted);
}
.resource-cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold-deep);
}

/* Bottom Matching Banner */
.bottom-pledge-banner {
  margin-top: 24px;
  padding: 22px 26px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0B1F3A 0%, #15315B 100%);
  border: 2px solid var(--gold);
  color: #FAF4E6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bottom-pledge-banner h3 {
  margin: 0 0 4px;
  font-size: 1.65rem;
  color: #FFFDF7;
}
.bottom-pledge-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(250, 244, 230, 0.86);
}

/* Modals (Sync My Calendar & Add Event) */
.cal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 38, 0.72);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.cal-modal-backdrop.is-open { display: flex; }
.cal-modal {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #FFFDF8 0%, #F7EDD5 100%);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 24px 60px rgba(7, 20, 38, 0.45);
  color: var(--ink);
}
.cal-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cal-modal-head h3 {
  margin: 0;
  font-size: 1.65rem;
  color: var(--navy);
  line-height: 1.1;
}
.cal-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  background: #FFFDF7;
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.cal-form-group { margin-bottom: 12px; }
.cal-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cal-form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.cal-form-group input,
.cal-form-group select,
.cal-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #CEB884;
  background: #FFFFFF;
  font-family: 'Figtree', sans-serif;
  font-size: 0.92rem;
  color: var(--ink);
}
.cal-form-group textarea { min-height: 82px; resize: vertical; }
.cal-perm-box {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 12px;
  background: #FAF0D3;
  border: 1.5px solid var(--gold);
  margin: 14px 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.cal-perm-box input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--navy); }
.cal-msg {
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: none;
}
.cal-msg.is-ok { display: block; background: var(--emerald-bg); color: var(--emerald); border: 1px solid rgba(27, 94, 63, 0.3); }
.cal-msg.is-err { display: block; background: #FCEAEA; color: #8B2222; border: 1px solid rgba(139, 34, 34, 0.3); }

/* Responsive Breakpoints (Zero horizontal overflow at 390px) */
@media (max-width: 1080px) {
  .cal-spread { grid-template-columns: 1fr; }
  .shelf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cal-shell { padding: 12px 12px 48px; }
  .cal-topbar { border-radius: 16px; padding: 10px 12px; }
  .cal-masthead { padding: 18px 16px; border-radius: 18px; }
  .cal-header-actions { width: 100%; }
  .cal-header-actions .btn-heirloom { flex: 1 1 100%; }
  .parchment-panel { padding: 14px 12px; border-radius: 16px; }
  .month-heading { font-size: 1.45rem; min-width: 145px; }
  .cal-grid { gap: 4px; }
  .cal-cell { min-height: 62px; padding: 5px 4px; border-radius: 8px; }
  .cal-mini-pill { font-size: 0.6rem; padding: 1px 3px; }
  .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .cal-form-row { grid-template-columns: 1fr; }
}
