/* Jamia Mahmoodia v86 — contrast repair + premium polish
   Loaded after v84 authority layer. Intentionally uses the root/body authority
   so legacy !important declarations cannot wash out dark-section typography. */

/* ---------- Global readability tokens ---------- */
body#jm-site-root.jm-ui-v86{
  --jm86-deep:#042f28;
  --jm86-deeper:#03261f;
  --jm86-green:#0b5748;
  --jm86-ivory:#fffaf0;
  --jm86-paper:#fbfaf5;
  --jm86-gold:#e7b84f;
  --jm86-gold-soft:#f3cf78;
  --jm86-dark-copy:#526860;
  --jm86-light-copy:#d7e5e0;
  --jm86-line:rgba(13,79,65,.12);
  --jm86-shadow:0 18px 52px rgba(3,43,35,.10);
}

/* ---------- Homepage: Smart Institutional Gateway ---------- */
body#jm-site-root.jm-ui-v86 .jm71-pathfinder{
  position:relative!important;
  isolation:isolate!important;
  background:
    radial-gradient(circle at 92% 8%,rgba(231,184,79,.12),transparent 23%),
    radial-gradient(circle at 8% 100%,rgba(255,255,255,.045),transparent 28%),
    linear-gradient(135deg,#073f35 0%,#04342c 48%,#032a24 100%)!important;
  border-block:1px solid rgba(255,255,255,.055)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-pathfinder:before{
  border-color:rgba(255,255,255,.028)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-pathfinder .jm70-kicker{
  color:var(--jm86-gold-soft)!important;
  opacity:1!important;
  text-shadow:none!important;
}
body#jm-site-root.jm-ui-v86 .jm71-pathfinder h2{
  color:#fffaf1!important;
  text-shadow:0 2px 24px rgba(0,0,0,.12)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-pathfinder h2 span{
  color:var(--jm86-gold-soft)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-pathfinder-copy>p{
  color:var(--jm86-light-copy)!important;
  opacity:1!important;
}
body#jm-site-root.jm-ui-v86 .jm71-site-search{
  border:1px solid rgba(255,255,255,.18)!important;
  background:rgba(255,255,255,.075)!important;
  box-shadow:0 18px 52px rgba(0,0,0,.14)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-site-search>i{color:var(--jm86-gold-soft)!important}
body#jm-site-root.jm-ui-v86 .jm71-site-search input{color:#fff!important}
body#jm-site-root.jm-ui-v86 .jm71-site-search input::placeholder{color:rgba(226,239,234,.66)!important}
body#jm-site-root.jm-ui-v86 .jm71-site-search button{
  background:linear-gradient(135deg,#f2cc70,#dfaa39)!important;
  color:#17382f!important;
  box-shadow:0 8px 22px rgba(223,170,57,.20)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-popular>span{color:rgba(220,235,229,.62)!important}
body#jm-site-root.jm-ui-v86 .jm71-popular>a{
  border-color:rgba(255,255,255,.16)!important;
  background:rgba(255,255,255,.045)!important;
  color:#e8f1ee!important;
}
body#jm-site-root.jm-ui-v86 .jm71-popular>a:hover{
  border-color:rgba(243,207,120,.52)!important;
  background:rgba(243,207,120,.10)!important;
  color:#fff!important;
}

/* v84 turned the gateway cards white while leaving legacy light text behind.
   Keep the premium dark-glass language and explicitly lock every text tier. */
body#jm-site-root.jm-ui-v86 .jm71-path-grid>a{
  min-height:232px!important;
  border:1px solid rgba(255,255,255,.13)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.105),rgba(255,255,255,.045))!important;
  box-shadow:0 18px 48px rgba(0,0,0,.11)!important;
  backdrop-filter:blur(14px)!important;
  -webkit-backdrop-filter:blur(14px)!important;
  color:#fff!important;
}
body#jm-site-root.jm-ui-v86 .jm71-path-grid>a:hover{
  transform:translateY(-4px)!important;
  border-color:rgba(243,207,120,.42)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.145),rgba(255,255,255,.06))!important;
  box-shadow:0 24px 58px rgba(0,0,0,.16)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-path-grid>a>span{
  background:rgba(243,207,120,.13)!important;
  color:var(--jm86-gold-soft)!important;
  box-shadow:inset 0 0 0 1px rgba(243,207,120,.12)!important;
}
body#jm-site-root.jm-ui-v86 .jm71-path-grid small{
  color:#b8cec7!important;
  opacity:1!important;
}
body#jm-site-root.jm-ui-v86 .jm71-path-grid h3{
  color:#fffaf1!important;
  opacity:1!important;
  text-shadow:none!important;
}
body#jm-site-root.jm-ui-v86 .jm71-path-grid p{
  color:#c9d9d4!important;
  opacity:1!important;
}
body#jm-site-root.jm-ui-v86 .jm71-path-grid b{
  color:#f5d580!important;
  opacity:1!important;
}
body#jm-site-root.jm-ui-v86 .jm71-path-grid b i{color:#f5d580!important}

/* Quick access: preserve clean white rail but remove micro-text feel. */
body#jm-site-root.jm-ui-v86 .jm70-command-grid>a small{font-size:8px!important;letter-spacing:.13em!important;color:#a0762b!important}
body#jm-site-root.jm-ui-v86 .jm70-command-grid>a b{font-size:14px!important;line-height:1.2!important;color:#17483d!important}
body#jm-site-root.jm-ui-v86 .jm70-command-grid>a em{font-size:9px!important;line-height:1.45!important;color:#71837d!important}

/* ---------- About Jamia: global section hierarchy ---------- */
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page{
  background:var(--jm86-paper)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page .jm66-section-head:not(.is-dark) h2,
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page .jm66-section-copy h2{
  color:#123f35!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page .jm66-section-head:not(.is-dark)>p,
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page .jm66-section-copy>p{
  color:#60736c!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page .jm66-kicker{
  color:#a5792c!important;
  opacity:1!important;
}

/* About hero polish: stronger readability, calmer glass card. */
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero-shade{
  background:linear-gradient(90deg,rgba(2,31,26,.97),rgba(4,54,45,.87) 51%,rgba(2,31,26,.42))!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero h1{color:#fffaf2!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero-copy>p{color:#d9e6e2!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero .jm66-kicker{color:#f0c866!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero-card{
  border:1px solid rgba(255,255,255,.18)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.07))!important;
  box-shadow:0 22px 68px rgba(0,0,0,.18)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero-card :is(span,b,strong,p,a){color:#fff!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero-card span{color:#f4cf76!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-hero-card p{color:#d4e2dd!important}

/* Foundation + method */
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-foundation{
  background:radial-gradient(circle at 91% 5%,rgba(231,184,79,.10),transparent 28%),#fbfaf5!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-quote{
  border:1px solid rgba(239,199,96,.20)!important;
  background:radial-gradient(circle at 100% 0,rgba(239,199,96,.10),transparent 34%),linear-gradient(145deg,#073e34,#032d27)!important;
  box-shadow:0 24px 64px rgba(3,43,35,.16)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-quote p{color:#fffaf2!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-quote>span,
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-quote>small{color:#c7d9d3!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-method{background:#f3f0e6!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-principle-card{
  border-color:rgba(13,79,65,.11)!important;
  background:linear-gradient(155deg,#fff,#fbfaf6)!important;
  box-shadow:0 12px 34px rgba(3,43,35,.055)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-principle-card:hover{
  border-color:rgba(207,157,54,.32)!important;
  box-shadow:0 22px 54px rgba(3,43,35,.10)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-principle-card h3{color:#163f36!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-principle-card p{color:#647871!important}

/* ---------- Critical fix: Scholarly Continuity dark section ---------- */
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage{
  position:relative!important;
  isolation:isolate!important;
  color:#fff!important;
  background:
    radial-gradient(circle at 88% 8%,rgba(239,199,96,.115),transparent 25%),
    linear-gradient(135deg,#053b32 0%,#032e27 56%,#02251f 100%)!important;
  border-block:1px solid rgba(255,255,255,.05)!important;
  overflow:hidden!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage:before{
  content:""!important;
  position:absolute!important;
  width:520px!important;
  height:520px!important;
  right:-210px!important;
  top:-250px!important;
  border:90px solid rgba(255,255,255,.025)!important;
  border-radius:50%!important;
  pointer-events:none!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage .jm66-section-head.is-dark h2{
  color:#fffaf1!important;
  opacity:1!important;
  text-shadow:none!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage .jm66-section-head.is-dark>p{
  color:#d4e3de!important;
  opacity:1!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage .jm66-kicker{
  color:var(--jm86-gold-soft)!important;
  opacity:1!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track{
  position:relative!important;
  z-index:1!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  overflow:visible!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track>article{
  min-height:170px!important;
  padding:24px!important;
  border:1px solid rgba(255,255,255,.13)!important;
  border-radius:20px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.095),rgba(255,255,255,.045))!important;
  box-shadow:0 15px 38px rgba(0,0,0,.09)!important;
  transition:transform .22s ease,border-color .22s ease,background .22s ease!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track>article:hover{
  transform:translateY(-4px)!important;
  border-color:rgba(243,207,120,.36)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.055))!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track>article>b{
  display:inline-grid!important;
  place-items:center!important;
  width:34px!important;
  height:34px!important;
  margin-bottom:18px!important;
  border-radius:10px!important;
  background:rgba(243,207,120,.12)!important;
  color:#f6d77f!important;
  font-size:10px!important;
  letter-spacing:.08em!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track h3{
  margin:0 0 10px!important;
  color:#fffaf2!important;
  font-family:Newsreader,"Source Serif 4",serif!important;
  font-size:clamp(20px,1.45vw,25px)!important;
  line-height:1.12!important;
  opacity:1!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track p{
  margin:0!important;
  color:#cbdcd6!important;
  font-size:13px!important;
  line-height:1.68!important;
  opacity:1!important;
}

/* Legacy, leadership, objectives */
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-legacy{background:#fff!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-legacy-main{
  border-color:var(--jm86-line)!important;
  background:linear-gradient(145deg,#fff,#fbfaf5)!important;
  box-shadow:var(--jm86-shadow)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-legacy-main h2{color:#123f35!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-legacy-main p{color:#61746d!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-legacy-story{
  border-color:rgba(239,199,96,.15)!important;
  background:radial-gradient(circle at 100% 0,rgba(239,199,96,.10),transparent 36%),linear-gradient(145deg,#0a5949,#053a32)!important;
  box-shadow:0 18px 50px rgba(3,43,35,.13)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-legacy-story :is(span,h2,h3){color:#fffaf2!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-legacy-story p{color:#d2e1dc!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-leadership{background:#f3f0e6!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-leader-grid>article{
  border-color:var(--jm86-line)!important;
  background:#fff!important;
  box-shadow:0 12px 36px rgba(3,43,35,.065)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-leader-grid>article:hover{box-shadow:0 22px 54px rgba(3,43,35,.11)!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-leader-grid h3{color:#143f35!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-leader-grid p{color:#647871!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-objectives{background:#fbfaf5!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-objective-grid article{
  border-color:var(--jm86-line)!important;
  background:linear-gradient(155deg,#fff,#fdfcf8)!important;
  box-shadow:0 10px 30px rgba(3,43,35,.05)!important;
}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-objective-grid h3{color:#153f35!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-objective-grid p{color:#657871!important}

/* Any About-page dark component must keep correct contrast even if a later generic h2/p rule fires. */
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page :is(.jm66-lineage,.jm66-academic-note,.jm66-legacy-story,.jm66-about-quote) :is(h1,h2,h3,h4,strong){color:#fffaf2!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-about-page :is(.jm66-lineage,.jm66-academic-note,.jm66-legacy-story,.jm66-about-quote) p{color:#d2e1dc!important}
body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-academic-note .jm66-kicker{color:#f2cd74!important}

/* ---------- Responsive refinement ---------- */
@media (max-width:1100px){
  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:900px){
  body#jm-site-root.jm-ui-v86 .jm71-pathfinder{padding-block:64px!important}
  body#jm-site-root.jm-ui-v86 .jm71-pathfinder h2{font-size:clamp(35px,10vw,46px)!important;line-height:1.02!important}
  body#jm-site-root.jm-ui-v86 .jm71-path-grid>a{min-height:0!important;padding:21px!important}
  body#jm-site-root.jm-ui-v86 .jm71-path-grid h3{font-size:27px!important}

  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage .jm66-section-head{gap:14px!important}
  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage .jm66-section-head h2{font-size:clamp(36px,9vw,46px)!important;line-height:1.03!important}
  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage .jm66-section-head>p{font-size:14px!important;line-height:1.72!important}
}
@media (max-width:640px){
  body#jm-site-root.jm-ui-v86 .jm71-pathfinder{padding-block:56px!important}
  body#jm-site-root.jm-ui-v86 .jm71-pathfinder-copy>p{font-size:14px!important;line-height:1.72!important}
  body#jm-site-root.jm-ui-v86 .jm71-site-search{margin-top:22px!important}
  body#jm-site-root.jm-ui-v86 .jm71-path-grid>a{border-radius:18px!important}

  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track>article{min-height:0!important;padding:20px!important;border-radius:17px!important}
  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track h3{font-size:23px!important}
  body#jm-site-root.jm-ui-v86:not(.jm-portal-workspace-page) .jm66-lineage-track p{font-size:13.5px!important}
}

/* RTL remains aligned to the active language without changing contrast. */
html[dir="rtl"] body#jm-site-root.jm-ui-v86 .jm71-pathfinder-copy,
html[dir="rtl"] body#jm-site-root.jm-ui-v86 .jm66-about-page{text-align:right!important}
