/* =====================================================================
   css/mk.css — Maktab Quran marketplace design system (2026-10-30)
   One stylesheet for the marketplace pages AND the shared header/footer
   on content pages. Tokens first; components after. No framework.
   ===================================================================== */
@font-face {
  font-family: 'Jakarta';
  src: url('../fonts/jakarta-latin.woff2') format('woff2');
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Amiri Bismillah';
  src: url('../fonts/amiri-bismillah.woff2') format('woff2');
  font-display: swap;
}

:root {
  --ink: #0D1B2A;
  --ink-2: #26323F;
  --text: #36424F;
  --muted: #3A4652;
  --faint: #6B7681;
  --em-950: #042A21;
  --em-900: #06382C;
  --em-800: #0A4A3A;
  --em-700: #0E6650;
  --em-600: #12805F;
  --em-500: #1A9971;
  --em-100: #DDF2E8;
  --em-50:  #F0F9F4;
  --gold-700: #8F6A1F;
  --gold-600: #B88A2E;
  --gold-500: #D4A853;
  --gold-100: #F7EDD5;
  --cream: #FBF8F2;
  --paper: #FFFFFF;
  --line: #E8E3D8;
  --line-2: #F1EDE4;
  --link: #1a73e8;
  --link-hover: #0b57d0;
  --red: #C8372D;
  --red-50: #FDECEA;
  --amber: #A76A00;
  --amber-50: #FFF5DD;
  --blue-50: #EAF2FE;
  --online: #22C55E;
  --r-sm: 8px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(13,27,42,.06), 0 1px 1px rgba(13,27,42,.04);
  --sh-2: 0 6px 18px -6px rgba(13,27,42,.14), 0 2px 6px rgba(13,27,42,.05);
  --sh-3: 0 24px 48px -16px rgba(13,27,42,.24), 0 6px 14px rgba(13,27,42,.06);
  --font: 'Jakarta', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --arabic: 'Amiri Bismillah', 'Amiri', 'Scheherazade New', serif;
  --wrap: 1180px;
  --head-h: 68px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.mk {
  margin: 0; background: var(--cream); color: var(--text);
  font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
.mk h1, .mk h2, .mk h3, .mk h4 { color: var(--ink); font-family: var(--font); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
.mk h1 { font-size: clamp(32px, 5.2vw, 56px); font-weight: 800; letter-spacing: -.03em; }
.mk h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.025em; }
.mk h3 { font-size: 19px; font-weight: 700; }
.mk p { margin: 0 0 1em; }
.mk img { max-width: 100%; height: auto; }
.mk a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.mk a:hover { color: var(--link-hover); }
.mk :focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.hide { display: none !important; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.ar { font-family: var(--arabic); direction: rtl; }
/* Inline icons default to text size; components below set their own. */
:where(.mk) svg { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }

/* ---------- buttons ---------- */
.mk .btn, .btn {
  --b: var(--em-700); --bh: var(--em-800); --c: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--b);
  background: var(--b); color: var(--c); font: 700 15px/1 var(--font); letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 6px 16px -8px rgba(14,102,80,.55);
}
.mk .btn:hover, .btn:hover { background: var(--bh); border-color: var(--bh); color: var(--c); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn.gold { --b: var(--gold-500); --bh: var(--gold-600); --c: var(--em-950); box-shadow: 0 6px 16px -8px rgba(184,138,46,.7); }
.btn.ghost { --b: transparent; --bh: var(--em-50); --c: var(--em-700); border-color: var(--line); box-shadow: none; background: var(--paper); }
.btn.ghost:hover { border-color: var(--em-600); }
.btn.light { --b: rgba(255,255,255,.12); --bh: rgba(255,255,255,.2); --c: #fff; border-color: rgba(255,255,255,.35); box-shadow: none; }
.btn.danger { --b: var(--red); --bh: #a42a22; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background .15s;
}
.icon-btn:hover { background: var(--line-2); }
.icon-btn svg, .btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- header ---------- */
.mk-head {
  position: sticky; top: 0; z-index: 50; height: var(--head-h);
  background: rgba(251,248,242,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(232,227,216,.8);
}
.mk-head .wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--ink) !important; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, var(--em-600), var(--em-900)); display: grid; place-items: center; color: var(--gold-500); box-shadow: inset 0 0 0 1px rgba(212,168,83,.35); }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-top: -2px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--ink-2) !important; text-decoration: none !important; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--line-2); color: var(--em-800) !important; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-actions .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.nav-toggle { display: none; }
.nav .only-sm { display: none; }
@media (max-width: 920px) { .nav .only-sm { display: block; border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 14px; font-weight: 700; color: var(--em-700) !important; } }
@media (max-width: 600px) {
  .brand { white-space: nowrap; font-size: 17px; gap: 8px; }
  .brand small { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .head-actions { gap: 2px; }
  .head-actions .icon-btn { width: 36px; }
  .mk-head .wrap { gap: 8px; padding: 0 12px; }
}
.bell { position: relative; }
.bell .dot, .badge-count {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--red); color: #fff; font: 700 11px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--cream);
}
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none !important; color: var(--ink) !important; font-weight: 600; font-size: 14px; }
.me-chip .av { width: 32px; height: 32px; font-size: 13px; }
@media (max-width: 920px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: var(--head-h); flex-direction: column; background: var(--paper); padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--sh-2); margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .nav-toggle { display: inline-grid; }
  .head-actions .hide-sm { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #E9F5EF;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(212,168,83,.22), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(26,153,113,.35), transparent 60%),
    linear-gradient(160deg, var(--em-800), var(--em-950));
  padding: 64px 0 72px;
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Cpath d='M40 4l10 26 26 10-26 10-10 26-10-26L4 40l26-10z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--gold-500); }
.hero .lead.hadith { max-width: 820px; font-size: clamp(18px, 2.2vw, 22px); color: #F2DFAE; font-weight: 600; font-style: italic; margin-bottom: 10px; border-left: 3px solid var(--gold-500); padding-left: 14px; }
.hero .lead.hadith cite { display: block; font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #CFE6DB; margin-top: 4px; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: #CFE6DB; max-width: 640px; margin-bottom: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font: 700 13px/1.2 var(--font); letter-spacing: .02em; background: rgba(212,168,83,.14); color: #F2DFAE; border: 1px solid rgba(212,168,83,.4); margin-bottom: 18px; }
.eyebrow.dark { background: var(--gold-100); color: var(--gold-700); border-color: #EBD9AE; }
.hero-search {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 8px; padding: 8px; max-width: 860px;
  background: #fff; border-radius: 20px; box-shadow: var(--sh-3);
}
.hero-search .input, .hero-search select { border: 0; background: var(--cream); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; color: #BFDDCF; font-size: 14px; font-weight: 600; }
.hero-trust span { display: inline-flex; gap: 8px; align-items: center; }
.hero-trust svg { width: 18px; height: 18px; color: var(--gold-500); }
@media (max-width: 760px) { .hero { padding: 48px 0 64px; } .hero-search { grid-template-columns: 1fr; } }

/* ---------- home: search bar under the hero + live listings ---------- */
.home-find { padding: 0 0 52px; }
.find-bar {
  position: relative; z-index: 2; margin-top: -34px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto; gap: 8px; padding: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-3);
}
.mk .find-bar select, .find-q { min-height: 52px; border: 1.5px solid var(--line-2); background: var(--cream); border-radius: 14px; }
.find-q { display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--muted); }
.find-q svg { width: 20px; height: 20px; flex: none; }
.mk .find-bar .find-q input { border: 0; background: transparent; box-shadow: none; padding: 0; min-height: 48px; width: 100%; }
.find-q:focus-within { border-color: var(--em-600); box-shadow: 0 0 0 4px rgba(18,128,95,.12); }
.find-bar .btn { min-height: 52px; }
.find-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 16px; }
.find-top .count { font-weight: 800; color: var(--ink); font-size: 18px; }
@media (max-width: 980px) { .find-bar { grid-template-columns: 1fr 1fr; } .find-q { grid-column: 1 / -1; } .find-bar .btn { grid-column: 1 / -1; } }
@media (max-width: 520px) { .find-bar { grid-template-columns: 1fr; margin-top: -26px; } }

/* ---------- sections / cards ---------- */
.section { padding: 52px 0; }
.section.tight { padding: 36px 0; }
.section + .section:not(.paper):not(.hero) { padding-top: 12px; }
.section.paper { background: var(--paper); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section-head { max-width: 720px; margin: 0 0 24px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 18px; color: var(--muted); margin-bottom: 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .section { padding: 40px 0; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-1); }
.card.hover { transition: transform .18s, box-shadow .18s, border-color .18s; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: #D9D2C2; }
.feature-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--em-50); color: var(--em-700); margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--em-100); }
.feature-ico svg { width: 24px; height: 24px; }
.feature-ico .ar-glyph { font-family: var(--arabic); font-size: 17px; line-height: 1; direction: rtl; letter-spacing: 1px; font-weight: 700; }
.feature-ico .ar-glyph.big { font-size: 28px; margin-top: -4px; }
.subj-card .feature-ico { width: 54px; height: 54px; border-radius: 16px; transition: transform .2s; }
.subj-card .feature-ico svg { width: 28px; height: 28px; }
.subj-card:hover .feature-ico { transform: scale(1.06) rotate(-3deg); }
.feature-ico.gold { background: var(--gold-100); color: var(--gold-700); box-shadow: inset 0 0 0 1px #EBD9AE; }
.step-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--em-800); color: var(--gold-500); font-weight: 800; margin-bottom: 14px; }
.stat { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.stat-label { color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 6px; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span, .label { display: block; font-weight: 700; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-weight: 500; color: var(--muted); font-size: 13px; margin-top: 6px; display: block; }
.input, .mk select, .mk textarea, .mk input[type=text], .mk input[type=email], .mk input[type=password], .mk input[type=tel], .mk input[type=number], .mk input[type=search] {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); font: 500 15px/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
.mk textarea { min-height: 120px; resize: vertical; }
.input:focus, .mk select:focus, .mk textarea:focus, .mk input:focus { outline: none; border-color: var(--em-600); box-shadow: 0 0 0 4px rgba(18,128,95,.12); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--em-700); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-2); font: 600 13px/1.3 var(--font); border: 1px solid transparent;
}
.chip.em { background: var(--em-50); color: var(--em-800); border-color: var(--em-100); }
.chip.gold { background: var(--gold-100); color: var(--gold-700); border-color: #EBD9AE; }
.chip svg { width: 14px; height: 14px; }
label.chip { cursor: pointer; user-select: none; background: var(--paper); border-color: var(--line); }
label.chip input { position: absolute; opacity: 0; pointer-events: none; }
label.chip:has(input:checked) { background: var(--em-700); color: #fff; border-color: var(--em-700); }
.seg { display: inline-flex; padding: 4px; background: var(--line-2); border-radius: 14px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font: 700 14px/1 var(--font); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--sh-1); }
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; border: 1px solid; }
.alert.err { background: var(--red-50); border-color: #F5C6C1; color: #8E241C; }
.alert.ok { background: var(--em-50); border-color: var(--em-100); color: var(--em-800); }
.alert.warn { background: var(--amber-50); border-color: #F3DDA4; color: #6E4A00; }
.alert.info { background: var(--blue-50); border-color: #CFE0FB; color: #174EA6; }

/* ---------- avatar / badges ---------- */
.av {
  --s: 48px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden; position: relative;
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: calc(var(--s) * .4);
  background: linear-gradient(145deg, var(--em-500), var(--em-800));
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { --s: 96px; }
.av.xl { --s: 128px; }
.av.sm { --s: 36px; }
.av-wrap { position: relative; display: inline-block; }
.av-wrap .on { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 2.5px var(--paper); }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--em-700); font-size: 13px; font-weight: 700; }
.verified svg { width: 16px; height: 16px; }
.verified.ijazah { color: var(--gold-700); }
.country-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.stars { color: var(--gold-500); letter-spacing: 1px; font-size: 14px; }
.masked { white-space: nowrap; font: 600 13px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .04em; color: var(--ink-2); background: var(--line-2); border-radius: 8px; padding: 6px 9px; display: inline-flex; align-items: center; gap: 6px; }
.masked svg { width: 14px; height: 14px; color: var(--muted); }

/* ---------- directory ---------- */
.dir { display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--head-h) + 16px); }
.filters .card { padding: 20px; }
.filters h3 { font-size: 15px; margin-bottom: 12px; }
.filters .field { margin-bottom: 14px; }
#fToggle { display: none !important; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; }
.dir-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dir-top .count { font-weight: 700; color: var(--ink); }
@media (max-width: 960px) {
  .dir { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters .card { display: none; }
  #fToggle { display: flex !important; }
  .filters.open .card { display: block; }
}
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pcard { display: flex; flex-direction: column; gap: 14px; position: relative; }
.pcard-top { display: flex; gap: 14px; align-items: flex-start; }
.pcard h3 { font-size: 17px; margin: 0 0 2px; }
.pcard h3 a { color: var(--ink) !important; text-decoration: none !important; }
.pcard h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.pcard .headline { color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pcard .meta span { display: inline-flex; gap: 5px; align-items: center; }
.pcard .meta svg { width: 15px; height: 15px; }
.pcard-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); position: relative; z-index: 1; }
.pcard-foot .price { white-space: nowrap; font-weight: 800; color: var(--ink); font-size: 16px; }
.pcard-foot .price small { color: var(--muted); font-weight: 600; font-size: 12px; }
.save-btn { position: absolute; top: 16px; right: 16px; z-index: 2; }
.save-btn[aria-pressed="true"] { color: var(--red); }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }
.featured-tag { position: absolute; top: -10px; left: 20px; z-index: 2; }
.skel { background: linear-gradient(90deg, var(--line-2), #F8F5EE, var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: var(--faint); margin-bottom: 12px; }
.empty h3 { color: var(--ink); }

/* ---------- profile ---------- */
.prof-hero { background: linear-gradient(160deg, var(--em-800), var(--em-950)); height: 150px; }
.prof { display: grid; grid-template-columns: 1fr 360px; gap: 28px; margin-top: -84px; align-items: start; }
.prof-main .card { padding: 28px; }
.prof-id { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.prof-id .av { box-shadow: 0 0 0 5px var(--paper), var(--sh-2); }
.prof-side { position: sticky; top: calc(var(--head-h) + 16px); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .prof { grid-template-columns: 1fr; } .prof-side { position: static; } }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 200; background: rgba(4,20,16,.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: var(--r-xl); padding: 28px; box-shadow: var(--sh-3); animation: pop .18s ease-out; }
.modal h3 { font-size: 22px; }
.modal .x { float: right; margin: -8px -8px 0 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toasts { position: fixed; z-index: 300; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: var(--sh-3); font-size: 14px; animation: pop .2s; cursor: default; }
.toast.click { cursor: pointer; }
.toast b { display: block; }
.toast .av { --s: 36px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan .amt { font-size: 44px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.plan .amt small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; }
.plan li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px dashed var(--line); font-size: 15px; }
.plan li::before { content: ''; position: absolute; left: 0; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--em-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E6650' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan.best { border: 2px solid var(--gold-500); box-shadow: var(--sh-2); }
.plan .btn { margin-top: auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--em-700); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 0 16px; }

/* ---------- CTA band ---------- */
.band { border-radius: var(--r-xl); padding: 44px; color: #DDEFE6; background: radial-gradient(600px 300px at 100% 0, rgba(212,168,83,.25), transparent 70%), linear-gradient(150deg, var(--em-700), var(--em-950)); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band h2 { color: #fff; margin: 0 0 6px; }
.band p { margin: 0; color: #C3E1D3; }

/* ---------- footer ---------- */
.mk-foot { background: var(--em-950); color: #A9C6BA; padding: 52px 0 28px; margin-top: 24px; font-size: 14px; }
.mk-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.mk-foot h4 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }
.mk-foot ul { list-style: none; padding: 0; margin: 0; }
.mk-foot li { margin: 7px 0; }
.mk-foot a { color: #9fd0ff !important; }
.mk-foot .brand { color: #fff !important; }
.mk-foot .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .mk-foot .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- legacy content pages (guides, surah, city pages) ----------
   They keep main.css for their article layout; these lines bring them onto
   the new palette and type so the whole site reads as one. */
.mk-legacy { --ink-muted: var(--muted); --green-dark: var(--em-800); --green-mid: var(--em-600); --green-light: var(--em-50); --gold: var(--gold-500); --dark: var(--ink); --font-ui: var(--font); --light-bg: var(--cream); }
.mk-legacy .page-hero {
  background: radial-gradient(900px 400px at 85% -10%, rgba(212,168,83,.2), transparent 60%), linear-gradient(160deg, var(--em-800), var(--em-950));
  padding: 64px 0 60px;
}
.mk-legacy .page-hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 48px); }
.mk-legacy .page-hero p { color: #CFE6DB; }
.mk-legacy .prose { font-size: 17px; line-height: 1.75; color: var(--text); }
.mk-legacy .prose h2 { margin-top: 1.4em; }
.mk-legacy .section { padding: 44px 0; }
.mk-legacy .page-hero + .section, .mk-legacy .section + .section { padding-top: 20px; }
.mk-legacy details.faq { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin-bottom: 10px; }
.mk-legacy details.faq summary { font-weight: 700; color: var(--ink); padding: 14px 0; cursor: pointer; }
.mk-legacy .band h2 { color: #fff; }
.mk-legacy main .btn, .mk-legacy article .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; max-width: 100%; }
@media (max-width: 640px) { .mk-legacy table { display: block; width: 100% !important; max-width: 100%; min-width: 0 !important; overflow-x: auto; } }

/* ---------- ads (AdSense) ---------- */
.ad-slot { display: block; margin: 32px auto; text-align: center; min-height: 280px; clear: both; }
.ad-slot::before { content: 'Advertisement'; display: block; font: 600 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.ad-slot.preview { border: 2px dashed #D9D2C2; border-radius: 14px; background: repeating-linear-gradient(45deg, #FBF8F2, #FBF8F2 10px, #F5F1E8 10px, #F5F1E8 20px); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 13px; padding: 12px; }
.ad-slot.preview::before { margin: 0; }
.ad-rail { display: none; }
@media (min-width: 1560px) {
  .ad-rail { display: block; position: fixed; top: calc(var(--head-h) + 24px); width: 160px; min-height: 600px; z-index: 5; }
  .ad-rail.left { left: calc(50% - 590px - 180px); }
  .ad-rail.right { right: calc(50% - 590px - 180px); }
}
