/*
 * E-Sadaqah public portal.
 *
 * Loaded after site.css on donor-facing pages only. site.css carries the
 * palette, the type scale and every form, button, card and calculator control;
 * this file carries the things a public portal needs and a back office does
 * not — a masthead with a menu, a long scrolling page of sections, a campaign
 * directory with filters, and a footer with somewhere to go.
 *
 * The back office keeps the fixed-viewport sidebar shell in site.css. The two
 * do not share a layout on purpose: one is an instrument, the other is a front
 * door, and a visitor should never be in doubt which one they are looking at.
 *
 * Every colour here is a token from site.css. Nothing in this file introduces a
 * new hex value, so apps/core/tests/test_contrast.py still sees the whole
 * palette and nothing can drift below AA behind its back.
 */

/* ============================================================ page ground */

body.site {
  background: var(--canvas);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap-narrow { max-width: 52rem; }

/* Vertical rhythm. Sections are the unit of the page, not cards. */
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-ivory { background: var(--tint); }
.section-white { background: var(--white); }
.section-deep {
  background-color: var(--green-deep);
  background-image: url("../img/khatim-light.d0eb7d5ed4f4.svg");
  background-size: 180px 180px;
  color: var(--white);
}
.section-deep h2, .section-deep h3 { color: var(--white); }
.section-deep p { color: rgba(255, 255, 255, .88); }

.section-head { max-width: 46rem; margin: 0 0 2.5rem; }
.section-head.centred { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.2rem);
  letter-spacing: -.03em; line-height: 1.18; margin: 0 0 .65rem;
}
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section-deep .section-head p { color: rgba(255, 255, 255, .82); }

.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin: 0 0 2.5rem;
}
.section-head-row .section-head { margin: 0; }

/* ============================================================== masthead */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.5rem;
}
.masthead { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.masthead-mark { width: 2.25rem; height: 2.25rem; color: var(--green); flex: none; }
.masthead-text {
  display: flex; flex-direction: column; line-height: 1.1;
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
  letter-spacing: -.03em; color: var(--green-deep);
}
.masthead-text small {
  font-family: var(--font-body); font-weight: 500; font-size: .7rem;
  letter-spacing: .02em; color: var(--muted);
}
.masthead:hover .masthead-text { color: var(--green); }

/* ---- desktop navigation ------------------------------------------------ */

.primary-nav { display: flex; align-items: center; gap: .15rem; margin-left: .75rem; }
.primary-nav > li { list-style: none; position: relative; }
.primary-nav a, .primary-nav .nav-toggle {
  display: inline-flex; align-items: center; gap: .3rem;
  min-height: var(--tap); padding: 0 .8rem; border: 0; background: none;
  border-radius: var(--radius-sm); cursor: pointer;
  font: inherit; font-size: .94rem; font-weight: 600; color: var(--ink);
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--ease), color var(--ease);
}
.primary-nav a:hover, .primary-nav .nav-toggle:hover { background: var(--soft); color: var(--green); }
.primary-nav a[aria-current="page"] { color: var(--green); }
.primary-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .55rem;
  height: 2px; border-radius: 2px; background: var(--green);
}
.nav-toggle .chev { width: .85rem; height: .85rem; transition: transform var(--ease); }
.nav-toggle[aria-expanded="true"] { background: var(--soft); color: var(--green); }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ---- the giving menu --------------------------------------------------- */

.mega {
  position: absolute; top: calc(100% + .5rem); left: 0; z-index: 60;
  width: max-content; max-width: 44rem;
  padding: 1rem; margin: 0;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 18px 48px rgba(20, 33, 28, .14);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem;
}
.mega[hidden] { display: none; }
.mega li { list-style: none; }
.mega a {
  display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem;
  align-items: start; padding: .7rem .75rem; border-radius: var(--radius-sm);
  width: 100%; white-space: normal;
}
.mega a .icon { grid-row: span 2; width: 1.35rem; height: 1.35rem; color: var(--green); margin-top: .1rem; }
.mega a strong { font-size: .95rem; font-weight: 700; color: var(--ink); }
.mega a span { font-size: .84rem; font-weight: 400; color: var(--muted); line-height: 1.45; }
.mega a:hover { background: var(--soft); }
.mega a:hover strong { color: var(--green); }

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

.header-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }

.lang-switch { position: relative; }
.lang-switch .nav-toggle { padding: 0 .65rem; }
.lang-menu {
  position: absolute; top: calc(100% + .5rem); right: 0; z-index: 60;
  min-width: 11rem; padding: .35rem; margin: 0;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: 0 18px 48px rgba(20, 33, 28, .14);
}
.lang-menu[hidden] { display: none; }
.lang-menu li { list-style: none; }
.lang-menu button {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  min-height: var(--tap); padding: 0 .7rem; border: 0; background: none;
  border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink);
}
.lang-menu button:hover { background: var(--soft); color: var(--green); }
.lang-menu button[aria-current="true"]::after { content: "✓"; margin-left: auto; color: var(--green); }

.header-give {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: var(--tap); padding: 0 1.3rem; border-radius: 999px;
  background: var(--green); color: var(--white);
  font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap;
  transition: background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.header-give:hover {
  background: var(--green-dark); color: var(--white);
  transform: translateY(-1px); box-shadow: 0 8px 20px rgba(8, 127, 91, .28);
}

.drawer-btn { display: none; color: var(--ink); }

/* ---- mobile drawer ----------------------------------------------------- */

.drawer {
  position: fixed; inset: 0 0 0 auto; z-index: 70;
  width: min(22rem, 86vw); padding: 1.25rem;
  background: var(--white); border-left: 1px solid var(--line);
  box-shadow: -18px 0 48px rgba(20, 33, 28, .18);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--ease), visibility var(--ease);
  display: flex; flex-direction: column; gap: .2rem;
}
.drawer:target, .drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.drawer-group {
  margin: 1.1rem 0 .3rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.drawer a, .drawer button.drawer-link {
  display: flex; align-items: center; gap: .65rem;
  min-height: var(--tap); padding: 0 .7rem; border-radius: var(--radius-sm);
  border: 0; background: none; width: 100%; text-align: left;
  font: inherit; font-size: .98rem; font-weight: 600; color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.drawer a:hover, .drawer button.drawer-link:hover { background: var(--soft); color: var(--green); }
.drawer a[aria-current="page"] { background: var(--green-light); color: var(--green-dark); }
.drawer .icon { width: 1.2rem; height: 1.2rem; color: var(--green); flex: none; }
.drawer .header-give { justify-content: center; margin: .9rem 0 .2rem; }

.drawer-scrim {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(6, 55, 42, .45);
  opacity: 0; visibility: hidden; transition: opacity var(--ease), visibility var(--ease);
}
.drawer:target ~ .drawer-scrim, .drawer.is-open ~ .drawer-scrim { opacity: 1; visibility: visible; }

/* ================================================================== hero */

.hero {
  position: relative; overflow: hidden;
  background-color: var(--green-deep);
  background-image:
    radial-gradient(120% 90% at 85% 10%, rgba(47, 162, 117, .32), transparent 60%),
    linear-gradient(160deg, var(--green-dark) 0%, var(--green-deep) 68%);
  color: var(--white);
}
/* The geometric field. Understated on purpose: it is a ground, not a motif. */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/khatim-light.d0eb7d5ed4f4.svg") 0 0 / 190px 190px repeat;
  opacity: .5; pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 3.5rem; align-items: center;
  padding: 5rem 0 5.5rem;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem; margin: 0 0 1.4rem; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--white);
}
.hero-eyebrow .icon { width: 1rem; height: 1rem; color: var(--gold); }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem);
  line-height: 1.08; letter-spacing: -.04em; margin: 0 0 1.1rem; max-width: 15ch;
}
.hero-lede {
  font-size: clamp(1.02rem, .96rem + .35vw, 1.18rem);
  line-height: 1.6; color: rgba(255, 255, 255, .88);
  max-width: 48ch; margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-actions .btn { min-height: 3.1rem; padding: 0 1.75rem; font-size: 1rem; }

/* The hero's companion panel. Where a photograph exists it fills the frame;
   until the content team supplies one, the frame carries the figures that are
   true rather than a stock image standing in for evidence. */
.hero-aside {
  position: relative;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.75rem;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-aside h2 {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 1.25rem;
}
.hero-figure { display: grid; gap: 1.1rem; }
.hero-figure > div { display: grid; gap: .15rem; }
.hero-figure dt, .hero-figure .k {
  font-size: .85rem; font-weight: 500; color: rgba(255, 255, 255, .78); margin: 0;
}
.hero-figure dd, .hero-figure .v {
  margin: 0; font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--white);
}
.hero-media {
  display: block; width: 100%; aspect-ratio: 4 / 3;
  object-fit: cover; border-radius: calc(var(--radius) + 6px);
  background: rgba(255, 255, 255, .07);
}

/* ======================================================== trust strip */

.trust-strip { border-bottom: 1px solid var(--line); background: var(--white); }
.trust-list {
  list-style: none; margin: 0; padding: 1.6rem 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 2rem;
}
.trust-list li { display: flex; align-items: flex-start; gap: .75rem; }
.trust-list .icon { width: 1.4rem; height: 1.4rem; color: var(--green); flex: none; margin-top: .1rem; }
.trust-list strong { display: block; font-size: .93rem; font-weight: 700; color: var(--ink); }
.trust-list span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.45; }

/* ===================================================== giving categories */

.category-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem;
}
.category-card {
  position: relative; display: flex; flex-direction: column; gap: .5rem;
  padding: 1.5rem; height: 100%;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.category-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-hover);
  border-color: var(--green-light); color: inherit;
}
.category-card .cat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; margin-bottom: .35rem;
  border-radius: var(--radius-md); background: var(--green-light); color: var(--green);
}
.category-card .cat-icon .icon { width: 1.45rem; height: 1.45rem; }
.category-card .cat-name { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.category-card h3 { margin: 0; font-size: 1.1rem; font-weight: 750; color: var(--ink); }
.category-card .ar { font-size: 1.25rem; }
.category-card p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.55; }
.category-card .go {
  margin-top: auto; padding-top: .9rem;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .88rem; font-weight: 700; color: var(--green);
}
.category-card .go .icon { width: 1rem; height: 1rem; transition: transform var(--ease); }
.category-card:hover .go .icon { transform: translateX(4px); }

/* ======================================================= feature panels */

.feature-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem; align-items: center;
}
.feature-panel.flip > :first-child { order: 2; }
.feature-body h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); letter-spacing: -.03em; margin: 0 0 .75rem; }
.feature-body p { color: var(--muted); font-size: 1.02rem; line-height: 1.65; }
.section-deep .feature-body p { color: rgba(255, 255, 255, .85); }
.feature-points { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: .6rem; }
.feature-points li { display: flex; align-items: flex-start; gap: .6rem; font-size: .95rem; }
.feature-points .icon { width: 1.15rem; height: 1.15rem; color: var(--green); flex: none; margin-top: .25rem; }
.section-deep .feature-points .icon { color: var(--gold); }

/* A static preview of an interface, not a screenshot: it stays truthful when
   the real screen changes, and it costs no image request. */
.preview-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem; display: grid; gap: .9rem;
}
.preview-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.preview-row .k { font-size: .9rem; color: var(--muted); }
.preview-row .v { font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.preview-rule { height: 1px; background: var(--line); }
.preview-total {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem; border-radius: var(--radius-md); background: var(--green-deep); color: var(--white);
}
.preview-total .k { font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .85); }
.preview-total .v { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.preview-note { font-size: .82rem; color: var(--muted); margin: 0; }

/* ========================================================== why give */

.value-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem;
}
.value-grid li { display: grid; gap: .5rem; align-content: start; }
.value-grid .val-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: var(--radius-md);
  background: var(--green-light); color: var(--green); margin-bottom: .35rem;
}
.section-deep .value-grid .val-icon { background: rgba(255, 255, 255, .12); color: var(--gold); }
.value-grid .val-icon .icon { width: 1.5rem; height: 1.5rem; }
.value-grid h3 { margin: 0; font-size: 1.05rem; }
.value-grid p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }

/* ============================================================== stepper */

.stepper {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
}
.stepper > li { position: relative; display: grid; gap: .45rem; align-content: start; }
/* The connector between steps. Decorative, so it is hidden from assistive tech
   and never carries the only indication of order — the numbers do that. */
.stepper > li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.35rem; left: 3.4rem; right: -1.6rem;
  height: 2px; background: var(--line); border-radius: 2px;
}
.stepper .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  background: var(--green); color: var(--white);
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  margin-bottom: .4rem; position: relative; z-index: 1;
}
.stepper h3 { margin: 0; font-size: 1rem; }
.stepper p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.55; }

/* ============================================================= campaigns */

.campaign-rail {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr)); gap: var(--gap);
}

/* ============================================================ directory */

.filter-bar {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2rem;
}
.filter-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filter-field { display: grid; gap: .3rem; flex: 1 1 14rem; min-width: 0; }
.filter-field.grow { flex: 2 1 20rem; }
.filter-field label { margin: 0; font-size: .82rem; font-weight: 700; color: var(--muted); }
.filter-bar .btn { flex: none; }
.search-field { position: relative; display: flex; }
.search-field .icon {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  width: 1.1rem; height: 1.1rem; color: var(--muted); pointer-events: none;
}
.search-field input { padding-left: 2.5rem; width: 100%; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 2.25rem; padding: 0 .85rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white);
  font-size: .87rem; font-weight: 600; color: var(--ink); text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.chip:hover { background: var(--soft); border-color: var(--green-light); color: var(--green); }
.chip[aria-current="true"], .chip.is-on {
  background: var(--green); border-color: var(--green); color: var(--white);
}
.chip[aria-current="true"]:hover, .chip.is-on:hover { background: var(--green-dark); color: var(--white); }
.chip .icon { width: .9rem; height: .9rem; }

.result-count { margin: 0 0 1.25rem; font-size: .92rem; color: var(--muted); }
.result-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  margin: 2.5rem 0 0; padding: 0; list-style: none; flex-wrap: wrap;
}
.pagination li { list-style: none; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0 .75rem;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--white); color: var(--ink);
  font-size: .92rem; font-weight: 600; text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { background: var(--soft); border-color: var(--green-light); color: var(--green); }
.pagination [aria-current="page"] { background: var(--green); border-color: var(--green); color: var(--white); }
.pagination .gap { border: 0; background: none; color: var(--muted); min-width: 1.5rem; padding: 0; }
.pagination .is-off { color: var(--muted); opacity: .55; }

/* ========================================================== empty state */

.empty-state {
  text-align: center; padding: 3.5rem 1.5rem;
  background: var(--white); border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-state .empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; margin-bottom: 1rem;
  border-radius: 50%; background: var(--green-light); color: var(--green);
}
.empty-state .empty-icon .icon { width: 1.75rem; height: 1.75rem; }
.empty-state h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.empty-state p { margin: 0 auto 1.25rem; max-width: 44ch; color: var(--muted); }

/* ================================================================ impact */

.impact-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: var(--gap);
}
.impact-item {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; height: 100%;
}
.impact-item .thumb {
  aspect-ratio: 16 / 10; background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
}
.impact-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.impact-item .thumb .icon { width: 2.5rem; height: 2.5rem; color: var(--green); opacity: .4; }
.impact-item .body { padding: 1.35rem; display: flex; flex-direction: column; flex: 1; gap: .4rem; }
.impact-item h3 { margin: 0; font-size: 1.05rem; }
.impact-item .meta {
  margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .25rem .75rem;
}
.impact-item p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }
.impact-item .spent {
  margin-top: auto; padding-top: .9rem;
  font-size: .9rem; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums;
}

/* ========================================================== institutions */

.split-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.75rem; }

/* ================================================================== FAQ */

.faq { display: grid; gap: .6rem; }
.faq details {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden;
}
.faq details[open] { border-color: var(--green-light); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.35rem; min-height: var(--tap);
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--green); }
.faq summary:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.faq summary .chev {
  width: 1.1rem; height: 1.1rem; flex: none; color: var(--green);
  transition: transform var(--ease);
}
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .answer { padding: 0 1.35rem 1.25rem; }
.faq .answer p { margin: 0 0 .75rem; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ========================================================== closing CTA */

.closing { text-align: center; }
.closing h2 {
  color: var(--white); font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.6rem);
  letter-spacing: -.035em; line-height: 1.15; margin: 0 auto 1rem; max-width: 20ch;
}
.closing p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; max-width: 50ch; margin: 0 auto 2rem; }
.closing .hero-actions { justify-content: center; }

/* =============================================================== footer */

.portal-footer {
  margin-top: auto;
  background: var(--green-deep); color: rgba(255, 255, 255, .78);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem; padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.footer-about .masthead-text { color: var(--white); }
.footer-about .masthead-text small { color: rgba(255, 255, 255, .65); }
.footer-about .masthead-mark { color: var(--gold); }
.footer-about p { margin: 1rem 0 0; font-size: .9rem; line-height: 1.65; max-width: 34ch; }
.footer-col h2 {
  color: var(--white); font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; margin: 0 0 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.footer-col a {
  display: inline-flex; align-items: center; min-height: 2.25rem;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-size: .92rem;
}
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1.75rem; font-size: .85rem;
}
.footer-foot p { margin: 0; }
.footer-ar { font-family: var(--font-naskh); font-size: 1.3rem; color: var(--gold); }

/* =========================================================== responsive */

@media (max-width: 68rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding: 3.5rem 0 4rem; }
  .hero-aside { max-width: 30rem; }
  .trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-panel { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .feature-panel.flip > :first-child { order: 0; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }

  /* The connector implies a horizontal reading order that no longer exists. */
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
  .stepper > li:not(:last-child)::after { display: none; }
}

/* Below this the masthead cannot hold the nav, so it moves into the drawer. */
@media (max-width: 60rem) {
  .primary-nav { display: none; }
  .lang-switch { display: none; }
  .drawer-btn { display: inline-flex; }
  .header-inner { min-height: 4rem; }
  .section { padding: 3.25rem 0; }
  .section-tight { padding: 2.25rem 0; }
}

@media (max-width: 40rem) {
  .wrap { padding: 0 1.15rem; }
  .hero-grid { padding: 2.75rem 0 3.25rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .trust-list { grid-template-columns: minmax(0, 1fr); padding: 1.25rem 0; }
  .stepper { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-foot { flex-direction: column; align-items: flex-start; }
  .masthead-text { font-size: 1.05rem; }
  .masthead-text small { display: none; }
  .header-give { padding: 0 1rem; font-size: .9rem; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-bar .btn { width: 100%; justify-content: center; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
}

/* ========================================================== preferences */

@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-scrim, .category-card, .chip, .header-give,
  .nav-toggle .chev, .faq summary .chev, .category-card .go .icon {
    transition: none !important;
  }
  .category-card:hover, .header-give:hover { transform: none; }
}

@media (prefers-contrast: more) {
  .site-header { background: var(--white); }
  .category-card, .impact-item, .filter-bar, .faq details, .preview-card { border-color: var(--line-strong); }
  .hero::before, .section-deep { background-image: none; }
  .trust-list span, .category-card p, .value-grid p, .stepper p { color: var(--ink); }
}

@media print {
  .site-header, .drawer, .drawer-scrim, .closing, .portal-footer { display: none !important; }
  .hero { background: none !important; color: var(--ink); }
  .hero h1, .section-deep h2, .section-deep h3 { color: var(--ink); }
  .section { padding: 1rem 0; }
}

/* =========================================================== breadcrumb */

.crumbs {
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.crumbs .wrap {
  display: flex; align-items: center; gap: .5rem;
  min-height: 2.75rem; color: var(--muted);
}
.crumbs a { font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .here { color: var(--ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A page that sets no trail has nothing to say here, so the bar goes away
   rather than announcing "Home /" on its own. */
.crumbs:has(.here:empty) { display: none; }

/* ====================================================== campaign detail */

.campaign-cover {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-md); margin: 0 0 1.25rem; background: var(--green-light);
}

/* The giving panel follows the reader down a long story. Only where there is
   room beside the text: pinned over a narrow screen it would cover the very
   thing the donor is reading in order to decide. */
@media (min-width: 64rem) {
  .give-panel { position: sticky; top: 5.5rem; }
}
