/* ============================================================
   Ministry Plan Builder – Stylesheet
   Warm, accessible, church-friendly design
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #1a2e4a;
  --navy-mid:  #243c61;
  --navy-light:#2f4f7c;
  --gold:      #c49a2a;
  --gold-light:#f0c84b;
  --cream:     #fdf8f0;
  --warm-white:#ffffff;
  --slate:     #4a5568;
  --slate-light:#718096;
  --border:    #e2d9c8;
  --error:     #c0392b;
  --success:   #2e7d32;

  --font-head: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  --radius: 10px;
  --shadow: 0 2px 12px rgba(26,46,74,0.10);
  --shadow-lg: 0 6px 32px rgba(26,46,74,0.14);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--navy);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ─────────────────────────────── */
.site-header {
  background: var(--navy);
  color: white;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.header-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: bold;
  letter-spacing: 0.01em;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: bold;
}
.brand-link:hover { color: var(--gold-light); }
.brand-icon { color: var(--gold-light); font-size: 1.1rem; }
.header-tagline { font-size: 0.8rem; color: rgba(255,255,255,0.65); letter-spacing: 0.04em; text-transform: uppercase; }

/* ── Hero ────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  color: white;
  padding: 4rem 1.25rem 3.5rem;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.hero-sub {
  max-width: 600px;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ── Form Section ─────────────────────────── */
.form-section {
  padding: 2.5rem 0 4rem;
}

/* Progress dots */
.form-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}
.prog-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  color: var(--slate);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.prog-dot:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.prog-dot.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
  box-shadow: 0 0 0 3px rgba(26,46,74,0.15);
}
.prog-line {
  flex: 1;
  max-width: 48px;
  height: 2px;
  background: var(--border);
}

/* Form card */
.form-card {
  display: none;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.25rem 2.5rem;
  border: 1px solid var(--border);
  animation: fadeIn 0.25s ease;
}
.form-card.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--cream);
  padding-bottom: 1.25rem;
}
.card-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.4rem;
}
.card-header h2 {
  font-family: var(--font-head);
  font-size: 1.55rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.card-header p { color: var(--slate); font-size: 0.95rem; }

/* Fields */
.field-group { margin-bottom: 1.4rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.4rem;
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.45rem;
}
.req { color: var(--gold); }

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--navy);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(47,79,124,0.12);
}
input.invalid, select.invalid, textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
textarea { resize: vertical; min-height: 90px; }
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='%234a5568' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.25rem; cursor: pointer; }

.field-hint {
  font-size: 0.82rem;
  color: var(--slate-light);
  margin-bottom: 0.6rem;
  margin-top: -0.25rem;
}

/* Radio cards */
.radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 0.25rem;
}
@media (max-width: 560px) { .radio-group { grid-template-columns: 1fr; } }

.radio-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 0.25rem;
}
@media (max-width: 640px) { .radio-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .radio-grid-3 { grid-template-columns: 1fr; } }

.invalid-group {
  outline: 2px solid #e53e3e;
  outline-offset: 6px;
  border-radius: 8px;
}

.radio-card {
  cursor: pointer;
}
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.radio-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
  background: white;
}
.radio-box strong { font-size: 1rem; color: var(--navy); }
.radio-box span { font-size: 0.8rem; color: var(--slate); }
.radio-card input[type="radio"]:checked + .radio-box {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: 0 2px 10px rgba(26,46,74,0.18);
}
.radio-card input[type="radio"]:checked + .radio-box strong,
.radio-card input[type="radio"]:checked + .radio-box span { color: white; }
.radio-card input[type="radio"]:focus-visible + .radio-box { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Multi-select cards (checkboxes) */
.check-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.check-card .radio-box { position: relative; }
.check-card.selected .radio-box {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: 0 2px 10px rgba(26,46,74,0.18);
}
.check-card.selected .radio-box strong,
.check-card.selected .radio-box span { color: white; }
.check-card input[type="checkbox"]:focus-visible + .radio-box { outline: 3px solid var(--gold); outline-offset: 2px; }

.order-badge {
  display: none;
  position: absolute;
  top: -10px;
  right: -8px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.helper-strong {
  font-weight: 600;
  color: var(--navy);
}
.multi-msg {
  margin: 0.5rem 0 0;
  min-height: 1.1em;
  font-size: 0.85rem;
  color: #b7791f;
  opacity: 0;
  transition: opacity 0.15s;
}
.multi-msg.show { opacity: 1; }

/* "Our understanding of your church" recap */
.understanding-card {
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: #fbfaf6;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}
.understanding-card h3 {
  margin: 0 0 0.25rem;
  color: var(--navy);
  font-size: 1.1rem;
}
.understanding-sub {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--slate);
}
.understanding-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.understanding-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.understanding-list li:last-child { border-bottom: none; }
.u-label { color: var(--slate); font-size: 0.9rem; }
.u-value { color: var(--navy); font-weight: 600; text-align: right; }

/* Intro guidance note */
.intro-note {
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: #fbfaf6;
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.5rem;
}
.intro-note-title {
  margin: 0 0 0.3rem;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
.intro-note p:last-child {
  margin: 0;
  color: var(--slate);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Additional Comments or Context boxes */
.comments-group {
  border-top: 1px dashed var(--border);
  padding-top: 1.1rem;
  margin-top: 1.4rem;
}
.comments-group label { color: var(--navy); }
.comments-group .field-hint { margin-top: 0.15rem; }

/* Final review screen */
.review-card {
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  background: #fbfaf6;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}
.review-card h3 {
  margin: 0 0 0.25rem;
  color: var(--navy);
  font-size: 1.1rem;
}
.review-note { font-style: italic; }
.review-section {
  border-top: 1px solid var(--border);
  padding: 0.85rem 0;
}
.review-section:last-child { padding-bottom: 0; }
.review-section-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.review-section-hdr h4 {
  margin: 0;
  color: var(--navy);
  font-size: 0.98rem;
}
.review-edit-btn {
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
}
.review-row {
  display: flex;
  gap: 1rem;
  padding: 0.32rem 0;
  font-size: 0.88rem;
}
.review-label {
  flex: 0 0 42%;
  color: var(--slate);
}
.review-value {
  flex: 1;
  color: var(--navy);
  font-weight: 500;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-value.review-empty {
  color: var(--slate);
  font-weight: 400;
  font-style: italic;
}
.review-row--comment { background: #f6f2e8; border-radius: 6px; padding: 0.45rem 0.5rem; }
@media (max-width: 640px) {
  .review-row { flex-direction: column; gap: 0.1rem; }
  .review-label { flex-basis: auto; }
}

/* Submit box */
.submit-box {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0 1rem;
  text-align: center;
}
.submit-box p { font-size: 0.9rem; color: var(--slate); margin-bottom: 0.5rem; }
.time-note { font-style: italic; font-size: 0.82rem; color: var(--slate-light); }

/* Navigation buttons */
.field-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cream);
}

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.35rem;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  border: 1.5px solid transparent;
  text-decoration: none;
  font-family: var(--font-body);
  line-height: 1.3;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.btn-primary:hover:not(:disabled) { background: var(--navy-mid); border-color: var(--navy-mid); }

.btn-secondary {
  background: white;
  color: var(--navy);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--cream); }

.btn-danger {
  background: white;
  color: #b42318;
  border-color: #f3c2bc;
}
.btn-danger:hover { background: #fef3f2; border-color: #d92d20; }

.plan-action-form { display: inline; margin: 0; }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-weight: 700;
}
.btn-gold:hover { background: #b8932a; border-color: #b8932a; color: white; }

.btn-ghost-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--slate-light);
}
.btn-ghost-outline:hover { background: var(--cream); border-color: var(--navy); }

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--navy); background: var(--cream); }

.btn-generate {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-size: 1.05rem;
  padding: 0.8rem 2rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(196,154,42,0.3);
  margin-top: 1rem;
}
.btn-generate:hover:not(:disabled) { background: var(--gold-light); border-color: var(--gold-light); }

/* Spinner */
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid rgba(26,46,74,0.25);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Plan Page ───────────────────────────── */
.plan-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  color: white;
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}
.plan-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}
.plan-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.plan-meta { color: rgba(255,255,255,0.7); font-size: 0.92rem; margin-bottom: 1.75rem; }
.plan-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.plan-actions .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.plan-actions .btn-primary:hover { background: var(--gold-light); }
.plan-actions .btn-secondary { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: white; }
.plan-actions .btn-secondary:hover { background: rgba(255,255,255,0.2); }
.plan-actions .btn-ghost { color: rgba(255,255,255,0.7); }
.plan-actions .btn-ghost:hover { color: white; background: rgba(255,255,255,0.08); }

.plan-body { padding: 3rem 0 4rem; }

/* Prose / plan content typography */
.prose {
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.75;
}
.prose h1 {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--gold);
}
.prose h2 {
  font-family: var(--font-head);
  font-size: 1.45rem;
  color: var(--navy);
  margin: 2.5rem 0 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
}
.prose h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--navy-light);
  margin: 1.75rem 0 0.5rem;
}
.prose h4 {
  font-weight: 700;
  color: var(--slate);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.4rem;
}
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--navy); }
.prose em { color: var(--slate); }
.prose hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2.5rem 0;
}
.prose blockquote {
  border-left: 4px solid var(--gold);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--cream);
  color: var(--slate);
  border-radius: 0 6px 6px 0;
}

.plan-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

/* ── Ministry year calendar & preaching rota ───────────────────────────── */
.calendar-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%); color: white; padding: 2.5rem 1.25rem; }
.calendar-hero h1 { font-family: var(--font-head); font-size: clamp(1.7rem, 4vw, 2.5rem); }
.calendar-container { padding-top: 2rem; padding-bottom: 4rem; }
.calendar-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.25rem; }
.calendar-card h2 { font-family: var(--font-head); color: var(--navy); font-size: 1.35rem; margin-bottom: .35rem; }
.calendar-card h3 { color: var(--navy); font-size: 1rem; margin: 1rem 0 .55rem; }
.calendar-card > p { color: var(--slate); font-size: .92rem; margin-bottom: 1rem; }
.calendar-form label { margin-top: .55rem; }
.calendar-form .btn { margin-top: .8rem; }
.calendar-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.calendar-list { list-style: none; border-top: 1px solid var(--border); }
.calendar-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); color: var(--slate); font-size: .9rem; }
.calendar-list strong { color: var(--navy); }
.calendar-tag { display: inline-block; color: var(--navy); background: var(--cream); border: 1px solid var(--border); border-radius: 999px; padding: .05rem .45rem; font-size: .72rem; margin-left: .2rem; }
.calendar-message { background: #e7f4e9; border: 1px solid #b8ddbd; border-radius: 7px; color: #24632c; padding: .65rem 1rem; margin-bottom: 1rem; }
.calendar-help { font-style: italic; }
.calendar-month-card { overflow: hidden; }
.calendar-month-heading, .calendar-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.calendar-month-heading .calendar-help { margin: 0; }
.calendar-month-nav { margin: 1rem 0; }
.month-grid { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--border); }
.month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.month-weekday { background: var(--cream); padding: .45rem .25rem; text-align: center; font-size: .75rem; font-weight: 700; color: var(--navy); }
.weekday-short { display: none; }
.month-day { position: relative; min-width: 0; min-height: 7rem; background: white; }
.month-day.outside-month { background: #f8f6f1; color: var(--slate-light); }
.month-day.selected { box-shadow: inset 0 0 0 3px var(--gold); }
.month-day-link { display: flex; align-items: center; justify-content: space-between; min-height: 2rem; padding: .25rem .4rem; color: inherit; text-decoration: none; font-weight: 700; }
.month-day-link:hover { background: var(--cream); }
.month-day-link:focus-visible { position: relative; z-index: 2; outline: 3px solid var(--navy-light); outline-offset: -3px; }
.month-item-count { display: none; min-width: 1.25rem; border-radius: 999px; background: var(--navy); color: white; text-align: center; font-size: .7rem; }
.month-day-items { list-style: none; padding: 0 .3rem .3rem; }
.month-day-items li { overflow: hidden; margin: .18rem 0; padding: .12rem .25rem; border-left: 3px solid var(--navy-light); background: #eef2f7; color: var(--navy); font-size: .68rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.month-day-items .month-item-automatic { border-left-color: var(--gold); background: var(--cream); }
.day-agenda { margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 8px; }
.day-agenda:focus { outline: none; }
.day-agenda-prompt { margin-top: 1rem; color: var(--slate); text-align: center; }
.calendar-conflict { border-color: #d92d20; background: #fef3f2; color: #b42318; font-weight: 700; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 130px; }
.calendar-interview { border-top: 1px solid var(--border); padding: .7rem 0; }
.calendar-interview summary { cursor: pointer; color: var(--navy); }
.calendar-interview p { margin: .65rem 0; }
.link-button { border: 0; background: transparent; color: var(--navy-light); text-decoration: underline; cursor: pointer; font: inherit; font-size: .8rem; margin-left: .4rem; }
.rota-table { width: 100%; border-collapse: collapse; background: white; } .rota-table th, .rota-table td { text-align: left; border: 1px solid var(--border); padding: .55rem; } .rota-table th { background: var(--cream); }
.dashboard-calendar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; } .dashboard-calendar-card { margin: 0; padding: 1rem; } .dashboard-calendar-card h2 { font-size: 1.05rem; }
@media (max-width: 640px) { .dashboard-calendar-grid { grid-template-columns: 1fr; } }
@media print { .site-header, .site-footer, .btn { display: none !important; } body { background: white; } }
@media (max-width: 640px) { .calendar-columns { grid-template-columns: 1fr; } .inline-form input, .inline-form select { flex-basis: 100%; } }
@media (max-width: 640px) {
  .calendar-month-heading { align-items: flex-start; flex-direction: column; }
  .calendar-month-heading form { width: 100%; }
  .calendar-month-nav .btn { padding: .45rem .65rem; font-size: .78rem; }
  .month-weekday { padding: .3rem 0; }
  .weekday-full { display: none; }
  .weekday-short { display: inline; }
  .month-day { min-height: 2.9rem; }
  .month-day-link { min-height: 2.9rem; padding: .3rem; align-items: flex-start; }
  .month-item-count { display: inline-block; }
  .month-day-items { display: none; }
  .day-agenda { padding: .85rem; }
}

/* ── Error ───────────────────────────────── */
.error-container { padding: 4rem 1.25rem; }
.error-card {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1.5px solid #f5c6c6;
  max-width: 600px;
  margin: 0 auto;
}
.error-card h1 { font-family: var(--font-head); color: var(--error); margin-bottom: 1rem; }
.error-msg { color: var(--error); font-size: 0.97rem; }

/* ── Toast ───────────────────────────────── */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--navy);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 9999;
}
.copy-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Footer ──────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: 1.5rem 1.25rem;
  font-size: 0.82rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.7); font-weight: 600; }
.footer-brand .brand-icon { color: var(--gold-light); }
.footer-links { display: inline-flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-help { display: inline-flex; flex-direction: column; color: var(--gold-light); font-weight: 600; text-decoration: none; }
.footer-help:hover { text-decoration: underline; }
.footer-help-sub { color: rgba(255,255,255,0.45); font-weight: 400; font-size: 0.72rem; }
.footer-link { color: rgba(255,255,255,0.6); text-decoration: none; }
.footer-link:hover { color: white; }
.footer-version { color: rgba(255,255,255,0.4); font-weight: 400; font-size: 0.72rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; padding: 0.1rem 0.55rem; }
.footer-legal { max-width: 1080px; margin: 1rem auto 0; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); font-size: 0.75rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.footer-legal-sep { opacity: 0.6; }

/* ── Help & inquiry CTA cards ── */
.help-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 0 1.75rem; }
.help-cta-card { display: flex; flex-direction: column; gap: 0.35rem; background: var(--cream); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 1rem 1.25rem; text-decoration: none; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.help-cta-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.help-cta-title { font-family: var(--font-head); color: var(--navy); font-weight: 700; }
.help-cta-sub { color: var(--slate); font-size: 0.85rem; }
@media (max-width: 640px) { .help-cta-grid { grid-template-columns: 1fr; } }

/* ── Legal / About pages ── */
.legal-container { max-width: 760px; margin: 2.5rem auto; }
.legal-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.25rem 2.5rem; }
.legal-title { font-family: var(--font-head); color: var(--navy); margin: 0.25rem 0 0.5rem; }
.legal-lead { color: var(--slate); font-size: 1.05rem; margin: 0 0 1.5rem; }
.legal-card h2 { font-family: var(--font-head); color: var(--navy); font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.legal-card p { color: var(--body); line-height: 1.7; margin: 0 0 0.9rem; }
.legal-list { color: var(--body); line-height: 1.7; margin: 0 0 0.9rem; padding-left: 1.25rem; }
.legal-list li { margin-bottom: 0.4rem; }
.legal-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0 0.5rem; }
.legal-version { color: var(--slate-light); font-size: 0.8rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ── Branded plan mark (screen + print) ── */
.plan-brandmark { text-align: center; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.plan-brandmark-title { font-family: var(--font-head); color: var(--navy); font-weight: 700; }
.plan-brandmark-sub { color: var(--slate); font-size: 0.9rem; }
.plan-brandmark-url { font-size: 0.85rem; margin-top: 0.15rem; }
.plan-brandmark-url a { color: var(--gold-dark, #a8862f); text-decoration: none; }
.plan-brandmark-url a:hover { text-decoration: underline; }

/* ── Help & Feedback form ── */
.help-container { max-width: 720px; margin: 2.5rem auto; }
.help-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.help-title { font-family: var(--font-head); color: var(--navy); margin: 0 0 0.35rem; }
.help-sub { color: var(--slate); margin: 0 0 1.5rem; }
.help-form { display: flex; flex-direction: column; }
.help-row { display: flex; gap: 1rem; }
.help-field { flex: 1; display: flex; flex-direction: column; }
.help-optional { color: var(--slate-light); font-weight: 400; font-size: 0.82rem; }
.help-textarea { resize: vertical; font-family: var(--font-body); }
.help-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; margin: 1rem 0; }
.help-fieldset legend { font-weight: 600; color: var(--navy); padding: 0 0.5rem; }

/* ── Plan-specific feedback card ── */
.plan-feedback-card { background: var(--cream); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-top: 1.5rem; }
.plan-feedback-card h3 { margin: 0 0 0.35rem; font-family: var(--font-head); color: var(--navy); }
.plan-feedback-card p { margin: 0 0 1rem; color: var(--slate); }

/* ── Admin feedback dashboard ── */
.admin-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; align-items: center; }
.admin-filters .auth-input { width: auto; flex: 0 1 auto; margin: 0; }
.admin-filters input[name="q"] { flex: 1 1 220px; }
.admin-table-wrap { overflow-x: auto; background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { background: var(--cream); color: var(--navy); font-weight: 600; }
.admin-row { cursor: pointer; }
.admin-row:hover { background: var(--cream); }
.admin-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; color: var(--slate-light); }
.badge-status, .badge-priority { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; text-transform: capitalize; }
.badge-new { background: #e3effb; color: #1c5a94; }
.badge-reviewing { background: #fdf1d6; color: #8a6d1a; }
.badge-resolved { background: #dff2e1; color: #2e7d32; }
.badge-closed { background: #e8e8e8; color: #555; }
.badge-low { background: #eef1f4; color: #5a6b7b; }
.badge-normal { background: #e3effb; color: #1c5a94; }
.badge-high { background: #fdf1d6; color: #8a6d1a; }
.badge-urgent { background: #fbe0dd; color: #b0361f; }
.admin-back { margin: 1.5rem 0 0.5rem; }
.admin-back a { color: var(--navy-mid); text-decoration: none; font-weight: 600; }
.admin-detail { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; margin-bottom: 3rem; }
.admin-detail-main { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; }
.admin-detail-subject { font-family: var(--font-head); color: var(--navy); margin: 0 0 0.5rem; }
.admin-detail-meta { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; color: var(--slate); margin-bottom: 1.25rem; }
.admin-detail-message { white-space: pre-wrap; color: var(--navy); line-height: 1.7; }
.admin-detail-block { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.admin-detail-block h3 { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--navy); }
.admin-detail-block p { margin: 0.3rem 0; font-size: 0.88rem; word-break: break-word; }
.admin-manage .auth-input { margin-bottom: 0.75rem; }

@media (max-width: 760px) {
  .help-row { flex-direction: column; gap: 0; }
  .admin-detail { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Ask-about button (injected after each h2) ── */
.ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--navy-mid);
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 0.8rem 0.3rem 0.6rem;
  cursor: pointer;
  margin: 0.3rem 0 1.1rem;
  transition: all 0.15s;
  line-height: 1;
}
.ask-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.ask-btn svg { flex-shrink: 0; }

/* ── Chat backdrop ────────────────────────── */
.chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,0.45);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}
.chat-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Chat drawer ──────────────────────────── */
.chat-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: white;
  box-shadow: -6px 0 40px rgba(0,0,0,0.16);
  z-index: 1101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-drawer.open { transform: translateX(0); }

/* ── Chat header ──────────────────────────── */
.chat-header {
  background: var(--navy);
  padding: 1rem 1.1rem 0.85rem;
  flex-shrink: 0;
  position: relative;
}
.chat-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  padding-right: 2rem;
}
.chat-brand-icon { color: var(--gold); font-size: 1rem; line-height: 1; }
.chat-brand-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  color: white;
  letter-spacing: 0.02em;
}
.chat-close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 0;
  border-radius: 4px;
  transition: color 0.15s;
}
.chat-close-btn:hover { color: white; }
.chat-section-badge {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(201,168,76,0.18);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 100px;
  font-size: 0.73rem;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 0.22rem 0.7rem;
  letter-spacing: 0.01em;
}

/* ── Chat messages area ───────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: #f3f4f6;
  scroll-behavior: smooth;
}

/* ── Welcome screen ───────────────────────── */
.chat-welcome {
  text-align: center;
  padding: 1.25rem 0.5rem 0.75rem;
  color: var(--slate);
}
.chat-welcome-icon {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: block;
}
.chat-welcome p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.55;
  color: var(--navy);
}
.chat-suggestions-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-light);
  margin-bottom: 0.45rem;
}
.chat-suggestions {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.chat-suggestion {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  font-size: 0.83rem;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}
.chat-suggestion:hover {
  background: var(--cream);
  border-color: var(--navy-light);
}

/* ── Message bubbles ──────────────────────── */
.chat-message { display: flex; }
.chat-message--user      { justify-content: flex-end; }
.chat-message--assistant { justify-content: flex-start; }

.chat-bubble {
  max-width: 86%;
  border-radius: 14px;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.chat-message--user .chat-bubble {
  background: var(--navy);
  color: white;
  border-radius: 14px 14px 4px 14px;
}
.chat-message--assistant .chat-bubble {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  color: var(--navy);
}
.chat-bubble-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
  font-family: var(--font-body);
}
.chat-bubble-text p { margin: 0 0 0.45rem; }
.chat-bubble-text p:last-child { margin: 0; }
.chat-bubble-text ul { padding-left: 1.15rem; margin: 0.25rem 0 0.45rem; }
.chat-bubble-text li { margin-bottom: 0.25rem; }
.chat-bubble-text strong { font-weight: 700; }
.chat-message--user .chat-bubble-text strong { color: rgba(255,255,255,0.9); }

/* ── Typing indicator ─────────────────────── */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  padding: 2px 0;
}
.chat-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--slate-light);
  border-radius: 50%;
  animation: chatBounce 1.3s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-7px); opacity: 1; }
}

/* ── Chat footer (input + disclaimer) ────── */
.chat-footer {
  flex-shrink: 0;
  border-top: 1.5px solid var(--border);
  background: white;
  padding: 0.8rem 0.9rem 0.6rem;
}
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.chat-input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--navy);
  background: white;
  resize: none;
  line-height: 1.45;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 42px;
  max-height: 120px;
}
.chat-input:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26,46,74,0.08);
}
.chat-send-btn {
  flex-shrink: 0;
  background: var(--navy);
  border: none;
  border-radius: 9px;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-send-btn:hover:not(:disabled) { background: var(--navy-light); }
.chat-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.chat-disclaimer {
  font-size: 0.68rem;
  color: var(--slate-light);
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 480px) {
  .chat-drawer { width: 100vw; }
}

/* ══════════════════════════════════════════════════════════
   Ministry Coach — CTA banner
══════════════════════════════════════════════════════════ */
.coach-cta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
  color: white;
  box-shadow: 0 4px 24px rgba(26,46,74,0.18);
}
.coach-cta-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.coach-cta-text { flex: 1; }
.coach-cta-text h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.35rem;
  border: none;
  padding: 0;
}
.coach-cta-text h3::after { display: none; }
.coach-cta-text p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin: 0;
  line-height: 1.5;
}
.coach-cta-btn {
  flex-shrink: 0;
  background: var(--gold) !important;
  color: var(--navy) !important;
  border: none !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.coach-cta-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
@media (max-width: 640px) {
  .coach-cta { flex-direction: column; text-align: center; }
  .coach-cta-btn { width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   Ministry Coach — full-screen modal
══════════════════════════════════════════════════════════ */
.coach-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: stretch;
  background: rgba(10,20,40,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.coach-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.coach-modal {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  max-height: 100vh;
  overflow: hidden;
}
.coach-overlay.open .coach-modal { transform: translateY(0); }

/* ── Coach modal header ─────────────────────────────────── */
.coach-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  padding: 0 1.25rem;
  height: 56px;
  flex-shrink: 0;
}
.coach-modal-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.coach-modal-icon { font-size: 1.1rem; }
.coach-modal-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  letter-spacing: 0.02em;
}
.coach-modal-church {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-left: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.coach-modal-btns { display: flex; align-items: center; gap: 0.25rem; }
.coach-hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  border-radius: 7px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.coach-hdr-btn:hover { background: rgba(255,255,255,0.18); color: white; }
.coach-hdr-close {
  padding: 0.35rem 0.55rem;
  margin-left: 0.25rem;
  background: transparent;
  border-color: transparent;
}
.coach-hdr-close:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.2); }

/* ── Coach modal body (sidebar + chat) ──────────────────── */
.coach-modal-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* ── Version history sidebar ─────────────────────────────── */
.coach-history-panel {
  width: 280px;
  flex-shrink: 0;
  background: white;
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  position: absolute;
  top: 0; bottom: 0; left: 0;
  z-index: 10;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}
.coach-history-panel.open { transform: translateX(0); }
.coach-history-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  font-family: var(--font-body);
  flex-shrink: 0;
}
.coach-history-close {
  background: transparent;
  border: none;
  color: var(--slate-light);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 0;
  border-radius: 4px;
}
.coach-history-close:hover { color: var(--navy); }
.coach-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.coach-history-loading,
.coach-history-empty {
  font-size: 0.82rem;
  color: var(--slate-light);
  text-align: center;
  padding: 1rem 0;
}
.coach-version-item {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.coach-version-item--current {
  border-color: var(--navy-light);
  background: rgba(26,46,74,0.04);
}
.coach-version-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.coach-version-n {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-body);
}
.coach-version-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--navy);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.coach-version-date {
  font-size: 0.74rem;
  color: var(--slate-light);
  margin-bottom: 0.2rem;
}
.coach-version-reason {
  font-size: 0.8rem;
  color: var(--navy);
  line-height: 1.4;
}
.coach-version-sects {
  font-size: 0.73rem;
  color: var(--slate-light);
  margin-top: 0.25rem;
  line-height: 1.4;
}
.coach-version-restore-btn {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy-light);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}
.coach-version-restore-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

/* ── Coach chat column ───────────────────────────────────── */
.coach-chat-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-behavior: smooth;
}

/* ── Coach welcome ───────────────────────────────────────── */
.coach-welcome {
  text-align: center;
  padding: 2rem 1rem 1rem;
  max-width: 640px;
  margin: 0 auto;
}
.coach-welcome-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}
.coach-welcome-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 0.65rem;
  border: none; padding: 0;
}
.coach-welcome-title::after { display: none; }
.coach-welcome p {
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}
.coach-welcome-tip {
  background: rgba(94, 84, 142, 0.08);
  border: 1px solid rgba(94, 84, 142, 0.2);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem !important;
  max-width: 520px;
  margin: 0 auto 0.85rem;
}
.coach-examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
  text-align: left;
}
.coach-example-btn {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.coach-example-btn strong {
  font-size: 0.83rem;
  color: var(--navy);
  display: block;
}
.coach-example-btn span {
  font-size: 0.76rem;
  color: var(--slate-light);
  display: block;
}
.coach-example-btn:hover {
  background: var(--cream);
  border-color: var(--navy-light);
}
@media (max-width: 540px) {
  .coach-examples-grid { grid-template-columns: 1fr; }
}

/* ── Coach message bubbles ───────────────────────────────── */
.coach-msg { display: flex; }
.coach-msg--user      { justify-content: flex-end; }
.coach-msg--assistant { justify-content: flex-start; }
.coach-bubble {
  max-width: 78%;
  border-radius: 14px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.coach-msg--user .coach-bubble {
  background: var(--navy);
  color: white;
  border-radius: 14px 14px 4px 14px;
}
.coach-msg--assistant .coach-bubble {
  background: white;
  border: 1.5px solid var(--border);
  color: var(--navy);
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.coach-bubble-lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
  font-family: var(--font-body);
}
.coach-bubble-txt p { margin: 0 0 0.45rem; }
.coach-bubble-txt p:last-child { margin: 0; }
.coach-bubble-txt ul { padding-left: 1.15rem; margin: 0.25rem 0 0.45rem; }
.coach-bubble-txt li { margin-bottom: 0.25rem; }
.coach-bubble-txt strong { font-weight: 700; }
.coach-msg--user .coach-bubble-txt strong { color: rgba(255,255,255,0.9); }

/* ── Coach action prompt ─────────────────────────────────── */
.coach-action-prompt {
  display: flex;
  justify-content: flex-start;
  padding: 0 0 0.25rem;
}
.coach-action-btn {
  background: transparent;
  border: 1.5px solid var(--navy-light);
  border-radius: 8px;
  color: var(--navy);
  font-size: 0.83rem;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.coach-action-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }

/* ── Update offer card ───────────────────────────────────── */
.coach-update-card {
  margin: 0 1.25rem;
  background: white;
  border: 2px solid var(--navy-light);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(26,46,74,0.1);
}
.coach-update-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.coach-update-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.coach-update-body { flex: 1; }
.coach-update-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.coach-update-sections { font-size: 0.82rem; color: var(--slate); line-height: 1.4; }
.coach-update-btns { display: flex; gap: 0.5rem; }

/* ── Board update card ───────────────────────────────────── */
.coach-board-card {
  margin: 0 1.25rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  flex-direction: column;
  flex-shrink: 0;
  max-height: 340px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.coach-board-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1.5px solid var(--border);
  background: var(--cream);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  font-family: var(--font-body);
  flex-shrink: 0;
}
.coach-board-card-actions { display: flex; gap: 0.35rem; }
.coach-board-btn {
  font-size: 0.77rem;
  font-weight: 600;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  color: var(--navy);
  font-family: var(--font-body);
  transition: all 0.15s;
}
.coach-board-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }
.coach-board-card-body {
  overflow-y: auto;
  padding: 1rem 1.1rem;
  font-size: 0.87rem;
  flex: 1;
}
.coach-board-card-body h2 { font-size: 1rem; margin: 0 0 0.4rem; }
.coach-board-card-body h2::after { display: none; }
.coach-board-card-body h3 { font-size: 0.88rem; margin: 0.75rem 0 0.3rem; }
.coach-board-card-body p  { margin: 0 0 0.5rem; }
.coach-board-card-body ul { padding-left: 1.1rem; margin: 0 0 0.5rem; }
.coach-board-card-body li { margin-bottom: 0.2rem; }

/* ── Coach input area ────────────────────────────────────── */
.coach-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem 0.5rem;
  background: white;
  border-top: 1.5px solid var(--border);
  flex-shrink: 0;
}
.coach-input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--navy);
  background: white;
  resize: none;
  line-height: 1.45;
  min-height: 42px;
  max-height: 120px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.coach-input:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26,46,74,0.08);
}
.coach-send-btn {
  flex-shrink: 0;
  background: var(--navy);
  border: none;
  border-radius: 10px;
  color: white;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.coach-send-btn:hover:not(:disabled) { background: var(--navy-light); }
.coach-send-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.coach-disclaimer {
  font-size: 0.67rem;
  color: var(--slate-light);
  text-align: center;
  line-height: 1.4;
  padding: 0 1.25rem 0.65rem;
  background: white;
  flex-shrink: 0;
  margin: 0;
}

/* ── Coach context bar ───────────────────────────────────── */
.coach-ctx-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.coach-ctx-pill {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-body);
  white-space: nowrap;
}
.coach-ctx-pill + .coach-ctx-pill::before {
  content: '·';
  margin-right: 0.5rem;
}

/* ── Emergency mode overlay tint ──────────────────────────── */
.coach-overlay.emergency .coach-modal-hdr {
  background: #7f1d1d;
}
.coach-overlay.emergency .coach-ctx-bar {
  background: #7f1d1d;
}
.coach-welcome--emergency .coach-welcome-icon { filter: none; }
.coach-example-btn--emergency {
  border-color: #fca5a5 !important;
  background: #fff5f5 !important;
}
.coach-example-btn--emergency:hover {
  border-color: #7f1d1d !important;
  background: #fee2e2 !important;
}

/* ── Prayer mode active button ───────────────────────────── */
.coach-hdr-btn--active {
  background: rgba(196,154,42,0.25) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}

/* ══════════════════════════════════════════════════════════
   Advisor strip (Emergency · Check-In · Dashboard)
══════════════════════════════════════════════════════════ */
.advisor-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.advisor-strip-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  text-align: center;
}
.advisor-strip-divider {
  width: 1px;
  height: 52px;
  background: var(--border);
  flex-shrink: 0;
}
.advisor-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-body);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.advisor-strip-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.advisor-strip-btn--emergency {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}
.advisor-strip-btn--emergency:hover {
  background: #7f1d1d;
  border-color: #7f1d1d;
  color: white;
}
.advisor-strip-desc {
  font-size: 0.72rem;
  color: var(--slate-light);
  line-height: 1.4;
  max-width: 180px;
}
@media (max-width: 640px) {
  .advisor-strip { flex-direction: column; }
  .advisor-strip-divider { width: 100%; height: 1px; }
  .advisor-strip-item { width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   Check-In page
══════════════════════════════════════════════════════════ */
.checkin-page .site-header { position: sticky; top: 0; z-index: 50; }

.checkin-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 3rem 0 2.5rem;
  color: white;
}
.checkin-back {
  display: inline-block;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.15s;
}
.checkin-back:hover { color: white; }

.checkin-container { padding: 2.5rem 0 4rem; max-width: 800px; }

.checkin-error-banner {
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #7f1d1d;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.checkin-error-banner a { color: #7f1d1d; font-weight: 700; }

.checkin-intro-card {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.75rem;
}
.checkin-intro-card p { margin: 0 0 0.6rem; font-size: 0.92rem; color: var(--slate); line-height: 1.55; }
.checkin-intro-card p:last-child { margin: 0; }

.checkin-prev-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--slate);
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  margin-top: 0.65rem;
}
.checkin-prev-lbl { font-weight: 700; color: var(--navy); }
.checkin-prev-dot { color: var(--border); }

.checkin-form { display: flex; flex-direction: column; gap: 2rem; }
.checkin-section {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.6rem;
}
.checkin-section-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 1.1rem;
  padding: 0;
  border: none;
}
.checkin-section-title::after { display: none; }

.checkin-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.checkin-field { display: flex; flex-direction: column; gap: 0.35rem; }
.checkin-field--full { grid-column: 1 / -1; }

.checkin-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}
.req { color: #c0392b; }

.checkin-input {
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--navy);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.checkin-input:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26,46,74,0.08);
}
.checkin-select { cursor: pointer; }
.checkin-textarea { resize: vertical; line-height: 1.5; }

.checkin-field-prev {
  font-size: 0.72rem;
  color: var(--slate-light);
}

.checkin-submit-row {
  text-align: center;
  padding-top: 0.5rem;
}
.checkin-submit-btn {
  font-size: 1rem;
  padding: 0.85rem 2rem;
  gap: 0.5rem;
}
.checkin-submit-note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--slate-light);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .checkin-fields { grid-template-columns: 1fr; }
  .checkin-field--full { grid-column: 1; }
}

/* ── Health grid (shared: checkin result + dashboard) ────── */
.health-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.health-grid--dashboard { gap: 1rem; }

.health-card {
  background: white;
  border-radius: 12px;
  padding: 0.9rem;
  border-left: 4px solid currentColor;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.health-card--lg { padding: 1rem; }

.health-card-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.health-card-icon { font-size: 1.1rem; line-height: 1; }
.health-card-score {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-body);
  line-height: 1;
  flex: 1;
  text-align: right;
}
.health-card-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.health-card-status {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.health-card-bar {
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.health-card-fill {
  height: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.health-card-desc {
  font-size: 0.68rem;
  color: var(--slate-light);
  line-height: 1.3;
  margin-top: 0.4rem;
}

/* Color variants */
.health-green  { color: #16a34a; border-color: #16a34a; background: #f0fdf4; }
.health-yellow { color: #ca8a04; border-color: #ca8a04; background: #fefce8; }
.health-orange { color: #ea580c; border-color: #ea580c; background: #fff7ed; }
.health-red    { color: #dc2626; border-color: #dc2626; background: #fef2f2; }

.health-trend {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  white-space: nowrap;
}
.trend-up   { background: #dcfce7; color: #16a34a; }
.trend-down { background: #fee2e2; color: #dc2626; }
.trend-flat { background: #f1f5f9; color: #64748b; }

@media (max-width: 700px) {
  .health-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .health-grid { grid-template-columns: 1fr; }
}

/* ── Check-in result ─────────────────────────────────────── */
.checkin-result { padding: 0.5rem 0 2rem; }
.checkin-result-hdr {
  text-align: center;
  margin-bottom: 2rem;
}
.checkin-result-badge {
  display: inline-block;
  background: #dcfce7;
  color: #16a34a;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}
.checkin-result-hdr h2 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--navy);
  margin: 0 0 0.4rem;
  border: none; padding: 0;
}
.checkin-result-hdr h2::after { display: none; }
.checkin-result-date { font-size: 0.85rem; color: var(--slate-light); margin: 0; }

.checkin-report { margin-bottom: 2rem; }
.checkin-result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════
   Dashboard page
══════════════════════════════════════════════════════════ */
.dashboard-page .site-header { position: sticky; top: 0; z-index: 50; }

.dashboard-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 3rem 0 2.5rem;
  color: white;
}
.dashboard-container { padding: 2.5rem 0 4rem; }

.dashboard-empty {
  text-align: center;
  padding: 4rem 1rem;
  max-width: 480px;
  margin: 0 auto;
}
.dashboard-empty-icon { font-size: 3rem; line-height: 1; margin-bottom: 1rem; }
.dashboard-empty h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.dashboard-empty p { color: var(--slate); line-height: 1.6; margin-bottom: 1.5rem; }

/* What's changed CTA bar */
.dashboard-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.4rem;
  margin-bottom: 1.75rem;
}
.dashboard-cta-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--navy);
  font-family: var(--font-body);
  margin-bottom: 0.15rem;
}
.dashboard-cta-sub { font-size: 0.8rem; color: var(--slate-light); }
@media (max-width: 580px) {
  .dashboard-cta-bar { flex-direction: column; text-align: center; }
}

/* Health legend */
.health-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
  justify-content: center;
}
.legend-item {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  border: 1.5px solid currentColor;
  opacity: 0.85;
}

/* Latest analysis */
.dashboard-analysis {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}
.dashboard-analysis-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 0.85rem;
}
.dashboard-analysis-hdr h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--navy);
  margin: 0;
  border: none; padding: 0;
}
.dashboard-analysis-hdr h2::after { display: none; }
.dashboard-analysis-date { font-size: 0.78rem; color: var(--slate-light); }
.dashboard-analysis-body { font-size: 0.9rem; }

/* Check-in timeline */
.dashboard-timeline {
  margin-bottom: 2rem;
}
.dashboard-timeline h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1rem;
  border: none; padding: 0;
}
.dashboard-timeline h2::after { display: none; }

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--border);
  margin-left: 0.75rem;
  padding-left: 1.25rem;
}
.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
  width: 10px; height: 10px;
  background: var(--border);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--border);
}
.timeline-item--current .timeline-marker {
  background: var(--navy);
  box-shadow: 0 0 0 2px var(--navy-light);
}
.timeline-content {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}
.timeline-item--current .timeline-content { border-color: var(--navy-light); }
.timeline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.timeline-n { font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.timeline-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--navy);
  color: white;
  padding: 0.1rem 0.4rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.timeline-date { font-size: 0.76rem; color: var(--slate-light); margin-left: auto; }
.timeline-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.79rem;
  color: var(--slate);
  margin-bottom: 0.4rem;
}
.timeline-stats strong { color: var(--navy); }
.timeline-dot { color: var(--border); }
.timeline-scores { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.timeline-score-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid white;
  box-shadow: 0 0 0 1.5px currentColor;
}

.dashboard-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

/* ── Email panel ─────────────────────────── */
.email-panel {
  margin: 2.5rem 0 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.email-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  transition: background 0.15s;
}
.email-toggle:hover { background: var(--cream); }
.email-toggle svg { flex-shrink: 0; opacity: 0.7; }
.email-toggle-arrow { margin-left: auto; font-size: 0.8rem; opacity: 0.5; }

.email-form-wrap {
  display: none;
  border-top: 1.5px solid var(--border);
  padding: 1.5rem 1.25rem 1.25rem;
  background: var(--cream);
}
.email-form-wrap.open { display: block; }

.email-form { display: flex; flex-direction: column; gap: 0.75rem; }

.email-type-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.25rem;
}
.email-radio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.email-radio input[type="radio"] { accent-color: var(--navy); width: 15px; height: 15px; }

.email-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: -0.35rem;
}
.email-hint {
  font-weight: 400;
  color: var(--slate-light);
  font-size: 0.78rem;
}

.email-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.92rem;
  font-family: var(--font-body);
  color: var(--navy);
  background: white;
  transition: border-color 0.15s;
}
.email-input:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(26,46,74,0.08);
}
.email-textarea { resize: vertical; min-height: 72px; }

.email-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; }
.email-send-btn { display: flex; align-items: center; gap: 0.45rem; }

.email-status {
  font-size: 0.875rem;
  padding: 0;
  border-radius: 6px;
  min-height: 0;
  transition: all 0.2s;
}
.email-status--success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
  padding: 0.65rem 0.9rem;
}
.email-status--error {
  background: #fdecea;
  border: 1px solid #f5c6c6;
  color: #8b0000;
  padding: 0.65rem 0.9rem;
}
.email-status--error strong,
.email-status--error code { font-weight: 700; font-family: monospace; }

/* ── Print ───────────────────────────────── */
@media print {
  .site-header, .plan-hero .plan-actions, .plan-footer-actions, .site-footer, .copy-toast { display: none !important; }
  body { background: white; }
  .plan-hero { background: white; color: var(--navy); padding: 1rem 0; }
  .plan-hero h1 { color: var(--navy); }
  .plan-label, .plan-meta { color: var(--slate); }
  .plan-body { padding: 1rem 0; }
  .prose h2 { background: none; border-left: 4px solid var(--gold); }
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 640px) {
  .form-card { padding: 1.5rem 1.25rem; }
  .form-card.active { display: block; }
  .field-nav { flex-wrap: wrap; gap: 0.75rem; }
  .plan-actions { flex-direction: column; align-items: center; }
}

/* ── Auth nav (header) ───────────────────── */
.header-nav { display: flex; align-items: center; gap: 0.85rem; }
.header-nav-form { margin: 0; display: inline; }
.header-nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: none; border: none; cursor: pointer; padding: 0.3rem 0;
}
.header-nav-link:hover { color: var(--gold-light); }
.header-nav-cta {
  background: var(--gold);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
}
.header-nav-cta:hover { background: var(--gold-light); color: var(--navy); }

/* ── Auth pages (login / signup) ─────────── */
.auth-page { background: var(--cream); min-height: 100vh; }
.auth-container { max-width: 460px; padding: 2.5rem 1.25rem; }
.auth-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 2rem;
}
.auth-title { font-family: var(--font-head); color: var(--navy); font-size: 1.7rem; margin: 0 0 0.4rem; }
.auth-sub { color: var(--slate); margin: 0 0 1.5rem; font-size: 0.95rem; }
.auth-form { display: flex; flex-direction: column; }
.auth-label { font-size: 0.85rem; font-weight: 600; color: var(--navy); margin: 0.85rem 0 0.35rem; }
.auth-input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--navy);
}
.auth-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(196,154,42,0.15); }
.auth-submit { margin-top: 1.5rem; width: 100%; justify-content: center; }
.auth-alt { text-align: center; margin: 1.25rem 0 0; font-size: 0.9rem; color: var(--slate); }
.auth-alt a { color: var(--gold); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-error {
  background: #fdecea;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ── Account dashboard ───────────────────── */
.account-page { background: var(--cream); min-height: 100vh; }
.account-hero { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: #fff; padding: 2.5rem 1.25rem; }
.account-hero .container { max-width: 820px; }
.account-hero h1 { font-family: var(--font-head); margin: 0.3rem 0 0.4rem; font-size: 2rem; }
.account-hero .plan-label { color: var(--gold-light); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0; }
.account-hero .plan-meta { color: rgba(255,255,255,0.78); margin: 0; }
.account-container { max-width: 820px; padding: 2rem 1.25rem 3rem; }
.account-toolbar { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.account-empty {
  background: var(--warm-white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
}
.account-empty-title { font-family: var(--font-head); color: var(--navy); font-size: 1.3rem; margin: 0 0 0.5rem; }
.account-empty-sub { color: var(--slate); margin: 0 0 1.5rem; }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.plan-list-item {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.plan-list-name { font-family: var(--font-head); color: var(--navy); font-size: 1.25rem; margin: 0 0 0.25rem; }
.plan-list-meta { color: var(--slate-light); font-size: 0.88rem; margin: 0; }
.plan-list-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ── Save-to-account banner (plan page) ──── */
.plan-save-banner {
  max-width: 820px;
  margin: 1.25rem auto 0;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.plan-save-banner.is-success { border-left-color: var(--success); }
.plan-save-banner-text { color: var(--navy); font-size: 0.95rem; margin: 0; }
.plan-save-banner-text strong { color: var(--success); }
.plan-save-banner-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ── Generation success celebration ──────── */
.celebrate-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1200;
}
.celebrate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(26, 46, 74, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.celebrate-overlay.visible { display: flex; }
.celebrate-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-top: 5px solid var(--gold);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 100%;
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  animation: celebratePop 0.42s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}
@keyframes celebratePop {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.celebrate-title {
  color: var(--navy);
  font-size: 1.6rem;
  margin: 0 0 0.85rem;
}
.celebrate-body p {
  color: var(--navy-mid);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 0.7rem;
}
.celebrate-body .celebrate-thanks {
  color: var(--gold);
  font-weight: 600;
  margin-top: 1rem;
}
.celebrate-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
@media (max-width: 520px) {
  .celebrate-card { padding: 1.75rem 1.25rem 1.5rem; }
  .celebrate-title { font-size: 1.35rem; }
  .celebrate-actions { flex-direction: column; }
  .celebrate-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .celebrate-card { animation: none; }
}

/* ── Licensing & billing ─────────────────────────────────────────────────── */
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; text-align: center; }

.license-banner { padding: 0.85rem 0; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
.license-banner .container { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.license-banner-warn { background: #fdf6e3; color: #7a5c00; }
.license-banner-danger { background: #fef3f2; color: #922; }
.license-banner-info { background: #eef4fb; color: var(--navy); }
.license-banner-form { margin: 0; }

.license-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.license-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.license-card-title { font-family: var(--font-head); color: var(--navy); margin: 0.25rem 0 0; }
.license-card-body { margin: 0.75rem 0; color: var(--slate); }
.license-note { font-size: 0.85rem; color: var(--slate-light); font-style: italic; }
.license-card-actions { margin-top: 0.5rem; }
.license-pill { padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.license-pill-ok { background: #e6f4ea; color: var(--success); }
.license-pill-off { background: #fdecea; color: var(--error); }
.license-card-welcome { border-color: var(--navy); }
.license-offer-title { font-family: var(--font-head); color: var(--navy); margin: 1.25rem 0 0.25rem; }
.license-offer-price { font-size: 1.2rem; margin: 0 0 0.75rem; }
.license-offer-list { margin: 0.5rem 0 1rem 1.25rem; color: var(--slate); }
.license-offer-list li { margin-bottom: 0.3rem; }
.license-card-actions-column { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing-hero { background: var(--navy); color: var(--cream); padding: 3rem 0 2.5rem; text-align: center; }
.pricing-hero h1 { font-family: var(--font-head); margin: 0.5rem 0; }
.pricing-sub { color: rgba(253,248,240,0.8); }
.pricing-container { padding: 2.5rem 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.pricing-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.pricing-card-featured { border: 2px solid var(--gold); }
.pricing-card-name { font-family: var(--font-head); color: var(--navy); margin-top: 0; }
.pricing-card-price { font-size: 2.25rem; font-weight: 700; color: var(--navy); margin: 0.5rem 0 1rem; }
.pricing-card-per { font-size: 1rem; font-weight: 400; color: var(--slate-light); }
.pricing-card-features { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.pricing-card-features li { padding: 0.4rem 0 0.4rem 1.6rem; position: relative; color: var(--slate); border-bottom: 1px solid var(--border); }
.pricing-card-features li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.pricing-current { color: var(--success); font-weight: 600; margin-bottom: 0.75rem; }
.pricing-testmode { margin-top: 1rem; font-size: 0.82rem; color: var(--slate-light); }
.pricing-testmode code { background: var(--cream); padding: 0.1rem 0.35rem; border-radius: 4px; }
.pricing-footnote { text-align: center; margin-top: 2rem; color: var(--slate); }

/* ── Admin licensing ─────────────────────────────────────────────────────── */
.admin-hero { background: var(--navy); color: var(--cream); padding: 2.25rem 0; }
.admin-hero h1 { font-family: var(--font-head); margin: 0.25rem 0; }
.admin-hero .plan-label a, .admin-sub a { color: var(--gold-light); }
.admin-sub { color: rgba(253,248,240,0.85); }
.admin-container { padding: 2rem 0; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.metric-card { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.35rem; }
.metric-value { font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.metric-label { font-size: 0.8rem; color: var(--slate-light); }
.admin-search { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-search-input { flex: 1; min-width: 240px; padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-body); }
.admin-table-wrap { overflow-x: auto; background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table th { background: var(--cream); color: var(--navy); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-empty { text-align: center; color: var(--slate-light); padding: 2rem; }
.license-tag { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; background: var(--cream); color: var(--navy); }
.license-tag-individual_church { background: #e6f4ea; color: var(--success); }
.license-tag-complimentary { background: #eef4fb; color: var(--navy-light); }
.license-tag-admin { background: #fdf6e3; color: var(--gold); }
.pay-succeeded { color: var(--success); }
.pay-failed { color: var(--error); font-weight: 600; }
.usage-flag { color: var(--error); font-size: 0.8rem; }
.admin-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.admin-panel { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.admin-panel h2 { font-family: var(--font-head); color: var(--navy); margin-top: 0; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; margin: 0; }
.detail-list dt { color: var(--slate-light); font-size: 0.85rem; }
.detail-list dd { margin: 0; color: var(--navy); }
.admin-action-form { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.admin-action-form:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.admin-action-form h3 { font-size: 0.95rem; color: var(--navy); margin: 0 0 0.6rem; }
.admin-action-form label { display: block; font-size: 0.85rem; color: var(--slate); margin-bottom: 0.6rem; }
.admin-action-form input, .admin-action-form textarea { width: 100%; padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-body); margin-top: 0.25rem; }
.admin-action-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Plan closing statement ─────────────────────────────────────── */
.plan-closing-statement {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--navy);
  max-width: 620px;
  margin: 0 auto 1rem;
}
.plan-brandmark::before {
  content: "";
  display: block;
  width: 110px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 1.25rem;
}

/* ── Repeatable worship services (intake) ───────────────────────── */
.service-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 1.1rem 1.2rem 0.6rem;
  margin-bottom: 1rem;
  background: #fdfcfa;
}
.service-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.service-card-title {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.02rem;
  margin: 0;
}
.service-remove-btn {
  background: none;
  border: none;
  color: var(--slate);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}
.service-remove-btn:hover { color: #b23b3b; background: #f8ecec; }
.service-card .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
@media (max-width: 640px) {
  .service-card .field-row { grid-template-columns: 1fr; }
}
.svc-hint { font-weight: 400; color: var(--slate); font-size: 0.82rem; }
.svc-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.35rem 0.75rem;
  margin-top: 0.35rem;
}
.svc-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--body, #2d3748);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}
.svc-check:has(input:checked) {
  border-color: var(--gold);
  background: #fdf8f0;
}
.svc-check input { accent-color: var(--gold-dark, #a8862f); margin: 0; }
.add-service-btn { margin-top: 0.25rem; }

/* ── Administration Center ─────────────────────────────────────────────── */
.auth-notice {
  background: #eef7ee;
  border: 1px solid #2e7d32;
  color: #2e7d32;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.admin-center-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
}
.admin-nav-link {
  padding: 0.5rem 0.9rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.admin-nav-link:hover { background: var(--cream); }
.admin-nav-active { background: var(--navy); color: var(--cream); }
.admin-nav-active:hover { background: var(--navy); }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  grid-template-areas: "dot label" ". detail";
  column-gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.status-item:last-child { border-bottom: none; }
.status-dot { grid-area: dot; width: 10px; height: 10px; border-radius: 50%; margin-top: 0.35rem; }
.status-ok { background: #2e7d32; }
.status-warn { background: #c62828; }
.status-label { grid-area: label; font-weight: 600; color: var(--navy); }
.status-detail { grid-area: detail; font-size: 0.85rem; color: var(--slate); }

/* ── Gift Complimentary Access ─────────────────────────────────────────── */
.invite-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.invite-form textarea { margin-bottom: 0.75rem; }
.invite-status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}
.invite-status-pending { background: #fff8e1; color: #8d6e00; border: 1px solid #e0c860; }
.invite-status-accepted { background: #eef7ee; color: #2e7d32; border: 1px solid #2e7d32; }
.invite-status-expired { background: #f5f5f5; color: #757575; border: 1px solid #bdbdbd; }
.invite-status-revoked { background: #fdecea; color: #c62828; border: 1px solid #c62828; }
.invite-actions { white-space: nowrap; }
.invite-inline-form { display: inline-flex; gap: 0.3rem; align-items: center; margin-right: 0.35rem; }
.invite-date { padding: 0.25rem 0.4rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; }

/* ── Public landing page ───────────────────────────────────────────────── */
.landing-wide { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.landing-narrow { max-width: 760px; }
.landing-header { position: sticky; top: 0; z-index: 50; }
.landing-header-inner { max-width: 1080px; }
.landing-nav { display: flex; align-items: center; gap: 1.1rem; }
.landing-login-link { color: #fff; text-decoration: none; font-weight: 600; }
.landing-login-link:hover { color: var(--gold-light); }
.btn-gold {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 0.65rem 1.3rem;
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow);
  transition: background 0.15s ease;
}
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }
.btn-xl { font-size: 1.15rem; padding: 0.95rem 2rem; }
.landing-header-cta { padding: 0.5rem 1rem; font-size: 0.95rem; }

.landing-hero { background: var(--cream); padding: 4rem 0 3.5rem; }
.landing-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.landing-hero h1 {
  font-family: var(--font-head);
  font-size: 2.9rem;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 1.1rem;
}
.landing-hero-sub { font-size: 1.25rem; color: var(--slate); margin-bottom: 0.8rem; }
.landing-hero-support { font-size: 1.05rem; color: var(--navy-light); font-style: italic; margin-bottom: 1.8rem; }
.landing-hero-actions { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.landing-alt-link { color: var(--slate); }
.landing-alt-link a { color: var(--navy-light); font-weight: 600; }
.landing-hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.landing-section { padding: 3.75rem 0; }
.landing-section h2 {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 1.2rem;
}
.landing-section-alt { background: #f7f0e3; }
.landing-lede { font-size: 1.1rem; color: var(--slate); max-width: 780px; margin-bottom: 1rem; }
.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin: 2.2rem 0 2.4rem;
}
.landing-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.landing-card h3 { font-family: var(--font-head); color: var(--navy); margin-bottom: 0.6rem; font-size: 1.2rem; }
.landing-card p { color: var(--slate); }
.landing-cta-row { text-align: center; margin-top: 1rem; }

.landing-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-top: 1.6rem;
}
.landing-step { text-align: left; }
.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.landing-step h3 { font-family: var(--font-head); color: var(--navy); margin-bottom: 0.4rem; }
.landing-step p { color: var(--slate); }

.landing-checklist {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem 1.6rem;
  margin-top: 1.2rem;
}
.landing-checklist li {
  padding-left: 1.7rem;
  position: relative;
  color: var(--navy);
  font-size: 1.05rem;
}
.landing-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.landing-section-navy { background: var(--navy); }
.landing-section-navy h2 { color: var(--gold-light); }
.landing-section-navy p { color: #e8e4da; font-size: 1.1rem; margin-bottom: 1rem; }
.landing-credibility-line { font-style: italic; color: var(--gold-light) !important; }

.landing-pricing-card {
  background: var(--warm-white);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.landing-pricing-card h2 { margin-bottom: 0.6rem; }
.landing-price {
  font-family: var(--font-head);
  font-size: 3.2rem;
  color: var(--navy);
  line-height: 1.1;
}
.landing-price-per { font-size: 1.2rem; color: var(--slate); font-family: var(--font-body); }
.landing-price-regular { color: var(--slate); font-size: 1.1rem; margin-top: 0.4rem; text-decoration: none; }
.landing-price-limited { color: var(--gold); font-weight: 700; margin: 0.3rem 0 1rem; }
.landing-pricing-list { text-align: left; margin: 1.4rem auto 1.8rem; max-width: 460px; grid-template-columns: 1fr; }
.landing-terms { margin-top: 1.6rem; border-top: 1px solid var(--border); padding-top: 1.2rem; }
.landing-terms p { color: var(--slate); font-size: 0.98rem; margin-bottom: 0.6rem; }

.landing-faq { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 1.4rem; }
.landing-faq-item h3 { font-family: var(--font-head); color: var(--navy); margin-bottom: 0.4rem; font-size: 1.15rem; }
.landing-faq-item p { color: var(--slate); }

.landing-final-cta { text-align: center; padding-bottom: 4.5rem; }
.landing-final-cta h2 { margin-bottom: 1.4rem; }
.landing-final-cta .landing-alt-link { margin-top: 0.9rem; }

@media (max-width: 860px) {
  .landing-hero { padding: 2.5rem 0 2.2rem; }
  .landing-hero-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .landing-hero h1 { font-size: 2.15rem; }
  .landing-section { padding: 2.6rem 0; }
  .landing-section h2 { font-size: 1.6rem; }
  .landing-price { font-size: 2.5rem; }
  .landing-header-cta { padding: 0.45rem 0.75rem; font-size: 0.85rem; }
  .landing-nav { gap: 0.7rem; }
}

/* ── Admin: founding price panel ──────────────────────────────────────── */
.admin-panel {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow);
}
.admin-panel h2 { font-family: var(--font-head); color: var(--navy); margin-bottom: 0.6rem; font-size: 1.3rem; }
.admin-panel form { margin-top: 0.8rem; }
.admin-warn { color: var(--error); font-weight: 600; }
.admin-notice {
  background: #eef7ee;
  border: 1px solid var(--success);
  color: var(--success);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem;
}
.founding-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.founding-regular { color: var(--slate); font-size: 0.95rem; margin-bottom: 0.8rem; }

/* ── Ministry Plan Review (consultation) ─────────────────────────────── */
.review-cta {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  background: var(--cream, #fdf8f0);
  border: 1px solid var(--border, #e2d9c8);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0;
}
.review-cta-text h3 { margin: 0 0 8px; }
.review-cta-text p { margin: 0 0 6px; color: var(--slate, #4a5568); }
.review-cta-price { font-weight: 700; }
.review-cta-limit { font-size: 0.9rem; font-style: italic; }
.review-cta-action { text-align: center; flex-shrink: 0; max-width: 260px; }
.review-cta-credibility { font-size: 0.8rem; color: var(--slate, #4a5568); margin-top: 10px; }
.consult-ack {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 6px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.consult-ack input { margin-top: 4px; }
.consult-note { font-size: 0.85rem; margin-top: 10px; }
.consult-credibility { font-style: italic; }
.admin-saved-banner {
  background: #ecf8ef;
  border: 1px solid #bfe3c8;
  color: #1e6b34;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
}
.admin-update-form .auth-label { margin-top: 12px; display: block; }
@media (max-width: 720px) {
  .review-cta { flex-direction: column; text-align: center; }
}
