/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); font: 600 var(--fs-400)/1.2 var(--font-body); text-decoration: none; text-align: center; border: 2px solid transparent; border-radius: var(--r-md); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s; min-height: 2.75rem; padding: .7rem 1.4rem; }
.btn--sm { min-height: 2.25rem; padding: .45rem 1rem; font-size: var(--fs-300); }
.btn--lg { min-height: 3.25rem; padding: .9rem 1.9rem; font-size: var(--fs-500); }
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--gold-500); color: var(--green-900); }
.btn--primary:hover { background: #d9a93a; color: var(--green-900); }
.btn--secondary { background: var(--green-800); color: var(--white); }
.btn--secondary:hover { background: var(--green-900); color: var(--white); }
.btn--outline { background: transparent; color: var(--green-800); border-color: var(--green-800); }
.btn--outline:hover { background: var(--green-800); color: var(--white); }
.btn--outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--green-900); }
.btn--ghost { background: transparent; color: var(--green-800); }
.btn--ghost:hover { background: var(--green-100); color: var(--green-900); }
.btn--danger { background: var(--danger); color: var(--white); }
.btn--danger:hover { background: #8a2822; color: var(--white); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--s-3); }
.card--cream { background: var(--cream-100); box-shadow: none; }
.card__icon { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%; background: var(--green-100); color: var(--green-800); }
.card__title { margin: 0; font-size: var(--fs-600); }
.card__body > :last-child { margin-bottom: 0; }
.card__link { margin-top: auto; font-weight: 600; display: inline-flex; align-items: center; align-self: flex-start; min-height: 2.75rem; }

/* Sections */
.section { padding-block: var(--s-8); }
.section--white { background: var(--white); }
.section--green { background: var(--green-900); color: var(--cream-50); }
.section--green h1, .section--green h2, .section--green h3 { color: var(--white); }
.section--green a:not(.btn) { color: var(--gold-200); }
.section--gold-soft { background: var(--gold-200); }
.section--center { text-align: center; }
.section--center .section__intro, .section--center .section__head { margin-inline: auto; }
.section__head { margin-bottom: var(--s-6); max-width: 46rem; }
.section__title { margin-bottom: var(--s-3); }
.section__intro { font-size: var(--fs-500); color: var(--ink-soft); margin-bottom: 0; }
.section--green .section__intro { color: var(--green-100); }

/* Decorative divider: woven diamonds */
.pattern-divider { height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M14 1l6 6-6 6-6-6z' fill='none' stroke='%23c99a2e' stroke-width='1.5'/%3E%3Cpath d='M0 7h8M20 7h8' stroke='%23c99a2e' stroke-width='1.5'/%3E%3C/svg%3E") repeat-x center; opacity: .9; }

/* Forms */
.form { display: grid; gap: var(--s-5); max-width: 36rem; }
.field { display: grid; gap: var(--s-2); }
.field__label { font-weight: 600; color: var(--green-900); }
.field__req { color: var(--danger); }
.field__hint { margin: 0; font-size: var(--fs-300); color: var(--ink-soft); }
.field__error { margin: 0; font-size: var(--fs-300); color: var(--danger); font-weight: 600; }
.input { width: 100%; min-height: 2.9rem; padding: .65rem .9rem; font: inherit; color: var(--ink); background: var(--white); border: 1.5px solid #8c8772; border-radius: var(--r-md); }
.textarea { min-height: 8rem; resize: vertical; }
.input:hover { border-color: var(--green-700); }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--green-800); }
.field--error .input { border-color: var(--danger); background: #fffafa; }
.check { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-3); align-items: start; }
.check__input { width: 1.35rem; height: 1.35rem; accent-color: var(--green-800); }
.check { align-items: start; }
.check__label { font-weight: 500; cursor: pointer; padding-block: .65rem; line-height: 1.4; min-height: 2.75rem; }
.check__input { cursor: pointer; margin-top: .85rem; }
.check__hint { grid-column: 2; }

/* Notices */
.notice { display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); border: 1px solid transparent; }
.notice__icon { flex: none; margin-top: 2px; }
.notice__title { margin: 0; font-weight: 700; }
.notice__body { margin: 0; }
.notice--info { background: var(--info-bg); border-color: #b7c7d4; color: #1e3a52; }
.notice--success { background: var(--success-bg); border-color: #a6c9b4; color: var(--green-900); }
.notice--warning { background: var(--warning-bg); border-color: #e0c775; color: #5c4408; }
.notice--error { background: var(--danger-bg); border-color: #e3b1ad; color: #7a2520; }

/* Toasts: bottom-right on desktop, bottom on mobile; never blocks the page */
.toast-host { position: fixed; z-index: 900; right: var(--s-5); bottom: var(--s-5); display: grid; gap: var(--s-3); width: min(22rem, calc(100vw - 2rem)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: var(--s-3); align-items: flex-start; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--gold-500); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: var(--s-4); animation: toast-in .35s ease-out; }
.toast--out { animation: toast-out .25s ease-in forwards; }
.toast__msg { flex: 1; margin: 0; font-size: var(--fs-300); }
.toast__close { flex: none; display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; background: none; border: 0; padding: 0; margin: -.75rem -.75rem -.75rem 0; border-radius: var(--r-sm); color: var(--ink-soft); cursor: pointer; }
.toast__close:hover { color: var(--ink); background: var(--cream-100); }
@keyframes toast-in { from { transform: translateY(1rem); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(.5rem); opacity: 0; } }
@media (max-width: 47.9375rem) { .toast-host { right: 0; left: 0; bottom: 0; margin-inline: auto; padding-bottom: env(safe-area-inset-bottom); bottom: var(--s-3); } }

/* Modal (native dialog) */
.modal { border: 0; padding: 0; border-radius: var(--r-lg); width: min(30rem, calc(100vw - 2rem)); box-shadow: var(--shadow-2); color: var(--ink); }
.modal::backdrop { background: rgb(11 59 44 / .55); }
.modal__panel { padding: var(--s-6); }
.modal__title { font-size: var(--fs-600); }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-5); }

/* Media */
.media-ph { margin: 0; }
.media-ph__box { aspect-ratio: var(--ratio, 4 / 3); display: grid; place-items: center; text-align: center; padding: var(--s-4); color: var(--earth-600); font-weight: 500; background: repeating-linear-gradient(135deg, var(--cream-100) 0 14px, #efe6d0 14px 28px); border: 1.5px dashed var(--earth-600); border-radius: var(--r-lg); }
.media-ph figcaption { margin-top: var(--s-2); font-size: var(--fs-300); color: var(--ink-soft); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--green-800); color: var(--gold-200); font: 600 1rem/1 var(--font-display); width: 3rem; height: 3rem; }
.avatar--lg { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; }
.logo-mark { display: block; flex: none; }

/* Placeholder marker for missing foundation information */
.placeholder-tag { display: inline-block; padding: 0 .4em; border: 1px dashed currentColor; border-radius: 4px; font-size: .9em; opacity: .85; }

/* Impact figures */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-6) var(--s-5); margin: 0 0 var(--s-6); }
@media (min-width: 56.25rem) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats__item { display: flex; flex-direction: column-reverse; border-top: 3px solid var(--gold-500); padding-top: var(--s-3); }
.stats__value { margin: 0; font: 600 clamp(2.5rem, 1.6rem + 3.5vw, 4rem)/1 var(--font-display); color: var(--white); font-variant-numeric: tabular-nums; }
.stats__label { margin-top: var(--s-2); color: var(--green-100); }
.stats__link { margin: 0; }

.stats:last-child { margin-bottom: 0; }

/* ---- Public donation activity popup (Phase 8) ---- */
.activity-host { position: fixed; z-index: 850; right: var(--s-5); bottom: var(--s-5); width: min(24rem, calc(100vw - 2rem)); display: grid; pointer-events: none; }
.activity-pop { pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: start; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--gold-500); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: var(--s-4); opacity: 0; transform: translateX(110%); transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease; }
.activity-pop.is-in { opacity: 1; transform: none; }
.activity-pop.is-out { opacity: 0; transform: translateY(.75rem); transition-duration: .3s; }
.activity-pop__icon { color: var(--danger); margin-top: .1rem; }
.activity-pop__text { margin: 0; font-size: var(--fs-300); line-height: 1.45; }
.activity-pop__time { margin: var(--s-1) 0 0; font-size: .8125rem; color: var(--ink-soft); }
.activity-pop__close { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; margin: -.75rem -.75rem -.75rem 0; background: none; border: 0; border-radius: var(--r-sm); color: var(--ink-soft); cursor: pointer; }
.activity-pop__close:hover { color: var(--ink); background: var(--cream-100); }
@media (max-width: 47.9375rem) {
  .activity-host { right: 0; left: 0; bottom: max(var(--s-3), env(safe-area-inset-bottom)); margin-inline: auto; }
  .activity-pop { transform: translateY(120%); }
}
@media (prefers-reduced-motion: reduce) { .activity-pop, .activity-pop.is-in, .activity-pop.is-out { transform: none; transition: opacity .01s; } }

/* Home page list */
.activity__when { margin-left: auto; font-size: var(--fs-300); color: var(--ink-soft); white-space: nowrap; }

/* ---- Fundraising progress (Phase 10) ---- */
.fund { display: grid; gap: var(--s-4); max-width: 44rem; }
.fund__figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-4); margin: 0; }
.fund__fig { display: grid; gap: var(--s-1); }
.fund__fig dt { font-size: var(--fs-300); color: var(--ink-soft); font-weight: 600; }
.fund__fig dd { margin: 0; font: 700 var(--fs-700)/1.1 var(--font-display); color: var(--green-900); overflow-wrap: anywhere; }
.fund__raised { color: var(--green-800); }
.fund__bar { appearance: none; -webkit-appearance: none; width: 100%; height: 1rem; border: 0; border-radius: 999px; overflow: hidden; background: #e3d8bd; }
.fund__bar::-webkit-progress-bar { background: #e3d8bd; border-radius: 999px; }
.fund__bar::-webkit-progress-value { background: var(--gold-500); border-radius: 999px; }
.fund__bar::-moz-progress-bar { background: var(--gold-500); border-radius: 999px; }
.fund__note { margin: 0; display: flex; gap: var(--s-2); align-items: center; color: var(--ink-soft); }
.fund__note--done { color: var(--green-800); font-weight: 600; }
.fund__fine { margin: 0; font-size: var(--fs-300); color: var(--ink-soft); }
.avatar--photo { object-fit: cover; background: var(--cream-100); border: 2px solid var(--gold-200); }
.media-photo__img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.logo-mark--custom { object-fit: contain; width: auto; max-width: 8rem; }
