:root {
  color-scheme: light;
  --bg: #f4f6f3; --card: #ffffff; --surface-2: #f6f8f7; --surface-3: #eef1ef;
  --ink: #1b2620; --ink-2: #4c5a52; --muted: #5f6d65; --line: #e2e8e3; --line-2: #cfd8d2;
  --brand: #146c43; --brand-2: #0f5132; --brand-soft: #e6f2ec;
  --blue: #0f4a93; --blue-soft: #eaf1fb; --blue-ink: #1d4f91; --blue-line: #d6e3f2;
  --gold: #b7791f; --gold-soft: #fdf4e3; --gold-ink: #7a4f12; --gold-line: #f2dfbd;
  --danger: #b42318; --danger-soft: #fdecea; --danger-line: #f1c7c2; --radius: 14px;
}
/* Dark mode: same names, darker values. Set on <html data-theme="dark">. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1411; --card: #161f1a; --surface-2: #1b2520; --surface-3: #212c26;
  --ink: #e5ece7; --ink-2: #c2cdc6; --muted: #93a299; --line: #29352f; --line-2: #36443c;
  --brand: #1f8a55; --brand-2: #7fd3a6; --brand-soft: #16382a;
  --blue: #8fb9f3; --blue-soft: #16294a; --blue-ink: #a8c8f6; --blue-line: #2b4569;
  --gold: #d99a3c; --gold-soft: #30260f; --gold-ink: #f0c67f; --gold-line: #5a4519;
  --danger: #f2796b; --danger-soft: #3a1b18; --danger-line: #6c2c26;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.ur { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; }

.topbar { background: var(--brand-2); color: #fff; padding: 12px 16px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: 8px; max-width: 720px; margin: 0 auto; flex-wrap: wrap; }
.brand-mark { background: var(--card); color: var(--brand-2); border-radius: 8px; padding: 2px 7px; font-size: 14px; }
.brand-sub { font-weight: 400; opacity: .8; font-size: 14px; }
body.admin .topbar { background: #2b3540; }

.hero { padding: 12px 0 4px; }
.hero h1 { font-size: 1.75rem; line-height: 1.25; margin: 8px 0 4px; }
.title-ur { font-size: 1.3rem; margin: 4px 0; color: var(--muted); }
.loc { color: var(--muted); margin: 4px 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-weight: 600; }
.badge.ok { background: var(--brand-soft); color: var(--brand-2); }
.badge.pending { background: var(--gold-soft); color: var(--gold); }

.pledge { background: var(--brand-soft); border-inline-start: 4px solid var(--brand); padding: 10px 14px; border-radius: 8px; font-size: 14px; color: var(--brand-2); }

.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; color: inherit; }
a.card { text-decoration: none; }
.card h2 { font-size: 1.2rem; margin: 0 0 10px; }
.h2 { font-size: 1.4rem; margin: 0 0 8px; }

.label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.big { font-size: 2rem; font-weight: 800; color: var(--brand-2); line-height: 1.1; }
.mid { font-size: 1.15rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.progress { border: 2px solid var(--brand); }
.prog-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.prog-head .right { text-align: end; }
.bar { height: 16px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: 14px 0 10px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #7fd0a3, #2f9e64 45%, var(--brand-2)); border-radius: 99px; min-width: 2px; }
.prog-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; }

.bank-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.bank-row .val { font-weight: 700; word-break: break-all; font-variant-numeric: tabular-nums; }
.bank.closed { background: var(--gold-soft); }
.bank-other { font-size: 14px; margin-top: 8px; }
.warn { background: var(--gold-soft); color: var(--gold-ink); font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.steps { display: grid; gap: 6px; margin: 12px 0; font-size: 14px; }
.steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; margin-inline-end: 6px; }
.mini-bank { background: var(--brand-soft); padding: 8px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 10px; word-break: break-all; }

.btn { display: inline-block; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); }
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn.block { display: block; width: 100%; margin-top: 8px; }
.btn.tiny { padding: 2px 8px; font-size: 12px; margin-top: 4px; }
.copy { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.share { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 20px 0; }

.cover { border-radius: 10px; margin-bottom: 12px; width: 100%; }
.video { position: relative; padding-top: 56.25%; background: #000; border-radius: 10px; overflow: hidden; }
.video:empty { display: none; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { margin: 6px 0 12px; font-size: 14px; }
.story p { margin: 0 0 12px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.sup-main { flex: 1; min-width: 0; }
.sup-amt { text-align: end; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list li > div:first-child { flex: 1; }
.ok { color: var(--brand); font-size: 12px; font-weight: 600; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.initials { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); font-weight: 700; }
.triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }

.form { display: grid; gap: 14px; }
.form label, fieldset { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
legend { padding: 0 4px; }
label.radio { display: flex; gap: 8px; font-weight: 400; align-items: center; padding: 4px 0; }
input, textarea, select { font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); width: 100%; font-weight: 400; }
input[type=radio], input[type=checkbox] { width: auto; }
input[type=file] { padding: 8px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
form.inline { display: flex; gap: 8px; }
.error { background: var(--danger-soft); color: var(--danger); padding: 8px 12px; border-radius: 8px; }
.flash { background: var(--brand-soft); color: var(--brand-2); padding: 8px 12px; border-radius: 8px; }

.track-code { margin: 16px 0; }
.track-code .code { font-size: 1.8rem; font-weight: 800; letter-spacing: .06em; margin: 4px 0 8px; font-family: ui-monospace, monospace; }
.status { padding: 12px; border-radius: 10px; margin: 12px 0; background: var(--gold-soft); }
.status p { margin: 4px 0 0; font-size: 14px; }
.status-verified { background: var(--brand-soft); color: var(--brand-2); }
.status-rejected, .status-duplicate { background: var(--danger-soft); }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
.foot .ur { font-size: 16px; }

/* Admin */
body.admin .wrap { max-width: 960px; }
.admin-head, .row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.tab { padding: 8px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); text-transform: capitalize; font-size: 14px; }
.tab.active { background: #2b3540; color: #fff; border-color: #2b3540; }
.contrib { display: grid; grid-template-columns: 1fr 300px; gap: 14px; background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 10px; padding: 14px; margin: 10px 0; }
.contrib.status-verified { border-inline-start-color: var(--brand); }
.contrib.status-rejected, .contrib.status-duplicate { border-inline-start-color: var(--danger); }
.contrib-info > div { margin-bottom: 3px; }
.contrib-actions { display: grid; gap: 6px; align-content: start; }
.big-amt { font-size: 1.2rem; font-weight: 800; }
details summary { cursor: pointer; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: start; padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.card:has(.tbl) { overflow-x: auto; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.45rem; }
  .big { font-size: 1.6rem; }
  .bank-row { grid-template-columns: 1fr auto; }
  .bank-row .label { grid-column: 1 / -1; }
  .triple .mid { font-size: .95rem; }
  .contrib { grid-template-columns: 1fr; }
  form.inline { flex-direction: column; }
}

.case-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 10px; max-width: 100%; }
.case-card h2 { margin-top: 6px; }
.draft-note { background: var(--gold-soft); color: var(--gold-ink); padding: 10px 14px; border-radius: 8px; font-size: 14px; }

/* Header with sign-in link */
.topbar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar-inner .brand { margin: 0; }
.top-link { color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; padding: 5px 12px; white-space: nowrap; }
.top-link:hover { background: rgba(255,255,255,.1); }
@media (max-width: 420px) { .brand-sub, .top-name { display: none; } }

/* Donate */
.donate-cta { border: 2px solid var(--brand); }
.big-btn { font-size: 1.15rem; padding: 14px 16px; }
.step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; margin-inline-end: 6px; vertical-align: 2px; }
.acct { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 8px; margin: 10px 0; }
.acct-primary { border-color: var(--brand); background: var(--surface-2); }
.acct-type { font-size: 13px; font-weight: 700; color: var(--brand-2); padding: 8px 0 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acct .bank-row:last-of-type { border-bottom: 0; }
.more-accts { margin: 8px 0; }
.more-accts > summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 6px 0; }
.optional-account { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.optional-account p { margin: 0 0 8px; font-size: 14px; }
section.optional-account { padding: 18px; }
.signed-in { background: var(--brand-soft); color: var(--brand-2); padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.btn.google { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.google.block { display: flex; }
.center-row { justify-content: center; }

/* Donor sign-in */
.auth-card { max-width: 440px; margin: 20px auto; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* My donations */
.flash-error { background: var(--danger-soft); color: var(--danger); }
.my-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.my-tiles .card { margin: 0; padding: 12px 14px; }
.my-case-head { display: flex; gap: 12px; align-items: flex-start; }
.my-case-title { flex: 1; min-width: 0; }
.my-case-title a { color: var(--ink); }
.my-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.my-thumb.placeholder { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); font-weight: 800; }
.my-given { margin: 12px 0 4px; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; }
.my-list { list-style: none; padding: 0; margin: 0 0 8px; }
.my-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.my-list li > div { min-width: 0; }
.chip { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.chip-ok { background: var(--brand-soft); color: var(--brand-2); }
.chip-warn { background: var(--gold-soft); color: var(--gold-ink); }
.chip-bad { background: var(--danger-soft); color: var(--danger); }
.chip-info { background: var(--blue-soft); color: var(--blue-ink); }
.chip-muted { background: var(--surface-3); color: var(--muted); }
details.card > summary { cursor: pointer; }
details.card[open] > summary { margin-bottom: 12px; }
details.card h3 { margin: 18px 0 8px; font-size: 1rem; }
@media (max-width: 480px) { .my-tiles .mid { font-size: .95rem; } }

/* ---------- Wide case page ---------- */
.page-wide .wrap, .page-wide .topbar-inner { max-width: 1120px; }
.case-head { margin: 0 0 14px; }
.cover { position: relative; border-radius: 0 0 16px 16px; overflow: hidden; background: linear-gradient(135deg, #0f5132, #2f9e64); aspect-ratio: 4 / 1; max-height: 230px; width: 100%; margin-top: -16px; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-empty { aspect-ratio: auto; height: 110px; }
.head-row { display: flex; gap: 18px; align-items: flex-start; padding: 0 20px; position: relative; }
.profile { width: 120px; height: 120px; margin-top: -60px; flex: none; border-radius: 50%; border: 5px solid var(--bg); background: var(--brand-soft); overflow: hidden; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.profile img { width: 100%; height: 100%; object-fit: cover; }
.profile span { font-weight: 800; font-size: 2rem; color: var(--brand-2); }
.head-text { min-width: 0; padding-top: 12px; }
.head-text h1 { font-size: 1.8rem; line-height: 1.2; margin: 6px 0 2px; text-wrap: balance; }
.head-text .loc, .head-text .title-ur { margin: 2px 0; }

.case-grid { display: flex; flex-direction: column; gap: 0; }
.case-grid .col { display: contents; }
/* Phone order: progress, donate, story, supporters, money used, track, share */
.area-progress { order: 1; } .area-donate { order: 2; } .area-story { order: 3; } .area-supporters { order: 4; }
.area-usage { order: 5; } .area-track { order: 6; } .area-share { order: 7; }
@media (min-width: 900px) {
  .case-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0 22px; align-items: start; }
  .case-grid .col { display: block; }
  .col-side { position: sticky; top: 12px; }
  .head-text h1 { font-size: 2.1rem; }
}
@media (max-width: 640px) {
  .cover { aspect-ratio: 3 / 1; margin-inline: -16px; width: calc(100% + 32px); border-radius: 0; }
  .cover-empty { height: 70px; }
  .head-row { flex-direction: column; gap: 0; padding: 0; }
  .profile { width: 84px; height: 84px; margin-top: -42px; border-width: 4px; }
  .head-text { padding-top: 8px; }
  .head-text h1 { font-size: 1.45rem; }
}
.count-pill { background: var(--brand-soft); color: var(--brand-2); font-weight: 800; border-radius: 99px; padding: 2px 12px; }
.sup-name { font-weight: 700; overflow-wrap: anywhere; }
.sup-list li { padding: 12px 0; }
.empty-note { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 14px; color: var(--muted); font-size: 14px; margin: 8px 0; }
.money-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.mf { border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.mf.in { background: var(--brand-soft); border-color: var(--line-2); }
.mf.out { background: var(--gold-soft); border-color: var(--gold-line); }
.mf.left { background: var(--blue-soft); border-color: var(--blue-line); }
.use-icon { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-weight: 800; }
@media (max-width: 520px) {
  .money-flow { grid-template-columns: 1fr; gap: 6px; }
  .mf { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 8px 12px; }
  .mf .small { display: none; }
}

/* ---------- How it works ---------- */
.how { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 10px; }
.how li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.how li b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; }
.how.big li { font-size: 15px; }
.how.big li b { width: 32px; height: 32px; font-size: 15px; }
.how-card { background: linear-gradient(180deg, var(--surface-2), var(--card)); border-color: var(--line-2); }
.how-card .how { margin-bottom: 0; }
@media (min-width: 640px) { .how.big { grid-template-columns: repeat(3, 1fr); } .how.big li { flex-direction: column; } }

/* ---------- Receipt drop zone ---------- */
.dropzone { position: relative; display: grid !important; justify-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 2px dashed var(--brand); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: background .15s, border-color .15s; font-weight: 400 !important; }
.dropzone:hover, .dropzone.drag { background: var(--brand-soft); border-style: solid; }
.dropzone:focus-within { outline: 3px solid rgba(20,108,67,.35); outline-offset: 2px; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dz-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 24px; }
.dz-title { font-weight: 800; font-size: 1.1rem; color: var(--brand-2); }
.dz-sub { font-size: 13px; color: var(--muted); }
.dz-file { font-weight: 700; color: var(--brand-2); font-size: 14px; overflow-wrap: anywhere; }
.dz-preview { max-height: 180px; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.dropzone.has-file { border-style: solid; background: var(--card); }
.dropzone.too-big { border-color: var(--danger); }
.dropzone.too-big .dz-file { color: var(--danger); }
.grid-2f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .grid-2f { grid-template-columns: 1fr; } }
.photo-field { margin-top: 8px; }
.optional-line { font-size: 14px; color: var(--muted); margin: 0 0 12px; }

/* ---------- One step away ---------- */
.one-step { border: 2px solid var(--brand); background: linear-gradient(180deg, var(--surface-2), var(--card) 60%); }
.one-step-head { text-align: center; margin-bottom: 14px; }
.one-step-head h2 { margin: 8px 0 6px; }
.one-step-head p { margin: 0; color: var(--muted); font-size: 15px; }
.one-step-badge { display: inline-block; background: var(--brand); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; border-radius: 99px; padding: 4px 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

[hidden] { display: none !important; }

/* ---------- Right-to-left (Urdu) ---------- */
[dir="rtl"] body { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", system-ui, sans-serif; line-height: 2; }
[dir="rtl"] .big, [dir="rtl"] .mid, [dir="rtl"] .sup-amt, [dir="rtl"] .tile-num, [dir="rtl"] .code, [dir="rtl"] input, [dir="rtl"] select { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.9; }
[dir="rtl"] .label { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .bar span { margin-inline-start: 0; }
[dir="rtl"] .bar { direction: rtl; }
[dir="rtl"] .copy, [dir="rtl"] .btn { line-height: 1.6; }

/* ---------- Header actions + language switch ---------- */
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; gap: 2px; font-size: 13px; }
.lang-switch a { text-decoration: none; padding: 3px 9px; border-radius: 99px; color: inherit; opacity: .8; }
.lang-switch a.on { opacity: 1; font-weight: 700; background: rgba(255,255,255,.15); }
.top-lang a { color: #fff; }
@media (max-width: 480px) { .top-lang { display: none; } }

/* ---------- Footer: compact, same width as the page ---------- */
.foot { display: none; }
.site-foot { margin-top: 32px; font-size: 13px; color: var(--muted); }
.foot-inner { max-width: 720px; margin: 0 auto; padding: 14px 16px 22px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.page-wide .foot-inner { max-width: 1120px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 14px; }
.foot-brand .brand-mark { background: var(--brand-2); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-links a, .foot-contact a { color: var(--muted); text-decoration: none; }
.foot-links a:hover, .foot-contact a:hover { color: var(--brand); text-decoration: underline; }
.foot-meta { font-size: 12px; }
.foot-contact { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.foot-contact .dot { opacity: .5; }
.foot-lang a { color: var(--muted); padding: 2px 8px; }
.foot-lang a.on { background: var(--brand-soft); color: var(--brand-2); }
@media (max-width: 560px) { .foot-row { justify-content: flex-start; } .foot-meta { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* ---------- Legal pages ---------- */
.legal h2 { font-size: 1.15rem; margin: 22px 0 6px; }
.legal p, .legal li { line-height: 1.7; }
.narrow-card { max-width: 520px; margin-inline: auto; }

/* ---------- Donation steps: one row with icons ---------- */
.steps-row { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.steps-row li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; background: var(--surface-3); border-radius: 12px; padding: 10px 6px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); position: relative; }
.step-icon { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--brand); display: grid; place-items: center; border: 1px solid var(--line-2); }
.step-icon svg { width: 22px; height: 22px; }
.step-icon b { position: absolute; top: -4px; inset-inline-end: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 10.5px; display: grid; place-items: center; }
.step-text { font-weight: 600; }
.donate-cta .steps-row { margin-top: 4px; }

/* ---------- Account card extras ---------- */
.badge.checked { background: var(--blue-soft); color: var(--blue-ink); }
.care-of { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--line); font-size: 14px; }
.care-of .label { font-size: 11px; }
.care-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); }

/* ---------- Disclaimer (grey) + popup ---------- */
.disc-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.disc-link:hover { color: var(--brand); }
.disc-link svg { width: 16px; height: 16px; flex: none; }
.disclaimer p { margin: 0; line-height: 1.55; }
.disc-icon { font-size: 15px; line-height: 1.3; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.popup { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 640px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); background: var(--card); }
.popup::backdrop { background: rgba(16, 38, 27, .45); }
.popup-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.popup-head h2 { margin: 0; font-size: 1.1rem; }
.popup-x { border: 0; background: var(--surface-3); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.popup-body { padding: 6px 18px; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.popup form > .btn { margin: 8px 18px 18px; width: calc(100% - 36px); }
dialog.popup:not([open]) { display: none; }
dialog.popup[open] { margin: auto; }

/* ---------- Form tidy-ups ---------- */
input:not([type=radio]):not([type=checkbox]):not([type=file]), select { min-height: 46px; }
select { padding-block: 0; }
textarea { min-height: auto; }
.field-hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.choices { display: grid; gap: 8px; }
.choices legend { font-weight: 700; padding: 0 4px; }
.choices .field-hint { margin: 0 0 4px; }
.choice { display: flex !important; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 400 !important; background: var(--card); }
.choice input { margin-top: 4px; accent-color: var(--brand); flex: none; }
.choice-body { display: grid; gap: 2px; }
.choice-body span { font-size: 13px; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--surface-2); box-shadow: 0 0 0 1px var(--brand) inset; }
/* Text written by the team or donors keeps its own direction (English inside Urdu pages and vice versa). */
.story p, .sup-name, .legal p, .legal li, .legal h2, .bank-other p, .popup-body p, .care-of strong, .care-of .muted, .muted.small.loc, .foot-brand p { unicode-bidi: plaintext; text-align: start; }

/* ---------- Public name preference: pills, description of the chosen one only ---------- */
.pref-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pref-opt { position: relative; display: flex !important; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font-weight: 600 !important; font-size: 14px !important; line-height: 1.3; transition: border-color .15s, background .15s; }
.pref-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pref-opt:hover { border-color: var(--line-2); }
.pref-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-2); }
.pref-opt:has(input:checked)::after { content: "✓"; position: absolute; top: 4px; inset-inline-end: 8px; font-size: 12px; font-weight: 800; }
.pref-opt:has(input:focus-visible) { outline: 3px solid rgba(20,108,67,.35); outline-offset: 2px; }
.pref-desc { display: none; margin: 2px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.choices:has(input[value="name"]:checked) .pref-desc[data-for="name"],
.choices:has(input[value="name_photo"]:checked) .pref-desc[data-for="name_photo"],
.choices:has(input[value="anonymous"]:checked) .pref-desc[data-for="anonymous"] { display: block; }
@media (max-width: 400px) { .pref-opt { font-size: 13px !important; padding: 8px 6px; } }

/* ---------- Brand: logo, white header, logo blue ---------- */
:root { --blue: #0f4a93; --blue-soft: var(--blue-soft); }
.topbar { background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line); padding: 10px 16px; position: sticky; top: 0; z-index: 20; }
.topbar .brand { color: var(--ink); }
.logo { display: block; height: 34px; width: auto; }
.topbar .logo { height: 32px; }
@media (max-width: 420px) { .topbar .logo { height: 24px; } }
.top-link { color: var(--brand-2); border-color: var(--line-2); }
.top-link:hover { background: var(--brand-soft); }
.top-lang a { color: var(--muted); }
.top-lang a.on { background: var(--brand-soft); color: var(--brand-2); }
.foot-brand .logo { height: 22px; }

/* ---------- Home: founder story ---------- */
.founder { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 36px; align-items: start; margin: 18px 0 8px; }
.founder-photo { position: sticky; top: 76px; }
.founder-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--card); border: 6px solid var(--card); box-shadow: 0 0 0 2px var(--brand-soft), 0 18px 40px rgba(15, 74, 147, .10); }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.founder-text h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 14px; color: var(--blue); text-wrap: balance; }
.founder-story { max-width: 64ch; }
.founder-story p { margin: 0 0 12px; line-height: 1.7; }
.founder-story .lead { font-size: 1.12rem; font-weight: 500; }
.pull-quote { margin: 18px 0; padding: 14px 18px; border-inline-start: 4px solid var(--brand); background: linear-gradient(90deg, var(--brand-soft), var(--card)); border-radius: 0 12px 12px 0; font-size: 1.1rem; font-weight: 600; color: var(--brand-2); line-height: 1.55; }
[dir="rtl"] .pull-quote { border-radius: 12px 0 0 12px; background: linear-gradient(270deg, var(--brand-soft), var(--card)); }
.story-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--blue); padding: 6px 0 12px; }
.story-more > summary::-webkit-details-marker { display: none; }
.story-more > summary::after { content: "▾"; font-size: 12px; }
.story-more[open] > summary::after { content: "▴"; }
.story-more .when-open, .story-more[open] .when-closed { display: none; }
.story-more[open] .when-open { display: inline; }
.signature { display: grid; gap: 2px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); max-width: 64ch; }
.signature strong { font-size: 1.05rem; }
.signature span { color: var(--muted); font-size: 14px; }
.journey { text-align: center; font-size: 1.15rem; color: var(--brand-2); background: var(--brand-soft); border-radius: 14px; padding: 12px 16px; margin: 26px 0 8px; line-height: 2.2; }
@media (max-width: 820px) {
  .founder { grid-template-columns: 1fr; gap: 18px; }
  .founder-photo { position: static; width: 190px; margin: 0 auto; }
  .founder-text h1 { font-size: 1.6rem; text-align: center; }
  .eyebrow { text-align: center; }
}

/* ---------- Home: verified cases grid ---------- */
.cases-section { margin-top: 28px; }
.section-head h2 { font-size: 1.6rem; margin: 0 0 4px; color: var(--blue); }
.section-head p { margin: 0 0 14px; }
.case-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.case-cards .case-card { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.case-cards .case-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(20, 108, 67, .10); }
.case-card .case-thumb { aspect-ratio: 16 / 7; background: linear-gradient(135deg, #0f5132, #2f9e64); margin: 0; border-radius: 0; width: 100%; }
.case-card .case-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.case-card-body h3 { margin: 2px 0 0; font-size: 1.1rem; line-height: 1.35; color: var(--ink); }
.case-card-body p { margin: 0; }
.card-cta { font-weight: 700; color: var(--brand); font-size: 14px; margin-top: 4px; }
[dir="rtl"] .founder-story p, [dir="rtl"] .pull-quote { line-height: 2.2; }
[dir="rtl"] .founder-text h1 { line-height: 1.8; }

/* ---------- Dark mode details ---------- */
[data-theme="dark"] .logo { background: #fff; border-radius: 8px; padding: 3px 8px; }
[data-theme="dark"] .founder-photo img { border-color: #fff; }
[data-theme="dark"] .cover, [data-theme="dark"] .case-card .case-thumb { background: linear-gradient(135deg, #0c3a25, #1c6a45); }
[data-theme="dark"] .popup::backdrop { background: rgba(0, 0, 0, .6); }
[data-theme="dark"] .warn { color: var(--gold-ink); }
[data-theme="dark"] .care-icon, [data-theme="dark"] .step-icon { background: var(--surface-3); }
[data-theme="dark"] .profile { border-color: var(--bg); }
[data-theme="dark"] .tab.active, [data-theme="dark"] .subtab.active { background: var(--brand); border-color: var(--brand); }

/* ---------- Language + theme pill (header) ---------- */
.pref-pill { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 3px; }
.pref-pill a, .pref-pill button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; min-width: 36px; padding: 0 12px; border-radius: 99px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.pref-pill a:hover, .pref-pill button:hover { background: var(--card); }
.pref-pill a:focus-visible, .pref-pill button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pref-pill .lang-btn[lang="ur"] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; font-size: 15px; }
.theme-btn { padding: 0 9px !important; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .moon, [data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }

/* ---------- Verification marks use the logo's blue ---------- */
.badge.verified { background: var(--blue-soft); color: var(--blue); display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--blue-line); }
.badge.verified .check, .verified-mark .check { flex: none; }
.verified-mark { display: flex; justify-content: flex-end; align-items: center; gap: 4px; color: var(--blue); font-size: 12px; font-weight: 700; }
.verified-mark .check { width: 13px; height: 13px; }
.chip-verified { background: var(--blue-soft); color: var(--blue); }
.status-verified { background: var(--blue-soft); color: var(--blue-ink); }
.badge.checked { background: var(--blue-soft); color: var(--blue); }
[data-theme="dark"] .badge.verified .check path:last-child, [data-theme="dark"] .verified-mark .check path:last-child { stroke: #16294a; }

/* ---------- Join Now (outlined, logo blue) + language dropdown ---------- */
.join-btn { color: var(--blue); border: 1.5px solid var(--blue); background: transparent; padding: 6px 16px; font-weight: 700; }
.join-btn:hover { background: var(--blue-soft); }
.pref-pill .lang-btn { min-width: 44px; }
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 99px; font-weight: 600; font-size: 14px; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-list { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 150px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; display: grid; z-index: 30; }
.lang-list a { padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-list a:hover, .lang-list a.on { background: var(--brand-soft); color: var(--brand-2); }
.founder-story .closing { font-weight: 600; color: var(--brand-2); }

/* ---------- Categories, expense photos, currencies ---------- */
.sub-h { font-size: .95rem; margin: 16px 0 8px; color: var(--ink-2); }
.cat-break { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cat-break li { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(60px, 1.2fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.cat-ico { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.cat-ico svg { width: 18px; height: 18px; }
.cat-name { font-weight: 600; overflow-wrap: anywhere; }
.cat-bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.cat-bar span { display: block; height: 100%; background: var(--blue); border-radius: 99px; min-width: 2px; }
.cat-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .cat-break li { grid-template-columns: 32px minmax(0, 1fr) auto; } .cat-bar { display: none; } }
.cat-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-soft); color: var(--blue); border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.cat-chip svg { width: 13px; height: 13px; }
.use-row .use-icon { background: var(--blue-soft); color: var(--blue); }
.use-row .use-icon svg { width: 18px; height: 18px; }
.use-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.use-photos a { width: 58px; height: 58px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: block; background: var(--surface-3); position: relative; }
.use-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.use-photos a.is-file img { display: none; }
.use-photos a.is-file::after { content: "PDF"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.paid-in { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- Field errors on the donate form ---------- */
.field-msg { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 2px; }
.field-msg::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; display: grid; place-items: center; }
.field-msg[hidden] { display: none; }
.has-error input, .has-error select, .has-error .phone-field { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-soft); }
.has-error .phone-field input { box-shadow: none; }
.dropzone.has-error { border-color: var(--danger); background: var(--danger-soft); }
.dropzone.has-error .dz-icon { background: var(--danger); }
.dropzone:focus { outline: 3px solid rgba(20,108,67,.35); outline-offset: 2px; }
@keyframes mk-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shake { animation: mk-shake .35s ease 1; }
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } }

/* ---------- Phone with country code ---------- */
.phone-field { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); overflow: hidden; }
.phone-field:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.phone-field .dial { display: grid; place-items: center; padding: 0 12px; background: var(--surface-3); color: var(--ink-2); font-weight: 700; border-inline-end: 1px solid var(--line-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone-field .dial[hidden] { display: none; }
.phone-field input { border: 0 !important; border-radius: 0; flex: 1; min-width: 0; }
.phone-field input:focus { outline: none; }
[dir="rtl"] .phone-field .dial { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------- Verified donation card ---------- */
.card-page { display: grid; justify-items: center; gap: 10px; }
.card-page h1 { margin: 4px 0 0; }
.donation-card { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 14px 40px rgba(15, 74, 147, .16); border: 1px solid var(--line); margin: 8px 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.card-cta h2 { margin-top: 0; }
.card-banner { background: var(--blue-soft); color: var(--blue); border: 1px solid var(--blue-line); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.my-list li.my-card-row { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
.my-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: center; text-decoration: none; color: inherit; background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: 12px; padding: 8px; }
.my-card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.my-card-text { display: grid; gap: 4px; justify-items: start; }
.my-card-text strong { color: var(--blue); }
@media (max-width: 420px) { .my-card { grid-template-columns: 1fr; } }

/* ---------- Thank-you page: card preview + sign-up ---------- */
.thanks-head { padding: 8px 0 2px; }
.thanks-icon { font-size: 40px; line-height: 1; }
.thanks-head h1 { margin: 8px 0 6px; }
.thanks-head p { margin: 0 auto; max-width: 52ch; color: var(--ink-2); }
.get-card { border: 2px solid var(--blue); background: linear-gradient(180deg, var(--blue-soft), var(--card) 45%); display: grid; gap: 12px; }
.get-card.signed { border-color: var(--line); background: var(--card); }
.get-card-head { text-align: center; }
.get-card-head h2 { margin: 10px 0 6px; font-size: 1.3rem; line-height: 1.3; text-wrap: balance; color: var(--blue); }
.get-card-head p { margin: 0; color: var(--ink-2); font-size: 15px; }
.get-card .one-step-badge { background: var(--blue); }
.card-preview { margin: 0; position: relative; }
.card-preview img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(15, 74, 147, .16); }
.card-preview figcaption { display: table; margin: 8px auto 0; background: var(--ink); color: var(--card); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 99px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.perks svg { flex: none; color: var(--blue); background: var(--card); border: 1px solid var(--blue-line); border-radius: 8px; padding: 4px; width: 30px; height: 30px; }
.signup-quick input { font-size: 16px; } /* 16px stops phones from zooming into the field */
.track-box.compact { padding: 14px; }
.track-box.compact .track-code { margin: 4px 0; }
.track-box.compact .track-code .code { font-size: 1.35rem; }
@media (max-width: 480px) {
  .get-card { padding: 16px 14px; margin-inline: -4px; }
  .get-card-head h2 { font-size: 1.15rem; }
}

/* ---------- Dashboard: profile head, locked preview, reasons ---------- */
.me-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 12px; }
.me-head-text { flex: 1; min-width: 0; }
.me-head h1 { margin: 0; font-size: 1.5rem; line-height: 1.25; overflow-wrap: anywhere; }
.me-head p { margin: 2px 0 0; overflow-wrap: anywhere; }
.me-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--blue-line); background: var(--blue-soft); }
.me-avatar.initials { display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: var(--blue); }
.me-avatar.big { width: 104px; height: 104px; font-size: 2.4rem; }
@media (max-width: 420px) { .me-head { flex-wrap: wrap; } .me-head .btn { width: 100%; } }
.complete-profile { display: block; text-decoration: none; background: var(--gold-soft); color: var(--gold-ink); border: 1px dashed var(--gold-line); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.top-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; margin-inline-end: 6px; vertical-align: -6px; }
.me-link { display: inline-flex; align-items: center; }
.my-card.locked { background: var(--gold-soft); border-color: var(--gold-line); }
.my-card.locked .my-card-text strong { color: var(--gold-ink); }
.locked-img { position: relative; display: block; }
.locked-img::after { content: "🔒"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .35); border-radius: 8px; }
.avatar-edit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar-actions { display: grid; gap: 8px; justify-items: start; flex: 1; min-width: 200px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.avatar-actions label.btn { position: relative; cursor: pointer; }

.reason-box { border-radius: 12px; padding: 12px 14px; margin: 10px 0; border: 1.5px solid; text-align: start; }
.reason-box.reason-needs_correction { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); }
.reason-box.reason-rejected { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.reason-title { font-weight: 800; font-size: 15px; }
.reason-text { margin: 6px 0 10px; font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.reason-box.compact { margin: 0; }
.reason-box p.small { margin: 0; color: inherit; }
.btn.warn-btn { background: var(--gold); border-color: var(--gold); color: #fff; }
.status-needs_correction { background: var(--gold-soft); color: var(--gold-ink); }

/* Shared with the admin panel: Remove / Undo remove toggle, key-value list */
.btn.ghost-danger { color: var(--danger); border-color: var(--danger-line); background: var(--card); display: inline-flex; align-items: center; gap: 6px; }
.btn.ghost-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.remove-toggle { position: relative; cursor: pointer; }
.remove-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.remove-toggle .when-on { display: none; }
.remove-toggle:has(input:checked) { background: var(--danger); border-color: var(--danger); color: #fff; }
.remove-toggle:has(input:checked) .when-on { display: inline; }
.remove-toggle:has(input:checked) .when-off { display: none; }
.avatar-edit:has(.remove-toggle input:checked) .me-avatar { opacity: .35; filter: grayscale(1); }
.kv { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 6px 14px; margin: 0 0 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .me-link.has-avatar { padding: 3px; border-radius: 50%; }
  .me-link.has-avatar .me-text { display: none; }
  .me-link.has-avatar .top-avatar { width: 30px; height: 30px; margin: 0; vertical-align: middle; }
  .me-link:not(.has-avatar) .me-text { font-size: 13px; }
}
.verifying { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border-radius: 99px; padding: 2px 10px; font-size: .9em; }
.mid .verifying { font-size: .8em; }
.receipt-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; font-weight: 600; }
.my-note { color: var(--ink-2); overflow-wrap: anywhere; }
.my-tiles .verifying { font-size: 12px; padding: 2px 8px; white-space: nowrap; }

/* ---------- Progress: open goal and goal exceeded ---------- */
.bar { display: flex; }
.bar > span { flex: none; }
.bar .bar-extra { background: linear-gradient(90deg, #6ea6ea, var(--blue)); border-radius: 0 99px 99px 0; }
.bar.exceeded > span:first-child { border-radius: 99px 0 0 99px; }
[dir="rtl"] .bar .bar-extra { border-radius: 99px 0 0 99px; }
[dir="rtl"] .bar.exceeded > span:first-child { border-radius: 0 99px 99px 0; }
.bar.open > span { background: repeating-linear-gradient(-45deg, var(--brand), var(--brand) 10px, #2f9e64 10px, #2f9e64 20px); background-size: 28px 28px; animation: mk-move 1.6s linear infinite; }
@keyframes mk-move { from { background-position: 0 0; } to { background-position: 28px 0; } }
@media (prefers-reduced-motion: reduce) { .bar.open > span { animation: none; } }
.small-mid { font-size: .95rem; }
.goal-reached { margin: 10px 0 0; background: var(--blue-soft); color: var(--blue); border: 1px solid var(--blue-line); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.progress.is-exceeded { border-color: var(--blue); }
.over-pct strong { color: var(--blue); font-size: 1.05rem; }

/* Bars fill from light to dark in the reading direction. */
[dir="rtl"] .bar span { background: linear-gradient(270deg, #7fd0a3, #2f9e64 45%, var(--brand-2)); }
[dir="rtl"] .bar .bar-extra { background: linear-gradient(270deg, #6ea6ea, var(--blue)); }
[dir="rtl"] .bar.open > span, .bar.open > span { background: repeating-linear-gradient(-45deg, var(--brand), var(--brand) 10px, #2f9e64 10px, #2f9e64 20px); background-size: 28px 28px; }
.prog-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 8px; font-size: 14px; }
.prog-left { min-width: 0; flex: 1; }
.cheer { color: var(--brand); font-weight: 700; }
.prog-date { white-space: nowrap; text-align: end; line-height: 1.4; padding-top: 2px; }

/* ---------- Meri Koshish Heroes ---------- */
.heroes-head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.hero-icon { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, #f6c453, #e09a1f); color: #fff; flex: none; box-shadow: 0 2px 6px rgba(224, 154, 31, .35); }
.heroes-hint { margin: 6px 0 4px; font-size: 13.5px; color: var(--brand-2); font-weight: 600; line-height: 1.5; }
/* A name in another script (e.g. Urdu on an English page) still lines up with the other names. */
[dir="ltr"] .sup-name { text-align: left; }
[dir="rtl"] .sup-name { text-align: right; }
/* Case header: location sits at the end of the badges row. */
.head-badges { align-items: center; }
.head-text { flex: 1; }
.head-loc { margin-inline-start: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
@media (max-width: 640px) { .head-text { width: 100%; } }

/* Honeypot field: hidden from people (and screen readers), visible to naive bots. */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.secure-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 0; line-height: 1.5; }
.secure-note svg { flex: none; color: var(--brand); margin-top: 1px; }
.cf-turnstile { margin: 4px 0; }

/* ---------- Home: case card layout ---------- */
.case-card-body { gap: 8px; }
.case-card-body .cc-title { margin: 0; font-size: 1.1rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.cc-loc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.cc-badges { display: inline-flex; gap: 4px; flex: none; }
.cc-progress { margin: 0; color: var(--ink-2); }
.cc-foot { display: flex; justify-content: flex-end; margin-top: 2px; }
.cc-btn { padding: 7px 14px; font-size: 13px; }
.case-card:hover .cc-btn { background: var(--brand-2); border-color: var(--brand-2); }
/* Each title or location is laid out in its own script direction, so "…" always comes at its end. */
.cc-title, .cc-loc { unicode-bidi: plaintext; text-align: start; }
[dir="rtl"] .case-card-body .cc-title { line-height: 2.1; padding-block: 2px; font-size: 1.15rem; }
[dir="rtl"] .cc-loc { line-height: 1.9; }
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
/* Two lines of the story, ending with "…" if longer. */
.cc-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; unicode-bidi: plaintext; text-align: start; }
[dir="rtl"] .cc-desc { line-height: 2; min-height: 4em; }

/* ---------- Footer: "remember us in your prayers" ---------- */
.foot-pray { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; text-align: center; padding: 12px 14px; margin-bottom: 6px; border-radius: 14px; background: linear-gradient(135deg, var(--brand-soft), transparent 80%); color: var(--ink-2); font-size: 14px; }
.foot-pray p { margin: 0; unicode-bidi: plaintext; }
.pray-heart { color: #d9485f; display: inline-flex; animation: pray-beat 2.4s ease-in-out infinite; }
.pray-heart.big svg { width: 44px; height: 44px; }
@keyframes pray-beat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .pray-heart { animation: none; } }
.pray-open { border: 1px solid var(--brand); background: var(--card); color: var(--brand-2); border-radius: 999px; padding: 4px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.pray-open:hover { background: var(--brand); color: #fff; }
.pray-popup { position: relative; }
.pray-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.pray-top { text-align: center; padding: 26px 22px 4px; }
.pray-top h2 { margin: 8px 0 0; font-size: 1.3rem; }
.pray-popup .popup-body { text-align: center; font-size: 15px; }
.pray-popup .popup-body p { text-align: center; }
.pray-ask { background: var(--brand-soft); border-radius: 12px; padding: 10px 12px; color: var(--ink); }
.pray-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 4px 18px 0; }
.sh { border: 0; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; text-decoration: none; cursor: pointer; }
.sh-wa { background: #1fa855; } .sh-fb { background: #1877f2; } .sh-x { background: #111; }
.sh-copy, .sh-native { background: var(--surface-3); color: var(--ink); }
[data-theme="dark"] .sh-x { background: #333; }
/* Share buttons and "Ameen" stay visible at the bottom while the message scrolls. */
.pray-actions { position: sticky; bottom: 0; background: var(--card); padding-top: 10px; border-top: 1px solid var(--line); margin-top: 8px; }
.pray-popup .pray-actions > .btn { margin: 10px 18px 16px; width: calc(100% - 36px); }
.pray-top h2 { text-wrap: balance; }
@media (max-width: 560px) {
  .pray-top { padding: 18px 44px 0; }
  .pray-heart.big svg { width: 34px; height: 34px; }
  .pray-top h2 { font-size: 1.1rem; }
  .pray-popup .popup-body { font-size: 14px; }
  .pray-popup .popup-body p { margin: 8px 0; }
  .sh { padding: 7px 12px; font-size: 13px; }
}
[dir="rtl"] .pray-top h2 { line-height: 1.9; }
[dir="rtl"] .pray-popup .popup-body { line-height: 2; }
.pray-mission { border: 1.5px solid var(--verify, #1d5fae); border-radius: 12px; padding: 10px 12px; color: var(--ink); background: var(--card); }
.pray-tick { color: var(--verify, #1d5fae); vertical-align: -2px; }
.pray-tick .check { width: 18px; height: 18px; }
.pray-sign { font-weight: 600; color: var(--brand-2); font-style: italic; }
[dir="rtl"] .pray-sign { font-style: normal; }
.pray-popup .popup-body p { text-wrap: pretty; }
.legal ul { padding-inline-start: 22px; margin: 6px 0 14px; }
.legal li { margin: 4px 0; line-height: 1.6; }
[dir="rtl"] .legal li { line-height: 2.1; margin: 6px 0; }
.video-file video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.video { margin-bottom: 14px; }

/* Heroes list: Top / Newest */
.hero-tabs { display: flex; gap: 4px; padding: 4px; margin: 10px 0 4px; border-radius: 999px; background: var(--surface-3, #eef2ef); width: fit-content; max-width: 100%; }
.hero-tab { padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.hero-tab:hover { color: var(--ink); }
.hero-tab.on { background: var(--card); color: var(--brand-2); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.hero-tab-note { margin: 4px 0 8px; font-size: 13px; color: var(--muted); font-style: italic; unicode-bidi: plaintext; text-align: start; }
[dir="rtl"] .hero-tab-note { font-style: normal; }
.sup-list li.ranked { position: relative; }
.medal { position: absolute; inset-inline-start: 26px; top: 26px; font-size: 16px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
a.card-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
a.card-banner:hover { box-shadow: 0 2px 10px rgba(15, 74, 147, .15); }
.card-banner-go { display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; white-space: nowrap; }
[data-theme="dark"] .card-banner-go { color: #0b1a2e; }
[dir="rtl"] .card-banner-go .arrow { transform: scaleX(-1); display: inline-block; }
.my-card-row:target .my-card { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 12px; }
.my-card-row { scroll-margin-top: 80px; }
