* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
:root {
  color-scheme: light;
  --primary: #639c9c;
  --primary-dark: #507c7c;
  --glass: rgba(224, 235, 235, 0.5);
  --paper: #fff;
  --text: rgba(0, 0, 0, 0.87);
  --muted: rgba(0, 0, 0, 0.62);
  --border: rgba(99, 156, 156, 0.38);
  --radius-outer: 28px;
  --radius-card: 24px;
  --radius-inner: 16px;
  --radius-control: 14px;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--text);
  background: #dbe7e7 url("../img/homepage.jpeg") center top/cover fixed no-repeat;
}
body:before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: rgba(224, 235, 235, 0.6);
}
a {
  color: inherit;
  text-decoration: none;
}
.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  min-height: 82px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  padding: 7px 18px;
}
.logo-link {
  display: block;
  width: min(420px, 75vw);
  height: 68px;
}
.logo-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.site-main {
  padding: 104px 28px 40px;
  min-height: 100vh;
}
.home-grid {
  max-width: 1536px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr);
  gap: 34px;
  align-items: start;
}
.glass {
  background: var(--glass);
  backdrop-filter: blur(5px);
  border-radius: var(--radius-outer);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.paper {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.about-paper {
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.section-kicker {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 2px;
  color: var(--text);
}
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  margin: 1.1em 0 0.5em;
}
h2:first-child,
h3:first-child {
  margin-top: 0;
}
p {
  line-height: 1.62;
  margin: 0.8em 0;
}
.markdown-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-inner);
  margin: 18px auto;
}
.about-card .markdown > p:last-child {
  margin-bottom: 0;
}
.about-card .markdown > p:last-child .markdown-image {
  margin-bottom: 0;
}
.agenda-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.tab-btn,
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--primary-dark);
}
.tab-btn {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  padding: 6px 16px;
  color: var(--primary);
  outline: none;
}
.tab-btn.active {
  border-color: rgba(99, 156, 156, 0.55);
  background: rgba(255, 255, 255, 0.1);
}
.tab-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(99, 156, 156, 0.22);
}
.btn-outline {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.25);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn:hover,
.tab-btn:hover {
  background: rgba(99, 156, 156, 0.14);
}
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.event-card {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.event-date {
  font-weight: 700;
  font-size: 1.18rem;
  margin-bottom: 5px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eee;
  border-radius: 999px;
  padding: 3px 9px 3px 6px;
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0 0 4px;
}
.location-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: #737373;
}
.event-composers {
  line-height: 1.5;
}
.event-card .btn {
  width: 100%;
  margin-top: 9px;
  gap: 4px;
}
.archive-panel[hidden],
.agenda-panel[hidden] {
  display: none;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 0 2px;
}
.page-link {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(99, 156, 156, 0.4);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--primary-dark);
  font-weight: 650;
}
.page-link:hover {
  background: #fff;
  border-color: var(--primary);
}
.page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-arrow {
  font-size: 1.4rem;
}
.mobile-agenda {
  display: none;
  width: 100%;
  margin-bottom: 22px;
}
.liturgy-wrap {
  max-width: 980px;
  margin: 0 auto;
}
.liturgy-shell {
  background: var(--glass);
  border-radius: var(--radius-outer);
  padding: 24px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.liturgy-body {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 26px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-dark);
  font-weight: 600;
  margin: 0;
}
.link-arrow {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}
.liturgy-shell > h1 {
  margin: 24px 0 8px;
}
.liturgy-date {
  margin: 0 0 16px;
  line-height: 1.4;
}
.church-year {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-weight: 700;
}
.welcome-box {
  background: rgba(224, 235, 235, 0.55);
  border-radius: var(--radius-inner);
  padding: 20px;
  margin: 18px 0;
}
.markdown h2 {
  font-size: 1.48rem;
  margin-top: 1.5em;
}
.markdown h3 {
  font-size: 1.25rem;
}
.markdown .credit {
  font-size: 0.86rem;
  text-align: right;
  margin: 0.6em 0 0.2em;
}
.markdown .composer {
  font-size: 0.88rem;
  font-weight: 400;
  text-align: right;
  margin: 0.25em 0 1em;
}
.markdown .composer span,
.markdown .composer {
}
.markdown h6 {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.25em 0 1em auto;
  background: #e6eded;
  border-radius: 999px;
  padding: 5px 10px;
}
.markdown h6.composer {
  margin-right: 0;
  margin-left: auto;
  text-align: left;
}
.markdown ul {
  padding-left: 22px;
  line-height: 1.6;
}
.markdown blockquote {
  border-left: 4px solid var(--primary);
  margin: 1em 0;
  padding: 0.3em 1em;
  color: var(--muted);
}
.next-box,
.footer-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 15px 16px;
}
.next-box {
  margin-top: 22px;
}
.next-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 2px;
  line-height: 1.35;
}
.next-details .chip {
  margin: 0;
}
.footer-box {
  margin-top: 12px;
}
.footer-box h3:first-child {
  margin: 0 0 10px;
}
.footer-box p {
  margin: 7px 0;
}
.footer-box ul {
  margin: 8px 0 4px;
  padding-left: 22px;
}
.footer-box .btn {
  margin-top: 9px;
}
.form-card {
  max-width: 760px;
  margin: 0 auto;
}
label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #b7c5c5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  color: inherit;
}
textarea {
  min-height: 160px;
  resize: vertical;
}
.form-row {
  margin-bottom: 16px;
}
.notice {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
}
.notice.success {
  background: #e7f5eb;
}
.notice.error {
  background: #fde8e8;
}
.honeypot {
  position: absolute;
  left: -9999px;
}
@media (max-width: 900px) {
  .site-main {
    padding: 430px 12px 30px;
  }
  .home-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .mobile-agenda {
    display: flex;
  }
  .about-card {
    order: 1;
  }
  .agenda-card {
    order: 2;
  }
  .glass {
    padding: 16px;
  }
  .liturgy-shell {
    padding: 14px;
  }
  .liturgy-body {
    padding: 18px;
  }
  .site-main:not(.home) {
    padding-top: 110px;
  }
}
@media (max-width: 520px) {
  .agenda-head .tab-btn {
    font-size: 1.55rem;
    padding: 7px 10px;
  }
  .site-header {
    min-height: 70px;
  }
  .logo-link {
    height: 58px;
  }
  .liturgy-body {
    padding: 14px;
  }
}
