/* Shared Toledo Faith / Pray along design tokens. */
:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --ink: #1a2744;
  --ink-muted: #4a5568;
  --accent: #8b1e1e;
  --accent-hover: #6e1515;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --line: #e2d9c8;
  --focus: #2b5ea7;
  --live: #1f6b3a;
  --live-bg: #e7f5eb;
  --btn-bg: #1a2744;
  --btn-fg: #fff8ea;
  --chip-bg: #ffffff;
  --chip-fg: #1a2744;
  --chip-border: #cfc5b1;
  --hover: #efe8d8;
  --bg-glow: #fffdf8;
  --calendar-cell: #fbfaf6;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(26, 39, 68, 0.08);
  --max: 960px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --serif: "Libre Baskerville", Georgia, serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10161f;
  --surface: #1a2230;
  --ink: #f3efe6;
  --ink-muted: #a7b0c0;
  --accent: #dcc6a0;
  --accent-hover: #ead9b4;
  --gold: #e0c56a;
  --gold-soft: #3d3418;
  --line: #3a4038;
  --focus: #7eb6ff;
  --live: #7ddea0;
  --live-bg: #14281c;
  --btn-bg: #e0c56a;
  --btn-fg: #1a1408;
  --chip-bg: #243044;
  --chip-fg: #f3efe6;
  --chip-border: #4a5348;
  --hover: #243044;
  --bg-glow: #1a2230;
  --calendar-cell: #151e2b;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --bg: #10161f;
    --surface: #1a2230;
    --ink: #f3efe6;
    --ink-muted: #a7b0c0;
    --accent: #dcc6a0;
    --accent-hover: #ead9b4;
    --gold: #e0c56a;
    --gold-soft: #3d3418;
    --line: #3a4038;
    --focus: #7eb6ff;
    --live: #7ddea0;
    --live-bg: #14281c;
    --btn-bg: #e0c56a;
    --btn-fg: #1a1408;
    --chip-bg: #243044;
    --chip-fg: #f3efe6;
    --chip-border: #4a5348;
    --hover: #243044;
    --bg-glow: #1a2230;
    --calendar-cell: #151e2b;
    --shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  }
}
/* An explicit Light choice overrides the operating-system preference. */
html[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  color: var(--ink);
  background:
    radial-gradient(ellipse at top, var(--bg-glow) 0%, var(--bg) 55%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.site-header {
  background: linear-gradient(135deg, #1a2744 0%, #24365f 60%, #2a1f3d 100%);
  color: #f8f4ea;
  padding: 1.15rem 0 1.25rem;
  border-bottom: 4px solid var(--gold);
}
.site-header-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  display: block;
  object-fit: cover;
  border-radius: 22%;
  box-shadow: 0 0 0 1px rgba(232, 212, 139, 0.35), 0 4px 12px rgba(0, 0, 0, 0.28);
}
.brand h1 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.85rem);
  margin: 0;
  letter-spacing: 0.01em;
}
.brand p {
  margin: 0.15rem 0 0;
  color: #e8d48b;
  font-size: 0.95rem;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.nav a {
  color: #f8f4ea;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: #e8d48b; color: #e8d48b; }

.hero {
  margin: 1.25rem 0 0.5rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero h2 {
  font-family: var(--serif);
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}
.hero p { margin: 0; color: var(--ink-muted); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.btn:hover { background: var(--btn-bg); color: var(--btn-fg); filter: brightness(1.12); }
.btn.secondary {
  background: transparent;
  color: var(--ink);
}
.btn.secondary:hover { background: var(--hover); color: var(--ink); }

section { margin: 2rem 0; }
section > h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--gold);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}
.toolbar label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.toolbar select, .field input, .field textarea, .field select {
  font: inherit;
  font-size: 1rem; /* 16px — avoid iOS zoom on focus */
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  min-width: 12rem;
  box-sizing: border-box;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 8px;
  padding-right: 2.25rem;
}
[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23cfc6b4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}
.count {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-left: auto;
}

.month-block { margin: 1.5rem 0; }
.month-block > h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.day-group { margin: 0 0 1rem; }
.day-label {
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 0 0 0.65rem;
  box-shadow: 0 2px 8px rgba(26, 39, 68, 0.04);
}
.event-card h4 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-family: var(--serif);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}
.meta span::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 0.4rem;
  vertical-align: middle;
}
.event-card .desc {
  margin: 0.35rem 0 0;
  color: var(--ink);
  white-space: pre-wrap;
  font-size: 0.95rem;
}
.event-card .more {
  display: inline-block;
  margin-top: 0.45rem;
  font-weight: 600;
  text-decoration: none;
}
.event-card .more:hover { text-decoration: underline; }
.event-card[hidden] { display: none !important; }

.empty {
  padding: 1rem;
  background: var(--surface);
  border: 1px dashed var(--gold);
  border-radius: 8px;
  color: var(--ink-muted);
}

.space-list { display: grid; gap: 0.65rem; }
.space-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.space-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.space-card .host { color: var(--ink-muted); font-size: 0.92rem; margin: 0 0 0.35rem; }
.checked { color: var(--ink-muted); font-size: 0.88rem; margin-top: 0.75rem; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 0.3rem; margin-bottom: 0.9rem; }
.field label { font-weight: 600; }
.field .hint { font-size: 0.85rem; color: var(--ink-muted); font-weight: 400; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.92rem;
}
.site-footer strong { color: var(--ink); }
.thanks {
  max-width: 36rem;
  margin: 3rem auto;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.thanks h1 { font-family: var(--serif); margin-top: 0; }
@media (max-width: 560px) {
  .toolbar .count { margin-left: 0; width: 100%; }
  .brand-mark { width: 40px; height: 40px; }
}

/* —— Month calendar —— */
#cal-root[hidden] { display: none !important; }
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.cal-toolbar .cal-month-label {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0;
  min-width: 11rem;
  text-align: center;
  flex: 1;
}
.cal-nav-btn {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.cal-nav-btn:hover { background: var(--hover); }
.cal-nav-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.cal-layout {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .cal-layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem;
  box-shadow: var(--shadow);
}
.cal-dow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0;
}
.cal-cell { min-height: 0; }
.cal-empty { visibility: hidden; }
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  min-height: 4.2rem;
  padding: 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--calendar-cell);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cal-day:hover { background: var(--hover); }
.cal-day:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.cal-day.is-today {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.cal-day.is-selected {
  background: #1a2744;
  color: #f8f4ea;
}
.cal-day.is-selected .cal-chip {
  background: rgba(255,255,255,0.12);
  color: #f8f4ea;
}
.cal-day.has-events .cal-num { font-weight: 700; }
.cal-num {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
}
.cal-marks { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.cal-chip {
  display: none;
  font-size: 0.65rem;
  line-height: 1.2;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  background: var(--hover);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-more {
  display: none;
  font-size: 0.65rem;
  color: var(--ink-muted);
}
.cal-dots { display: flex; gap: 0.2rem; margin-top: 0.15rem; }
.cal-dots i {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.cal-day.is-selected .cal-dots i { background: var(--gold); }

@media (min-width: 700px) {
  .cal-day { min-height: 5.5rem; }
  .cal-chip, .cal-more { display: block; }
  .cal-dots { display: none; }
}

.cal-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  min-height: 8rem;
}
.cal-detail-heading {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
  color: var(--accent);
}

.credit-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.15em;
}
.site-header .credit-link,
.hero .credit-link { color: inherit; }
.hero .credit-link { color: var(--ink); }
.site-footer .credit-link { color: var(--ink); font-weight: 700; }


.submit-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0 0.5rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.submit-cta h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
  border: 0;
  padding: 0;
}
.submit-cta p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  max-width: 36rem;
}
.submit-intro {
  margin: 1rem 0 0.35rem;
}
.submit-intro h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}
.submit-intro p {
  margin: 0;
  color: var(--ink-muted);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding-top: 0.25rem;
}
.field input,
.field textarea,
.field select,
.toolbar select {
  width: 100%;
  max-width: 100%;
}
.field textarea { min-height: 8rem; resize: vertical; }

.page-intro { margin: 1.5rem 0 1rem; }

.theme-switch {
  display: inline-flex;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}
.theme-opt {
  min-width: 64px;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border: 0;
  background: transparent;
  color: #f0e9da;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.theme-opt[aria-pressed="true"] { background: #fff8ea; color: #1a2744; }
.theme-opt:focus-visible { outline: 3px solid #7eb6ff; outline-offset: -3px; }
.subscribe-alt { margin: 0.65rem 0 0; font-size: 0.9rem; }
.subscribe-alt a { color: var(--ink-muted); }
.cal-day { min-width: 0; min-height: 44px; }
@media (max-width: 699px) {
  .cal-detail { order: -1; min-height: 0; }
  .cal-layout { gap: 0.75rem; }
  body { overflow-x: hidden; }
  .cal-grid { overflow: hidden; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 1.25rem, var(--max)); }
  .site-header { padding: 0.55rem 0 0.45rem; }
  .site-header-bar { gap: 0.4rem; }
  .brand { gap: 0.55rem; }
  .brand p { display: none; }
  .brand h1 { font-size: 1.1rem; }
  .brand-mark { width: 36px; height: 36px; }
  .theme-opt { min-width: 52px; min-height: 40px; padding-inline: 0.45rem; font-size: 0.78rem; }
  .nav {
    margin-top: 0.35rem;
    gap: 0.15rem 0.65rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    flex: none;
    white-space: nowrap;
    font-size: 0.88rem;
    min-height: 44px;
    padding-inline: 0.1rem;
  }
  .hero {
    margin: 0.65rem 0 0.25rem;
    padding: 0.7rem 0.85rem;
    box-shadow: none;
  }
  .hero h2 { font-size: 1.08rem; margin-bottom: 0.25rem; }
  .hero p { font-size: 0.9rem; line-height: 1.35; }
  .actions { margin-top: 0.55rem; gap: 0.45rem; }
  .actions .btn { flex: 1 1 auto; justify-content: center; font-size: 0.86rem; padding-inline: 0.75rem; }
  .subscribe-alt { margin-top: 0.45rem; font-size: 0.82rem; }
  section { margin: 1rem 0; }
  section > h2 { font-size: 1.15rem; margin-bottom: 0.55rem; }
  .toolbar { margin-bottom: 0.55rem; gap: 0.5rem; }
  .toolbar label { width: 100%; }
  .toolbar select { min-width: 0; width: 100%; }
  .event-card { padding: 0.75rem 0.8rem; margin-bottom: 0.5rem; }
  .event-card h4 { font-size: 1rem; }
  .meta { gap: 0.25rem 0.65rem; font-size: 0.86rem; }
  .cal-grid { padding: 0.4rem; gap: 0.2rem; }
  .cal-day { min-height: 44px; padding: 0.3rem 0.2rem; }
  .cal-num { font-size: 0.82rem; }
  .cal-toolbar { gap: 0.35rem; }
  .cal-toolbar .cal-month-label { font-size: 1.05rem; min-width: 0; }
  .cal-nav-btn { padding: 0.4rem 0.55rem; font-size: 0.85rem; }
  .cal-detail { padding: 0.75rem; }
  .submit-cta {
    margin-top: 1rem;
    padding: 0.85rem 0.9rem;
    flex-direction: column;
    align-items: stretch;
  }
  .submit-cta .btn { width: 100%; justify-content: center; }
  .submit-intro { margin: 0.75rem 0 0.15rem; }
  .submit-intro h2 { font-size: 1.15rem; }
  .form-card {
    padding: 0.9rem 0.85rem;
    /* Extra bottom room so last fields can scroll clear of sticky Submit */
    padding-bottom: calc(0.9rem + 4.75rem + env(safe-area-inset-bottom, 0px));
  }
  .field { margin-bottom: 0.75rem; }
  .field select,
  .field input,
  .field textarea,
  .toolbar select {
    font-size: 16px;
    min-height: 44px;
    width: 100%;
    min-width: 0;
  }
  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0.5rem -0.85rem;
    /* Pull into form-card padding so there is no empty gap at rest */
    margin-bottom: calc(-0.9rem - 4.75rem - env(safe-area-inset-bottom, 0px));
    padding: 0.75rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, var(--surface) 28%);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
  }
  .form-actions .btn { width: 100%; justify-content: center; min-height: 44px; }
  .page-intro { margin: 0.85rem 0 0.5rem; }
  .site-footer { margin-top: 2rem; padding: 1.15rem 0 1.5rem; font-size: 0.88rem; }
}
