/* ===========================================================
   IMVMVD — Donate
   ---------------------------------------------------------
   The site's own language — near-black, glass, the blue and
   violet glow, Space Grotesk over Vazirmatn — turned into a
   checkout. --dn-a and --dn-b are the two accents, set from
   the panel on <body>.
=========================================================== */

@font-face{
  font-family:'Vazirmatn';
  src:url("../fonts/vazirmatn-arabic.05d9ce2a23d3.woff2") format('woff2-variations');
  font-weight:100 900; font-display:swap;
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+08A0-08FF,U+200C-200E,U+2010-2011,U+FB50-FDFF,U+FE70-FEFF;
}
@font-face{
  font-family:'Space Grotesk';
  src:url("../fonts/space-grotesk-latin.87c506d88b9f.woff2") format('woff2-variations');
  font-weight:300 700; font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215;
}

:root{
  --bg:#050505;
  --surface:rgba(255,255,255,.04);
  --surface-2:rgba(255,255,255,.07);
  --field:rgba(255,255,255,.045);
  --line:rgba(245,241,236,.10);
  --line-strong:rgba(245,241,236,.2);
  --ink:#F5F1EC;
  /* Solid, not see-through: see style.css on Persian letters' joints. */
  --ink-muted:#A3A19D;
  --ink-faint:#6A6866;
  --danger:#FF6B5A;
  --ok:#2DD4BF;
  --radius:22px;
  --radius-sm:14px;
  --font:'Vazirmatn','Space Grotesk',ui-sans-serif,system-ui,sans-serif;
  --font-display:'Space Grotesk','Vazirmatn',ui-sans-serif,system-ui,sans-serif;
  --ease:cubic-bezier(.16,.84,.44,1);
  --dn-a:#3C8CFF;
  --dn-b:#783CFF;
  color-scheme:dark;
}
[data-theme="light"]{
  --bg:#F7F8FC;
  --surface:rgba(255,255,255,.72);
  --surface-2:rgba(10,10,12,.05);
  --field:rgba(10,10,12,.035);
  --line:rgba(10,10,12,.09);
  --line-strong:rgba(10,10,12,.18);
  --ink:#12100F;
  --ink-muted:#615F5D;
  --ink-faint:#92908E;
  color-scheme:light;
}

*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{ -webkit-text-size-adjust:100%; -webkit-tap-highlight-color:transparent; }
body.dn{
  min-height:100vh; min-height:100dvh;
  background:var(--bg); color:var(--ink);
  font:400 15px/1.75 var(--font);
  display:flex; flex-direction:column;
  overflow-x:hidden;
  transition:background-color .45s var(--ease), color .45s var(--ease);
}
a{ color:inherit; }
button,input,textarea{ font:inherit; color:inherit; }
button{ cursor:pointer; background:none; border:0; }
:focus-visible{ outline:2px solid var(--dn-a); outline-offset:3px; border-radius:10px; }
[hidden]{ display:none !important; }

/* ---------- the sky ---------- */
/* The sky fades out towards the bottom: wherever the layer ends (a phone's
   toolbar sliding away, a long scrolling screenshot) it ends in nothing,
   never in a cut-off band of colour. */
.dn-sky{
  position:fixed; top:0; left:0; right:0; height:100vh; height:100lvh;
  z-index:-1; overflow:hidden; pointer-events:none;
  -webkit-mask-image:linear-gradient(to bottom,#000 0,#000 55%,transparent 96%);
          mask-image:linear-gradient(to bottom,#000 0,#000 55%,transparent 96%);
}
.dn-orb{
  position:absolute; border-radius:50%; filter:blur(70px); opacity:.42;
  animation:dnDrift 26s ease-in-out infinite alternate;
}
.dn-orb--a{ width:46vmax; height:46vmax; top:-18vmax; inset-inline-start:-12vmax; background:var(--dn-a); animation-delay:-7s; }
.dn-orb--b{ width:38vmax; height:38vmax; top:46%; inset-inline-end:-12vmax; background:var(--dn-b); animation-delay:-15s; }
.dn-orb--c{ width:22vmax; height:22vmax; top:38%; left:44%; background:color-mix(in srgb,var(--dn-a) 50%,var(--dn-b)); opacity:.18; animation-duration:34s; }
[data-theme="light"] .dn-orb{ opacity:.2; }
.dn-grain{
  position:absolute; inset:-50%; opacity:.05;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes dnDrift{
  0%{ transform:translate3d(0,0,0) scale(1); }
  50%{ transform:translate3d(4vmax,3vmax,0) scale(1.08); }
  100%{ transform:translate3d(-3vmax,5vmax,0) scale(.96); }
}

/* ---------- top bar ---------- */
.dn-top{
  display:flex; align-items:center; justify-content:space-between;
  width:min(1120px,100% - 2rem); margin:0 auto; padding:1.1rem 0 .4rem;
}
.dn-brand{ display:inline-flex; align-items:center; text-decoration:none; color:var(--ink); }
.dn-brand__mark{
  width:54px; height:32px; background:currentColor;
  -webkit-mask:url("../img/head-logo.bee0e853434c.png") no-repeat center / contain;
  mask:url("../img/head-logo.bee0e853434c.png") no-repeat center / contain;
}
.dn-brand__name{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.dn-icon-btn{
  width:var(--tap-min); height:var(--tap-min); border-radius:50%; display:grid; place-items:center;
  background:var(--surface); border:1px solid var(--line); color:var(--ink-muted);
  transition:color .2s, border-color .2s, transform .2s var(--ease);
}
.dn-icon-btn:hover{ color:var(--ink); border-color:var(--line-strong); }
.dn-icon-btn:active{ transform:scale(.94); }
.dn-moon{ display:none; }
[data-theme="light"] .dn-sun{ display:none; }
[data-theme="light"] .dn-moon{ display:block; }

/* ---------- toasts ---------- */
.dn-toasts{ position:fixed; top:1rem; inset-inline:0; z-index:20; display:grid; justify-items:center; gap:.5rem; padding:0 1rem; pointer-events:none; }
.dn-toast{
  max-width:520px; padding:.75rem 1.1rem; border-radius:16px; pointer-events:auto;
  background:color-mix(in srgb,var(--bg) 80%,transparent); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  border:1px solid var(--line-strong); box-shadow:0 18px 50px -20px rgba(0,0,0,.6);
  animation:dnToast .5s var(--ease) both, dnToastOut .4s ease 6.5s forwards;
}
.dn-toast--error{ border-color:color-mix(in srgb,var(--danger) 55%,transparent); }
@keyframes dnToast{ from{ opacity:0; transform:translateY(-12px) scale(.97); } }
@keyframes dnToastOut{ to{ opacity:0; transform:translateY(-8px); visibility:hidden; } }

/* ---------- layout ---------- */
.dn-main{ flex:1; width:min(1120px,100% - 2rem); margin:0 auto; padding-bottom:2rem; }

/* ---------- hero ---------- */
.dn-hero{ position:relative; text-align:center; padding:1.4rem 0 1.8rem; display:grid; justify-items:center; gap:.55rem; }
.dn-hero__cover{
  position:absolute; inset:-1rem -50vw auto; height:240px; z-index:-1;
  background:center / cover no-repeat; opacity:.35; filter:saturate(1.1);
  -webkit-mask:linear-gradient(#000 20%,transparent); mask:linear-gradient(#000 20%,transparent);
}
.dn-avatar{ position:relative; width:104px; height:104px; margin-bottom:.4rem; }
.dn-avatar img,.dn-avatar__letter{
  position:relative; z-index:1; width:100%; height:100%; border-radius:50%; object-fit:cover;
  border:3px solid var(--bg); background:var(--surface-2);
}
.dn-avatar__letter{ display:grid; place-items:center; font:700 2.6rem var(--font-display); }
.dn-avatar__ring{
  position:absolute; inset:-5px; border-radius:50%;
  background:conic-gradient(from 0deg,var(--dn-a),var(--dn-b),var(--dn-a));
  animation:dnSpin 6s linear infinite;
  box-shadow:0 0 40px -6px color-mix(in srgb,var(--dn-a) 70%,transparent);
}
@keyframes dnSpin{ to{ transform:rotate(1turn); } }

.dn-title{
  position:relative; isolation:isolate;
  font:800 clamp(1.9rem,6vw,2.9rem)/1.25 var(--font);
  letter-spacing:-.01em;
  background:
    linear-gradient(100deg,transparent 0%,transparent 40%,color-mix(in srgb,var(--dn-a) 85%,#fff) 48%,#fff 50%,color-mix(in srgb,var(--dn-b) 85%,#fff) 52%,transparent 60%,transparent 100%),
    linear-gradient(180deg,#fff 0%,color-mix(in srgb,var(--ink) 80%,transparent) 100%);
  background-size:300% 100%,100% 100%;
  background-repeat:repeat-x,no-repeat;
  -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:dnSheen 8s linear -2.6s infinite;
}
.dn-title::before{
  content:attr(data-text); position:absolute; inset:0; z-index:-1; color:transparent;
  text-shadow:0 0 14px color-mix(in srgb,var(--dn-a) 70%,transparent),0 0 40px color-mix(in srgb,var(--dn-b) 55%,transparent);
  opacity:.35; animation:dnGlow 8s ease-in-out -2.6s infinite;
}
[data-theme="light"] .dn-title{
  background:
    linear-gradient(100deg,transparent 0%,transparent 40%,var(--dn-a) 48%,var(--dn-b) 52%,transparent 60%,transparent 100%),
    linear-gradient(180deg,var(--ink) 0%,var(--ink) 100%);
  background-size:300% 100%,100% 100%; background-repeat:repeat-x,no-repeat;
  -webkit-background-clip:text; background-clip:text;
}
[data-theme="light"] .dn-title::before{ opacity:.12; }
@keyframes dnSheen{ 0%{ background-position:150% 0,0 0; } 100%{ background-position:0% 0,0 0; } }
@keyframes dnGlow{ 0%,36%{ opacity:.3; } 67%{ opacity:.95; } 97%,100%{ opacity:.3; } }

.dn-intro{ max-width:46ch; color:var(--ink-muted); font-size:1rem; }
.dn-pill{
  display:inline-flex; align-items:center; gap:.5rem; margin-top:.3rem;
  padding:.3rem .85rem; border-radius:99px; font-size:.82rem; color:var(--ink-muted);
  background:var(--surface); border:1px solid var(--line);
}
.dn-pill__dot{ width:7px; height:7px; border-radius:50%; background:var(--ok); box-shadow:0 0 10px var(--ok); animation:dnPulse 2.2s ease-in-out infinite; }
@keyframes dnPulse{ 50%{ opacity:.35; } }
@keyframes dnFade{ from{ opacity:0; transform:translateY(6px); } }

/* ---------- cards ---------- */
.dn-layout{ display:grid; gap:1.25rem; align-items:start; max-width:680px; margin:0 auto; }
@media (min-width:960px){
  .dn-layout.has-side{ max-width:none; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); }
  .dn-side{ position:sticky; top:1.25rem; }
}
.dn-card{
  position:relative;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  backdrop-filter:blur(22px) saturate(1.2); -webkit-backdrop-filter:blur(22px) saturate(1.2);
  box-shadow:0 30px 80px -40px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.05);
}
[data-theme="light"] .dn-card{ box-shadow:0 24px 60px -36px rgba(20,20,40,.28), inset 0 1px 0 #fff; }
.dn-panel{ padding:1rem; }
@media (min-width:600px){ .dn-panel{ padding:1.4rem; } }
.dn-side{ display:grid; gap:1.25rem; }
.dn-card__head{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.9rem; }
.dn-card__head h2{ font-size:.95rem; font-weight:700; }

.dn-closed{ text-align:center; padding:2rem 1rem; color:var(--ink-muted); }
.dn-sandbox{
  margin-bottom:1rem; padding:.5rem .8rem; border-radius:12px; font-size:.82rem; text-align:center;
  background:color-mix(in srgb,#FFB020 14%,transparent); border:1px dashed color-mix(in srgb,#FFB020 55%,transparent);
}

/* ---------- the amount ---------- */
.dn-amount{
  position:relative; padding:1.1rem 1rem 1rem; margin-bottom:1.2rem; text-align:center;
  border-radius:var(--radius-sm);
  background:
    radial-gradient(120% 140% at 50% 0%,color-mix(in srgb,var(--dn-a) 16%,transparent),transparent 60%),
    var(--field);
  border:1px solid var(--line);
  transition:border-color .3s, box-shadow .3s;
}
.dn-amount:focus-within{ border-color:color-mix(in srgb,var(--dn-a) 60%,transparent); box-shadow:0 0 0 4px color-mix(in srgb,var(--dn-a) 14%,transparent); }
.dn-amount__label{ display:block; font-size:0.8125rem; color:var(--ink-faint); font-weight:600; letter-spacing:.02em; }
.dn-amount__field{
  display:flex; align-items:baseline; justify-content:center; gap:.65rem;
  max-width:100%; margin:.15rem auto 0; padding:0 .5rem;
}
/* As wide as the number in it (donate.js measures it), so the number and
   "تومان" sit together in the middle rather than the number lost at one
   end of a wide box. */
.dn-amount input[data-amount]{
  width:4ch; min-width:2ch; max-width:100%;
  text-align:center; direction:ltr;
  background:none; border:0; outline:none; padding:0;
  font:800 clamp(2.3rem,9vw,3.2rem)/1.2 var(--font); letter-spacing:-.01em;
  font-variant-numeric:tabular-nums;
  caret-color:var(--dn-a);
}
/* Where the browser can size a field to its text, it does, and no script
   has to keep up with fonts arriving late. */
@supports (field-sizing:content){
  .dn-amount input[data-amount]{ field-sizing:content; width:auto !important; }
}
.dn-amount input::placeholder{ color:var(--ink-faint); }
.dn-amount__unit{ flex:none; font-weight:700; font-size:1.05rem; color:var(--ink-muted); }
.dn-amount__tax{ font-size:0.8125rem; color:var(--ink-faint); }
.dn-amount__tax strong{ color:var(--ink-muted); font-weight:600; }
.dn-amount__words{ min-height:1.6em; font-size:.85rem; color:var(--ink-muted); transition:color .3s; }
.dn-amount__words.is-off{ color:var(--danger); }
.dn-chips{ display:flex; flex-wrap:wrap; justify-content:center; gap:var(--s-2); margin-top:var(--s-3); }
.dn-chip{
  min-height:var(--tap-min); padding:var(--s-1) var(--s-4); border-radius:99px; font-size:.86rem; font-weight:600;
  font-variant-numeric:tabular-nums;
  background:var(--surface-2); border:1px solid var(--line); color:var(--ink-muted);
  transition:all .25s var(--ease);
}
.dn-chip:hover{ color:var(--ink); border-color:var(--line-strong); transform:translateY(-1px); }
.dn-chip.is-on{
  color:#fff; border-color:transparent;
  background:linear-gradient(120deg,var(--dn-a),var(--dn-b));
  box-shadow:0 8px 22px -10px color-mix(in srgb,var(--dn-a) 90%,transparent);
}
.dn-hint{ margin-top:.35rem; font-size:0.8125rem; color:var(--ink-faint); }
.dn-hint--row{ display:flex; justify-content:space-between; gap:1rem; }
.dn-count{ font-variant-numeric:tabular-nums; flex:none; }
.dn-count.is-full{ color:var(--danger); }
.dn-center{ text-align:center; }

/* ---------- fields ---------- */
.dn-fields{ display:grid; gap:.9rem; }
@media (min-width:600px){ .dn-fields{ grid-template-columns:1fr 1fr; } .dn-field--wide{ grid-column:1 / -1; } }
.dn-field .ht-row{ margin-bottom:var(--s-2); }
.dn-field .ht-row label{ margin-bottom:0; }
.dn-field label{ display:block; margin-bottom:var(--s-2); font-size:.84rem; font-weight:600; color:var(--ink-muted); }
.dn-optional{ font-weight:400; font-size:0.8125rem; color:var(--ink-faint); margin-inline-start:.3rem; }
.dn-field input,.dn-field textarea{
  width:100%; padding:.75rem .95rem; border-radius:var(--radius-sm);
  background:var(--field); border:1px solid var(--line); outline:none;
  transition:border-color .25s, box-shadow .25s, background-color .25s;
}
.dn-field textarea{ resize:vertical; min-height:92px; line-height:1.8; }
.dn-field input::placeholder,.dn-field textarea::placeholder{ color:var(--ink-faint); }
.dn-field input:focus,.dn-field textarea:focus{
  border-color:color-mix(in srgb,var(--dn-a) 65%,transparent);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--dn-a) 14%,transparent);
  background:color-mix(in srgb,var(--field) 60%,var(--surface-2));
}
input[dir="ltr"]{ text-align:left; }
.has-error input,.has-error textarea{ border-color:color-mix(in srgb,var(--danger) 70%,transparent); }
.has-error.dn-amount{ border-color:color-mix(in srgb,var(--danger) 60%,transparent); }
.dn-error{ margin-top:.3rem; font-size:0.8125rem; color:var(--danger); }
.dn-code{ text-align:center !important; font:700 1.6rem/1.3 var(--font-display) !important; letter-spacing:.32em; }

/* ---------- switches (One UI) ---------- */
.dn-switches{ display:grid; gap:.2rem; margin:1.1rem 0 .6rem; padding:.35rem .9rem; border-radius:var(--radius-sm); background:var(--field); border:1px solid var(--line); }
.dn-switch{ display:flex; align-items:center; gap:.85rem; padding:.55rem 0; cursor:pointer; }
.dn-switch + .dn-switch{ border-top:1px solid var(--line); }
.dn-switch input{ position:absolute; opacity:0; pointer-events:none; }
.dn-switch__text{ flex:1; font-size:.92rem; }
.dn-switch__track{
  order:2; flex:none; width:46px; height:27px; border-radius:99px; padding:3px;
  background:var(--line-strong); transition:background .3s var(--ease);
}
.dn-switch__thumb{ display:block; width:21px; height:21px; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.3); transition:transform .3s var(--ease); }
.dn-switch input:checked + .dn-switch__track{ background:linear-gradient(120deg,var(--dn-a),var(--dn-b)); }
.dn-switch input:checked + .dn-switch__track .dn-switch__thumb{ transform:translateX(-19px); }
[dir="ltr"] .dn-switch input:checked + .dn-switch__track .dn-switch__thumb{ transform:translateX(19px); }
.dn-switch input:focus-visible + .dn-switch__track{ outline:2px solid var(--dn-a); outline-offset:3px; }

.dn-accept{ display:flex; align-items:flex-start; gap:.7rem; margin:.4rem 0 1.1rem; font-size:.86rem; color:var(--ink-muted); cursor:pointer; }
.dn-accept input{ position:absolute; opacity:0; pointer-events:none; }
.dn-accept__box{
  flex:none; width:22px; height:22px; margin-top:.15rem; border-radius:7px; display:grid; place-items:center;
  border:1.6px solid var(--line-strong); color:transparent; transition:all .25s var(--ease);
}
.dn-accept input:checked + .dn-accept__box{ background:linear-gradient(120deg,var(--dn-a),var(--dn-b)); border-color:transparent; color:#fff; }
.dn-accept input:focus-visible + .dn-accept__box{ outline:2px solid var(--dn-a); outline-offset:3px; }
.dn-accept a{ color:var(--ink); text-decoration-color:color-mix(in srgb,var(--dn-a) 60%,transparent); text-underline-offset:3px; }
.dn-accept.has-error .dn-accept__box{ border-color:var(--danger); }
.dn-honey{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---------- the button ---------- */
.dn-pay{
  position:relative; isolation:isolate; overflow:hidden;
  display:flex; align-items:center; justify-content:center; gap:.6rem;
  width:100%; min-height:58px; padding:.9rem 1.2rem; border-radius:99px;
  color:#fff; font-weight:800; font-size:1.05rem;
  background:linear-gradient(120deg,var(--dn-a),var(--dn-b),var(--dn-a));
  background-size:200% 100%;
  box-shadow:0 18px 40px -16px color-mix(in srgb,var(--dn-a) 90%,transparent), inset 0 1px 0 rgba(255,255,255,.25);
  transition:transform .25s var(--ease), box-shadow .25s, background-position .8s var(--ease);
}
.dn-pay:hover{ background-position:100% 0; transform:translateY(-1px); }
.dn-pay:active{ transform:scale(.985); }
.dn-pay__glow{
  position:absolute; inset:0; z-index:-1;
  background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);
  transform:translateX(-120%); animation:dnSweep 3.6s ease-in-out 1s infinite;
}
@keyframes dnSweep{ 0%{ transform:translateX(-120%); } 55%,100%{ transform:translateX(120%); } }
.dn-pay__label{ font-variant-numeric:tabular-nums; }
.dn-pay__busy{ display:none; width:20px; height:20px; border-radius:50%; border:2.5px solid rgba(255,255,255,.35); border-top-color:#fff; animation:dnSpin .8s linear infinite; }
.dn-pay.is-busy{ pointer-events:none; opacity:.9; }
.dn-pay.is-busy .dn-pay__busy{ display:block; }

/* ---------- the goal ---------- */
.dn-goal{ max-width:680px; margin:0 auto 1.25rem; padding:1rem 1.1rem 1.05rem; }
.dn-goal__head{ display:flex; align-items:center; gap:.6rem; margin-bottom:.7rem; }
.dn-goal__tag{
  flex:none; padding:.1rem .6rem; border-radius:99px; font-size:0.8125rem; font-weight:700; color:#fff;
  background:linear-gradient(120deg,var(--dn-a),var(--dn-b));
}
.dn-goal__title{ flex:1; min-width:0; font-size:1rem; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dn-goal__pct{ flex:none; font-weight:800; font-variant-numeric:tabular-nums; color:color-mix(in srgb,var(--dn-a) 55%,var(--ink)); }
.dn-goal__bar{ position:relative; height:14px; border-radius:99px; background:var(--surface-2); overflow:hidden; border:1px solid var(--line); }
.dn-goal__fill{
  position:absolute; inset-block:0; inset-inline-start:0; width:0; border-radius:99px;
  background:linear-gradient(90deg,var(--dn-a),var(--dn-b));
  box-shadow:0 0 18px color-mix(in srgb,var(--dn-a) 70%,transparent);
  transition:width 1.4s var(--ease);
}
.dn-goal__fill::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);
  animation:dnSweep 3.2s ease-in-out 1.6s infinite;
}
.dn-goal.is-done .dn-goal__fill{ background:linear-gradient(90deg,var(--ok),var(--dn-a)); }
.dn-goal__nums{ margin-top:.5rem; font-size:.86rem; color:var(--ink-muted); font-variant-numeric:tabular-nums; }
.dn-goal__nums strong{ color:var(--ink); }

/* ---------- supporters ---------- */
.dn-supporters{ padding:1rem; }
.dn-list{ list-style:none; display:grid; gap:.15rem; max-height:430px; overflow:auto; scrollbar-width:thin; }
.dn-list__row{
  display:grid; grid-template-columns:auto 1fr auto; grid-template-areas:"av name amount" "av ago amount";
  column-gap:.75rem; align-items:center; padding:.55rem .4rem; border-radius:12px;
  animation:dnFade .6s var(--ease) both;
}
.dn-list__row:nth-child(2){ animation-delay:.05s; } .dn-list__row:nth-child(3){ animation-delay:.1s; }
.dn-list__row:nth-child(4){ animation-delay:.15s; } .dn-list__row:nth-child(5){ animation-delay:.2s; }
.dn-list__row:hover{ background:var(--surface-2); }
.dn-list__avatar{
  grid-area:av; width:38px; height:38px; border-radius:50%; display:grid; place-items:center;
  font-weight:800; color:#fff; background:linear-gradient(135deg,var(--dn-a),var(--dn-b));
}
.dn-list__avatar.is-anon{ background:var(--surface-2); color:var(--ink-faint); }
.dn-list__name{ grid-area:name; font-weight:600; font-size:.9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dn-list__ago{ grid-area:ago; font-size:0.8125rem; color:var(--ink-faint); }
.dn-list__amount{ grid-area:amount; font-weight:700; font-size:.88rem; font-variant-numeric:tabular-nums; color:color-mix(in srgb,var(--dn-a) 55%,var(--ink)); }
.dn-list__amount small{ font-weight:500; font-size:0.8125rem; color:var(--ink-faint); }

/* ---------- steps: verify, result, terms ---------- */
.dn-narrow{ max-width:520px; margin:1.6rem auto 0; padding:1.6rem 1.2rem; }
@media (min-width:600px){ .dn-narrow{ padding:2rem; } }
.dn-step,.dn-result{ text-align:center; }
.dn-step .dn-form,.dn-result .dn-receipt{ text-align:start; }
.dn-progress{ list-style:none; display:flex; justify-content:center; gap:.4rem; margin-bottom:1.6rem; font-size:0.8125rem; color:var(--ink-faint); }
.dn-progress li{ display:flex; align-items:center; gap:.35rem; }
.dn-progress li + li::before{ content:""; width:18px; height:1.5px; background:var(--line-strong); margin-inline-end:.15rem; }
.dn-progress span{ width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-weight:700; background:var(--surface-2); }
.dn-progress .is-done span{ background:var(--ok); color:#06261f; }
.dn-progress .is-current{ color:var(--ink); }
.dn-progress .is-current span{ background:linear-gradient(120deg,var(--dn-a),var(--dn-b)); color:#fff; }
.dn-step__icon{
  width:64px; height:64px; margin:0 auto .8rem; border-radius:20px; display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,var(--dn-a),var(--dn-b)); box-shadow:0 16px 40px -14px var(--dn-a);
}
.dn-step__title{ font-size:1.45rem; font-weight:800; line-height:1.5; }
.dn-step__text{ margin:.5rem auto 1.4rem; max-width:40ch; color:var(--ink-muted); }
.dn-step .dn-field{ margin-bottom:1rem; }
.dn-link{ font-size:.86rem; color:var(--ink-muted); text-decoration:none; }
.dn-link:hover{ color:var(--ink); }
.dn-step > .dn-hint{ margin:1rem auto .4rem; max-width:44ch; }

.dn-result{ overflow:hidden; }
.dn-result__icon{ width:84px; height:84px; margin:0 auto 1rem; display:grid; place-items:center; }
.dn-result__icon.is-ok{ color:var(--ok); filter:drop-shadow(0 0 22px color-mix(in srgb,var(--ok) 60%,transparent)); }
.dn-result__icon.is-ok path{ stroke-dasharray:40; stroke-dashoffset:40; animation:dnDraw .7s .25s var(--ease) forwards; }
.dn-result__icon.is-ok circle{ stroke-dasharray:160; stroke-dashoffset:160; animation:dnDraw .8s var(--ease) forwards; }
@keyframes dnDraw{ to{ stroke-dashoffset:0; } }
.dn-result__icon.is-fail{ color:var(--danger); }
.dn-spinner{ width:46px; height:46px; border-radius:50%; border:3px solid var(--line-strong); border-top-color:var(--dn-a); animation:dnSpin .9s linear infinite; }
.dn-receipt{ display:grid; gap:0; margin:0 0 1.4rem; border-radius:var(--radius-sm); background:var(--field); border:1px solid var(--line); }
.dn-receipt div{ display:flex; justify-content:space-between; gap:1rem; padding:.7rem .95rem; }
.dn-receipt div + div{ border-top:1px dashed var(--line-strong); }
.dn-receipt dt{ color:var(--ink-faint); font-size:.86rem; }
.dn-receipt dd{ font-weight:600; font-variant-numeric:tabular-nums; }
.dn-receipt .is-sub dt,.dn-receipt .is-sub dd{ font-size:.82rem; color:var(--ink-faint); font-weight:500; }
.dn-actions{ display:flex; flex-wrap:wrap; justify-content:center; gap:var(--s-3); }
/* The buttons end the result card: --s-6 from whatever is above them. */
.dn-result > .dn-actions{ margin-top:var(--s-6); }
.dn-btn{
  display:inline-flex; align-items:center; justify-content:center; padding:.7rem 1.3rem; border-radius:99px;
  text-decoration:none; font-weight:700; font-size:.92rem; border:1px solid var(--line-strong); background:var(--surface);
  transition:transform .2s var(--ease), border-color .2s;
}
.dn-btn:hover{ transform:translateY(-1px); border-color:var(--ink-faint); }
.dn-btn--primary{ color:#fff; border-color:transparent; background:linear-gradient(120deg,var(--dn-a),var(--dn-b)); box-shadow:0 14px 30px -14px var(--dn-a); }

.dn-burst{ position:absolute; inset:0; pointer-events:none; }
.dn-burst i{
  position:absolute; top:22%; left:50%; width:8px; height:14px; border-radius:3px; opacity:0;
  background:var(--dn-a); animation:dnConfetti 1.6s .3s var(--ease) forwards;
}
.dn-burst i:nth-child(odd){ background:var(--dn-b); width:6px; height:6px; border-radius:50%; }
.dn-burst i:nth-child(3n){ background:var(--ok); }
.dn-burst i:nth-child(1){ --x:-160px; --y:-40px; } .dn-burst i:nth-child(2){ --x:150px; --y:-60px; }
.dn-burst i:nth-child(3){ --x:-110px; --y:90px; } .dn-burst i:nth-child(4){ --x:120px; --y:80px; }
.dn-burst i:nth-child(5){ --x:-200px; --y:30px; } .dn-burst i:nth-child(6){ --x:190px; --y:20px; }
.dn-burst i:nth-child(7){ --x:-60px; --y:-90px; } .dn-burst i:nth-child(8){ --x:70px; --y:-100px; }
.dn-burst i:nth-child(9){ --x:-30px; --y:130px; } .dn-burst i:nth-child(10){ --x:40px; --y:140px; }
.dn-burst i:nth-child(11){ --x:-230px; --y:-10px; } .dn-burst i:nth-child(12){ --x:230px; --y:-20px; }
@keyframes dnConfetti{
  0%{ opacity:1; transform:translate(-50%,0) rotate(0); }
  100%{ opacity:0; transform:translate(calc(-50% + var(--x)),var(--y)) rotate(320deg); }
}

.dn-terms{ text-align:start; }
.dn-terms .dn-step__title{ text-align:center; margin-bottom:1rem; }
.dn-terms__body p{ margin-bottom:.9rem; color:var(--ink-muted); white-space:pre-line; line-height:2; }
.dn-terms__now{ margin:1.2rem 0 1.4rem; padding:.9rem 1rem; border-radius:var(--radius-sm); background:var(--field); border:1px solid var(--line); }
.dn-terms__now h2{ font-size:.95rem; font-weight:800; margin-bottom:.4rem; }
.dn-terms__now ul{ list-style:none; display:grid; gap:.3rem; color:var(--ink-muted); font-size:.92rem; }
.dn-terms__now strong{ color:var(--ink); }

/* ---------- footer ---------- */
.dn-foot{ display:grid; justify-items:center; gap:.6rem; padding:1.6rem 1rem 2.4rem; font-size:0.8125rem; color:var(--ink-faint); }
.dn-foot__links{ display:flex; gap:.6rem; }
.dn-foot__links a{ text-decoration:none; }
.dn-foot__links a:hover{ color:var(--ink); }
.dn-foot__pay{ display:flex; align-items:center; gap:.4rem; }
/* The white box is ours; what is inside it is eNamad's code untouched. It
   keeps its size while the picture loads, and shows the alt if it fails. */
.dn-enamad{
  display:inline-grid; place-items:center; min-width:6.5rem; min-height:6.5rem; max-width:100%;
  padding:.5rem; border-radius:14px; background:#fff; color:#64748b; font-size:0.8125rem; line-height:1.4;
  text-align:center; overflow:hidden;
}
.dn-enamad img{ display:block; max-width:96px; height:auto; }

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* ============================================================
   AURORA (light theme)
   After Aceternity's Aurora Background: bands of blue, sky and
   violet with white streaks between them, sliding slowly across
   a cool white page, blurred, strongest in the top corner and
   fading towards the opposite one. A second, faster layer drifts
   over the first for depth. Only in the light theme, where the
   dark theme's meteors are switched off. (No difference blend:
   over a light page it turned the colours a muddy grey.)
============================================================ */
.aurora {
  display: none;
  position: absolute;
  inset: -10px;
  pointer-events: none;
  opacity: .78;
  --aurora-white: repeating-linear-gradient(100deg, #fff 0%, #fff 7%, transparent 10%, transparent 12%, #fff 16%);
  --aurora-colors: repeating-linear-gradient(100deg, #3b82f6 10%, #a5b4fc 15%, #93c5fd 20%, #ddd6fe 25%, #60a5fa 30%);
  background-image: var(--aurora-white), var(--aurora-colors);
  background-size: 300% 100%, 200% 100%;
  background-position: 50% 50%, 50% 50%;
  filter: blur(12px) saturate(1.2);
  animation: aurora 60s linear infinite;
  will-change: background-position;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 12%, transparent 72%);
  mask-image: radial-gradient(ellipse at 100% 0%, #000 12%, transparent 72%);
}
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--aurora-white), var(--aurora-colors);
  background-size: 200% 100%, 100% 100%;
  opacity: .55;
  animation: aurora 40s linear infinite reverse;
}
@keyframes aurora {
  from { background-position: 50% 50%, 50% 50%; }
  to { background-position: 350% 50%, 350% 50%; }
}
[data-theme="light"] .aurora { display: block; }
@media (prefers-reduced-motion: reduce) {
  .aurora, .aurora::after { animation: none; }
}


/* GradFlow's silk (frontend/src/donate-silk.tsx) covers the halos once it is up. */
.dn-silk{ position:absolute; inset:0; opacity:0; transition:opacity 1.4s var(--ease); }
.dn-silk.is-drawn{ opacity:1; }
.dn-silk__canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; }

/* ============================================================
   BUTTONS, after Wensity's Button: a shine that sweeps across
   the primary on hover, a press that gives, icons that nudge in
   the direction they point, and a loading state (.is-loading)
   that keeps the button's width and shows a spinner instead of
   the words.
============================================================ */
.btn-solid, .btn-ghost, .dn-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-solid:active, .btn-ghost:active, .dn-btn:active { transform: scale(0.97); }
.btn-solid, .dn-btn--primary {
  background-image: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%),
    var(--btn-fill, linear-gradient(120deg, var(--primary, #3c8cff), var(--secondary, #783cff)));
  background-size: 250% 100%, 100% 100%;
  background-position: 130% 0, 0 0;
  background-repeat: no-repeat;
  transition: background-position 0.7s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.dn-btn--primary { --btn-fill: linear-gradient(120deg, var(--dn-a), var(--dn-b)); }
.btn-solid:hover, .dn-btn--primary:hover { background-position: -30% 0, 0 0; }
.btn-solid svg, .btn-ghost svg, .dn-btn svg { transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); }
.btn-solid:hover svg, .btn-ghost:hover svg, .dn-btn:hover svg { transform: translateX(3px); }
[dir="rtl"] .btn-solid:hover svg, [dir="rtl"] .btn-ghost:hover svg, [dir="rtl"] .dn-btn:hover svg { transform: translateX(-3px); }
.btn-solid.is-loading, .btn-ghost.is-loading, .dn-btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}
.btn-solid.is-loading > *, .dn-btn.is-loading > * { visibility: hidden; }
.btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  visibility: visible !important;
}
.btn-ghost .btn-spinner { border-color: color-mix(in srgb, currentColor 25%, transparent); border-top-color: var(--ink, #fff); }
@keyframes btn-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .btn-solid, .dn-btn--primary { transition: none; }
}

/* ============================================================
   CUBE LOADER (after the Cube Loader): a translucent cube that
   turns, its faces breathing, a glowing core inside, and a quiet
   word under it. Markup:
   <span class="cube-loader"><span class="cube-loader__cube">
     <i></i><i></i><i></i><i></i><i></i><i></i><b></b>
   </span><span class="cube-loader__label">…</span></span>
============================================================ */
.cube-loader {
  display: inline-grid;
  justify-items: center;
  gap: 1.1rem;
  --cube: 34px;
  --cube-a: #3c8cff;
  --cube-b: #783cff;
}
.cube-loader__cube {
  position: relative;
  width: var(--cube);
  height: var(--cube);
  transform-style: preserve-3d;
  animation: cube-spin 3.2s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
.cube-loader__cube i {
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--cube-a) 70%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--cube-a) 22%, transparent), color-mix(in srgb, var(--cube-b) 22%, transparent));
  border-radius: 4px;
  animation: cube-breathe 1.6s ease-in-out infinite;
}
.cube-loader__cube i:nth-child(1) { transform: translateZ(calc(var(--cube) / 2)); }
.cube-loader__cube i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--cube) / 2)); animation-delay: -0.2s; }
.cube-loader__cube i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--cube) / 2)); animation-delay: -0.4s; }
.cube-loader__cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--cube) / 2)); animation-delay: -0.6s; }
.cube-loader__cube i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--cube) / 2)); animation-delay: -0.8s; }
.cube-loader__cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--cube) / 2)); animation-delay: -1s; }
.cube-loader__cube b {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--cube-a) 45%, transparent 72%);
  box-shadow: 0 0 18px 6px color-mix(in srgb, var(--cube-a) 55%, transparent);
  animation: cube-core 1.6s ease-in-out infinite;
}
.cube-loader__label {
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
  animation: cube-word 1.6s ease-in-out infinite;
}
@keyframes cube-spin {
  0% { transform: rotateX(-28deg) rotateY(0deg); }
  100% { transform: rotateX(-28deg) rotateY(360deg); }
}
@keyframes cube-breathe {
  50% { opacity: 0.45; }
}
@keyframes cube-core {
  50% { transform: scale(0.7); opacity: 0.7; }
}
@keyframes cube-word {
  50% { opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  .cube-loader__cube, .cube-loader__cube i, .cube-loader__cube b, .cube-loader__label { animation: none; }
  .cube-loader__cube { transform: rotateX(-28deg) rotateY(35deg); }
}

/* ============================================================
   DONATE PALETTE: the owner's dark palette (#101820, #0D1B2A,
   #1B2A33, #1F2E2A, #2A1A12…) with a soft orange (#FF8C42) as
   the accent, which comes from Donate settings (--dn-a/--dn-b).
   Text on orange is near-black: white on a light orange does not
   read. Only the donate pages (body.dn--donate); the shop keeps
   its blue.
============================================================ */
body.dn--donate{
  --bg:#101820;
  --surface:rgba(27,42,51,.52);
  --surface-2:rgba(31,46,42,.55);
  --field:rgba(13,27,42,.72);
  --line:rgba(255,214,186,.09);
  --line-strong:rgba(255,214,186,.2);
  --ink:#F6EFE8;
  --ink-muted:#B6AAA0;
  --ink-faint:#A0968E; /* 4.5:1 on the cards for 12px hints (was #7E756E, 3.6:1) */
  --on-accent:#1A1A1A;
  background:
    radial-gradient(120% 80% at 50% -10%,#1B2A33 0%,transparent 60%),
    radial-gradient(80% 60% at 100% 100%,#2A1A12 0%,transparent 60%),
    #101820;
}
[data-theme="light"] body.dn--donate{
  --bg:#FBF6F1;
  --surface:rgba(255,255,255,.8);
  --surface-2:rgba(42,26,18,.05);
  --field:rgba(42,26,18,.04);
  --line:rgba(42,26,18,.1);
  --line-strong:rgba(42,26,18,.2);
  --ink:#1A1A1A;
  --ink-muted:#5E544D;
  --ink-faint:#756A62; /* 4.5:1 on paper (was #968B83, 3.1:1) */
  background:radial-gradient(120% 80% at 50% -10%,#FFE7D6 0%,transparent 60%),#FBF6F1;
}
body.dn--donate .dn-card{ box-shadow:0 30px 80px -40px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,214,186,.06); }
[data-theme="light"] body.dn--donate .dn-card{ box-shadow:0 24px 60px -36px rgba(42,26,18,.25), inset 0 1px 0 #fff; }
body.dn--donate .dn-chip.is-on,
body.dn--donate .dn-accept input:checked + .dn-accept__box,
body.dn--donate .dn-pay,
body.dn--donate .dn-goal__tag,
body.dn--donate .dn-list__avatar:not(.is-anon),
body.dn--donate .dn-progress .is-current span,
body.dn--donate .dn-step__icon,
body.dn--donate .dn-btn--primary{ color:var(--on-accent); }
body.dn--donate .dn-pay__busy{ border-color:rgba(26,26,26,.25); border-top-color:#1A1A1A; }
body.dn--donate .dn-pay__glow{ background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.45) 50%,transparent 70%); }
body.dn--donate ::selection{ background:color-mix(in srgb,var(--dn-a) 40%,transparent); }

/* Going to the bank: the whole page dims under a loader, so the wait for
   the gateway reads as progress rather than as a frozen page. */
.dn-going{
  position:fixed; inset:0; z-index:90; display:grid; place-content:center; justify-items:center; gap:1.2rem;
  background:color-mix(in srgb,var(--bg) 82%,transparent);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  opacity:0; pointer-events:none; transition:opacity .35s var(--ease);
  color:var(--ink); font-weight:700; text-align:center;
}
.dn-going.is-on{ opacity:1; pointer-events:auto; }
.dn-going small{ display:block; margin-top:.3rem; font-weight:400; color:var(--ink-muted); font-size:.85rem; }
body.dn--donate .cube-loader{ --cube:42px; --cube-a:var(--dn-a); --cube-b:var(--dn-b); }
/* The silk is the whole sky on the donate page: no fade towards the bottom,
   and no grain layer of its own over it (the shader has its own). */
body.dn--donate .dn-sky{ -webkit-mask-image:none; mask-image:none; }
body.dn--donate .dn-grain{ display:none; }

/* Cross-document view transitions, as on the rest of the site: going from a
   page that opts in to one that did not aborted the transition with an error
   in the console. Now every page crossfades into the next. */
@view-transition{ navigation:auto; }
@media (prefers-reduced-motion:reduce){ @view-transition{ navigation:none; } }

/* ===========================================================
   Spacing, after SamyarBeatz: one 4px scale, and two tokens
   that decide whether a page reads as generous or cramped.
   Everything on these pages takes its gaps from here; nothing
   gets a one-off margin. See DESIGN.md.
=========================================================== */
:root{
  --s-1:4px;  --s-2:8px;  --s-3:12px; --s-4:16px;
  --s-5:24px; --s-6:32px; --s-7:48px; --s-8:72px; --s-9:104px;
  /* Between the header and the first thing on a page. */
  --page-top:clamp(28px,5vw,64px);
  /* Between one section and the next. Clamped, not switched at a
     breakpoint: a tablet should not get the phone's rhythm. */
  --section-gap:clamp(56px,7vw,96px);
  --tap-min:44px;
}

/* No overlap, whatever the content: a flex or grid child may shrink
   below its content's width, long words and addresses wrap, media
   never pushes out of its box. */
.dn :where(div,section,article,aside,main,header,footer,form,fieldset,li,p,h1,h2,h3,h4,dd,dt,label){ min-width:0; }
.dn :where(p,h1,h2,h3,h4,li,dd,dt,span,strong,a,label,summary){ overflow-wrap:break-word; }
.dn :where(img,svg,video,canvas,iframe){ max-width:100%; }

/* ===========================================================
   Light and still. The sky used to be three blurred orbs
   drifting forever, a grain layer and an aurora, with frosted
   glass on every card above them: every frame and every scroll
   re-blurred the whole page, which is what made the services
   and donate pages crawl on a weaker phone. Now it is one haze,
   drawn once and never moved, and the cards are plain.
=========================================================== */
/* No filter and no mask: either one, on a layer fixed behind the page, made
   the browser re-render it on every scroll (41fps on a slowed desktop, 61
   with it gone). Wide, soft gradient stops give the same haze for free, and
   the layer is promoted so scrolling only moves the page over it. */
.dn-sky{
  background:var(--bg); contain:strict;
  -webkit-mask-image:none; mask-image:none;
  will-change:transform; transform:translateZ(0);
}
.dn-sky::before{
  content:""; position:absolute; inset:-10%;
  background:
    radial-gradient(48% 42% at 82% 6%,color-mix(in srgb,var(--dn-a) 55%,transparent),color-mix(in srgb,var(--dn-a) 18%,transparent) 45%,transparent 78%),
    radial-gradient(44% 50% at 6% 60%,color-mix(in srgb,var(--dn-b) 45%,transparent),color-mix(in srgb,var(--dn-b) 14%,transparent) 45%,transparent 78%);
  opacity:.4;
}
[data-theme="light"] .dn-sky::before{ opacity:.3; }
.dn-orb,.dn-grain,.aurora,.dn-silk{ display:none !important; }
.dn-card,.sx-package,.sx-hero.has-image .sx-why{ -webkit-backdrop-filter:none; backdrop-filter:none; }
.dn-toast{ -webkit-backdrop-filter:none; backdrop-filter:none; background:var(--bg); }
.loc-map__city{ -webkit-backdrop-filter:none; backdrop-filter:none; }

/* ---------- type: Vazirmatn is the face; sizes a phone can read ---------- */
body.dn{ font-size:16px; line-height:1.8; }
.dn-foot{ font-size:.95rem; }
.dn-foot__links{ gap:var(--s-3); }
.dn-foot__links a{ display:inline-flex; align-items:center; min-height:var(--tap-min); padding:0 var(--s-2); font-size:1rem; }
.dn-foot__pay{ font-size:.88rem; }
/* Each paragraph takes its direction from its own first letter. */
.dn :where(p,h1,h2,h3,h4,li,dd,blockquote){ unicode-bidi:plaintext; }
.dn-foot__links{ flex-wrap:wrap; justify-content:center; column-gap:var(--s-3); row-gap:var(--s-1); max-width:100%; }
.dn-foot__links a{ white-space:nowrap; }

/* ---------- still, and one calm arrival ----------
   The page used to arrive in pieces: a haze faded up on its own clock and
   the content popped in after it. Now the sky is plain CSS, painted with
   the first frame, and the content rises once, together. The loops that
   repainted text every frame stop: the title's sheen passes once, the
   avatar's ring stands still. */
/* The sheen layer is not drawn at all (size 0): stopped, it left a band of colour on one word. */
body.dn--donate .dn-title{ animation:none; background-size:0 0,100% 100%; }
body.dn--donate .dn-title::before{ animation:none; }
body.dn--donate .dn-avatar__ring{ animation:none; }
body.dn--donate .dn-main{ animation:dnArrive .45s var(--ease) both; }
@keyframes dnArrive{ from{ opacity:0; transform:translateY(8px); } }
@media (prefers-reduced-motion:reduce){
  body.dn--donate .dn-main, body.dn--donate .dn-title{ animation:none; }
}

/* ============================================================
   SOFT 3D on the coloured buttons, after SamyarBeatz's One UI
   tiles at about two thirds of their strength: a 145deg light
   from the top corner with shade toward the bottom, a 1px
   highlight along the top edge and a 1px shade along the bottom.
   It is a layer under the label (::before at z-index -1 inside
   the button's own stacking context), so every button keeps its
   own colour, glow, radius and sheen. A press turns the light
   round, as if the button sank.
============================================================ */
.btn-solid,
.dn-btn--primary,
.dn-pay,
.dn-chip.is-on{ position:relative; isolation:isolate; }
.btn-solid::before,
.dn-btn--primary::before,
.dn-pay::before,
.dn-chip.is-on::before{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; pointer-events:none;
  background:linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,0) 46%, rgba(0,0,0,.12));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.18);
}
.btn-solid:active::before,
.dn-btn--primary:active::before,
.dn-pay:active::before,
.dn-chip.is-on:active::before{
  background:linear-gradient(145deg, rgba(0,0,0,.1), rgba(0,0,0,0) 50%, rgba(255,255,255,.08));
  box-shadow:inset 0 1px 2px rgba(0,0,0,.22);
}

/* ============================================================
   HELPTIP: a "?" beside what a visitor may not understand
   (templates/includes/_helptip.html, static/js/helptip.js).
   The bubble is dark in both themes, like a system tooltip. It is
   fixed, placed by the script under the "?" and kept 16px inside
   the screen (--ht-x, --ht-y): an absolute bubble near the left
   edge widened the whole right-to-left page the moment it opened.
============================================================ */
.ht-row{ display:flex; align-items:center; gap:var(--s-2); }
.ht-row > :first-child{ min-width:0; }
.helptip{ position:relative; display:inline-flex; vertical-align:middle; margin-inline-start:var(--s-1); }
.helptip__btn{
  position:relative; display:grid; place-items:center; flex:none;
  width:20px; height:20px; padding:0; border-radius:50%;
  border:1px solid var(--line-strong, rgba(255,255,255,.18)); background:transparent;
  color:var(--ink-muted, currentColor); cursor:help;
  transition:color .2s ease, border-color .2s ease;
}
/* 44px to tap; the drawn circle stays small beside the text. */
.helptip__btn::after{ content:""; position:absolute; inset:-12px; }
.helptip__btn:hover, .helptip.is-open .helptip__btn{ color:var(--ink, #fff); border-color:currentColor; }
.helptip__pop{
  position:fixed; z-index:60; top:var(--ht-y, 0); left:var(--ht-x, 0);
  width:max-content; max-width:min(18rem, calc(100vw - 32px));
  padding:var(--s-3) var(--s-4); border-radius:12px;
  background:#1d1d23; color:#f4f4f5; border:1px solid rgba(255,255,255,.1);
  box-shadow:0 1px 2px rgba(0,0,0,.4), 0 14px 34px -10px rgba(0,0,0,.6);
  font-family:inherit; font-size:.875rem; font-weight:400; line-height:1.8;
  text-align:start; white-space:normal; letter-spacing:0; text-transform:none; unicode-bidi:plaintext;
  display:none;
}
@keyframes ht-in{ from{ opacity:0; } }
/* A bridge over the gap, so the pointer can reach the bubble. */
.helptip__pop::before{ content:""; position:absolute; inset-inline:0; top:calc(-1 * var(--s-2)); height:var(--s-2); }
.helptip.is-open .helptip__pop,
.helptip:not(.is-dismissed) .helptip__btn:focus-visible + .helptip__pop{
  display:block; animation:ht-in .18s ease;
}
@media (hover:hover){
  .helptip:not(.is-dismissed):hover .helptip__pop{
    display:block; animation:ht-in .18s ease;
  }
}
@media (prefers-reduced-motion:reduce){ .helptip__pop{ animation:none !important; } }
/* A switch with its HelpTip beside it, outside the label (the tip's name
   would otherwise join the checkbox's). */
.dn-switch-row{ display:flex; align-items:center; gap:var(--s-2); }
.dn-switch-row > .dn-switch{ flex:1; min-width:0; }
.dn-switch-row + .dn-switch-row{ border-top:1px solid var(--line); }

/* The header to the first thing on the page is --page-top, on every page
   under this header (DESIGN.md: spacing). It was 0 on the services page,
   where the banner card sat on the header, 6px on a service, 26px on the
   rules and 64px on sign-in: each page's first block brought its own. Now
   the page decides, once; a first block with no frame of its own (the
   headline without a picture, the donate hero) gives up its top padding so
   the gap is not counted twice. */
.dn-main > :first-child{ margin-top:var(--page-top); }
.dn-main > .sx-hero:not(.has-image):first-child,
.dn-main > .dn-hero:first-child{ padding-top:0; }

/* --- staff looking at a hidden section (core/sections.py) --- */
.dg-preview{
  padding:var(--s-3) var(--s-4); border-radius:var(--radius-sm); font-size:.85rem; text-align:center;
  color:var(--ink); background:color-mix(in srgb,#F5A524 16%,transparent);
  border:1px solid color-mix(in srgb,#F5A524 45%,transparent);
}
.dn-main > .dg-preview{ margin-bottom:var(--s-4); }

/* --- the owner's announcement above every page (includes/_announcement.html) --- */
.site-notice{
  margin:0 auto var(--s-4); padding:var(--s-2) var(--s-4); border-radius:var(--radius-sm);
  font-size:.875rem; line-height:1.7; text-align:center; color:var(--ink);
  background:color-mix(in srgb,var(--dn-a) 14%,transparent);
  border:1px solid color-mix(in srgb,var(--dn-a) 38%,transparent);
}

/* ---------- the crypto option: a fold under the rial form, closed until asked for ---------- */
.dn-crypto{ margin-top:1.4rem; padding-top:1.1rem; border-top:1px solid var(--line, rgba(128,128,128,.25)); }
.dn-crypto__summary{
  display:flex; align-items:center; justify-content:space-between; gap:1rem; cursor:pointer; list-style:none;
  font-weight:700; padding:.55rem .2rem;
}
.dn-crypto__summary::-webkit-details-marker{ display:none; }
.dn-crypto__summary small{ color:var(--ink-faint); font-weight:500; letter-spacing:.04em; }
.dn-crypto__summary::after{ content:"+"; font-size:1.3rem; line-height:1; margin-inline-start:.4rem; color:var(--ink-faint); }
.dn-crypto[open] .dn-crypto__summary::after{ content:"−"; }
.dn-crypto__form{ margin-top:.8rem; display:grid; gap:.9rem; }
