/* ==========================================================================
   Hope Foundation — design system
   --------------------------------------------------------------------------
   One stylesheet, no framework. The site previously pulled Bootstrap, the
   Bootstrap RTL bundle, Bootstrap Icons, FontAwesome and jQuery from five
   CDNs on every page load; all of that is gone. Icons are inline SVG,
   behaviour is vanilla JS.

   Sections:
     1. Tokens
     2. Reset and base
     3. Layout primitives
     4. Typography
     5. Buttons
     6. Forms
     7. Cards and media
     8. Progress and statistics
     9. Header and navigation
    10. Footer
    11. Hero and page banners
    12. Components (accordion, alerts, badges, breadcrumb, pagination, steps)
    13. Utilities
    14. Motion and responsive
   ========================================================================== */

/* -- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Ink and surfaces. The neutrals carry a slight violet bias so they sit
     with Sevgi Eli's brand rather than reading as cold grey against it. */
  --ink:            #2e2136;
  --ink-2:          #6b5d78;
  --ink-3:          #978aa3;
  --line:           #e2d6ec;
  --line-soft:      #f1e9f6;
  --bg:             #ece4f1;
  --bg-sunk:        #dacce7;
  --surface:        #ffffff;

  /* Sevgi Eli's own brand: violet for the institution, a soft leaf green for
     action. Both hexes are taken from the organisation's own template.
     Everything else in this stylesheet derives from these two, so re-theming
     is a token change and never a hunt through components. */
  --brand:          #4a2f56;
  --brand-dark:     #37243f;
  --brand-mid:      #8768a9;
  --brand-tint:     #f1e9f6;
  --accent:         #7cb342;
  --accent-dark:    #5e8f2e;
  --accent-tint:    #eef6e4;

  /* The footer is the one dark surface on the site, and it is deliberately
     the brand's own violet: the organisation's own template closes on it,
     rather than a neutral charcoal. */
  /* A third accent: the mauve used for alternating cards and hover states
     throughout the organisation's own template. */
  --green:          #8768a9;
  --green-tint:     #f1eaf7;

  --footer-bg:      #4a2f56;
  --footer-ink:     #ded2ea;

  /* Semantic, deliberately separate from the brand and the accent so that
     "this succeeded" never reads as "this is on brand". */
  --ok:             #2c6248;
  --ok-tint:        #e8f2ed;
  --warn:           #a66a12;
  --warn-tint:      #fcf2e0;
  --danger:         #b3261e;
  --danger-tint:    #fdeceb;

  /* Type. "DG Baysan" is the organisation's own identity face (self-hosted
     below) and covers all three languages; Montserrat dresses numerals only,
     the same split the organisation's own template makes. */
  --f-display: "DG Baysan", "Cairo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body:    "DG Baysan", "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-num:     "Montserrat", "DG Baysan", system-ui, -apple-system, sans-serif;

  --t-xs:   0.75rem;    /* 12 */
  --t-sm:   0.8125rem;  /* 13 */
  --t-base: 0.9375rem;  /* 15 */
  --t-md:   1rem;       /* 16 */
  --t-lg:   1.125rem;   /* 18 */
  --t-xl:   1.375rem;   /* 22 */
  --t-2xl:  1.75rem;    /* 28 */
  --t-3xl:  2.25rem;    /* 36 */
  --t-4xl:  3rem;       /* 48 */

  /* The sizes Appearance can override, defaulted to the scale above. The
     two largest stay fluid: the setting becomes the *ceiling* of a clamp,
     so a headline an editor enlarges still comes down on a phone. */
  --fs-h1:    var(--t-4xl);
  --fs-h2:    var(--t-3xl);
  --fs-h3:    var(--t-xl);
  --fs-h4:    var(--t-lg);
  --fs-h5:    var(--t-md);
  --fs-h6:    var(--t-base);
  --fs-body:  var(--t-base);
  --fs-label: var(--t-sm);

  /* Space */
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 2.5rem;   --s-8: 3rem;
  --s-9: 4rem;     --s-10: 5.5rem;

  /* Shape */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(46, 33, 54, .06), 0 1px 3px rgba(46, 33, 54, .04);
  --shadow-md: 0 4px 12px rgba(46, 33, 54, .07), 0 1px 3px rgba(46, 33, 54, .05);
  --shadow-lg: 0 14px 38px rgba(46, 33, 54, .10), 0 3px 10px rgba(46, 33, 54, .05);

  --ring: 0 0 0 3px rgba(135, 104, 169, .32);

  --wrap: 1180px;
  --wrap-narrow: 760px;
  /* The header bar carries the mark, eight menu items and the donate
     button; it needs more room than the reading column below it. */
  --wrap-wide: 1400px;
}

/* Sevgi Eli's own identity face, self-hosted: only Light/Regular/Semibold
   exist, so a bold request is browser-synthesised rather than missing. */
@font-face {
  font-family: "DG Baysan";
  src: url("../fonts/DG-Baysan-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DG Baysan";
  src: url("../fonts/DG-Baysan-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DG Baysan";
  src: url("../fonts/DG-Baysan-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* -- 2. Reset and base --------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  /* A long unbroken token — an email address, an IBAN, a pasted URL — breaks
     rather than pushing its box past the screen. Only ever acts on a word
     that would otherwise overflow, so ordinary text is untouched. */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-mid); }

:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }

::selection { background: var(--accent-tint); color: var(--accent-dark); }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 200;
  background: var(--brand-dark); color: #fff;
  padding: var(--s-3) var(--s-5); border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
}
.skip-link:focus { inset-inline-start: 0; color: #fff; }

/* -- 3. Layout primitives ------------------------------------------------ */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-5); }
.wrap-narrow { width: 100%; max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: var(--s-5); }
/* The reference's column: max-w-7xl with px-4 sm:px-6 lg:px-8. Used with `.wrap` by the pages
   matched against it, so their content sits where the source's does. */
.wrap-ref { max-width: 1280px; padding-inline: 16px; }
@media (min-width: 640px) { .wrap-ref { padding-inline: 24px; } }
@media (min-width: 1024px) { .wrap-ref { padding-inline: 32px; } }

.section { padding-block: var(--s-9); }
.section-sm { padding-block: var(--s-7); }
.section-tight { padding-block: var(--s-6); }
.section--surface { background: var(--surface); }
.section--sunk { background: var(--bg-sunk); }
.section--brand { background: var(--brand-dark); color: #fff; }

.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }

/* A page with a main column and a side column — the donation form and its
   summary, an appeal and its donate box, the contact form and its details.

   Each of these used to write its columns in a `style` attribute, and a style
   attribute beats every media query: the donation form stayed split into two
   narrow columns on a phone, with the side column around 85px wide. The page
   still chooses its own proportion, through `--layout-main`; the stylesheet
   now decides when there is room for two columns at all. */
.layout-aside {
  display: grid; align-items: start; gap: var(--s-8);
  grid-template-columns: minmax(0, var(--layout-main, 1.6fr)) minmax(0, 1fr);
}
@media (max-width: 900px) {
  .layout-aside { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.stack   { display: flex; flex-direction: column; gap: var(--s-4); }
.between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-8);
  align-items: center;
}

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* -- 4. Typography ------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.6vw, var(--fs-h1)); }
h2 { font-size: clamp(1.55rem, 3.2vw, var(--fs-h2)); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--f-body);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: var(--s-3);
}
.section--brand .eyebrow { color: #d9c39f; }

.lede { font-size: var(--t-lg); color: var(--ink-2); line-height: 1.6; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
.tabular { font-variant-numeric: tabular-nums; }

.section-head { max-width: 640px; margin-bottom: var(--s-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-2); font-size: var(--t-md); margin: 0; }

.home-campaigns-accent {
  display: block; width: 64px; height: 4px; margin: var(--s-3) auto var(--s-5);
  border-radius: var(--r-full); background: var(--accent);
}
.home-campaigns .section-head h2 { color: var(--brand); }
.home-campaigns .section-head p { color: var(--brand); opacity: .8; font-size: var(--t-lg); }

/* Rich text produced by the admin editors. */
.prose { color: var(--ink-2); font-size: var(--t-md); line-height: 1.75; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: var(--t-2xl); margin: var(--s-7) 0 var(--s-3); color: var(--ink); }
.prose h3 { font-size: var(--t-xl); margin: var(--s-6) 0 var(--s-3); color: var(--ink); }
.prose h4 { font-size: var(--t-lg); margin: var(--s-5) 0 var(--s-2); color: var(--ink); }
.prose p { margin: 0 0 var(--s-4); }
.prose ul, .prose ol { margin: 0 0 var(--s-4); padding-inline-start: 1.35rem; }
.prose li { margin-bottom: var(--s-2); }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--r-md); margin: var(--s-5) 0; }
.prose blockquote {
  margin: var(--s-5) 0; padding: var(--s-4) var(--s-5);
  border-inline-start: 3px solid var(--accent);
  background: var(--accent-tint); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--ink);
}
.prose table { width: 100%; border-collapse: collapse; margin: var(--s-5) 0; font-size: var(--t-base); }
.prose th, .prose td { padding: var(--s-3); border-bottom: 1px solid var(--line); text-align: start; }
.prose th { background: var(--bg-sunk); font-weight: 700; color: var(--ink); }

/* -- 5. Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--f-body); font-size: var(--t-base); font-weight: 700;
  line-height: 1; text-align: center; white-space: nowrap;
  max-width: 100%;
  padding: 0.875rem 1.4rem;
  border: 1px solid transparent; border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: var(--shadow-md); }

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

.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }

.btn-ghost { background: transparent; color: var(--brand); padding-inline: var(--s-3); }
.btn-ghost:hover { background: var(--brand-tint); }

.btn-on-dark { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-on-dark:hover { background: rgba(255,255,255,.22); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #93201a; color: #fff; }

.btn-sm { padding: 0.5rem 0.85rem; font-size: var(--t-sm); border-radius: var(--r-sm); }
.btn-lg { padding: 1.05rem 1.9rem; font-size: var(--t-md); }
.btn-block { width: 100%; }

.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

/* -- 6. Forms ------------------------------------------------------------ */

.field { display: block; margin-bottom: var(--s-4); }
.field > label, .label {
  display: block; font-size: var(--fs-label); font-weight: 700;
  color: var(--ink); margin-bottom: var(--s-2);
}
.label .req { color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  font-family: var(--f-body); font-size: var(--t-base); color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.8rem 0.95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-mid); box-shadow: var(--ring);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%237c8b99' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px;
  padding-inline-end: 2.4rem;
}

.hint { font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s-2); }
.error-text { font-size: var(--t-xs); color: var(--danger); margin-top: var(--s-2); font-weight: 600; }

.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-base); cursor: pointer; }
.check input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--brand); flex: none; }
.check span { color: var(--ink-2); }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }

/* Honeypot — present for bots, invisible and unreachable for people.

   It used to be parked at `inset-inline-start: -9999px`, which is off the
   left in English and off the RIGHT in Arabic — and content past the right
   edge widens the document, so every page carrying this field had a few
   pixels of sideways scroll in the site's main language. Clipping in place
   has no direction to get wrong, and is the same pattern `.loc-radio` and
   `.show-toggle` already use. */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* -- 7. Cards and media -------------------------------------------------- */

.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease;
}
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.card-media { position: relative; aspect-ratio: 3 / 2; background: var(--bg-sunk); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.card-body > .card-actions { margin-top: auto; padding-top: var(--s-2); }
.card-title { font-family: var(--f-display); font-size: var(--t-lg); font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: -0.015em; }
.card-title a { color: var(--brand); }
.card-title a:hover { color: var(--brand-mid); }
.card-text { color: var(--brand); opacity: .75; font-size: var(--t-base); margin: 0; }
/* The Details button under the summary: its own width, at the reading edge,
   rather than stretched across the column the card body is. */
.card-body > .card-details { align-self: flex-start; }

/* Every "details" button on the website — projects, humanitarian cases,
   initiatives — in the site's third accent, the development-stages green
   (#617f67). One class, so a new card gets the same look by using it. */
.btn-details { background: var(--green); border-color: var(--green); color: #fff; }
.btn-details:hover,
.btn-details:focus-visible { background: #4f6a55; border-color: #4f6a55; color: #fff; }
.card-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }

.card-tag {
  position: absolute; top: var(--s-3); right: var(--s-3);
  background: var(--accent); color: var(--brand);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em;
  padding: 0.3rem 0.65rem; border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
}

/* A campaign card's picture is a wrapper rather than the link itself, so the
   chips can lie over it without being inside the link. The link still fills
   the whole picture, so the picture is still the click target it was. */
.card-media-link { display: block; width: 100%; height: 100%; }

/* Who it reaches, who a gift covers and where, along the foot of the picture.
   The wash underneath carries white chips over a pale photograph as well as a
   dark one, and the row lets clicks through to the picture's own link. */
.card-facts--media {
  position: absolute; inset-inline: 0; inset-block-end: 0;
  gap: 5px;
  padding: var(--s-6) var(--s-3) var(--s-3);
  background: linear-gradient(to top, rgba(24, 12, 16, .74), rgba(24, 12, 16, 0));
  pointer-events: none;
}
/* Tighter than the same chip in a card body: three of them share the foot
   of a narrow picture, and a third row would bury the photograph. */
.card-facts--media .fact {
  padding: 0.18rem 0.5rem; line-height: 1.45;
  background: rgba(255, 255, 255, .93); color: var(--ink);
  backdrop-filter: blur(4px);
}
.card-facts--media .fact svg { color: var(--brand); }

/* -- 8. Progress and statistics ------------------------------------------ */

.progress {
  height: 8px; background: var(--bg-sunk);
  border-radius: var(--r-full); overflow: hidden;
}
.progress > span {
  display: block; height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width .8s cubic-bezier(.22,.8,.3,1);
}
.progress--done > span { background: linear-gradient(90deg, var(--ok), #3f8567); }

.raise {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s-3); font-size: var(--t-sm);
}
.raise b { font-family: var(--f-display); font-size: var(--t-md); color: var(--ink); font-variant-numeric: tabular-nums; }
.raise .goal { color: var(--ink-3); font-variant-numeric: tabular-nums; }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.stat {
  text-align: center;
  padding: var(--s-5) var(--s-3);
  border-inline-end: 1px solid var(--line);
}
.stat:last-child { border-inline-end: 0; }
.stat-value {
  display: block;
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  letter-spacing: -0.03em; color: var(--brand);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.stat-label { display: block; margin-top: var(--s-2); font-size: var(--t-sm); color: var(--ink-2); font-weight: 600; }
.stat-icon { color: var(--accent); margin-bottom: var(--s-2); display: inline-flex; }
.stat-icon svg { width: 22px; height: 22px; }

.section--brand .stat { border-color: rgba(255,255,255,.14); }
.section--brand .stat-value { color: #fff; }
.section--brand .stat-label { color: rgba(255,255,255,.72); }
.section--brand .stat-icon { color: #d9c39f; }

/* -- 9. Header and navigation -------------------------------------------- */

.topbar {
  background: var(--brand-dark); color: rgba(255,255,255,.82);
  font-size: var(--t-xs); font-weight: 600;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; justify-content: space-between; padding-block: var(--s-2); }
/* WCAG 2.2 (2.5.8, AA) asks for a target of at least 24×24 CSS pixels. These
   links were 22px tall — the text and its line box, nothing else — which is a
   real miss on a phone, where this bar carries the telephone number and the
   WhatsApp link somebody is most likely reaching for in a hurry. Added as a
   minimum height rather than a fixed one, so the bar still grows when a
   translation wraps. */
.topbar a {
  color: rgba(255,255,255,.82);
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px;
}
.topbar a:hover { color: #fff; }
.topbar svg { width: 13px; height: 13px; }
.topbar-links { display: flex; flex-wrap: wrap; gap: var(--s-4); }

/* The currency dropdown beside the bank accounts. A native select, so the
   list is the platform's own on a phone; only the closed control is styled.
   `dir="ltr"` on it keeps "USD $" and the chevron in place on Arabic pages. */
.cur-switch { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.cur-switch select {
  -webkit-appearance: none; appearance: none;
  font: inherit; font-weight: 700; color: inherit; line-height: 1.5;
  padding-block: 0; padding-inline: 8px 20px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 7px center / 9px 6px;
  cursor: pointer;
}
.cur-switch select:hover { border-color: rgba(255, 255, 255, .7); }
.cur-switch select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cur-switch option { color: #1c1c1c; background: #fff; }
.cur-switch button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .2); color: inherit; cursor: pointer;
}

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--brand) 95%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-header.is-stuck { box-shadow: var(--shadow-md); }
.topbar .wrap { max-width: none; padding-inline: var(--s-5); }

/* Capped at the reference's own `max-w-7xl` and centred, matching
   `localhost/sevgieli/case.html`'s header exactly — `mx-auto max-w-7xl`,
   `px-4 sm:px-6 lg:px-8`, `h-20`. This used to be full width because eight
   menu items, the mark and the donate button did not fit in 1180px in any of
   the three languages; with مبادرات وبرامج, the four project families and
   كفالات والصدقات all removed, the primary menu is down to five items —
   exactly what the reference's own header carries — so the width that
   forced the change no longer applies. `min-height` rather than a hard
   `height: 5rem`: the brand's own circular plate badge (`.brand-plate`,
   `.brand img`) already runs taller than 80px above `768px` and escapes this
   box by being absolutely positioned, so nothing here needs to make room for
   it, but a hard height would still refuse it that room if a future change
   ever needed it. */
.site-header .wrap {
  max-width: 80rem; margin-inline: auto; min-height: 5rem;
  padding-inline: var(--s-4);
}
@media (min-width: 640px)  { .site-header .wrap { padding-inline: var(--s-5); } }
@media (min-width: 1024px) { .site-header .wrap { padding-inline: var(--s-6); } }

/* A grid, not a flex row: the mark, the menu and the actions each own a
   column and keep it. Flex left their positions to whatever the menu
   happened to contain, and needed an auto margin — mirrored by hand for
   Arabic — to hold them apart.

   The two outer columns are equal `1fr` tracks rather than `auto`, and the
   middle one is `auto` — sized to exactly what the menu needs — so the menu
   sits on the true centre of the header regardless of the mark and the
   actions being different widths: whatever space is left over splits evenly
   between two *equal* fractions, which is what centres the fixed-width
   column between them. Two unequal `auto` bookends (the previous rule) would
   only have centred the menu inside whatever gap happened to be left, not on
   the header itself. `.header-actions` needs `justify-self: end` for the
   same reason `.brand` does not: its own width is `auto`, so a bare grid
   item would stretch to fill its now-flexible column and start its buttons
   from the near edge instead of hugging the far one; `.brand` has a fixed
   width already, which the stretch algorithm leaves at the start of its
   column untouched. */
.site-header .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 2fr);
  align-items: center;
  gap: var(--s-4);
}
.brand          { grid-area: 1 / 1; }
.nav            { grid-area: 1 / 2; }
.header-actions { grid-area: 1 / 3; justify-self: end; }

/* The mark hangs off the header on a soft badge, the organisation's own
   template's own treatment — a rounded-bottom plate in a bud-green-to-white
   glow, the logo centred on top of it. `.brand` is given a fixed slot rather
   than left to flex, so the plate (absolutely positioned within it) has
   something to measure itself against without disturbing the grid around it. */
.brand {
  position: relative; flex: none;
  width: 96px; height: 80px;
}
@media (min-width: 768px) { .brand { width: 116px; } }

.brand-plate {
  /* Centring, not a reading-direction concern: `left` + `translateX(-50%)` is
     the same physical shift either way. `inset-inline-start` is not — in
     RTL it measures from the *other* edge, so paired with a `transform` that
     always shifts left it put the plate a whole plate-width too far over.

     `top: 0` is flush against the header's own top edge because `.wrap` no
     longer carries a `padding-block` of its own — `.brand`'s fixed 80px
     height is exactly `.wrap`'s `min-height`, so there is no gap above it to
     pull the plate back across. (There used to be one, and a `calc(-1 *
     var(--s-3))` compensated for it; removing that padding without removing
     this made the plate ride 0.75rem too high.) */
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 5.5rem; height: 5.5rem;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 30%, white), #fff 70%);
  border-radius: 0 0 1.1rem 1.1rem;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 25%, transparent);
  transition: transform .35s ease, opacity .35s ease;
  z-index: 0; pointer-events: none;
}
@media (min-width: 768px) { .brand-plate {         width: 8.5rem;
        height: 8.5rem;} }

/* The mark keeps its own colours here — it is sitting on the plate's own pale
   glow, not on the header itself, so the violet and green read fine. It is
   flattened to white only once the plate has faded away below (`.is-stuck`),
   where the mark sits directly on the dark header instead. */
.brand img {
  /* Same story as `.brand-plate`'s `top`: this used to subtract `.wrap`'s own
     `padding-block` to land at the right spot on the plate; that padding is
     gone, so the offset is just the plain distance from `.brand`'s (and now
     `.wrap`'s) own top edge. */
  position: absolute; top: .6rem; left: 50%; transform: translateX(-50%);
  z-index: 1;
  height: 56px; width: auto;
  transition: top .35s ease, height .35s ease, transform .35s ease, filter .35s ease;
}
@media (min-width: 768px) { .brand img { height: 6rem; top: .9rem; } }

/* Once the header has scrolled up against the page (`.is-stuck`, already set
   by `initHeader()`), the badge would hang over the content below it, so it
   folds away and the mark settles into an ordinary small inline logo — white
   now, because it has nothing but the header's own colour behind it. */
.site-header.is-stuck .brand-plate { opacity: 0; transform: translateX(-50%) scale(.5); }
.site-header.is-stuck .brand img {
  height: 60px; top: 50%; transform: translate(-50%, -50%);
  filter: brightness(0) invert(1);
}

.brand-text { font-family: var(--f-display); font-weight: 700; font-size: var(--t-lg); color: #fff; letter-spacing: -0.02em; }

/* The menu must never be a scroll container: every drop-down is positioned
   absolutely against its `.nav-item`, and a scrolling ancestor clips it. When
   the labels do not fit, the bar wraps to a second line and the header grows
   — nothing is hidden and nothing scrolls sideways. */
.nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: 2px var(--s-1);
}
/* Right-to-left the menu starts where the reading starts, beside the mark;
   left-to-right it ends beside the donate button. Its column is the same
   either way — this is only which end of it the items gather at. */
[dir="rtl"] .nav { justify-content: flex-start; }
.nav a { color: rgba(255, 255, 255, .82); }

/* The links and the drop-down parents share one rule so they cannot drift
   apart: a parent is a <button>, a plain item an <a>, and they sit next to
   each other in the same bar. Identical box, identical height. */
.nav a, .nav-item > .nav-parent {
  position: relative;
  display: inline-flex; align-items: center;
 font-size: 14px;
    font-weight: bold; line-height: 1.4;
  padding: 0.5rem 0.7rem; border-radius: var(--r-sm);
  white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.nav a.is-active { color: #fff; }
.nav a.is-active::after {
  content: ""; position: absolute;
  inset-inline: 0.7rem; bottom: 0.25rem; height: 2px;
  background: var(--accent); border-radius: var(--r-full);
}

.header-actions { display: flex; align-items: center; gap: var(--s-3); flex: none; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-inline-start: auto;
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--r-md); cursor: pointer; color: var(--brand);
}
.nav-toggle svg { width: 20px; height: 20px; }

/* The language pill and the zakat/search/cart circles: a pale, translucent
   plate with the brand's own ink on it — the organisation's own template's
   treatment for controls that sit on a dark header — so all four read as one
   family regardless of which one they are, and share the header's mark's own
   light-on-dark logic rather than fading into it. */
.lang-pill {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--r-full); padding: 3px;
}
.lang-pill a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 26px; padding-inline: 6px;
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 700; color: var(--brand);
  transition: background-color .18s ease, color .18s ease;
}
.lang-pill a:hover { color: var(--brand-mid); background: rgba(255, 255, 255, .6); }
.lang-pill a.is-active { color: var(--brand); background: #fff; }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: var(--r-md);
  background: rgba(255, 255, 255, .7); color: var(--brand);
  box-shadow: var(--shadow-sm);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.icon-btn:hover { background: #fff; color: var(--brand-mid); border-color: #fff; transform: translateY(-1px); }
.icon-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* `.cart-btn` used to carry this box itself; it now only adds what is
   actually its own on top of `.icon-btn`'s shared shape. */
.cart-btn.has-items,
.has-items .cart-btn { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-tint); }

/* -- 10. Footer ---------------------------------------------------------- */

/* After the reference's own footer: the brand colour with a pale rule above it,
   three equal columns, a centred copyright line. Nothing in it is fixed text —
   see layout/footer.php. */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  border-top: 4px solid rgba(255, 255, 255, .15);
  padding-block: 4rem 2rem;
  line-height: 1.7;
}
.site-footer a { color: inherit; transition: color .2s ease; }
.site-footer a:hover { color: #fff; }
.site-footer .wrap {
  max-width: 80rem;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.footer-col { min-width: 0; }

/* The mark, in a white disc so its dark lettering reads on the brand colour. */
.footer-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 9rem; height: 9rem; border-radius: 50%;
  background: #fff; box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--brand) 25%, transparent);
}
.footer-mark img { width: 68%; height: 68%; object-fit: contain; }
.footer-blurb { margin: 1.25rem 0 0; max-width: 24rem; line-height: 1.8; color: color-mix(in srgb, var(--footer-ink) 80%, transparent); font-size: var(--t-base); }
.footer-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.footer-send {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .625rem 1.25rem; border-radius: 9999px;
  background: var(--accent); color: var(--brand) !important;
  font-size: 12px; font-weight: 700;
  box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--accent) 20%, transparent);
  transition: transform .3s ease, background-color .3s ease;
}
.footer-send:hover { background: var(--accent-dark); transform: translateY(-2px); }
/* The newsletter trigger: bordered rather than filled, exactly as the
   reference draws it beside its own filled "send now" button. */
.footer-send--ghost {
  background: none; color: var(--footer-ink) !important;
  border: 1px solid color-mix(in srgb, #fff 25%, transparent);
  box-shadow: none; cursor: pointer; font-family: inherit;
}
.footer-send--ghost:hover {
  background: color-mix(in srgb, #fff 10%, transparent);
  border-color: color-mix(in srgb, #fff 50%, transparent);
  transform: translateY(-2px);
}

.footer-title { margin: 0; font-family: var(--f-display); font-size: 1.125rem; font-weight: 600; color: #fff; letter-spacing: normal; text-transform: none; }

.footer-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .75rem; color: color-mix(in srgb, var(--footer-ink) 80%, transparent); }

/* A small bloom before each quick link that fills in on hover. */
.quick-link { display: inline-flex; align-items: center; gap: .55rem; }
.quick-link-bloom {
  flex: none; width: 1.15rem; height: 1.15rem; opacity: .5;
  background-image: linear-gradient(to top, var(--accent) 50%, #b69eca 50%);
  background-size: 100% 200%; background-position: 0 0;
  -webkit-mask: url("../img/sevgi-eli-mark.png") center / contain no-repeat;
  mask: url("../img/sevgi-eli-mark.png") center / contain no-repeat;
  transform: scale(.6) rotate(-12deg);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), background-position .5s ease, opacity .35s ease;
}
.quick-link:hover .quick-link-bloom, .quick-link:focus-visible .quick-link-bloom {
  opacity: 1; background-position: 0 100%; transform: scale(1) rotate(0deg);
}

.footer-contact { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .75rem; color: color-mix(in srgb, var(--footer-ink) 80%, transparent); }
.footer-contact li { display: flex; align-items: center; gap: .625rem; }
.footer-contact svg { width: 16px; height: 16px; flex: none; }
.footer-follow { margin-top: 1.5rem; }
.footer-follow p { margin: 0; font-size: var(--t-sm); font-weight: 600; color: rgba(255, 255, 255, .9); }
.footer-social { margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .625rem; }

/* The chip on a dark ground: its own look, on the shared `.social-chip`. */
.social-chip--dark { color: var(--footer-ink); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); }
.site-footer .social-chip--dark:hover, .social-chip--dark:focus-visible {
  --chip-lift: 4px;
  background: var(--accent); border-color: var(--accent); color: var(--brand);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent),
              0 10px 20px color-mix(in srgb, var(--brand) 25%, transparent);
  outline: none;
}

.footer-bottom {
  margin-top: 3.5rem; padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  text-align: center; font-size: var(--t-sm);
  color: color-mix(in srgb, var(--footer-ink) 60%, transparent);
}
.footer-bottom p { margin: 0; font-size: inherit; }
.footer-bottom nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; }
.footer-credit a { color: var(--accent); }
.footer-credit a:hover { color: #fff; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .footer-mark { width: 8rem; height: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-link-bloom { transition: none; transform: scale(.85); }
  .quick-link:hover .quick-link-bloom { transform: scale(.85); }
  .footer-send { transition: none; }
}


/* A link into the middle of a page — the footer's "Bank Accounts" goes to
   `contact#bank-accounts` — must not land underneath the sticky header. */
:target { scroll-margin-top: 96px; }


/* -- 11. Hero and page banners ------------------------------------------- */

/* The banner every page with one carries. `.page-hero` on its own is a flat
   brand-coloured strip; with a photograph the page adds `.page-hero--media`
   and a `.hero-media` div, and the photograph goes behind the wash rather
   than under the text at full strength. There is no second implementation —
   see "And one banner look" in CLAUDE.md before writing one. */

.page-hero {
  background: var(--brand-dark); color: #fff; position: relative; overflow: hidden;
  min-height: clamp(300px, 36vw, 480px);
  display: flex; align-items: center;
}
.page-hero > .wrap { width: 100%; }
/* `z-index: 0` is doing real work: it makes this a stacking context, so the
   photograph's own z-index stays inside it and cannot climb over the
   gradient that gives the heading its contrast. */
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(1000px 340px at 82% -10%, rgba(138,52,72,.55), transparent 70%);
}
.page-hero .wrap { position: relative; z-index: 2; padding-block: var(--s-8); }
.page-hero h1 { color: #fff; margin-bottom: var(--s-2); }
.page-hero p { color: rgba(255,255,255,.8); max-width: 62ch; margin: 0; font-size: var(--t-md); }

/* -- 12. Components ------------------------------------------------------ */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .03em;
  padding: 0.28rem 0.6rem; border-radius: var(--r-full);
  background: var(--bg-sunk); color: var(--ink-2);
}
.badge-ok      { background: var(--ok-tint);     color: var(--ok); }
.badge-warn    { background: var(--warn-tint);   color: var(--warn); }
.badge-danger  { background: var(--danger-tint); color: var(--danger); }
.badge-brand   { background: var(--brand-tint);  color: var(--brand); }
.badge-accent  { background: var(--accent-tint); color: var(--accent-dark); }
.badge svg { width: 12px; height: 12px; }

.alert {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  font-size: var(--t-base); margin-bottom: var(--s-5);
}
.alert svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.alert p { margin: 0; }
.alert-ok     { background: var(--ok-tint);     border-color: rgba(31,122,84,.25);  color: #14563b; }
.alert-error  { background: var(--danger-tint); border-color: rgba(179,38,30,.25);  color: #8c1d17; }
.alert-info   { background: var(--brand-tint);  border-color: rgba(109,36,53,.22);  color: var(--brand-dark); }
.alert-warn   { background: var(--warn-tint);   border-color: rgba(166,106,18,.28); color: #7c4f0d; }
.alert ul { margin: var(--s-2) 0 0; padding-inline-start: 1.15rem; }

.accordion { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.accordion + .accordion { margin-top: var(--s-4); }
.acc-item + .acc-item { border-top: 1px solid var(--line-soft); }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); background: transparent; border: 0;
  font-family: var(--f-body); font-size: var(--t-md); font-weight: 700; color: var(--ink);
  text-align: start; cursor: pointer;
}
.acc-trigger:hover { background: var(--bg); }
.acc-trigger svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); transition: transform .22s ease; }
.acc-trigger[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--accent); }
.acc-panel { padding: 0 var(--s-5) var(--s-5); color: var(--ink-2); }
.acc-panel[hidden] { display: none; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; font-size: var(--t-sm); color: var(--ink-3); margin-bottom: var(--s-4); }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--ink-3); }
.page-hero .breadcrumb { color: rgba(255,255,255,.6); }
.page-hero .breadcrumb a { color: rgba(255,255,255,.82); }
.page-hero .breadcrumb a:hover { color: #fff; }

.pagination { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-7); }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding-inline: var(--s-3);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--t-sm); font-weight: 700;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .is-disabled { opacity: .45; pointer-events: none; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); counter-reset: step; }
.step { position: relative; padding-inline-start: 0; }
.step-n {
  width: 46px; height: 46px; border-radius: var(--r-full);
  background: var(--accent-tint); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-md);
  margin-bottom: var(--s-4);
}
.step h3 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.step p { color: var(--ink-2); margin: 0; }

.filters {
  display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center;
  padding: var(--s-4); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: var(--s-6);
}
.filters .input, .filters .select { width: auto; min-width: 190px; flex: 1 1 190px; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  padding: 0.45rem 0.85rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface);
  font-size: var(--t-sm); font-weight: 700; color: var(--ink-2);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.empty {
  text-align: center; padding: var(--s-9) var(--s-5);
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink-2);
}
.empty svg { width: 40px; height: 40px; color: var(--ink-3); margin: 0 auto var(--s-4); }
.empty h3 { color: var(--ink); }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-6);
}
.panel-tight { padding: var(--s-5); }

.detail-list { display: flex; flex-direction: column; gap: 0; margin: 0; }
.detail-list > div {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-4);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft);
}
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { font-size: var(--t-sm); color: var(--ink-2); margin: 0; }
.detail-list dd { font-size: var(--t-base); font-weight: 700; color: var(--ink); margin: 0; margin-inline-start: auto; min-width: 0; text-align: end; font-variant-numeric: tabular-nums; }

button.btn.btn-primary.btn-block.btn-lg.mb-3 {
    margin-bottom: 10px;
}

/* Lifted clear of the back-to-top button, which holds the same corner. A
   toast sitting an inch higher costs nothing; one landing on top of a button
   would cost the button. */
.toasts { position: fixed; inset-inline-end: var(--s-5); bottom: calc(var(--s-5) + 62px); z-index: 300; display: flex; flex-direction: column; gap: var(--s-3); max-width: 340px; }
.toast {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4); border-radius: var(--r-md);
  background: var(--ink); color: #fff; font-size: var(--t-base);
  box-shadow: var(--shadow-lg);
  animation: toast-in .28s cubic-bezier(.22,.8,.3,1);
}
.toast-ok    { background: #17573d; }
.toast-error { background: #8c1d17; }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* -- 13. Utilities ------------------------------------------------------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mb-4 { margin-bottom: var(--s-4); } .mb-5 { margin-bottom: var(--s-5); } .mb-6 { margin-bottom: var(--s-6); }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -- 14. Motion and responsive ------------------------------------------- */

.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .55s cubic-bezier(.22,.8,.3,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 1040px) {
  /* The footer has its own breakpoints in section 10; a rule here would
     land after them and quietly win. */
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The menu collapses into the button sooner than it used to: eight items
   with English or Turkish labels do not fit beside the mark and the donate
   button on a small laptop, and a burger reads better there than a bar
   spilling onto a second line. */
@media (max-width: 1100px) {
  /* The mark takes the flexible column; the burger and the actions keep their
     own. The burger used to sit in the middle `minmax(0, 1fr)` column — the
     one that gives way when space runs out — so on a phone it shrank to
     nothing and the button slid underneath the basket beside it. */
  .site-header .wrap { grid-template-columns: minmax(0, 1fr) auto auto; }
  .nav-toggle { display: inline-flex; grid-area: 1 / 2; justify-self: end; }
  .nav {
    grid-area: 2 / 1 / 3 / -1;
    flex-direction: column; align-items: stretch;
    gap: 0; padding-top: var(--s-3);
    border-top: 1px solid rgba(255, 255, 255, .14);
    /* The menu opens inside the sticky header. Taller than the screen, its
       last items would sit below the fold with nothing to scroll them into
       view. A scroll container is safe at this width — unlike the desktop
       bar — because the sub-menus are in the flow here, not positioned
       against their items. */
    max-height: calc(100vh - 6rem); max-height: calc(100dvh - 6rem);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 0.75rem var(--s-2); border-radius: var(--r-sm); }
  .nav a.is-active::after { display: none; }
  .nav a.is-active { background: rgba(255, 255, 255, .14); }
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .stat { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { border-inline-end: 1px solid var(--line); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .section--brand .stat:nth-child(odd) { border-inline-end-color: rgba(255,255,255,.14); }
}

/* Single columns on a phone are `minmax(0, 1fr)`, never a bare `1fr`. A bare
   `1fr` means `minmax(auto, 1fr)`: the column may not be narrower than the
   longest word inside it, so one email address or IBAN widened the column —
   and the page — past the screen. The footer's own rules live in section 10;
   one used to be repeated here, where it overrode them and broke the footer. */
@media (max-width: 620px) {
  :root { --s-9: 3rem; --s-10: 3.5rem; }
  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .toasts { inset-inline: var(--s-4); max-width: none; }
  .panel { padding: var(--s-5); }
  /* A label that does not fit wraps inside its button instead of carrying the
     button off the edge of the screen. Long Turkish and English labels did. */
  .btn { padding: 0.8rem 1.15rem; white-space: normal; line-height: 1.3; }

  /* The utility bar: smaller type in two aligned rows — the contact details
     (phone, WhatsApp, email) on the first, bank accounts and the language
     switch on the second. Everything stays written out: the email address is a
     contact detail people read and copy, not just a link to tap.

     One row was measured and is not possible: written out, the five items need
     about 560px even at 10px type, and a phone has 290–380px. At 10px the
     contact row needs about 326px, so it holds on one line from 360px up;
     only a 320px phone moves the email to a line of its own. The language
     links set their size in rem, so they are told to follow the bar here. */
  .topbar { font-size: 10px; }
  .topbar .wrap {
    justify-content: center; align-items: center; text-align: center;
    gap: 0 var(--s-3); padding-block: 3px; padding-inline: var(--s-3);
  }
  .topbar-links { justify-content: center; align-items: center; gap: 0 var(--s-2); }
  .topbar a { min-width: 24px; justify-content: center; gap: 4px; }
  .topbar svg { width: 12px; height: 12px; }
  .lang-switch a, .lang-switch .sep { font-size: inherit; }

  /* A compact bar: the sticky header was 95px of a phone's screen. */
  .site-header .wrap { padding-inline: var(--s-4); padding-block: var(--s-2); gap: var(--s-2); }
  .header-actions { gap: var(--s-2); }
  .header-actions .btn {
    white-space: nowrap; line-height: 1;
    min-height: 42px; padding: 0.55rem 0.8rem; font-size: var(--t-sm);
  }

  /* A row of label and value drops the value under its label when the two do
     not fit side by side; a reference that is one long token may then break
     rather than run off the screen. */
  .detail-list dd.nowrap { white-space: normal; overflow-wrap: anywhere; }
}

/* The narrowest phones. The donate button keeps its heart and its name — the
   name is still what a screen reader announces — but gives up the written
   label, which cannot fit beside the mark, the basket and the menu at 320px
   without shrinking the mark to an unreadable sliver. */
@media (max-width: 359px) {
  .header-donate { width: 42px; padding: 0; gap: 0; }
  .header-donate-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* -- 15. Right-to-left and Arabic typography -----------------------------

   The layout itself is already direction-agnostic: sections 2-14 use logical
   properties (padding-inline-start, border-inline-end, text-align: start and
   so on), so flipping `dir` on <html> mirrors the page without a second
   stylesheet. The site previously shipped Bootstrap's separate RTL bundle
   plus an rtl.css override file; neither is needed now.

   What follows is only what logical properties cannot express: a background
   image's position, glyphs that must physically mirror, and the typographic
   corrections Arabic needs.                                                */

/* The select chevron is a background image, and background-position has no
   logical form with dependable support. */
[dir="rtl"] .select {
  background-position: left 0.9rem center;
  padding-inline-end: 0.95rem;
  padding-inline-start: 2.4rem;
}

/* Icons that point somewhere must point the other way. Chevrons and arrows
   are mirrored; everything else (a heart, a lock, a receipt) must not be. */
[dir="rtl"] .icon-directional,
[dir="rtl"] .breadcrumb svg,
[dir="rtl"] .pagination svg {
  transform: scaleX(-1);
}

/* A blockquote's flat edge follows the border, which has already flipped. */
[dir="rtl"] .prose blockquote {
  border-radius: var(--r-md) 0 0 var(--r-md);
}

/* ---- Arabic typography -------------------------------------------------
   Two corrections that matter more than they look:

   1. letter-spacing is destructive in Arabic. The script is cursive, so
      adding tracking pulls the joined letterforms apart and the word stops
      reading as a word. Every tracking value in this stylesheet is therefore
      reset to normal for Arabic.

   2. text-transform: uppercase is meaningless in Arabic — the script has no
      case — and on some engines it still triggers a font-synthesis pass. The
      eyebrow labels keep their weight and colour but lose the transform.

   Arabic also sits lower and denser than Latin at the same point size, so the
   line height is opened up slightly and headings are nudged larger.         */

[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4, [lang="ar"] h5,
[lang="ar"] .eyebrow, [lang="ar"] .card-title, [lang="ar"] .stat-value,
[lang="ar"] .btn, [lang="ar"] .site-footer h5, [lang="ar"] .badge,
[lang="ar"] .chip, [lang="ar"] .acc-trigger {
  letter-spacing: normal;
}

[lang="ar"] .eyebrow {
  text-transform: none;
  font-size: var(--t-sm);
}

[lang="ar"] body,
[lang="ar"] .prose {
  line-height: 1.85;
}

[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 {
  line-height: 1.35;
}

/* Arabic numerals in this design stay Western, matching the organisation's
   own site, but they must not inherit Arabic's looser tracking in tables. */
[lang="ar"] .tabular,
[lang="ar"] .raise b,
[lang="ar"] .stat-value,
[lang="ar"] .detail-list dd {
  font-variant-numeric: tabular-nums;
  letter-spacing: normal;
}

/* ---- Language switcher ------------------------------------------------- */

.lang-switch { display: flex; align-items: center; gap: 2px; }
/* The same 24px minimum as the bar around it, and here `min-width` matters as
   much as the height: these are the smallest targets on the site — "EN" is
   about eighteen pixels of text. */
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 24px; min-width: 24px;
  padding: 0.15rem 0.45rem;
  border-radius: var(--r-sm);
  font-size: var(--t-xs);
  font-weight: 700;
  color: rgba(255, 255, 255, .72);
  line-height: 1.6;
}
.lang-switch a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.lang-switch a[aria-current="true"] {
  color: var(--brand-dark);
  background: var(--accent);
}
.lang-switch .sep { color: rgba(255, 255, 255, .28); font-size: var(--t-xs); }

/* ---- Nested navigation (Wijdan's menu has sub-menus) -------------------- */

.nav-item { position: relative; }

.nav-item > .nav-parent {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; cursor: pointer;
  font-family: inherit; color: rgba(255, 255, 255, .82);
}
.nav-item > .nav-parent:hover,
.nav-item > .nav-parent[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-item > .nav-parent svg { width: 13px; height: 13px; transition: transform .18s ease; }
.nav-item > .nav-parent[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-item.is-active > .nav-parent { color: #fff; }

.nav-sub {
  position: absolute; top: calc(100% + 4px); inset-inline-start: 0; z-index: 70;
  min-width: 236px; padding: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 1px;
}
.nav-sub[hidden] { display: none; }
.nav-sub a {
  padding: 0.55rem 0.7rem; border-radius: var(--r-sm);
  font-size: 14px;font-weight:bold; color: var(--ink-2); white-space: nowrap;
}
.nav-sub a:hover { background: var(--brand-tint); color: var(--brand); }
.nav-sub a[aria-current="page"] { color: var(--brand); font-weight: 700; }

@media (max-width: 1100px) {
  .nav-item { width: 100%; }
  .nav-item > .nav-parent { width: 100%; justify-content: space-between; padding: 0.75rem var(--s-2); }
  .nav-sub {
    position: static; min-width: 0; box-shadow: none; border: 0;
    border-inline-start: 2px solid rgba(255, 255, 255, .2);
    border-radius: 0; margin-inline-start: var(--s-3); padding-inline: var(--s-2);
    /* Inline in the dark mobile drawer rather than a floating white card —
       the desktop drop-down's own colours (further up) are unchanged. */
    background: transparent;
  }
  .nav-sub a { color: rgba(255, 255, 255, .78); }
  .nav-sub a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .nav-sub a[aria-current="page"] { color: #fff; }
}

/* ---- Partner strip ----------------------------------------------------- */

.partners {
  display: flex; flex-wrap: wrap; gap: var(--s-5);
  align-items: center; justify-content: center;
}
.partners a, .partners span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  min-height: 84px; min-width: 140px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.partners a:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.partners img { max-height: 54px; width: auto; object-fit: contain; }

/* ---- Bank account cards ------------------------------------------------ */

.bank-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-5);
  border-inline-start: 3px solid var(--accent);
}
.bank-card + .bank-card { margin-top: var(--s-4); }
.bank-card h3 { font-size: var(--t-md); margin-bottom: var(--s-4); }
.bank-row {
  display: flex; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft);
  font-size: var(--t-base);
}
.bank-row:last-child { border-bottom: 0; }
.bank-row dt { color: var(--ink-2); margin: 0; flex: none; }
.bank-row dd {
  margin: 0; font-weight: 700; text-align: end;
  font-variant-numeric: tabular-nums; word-break: break-all;
  letter-spacing: normal;
}
.bank-row dd code { background: var(--bg-sunk); padding: 2px 6px; border-radius: 3px; }

/* ---- Case cards -------------------------------------------------------- */

.case-urgent { border-inline-start: 3px solid var(--danger); }
.case-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4);
  font-size: var(--t-xs); color: var(--ink-3); font-weight: 600;
}

/* ---- Zakat calculator --------------------------------------------------
   The calculator has its own banner, a segmented switch between four groups
   of assets, and a result panel that follows the donor down the page. It is
   the only page with this much chrome, so its classes are namespaced `zk-`
   and everything here composes the tokens above rather than new colours.
   Direction-agnostic like the rest of the sheet: the switch, the icons inside
   the fields and the result panel all use logical properties.              */

/* The zakat banner is the site's banner — `.page-hero page-hero--media` in
   the markup — plus two things that are only true here: the extra room below
   the text, which the calculator card overlaps into, and the gold strapline
   under the heading. The extra room is written with both classes so it wins
   wherever the shared padding rule happens to sit in this file. */
.page-hero.zk-hero .wrap { padding-block: var(--s-9) calc(var(--s-9) + var(--s-8)); }
.zk-hero-inner { max-width: 720px; }
.zk-hero h1 { margin-bottom: 0; }
.zk-hero-tag { display: block; color: var(--accent); font-size: clamp(1.1rem, 2.4vw, var(--t-2xl)); margin-top: var(--s-2); }
.zk-hero p { max-width: 60ch; }

.zk-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  background: rgba(178, 148, 107, .18); border: 1px solid rgba(178, 148, 107, .42);
  color: #e8d3ae; padding: 0.5rem 1.1rem; border-radius: var(--r-full);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: var(--s-5);
}
.zk-badge svg { width: 14px; height: 14px; }

.zk-rule { height: 4px; width: 88px; background: var(--accent); border-radius: var(--r-full); margin-block: var(--s-5); }

.zk-nisab {
  margin-top: var(--s-6); max-width: 440px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-lg); padding: var(--s-5);
}
.zk-nisab-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  color: rgba(255, 255, 255, .78); font-size: var(--t-sm); margin-bottom: var(--s-3);
}
.zk-nisab-head b { color: #fff; font-family: var(--f-display); font-size: var(--t-md); font-variant-numeric: tabular-nums; }
.zk-nisab p { color: rgba(255, 255, 255, .6); font-size: var(--t-xs); margin: var(--s-3) 0 0; }
.zk-bar { height: 8px; background: rgba(255, 255, 255, .16); border-radius: var(--r-full); overflow: hidden; }
.zk-bar > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #e0c79c);
  border-radius: var(--r-full); transition: width .5s cubic-bezier(.22, .8, .3, 1);
}

/* The calculator overlaps the banner, as the design intends. */
.zk-body { padding-block: 0 var(--s-9); }
.zk-layout {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: var(--s-7); align-items: start;
  margin-top: calc(var(--s-8) * -1); position: relative; z-index: 3;
}

.zk-tabs {
  display: flex; gap: 6px; padding: 7px; margin-bottom: var(--s-5);
  background: var(--bg-sunk); border: 1px solid var(--line-soft);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
}
.zk-tab {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 0.9rem 0.7rem; border: 0; border-radius: var(--r-lg);
  background: transparent; color: var(--ink-2); cursor: pointer;
  font-family: inherit; font-size: var(--t-sm); font-weight: 700; line-height: 1.3;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.zk-tab svg { width: 17px; height: 17px; flex: none; }
.zk-tab:hover { color: var(--brand); }
.zk-tab[aria-selected="true"] {
  background: var(--surface); color: var(--brand);
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.zk-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.zk-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--s-7);
}
.zk-card + .zk-card { margin-top: var(--s-5); }
.zk-card > h2 {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: var(--t-xl); color: var(--brand); margin-bottom: var(--s-2);
}
.zk-card > h2 svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.zk-card-note { color: var(--ink-2); font-size: var(--t-sm); margin-bottom: var(--s-6); }

.zk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.zk-fields .field { margin-bottom: 0; }

/* A field with its glyph parked on the inline-start edge — the same side as
   the label, and clear of the select's own chevron at the other end. */
.zk-ctl { position: relative; }
.zk-ctl .input, .zk-ctl .select {
  border-width: 2px; border-radius: var(--r-lg);
  padding-block: 0.85rem;
  font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums;
}
.zk-ctl .input { padding-inline-start: 3rem; }
.zk-ctl .input:focus, .zk-ctl .select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(178, 148, 107, .16);
}
.zk-ctl > svg {
  position: absolute; inset-inline-start: 1rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-3); pointer-events: none;
  transition: color .2s ease;
}
.zk-ctl:focus-within > svg { color: var(--accent); }

.zk-with-btn { display: flex; gap: var(--s-3); align-items: stretch; }
.zk-with-btn .zk-ctl { flex: 1; }
.zk-with-btn .btn { flex: none; padding-inline: var(--s-4); }

.zk-tiles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4);
  margin-top: var(--s-6); padding: var(--s-5);
  background: var(--accent-tint); border: 1px solid rgba(178, 148, 107, .28);
  border-radius: var(--r-lg);
}
.zk-tile { background: var(--surface); border-radius: var(--r-md); padding: var(--s-4); text-align: center; }
.zk-tile span { display: block; font-size: var(--t-xs); color: var(--ink-2); margin-bottom: var(--s-1); }
.zk-tile b {
  font-family: var(--f-display); font-size: var(--t-lg); color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* Project chooser */
.zk-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(232px, 100%), 1fr)); gap: var(--s-4); }
.zk-project {
  display: flex; flex-direction: column; gap: var(--s-2);
  text-align: start; font-family: inherit; font-size: var(--t-base);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-5); cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.zk-project::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px;
  background: var(--accent); transform: scaleX(0); transform-origin: center;
  transition: transform .3s ease;
}
.zk-project:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.zk-project:hover::before, .zk-project[aria-pressed="true"]::before { transform: scaleX(1); }
.zk-project[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(178, 148, 107, .2); }
.zk-project:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.zk-project:disabled::before { transform: scaleX(0); }
.zk-project-icon {
  width: 54px; height: 54px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent-dark); margin-bottom: var(--s-2);
  transition: background .3s ease, color .3s ease;
}
.zk-project-icon svg { width: 24px; height: 24px; }
.zk-project:hover .zk-project-icon,
.zk-project[aria-pressed="true"] .zk-project-icon { background: var(--accent); color: #fff; }
.zk-project h3 { font-size: var(--t-md); color: var(--brand); margin: 0; }
.zk-project p { font-size: var(--t-sm); color: var(--ink-2); margin: 0; }
.zk-project-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin-top: auto; padding-top: var(--s-4);
}
.zk-project-min { font-size: var(--t-xs); font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.zk-pick {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-xs); font-weight: 700; padding: 0.35rem 0.7rem;
  border-radius: var(--r-full); background: var(--bg-sunk); color: var(--ink-2);
}
.zk-pick svg { width: 12px; height: 12px; }
.zk-project[aria-pressed="true"] .zk-pick { background: var(--accent); color: #fff; }

.zk-alloc {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  flex-wrap: wrap; margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid var(--line-soft);
}
.zk-alloc-label { font-size: var(--t-xs); color: var(--ink-2); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.zk-alloc b { display: block; font-family: var(--f-display); font-size: var(--t-lg); color: var(--brand); }

/* Result panel */
.zk-result {
  position: sticky; top: 88px;
  background: linear-gradient(155deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; border-radius: var(--r-xl); padding: var(--s-7) var(--s-6); text-align: center;
  box-shadow: 0 26px 54px -18px rgba(109, 36, 53, .5), inset 0 1px 0 rgba(255, 255, 255, .16);
  overflow: hidden;
}
.zk-result > h2 {
  display: flex; align-items: center; justify-content: center; gap: var(--s-3);
  color: #fff; font-size: var(--t-lg); margin-bottom: var(--s-5);
}
.zk-result > h2 svg { width: 20px; height: 20px; color: var(--accent); }
.zk-stat {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-lg); padding: var(--s-4); text-align: start;
}
.zk-stat + .zk-stat { margin-top: var(--s-3); }
.zk-stat span {
  display: block; font-size: var(--t-xs); font-weight: 700; color: #e3cfae;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px;
}
.zk-stat b { font-family: var(--f-display); font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.zk-due {
  padding-block: var(--s-6); margin-block: var(--s-5);
  border-block: 1px solid rgba(255, 255, 255, .14);
}
.zk-due-label { display: block; font-size: var(--t-xs); font-weight: 700; color: #e3cfae; letter-spacing: .08em; text-transform: uppercase; }
.zk-amount {
  display: block; margin-block: var(--s-4);
  font-family: var(--f-display); font-weight: 700; line-height: 1;
  font-size: clamp(2.1rem, 4.6vw, 3rem);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(to bottom, #ffffff 35%, #f2d7b4 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #f2d7b4;
}
.zk-verdict {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.6rem 1.15rem; border-radius: var(--r-full);
  font-size: var(--t-sm); font-weight: 600; text-align: start;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #fff;
}
.zk-verdict svg { width: 15px; height: 15px; flex: none; }
.zk-verdict--ok   { background: rgba(90, 190, 140, .18); border-color: rgba(90, 190, 140, .38); color: #b8ecd0; }
.zk-verdict--warn { background: rgba(230, 180, 80, .16); border-color: rgba(230, 180, 80, .38); color: #f4d9a6; }
.zk-result-chosen { font-size: var(--t-sm); color: rgba(255, 255, 255, .78); margin-bottom: var(--s-4); }
.zk-result-chosen b { color: #fff; }
.zk-quick { display: flex; gap: var(--s-3); margin-top: var(--s-4); }
.zk-quick .btn { flex: 1; }
.zk-note { font-size: var(--t-xs); color: rgba(255, 255, 255, .55); line-height: 1.7; margin: var(--s-5) 0 0; }

/* The two reassurance cards under the calculator. */
.zk-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-5); }
.zk-info > div {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--r-lg); padding: var(--s-6); box-shadow: var(--shadow-sm);
}
.zk-info > div:last-child { border-inline-start-color: var(--ok); }
.zk-info h3 { display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-lg); color: var(--brand); }
.zk-info h3 svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.zk-info ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.zk-info li { display: flex; gap: var(--s-3); color: var(--ink-2); font-size: var(--t-base); }
.zk-info li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--ok); }
.zk-info p { color: var(--ink-2); margin: 0; }

/* Arabic has no case and must not be tracked out. */
[lang="ar"] .zk-badge,
[lang="ar"] .zk-stat span,
[lang="ar"] .zk-due-label,
[lang="ar"] .zk-alloc-label {
  letter-spacing: normal; text-transform: none;
}
[lang="ar"] .zk-tab,
[lang="ar"] .zk-amount,
[lang="ar"] .zk-tile b,
[lang="ar"] .zk-stat b { letter-spacing: normal; }

@media (max-width: 980px) {
  .zk-layout { grid-template-columns: minmax(0, 1fr); margin-top: calc(var(--s-7) * -1); }
  .zk-result { position: static; }
  .zk-info { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .page-hero.zk-hero .wrap { padding-block: var(--s-7) calc(var(--s-8) + var(--s-6)); }
  .zk-tabs { flex-wrap: wrap; }
  .zk-tab { flex: 1 1 44%; }
  .zk-card { padding: var(--s-5); border-radius: var(--r-lg); }
  .zk-fields, .zk-tiles { grid-template-columns: minmax(0, 1fr); }
  .zk-nisab { max-width: none; }
}

@media print {
  .hero-media, .zk-tabs, .zk-quick, .zk-projects,
  .site-header, .site-footer, .topbar { display: none !important; }
  .zk-result { position: static; box-shadow: none; }
  .zk-panels [role="tabpanel"][hidden] { display: block !important; }
}
/* ---- Category landing banner with a photograph -------------------------
   `.page-hero` on its own is a flat brand-coloured strip. A category that has
   its own banner image gets this modifier: the same strip, with the photo
   behind a vertical wash so the heading keeps its contrast. The gradient is
   deliberately vertical rather than angled — it must not need mirroring in
   Arabic.                                                                  */

.page-hero--media .hero-media img {
  opacity: 1; position: relative; z-index: 1;
  object-fit: cover; object-position: top;
}

/* The brand colour, over the photograph. Every banner then reads as part of
   this site whatever colours the photograph happens to carry — and a pale
   sky behind a white heading stops being a problem. `--hero-tint` is the
   one number to change. */
.page-hero--media { --hero-tint: .55; }
.page-hero--media .hero-media::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: var(--brand-dark);
  opacity: var(--hero-tint);
}

/* The same photograph, blown up and blurred, behind the one you are looking
   at — so a squarer photograph sits in something rather than floating in a
   pair of bare stripes. `--hero-backdrop` is set by initHeroBackdrop(); with
   no script the sides are the band's own colour. */
.page-hero--media .hero-media::before {
  content: ""; position: absolute; inset: -6%;
  background-image: var(--hero-backdrop, none);
  background-size: cover; background-position: center;
  filter: blur(28px) saturate(1.15); opacity: .8;
}
.page-hero--media .wrap { padding-block: var(--s-9); }
.page-hero--media::after {
  background: linear-gradient(to top,
    rgba(26, 9, 15, .72) 0%,
    rgba(26, 9, 15, .42) 42%,
    rgba(26, 9, 15, .12) 78%,
    rgba(26, 9, 15, 0) 100%);
}
/* The words sit on a photograph now rather than on a flat wash, so they
   carry their own shadow — a pale sky behind a headline is otherwise a
   headline nobody can read. */
.page-hero--media h1,
.page-hero--media > .wrap > p,
.page-hero--media .breadcrumb,
.page-hero--media .eyebrow { text-shadow: 0 2px 12px rgba(16, 6, 10, .55); }
.page-hero--media > .wrap > p { color: rgba(255, 255, 255, .94); }
.page-hero--media .eyebrow { color: #e3cfae; }

/* ---- Campaign card: funding summary and facts --------------------------
   The card footer used to stack three rows of small grey text — a raised/goal
   line, then "N% funded" beside a beneficiary count, then a second identical
   row holding the location — and stated the percentage twice, once in the meta
   row and again inside the bar's own label. This says each thing once: the
   money on one baseline with the percentage as a pill, the bar, then one row
   of chips for who and where.

   Card-scoped on purpose. `.raise`, `.progress` and `.card-meta` stay exactly
   as they were for the campaign detail page and the news cards.            */

.fund { display: flex; flex-direction: column; gap: var(--s-3); }

.fund-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3);
}
.fund-money { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; min-width: 0; }
.fund-raised {
  font-family: var(--f-display); font-weight: 700;
  font-size: var(--t-lg); line-height: 1.15; color: var(--accent-dark);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.fund-goal { font-size: var(--t-xs); color: var(--brand); opacity: .7; font-variant-numeric: tabular-nums; }
.fund-pct {
  flex: none; font-size: var(--t-xs); font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: var(--r-full);
  /* Burgundy on the gold tint, not accent-dark: at 12px bold that pairing
     measures 3.64:1, under the 4.5:1 this size needs. This is 9.6:1. */
  background: var(--accent-tint); color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.fund--done .fund-pct { background: var(--ok-tint); color: var(--ok); }

/* Who it reaches and where, as one wrapping row rather than two grey lines. */
.card-facts { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.fact {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.25rem 0.65rem; border-radius: var(--r-full);
  background: var(--bg-sunk); color: var(--ink-2);
  font-size: var(--t-xs); font-weight: 600; line-height: 1.6;
}
.fact svg { width: 13px; height: 13px; flex: none; color: var(--ink-3); }

/* Arabic is cursive: tracking pulls the joined letterforms apart. */
[lang="ar"] .fund-raised,
[lang="ar"] .fund-pct,
[lang="ar"] .fund-goal,
[lang="ar"] .fact { letter-spacing: normal; }

/* ---- Contact page ------------------------------------------------------
   Three pieces, following the organisation's own design: a centred banner
   over a photograph, a pair of cards — the channels in white, the opening
   hours in near-black — and the bank accounts on a sunk band.

   Direction-agnostic, with one exception marked below: a phone number, an
   IBAN or an email is Latin script and has to stay left-to-right even on an
   Arabic page, or the digits reorder on screen.                           */

.eyebrow-badge {
  display: inline-block;
  background: rgba(178, 148, 107, .18);
  border: 1px solid rgba(178, 148, 107, .45);
  color: #e8d3ae;
  padding: 0.45rem 1.6rem; border-radius: var(--r-full);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: var(--s-5);
}

.pg-rule {
  width: 160px; height: 3px; margin: var(--s-5) auto; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), #e0c79c, transparent);
}

/* The pair of cards. Uneven on purpose: the contact card carries up to four
   channels plus the whole social row, the hours card three lines and one
   callout — forcing them to equal columns left the hours card mostly empty
   air beside a much busier one. `.ct-hours` itself is made `sticky` below
   (it already needed a positioning context for `overflow: hidden`, so this
   reuses that declaration rather than adding a second, lower-priority one
   that the later rule would just win over) — it keeps the shorter card in
   view while a long channel list scrolls past it, the same idea the
   humanitarian case page's own funding panel already uses beside its
   longer story. */
.ct-duo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s-7); align-items: start; }

.ct-card {
  background: linear-gradient(145deg, #fffdfa, var(--surface));
  border: 1px solid rgba(178, 148, 107, .25);
  border-radius: var(--r-xl); padding: var(--s-8) var(--s-6);
  box-shadow: var(--shadow-lg);
}

.ct-item {
  display: flex; gap: var(--s-4); align-items: center;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-lg);
  border: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.ct-item:hover {
  background: var(--accent-tint); border-color: rgba(178, 148, 107, .35);
}

/* The organic blob the organisation uses for its contact icons. */
.ct-blob {
  width: 58px; height: 58px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--brand);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  transition: background .3s ease, color .3s ease, border-radius .3s ease;
}
.ct-blob svg { width: 24px; height: 24px; }
.ct-item:hover .ct-blob {
  background: var(--brand); color: #fff;
  border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
}

.ct-item-label {
  display: block; font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 2px;
}
.ct-item-value { display: block; color: var(--ink); font-weight: 600; line-height: 1.5; }
a.ct-item-value:hover { color: var(--brand); }

/* Latin-script data keeps its own direction inside an Arabic page. */
.ct-ltr { direction: ltr; unicode-bidi: isolate; text-align: start; }

/* A figure or amount, dressed in the numeral face rather than the identity
   face — the same split the organisation's own template makes. */
.num { font-family: var(--f-num); direction: ltr; unicode-bidi: isolate; }

.ct-social-wrap { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line-soft); }
.ct-social { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.ct-social-link {
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-sunk); color: var(--ink-2);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.ct-social-link:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.ct-social-link svg { width: 17px; height: 17px; }

/* Hours, in the dark card the source uses to set them apart. */
.ct-hours {
  background: linear-gradient(145deg, #241f20, #322a2b);
  border: 1px solid rgba(178, 148, 107, .4);
  border-radius: var(--r-xl); padding: var(--s-8) var(--s-6);
  color: #fff; box-shadow: var(--shadow-lg);
  position: sticky; top: var(--s-6); overflow: hidden;
}
.ct-hours h2 { color: #fff; font-size: var(--t-xl); }
.ct-hours .eyebrow { color: #e8d3ae; }
.ct-hours-note { color: rgba(255, 255, 255, .72); font-size: var(--t-sm); }

.ct-hours-list { display: flex; flex-direction: column; margin: 0; }
.ct-hours-list > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  padding-block: var(--s-3); border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ct-hours-list > div:last-child { border-bottom: 0; }
.ct-hours-list dt { color: rgba(255, 255, 255, .8); font-size: var(--t-base); margin: 0; }
.ct-hours-list dd {
  margin: 0; font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums; text-align: end;
}
.ct-hours-list .ct-closed { color: #e8d3ae; font-weight: 600; }

.ct-always {
  margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid rgba(178, 148, 107, .35);
}
.ct-always h3 {
  display: flex; align-items: center; gap: var(--s-2);
  color: #e8d3ae; font-size: var(--t-md); margin-bottom: var(--s-2);
}
.ct-always h3 svg { width: 16px; height: 16px; }
.ct-always p { color: rgba(255, 255, 255, .72); font-size: var(--t-sm); margin-bottom: var(--s-4); }

/* Bank accounts. */
.ct-banks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--s-5); }
.ct-bank {
  background: var(--surface); border-radius: var(--r-xl);
  border-bottom: 5px solid var(--brand);
  padding: var(--s-6); box-shadow: var(--shadow-md);
  transition: transform .3s ease, box-shadow .3s ease;
}
.ct-bank:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ct-bank h3 { font-size: var(--t-lg); color: var(--brand); margin-bottom: var(--s-5); }
.ct-iban {
  font-family: var(--f-display); font-size: var(--t-md); font-weight: 700;
  color: var(--ink); letter-spacing: .04em; word-break: break-all;
  background: var(--bg-sunk); border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4); margin: var(--s-2) 0 var(--s-4);
}

/* Arabic is cursive: tracking pulls the joined letterforms apart. */
[lang="ar"] .eyebrow-badge,
[lang="ar"] .ct-item-label { letter-spacing: normal; text-transform: none; }
[lang="ar"] .ct-hours-list dd,
[lang="ar"] .ct-iban { letter-spacing: normal; }

@media (max-width: 980px) {
  .ct-duo { grid-template-columns: minmax(0, 1fr); }
  .ct-form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  /* Stacked single column: nothing beside `.ct-hours` for it to stay level
     with, so sticking it would just pin it mid-scroll for no reason. */
  .ct-hours { position: static; }
}

@media (max-width: 700px) {
  .ct-card, .ct-hours { padding: var(--s-6) var(--s-5); }
  .ct-item { padding-inline: var(--s-2); }
  .ct-blob { width: 48px; height: 48px; }
  .ct-blob svg { width: 20px; height: 20px; }
}

/* ---- CMS page sections -------------------------------------------------
   The blocks a page is built from in the admin panel — a story beside a
   photograph, a grid of value cards, a band of figures — rebuilt in this
   site's own tokens from the organisation's design. The source page drew
   them with a CSS framework, FontAwesome and animated counters; here the
   type, the colour and the spacing are the ones every other page uses, the
   glyphs are inline SVG and a figure is the text an administrator typed.

   Direction-agnostic throughout: the offsets are logical properties, so the
   decorative corners on the photograph swap sides in Arabic on their own. */


/* The rule under a heading. Dark on light backgrounds, gold on the brand. */
.pg-rule--ink {
  width: 64px; height: 4px; margin: var(--s-3) auto var(--s-4);
  background: var(--accent); border-radius: 4px;
}

.pg-heading { font-size: var(--t-2xl); margin-bottom: var(--s-4); color: var(--brand); }

/* The rule under a left-aligned heading — the same bar as `.pg-rule--ink`
   without the centring, for a heading that reads at the start of the line
   rather than in the middle of the page. */
.pg-rule--start { margin-inline: 0; }

/* Story: the photograph beside the text. Text first in the markup, photo
   second — see the doc comment where this is drawn for why that ordering
   matters, not just which column looks wider. */
.pg-intro {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--s-8); align-items: center;
}
.pg-intro--text { grid-template-columns: minmax(0, 1fr); }

.pg-figure { position: relative; margin: 0; }
.pg-figure img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
/* The organisation's own line about itself, as a quote card in the
   photograph's corner — the same treatment home/about.php uses. */
.pg-figure figcaption {
  position: absolute; right: var(--s-5); bottom: var(--s-5);
  max-width: 260px;
  background: rgba(74, 47, 86, .92); color: #fff;
  backdrop-filter: blur(6px);
  font-family: var(--f-display); font-size: var(--t-sm); font-weight: 500; line-height: 1.6;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.pg-figure figcaption::before {
  content: '\201C'; display: none; font-size: 2rem; line-height: 1; color: var(--accent);
  margin-bottom: var(--s-1);
}

.pg-intro-body, .pg-intro-body p { color: var(--brand); opacity: .8; line-height: 1.7; }
.pg-intro-body { margin-bottom: var(--s-6); }
.pg-intro-body p:last-child { margin-bottom: 0; }

.pg-subheading {
  font-size: var(--t-lg); margin-bottom: var(--s-5);
  border-inline-start: 4px solid var(--accent);
  padding-inline-start: var(--s-3);
}

.pg-pillars { display: grid; gap: var(--s-5); }
.pg-pillar { display: flex; gap: var(--s-4); align-items: flex-start; }
.pg-pillar-icon {
  width: 46px; height: 46px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand);
  border-radius: var(--r-lg);
  transition: background .25s ease, color .25s ease;
}
.pg-pillar:hover .pg-pillar-icon { background: var(--brand); color: #fff; }
.pg-pillar h4 { font-size: var(--t-md); margin-bottom: 4px; }
.pg-pillar p { color: var(--ink-2); font-size: var(--t-base); margin: 0; }

/* ---- Vision/mission panels, then a grid of value cards ------------------
   The `values` layout: home/about.php's own two-tone panels (reused as-is,
   see `.home-about-panel*`), then a centred sub-heading and a row of value
   cards — a distinct, start-aligned card of its own rather than `.pg-card`,
   since the two are asked to look different (centred icon-card vs a
   left-aligned one whose icon carries the organisation's own accent per
   card, the way the reference cycles violet / mauve / bud / lilac). */
.pg-vm-panels { margin-bottom: var(--s-8); }
.pg-values-head { margin-bottom: var(--s-7); }
.pg-values-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}
@media (min-width: 641px) {
  .pg-values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .pg-values-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.pg-value-card {
  text-align: start;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-xl); padding: var(--s-6);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pg-value-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: #b69eca;
}
.pg-value-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: var(--r-lg);
  background: rgba(74, 47, 86, .1); color: var(--brand);
  transition: background .25s ease, color .25s ease;
}
.pg-value-card:nth-child(4n+2) .pg-value-icon { background: rgba(135, 104, 169, .1); color: var(--brand-mid); }
.pg-value-card:nth-child(4n+3) .pg-value-icon { background: rgba(124, 179, 66, .1); color: var(--accent-dark); }
.pg-value-card:nth-child(4n+4) .pg-value-icon { background: rgba(182, 158, 202, .2); color: var(--brand-mid); }
.pg-value-card:hover .pg-value-icon { background: var(--brand); color: #fff; }
.pg-value-card:nth-child(4n+2):hover .pg-value-icon { background: var(--brand-mid); }
.pg-value-card:nth-child(4n+3):hover .pg-value-icon { background: var(--accent-dark); }
.pg-value-card:nth-child(4n+4):hover .pg-value-icon { background: var(--brand-mid); }
.pg-value-card h4 { font-size: var(--t-lg); margin: var(--s-5) 0 var(--s-3); color: var(--brand); }
.pg-value-card p { color: var(--brand); opacity: .75; font-size: var(--t-base); margin: 0; line-height: 1.7; }

/* ---- Strategic priorities: a highlighted checklist beside numbered issues */

.pg-goals { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-8); align-items: start; }
.pg-goals-body, .pg-goals-body p { color: var(--brand); opacity: .8; line-height: 1.7; }

.pg-goals-card { margin-top: var(--s-7); background: var(--bg-sunk); border-radius: var(--r-xl); padding: var(--s-6); }
.pg-goals-card h3 {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: var(--t-lg); margin: 0; color: var(--brand);
}
.pg-goals-card h3 svg { color: var(--accent-dark); flex: none; }
.pg-goals-ticks { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.pg-goals-ticks li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--brand); opacity: .85; line-height: 1.7; }
.pg-goals-dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: var(--r-full); background: var(--accent); }

.pg-goals-issues { display: grid; gap: var(--s-5); }
.pg-goals-issue {
  display: flex; gap: var(--s-6); padding: var(--s-6);
  border: 1px solid var(--line-soft); border-radius: var(--r-xl);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pg-goals-issue:hover { border-color: #b69eca; box-shadow: var(--shadow-lg); }
.pg-goals-issue-num {
  flex: none; font-family: var(--f-display); font-size: 2.75rem; font-weight: 800;
  line-height: 1; color: #b69eca;
}
.pg-goals-issue--2 .pg-goals-issue-num { color: var(--brand-mid); }
.pg-goals-issue--3 .pg-goals-issue-num { color: var(--accent); }
.pg-goals-issue h3 { font-size: var(--t-xl); margin: 0 0 var(--s-3); color: var(--brand); }
.pg-goals-issue p { color: var(--brand); opacity: .75; margin: 0; line-height: 1.7; }

@media (max-width: 900px) {
  .pg-goals { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .pg-goals-issue { gap: var(--s-4); }
  .pg-goals-issue-num { font-size: 2rem; }
}

/* Board: a split head (the running text, then the org-chart link and the
   pager) above a grid of members that pages three at a time. */
.pg-board-head { margin-bottom: var(--s-7); }
.pg-board-intro { max-width: 640px; }
.pg-board-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.pg-board-orgchart { border-radius: var(--r-full); border-color: #b69eca; }
.pg-board-orgchart:hover { border-color: var(--brand-mid); background: var(--brand-tint); color: var(--brand-mid); }
.pg-board-nav {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: var(--r-full);
  border: 1px solid #b69eca; background: #fff; color: var(--brand);
  cursor: pointer; transition: transform .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
}
.pg-board-nav:hover { border-color: var(--brand-mid); background: var(--brand-tint); color: var(--brand-mid); transform: translateY(-1px); }
.pg-board-nav:disabled { pointer-events: none; opacity: .3; }

.pg-board-page {
  display: grid; gap: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.pg-board-page[hidden] { display: none; }
.pg-board-card {
  overflow: hidden; border-radius: var(--r-xl); background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pg-board-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pg-board-avatar {
  position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center;
  justify-content: center; overflow: hidden;
  background-image: url('../img/sevgi-eli-mark.png');
  background-repeat: no-repeat; background-position: center; background-size: 55%;
}
.pg-board-avatar::before { content: ''; position: absolute; inset: 0; opacity: .92; }
.pg-board-name {
  position: relative; z-index: 1; max-width: 80%; text-align: center;
  font-family: var(--f-display); font-size: var(--t-lg); font-weight: 700; line-height: 1.3; color: #fff;
}
.pg-board-badge {
  position: absolute; z-index: 1; top: var(--s-4); inset-inline-start: var(--s-4);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(2px);
}
.pg-board-avatar--1::before { background: linear-gradient(135deg, var(--brand), var(--brand-mid)); }
.pg-board-avatar--2::before { background: linear-gradient(135deg, var(--brand-mid), #b69eca); }
.pg-board-avatar--3::before { background: linear-gradient(135deg, var(--brand), var(--accent-dark)); }
.pg-board-avatar--4::before { background: linear-gradient(135deg, var(--accent-dark), var(--brand-mid)); }
.pg-board-avatar--5::before { background: linear-gradient(135deg, #b69eca, var(--brand)); }
.pg-board-avatar--6::before { background: linear-gradient(135deg, var(--brand), #b69eca); }
.pg-board-body { padding: var(--s-6); }
.pg-board-body h3 { font-size: var(--t-lg); margin: 0; color: var(--brand); }
.pg-board-role { font-weight: 700; color: var(--brand-mid); margin: var(--s-2) 0 0; }
.pg-board-body p:last-child { color: var(--brand); opacity: .75; margin: var(--s-3) 0 0; line-height: 1.7; font-size: var(--t-sm); }

.pg-board-dots { display: flex; align-items: center; justify-content: center; gap: var(--s-2); margin-top: var(--s-7); }
.pg-board-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--r-full);
  background: #b69eca; cursor: pointer; font: inherit;
  transition: width .3s ease, background-color .3s ease;
}
.pg-board-dot.is-active { width: 24px; background: var(--brand); }

/* The board's own org-chart snapshot: a fixed dialog opened by the button in
   its header. Same `[hidden]` + `display:flex` rule the photograph viewer's
   `.lb` follows — without it `display:flex` beats `hidden` and a see-through
   panel sits over the page swallowing every click. */
.orgchart-modal {
  position: fixed; inset: 0; z-index: 260;
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: var(--s-5);
}
.orgchart-modal[hidden] { display: none; }
body.orgchart-open { overflow: hidden; }

.orgchart-backdrop { position: fixed; inset: 0; background: rgba(74, 47, 86, .6); backdrop-filter: blur(3px); }
.orgchart-panel {
  position: relative; z-index: 1; width: 100%; max-width: 1400px;
  margin-block: var(--s-6); padding: var(--s-5);
  background: var(--bg-sunk); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.orgchart-close {
  position: absolute; top: var(--s-5); left: var(--s-5); z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: var(--r-full);
  background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.orgchart-close:hover { background: #fff; color: var(--brand-mid); }

.orgchart-head { max-width: 640px; margin: 0 auto; text-align: center; }
.orgchart-head h2 { margin: var(--s-2) 0 0; font-size: var(--t-2xl); color: var(--brand); }
.orgchart-head .pg-rule { margin-inline: auto; }
.orgchart-head p { margin: var(--s-5) 0 0; color: var(--brand); opacity: .8; line-height: 1.7; }

.orgchart-scroll {
  margin-top: var(--s-7); overflow-x: auto; padding: var(--s-5);
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.orgchart-hint { margin: var(--s-4) 0 0; text-align: center; font-size: var(--t-xs); color: var(--brand); opacity: .5; }

/* The tree: plain nested lists joined by CSS-drawn connector lines rather
   than an image, so it reads in any language and needs no artwork. Each
   `li` draws half a top border on either side of its own centre; the first
   and last child round their outer half into the vertical drop instead of
   continuing it, which is what turns a grid of boxes into a chart. */
.org-tree { width: max-content; margin-inline: auto; list-style: none; padding: var(--s-2) var(--s-6) 0; }
.org-tree ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: var(--s-7) 0 0; position: relative; }
.org-tree ul::before {
  content: ''; position: absolute; top: 0; right: 50%;
  width: 0; height: var(--s-7); border-right: 2px solid #b69eca;
}
.org-tree li { display: flex; flex-direction: column; flex-shrink: 0; align-items: center; padding: var(--s-7) var(--s-2) 0; position: relative; }
.org-tree li::before, .org-tree li::after {
  content: ''; position: absolute; top: 0; width: 50%; height: var(--s-7); border-top: 2px solid #b69eca;
}
.org-tree li::before { right: 50%; border-right: 2px solid #b69eca; }
.org-tree li::after { left: 50%; border-left: 2px solid #b69eca; }
.org-tree li:only-child { padding-top: 0; }
.org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
.org-tree li:first-child::after, .org-tree li:last-child::before { border: 0; }
.org-tree li:first-child::before { border-radius: 0 10px 0 0; }
.org-tree li:last-child::after { border-radius: 10px 0 0; }

/* The rounded corner is a physical side (RTL's reading-start is the right),
   so a left-to-right page needs the two ends swapped rather than mirrored
   by a logical property nothing else here uses. */
[dir="ltr"] .org-tree li:first-child::before { border: 0; border-radius: 0; }
[dir="ltr"] .org-tree li:first-child::after { border-left: 2px solid #b69eca; border-radius: 10px 0 0 0; }
[dir="ltr"] .org-tree li:last-child::after { border: 0; border-radius: 0; }
[dir="ltr"] .org-tree li:last-child::before { border-right: 2px solid #b69eca; border-radius: 0 10px 0 0; }

.org-node {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 7.25rem; min-height: 3rem; padding: var(--s-3);
  background: var(--accent); color: var(--brand); border-radius: var(--r-lg);
  font-size: var(--t-xs); font-weight: 700; line-height: 1.3; text-align: center;
  box-shadow: 0 6px 16px rgba(74, 47, 86, .12);
}
.org-node--root {
  width: 10.5rem; min-height: 3.5rem; border-radius: var(--r-lg);
  background: var(--brand); color: #fff; font-size: var(--t-sm);
  box-shadow: 0 10px 24px rgba(74, 47, 86, .35);
}
.org-node--staff {
  width: 6.25rem; min-height: 2.5rem; background: #fff; color: var(--brand);
  border: 2px solid #b69eca; box-shadow: none; font-size: var(--t-xs);
}
.org-node--sub {
  width: 7rem; min-height: 2.5rem; background: var(--bg-sunk); color: var(--brand-mid);
  box-shadow: none; font-size: var(--t-xs);
}

@media (max-width: 640px) {
  .orgchart-panel { padding: var(--s-4); }
}

/* Values: a grid of icon cards. */
.pg-cards {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}
/* Six cards fit the row four-and-two, which leaves a ragged tail. A count
   of six (or three) reads better three across, so the grid asks how many
   there are. Browsers without :has() keep the auto-fit above, which still
   works — it is just less tidy. */
@media (min-width: 861px) {
  .pg-cards:has(> :nth-child(6):last-child),
  .pg-cards:has(> :nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.pg-card {
  background: var(--bg); border: 1px solid var(--line-soft);
  border-radius: var(--r-xl); padding: var(--s-6) var(--s-5);
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pg-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: #b69eca;
}
.pg-card-icon {
  width: 62px; height: 62px; margin: 0 auto var(--s-4);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--brand);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  transition: background .3s ease, color .3s ease, border-radius .3s ease;
}
.pg-card:hover .pg-card-icon {
  background: var(--brand); color: #fff;
  border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
}
.pg-card h3 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.pg-card p { color: var(--ink-2); font-size: var(--t-base); margin: 0; }

/* Figures: a band on the brand colour. */
.pg-stats {
  background: var(--brand-dark); color: #fff;
  position: relative; overflow: hidden;
}
.pg-stats::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(760px 300px at 78% -20%, rgba(138, 52, 72, .6), transparent 70%);
}
.pg-stats .wrap { position: relative; z-index: 2; }
.pg-stats h2 { color: #fff; margin-bottom: var(--s-2); }
.pg-stats .eyebrow { color: #e3cfae; }
.pg-stats-note { color: var(--accent); margin: 0; }

.pg-stat-grid {
  display: grid; gap: var(--s-6);
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: var(--s-7); margin-top: var(--s-6);
}
.pg-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pg-stat-icon { color: var(--accent); opacity: .9; }
.pg-stat-value {
  font-family: var(--f-display); font-size: var(--t-3xl); font-weight: 800;
  color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums;
  direction: ltr; unicode-bidi: isolate;
}
.pg-stat-label { color: rgba(255, 255, 255, .82); font-size: var(--t-md); }
.pg-stat-note { color: rgba(255, 255, 255, .6); font-size: var(--t-sm); }

.center-prose { max-width: 62ch; margin-inline: auto; text-align: center; }

@media (max-width: 900px) {
  .pg-intro { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
  /* The photograph reads better above the words once they stack — the same
     rule home/about.php follows. */
  .pg-intro .pg-figure { order: -1; }
  .pg-figure figcaption {
    position: static; inset: auto; margin-top: var(--s-3); max-width: none; display: block;
  }
}

@media (max-width: 640px) {
  .pg-stat-value { font-size: var(--t-2xl); }
  .pg-card { padding: var(--s-5) var(--s-4); }
}

/* ==========================================================================
   Home page
   --------------------------------------------------------------------------
   The bands of the front page. Each one is a row in `homepage_sections`, so
   these rules style a shape rather than a piece of copy: a band with nothing
   in it is never drawn, and one that is reordered in the admin simply moves.

   Everything here is direction-agnostic — logical properties throughout — so
   the Arabic page mirrors without a second set of rules.
   ========================================================================== */

/* ---- The slider -------------------------------------------------------- */

.home-hero { position: relative; background: var(--brand-dark); overflow: hidden; }

.home-slides {
  position: relative;
  aspect-ratio: 1600 / 560;
  background: var(--brand-dark);
}
.home-slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; visibility: hidden;
  /* The visibility change waits for the fade, so the slide going out stays
     on screen while the one coming in rises over it. Without the delay it
     vanished at once and left a dark gap for six hundred milliseconds. */
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.home-slide.is-active {
  opacity: 1; visibility: visible;
  transition: opacity .6s ease, visibility 0s;
}
/* Whole, not cropped: the artwork carries the headline, and `cover` cuts
   words off it. With the band in the artwork's own shape there is nothing
   to letterbox; an oddly shaped upload is shown complete on the band's
   colour rather than trimmed. */
.home-slide img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
}

/* The artwork carries the headline, so the buttons sit over its foot rather
   than in the middle of it. */
.home-hero-actions {
  position: absolute; inset-inline: 0; bottom: 0;
  padding-block: var(--s-6) var(--s-7);
  background: linear-gradient(to top, rgba(38, 39, 41, .72), rgba(38, 39, 41, 0));
}
.home-hero-actions .cluster { gap: var(--s-3); }

.home-dots {
  position: absolute; inset-inline: 0; bottom: var(--s-3);
  display: flex; justify-content: center; gap: var(--s-2);
}
.home-dot {
  width: 9px; height: 9px; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .45);
  transition: background .2s ease, width .2s ease;
}
.home-dot.is-active { background: var(--accent); width: 22px; }

/* A page banner that cycles, set at Admin -> Page banners.

   The slides and the dots are the home page's own, so there is one slider on
   this site and not two. What differs is the frame: a page banner puts its
   picture *behind* a heading, so the container fills the banner the way any
   `.hero-media` does and the picture keeps the same wash a still one has.
   These rules sit after `.home-slide img` deliberately — that is what they
   are correcting. */
.hero-slides .home-slide { transition: opacity .6s ease, visibility 0s linear .6s; }
.hero-slides .home-slide.is-active { transition: opacity .6s ease, visibility 0s; }
.hero-slides .home-slide img { opacity: .38; }
.hero-dots {
  position: absolute; inset-inline: 0; bottom: var(--s-4); z-index: 3;
  display: flex; justify-content: center; gap: var(--s-2);
}

@media (max-width: 700px) {
  /* The band is only as tall as the artwork allows here, which is not
     enough to hold two stacked buttons over it — so they come out from
     over the picture and sit under it. */
  .home-hero-actions {
    position: static; background: var(--brand-dark);
    padding-block: var(--s-5);
  }
  .home-hero-actions .cluster { flex-direction: column; align-items: stretch; }
  .home-dots { bottom: auto; position: static; padding-block: var(--s-3); background: var(--brand-dark); }
}

/* ---- Who we are -------------------------------------------------------- */

.home-about {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--s-8); align-items: center;
}
/* Matches the reference design: no eyebrow line, no closing link, and the
   heading/copy carry the brand colour rather than the site's neutral ink. */
.home-about .eyebrow { display: none; }
.home-about > div > .btn-brand { display: none; }
.home-about h2 { color: var(--brand); }
.home-about p { color: var(--brand); opacity: .85; }
.home-about-accent {
  display: block; width: 64px; height: 4px; margin-block: var(--s-3) var(--s-5);
  border-radius: var(--r-full); background: var(--accent);
}
.home-about-figure { margin: 0; position: relative; }
.home-about-figure img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
/* The organisation's own line about itself, as a quote card in the photograph's
   corner. Pinned to the physical right on purpose, in both languages. */
.home-about-figure figcaption {
  position: absolute; right: var(--s-5); bottom: var(--s-5);
  max-width: 260px;
  background: rgba(55, 36, 63, .92); color: #fff;
  backdrop-filter: blur(6px);
  font-family: var(--f-display); font-size: var(--t-sm); font-weight: 500; line-height: 1.6;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.home-linkcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-6); }
.home-linkcard {
  display: flex; gap: var(--s-3); align-items: center;
  padding: var(--s-4); border-radius: var(--r-md);
  background: var(--bg-sunk); border: 1px solid var(--line-soft);
  color: inherit;
}
a.home-linkcard:hover { border-color: var(--accent); background: var(--accent-tint); }
.home-linkcard-icon {
  flex: none; width: 38px; height: 38px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
}
.home-linkcard b { display: block; font-size: var(--t-base); }
.home-linkcard em { display: block; font-style: normal; font-size: var(--t-sm); color: var(--ink-2); }

/* ---- What we work on --------------------------------------------------- */

.home-progs-accent {
  display: block; width: 64px; height: 4px; margin-block: var(--s-3) var(--s-5);
  border-radius: var(--r-full); background: var(--accent);
}
/* Two flagship fields run wide, the rest run narrow — see the doc comment
   in programmes.php for why this is nth-child rather than a stored flag. */
.home-progs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-5); }
.home-prog {
  display: block; text-align: start; color: inherit;
  grid-column: span 2; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: transform .25s ease, box-shadow .25s ease;
}
.home-prog:nth-child(-n+2) { grid-column: span 3; }
a.home-prog:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.home-prog-media { display: block; overflow: hidden; aspect-ratio: 16 / 10; }
.home-prog:nth-child(-n+2) .home-prog-media { aspect-ratio: 16 / 9; }
.home-prog-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
a.home-prog:hover .home-prog-media img { transform: scale(1.06); }
.home-prog-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; margin: var(--s-6) 0 0 var(--s-6);
  border-radius: var(--r-full);
  background: var(--brand-tint); color: var(--brand);
}
a.home-prog:hover .home-prog-icon { background: var(--brand); color: #fff; }
.home-prog-body { display: block; padding: var(--s-6); }
.home-prog h3 { font-size: var(--t-lg); margin: 0; }
.home-prog:nth-child(-n+2) h3 { font-size: var(--t-xl); }
.home-prog p { font-size: var(--t-sm); color: var(--ink-2); margin: var(--s-3) 0 0; line-height: 1.6; }
.home-progs-note { margin: var(--s-6) 0 0; font-size: var(--t-xs); color: var(--ink-3); }

/* ---- A humanitarian case ----------------------------------------------- */

/* One card, not a photo beside a card: the photograph bleeds to the card's
   own edge and both columns stretch to the same height, so the taller side
   (usually the text, once the stats are in) sets the row. */
.home-case {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  background: var(--surface); border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.home-case figure { margin: 0; position: relative; }
.home-case figure img {
  width: 100%; height: 100%; min-height: 320px;
  object-fit: cover; display: block;
}
.home-case-content { padding: var(--s-8); display: flex; flex-direction: column; justify-content: center; }
.home-case h3 { margin: 0 0 var(--s-3); font-size: var(--t-2xl); }
.home-case .lede { margin-bottom: var(--s-5); }

/* ---- The four project families ----------------------------------------- */

.home-families { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.home-family {
  display: flex; flex-direction: column; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-family:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.home-family-media { display: block; aspect-ratio: 16 / 9; background: var(--bg-sunk); }
.home-family-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-family-body { display: block; padding: var(--s-5); }
.home-family-body b { display: block; font-family: var(--f-display); font-size: var(--t-lg); margin-bottom: var(--s-2); }
.home-family-body em { display: block; font-style: normal; font-size: var(--t-sm); color: var(--ink-2); }
.home-family-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--s-4); color: var(--brand);
  font-size: var(--t-sm); font-weight: 700;
}
.home-family-cta svg { transition: transform .18s ease; }
.home-family:hover .home-family-cta svg { transform: translateX(3px); }
[dir="rtl"] .home-family-cta svg { transform: scaleX(-1); }
[dir="rtl"] .home-family:hover .home-family-cta svg { transform: scaleX(-1) translateX(3px); }

/* ---- The figures ------------------------------------------------------- */

.home-figures .stat-value { color: #fff; }
.home-figures .stat-label { color: rgba(255, 255, 255, .8); }
.home-figures .stat-icon { color: var(--accent); }

/* ---- The zakat band ---------------------------------------------------- */

.home-zakat {
  display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap;
  padding: var(--s-6) var(--s-7);
  background: var(--accent-tint); border: 1px solid rgba(178, 148, 107, .35);
  border-radius: var(--r-xl);
}
.home-zakat > div { flex: 1 1 22rem; }
.home-zakat h2 { font-size: var(--t-2xl); margin: 0 0 var(--s-2); }
.home-zakat p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.home-zakat-icon {
  flex: none; width: 66px; height: 66px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--accent);
}

/* ---- A section header with a button at the far end, instead of centred -- */

.section-head-split {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--s-5); margin-bottom: var(--s-7);
}
.section-head-split h2 { margin: var(--s-2) 0 0; }
.section-head-split p { margin: var(--s-3) 0 0; max-width: 56ch; color: var(--ink-2); }
.home-case-accent {
  display: block; width: 64px; height: 4px; margin-block: var(--s-3) 0;
  border-radius: var(--r-full); background: var(--accent);
}

/* ---- The typographic hero: gradient, drifting blobs, a dotted ground ---- */

.home-hero--type {
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 45%, var(--bg-sunk) 100%);
  padding-block: var(--s-10) var(--s-9);
  color: var(--ink);
}
.home-hero-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.home-hero-blob {
  position: absolute; border-radius: var(--r-full); filter: blur(60px);
  animation: homeBlobDrift 20s ease-in-out infinite;
}
.home-hero-blob--1 { width: 340px; height: 340px; top: -90px; inset-inline-start: -110px; background: var(--line); opacity: .7; }
.home-hero-blob--2 {
  width: 300px; height: 300px; bottom: -80px; inset-inline-end: -90px; background: var(--brand-mid);
  opacity: .16; animation-duration: 26s; animation-direction: reverse;
}
.home-hero-blob--3 { width: 220px; height: 220px; top: 32%; inset-inline-end: 22%; background: var(--accent); opacity: .12; }
.home-hero-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--brand-mid) 1.6px, transparent 1.6px);
  background-size: 34px 34px; opacity: .14;
}
@keyframes homeBlobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20px, -16px) scale(1.06); }
  66%      { transform: translate(-16px, 12px) scale(.96); }
}

/* Floating light, populated by `initHeroSparkles()` in app.js — fourteen
   spans of random size, position and timing, the organisation's own
   template's own touch on this hero. */
.home-hero-sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.home-hero-sparkle {
  position: absolute;
  border-radius: var(--r-full);
  background: radial-gradient(circle, #ffffff 0%, var(--brand-mid) 60%, transparent 70%);
  animation: homeSparkleFloat linear infinite;
  pointer-events: none;
}
@keyframes homeSparkleFloat {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  20%  { opacity: .9; }
  80%  { opacity: .7; }
  100% { transform: translateY(-120px) scale(.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* Belt and braces: `initHeroSparkles()` already declines to create these
     under the same query, so this only matters if script ran before the
     preference could be read. */
  .home-hero-sparkle { display: none; }
}

.home-hero-grid {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--s-8); align-items: center; padding-block: var(--s-6);
}
.home-hero-copy h1 { font-size: var(--fs-h1); line-height: 1.15; margin: 0; }
.home-hero-accent { color: var(--brand-mid); }

/* The organisation's own template's shimmer: a gradient clipped to the text
   itself and swept across it, rather than a flat accent colour. */
.home-hero-shimmer {
  background: linear-gradient(100deg, var(--brand-mid) 20%, var(--line) 40%, var(--brand) 55%, var(--brand-mid) 70%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: homeHeroShimmer 6s linear infinite;
}
@keyframes homeHeroShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-shimmer { animation: none; color: var(--brand-mid); background: none; }
}

.home-hero-lede { margin-top: var(--s-5); max-width: 46ch; font-size: var(--t-lg); color: var(--ink-2); }
.home-hero-follow { margin-top: var(--s-7); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.home-hero-follow > span { font-weight: 700; font-size: var(--t-sm); color: var(--ink-2); }

/* ---- Social chips: the organisation's own template's circular, floating-
   label buttons. `--light` is this row's own variant — pale and bordered, for
   sitting on the hero's own pale gradient; a `--dark` or `--glass` variant
   would follow the same pattern if another row ever needs one. `initSocialChips()`
   in app.js adds the small magnetic drift toward the pointer. -------------- */
.social-chip {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--r-full);
  transform: translate(var(--chip-x, 0px), calc(var(--chip-y, 0px) - var(--chip-lift, 0px)));
  transition: transform .15s ease-out, background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.social-chip svg { width: 18px; height: 18px; transition: transform .25s ease; }
.social-chip:hover svg, .social-chip:focus-visible svg { transform: scale(1.12); }

/* The name, in a small dark pill above the chip — silent until hovered or
   focused, so the row reads as icons first and names on demand. */
.social-chip::after {
  content: attr(data-label);
  position: absolute; bottom: calc(100% + .5rem); left: 50%;
  translate: -50% 4px; white-space: nowrap;
  background: var(--brand); color: #fff;
  font-size: var(--t-xs); font-weight: 600;
  padding: .3rem .75rem; border-radius: var(--r-full);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, translate .2s ease;
}
.social-chip:hover::after, .social-chip:focus-visible::after { opacity: 1; translate: -50% 0; }

.social-chip--light {
  /* #b69eca is the reference's own lilac-mid — no variable of its own
     anywhere on this site (see CLAUDE.md, "Matching the reference site"),
     so it is the literal hex here too rather than the much paler `--line`,
     which read as a different, washed-out border once measured against the
     reference's own computed style. */
  border: 1px solid #b69eca;
  background: color-mix(in srgb, #fff 65%, transparent);
  color: var(--brand);
}
.social-chip--light:hover, .social-chip--light:focus-visible {
  --chip-lift: 4px;
  background: var(--brand-mid); border-color: var(--brand-mid); color: #fff;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent),
              0 10px 20px color-mix(in srgb, var(--brand) 25%, transparent);
  outline: none;
}
@media (prefers-reduced-motion: reduce) {
  .social-chip { transform: none !important; transition: color .25s ease, border-color .25s ease, background-color .25s ease; }
}

/* ---- The two hero buttons: a solid ask with a shine that sweeps across on
   hover, and a quieter outline beside it — the organisation's own template's
   own pair, kept apart from the site-wide `.btn-*` family so tuning one does
   not move every button on the site. ---------------------------------------- */
.home-hero-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center;
  padding: 0.95rem 1.85rem; border-radius: var(--r-full);
  font-size: var(--t-lg); font-weight: 700;
  transition: transform .3s ease, background-color .3s ease, border-color .3s ease;
}
.home-hero-btn:hover { transform: translateY(-2px); }
.home-hero-btn:active { transform: translateY(0); }
.home-hero-btn-label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.home-hero-btn--primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--brand) 30%, transparent);
}
.home-hero-btn--primary:hover { background: var(--brand-mid); }
.home-hero-btn-shine {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to left, transparent, rgba(255, 255, 255, .28), transparent);
  transform: translateX(-100%);
  transition: transform .7s ease;
}
.home-hero-btn--primary:hover .home-hero-btn-shine { transform: translateX(100%); }
.home-hero-btn--outline {
  background: rgba(255, 255, 255, .5); color: var(--brand);
  border: 2px solid var(--line);
}
.home-hero-btn--outline:hover { background: #fff; border-color: var(--brand-mid); }
@media (prefers-reduced-motion: reduce) {
  .home-hero-btn, .home-hero-btn-shine { transition: none; }
}

/* ---- The looping video (or an admin's own slides), on its own floating,
   framed card — the organisation's own template's presentation of it. ------ */
.home-hero-visual { position: relative; }
.home-hero-float { position: relative; animation: homeHeroFloat 6s ease-in-out infinite; }
@keyframes homeHeroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-float { animation: none; }
}
/* The offset card behind it — the organisation's own template's frame,
   peeking out from the corner rather than a plain border on the card itself. */
.home-hero-media-frame {
  position: absolute; inset: 0; z-index: 0;
  transform: translate(16px, 16px);
  border: 2px solid var(--line); border-radius: var(--r-xl);
}
.home-hero-media {
  position: relative; z-index: 1;
  aspect-ratio: 4 / 3; background: var(--bg-sunk);
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 1100px) { .home-hero-media { aspect-ratio: 16 / 11; } }
.home-hero-visual .home-slides { position: absolute; inset: 0; }
.home-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* The brand tint every photograph on this card sits under, so a bright video
   frame or an editor's own photograph both read as part of this site. */
.home-hero-media-shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--brand) 25%, transparent), transparent 65%);
}
.home-hero-visual .home-dots { position: static; margin-top: var(--s-4); }
.home-hero-visual .home-dot { background: var(--line); }
.home-hero-visual .home-dot.is-active { background: var(--brand-mid); }

/* ---- Vision / mission panels under "who we are" ------------------------ */

.home-about-panels {
  margin-top: var(--s-8); display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-5);
}
.home-about-panel { border-radius: var(--r-xl); padding: var(--s-6); grid-column: span 3; }
.home-about-panel--brand {
  grid-column: span 2; background: var(--brand); color: var(--line-soft);
  position: relative; overflow: hidden;
}
/* The mark, faint, behind the panel's own words. */
.home-about-panel--brand::before {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 160px; height: 160px; pointer-events: none;
  background: url("../img/sevgi-eli-mark.png") no-repeat center / contain;
  opacity: .12;
}
.home-about-panel--brand > * { position: relative; z-index: 1; }
.home-about-panel--tint  { background: var(--bg-sunk); }
.home-about-panel h3 { font-size: var(--t-xl); margin: var(--s-3) 0 0; }
.home-about-panel--brand h3 { color: #fff; }
.home-about-panel p { margin: var(--s-4) 0 0; line-height: 1.7; }
.home-about-panel--brand p { color: rgba(255, 255, 255, .85); font-weight: 300; font-size: var(--t-lg); }
.home-about-panel-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .12); color: #fff;
}
.home-about-panel-icon--accent { background: var(--accent-tint); color: var(--accent-dark); }
.home-about-goal {
  display: flex; align-items: center; gap: var(--s-2);
  font-weight: 700; color: var(--accent-dark); margin-top: var(--s-4) !important;
}

/* ---- Programme cards: a bullet-less description plus tag pills -------- */

.home-prog-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.home-prog-tags li {
  background: var(--brand-tint); color: var(--brand-mid);
  font-size: var(--t-xs); font-weight: 700; padding: 4px var(--s-3); border-radius: var(--r-full);
}
.home-prog-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-5);
  font-size: var(--t-sm); font-weight: 700; color: var(--brand-mid);
}
.home-prog-cta svg { transition: transform .18s ease; }
a.home-prog:hover .home-prog-cta svg { transform: translateX(-3px); }
[dir="rtl"] a.home-prog:hover .home-prog-cta svg { transform: translateX(3px); }

/* A programme's own dialog: the same card content, at full length, with a
   photograph and a way straight into giving to the project behind it. One
   dialog, its content swapped in per card by `initFieldModal()` — see
   `data-field-*` in home/programmes.php. Same `[hidden]` + `display:flex`
   rule the photograph viewer's `.lb` follows. */
.field-modal {
  position: fixed; inset: 0; z-index: 260;
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: var(--s-5);
}
.field-modal[hidden] { display: none; }
body.field-modal-open { overflow: hidden; }

.field-backdrop { position: fixed; inset: 0; background: rgba(74, 47, 86, .6); backdrop-filter: blur(3px); }
.field-panel {
  position: relative; z-index: 1; width: 100%; max-width: 640px;
  margin-block: var(--s-6); overflow: hidden;
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.field-close {
  position: absolute; top: var(--s-5); left: var(--s-5); z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: var(--r-full);
  background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.field-close:hover { color: var(--brand-mid); }

.field-media { position: relative; aspect-ratio: 16 / 9; background: var(--bg-sunk); }
.field-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.field-media img[hidden] { display: none; }
.field-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(74, 47, 86, .7), transparent 60%);
}

.field-body { padding: var(--s-6) var(--s-7); }
.field-body h3 { font-size: var(--t-2xl); margin: 0; color: var(--brand); }
.field-body .pg-rule { margin-inline-start: 0; }
.field-body p { margin: var(--s-5) 0 0; color: var(--brand); opacity: .8; line-height: 1.7; }
.field-body .home-prog-tags { margin-top: var(--s-5); }
#field-modal-cta { margin-top: var(--s-6); }
#field-modal-cta[hidden] { display: none; }

/* ---- "معرض الوسائط" (/gallery): a grid of documented moments, after the
   reference's gallery.html — the same rounded, lifting photograph tiles, with
   a title/type/date panel added over each one and a slider or a film behind
   the click, rather than the reference's own single flat image. ----------- */

.gal-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.gal-card {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 1 / 1; border-radius: var(--r-xl); border: none; padding: 0;
  background: var(--bg-sunk); font: inherit; text-align: start; cursor: default;
  box-shadow: 0 1px 2px rgba(74, 47, 86, .1);
  transition: transform .3s ease, box-shadow .3s ease;
}
button.gal-card { cursor: pointer; }
button.gal-card:hover, button.gal-card:focus-visible {
  transform: translateY(-4px); box-shadow: 0 14px 26px -10px rgba(74, 47, 86, .3); outline: none;
}
.gal-card-media { display: block; position: relative; width: 100%; height: 100%; }
.gal-card-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
button.gal-card:hover .gal-card-media img, button.gal-card:focus-visible .gal-card-media img {
  transform: scale(1.06);
}
.gal-card-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(38, 22, 45, .92) 0%, rgba(38, 22, 45, .35) 45%, transparent 75%);
}
.gal-card-info {
  position: absolute; inset-inline: 0; bottom: 0; padding: var(--s-4);
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  color: #fff; text-align: start;
}
.gal-badge {
  display: inline-block; padding: 3px 12px; border-radius: var(--r-full);
  background: var(--accent); color: var(--brand); font-size: var(--t-xs); font-weight: 700;
}
.gal-card-title {
  display: flex; align-items: flex-start; gap: 6px;
  font-weight: 700; font-size: var(--t-base); line-height: 1.4;
}
.gal-card-title svg { width: 14px; height: 14px; flex: none; margin-block-start: 3px; }
.gal-card-title-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gal-card-date {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-xs); color: rgba(255, 255, 255, .8);
}
.gal-card-date svg { width: 13px; height: 13px; flex: none; }

/* ---- The dialog: a film, or a slider through one item's own photographs -- */

.gal-modal {
  position: fixed; inset: 0; z-index: 260;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: var(--s-5);
}
.gal-modal[hidden] { display: none; }
body.gal-modal-open { overflow: hidden; }

.gal-backdrop { position: fixed; inset: 0; background: rgba(74, 47, 86, .85); backdrop-filter: blur(4px); }
.gal-panel { position: relative; z-index: 1; width: 100%; max-width: 900px; margin-block: var(--s-6); }
.gal-close {
  position: absolute; top: calc(-1 * var(--s-4)); left: calc(-1 * var(--s-4));
  z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: var(--r-full);
  background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.gal-close:hover { color: var(--brand-mid); }

.gal-stage { position: relative; display: flex; align-items: center; justify-content: center; }
.gal-stage[hidden] { display: none; }
#gal-modal-img {
  display: block; max-height: 75vh; max-width: 100%; width: auto; height: auto;
  margin-inline: auto; border-radius: var(--r-xl); object-fit: contain;
  box-shadow: var(--shadow-lg); background: rgba(0, 0, 0, .2);
}
.gal-video-frame {
  width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg);
}
.gal-video-frame iframe, .gal-video-frame video { display: block; width: 100%; height: 100%; border: 0; background: #000; }

.gal-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: none; border-radius: var(--r-full);
  background: rgba(255, 255, 255, .92); color: var(--brand); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: background-color .16s ease, transform .16s ease;
}
.gal-nav:hover { background: #fff; }
.gal-nav[hidden] { display: none; }
.gal-nav svg { width: 20px; height: 20px; }
.gal-nav--prev { inset-inline-start: var(--s-4); }
.gal-nav--next { inset-inline-end: var(--s-4); }

.gal-caption { margin: var(--s-5) 0 0; text-align: center; color: #ece4f1; }

@media (max-width: 640px) {
  .gal-nav { width: 38px; height: 38px; }
  .gal-close { top: var(--s-3); inset-inline-start: var(--s-3); }
}

/* ---- Success stories: a featured card, its stats, two supporting cards - */

/* The reference's own palette: headings and body copy carry the brand
   violet rather than the site's neutral ink, at less opacity for anything
   secondary — exactly the treatment already used on "about". */
#stories h2, #stories h3 { color: var(--brand); }
#stories .section-head-split .btn-outline {
  color: var(--brand); background: var(--surface); border-color: #b69eca;
}
#stories .section-head-split .btn-outline:hover { border-color: var(--brand-mid); background: var(--brand-tint); }
#stories .section-head-split p,
.home-case .lede { color: var(--brand); opacity: .8; }
.home-case-storycard p { color: var(--brand); opacity: .75; }
.home-case-stat:first-child .num { color: var(--accent-dark); }
.home-case-stat:last-child .num { color: var(--brand-mid); }
/* Pinned to the physical right, in both languages, like the "about" photo's
   caption card — not the reading-direction end. */
.home-case .btn-ghost { color: var(--brand-mid); align-self: flex-start; margin-left: auto; }

.home-case-badge {
  position: absolute; top: var(--s-4); right: var(--s-4);
  background: var(--accent); color: var(--brand);
  font-size: var(--t-xs); font-weight: 700; padding: 6px var(--s-4); border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
}
.home-case figure { position: relative; }
.home-case-stats { display: flex; flex-wrap: wrap; gap: var(--s-6); margin: var(--s-6) 0; }
.home-case-stat p:first-child { font-size: var(--t-2xl); font-weight: 700; margin: 0; }
.home-case-stat p:last-child { font-size: var(--t-sm); color: var(--ink-2); margin: var(--s-1) 0 0; }
.home-case-stat + .home-case-stat { border-inline-start: 1px solid var(--line); padding-inline-start: var(--s-6); }

.home-case-stories { margin-top: var(--s-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.home-case-storycard {
  display: flex; gap: var(--s-5); align-items: flex-start; padding: var(--s-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.home-case-storycard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.home-case-storycard img { width: 96px; height: 96px; border-radius: var(--r-lg); object-fit: cover; flex: none; }
.home-case-storycard-icon {
  flex: none; width: 56px; height: 56px; border-radius: var(--r-lg);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand-mid);
}
.home-case-storycard h3 { font-size: var(--t-md); margin: 0; }
.home-case-storycard p { font-size: var(--t-sm); margin: var(--s-2) 0 0; }

/* ---- News: one featured article beside a compact scrolling list -------- */

.home-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); align-items: stretch; }
.home-news-featured {
  display: flex; flex-direction: column; border-radius: var(--r-xl); overflow: hidden;
  background: var(--bg-sunk); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.home-news-featured-media { position: relative; display: block; aspect-ratio: 16 / 10; }
.home-news-featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-news-date {
  position: absolute; top: var(--s-4); inset-inline-end: var(--s-4);
  background: rgba(255, 255, 255, .95); color: var(--ink);
  font-weight: 700; font-size: var(--t-sm); padding: 6px var(--s-3); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.home-news-kicker {
  position: absolute; bottom: var(--s-4); inset-inline-start: var(--s-4);
  background: var(--accent); color: var(--brand-dark);
  font-size: var(--t-xs); font-weight: 700; padding: 6px var(--s-4); border-radius: var(--r-full);
}
.home-news-featured-body { padding: var(--s-6); flex: 1; display: flex; flex-direction: column; }
.home-news-featured-body h3 { font-size: var(--t-xl); margin: 0; line-height: 1.35; }
.home-news-featured-body h3 a { color: inherit; }
.home-news-featured-body p { margin: var(--s-4) 0 0; color: var(--ink-2); flex: 1; }
.home-news-more { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-5); font-weight: 700; color: var(--brand-mid); align-self: flex-start; }

.home-news-list {
  display: flex; flex-direction: column; gap: var(--s-3);
  max-height: 34rem; overflow-y: auto; padding-inline-end: var(--s-2);
}
.home-news-row {
  display: flex; gap: var(--s-4); padding: var(--s-3);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: background .18s ease, border-color .18s ease;
}
.home-news-row:hover { background: var(--bg-sunk); border-color: var(--brand-mid); }
.home-news-row img { width: 96px; height: 76px; border-radius: var(--r-md); object-fit: cover; flex: none; }
.home-news-row-meta { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-xs); }
.home-news-row-meta span:first-child { color: var(--accent-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.home-news-row-meta span:last-child { color: var(--ink-3); }
.home-news-row h4 { margin: var(--s-1) 0 0; font-size: var(--t-base); line-height: 1.4; font-weight: 600; }

/* ---- Closing ask: a verse, then the funding-source tiles ----------------
   After the reference's #donate band: the brand colour, the mark very faint off
   the top corner, a centred intro, four glass tiles and one button. */

.home-cta {
  position: relative; overflow: hidden;
  background: var(--brand); color: #ece4f1;
  padding-block: 5rem;
}
@media (min-width: 1024px) { .home-cta { padding-block: 7rem; } }

/* Physical `right`, as the reference has it: the mark is decoration and sits in
   the same corner in every language. */
.home-cta-watermark {
  position: absolute; top: -6rem; right: -6rem;
  width: 24rem; height: 24rem; object-fit: contain;
  opacity: .06; pointer-events: none;
}
.home-cta-wrap { position: relative; max-width: 80rem; padding-inline: clamp(1rem, 3vw, 2rem); }

.home-cta-intro { max-width: 48rem; margin: 0 auto; text-align: center; }
.home-cta-verse { font-size: 1.125rem; font-weight: 300; color: #b69eca; margin: 0; }
.home-cta-intro h2 {
  margin: 1.5rem 0 0; color: inherit; font-weight: 600; line-height: 1.375;
  font-size: 1.875rem;
}
@media (min-width: 768px)  { .home-cta-intro h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .home-cta-intro h2 { font-size: 3rem; } }
.home-cta-accent { color: #b69eca; }
.home-cta-lede { margin: 1.5rem 0 0; font-size: 1.125rem; line-height: 1.625; color: rgba(236, 228, 241, .85); }

.home-cta-tiles {
  margin-top: 3.5rem; display: grid; gap: 1.25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.home-cta-tile {
  background: rgba(255, 255, 255, .07); border-radius: 1.5rem; padding: 1.5rem;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background-color .3s ease;
}
.home-cta-tile:hover { background: rgba(255, 255, 255, .12); }
.home-cta-tile-icon { color: var(--accent); display: inline-flex; }
.home-cta-tile-icon svg { width: 2rem; height: 2rem; }
.home-cta-tile h3 { color: inherit; font-size: 1.125rem; font-weight: 600; margin: 1rem 0 0; }
.home-cta-tile p { color: rgba(236, 228, 241, .75); font-size: 15px; line-height: 1.625; margin: .5rem 0 0; }

.home-cta-action { margin-top: 3.5rem; text-align: center; }
.home-cta-button {
  display: inline-block; padding: 1rem 2.5rem; border-radius: 9999px;
  background: var(--accent); color: var(--brand) !important;
  font-size: 1.25rem; font-weight: 700; line-height: 1.5;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .25), 0 8px 10px -6px rgba(0, 0, 0, .25);
  transition: transform .3s ease, background-color .3s ease;
}
.home-cta-button:hover { background: #fff; transform: translateY(-2px); }
.home-cta-button:active { transform: scale(.98); }
.home-cta-note { margin: 1rem 0 0; font-size: .875rem; color: rgba(236, 228, 241, .6); }

@media (max-width: 1000px) { .home-cta-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .home-cta-tiles { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .home-cta-button, .home-cta-tile { transition: none; }
  .home-cta-button:hover { transform: none; }
}
/* ---- Narrower screens -------------------------------------------------- */

@media (max-width: 1000px) {
  .home-progs, .home-families { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-prog, .home-prog:nth-child(-n+2) { grid-column: span 1; }
  .home-hero-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .home-hero-copy { order: 1; }
  .home-hero-visual { order: 0; max-width: 26rem; margin-inline: auto; }
  .home-hero-lede { margin-inline: auto; }
  .home-hero-follow { justify-content: center; }
  .home-about-panels { grid-template-columns: minmax(0, 1fr); }
  .home-about-panel, .home-about-panel--brand { grid-column: span 1; }
  .home-news { grid-template-columns: minmax(0, 1fr); }
  .home-news-list { max-height: none; }
}

@media (max-width: 860px) {
  .home-about { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .home-case { grid-template-columns: minmax(0, 1fr); }
  /* The photograph reads better above the words once they stack. */
  .home-about-figure, .home-case figure { order: -1; }
  .home-case figure img { min-height: 220px; }
  .home-zakat { padding: var(--s-5); }
  .home-case-stories { grid-template-columns: minmax(0, 1fr); }
  .section-head-split { align-items: flex-start; }
}

@media (max-width: 560px) {
  .home-progs, .home-families, .home-linkcards { grid-template-columns: minmax(0, 1fr); }
  .home-about-figure figcaption {
    position: static; inset: auto; margin-top: var(--s-3); max-width: none; display: block;
  }
  .home-case-stat + .home-case-stat { border-inline-start: 0; padding-inline-start: 0; }
  .home-news-row { flex-direction: column; }
  .home-news-row img { width: 100%; height: 140px; }
}

/* ---- Lede, checklist and callout ---------------------------------------
   Three more ways a CMS section can be drawn. Added for the development
   stages page, but nothing on them is specific to it: any page can use them
   from the layout menu in the admin. */

.pg-lede { max-width: 62ch; margin-inline: auto; text-align: center; }
.pg-lede h2 { margin: 0 0 var(--s-3); }
.pg-lede .pg-rule { margin-inline: auto; }
.pg-lede .prose { color: var(--ink-2); }
.pg-lede .prose p:last-child { margin-bottom: 0; }
/* The line a page closes on: the same words as the body, said with weight. */
.pg-lede-close {
  margin: var(--s-4) 0 0;
  font-family: var(--f-display); font-weight: 700;
  color: var(--brand); font-size: var(--t-lg);
}
.pg-lede-cta { margin: var(--s-6) 0 0; }

.pg-checklist {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: var(--s-8); align-items: center;
}
.pg-checklist .prose { color: var(--ink-2); }
.pg-checklist .prose p:last-child { margin-bottom: 0; }

.pg-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.pg-ticks li {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.pg-tick {
  flex: none; width: 30px; height: 30px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-tint); color: var(--green);
}
.pg-ticks b { display: block; font-size: var(--t-md); }
.pg-ticks em { display: block; font-style: normal; font-size: var(--t-sm); color: var(--ink-2); }

/* The closing ask: a panel rather than a full-width band, so it reads as an
   invitation at the end of the page and not as another section of it. */
.pg-callout {
  text-align: center; padding: var(--s-8) var(--s-6);
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.pg-callout h2 { color: var(--brand); margin: 0 0 var(--s-3); font-size: var(--t-2xl); }
.pg-callout p { color: var(--ink-2); max-width: 56ch; margin: 0 auto var(--s-6); }
.pg-callout .prose { max-width: 56ch; margin-inline: auto; margin-bottom: var(--s-6); }

/* The source gives each card in a row one of three accents in turn. The cycle
   is design rather than data, so it lives here and no editor has to pick a
   colour per card. */
.pg-card::after {
  content: ""; display: block; width: 30px; height: 2px;
  margin: var(--s-3) auto 0; border-radius: var(--r-full);
  background: var(--accent);
}
.pg-card:nth-child(3n+2)::after { background: var(--green); }
.pg-card:nth-child(3n)::after   { background: var(--brand); }

@media (max-width: 860px) {
  .pg-checklist { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}

/* ---- The project page ---------------------------------------------------
   A project is not a fundraising appeal, and its page is shaped after the
   charity's own: a photographic banner, the overview and objectives in the
   reading column, and the project's facts, its film and one donate button
   beside them. */

/* The banner is the site's banner (`.page-hero page-hero--media`). A detail
   page names one thing — a project, an article, a case — so its heading is
   allowed to be bigger than a listing's; that is all this class now does. */
.pj-hero h1 { margin: var(--s-3) 0 0; font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.7rem); }
.pj-hero > .wrap > p { margin: var(--s-3) 0 0; }

.pj-layout {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: var(--s-8); align-items: start;
}
.pj-main { display: grid; gap: var(--s-6); }

.pj-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: var(--s-7);
}
.pj-card > h2 {
  font-size: var(--t-xl); color: var(--brand); margin: 0 0 var(--s-5);
  padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-soft);
}
.pj-card .prose:last-child > :last-child { margin-bottom: 0; }

/* The challenge the project answers, set apart from the overview. */
.pj-challenge {
  margin-top: var(--s-6); padding: var(--s-5);
  background: var(--green-tint); border-inline-start: 3px solid var(--green);
  border-radius: var(--r-md);
}
.pj-challenge h3 { margin: 0 0 var(--s-2); font-size: var(--t-md); color: var(--green); }
.pj-challenge p { margin: 0; color: var(--ink-2); }

.pj-objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.pj-objectives li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--ink-2); }
.pj-bullet {
  flex: none; width: 26px; height: 26px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint, #f6efe4); color: var(--accent);
}

.pj-side { display: grid; gap: var(--s-5); position: sticky; top: 92px; }
.pj-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: var(--s-6);
}
.pj-panel > h3 { margin: 0 0 var(--s-4); font-size: var(--t-md); }
.pj-panel--give { background: var(--bg-sunk); text-align: center; }
/* A project given a figure to raise reports against it in the shape a
   sponsorship's page already uses: the total, the bar, then the per-cent
   and what is still needed. */
.pj-panel--fund { display: grid; gap: var(--s-4); }
.pj-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-4); padding: 0.3rem 0.7rem;
  border-radius: var(--r-full); background: var(--brand); color: #fff;
  font-size: var(--t-xs); font-weight: 700;
}

.pj-facts { margin: 0; display: grid; gap: var(--s-3); }
.pj-facts > div {
  display: flex; justify-content: space-between; gap: var(--s-4);
  align-items: baseline; padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-soft);
}
.pj-facts > div:last-child { padding-bottom: 0; border-bottom: 0; }
.pj-facts dt {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--ink-3); font-size: var(--t-sm); font-weight: 600; margin: 0;
}
.pj-facts dd { margin: 0; font-weight: 700; text-align: end; }

/* The film keeps its shape while it loads, so the panel does not jump. */
.pj-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--bg-sunk); }
.pj-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 900px) {
  .pj-layout { grid-template-columns: minmax(0, 1fr); }
  .pj-side { position: static; }
  .pj-card { padding: var(--s-5); }
}

/* ---- News and initiatives ----------------------------------------------- */

/* The meta line under an article's headline, on the photographic banner. */
.news-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5); color: rgba(255,255,255,.88);
  font-size: var(--t-sm); font-weight: 600;
}
.news-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }

.news-gallery-title {
  margin: var(--s-8) 0 var(--s-5); font-size: var(--t-xl); color: var(--brand);
  padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-soft);
}
.news-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s-4); }
.news-gallery figure { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-sunk); }
.news-gallery img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* An initiative reads as one document: the five parts of it, stacked. */
.in-sections { display: grid; gap: var(--s-6); }
.in-nav {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  padding-bottom: var(--s-5); margin-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}
.in-nav a {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.45rem 0.85rem; border-radius: var(--r-full);
  background: var(--bg-sunk); color: var(--ink-2);
  font-size: var(--t-sm); font-weight: 700;
}
.in-nav a:hover { background: var(--brand); color: #fff; }

.in-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.in-list li { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--ink-2); }
.in-list li::before {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.5rem;
  border-radius: var(--r-full); background: var(--accent);
}

/* ---- Reports and achievements ------------------------------------------- */

/* The two jump buttons, sitting on the seam under the banner. */
.rp-jump { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: var(--s-5); }
.rp-jump .cluster { justify-content: center; }

.rp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s-5); }
/* The figure cards are the about-us page's `.pg-card` wearing a number: the
   same ground and border, the same icon blob that morphs on hover, and the
   same short rule underneath cycling the three accents along the row. Drawn
   here rather than by reusing the class because the contents differ — a
   figure and its label, not a heading and a paragraph. */
.rp-stat {
  text-align: center; padding: var(--s-6) var(--s-5);
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r-xl);
}
/* `.rp-stat .rp-stat-icon`, not `.rp-stat-icon`: the label below is a plain
   `<span>`, so `.rp-stat span` matches this span too and, being the heavier
   selector, was painting the icon in the label's grey. */
.rp-stat .rp-stat-icon {
  display: flex; align-items: center; justify-content: center;
  width: 62px; height: 62px; margin: 0 auto var(--s-4);
  background: var(--accent-tint); color: var(--brand);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  transition: background .3s ease, color .3s ease, border-radius .3s ease;
}
.rp-stat:hover .rp-stat-icon {
  background: var(--brand); color: #fff;
  border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
}
.rp-stat b {
  display: block; font-family: var(--f-display); font-weight: 800;
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); color: var(--brand); line-height: 1.1;
}
.rp-stat span { display: block; margin-top: var(--s-2); color: var(--ink-2); font-weight: 600; }
.rp-stat::after {
  content: ""; display: block; width: 30px; height: 2px;
  margin: var(--s-3) auto 0; border-radius: var(--r-full);
  background: var(--accent);
}
.rp-stat:nth-child(3n+2)::after { background: var(--green); }
.rp-stat:nth-child(3n)::after   { background: var(--brand); }

/* The same breathing room `.pg-card` takes back on a narrow screen. */
@media (max-width: 860px) {
  .rp-stat { padding: var(--s-5) var(--s-4); }
}

/* The journey: a rule down the side with a year marking each turn. */
.rp-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.rp-timeline li {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--s-5);
  align-items: start;
}
.rp-year {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.35rem 0.6rem; border-radius: var(--r-full);
  background: var(--brand); color: #fff;
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-sm);
}
.rp-entry {
  padding: var(--s-5) var(--s-6);
  background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent); border-radius: var(--r-lg);
}
.rp-entry h3 { margin: 0 0 var(--s-2); font-size: var(--t-md); color: var(--brand); }
.rp-entry p { margin: 0; color: var(--ink-2); }

.rp-card {
  position: relative; display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-7) var(--s-6); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-xl);
}
.rp-card-year {
  position: absolute; inset-block-start: var(--s-5); inset-inline-end: var(--s-5);
  font-family: var(--f-display); font-weight: 800; font-size: var(--t-2xl);
  color: var(--line); line-height: 1;
}
.rp-card h3 { margin: 0; font-size: var(--t-lg); padding-inline-end: 4rem; }
.rp-card-period {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin: 0; color: var(--ink-3); font-size: var(--t-sm); font-weight: 600;
}
.rp-card-figures {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3); margin: var(--s-2) 0;
  padding: var(--s-4) 0; border-block: 1px solid var(--line-soft);
}
.rp-card-figures > div { text-align: center; }
.rp-card-figures dt {
  font-family: var(--f-display); font-weight: 800; font-size: var(--t-lg); color: var(--brand);
}
.rp-card-figures dd { margin: 0; font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }
.rp-card-text { margin: 0; color: var(--ink-2); font-size: var(--t-sm); }
.rp-card .btn { margin-top: auto; align-self: flex-start; }

@media (max-width: 600px) {
  .rp-timeline li { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .rp-year { justify-self: start; }
}

/* ---- Areas of work ------------------------------------------------------ */

.wa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--s-5); }
/* Six countries fit the row four-and-two, which leaves a ragged tail; the
   source runs them three across, and so does this above 980px. */
@media (min-width: 980px) { .wa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wa-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-xl); background: var(--brand-dark); color: #fff;
  box-shadow: var(--shadow-sm);
}
.wa-card img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .45s ease; opacity: .55;
}
a.wa-card:hover img { transform: scale(1.05); }
/* The name and the work sit on the photograph, so the picture needs a floor. */
.wa-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(38,10,17,.15) 30%, rgba(38,10,17,.9) 100%);
}
.wa-body {
  position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 1;
  padding: var(--s-6) var(--s-5) var(--s-5);
}
.wa-body h3 { margin: 0 0 var(--s-2); color: #fff; font-size: var(--t-xl); }
.wa-body p { margin: 0; color: rgba(255,255,255,.86); font-size: var(--t-sm); }
.wa-more {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-3); font-size: var(--t-sm); font-weight: 700; color: var(--accent);
}

/* ---- The organisation chart ---------------------------------------------
   A real tree of nested lists rather than a picture: it reads in either
   direction, it resizes, and a screen reader can follow it. Depth chooses the
   colour, which is why a row stores none. */

.org-chart { overflow-x: auto; padding-block: var(--s-4); }
.org-root, .org-children { list-style: none; margin: 0; padding: 0; }
.org-root { display: grid; gap: var(--s-4); justify-items: center; }
.org-root > li { display: grid; justify-items: center; gap: var(--s-4); width: 100%; }

.org-children {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--s-4); width: 100%;
}
.org-children > li { display: grid; justify-items: center; gap: var(--s-3); }
/* A short stem so the levels read as connected without drawing a diagram. */
.org-children > li::before {
  content: ""; display: block; width: 2px; height: var(--s-4);
  background: var(--line); border-radius: var(--r-full);
}

.org-card {
  display: inline-flex; align-items: center; gap: var(--s-3);
  padding: 0.7rem 1.1rem; border-radius: var(--r-lg);
  font-weight: 700; text-align: start; box-shadow: var(--shadow-sm);
}
.org-l0 { background: #1e6b8f; color: #fff; }
.org-l1 { background: var(--accent); color: #fff; }
.org-l2 { background: var(--brand); color: #fff; font-weight: 600; }
.org-icon { display: inline-flex; opacity: .85; }
.org-text b { display: block; font-size: var(--t-base); }
.org-text em {
  display: block; font-style: normal; font-weight: 500;
  font-size: var(--t-xs); opacity: .85; margin-top: 2px;
}

@media (max-width: 700px) {
  .org-children { flex-direction: column; align-items: center; }
}

/* ---- Humanitarian cases -------------------------------------------------- */

.hc-urgent {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.15rem 0.55rem; border-radius: var(--r-full);
  background: #fdecec; color: #b3261e; font-weight: 700; font-size: var(--t-xs);
}
.hc-raised {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin: 0; color: var(--green); font-weight: 700; font-size: var(--t-sm);
}

/* The listing card, matched against localhost/sevgieli/cases.html: rounder
   corners and a longer hover lift than the shared `.card`, a pale-lilac fund
   bar track rather than the site's neutral line colour, and one pill-shaped
   button rather than the shared `.btn`'s own corners. */
.hc-card { border-radius: 24px; }
.hc-card.card-hover:hover { transform: translateY(-6px); }
.hc-fundbar .hcd-bar { background: var(--bg-sunk); }
.hc-fundbar .hcd-left { color: var(--brand); opacity: .7; }
.hc-give { border-radius: var(--r-full); padding: 0.9rem 1.75rem; }
.hc-give:hover { background: var(--brand-mid); }

/* The reference's listing banner (`partials/ref-hero.php`, used by the cases
   and the news): violet-deep with drifting blobs and the mark faint in the
   corner — the same treatment `.home-cta` gives the front page's closing
   band — set as the source sets it: pt-32/pb-20 (lg:pt-40/lg:pb-28), text in
   its own computed `text-lilac-pale` (#ece4f1 — not the darker `--bg-sunk`
   the token maps to as a background), a 36/48/60px semibold heading, and a
   18/20px subtitle at 85% opacity in a 42rem column. Scoped to this hero so
   every other `.page-hero` is untouched. */
.page-hero.ref-hero { background: var(--brand); color: #ece4f1; }
.page-hero.ref-hero:not(.page-hero--media)::after { display: none; }
.ref-hero-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ref-hero-blob { position: absolute; border-radius: 9999px; filter: blur(64px); pointer-events: none; animation: refBlobDrift 18s ease-in-out infinite; }
/* Physical left/right, as the source pins them (-left-24, -right-32). */
.ref-hero-blob--1 { top: -6rem; left: -6rem; width: 24rem; height: 24rem; background: rgba(135,104,169,.2); }
.ref-hero-blob--2 { right: -8rem; bottom: 0; width: 20rem; height: 20rem; background: rgba(124,179,66,.1); animation-duration: 24s; animation-direction: reverse; }
@keyframes refBlobDrift { 0%, 100% { transform: translate(0) scale(1); } 33% { transform: translate(24px, -18px) scale(1.08); } 66% { transform: translate(-18px, 14px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .ref-hero-blob { animation: none; } }
.page-hero.ref-hero .breadcrumb + h1 { margin-top: 20px; }
.ref-pill { vertical-align: top; display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 6px 16px; border-radius: 9999px; background: rgba(255,255,255,.1); color: #b69eca; font-size: 14px; font-weight: 600; line-height: 20px; }
.ref-hero-watermark {
  /* Physical left, not inline-start: the source pins this to the left edge
     regardless of reading direction, and it is purely decorative. */
  position: absolute; left: 0; bottom: 0; z-index: 0;
  width: 16rem; height: 16rem; object-fit: contain; opacity: .07; pointer-events: none;
}
.page-hero.ref-hero .wrap { padding-block: 128px 80px; }
.page-hero.ref-hero .breadcrumb { margin-bottom: 0; font-size: 14px; font-weight: 600; line-height: 20px; color: #b69eca; }
.page-hero.ref-hero .breadcrumb a,
.page-hero.ref-hero .breadcrumb .sep { color: #b69eca; }
.page-hero.ref-hero .breadcrumb a:hover { color: #fff; }
.page-hero.ref-hero .breadcrumb > span:last-child { color: #fff; }
.page-hero.ref-hero .eyebrow {
  display: block; background: none; border: 0; padding: 0; margin: 20px 0 0;
  color: var(--accent-dark); font-size: 14px; font-weight: 700; line-height: 20px;
  letter-spacing: .05em; text-transform: uppercase;
}
[lang="ar"] .page-hero.ref-hero .eyebrow { letter-spacing: 0; text-transform: none; }
.page-hero.ref-hero h1 { margin: 8px 0 0; color: #ece4f1; font-size: 36px; font-weight: 600; line-height: 1.25; }
.page-hero.ref-hero .wrap > p { margin: 24px 0 0; max-width: 42rem; color: rgba(236,228,241,.85); font-size: 18px; line-height: 1.625; }
@media (min-width: 768px) {
  .page-hero.ref-hero h1 { font-size: 48px; }
  .page-hero.ref-hero .wrap > p { font-size: 20px; }
}
@media (min-width: 1024px) {
  .page-hero.ref-hero .wrap { padding-block: 160px 112px; }
  .page-hero.ref-hero h1 { font-size: 60px; }
}

/* News cards, as the reference (news.html) draws them: rounded-3xl, a 13rem
   picture with the category pill over it, "date · N minutes" above the
   headline, three lines of summary, and one link. */
.nw-section { padding-block: 64px; }
@media (min-width: 1024px) { .nw-section { padding-block: 80px; } }
.nw-grid { gap: 24px; }
.nw-card { border: 0; border-radius: 24px; box-shadow: 0 4px 6px -1px rgba(74,47,86,.05), 0 2px 4px -2px rgba(74,47,86,.05); }
.nw-card.card-hover:hover { transform: translateY(-6px); box-shadow: 0 25px 50px -12px rgba(74,47,86,.15); }
.nw-card .card-media { aspect-ratio: auto; height: 13rem; }
.nw-card .card-tag { top: 16px; right: 16px; padding: 6px 16px; font-size: 14px; line-height: 20px; letter-spacing: 0; }
@media (max-width: 1023px) { .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .nw-grid { grid-template-columns: minmax(0, 1fr); } }
.nw-card .card-body { padding: 24px; gap: 0; }
.nw-meta { display: flex; flex-wrap: wrap; gap: 0 .35em; margin: 0; font-size: 12px; font-weight: 600; line-height: 16px; color: rgba(74,47,86,.55); }
.nw-card .card-title { margin: 8px 0 0; color: var(--brand); font-size: 18px; font-weight: 600; line-height: 1.375; letter-spacing: 0; }
.nw-card .card-text {
  margin: 12px 0 0; font-size: 14px; line-height: 1.625; color: rgba(74,47,86,.7); opacity: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nw-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--brand-mid); }
.nw-more:hover { color: var(--brand); }

/* The news article, as the reference (news-item.html) sets it. It is the blog
   article's shape, so every rule here is scoped under `.bl-ref` (a wrapper
   the news view puts round the banner, the breadcrumb and the article) and
   only states where the source's spacing, sizes and colours differ: a 30/48px
   semibold headline, a two-thirds column beside a one-third sidebar 32px
   apart, brand-tinted text at 85%, 24px radii, and pill buttons. */
.bl-hero.bl-hero--ref h1 { font-size: 30px; font-weight: 600; line-height: 1.25; max-width: none; text-shadow: none; }
.bl-hero--ref .bl-badge { padding: 6px 16px; font-size: 14px; line-height: 22px; }
.bl-hero--ref .bl-hero-inner { padding-bottom: 48px; }
.bl-hero--ref .bl-byline { font-size: 14px; color: rgba(236,228,241,.9); }

.bl-ref .bl-crumb { padding: 24px 0 16px; }
.bl-ref .bl-crumb .breadcrumb { font-size: 14px; color: rgba(74,47,86,.6); }
.bl-ref .bl-crumb .breadcrumb a,
.bl-ref .bl-crumb .breadcrumb .sep { color: rgba(74,47,86,.6); }
.bl-ref .bl-crumb .breadcrumb a:hover { color: var(--brand-mid); }
.bl-ref .bl-crumb-current { color: var(--brand); font-weight: 600; }

.bl-ref .bl-main { padding: 16px 0 64px; }
.bl-ref .bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.bl-ref .bl-article { grid-column: span 2; }

.bl-ref .bl-lede { line-height: 1.625; color: rgba(74,47,86,.85); }
.bl-ref .bl-cta { border-color: var(--bg-sunk); }
.bl-ref .bl-cta p { font-size: 14px; color: rgba(74,47,86,.7); }
.bl-ref .bl-cta-actions { gap: 12px; }
.bl-ref .bl-cta-actions .btn { min-height: 0; padding: 10px 20px; gap: 8px; border-radius: 9999px; font-size: 14px; line-height: 20px; }
.bl-ref .bl-cta-actions .btn-primary { background: var(--accent); color: var(--brand); font-weight: 700; }
.bl-ref .bl-cta-actions .btn-primary:hover { background: var(--accent-dark); color: #fff; }
.bl-ref .bl-cta-actions .btn-outline { background: #fff; border: 2px solid #b69eca; color: var(--brand); font-weight: 600; }
.bl-ref .bl-cta-actions .btn-outline:hover { background: var(--bg); border-color: var(--brand-mid); color: var(--brand); }
.bl-ref .bl-cta-actions .btn-brand { background: var(--brand); color: #fff; font-weight: 700; }
.bl-ref .bl-cta-actions .btn-brand:hover { background: var(--brand-mid); }

.bl-ref .bl-box { border-color: var(--bg-sunk); border-radius: 24px; }
.bl-ref .bl-box h2 { font-weight: 600; }
.bl-ref .bl-dots li { font-size: 16px; line-height: 1.625; color: rgba(74,47,86,.85); }

.bl-ref .bl-body h2 { margin-top: 40px; font-size: 24px; font-weight: 600; line-height: 32px; color: var(--brand); }
.bl-ref .bl-body p { margin-top: 20px; font-size: 18px; line-height: 1.625; color: rgba(74,47,86,.85); }
.bl-ref .bl-body ul, .bl-ref .bl-body ol { margin-top: 20px; }
.bl-ref .bl-body li { padding-inline-start: 20px; font-size: 16px; line-height: 1.625; color: rgba(74,47,86,.85); }
.bl-ref .bl-body ul > li::before { inset-inline-start: 0; top: 10px; }
.bl-ref .bl-body ol > li { padding-inline-start: 2.35rem; }
.bl-ref .bl-body blockquote { border-radius: 16px; }
.bl-ref .bl-body blockquote p { margin: 0; color: var(--brand); }
.bl-ref .bl-body blockquote cite { font-size: 14px; color: rgba(74,47,86,.6); }
.bl-ref .blog-figure img { border-radius: 24px; }
.bl-ref .blog-figure figcaption { font-size: 14px; color: rgba(74,47,86,.6); }

.bl-ref .bl-panel { padding: 24px; border-color: var(--bg-sunk); border-radius: 24px; }
.bl-ref .bl-panel h2 { font-weight: 600; }
.bl-ref .bl-list { margin-top: 20px; gap: 12px; }
.bl-ref .bl-item p { color: rgba(74,47,86,.55); }
.bl-ref .bl-item h3 { margin-top: 2px; font-size: 14px; font-weight: 600; line-height: 1.375; color: var(--brand); }
.bl-ref .bl-toc { margin-top: 20px; font-size: 14px; }
.bl-ref .bl-toc a { color: rgba(74,47,86,.75); }
.bl-ref .bl-toc a:hover { color: var(--brand-mid); }

/* The project page (project.html) — the same wrapper, and its own blocks: 24px
   headings, the funding card, the specifications card (edge-to-edge head and
   rows, divided), the dark impact box and the other-projects list. */
.bl-ref .pjd-lede { color: rgba(74,47,86,.8); }
.bl-ref .pjd-block { margin-top: 32px; }
.bl-ref .hcd-h2 { font-size: 24px; font-weight: 600; line-height: 32px; color: var(--brand); }
.bl-ref .pjd-objectives li { font-size: 16px; line-height: 1.625; color: rgba(74,47,86,.85); }
.bl-ref .pjd-impact { margin-top: 32px; padding: 32px; border-radius: 24px; }
.bl-ref .pjd-impact h2 { font-size: 24px; font-weight: 600; line-height: 32px; }
.bl-ref .pjd-impact p { font-size: 18px; line-height: 1.625; color: rgba(236,228,241,.9); }
.bl-ref .hcd-fund { padding: 28px; }
.bl-ref .hcd-need { font-size: 18px; line-height: 29px; color: rgba(74,47,86,.7); }
.bl-ref .hcd-figs { font-size: 14px; line-height: 21px; }
.bl-ref .hcd-pct { line-height: 16px; }
.bl-ref .hcd-bar { background: var(--bg-sunk); }
.bl-ref .hcd-give { margin-top: 24px; padding: 14px 24px; font-size: 18px; line-height: 28px; font-weight: 600; }
.bl-ref .hcd-details { padding: 0; }
.bl-ref .hcd-details-head { padding: 16px 24px; background: rgba(236,228,241,.7); border-bottom: 1px solid var(--bg-sunk); }
.bl-ref .hcd-details dl > div { padding: 16px 24px; border-bottom: 1px solid var(--bg-sunk); }
.bl-ref .hcd-details dl > div:last-child { border-bottom: 0; }
.bl-ref .pjd-specs dt { font-size: 14px; line-height: 20px; color: rgba(74,47,86,.6); }
.bl-ref .pjd-specs dd { margin-top: 2px; font-size: 16px; line-height: 24px; color: var(--brand); }
.bl-ref .hcd-pill { padding: 6px 14px; font-size: 14px; line-height: 20px; background: var(--bg-sunk); color: var(--brand); }
.bl-ref .bl-item--card { border-color: var(--bg-sunk); }
.bl-ref .bl-item--card h3 { font-size: 16px; font-weight: 600; line-height: 1.375; }
.bl-ref .bl-item--card .bl-funded { font-size: 14px; }
.bl-ref .bl-all { font-size: 14px; line-height: 20px; font-weight: 700; }

.nw-related h2 { font-size: 24px; font-weight: 600; line-height: 32px; color: var(--brand); }
.nw-related .nw-grid { margin-top: 40px; }

@media (min-width: 768px) {
  .bl-hero.bl-hero--ref h1 { font-size: 48px; }
  .bl-ref .bl-body h2 { font-size: 30px; line-height: 36px; }
  .nw-related h2 { font-size: 30px; line-height: 36px; }
}
@media (min-width: 1024px) {
  .bl-ref .bl-main { padding-bottom: 96px; }
}
@media (max-width: 1023px) {
  .bl-ref .bl-grid { grid-template-columns: minmax(0, 1fr); }
  .bl-ref .bl-article { grid-column: auto; }
}

/* ---- The reports page, closer to the source ------------------------------
   The organisation's own page sets the banner over a darkened photograph with
   a badge above the headline, runs the journey down a single rule with a dot
   on each year, and stamps the year across each report card. */

/* The badge above the headline, as the source draws it. */
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.3rem 0.8rem; border-radius: var(--r-full);
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  color: #fff; letter-spacing: .02em;
}

/* The journey: one rule, a dot per year. */
.rp-timeline { position: relative; }
.rp-timeline::before {
  content: ""; position: absolute; inset-block: 12px;
  inset-inline-start: 41px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
  border-radius: var(--r-full);
}
.rp-timeline li { position: relative; }
.rp-year { position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--bg-sunk); }

.rp-stat { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.rp-stat:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: rgba(178, 148, 107, .45);
}

@media (max-width: 600px) {
  .rp-timeline::before { display: none; }
}

/* ---- The page builder ---------------------------------------------------
   A row is a band, a column is a share of twelve, a block is something to
   look at. Below the layout breakpoint every column goes full width, which is
   what stops an editor having to think about phones. */

.bld-row { padding-block: var(--s-8); }
.bld-row:first-child { padding-block-start: 0; }
.bld-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-6); align-items: start; }
.bld-col { display: grid; gap: var(--s-5); align-content: start; min-width: 0; }

.bld-w1  { grid-column: span 1; }   .bld-w2  { grid-column: span 2; }
.bld-w3  { grid-column: span 3; }   .bld-w4  { grid-column: span 4; }
.bld-w5  { grid-column: span 5; }   .bld-w6  { grid-column: span 6; }
.bld-w7  { grid-column: span 7; }   .bld-w8  { grid-column: span 8; }
.bld-w9  { grid-column: span 9; }   .bld-w10 { grid-column: span 10; }
.bld-w11 { grid-column: span 11; }  .bld-w12 { grid-column: span 12; }

.bld-align-center { text-align: center; }
.bld-align-end    { text-align: end; }
.bld-align-center .btn, .bld-align-end .btn { display: inline-flex; }

.bld-sub { font-size: var(--t-xl); color: var(--brand); margin: 0 0 var(--s-5); }

/* A banner inside a column, rather than across the page. */
.bld-hero { border-radius: var(--r-xl); }
.bld-hero .wrap { max-width: none; padding-inline: var(--s-7); }

.bld-quote {
  margin: 0; padding: var(--s-6) var(--s-7);
  background: var(--bg-sunk); border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-lg);
}
.bld-quote blockquote { margin: 0; font-family: var(--f-display); font-size: var(--t-lg); color: var(--ink); }
.bld-quote figcaption { margin-top: var(--s-3); color: var(--ink-3); font-weight: 600; font-size: var(--t-sm); }

.bld-image { display: block; margin: 0; }
.bld-image img { display: block; width: 100%; height: auto; }
.bld-image.is-rounded img { border-radius: var(--r-xl); }
.bld-image figcaption { margin-top: var(--s-3); color: var(--ink-3); font-size: var(--t-sm); }

.bld-video figcaption { margin-top: var(--s-3); color: var(--ink-3); font-size: var(--t-sm); }

.bld-cta { padding: var(--s-8) var(--s-7); border-radius: var(--r-xl); text-align: center; }
.bld-cta h2 { margin: 0 0 var(--s-3); }
.bld-cta p  { margin: 0 auto var(--s-6); max-width: 56ch; color: var(--ink-2); }
.bld-tone-none    { padding-inline: 0; }
.bld-tone-surface { background: var(--surface); border: 1px solid var(--line); }
.bld-tone-sunk    { background: var(--bg-sunk); }
.bld-tone-brand   { background: var(--brand); }
.bld-tone-brand h2, .bld-tone-brand p { color: #fff; }

.bld-accordion, .pg-accordion { display: grid; gap: var(--s-3); }
.bld-accordion details, .pg-accordion details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.bld-accordion summary, .pg-accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); cursor: pointer; font-weight: 700; list-style: none;
}
.bld-accordion summary::-webkit-details-marker,
.pg-accordion summary::-webkit-details-marker { display: none; }
.bld-accordion details[open] summary,
.pg-accordion details[open] summary { border-bottom: 1px solid var(--line-soft); }
.bld-accordion details[open] summary svg,
.pg-accordion details[open] summary svg { transform: rotate(180deg); }
.bld-accordion summary svg,
.pg-accordion summary svg { flex: none; transition: transform .2s ease; }
.bld-accordion .prose, .pg-accordion .prose { padding: var(--s-5); }

/* Tabs on radios: open before any script runs, and keyboard-navigable. */
.bld-tabs { display: block; }
.bld-tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.bld-tab-strip { display: flex; flex-wrap: wrap; gap: var(--s-2); border-bottom: 1px solid var(--line); }
.bld-tab {
  padding: var(--s-3) var(--s-5); cursor: pointer; font-weight: 700;
  color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.bld-tab:hover { color: var(--brand); }
.bld-tab-panel { display: none; padding-top: var(--s-5); }
.bld-tabs .bld-tab-radio:nth-of-type(1):checked ~ .bld-tab-strip .bld-tab:nth-of-type(1),
.bld-tabs .bld-tab-radio:nth-of-type(2):checked ~ .bld-tab-strip .bld-tab:nth-of-type(2),
.bld-tabs .bld-tab-radio:nth-of-type(3):checked ~ .bld-tab-strip .bld-tab:nth-of-type(3),
.bld-tabs .bld-tab-radio:nth-of-type(4):checked ~ .bld-tab-strip .bld-tab:nth-of-type(4),
.bld-tabs .bld-tab-radio:nth-of-type(5):checked ~ .bld-tab-strip .bld-tab:nth-of-type(5),
.bld-tabs .bld-tab-radio:nth-of-type(6):checked ~ .bld-tab-strip .bld-tab:nth-of-type(6) {
  color: var(--brand); border-bottom-color: var(--brand);
}
.bld-tabs .bld-tab-radio:nth-of-type(1):checked ~ .bld-tab-panel[data-tab="0"],
.bld-tabs .bld-tab-radio:nth-of-type(2):checked ~ .bld-tab-panel[data-tab="1"],
.bld-tabs .bld-tab-radio:nth-of-type(3):checked ~ .bld-tab-panel[data-tab="2"],
.bld-tabs .bld-tab-radio:nth-of-type(4):checked ~ .bld-tab-panel[data-tab="3"],
.bld-tabs .bld-tab-radio:nth-of-type(5):checked ~ .bld-tab-panel[data-tab="4"],
.bld-tabs .bld-tab-radio:nth-of-type(6):checked ~ .bld-tab-panel[data-tab="5"] { display: block; }

.bld-html > :first-child { margin-block-start: 0; }
.bld-html > :last-child  { margin-block-end: 0; }
.bld-note {
  margin: var(--s-3) 0 0; padding: var(--s-3) var(--s-4);
  background: #fff8e6; border: 1px solid #f0d089; border-radius: var(--r-md);
  color: #7a5c14; font-size: var(--t-sm);
}

@media (max-width: 860px) {
  .bld-cols { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .bld-col[class*="bld-w"] { grid-column: 1 / -1; }
  .bld-row { padding-block: var(--s-6); }
}

/* ---- The administrator's bar on the live site ---------------------------
   Only ever sent to a signed-in administrator, so it costs a visitor nothing.
   Fixed to the bottom, out of the way of the content and of the mobile
   navigation. */

.edit-bar {
  position: fixed; inset-block-end: var(--s-4); inset-inline-start: var(--s-4);
  z-index: 60; display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-sm);
}
.edit-bar-toggle {
  flex: none; width: 40px; height: 40px; border: 0; cursor: pointer;
  border-radius: var(--r-full); background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.edit-bar-body {
  display: flex; align-items: center; gap: var(--s-1, 4px);
  padding: 6px; border-radius: var(--r-full);
  background: rgba(24,18,20,.94); color: #fff; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.edit-bar[data-collapsed="1"] .edit-bar-body { display: none; }

.edit-bar-label {
  padding: 0 var(--s-3); font-weight: 700; color: rgba(255,255,255,.66);
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.edit-bar-link, .edit-bar-lang {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: var(--r-full);
  color: #fff; font-weight: 600; white-space: nowrap;
}
.edit-bar-link:hover, .edit-bar-lang:hover { background: rgba(255,255,255,.16); color: #fff; }
.edit-bar-lang { font-size: var(--t-xs); font-weight: 700; padding-inline: 9px; }
.edit-bar-lang.is-on { background: var(--accent); color: #fff; }
.edit-bar-sep { width: 1px; height: 20px; background: rgba(255,255,255,.22); margin-inline: 4px; }

@media (max-width: 700px) {
  .edit-bar { inset-block-end: var(--s-3); inset-inline-start: var(--s-3); }
  .edit-bar-label, .edit-bar-link span { display: none; }
}

@media print { .edit-bar { display: none; } }

/* The "not published" flag, drawn only for a signed-in administrator. */
.preview-flag {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  background: #7a5c14; color: #fff; font-size: var(--t-sm); text-align: center;
  box-shadow: var(--shadow-md);
}
.preview-flag strong { color: #fff; }
@media print { .preview-flag { display: none; } }

/* ---- Tags ---------------------------------------------------------------
   The tags a piece of content carries, and the page that lists all of them.
   `partials/tag-chips.php` draws nothing when a record has no tags, so — as
   with the gallery — there is no empty state to style.                     */

.tag-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2);
  margin-block: var(--s-5);
}

.tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.34rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--surface);
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.tag-chip:hover,
.tag-chip:focus-visible {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

.tag-chip-count {
  font-size: var(--t-xs); font-weight: 700;
  padding: 1px 7px; border-radius: var(--r-full);
  background: var(--bg-sunk); color: var(--ink-3);
}
.tag-chip:hover .tag-chip-count,
.tag-chip:focus-visible .tag-chip-count {
  background: rgba(255,255,255,.22); color: #fff;
}

/* The tags page itself: bigger targets, and the label is the page's heading
   rather than a line in front of the row. */
.tag-chips--page { gap: var(--s-3); margin-block: 0; }
.tag-chips--page .tag-chip { padding: 0.5rem 1rem; font-size: var(--t-base); }

/* Under a piece of content, the row is separated from the text above it. */
.tag-chips--content {
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

/* ---- Share this ---------------------------------------------------------
   The block that passes a page on, drawn by `partials/share.php`.

   It began as a bare row under a hairline, which read as leftover markup at
   the end of the article rather than something offered. It is a **panel**
   now: the two brand tints on a diagonal, a gold edge at the reading side,
   and the invitation and the buttons at opposite ends of it. That says "this
   is a thing you may do" in a way a row of grey circles did not.

   Each button carries its network's own colour **at rest**, on a white disc,
   and fills with that colour when reached for. Colour at rest is what makes
   the row scannable — you find WhatsApp by its green, not by reading six
   glyphs — and the white discs on the tinted ground keep it from shouting.

   Circles here, pills for tags, on purpose: a tag is a word and a share
   button is a mark, and the shapes should not pretend otherwise. The words
   are still there for anybody who needs them — every button carries
   `aria-label` and `title` — so nothing depends on recognising a glyph.    */

.share {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--s-4);
  margin-block: var(--s-6);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line);
  /* The gold sits at the reading edge in both directions. */
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--brand-tint), var(--accent-tint));
}

.share-label {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--f-display); font-weight: 700;
  font-size: var(--t-md); color: var(--ink);
}

/* The paper plane on a disc of its own, so the label has a mark rather than
   a floating glyph a third the height of the words beside it. */
.share-mark {
  flex: none; width: 34px; height: 34px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.share-mark svg { width: 16px; height: 16px; }

.share-links { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.share-btn {
  --net: var(--brand);
  position: relative;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid transparent; border-radius: var(--r-full);
  background: var(--surface); color: var(--net);
  box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease,
              transform .18s ease, box-shadow .18s ease;
}
.share-btn svg { width: 17px; height: 17px; }
.share-btn:hover,
.share-btn:focus-visible {
  background: var(--net); color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Each network's own colour, set once and used at rest and on hover alike.
   One custom property per network rather than two rules each — adding a
   network is then one line here and one in `Core\Share`. */
.share-whatsapp { --net: #1faf54; }
.share-facebook { --net: #1877f2; }
.share-x        { --net: #14171a; }
.share-telegram { --net: #1d94cc; }
.share-linkedin { --net: #0a66c2; }
.share-email    { --net: var(--brand-mid); }
.share-copy     { --net: var(--accent-dark); }

/* Copying is confirmed by the site's own toast, not by a second signal on the
   button — `data-copy` in app.js already says "Link copied" in the reader's
   language, and two confirmations for one press is noise. */

/* On a narrow screen the panel becomes two rows, and the buttons should start
   at the reading edge under the label rather than sitting out at the far end
   of a line of their own. */
@media (max-width: 560px) {
  .share { justify-content: flex-start; }
}

/* The tags follow the share panel as a plain row: the panel already carries
   the separation the tag row's own rule was drawing, and two lines a few
   pixels apart looked like a mistake. */
.share + .tag-chips--content { border-top: 0; padding-top: 0; }

/* ---- The gallery and the film ------------------------------------------
   Every content type with a page of its own can carry photographs and one
   film, drawn by `partials/media-gallery.php` and `partials/media-video.php`.
   Neither section exists in the markup when there is nothing to show, so
   there is no "empty" state to style.

   Direction-agnostic: the caption, the arrows and the thumbnail strip are all
   placed with logical properties, so the viewer reads right-to-left in Arabic
   without a second set of rules.                                           */

.media-block { margin-top: var(--s-8); }
.media-title {
  margin: 0 0 var(--s-5); font-size: var(--t-xl); color: var(--brand);
  padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-soft);
}

/* Inside a card that already has its own padding and heading rule. */
.media-block--flush { margin-top: 0; }

/* Standing among cards, as on a project page: it should be one of them. */
.media-block--card {
  margin-top: 0; padding: var(--s-7);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
}

.mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: var(--s-4); }

.mg-shot {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-lg); background: var(--bg-sunk);
  box-shadow: var(--shadow-sm);
}
.mg-shot img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .45s cubic-bezier(.22, .8, .3, 1);
}
.mg-shot:hover img, .mg-shot:focus-visible img { transform: scale(1.06); }
.mg-shot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The magnifier that says a photograph opens. */
.mg-shot::after {
  content: ""; position: absolute; inset-block-start: var(--s-3); inset-inline-end: var(--s-3);
  width: 30px; height: 30px; border-radius: var(--r-full);
  background: rgba(20, 10, 14, .55) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 16px no-repeat;
  opacity: 0; transition: opacity .25s;
}
.mg-shot:hover::after, .mg-shot:focus-visible::after { opacity: 1; }

.mg-cap {
  position: absolute; inset-inline: 0; inset-block-end: 0;
  padding: var(--s-6) var(--s-4) var(--s-3);
  background: linear-gradient(to top, rgba(18, 8, 12, .82), rgba(18, 8, 12, 0));
  color: #fff; font-size: var(--t-sm); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- The viewer --------------------------------------------------------
   Built by `initLightbox()` in app.js when a gallery is on the page. Without
   JavaScript none of this exists and a photograph is a plain link to the
   full-size file.                                                          */

.lb {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  background: rgba(14, 6, 9, .975); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease;
}
.lb.is-open { opacity: 1; }

/* `display: flex` above would otherwise beat the browser's own rule for
   `hidden`, leaving a see-through full-screen panel over every page and
   swallowing every click on it. Say it here instead of relying on that. */
.lb[hidden] { display: none; }
body.lb-open { overflow: hidden; }

.lb-bar {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); color: rgba(255, 255, 255, .8);
  font-size: var(--t-sm); flex: 0 0 auto;
}
.lb-count { font-variant-numeric: tabular-nums; }
.lb-bar .spacer { flex: 1; }

.lb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-width: 40px; height: 40px; padding-inline: var(--s-3);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r-full);
  background: rgba(255, 255, 255, .08); color: #fff;
  font: inherit; font-size: var(--t-sm); cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); color: #fff; }
.lb-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lb-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }

.lb-stage {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 var(--s-4);
}
.lb-stage img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: var(--r-md);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}

/* The arrows sit against the edges, so they mirror themselves in Arabic. */
.lb-arrow {
  position: absolute; inset-block-start: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; padding: 0;
}
.lb-prev { inset-inline-start: var(--s-3); }
.lb-next { inset-inline-end: var(--s-3); }
.lb-arrow[hidden] { display: none; }

.lb-foot { flex: 0 0 auto; padding: var(--s-4); }
.lb-cap {
  margin: 0 auto var(--s-4); max-width: 70ch; text-align: center;
  color: rgba(255, 255, 255, .88); font-size: var(--t-md); line-height: 1.55;
}
.lb-cap:empty { display: none; }

.lb-thumbs {
  display: flex; gap: var(--s-2); justify-content: flex-start;
  overflow-x: auto; padding-bottom: var(--s-2); scrollbar-width: thin;
}
.lb-thumbs:only-child { margin-top: 0; }
.lb-thumb {
  flex: 0 0 auto; width: 74px; height: 52px; padding: 0; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden;
  background: none; opacity: .55; transition: opacity .2s, border-color .2s;
}
.lb-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-on { opacity: 1; border-color: var(--accent); }
.lb-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 700px) {
  .media-block--card { padding: var(--s-5); }
  .mg-grid { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
  .lb-arrow { width: 40px; height: 40px; }
  .lb-btn span { display: none; }
  .lb-thumbs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lb, .mg-shot img { transition: none; }
  .mg-shot:hover img, .mg-shot:focus-visible img { transform: none; }
}

@media print { .lb { display: none; } }

/* ---- Motion -------------------------------------------------------------
   Things arrive rather than appear: a heading, a card or a photograph rises a
   little and fades in as it comes into view, and a banner photograph drifts
   very slowly while you read the heading over it.

   Three rules, and they are why this is safe to have on every page:

   1. **Nothing is hidden unless the script is running.** The starting state is
      scoped to `.has-motion`, which `initReveal()` puts on <html>. With
      JavaScript off — or if the script throws — everything is simply visible.
   2. **Nothing already on screen is hidden.** Only what is below the fold when
      the page loads starts hidden, so the first screenful never flashes empty.
   3. `prefers-reduced-motion` turns all of it off. The blanket rule in section
      14 already kills the durations; the starting state is dropped here too,
      so nothing is left invisible by a transition that never runs.

   Only opacity and transform are animated, so none of it costs a layout.

   The hover behaviour further down is not conditional on the script and is
   deliberately small — nothing here changes a size anything else is laid out
   against.                                                                 */

@media (prefers-reduced-motion: no-preference) {

  .has-motion [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity .7s cubic-bezier(.22, .8, .3, 1),
      transform .7s cubic-bezier(.22, .8, .3, 1);
    transition-delay: calc(var(--reveal-step, 0) * 70ms);
  }
  .has-motion [data-reveal].is-in { opacity: 1; transform: none; }

  /* One of a row of cards leans in as well as rising, which reads as a single
     movement across the row rather than four separate ones. */
  .has-motion [data-reveal="card"] { transform: translateY(16px) scale(.985); }

  /* The banner photograph drifts: slow enough to be felt rather than watched,
     and it settles rather than looping. */
  .page-hero--media .hero-media img {
    animation: hero-drift 20s cubic-bezier(.16, .6, .3, 1) forwards;
  }
  @keyframes hero-drift {
    from { transform: scale(1.07); }
    to   { transform: scale(1); }
  }

  /* The drop-down opens rather than blinking into place. */
  .nav-sub {
    animation: menu-drop .18s ease-out;
    transform-origin: top center;
  }
  @keyframes menu-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }
}

/* A photograph on a card leans in when the card lifts. */
.card-media img { transition: transform .5s cubic-bezier(.22, .8, .3, 1); }
.card-hover:hover .card-media img,
.card-hover:focus-within .card-media img { transform: scale(1.06); }

/* The panels that already lift, doing it on the same curve as everything else
   rather than each on its own. */
.ct-bank, .pj-card, .pg-card, .rp-card, .org-card, .home-linkcard, .stat {
  transition:
    transform .3s cubic-bezier(.22, .8, .3, 1),
    box-shadow .3s cubic-bezier(.22, .8, .3, 1),
    border-color .3s ease;
}

/* A link in running text underlines on its own time. */
.prose a { transition: color .2s ease, text-decoration-color .2s ease; }

@media (prefers-reduced-motion: reduce) {
  .has-motion [data-reveal] { opacity: 1; transform: none; }
  .card-hover:hover .card-media img,
  .card-hover:focus-within .card-media img { transform: none; }
}

/* ---- The basket ---------------------------------------------------------
   A donor giving to three projects should pay once. The header carries what
   they have chosen so far; `/cart` is where the amounts are changed.

   Direction-agnostic: the panel hangs from the inline-end of the button, so
   it opens leftwards in English and rightwards in Arabic on its own.       */

.cart-widget { position: relative; flex: none; }

/* The box itself is `.icon-btn`'s (see Header and navigation); this is only
   what actually belongs to the cart. */
.cart-count {
  position: absolute; inset-block-start: -6px; inset-inline-end: -6px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  border-radius: var(--r-full); font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cart-panel {
  position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0;
  z-index: 70; width: min(320px, calc(100vw - var(--s-6)));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: var(--s-4);
}
.cart-panel[hidden] { display: none; }
.cart-panel-empty { margin: 0; color: var(--ink-3); font-size: var(--t-sm); text-align: center; }

.cart-panel-list { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: grid; gap: var(--s-2); }
.cart-panel-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
  font-size: var(--t-sm);
}
.cart-panel-list a { color: var(--ink); font-weight: 600; }
.cart-panel-list a:hover { color: var(--brand); }
.cart-panel-list b { color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }

.cart-panel-total {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding-top: var(--s-3); border-top: 1px solid var(--line-soft);
  font-weight: 700;
}
.cart-panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-top: var(--s-4); }
.cart-panel-actions .btn { width: 100%; }

/* ---- The giving block on a card ----------------------------------------- */
/*
   A card's own donation action: the amounts the site offers, an open amount
   box, and the two ways to give — into the basket, or straight on to the
   donation form.

   The amounts sit on one line that scrolls rather than wrapping, so every
   card in a row keeps the same height whatever each project's minimum leaves
   on the strip. The arrows are shown only once `app.js` has measured a strip
   that is actually wider than its box; with scripting off the strip is still
   scrollable by touch and by keyboard, and the amount box still works.
*/
.card-actions--give { display: grid; gap: var(--s-3); }

.card-give { display: grid; gap: var(--s-3); }

.card-give-amounts { display: flex; align-items: center; gap: var(--s-1); }

.card-give-track {
  flex: 1; min-width: 0;
  display: flex; gap: var(--s-2);
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none;
  /* Room for the focus ring, taken back off the layout. */
  padding: 2px; margin: -2px;
}
.card-give-track::-webkit-scrollbar { display: none; }

.amt-pill {
  flex: none;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--surface); color: var(--ink);
  font-size: var(--t-sm); font-weight: 700; line-height: 1.45;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.amt-pill:hover { border-color: var(--brand); color: var(--brand); }
.amt-pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.card-give-nav {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 28px; padding: 0;
  background: none; border: 0; border-radius: var(--r-sm);
  color: var(--ink-3); cursor: pointer;
}
.card-give-nav:hover { color: var(--brand); }
/* A class with a display of its own outranks the browser's rule for [hidden]. */
.card-give-nav[hidden] { display: none; }
.card-give-nav[disabled] { opacity: .3; pointer-events: none; }

.card-give-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.card-give-cart { display: flex; gap: var(--s-2); flex: 1 1 10rem; min-width: 0; }
.card-give-field { display: flex; flex: 1 1 5.5rem; min-width: 0; }

.card-give-field .input {
  /* Level with the buttons beside it, whatever they measure. */
  height: 100%;
  padding: 0.5rem 0.7rem;
  font-size: var(--t-sm); border-radius: var(--r-sm);
  background: var(--bg-sunk);
  /* The spinner arrows crowd a box this narrow. */
  -moz-appearance: textfield;
}
.card-give-field .input::-webkit-outer-spin-button,
.card-give-field .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.card-give-add { flex: none; }
/* Alone on its line in a narrow card, it takes the width. */
.card-give-now { flex: 1 1 auto; }

/* "Details" under the giving block: the same outline button the initiative
   and case cards use (.btn .btn-outline .btn-sm); this only places it. */
.card-give-more { justify-self: start; }


/* "Or put this much in the basket", under the donate button on a project's
   or an appeal's page. */
.pj-basket {
  display: grid; gap: var(--s-2);
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.pj-basket .input-group { margin: 0; }
.pj-basket .input { background: var(--surface); }

/* ---- The basket page ---------------------------------------------------- */

/* ---- The basket, as a table --------------------------------------------- */
/*
   Six columns with a heading each. Below 760px the rows stack into cards and
   every cell wears its own heading from `data-label`, which keeps the page
   from scrolling sideways on a phone and keeps each box labelled.
*/
.cart-table {
  width: 100%; border-collapse: collapse;
  margin-bottom: var(--s-5);
}
.cart-table th {
  text-align: start; font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
  padding: 0 var(--s-3) var(--s-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.cart-table td {
  padding: var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.cart-table tr:last-child td { border-bottom: 0; }
.cart-col-img { width: 130px; }
.cart-col-act { width: 1%; text-align: end; }
.cart-col-sum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-col-sum b { font-family: var(--f-display); font-size: var(--t-md); color: var(--brand); }

.cart-thumb { display: block; width: 110px; border-radius: var(--r-md); overflow: hidden; background: var(--bg-sunk); }
.cart-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

.cart-name { font-family: var(--f-display); font-size: var(--t-md); font-weight: 700; margin: 0 0 2px; line-height: 1.3; }
.cart-name a { color: var(--ink); }
.cart-name a:hover { color: var(--brand); }
.cart-min { margin: 0; font-size: var(--t-xs); color: var(--ink-3); }

/* The currency sits inside the box rather than floating beside it. */
.cart-field { position: relative; display: block; max-width: 9.5rem; }
.cart-field-cur {
  position: absolute; inset-inline-start: 0.6rem; inset-block-start: 50%;
  transform: translateY(-50%);
  font-size: var(--t-sm); font-weight: 700; color: var(--ink-3); pointer-events: none;
}
.cart-field .input {
  padding: 0.55rem 0.7rem; padding-inline-start: 1.8rem;
  font-size: var(--t-base); font-variant-numeric: tabular-nums;
}
.cart-qty {
  width: 5rem; padding: 0.55rem 0.5rem;
  text-align: center; font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .cart-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: auto; }
  .cart-table tr {
    border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-4); margin-bottom: var(--s-4); background: var(--surface);
  }
  .cart-table td {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s-4); padding: var(--s-2) 0; border-bottom: 0;
  }
  /* Each cell says which column it came from. */
  .cart-table td::before {
    content: attr(data-label);
    font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-3); flex: none;
  }
  .cart-col-img, .cart-col-act { width: auto; text-align: start; }
  .cart-col-img::before { display: none; }
  .cart-col-img { display: block; padding-bottom: var(--s-3); }
  .cart-thumb { width: 100%; }
  .cart-field, .cart-qty { max-width: 9rem; width: 9rem; }
}

/* ---- "Added to your basket" --------------------------------------------- */
/*
   Shown once, after something goes into the basket, so the donor keeps the
   page they were reading. Every way out of it is a link back to that same
   page, so it closes with the script switched off too.
*/
.ca-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--s-4); }
.ca-veil { position: absolute; inset: 0; background: rgba(24, 12, 16, .5); backdrop-filter: blur(2px); }
.ca-box {
  position: relative; width: min(26rem, 100%);
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: var(--s-6);
  max-height: calc(100dvh - 2rem); overflow-y: auto;
}
.ca-x {
  position: absolute; inset-block-start: var(--s-3); inset-inline-end: var(--s-3);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-full); color: var(--ink-3);
}
.ca-x:hover { background: var(--bg-sunk); color: var(--ink); }

.ca-head {
  display: flex; align-items: center; gap: var(--s-2);
  margin: 0 var(--s-6) var(--s-5) 0;
  font-family: var(--f-display); font-size: var(--t-md); font-weight: 700; color: var(--ink);
}
.ca-tick {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 26px; border-radius: var(--r-full);
  background: var(--ok-tint); color: var(--ok);
}

.ca-line { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.ca-thumb { width: 88px; height: 59px; flex: none; border-radius: var(--r-md); object-fit: cover; background: var(--bg-sunk); }
.ca-what { min-width: 0; display: grid; gap: 2px; }
.ca-what b { font-size: var(--t-base); line-height: 1.35; }
.ca-type { font-size: var(--t-xs); color: var(--ink-3); }

.ca-facts { margin: 0 0 var(--s-5); display: grid; gap: var(--s-2); }
.ca-facts > div { display: flex; justify-content: space-between; gap: var(--s-4); font-size: var(--t-sm); }
.ca-facts dt { margin: 0; color: var(--ink-3); }
.ca-facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.ca-facts .ca-sum { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.ca-facts .ca-sum dd { color: var(--brand); font-family: var(--f-display); font-size: var(--t-md); }

.ca-acts { display: grid; gap: var(--s-2); }

/* ---- The cards we take --------------------------------------------------- */

.pay-marks {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4);
  margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.pay-marks-label {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.pay-marks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pay-marks-list img { display: block; width: 42px; height: 28px; }
/* The other way to give, level with the marks it sits beside. */
.pay-bank {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 0.35rem 0.7rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface);
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-2);
}
.pay-bank:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.pay-bank svg { flex: none; color: var(--brand); }

.pay-marks-note {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; flex: 1 1 14rem;
  font-size: var(--t-xs); color: var(--ink-3);
}
.pay-marks-note svg { flex: none; color: var(--ok); }

[lang="ar"] .cart-table th,
[lang="ar"] .cart-table td::before,
[lang="ar"] .pay-marks-label { letter-spacing: normal; text-transform: none; }

.cart-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink-3); cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.cart-remove:hover { color: #a12b2b; border-color: #e3b7b7; background: #fdf3f3; }

.cart-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-4); margin-top: var(--s-6);
  padding-top: var(--s-5); border-top: 1px solid var(--line);
}
.cart-total { display: flex; align-items: baseline; gap: var(--s-3); font-size: var(--t-md); }
.cart-total b { font-family: var(--f-display); font-size: var(--t-2xl); color: var(--brand); }

.cart-summary { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-2); }
.cart-summary li {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3);
  font-size: var(--t-sm); color: var(--ink-2);
}
.cart-summary b { color: var(--ink); white-space: nowrap; }

@media (max-width: 760px) {
  .cart-panel { width: min(300px, calc(100vw - var(--s-5))); }
}

/* On a phone the basket drops down from the header bar, not from its button.

   Pinned to the button's edge, a panel up to 300px wide had to hang off one
   side of a narrow screen: at 320px in Arabic it opened at 66–362px, and the
   prices and the checkout button sat past the right edge — a direction a
   right-to-left page cannot scroll to, so they were simply unreachable.
   English lost the same strip off the left. Released from the button, the
   panel's reference becomes the sticky header itself, and it spans the bar
   with the page margin on either side, whichever way the text runs. */
@media (max-width: 620px) {
  .cart-widget { position: static; }
  .cart-panel { inset-inline: var(--s-4); inset-block-start: calc(100% + 4px); width: auto; }
}

/* ---- The questions page ------------------------------------------------
   A jump list beside the questions, which becomes a row above them when
   there is no room for a column.                                          */

.faq-layout {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: var(--s-8); align-items: start;
}
.faq-side { position: sticky; top: 92px; }
.faq-side-title {
  font-size: var(--t-sm); font-weight: 700; color: var(--ink-3);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s-3);
}
[lang="ar"] .faq-side-title { letter-spacing: normal; text-transform: none; }

.faq-layout section { scroll-margin-top: 100px; }

@media (max-width: 860px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-side { position: static; }
}


/* ---- Appearance ---------------------------------------------------------
   What an administrator can change at Admin → Appearance. The colours and the
   type sizes arrive as `:root` overrides from `Core\Appearance`; the three
   choices that are not values live here as real rules, switched by an
   attribute on <html> or a class on <body>.                                */

/* -- Dark -----------------------------------------------------------------
   A palette, not a filter. The neutrals keep the same warm bias they have in
   the light theme so the burgundy still sits with them, the brand tint becomes
   a lift rather than a wash, and the surfaces are two steps apart so a card
   reads as a card. Only tokens are redefined: no component knows about this.

   The brand and accent hues are deliberately left alone — they are the
   organisation's, and an editor who overrides them from the admin panel gets
   the same colours in both themes.                                          */

html[data-theme="dark"] {
  --ink:            #f0e9f4;
  --ink-2:          #c3b3d1;
  --ink-3:          #93849f;
  --line:           #3a2f44;
  --line-soft:      #2b2334;
  --bg:             #17121d;
  --bg-sunk:        #1f1826;
  --surface:        #221b2b;

  --brand-tint:     #2e2438;
  --accent-tint:    #24291c;
  --green-tint:     #291f34;

  --ok-tint:        #16241d;
  --warn-tint:      #2a2013;
  --danger-tint:    #2b1817;

  --footer-bg:      #120e17;
  --footer-ink:     #d1c5db;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .5);
  --shadow-lg: 0 14px 38px rgba(0, 0, 0, .55), 0 3px 10px rgba(0, 0, 0, .4);
}

/* The two places the light theme puts white on a pale ground and the dark one
   must not: a bordered input and the top bar's own strip. */
html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .textarea { background: var(--bg-sunk); color: var(--ink); }

html[data-theme="dark"] .card,
html[data-theme="dark"] .panel { border-color: var(--line); }

/* A photograph on a dark page is brighter than the page. Taking a little of
   its light out stops each card glaring. */
html[data-theme="dark"] .card-media img,
html[data-theme="dark"] .mg-shot img { filter: brightness(.92); }

/* -- Boxed ----------------------------------------------------------------
   The page becomes a sheet on a darker ground. `.layout-boxed` is on <body>,
   so the header, the main column and the footer are all inside it — the site
   is boxed, not just its middle.                                            */

body.layout-boxed {
  /* Narrow enough that the sheet is visible on an ordinary desktop —
     at 1520 "boxed" and "wide" looked the same on every screen anyone
     actually has. */
  --boxed-width: 1320px;
  background: var(--bg-sunk);
}
body.layout-boxed > .topbar,
body.layout-boxed > .site-header,
body.layout-boxed > main,
body.layout-boxed > .site-footer {
  max-width: var(--boxed-width, 1520px);
  margin-inline: auto;
  background-color: var(--bg);
}
body.layout-boxed > .topbar { background-color: var(--brand-dark); }
body.layout-boxed > .site-header { background-color: var(--surface); }
body.layout-boxed > .site-footer { background-color: var(--footer-bg); }

/* The sheet's edges, so it reads as one object rather than three stacked. */
@media (min-width: 1360px) {
  body.layout-boxed > .topbar { box-shadow: -1px 0 0 var(--line), 1px 0 0 var(--line); }
  body.layout-boxed > .site-header,
  body.layout-boxed > main { box-shadow: -1px 0 0 var(--line), 1px 0 0 var(--line); }
}

/* -- A header that does not stick ----------------------------------------- */

body.no-sticky > .site-header { position: static; }
body.no-sticky .faq-side,
body.no-sticky .pj-side > .pj-panel:first-child { top: var(--s-5); }

/* -- Partner logos --------------------------------------------------------
   A strip that scrolls by itself, in the reading direction of the page:
   right to left in Arabic, left to right in English and Turkish. That is the
   client's own requirement, and it is the right one — a strip crawling
   against the language reads as though it is rewinding.

   How it works. The markup is one set of logos inside a track;
   `assets/js/app.js` copies the set until the track is at least twice the
   width of the screen and sets two custom properties on the strip:

     --partner-set        the width of ONE set, in pixels
     --partner-duration   how long one set takes to pass, from a constant
                          speed, so five logos and twenty move alike

   The animation then shifts the track by exactly one set width and starts
   again, which lands on an identical set of logos — so the loop has no seam.
   Nothing moves until JavaScript has measured (`[data-ready="1"]`), and
   `[data-ready="static"]` is the reduced-motion case: a plain, readable row.
   ------------------------------------------------------------------------ */

.partner-strip { background: var(--surface-2, #fbf9f7); overflow: hidden; }

.partner-strip__viewport {
  display: flex;
  /* No `overflow-x: auto` here: the track is deliberately wider than the
     screen, and a scrollbar under a self-scrolling strip is noise. The
     section clips it instead. */
  width: 100%;

  /* **Always physically left-to-right, in every language.** This is not
     a translation oversight — it is what keeps the strip full.

     In an Arabic page a flex row is laid out from the right, so the
     copies of the logo set stacked up *off-screen to the left* — and
     since the animation also travels left, nothing was ever coming in
     from the right. The strip emptied from the right edge as it moved:
     measured at 254px of blank page and growing.

     Forcing `ltr` here makes the geometry identical in all three
     languages — the copies always extend rightwards, so the row is full
     edge to edge at every moment of the cycle — and leaves the
     *direction of travel* to be decided by the animation alone, which
     is where it belongs. The reading order is handled where it should
     be, in the markup: `home.php` reverses the logos in Arabic so the
     first partner is the one at the right-hand edge. */
  direction: ltr;
}

.partner-strip__track {
  display: flex; align-items: center; direction: ltr;
  gap: var(--s-5, 1.5rem);
  padding-inline-end: var(--s-5, 1.5rem);   /* the gap after the last logo */
  flex: 0 0 auto;
}

/* Bigger than the first pass: these are the trust signals at the foot of the
   page, and at 150x96 they read as thumbnails. */
.partner-strip__item {
  flex: 0 0 auto;
  width: 230px; height: 140px;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-4, 1rem) var(--s-5, 1.5rem);
  background: #fff;
  border: 1px solid var(--line, #e7e1db);
  border-radius: var(--r-lg, 14px);
}

.partner-strip__item img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;

  /* Full colour, deliberately. A greyscale-until-hover strip is a common
     flourish and the wrong one here: a partner's mark is their property, and
     several of these organisations — the Red Crescent above all — have brand
     rules about its colour. The live site shows them in colour too. */
  transition: transform .2s ease;
}
.partner-strip__item:hover img { transform: scale(1.04); }

/* The movement. Two keyframes rather than one plus `animation-direction`,
   because the two languages start from opposite ends: in Arabic the track
   begins at rest and travels left; in English and Turkish it begins one set
   to the left and travels right. Either way it moves exactly one set. */
@keyframes partner-crawl-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(var(--partner-set, 1000px) * -1)); }
}
@keyframes partner-crawl-ltr {
  from { transform: translateX(calc(var(--partner-set, 1000px) * -1)); }
  to   { transform: translateX(0); }
}

.partner-strip__viewport[data-ready="1"] .partner-strip__track {
  animation-name: partner-crawl-ltr;
  animation-duration: var(--partner-duration, 20s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
.partner-strip__viewport[data-ready="1"][data-direction="rtl"] .partner-strip__track {
  animation-name: partner-crawl-rtl;
}

/* Stopping it. On hover so a logo can be looked at, and on keyboard focus so
   the same is true without a mouse. */
.partner-strip__viewport:hover .partner-strip__track,
.partner-strip__viewport:focus-within .partner-strip__track { animation-play-state: paused; }

/* A page that moves on its own is the clearest case there is for this
   setting. The strip becomes a row that scrolls by hand. */
@media (prefers-reduced-motion: reduce) {
  .partner-strip__viewport { overflow-x: auto; }
  .partner-strip__viewport .partner-strip__track { animation: none !important; }
  .partner-strip__item img { transition: none; }
  .partner-strip__item:hover img { transform: none; }
}
.partner-strip__viewport[data-ready="static"] { overflow-x: auto; }

@media (max-width: 620px) {
  .partner-strip__item { width: 170px; height: 108px; padding: var(--s-3, .75rem) var(--s-4, 1rem); }
}

/* ---------------------------------------------------------------------------
 * A home page band an administrator wrote
 *
 * Deliberately almost nothing: the markup inside is theirs, and a wrapper that
 * imposed padding, a width or a background would fight every layout they might
 * write. All it does is collapse the outer margins so a band cannot open with
 * a gap the rest of the page does not have, and give whoever wrote plain
 * paragraphs the same measure as the rest of the page rather than the full
 * width of the screen.
 * ------------------------------------------------------------------------- */
.home-custom > :first-child { margin-block-start: 0; }
.home-custom > :last-child  { margin-block-end: 0; }
.home-custom > p,
.home-custom > h2,
.home-custom > h3,
.home-custom > ul,
.home-custom > ol {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--s-5);
}

/* ---------------------------------------------------------------------------
 * More ways to draw a CMS page section
 *
 * Five looks plus one escape hatch, all drawn from columns `page_sections`
 * already had. The accordion is not here: it shares the page builder's rules
 * above, because two copies of the same component eventually stop matching.
 * ------------------------------------------------------------------------- */

/* A section an administrator wrote themselves. Deliberately almost nothing:
   the markup inside is theirs, and a wrapper that imposed padding, a width or
   a background would fight every layout they might write. It only collapses
   the outer margins, and gives whoever wrote plain paragraphs the same measure
   as the rest of the page rather than the full width of the screen. */
.pg-html > :first-child { margin-block-start: 0; }
.pg-html > :last-child  { margin-block-end: 0; }
.pg-html > p,
.pg-html > h2,
.pg-html > h3,
.pg-html > ul,
.pg-html > ol {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--s-5);
}

/* The photograph full width, the words over it. The scrim is what keeps the
   heading readable on a pale photograph; without it this layout is a coin
   toss decided by whatever was uploaded. */
.pg-banner {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  min-height: clamp(16rem, 34vw, 26rem);
  background: var(--brand);
}
.pg-banner-img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.pg-banner::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.6));
}
.pg-banner--flat::after { background: none; }
.pg-banner-body { padding-block: var(--s-8); color: #fff; max-width: 46rem; }
.pg-banner-body h2 { color: #fff; margin-block: 0 var(--s-3); }
.pg-banner-body p  { color: rgba(255,255,255,.85); font-size: var(--t-md); margin-block-end: var(--s-5); }
.pg-banner-body .eyebrow { color: var(--accent); }

/* A quotation. The mark is decoration, so it is drawn by CSS and hidden from
   the accessibility tree rather than typed into the copy. */
.pg-quote { margin: 0; text-align: center; }
.pg-quote blockquote {
  position: relative; margin: 0; padding-block-start: var(--s-7);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.5;
  font-weight: 600; color: var(--ink);
}
.pg-quote blockquote::before {
  content: '\201C'; position: absolute; inset-block-start: -.35em; inset-inline-start: 50%;
  transform: translateX(-50%);
  font-size: 4.5rem; line-height: 1; color: var(--accent); opacity: .5;
}
.pg-quote figcaption {
  margin-block-start: var(--s-5); display: grid; gap: 2px;
  font-size: var(--t-sm);
}
.pg-quote figcaption b    { color: var(--ink); }
.pg-quote figcaption span { color: var(--ink-3); }

/* Two columns of one body. `column-count` rather than a grid: the text flows
   between the columns at whatever length it is, and one column on a narrow
   screen needs no second rule. `break-inside` stops a heading being orphaned
   at the foot of the first column. */
.pg-columns { column-count: 2; column-gap: var(--s-8); }
.pg-columns > :first-child { margin-block-start: 0; }
.pg-columns h2, .pg-columns h3, .pg-columns h4 { break-after: avoid; }
.pg-columns p, .pg-columns li { break-inside: avoid; }
@media (max-width: 760px) { .pg-columns { column-count: 1; } }

/* A dated line of milestones. The rule is drawn on the list rather than
   between the items so it cannot end in a gap, and it is `inset-inline-start`
   throughout so the whole thing mirrors itself in Arabic. */
.pg-timeline {
  position: relative; list-style: none; margin: var(--s-7) 0 0; padding: 0;
  display: grid; gap: var(--s-6);
}
.pg-timeline::before {
  content: ''; position: absolute; inset-block: .6rem 0; inset-inline-start: 11px;
  width: 2px; background: var(--line);
}
.pg-milestone { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: var(--s-4); }
.pg-milestone-dot {
  position: relative; z-index: 1;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.pg-milestone-when {
  display: block; font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .06em; color: var(--accent-dark);
}
.pg-milestone h3 { margin: 2px 0 var(--s-2); font-size: var(--t-lg); }
.pg-milestone p  { margin: 0; color: var(--ink-2); }

/* ---------------------------------------------------------------------------
 * Organisation chart: the two shapes a step down it can take
 *
 * A row of departments is a set of columns and stays a row; a row of teams is
 * the list inside one department and stacks. Which one a list is comes from
 * the tier, in the view — see `SiteStructure::TIERS`.
 * ------------------------------------------------------------------------- */
.org-children--stack { flex-direction: column; flex-wrap: nowrap; align-items: center; }

/* The row of departments holds its line on a real screen rather than folding
   into two half-rows that read as two levels. `.org-chart` is already
   `overflow-x: auto`, so a chart too wide to fit scrolls instead of wrapping —
   which is what an org chart should do. Below that width, wrapping is still
   the right answer and the default takes over. */
@media (min-width: 860px) {
  .org-children:not(.org-children--stack) { flex-wrap: nowrap; }
}

/* Columns of unequal height start together at the top. Without this the
   row stretches each column and a department with three teams sits a row
   higher than one with two — which reads as a level, not as a longer list. */
.org-children:not(.org-children--stack) { align-items: flex-start; }

/* The line of command sits under whatever flanks it, and stays centred. */
.org-children--line { flex-wrap: nowrap; }

/* ---------------------------------------------------------------------------
 * A mega panel instead of a dropdown
 *
 * Set per parent link at Admin → Menus. The column count arrives as
 * `--nav-cols` on the element, because it is data about that one link rather
 * than a rule about all of them.
 * ------------------------------------------------------------------------- */
.nav-sub--mega {
  display: grid;
  grid-template-columns: repeat(var(--nav-cols, 2), minmax(150px, 1fr));
  gap: 2px var(--s-4);
  min-width: min(44rem, 90vw);
}

/* Narrow screens get one column whatever the setting says: the menu is a
   stacked list there, and a four-column panel inside it is unreadable. */
@media (max-width: 900px) {
  .nav-sub--mega { grid-template-columns: minmax(0, 1fr); min-width: 0; }
}

/* ---- Back to top ---------------------------------------------------------
   One button, in the layout, so it is on every page.

   The ring around it is the page's own progress: a conic gradient driven by
   `--p`, which app.js sets on scroll. It is decoration with a job — it says
   how much of a long appeal is left, which is the question somebody reaching
   for this button has just asked themselves.

   Hidden with `visibility` rather than `opacity` alone, so a keyboard cannot
   tab to a button nobody can see. Logical properties throughout: it sits at
   the end of the line, which is the left in Arabic.                        */

.to-top {
  position: fixed;
  inset-block-end: var(--s-5); inset-inline-end: var(--s-5);
  z-index: 290;                     /* under the toasts, over the page */
  width: 46px; height: 46px; padding: 0;
  border: 0; border-radius: var(--r-full);
  background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;

  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* The ring: gold as far as the page has been read, a faint track after it. */
.to-top-ring {
  position: absolute; inset: 0; border-radius: inherit;
  background: conic-gradient(
    var(--accent) calc(var(--p, 0) * 1%),
    rgba(255, 255, 255, .55) 0
  );
  box-shadow: var(--shadow-md);
}

/* The disc that sits inside the ring and carries the arrow. */
.to-top-face {
  position: relative;               /* over the ring */
  width: 38px; height: 38px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  transition: background-color .18s ease, transform .18s ease;
}
.to-top:hover .to-top-face,
.to-top:focus-visible .to-top-face { background: var(--brand-mid); transform: translateY(-2px); }
.to-top:focus-visible { outline: none; }
.to-top:focus-visible .to-top-face { box-shadow: var(--ring); }

/* The administrator's bar sits in the opposite corner, so the two never
   meet — but on a narrow screen everything is in one column, and the button
   comes in a little to stay off the edge. */
@media (max-width: 560px) {
  .to-top { inset-block-end: var(--s-4); inset-inline-end: var(--s-4); }
}

/* Somebody who has asked for less motion gets the button, without the slide
   in or the lift. It still appears and disappears — that is information, not
   decoration — but it does so by fading alone. */
@media (prefers-reduced-motion: reduce) {
  .to-top { transform: none; transition: opacity .01ms, visibility .01ms; }
  .to-top.is-visible { transform: none; }
  .to-top:hover .to-top-face, .to-top:focus-visible .to-top-face { transform: none; }
}

/* ---- Recommendations and the consent bar --------------------------------
   Drawn by `partials/recommendations.php` and `partials/audience-tracker.php`.
   Both reuse the card language the rest of the site already speaks rather
   than inventing a third one, so a recommended article looks like an article.
   ------------------------------------------------------------------------ */

.rec-block { margin-block: var(--s-6); }

.rec-head { display: flex; align-items: baseline; gap: var(--s-4); margin-bottom: var(--s-5); }
.rec-head h2 { margin: 0; font-size: var(--t-xl); }

.rec-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
}

.rec-card {
  display: flex; flex-direction: column;
  /* Fill the grid track, so every card in a row is the height of its row and
     the row below matches it too — see the title rule further down, which is
     what actually makes the rows equal. */
  height: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.rec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }

/* Every picture the same size, whatever shape the original is.

   Three things together do that, and all three are needed: the box has a fixed
   ratio, it refuses to be squeezed or stretched by the card around it
   (`flex: none` — a flex child will otherwise shrink to make room for a long
   title), and the image inside is cropped to fill rather than letterboxed.
   `aspect-ratio` alone was not enough here. */
.rec-media {
  display: block; flex: none;
  aspect-ratio: 16 / 10;
  background: var(--bg-sunk);
  overflow: hidden;
}
.rec-media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* A browser without `aspect-ratio` gets the same proportions the old way — a
   percentage padding on the box and the image laid over it. */
@supports not (aspect-ratio: 16 / 10) {
  .rec-media { position: relative; height: 0; padding-block-end: 62.5%; }
  .rec-media img { position: absolute; inset: 0; }
}

.rec-body { padding: var(--s-4); display: flex; align-items: flex-start; flex: 1 1 auto; }

/* Smaller than it was (16px), and — more importantly — always exactly two
   lines tall.

   The card heights used to differ by 24px depending on whether a headline
   wrapped, which is what made a row of them look uneven even though every
   picture was already identical. Reserving two lines means a short title and a
   long one produce the same card. A third line is clamped rather than allowed
   to push the card taller again. */
.rec-body h3 {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.5;
  min-height: calc(2 * 1.5em);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rec-body a { color: var(--ink); }
.rec-body a:hover { color: var(--brand); }

/* The consent bar, when an administrator has asked for one. Bottom of the
   window, above everything, and it never covers the whole page — a wall
   between a reader and an article is how consent banners got their name. */
.consent-bar {
  position: fixed; inset-inline: var(--s-4); inset-block-end: var(--s-4);
  z-index: 320; margin-inline: auto; max-width: 680px;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.consent-bar p { margin: 0; flex: 1 1 280px; font-size: var(--t-sm); color: var(--ink-2); }
.consent-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* The consent bar gained a heading and a policy link, so the text and the
   buttons became two blocks rather than one line. */
.consent-text { flex: 1 1 300px; }
.consent-text strong { display: block; font-size: var(--t-base); color: var(--ink); margin-bottom: 2px; }
.consent-text p { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.consent-text a { color: var(--brand); text-decoration: underline; }
.consent-bar .btn { min-height: 36px; }

/* ---- Buttons on a page banner -------------------------------------------
   Set at Admin -> Page banners. The home hero's own pair — solid, then
   outlined for a dark ground — under the heading and its line rather than
   over the foot of the artwork, because a page banner's text is real text. */
.page-hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3);
  margin-top: var(--s-5);
}

@media (max-width: 560px) {
  .page-hero-actions { flex-direction: column; align-items: stretch; }
  .page-hero-actions .btn { justify-content: center; }
}

/* ---- "More" (⋯) — the menu items that do not fit on the first line ------
   app.js moves them in here (`initNavOverflow`) on a screen wide enough for
   the bar but not for every label. The panel is the drop-down every sub-menu
   already uses, anchored at its reading end so it opens back over the bar
   rather than off the edge of the screen. Inside it the items are a stacked
   list, and a sub-menu opens in place, indented, the way it does in the
   burger menu. The rules for the panel's contents sit after the mega-menu's
   on purpose: those are what they undo. */
.nav-more[hidden] { display: none; }

.nav-item.nav-more > .nav-parent { padding-inline: 0.55rem; }
.nav-item.nav-more > .nav-parent svg,
.nav-item.nav-more > .nav-parent[aria-expanded="true"] svg { width: 20px; height: 20px; transform: none; }
.nav-item.nav-more.is-active > .nav-parent { color: var(--brand); background: var(--brand-tint); }

.nav-more-panel {
  inset-inline-start: auto; inset-inline-end: 0;
  min-width: 250px;
  max-height: min(72vh, 34rem); overflow-y: auto; overscroll-behavior: contain;
}
.nav-more-panel > a,
.nav-more-panel > .nav-item { width: 100%; }
.nav-more-panel > a { display: flex; }
.nav-more-panel > a.is-active::after { display: none; }
.nav-more-panel > a.is-active { background: var(--brand-tint); color: var(--brand); }

.nav-more-panel .nav-item > .nav-parent { width: 100%; justify-content: space-between; }
.nav-more-panel .nav-sub {
  position: static; min-width: 0; box-shadow: none; border: 0; border-radius: 0;
  border-inline-start: 2px solid var(--line);
  margin-block: 2px var(--s-2); margin-inline-start: var(--s-3);
  padding-block: 0; padding-inline: var(--s-2) 0;
}
.nav-more-panel .nav-sub--mega:not([hidden]) { display: flex; flex-direction: column; min-width: 0; }

/* ==========================================================================
   Blog (المدونة) — the article page and its listing
   Laid out after the organisation's own post page: a full-width photographic
   banner, a lede, a "what you will learn" box, the article in a wide column
   and a sidebar of search, recent posts, contents and projects.
   ========================================================================== */
.bl-hero {
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
  min-height: 62vh; background: var(--brand-dark); color: #fff;
  padding-top: 6rem;
}
.bl-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bl-hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(55, 36, 63, .95), rgba(55, 36, 63, .5) 55%, rgba(55, 36, 63, .2));
}
.bl-hero-inner { position: relative; z-index: 1; padding-bottom: var(--s-7); }
.bl-hero h1 { margin: var(--s-4) 0 0; font-size: clamp(1.75rem, 4.4vw, 3rem); line-height: 1.25; color: #fff; max-width: 22ch; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.bl-badge {
  display: inline-block; padding: .35rem 1rem; border-radius: var(--r-full);
  background: var(--accent); color: var(--brand); font-weight: 700; font-size: var(--t-sm);
  box-shadow: var(--shadow-md);
}
.bl-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem;
  margin: var(--s-4) 0 0; font-size: var(--t-sm); color: rgba(255, 255, 255, .9);
}
.bl-byline strong { color: #fff; }

.bl-crumb { background: var(--bg); padding: var(--s-4) 0 0; }
.bl-crumb .breadcrumb { margin-bottom: 0; }
.bl-crumb-current { color: var(--ink); font-weight: 600; }

.bl-main { background: var(--bg); padding: var(--s-4) 0 var(--s-10); }
.bl-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }

.bl-lede { margin: 0; font-size: var(--t-lg); line-height: 1.85; color: var(--ink-2); }

.bl-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4);
  margin-top: var(--s-5); padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.bl-cta p { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.bl-cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.bl-box {
  margin-top: var(--s-6); padding: var(--s-6);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
}
.bl-box h2 { margin: 0; font-size: var(--t-lg); }
.bl-dots { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.bl-dots li { position: relative; padding-inline-start: 1.4rem; line-height: 1.75; color: var(--ink-2); }
.bl-dots li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .7em;
  width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent);
}

/* The article itself. */
.bl-body { margin-top: var(--s-2); }
.bl-body h2 { margin: var(--s-8) 0 0; font-size: clamp(1.5rem, 2.6vw, 1.95rem); color: var(--ink); scroll-margin-top: 6rem; }
.bl-body h2::after {
  content: ""; display: block; width: 3.5rem; height: .25rem; margin-top: .75rem;
  border-radius: var(--r-full); background: var(--accent);
}
.bl-body h3 { margin: var(--s-7) 0 0; font-size: var(--t-xl); color: var(--ink); scroll-margin-top: 6rem; }
.bl-body p { margin: var(--s-4) 0 0; font-size: var(--t-lg); line-height: 1.85; color: var(--ink-2); }
.bl-body a { color: var(--brand-mid); text-decoration: underline; }
.bl-body ul, .bl-body ol { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.bl-body li { position: relative; padding-inline-start: 2.35rem; line-height: 1.8; color: var(--ink-2); font-size: var(--t-md); }
.bl-body ul > li::before {
  content: ""; position: absolute; inset-inline-start: .5rem; top: .75em;
  width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent);
}
.bl-body ol { counter-reset: blstep; }
.bl-body ol > li { counter-increment: blstep; }
.bl-body ol > li::before {
  content: counter(blstep); position: absolute; inset-inline-start: 0; top: .1em;
  display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background: var(--accent); color: var(--brand); font: 700 var(--t-sm)/1 var(--f-num);
}
.bl-body blockquote {
  margin: var(--s-6) 0 0; padding: var(--s-5);
  background: var(--surface); border-radius: var(--r-lg); border-inline-start: 4px solid var(--accent);
}
.bl-body blockquote p { margin: 0; font-size: var(--t-lg); font-weight: 600; color: var(--ink); }
.bl-body blockquote cite { display: block; margin-top: var(--s-3); font-size: var(--t-sm); font-style: normal; color: var(--ink-3); }
.blog-stat {
  display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-6); padding: var(--s-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink-2);
}
.blog-stat strong { font: 700 var(--t-3xl)/1 var(--f-num); color: var(--accent-dark); }

.blog-figure { margin: var(--s-6) 0 0; }
.blog-figure img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.blog-figure figcaption { margin-top: var(--s-3); text-align: center; font-size: var(--t-sm); color: var(--ink-3); }
.bl-more-shots { margin-top: var(--s-4); }

/* Sidebar. */
.bl-side-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); position: sticky; top: 6rem; }
.bl-panel { padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); }
.bl-panel h2 { margin: 0; font-size: var(--t-lg); }
.bl-bar { display: block; width: 3rem; height: .25rem; margin-top: .75rem; border-radius: var(--r-full); background: var(--accent); }
.bl-bar--wide { width: 5rem; }
.bl-search { position: relative; }
.bl-search .input { width: 100%; border-radius: var(--r-full); padding-inline: 1.25rem 2.75rem; border-width: 2px; }
.bl-search > svg { position: absolute; inset-inline-end: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.bl-search--wide { max-width: 32rem; margin: 0 auto var(--s-7); }

.bl-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.bl-list li[hidden] { display: none; }
.bl-item { display: flex; gap: var(--s-3); padding: var(--s-2); border-radius: var(--r-lg); color: inherit; transition: background .2s; }
.bl-item:hover { background: var(--brand-tint); }
.bl-item img { width: 5rem; height: 4rem; flex: none; border-radius: var(--r-md); object-fit: cover; }
.bl-item > div { align-self: center; min-width: 0; }
.bl-item p { margin: 0; font-size: var(--t-xs); color: var(--ink-3); }
.bl-item h3 {
  margin: .15rem 0 0; font-size: var(--t-sm); line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-item:hover h3 { color: var(--brand-mid); }
.bl-funded { color: var(--ink-3); margin-top: .2rem !important; }

.bl-toc { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); font-size: var(--t-sm); }
.bl-toc a { display: block; color: var(--ink-2); font-weight: 600; }
.bl-toc a:hover { color: var(--brand-mid); }
.bl-toc .is-sub { padding-inline-start: var(--s-4); }
.bl-toc .is-sub a { font-weight: 400; font-size: 13px; }
.bl-all { display: inline-flex; align-items: center; gap: .35rem; margin-top: var(--s-4); font-size: var(--t-sm); font-weight: 600; color: var(--brand-mid); }
.bl-all:hover { color: var(--brand); }

@media (max-width: 1000px) {
  .bl-grid { grid-template-columns: minmax(0, 1fr); }
  .bl-side-inner { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .bl-hero { min-height: 52vh; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
   Humanitarian case page — after the organisation's case.html.
   The banner, breadcrumb and columns are the blog article's (.bl-*).
   ========================================================================== */
.bl-hero--case { min-height: 55vh; }
.hcd-h2 { margin: 0; font-size: var(--t-2xl); color: var(--ink); }
.hcd-story { margin-top: var(--s-2); }
.hcd-story > p:first-child { margin-top: var(--s-5); }
.hcd-block { margin-top: var(--s-6); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); }

.hcd-fund { padding: var(--s-6); }
.hcd-need { margin: 0; font-size: var(--t-lg); font-weight: 600; color: var(--ink-2); }
.hcd-figs { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-4); font-size: var(--t-sm); font-weight: 600; }
.hcd-paid { color: var(--accent-dark); }
.hcd-left { color: var(--ink-2); }
.hcd-bar { height: .75rem; margin-top: var(--s-2); overflow: hidden; border-radius: var(--r-full); background: var(--line); }
.hcd-bar > span { display: block; height: 100%; border-radius: var(--r-full); background: var(--accent); }
.hcd-pct { margin: .4rem 0 0; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); }
.hcd-give { margin-top: var(--s-5); border-radius: var(--r-full); }

.hcd-details { padding: 0; overflow: hidden; }
.hcd-details-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-6); background: var(--brand-tint); border-bottom: 1px solid var(--line);
}
.hcd-details-head svg { color: var(--brand-mid); }
.hcd-details-head h2 { margin: 0; font-size: var(--t-lg); }
.hcd-details dl { margin: 0; }
.hcd-details dl > div {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--line); transition: background .2s;
}
.hcd-details dl > div:last-child { border-bottom: 0; }
.hcd-details dl > div:hover { background: var(--brand-tint); }
.hcd-details dt { display: flex; align-items: center; gap: var(--s-3); flex: none; white-space: nowrap; color: var(--ink-2); }
.hcd-details dt svg { color: var(--brand-mid); }
.hcd-details dd { margin: 0; min-width: 0; font-weight: 600; color: var(--ink); text-align: end; }
.hcd-pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .85rem;
  border-radius: var(--r-full); background: var(--line); font-size: var(--t-sm);
}
.hcd-pill > span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--brand-mid); }

.hc-fundbar { margin-top: var(--s-4); }
.hc-fundbar .hcd-figs { margin-top: 0; }


/* ==========================================================================
   Project page — after the organisation's project.html.
   Banner, columns and panels are the blog article's (.bl-*) and the case
   page's (.hcd-*); this is only what is the project page's own.
   ========================================================================== */
.pjd-lede { color: var(--ink-2); }
.pjd-block { margin-top: var(--s-7); }
.pjd-block > .hcd-h2 + .bl-bar + .bl-body > p:first-child { margin-top: var(--s-5); }
.pjd-objectives { margin-top: var(--s-5); }
.pjd-objectives li { font-size: var(--t-md); color: var(--ink); }
.pjd-impact {
  margin-top: var(--s-7); padding: var(--s-7); border-radius: var(--r-xl);
  background: var(--brand); color: var(--brand-tint);
}
.pjd-impact h2 { margin: 0; font-size: var(--t-2xl); color: #fff; }
.pjd-impact p { margin: var(--s-5) 0 0; font-size: var(--t-lg); line-height: 1.85; color: rgba(255, 255, 255, .9); }
.hcd-h3 { margin: 0 0 var(--s-4); font-size: var(--t-lg); }

.pjd-specs dl > div { justify-content: flex-start; align-items: flex-start; gap: var(--s-3); }
.pjd-specs dl > div > svg { flex: none; margin-top: .2rem; color: var(--brand-mid); }
.pjd-specs dl > div > div { min-width: 0; }
.pjd-specs dt { display: block; font-size: var(--t-sm); color: var(--ink-3); white-space: normal; }
.pjd-specs dd { margin: .15rem 0 0; text-align: start; }

.bl-item--card { border: 1px solid var(--line); background: var(--surface); padding: var(--s-3); }
.bl-item--card:hover { border-color: var(--brand-mid); box-shadow: var(--shadow-md); }
.bl-item--card img { width: 6rem; height: 5rem; }
.bl-item--card .bl-funded { color: var(--accent-dark); font-weight: 600; }

.pj-basket { margin-top: var(--s-4); display: grid; gap: var(--s-3); }


/* ==========================================================================
   All projects (/projects) — after the reference's projects.html.
   ========================================================================== */
.pa-tools { padding-bottom: 0; }
.pa-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
  padding: var(--s-5); background: var(--brand-tint); border: 1px solid var(--line); border-radius: var(--r-xl);
}
.pa-search { position: relative; flex: 1 1 16rem; margin: 0; }
.pa-search .input { width: 100%; padding-inline-start: 2.9rem; border-radius: var(--r-full); border-width: 2px; }
.pa-search > svg { position: absolute; inset-inline-start: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.pa-sort { display: flex; align-items: center; gap: var(--s-3); margin: 0; flex: 0 1 20rem; }
.pa-sort > span { flex: none; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.pa-sort .select { width: 100%; border-radius: var(--r-full); }
.pa-count { margin: var(--s-4) 0 0; font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); }
.pa-list { padding-top: var(--s-6); }
.pa-card .card-body { padding: var(--s-6); }
.pa-card .card-media { aspect-ratio: 16 / 10; }
.pa-card .card-title { font-size: var(--t-xl); }
.pa-card .card-actions { margin-top: var(--s-5); }
@media (max-width: 800px) { .grid-2.pa-cols, .pa-list .grid-2 { grid-template-columns: minmax(0, 1fr); } }


/* ==========================================================================
   Home pop-ups — the impact slider and the support request form, after the
   reference's index.html. Words and numbers come from the admin (Pop-ups).
   ========================================================================== */
.pop {
  position: fixed; inset: 0; z-index: 270;
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: var(--s-5);
}
.pop[hidden] { display: none; }
body.pop-open { overflow: hidden; }
.pop-backdrop { position: fixed; inset: 0; background: rgba(74, 47, 86, .6); backdrop-filter: blur(3px); }
.pop-box {
  position: relative; z-index: 1; width: 100%; margin-block: var(--s-6);
  padding: var(--s-7); background: var(--bg-sunk); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.pop-box--wide { max-width: 64rem; }
.pop-box--narrow { max-width: 32rem; background: var(--bg); padding: var(--s-6); }
/* The close button sits at the physical left in both directions, as the reference has it. */
.pop-x {
  position: absolute; top: var(--s-5); left: var(--s-5); z-index: 2;
  display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem;
  border: 0; border-radius: 50%; background: #fff; color: var(--brand); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background .2s, color .2s;
}
.pop-x:hover { background: var(--brand-tint); color: var(--brand-mid); }

/* ---- The search pop-up and the /search page ---------------------------------
   One search box, one result row, used by both. */
.pop-box--search { max-width: 44rem; background: var(--bg); padding: var(--s-6); }
.srp-form {
  display: flex; align-items: center; gap: .75rem; margin-top: 2.75rem;
  padding: .35rem .4rem .35rem 1.1rem; background: #fff;
  border: 2px solid var(--bg-sunk); border-radius: var(--r-full); color: var(--brand-mid);
}
.srp-form:focus-within { border-color: var(--brand-mid); }
.srp-form--page { margin: 0 0 var(--s-6); max-width: 40rem; }
.srp-input { flex: 1 1 auto; min-width: 0; padding: .55rem 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.srp-input::-webkit-search-cancel-button { display: none; }
.srp-body { margin-top: var(--s-5); max-height: 58vh; overflow-y: auto; }
.srp-hint { margin: var(--s-6) 0; text-align: center; color: var(--ink-3); }
.srp-none { display: grid; gap: .35rem; margin: var(--s-6) 0; text-align: center; color: var(--ink-3); }
.srp-none strong { color: var(--brand); font-size: var(--t-lg); }
.srp-group { margin: var(--s-4) 0 var(--s-2); font-size: var(--t-sm); font-weight: 700; color: var(--brand-mid); }
.section .srp-group { margin-top: var(--s-6); font-size: var(--t-xl); color: var(--brand); }
.srp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.srp-item {
  display: flex; gap: .9rem; align-items: center; padding: .6rem; color: inherit;
  background: #fff; border: 1px solid var(--bg-sunk); border-radius: var(--r-lg); transition: border-color .2s, box-shadow .2s;
}
.srp-item:hover { border-color: var(--brand-mid); box-shadow: var(--shadow-md); }
.srp-item img, .srp-noimg {
  flex: none; width: 4rem; height: 3.25rem; border-radius: var(--r-md); object-fit: cover; background: var(--bg-sunk);
}
.srp-list--page .srp-item img, .srp-list--page .srp-noimg { width: 6rem; height: 4.5rem; }
.srp-noimg { display: flex; align-items: center; justify-content: center; color: var(--brand-mid); }
.srp-text { min-width: 0; display: grid; gap: .15rem; }
.srp-text strong { color: var(--brand); line-height: 1.4; }
.srp-text > span {
  font-size: var(--t-sm); line-height: 1.55; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.srp-all { display: block; margin-top: var(--s-4); text-align: center; font-weight: 700; color: var(--brand-mid); }
.srp-all:hover { color: var(--brand); }

.pop-head { max-width: 40rem; margin: 0 auto; text-align: center; }
.pop-head h2 { margin: var(--s-3) 0 0; font-size: clamp(1.6rem, 3vw, 2.25rem); }
.pop-head p { margin: var(--s-5) 0 0; font-size: var(--t-lg); line-height: 1.8; color: var(--ink-2); }
.pop-bar { display: block; width: 5rem; height: .25rem; margin: var(--s-3) auto 0; border-radius: var(--r-full); background: var(--accent); }
.pop-shield {
  display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
  border-radius: var(--r-lg); background: rgba(135, 104, 169, .14); color: var(--brand-mid);
}
.pop-box--narrow .pop-head h2 { font-size: var(--t-2xl); }
.pop-box--narrow .pop-head p { font-size: var(--t-sm); margin-top: var(--s-3); }

.pop-impact {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--s-8); overflow: hidden; background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.pop-impact-controls { padding: var(--s-8); display: flex; flex-direction: column; justify-content: center; }
.pop-label { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); }
.pop-amount { margin-top: .25rem; font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 700; line-height: 1; color: var(--brand); }
.pop-range {
  --fill: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: .6rem; margin: var(--s-6) 0 0;
  border-radius: var(--r-full); outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--accent) var(--fill), var(--line) var(--fill));
}
.pop-range::-webkit-slider-thumb { -webkit-appearance: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; border: 4px solid var(--brand); box-shadow: var(--shadow-md); }
.pop-range::-moz-range-thumb { width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; border: 4px solid var(--brand); box-shadow: var(--shadow-md); }
.pop-range:focus-visible { box-shadow: var(--ring); }
.pop-scale { display: flex; justify-content: space-between; margin-top: var(--s-2); font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); }
.pop-quick { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.pop-quick button {
  padding: .45rem 1.25rem; border: 2px solid var(--line); border-radius: var(--r-full);
  background: var(--brand-tint); color: var(--brand); font-size: var(--t-sm); font-weight: 700; cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s;
}
.pop-quick button:hover { transform: translateY(-2px); border-color: var(--brand-mid); background: #fff; }

.pop-impact-result {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: var(--s-8); background: var(--brand); color: var(--brand-tint);
}
.pop-result-icon {
  display: flex; align-items: center; justify-content: center; width: 4rem; height: 4rem;
  border-radius: var(--r-lg); background: rgba(124, 179, 66, .2); color: var(--accent);
}
.pop-impact-result h3 { margin: var(--s-5) 0 0; font-size: var(--t-2xl); color: #fff; }
.pop-impact-result p { margin: var(--s-4) 0 0; min-height: 3.5rem; font-size: var(--t-lg); line-height: 1.8; color: rgba(255, 255, 255, .85); }
.pop-impact-result .btn { margin-top: var(--s-6); }
.pop-pop { animation: pop-pop .45s cubic-bezier(.22, .8, .3, 1); }
@keyframes pop-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pop-note { margin: var(--s-5) 0 0; text-align: center; font-size: var(--t-sm); color: var(--ink-3); }

.pop-form { margin-top: var(--s-6); display: grid; gap: var(--s-5); }
.pop-form fieldset { margin: 0; padding: 0; border: 0; }
.pop-form legend { padding: 0; font-weight: 600; }
.pop-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-3); }
.pop-types input { position: absolute; opacity: 0; pointer-events: none; }
.pop-types > div { position: relative; }
.pop-types label {
  display: flex; align-items: center; justify-content: center; width: 100%; padding: .8rem .5rem; text-align: center;
  border: 2px solid var(--line); border-radius: var(--r-lg); background: #fff; color: var(--ink-2);
  font-size: var(--t-sm); font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.pop-types input:checked + label { border-color: var(--brand-mid); background: var(--brand-tint); color: var(--brand); }
.pop-types input:focus-visible + label { box-shadow: var(--ring); }
.pop-field { display: grid; gap: var(--s-2); }
.pop-field > label { font-weight: 600; }
.pop-field .input { width: 100%; }
.pop-privacy { margin: 0; font-size: var(--t-xs); line-height: 1.7; color: var(--ink-3); }
.pop-status { margin: 0; text-align: center; font-size: var(--t-sm); font-weight: 600; }
.pop-status[hidden] { display: none; }
.pop-status.is-ok { color: var(--accent-dark); }
.pop-status.is-warn { color: var(--brand-mid); }
.pop-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.home-campaigns-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-4); margin: var(--s-7) 0 0; }
.home-campaigns-actions .btn { border-radius: var(--r-full); }

@media (max-width: 860px) {
  .pop-impact { grid-template-columns: minmax(0, 1fr); }
  .pop-box { padding: var(--s-6) var(--s-5); }
  .pop-impact-controls, .pop-impact-result { padding: var(--s-6); }
}
@media (max-width: 480px) { .pop-types { grid-template-columns: minmax(0, 1fr); } }

.pop-support-btn { background: var(--brand-mid); color: #fff; box-shadow: var(--shadow-md); }
.pop-support-btn:hover { background: var(--brand); color: #fff; }

/* ---- "Donate now" (/give): after the reference's donate.html --------------
   A brand-coloured banner with two soft blobs and the mark faint in the corner,
   then a two-column form: three white cards, and a sticky summary. */

.gv-wrap { position: relative; max-width: 80rem; padding-inline: clamp(1rem, 3vw, 2rem); }
.gv-wrap--form { max-width: 72rem; }


.gv-form-section { padding-block: 4rem; }
@media (min-width: 1024px) { .gv-form-section { padding-block: 6rem; } }
.gv-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .gv-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .gv-main { grid-column: span 3; } .gv-side { grid-column: span 2; } }
.gv-main { display: grid; gap: 1.5rem; align-content: start; }

.gv-card {
  background: #fff; border: 1px solid var(--line); border-radius: 1.5rem; padding: 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(74, 47, 86, .05);
}
@media (min-width: 640px) { .gv-card { padding: 1.75rem; } }
.gv-card h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }

.gv-amounts { margin-top: 1rem; display: grid; gap: .625rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) { .gv-amounts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gv-amount {
  display: flex; align-items: center; justify-content: center; cursor: pointer; text-align: center;
  padding: .75rem; border: 2px solid var(--line); border-radius: 1rem; background: #fff;
  font-size: .875rem; font-weight: 600; color: rgba(74, 47, 86, .7);
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.gv-amount input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gv-amount:hover { border-color: var(--brand-mid); }
.gv-amount.is-on, .gv-amount:has(input:checked) {
  border-color: var(--brand-mid); background: rgba(135, 104, 169, .1); color: var(--brand-mid);
}
.gv-amount:focus-within { outline: 2px solid var(--brand-mid); outline-offset: 2px; }

.gv-field { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.gv-field label { font-size: .875rem; font-weight: 600; color: rgba(74, 47, 86, .8); }
.gv-dim { font-weight: 400; color: rgba(74, 47, 86, .55); }
.gv-input {
  width: 100%; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 1rem;
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.gv-input:focus { outline: none; border-color: var(--brand-mid); box-shadow: 0 0 0 3px rgba(135, 104, 169, .2); }
.gv-select { cursor: pointer; }
.gv-two { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); margin-top: 1rem; }
.gv-two .gv-field { margin-top: 0; }
@media (min-width: 640px) { .gv-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gv-note { margin: .75rem 0 0; font-size: .875rem; color: rgba(74, 47, 86, .6); }

.gv-summary {
  background: var(--brand); color: #ece4f1; border-radius: 1.5rem; padding: 1.75rem;
  box-shadow: 0 20px 25px -5px rgba(74, 47, 86, .2), 0 8px 10px -6px rgba(74, 47, 86, .2);
}
@media (min-width: 1024px) { .gv-summary { position: sticky; top: 6rem; } }
.gv-summary h3 { margin: 0; color: #fff; font-size: 1.125rem; font-weight: 600; }
.gv-summary dl { margin: 1.25rem 0 0; display: grid; gap: .75rem; font-size: 15px; }
.gv-summary dl > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gv-summary dt { color: rgba(236, 228, 241, .8); }
.gv-summary dd { margin: 0; }
.gv-sum-amount { font-size: 1.5rem; font-weight: 600; }
.gv-sum-row { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: .75rem; }
.gv-sum-row dd { font-weight: 600; text-align: end; }

.gv-send {
  display: block; margin-top: 1.5rem; padding: .875rem 1.5rem; border-radius: 9999px; text-align: center;
  background: var(--accent); color: var(--brand) !important; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
  transition: transform .3s ease, background-color .3s ease;
}
.gv-send:hover { background: #fff; transform: translateY(-2px); }
.gv-send:active { transform: scale(.98); }
.gv-send.is-off { opacity: .5; pointer-events: none; }
button.gv-send { width: 100%; border: 0; font: inherit; font-weight: 700; }
.gv-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.gv-done { max-width: 40rem; margin: 0 auto; padding: 2.5rem 2rem; text-align: center; background: var(--brand); color: #ece4f1; border-radius: 1.5rem; }
.gv-done[hidden] { display: none; }
.gv-done > svg { color: var(--accent); }
.gv-done h2 { margin: 1rem 0 0; color: #fff; font-size: 1.75rem; }
.gv-done p { margin: 1rem 0 0; font-size: 1.125rem; line-height: 1.7; }
.gv-done .gv-send { display: inline-block; width: auto; margin-top: 1.5rem; }
.gv-hint { margin: .75rem 0 0; text-align: center; font-size: .75rem; color: rgba(236, 228, 241, .7); }
.gv-hint[hidden] { display: none; }
.gv-trust {
  list-style: none; margin: 1.5rem 0 0; padding: 1.25rem 0 0; display: grid; gap: .625rem;
  border-top: 1px solid rgba(255, 255, 255, .15); font-size: .875rem; color: rgba(236, 228, 241, .8);
}
.gv-trust li { display: flex; align-items: flex-start; gap: .5rem; }
.gv-trust svg { flex: none; margin-top: .2rem; color: var(--accent); }

.gv-other { margin: 2.5rem 0 0; text-align: center; color: rgba(74, 47, 86, .7); }
.gv-other a { font-weight: 600; color: var(--brand-mid); transition: color .2s ease; }
.gv-other a:hover { color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .gv-send, .gv-amount, .gv-input { transition: none; }
  .gv-send:hover { transform: none; }
}

/* Name across the top, then email and phone side by side. */
@media (min-width: 640px) { .gv-two .gv-field:first-child { grid-column: 1 / -1; } }
.gv-input[aria-invalid="true"] { border-color: #b3261e; }
.gv-textarea { min-height: 6rem; resize: vertical; line-height: 1.6; }

/* ---- A programme's projects, under its tags ------------------------------
   A small grid of picture cards; each is a link to the project. */
.field-projects { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.field-projects[hidden] { display: none; }
.field-projects h4 { margin: 0 0 var(--s-4); font-size: var(--t-md); color: var(--brand); }
.field-projects-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-project {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--brand); text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.field-project:hover, .field-project:focus-visible {
  transform: translateY(-3px); border-color: var(--brand-mid); outline: none;
  box-shadow: 0 10px 20px -8px rgba(74, 47, 86, .3);
}
.field-project-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-sunk); }
.field-project-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.field-project:hover .field-project-img img { transform: scale(1.06); }
.field-project-title { display: block; padding: var(--s-3) var(--s-4); font-size: var(--t-sm); font-weight: 700; line-height: 1.5; }
@media (max-width: 480px) { .field-projects-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .field-project, .field-project-img img { transition: none; }
  .field-project:hover { transform: none; }
}

/* -- Phone header ---------------------------------------------------------
   The mark, the burger, the language pill, the calculator, search and a
   labelled donate button add up to about 470px of controls in a 328–358px bar.
   The mark took a column that collapsed to nothing (so the burger was drawn
   underneath it and the actions ran off the right edge), and the whole page
   grew sideways with them. Under 480px the mark keeps its own width, the
   burger takes the slack, the calculator (it is also in the menu) steps aside
   and the donate button keeps its heart and name-for-screen-readers only. */
@media (max-width: 480px) {
  .site-header .wrap { grid-template-columns: auto minmax(0, 1fr) auto; }
  .brand { width: 80px; }
  .icon-btn--zakat { display: none; }
  .header-donate { width: 42px; padding: 0; gap: 0; }
  .header-donate-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}
@media (max-width: 400px) {
  .lang-pill a { min-width: 26px; padding-inline: 4px; }
  .header-actions { gap: 6px; }
}
.nav a.nav-zakat-mobile { display: none; }
@media (max-width: 480px) { .nav a.nav-zakat-mobile { display: block; } }

/* ---- The hidden surprise ------------------------------------------------
   Drawn by `partials/easter-egg.php`, run by `initEasterEgg()` in app.js and
   switched off completely from Settings → Organisation (then none of this
   markup is sent). A shower of hearts over a soft violet veil, and one card
   in the site's own colours saying what "Sevgi Eli" means.

   `[hidden]` has to win over the flex below, the same trap the photograph
   viewer's overlay has. Logical properties throughout; the sideways sway of
   each heart is mirrored in script so the drift reads the same in Arabic.   */

.egg {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-5);
  opacity: 0; transition: opacity .22s ease;
}
.egg[hidden] { display: none; }
.egg.is-open { opacity: 1; }

.egg-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(74, 47, 86, .55), rgba(55, 36, 63, .82));
  backdrop-filter: blur(3px);
}

/* The hearts fall over everything, the card included, and never catch a click. */
.egg-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.egg-bit {
  position: absolute; top: -48px; inset-inline-start: var(--x);
  width: var(--s); height: var(--s);
  opacity: 0;
  animation: eggFall var(--d) cubic-bezier(.3, .1, .6, 1) var(--w) forwards;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25));
}
.egg-bit svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
/* The hand is an outline, not a solid. */
.egg-bit svg:has(path + path) { fill: none; stroke: currentColor; stroke-width: 1.9; }
@keyframes eggFall {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--sway), 108vh, 0) rotate(var(--r)); }
}

.egg-card {
  position: relative; z-index: 1;
  width: min(440px, 100%);
  padding: var(--s-7) var(--s-6) var(--s-6);
  border-radius: 24px;
  background: var(--brand); color: #ece4f1; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
  overflow: hidden;
  transform: translateY(18px) scale(.94);
  transition: transform .32s cubic-bezier(.2, .9, .3, 1.2);
  outline: none;
}
.egg.is-open .egg-card { transform: none; }
/* Two soft blooms in the corners, the same ones the page banners carry. */
.egg-card::before, .egg-card::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(46px); opacity: .5;
}
.egg-card::before { width: 200px; height: 200px; top: -80px; inset-inline-start: -70px; background: var(--brand-mid); }
.egg-card::after  { width: 180px; height: 180px; bottom: -80px; inset-inline-end: -60px; background: var(--accent); opacity: .3; }
.egg-card > * { position: relative; }

.egg-close {
  position: absolute; top: 12px; inset-inline-end: 12px;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
  transition: background-color .15s ease;
}
.egg-close:hover, .egg-close:focus-visible { background: rgba(255, 255, 255, .24); }

.egg-emblem {
  position: relative; width: 84px; height: 84px; margin: 0 auto var(--s-4);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full); background: var(--accent); color: var(--brand-dark);
}
.egg-emblem svg { animation: eggBeat 1.6s ease-in-out infinite; }
.egg-emblem-ring {
  position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--accent);
  animation: eggRing 2.4s ease-out infinite;
}
@keyframes eggBeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.14); } 28% { transform: scale(1); } 42% { transform: scale(1.08); } }
@keyframes eggRing { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }

.egg-kicker {
  margin: 0 0 var(--s-2); font-size: 12px; font-weight: 700; color: #a5cf6e;
  letter-spacing: .16em; text-transform: uppercase;
}
[lang="ar"] .egg-kicker { letter-spacing: 0; text-transform: none; font-size: 13px; }

.egg-title { margin: 0 0 var(--s-3); font-family: var(--f-display); font-size: 26px; line-height: 1.25; font-weight: 700; color: #fff; }
.egg-line  { margin: 0 auto var(--s-5); max-width: 34ch; font-size: 15px; line-height: 1.7; color: #ece4f1; opacity: .9; }

.egg-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: center; }
.egg-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-full);
  background: var(--accent); color: var(--brand-dark); font-weight: 700; text-decoration: none;
  transition: transform .18s ease, background-color .18s ease;
}
.egg-cta:hover, .egg-cta:focus-visible { background: #8ec84f; transform: translateY(-2px); }
.egg-again {
  padding: 11px 16px; border: 0; background: none; cursor: pointer;
  color: #ece4f1; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; opacity: .85;
}
.egg-again:hover, .egg-again:focus-visible { opacity: 1; }

@media (max-width: 480px) {
  .egg-card { padding: var(--s-6) var(--s-5) var(--s-5); }
  .egg-title { font-size: 22px; }
}

/* No falling hearts are created for somebody who asked for less motion (the
   script declines), and the card itself stops pulsing and sliding. */
@media (prefers-reduced-motion: reduce) {
  .egg, .egg-card { transition: none; transform: none; }
  .egg-emblem svg, .egg-emblem-ring { animation: none; }
  .egg-emblem-ring { display: none; }
}
