/* SAFESTCORE 3.80 | Premium walnut / emerald / antique gold visual system.
   Inspired by the section hierarchy and readable editorial panels of Allah v2.60.
   Additive styling: no content, accessibility labels, or JavaScript modified. */
:root {
  --sc38-wood:url('/sc-home-assets/sc360-walnut.webp');
  --sc38-night:#0a1d19; --sc38-deep:#102820; --sc38-emerald:#143b30;
  --sc38-walnut:#302317; --sc38-gold:#c9a667; --sc38-gold-hi:#eacb8d;
  --sc38-ivory:#fff0d7; --sc38-muted:#e2d3ba; --sc38-on-light:#183e32;
  --sc38-parchment:#f6edda; --sc38-radius:12px;
  --sc38-shadow:0 15px 32px rgba(0,0,0,.23);
}
html{scroll-padding-top:138px}
body,body.dark{
  background:linear-gradient(112deg,rgba(8,28,23,.87),rgba(36,24,16,.80) 51%,rgba(7,33,26,.88)),var(--sc38-wood) center top/cover fixed!important;
  color:var(--sc38-ivory)!important;
}
:where(a,button,summary,input,select,textarea):focus-visible{outline:3px solid var(--sc38-gold-hi)!important;outline-offset:3px!important}
/* Premium links are identified by colour, focus, arrow affordance, and contrast, never underlining. */
a,a:link,a:visited,a:hover,a:focus,a:active,
a *,a:is(:hover,:focus-visible) *{text-decoration:none!important;text-decoration-line:none!important}
body :is(button,a,summary){-webkit-tap-highlight-color:transparent}
body :is(h1,h2,h3,h4,p,li,summary,a){overflow-wrap:break-word}
:where(h1,h2,h3,h4){text-wrap:pretty}

/* 01 | Site identity remains consistent across every section. */
body > header{
  background:linear-gradient(111deg,#091d19fa,#18231dfa 50%,#0b3025fa)!important;
  border-bottom:1px solid rgba(213,177,105,.55)!important;
  box-shadow:0 4px 20px #0005!important;
}
body > header .brand strong,body > footer .brand strong{color:#fff3dc!important}
body > header .brand strong span,body > footer .brand strong span{color:#e6c180!important}
body > header .brand small,body > footer .brand small{color:#dfcda9!important}
body > header nav a,body > header .gateway-menu summary{color:#f6ecda!important}
body > header nav a:is(:hover,:focus-visible),body > header .gateway-menu summary:is(:hover,:focus-visible){background:#2a4438!important;color:#ffe0a6!important}
body > header .preferences :is(summary,button,.sc-search-trigger){border:1px solid #a58b5e!important;color:#f5e8d2!important;background:#1b2c26!important}
body > header .preferences :is(summary,button,.sc-search-trigger):is(:hover,:focus-visible){background:#e9cd92!important;color:#112c25!important}
body > header .gateway-popover,body > header .preferences .popover{background:#102820!important;border:1px solid #ae9464!important;color:#f6eedc!important}
body > header .gateway-popover a,body > header .preferences .popover a{color:#fff1d8!important;text-decoration:none!important}
body > header .gateway-popover a:is(:hover,:focus-visible),body > header .preferences .popover a:is(:hover,:focus-visible){background:#e9cf98!important;color:#13382d!important}
body > header .preferences :is(input,select){background:#faf2e4!important;color:#163b30!important;border:1px solid #ab8953!important}

/* 02 | Section structure: wood is visible; no giant framed card enclosing more framed cards. */
main > .section.wrap,main > section.section.wrap,
main > div.section.wrap,main > .sources.wrap{
  width:min(1300px,calc(100% - clamp(20px,4.5vw,72px)))!important;
  margin-block:clamp(1.6rem,4vw,3.25rem)!important;
  padding:clamp(.9rem,2.0vw,1.45rem)!important;
  background:transparent!important;
  border:0!important;border-radius:0!important;
  box-shadow:none!important;
  color:var(--sc38-ivory)!important;
}
main > .section.wrap::before,main > section.section.wrap::before,main > div.section.wrap::before,main > .sources.wrap::before{display:none!important;content:none!important}
main .section-heading{margin:0 0 clamp(1.15rem,2.6vw,1.85rem)!important;padding:0 0 .9rem!important;border-bottom:1px solid rgba(212,176,105,.36)!important}
main .section-heading .eyebrow,main .eyebrow,main .card-kicker,main .branch-category,main .door-number{color:var(--sc38-gold-hi)!important}
main .section-heading h2, main > .section.wrap :is(h1,h2),main > section.section.wrap :is(h1,h2){color:#ffe6b5!important}
main > .section.wrap :is(p,li),main > section.section.wrap :is(p,li){color:#f0e5d1!important}
/* Introductions can be simple title strips without intrusive frame. */
main .about-intro{padding-block:clamp(1.3rem,3vw,2.4rem)!important;border-bottom:1px solid rgba(216,174,106,.45)!important}
main .about-intro :is(h1,h2){color:#ffe6b4!important}
main .about-intro p{color:#f5e7ce!important}
/* Knowledge journeys use bold dark walnut sections, not stacked gold boxes. */
main > .principles,main > .premium-added{
  background:linear-gradient(110deg,rgba(8,27,22,.91),rgba(39,29,19,.87),rgba(9,45,34,.91)),var(--sc38-wood) center/cover!important;
  color:#f6ebda!important;border-block:1px solid #b6925a!important;
}
main > .principles :is(h2,h3),main > .premium-added :is(h2,h3){color:#f5d89c!important}
main > .principles :is(p,li),main > .premium-added :is(p,li){color:#f4e8d3!important}

/* 03 | One cohesive, always-DARK card system, including hover, selected, all palettes. */
:root{
  --sc38-card:linear-gradient(150deg,#14352bdc,#24281ef7 65%,#2b241beb);
  --sc38-card-alt:linear-gradient(150deg,#0e3329e9,#192820f6 68%,#28231bef);
  --sc38-card-hover:linear-gradient(145deg,#1a4b3beb,#263c2eee 65%,#433524ed);
}
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article),
:is(body,body.dark) main > .premium-added .premium-card,
html[data-palette] body main .branch,
html[data-palette] body main .door{
  color:var(--sc38-ivory)!important;
  background:var(--sc38-card)!important;
  border:1px solid rgba(214,179,113,.68)!important;
  border-radius:var(--sc38-radius)!important;
  box-shadow:inset 0 1px 0 #ffffff12,0 9px 22px #0004!important;
  isolation:isolate;
  opacity:1!important;
  -webkit-text-fill-color:initial;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article):nth-child(even){background:var(--sc38-card-alt)!important}
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article):is(:hover,:focus-visible,:focus-within),
:is(body,body.dark) main > .premium-added .premium-card:is(:hover,:focus-within),
html[data-palette] body main .branch:is(:hover,:focus-within){
  background:var(--sc38-card-hover)!important;
  border-color:#e5c387!important;
  box-shadow:inset 0 0 0 1px #f1d49c23,0 15px 28px #0005!important;
  transform:translateY(-2px);
}
/* Content colours explicit on both hover and normal states. Do not use light backgrounds on any card hover. */
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article)
:is(p,li,span,small,.domain,.branch-category,.card-kicker),
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article):is(:hover,:focus-within)
:is(p,li,span,small,.domain,.branch-category,.card-kicker),
:is(body,body.dark) main > .premium-added .premium-card :is(p,span,li){
  color:#f3e8d3!important;-webkit-text-fill-color:#f3e8d3!important;opacity:1!important;
}
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article)
:is(h2,h3,h4,strong),
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article):is(:hover,:focus-within)
:is(h2,h3,h4,strong),
:is(body,body.dark) main > .premium-added .premium-card h3{
  color:#ffe0a7!important;-webkit-text-fill-color:#ffe0a7!important;opacity:1!important;
}
:is(body,body.dark) main :is(.door,.branch,.reading-card,.related-card,.premium-card,.guidance-step,.source-quran,.source-hadith,.principle-list article)
:is(.branch-number,.door-number,.card-kicker,.branch-category){color:#ddbb7c!important;-webkit-text-fill-color:#ddbb7c!important}
/* The link surface stays transparent on hover; never invert to beige with inherited ivory type. */
main .branch-link:is(:hover,:focus-visible), main .reading-card:is(:hover,:focus-visible),main .door:is(:hover,:focus-visible),
main .related-card:is(:hover,:focus-visible),main .premium-card:is(:hover,:focus-visible){background-color:transparent!important}

/* 04 | Portal directory: balanced dark tiles, no ivory highlighting, no embedded ornate frames. */
.branch-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:clamp(.9rem,1.7vw,1.35rem)!important;align-items:stretch}
.branch{min-width:0;display:flex!important;flex-direction:column;border-radius:12px!important}
.branch-link{display:flex!important;flex-direction:column!important;flex:1 1 auto;gap:.65rem;padding:clamp(1.1rem,2vw,1.55rem) clamp(1.1rem,2vw,1.5rem) 4.15rem!important;background:transparent!important;border:0!important;border-radius:inherit!important;min-width:0}
.branch .branch-top{display:flex;align-items:center;gap:.65rem;justify-content:space-between;padding-bottom:.7rem;border-bottom:1px solid #dfc1843c}
.branch .branch-number{font-size:.83rem!important;font-weight:700}
.branch h3{margin:.15rem 0 .3rem!important;font-size:clamp(1.25rem,1.85vw,1.55rem)!important;line-height:1.52!important}
.branch p{line-height:1.85!important;margin:.15rem 0 .45rem!important;flex:1}
.branch .domain{margin-top:auto!important;font-size:.77rem!important;letter-spacing:.01em;color:#f0d6a4!important;overflow-wrap:anywhere}
.branch .favourite{position:absolute;bottom:13px;inset-inline-end:clamp(1.1rem,2vw,1.5rem);background:#edd8ac!important;color:#17382c!important;border:1px solid #b5965a!important;border-radius:9px!important;width:40px;height:39px;z-index:3}
.branch .favourite:hover,.branch .favourite[aria-pressed="true"]{background:#174637!important;color:#ffdf9e!important;border-color:#e5be72!important}
@media(min-width:1121px){.branch-grid>.branch:last-child:nth-child(3n + 1){grid-column:2}}
/* Notice plus filters are feature controls, not bright card-on-card blocks. */
.directory-controls{background:transparent!important;padding:clamp(.6rem,1.3vw,1rem) 0!important;border:0!important}
.availability,#notice:not(:empty){background:#213428!important;border:1px solid #ab925f!important;color:#faefdf!important;border-radius:8px!important;padding:.7rem 1rem!important}
.directory-controls :is(input,select),.article-search{background:#faf3e8!important;color:#163c30!important;border:1px solid #bc9e67!important;border-radius:9px!important}
.directory-controls :is(input,select)::placeholder,.article-search::placeholder{color:#626052!important;opacity:1}
.filters button,.filter-chip,.extra-controls button{background:#183b30!important;color:#f8ead6!important;border:1px solid #a78b59!important;border-radius:999px!important;min-height:41px}
.filters button[aria-pressed="true"],.filter-chip[aria-pressed="true"],.extra-controls button[aria-pressed="true"]{background:#d6b674!important;color:#153b2e!important;border-color:#e8cf98!important}
.filters button:is(:hover,:focus-visible),.filter-chip:is(:hover,:focus-visible),.extra-controls button:is(:hover,:focus-visible){background:#ead49f!important;color:#15372d!important}

/* 05 | Compact learning cards and reading grids. */
.doors{border:0!important;background:transparent!important;box-shadow:none!important;gap:clamp(.8rem,1.7vw,1.2rem)!important}
.door{display:flex;flex-direction:column;padding:clamp(1.1rem,2vw,1.65rem)!important;gap:.6rem}
.door h3{margin:0!important}
.door p{line-height:1.82!important;margin:.3rem 0 1.2rem!important}
.door .door-action{color:#eed098!important;border-top:1px solid #cfaf7066!important;padding-top:.75rem;margin-top:auto!important}
.reading-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1rem!important}
.reading-card,.premium-card,.related-card{padding:clamp(1.1rem,2vw,1.6rem)!important;min-width:0}
.reading-card h2{margin:.45rem 0!important;font-size:clamp(1.35rem,1.9vw,1.65rem)!important}
.reading-card p,.premium-card p,.related-card span{line-height:1.8!important;margin:0!important}
.guidance-steps{gap:.85rem!important}
.guidance-step{padding:1rem 1.1rem!important;min-height:100%;border-color:#aa8b57!important}
.guidance-step strong{display:block;margin-bottom:.5rem}
.related-grid,.premium-grid{gap:clamp(.75rem,1.7vw,1.15rem)!important;align-items:stretch}
.related-card{display:flex!important;flex-direction:column;gap:.55rem}
.related-card strong{margin:0!important}
.related-card span{flex:1}

/* 06 | Headers for long articles, literature and citations. Do NOT enclose reading sections inside repeated frames. */
.editorial-hero{background:linear-gradient(115deg,#0b2923eb,#232015e8 55%,#123b2fe9),var(--sc38-wood) center/cover!important;color:#fbefdb!important;border-bottom:1px solid #ba965b!important}
.editorial-hero h1,.editorial-hero .eyebrow{color:#fff0d1!important}
.editorial-hero :is(p,.editorial-intro){color:#f1e5cf!important}
.editorial-grid{grid-template-columns:minmax(230px,255px) minmax(0,1fr)!important;gap:clamp(1.1rem,2.5vw,2.1rem)!important;align-items:start!important}
.editorial-toc{position:sticky;top:142px;border:1px solid #b59865!important;background:linear-gradient(155deg,#112a23,#242720 80%)!important;padding:1.15rem!important;border-radius:12px!important;box-shadow:0 9px 24px #0004!important}
.editorial-toc strong{color:#f6d59a!important;display:block;margin:0 0 .65rem}
.editorial-toc a{display:block!important;border:0!important;border-inline-start:2px solid transparent!important;padding:.6rem .7rem!important;color:#f6e9d2!important;background:transparent!important;border-radius:7px!important;line-height:1.6}
.editorial-toc a:is(:hover,:focus-visible),.editorial-toc a[aria-current="true"]{background:#27483a!important;color:#ffe4af!important;border-inline-start-color:#d6b879!important}
.editorial-body{
  min-width:0;max-width:none!important;width:100%;padding:clamp(1.25rem,3.6vw,3rem)!important;
  background:linear-gradient(142deg,#fcf6ea,#f1e6d4 76%,#f8eedf)!important;
  color:#193c30!important;border:1px solid #bda06a!important;border-radius:12px!important;
  box-shadow:0 14px 36px #0005!important;
}
.editorial-body::before{display:none!important;content:none!important}
.editorial-body :is(h2,h3,h4){color:#17493b!important;-webkit-text-fill-color:#17493b!important}
.editorial-body :is(p,li,dd,dt,blockquote,figcaption,summary,small,td,th){color:#263c30!important;-webkit-text-fill-color:#263c30!important}
.editorial-body h2{border-bottom:1px solid #c5aa76!important;padding-bottom:.45rem!important}
.editorial-body a:not(.button){color:#155748!important;-webkit-text-fill-color:#155748!important;font-weight:650;text-decoration:none!important;border-bottom:1px solid #b3975f88!important}
.editorial-body a:not(.button):is(:hover,:focus-visible){background:#e1c995!important;color:#123c30!important;-webkit-text-fill-color:#123c30!important;border-bottom-color:transparent!important;border-radius:4px}
/* Inner blocks are contextual sections, not nested full frames. */
.editorial-body .references,.editorial-body .editorial-note,
.editorial-body .evidence,.editorial-body .data-chart,.editorial-body .verse,
.about-content .evidence,.about-content .data-chart{
  background:#f0e5d2!important;color:#1b3d31!important;
  border:0!important;border-inline-start:3px solid #b28a44!important;
  border-radius:5px!important;box-shadow:none!important;
  padding:clamp(.85rem,2vw,1.35rem)!important;
}
.editorial-body .references :is(h2,h3),.editorial-body .evidence summary,.editorial-body .data-chart h3,
.editorial-body .verse :is(p,figcaption),.editorial-body .editorial-note{color:#204438!important;-webkit-text-fill-color:#204438!important}
.editorial-body .evidence summary:is(:hover,:focus-visible){background:#e1c891!important;color:#123a2d!important}
.editorial-body .journey-nav a{background:#174236!important;border:1px solid #b49962!important;color:#fff0d5!important}
.editorial-body .journey-nav a :is(strong,span){color:#fff0d5!important;-webkit-text-fill-color:#fff0d5!important}
.editorial-body .journey-nav a:is(:hover,:focus-visible){background:#285343!important}
.editorial-body .guidance-path{background:transparent!important;color:#17392e!important;border:0!important;padding:0!important;box-shadow:none!important}
.editorial-body .guidance-path h2,.editorial-body .related-reading h2{color:#164537!important}
.editorial-body .guidance-path .guidance-step,.editorial-body .related-card{background:#163b30!important;border:1px solid #ae8f5d!important;color:#fff1d8!important}
.editorial-body .guidance-path .guidance-step :is(strong,span),.editorial-body .related-card :is(strong,span){color:#fff0d6!important;-webkit-text-fill-color:#fff0d6!important}
.editorial-body .guidance-path .guidance-step strong,.editorial-body .related-card strong{color:#f6d89d!important;-webkit-text-fill-color:#f6d89d!important}
.editorial-body .guidance-path .guidance-step:hover,.editorial-body .related-card:hover{background:#215243!important}

/* 07 | FAQ accordion: no ornamental gold frame within another gold frame; no unreadable active. */
main .faq{background:transparent!important;border:0!important;box-shadow:none!important}
main .faq .section-heading{margin-bottom:1.1rem!important}
main .faq details{margin:0!important;border:0!important;border-bottom:1px solid #c9aa6e6b!important;border-radius:0!important;background:transparent!important;padding:0!important;color:#f6ead7!important;box-shadow:none!important}
main .faq details[open]{margin:.2rem 0!important;padding:0 0 .65rem!important;background:transparent!important;border-radius:0!important}
main .faq summary{color:#ffe0a4!important;font-size:clamp(1.0rem,1.2vw,1.13rem)!important;min-height:58px;padding:.8rem .7rem!important;border-radius:7px!important;cursor:pointer}
main .faq summary:is(:hover,:focus-visible){background:#244638!important;color:#fff2d5!important}
main .faq details[open] summary{color:#ffe6b5!important}
main .faq details p{color:#f4e7ce!important;padding:.15rem .7rem 1.05rem!important;line-height:1.9}
main .faq details::marker{color:#e9c685}

/* 08 | Sources, charts, metadata, notices: dark sections with legible text. */
.sources{display:grid;gap:1rem!important}
.sources > div{background:linear-gradient(145deg,#102d25,#1f2a22)!important;color:#f6ebd5!important;border:1px solid #ad905e!important;border-radius:11px!important;padding:clamp(1.35rem,2.3vw,2.2rem)!important;box-shadow:0 10px 25px #0004!important}
.sources :is(h2,h3){color:#f6d89c!important}
.sources :is(p,small,.source-label){color:#f4e9d6!important}
.about-content{background:linear-gradient(140deg,#fcf6eb,#f0e3ce)!important;border:1px solid #c3a570!important;border-radius:12px!important;padding:clamp(1.35rem,3vw,2.5rem)!important;box-shadow:0 13px 30px #0004!important}
main .about-content :is(h2,h3){color:#19493a!important}
main .about-content :is(p,li){color:#344c3e!important}
main > .premium-added .related-reading{border-top:1px solid #b18e57!important}
main .principle-list article{padding:1.05rem 1.2rem!important}
main .principle-list article :is(h3,p){color:#f7e8d0!important}

/* 09 | Buttons: unified colours and shape. Focus and hover remain legible. */
.button,.search-row button,.search-row .button,.editorial-hero button,.extra-controls button,
main :is(button[type="submit"],button[type="button"]):not(.favourite):not(.filter-chip){border-radius:9px!important;min-height:44px!important;text-decoration:none!important}
.button.gold,.hero .button.gold,.editorial-hero button,.search-row .button,.search-row button{
  background:linear-gradient(117deg,#f1dba8,#c29a57 69%,#e7ca8d)!important;color:#16392e!important;border:1px solid #e4c58b!important;
  box-shadow:0 5px 14px #0003!important;text-decoration:none!important}
.button.gold:is(:hover,:focus-visible),.hero .button.gold:is(:hover,:focus-visible),.editorial-hero button:is(:hover,:focus-visible),.search-row button:is(:hover,:focus-visible){background:#fae6bd!important;color:#173b2d!important}
.button.outline,.hero .button.outline{background:#19352b!important;color:#fff1d8!important;border:1px solid #c4a26b!important}
.button.outline:is(:hover,:focus-visible),.hero .button.outline:is(:hover,:focus-visible){background:#2c5342!important;color:#fff3dc!important}

/* 10 | Footer: clean line rather than clutter, right-sized functional navigation pills. */
body > footer{background:linear-gradient(118deg,#0a231df5,#2b2118f3 50%,#0a3026f4),var(--sc38-wood) center/cover!important;color:#fff0dc!important;border-top:1px solid #bc965b!important;padding:clamp(2rem,3.5vw,2.8rem) 0 1.3rem!important}
body > footer .footer-top{display:grid!important;grid-template-columns:minmax(190px,1.15fr) minmax(200px,1fr) repeat(3,minmax(100px,auto))!important;align-items:center!important;gap:.85rem 1.15rem!important;padding-bottom:1.65rem!important}
body > footer .footer-top >p{color:#e5d2b0!important;font-size:.94rem;line-height:1.8;max-width:36ch;margin:0!important}
body > footer .footer-top>a:not(.brand){display:flex!important;align-items:center;justify-content:center;padding:.66rem .85rem!important;min-height:45px!important;min-width:0;background:#1b382e!important;border:1px solid #9c8257!important;border-radius:8px!important;color:#f4e5cc!important;text-align:center!important}
body > footer .footer-top>a:not(.brand):is(:hover,:focus-visible){background:#ebd29a!important;color:#133a2e!important;border-color:#e4bf79!important}
body > footer .footer-bottom{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:.75rem 1.5rem!important;flex-wrap:wrap!important;margin-top:.6rem!important;padding-top:1.2rem!important;border-top:1px solid rgba(211,177,112,.38)!important}
body > footer .footer-bottom :is(a,span){font-size:.84rem!important;line-height:1.75!important;color:#e5d5b8!important}
body > footer .footer-bottom a:is(:hover,:focus-visible){color:#fff4d7!important}
body > footer .brand{display:inline-flex;align-items:center;gap:.75rem}
body > footer .brand strong{font-size:1.55rem!important}
body > footer .brand small{font-size:.79rem!important}

/* Appearance selector always maintains contrast. Backgrounds are stable across colour palettes. */
html[data-palette] body .editorial-body{background:linear-gradient(142deg,#fcf6ea,#f1e6d4 76%,#f8eedf)!important}
html[data-palette] body .editorial-body :is(h2,h3,h4){color:#17493b!important}
html[data-palette] body .editorial-body :is(p,li,summary){color:#263c30!important}
body.dark main .editorial-body{background:linear-gradient(142deg,#fcf6ea,#f1e6d4 76%,#f8eedf)!important;color:#193c30!important}
body.dark main .editorial-body :is(p,li,summary,dd,dt,figcaption,th,td){color:#263c30!important;-webkit-text-fill-color:#263c30!important}
body.dark main .editorial-body :is(h2,h3,h4){color:#17493b!important;-webkit-text-fill-color:#17493b!important}
body.dark main .editorial-body .guidance-step :is(strong,span),body.dark main .editorial-body .related-card :is(strong,span){color:#fff0d6!important;-webkit-text-fill-color:#fff0d6!important}
body.dark main .editorial-body .guidance-step strong,body.dark main .editorial-body .related-card strong{color:#f6d89d!important;-webkit-text-fill-color:#f6d89d!important}
body.dark main .editorial-body .journey-nav a :is(strong,span){color:#fff0d5!important;-webkit-text-fill-color:#fff0d5!important}
body.dark main .branch :is(p,h3,.branch-category,.branch-number,.domain),body.dark main .door :is(h3,p,.door-number,.door-action){color:#f2e5d0!important;-webkit-text-fill-color:#f2e5d0!important}
body.dark main .branch h3,body.dark main .door h3{color:#ffe0a7!important;-webkit-text-fill-color:#ffe0a7!important}
/* Reading-language adjustments; minimum comfortable legibility. */
html[lang="ar"] main :is(.branch p,.door p,.reading-card p){line-height:2!important}
html:not([lang="ar"]) .editorial-hero h1,html:not([lang="ar"]) .hero h1{font-family:Georgia,'Times New Roman',serif!important;font-weight:500!important;letter-spacing:-.015em!important}

/* Responsive layouts use container widths, not fixed rails. */
@media(max-width:1150px){.branch-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.branch-grid>.branch:last-child:nth-child(3n + 1){grid-column:auto}.doors{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:980px){
  .editorial-grid{grid-template-columns:minmax(0,1fr)!important}
  .editorial-toc{position:static!important;max-height:none!important}
  .reading-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body > footer .footer-top{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:.85rem!important}
  body > footer .footer-top .brand,body > footer .footer-top>p{grid-column:1 / -1;max-width:none!important}
}
@media(max-width:760px){
  body{background-attachment:scroll!important}
  .branch-grid,.reading-cards,.premium-grid,.related-grid,.guidance-steps{grid-template-columns:minmax(0,1fr)!important}
  .doors{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  main > .section.wrap,main > section.section.wrap,main > div.section.wrap,main > .sources.wrap{padding:clamp(.65rem,2.4vw,1rem)!important}
  body > footer .footer-top{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body > footer .footer-top>a:not(.brand){min-width:0}
  .editorial-body{padding:clamp(1.05rem,4.3vw,1.5rem)!important}
}
@media(max-width:500px){
  .doors{grid-template-columns:minmax(0,1fr)!important}
  .branch-grid{grid-template-columns:minmax(0,1fr)!important}
  body > footer .footer-top{grid-template-columns:minmax(0,1fr)!important}
  body > footer .footer-top>*{grid-column:auto!important}
  body > footer .footer-top>a:not(.brand){justify-content:flex-start;padding-inline:1rem!important}
  body > footer .footer-bottom{align-items:flex-start!important;flex-direction:column!important}
  main > .section.wrap,main > section.section.wrap,main > div.section.wrap,main > .sources.wrap,.editorial-grid{width:calc(100% - 24px)!important}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{
  body,body.dark{background:#fff!important;color:#111!important}
  main :is(.branch,.door,.reading-card,.related-card,.premium-card,.editorial-body){background:#fff!important;color:#111!important;box-shadow:none!important}
  main :is(p,h1,h2,h3,li,span,strong){color:#111!important;-webkit-text-fill-color:#111!important}
  body > header,body > footer,.editorial-toc{display:none!important}
}

/* 11 | High-specificity repairs for previous (v3.60) nested ivory sections.
   Those rules target main > section.section.wrap:not(.hero) and would otherwise win. */
body main > section.section.wrap:not(.hero):not(.about-content),
body main > section.section.wrap.faq,
body main > section.section.wrap.about-intro,
body main > div.section.wrap,
body main > .section.wrap:not(.about-content),
body main > section.sources.wrap{
  background:transparent!important;
  border:0!important;box-shadow:none!important;border-radius:0!important;
  color:#f7ecdb!important;
}
body main > section.section.wrap:not(.hero):not(.about-content) :is(h1,h2,h3),
body main > section.section.wrap.about-intro :is(h1,h2,h3),
body main > section.section.wrap.faq :is(h1,h2,h3),
body main > div.section.wrap :is(h1,h2,h3){color:#ffe4ae!important;-webkit-text-fill-color:#ffe4ae!important}
body main > section.section.wrap:not(.hero):not(.about-content) :is(p,li),
body main > section.section.wrap.about-intro :is(p,li),
body main > section.section.wrap.faq :is(p,li),
body main > div.section.wrap :is(p,li){color:#f4e8d2!important;-webkit-text-fill-color:#f4e8d2!important}
/* About editorial policy remains on an intentional parchment reading panel. */
body main > section.section.wrap.about-content{
  background:linear-gradient(140deg,#fbf5e9,#f0e4d1 76%,#f9eddb)!important;
  border:1px solid #c0a269!important;border-radius:12px!important;
  box-shadow:0 13px 30px #0004!important;
  padding:clamp(1.35rem,3vw,2.5rem)!important;
}
body main > section.section.wrap.about-content :is(h1,h2,h3){color:#194738!important;-webkit-text-fill-color:#194738!important}
body main > section.section.wrap.about-content :is(p,li,small,span){color:#30483b!important;-webkit-text-fill-color:#30483b!important}
body main > section.section.wrap.about-content::before{display:none!important;content:none!important}
/* Top-level detail panels cannot invert to cream through a style palette. */
html[data-palette] body main > section.section.wrap:not(.hero):not(.about-content){background:transparent!important}

/* 12 | Final clarity checks: no simulated underlines; readable card root too. */
main .editorial-body a:not(.button),
main .editorial-body :is(.references,.data-chart) a,
main .related-reading a,
main .related-card,
main .branch-link,
main .reading-card{border-bottom:0!important;text-decoration:none!important}
main .editorial-body .related-card,
main .editorial-body .related-card:is(:hover,:focus-visible),
main .editorial-body .journey-nav a,
main .editorial-body .journey-nav a:is(:hover,:focus-visible){color:#fff1db!important;-webkit-text-fill-color:#fff1db!important}
