/* Crystal Cathedral Prayer — modernized layout.
   Clean white canvas, dark royal-purple header with gold hairline,
   confident type, generous spacing, soft elevation. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; min-height: 100%; }

body {
  background: var(--brand-paper);
  color: var(--brand-ink);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

a {
  color: var(--brand-primary);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.018em; color: var(--brand-ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); line-height: 1.18; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1.2em 0 0.4em; font-weight: 600; }

p, ul, ol { margin: 0 0 1.1em; }
hr { border: 0; border-top: 1px solid var(--brand-line); margin: 2.5rem 0; }

::selection { background: var(--brand-primary); color: #fff; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem var(--space-pad) 5rem;
}
.container--narrow { max-width: 580px; }
.container--wide   { max-width: 1080px; }

/* ─── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--brand-primary);
  color: #fff;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 8px 24px -16px rgba(36, 2, 71, 0.4);
}
.site-header .inner {
  max-width: 1180px; margin: 0 auto;
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem var(--space-pad);
  position: relative;          /* anchor the mobile dropdown */
}
.site-header .accent-strip {
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--brand-accent) 30%, var(--brand-accent) 70%, transparent 100%);
  opacity: 0.85;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.85rem;
  color: #fff;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  height: 44px; width: auto; display: block;
  filter: brightness(0) invert(1);   /* render the dual-tone PNG as white */
  opacity: 0.95;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line1 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.brand-line2 {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-accent);
  margin-top: 4px;
}

.primary-nav {
  display: flex; align-items: center; gap: 0.4rem;
}
.primary-nav a {
  color: rgba(255, 255, 255, 0.78);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.primary-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.primary-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.signout-form { display: inline-flex; margin-left: 0.25rem; }

/* ─── Hamburger toggle (hidden on desktop) ───────────────────── */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); }
.nav-toggle:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.22s ease, top 0.18s ease, opacity 0.15s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after  { top:  7px; }
.site-header.is-nav-open .nav-toggle-bars              { background: transparent; }
.site-header.is-nav-open .nav-toggle-bars::before      { top: 0; transform: rotate(45deg); }
.site-header.is-nav-open .nav-toggle-bars::after       { top: 0; transform: rotate(-45deg); }

/* ─── Mobile breakpoint ──────────────────────────────────────── */
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }

  .site-header .inner {
    gap: 0.75rem;
    padding-left: 1rem; padding-right: 1rem;
  }
  .brand-mark  { height: 36px; }
  .brand-line1 { font-size: 0.98rem; }
  .brand-line2 { font-size: 0.66rem; letter-spacing: 0.16em; }

  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--brand-primary);
    padding: 0.5rem 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5);

    /* hidden by default on mobile */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.28s ease, opacity 0.18s ease, padding 0.28s ease;
  }
  .site-header.is-nav-open .primary-nav {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
  }

  .primary-nav a {
    padding: 0.85rem 0.85rem;
    border-radius: var(--radius);
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .primary-nav a:last-of-type { border-bottom: none; }
  .primary-nav a.active { background: rgba(255, 255, 255, 0.08); }

  .signout-form { margin: 0.5rem 0 0; }
  .signout-form .btn { width: 100%; justify-content: flex-start; padding: 0.85rem; }

  .primary-nav .btn--ghost-light {
    width: 100%; justify-content: center;
    margin-top: 0.5rem; padding: 0.85rem;
  }
}

/* prevent background scroll while the mobile menu is open */
html.nav-locked, html.nav-locked body { overflow: hidden; }
@media (min-width: 761px) {
  html.nav-locked, html.nav-locked body { overflow: visible; }
}

.site-footer {
  background: var(--brand-primary);
  color: rgba(255, 255, 255, 0.75);
  margin-top: 5rem;
  padding: 2.25rem var(--space-pad);
  font-size: 0.92rem; text-align: center;
}
.site-footer p { margin: 0.6rem 0 0; }
.site-footer .footer-nav {
  display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
}
.site-footer .footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.site-footer .footer-nav a:hover { color: var(--brand-accent); text-decoration: none; }

/* ─── PWA install banner — slides down from the top of the viewport ─── */

.pwa-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;                 /* above the sticky header */
  background: var(--brand-primary);
  color: #fff;
  border-bottom: 2px solid var(--brand-accent);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
  transform: translateY(-110%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.pwa-banner.is-open { transform: translateY(0); }
.pwa-banner[hidden] { display: none; }

.pwa-banner-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.75rem var(--space-pad);
}
.pwa-banner-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 4px 12px -6px rgba(0,0,0,0.4);
}
.pwa-banner-text {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
  line-height: 1.3;
}
.pwa-banner-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.01em;
}
.pwa-banner-body {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.78);
}
.pwa-banner-body strong { color: var(--brand-accent); font-weight: 600; }
.pwa-banner-body[hidden] { display: none; }

.pwa-banner-actions {
  display: flex; align-items: center; gap: 0.4rem;
  flex-shrink: 0;
}
.pwa-banner-cta {
  background: var(--brand-accent);
  color: #261600;
  border: 0;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-pill);
  font: inherit; font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.pwa-banner-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(0,0,0,0.4); }
.pwa-banner-cta[hidden] { display: none; }

.pwa-banner-dismiss {
  background: transparent; border: 0;
  color: rgba(255, 255, 255, 0.7);
  width: 36px; height: 36px;
  font-size: 1.5rem; line-height: 1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pwa-banner-dismiss:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* When the banner is open, nudge the page down so the sticky header still
   sits below it (the banner is fixed-position, so this is purely visual). */
html.pwa-banner-open body { padding-top: 64px; }
@media (max-width: 480px) {
  .pwa-banner-icon  { width: 38px; height: 38px; }
  .pwa-banner-title { font-size: 0.95rem; }
  .pwa-banner-body  { font-size: 0.8rem; }
  .pwa-banner-cta   { padding: 0.5rem 0.85rem; font-size: 0.9rem; }
  html.pwa-banner-open body { padding-top: 72px; }
}

/* ─── About / leadership pages ─────────────────────────────── */

.breadcrumb {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}
.breadcrumb a {
  color: var(--brand-muted);
  font-weight: 500;
}
.breadcrumb a:hover { color: var(--brand-primary); }

.profile-hero {
  margin: 0 0 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--brand-line);
}
.profile-hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-primary);
  padding: 0.3rem 0.8rem;
  background: var(--brand-paper-tint);
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}
.profile-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  max-width: 22ch;
}
.profile-hero .profile-roles {
  margin: 0;
  color: var(--brand-muted);
  font-size: 1rem;
  font-weight: 500;
  max-width: 60ch;
}

.leader-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  margin: 0 0 2.5rem;
}
.leader-card .portrait-figure {
  margin: 0;
}
.leader-card .portrait {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--brand-line);
  display: block;
}
.bio-prose p { margin: 0 0 1.1em; }
.bio-prose p.lead {
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--brand-ink);
}

@media (max-width: 720px) {
  .leader-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .leader-card .portrait {
    max-width: 280px;
    margin: 0 auto;
  }
}

.photo-credit {
  font-size: 0.78rem;
  color: var(--brand-muted);
  margin: 0.5rem 0 0;
  text-align: center;
}

/* Page-level CTA: a centered call-to-action wrapped in a soft band */
.page-cta {
  margin: 3rem 0 0;
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid var(--brand-line);
}

.pull-quote {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.25rem; color: var(--brand-primary);
  border-left: 3px solid var(--brand-accent);
  padding: 0.4em 0 0.4em 1.2em;
  margin: 1.75em 0;
  max-width: var(--max-prose);
}
.belief-list { padding-left: 1.2rem; }
.belief-list li { margin-bottom: 0.55em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  background: var(--brand-primary); color: #fff;
  border: 1px solid var(--brand-primary);
  font: inherit; font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(36, 2, 71, 0.18), 0 6px 16px -8px rgba(36, 2, 71, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(36, 2, 71, 0.22), 0 12px 22px -10px rgba(36, 2, 71, 0.45);
  background: #321167;
}
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}
.btn--lg { padding: 0.95rem 1.75rem; font-size: 1.05rem; }
.btn--ghost {
  background: transparent; color: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--brand-paper-tint); color: var(--brand-primary); }
.btn--ghost-light {
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
  padding: 0.5rem 1rem; font-size: 0.95rem;
}
.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}
.btn--quiet {
  background: transparent; color: var(--brand-muted);
  border: 1px solid transparent; box-shadow: none;
}
.btn--quiet:hover { background: var(--brand-paper-tint); color: var(--brand-ink); }
.btn--quiet.btn--on-dark { color: rgba(255,255,255,0.7); }
.btn--quiet.btn--on-dark:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn--danger { background: var(--brand-danger); border-color: var(--brand-danger); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.field { margin: 0 0 1.4rem; }
.field label {
  display: block; font-weight: 600; margin-bottom: 0.4rem;
  font-size: 0.92rem; color: var(--brand-ink);
}
.field label .muted { font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field textarea, .field select {
  width: 100%; padding: 0.8rem 0.95rem;
  background: #fff; color: var(--brand-ink);
  border: 1px solid var(--brand-line); border-radius: var(--radius);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(36, 2, 71, 0.12);
}
.field input::placeholder, .field textarea::placeholder { color: #A8A4B0; }
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.field .help { font-size: 0.85rem; color: var(--brand-muted); margin-top: 0.4rem; }
.field--inline { display: flex; align-items: center; gap: 0.65rem; }
.field--inline input[type="checkbox"] {
  width: 1.1rem; height: 1.1rem; accent-color: var(--brand-primary);
}
.field--inline label { font-weight: 500; margin-bottom: 0; }

.radio-group { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.radio-group label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  background: #fff;
  border: 1px solid var(--brand-line); border-radius: var(--radius-pill);
  font-weight: 500; font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.radio-group label:hover { border-color: var(--brand-primary); }
.radio-group input[type="radio"] { accent-color: var(--brand-primary); }
.radio-group label:has(input:checked) {
  background: var(--brand-paper-tint);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.honeypot { position: absolute; left: -10000px; opacity: 0; height: 0; width: 0; }

.flash {
  padding: 0.85rem 1.1rem; border-radius: var(--radius);
  background: var(--brand-paper-tint); border-left: 3px solid var(--brand-primary);
  margin-bottom: 1.25rem; color: var(--brand-ink);
}

.card-row { display: flex; flex-direction: column; gap: 1.25rem; }

/* ─── Prayer Inbox (email-client list) ───────────────────────── */

.inbox-page { padding-top: 1.75rem; }
.inbox-header {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.inbox-header h1 { margin: 0 0 0.25rem; font-size: clamp(1.6rem, 3vw, 2.1rem); }

.inbox-filters {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--brand-line);
  padding-bottom: 0.6rem;
}
.inbox-filter {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem; font-weight: 500;
  color: var(--brand-muted);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.inbox-filter:hover { background: var(--brand-paper-tint); color: var(--brand-ink); text-decoration: none; }
.inbox-filter.is-active {
  background: var(--brand-primary); color: #fff;
}

.inbox-list {
  list-style: none; padding: 0; margin: 0;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.inbox-loading {
  padding: 1rem; text-align: center;
  border-top: 1px solid var(--brand-line);
}

.inbox-row {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--brand-line);
  position: relative;
  transition: background 0.12s ease;
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--brand-paper-tint); }
.inbox-row.is-self-harm { background: linear-gradient(to right, #FFF8F4 0, #FFF8F4 4px, transparent 4px); }
.inbox-row.is-self-harm:hover { background: linear-gradient(to right, var(--brand-danger) 0, var(--brand-danger) 4px, var(--brand-paper-tint) 4px); }
.inbox-row.is-prayed { background: #FCFBFD; }
.inbox-row.just-prayed { animation: justPrayed 1.4s ease-out; }
@keyframes justPrayed {
  0%   { background: #F0EAF6; }
  60%  { background: #F0EAF6; }
  100% { background: #FCFBFD; }
}

.inbox-row-link {
  display: grid;
  grid-template-columns: 24px 180px 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  flex: 1; min-width: 0;
  padding: 0.85rem 0.5rem 0.85rem 1rem;
  color: inherit;
  text-decoration: none !important;
}
.inbox-row.is-prayed .inbox-row-link { color: var(--brand-muted); }

.inbox-row-status { display: flex; align-items: center; justify-content: center; }
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
}
.dot--new     { background: var(--brand-primary); box-shadow: 0 0 0 3px rgba(36, 2, 71, 0.12); }
.dot--prayed  { background: transparent; border: 2px solid var(--brand-line); }
.dot--danger  { background: var(--brand-danger); box-shadow: 0 0 0 3px rgba(184, 66, 59, 0.18); }

.inbox-row-sender {
  font-weight: 600; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--brand-ink);
}
.inbox-row.is-prayed .inbox-row-sender { font-weight: 500; color: var(--brand-muted); }

.inbox-row-content {
  min-width: 0;
  display: flex; align-items: baseline; gap: 0.6rem;
  overflow: hidden;
}
.inbox-row-subject {
  font-weight: 700; font-size: 0.97rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 0; max-width: 40%;
  color: var(--brand-ink);
}
.inbox-row.is-prayed .inbox-row-subject { font-weight: 500; color: var(--brand-muted); }
.inbox-row-snippet {
  color: var(--brand-muted);
  font-size: 0.92rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}

.inbox-row-badges { display: flex; gap: 0.35rem; align-items: center; }
.inbox-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.74rem; font-weight: 600;
  padding: 0.18rem 0.55rem; border-radius: var(--radius-pill);
  background: var(--brand-paper-tint);
  color: var(--brand-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.inbox-badge--followup { background: var(--brand-accent); color: #261600; }
.inbox-badge--count    { background: transparent; color: var(--brand-muted); padding: 0; }

.inbox-row-time {
  font-size: 0.85rem; color: var(--brand-muted);
  white-space: nowrap;
  text-align: right; min-width: 60px;
}

.inbox-row-action {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--brand-line);
  cursor: pointer;
  color: var(--brand-muted);
  transition: background 0.12s ease, color 0.12s ease;
}
.inbox-row-action:hover { background: var(--brand-paper-tint); color: var(--brand-primary); }
.inbox-row-action--done {
  color: #2E7D4F;
  cursor: default;
  background: #F1F8F2;
}

.inbox-empty {
  padding: 3rem 1rem;
  text-align: center;
  border: 1px dashed var(--brand-line);
  border-radius: var(--radius);
  margin-top: 1rem;
}

@media (max-width: 720px) {
  .inbox-row-link {
    grid-template-columns: 18px 1fr auto;
    grid-template-areas:
      "status sender    time"
      "status content   content"
      "status badges    badges";
    gap: 0.25rem 0.6rem;
    padding: 0.7rem 0.5rem 0.7rem 0.85rem;
  }
  .inbox-row-status  { grid-area: status; align-self: start; padding-top: 0.45rem; }
  .inbox-row-sender  { grid-area: sender; max-width: 100%; }
  .inbox-row-content { grid-area: content; }
  .inbox-row-subject { max-width: 100%; }
  .inbox-row-badges  { grid-area: badges; }
  .inbox-row-time    { grid-area: time; }
  .inbox-row-action  { width: 50px; }
}

/* ─── Detail view ───────────────────────────────────────────── */

.prayer-detail-header {
  border-bottom: 1px solid var(--brand-line);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}
.prayer-detail-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.prayer-detail-header.is-self-harm {
  border-left: 3px solid var(--brand-danger);
  padding-left: 1rem;
  margin-left: -1rem;
}
.prayer-detail-banner {
  background: #FFF8F4;
  border-left: 3px solid var(--brand-danger);
  color: var(--brand-danger);
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
  border-radius: var(--radius);
}
.prayer-detail-meta {
  color: var(--brand-muted);
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
  font-size: 0.92rem;
}
.prayer-detail-sender { font-weight: 600; color: var(--brand-ink); }
.prayer-detail-divider { opacity: 0.5; }

.prayer-detail-body {
  font-size: 1.1rem;
  line-height: 1.65;
  white-space: pre-wrap;
  margin: 0 0 1.5rem;
}

.prayer-detail-count { margin: 0 0 1.25rem; font-size: 0.95rem; }

.prayer-detail-actions {
  display: flex; gap: 0.75rem; align-items: center;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-top: 1px solid var(--brand-line);
}
.prayer-detail-prayed {
  cursor: default;
  background: #F1F8F2;
  border-color: #C7E0CD;
  color: #2E7D4F;
}
.prayer-detail-prayed:hover { background: #F1F8F2; transform: none; }

.prayer-detail-flag-btn {
  color: var(--brand-muted);
  border-color: var(--brand-line);
}
.prayer-detail-flag-btn:hover { color: var(--brand-danger); border-color: var(--brand-danger); }

.prayer-detail-flag-state {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: var(--brand-paper-tint);
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  color: var(--brand-muted);
}
.prayer-detail-flag-state.just-flagged { color: var(--brand-primary); }

.prayer-detail-footnote {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-style: italic;
}

/* ─── My requests header ─────────────────────────────────── */
.my-requests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.my-requests-header h1 { margin: 0 0 0.25rem; }

/* ─── Admin → Follow-up list ─────────────────────────────── */

.followup-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 1rem;
}

.followup-card {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1.5rem;
  align-items: start;
  transition: box-shadow 0.18s ease;
}
.followup-card:hover { box-shadow: var(--shadow-md); }
.followup-card.is-contacted { background: #FCFBFD; opacity: 0.85; }

.followup-status {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.status-pill--pending {
  background: var(--brand-paper-tint);
  color: var(--brand-primary);
}
.status-pill--pending::before { display: none; }   /* dot is in text */
.status-pill--done {
  background: #E8F5EC;
  color: #2E7D4F;
}
.status-pill--flag {
  background: #FFF1ED;
  color: #B0411A;
}
.status-pill--danger {
  background: var(--brand-danger);
  color: #fff;
}
.status-pill--rejected {
  background: #F4D8D6;
  color: #6E1E1A;
}
.status-pill--neutral {
  background: var(--brand-paper-tint);
  color: var(--brand-muted);
}

.meta-chip {
  display: inline-block;
  margin: 0 0.3rem 0.2rem 0;
  padding: 0.15rem 0.55rem;
  background: var(--brand-paper-tint);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  color: var(--brand-primary);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Inline collapsible action (Edit / Unpublish in Needs Review) */
.inline-action { display: inline-block; }
.inline-action > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.inline-action > summary::-webkit-details-marker { display: none; }
.inline-action[open] > summary { background: var(--brand-paper-tint); }
.inline-action-form {
  margin-top: 0.6rem;
  padding: 0.85rem;
  background: var(--brand-paper-tint);
  border-radius: var(--radius);
  min-width: min(420px, 80vw);
}
.inline-action-form .field { margin-bottom: 0.85rem; }
.inline-action-form .field:last-of-type { margin-bottom: 1rem; }

/* ─── Admin filter bar + tables (consistent across tabs) ─── */
.admin-filterbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 0 0 1.25rem;
  padding: 1rem;
  background: var(--brand-paper-tint);
  border-radius: var(--radius);
}
.admin-filterbar .field { margin: 0; min-width: 160px; }
.admin-filterbar__search { flex: 1; min-width: 240px; }
.admin-filterbar .field input,
.admin-filterbar .field select { padding: 0.55rem 0.75rem; }

.admin-select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  background: #fff;
  color: var(--brand-ink);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  font: inherit; font-size: 0.92rem;
  cursor: pointer;
}
.admin-select:focus { outline: 2px solid var(--brand-primary); outline-offset: 1px; }

.admin-table-shell {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.admin-table thead th {
  background: var(--brand-paper-tint);
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-muted);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--brand-line);
}
.admin-table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--brand-line);
  vertical-align: top;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(36, 2, 71, 0.02); }
.admin-table__when { white-space: nowrap; font-weight: 500; }
.admin-table__action { white-space: nowrap; text-align: right; }
.admin-table__action form { display: inline-block; margin: 0; }
.admin-table__action .btn { padding: 0.45rem 0.8rem; font-size: 0.88rem; }
.admin-table form { margin: 0; }

.followup-title {
  grid-column: 1;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand-ink);
}

.followup-body {
  grid-column: 1 / -1;
  margin: 0.1rem 0 0.6rem;
  white-space: pre-wrap;
  color: var(--brand-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 70ch;
}

.followup-meta {
  grid-column: 1;
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  margin: 0;
}
.followup-meta div { margin: 0; }
.followup-meta dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-muted);
  margin: 0 0 0.15rem;
}
.followup-meta dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--brand-ink);
  font-weight: 500;
}

.followup-action {
  grid-column: 2;
  grid-row: 4;
  align-self: end;
  margin: 0;
}
.followup-action .btn { white-space: nowrap; }
.followup-action--pair {
  display: flex; gap: 0.5rem;
  align-self: end; flex-wrap: wrap;
}
.followup-action--pair form { margin: 0; }

.flag-details {
  grid-column: 1 / -1;
  background: var(--brand-paper-tint);
  border-left: 3px solid var(--brand-primary);
  padding: 0.65rem 0.9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
  margin: 0;
  color: var(--brand-ink);
}
.flag-details strong { color: var(--brand-primary); }

@media (max-width: 720px) {
  .followup-card {
    grid-template-columns: 1fr;
  }
  .followup-action {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0.5rem;
  }
  .followup-action .btn { width: 100%; }
}

.prayer-card {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.prayer-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.prayer-card h3 { margin: 0 0 0.4em; font-size: 1.15rem; }
.prayer-card .meta {
  font-size: 0.85rem; color: var(--brand-muted);
  display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.85em;
  align-items: center;
}
.prayer-card .body { white-space: pre-wrap; max-width: var(--max-prose); margin: 0 0 1em; }
.prayer-card .actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.prayer-card .followup-flag {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px;
  background: var(--brand-accent); color: #fff; font-size: 0.75rem;
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
/* Per-tab decorations have been retired in favor of consistent status pills.
   Kept these selectors as no-ops so any lingering markup doesn't break. */

.btn-prayed[disabled] { background: var(--brand-paper-tint); color: var(--brand-primary); border-color: var(--brand-line); }
.btn-prayed.is-on { background: var(--brand-paper-tint); color: var(--brand-primary); border-color: var(--brand-line); }

.tabs {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  margin-bottom: 1.75rem; border-bottom: 1px solid var(--brand-line);
}
.tabs a {
  padding: 0.7rem 1rem;
  border-bottom: 2px solid transparent;
  color: var(--brand-muted);
  font-weight: 500;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tabs a:hover { color: var(--brand-ink); text-decoration: none; }
.tabs a.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); font-weight: 600; }

table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th, table.data td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--brand-line); vertical-align: top; }
table.data th { font-weight: 600; color: var(--brand-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }

.muted { color: var(--brand-muted); }
.badge {
  display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px;
  font-size: 0.78rem; background: var(--brand-paper-tint);
  border: 1px solid var(--brand-line); color: var(--brand-ink);
}
.badge--warn { background: #F8E9D5; border-color: #E5C490; color: #6B4400; }
.badge--ok   { background: #E5F0E2; border-color: #B6CFA9; color: #2E5121; }
.badge--err  { background: #F4D8D6; border-color: #D69A95; color: #6E1E1A; }

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }

.hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
  position: relative;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-primary);
  padding: 0.35rem 0.85rem;
  background: var(--brand-paper-tint);
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin-bottom: 0.5em; }
.hero p {
  color: var(--brand-muted);
  max-width: 56ch; margin: 0 auto 2rem;
  font-size: 1.08rem; line-height: 1.55;
}

.embed-card {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 1.75rem; background: #fff;
  box-shadow: var(--shadow-sm);
}

/* Form surface — wraps the submission form so it reads as one composed object */
.form-card {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

/* Existing-account hint shown live under the email/phone field when
   the entered email matches a user in the system. */
.contact-existing-account {
  margin-top: 0.6rem;
  padding: 0.7rem 0.95rem;
  background: var(--brand-paper-tint);
  border-left: 3px solid var(--brand-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--brand-ink);
  font-size: 0.92rem;
  line-height: 1.45;
}
.contact-existing-account strong {
  color: var(--brand-primary);
  display: inline;
  margin-right: 0.25rem;
}
.contact-existing-account a {
  font-weight: 600;
}
.contact-existing-account[hidden] { display: none; }

.btn.is-blocked-existing { /* extra dim when blocked due to existing account */
  filter: saturate(0.4);
}

/* Visibility-controlled contact fields — collapse on "Anonymous" */
.contact-fields {
  overflow: hidden;
  max-height: 600px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.22s ease;
}
.contact-fields[hidden] {
  display: block;            /* override [hidden]'s display:none so it can animate */
  max-height: 0;
  opacity: 0;
}
#visibility-hint {
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--brand-muted);
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: var(--brand-paper); padding: 1.5rem; border-radius: var(--radius);
  max-width: 480px; width: 90%;
  box-shadow: var(--shadow-md);
}

/* ─── On-brand confirm modal ─────────────────────────────────── */
.cc-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
}
.cc-modal[hidden] { display: none; }
.cc-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 8, 31, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: ccFade 0.18s ease-out;
}
.cc-modal-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--brand-line);
  box-shadow: var(--shadow-lg);
  max-width: 460px; width: 100%;
  padding: 1.5rem 1.6rem 1.4rem;
  animation: ccPop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-modal-card::before {
  content: "";
  display: block;
  position: absolute; top: 0; left: 1.6rem; right: 1.6rem;
  height: 3px; border-radius: 2px;
  background: var(--brand-accent);
}
.cc-modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--brand-ink);
}
.cc-modal-body {
  margin: 0 0 1.25rem;
  color: var(--brand-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}
.cc-modal-actions {
  display: flex; gap: 0.6rem; justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 420px) {
  .cc-modal-actions { flex-direction: column-reverse; }
  .cc-modal-actions .btn { width: 100%; justify-content: center; }
}

html.cc-modal-open, html.cc-modal-open body { overflow: hidden; }

@keyframes ccFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ccPop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

@media (max-width: 600px) {
  .container { padding: 1rem; }
  .hero h1 { font-size: 2rem; }
  .site-header nav a { margin-left: 0.6rem; }
}
