/* ══════════════════════════════════════════════════════════════
   Page Styles — Rawdhatul Ilm Wal Huda
   Styles for the content pages whose HTML lives in pages/*.html
   and is pasted into WordPress.

   Kept in the theme rather than in inline <style> blocks on purpose:
   re-saving a page in the WordPress visual editor inserts <br /> tags
   into inline <style> blocks and silently breaks their CSS.
   ══════════════════════════════════════════════════════════════ */

/* ── Index cards (the About Us / homepage card language) ── */
.jm-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.jm-index-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jm-index-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.jm-index-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(31, 45, 48, 0.06);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.jm-index-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 138, 136, 0.3);
  box-shadow: 0 22px 48px rgba(31, 45, 48, 0.1);
}
.jm-index-card > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.jm-index-num {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.75rem;
  line-height: 0.9;
  font-weight: 800;
  color: rgba(45, 138, 136, 0.22);
  margin-bottom: 14px;
  transition: transform 0.25s ease, color 0.25s ease;
}
.jm-index-card:hover .jm-index-num {
  transform: translateY(-4px);
  color: rgba(45, 138, 136, 0.38);
}
.jm-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.jm-index-card h3,
.jm-index-card h4 {
  position: relative;
  margin: 0 0 10px;
  color: var(--foreground);
  font-size: 1.14rem;
  line-height: 1.28;
}
.jm-index-card h3::after,
.jm-index-card h4::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: var(--primary);
  margin-top: 10px;
  transition: width 0.25s ease;
}
.jm-index-card:hover h3::after,
.jm-index-card:hover h4::after { width: 54px; }
.jm-index-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}
.jm-index-card p + p { margin-top: 10px; }
.jm-index-card strong { color: var(--foreground); }
.jm-index-card a:not(.text-link-btn) {
  color: var(--foreground);
  font-weight: 600;
  border-bottom: 1px solid rgba(45, 138, 136, 0.4);
}
.jm-index-card a:not(.text-link-btn):hover { color: var(--gold-deep); }
.jm-index-card ul,
.jm-index-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}
.jm-index-card ul { list-style: disc; }
.jm-index-card ol { list-style: decimal; }
.jm-index-card li + li { margin-top: 6px; }
.jm-index-card .text-link-btn {
  margin-top: auto;
  padding-top: 18px;
}
.jm-index-card--center { text-align: center; }
.jm-index-card--center > div { align-items: center; }
.jm-index-card--center h3::after { margin-left: auto; margin-right: auto; }
.jm-index-card .gold-rule-table { box-shadow: none; }

/* ── Story panel ── */
.jm-story-panel {
  background:
    radial-gradient(circle at top left, rgba(45, 138, 136, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 20px;
  padding: 34px;
  box-shadow: 0 20px 46px rgba(31, 45, 48, 0.07);
}
.jm-story-panel--compact { padding: 26px 28px; }
.jm-story-panel + .jm-story-panel { margin-top: 28px; }
.jm-story-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.jm-story-head:last-child { margin-bottom: 0; }
.jm-story-head > div { min-width: 0; }
.jm-story-head h2,
.jm-story-head h3 {
  font-size: 1.55rem;
  margin: 0 0 10px;
}
.jm-story-head p {
  color: var(--muted);
  margin: 0;
}
.jm-story-head p + p { margin-top: 10px; }
.jm-story-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(45, 138, 136, 0.24);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.jm-story-chip a { color: var(--foreground); margin-left: 6px; }
.jm-story-panel > p { color: var(--muted); margin: 0; }
.jm-story-panel > p + p { margin-top: 12px; }
.jm-story-panel > ol,
.jm-story-panel > ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}
.jm-story-panel > ol { list-style: decimal; }
.jm-story-panel > ul { list-style: disc; }
.jm-story-panel li + li { margin-top: 6px; }
.jm-story-block + .jm-story-block { margin-top: 26px; }
.jm-story-block > p { color: var(--muted); margin: 0; }
.jm-story-panel .jm-index-card {
  box-shadow: 0 10px 24px rgba(31, 45, 48, 0.05);
}

/* ── Stats ── */
.jm-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.jm-stat {
  background: #fff;
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 18px;
  padding: 26px 24px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(31, 45, 48, 0.06);
}
.jm-stat-value {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-deep);
}
.jm-stat-label {
  display: block;
  margin-top: 10px;
  color: var(--foreground);
  font-weight: 600;
  font-size: 0.98rem;
}
.jm-stat-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Pills ── */
.jm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.jm-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(45, 138, 136, 0.3);
  color: var(--foreground);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Rows (a divided list inside a panel) ── */
.jm-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}
.jm-rows--1 { grid-template-columns: minmax(0, 1fr); }
.jm-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(31, 45, 48, 0.08);
}
.jm-row h4 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--foreground);
}
.jm-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.jm-row a { color: var(--foreground); font-weight: 600; }
.jm-row a:hover { color: var(--gold-deep); }

/* ── Verse band ── */
.jm-verse-band {
  background: var(--primary);
  padding: 48px 24px;
  text-align: center;
}
.jm-verse-band .vb-arabic {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  color: #fff;
  direction: rtl;
  line-height: 2;
  max-width: 860px;
  margin: 0 auto 20px;
}
.jm-verse-band .vb-translation {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
  max-width: 640px;
  margin: 0 auto 16px;
  line-height: 1.8;
}
.jm-verse-band .vb-ref {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(253, 235, 210, 0.8);
}

/* ── Quote band (dark band for a non-Arabic quotation) ── */
.jm-verse-band--quote { padding: 64px 24px; }
.jm-verse-band .vb-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.45;
  color: #ffffff;
  max-width: 820px;
  margin: 0 auto 18px;
}

/* ── Tinted card heads (the homepage panel tints) ── */
.jm-card-head {
  flex: 0 0 auto;
  margin: -28px -28px 20px;
  padding: 22px 28px 18px;
  border-radius: 18px 18px 0 0;
  border-bottom: 1px solid rgba(31, 45, 48, 0.06);
}
.jm-card-head .jm-kicker { margin-bottom: 6px; }
.jm-card-head h3 { margin: 0; }
.jm-card-head h3::after { display: none; }
.jm-tint-gold { background: rgba(45, 138, 136, 0.10); }
.jm-tint-copper { background: rgba(183, 146, 90, 0.13); }
.jm-tint-umber { background: rgba(88, 64, 42, 0.09); }

/* ── Ledger: numbered hairline rows ── */
.jm-ledger { display: grid; }
.jm-ledger-row > p:empty,
.jm-ledger-row > br,
.jm-media-split > p:empty,
.jm-media-split > br,
.jm-story-head > p:empty,
.isnad-row > p:empty,
.juz-stage > p:empty,
.ks-stage > p:empty,
.remit-row > p:empty,
.week > p:empty,
.contact-dir > p:empty { display: none; }
.jm-ledger-num { grid-column: 1; grid-row: 1; }
.jm-ledger-row > div { grid-column: 2; grid-row: 1; }
.jm-ledger-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0 18px;
  padding: 20px 0;
  border-top: 1px solid rgba(31, 45, 48, 0.1);
}
.jm-ledger-row:first-child { border-top: 0; padding-top: 0; }
.jm-ledger-row:last-child { padding-bottom: 0; }
.jm-ledger-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(45, 138, 136, 0.38);
  transition: color 0.25s ease;
}
.jm-ledger-row:hover .jm-ledger-num { color: var(--gold); }
.jm-ledger-row h4 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--foreground);
}
.jm-ledger-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ── Media split: sticky photo beside a long list ── */
.jm-media-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: start;
}
.jm-media-split--reverse { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); }
.jm-media-split--reverse .jm-media-photo { order: 2; }
.jm-media-photo {
  position: sticky;
  top: 110px;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 22px 46px rgba(31, 45, 48, 0.14);
}
.jm-media-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jm-media-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 22px;
  background: linear-gradient(to top, rgba(31, 45, 48, 0.72), rgba(31, 45, 48, 0));
  color: #ffffff;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ── Photo strip ── */
.jm-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.jm-photo-strip figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: 0 16px 36px rgba(31, 45, 48, 0.1);
}
.jm-photo-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.jm-photo-strip figure:hover img { transform: scale(1.04); }

/* ── Small helpers ── */
.jm-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
}
.jm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.jm-center { text-align: center; }
.jm-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 720px;
  margin: 24px auto 0;
}
.jm-note strong { color: var(--foreground); }
.jm-quote {
  border: 0;
  padding: 0;
  margin: 24px auto 0;
  max-width: 820px;
  font-family: 'Crimson Pro', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--gold-deep);
  text-align: center;
}

/* ── Verse / hadith takeovers (Aalimiyah, Hifdh) ── */
.takeover-continue {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 36px;
  padding: 0 36px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.takeover-continue::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.takeover-continue:hover::before { transform: translateX(0); }

.aalim-takeover {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  text-align: center;
  transition: opacity 0.8s ease;
}
.aalim-takeover .takeover-arabic {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  color: var(--primary);
  direction: rtl;
  line-height: 2;
  padding: 0 32px;
  max-width: 880px;
  transition: opacity 1s ease;
}
.aalim-takeover .takeover-translation {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
  max-width: 600px;
  padding: 0 32px;
  margin-top: 20px;
  line-height: 1.7;
  transition: opacity 1s ease;
}
.aalim-takeover .takeover-ref {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.9rem;
  color: rgba(45, 138, 136, 0.45);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 28px;
  transition: opacity 1s ease;
}
.aalim-skip {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 6px 8px;
  transition: color 0.2s;
}
.aalim-skip:hover { color: rgba(255, 255, 255, 0.65); }
.aalim-takeover.is-fading .takeover-arabic,
.aalim-takeover.is-fading .takeover-translation,
.aalim-takeover.is-fading .takeover-ref { opacity: 0.15; }
.aalim-takeover.is-dismissed {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.aalim-page-body {
  opacity: 0;
  transform: translateY(36px);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.85s ease;
}
.aalim-page-body.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Contact page ── */
.contact-hero-simple {
  background: linear-gradient(180deg, #f6f9f8, #e6f0ef);
  text-align: center;
  padding: 40px 24px;
}
.contact-hero-simple .section-label { margin-bottom: 12px; }
.contact-hero-simple h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--foreground);
  margin: 0;
}
.contact-page-section { padding: 48px 0 72px; }
.contact-page-section .jm-index-grid { margin-top: 24px; }
.contact-lines {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact-lines li {
  color: var(--foreground);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}
.contact-lines li a { color: inherit; border-bottom: 1px solid rgba(45, 138, 136, 0.4); }
.contact-lines li a:hover { color: var(--gold-deep); }
.contact-lines + .jm-kicker { margin-top: 18px; }

/* ── Apply page ── */
.apply-status-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.apply-status-panel iframe {
  display: block;
  margin: 0 auto;
}

/* ── Ifta page ── */
.ifta-phone-time {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 6px 0 10px;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .jm-index-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .jm-index-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .jm-index-grid,
  .jm-index-grid--3,
  .jm-index-grid--4,
  .jm-rows,
  .jm-media-split,
  .jm-media-split--reverse { grid-template-columns: 1fr; }
  .jm-media-photo { position: static; aspect-ratio: 3 / 2; }
  .jm-media-split--reverse .jm-media-photo { order: 0; }
}
@media (max-width: 640px) {
  .jm-index-card { padding: 22px; }
  .jm-index-card:hover { transform: none; }
  .jm-index-num { font-size: 1.55rem; line-height: 1; }
  .jm-index-card h3,
  .jm-index-card h4 { font-size: 1.12rem; }
  .jm-index-card .text-link-btn { width: 100%; }
  .jm-story-panel { padding: 24px; }
  .jm-story-panel--compact { padding: 22px; }
  .jm-story-head { display: block; }
  .jm-story-head .jm-story-chip { margin-top: 16px; }
  .jm-story-head h2,
  .jm-story-head h3 { font-size: 1.35rem; }
  .jm-stat-value { font-size: 2.2rem; }
  .jm-actions { flex-direction: column; }
  .jm-quote { font-size: 1.1rem; }
  .jm-card-head { margin: -22px -22px 18px; padding: 18px 22px 16px; }
  .jm-ledger-row { grid-template-columns: 44px minmax(0, 1fr); gap: 0 12px; }
  .jm-ledger-num { font-size: 1.4rem; }
  .jm-photo-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .jm-index-card,
  .jm-index-num,
  .jm-index-card h3::after,
  .jm-index-card h4::after,
  .takeover-continue,
  .takeover-continue::before { transition: none; }
  .jm-index-card:hover,
  .jm-index-card:hover .jm-index-num { transform: none; }
  .jm-photo-strip img { transition: none; }
  .aalim-takeover { display: none !important; }
  .aalim-page-body { transform: none; opacity: 1; transition: none; }
}

/* ══════════════════════════════════════════════════════════════
   Page-specific devices
   ══════════════════════════════════════════════════════════════ */

/* ── Dark band (Rawdha, key figures) ── */
.jm-dark-band {
  background: var(--primary);
  color: #ffffff;
  padding: 56px 24px;
}
.jm-dark-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.jm-dark-band .jm-kicker { color: #fdebd2; }
.jm-dark-band h2 {
  color: #fff;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin: 0 0 12px;
}
.jm-dark-band p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  max-width: 640px;
}
.jm-dark-band .btn-primary { flex-shrink: 0; border-color: #fff !important; color: #fff !important; }
.jm-dark-band .btn-primary::before { background: #fff; }
.jm-dark-band .btn-primary:hover { color: var(--primary) !important; }

/* ── Student Life: day timeline ── */
.dt {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: 0 20px 46px rgba(31, 45, 48, 0.07);
}
.dt-grid {
  display: grid;
  grid-template-columns: 58px repeat(3, minmax(0, 1fr));
  grid-template-rows: auto repeat(180, 6px);
  column-gap: 12px;
}
.dt-track { display: contents; }
.dt-track-title {
  grid-row: 1;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
}
.dt-track-title small {
  display: block;
  margin-top: 2px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}
.dt-hour {
  grid-column: 1;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1;
  padding-top: 2px;
  border-top: 1px solid rgba(31, 45, 48, 0.1);
}
.dt-lines {
  grid-row: 2 / 182;
  background: repeating-linear-gradient(to bottom, rgba(31, 45, 48, 0.08) 0 1px, transparent 1px 72px);
  pointer-events: none;
}
.dt-ev {
  position: relative;
  z-index: 1;
  margin: 1px 0;
  padding: 3px 10px;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--foreground);
  background: #fff;
  border: 1px solid rgba(31, 45, 48, 0.12);
}
.dt-ev strong { display: block; font-weight: 600; }
.dt-time {
  display: block;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.dt-ev--madrasah { background: rgba(45, 138, 136, 0.16); border-color: rgba(45, 138, 136, 0.4); }
.dt-ev--school { background: #eef5f4; border-color: rgba(88, 64, 42, 0.2); }
.dt-ev--break { background: #fff; border-style: dashed; color: var(--muted); }
.dt-ev--study { background: #fff; border-color: rgba(45, 138, 136, 0.5); }
.dt-ev--home { background: transparent; border: 0; color: var(--muted); font-style: italic; }
.dt-ev--boarding { background: var(--primary); border-color: transparent; color: #ffffff; }
.dt-ev--boarding .dt-time { color: rgba(255, 255, 255, 0.7); }
.dt-ev--rest { background: transparent; border: 1px dashed rgba(31, 45, 48, 0.16); color: var(--muted); display: flex; align-items: center; justify-content: center; text-align: center; font-style: italic; }
.dt-ev--tiny { padding: 1px 10px; font-size: 0.72rem; }
.dt-ev--tiny strong { font-weight: 600; }
.dt-ev--tiny .dt-time { display: none; }
.dt-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 22px 0 0 70px;
  font-size: 0.82rem;
  color: var(--muted);
}
.dt-key span::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -1px;
  background: #fff;
  border: 1px solid rgba(31, 45, 48, 0.16);
}
.dt-key .k-madrasah::before { background: rgba(45, 138, 136, 0.28); border-color: rgba(45, 138, 136, 0.5); }
.dt-key .k-school::before { background: #dfeaea; border-color: rgba(88, 64, 42, 0.3); }
.dt-key .k-study::before { border-color: rgba(45, 138, 136, 0.7); }
.dt-key .k-boarding::before { background: #2d8a88; border-color: #2d8a88; }

/* ── Student Life: week of clubs ── */
.week {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.6fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 46px rgba(31, 45, 48, 0.07);
}
.week-day {
  padding: 26px 26px 28px;
  border-left: 1px solid rgba(31, 45, 48, 0.08);
}
.week-day:first-child { border-left: 0; }
.week-day h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}
.week-day > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
}
.week-day ul { list-style: none; margin: 0; padding: 0; }
.week-day li {
  padding: 10px 0;
  border-top: 1px solid rgba(31, 45, 48, 0.08);
  font-size: 0.94rem;
  line-height: 1.5;
}
.week-day li strong { display: block; color: var(--foreground); font-weight: 600; }
.week-day li span { color: var(--muted); font-size: 0.88rem; }
.week-day--cols ul { columns: 2; column-gap: 28px; }
.week-day--cols li { break-inside: avoid; }

/* ── Boarding directory ── */
.dir-panel .jm-rows { gap: 0 48px; }
.dir-panel .jm-row h4 { font-size: 1.08rem; }

/* ── School: progression band ── */
.ks-band {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 0 auto 8px;
}
.ks-band-stage {
  grid-row: 1;
  padding: 10px 14px 9px;
  border-radius: 10px 10px 0 0;
  background: var(--primary);
  color: #ffffff;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 0.98rem;
  text-align: center;
}
.ks-band-stage small {
  display: block;
  margin-top: 2px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.74rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
}
.ks-band-stage--ks4 { background: #a07548; color: #ffffff; }
.ks-band-stage--ks4 small { color: rgba(255, 255, 255, 0.62); }
.ks-band-year {
  grid-row: 2;
  padding: 12px 6px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(31, 45, 48, 0.1);
  border-radius: 0 0 8px 8px;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ks-band-year strong {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--foreground);
}
.ks-stages {
  position: relative;
  margin-top: 40px;
}
.ks-stages::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), rgba(45, 138, 136, 0.15));
}
.ks-stage {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  padding: 8px 0 56px 0;
}
.ks-stage:last-child { padding-bottom: 0; }
.ks-stage-marker { padding-left: 56px; position: relative; }
.ks-stage-marker::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 5px rgba(45, 138, 136, 0.14);
}
.ks-stage-marker .jm-kicker { margin-bottom: 4px; }
.ks-stage-marker h3 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  line-height: 1.15;
}
.ks-stage-marker p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.ks-stage-body > p { margin: 0 0 18px; color: var(--muted); }
.ks-stage-body .jm-kicker { margin-top: 22px; }
.ks-stage-body .jm-kicker:first-child { margin-top: 0; }
.ks-stage-body .jm-pills { margin-bottom: 4px; }
.ks-aims { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.ks-aims li {
  break-inside: avoid;
  padding: 8px 0 8px 18px;
  position: relative;
  color: var(--foreground);
  font-size: 0.95rem;
  line-height: 1.5;
}
.ks-aims li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 2px;
  background: var(--primary);
}
.ks-note { margin: 12px 0 0; font-size: 0.9rem; color: var(--muted); font-style: italic; }

/* ── Apply: application windows on the year ── */
.win-cal {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 20px;
  padding: 28px 32px 30px;
  box-shadow: 0 20px 46px rgba(31, 45, 48, 0.07);
}
.win-cal-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 52px 52px;
  row-gap: 10px;
}
.win-month {
  grid-row: 1;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 45, 48, 0.1);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.win-month--sep { border-left: 1px solid rgba(31, 45, 48, 0.1); }
.win-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: #ffffff;
  background: #a07548;
  box-shadow: 0 10px 22px rgba(45, 138, 136, 0.28);
}
.win-bar strong { font-weight: 700; white-space: nowrap; }
.win-bar span { color: rgba(255, 255, 255, 0.72); white-space: nowrap; }
.win-bar--2 {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 45, 48, 0.22);
}
.win-bar--2 span { color: rgba(255, 255, 255, 0.68); }
.win-cal-note {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(31, 45, 48, 0.08);
  color: var(--muted);
  font-size: 0.94rem;
}
.win-cal-note strong { color: var(--foreground); }
.apply-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  gap: 32px;
  align-items: center;
  margin-top: 28px;
}
.apply-status h3 { margin: 0 0 8px; font-size: 1.4rem; }
.apply-status p { margin: 0; color: var(--muted); }
.apply-status iframe { display: block; width: 100%; border-radius: 14px; }

/* ── FAQ list ── */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  border-top: 1px solid rgba(31, 45, 48, 0.12);
}
.faq-list details { border-bottom: 1px solid rgba(31, 45, 48, 0.12); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  cursor: pointer;
  list-style: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--foreground);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(45, 138, 136, 0.5);
  color: var(--gold-deep);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--gold-deep); }
.faq-list details > p {
  margin: 0;
  padding: 0 44px 22px 4px;
  color: var(--muted);
  line-height: 1.7;
}
.faq-list details > p a { color: var(--foreground); font-weight: 600; border-bottom: 1px solid rgba(45, 138, 136, 0.4); }
.faq-list details > p strong { color: var(--foreground); }

/* ── Contact: map with address card ── */
.contact-map {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 54px rgba(31, 45, 48, 0.12);
  border: 1px solid rgba(31, 45, 48, 0.08);
}
.contact-map iframe {
  display: block;
  width: 100%;
  height: 460px;
  border: 0;
  filter: saturate(0.6) sepia(0.15);
}
.contact-map-card {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 360px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(31, 45, 48, 0.14);
}
.contact-map-card h2 { margin: 0 0 10px; font-size: 1.7rem; }
.contact-map-card address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.contact-map-card .contact-lines { margin-bottom: 20px; }
.contact-map-card .jm-actions { margin-top: 0; }
.contact-map-card .btn-primary,
.contact-map-card .btn-secondary { min-height: 44px !important; padding: 0 20px !important; font-size: 0.86rem; }
.contact-dir {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
}
.contact-dir .jm-story-panel--compact .jm-story-head { margin-bottom: 8px; }
.contact-dir .jm-rows--1 .jm-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-lines--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
}

/* ── Achievements: seals ── */
.seal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.seal-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seal-card {
  display: grid;
  justify-items: center;
  align-content: start;
  min-width: 0;
  padding: 30px 24px;
  text-align: center;
  border: 1px solid rgba(45, 138, 136, 0.22);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.72) 100%);
  box-shadow: 0 10px 28px rgba(31, 45, 48, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.seal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 138, 136, 0.42);
  box-shadow: 0 16px 38px rgba(31, 45, 48, 0.1);
}
.seal {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #a07548;
  background: radial-gradient(circle, rgba(45, 138, 136, 0.15), rgba(45, 138, 136, 0.04));
  border: 1px solid rgba(45, 138, 136, 0.28);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.28rem;
  font-weight: 800;
}
.seal-card h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  line-height: 1.25;
  color: var(--foreground);
}
.seal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.68;
}

/* ── Donate: remittance slip ── */
.remit {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(31, 45, 48, 0.12);
  border-radius: 6px;
  box-shadow: 0 20px 46px rgba(31, 45, 48, 0.08);
  text-align: left;
  overflow: hidden;
}
.remit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 28px;
  background: var(--primary);
  color: #ffffff;
}
.remit-head h3 { margin: 0; color: #fff; font-size: 1.3rem; }
.remit-head p { margin: 4px 0 0; color: rgba(255, 255, 255, 0.65); font-size: 0.88rem; }
.remit-head .remit-charity {
  text-align: right;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253, 235, 210, 0.85);
  white-space: nowrap;
}
.remit-body { padding: 8px 28px 10px; }
.remit-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed rgba(31, 45, 48, 0.16);
  align-items: baseline;
}
.remit-row:last-child { border-bottom: 0; }
.remit-row dt {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.remit-row dd { margin: 0; color: var(--foreground); font-weight: 600; font-size: 1.02rem; }
.remit-row dd.mono {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 1.08rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.remit-foot {
  padding: 16px 28px 20px;
  border-top: 2px dashed rgba(31, 45, 48, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.remit-foot a { color: var(--foreground); font-weight: 600; border-bottom: 1px solid rgba(45, 138, 136, 0.4); }
.remit-foot strong { color: var(--foreground); }

/* ── Responsive for page devices ── */
@media (max-width: 1000px) {
  .seal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ks-stage { grid-template-columns: 1fr; gap: 16px; }
  .ks-stage-body { padding-left: 56px; }
  .contact-map-card { position: static; width: auto; border-radius: 0; box-shadow: none; border: 0; border-top: 1px solid rgba(31, 45, 48, 0.08); }
  .contact-map iframe { height: 320px; }
  .apply-status { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .week-day { border-left: 0; border-top: 1px solid rgba(31, 45, 48, 0.08); }
  .week-day:first-child { border-top: 0; }
  .jm-dark-band .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .dt { padding: 20px 18px; }
  .dt-grid { display: block; }
  .dt-hour, .dt-lines { display: none; }
  .dt-track { display: block; }
  .dt-track + .dt-track { margin-top: 26px; }
  .dt-ev { margin: 6px 0 0; padding: 10px 14px; font-size: 0.92rem; }
  .dt-ev--tiny { padding: 10px 14px; font-size: 0.92rem; }
  .dt-ev--tiny .dt-time, .dt-ev .dt-time { display: block; margin-top: 2px; font-size: 0.8rem; }
  .dt-ev--rest { display: none; }
  .dt-key { margin-left: 0; }
  .ks-band { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .ks-band-stage { padding: 8px 4px; font-size: 0.72rem; }
  .ks-band-stage small { display: none; }
  .ks-band-year { padding: 8px 2px; font-size: 0.62rem; letter-spacing: 0; }
  .ks-band-year strong { font-size: 0.95rem; }
  .ks-stages::before { display: none; }
  .ks-stage-marker { padding-left: 0; }
  .ks-stage-marker::before { display: none; }
  .ks-stage-body { padding-left: 0; }
  .ks-aims { columns: 1; }
  .win-cal { padding: 22px 18px; }
  .win-month { font-size: 0.6rem; letter-spacing: 0.02em; }
  .win-bar { padding: 0 10px; font-size: 0.78rem; gap: 6px; }
  .win-bar span { display: none; }
  .seal-grid, .seal-grid--3, .contact-dir, .contact-lines--split { grid-template-columns: 1fr; }
  .remit-row { grid-template-columns: 1fr; gap: 4px; }
  .remit-head { flex-direction: column; }
  .remit-head .remit-charity { text-align: left; }
  .week-day--cols ul { columns: 1; }
  .faq-list summary { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .seal-card, .faq-list summary::after { transition: none; }
  .seal-card:hover { transform: none; }
}

/* ── Course ladder (Aalimiyah): reuses the progression band ── */
.ks-band--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.ks-band-year--optional { background: rgba(255, 255, 255, 0.6); border-style: dashed; }
.ks-band-note {
  grid-row: 3;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(45, 138, 136, 0.1);
  border: 1px solid rgba(45, 138, 136, 0.3);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--foreground);
}
.ks-band-note strong { display: block; font-weight: 700; }

/* ── Isnad chart (Aalimiyah: Imams of Qira'ah and their narrators) ── */
.isnad {
  display: grid;
  gap: 10px;
}
.isnad-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 44px minmax(0, 1fr);
  align-items: stretch;
}
.isnad-imam {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 0.98rem;
}
.isnad-link { position: relative; }
.isnad-link::before {
  content: "";
  position: absolute;
  left: 0;
  width: 50%;
  top: 50%;
  border-top: 1px solid rgba(45, 138, 136, 0.7);
}
.isnad-link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 0;
  top: 25%;
  bottom: 25%;
  border: 1px solid rgba(45, 138, 136, 0.7);
  border-right: 0;
}
.isnad-narrators { display: grid; gap: 6px; }
.isnad-narrators span {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(45, 138, 136, 0.35);
  font-size: 0.92rem;
  color: var(--foreground);
}

/* ── Juz strips (Hifdh) ── */
.juz-stages { display: grid; gap: 18px; }
.juz-stage {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(31, 45, 48, 0.06);
}
.juz-stage h3 { margin: 0 0 4px; font-size: 1.3rem; }
.juz-stage-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
.juz-strip {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 3px;
}
.juz-strip span {
  height: 34px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid rgba(31, 45, 48, 0.14);
}
.juz-strip span.is-done {
  background: #a07548;
  border-color: transparent;
}
.juz-strip span.is-assess {
  background: repeating-linear-gradient(135deg, rgba(45, 138, 136, 0.22) 0 4px, transparent 4px 8px);
  border-color: rgba(45, 138, 136, 0.5);
}
.juz-caption {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.juz-note { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
.juz-note strong { color: var(--foreground); }

/* ── Key figures on a dark band ── */
.dark-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}
.dark-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dark-stat { border-left: 1px solid rgba(255, 255, 255, 0.28); padding-left: 22px; }
.dark-stat-value {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 3.6vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  color: #fdebd2;
}
.dark-stat-label {
  display: block;
  margin-top: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
}
.dark-stat-note {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  line-height: 1.55;
}
.jm-dark-band .dark-stats + * { margin-top: 0; }
.jm-dark-band--figures .container { display: block; }
.jm-dark-band--figures .dark-band-intro { max-width: 640px; margin-bottom: 36px; }

/* ── Bookshelf (Ifta) ── */
.shelf {
  padding: 0 24px;
}
.shelf-books {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  min-height: 250px;
  padding: 0 12px;
  list-style: none;
  margin: 0;
}
.shelf-books li {
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 46px;
  height: 236px;
  padding: 18px 0;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(90deg, rgba(31, 45, 48, 0.08), transparent 30%, transparent 70%, rgba(31, 45, 48, 0.1)), #f6eee6;
  border: 1px solid rgba(31, 45, 48, 0.16);
  border-bottom: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1;
}
.shelf-books li:nth-child(2n) { height: 220px; background-color: #faf6f1; }
.shelf-books li:nth-child(3n) { height: 246px; background-color: #d5e8eb; }
.shelf-books li:nth-child(4n+1) { background-color: #2d8a88; color: #ffffff; border-color: #1f5f5e; }
.shelf-books li:nth-child(5n) { height: 228px; }
.shelf-books li::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}
.shelf-base {
  height: 12px;
  margin-top: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #a07548, #6f4c2d);
  box-shadow: 0 12px 24px rgba(31, 45, 48, 0.18);
}
.shelf-label {
  margin: 18px 0 0;
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--foreground);
}
.shelf-label small {
  display: block;
  margin-top: 4px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.86rem;
  color: var(--muted);
}
.shelves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

@media (max-width: 1000px) {
  .shelves { grid-template-columns: 1fr; }
  .dark-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .juz-stage { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 760px) {
  .isnad-row { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); }
  .isnad-imam { padding: 10px 12px; font-size: 0.88rem; }
  .isnad-narrators span { padding: 6px 10px; font-size: 0.84rem; }
  .juz-strip span { height: 22px; border-radius: 3px; }
  .juz-strip { gap: 2px; }
  .dark-stats, .dark-stats--3 { grid-template-columns: 1fr; gap: 20px; }
  .shelf-books { flex-wrap: wrap; align-items: flex-end; min-height: 0; }
  .shelf-books li { height: 190px !important; width: 40px; font-size: 0.74rem; }
  .ks-band--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .ks-band-note { font-size: 0.78rem; padding: 8px 10px; }
}

/* ── Hifdh verse takeover ── */
.hifdh-takeover {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  transition: opacity 0.8s ease;
}
.hifdh-takeover.is-dismissed { opacity: 0; pointer-events: none; visibility: hidden; }
.hifdh-takeover .verse-arabic {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  color: var(--gold);
  text-align: center; direction: rtl; line-height: 2;
  padding: 0 32px; max-width: 880px;
  transition: opacity 1s ease;
}
.hifdh-takeover .verse-meaning {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.72);
  text-align: center; font-style: italic; max-width: 600px;
  padding: 0 32px; margin-top: 20px; line-height: 1.7;
  transition: opacity 1s ease;
}
.hifdh-takeover .verse-ref {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 0.9rem; color: rgba(196, 149, 106, 0.6);
  letter-spacing: 0.18em; text-transform: uppercase; margin-top: 28px;
  transition: opacity 1s ease;
}
.hifdh-takeover.is-fading .verse-arabic,
.hifdh-takeover.is-fading .verse-meaning,
.hifdh-takeover.is-fading .verse-ref { opacity: 0.15; }
.hifdh-page-body {
  transform: translateY(36px); opacity: 0;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.85s ease;
}
.hifdh-page-body.is-revealed { transform: translateY(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hifdh-takeover { display: none !important; }
  .hifdh-page-body { transform: none; opacity: 1; transition: none; }
}

/* ── Sitemap page ── */
.sitemap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sitemap-section {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 45, 48, 0.08);
  border-radius: 18px;
  padding: 26px 28px;
}
.sitemap-section h2 { font-size: 1.2rem; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); }
.sitemap-section h2 a { color: var(--foreground); }
.sitemap-links { display: grid; gap: 8px; }
.sitemap-links a { color: var(--muted); font-size: 0.96rem; }
.sitemap-links a:hover { color: var(--primary); }
@media (max-width: 900px) { .sitemap-grid { grid-template-columns: 1fr; } }
