:root {
  color-scheme: light;
  --bg: #f7f0e3;
  --bg-soft: #fffaf0;
  --panel: #fffdf7;
  --ink: #1e2633;
  --muted: #6a6258;
  --line: #e1d3bd;
  --navy: #172943;
  --navy-soft: #243e63;
  --gold: #b88a32;
  --gold-soft: #f3e5bd;
  --green: #356854;
  --rose: #8f4b3f;
  --violet: #65577f;
  --shadow: 0 18px 44px rgba(43, 35, 23, 0.1);
  --soft-shadow: 0 10px 26px rgba(43, 35, 23, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(184, 138, 50, 0.12) 0 1px, transparent 1px 120px),
    linear-gradient(45deg, rgba(23, 41, 67, 0.05) 0 1px, transparent 1px 96px),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.58;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(184, 138, 50, 0.08) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 0 48%, rgba(184, 138, 50, 0.08) 48% 52%, transparent 52%);
  background-position: right 34px top 28px;
  background-size: 74px 74px;
  mask-image: linear-gradient(130deg, transparent 0 62%, black 80%);
}

.page-shell {
  width: min(1080px, calc(100% - 34px));
  margin: 0 auto;
  padding: 48px 0 68px;
}

.page-header {
  position: relative;
  max-width: 820px;
  margin-bottom: 28px;
  padding: 18px 0 10px;
}

.page-header::before {
  content: "";
  display: block;
  width: 68px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(184, 138, 50, 0.15));
}

.parish-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}

.parish-brand img {
  width: clamp(132px, 22vw, 190px);
  height: auto;
  flex: 0 0 auto;
}

.parish-logo-link {
  display: inline-flex;
  border-radius: 6px;
  transition: opacity 160ms ease, outline-color 160ms ease;
}

.parish-logo-link:hover {
  opacity: 0.88;
}

.parish-logo-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
.month-heading {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  max-width: 760px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.7rem, 9vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.lede {
  max-width: 690px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 2.4vw, 1.22rem);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.schedule-download,
.guide-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(184, 138, 50, 0.55);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e8, #f7ebca);
  color: #6e5016;
  box-shadow: var(--soft-shadow);
  font-weight: 850;
  text-decoration: none;
}

.guide-link {
  background: rgba(255, 253, 247, 0.74);
  color: var(--navy);
}

.schedule-download:hover,
.guide-link:hover {
  border-color: var(--gold);
}

.schedule-download:focus-visible,
.guide-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.guide-page {
  max-width: 860px;
}

.guide-card {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid rgba(184, 138, 50, 0.28);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.guide-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
}

.guide-card p {
  margin: 0;
  color: var(--muted);
}

.next-session {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.97), rgba(255, 250, 240, 0.94)),
    var(--panel);
  border: 1px solid rgba(184, 138, 50, 0.35);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.next-session::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(184, 138, 50, 0.2);
  transform: rotate(45deg);
}

.next-session h2 {
  position: relative;
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.65rem, 4.8vw, 2.55rem);
  line-height: 1.08;
}

.meta-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.status-pill,
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(23, 41, 67, 0.13);
  border-radius: 999px;
  background: #f8efdb;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill {
  position: relative;
  z-index: 1;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 32px;
}

.toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(23, 41, 67, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.78);
  color: var(--navy);
  box-shadow: var(--soft-shadow);
  font-weight: 750;
}

.toolbar input {
  accent-color: var(--gold);
}

.month-group {
  margin-top: 34px;
}

.month-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  color: var(--navy);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  letter-spacing: 0;
}

.month-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 138, 50, 0.5), transparent);
}

.cards {
  display: grid;
  gap: 14px;
}

.schedule-card {
  display: grid;
  grid-template-columns: minmax(124px, 160px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: clamp(18px, 3vw, 24px);
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(225, 211, 189, 0.9);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.schedule-card.lesson {
  border-left: 6px solid var(--gold);
}

.schedule-card.rite {
  background: #ede5f4;
  border-color: #c9b7d9;
  border-left: 6px solid var(--violet);
}

.schedule-card.rite .date-block {
  background: #4d3b68;
}

.schedule-card.rite .type-pill {
  border-color: rgba(101, 87, 127, 0.24);
  background: #faf6ff;
  color: #4d3b68;
}

.schedule-card.break {
  border-left: 6px solid var(--rose);
}

.schedule-card.special {
  border-left: 6px solid var(--green);
}

.schedule-card.agape-gathering {
  background: #f3e1dc;
  border-color: #d7a9a0;
  border-left: 6px solid #9f5148;
}

.schedule-card.agape-gathering .date-block {
  background: linear-gradient(180deg, #6f3430, #9f5148);
}

.schedule-card.agape-gathering .type-pill {
  border-color: rgba(159, 81, 72, 0.24);
  background: #fff6f3;
  color: #6f3430;
}

.schedule-card.holy-day {
  background: #f6e8bd;
  border-color: #d4af58;
  border-left: 6px solid #a9771e;
}

.schedule-card.holy-day .date-block {
  background: linear-gradient(180deg, #6f4f17, #9a6f22);
}

.schedule-card.holy-day .type-pill {
  border-color: rgba(111, 79, 23, 0.22);
  background: #fff8e8;
  color: #6f4f17;
}

.schedule-card.advent-sunday {
  background: #ede7f1;
  border-color: #c8b7d1;
  border-left: 6px solid #6d4f82;
}

.schedule-card.advent-sunday .date-block {
  background: linear-gradient(180deg, #4e3960, #6d4f82);
}

.schedule-card.advent-sunday .type-pill {
  border-color: rgba(109, 79, 130, 0.24);
  background: #faf6ff;
  color: #4e3960;
}

.schedule-card.lent-sunday {
  background: #e6eee7;
  border-color: #b6cbb8;
  border-left: 6px solid #4f7357;
}

.schedule-card.lent-sunday .date-block {
  background: linear-gradient(180deg, #385641, #4f7357);
}

.schedule-card.lent-sunday .type-pill {
  border-color: rgba(79, 115, 87, 0.24);
  background: #f4fbf5;
  color: #385641;
}

.schedule-card.holy-week-easter {
  background: #fffefa;
  border-color: #ded8ca;
  border-left: 5px solid #8b8170;
}

.schedule-card.holy-week-easter .date-block {
  background: linear-gradient(180deg, var(--navy), var(--navy-soft));
}

.schedule-card.holy-week-easter .type-pill {
  border-color: rgba(65, 74, 86, 0.2);
  background: #f8f7f3;
  color: #46505c;
}

.schedule-card.liturgical-passion {
  background: #f7e5e7;
  border-color: #d7b2b7;
  border-left-color: #7c2732;
}

.schedule-card.liturgical-passion .type-pill {
  border-color: rgba(124, 39, 50, 0.22);
  background: #fff6f7;
  color: #6b202a;
}

.schedule-card.liturgical-easter {
  background: #f7e9bc;
  border-color: #d8bd70;
  border-left-color: #b58a2a;
}

.schedule-card.liturgical-easter-triduum {
  background: #f2ead7;
  border-color: #d6c59e;
  border-left-color: #a8802c;
}

.schedule-card.liturgical-christmas {
  background: #f6e7bd;
  border-color: #d4b65f;
  border-left-color: #a9771e;
}

.schedule-card.liturgical-easter .type-pill,
.schedule-card.liturgical-easter-triduum .type-pill,
.schedule-card.liturgical-christmas .type-pill {
  border-color: rgba(181, 138, 42, 0.25);
  background: #fffbef;
  color: #725718;
}

.schedule-card.liturgical-advent,
.schedule-card.liturgical-lent {
  border-left-color: #6d4f82;
}

.schedule-card.liturgical-ordinary-time {
  border-left-color: #4f7357;
}

.schedule-card.liturgical-rite {
  border-left-color: #32717a;
}

.date-block {
  min-height: 78px;
  padding: 13px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--navy), var(--navy-soft));
  color: rgba(255, 253, 247, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 750;
}

.date-block strong {
  display: block;
  color: var(--bg-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 600;
}

.card-title {
  margin: 0 0 10px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.17rem, 2.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gospel-reading {
  display: grid;
  gap: 2px;
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(243, 229, 189, 0.34);
}

.gospel-reading p {
  margin: 0;
}

.gospel-label {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gospel-sunday,
.gospel-citation {
  color: var(--navy);
  font-weight: 750;
}

.gospel-page {
  color: var(--muted);
  font-size: 0.9rem;
}

.lesson-materials {
  margin-top: 15px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.lesson-materials summary {
  width: fit-content;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(184, 138, 50, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e8, #f7ebca);
  color: #6e5016;
  cursor: pointer;
  font-weight: 850;
}

.lesson-materials summary:hover {
  border-color: var(--gold);
}

.material-group {
  margin-top: 13px;
}

.material-group h4 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.material-group ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.material-group a {
  color: var(--navy-soft);
  font-weight: 700;
  text-decoration-color: rgba(184, 138, 50, 0.7);
  text-underline-offset: 3px;
}

.material-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tentative {
  color: var(--rose);
  border-color: #deb9ac;
  background: #fff0e9;
}

.confirmed {
  color: var(--green);
  border-color: #bdd3c0;
  background: #eef8ee;
}

.empty-state,
.error-state {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1080px);
    padding-top: 26px;
  }

  .next-session,
  .schedule-card {
    grid-template-columns: 1fr;
  }

  .status-pill {
    width: fit-content;
  }

  .date-block {
    min-height: auto;
  }

  .parish-brand {
    gap: 10px;
  }

  .parish-brand img {
    width: min(148px, 56vw);
  }
}
