/* ===========================================================================
   Fiqi Group — campaign page.

   Laid out the way a community fundraising page has to be: the number people
   came for is the largest thing on the page, the proof sits directly under it,
   and sharing is one tap away. The right column is sticky on desktop because
   the ask should never scroll out of reach.
   =========================================================================== */

.cmp-shell { min-height: 60vh; }

/* ------------------------------------------------------------------ cover */

.cmp-cover {
  position: relative;
  height: clamp(220px, 34vw, 400px);
  overflow: hidden;
  background: var(--mint-900);
}
.cmp-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.03);
}
.cmp-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,43,35,.18) 0%, rgba(20,43,35,.06) 40%, rgba(246,250,248,.96) 100%);
}
.cmp-cover-empty {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 78% 10%, rgba(111,154,136,.3), transparent 60%),
    radial-gradient(60% 80% at 10% 20%, rgba(194,144,47,.22), transparent 62%),
    var(--grad-deep);
}

/* ------------------------------------------------------------------ layout */

.cmp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .95fr);
  gap: clamp(26px, 3.4vw, 54px);
  align-items: start;
  padding-block: clamp(26px, 3.4vw, 44px) clamp(50px, 6vw, 86px);
}
.cmp-main { min-width: 0; }

.cmp-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

/* ------------------------------------------------------------------ header */

.cmp-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cmp-cat {
  font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--mint); background: var(--mint-50);
  border: 1px solid var(--mint-100);
  padding: 5px 11px; border-radius: 999px;
}

.cmp-title {
  font-size: clamp(27px, 3.9vw, 46px);
  line-height: 1.14;
  letter-spacing: -.017em;
  margin-top: 16px;
}

.cmp-meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 16px; font-size: 14.5px; color: var(--muted);
}
.cmp-meta span { display: inline-flex; align-items: center; gap: 7px; }
.cmp-meta svg { opacity: .65; }

/* -------------------------------------------------------------- money card */

.cmp-money {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: 0 1px 2px rgba(16,40,32,.05), 0 20px 46px -26px rgba(47,90,75,.5);
}

.cmp-raised {
  font-family: Spectral, Georgia, serif;
  font-size: clamp(33px, 4.4vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--mint-800);
  font-variant-numeric: tabular-nums;
}
.cmp-goal { font-size: 15px; color: var(--muted); margin-top: 9px; }
.cmp-goal b { color: var(--ink); font-variant-numeric: tabular-nums; }

.cmp-bar {
  height: 11px; border-radius: 999px; overflow: hidden;
  background: #e2ebe6;
  margin-top: 18px;
  box-shadow: inset 0 1px 2px rgba(16,40,32,.09);
}
.cmp-bar > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #2f5a4b, #527f6e 62%, #6f9a88);
  transition: width 1s cubic-bezier(.22,1,.36,1);
}

.cmp-facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 13px;
  overflow: hidden; margin-top: 20px;
}
.cmp-facts > div { background: var(--surface-2); padding: 14px 12px; text-align: center; }
.cmp-facts b {
  display: block; font-size: 19px; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.cmp-facts span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; letter-spacing: .02em; }

.cmp-actions { display: grid; gap: 10px; margin-top: 20px; }

.cmp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 15.5px; font-weight: 600;
  padding: 14px 22px; border-radius: 13px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-family: inherit;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.cmp-btn:active { transform: translateY(1px); }
.cmp-give {
  background: var(--grad-mint); color: #fff;
  box-shadow: 0 2px 4px rgba(38,74,62,.28), 0 14px 28px -14px rgba(38,74,62,.8);
}
.cmp-share { background: #25d366; color: #06321d; border-color: #25d366; }
.cmp-share:hover { background: #1fbb59; }
.cmp-copy { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.cmp-copy:hover { border-color: var(--mint-300); color: var(--mint); }

.cmp-closed {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--muted);
  border-radius: 11px; padding: 14px 16px;
  font-size: 14.5px; color: var(--ink-2); margin-top: 18px;
}

/* ------------------------------------------------------------------- tabs */

.cmp-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-top: 38px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cmp-tabs::-webkit-scrollbar { display: none; }
.cmp-tabs button {
  font: inherit; font-size: 15px; font-weight: 600;
  background: none; border: 0; cursor: pointer;
  color: var(--muted);
  padding: 13px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease;
}
.cmp-tabs button:hover { color: var(--ink); }
.cmp-tabs button[aria-selected="true"] { color: var(--mint); border-bottom-color: var(--mint); }
.cmp-tabs .n {
  display: inline-block; margin-inline-start: 7px;
  font-size: 12px; font-weight: 700;
  background: var(--mint-50); color: var(--mint);
  padding: 2px 8px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.cmp-panel { padding-top: 26px; }
.cmp-panel[hidden] { display: none; }

/* --------------------------------------------------------------- feed rows */

.feed { display: grid; }
.feed-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}
.feed-row:last-child { border-bottom: 0; }

.feed-av {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  background: var(--mint-50); color: var(--mint-700);
  border: 1px solid var(--mint-100);
}
.feed-av-anon { background: var(--surface-3); color: var(--muted); border-color: var(--line); }

.feed-name { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.feed-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.feed-amt {
  font-family: var(--num, "IBM Plex Mono", monospace);
  font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 16px;
  color: var(--mint-700);
  white-space: nowrap;
}

/* expense rows carry the approver, which is the whole point */
.feed-exp { grid-template-columns: minmax(0, 1fr) auto; }
.feed-appr {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--mint-700);
  background: var(--mint-50); border: 1px solid var(--mint-100);
  padding: 3px 9px; border-radius: 999px; margin-top: 7px;
}

.feed-empty { text-align: center; padding: 46px 20px; color: var(--muted); font-size: 15.5px; }

/* ------------------------------------------------------------ fund splits */

.fundbar { display: grid; gap: 12px; margin-top: 8px; }
.fundbar-row { display: grid; gap: 7px; }
.fundbar-top { display: flex; justify-content: space-between; font-size: 14px; }
.fundbar-top b { font-variant-numeric: tabular-nums; }
.fundbar-track { height: 7px; border-radius: 999px; background: #e2ebe6; overflow: hidden; }
.fundbar-track > i { display: block; height: 100%; border-radius: 999px; background: var(--mint); }
.fundbar-zakat .fundbar-track > i { background: #1f5673; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 980px) {
  .cmp-grid { grid-template-columns: 1fr; }
  .cmp-side { position: static; }
  /* The ask moves above the story on a phone, not below it. */
  .cmp-side { order: -1; }
}
@media (max-width: 520px) {
  .cmp-facts { grid-template-columns: 1fr; }
  .cmp-facts > div { display: flex; justify-content: space-between; align-items: baseline; text-align: start; }
  .cmp-facts span { margin-top: 0; }
  .cmp-money { padding: 20px; border-radius: var(--r-lg); }
  .feed-row { grid-template-columns: 36px minmax(0,1fr) auto; gap: 11px; }
  .feed-av { width: 36px; height: 36px; font-size: 13px; }
}

/* ------------------------------------------------------- give online (WaafiPay) */

.cmp-give { flex-direction: column; gap: 2px; }
.cmp-give-sub { font-size: 12px; font-weight: 500; opacity: .82; letter-spacing: .02em; }
.cmp-alt { font-size: 13.5px; color: var(--mint); text-align: center; text-underline-offset: 3px; }

.gv {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: var(--r-xl);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--sh-lg);
  overflow: auto;
}
.gv::backdrop { background: rgba(20, 43, 35, .55); backdrop-filter: blur(3px); }
.gv-body { padding: 30px 28px 26px; }
.gv-x {
  position: sticky; top: 10px; float: right; margin: 10px 10px 0 0;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 22px; line-height: 1; color: var(--ink-2); cursor: pointer;
}
.gv-x:hover { background: var(--surface-3); }

.gv-kick { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-600); margin: 0 0 6px; }
.gv h2 { font-size: 22px; line-height: 1.25; margin: 0 0 20px; padding-right: 30px; }
.gv-form { display: grid; gap: 18px; }
.gv fieldset { border: 0; padding: 0; margin: 0; }
.gv legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 9px; }

.gv-chips { display: grid; grid-template-columns: repeat(4, 1fr) 1.4fr; gap: 8px; }
.gv-chip, .gv-custom {
  height: 48px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--surface);
  font: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
}
.gv-chip { cursor: pointer; }
.gv-chip[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: #fff; }
.gv-custom { padding: 0 12px; font-weight: 500; min-width: 0; }
.gv-custom:focus, .gv-chip:focus-visible, .gv-field input:focus, .gv-tel:focus-within {
  outline: 2px solid var(--mint-400); outline-offset: 1px;
}

.gv-funds { display: grid; gap: 8px; }
.gv-fund {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-md); cursor: pointer;
}
.gv-fund:has(input:checked) { border-color: var(--mint); background: var(--mint-tint); }
.gv-fund input { margin-top: 3px; accent-color: var(--mint); }
.gv-fund span { display: grid; gap: 2px; }
.gv-fund b { font-size: 14.5px; }
.gv-fund small { font-size: 12.5px; color: var(--muted); }

.gv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gv-field { display: grid; gap: 6px; align-content: start; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gv-field input {
  height: 46px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); min-width: 0;
}
.gv-tel { display: flex; border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; }
.gv-tel i { font-style: normal; display: grid; place-items: center; padding: 0 10px; background: var(--surface-3); color: var(--ink-2); font-weight: 500; font-size: 14px; }
.gv-tel input { border: 0; border-radius: 0; flex: 1; outline: none; }
.gv-hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.gv-check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.gv-check input { width: 18px; height: 18px; accent-color: var(--mint); }

.gv-err { margin: 0; min-height: 0; color: var(--clay); font-size: 14px; font-weight: 500; }
.gv-err:empty { display: none; }
.gv-pay {
  display: flex; justify-content: center; align-items: center; width: 100%;
  height: 54px; border: 0; border-radius: var(--r-md);
  background: var(--grad-mint); color: #fff; font: inherit; font-size: 16.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 2px 4px rgba(38,74,62,.28), 0 14px 28px -14px rgba(38,74,62,.8);
}
.gv-pay:disabled { opacity: .5; cursor: not-allowed; }
.gv-fine { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

.gv-wait, .gv-done { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 14px 0 6px; }
.gv-wait h2, .gv-done h2 { margin: 0; padding: 0; }
.gv-wait p, .gv-done p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 38ch; }
.gv-done .gv-pay { margin-top: 6px; }

.gv-phone {
  width: 64px; height: 104px; border-radius: 14px; border: 3px solid var(--mint);
  position: relative; display: grid; place-items: center;
}
.gv-phone span {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--mint-200); border-top-color: var(--mint);
  animation: gv-spin 1s linear infinite;
}
@keyframes gv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gv-phone span { animation-duration: 3s; } }

.gv-tick {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mint); color: #fff; font-size: 30px; font-weight: 700;
}
.gv-tick-no { background: var(--clay); }
.gv-tick-wait { background: var(--gold); }

@media (max-width: 520px) {
  .gv-body { padding: 24px 18px 20px; }
  .gv-chips { grid-template-columns: repeat(4, 1fr); }
  .gv-custom { grid-column: 1 / -1; }
  .gv-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------- updates feed */
.uf { display: grid; gap: 0; position: relative; }
.uf-item { display: grid; grid-template-columns: 22px 1fr; gap: 14px; position: relative; padding-bottom: 28px; }
.uf-item::before {
  content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 2px; background: var(--line);
}
.uf-item:last-child::before { display: none; }
.uf-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--mint-300); margin-top: 2px; position: relative; z-index: 1; }
.uf-proof .uf-dot { border-color: var(--mint); background: var(--mint); }
.uf-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.uf-badge { background: var(--mint-soft); color: var(--mint-700); font-weight: 600; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; }
.uf-main h3 { font-size: 18px; line-height: 1.35; margin: 6px 0 4px; }
.uf-camp { font-size: 13.5px; color: var(--mint); text-underline-offset: 3px; }
.uf-body p { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin: 6px 0 0; }
.uf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.uf-one { grid-template-columns: minmax(0, 520px); }
.uf-ph { padding: 0; border: 0; background: var(--surface-3); border-radius: 12px; overflow: hidden; cursor: zoom-in; display: block; }
.uf-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .25s ease; }
.uf-ph:hover img { transform: scale(1.03); }
.uf-ph:focus-visible { outline: 2px solid var(--mint-400); outline-offset: 2px; }
.uf-by { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.uf-by b { color: var(--mint-700); font-weight: 600; }
.uf-view { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 92dvh; cursor: zoom-out; }
.uf-view::backdrop { background: rgba(10, 20, 16, .86); }
.uf-view img { max-width: 96vw; max-height: 92dvh; display: block; border-radius: 10px; }

/* ------------------------------------------------------------ poster */
.pst-dlg { width: min(860px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--surface-3); overflow: auto; }
.pst-dlg::backdrop { background: rgba(20, 43, 35, .6); }
.pst-bar-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pst-acts { display: flex; gap: 8px; }
.pst-acts .cmp-btn { padding: 10px 16px; font-size: 14.5px; }
.pst-stage { padding: 20px; display: grid; place-items: center; }
.pst {
  width: 100%; max-width: 794px; aspect-ratio: 210 / 297; background: #fff; color: #16211c;
  padding: 56px 56px 40px; box-shadow: var(--sh-md); display: flex; flex-direction: column; gap: 18px;
  font-size: 16px;
}
.pst-top { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; color: var(--mint-700); }
.pst-logo { height: 46px; width: auto; }
.pst-kick { margin: 18px 0 0; font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-600); }
.pst h1 { font-size: clamp(30px, 6.4vw, 58px); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.pst-sum { font-size: 18px; line-height: 1.55; color: #3c4a43; margin: 0; }
.pst-bar { height: 22px; border-radius: 999px; background: #e3ece7; overflow: hidden; }
.pst-bar i { display: block; height: 100%; background: #2f5a4b; border-radius: 999px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pst-goal { margin-top: 10px; }
.pst-goal p { margin: 10px 0 0; font-size: 20px; }
.pst-goal p b { font-size: 34px; }
.pst-grid { display: grid; grid-template-columns: 1fr 240px; gap: 32px; margin-top: auto; align-items: end; }
.pst-pay h2 { font-size: 20px; margin: 0 0 12px; }
.pst-pay ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pst-pay li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #c6d8cf; padding-bottom: 8px; font-size: 18px; }
.pst-pay li b { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 20px; letter-spacing: .02em; }
.pst-note { font-size: 15px; color: #3c4a43; margin: 14px 0 0; }
.pst-scan { text-align: center; }
.pst-qr svg { width: 100%; height: auto; display: block; }
.pst-scan p { font-weight: 700; margin: 10px 0 2px; font-size: 17px; }
.pst-scan small { font-size: 13px; color: #64756c; line-height: 1.4; display: block; }
.pst-foot { font-size: 13px; color: #64756c; border-top: 1px solid #e2ebe6; padding-top: 14px; margin: 0; }

@media (max-width: 640px) {
  .pst { padding: 28px 24px; aspect-ratio: auto; }
  .pst-grid { grid-template-columns: 1fr; }
  .pst-scan { max-width: 220px; margin-inline: auto; }
}

@page { size: A4; margin: 0; }
@media print {
  body.printing-poster > *:not(.pst-dlg) { display: none !important; }
  body.printing-poster { background: #fff; }
  .pst-dlg { position: static; width: auto; max-width: none; max-height: none; border-radius: 0; background: #fff; overflow: visible; }
  .pst-dlg::backdrop { background: none; }
  .pst-bar-top { display: none; }
  .pst-stage { padding: 0; }
  .pst { box-shadow: none; max-width: none; width: 210mm; height: 297mm; aspect-ratio: auto; padding: 18mm 16mm 12mm; }
  .pst-grid { grid-template-columns: 1fr 62mm; }
}

/* ------------------------------------------------ engagement: money card */
.cmp-bar { position: relative; }
.cmp-tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255,255,255,.75); }
.cmp-tick:not(.is-hit) { background: rgba(47,90,75,.18); }
.cmp-mile { margin: 10px 0 0; font-size: 13.5px; font-weight: 600; color: var(--mint-700); }

.cmp-match {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--gold-soft); border: 1px solid #ecd9ac;
}
.cmp-match.is-done { background: var(--mint-tint); border-color: var(--mint-200); }
.cmp-match-h { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: #6b4a0c; }
.cmp-match.is-done .cmp-match-h { color: var(--mint-700); }
.cmp-match-h span {
  display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 7px;
  background: var(--gold); color: #fff; font-size: 13px; font-weight: 800;
}
.cmp-match.is-done .cmp-match-h span { background: var(--mint); }
.cmp-match-t { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.cmp-match-bar { margin-top: 10px; height: 6px; border-radius: 999px; background: rgba(194,144,47,.18); overflow: hidden; }
.cmp-match-bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.cmp-match.is-done .cmp-match-bar i { background: var(--mint); }

.cmp-recent { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.cmp-recent-h { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cmp-recent-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; }
.cmp-recent-row .feed-av { width: 34px; height: 34px; font-size: 12.5px; }
.cmp-recent-row span:nth-child(2) { display: grid; min-width: 0; }
.cmp-recent-row b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-recent-row small { font-size: 12px; color: var(--muted); }
.cmp-recent-amt { font-variant-numeric: tabular-nums; }

/* ------------------------------------------- personal fundraisers & support */
.fr-banner {
  display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start;
  margin-bottom: 26px; padding: 22px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--mint-tint), #fff 70%); border: 1px solid var(--mint-200);
}
.fr-av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; font-weight: 700; font-size: 22px; }
.fr-k { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-600); }
.fr-b h2 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.25; margin: 4px 0 6px; }
.fr-who { margin: 0; color: var(--ink-2); font-size: 15px; }
.fr-story { margin: 10px 0 0; color: var(--ink-2); line-height: 1.65; font-size: 15px; }
.fr-prog { margin-top: 14px; display: grid; gap: 8px; }
.fr-prog p { margin: 0; font-size: 14px; color: var(--ink-2); }
.fr-prog b { color: var(--ink); font-size: 16px; }
.fr-bar { height: 8px; border-radius: 999px; background: #e3ece7; overflow: hidden; }
.fr-bar i { display: block; height: 100%; background: var(--mint); border-radius: 999px; }

.fr-start { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 18px; }
.fr-start b { font-size: 16px; }
.fr-start p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); max-width: 52ch; line-height: 1.55; }
.fr-start .cmp-btn { flex: none; }
.fr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fr-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; }
.fr-rank { font: 600 13px/1 "IBM Plex Mono", monospace; color: var(--muted); text-align: center; }
.fr-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n a" "t t"; gap: 6px 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: inherit; background: #fff; transition: border-color .15s ease; }
.fr-row:hover { border-color: var(--mint-300); }
.fr-name { grid-area: n; display: grid; min-width: 0; }
.fr-name b { font-size: 15px; }
.fr-name small, .fr-amt small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-amt { grid-area: a; display: grid; text-align: end; }
.fr-amt b { font-variant-numeric: tabular-nums; }
.fr-track { grid-area: t; height: 6px; border-radius: 999px; background: #eef1ed; overflow: hidden; }
.fr-track i { display: block; height: 100%; background: var(--mint-500); border-radius: 999px; }

.sp-form { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 18px; }
.sp-form input:not([type=checkbox]), .sp-form textarea { font: inherit; font-size: 15.5px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff; width: 100%; min-width: 0; }
.sp-form textarea { resize: vertical; line-height: 1.55; }
.sp-row { display: flex; gap: 10px; align-items: center; }
.sp-row input { flex: 1; }
.sp-anon { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.sp-anon input { accent-color: var(--mint); }
.sp-out { flex: 1; margin: 0; font-size: 13px; color: #8f2f22; }
.sp-thanks { margin: 0; color: var(--mint-700); font-weight: 600; }
.sp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sp { margin: 0; padding: 16px 18px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); display: grid; gap: 12px; }
.sp blockquote { margin: 0; font-family: Spectral, Georgia, serif; font-size: 17px; line-height: 1.5; color: var(--ink); }
.sp blockquote::before { content: "“"; color: var(--mint-400); }
.sp blockquote::after { content: "”"; color: var(--mint-400); }
.sp figcaption { display: flex; gap: 10px; align-items: center; }
.sp figcaption .feed-av { width: 30px; height: 30px; font-size: 11.5px; }
.sp figcaption b { font-size: 13.5px; }
.sp figcaption small { margin-inline-start: auto; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .fr-banner { grid-template-columns: 1fr; } .fr-av { width: 52px; height: 52px; font-size: 18px; } }

/* ---- what a gift does ------------------------------------------------- */
.cmp-impact { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.cmp-impact-row { display: grid; grid-template-columns: 64px 1fr 16px; gap: 10px; align-items: center; width: 100%; text-align: start; font: inherit;
  padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.cmp-impact-row b { font-size: 15px; color: var(--mint-700); }
.cmp-impact-row span { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.cmp-impact-row svg { color: var(--muted); }
.cmp-impact-row:hover { border-color: var(--mint-300); background: var(--mint-tint); transform: translateX(2px); }
.cmp-impact-row:focus-visible { outline: 2px solid var(--mint-400); outline-offset: 2px; }

/* ---- follow ------------------------------------------------------------- */
.cmp-follow { margin-top: 16px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 12px; }
.cmp-follow-h { display: flex; gap: 12px; align-items: flex-start; color: var(--mint); }
.cmp-follow-h svg { flex: none; margin-top: 2px; }
.cmp-follow-h span { display: grid; gap: 3px; color: var(--ink); }
.cmp-follow-h b { font-size: 15px; }
.cmp-follow-h small { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.cmp-follow-row { display: flex; gap: 8px; }
.cmp-follow-row input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 11px 13px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.cmp-follow-row input:focus { outline: none; border-color: var(--mint-400); box-shadow: 0 0 0 3px rgba(47,90,75,.13); }
.cmp-follow-btn { font: inherit; font-weight: 600; font-size: 14.5px; padding: 0 16px; border-radius: var(--r-md); border: 0; background: var(--mint); color: #fff; cursor: pointer; min-height: 44px; }
.cmp-follow-btn[disabled] { opacity: .6; }
.cmp-follow-msg { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.cmp-follow-msg:empty { display: none; }
.cmp-follow.is-done .cmp-follow-row { display: none; }

/* ---- motion: bars fill in, once ---------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .cmp-bar > i, .fundbar-track > i, .hm-bar > i { animation: fx-grow 1.2s cubic-bezier(.2,.7,.2,1) both; transform-origin: left center; }
  .cmp-impact-row { animation: fx-rise .5s ease both; }
  .cmp-impact-row:nth-child(3) { animation-delay: .06s; } .cmp-impact-row:nth-child(4) { animation-delay: .12s; } .cmp-impact-row:nth-child(5) { animation-delay: .18s; }
}
@keyframes fx-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- donation dialog: impact line and giving in someone's name ---------- */
.gv-impact { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--mint-tint); border: 1px solid var(--mint-100); font-size: 13.5px; line-height: 1.45; color: var(--mint-800); }
.gv-impact:empty { display: none; }
.gv-ded { display: grid; gap: 10px; padding: 12px; border-radius: var(--r-md); border: 1px dashed var(--mint-300); background: var(--mint-tint); }
.gv-ded[hidden] { display: none; }
.gv-dedk { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gv-dedk label { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: #fff; cursor: pointer; }
.gv-dedk label:has(input:checked) { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.gv-dedk input { accent-color: var(--mint); margin-top: 3px; }
.gv-dedk span { display: grid; gap: 1px; }
.gv-dedk b { font-size: 14px; }
.gv-dedk small { font-size: 12px; color: var(--muted); line-height: 1.35; }
@media (max-width: 480px) { .gv-dedk { grid-template-columns: 1fr; } }
