/* =====================================================================
   Hareer Donations Platform — design system
   Brand: magenta #EC2C8C + turquoise #17B9D4, taken from the Hareer logo.
   Built mobile-first, RTL-native, with an app-like feel on phones.
   ===================================================================== */

/* ------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------ */
:root {
  /* Brand */
  --pink-50:  #FFF0F7;
  --pink-100: #FFDDEE;
  --pink-200: #FFB9DA;
  --pink-300: #FF8AC0;
  --pink-400: #F65AA6;
  --pink-500: #EC2C8C;   /* primary */
  --pink-600: #D01A76;
  --pink-700: #A81260;
  --pink-800: #7C0C46;

  --cyan-50:  #EAFBFE;
  --cyan-100: #C9F3FA;
  --cyan-200: #93E6F3;
  --cyan-300: #55D4E8;
  --cyan-400: #2AC3DC;
  --cyan-500: #17B9D4;   /* secondary */
  --cyan-600: #0E93AB;
  --cyan-700: #0B7186;

  --violet-500: #7C4DFF;
  --green-500:  #2E9E5B;
  --amber-500:  #F5A623;
  --red-500:    #E5484D;

  /* Neutrals — warm, so the pink never reads clinical */
  --ink-900: #1B1020;
  --ink-800: #2C1D33;
  --ink-700: #453949;
  --ink-600: #6B5A73;
  --ink-500: #8B7C92;
  --ink-400: #AFA4B4;
  --ink-300: #D5CDD8;
  --ink-200: #E9E3EC;
  --ink-100: #F4F0F6;
  --ink-50:  #FBF9FC;
  --white:   #FFFFFF;

  /* Semantic */
  --bg:            var(--ink-50);
  --bg-elevated:   var(--white);
  --bg-sunken:     var(--ink-100);
  --text:          var(--ink-900);
  --text-muted:    var(--ink-600);
  --text-subtle:   var(--ink-500);
  --border:        var(--ink-200);
  --border-strong: var(--ink-300);
  --primary:       var(--pink-500);
  --primary-hover: var(--pink-600);
  --primary-soft:  var(--pink-50);
  --accent:        var(--cyan-500);
  --accent-soft:   var(--cyan-50);
  --success:       var(--green-500);
  --warning:       var(--amber-500);
  --danger:        var(--red-500);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--pink-500) 0%, var(--pink-400) 45%, var(--cyan-500) 130%);
  --grad-warm:  linear-gradient(135deg, var(--pink-600) 0%, var(--pink-400) 100%);
  --grad-cool:  linear-gradient(135deg, var(--cyan-600) 0%, var(--cyan-400) 100%);

  /* Type */
  --font-sans: 'Tajawal', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.375rem;
  --fs-2xl:  1.75rem;
  --fs-3xl:  2.25rem;
  --fs-4xl:  3rem;

  /* Space & shape */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;
  --r-sm: 8px;  --r-md: 14px;  --r-lg: 20px;  --r-xl: 28px;  --r-full: 999px;

  /* Elevation — tinted so shadows sit in the brand family */
  --sh-xs: 0 1px 2px rgba(43, 16, 48, .06);
  --sh-sm: 0 2px 8px rgba(43, 16, 48, .07);
  --sh-md: 0 6px 20px rgba(43, 16, 48, .09);
  --sh-lg: 0 16px 44px rgba(43, 16, 48, .13);
  --sh-pink: 0 10px 30px rgba(236, 44, 140, .28);

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .16s;
  --dur: .28s;
  --dur-slow: .5s;

  /* Layout */
  --container: 1180px;
  --header-h: 68px;
  --tabbar-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ------------------------------------------------------------------
   2. Reset
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 var(--sp-3);
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--primary-hover); }

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

ul, ol { margin: 0 0 var(--sp-4); padding-inline-start: 1.35em; }
li { margin-bottom: var(--sp-2); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

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

:focus-visible {
  outline: 3px solid var(--cyan-400);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--pink-200); color: var(--ink-900); }

/* ------------------------------------------------------------------
   3. Layout primitives
   ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.container-narrow { max-width: 760px; }
.container-wide   { max-width: 1400px; }

.section { padding-block: var(--sp-7); }
.section-lg { padding-block: var(--sp-8); }
.section-tint { background: var(--bg-elevated); }
.section-soft { background: linear-gradient(180deg, var(--pink-50) 0%, var(--bg) 100%); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row-tight { gap: var(--sp-2); }
.grow { flex: 1 1 auto; min-width: 0; }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-lg { font-size: var(--fs-lg); }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--cyan-600); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.hidden { display: none !important; }

/* Numbers stay LTR even inside Arabic text */
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: var(--sp-4); top: -60px;
  z-index: 999; background: var(--primary); color: #fff;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

/* ------------------------------------------------------------------
   4. Section headings
   ------------------------------------------------------------------ */
.section-head { margin-bottom: var(--sp-6); max-width: 640px; }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--primary);
  background: var(--primary-soft); padding: 6px 14px;
  border-radius: var(--r-full); margin-bottom: var(--sp-3);
}
.eyebrow.accent { color: var(--cyan-700); background: var(--accent-soft); }

.section-head h2 { margin-bottom: var(--sp-2); }
.section-head p  { color: var(--text-muted); font-size: var(--fs-md); margin: 0; }

/* ------------------------------------------------------------------
   5. Buttons
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: 0.72rem 1.4rem;
  font-family: var(--font-display);
  font-size: var(--fs-base); font-weight: 700; line-height: 1.2;
  border-radius: var(--r-full);
  border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn-primary { background: var(--grad-warm); color: #fff; box-shadow: var(--sh-pink); }
.btn-primary:hover { color: #fff; box-shadow: 0 14px 36px rgba(236, 44, 140, .36); }

.btn-accent { background: var(--grad-cool); color: #fff; box-shadow: 0 10px 30px rgba(23, 185, 212, .3); }
.btn-accent:hover { color: #fff; }

.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.btn-ghost { background: var(--bg-sunken); color: var(--text); }
.btn-ghost:hover { background: var(--ink-200); color: var(--text); }

.btn-white { background: #fff; color: var(--primary); box-shadow: var(--sh-md); }
.btn-white:hover { color: var(--primary-hover); }

.btn-glass {
  background: rgba(255,255,255,.16); color: #fff;
  border-color: rgba(255,255,255,.4); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,.26); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(.94); }

.btn-sm  { padding: .48rem 1rem; font-size: var(--fs-sm); }
.btn-lg  { padding: .95rem 2rem; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn-icon { padding: .6rem; width: 2.6rem; height: 2.6rem; border-radius: var(--r-full); }

/* Loading state driven by JS */
.btn.is-loading { pointer-events: none; position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: #fff; animation: spin .7s linear infinite;
}
.btn-outline.is-loading::after, .btn-ghost.is-loading::after { color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------
   6. Cards
   ------------------------------------------------------------------ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card-pad { padding: var(--sp-5); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.card-flat { border-radius: var(--r-md); box-shadow: none; }

.card-media {
  position: relative; aspect-ratio: 16 / 10;
  background: var(--grad-brand); overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.card-hover:hover .card-media img { transform: scale(1.06); }
.card-media-tall { aspect-ratio: 4 / 5; }

.card-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.card-body h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.card-body p  { color: var(--text-muted); font-size: var(--fs-base); margin-bottom: var(--sp-3); }

.card-link { color: inherit; display: block; }
.card-link:hover { color: inherit; }

/* ------------------------------------------------------------------
   7. Badges & pills
   ------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 800; line-height: 1;
  padding: 5px 11px; border-radius: var(--r-full);
  background: var(--bg-sunken); color: var(--text-muted);
}
.badge-primary { background: var(--pink-100); color: var(--pink-700); }
.badge-accent  { background: var(--cyan-100); color: var(--cyan-700); }
.badge-success { background: #DCF5E7; color: #1B7742; }
.badge-warning { background: #FFF0D6; color: #94620A; }
.badge-danger  { background: #FDE3E4; color: #A82228; }
.badge-urgent  { background: var(--red-500); color: #fff; animation: pulse-soft 2.4s ease-in-out infinite; }

@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); }
  50%      { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); }
}

.card-media .badge { position: absolute; inset-block-start: var(--sp-3); inset-inline-start: var(--sp-3); z-index: 2; }

/* ------------------------------------------------------------------
   8. Progress
   ------------------------------------------------------------------ */
.progress {
  height: 9px; border-radius: var(--r-full);
  background: var(--ink-200); overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: var(--r-full);
  background: var(--grad-warm);
  width: 0;
  transition: width 1.1s var(--ease-out);
  position: relative;
}
.progress-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 2.4s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.progress-bar.accent { background: var(--grad-cool); }
.progress-bar.done   { background: linear-gradient(135deg, #2E9E5B, #46C27C); }

.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--sp-3); margin-top: var(--sp-2); font-size: var(--fs-sm);
}
.progress-meta strong { font-size: var(--fs-md); font-family: var(--font-display); }

/* ------------------------------------------------------------------
   9. Forms
   ------------------------------------------------------------------ */
.field { margin-bottom: var(--sp-4); }
.field:last-child { margin-bottom: 0; }

.label {
  display: block; font-weight: 700; font-size: var(--fs-sm);
  margin-bottom: var(--sp-2); color: var(--ink-800);
}
.label .opt { font-weight: 500; color: var(--text-subtle); font-size: var(--fs-xs); }

.input, .select, .textarea {
  display: block; width: 100%;
  padding: 0.72rem 1rem;
  font-size: var(--fs-base);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(236, 44, 140, .13);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.7; }

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B5A73' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 1.1em;
  background-position: left 1rem center;
  padding-inline-end: 1rem;
  padding-inline-start: 2.6rem;
}
[dir="ltr"] .select { background-position: right 1rem center; padding-inline-start: 1rem; padding-inline-end: 2.6rem; }

.input.has-error, .select.has-error, .textarea.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(229, 72, 77, .11);
}
.field-error {
  display: flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); color: var(--danger);
  margin-top: 6px; font-weight: 600;
}
.field-hint { font-size: var(--fs-xs); color: var(--text-subtle); margin-top: 6px; }

/* Checkbox & radio */
.check {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  cursor: pointer; font-size: var(--fs-base); line-height: 1.6;
}
.check input[type="checkbox"], .check input[type="radio"] {
  flex: none; width: 20px; height: 20px; margin-top: 3px;
  accent-color: var(--primary); cursor: pointer;
}

/* Segmented control — used for one-time vs monthly */
.segment {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--bg-sunken); border-radius: var(--r-full);
  width: 100%;
}
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment label {
  flex: 1; text-align: center; padding: .6rem 1rem;
  border-radius: var(--r-full); font-weight: 700; font-size: var(--fs-sm);
  color: var(--text-muted); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.segment input:checked + label {
  background: var(--bg-elevated); color: var(--primary);
  box-shadow: var(--sh-sm);
}
.segment input:focus-visible + label { outline: 3px solid var(--cyan-400); outline-offset: 2px; }

/* Amount chooser */
.amount-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}
.amount-opt input { position: absolute; opacity: 0; pointer-events: none; }
.amount-opt label {
  display: flex; align-items: center; justify-content: center;
  padding: .95rem .5rem;
  border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg);
  cursor: pointer; background: var(--bg-elevated);
  transition: all var(--dur-fast) var(--ease);
}
.amount-opt label:hover { border-color: var(--pink-300); }
.amount-opt input:checked + label {
  border-color: var(--primary); background: var(--primary-soft);
  color: var(--primary); box-shadow: 0 0 0 3px rgba(236,44,140,.12);
}
.amount-opt input:focus-visible + label { outline: 3px solid var(--cyan-400); outline-offset: 2px; }

/* Input with a currency affix */
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .affix {
  position: absolute; inset-inline-start: 1rem;
  font-weight: 700; color: var(--text-subtle); pointer-events: none;
}
.input-affix .input { padding-inline-start: 3.1rem; font-weight: 800; font-size: var(--fs-lg); }

/* Choice cards — payment methods, designations */
.choice-list { display: grid; gap: var(--sp-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
  cursor: pointer; background: var(--bg-elevated);
  transition: all var(--dur-fast) var(--ease);
}
.choice label:hover { border-color: var(--pink-300); }
.choice input:checked + label {
  border-color: var(--primary); background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(236,44,140,.1);
}
.choice input:focus-visible + label { outline: 3px solid var(--cyan-400); outline-offset: 2px; }
.choice .choice-icon {
  flex: none; width: 40px; height: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--bg-sunken); color: var(--primary);
}
.choice .choice-text { flex: 1; min-width: 0; }
.choice .choice-text strong { display: block; font-size: var(--fs-base); }
.choice .choice-text span { font-size: var(--fs-xs); color: var(--text-muted); }

/* Honeypot — invisible to humans, still reachable for bots.
   Clipped rather than pushed off-canvas, which would extend the document
   and create a phantom horizontal scrollbar (badly so in RTL). */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; border: 0;
  overflow: hidden; white-space: nowrap;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  opacity: 0; pointer-events: none;
}

/* ------------------------------------------------------------------
   10. Alerts & toasts
   ------------------------------------------------------------------ */
.alert {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border-inline-start: 4px solid;
  font-size: var(--fs-base);
  margin-bottom: var(--sp-4);
}
.alert svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.alert-success { background: #EAF8F0; border-color: var(--success); color: #1B6C3E; }
.alert-error   { background: #FDECEC; border-color: var(--danger);  color: #96222A; }
.alert-info    { background: var(--cyan-50); border-color: var(--cyan-500); color: var(--cyan-700); }
.alert-warning { background: #FFF6E5; border-color: var(--warning); color: #8A5B08; }

.toast-stack {
  position: fixed; inset-block-end: calc(var(--tabbar-h) + var(--safe-b) + 12px);
  inset-inline: var(--sp-4); z-index: 400;
  display: flex; flex-direction: column; gap: var(--sp-2);
  pointer-events: none;
}
@media (min-width: 720px) {
  .toast-stack { inset-block-end: var(--sp-5); inset-inline-start: auto; max-width: 380px; }
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--ink-900); color: #fff;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  box-shadow: var(--sh-lg); font-size: var(--fs-base);
  animation: toast-in .35s var(--ease-out);
}
.toast.success { background: #1B7742; }
.toast.error   { background: #A82228; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.toast.is-leaving { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ------------------------------------------------------------------
   11. Header
   ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--sh-sm); }

.header-inner {
  height: 100%; display: flex; align-items: center;
  gap: var(--sp-4); justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.brand img { height: 40px; width: auto; }
.brand-text { display: none; line-height: 1.15; }
.brand-text strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-base); }
.brand-text span { font-size: 10px; color: var(--text-subtle); letter-spacing: .04em; }
@media (min-width: 900px) { .brand-text { display: block; } }

.main-nav { display: none; }
@media (min-width: 1024px) {
  .main-nav { display: flex; align-items: center; gap: var(--sp-1); }
}
.nav-link {
  padding: .5rem .8rem; border-radius: var(--r-full);
  font-weight: 700; font-size: var(--fs-sm); color: var(--ink-700);
  transition: all var(--dur-fast) var(--ease); white-space: nowrap;
}
.nav-link:hover { background: var(--primary-soft); color: var(--primary); }
.nav-link.is-active { color: var(--primary); background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.header-actions .btn-donate { display: none; }
@media (min-width: 560px) { .header-actions .btn-donate { display: inline-flex; } }

.icon-btn {
  width: 42px; height: 42px; border-radius: var(--r-full);
  display: grid; place-items: center; color: var(--ink-700);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--primary); }
.icon-btn svg { width: 21px; height: 21px; }

.lang-switch {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .4rem .75rem; border-radius: var(--r-full);
  border: 1.5px solid var(--border); font-weight: 800; font-size: var(--fs-xs);
  color: var(--ink-700);
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }

.menu-toggle { display: grid; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

/* ------------------------------------------------------------------
   12. Mobile drawer
   ------------------------------------------------------------------ */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 290;
  background: rgba(27, 16, 32, .5);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 300;
  width: min(340px, 88vw);
  background: var(--bg-elevated);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--dur) var(--ease-out), visibility var(--dur);
  overflow-y: auto; overscroll-behavior: contain;
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.is-open { transform: translateX(0); visibility: visible; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-elevated); z-index: 2;
}
.drawer-body { padding: var(--sp-4); flex: 1; }
.drawer-link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: .85rem var(--sp-3); border-radius: var(--r-md);
  font-weight: 700; color: var(--ink-800);
  transition: background var(--dur-fast) var(--ease);
}
.drawer-link:hover, .drawer-link.is-active { background: var(--primary-soft); color: var(--primary); }
.drawer-link svg { width: 20px; height: 20px; color: var(--primary); flex: none; }
.drawer-foot { padding: var(--sp-4); border-top: 1px solid var(--border); }

/* ------------------------------------------------------------------
   13. Bottom tab bar (mobile app feel)
   ------------------------------------------------------------------ */
.tabbar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 180;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: center;
}
@media (min-width: 1024px) { .tabbar { display: none; } }
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
@media (min-width: 1024px) { body.has-tabbar { padding-bottom: 0; } }

.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: 100%; font-size: 10px; font-weight: 700;
  color: var(--ink-500); transition: color var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 22px; height: 22px; transition: transform var(--dur) var(--ease); }
.tab.is-active { color: var(--primary); }
.tab.is-active svg { transform: translateY(-2px) scale(1.08); }
.tab:active svg { transform: scale(.9); }

.tab-donate { position: relative; }
.tab-donate .tab-fab {
  width: 46px; height: 46px; border-radius: var(--r-full);
  background: var(--grad-warm); color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--sh-pink); margin-top: -18px;
}
.tab-donate .tab-fab svg { width: 24px; height: 24px; }
.tab-donate span { margin-top: -2px; }

/* ------------------------------------------------------------------
   14. Hero
   ------------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-brand);
  color: #fff;
  padding-block: var(--sp-7) var(--sp-8);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(ellipse 50% 60% at 90% 100%, rgba(23,185,212,.35), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: var(--sp-4); }
.hero p.lead { font-size: var(--fs-lg); color: rgba(255,255,255,.94); max-width: 620px; margin-bottom: var(--sp-5); }
.hero .eyebrow { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }

.hero-grid {
  display: grid; gap: var(--sp-6); align-items: center;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: var(--sp-7); } }

.hero-card {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(18px);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  box-shadow: var(--sh-lg);
}

/* Decorative blobs echoing the logo shapes */
.blob {
  position: absolute; border-radius: 46% 54% 62% 38% / 52% 44% 56% 48%;
  filter: blur(2px); opacity: .3; pointer-events: none;
  animation: blob-float 14s ease-in-out infinite;
}
.blob-1 { width: 220px; height: 220px; background: rgba(255,255,255,.35); top: -70px; inset-inline-end: -60px; }
.blob-2 { width: 300px; height: 300px; background: rgba(23,185,212,.5); bottom: -140px; inset-inline-start: -80px; animation-delay: -5s; }
@keyframes blob-float {
  0%, 100% { transform: translate(0,0) rotate(0deg); }
  50%      { transform: translate(18px,-22px) rotate(9deg); }
}

/* ------------------------------------------------------------------
   15. Stats / counters
   ------------------------------------------------------------------ */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 720px)  { .stat-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }

.stat {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-4);
  text-align: center;
}
.stat-icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin: 0 auto var(--sp-3);
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-value {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-2xl); line-height: 1.1; color: var(--primary);
  direction: ltr; unicode-bidi: isolate;
}
.stat-label { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 4px; }

.stat.on-brand { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.24); }
.stat.on-brand .stat-value, .stat.on-brand .stat-label { color: #fff; }
.stat.on-brand .stat-icon { background: rgba(255,255,255,.2); color: #fff; }

/* ------------------------------------------------------------------
   16. Campaign & initiative cards
   ------------------------------------------------------------------ */
.campaign-card .card-body { display: flex; flex-direction: column; gap: var(--sp-3); }
.campaign-card .progress-meta strong { color: var(--primary); }

.initiative-card { position: relative; }
.initiative-card .init-icon {
  position: absolute; inset-block-start: -22px; inset-inline-start: var(--sp-5);
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: grid; place-items: center; color: #fff;
  background: var(--grad-warm); box-shadow: var(--sh-md);
}
.initiative-card .init-icon svg { width: 24px; height: 24px; }
.initiative-card .card-body { padding-top: var(--sp-6); }

/* Horizontal scroller for mobile card rows */
.scroller {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(268px, 78vw);
  gap: var(--sp-4);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-block-end: var(--sp-3);
  margin-inline: calc(var(--sp-4) * -1);
  padding-inline: var(--sp-4);
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 780px) {
  .scroller {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    overflow: visible; margin-inline: 0; padding-inline: 0;
  }
}

/* ------------------------------------------------------------------
   17. Ways to give
   ------------------------------------------------------------------ */
.way-card {
  display: flex; gap: var(--sp-4); align-items: flex-start;
  padding: var(--sp-5); border-radius: var(--r-lg);
  background: var(--bg-elevated); border: 1px solid var(--border);
  transition: all var(--dur) var(--ease); color: inherit;
}
.way-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--pink-200); color: inherit; }
.way-icon {
  flex: none; width: 52px; height: 52px; border-radius: var(--r-md);
  display: grid; place-items: center; background: var(--accent-soft); color: var(--cyan-600);
}
.way-icon svg { width: 26px; height: 26px; }
.way-card:nth-child(even) .way-icon { background: var(--primary-soft); color: var(--primary); }
.way-card h3 { font-size: var(--fs-md); margin-bottom: 4px; }
.way-card p  { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }

/* ------------------------------------------------------------------
   18. Quote / founder
   ------------------------------------------------------------------ */
.quote {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  border: 1px solid var(--border);
}
.quote::before {
  content: '”';
  position: absolute; inset-block-start: -8px; inset-inline-start: var(--sp-5);
  font-family: var(--font-display); font-size: 5rem; line-height: 1;
  color: var(--pink-200);
}
.quote blockquote {
  margin: 0; font-size: var(--fs-lg); line-height: 1.85;
  color: var(--ink-800); position: relative; z-index: 1;
}
.quote-author { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-5); }
.quote-avatar {
  width: 52px; height: 52px; border-radius: var(--r-full);
  background: var(--grad-warm); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display);
  font-weight: 800; font-size: var(--fs-lg); flex: none;
}
.quote-author strong { display: block; font-family: var(--font-display); }
.quote-author span { font-size: var(--fs-sm); color: var(--text-muted); }

/* ------------------------------------------------------------------
   19. CTA band
   ------------------------------------------------------------------ */
.cta-band {
  background: var(--grad-brand); color: #fff;
  border-radius: var(--r-xl); padding: var(--sp-7) var(--sp-5);
  text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: var(--fs-2xl); }
.cta-band p  { color: rgba(255,255,255,.92); max-width: 560px; margin-inline: auto; }
.cta-band .row { justify-content: center; margin-top: var(--sp-5); }

/* ------------------------------------------------------------------
   20. Footer
   ------------------------------------------------------------------ */
.site-footer {
  background: var(--ink-900); color: rgba(255,255,255,.72);
  padding-block: var(--sp-7) var(--sp-5); margin-top: var(--sp-7);
}
.site-footer h4 { color: #fff; font-size: var(--fs-base); margin-bottom: var(--sp-3); }
.site-footer a { color: rgba(255,255,255,.72); font-size: var(--fs-sm); }
.site-footer a:hover { color: var(--pink-300); }
.footer-grid {
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 780px) { .footer-brand { grid-column: auto; max-width: 320px; } }
.footer-brand img { height: 48px; margin-bottom: var(--sp-3); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: var(--sp-2); }
.footer-bottom {
  margin-top: var(--sp-6); padding-top: var(--sp-4);
  border-top: 1px solid rgba(255,255,255,.11);
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  justify-content: space-between; align-items: center;
  font-size: var(--fs-xs);
}
.social-row { display: flex; gap: var(--sp-2); }
.social-row a {
  width: 38px; height: 38px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(255,255,255,.09); color: #fff;
  transition: all var(--dur-fast) var(--ease);
}
.social-row a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }

.newsletter-form { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.newsletter-form .input {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff;
  padding: .6rem .9rem; font-size: var(--fs-sm);
}
.newsletter-form .input::placeholder { color: rgba(255,255,255,.45); }
.newsletter-form .input:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(236,44,140,.2); }

/* ------------------------------------------------------------------
   21. Page headers & breadcrumbs
   ------------------------------------------------------------------ */
.page-head {
  background: linear-gradient(160deg, var(--pink-50) 0%, var(--cyan-50) 100%);
  padding-block: var(--sp-6) var(--sp-6);
  border-bottom: 1px solid var(--border);
}
.page-head h1 { margin-bottom: var(--sp-2); }
.page-head p { color: var(--text-muted); max-width: 640px; margin: 0; }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--text-subtle); margin-bottom: var(--sp-3);
}
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { opacity: .5; }

/* ------------------------------------------------------------------
   22. Article body
   ------------------------------------------------------------------ */
.prose { font-size: var(--fs-md); line-height: 1.95; color: var(--ink-800); }
.prose > * + * { margin-top: var(--sp-4); }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--sp-6); }
.prose h3 { font-size: var(--fs-lg); margin-top: var(--sp-5); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin-bottom: var(--sp-2); }
.prose strong { color: var(--ink-900); font-weight: 800; }
.prose img { border-radius: var(--r-md); margin-block: var(--sp-4); }
.prose blockquote {
  margin: var(--sp-5) 0; padding: var(--sp-4) var(--sp-5);
  border-inline-start: 4px solid var(--primary);
  background: var(--primary-soft); border-radius: var(--r-md);
  font-size: var(--fs-lg);
}
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------
   23. Tables
   ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-elevated); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
.table th, .table td { padding: var(--sp-3) var(--sp-4); text-align: start; }
.table th {
  background: var(--bg-sunken); font-weight: 800; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted);
  white-space: nowrap;
}
.table tbody tr { border-top: 1px solid var(--border); }
.table tbody tr:hover { background: var(--ink-50); }

/* ------------------------------------------------------------------
   24. Gallery & lightbox
   ------------------------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-2); }
.gallery-item {
  position: relative; aspect-ratio: 1; border-radius: var(--r-md);
  overflow: hidden; cursor: zoom-in; background: var(--bg-sunken);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.gallery-item:hover img { transform: scale(1.07); }

.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15, 8, 18, .93);
  display: grid; place-items: center; padding: var(--sp-4);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: var(--r-md); }
.lightbox-close {
  position: absolute; top: var(--sp-4); inset-inline-end: var(--sp-4);
  width: 44px; height: 44px; border-radius: var(--r-full);
  background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center;
}

/* ------------------------------------------------------------------
   25. Timeline (campaign updates, strategy)
   ------------------------------------------------------------------ */
.timeline { position: relative; padding-inline-start: var(--sp-6); }
.timeline::before {
  content: ''; position: absolute; inset-block: 6px 6px;
  inset-inline-start: 7px; width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: var(--sp-5); }
.timeline-item::before {
  content: ''; position: absolute; inset-inline-start: calc(var(--sp-6) * -1 + 1px);
  top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-date { font-size: var(--fs-xs); color: var(--text-subtle); font-weight: 700; }

/* ------------------------------------------------------------------
   26. Pagination
   ------------------------------------------------------------------ */
.pagination { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-6); }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 .7rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); border: 1px solid var(--border);
  font-weight: 700; font-size: var(--fs-sm); color: var(--text-muted);
  background: var(--bg-elevated);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .is-disabled { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------------
   27. Empty state
   ------------------------------------------------------------------ */
.empty {
  text-align: center; padding: var(--sp-7) var(--sp-4);
  color: var(--text-muted);
}
.empty-icon {
  width: 72px; height: 72px; border-radius: var(--r-full);
  background: var(--bg-sunken); color: var(--ink-400);
  display: grid; place-items: center; margin: 0 auto var(--sp-4);
}
.empty-icon svg { width: 34px; height: 34px; }

/* ------------------------------------------------------------------
   28. Sticky donate bar (campaign pages, mobile)
   ------------------------------------------------------------------ */
.sticky-cta {
  position: fixed; inset-inline: 0;
  inset-block-end: calc(var(--tabbar-h) + var(--safe-b));
  z-index: 170; padding: var(--sp-3) var(--sp-4);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease-out);
}
.sticky-cta.is-visible { transform: translateY(0); }
@media (min-width: 1024px) { .sticky-cta { display: none; } }

/* ------------------------------------------------------------------
   29. Page transitions (client-side router)
   ------------------------------------------------------------------ */
#page {
  animation: page-in .34s var(--ease-out);
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
body.is-navigating #page { opacity: .5; transition: opacity .15s linear; }

.route-progress {
  position: fixed; inset-block-start: 0; inset-inline-start: 0;
  height: 3px; z-index: 999; width: 0;
  background: var(--grad-cool);
  transition: width .25s var(--ease), opacity .3s;
  box-shadow: 0 0 12px rgba(23,185,212,.7);
}

/* Reveal-on-scroll.
   Only hidden once JS has confirmed it can reveal them again, so a failed
   script or a no-JS visitor still sees the whole page. */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

/* ------------------------------------------------------------------
   30. Skeletons
   ------------------------------------------------------------------ */
.skeleton {
  background: linear-gradient(90deg, var(--ink-100) 25%, var(--ink-200) 50%, var(--ink-100) 75%);
  background-size: 200% 100%;
  animation: sk 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ------------------------------------------------------------------
   31. Offline banner & install prompt
   ------------------------------------------------------------------ */
.offline-bar {
  position: fixed; inset-inline: 0; inset-block-start: 0; z-index: 500;
  background: var(--ink-800); color: #fff; text-align: center;
  padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm);
  transform: translateY(-100%); transition: transform var(--dur) var(--ease);
}
.offline-bar.is-visible { transform: translateY(0); }

.install-card {
  position: fixed; z-index: 320;
  inset-inline: var(--sp-4);
  inset-block-end: calc(var(--tabbar-h) + var(--safe-b) + var(--sp-3));
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  padding: var(--sp-4); display: flex; gap: var(--sp-3); align-items: center;
  transform: translateY(160%); transition: transform var(--dur-slow) var(--ease-out);
}
.install-card.is-visible { transform: translateY(0); }
.install-card img { width: 46px; height: 46px; border-radius: var(--r-md); flex: none; }
@media (min-width: 720px) { .install-card { max-width: 400px; inset-inline-start: auto; } }

/* ------------------------------------------------------------------
   32. Search overlay
   ------------------------------------------------------------------ */
.search-overlay {
  position: fixed; inset: 0; z-index: 350;
  background: rgba(27,16,32,.55); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur);
  padding-top: 10vh;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-panel {
  max-width: 640px; margin-inline: auto;
  background: var(--bg-elevated); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); overflow: hidden;
  transform: translateY(-14px); transition: transform var(--dur) var(--ease-out);
}
.search-overlay.is-open .search-panel { transform: none; }
.search-input-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--border); }
.search-input-row input { border: 0; outline: 0; flex: 1; font-size: var(--fs-lg); background: transparent; }
.search-results { max-height: 56vh; overflow-y: auto; }
.search-result {
  display: flex; gap: var(--sp-3); align-items: center;
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border);
  color: inherit;
}
.search-result:hover { background: var(--primary-soft); color: inherit; }
.search-result strong { display: block; font-size: var(--fs-base); }
.search-result span { font-size: var(--fs-xs); color: var(--text-muted); }

/* ------------------------------------------------------------------
   33. Utilities for the donate flow
   ------------------------------------------------------------------ */
.donate-layout { display: grid; gap: var(--sp-5); }
@media (min-width: 960px) {
  .donate-layout { grid-template-columns: 1.35fr .65fr; align-items: start; }
  .donate-summary { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
}

.summary-row {
  display: flex; justify-content: space-between; gap: var(--sp-3);
  padding-block: var(--sp-2); font-size: var(--fs-sm);
}
.summary-row + .summary-row { border-top: 1px dashed var(--border); }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 2px solid var(--border);
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-xl);
  color: var(--primary);
}

.impact-hint {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--accent-soft); border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); color: var(--cyan-700);
}
.impact-hint svg { flex: none; width: 22px; height: 22px; }

.bank-detail {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px dashed var(--border);
  font-size: var(--fs-sm);
}
.bank-detail:last-child { border-bottom: 0; }
.bank-detail .value { font-family: ui-monospace, 'SFMono-Regular', monospace; font-weight: 700; direction: ltr; word-break: break-all; text-align: end; }

.copy-btn { flex: none; color: var(--primary); padding: 4px; }
.copy-btn svg { width: 17px; height: 17px; }

/* Steps indicator */
.steps { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.step { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-subtle); font-weight: 700; }
.step-num {
  width: 26px; height: 26px; border-radius: var(--r-full);
  display: grid; place-items: center; background: var(--bg-sunken); color: var(--text-subtle);
  font-size: var(--fs-xs);
}
.step.is-active { color: var(--primary); }
.step.is-active .step-num { background: var(--primary); color: #fff; }
.step.is-done .step-num { background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); border-radius: 2px; min-width: 12px; }

/* ------------------------------------------------------------------
   34. Print (donation receipts)
   ------------------------------------------------------------------ */
@media print {
  .site-header, .tabbar, .site-footer, .sticky-cta, .install-card,
  .toast-stack, .no-print, .drawer, .drawer-backdrop { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  a { color: #000; text-decoration: none; }
}

/* ------------------------------------------------------------------
   35. Reduced motion & dark scheme preference
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #14101A;
    --bg-elevated:   #1D1724;
    --bg-sunken:     #262030;
    --text:          #F5F1F7;
    --text-muted:    #B7ACBE;
    --text-subtle:   #92879A;
    --border:        #332B3D;
    --border-strong: #443B50;
    --primary-soft:  #2A1626;
    --accent-soft:   #12303A;
    --ink-900: #F5F1F7;
    --ink-800: #E4DCE8;
    --ink-700: #CFC4D5;
    --ink-100: #262030;
    --ink-50:  #1D1724;
    --ink-200: #332B3D;
    --sh-sm: 0 2px 8px rgba(0,0,0,.4);
    --sh-md: 0 6px 20px rgba(0,0,0,.45);
    --sh-lg: 0 16px 44px rgba(0,0,0,.55);
  }
  :root:not([data-theme="light"]) .site-header { background: rgba(29,23,36,.88); }
  :root:not([data-theme="light"]) .tabbar { background: rgba(29,23,36,.94); }
  :root:not([data-theme="light"]) .sticky-cta { background: rgba(29,23,36,.96); }
  :root:not([data-theme="light"]) .page-head { background: linear-gradient(160deg, #26162A 0%, #13252C 100%); }
  :root:not([data-theme="light"]) .site-footer { background: #0F0B14; }
  :root:not([data-theme="light"]) .search-panel { background: var(--bg-elevated); }
}
