@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;700&display=swap");

/* ════════════════════════════════════════════
   Sidh.pk — Compact Sleek Theme v2
   ════════════════════════════════════════════ */

:root {
  --ink:        #19261f;
  --paper:      #f3f2ec;
  --card:       #fffefb;
  --green:      #14684a;
  --green-2:    #0d4935;
  --green-hi:   rgba(20,104,74,.1);
  --gold:       #c97f00;
  --gold-hi:    rgba(201,127,0,.13);
  --red:        #b03025;
  --red-hi:     rgba(176,48,37,.1);
  --rule:       #dedad0;
  --muted:      #68766e;
  --shadow:     0 4px 18px rgba(20,104,74,.09);
  --r:          8px;
  --t:          180ms cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", Inter, system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.6;
}

html[lang="ur"] body {
  font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", system-ui, sans-serif;
  font-size: 0.84rem;
  line-height: 1.72;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Animations ─────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes progressFill {
  from { width: 0; }
}

.fade-up { animation: fadeUp .38s var(--t) both; }
.fade-up:nth-child(2) { animation-delay: .06s; }
.fade-up:nth-child(3) { animation-delay: .12s; }
.fade-up:nth-child(4) { animation-delay: .18s; }

.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--green);
  color: white;
  font-size: 1rem; font-weight: 800;
  flex-shrink: 0;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 28px; padding: 0 11px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.76rem; font-weight: 700;
  /* always use latin font so both "English" and "اردو" display correctly */
  font-family: "Instrument Sans", Inter, system-ui, sans-serif;
  direction: ltr;
  white-space: nowrap;
  transition: border-color var(--t), background var(--t), color var(--t);
  flex-shrink: 0;
  line-height: 1;
}

.lang-toggle svg { width: 12px; height: 12px; flex-shrink: 0; }
.lang-toggle:hover { border-color: var(--green); background: var(--green-hi); color: var(--green); }

.eyebrow {
  margin: 0 0 6px;
  color: rgba(255,191,60,.9);
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
}

/* ── Buttons ─────────────────────────────── */
.primary-action {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 16px;
  border-radius: var(--r);
  font-size: 0.85rem; font-weight: 700; font-family: inherit;
  border: none;
  transition: transform var(--t), opacity var(--t), background var(--t);
  background: linear-gradient(120deg, var(--teal-2), var(--teal-3)); color: white;
}
.primary-action:hover { opacity: .92; transform: translateY(-1px); }

.progress-track {
  height: 5px; overflow: hidden;
  border-radius: 99px; background: var(--rule);
  margin: 10px 0 8px;
}
.progress-track span {
  display: block; height: 100%;
  border-radius: inherit; background: var(--gold);
  animation: progressFill .9s .4s var(--t) both;
}

.split-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 0.78rem; color: rgba(255,255,255,.6);
}
.split-row strong { color: white; }

.ticker {
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: 0.78rem; color: rgba(255,191,60,.85); font-weight: 700;
}

/* ── Fund cards ──────────────────────────── */
.fund-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}

.fund-card {
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: inherit; color: inherit; font: inherit;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.fund-card:hover { border-color: rgba(20,104,74,.4); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,104,74,.12); }
.fund-card.is-active { border-color: var(--green); background: linear-gradient(160deg,#fffefb,#f5fbf7); }

.fund-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fund-topline span:last-child { font-size: 0.78rem; color: var(--muted); }

.fund-card h3 { margin: 8px 0 3px; font-size: 0.95rem; line-height: 1.3; }
.fund-card p  { margin: 0 0 8px; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.balance-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed var(--rule);
  font-size: 0.78rem;
}
.balance-row span { color: var(--muted); }
.balance-row strong { font-variant-numeric: tabular-nums; color: var(--green); }

/* ── Badges ──────────────────────────────── */
.badge {
  border-radius: 999px; padding: 2px 8px;
  font-size: 0.68rem; font-weight: 800; white-space: nowrap;
}
.badge.project { background: var(--green-hi); color: var(--green); }
.badge.sadqa   { background: var(--gold-hi);  color: var(--gold); }
.badge.zakat   { background: var(--red-hi);   color: var(--red); }

/* ── Fund detail panel ───────────────────── */
.fund-detail-panel {
  margin-top: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: clamp(14px, 2.5vw, 20px);
  animation: fadeUp .3s var(--t) both;
}

.fund-detail-head {
  display: flex; align-items: start; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px dashed var(--rule);
}
.fund-detail-head h3 { margin: 0; font-size: 1.05rem; }
.fund-detail-head > span {
  border-radius: 999px; background: var(--green-hi); color: var(--green);
  padding: 3px 9px; font-weight: 800; font-size: 0.78rem; white-space: nowrap;
}
.fund-detail-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.8rem; }

.fund-metrics {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  margin-bottom: 12px;
}
.fund-metrics div {
  border: 1px solid var(--rule); border-radius: 6px;
  padding: 9px 12px; background: #f8f7f1;
}
.fund-metrics span { display: block; color: var(--muted); font-size: 0.72rem; }
.fund-metrics strong { display: block; margin-top: 2px; font-size: 0.95rem; font-variant-numeric: tabular-nums; }

.icon-delete-btn, .icon-edit-btn {
  display: grid; place-items: center;
  width: 24px; height: 24px; flex-shrink: 0;
  border: none; border-radius: 6px;
  background: transparent; color: var(--muted);
  font-size: 1rem; line-height: 1; font-family: inherit;
  transition: background var(--t), color var(--t);
}
.icon-delete-btn svg, .icon-edit-btn svg { width: 13px; height: 13px; }
.icon-delete-btn:hover { background: var(--red-hi); color: var(--red); }
.icon-edit-btn:hover { background: var(--teal-hi); color: var(--teal-2); }
.credit { color: var(--green); font-weight: 800; font-size: 0.84rem; white-space: nowrap; }
.debit  { color: var(--red);   font-weight: 800; font-size: 0.84rem; white-space: nowrap; }
.ledger-edit-form { margin: 6px 0 2px; padding: 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); }


.ledger-table {
  overflow: hidden;
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--card);
}

.ledger-row {
  display: grid;
  grid-template-columns: 88px 1fr 76px 96px 96px 96px;
  gap: 10px; padding: 9px 14px;
  min-height: 44px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  font-size: 0.8rem; font-variant-numeric: tabular-nums;
  transition: background var(--t);
}
.ledger-row:hover { background: var(--green-hi); }
.ledger-row:last-of-type { border-bottom: 0; }
.ledger-row > span, .ledger-row > strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ledger-table.has-actions .ledger-row { grid-template-columns: 88px 1fr 76px 90px 90px 90px 56px; }
.ledger-row-actions { display: flex; gap: 2px; justify-self: end; }

/* Same "Latest entries" table language reused for the donor/emergency/
   directory public listings — each just needs its own column widths. */
.ledger-table.donors-table .ledger-row { grid-template-columns: 1fr 64px 110px 130px 110px; }
.ledger-table.donors-table.has-actions .ledger-row { grid-template-columns: 1fr 64px 110px 130px 110px 56px; }
.ledger-table.emergency-table .ledger-row { grid-template-columns: 1fr 150px; }
.ledger-table.emergency-table.has-actions .ledger-row { grid-template-columns: 1fr 150px 56px; }
.ledger-table.directory-table .ledger-row { grid-template-columns: 1fr 130px 110px 140px; }
.ledger-table.directory-table.has-actions .ledger-row { grid-template-columns: 1fr 130px 110px 140px 56px; }

.ledger-head {
  background: #ede9db; color: var(--muted);
  font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
}
.ledger-head:hover { background: #ede9db; }

.panel {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--card); box-shadow: var(--shadow); padding: 18px;
}
.panel p { color: var(--muted); margin: 0; font-size: 0.85rem; }

/* ── Notice list ─────────────────────────── */
.notice-list { display: grid; gap: 8px; }
.notice-list article { border-top: 1px dashed var(--rule); padding-top: 8px; }
.notice-list h3 { margin: 3px 0 3px; font-size: 0.92rem; }
.notice-list p  { font-size: 0.8rem; }
.notice-list span { color: var(--green); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }

.page-list { grid-template-columns: 1fr; }

.emergency-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.emergency-grid a {
  display: grid; align-content: center; gap: 4px;
  min-height: 90px; padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--r);
  background: rgba(255,255,255,.07);
  transition: background var(--t), transform var(--t);
}
.emergency-grid a:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
.emergency-grid span { color: rgba(255,255,255,.65); font-size: 0.76rem; }
.emergency-grid strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* ── Data states ─────────────────────────── */
.data-state {
  border: 1px dashed var(--rule); border-radius: 6px;
  padding: 12px; color: var(--muted); background: rgba(255,254,250,.7);
  font-size: 0.84rem; text-align: center;
  /* Harmless outside a grid — when it IS the sole child of one (the usual
     case: it replaces a list of cards when that list is empty), this makes
     it span every column instead of sitting in just the first track. */
  grid-column: 1 / -1;
}
.data-state.error { color: var(--red); border-color: rgba(176,48,37,.25); }

/* ════════════════════════════════════════════
   Admin
   ════════════════════════════════════════════ */
.container {
  width: 100%; max-width: 820px; margin: 0 auto; min-width: 0;
  padding: 0 clamp(14px, 3vw, 36px) 52px;
  box-sizing: border-box;
}

/* Login */
.admin-login-wrap { display: grid; place-items: center; min-height: 56vh; padding: 24px 16px; }
.admin-login-card { width: 100%; max-width: 360px; }

.admin-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.admin-login-brand strong { display: block; font-size: 0.95rem; }
.admin-login-brand small  { display: block; color: var(--muted); font-size: 0.72rem; }
.admin-login-card h2 { margin: 0 0 14px; font-size: 1.2rem; }

/* Topbar */
.admin-wrap { padding-top: 22px; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 18px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; flex-wrap: wrap;
}
.admin-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.admin-stat { display: grid; gap: 2px; }
.admin-stat span {
  font-size: 0.66rem; color: var(--muted);
  font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}
.admin-stat strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.admin-logout-btn {
  padding: 5px 12px;
  border: 1px solid var(--rule); border-radius: 6px;
  background: transparent; color: var(--muted);
  font-size: 0.8rem; font-family: inherit;
  transition: border-color var(--t), color var(--t);
}
.admin-logout-btn:hover { border-color: var(--red); color: var(--red); }

/* Tabs */
.admin-tabs {
  display: flex; border-bottom: 2px solid var(--rule); margin-bottom: 20px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tab-btn {
  padding: 8px 16px;
  border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  background: transparent; color: var(--muted);
  font-size: 0.84rem; font-weight: 700; font-family: inherit;
  white-space: nowrap; flex-shrink: 0;
  transition: color var(--t), border-color var(--t);
}
.tab-btn.is-active { color: var(--green); border-bottom-color: var(--green); }

/* Entry form */
.entry-panel { max-width: 580px; }
.entry-type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.toggle-btn {
  padding: 9px 8px;
  border: 1.5px solid var(--rule); border-radius: var(--r);
  background: transparent; color: var(--muted);
  font-size: 0.82rem; font-weight: 700; font-family: inherit;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.toggle-btn.is-active { border-color: var(--green); background: var(--green); color: white; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.entry-submit { width: 100%; margin-top: 4px; }

/* Forms */
.admin-form { display: grid; gap: 10px; }
.admin-form label { display: grid; gap: 3px; font-size: 0.84rem; }
.admin-form label > span {
  color: var(--muted); font-weight: 700;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em;
}
.optional { font-weight: 400; font-style: normal; opacity: .7; text-transform: none; letter-spacing: 0; font-size: inherit; }

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--rule); border-radius: 6px;
  background: var(--card); color: var(--ink);
  font-size: 0.88rem; font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: var(--green); outline: none;
  box-shadow: 0 0 0 3px var(--green-hi);
}
.admin-form textarea { min-height: 60px; resize: vertical; }

.form-note { font-size: 0.76rem; color: var(--muted); margin: 0; }
.form-note.error   { color: var(--red); }
.form-note.success { color: var(--green); font-weight: 700; }

/* Fund summary */
.fund-summary-list { display: grid; gap: 10px; }
.fund-summary-card { overflow: hidden; }

.fund-summary-card summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; list-style: none; flex-wrap: wrap; padding: 2px 0;
  transition: opacity var(--t);
}
.fund-summary-card summary:hover { opacity: .8; }
.fund-summary-card summary::-webkit-details-marker { display: none; }

.fund-summary-title { display: flex; align-items: center; gap: 8px; }
.fund-summary-title h3 { margin: 0; font-size: 0.9rem; }

.fund-summary-metrics { display: flex; gap: 16px; }
.fund-summary-metrics span { display: grid; text-align: center; gap: 1px; }
.fund-summary-metrics small {
  font-size: 0.62rem; color: var(--muted);
  font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
}
.fund-summary-metrics strong { font-size: 0.85rem; font-variant-numeric: tabular-nums; }

.fund-summary-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }

.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--rule);
  color: var(--muted); font-size: 0.64rem; font-weight: 800;
}

/* ── Scroll reveal ───────────────────────── */
.sr {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s var(--t), transform .45s var(--t);
}
.sr.sr-in { opacity: 1; transform: none; }
.sr-delay-1 { transition-delay: .07s; }
.sr-delay-2 { transition-delay: .14s; }
.sr-delay-3 { transition-delay: .21s; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 860px) {
  .fund-cards { grid-template-columns: 1fr 1fr; }
  .emergency-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .fund-cards { grid-template-columns: 1fr; }
  .emergency-grid { grid-template-columns: 1fr; }
  .fund-metrics { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 1fr 1fr; }
  .ledger-head { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .admin-stats { gap: 14px; }
  .fund-summary-metrics { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════════
   App shell — sidebar dashboard layout
   ════════════════════════════════════════════ */
:root {
  --teal-1:   #0a3a2c;
  --teal-2:   #0f5940;
  --teal-3:   #1c8a68;
  --teal-hi:  rgba(20,104,74,.08);
  --r2:       16px;
  --r3:       22px;
  --shadow-soft: 0 14px 34px rgba(10,58,44,.12);
  --sidebar-w: 248px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100svh;
}

/* ── Sidebar ─────────────────────────────── */
.sidebar {
  grid-row: 1 / -1;
  position: sticky; top: 0;
  height: 100svh;
  display: flex; flex-direction: column;
  padding: 20px 14px;
  background:
    radial-gradient(circle at 15% 8%, rgba(255,255,255,.05), transparent 40%),
    linear-gradient(165deg, var(--teal-1) 0%, var(--teal-2) 58%, var(--teal-3) 130%);
  color: rgba(255,255,255,.92);
  z-index: 60;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 18px;
}
.sidebar-brand .brand-mark { background: rgba(255,255,255,.14); }
.sidebar-brand strong { color: white; font-size: 0.95rem; }
.sidebar-brand small  { color: rgba(255,255,255,.55); font-size: 0.66rem; }

.sidebar-nav { display: grid; gap: 3px; flex: 1; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: rgba(255,255,255,.68);
  font-size: 0.85rem; font-weight: 600;
  transition: background var(--t), color var(--t);
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: white; }
.sidebar-nav a[aria-current="page"] {
  background: rgba(255,255,255,.96);
  color: var(--teal-2);
  box-shadow: 0 6px 16px rgba(0,0,0,.14);
}
.sidebar-nav a[aria-current="page"] svg { opacity: 1; }

.sidebar-foot {
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 0.68rem; color: rgba(255,255,255,.45);
  line-height: 1.5;
}

.sidebar-close { display: none; }

/* ── Main column ─────────────────────────── */
.app-main { min-width: 0; background: var(--paper); }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(16px, 3vw, 26px) clamp(16px, 3vw, 32px);
  background: linear-gradient(115deg, var(--teal-1) 0%, var(--teal-2) 70%, var(--teal-3) 130%);
  color: white;
}

.topbar-heading { min-width: 0; }
.topbar-crumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.74rem; color: rgba(255,255,255,.6); margin: 0 0 4px;
}
.topbar-crumb a { color: rgba(255,255,255,.85); }
.topbar-crumb a:hover { text-decoration: underline; }
.topbar h1 {
  margin: 0; color: white; font-weight: 800;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem); line-height: 1.25;
}
.topbar-sub { margin: 3px 0 0; color: rgba(255,255,255,.65); font-size: 0.82rem; }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.hamburger-btn, .bell-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
  background: rgba(255,255,255,.08); color: white;
  transition: background var(--t);
}
.hamburger-btn { display: none; }
.hamburger-btn:hover, .bell-btn:hover { background: rgba(255,255,255,.18); }
.bell-btn { position: relative; }
.bell-btn svg, .hamburger-btn svg { width: 17px; height: 17px; }
.bell-dot {
  position: absolute; top: 6px; inset-inline-end: 6px;
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--gold); border: 1.5px solid var(--teal-2);
}

.topbar .lang-toggle {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: white;
  height: 36px;
}
.topbar .lang-toggle:hover { background: rgba(255,255,255,.2); color: white; border-color: rgba(255,255,255,.4); }

/* Notification dropdown */
.notif-wrap { position: relative; }
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
  width: min(320px, 84vw);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--r2);
  box-shadow: var(--shadow-soft);
  padding: 12px;
  display: none;
  direction: inherit;
  animation: fadeUp .18s var(--t) both;
}
.notif-dropdown.is-open { display: block; }
.notif-dropdown h4 {
  margin: 0 0 8px; font-size: 0.72rem; font-weight: 800;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}
.notif-dropdown article { padding: 8px 0; border-top: 1px dashed var(--rule); }
.notif-dropdown article:first-of-type { border-top: none; }
.notif-dropdown article strong { display: block; font-size: 0.84rem; }
.notif-dropdown article p { margin: 2px 0 0; font-size: 0.78rem; color: var(--muted); }

/* Fund summary ledger toolbar — filter pills + kebab menu (exports, complete/reopen, delete) */
.ledger-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kebab-wrap { position: relative; flex-shrink: 0; }
.kebab-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--card); color: var(--muted);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.kebab-btn svg { width: 16px; height: 16px; }
.kebab-btn:hover { background: var(--green-hi); color: var(--green); border-color: var(--green); }
.kebab-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
  min-width: 210px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r2);
  box-shadow: var(--shadow-soft);
  padding: 6px;
  display: none;
  z-index: 20;
  animation: fadeUp .18s var(--t) both;
}
.kebab-menu.is-open { display: block; }
.kebab-menu a, .kebab-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 10px; border-radius: 8px;
  border: none; background: transparent; color: var(--ink);
  font-size: 0.84rem; font-weight: 700; text-align: left; font-family: inherit;
  transition: background var(--t);
}
.kebab-menu a:hover, .kebab-menu button:hover { background: var(--green-hi); }
.kebab-menu button.is-danger { color: var(--red); }
.kebab-menu button.is-danger:hover { background: var(--red-hi); }
.kebab-menu hr { border: none; border-top: 1px solid var(--rule); margin: 4px 2px; }

/* ── Dashboard content ───────────────────── */
.dashboard {
  padding: clamp(16px, 3vw, 32px);
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-col { display: grid; gap: 18px; min-width: 0; }

/* Card shell used across the dashboard */
.d-card {
  border: 1px solid var(--rule); border-radius: var(--r2);
  background: var(--card); box-shadow: var(--shadow-soft);
  padding: clamp(14px, 2.5vw, 20px);
}
.d-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.d-card-head h2 { margin: 0; font-size: 1rem; }
.d-card-head a { font-size: 0.78rem; font-weight: 700; color: var(--teal-3); }
.d-card-head a:hover { text-decoration: underline; }

/* Fund grid inside dashboard reuses .fund-cards / .fund-card, just tighten radius */
.dashboard .fund-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
.dashboard .fund-card { border-radius: var(--r2); }

.ql-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 9px;
  background: var(--teal-hi); color: var(--teal-2);
}
.ql-icon svg { width: 15px; height: 15px; }

/* Overlay for mobile sidebar drawer */
.shell-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 55;
  background: rgba(10,25,20,.45);
}
.shell-overlay.is-open { display: block; }

/* Generic modal — used for the Team tab's "add admin" popup */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10,25,20,.55);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.is-open { display: flex; }
.modal-card {
  position: relative;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  background: var(--card); border-radius: var(--r2); box-shadow: var(--shadow-soft);
  padding: 28px 24px 24px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: none; background: var(--paper); color: var(--muted);
  transition: background var(--t), color var(--t);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { background: var(--rule); color: var(--ink); }

.panel-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.icon-btn-add {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  border: none; background: linear-gradient(120deg, var(--teal-2), var(--teal-3)); color: white;
  transition: transform var(--t), opacity var(--t);
}
.icon-btn-add svg { width: 20px; height: 20px; }
.icon-btn-add:hover { transform: translateY(-1px); opacity: .92; }

.avatar-circle {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; border-radius: 50%;
  color: white; font-weight: 800; letter-spacing: .02em;
}
.avatar-circle svg { width: 55%; height: 55%; stroke: white; }

.empty-cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 20px;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset-inline-start: 0; top: 0;
    width: min(78vw, 280px);
    transform: translateX(-102%);
    transition: transform .24s var(--t);
  }
  [dir="rtl"] .sidebar { transform: translateX(102%); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close {
    display: grid; place-items: center;
    width: 30px; height: 30px; margin-inline-start: auto;
    border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
    background: rgba(255,255,255,.08); color: white;
  }
  .hamburger-btn { display: grid; }
}

@media (max-width: 640px) {
  .dashboard .fund-cards { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
}

/* ════════════════════════════════════════════
   Contribute flow (Add funds)
   ════════════════════════════════════════════ */
.contribute-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(240px, 300px);
  gap: 18px; align-items: start;
}

.form-card {
  border: 1px solid var(--rule); border-radius: var(--r2);
  background: var(--card); box-shadow: var(--shadow-soft);
  padding: clamp(16px, 3vw, 26px);
}

.form-section + .form-section {
  margin-top: 20px; padding-top: 20px;
  border-top: 1px dashed var(--rule);
}

.form-section-title {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px;
  font-size: 0.92rem; font-weight: 800;
}
.form-section-title .ql-icon { width: 28px; height: 28px; border-radius: 8px; }
.form-section-title .ql-icon svg { width: 14px; height: 14px; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.field { display: grid; gap: 5px; }
.field.span-2 { grid-column: span 2; }
.field label {
  font-size: 0.72rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.field label .req { color: var(--red); }

.field input,
.field select,
.field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--card); color: var(--ink);
  font-size: 0.9rem; font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal-3); outline: none;
  box-shadow: 0 0 0 3px var(--teal-hi);
}
.field textarea { min-height: 70px; resize: vertical; }
.field .hint { font-size: 0.72rem; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }

.field-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.84rem; color: var(--ink);
}
.field-check input { width: 16px; height: 16px; accent-color: var(--teal-2); }

.field-group {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rule);
}
.field-group-title {
  display: block; margin-bottom: 10px;
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
}

/* Mobile wallet number cards (New Fund form) */
.wallet-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.wallet-card {
  border: 1.5px solid var(--rule); border-radius: var(--r2);
  padding: 14px; background: var(--card);
  transition: border-color var(--t), background var(--t);
}
.wallet-card.is-enabled { border-color: var(--teal-3); background: var(--teal-hi); }
.wallet-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wallet-icon {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px;
  display: grid; place-items: center; background: var(--teal-hi); color: var(--teal-2);
}
.wallet-icon svg { width: 15px; height: 15px; }
.wallet-name { flex: 1; min-width: 0; font-size: 0.82rem; font-weight: 800; color: var(--ink); }
.wallet-input {
  display: block; width: 100%; height: 38px; padding: 0 10px; margin-bottom: 6px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--paper);
  font-size: 0.84rem; font-family: inherit; color: var(--ink);
}
.wallet-input:disabled { color: var(--muted); cursor: not-allowed; }
.wallet-input:not(:disabled) { background: white; border-color: var(--teal-3); }
.wallet-hint { display: block; font-size: 0.68rem; color: var(--muted); }

/* Small pill toggle switch, used on each wallet card */
label.toggle-switch { display: block; position: relative; flex-shrink: 0; width: 34px; height: 20px; cursor: pointer; }
.toggle-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.toggle-track {
  display: block; width: 34px; height: 20px; border-radius: 999px;
  background: var(--rule); transition: background var(--t); position: relative;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: white; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t);
}
.toggle-switch input:checked + .toggle-track { background: var(--teal-3); }
.toggle-switch input:checked + .toggle-track .toggle-thumb { transform: translateX(14px); }

/* Multi-select dropdown (expense-permission admin picker) */
.multiselect { position: relative; margin-top: 4px; }
.multiselect-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 42px; padding: 0 14px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--card);
  font-size: 0.84rem; color: var(--ink); font-family: inherit; text-align: left;
  transition: border-color var(--t);
}
.multiselect-trigger:hover { border-color: var(--teal-3); }
.multiselect-chevron { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.multiselect-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--rule); border-radius: var(--r2); background: var(--card);
  box-shadow: var(--shadow-soft); padding: 6px;
}
label.multiselect-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r);
  cursor: pointer; transition: background var(--t);
}
.multiselect-option:hover { background: var(--paper); }
.multiselect-option:has(input:checked) { background: var(--teal-hi); }
.multiselect-option strong { flex-shrink: 0; font-size: 0.85rem; color: var(--ink); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multiselect-option-meta {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 0.78rem;
}
.multiselect-option input[type="checkbox"] {
  flex-shrink: 0; margin-left: auto;
  width: 17px; height: 17px; accent-color: var(--teal-2);
}

@media (max-width: 700px) {
  .wallet-grid { grid-template-columns: 1fr; }
}

.payment-method-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.payment-method-grid label {
  position: relative;
  display: grid; place-items: center; gap: 6px;
  padding: 10px 6px;
  border: 1.5px solid var(--rule); border-radius: 12px;
  font-size: 0.74rem; font-weight: 700; color: var(--muted);
  text-align: center; cursor: pointer;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.payment-method-grid input {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; cursor: pointer;
}
.payment-method-grid label:has(input:checked),
.payment-method-grid label.is-checked {
  border-color: var(--teal-3); background: var(--teal-hi); color: var(--teal-2);
}
.payment-method-grid label:focus-within {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.payment-method-grid svg { width: 18px; height: 18px; }

.payment-info-card {
  margin-top: 14px; padding: 14px 16px;
  border: 1px dashed var(--teal-3); border-radius: var(--r2);
  background: var(--teal-hi);
  display: none;
}
.payment-info-card.is-visible { display: block; }
.payment-info-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0;
}
.payment-info-row + .payment-info-row { border-top: 1px solid rgba(20,104,74,.12); }
.payment-info-row span { color: var(--muted); font-size: 0.78rem; }
.payment-info-row strong { font-variant-numeric: tabular-nums; font-size: 0.86rem; }
.copy-btn {
  border: 1px solid var(--teal-3); border-radius: 8px;
  background: var(--card); color: var(--teal-2);
  font-size: 0.7rem; font-weight: 800; font-family: inherit;
  padding: 4px 9px; flex-shrink: 0;
  transition: background var(--t), color var(--t);
}
.copy-btn:hover { background: var(--teal-2); color: white; }
.copy-btn.is-copied { background: var(--teal-2); color: white; }

.upload-drop {
  display: block;
  border: 1.5px dashed var(--rule); border-radius: var(--r2);
  padding: 20px; text-align: center;
  color: var(--muted); font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.upload-drop:hover { border-color: var(--teal-3); background: var(--teal-hi); }
.upload-drop input { display: none; }
.upload-drop svg { width: 22px; height: 22px; margin-bottom: 6px; color: var(--teal-3); }
.upload-drop.has-file { border-style: solid; border-color: var(--teal-3); color: var(--teal-2); font-weight: 700; }

.form-submit-row {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule);
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 22px;
  border: none; border-radius: 11px;
  background: linear-gradient(120deg, var(--teal-2), var(--teal-3));
  color: white; font-size: 0.88rem; font-weight: 800; font-family: inherit;
  transition: transform var(--t), opacity var(--t);
}
.btn-primary:hover { transform: translateY(-1px); opacity: .95; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.field-error { font-size: 0.74rem; color: var(--red); font-weight: 600; }

/* Fund preview / summary card on contribute page */
.fund-preview-card {
  display: grid; gap: 10px;
}
.fund-preview-card .fund-metrics { margin-bottom: 0; }

/* Success state */
.success-card {
  text-align: center; padding: clamp(28px, 6vw, 48px) 20px;
  display: grid; justify-items: center; gap: 10px;
}
.success-icon {
  width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 999px; background: var(--teal-hi); color: var(--teal-2);
  margin-bottom: 6px;
}
.success-icon svg { width: 28px; height: 28px; }
.success-card h2 { margin: 0; font-size: 1.15rem; }
.success-card p { margin: 0; color: var(--muted); max-width: 420px; font-size: 0.88rem; }
.success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  background: #1f9d55; color: white; font-weight: 800; font-size: 0.84rem;
}
.btn-whatsapp:hover { opacity: .92; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--rule); color: var(--ink); font-weight: 700; font-size: 0.84rem;
}
.btn-ghost:hover { border-color: var(--teal-3); color: var(--teal-2); }

@media (max-width: 1080px) {
  .contribute-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: span 1; }
  .payment-method-grid { grid-template-columns: repeat(3,1fr); }
}

/* ════════════════════════════════════════════
   Marketing home page — a public welfare-org
   landing page, deliberately NOT the sidebar
   app-shell used by funds/contribute/admin/etc.
   Top nav + stacked full-width sections instead.
   ════════════════════════════════════════════ */

.site-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 20px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(246,245,239,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 900; font-size: 1.05rem;
  flex-shrink: 0;
}
.site-nav-brand .brand-mark { width: 32px; height: 32px; }
.site-nav-brand .brand-mark svg { width: 17px; height: 17px; }
.site-nav-links {
  display: flex; gap: clamp(10px, 2vw, 26px);
  flex: 1;
  font-size: 0.86rem; font-weight: 600; color: var(--muted);
}
.site-nav-links a { padding: 6px 0; border-bottom: 2px solid transparent; transition: color var(--t), border-color var(--t); }
.site-nav-links a:hover, .site-nav-links a[aria-current="page"] { color: var(--teal-2); border-color: var(--teal-3); }
.site-nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-nav-cta {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  border-radius: 999px; background: linear-gradient(120deg, var(--teal-2), var(--teal-3));
  color: white; font-weight: 800; font-size: 0.82rem;
  transition: transform var(--t), opacity var(--t);
}
.site-nav-cta:hover { transform: translateY(-1px); opacity: .93; }
.site-nav-burger {
  display: none; width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid var(--rule); border-radius: 9px; background: var(--card);
  align-items: center; justify-content: center; color: var(--ink);
}
.site-nav-drawer {
  display: none; flex-direction: column; gap: 2px;
  padding: 10px clamp(16px,4vw,48px) 16px;
  background: var(--card); border-bottom: 1px solid var(--rule);
}
.site-nav-drawer a { padding: 10px 4px; font-weight: 700; font-size: 0.92rem; border-bottom: 1px solid var(--rule); }
.site-nav-drawer.is-open { display: flex; }

.hero-marketing {
  position: relative; overflow: hidden;
  padding: clamp(52px,10vw,110px) clamp(16px,4vw,48px) clamp(60px,9vw,96px);
  background: var(--teal-1);
  color: white; text-align: center;
}
.hero-illustration { position: absolute; inset: 0; z-index: 0; }
.hero-illustration svg { width: 100%; height: 100%; display: block; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10,58,44,.5) 0%, rgba(10,58,44,.3) 42%, rgba(10,58,44,.78) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero-marketing .eyebrow { color: rgba(255,191,60,.92); justify-content: center; display: flex; }
.hero-marketing h1 {
  margin: 10px auto 16px; max-width: 760px;
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; line-height: 1.12;
  text-shadow: 0 2px 20px rgba(10,58,44,.4);
}
.hero-marketing .urdu-title { font-family: "Noto Nastaliq Urdu","Noto Naskh Arabic",serif; display: block; opacity: .82; font-size: .55em; margin-bottom: 6px; }
.hero-lead { max-width: 620px; margin: 0 auto 28px; color: rgba(255,255,255,.82); font-size: clamp(0.92rem,1.6vw,1.05rem); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn-hero-primary, .btn-hero-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 26px; border-radius: 999px;
  font-weight: 800; font-size: 0.92rem;
  transition: transform var(--t), opacity var(--t), background var(--t);
}
.btn-hero-primary { background: white; color: var(--teal-2); }
.btn-hero-primary:hover { transform: translateY(-2px); opacity: .93; }
.btn-hero-secondary { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.4); color: white; }
.btn-hero-secondary:hover { background: rgba(255,255,255,.2); }

.stats-band {
  margin: -40px clamp(16px,4vw,48px) 0; position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px;
  background: var(--card); border-radius: var(--r3); overflow: hidden;
  box-shadow: var(--shadow-soft); padding: clamp(18px,3vw,28px);
}
.stats-band::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--teal-3));
}
.stats-band .stat-block { text-align: center; padding: 6px 8px; }
.stats-band .stat-block strong { display: block; font-size: clamp(1.2rem,2.6vw,1.7rem); font-weight: 900; color: var(--teal-2); font-variant-numeric: tabular-nums; }
.stats-band .stat-block span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.78rem; font-weight: 600; }

.module-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; max-width: 1080px; margin: 0 auto; }
.module-card {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  padding: 22px; border: 1px solid var(--rule); border-radius: var(--r2);
  border-top: 3px solid var(--gold);
  background: var(--card); box-shadow: var(--shadow-soft);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.module-card.accent-green { border-top-color: var(--teal-3); }
.module-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(10,58,44,.16); }
.module-card .ql-icon { width: 44px; height: 44px; }
.module-card .ql-icon svg { width: 21px; height: 21px; }
.module-card h3 { margin: 4px 0 0; font-size: 1rem; }
.module-card p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.55; flex: 1; }
.module-card .module-arrow { color: var(--teal-2); font-weight: 800; font-size: 0.8rem; }

.marketing-section { padding: clamp(56px,8vw,88px) clamp(16px,4vw,48px); }
.marketing-section .section-heading { max-width: 640px; margin: 0 auto 34px; text-align: center; }
.marketing-section .section-heading .eyebrow { justify-content: center; display: flex; }
.marketing-section .section-heading h2 { font-size: clamp(1.4rem,3vw,2rem); margin: 6px 0 10px; }

.village-facts-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start;
  max-width: 1080px; margin: 0 auto 28px;
}
.village-facts-copy p { margin: 0 0 16px; color: var(--ink); font-size: 0.92rem; line-height: 1.8; }
.village-facts-copy .source-note { margin: 0; }
.source-note a { color: var(--muted); font-size: 0.76rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.source-note a:hover { color: var(--teal-2); }

.village-facts-panel {
  border: 1px solid var(--rule); border-radius: var(--r2);
  background: var(--card); box-shadow: var(--shadow-soft);
  padding: 4px 20px;
}
.fact-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 0; border-bottom: 1px dashed var(--rule);
}
.fact-row:last-child { border-bottom: none; }
.fact-row span { color: var(--muted); font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.fact-row strong { text-align: right; font-size: 0.86rem; font-weight: 800; color: var(--ink); }

.notable-section-eyebrow { text-align: center; justify-content: center; display: flex; margin-top: 4px; }
.notable-section-title { text-align: center; font-size: clamp(1.2rem,2.4vw,1.5rem); margin: 4px 0 24px; }

.notable-carousel-wrap {
  display: flex; align-items: center; gap: 12px;
  max-width: 1120px; margin: 0 auto;
}
.notable-carousel {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 4px 2px 10px;
  flex: 1; min-width: 0;
}
.notable-carousel .data-state { flex: 1; }
.carousel-nav {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--rule); background: var(--card); color: var(--ink);
  transition: border-color var(--t), transform var(--t);
}
.carousel-nav svg { width: 18px; height: 18px; }
.carousel-nav:hover { border-color: var(--teal-3); transform: translateY(-1px); }
.notable-person-card {
  display: flex; gap: 16px; align-items: flex-start;
  flex: 0 0 min(340px, 82vw); scroll-snap-align: start;
  padding: 24px; border-radius: var(--r2);
  background: linear-gradient(135deg, var(--teal-1), var(--teal-2));
  color: white; box-shadow: var(--shadow-soft);
}
.notable-badge {
  width: 52px; height: 52px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.14); color: var(--gold);
}
.notable-badge svg { width: 26px; height: 26px; }
.notable-photo {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.25);
}
.notable-person-body { min-width: 0; }
.notable-person-body h3 { margin: 0 0 8px; font-size: 1.1rem; color: white; }
.notable-person-body p { margin: 0 0 12px; color: rgba(255,255,255,.82); font-size: 0.86rem; line-height: 1.7; }
.notable-link { color: var(--gold); font-weight: 800; font-size: 0.82rem; }
.notable-link:hover { text-decoration: underline; }

.marketing-section .section-heading p { color: var(--muted); font-size: 0.94rem; line-height: 1.7; margin: 0; }

.about-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; max-width: 1080px; margin: 0 auto; }
.about-card {
  padding: 22px; border: 1px solid var(--rule); border-radius: var(--r2);
  background: var(--card); box-shadow: var(--shadow-soft); text-align: center;
}
.about-card .ql-icon { width: 44px; height: 44px; margin: 0 auto 14px; }
.about-card .ql-icon svg { width: 21px; height: 21px; }
.about-card h3 { margin: 0 0 8px; font-size: 1rem; }
.about-card p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.65; }

.project-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 26px; }
.project-tab-btn {
  padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--rule);
  background: var(--card); color: var(--muted); font-weight: 700; font-size: 0.84rem;
  transition: all var(--t);
}
.project-tab-btn.is-active { border-color: var(--teal-3); background: var(--teal-hi); color: var(--teal-2); }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; max-width: 1080px; margin: 0 auto; }
.projects-grid[hidden] { display: none; }
.project-card {
  display: block; padding: 18px; border: 1px solid var(--rule); border-radius: var(--r2);
  background: var(--card); box-shadow: var(--shadow-soft);
  transition: transform var(--t), box-shadow var(--t);
}
.project-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(10,58,44,.14); }
.project-card h3 { margin: 10px 0 4px; font-size: 0.98rem; }
.project-card p { margin: 0 0 10px; color: var(--muted); font-size: 0.8rem; line-height: 1.55; min-height: 2.4em; }

.announcements-band { background: #eceae0; }
.announcements-list-marketing { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; max-width: 1080px; margin: 0 auto; }
.announcement-card-marketing { padding: 18px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow-soft); }
.announcement-card-marketing h3 { margin: 6px 0 6px; font-size: 0.95rem; }
.announcement-card-marketing p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }

.emergency-band-marketing { background: var(--green-2); color: white; text-align: center; padding: clamp(40px,6vw,60px) clamp(16px,4vw,48px); }
.emergency-band-marketing .section-heading h2 { color: white; }
.emergency-band-marketing .section-heading p { color: rgba(255,255,255,.65); }
.emergency-band-marketing .emergency-grid { max-width: 900px; margin: 0 auto; }

.site-footer-marketing {
  background: var(--teal-1); color: rgba(255,255,255,.8);
  padding: 44px clamp(16px,4vw,48px) 24px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; max-width: 1080px; margin: 0 auto 28px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 900; font-size: 1.05rem; color: white; }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-brand .brand-mark svg { width: 16px; height: 16px; }
.site-footer-marketing p { font-size: 0.82rem; line-height: 1.7; color: rgba(255,255,255,.6); margin: 0; }
.footer-col h4 { margin: 0 0 12px; font-size: 0.76rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.5); }
.footer-col a, .footer-col span { display: block; margin-bottom: 8px; font-size: 0.85rem; color: rgba(255,255,255,.8); }
.footer-col a:hover { color: white; }
.footer-bottom {
  max-width: 1080px; margin: 0 auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 0.76rem; color: rgba(255,255,255,.5);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}

@media (max-width: 900px) {
  .site-nav-links { display: none; }
  .site-nav-burger { display: flex; }
  .stats-band { grid-template-columns: repeat(2,1fr); }
  .about-grid, .projects-grid, .announcements-list-marketing { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: repeat(2,1fr); }
  .village-facts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .module-grid { grid-template-columns: 1fr; }
  .notable-person-card { flex-direction: column; align-items: flex-start; flex-basis: 88vw; }
  .fact-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .fact-row strong { text-align: left; }
}
