/* Jamia Mahmoodia Core v64 — final public-page geometry authority.
   This file intentionally loads after every legacy public stylesheet. */

#jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page],
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-section,
#jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero{max-width:100%!important;overflow-x:clip!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-wrap{width:min(1720px,calc(100% - 64px))!important;max-width:none!important;margin-inline:auto!important;padding-inline:0!important}
#jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :where(*, *::before, *::after){box-sizing:border-box}
#jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :where(h1,h2,h3,h4,p,li,a,span,strong,small,em){min-width:0!important}
#jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :where(h1,h2,h3,h4,p){writing-mode:horizontal-tb!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;hyphens:none!important}
#jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] img{max-width:100%!important;height:auto}

/* One consistent hero system for all managed public pages. */
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero,.jm66-departments-hero,.jm66-admissions-hero,.jm66-ifta-hero,.jm66-research-hero,.jm66-khanqah-hero){position:relative!important;isolation:isolate!important;overflow:hidden!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){position:relative!important;z-index:3!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(300px,360px)!important;align-items:center!important;gap:clamp(48px,5vw,86px)!important;width:100%!important;padding-top:0!important;padding-bottom:0!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid)>*{min-width:0!important;max-width:100%!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-copy,.jm66-ifta-copy,.jm66-research-hero-grid>div,.jm66-khanqah-hero-grid>div,.jm66-departments-hero-grid>div,.jm66-admissions-hero-grid>div){width:100%!important;max-width:940px!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero h1,.jm66-departments-hero h1,.jm66-admissions-hero h1,.jm66-ifta-copy h1,.jm66-research-hero h1,.jm66-khanqah-hero h1){display:block!important;width:100%!important;max-width:940px!important;margin:12px 0 22px!important;font-size:clamp(54px,4.6vw,82px)!important;line-height:.98!important;letter-spacing:-.042em!important;text-wrap:balance!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-copy>p,.jm66-departments-hero-grid>div>p,.jm66-admissions-hero-grid>div>p,.jm66-ifta-copy>p,.jm66-research-hero-grid>div>p,.jm66-khanqah-hero-grid>div>p){display:block!important;width:100%!important;max-width:780px!important;margin:0!important;font-size:15px!important;line-height:1.78!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-hero-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important;width:100%!important;margin-top:28px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-hero-actions>a{min-height:50px!important;padding:0 19px!important;border-radius:13px!important;font-size:11px!important;font-weight:800!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-card,.jm66-departments-hero aside,.jm66-admission-trust,.jm66-ifta-seal,.jm66-research-hero aside,.jm66-khanqah-hero aside){width:100%!important;min-width:0!important;max-width:360px!important;margin:0!important;padding:28px!important;border-radius:24px!important}

/* About: fix invisible photo and narrow lead paragraph. */
#jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero{min-height:650px!important;padding:84px 0!important;background:#073f35!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-bg{position:absolute!important;inset:0!important;z-index:0!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center 48%!important;opacity:.72!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-shade{position:absolute!important;inset:0!important;z-index:1!important;background:linear-gradient(90deg,rgba(2,35,29,.97) 0%,rgba(3,52,43,.88) 48%,rgba(3,42,35,.38) 100%)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero h1{color:#fff!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-copy>p{color:rgba(255,255,255,.82)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-brand-pair{max-width:100%!important}

/* Departments: hard contrast reset; no more white heading on cream. */
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero{min-height:0!important;height:auto!important;padding:92px 0 84px!important;background:radial-gradient(circle at 86% 8%,rgba(216,170,80,.18),transparent 28%),linear-gradient(145deg,#fffdfa 0%,#f3efe4 100%)!important;border-bottom:1px solid rgba(8,74,60,.12)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero h1{color:#143f35!important;text-shadow:none!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero-grid>div>p{color:#5d736b!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero .jm66-kicker{color:#a37420!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero aside{max-width:360px!important;border:1px solid rgba(8,74,60,.12)!important;background:rgba(255,255,255,.94)!important;box-shadow:0 22px 62px rgba(4,48,40,.11)!important;color:#173f35!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero aside :where(b,span,p){color:#173f35!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero aside>div{padding:8px 0!important;border-bottom:1px solid rgba(8,74,60,.09)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero aside>div:last-child{border-bottom:0!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero aside b{font-size:28px!important;line-height:1!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero aside span{font-size:11px!important;color:#677b74!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model{padding:0 0 18px!important;background:#f6f3ea!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model .jm-core-wrap{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;transform:translateY(-20px)!important;border:1px solid rgba(8,74,60,.11)!important;border-radius:20px!important;background:#fff!important;overflow:hidden!important;box-shadow:0 18px 50px rgba(4,48,40,.09)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model article{min-height:92px!important;padding:18px 22px!important;display:flex!important;align-items:center!important;gap:14px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model b{font-size:11px!important;line-height:1.2!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model small{display:block!important;margin-top:4px!important;font-size:10px!important;line-height:1.45!important;color:#6d7f79!important}

/* Shared sections/cards. */
#jm-site-root:not(.jm-portal-workspace-page) .jm66-section{padding:88px 0!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,430px)!important;align-items:end!important;gap:48px!important;margin-bottom:34px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head h2{max-width:900px!important;margin:8px 0 0!important;font-size:clamp(42px,3.6vw,62px)!important;line-height:1.02!important;letter-spacing:-.035em!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head>p{max-width:430px!important;margin:0!important;font-size:14px!important;line-height:1.75!important;color:#687b74!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-principle-grid,.jm66-department-grid,.jm66-signature-grid,.jm66-category-grid,.jm66-research-area-grid,.jm66-khanqah-pillars,.jm66-objective-grid,.jm66-leader-grid,.jm66-fatwa-grid){gap:16px!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-principle-card,.jm66-department-card,.jm66-objective-grid article,.jm66-research-area-grid article,.jm66-khanqah-pillars article,.jm66-fatwa-card){border-radius:22px!important;box-shadow:0 10px 34px rgba(4,48,40,.055)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card{min-height:330px!important;padding:24px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card h3{font-size:26px!important;line-height:1.08!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card p{font-size:12.5px!important;line-height:1.72!important}

/* Standard/core content should never become microscopic. */
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm-core-prose,.jm-core-card,.jm-info-card,.jm-standard-content){font-size:15px!important;line-height:1.82!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(.jm-core-prose,.jm-standard-content) p{font-size:15px!important;line-height:1.82!important}
#jm-site-root:not(.jm-portal-workspace-page) :where(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:15px!important}

@media(min-width:2000px){
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-wrap{width:min(2120px,calc(100% - 140px))!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){grid-template-columns:minmax(0,1fr) 400px!important;gap:100px!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero h1,.jm66-departments-hero h1,.jm66-admissions-hero h1,.jm66-ifta-copy h1,.jm66-research-hero h1,.jm66-khanqah-hero h1){font-size:clamp(72px,3.2vw,96px)!important;max-width:1060px!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-copy>p,.jm66-departments-hero-grid>div>p,.jm66-admissions-hero-grid>div>p,.jm66-ifta-copy>p,.jm66-research-hero-grid>div>p,.jm66-khanqah-hero-grid>div>p){font-size:17px!important;max-width:900px!important}
}

@media(max-width:1180px){
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-wrap{width:min(100% - 40px,1040px)!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){grid-template-columns:minmax(0,1fr)!important;gap:28px!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-card,.jm66-departments-hero aside,.jm66-admission-trust,.jm66-ifta-seal,.jm66-research-hero aside,.jm66-khanqah-hero aside){max-width:620px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:767px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-wrap{width:calc(100% - 28px)!important;max-width:100%!important;margin-inline:auto!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page]{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :where(h1,h2,h3,h4,p){max-width:100%!important}

  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero,.jm66-departments-hero,.jm66-admissions-hero,.jm66-ifta-hero,.jm66-research-hero,.jm66-khanqah-hero){min-height:0!important;height:auto!important;padding:44px 0!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:22px!important;width:100%!important;padding:0!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid)>*{display:block!important;flex:0 0 auto!important;width:100%!important;min-width:0!important;max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-copy,.jm66-ifta-copy,.jm66-research-hero-grid>div,.jm66-khanqah-hero-grid>div,.jm66-departments-hero-grid>div,.jm66-admissions-hero-grid>div){width:100%!important;max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero h1,.jm66-departments-hero h1,.jm66-admissions-hero h1,.jm66-ifta-copy h1,.jm66-research-hero h1,.jm66-khanqah-hero h1){display:block!important;width:100%!important;max-width:100%!important;margin:9px 0 15px!important;font-size:clamp(34px,10.4vw,43px)!important;line-height:1.04!important;letter-spacing:-.03em!important;text-wrap:pretty!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-copy>p,.jm66-departments-hero-grid>div>p,.jm66-admissions-hero-grid>div>p,.jm66-ifta-copy>p,.jm66-research-hero-grid>div>p,.jm66-khanqah-hero-grid>div>p){display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;font-size:15px!important;line-height:1.72!important;writing-mode:horizontal-tb!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;columns:auto!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-brand-pair{display:flex!important;width:max-content!important;max-width:100%!important;margin:0 0 17px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;margin-top:22px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-hero-actions>a{width:100%!important;min-height:49px!important;font-size:11px!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero-card,.jm66-departments-hero aside,.jm66-admission-trust,.jm66-ifta-seal,.jm66-research-hero aside,.jm66-khanqah-hero aside){position:relative!important;inset:auto!important;width:100%!important;max-width:100%!important;padding:20px!important;border-radius:18px!important}

  #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero{padding:42px 0 48px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-bg{z-index:0!important;opacity:.48!important;object-position:62% center!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-shade{z-index:1!important;background:linear-gradient(180deg,rgba(2,42,35,.90),rgba(2,45,37,.97))!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-grid{z-index:3!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero h1{font-size:clamp(36px,10.8vw,44px)!important;line-height:1.07!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-copy>p{color:rgba(255,255,255,.84)!important}

  #jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero{padding:48px 0 54px!important;background:linear-gradient(145deg,#fffdfa,#f4f0e6)!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero h1{color:#143f35!important;font-size:clamp(35px,10.5vw,43px)!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-departments-hero aside{background:#fff!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model{padding:14px 0 28px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model .jm-core-wrap{display:grid!important;grid-template-columns:1fr!important;transform:none!important;border-radius:18px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model article{min-height:0!important;padding:16px!important;border-bottom:1px solid rgba(8,74,60,.09)!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-model article:last-child{border-bottom:0!important}

  #jm-site-root:not(.jm-portal-workspace-page) .jm66-section{padding:58px 0!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head{display:block!important;margin-bottom:24px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head h2{font-size:clamp(31px,8.8vw,39px)!important;line-height:1.08!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head>p{max-width:100%!important;margin-top:12px!important;font-size:14px!important;line-height:1.72!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-principle-grid,.jm66-department-grid,.jm66-signature-grid,.jm66-category-grid,.jm66-research-area-grid,.jm66-service-card-grid,.jm66-khanqah-pillars,.jm66-objective-grid,.jm66-leader-grid,.jm66-lineage-track,.jm66-fatwa-grid,.jm66-foundation-grid,.jm66-legacy-grid,.jm66-academic-note-grid,.jm66-admission-layout,.jm66-khanqah-journey-grid,.jm66-research-steps){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-principle-card,.jm66-department-card,.jm66-fatwa-card,.jm66-objective-grid article,.jm66-research-area-grid article,.jm66-khanqah-pillars article,.jm66-leader-grid article){min-height:0!important;padding:19px!important;border-radius:18px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card{min-height:0!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card h3{font-size:24px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card p{font-size:14px!important}

  #jm-site-root:not(.jm-portal-workspace-page) .jm66-page-jump{position:relative!important;top:auto!important;overflow-x:auto!important;scrollbar-width:none!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-page-jump::-webkit-scrollbar{display:none!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-page-jump .jm-core-wrap{width:max-content!important;min-width:100%!important;padding-inline:14px!important;gap:5px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-page-jump a{white-space:nowrap!important;font-size:10px!important}

  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-admission-form,.jm-core-form,.jm-standard-content,.jm-info-card,.jm-core-card){max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-admission-form input:not([type=checkbox]):not([type=radio]),.jm66-admission-form select,.jm66-admission-form textarea,.jm-core-form input:not([type=checkbox]):not([type=radio]),.jm-core-form select,.jm-core-form textarea){width:100%!important;min-width:0!important;font-size:16px!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(table){max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm-core-prose,.jm-standard-content,.jm-info-card,.jm-core-card) table{display:block!important;width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
}

@media(max-width:390px){
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-wrap{width:calc(100% - 22px)!important}
  #jm-site-root:not(.jm-portal-workspace-page) :where(.jm66-about-hero h1,.jm66-departments-hero h1,.jm66-admissions-hero h1,.jm66-ifta-copy h1,.jm66-research-hero h1,.jm66-khanqah-hero h1){font-size:35px!important;line-height:1.08!important}
}

html[dir="rtl"] #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page]{text-align:right!important}
html[dir="rtl"] #jm-site-root:not(.jm-portal-workspace-page) .jm66-hero-actions{justify-content:flex-start!important}

/* ===== v64 hard cascade lock: the root ID intentionally outranks every legacy class-only rule. ===== */
#jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero{
  padding:84px 0 76px!important;
  background:radial-gradient(circle at 86% 8%,rgba(216,170,80,.16),transparent 26%),linear-gradient(135deg,#063d33,#0a5b4a)!important;
}
#jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero .jm-core-wrap{width:min(1720px,calc(100% - 64px))!important;max-width:none!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero> .jm-core-wrap>span{font-size:9px!important;line-height:1.35!important;letter-spacing:.17em!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero h1{max-width:1080px!important;margin:12px 0 18px!important;font-size:clamp(54px,4.7vw,86px)!important;line-height:.98!important;letter-spacing:-.038em!important;color:#fff!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero p{max-width:840px!important;margin:0!important;font-size:16px!important;line-height:1.78!important;color:rgba(255,255,255,.78)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-section{padding:82px 0!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-card{min-height:0!important;border-radius:20px!important;box-shadow:0 10px 34px rgba(4,48,40,.06)!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-card>div{padding:24px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-card h2{font-size:27px!important;line-height:1.08!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-card p,
#jm-site-root:not(.jm-portal-workspace-page) .jm-info-card p{font-size:14px!important;line-height:1.75!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-info-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-info-card{padding:26px!important;border-radius:20px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-info-card h2{font-size:25px!important;line-height:1.1!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-form{padding:28px!important;border-radius:20px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-form label{font-size:12px!important}
#jm-site-root:not(.jm-portal-workspace-page) .jm-core-form :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:15px!important;min-height:49px!important}

/* Public catalogue / library / donation / contact / prospectus grids share one readable desktop rhythm. */
#jm-site-root:not(.jm-portal-workspace-page) :is(.jm-program-grid-v53,.jm-library-grid,.jm-contact-cards,.jm-donation-methods,.jm-prospectus-features,.jm-gallery-premium-grid){gap:16px!important}
#jm-site-root:not(.jm-portal-workspace-page) :is(.jm-program-card-v53,.jm-book-card,.jm-contact-card,.jm-prospectus-card){min-width:0!important;border-radius:20px!important;box-shadow:0 10px 34px rgba(4,48,40,.055)!important}
#jm-site-root:not(.jm-portal-workspace-page) :is(.jm-program-card-v53,.jm-book-card,.jm-contact-card,.jm-prospectus-card) p{font-size:14px!important;line-height:1.72!important}

@media(min-width:2000px){
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-wrap,
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm-core-wrap,
  #jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero .jm-core-wrap{width:min(2500px,calc(100% - 200px))!important;max-width:none!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :is(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){grid-template-columns:minmax(0,1fr) 440px!important;gap:130px!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :is(.jm66-about-hero h1,.jm66-departments-hero h1,.jm66-admissions-hero h1,.jm66-ifta-copy h1,.jm66-research-hero h1,.jm66-khanqah-hero h1){font-size:104px!important;max-width:1200px!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :is(.jm66-about-hero-copy>p,.jm66-departments-hero-grid>div>p,.jm66-admissions-hero-grid>div>p,.jm66-ifta-copy>p,.jm66-research-hero-grid>div>p,.jm66-khanqah-hero-grid>div>p){font-size:18px!important;max-width:1000px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head h2{font-size:70px!important;max-width:1080px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-section-head>p{font-size:16px!important;max-width:520px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card{min-height:360px!important;padding:30px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card h3{font-size:30px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm66-department-card p{font-size:14.5px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero h1{font-size:100px!important;max-width:1300px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero p{font-size:18px!important;max-width:1000px!important}
}

@media(max-width:767px){
  /* Exact selectors + page attribute: stronger than the tablet 2-column rules above. */
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :is(.jm66-principle-grid,.jm66-department-grid,.jm66-signature-grid,.jm66-category-grid,.jm66-research-area-grid,.jm66-service-card-grid,.jm66-khanqah-pillars,.jm66-objective-grid,.jm66-leader-grid,.jm66-lineage-track,.jm66-fatwa-grid,.jm66-foundation-grid,.jm66-legacy-grid,.jm66-academic-note-grid,.jm66-admission-layout,.jm66-khanqah-journey-grid,.jm66-research-steps,.jm66-research-paths,.jm66-ifta-services,.jm66-ifta-steps,.jm66-admission-next-grid){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-department-grid{grid-template-columns:minmax(0,1fr)!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-department-card{width:100%!important;min-width:0!important;padding:20px!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-department-card h3{font-size:25px!important;overflow-wrap:normal!important;word-break:normal!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-department-card p{font-size:14px!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] :is(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){display:flex!important;flex-direction:column!important;grid-template-columns:none!important}

  #jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero{padding:48px 0 44px!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero .jm-core-wrap{width:calc(100% - 28px)!important;max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero h1{font-size:clamp(36px,10.5vw,44px)!important;line-height:1.04!important;max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-page-hero p{font-size:15px!important;line-height:1.72!important;max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-section{padding:56px 0!important}

  #jm-site-root:not(.jm-portal-workspace-page) :is(.jm-core-grid,.jm-core-split,.jm-core-feature,.jm-core-download,.jm-core-sitemap,.jm-core-dashboard,.jm-info-grid,.jm-contact-main,.jm-contact-cards,.jm-library-overview,.jm-library-grid,.jm-donation-grid,.jm-donation-methods,.jm-prospectus-grid,.jm-prospectus-features,.jm-program-grid-v53,.jm-gallery-premium-grid,.jm-admission-layout,.jm-form-grid){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) :is(.jm-core-card,.jm-info-card,.jm-program-card-v53,.jm-book-card,.jm-prospectus-card){width:100%!important;min-width:0!important;max-width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-card p,
  #jm-site-root:not(.jm-portal-workspace-page) .jm-info-card p,
  #jm-site-root:not(.jm-portal-workspace-page) .jm-program-card-v53 p{font-size:14px!important;line-height:1.72!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-form{padding:20px!important}
  #jm-site-root:not(.jm-portal-workspace-page) :is(.jm-contact-form,.jm66-admission-form,.jm-core-form){width:100%!important;max-width:100%!important;min-width:0!important}
  #jm-site-root:not(.jm-portal-workspace-page) :is(.jm-contact-form,.jm66-admission-form,.jm-core-form) :is(input:not([type=checkbox]):not([type=radio]),select,textarea,button){max-width:100%!important;min-width:0!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-gallery{display:grid!important;grid-template-columns:1fr!important}
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-gallery img,
  #jm-site-root:not(.jm-portal-workspace-page) .jm-core-gallery img:first-child{height:auto!important;aspect-ratio:4/3!important;grid-row:auto!important;object-fit:cover!important}
}

@media(max-width:767px){
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-ifta-trust{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-ifta-search form{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-ifta-search :is(input,select,button){width:100%!important;min-width:0!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-research-paths .jm-core-wrap{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;transform:none!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-khanqah-photo-stack{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-khanqah-photo-stack figure{width:100%!important;min-width:0!important;margin:0!important}
  #jm-site-root:not(.jm-portal-workspace-page) [data-jm-premium-page] .jm66-khanqah-photo-stack img{width:100%!important;height:auto!important;aspect-ratio:4/3!important;object-fit:cover!important}
}

/* v65 final public hardening. Theme v84 provides the visual authority; these rules
   make the plugin independently safe on narrow screens and prevent fixed-width regressions. */
body#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-admission-layout,.jm-contact-main,.jm-library-overview,.jm-donation-grid,.jm-core-split,.jm-core-feature){min-width:0!important}
body#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-admission-form,.jm-contact-form,.jm-core-form) *{max-width:100%}
body#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-admission-form,.jm-contact-form,.jm-core-form) :is(input,select,textarea){box-sizing:border-box!important}
@media(max-width:900px){
 body#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){display:flex!important;flex-direction:column!important;width:100%!important;max-width:100%!important;grid-template-columns:none!important}
 body#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-about-hero-copy,.jm66-departments-hero-grid>div,.jm66-admissions-hero-grid>div,.jm66-ifta-copy,.jm66-research-hero-grid>div,.jm66-khanqah-hero-grid>div){width:100%!important;max-width:100%!important;min-width:0!important}
 body#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-about-hero h1,.jm66-departments-hero h1,.jm66-admissions-hero h1,.jm66-ifta-copy h1,.jm66-research-hero h1,.jm66-khanqah-hero h1){width:100%!important;max-width:100%!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;writing-mode:horizontal-tb!important}
 body#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-department-grid,.jm66-principle-grid,.jm66-signature-grid,.jm66-category-grid,.jm66-research-area-grid,.jm66-khanqah-pillars,.jm66-fatwa-grid,.jm-core-grid,.jm-info-grid,.jm-program-grid-v53,.jm-library-grid,.jm-contact-cards,.jm-donation-methods,.jm-prospectus-grid,.jm-form-grid){grid-template-columns:minmax(0,1fr)!important}
}

/* v65.1 structural hardening: prevent legacy flex rules from consuming the About text column. */
#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-about-hero,.jm66-departments-hero,.jm66-admissions-hero,.jm66-ifta-hero,.jm66-research-hero,.jm66-khanqah-hero){display:block!important}
#jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-about-hero-grid,.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){margin-left:auto!important;margin-right:auto!important}
@media(max-width:900px){
 #jm-site-root:not(.jm-portal-workspace-page) :is(.jm66-departments-hero-grid,.jm66-admissions-hero-grid,.jm66-ifta-hero-grid,.jm66-research-hero-grid,.jm66-khanqah-hero-grid){width:calc(100% - 28px)!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important}
 #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero{display:block!important;min-height:0!important;height:auto!important;padding:0!important}
 #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-bg{position:relative!important;inset:auto!important;display:block!important;flex:none!important;width:100%!important;max-width:none!important;height:245px!important;opacity:1!important}
 #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-shade{display:none!important}
 #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-grid{position:relative!important;display:block!important;flex:none!important;width:calc(100% - 28px)!important;max-width:none!important;min-width:0!important;margin:0 auto!important;padding:28px 0 34px!important}
 #jm-site-root:not(.jm-portal-workspace-page) .jm66-about-hero-copy{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important}
}
