:root {
  --bg: #fdf8ef; --card: #ffffff; --ink: #2b1a29; --muted: #75657a; --line: #eadfd0;
  --brand: #6b1d5c; --brand-ink: #ffffff; --brand-soft: #f7edf4; --accent: #b8892e;
  --gold: #c9a24b; --gold-soft: #f6ecd0; --plum-deep: #3f0f38;
  --danger: #b3261e; --shadow: 0 1px 2px rgba(63,15,56,.06), 0 8px 24px rgba(63,15,56,.07);
  --r: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17101a; --card: #211827; --ink: #f5edf3; --muted: #b8a6b6; --line: #382a3d;
    --brand: #d98fc8; --brand-ink: #2a0f25; --brand-soft: #35203a; --accent: #e6c06a;
    --gold: #e0b95c; --gold-soft: #3b3220; --plum-deep: #2a0f25;
    --danger: #ff8a80; --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 17px; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; display: block; margin-top: -3px; }
#memberBox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { background: var(--brand-soft); color: var(--brand); padding: 6px 12px; border-radius: 99px; font-size: 14px; }

/* ---------- buttons & inputs ---------- */
.btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.wa { background: #1fa855; color: #fff; border-color: #1fa855; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 14px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
label.field { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
label.field > input, label.field > select { margin-top: 4px; color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: clamp(24px, 4vw, 36px); letter-spacing: -.02em; max-width: 760px; }
.hero p { color: var(--muted); margin: 0; max-width: 700px; }
.hero b { color: var(--ink); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; padding: 18px 0 40px; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; }
.filters h2 { font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fgroup { border-top: 1px solid var(--line); padding: 8px 0; }
.fgroup summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 4px 0; list-style: none; display: flex; justify-content: space-between; }
.fgroup summary::after { content: "+"; color: var(--muted); }
.fgroup[open] summary::after { content: "–"; }
.fgroup summary::-webkit-details-marker { display: none; }
.checks { display: grid; gap: 2px; max-height: 210px; overflow: auto; padding: 4px 2px; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 15px; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.chk:hover { background: var(--brand-soft); }
.chk input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.filter-actions { display: flex; gap: 8px; margin-top: 12px; }
.filter-actions .btn { flex: 1; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .count { font-weight: 700; }
.toolbar .right { display: flex; gap: 8px; align-items: center; }
.toolbar select { width: auto; }
#filterToggle { display: none; }

/* ---------- cards ---------- */
.grid { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; transition: transform .12s, border-color .12s; text-align: left; padding: 0; font: inherit; color: inherit; }
.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.photo { position: relative; aspect-ratio: 4 / 5; background: var(--brand-soft); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s; }
.photo img.ready { opacity: 1; }
.photo .ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 14px; padding: 12px; }
.photo .ph svg { width: 54px; height: 54px; opacity: .45; display: block; margin: 0 auto 6px; }
.photo.none { aspect-ratio: auto; height: 74px; }
.photo.none .ph { position: static; height: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; }
.photo.none .ph svg { width: 30px; height: 30px; margin: 0; }
.pphoto .photo.none { height: 90px; }
.photo .tag { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 99px; z-index: 2; }
.wm { position: absolute; inset: 0; background-repeat: repeat; pointer-events: none; z-index: 1; }
.card .body { padding: 12px 14px 14px; }
.card .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.card .pno { font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.card h3 { font-size: 18px; margin-bottom: 4px; }
.card p { margin: 2px 0; font-size: 14.5px; color: var(--muted); }
.card p b { color: var(--ink); font-weight: 600; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); margin-right: 4px; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; border: 1px dashed var(--line); border-radius: var(--r); grid-column: 1 / -1; }
.more { text-align: center; margin: 22px 0; }

/* ---------- how it works ---------- */
.how { background: var(--card); border-top: 1px solid var(--line); padding: 34px 0 44px; }
.how .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--bg); }
.box h3 { font-size: 17px; }
.box ul, .box ol { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
.box li { margin: 3px 0; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 16px; }

/* ---------- dialogs ---------- */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--card); color: var(--ink); width: min(780px, calc(100vw - 20px)); max-height: calc(100vh - 20px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10,20,15,.55); }
dialog.narrow { width: min(420px, calc(100vw - 20px)); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 3; }
.dlg-head h2 { margin: 0; font-size: 19px; }
.dlg-body { padding: 16px 18px 20px; overflow: auto; max-height: calc(100vh - 90px); }
.x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 8px; }
.pgrid { display: grid; grid-template-columns: 250px 1fr; gap: 20px; }
.pphoto { position: sticky; top: 0; align-self: start; }
.pphoto .photo { border-radius: 12px; }
.sec { margin: 0 0 14px; }
.sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 3px 10px; font-size: 15px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.contact { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--brand-soft); margin: 14px 0; }
.contact .num { font-size: 22px; font-weight: 800; letter-spacing: .02em; direction: ltr; }
.contact .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.contact p { margin: 4px 0 8px; font-size: 14.5px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; margin: 6px 0; }
.ctable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ctable th, .ctable td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ctable th { color: var(--muted); font-weight: 600; font-size: 13px; }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(30px); background: #1f2a24; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: calc(100vw - 30px); }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: #8d1c14; }
#toast.good { background: #0b6b4d; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 14px; }
.tab { background: var(--card); border: 1px solid var(--line); padding: 8px 16px; border-radius: 99px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
.tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 18px; }
.tscroll { overflow-x: auto; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.inline > * { flex: 1 1 160px; } .inline .btn { flex: 0 0 auto; }
.mono { font-family: ui-monospace, Consolas, monospace; background: var(--brand-soft); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* ---------- phones & tablets ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .filters { display: none; position: fixed; inset: 0; z-index: 40; max-height: none; border-radius: 0; top: 0; padding: 16px 16px 90px; }
  .filters.open { display: block; }
  .filter-actions { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); padding: 12px 16px; border-top: 1px solid var(--line); margin: 0; }
  #filterToggle { display: inline-flex; }
  .pgrid { grid-template-columns: 1fr; }
  .pphoto { position: static; max-width: 280px; }
  .kv { grid-template-columns: 120px 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
  .card h3 { font-size: 16px; } .card p { font-size: 13.5px; }
  .brand small { display: none; }
  .photo.none { height: 58px; } .photo.none .ph { font-size: 12.5px; gap: 6px; } .photo.none .ph svg { width: 24px; height: 24px; }
}
@media print { body * { display: none !important; } }

/* ================= round 2 ================= */
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { padding: 7px 12px; border-radius: 99px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.mainnav a:hover { background: var(--brand-soft); }
.mainnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.big { padding: 12px 22px; font-size: 17px; border-radius: 12px; }
.hero.small { padding-top: 18px; } .hero.small h1 { font-size: 26px; }
.badge.warn { background: #fff2d9; color: #8a5a00; }
.lead { color: var(--muted); max-width: 720px; }

.home-hero { background: linear-gradient(135deg, var(--brand-soft), var(--bg)); padding: 44px 0 34px; border-bottom: 1px solid var(--line); }
.home-hero h1 { font-size: clamp(28px, 5vw, 46px); letter-spacing: -.02em; max-width: 780px; }
.home-hero p { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0 0 20px; }
.home-hero p b { color: var(--ink); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: -22px; position: relative; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 34px; letter-spacing: -.02em; color: var(--brand); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14.5px; display: block; }
.stat small { display: block; font-size: 13px; }
.block { padding: 34px 16px 10px; }
.block h2 { font-size: 26px; }
.findbox { display: flex; gap: 10px; align-items: end; max-width: 620px; flex-wrap: wrap; }
.findbox .field { flex: 1 1 260px; margin: 0; }
#findOut { margin-top: 14px; max-width: 760px; }
.res { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; }
.res p { margin: 6px 0 10px; color: var(--muted); }
.res .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.prev { white-space: pre-wrap; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; font: 14px/1.5 system-ui, sans-serif; overflow-wrap: anywhere; margin: 10px 0 0; }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 12px 0 24px; }
.trust > div { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--card); }
.trust p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* forms (registration + admin editor) */
.narrowpage { max-width: 860px; padding-top: 22px; padding-bottom: 40px; }
.fs { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px 6px; margin: 0 0 16px; background: var(--card); }
.fs legend { font-weight: 700; padding: 0 8px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ff.wide { grid-column: 1 / -1; }
.ff .lbl { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.ff .hint { display: block; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.req { color: var(--danger); }
.checks.cols { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-height: none; margin-bottom: 10px; }
.oath { align-items: flex-start; margin: 6px 0 12px; }
.oath input { margin-top: 3px; }
.hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.notice { background: #fff2d9; color: #6b4600; border-radius: 10px; padding: 10px 14px; margin: 8px 0 14px; }
#photoPrev { max-width: 160px; border-radius: 10px; margin-top: 10px; display: block; }
#photoPrev[hidden], .notice[hidden], [hidden] { display: none !important; }

/* admin extras */
.cards4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 14px; }
.dcard { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--bg); }
.dcard h3 { font-size: 18px; margin-bottom: 8px; }
.dcard dl { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 0; font-size: 15px; }
.dcard dt { color: var(--muted); } .dcard dd { margin: 0; font-weight: 700; text-align: right; }
.pre { width: 100%; min-height: 260px; font: 14px/1.5 ui-monospace, Consolas, monospace; white-space: pre; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cmp > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.cmp h4 { margin: 0 0 6px; }
.cmp .diff { background: #fff2d9; border-radius: 4px; }
.reason { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #fde7e5; color: #b3261e; margin: 2px 4px 2px 0; }
.seg { display: flex; gap: 6px; margin-bottom: 10px; }
.seg label { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px; cursor: pointer; font-weight: 600; }
.seg input { position: absolute; opacity: 0; }
.seg label:has(input:checked) { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.seg label.minus:has(input:checked) { background: var(--danger); border-color: var(--danger); color: #fff; }
.help { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; margin: 0 0 10px; }
.help b { display: inline-block; min-width: 0; }
dialog.wide { width: min(1000px, calc(100vw - 20px)); }

@media (max-width: 700px) {
  .fgrid, .row3, .cmp { grid-template-columns: 1fr; }
  .mainnav a { padding: 6px 9px; font-size: 14px; }
  .stats { margin-top: 12px; }
}

.ur { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", "Segoe UI", Tahoma, serif; line-height: 2.1; }
.oath .ol { display: block; margin: 3px 0; }
.oath .ur { display: block; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 17px; }
.oathbox .oath { margin: 4px 0 10px; }

/* =====================================================================
   THEME: plum and gold (from the Nikkah Nest logo). Colours only; no behaviour.
   ===================================================================== */
h1, h2, h3, .brand .name, .stat b, .dlg-head h2 { font-family: var(--serif); }
h1, h2 { letter-spacing: -.01em; }
::selection { background: var(--gold-soft); color: var(--plum-deep); }

/* top bar */
.topbar { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: saturate(1.3) blur(8px); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.topbar::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--plum-deep), var(--brand) 45%, var(--gold) 100%); }
.brand { gap: 10px; }
.brand img.logo { width: 52px; height: 40px; object-fit: contain; border-radius: 0; background: none; display: block; }
.brand .name { font-size: 22px; font-weight: 700; color: var(--brand); letter-spacing: 0; line-height: 1.05; display: block; }
.brand small { color: var(--accent); font-weight: 600; letter-spacing: .04em; font-size: 11.5px; text-transform: uppercase; margin-top: 2px; }
.pill { background: var(--gold-soft); color: var(--plum-deep); font-weight: 600; border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill { color: var(--ink); } }

/* buttons */
.btn { border-radius: 11px; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; }
.btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #fff), var(--brand)); border-color: var(--brand); box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.primary:hover { filter: none; background: var(--plum-deep); border-color: var(--plum-deep); color: #fff; }
.btn.gold { background: linear-gradient(180deg, #e3c26c, #c9a24b); border-color: #b8892e; color: #3f0f38; box-shadow: 0 2px 10px rgba(201,162,75,.35); }
.btn.gold:hover { background: #d8b358; border-color: #b8892e; }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn.outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn.wa { background: #1fa855; border-color: #1fa855; }
.btn.wa:hover { background: #178a45; border-color: #178a45; }
.btn.ghost:hover { background: var(--brand-soft); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 0; }
.chk:hover { background: var(--brand-soft); }

/* headings with a gold rule */
.block h2, .how h2 { position: relative; padding-bottom: 12px; margin-bottom: 14px; }
.block h2::after, .how h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), transparent); }

/* home hero */
.home-hero { position: relative; overflow: hidden; color: #fff; padding: 56px 0 74px; border-bottom: 0;
  background: radial-gradient(900px 400px at 85% 20%, rgba(201,162,75,.28), transparent 60%), linear-gradient(135deg, #3f0f38 0%, #5a1850 55%, #6b1d5c 100%); }
.home-hero::before { content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 4l6 14 14 2-10 10 3 14-13-7-13 7 3-14L10 20l14-2z' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E"); }
.home-hero .wrap { position: relative; display: grid; grid-template-columns: 1.4fr .8fr; gap: 30px; align-items: center; }
.home-hero h1 { color: #fff; font-size: clamp(30px, 5.2vw, 52px); font-weight: 700; line-height: 1.1; max-width: 640px; }
.home-hero h1 em { font-style: normal; color: #e9cf8c; }
.home-hero p { color: rgba(255,255,255,.86); font-size: 18px; max-width: 600px; }
.home-hero p b { color: #fff; }
.home-hero .badgebox { justify-self: center; width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffdf7, #fbf1dc); display: grid; place-items: center; box-shadow: 0 0 0 8px rgba(255,255,255,.08), 0 0 0 9px rgba(201,162,75,.6), 0 24px 60px rgba(0,0,0,.35); }
.home-hero .badgebox img { width: 78%; height: auto; display: block; }
.cta .btn.big { box-shadow: none; }
.cta .btn:not(.gold):not(.primary):not(.outline-light) { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }

.stats { margin-top: -38px; }
.stat { border: 1px solid var(--line); border-top: 3px solid var(--gold); text-align: left; }
.stat b { color: var(--brand); font-size: 38px; }
.stat span { font-weight: 600; color: var(--ink); }
.stat small { color: var(--muted); font-weight: 400; margin-top: 2px; }
.trust > div { border-top: 3px solid var(--gold); box-shadow: var(--shadow); }
.trust b { color: var(--brand); font-family: var(--serif); font-size: 18px; }
.how { background: linear-gradient(180deg, var(--brand-soft), var(--bg)); border-top: 1px solid var(--line); }
.box { background: var(--card); box-shadow: var(--shadow); }
.box h3 { color: var(--brand); }
.findbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); max-width: 680px; }
.res { border-left: 4px solid var(--gold); }

/* search page */
.hero.small { max-width: 1240px; margin-left: auto; margin-right: auto; padding: 26px 16px 16px; }
.hero.small h1 { color: var(--brand); }
.filters { box-shadow: var(--shadow); border-top: 3px solid var(--gold); }
.filters h2 { font-size: 19px; color: var(--brand); }
.fgroup summary { color: var(--ink); }
.fgroup summary::after { color: var(--accent); font-weight: 700; }
.card { transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 2px 4px rgba(63,15,56,.08), 0 14px 32px rgba(63,15,56,.14); }
.card .pno { color: var(--brand); font-family: var(--serif); font-size: 15px; }
.card h3 { font-size: 19px; }
.card .body { border-top: 1px solid var(--line); }
.photo { background: linear-gradient(160deg, var(--brand-soft), var(--gold-soft)); }
.photo .ph { color: var(--brand); }
.photo .tag { background: rgba(63,15,56,.7); backdrop-filter: blur(4px); }
.badge { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.toolbar .count { color: var(--brand); font-family: var(--serif); font-size: 18px; }

/* featured */
.featnote { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 11px 16px; border-radius: 12px; font-size: 14.5px;
  background: linear-gradient(90deg, var(--gold-soft), color-mix(in srgb, var(--gold-soft) 40%, var(--card))); border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); color: var(--plum-deep); }
.featnote b { font-family: var(--serif); font-size: 17px; color: var(--brand); }
.featnote a { color: var(--brand); font-weight: 700; }
.featnote.slim { margin: 0 0 12px; display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .featnote { color: var(--ink); } }
.card.featured { border: 2px solid var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent), var(--shadow); position: relative; }
.card .ribbon { position: absolute; right: 0; top: 14px; z-index: 4; background: linear-gradient(90deg, #c9a24b, #e3c26c); color: #3f0f38; font-weight: 800; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px 4px 12px; border-radius: 99px 0 0 99px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* dialogs, forms */
dialog { border: 0; box-shadow: 0 30px 80px rgba(63,15,56,.45); border-top: 4px solid var(--gold); }
dialog::backdrop { background: rgba(40,10,36,.6); backdrop-filter: blur(2px); }
.dlg-head h2 { color: var(--brand); }
.contact { background: linear-gradient(135deg, var(--brand-soft), var(--gold-soft)); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.contact .num { color: var(--brand); }
.sec h3 { color: var(--accent); }
.fs { box-shadow: var(--shadow); border-radius: 16px; }
.fs legend { font-family: var(--serif); color: var(--brand); font-size: 18px; }
.req { color: #c0392b; }
.narrowpage h1 { color: var(--brand); }
.oathbox { background: linear-gradient(180deg, var(--card), var(--brand-soft)); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.notice { background: var(--gold-soft); color: var(--plum-deep); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* toast */
#toast { background: var(--plum-deep); border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(63,15,56,.4); }
#toast.good { background: #14532d; border-color: #7bc99a; }

/* footer */
footer { background: var(--plum-deep); color: rgba(255,255,255,.78); padding: 30px 16px; margin-top: 30px; border-top: 3px solid var(--gold); }
footer .fwrap { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
footer img { width: 84px; height: auto; background: #fbf4e4; border-radius: 50%; padding: 12px 10px; }
footer .fname { font-family: var(--serif); color: #fff; font-size: 20px; }
footer a { color: #e9cf8c; }
footer small { opacity: .8; }

@media (max-width: 800px) {
  .home-hero { padding: 36px 0 62px; }
  .home-hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .home-hero .badgebox { display: none; }
  .brand img.logo { width: 44px; height: 34px; }
  .brand .name { font-size: 19px; }
  .stat b { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { .card, .btn { transition: none; } .card:hover { transform: none; } }

/* =====================================================================
   Registration form: Urdu next to English, children and brothers / sisters blocks
   ===================================================================== */
.ur { unicode-bidi: isolate; }
label.field .ur, .ff .lbl .ur, .fs legend .ur, .subt .ur { font-size: 1.08em; color: var(--brand); font-weight: 600; line-height: 1.7; }
.sl { color: var(--accent); font-weight: 700; margin: 0 2px; }
.fs legend { max-width: 100%; }
.fs legend .ur { font-size: 17px; }
label.field { line-height: 1.5; }

.compo { padding: 2px 0 6px; }
.compo .row2, .compo .row3 { align-items: start; }
.subrows:empty { display: none; }
.subrows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 8px; }
.subwrap { display: contents; }
.subcard { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 10px 12px 2px; background: color-mix(in srgb, var(--brand-soft) 55%, var(--card)); }
.subcard .row2 { grid-template-columns: 1fr; gap: 0; }
.subt { font-family: var(--serif); font-weight: 700; color: var(--brand); font-size: 16px; margin-bottom: 6px; }
.subt .ur { font-size: 15px; }

.fielderr { display: block; color: var(--danger); font-size: 13px; font-weight: 600; min-height: 0; margin-top: 3px; }
.fielderr:empty { display: none; }
input.bad, select.bad { border-color: var(--danger); outline: 2px solid color-mix(in srgb, var(--danger) 30%, transparent); }

@media (max-width: 760px) {
  .subrows { grid-template-columns: 1fr; }
  .compo .row2, .compo .row3 { grid-template-columns: 1fr; gap: 0; }
  .fs { padding: 12px 12px 4px; }
  label.field { font-size: 14.5px; }
}

/* phone: the filter window closes with the big X at the top, which stays in view while you scroll */
@media (max-width: 900px) {
  .filters h2 { position: sticky; top: -16px; z-index: 3; background: var(--card); margin: -16px -16px 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
  .filters h2 .x { font-size: 30px; line-height: 1; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); border: 0; }
}

/* advanced filter rows */
.crow { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) minmax(160px, 2fr) auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.crow .c-val { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crow .c-val input, .crow .c-val select { flex: 1 1 110px; min-width: 0; }
.crow .c-multi { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 6px 10px; }
.crow .c-multi summary { cursor: pointer; padding: 3px 0; }
.crow .c-multi .checks { max-height: 220px; overflow: auto; padding: 6px 0; }
@media (max-width: 720px) { .crow { grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; padding: 8px; } .crow .c-val { grid-column: 1 / -1; } .crow .c-del { grid-column: 1 / -1; } }
.crow .c-multi .chk { justify-content: flex-start; gap: 8px; }
.crow .c-multi input[type=checkbox] { width: auto; flex: none; }
