/* ═══════════════════════════════════════════════════════════
   Protestant Project Fund v2 — Design System
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --primary:        #1B3A6B;
  --primary-dark:   #122850;
  --primary-light:  #2A5298;
  --primary-pale:   #EBF0FA;
  --accent:         #C9922A;
  --accent-light:   #F5DFA0;
  --accent-pale:    #FDF8ED;
  --crimson:        #8B2635;

  --bg:             #F8F5F0;
  --surface:        #FFFFFF;
  --surface-2:      #F3EFE9;
  --surface-3:      #EDE8E0;
  --border:         #E5DDD4;
  --border-strong:  #C9B8A5;

  --text:           #1A1A2E;
  --text-2:         #4B5563;
  --text-3:         #6B7280;
  --text-inv:       #FFFFFF;

  --green:          #059669;
  --green-pale:     #D1FAE5;
  --red:            #DC2626;
  --red-pale:       #FEE2E2;
  --yellow:         #D97706;
  --yellow-pale:    #FEF3C7;
  --blue:           #2563EB;
  --blue-pale:      #DBEAFE;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.14);

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;
  --max-w:       1200px;
  --sidebar-w:   260px;

  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --ease:      all 0.18s ease;
  --ease-slow: all 0.35s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a   { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
p { color: var(--text-2); }
ul { list-style: none; }

/* ── Layout ────────────────────────────────────────────── */
.page-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-kicker {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: var(--ease); white-space: nowrap; text-decoration: none !important;
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-accent   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #b07d20; border-color: #b07d20; color: #fff; }

.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-pale); }

.btn-ghost    { background: transparent; color: var(--text-2); border-color: var(--border); padding: 9px 18px; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger   { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.btn-white    { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: #f0f0f0; }

.btn-sm { font-size: 12px; padding: 7px 14px; }
.btn-lg { font-size: 16px; padding: 13px 28px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: var(--radius); flex-shrink: 0; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ─────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], input[type="search"],
input[type="tel"], select, textarea {
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; width: 100%;
  transition: var(--ease); outline: none;
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,58,107,.12);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; min-height: 100px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px;
}
.input-error { border-color: var(--red) !important; }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; }

.input-group { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--text-3); pointer-events: none;
  display: flex; align-items: center;
}
.input-group input { padding-left: 40px; }
.input-prefix {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); font-size: 14px; color: var(--text-3); font-weight: 500;
}
.input-group.has-prefix input { padding-left: 26px; }

.checkbox-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; cursor: pointer; font-weight: 400; color: var(--text-2);
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.card-body  { padding: 24px; }
.card-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 10px; border-radius: var(--radius-pill); text-transform: uppercase;
}
.badge-primary { background: var(--primary-pale); color: var(--primary); }
.badge-accent  { background: var(--accent-pale); color: #7a5800; }
.badge-green   { background: var(--green-pale); color: #065f46; }
.badge-red     { background: var(--red-pale); color: #991b1b; }
.badge-yellow  { background: var(--yellow-pale); color: #92400e; }
.badge-gray    { background: var(--surface-2); color: var(--text-3); }

/* ── Progress ──────────────────────────────────────────── */
.progress-bar { height: 8px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: var(--radius-pill); transition: width 1s ease; }
.progress-fill.accent { background: linear-gradient(90deg, var(--accent), #e8b94a); }
.progress-fill.green  { background: linear-gradient(90deg, var(--green), #10b981); }

/* ── Tables ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { border-bottom: 2px solid var(--border); }
th { padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); white-space: nowrap; }
td { padding: 13px 14px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* ── Avatar ────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--primary-pale); display: flex; align-items: center;
  justify-content: center; font-weight: 700; color: var(--primary); overflow: hidden;
}
.avatar-sm { width: 32px;  height: 32px;  font-size: 12px; }
.avatar-md { width: 44px;  height: 44px;  font-size: 16px; }
.avatar-lg { width: 80px;  height: 80px;  font-size: 28px; }
.avatar-xl { width: 100px; height: 100px; font-size: 36px; }

/* ── Toast ─────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--text); color: #fff; padding: 14px 18px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 500; min-width: 280px; max-width: 420px;
  pointer-events: all; animation: toastIn .25s ease;
}
.toast.toast-success { background: var(--green); }
.toast.toast-error   { background: var(--red); }
.toast.toast-warning { background: var(--yellow); }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header  { padding: 24px 28px 16px; display: flex; align-items: center; justify-content: space-between; }
.modal-title   { font-size: 20px; font-family: var(--font-display); }
.modal-close   { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--surface-2); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 18px; transition: var(--ease); }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body    { padding: 4px 28px 24px; }
.modal-footer  { padding: 16px 28px 24px; display: flex; gap: 10px; justify-content: flex-end; }

/* ── Public Nav ────────────────────────────────────────── */
.nav-shell {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200; box-shadow: var(--shadow-xs);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.nav-logo {
  width: 36px; height: 36px;
  background: url("/assets/cpf_logo_516x516.png") center / cover no-repeat;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 0; flex-shrink: 0; overflow: hidden;
}
.nav-name { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: var(--radius); transition: var(--ease); text-decoration: none !important;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--primary); background: var(--primary-pale); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* User menu */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px; background: none;
  border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  padding: 5px 12px 5px 5px; cursor: pointer; transition: var(--ease);
  font-size: 14px; font-weight: 500; color: var(--text); font-family: var(--font-body);
}
.user-menu-btn:hover { background: var(--surface-2); }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); min-width: 200px; overflow: hidden; z-index: 500; display: none;
}
.user-dropdown.open { display: block; animation: slideUp .18s ease; }
.user-dropdown a, .user-dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 16px; font-size: 14px; color: var(--text-2);
  background: none; border: none; cursor: pointer; text-decoration: none !important;
  transition: var(--ease); font-family: var(--font-body);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-2); color: var(--text); }
.dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }
.user-dropdown .danger { color: var(--red); }
.user-dropdown .danger:hover { background: var(--red-pale); }

/* ── Dashboard Sidebar ──────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--primary-dark); flex-shrink: 0;
  position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto;
  z-index: 100; display: flex; flex-direction: column;
}
.sidebar-brand {
  padding: 24px 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo {
  width: 34px; height: 34px;
  background: url("/assets/cpf_logo_516x516.png") center / cover no-repeat;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 0; flex-shrink: 0; overflow: hidden;
}
.sidebar-brand-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: #fff; }
.sidebar-nav  { padding: 16px 12px; flex: 1; }
.sidebar-sect { margin-bottom: 24px; }
.sidebar-sect-label {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.35); padding: 0 10px; margin-bottom: 8px; display: block;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius); font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.7); text-decoration: none !important;
  transition: var(--ease); margin-bottom: 2px;
  /* button reset */
  width: 100%; text-align: left; background: transparent; border: none;
  cursor: pointer; font-family: var(--font-body);
}
.sidebar-link:hover  { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,.15); color: #fff; }
.sidebar-link .licon { font-size: 16px; flex-shrink: 0; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius); cursor: pointer; transition: var(--ease);
}
.sidebar-user:hover { background: rgba(255,255,255,.08); }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,.5); text-transform: capitalize; }

.app-main    { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.app-topbar  {
  height: 64px; background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 32px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-xs);
}
.app-topbar-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-page-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.app-content { padding: 32px; flex: 1; }
.dashboard-stack { display: flex; flex-direction: column; gap: 32px; }
.donor-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.donor-chart-card { min-height: 100%; }
.donor-chart-card-wide { grid-column: 1 / -1; }
.donor-chart-empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 14px;
}
.donor-bar-list { display: flex; flex-direction: column; gap: 14px; }
.donor-bar-row { display: flex; flex-direction: column; gap: 7px; }
.donor-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.donor-bar-label {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donor-bar-value { color: var(--primary); font-size: 13px; }
.donor-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.donor-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
}
.donor-mini-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
  align-items: end;
}
.donor-mini-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.donor-mini-bar-wrap {
  height: 140px;
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-radius: 12px;
  padding: 8px;
}
.donor-mini-bar {
  width: 100%;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  min-height: 12px;
}
.donor-mini-label { font-size: 12px; color: var(--text-3); }
.donor-mini-value { font-size: 12px; font-weight: 700; color: var(--text); text-align: center; }
.annual-receipt-card .card-body { display: flex; flex-direction: column; gap: 18px; }
.annual-receipt-header { align-items: flex-start; }
.annual-receipt-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.annual-receipt-controls select { min-width: 110px; }
.annual-receipt-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.annual-receipt-stat {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.annual-receipt-stat strong { font-size: 18px; color: var(--primary); }
.annual-receipt-stat span { font-size: 13px; color: var(--text-3); }
.annual-receipt-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.annual-receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.annual-receipt-project { font-weight: 600; color: var(--text); }
.annual-receipt-date { font-size: 12px; color: var(--text-3); }
.annual-receipt-more { font-size: 13px; color: var(--text-3); }
.editor-shell { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.editor-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 24px 28px; border-radius: var(--radius-xl); color: #fff;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, #3567b8);
  box-shadow: var(--shadow-md);
}
.editor-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.72); margin-bottom: 12px;
}
.editor-heading { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin-bottom: 10px; color: #fff; }
.editor-copy { max-width: 640px; color: rgba(255,255,255,.82); line-height: 1.7; }
.editor-chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.editor-card-subtitle { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.editor-form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.editor-info-actions {
  margin-top: 6px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 8px;
}
.editor-info-hint { font-size: 13px; color: var(--text-3); line-height: 1.6; }
.editor-section-block {
  margin-top: 28px; padding-top: 0;
  display: flex; flex-direction: column; gap: 20px;
}
.editor-section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.editor-section-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.editor-section-copy { font-size: 13px; line-height: 1.6; color: var(--text-3); max-width: 620px; }
.editor-tab-bar {
  margin-bottom: 0; padding: 6px; gap: 6px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--surface-2);
}
.editor-tab-bar .tab-btn {
  border-bottom: none; margin-bottom: 0; border-radius: var(--radius);
  padding: 11px 16px;
}
.editor-tab-bar .tab-btn.active {
  background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs);
}
.editor-subsection {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
}
.editor-subsection + .editor-subsection { margin-top: 18px; }
.editor-subsection-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.editor-subsection-header h4 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.editor-subsection-header p { font-size: 13px; color: var(--text-3); line-height: 1.6; }
.editor-repeatable-list { display: flex; flex-direction: column; gap: 14px; }
.editor-repeatable-item {
  padding: 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border);
}
.editor-repeatable-item-compact { padding-bottom: 8px; }
.editor-repeatable-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.editor-repeatable-header strong { font-size: 13px; color: var(--text); }
.editor-files-updates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.editor-readonly-empty {
  padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px dashed var(--border); color: var(--text-3); font-size: 14px;
}
.updates-manager { display: flex; flex-direction: column; gap: 14px; }
.updates-manager-empty {
  padding: 24px; border: 1px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text-3); font-size: 14px; text-align: center;
}
.update-table-title { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.update-table-note {
  color: var(--text-3); font-size: 13px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.update-table-actions { white-space: nowrap; }
.quill-shell {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.quill-shell:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,58,107,.12);
}
.quill-shell .ql-toolbar.ql-snow {
  border: none; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.quill-shell .ql-container.ql-snow { border: none; font-family: var(--font-body); }
.quill-shell .ql-editor {
  min-height: 420px; padding: 18px; line-height: 1.7; color: var(--text);
}
.quill-shell-sm .ql-editor { min-height: 180px; }
.quill-shell .ql-editor.ql-blank::before {
  left: 18px; right: 18px; color: var(--text-3); font-style: normal;
}
.quill-shell .ql-snow .ql-picker,
.quill-shell .ql-snow .ql-stroke { color: var(--text); stroke: currentColor; }
.quill-shell .ql-snow .ql-fill { fill: currentColor; }
.quill-shell .ql-snow .ql-picker-options { border-color: var(--border); }
.quill-shell .ql-snow .ql-picker.ql-expanded .ql-picker-label,
.quill-shell .ql-snow .ql-picker-label:hover,
.quill-shell .ql-snow .ql-picker-item:hover,
.quill-shell .ql-snow button:hover,
.quill-shell .ql-snow button:focus { color: var(--primary); }
.quill-shell .ql-snow button:hover .ql-stroke,
.quill-shell .ql-snow button:focus .ql-stroke,
.quill-shell .ql-snow .ql-picker-label:hover .ql-stroke { stroke: var(--primary); }
.quill-shell .ql-snow button:hover .ql-fill,
.quill-shell .ql-snow button:focus .ql-fill { fill: var(--primary); }
.quill-shell .ql-snow.ql-toolbar button.ql-active,
.quill-shell .ql-snow .ql-toolbar button.ql-active,
.quill-shell .ql-snow.ql-toolbar .ql-picker-label.ql-active,
.quill-shell .ql-snow .ql-toolbar .ql-picker-label.ql-active,
.quill-shell .ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.quill-shell .ql-snow .ql-toolbar .ql-picker-item.ql-selected { color: var(--primary); }
.quill-shell .ql-snow.ql-toolbar button.ql-active .ql-stroke,
.quill-shell .ql-snow .ql-toolbar button.ql-active .ql-stroke,
.quill-shell .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.quill-shell .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke { stroke: var(--primary); }
.quill-shell .ql-snow.ql-toolbar button.ql-active .ql-fill,
.quill-shell .ql-snow .ql-toolbar button.ql-active .ql-fill { fill: var(--primary); }
.quill-shell .ql-editor p,
.project-richtext p { margin: 0 0 14px; color: var(--text-2); }
.quill-shell .ql-editor ul,
.quill-shell .ql-editor ol,
.project-richtext ul,
.project-richtext ol { margin: 0 0 14px 22px; color: var(--text-2); }
.quill-shell .ql-editor li,
.project-richtext li { margin-bottom: 6px; }
.quill-shell .ql-editor a,
.project-richtext a { color: var(--primary); text-decoration: underline; }
.project-richtext { line-height: 1.8; color: var(--text-2); }

/* ── Stats ─────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.stat-icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--primary-pale); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 22px; }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-3); font-weight: 500; }

/* ── Hero (Public) ─────────────────────────────────────── */
.public-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2a5298 100%);
  color: #fff; padding: 90px 0; position: relative; overflow: hidden;
}
.public-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 380px; gap: 60px; align-items: center; position: relative;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-pill); padding: 6px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.9); margin-bottom: 20px;
}
.hero-title { font-family: var(--font-display); font-size: clamp(32px,5vw,52px); font-weight: 700; color: #fff; line-height: 1.15; margin-bottom: 20px; }
.hero-title span { color: var(--accent-light); }
.hero-desc { font-size: 16px; color: rgba(255,255,255,.8); line-height: 1.7; margin-bottom: 32px; max-width: 520px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(12px); border-radius: var(--radius-xl); padding: 28px; color: #fff;
}
.hero-card-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 20px; }
.hero-stat-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.hero-stat-item:last-child { border-bottom: none; }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,.7); }
.hero-stat-value { font-size: 18px; font-weight: 700; color: #fff; font-family: var(--font-display); }

/* Hero preview (product screenshot) */
.hero-preview { display: flex; align-items: center; justify-content: center; }
.hero-preview-browser {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(12px); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.2);
  width: 100%; max-width: 420px;
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
  transition: transform .4s ease;
}
.hero-preview-browser:hover { transform: perspective(900px) rotateY(-1deg) rotateX(0deg); }
.hero-preview-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.hero-preview-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }
.hero-preview-dot:first-child  { background: #ff5f56; }
.hero-preview-dot:nth-child(2) { background: #ffbd2e; }
.hero-preview-dot:nth-child(3) { background: #27c93f; }
.hero-preview-url {
  margin-left: 8px; font-size: 11px; color: rgba(255,255,255,.5);
  font-family: var(--font-body); letter-spacing: .01em;
}
.hero-preview-img { display: block; width: 100%; height: auto; }

/* ── Project Cards ──────────────────────────────────────── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: var(--ease-slow); display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.project-card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; background: var(--surface-2); }
.project-card-img-placeholder {
  aspect-ratio: 16/9; background: linear-gradient(135deg, var(--primary-pale), var(--accent-pale));
  display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 40px;
}
.project-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.project-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.project-card-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.3; }
.project-card-org { font-size: 13px; color: var(--text-3); }
.project-card-summary { font-size: 13px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-progress { margin-top: auto; padding-top: 8px; }
.project-progress-meta { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.project-raised { font-weight: 700; color: var(--text); }
.project-pct    { color: var(--text-3); }
.project-card-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; }

.urgency-critical { background: var(--red-pale);    color: #991b1b; }
.urgency-high     { background: var(--yellow-pale);  color: #92400e; }
.urgency-medium   { background: var(--blue-pale);    color: #1e40af; }
.urgency-low      { background: var(--green-pale);   color: #065f46; }

/* ── Filters ────────────────────────────────────────────── */
.filters-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 20px; display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; margin-bottom: 28px; box-shadow: var(--shadow-xs);
}
.filters-bar .input-group { flex: 1; min-width: 200px; }
.filters-bar select { min-width: 150px; }

/* ── Projects page hero ─────────────────────────────────── */
.projects-page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2a5298 100%);
  padding: 52px 0 48px; position: relative; overflow: hidden;
}
.projects-page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.projects-page-hero-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  flex-wrap: wrap;
}
.projects-page-hero .section-kicker { color: var(--accent-light); margin-bottom: 10px; }
.projects-page-title {
  font-family: var(--font-display); font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700; color: #fff; margin-bottom: 10px;
}
.projects-page-desc { font-size: 15px; color: rgba(255,255,255,.75); max-width: 480px; }
.projects-page-stats {
  display: flex; gap: 32px; flex-shrink: 0; flex-wrap: wrap;
}
.projects-stat-item { display: flex; flex-direction: column; align-items: flex-end; }
.projects-stat-value {
  font-family: var(--font-display); font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700; color: #fff; line-height: 1.1;
}
.projects-stat-label { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; white-space: nowrap; }

/* Active nav link indicator */
.nav-link-active {
  color: var(--primary) !important;
  font-weight: 600;
}

@media (max-width: 700px) {
  .projects-page-hero-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .projects-page-stats { align-self: stretch; justify-content: space-between; }
  .projects-stat-item  { align-items: flex-start; }
}

/* ── Public stats bar ───────────────────────────────────── */
.stats-section {
  background: var(--surface); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 40px 0;
}
.stats-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4,1fr);
}
.stats-item { text-align: center; padding: 20px; border-right: 1px solid var(--border); }
.stats-item:last-child { border-right: none; }
.stats-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.stats-label { font-size: 13px; color: var(--text-3); font-weight: 500; }

/* ── How it works ───────────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
.how-item { text-align: center; padding: 32px 24px; }
.how-number {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-family: var(--font-display); font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; box-shadow: 0 4px 16px rgba(27,58,107,.3);
}
.how-item h3 { font-size: 18px; margin-bottom: 10px; }
.how-item p  { font-size: 14px; line-height: 1.6; }

/* ── Testimonials ───────────────────────────────────────── */
.testimonial-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.testimonial-card blockquote { font-family: var(--font-display); font-size: 16px; line-height: 1.6; color: var(--text); font-style: italic; margin-bottom: 16px; }
.testimonial-attr { font-size: 13px; font-weight: 600; color: var(--text-3); }

/* ── Publish Confirmation Modal ─────────────────────────── */
.publish-fee-box {
  background: var(--accent-pale); border: 1px solid #e8c97a;
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
}
.publish-fee-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.publish-fee-icon { font-size: 16px; }
.publish-fee-title { font-size: 14px; font-weight: 700; color: var(--text); }
.publish-fee-desc  { font-size: 14px; color: var(--text-2); margin-bottom: 8px; line-height: 1.6; }
.publish-fee-example { font-size: 13px; color: var(--text-3); line-height: 1.6; }
.publish-fee-example strong { color: var(--green); }
.publish-ack-label {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; font-size: 14px; color: var(--text-2); line-height: 1.55;
}
.publish-ack-label input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); width: 15px; height: 15px;
}
.publish-ack-label a { color: var(--primary); }

/* Sign-up ToS acknowledgment */
.signup-tos-label {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 13px; color: var(--text-2); line-height: 1.55; cursor: pointer;
}
.signup-tos-label input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); width: 14px; height: 14px;
}
.signup-tos-label a { color: var(--primary); }

/* ── CTA ────────────────────────────────────────────────── */
.cta-band { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 80px 24px; text-align: center; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(26px,4vw,40px); color: #fff; margin-bottom: 16px; }
.cta-band p  { font-size: 16px; color: rgba(255,255,255,.8); margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ── About Page ─────────────────────────────────────────── */
.about-hero {
  background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 55%, #2a5298 100%);
  padding: 100px 0 90px; position: relative; overflow: hidden; text-align: center;
}
.about-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.about-hero-cross {
  font-family: var(--font-display);
  font-size: 56px; color: rgba(255,255,255,.08);
  position: absolute; top: 40px; left: 50%;
  transform: translateX(-50%); pointer-events: none; user-select: none;
  letter-spacing: 0;
}
.about-hero-inner { position: relative; max-width: 740px; margin: 0 auto; }
.about-hero-title {
  font-family: var(--font-display); font-size: clamp(32px, 5vw, 52px);
  font-weight: 700; color: #fff; line-height: 1.2; margin: 16px 0 20px;
}
.about-hero-sub {
  font-size: clamp(15px, 2vw, 17px); color: rgba(255,255,255,.78);
  line-height: 1.7; max-width: 580px; margin: 0 auto 36px;
}
.about-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Alternating content sections */
.about-section { padding: 80px 0; }
.about-section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.about-content-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 420px; gap: 72px; align-items: center;
}
.about-content-wrap--reverse { direction: rtl; }
.about-content-wrap--reverse > * { direction: ltr; }

.about-prose h2 {
  font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px);
  font-weight: 700; color: var(--text); margin: 12px 0 20px;
}
.about-prose p { font-size: 15px; line-height: 1.8; color: var(--text-2); margin-bottom: 16px; }
.about-emphasis {
  font-family: var(--font-display); font-style: italic;
  font-size: 17px; color: var(--primary); margin: 20px 0 !important;
}
.about-values-list {
  list-style: none; padding: 0; margin: 20px 0 0;
  display: flex; flex-direction: column; gap: 12px;
}
.about-values-list li {
  font-size: 15px; color: var(--text-2); line-height: 1.6;
  padding-left: 18px; position: relative;
}
.about-values-list li::before {
  content: '✟'; position: absolute; left: 0;
  color: var(--accent); font-size: 11px; top: 3px;
}

/* Scripture blockquotes */
.about-scripture {
  background: var(--accent-pale); border: 1px solid #e8c97a;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg); padding: 28px 28px 24px;
}
.about-scripture--accent {
  background: var(--primary-pale); border-color: var(--primary-light);
  border-left-color: var(--primary);
}
.about-scripture--light {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25);
  border-left-color: var(--accent-light);
}
.about-scripture--light p, .about-scripture--light cite { color: rgba(255,255,255,.9) !important; }
.about-scripture--light .about-scripture-cross { color: var(--accent-light) !important; }
.about-scripture-cross {
  font-family: var(--font-display); font-size: 20px;
  color: var(--accent); margin-bottom: 14px; display: block;
}
.about-scripture p {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(16px, 2vw, 19px); line-height: 1.6;
  color: var(--text); margin: 0 0 14px !important;
}
.about-scripture cite {
  display: block; font-size: 13px; font-weight: 600; font-style: normal;
  color: var(--text-3); letter-spacing: .03em;
}
.about-scripture-note {
  font-family: var(--font-body) !important; font-style: normal !important;
  font-size: 14px !important; color: var(--text-2) !important;
  margin-top: 16px !important; border-top: 1px solid rgba(0,0,0,.07); padding-top: 14px;
}

/* Impact section */
.about-impact-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 380px; gap: 72px; align-items: start;
}
.about-impact-text h2 {
  font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px);
  font-weight: 700; color: var(--text); margin: 12px 0 16px;
}
.about-impact-text > p { font-size: 15px; line-height: 1.8; color: var(--text-2); margin-bottom: 24px; }
.about-impact-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 16px;
}
.about-impact-list li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 15px; color: var(--text-2); line-height: 1.65;
}
.about-impact-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--primary-pale); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin-top: 1px;
}

/* Global section */
.about-global {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
}
.about-global-inner {
  max-width: 680px; margin: 0 auto; padding: 0 24px;
  text-align: center;
}
.about-global-badge {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.8); margin: 0 auto 24px;
}
.about-global-title {
  font-family: var(--font-display); font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700; color: #fff; margin: 12px 0 20px;
}
.about-global-desc {
  font-size: 15px; line-height: 1.8; color: rgba(255,255,255,.78);
  margin-bottom: 28px;
}

/* CTA section */
.about-cta {
  background: linear-gradient(150deg, var(--primary-dark), var(--primary));
  padding: 100px 0; text-align: center; position: relative; overflow: hidden;
}
.about-cta::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/svg%3E");
}
.about-cta-inner { position: relative; max-width: 640px; margin: 0 auto; padding: 0 24px; }
.about-cta-cross {
  font-family: var(--font-display); font-size: 40px;
  color: rgba(255,255,255,.15); margin-bottom: 8px; display: block;
}
.about-cta-title {
  font-family: var(--font-display); font-size: clamp(26px, 4vw, 40px);
  font-weight: 700; color: #fff; margin: 12px 0 28px;
}
.about-cta-desc {
  font-size: 16px; line-height: 1.75;
  color: rgba(255,255,255,.75); margin-bottom: 36px;
}
.about-cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 900px) {
  .about-content-wrap,
  .about-impact-inner   { grid-template-columns: 1fr; gap: 40px; }
  .about-content-wrap--reverse { direction: ltr; }
  .about-quote-col      { order: -1; }
}
@media (max-width: 600px) {
  .about-hero           { padding: 70px 0 60px; }
  .about-section        { padding: 56px 0; }
  .about-hero-actions   { flex-direction: column; align-items: center; }
  .about-cta-btns       { flex-direction: column; align-items: center; }
}

/* ── Policy Pages ───────────────────────────────────────── */
.policy-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 60px 0 52px;
}
.policy-hero .section-kicker { color: var(--accent-light); margin-bottom: 12px; }
.policy-hero h1 {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px); font-weight: 700;
  color: #fff; margin-bottom: 12px;
}
.policy-meta { font-size: 14px; color: rgba(255,255,255,.6); }

.policy-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 60px 24px 80px;
  display: grid; grid-template-columns: 220px 1fr; gap: 60px; align-items: start;
}

/* Table of contents (sticky sidebar) */
.policy-toc {
  position: sticky; top: 84px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 20px 24px;
}
.policy-toc-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); margin-bottom: 12px;
}
.policy-toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 4px; }
.policy-toc li { counter-increment: toc; display: flex; align-items: baseline; gap: 8px; }
.policy-toc li::before {
  content: counter(toc); font-size: 11px; color: var(--text-3); font-weight: 600;
  min-width: 16px; flex-shrink: 0;
}
.policy-toc a {
  font-size: 13px; color: var(--text-2); text-decoration: none; line-height: 1.45;
  transition: color .15s ease;
}
.policy-toc a:hover { color: var(--primary); text-decoration: none; }

/* Prose content */
.policy-prose { min-width: 0; }
.policy-lead {
  font-size: 16px; line-height: 1.75; color: var(--text-2);
  border-left: 3px solid var(--accent); padding-left: 16px;
  margin-bottom: 40px;
}
.policy-prose h2 {
  font-family: var(--font-display); font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 600; color: var(--text); margin: 48px 0 14px;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.policy-prose h2:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }
.policy-prose h3 {
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  color: var(--text); margin: 24px 0 10px;
}
.policy-prose p { font-size: 15px; line-height: 1.75; color: var(--text-2); margin-bottom: 16px; }
.policy-prose ul, .policy-prose ol {
  padding-left: 22px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.policy-prose ul { list-style: disc; }
.policy-prose ol { list-style: decimal; }
.policy-prose li { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.policy-prose a { color: var(--primary); }
.policy-prose a:hover { text-decoration: underline; }
.policy-prose strong { color: var(--text); font-weight: 600; }
.policy-contact {
  background: var(--primary-pale); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px; margin-top: 8px;
}
.policy-contact p { margin-bottom: 4px; }
.policy-contact p:last-child { margin-bottom: 0; }

/* Cookie table */
.cookie-table-wrap {
  overflow-x: auto; margin: 16px 0 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.cookie-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.cookie-table th {
  background: var(--surface-2); padding: 10px 14px;
  text-align: left; font-weight: 600; color: var(--text);
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
.cookie-table td {
  padding: 12px 14px; color: var(--text-2); line-height: 1.6;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.cookie-table tr:last-child td { border-bottom: none; }
.cookie-table code {
  font-family: 'Courier New', monospace; font-size: 13px;
  background: var(--surface-2); padding: 2px 6px;
  border-radius: 4px; color: var(--primary);
}

@media (max-width: 860px) {
  .policy-wrap { grid-template-columns: 1fr; gap: 32px; }
  .policy-toc  { position: static; }
}

/* ── Contact Page ───────────────────────────────────────── */
.contact-wrap {
  max-width: var(--max-w); margin: 0 auto;
  padding: 60px 24px 80px;
  display: grid; grid-template-columns: 340px 1fr; gap: 60px; align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-info-block { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--primary-pale); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: var(--primary);
}
.contact-info-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 4px; }
.contact-info-text  { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.contact-info-text a { color: var(--primary); }
.contact-scripture {
  margin-top: 12px; padding: 20px 20px 18px;
  background: var(--accent-pale); border: 1px solid #e8c97a;
  border-left: 4px solid var(--accent); border-radius: var(--radius-lg);
}
.contact-scripture-cross { font-family: var(--font-display); font-size: 18px; color: var(--accent); margin-bottom: 10px; }
.contact-scripture p { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--text); margin-bottom: 8px; }
.contact-scripture cite { font-size: 12px; font-weight: 600; color: var(--text-3); font-style: normal; }

.contact-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 36px 36px 32px; }
.contact-form-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.contact-form-sub   { font-size: 14px; color: var(--text-3); margin-bottom: 28px; }
.contact-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form-hint  { font-size: 12px; color: var(--text-3); margin: -8px 0 16px; }
.contact-required   { color: var(--red); }
.contact-textarea   { resize: vertical; min-height: 130px; }
.contact-success {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--green-pale); border: 1px solid #6ee7b7;
  border-radius: var(--radius-lg); padding: 20px 20px 18px; margin-bottom: 24px;
  color: var(--green);
}
.contact-success strong { display: block; font-size: 15px; margin-bottom: 4px; }
.contact-success p { font-size: 14px; color: #065f46; margin: 0; }

@media (max-width: 860px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .contact-form-wrap { padding: 24px 20px; }
  .contact-form-row  { grid-template-columns: 1fr; }
}

/* ── Control Panel: Messages ────────────────────────────── */
.cp-msg-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff;
  border-radius: var(--radius-pill); font-size: 10px; font-weight: 700;
  margin-left: 6px;
}
.msg-layout {
  display: grid; grid-template-columns: 320px 1fr;
  height: calc(100vh - 64px); overflow: hidden;
}
.msg-list-pane {
  border-right: 1px solid var(--border); overflow-y: auto;
  display: flex; flex-direction: column;
}
.msg-list-item {
  width: 100%; text-align: left; padding: 16px 18px;
  border: none; border-bottom: 1px solid var(--border);
  background: var(--surface); cursor: pointer; transition: background .15s;
}
.msg-list-item:hover { background: var(--surface-2); }
.msg-list-item--active { background: var(--primary-pale) !important; border-left: 3px solid var(--primary); }
.msg-list-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.msg-list-name { font-size: 14px; font-weight: 600; color: var(--text); }
.msg-list-date { font-size: 11px; color: var(--text-3); }
.msg-list-subject { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.msg-list-preview { font-size: 12px; color: var(--text-3); line-height: 1.5; }

.msg-detail-pane { overflow-y: auto; padding: 32px 36px; }
.msg-detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.msg-detail-subject { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.msg-detail-meta { font-size: 13px; color: var(--text-3); }
.msg-detail-meta a { color: var(--primary); }
.msg-detail-body {
  font-size: 15px; line-height: 1.8; color: var(--text-2);
  white-space: pre-wrap; margin-bottom: 32px;
  padding: 20px; background: var(--surface-2); border-radius: var(--radius-lg);
}
.msg-reply-form { border-top: 1px solid var(--border); padding-top: 24px; }
.msg-reply-form .form-label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.msg-reply-sent {
  border-top: 1px solid var(--border); padding-top: 24px;
  background: var(--green-pale); border-radius: var(--radius-lg); padding: 18px 20px;
}
.msg-reply-sent-label { font-size: 12px; font-weight: 600; color: var(--green); margin-bottom: 8px; }
.msg-reply-sent-body  { font-size: 14px; color: var(--text-2); white-space: pre-wrap; line-height: 1.65; }

@media (max-width: 800px) {
  .msg-layout { grid-template-columns: 1fr; height: auto; }
  .msg-list-pane { max-height: 300px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── Site Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 64px 24px 0;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 2.4fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand-link {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none !important; margin-bottom: 16px;
}
.footer-logo {
  width: 36px; height: 36px; flex-shrink: 0;
  background: url("/assets/cpf_logo_516x516.png") center / cover no-repeat;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 0; overflow: hidden;
}
.footer-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: #fff;
}
.footer-tagline {
  font-size: 14px; line-height: 1.65; color: rgba(255,255,255,.6);
  max-width: 320px;
}
.footer-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.footer-col-heading {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px; color: rgba(255,255,255,.7);
  text-decoration: none; transition: color .15s ease;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 20px 0 28px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 8px;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,.45); }
.footer-sub  { font-size: 13px; color: rgba(255,255,255,.35); }
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols  { grid-template-columns: repeat(2, 1fr); }
  .footer-tagline { max-width: 100%; }
}
@media (max-width: 520px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Auth layout ────────────────────────────────────────── */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-left  {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px; position: relative; overflow: hidden;
}
.auth-left::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4z'/%3E%3C/g%3E%3C/svg%3E"); }
.auth-left-content { position: relative; color: #fff; max-width: 400px; }
.auth-left-logo { margin-bottom: 48px; display: flex; align-items: center; gap: 12px; }
.auth-left-logo-mark { width: 44px; height: 44px; background: rgba(255,255,255,.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #fff; }
.auth-left-logo-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #fff; }
.auth-quote { font-family: var(--font-display); font-size: clamp(22px,3vw,30px); line-height: 1.35; color: #fff; margin-bottom: 16px; }
.auth-attribution { font-size: 14px; color: rgba(255,255,255,.6); margin-bottom: 48px; }
.auth-features { display: flex; flex-direction: column; gap: 14px; }
.auth-feature { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,.8); }
.auth-feature-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-light); flex-shrink: 0; }

.auth-right {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 48px; background: var(--surface); overflow-y: auto;
}
.auth-form-wrap { width: 100%; max-width: 400px; }
.auth-form-header { margin-bottom: 32px; }
.auth-form-title  { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.auth-form-sub    { font-size: 14px; color: var(--text-3); }
.auth-footer-text { text-align: center; font-size: 14px; color: var(--text-3); margin-top: 24px; }

/* Step indicator */
.step-indicator { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: var(--ease); }
.step-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }
.step-dot.done   { background: var(--green); }

/* ── Project Detail ─────────────────────────────────────── */
.project-detail-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 40px 24px;
  display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start;
}
.project-hero-img { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 28px; }
.project-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 16px; }
.project-main-title { font-family: var(--font-display); font-size: clamp(22px,3vw,32px); font-weight: 700; margin-bottom: 12px; line-height: 1.25; }
.project-org-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.project-sidebar-sticky { position: sticky; top: 88px; }

/* Donate widget */
.amount-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 14px; }
.amount-btn {
  padding: 10px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--ease); text-align: center; font-family: var(--font-body);
}
.amount-btn:hover  { border-color: var(--primary); color: var(--primary); }
.amount-btn.active { border-color: var(--primary); background: var(--primary-pale); color: var(--primary); }

/* Tabs */
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab-btn { padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--text-3); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--ease); white-space: nowrap; font-family: var(--font-body); }
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Media gallery */
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; }
.media-thumb { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--ease-slow); }
.media-thumb:hover img { transform: scale(1.05); }

/* Plan timeline */
.plan-timeline { display: flex; flex-direction: column; }
.plan-item { display: flex; gap: 20px; padding-bottom: 28px; }
.plan-item:last-child { padding-bottom: 0; }
.plan-track { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 24px; }
.plan-dot  { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 4px; }
.plan-line { width: 2px; flex: 1; background: var(--border); margin-top: 6px; }
.plan-item:last-child .plan-line { display: none; }
.plan-phase { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.plan-timeline-date { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.plan-details { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 32px;
  text-align: center; cursor: pointer; transition: var(--ease); background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--primary); background: var(--primary-pale); }
.upload-zone-icon { font-size: 32px; margin-bottom: 10px; color: var(--text-3); }
.upload-zone p    { font-size: 14px; color: var(--text-3); }
.upload-zone strong { color: var(--primary); }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon  { font-size: 48px; margin-bottom: 16px; opacity: .6; }
.empty-state h3 { font-family: var(--font-display); font-size: 20px; color: var(--text-2); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; color: var(--text-3); max-width: 360px; margin: 0 auto 20px; }

/* Announcement */
.announcement { background: linear-gradient(90deg, var(--primary), var(--primary-light)); color: #fff; text-align: center; font-size: 13px; font-weight: 500; padding: 10px 20px; }
.announcement a { color: var(--accent-light); text-decoration: underline; }

/* ── Feature cards (Tools section) ─────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 26px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--primary-pale);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  margin-bottom: 18px;
  transition: background .2s ease;
}
.feature-card:hover .feature-icon {
  background: var(--primary);
  color: #fff;
}
.feature-name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  color: var(--text); margin-bottom: 8px;
}
.feature-desc {
  font-size: 13px; line-height: 1.65;
  color: var(--text-3); margin: 0;
}
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ── Scroll reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── Toast out ──────────────────────────────────────────── */
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }

/* ── Public page sections ───────────────────────────────── */
.public-section { padding: 80px 0; }
.public-section-alt { padding: 80px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Mobile nav ─────────────────────────────────────────── */
@media (max-width: 680px) {
  .nav-links { display: none; }
}

/* Alert */
.alert { padding: 14px 16px; border-radius: var(--radius); font-size: 14px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; line-height: 1.5; }
.alert-success { background: var(--green-pale); color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: var(--red-pale);   color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--yellow-pale); color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: var(--blue-pale);   color: #1e40af; border: 1px solid #bfdbfe; }

/* TOTP */
.totp-qr { border: 3px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: inline-block; background: #fff; }
.totp-qr img { display: block; width: 200px; height: 200px; }
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.otp-input { width: 48px !important; height: 56px; text-align: center; font-size: 22px !important; font-weight: 700; border-radius: var(--radius) !important; padding: 0 !important; }
.totp-digit-box { width:44px;height:52px;text-align:center;font-size:22px;font-weight:600;border:2px solid var(--border);border-radius:8px;background:var(--surface,#fff);color:var(--text);outline:none;transition:border-color .15s; }
.totp-digit-box:focus { border-color: var(--primary, #6d4c9e) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #6d4c9e) 18%, transparent); }
.totp-digit-box:disabled { opacity: .5; }

/* Spinner */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { display: flex; align-items: center; justify-content: center; min-height: 300px; gap: 16px; color: var(--text-3); font-size: 14px; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 32px; }
.page-btn { min-width: 36px; height: 36px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; transition: var(--ease); display: flex; align-items: center; justify-content: center; color: var(--text-2); font-family: var(--font-body); }
.page-btn:hover  { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* File list */
.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--border); }
.file-icon { font-size: 24px; flex-shrink: 0; }
.file-name { font-size: 14px; font-weight: 500; color: var(--text); flex: 1; }
.file-size { font-size: 12px; color: var(--text-3); }

/* Update list */
.update-list { display: flex; flex-direction: column; gap: 16px; }
.update-item { padding: 16px; background: var(--surface-2); border-radius: var(--radius-lg); border-left: 3px solid var(--primary); }
.update-date { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.update-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.update-note  { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* Donation list */
.donation-list { display: flex; flex-direction: column; gap: 12px; }
.donation-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.donation-main { min-width: 0; }
.donation-name { font-size: 14px; font-weight: 600; color: var(--text); }
.donation-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.donation-amount { font-size: 15px; font-weight: 700; color: var(--primary); white-space: nowrap; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .project-detail-wrap { grid-template-columns: 1fr; }
  .project-sidebar-sticky { position: static; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card  { display: none; }
  .hero-preview { display: none; }
  .editor-hero { flex-direction: column; }
  .editor-chip-row { justify-content: flex-start; }
}
@media (max-width: 768px) {
  .stats-inner { grid-template-columns: repeat(2,1fr); }
  .stats-item  { border-right: none; border-bottom: 1px solid var(--border); }
  .how-grid    { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .auth-split  { grid-template-columns: 1fr; }
  .auth-left   { display: none; }
  .auth-right  { padding: 40px 24px; }
  .app-main    { margin-left: 0; }
  .sidebar     { display: none; }
  .app-content { padding: 20px 16px; }
  .app-topbar  { padding: 0 16px; }
  .app-topbar-main { gap: 8px; }
  .filters-bar { flex-direction: column; }
  .filters-bar select, .filters-bar .input-group { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .editor-shell { gap: 18px; }
  .editor-hero { padding: 20px; }
  .editor-info-actions { flex-direction: column; align-items: stretch; }
  .editor-info-actions .btn { width: 100%; justify-content: center; }
  .editor-section-header,
  .editor-subsection-header { flex-direction: column; }
  .editor-tab-bar { padding: 4px; }
  .editor-files-updates-grid { grid-template-columns: 1fr; }
  .editor-form-actions { flex-direction: column-reverse; }
  .editor-form-actions .btn { width: 100%; justify-content: center; }
  .update-table-actions { white-space: normal; }
}
@media (max-width: 480px) {
  .donation-item { align-items: flex-start; flex-direction: column; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-inner   { grid-template-columns: 1fr; }
  .stat-grid     { grid-template-columns: 1fr 1fr; }
  .hero-btns     { flex-direction: column; }
  .amount-grid   { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  #tab-files > div { grid-template-columns: 1fr !important; }
}

/* ── Utils ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 12px; }
.text-muted  { color: var(--text-3) !important; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.font-bold    { font-weight: 700; }
.font-semi    { font-weight: 600; }
.d-flex       { display: flex; }
.d-flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1  { flex: 1; }
.gap-1   { gap: 8px; }
.gap-2   { gap: 16px; }
.w-full  { width: 100%; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── KYC document rows ───────────────────────────────────── */
.kyc-doc-list { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.kyc-doc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: var(--surface); flex-wrap: wrap; }
.kyc-doc-row + .kyc-doc-row { border-top: 1px solid var(--border); }
.kyc-doc-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kyc-doc-label { font-size: 14px; font-weight: 500; color: var(--text); }
.kyc-doc-filename { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.kyc-doc-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.kyc-upload-label { display: inline-flex; align-items: center; }
