/* Shared Toledo Faith / Pray along design tokens. */
:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --surface: #ffffff;
  --ink: #1a2744;
  --ink-muted: #4a5568;
  --accent: #8b1e1e;
  --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;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(26, 39, 68, 0.08);
  --max: 1280px;
  --serif: "Libre Baskerville", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  /* Legacy prayer aliases point at the shared system. */
  --pray-bg: var(--bg);
  --pray-surface: var(--surface);
  --pray-ink: var(--ink);
  --pray-muted: var(--ink-muted);
  --pray-accent: var(--accent);
  --pray-gold: var(--gold);
  --pray-gold-soft: var(--gold-soft);
  --pray-line: var(--line);
  --pray-live: var(--live);
  --pray-live-bg: var(--live-bg);
  --pray-chip-bg: var(--chip-bg);
  --pray-chip-fg: var(--chip-fg);
  --pray-chip-border: var(--chip-border);
  --pray-chip-active-bg: var(--btn-bg);
  --pray-chip-active-fg: var(--btn-fg);
  --pray-chip-active-border: var(--btn-bg);
  --pray-btn-bg: var(--btn-bg);
  --pray-btn-fg: var(--btn-fg);
  --pray-shadow: var(--shadow);
  --pray-radius: 14px;
  --pray-serif: var(--serif);
  --pray-sans: var(--sans);
  --pray-max: var(--max);
}
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;
  --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;
    --shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  }
}
html[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
.pray-body {
  margin: 0;
  font-family: var(--pray-sans);
  font-size: 1.05rem;
  color: var(--pray-ink);
  background: var(--pray-bg);
  line-height: 1.5;
  min-height: 100vh;
}
.pray-wrap { width: min(100% - 2rem, var(--pray-max)); margin-inline: auto; }
.pray-header {
  background: linear-gradient(135deg, #1a2744 0%, #24365f 60%, #2a1f3d 100%);
  color: #f8f4ea;
  padding: 1rem 0 1.25rem;
  border-bottom: 4px solid var(--pray-gold);
}
.pray-header a { color: inherit; text-decoration: none; }
.pray-brand { display: flex; gap: 0.75rem; align-items: center; }
.pray-brand .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);
}
.pray-brand h1 {
  font-family: var(--pray-serif);
  font-size: clamp(1.2rem, 2.6vw, 1.85rem);
  margin: 0;
}
.pray-brand p { margin: 0.1rem 0 0; color: #e8d48b; font-size: 0.9rem; }
.pray-header-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between;
}
.theme-switch {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.theme-opt {
  font: inherit; font-weight: 700; font-size: 0.82rem;
  min-width: 64px; min-height: 44px;
  padding: 0.4rem 0.75rem;
  border: 0; background: transparent; color: #f0e9da;
  cursor: pointer;
}
.theme-opt[aria-pressed="true"] {
  background: #fff8ea;
  color: #1a2744;
}
.theme-opt:focus-visible { outline: 3px solid #7eb6ff; outline-offset: 2px; z-index: 1; }

.learn-banner {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; justify-content: space-between;
  margin: 1rem 0 0;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--pray-line);
  background: var(--pray-surface);
  color: var(--pray-ink);
  font-size: 0.92rem;
}
.learn-banner a {
  color: var(--pray-accent); font-weight: 700; text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.learn-banner span { color: var(--pray-muted); }

.pray-hero {
  margin: 1rem 0 0.85rem;
  padding: 1.1rem 1.2rem;
  background: var(--pray-surface);
  border: 1px solid var(--pray-line);
  border-radius: var(--pray-radius);
  box-shadow: var(--pray-shadow);
}
.pray-hero h2 {
  font-family: var(--pray-serif);
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
}
.pray-hero p { margin: 0; color: var(--pray-muted); font-size: 0.98rem; }
.pray-hero a.credit { color: var(--pray-accent); font-weight: 700; }

/* Filters — explicit inactive/active, no white-on-white */
.chip-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 1rem;
}
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font: inherit; font-weight: 700; font-size: 0.86rem;
  min-height: 44px; padding: 0.42rem 0.72rem; border-radius: 999px;
  border: 2px solid var(--pray-chip-border);
  background: var(--pray-chip-bg);
  color: var(--pray-chip-fg);
  cursor: pointer;
}
.chip .count {
  font-weight: 700; font-size: 0.78rem;
  opacity: 0.85;
}
.chip svg { width: 0.95rem; height: 0.95rem; flex: none; }
.chip[aria-pressed="true"] {
  background: var(--pray-chip-active-bg) !important;
  color: var(--pray-chip-active-fg) !important;
  border-color: var(--pray-chip-active-border) !important;
}
.chip[aria-pressed="true"] .count { opacity: 1; }
.chip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip:hover { filter: brightness(0.97); }

.live-section { margin: 0 0 1.25rem; }
.live-section > h3,
.day-heading {
  font-family: var(--pray-serif);
  font-size: 1.3rem;
  margin: 0 0 0.65rem;
  color: var(--pray-accent);
  display: flex; align-items: center; gap: 0.45rem;
}
.pulse-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--pray-live);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pray-live) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.space-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--pray-surface);
  border: 1px solid var(--pray-line);
  border-radius: var(--pray-radius);
  padding: 0.95rem 1rem;
  box-shadow: var(--pray-shadow);
  min-height: 100%;
}
.space-card.is-live {
  border-color: color-mix(in srgb, var(--pray-live) 55%, var(--pray-line));
  background: linear-gradient(180deg, var(--pray-live-bg), var(--pray-surface) 55%);
}
.space-card h4 {
  font-family: var(--pray-serif);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.space-card h4 a { color: inherit; text-decoration: none; }
.space-card h4 a:hover { text-decoration: underline; }
.space-meta {
  color: var(--pray-muted);
  font-size: 0.9rem;
  margin: 0;
}
.countdown { font-weight: 700; color: var(--pray-accent); }
.space-card.is-live .countdown { color: var(--pray-live); }

.host-row {
  display: flex; align-items: center; gap: 0.55rem; margin-top: 0.15rem;
}
.host-avatar {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--pray-chip-bg); color: var(--pray-chip-fg);
  border: 1px solid var(--pray-chip-border);
  display: grid; place-items: center; font-weight: 700; font-size: 0.72rem;
  overflow: hidden; flex: none;
}
.host-avatar img { width: 100%; height: 100%; object-fit: cover; }
.host-meta { font-size: 0.86rem; min-width: 0; }
.host-meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.host-meta .handle { color: var(--pray-muted); }
.badge-regular {
  display: inline-block; margin-left: 0.3rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 0.08rem 0.35rem; border-radius: 999px;
  background: color-mix(in srgb, var(--pray-gold) 28%, var(--pray-surface));
  color: var(--pray-ink);
  border: 1px solid color-mix(in srgb, var(--pray-gold) 55%, var(--pray-line));
  vertical-align: middle;
}

.card-actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
  margin-top: auto; padding-top: 0.45rem;
}
.mini-btn {
  font: inherit; font-weight: 700; font-size: 0.86rem;
  min-height: 44px; padding: 0.45rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--pray-line);
  background: transparent;
  color: var(--pray-muted);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.mini-btn.primary {
  background: var(--pray-btn-bg);
  color: var(--pray-btn-fg);
  border-color: var(--pray-btn-bg);
}
.mini-btn.quiet {
  font-weight: 600; font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
  color: var(--pray-muted);
  border-color: transparent;
  background: transparent;
}
.mini-btn.quiet:hover { text-decoration: underline; color: var(--pray-ink); }
.mini-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.schedule-block { margin: 0 0 1.35rem; }

.empty-state {
  text-align: center; padding: 1.4rem 1rem;
  border: 1px dashed var(--pray-gold); border-radius: var(--pray-radius);
  background: var(--pray-surface);
}
.empty-state p { margin: 0.35rem 0; color: var(--pray-muted); }
.empty-state .prayer {
  font-family: var(--pray-serif); font-size: 1.05rem; color: var(--pray-ink); margin: 0.65rem 0;
}
.checked { color: var(--pray-muted); font-size: 0.86rem; margin: 0.75rem 0 1.25rem; }
.pray-footer {
  margin-top: 1.5rem; padding: 1.1rem 0 1.75rem;
  border-top: 1px solid var(--pray-line); color: var(--pray-muted); font-size: 0.9rem;
}
.pray-footer a { color: var(--pray-accent); }
.skip {
  position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: 0.75rem 1rem; z-index: 20;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
.nav-bar {
  display: flex; flex-wrap: wrap; gap: 0.85rem 1.35rem;
  padding: 0.65rem 0 0; font-size: 0.92rem;
}
.nav-bar a { color: #f8f4ea; text-decoration: none; border-bottom: 1px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.nav-bar a:hover, .nav-bar a[aria-current="page"] { border-bottom-color: #e8d48b; color: #e8d48b; }

/* Shared Toledo navigation stays readable over the navy prayer header. */
.toledo-nav { background: #1a2744; padding: 0 0 1rem; }
.toledo-nav .nav { margin-top: 0; }
.toledo-nav .nav a,
.toledo-nav .nav a:visited { color: #f8f4ea; text-decoration: none; }
.toledo-nav .nav a { min-height: 44px; display: inline-flex; align-items: center; }
.toledo-nav .nav a:hover,
.toledo-nav .nav a[aria-current="page"] { color: #e8d48b; border-bottom-color: #e8d48b; }

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  margin-right: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.status-badge.live { color: var(--pray-live); background: var(--pray-live-bg); }
.status-badge.soon { color: var(--pray-gold); background: var(--pray-gold-soft); }
.space-card.is-soon { border-color: color-mix(in srgb, var(--pray-gold) 70%, var(--pray-line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pray-gold) 40%, transparent), var(--pray-shadow); }
.card-grid.is-sparse { grid-template-columns: minmax(0, 1fr); }
.badge-regular {
  margin-left: 0.4rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pray-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

/* Keep the introduction useful but let the first prayer action arrive sooner. */
.pray-hero { margin: 0.75rem 0 0.65rem; padding: 0.8rem 1rem; box-shadow: none; }
.pray-hero h2 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.pray-hero p { font-size: 0.94rem; }
.learn-banner { margin-top: 0.75rem; }
.chip-row { margin-bottom: 0.75rem; }
@media (max-width: 639px) {
  .pray-header { padding: 0.65rem 0 0.75rem; }
  .pray-brand .brand-mark { width: 36px; height: 36px; }
  .pray-brand p { font-size: 0.8rem; }
  .learn-banner { padding: 0.45rem 0.65rem; font-size: 0.85rem; }
  .pray-hero { padding: 0.65rem 0.75rem; }
  .pray-hero h2 { font-size: 1.05rem; }
  .pray-hero p { font-size: 0.88rem; line-height: 1.35; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

.nav-bar { align-items: center; }
.nav-bar a:focus-visible, .toledo-nav a:focus-visible { outline-color: #7eb6ff; }
.mini-btn:hover { filter: brightness(1.08); }
.mini-btn.primary:hover { color: var(--pray-btn-fg); }
@media (max-width: 639px) {
  .pray-header-bar { gap: 0.5rem; }
  .theme-opt { min-width: 58px; padding-inline: 0.55rem; }
  .pray-brand h1 { font-size: 1.2rem; }
  .card-actions { gap: 0.25rem 0.4rem; }
}
@media (max-width: 480px) {
  .pray-brand p { display: none; }
}

/* Champagne hover for accent links; inherit preserves light-mode appearance. */
.pray-hero a.credit:hover, .pray-footer a:hover, .learn-banner a:hover { color: var(--accent-hover, var(--pray-accent)); }

/* New-to-rosary toggle */
.learn-banner { flex-direction: column; align-items: stretch; }
.learn-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; padding: 0; margin: 0; border: 0; background: none;
  color: var(--pray-ink); font: inherit; font-weight: 700; cursor: pointer; text-align: left;
}
.learn-toggle:focus-visible { outline: 2px solid var(--pray-accent); outline-offset: 3px; border-radius: 4px; }
.learn-chev { color: var(--pray-muted); transition: transform .18s ease; }
.learn-toggle[aria-expanded="true"] .learn-chev { transform: rotate(180deg); }
.learn-panel { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; justify-content: space-between; padding-top: 0.45rem; margin-top: 0.45rem; border-top: 1px solid var(--pray-line); }
.learn-panel[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .learn-chev { transition: none; } }

/* toledo-nav mobile spacing */
@media (max-width: 480px) {
  .toledo-nav { padding-bottom: 0.65rem; }
  .toledo-nav .nav {
    gap: 0.15rem 0.65rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .toledo-nav .nav::-webkit-scrollbar { display: none; }
  .toledo-nav .nav a { flex: none; white-space: nowrap; font-size: 0.88rem; }
}

/* Toledo Faith site-header on /pray-online/ (matches homepage chrome) */
.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; }
.site-header .brand { display: flex; gap: 0.9rem; align-items: center; text-decoration: none; color: inherit; }
.site-header .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); }
.site-header .brand h1 { font-family: var(--serif); font-size: clamp(1.2rem, 3vw, 1.85rem); margin: 0; letter-spacing: 0.01em; color: #f8f4ea; }
.site-header .brand p { margin: 0.15rem 0 0; color: #e8d48b; font-size: 0.95rem; }
.site-header .nav { display: flex; flex-wrap: wrap; gap: 0.85rem 1.35rem; margin-top: 1rem; font-size: 0.95rem; }
.site-header .nav a, .site-header .nav a:visited { color: #f8f4ea; text-decoration: none; border-bottom: 1px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.site-header .nav a:hover, .site-header .nav a[aria-current="page"] { border-bottom-color: #e8d48b; color: #e8d48b; }
.site-header .nav a:focus-visible { outline: 3px solid #7eb6ff; outline-offset: 2px; }
@media (max-width: 560px) {
  .site-header { padding: 0.55rem 0 0.45rem; }
  .site-header-bar { gap: 0.4rem; }
  .site-header .brand { gap: 0.55rem; }
  .site-header .brand p { display: none; }
  .site-header .brand h1 { font-size: 1.1rem; }
  .site-header .brand-mark { width: 36px; height: 36px; }
  .site-header .theme-opt { min-width: 52px; min-height: 40px; padding-inline: 0.45rem; font-size: 0.78rem; }
  .site-header .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; }
  .site-header .nav::-webkit-scrollbar { display: none; }
  .site-header .nav a { flex: none; white-space: nowrap; font-size: 0.88rem; padding-inline: 0.1rem; }
}
