/* Madarej 2026 — app-inspired interface. Preserves the existing publishing and world routes. */
:root{--mdapp-green:#103f42;--mdapp-gold:#af8147;--mdapp-milk:#f7f2e9;--mdapp-panel:#fffdfa;--mdapp-side:226px}
body.mdx-site{background:var(--mdapp-milk);color:#244148}
.mdapp-sidebar{display:none}
.mdapp-global-search{min-width:0;max-width:780px;width:100%;height:47px;background:#fffdf9;border:1px solid #e8e7e2;border-radius:13px;display:flex;align-items:center;box-shadow:0 5px 15px #12332c08;padding:0 14px}
.mdapp-global-search input{flex:1;min-width:0;border:0;outline:0;color:#264349;background:transparent;padding:7px 12px;font-size:.82rem}
.mdapp-global-search button{width:34px;height:35px;border:0;background:transparent;display:grid;place-items:center;color:#6b7b7f}
.mdapp-global-search button svg{width:21px;height:21px}
.mdapp-dashboard{max-width:1540px;margin:auto;padding:11px 32px 67px;min-width:0}
.mdapp-promo{position:relative;isolation:isolate;overflow:hidden;border-radius:20px;min-height:288px;display:flex;align-items:center;background:#164e4e;box-shadow:0 8px 29px #113d4010}
.mdapp-promo-art{position:absolute;inset:0;pointer-events:none}.mdapp-promo-art svg{height:100%;width:100%;display:block;preserveAspectRatio:xMidYMid slice}
.mdapp-promo:after{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(16,59,57,0) 0%,rgba(11,55,56,.23) 43%,rgba(8,52,54,.88) 64%,#0c4244 100%)}
.mdapp-promo-text{position:relative;z-index:2;padding:34px clamp(25px,5vw,68px);margin-left:auto;width:54%;color:#fff;direction:rtl;text-align:right}
.mdapp-promo-text>span{font-size:.76rem;color:#f0ce90;font-weight:700}
.mdapp-promo-text h1{font-size:clamp(1.75rem,3vw,2.7rem);line-height:1.6;margin:3px 0 6px;color:white}
.mdapp-promo-text p{font-size:.92rem;line-height:1.9;max-width:350px;color:#e7eeea;margin:0 0 18px}
.mdapp-gold-btn{display:inline-flex;align-items:center;justify-content:center;gap:12px;background:linear-gradient(145deg,#f4d59b,#dcb371);padding:10px 22px;border-radius:99px;color:#294146;font-weight:700;font-size:.82rem;min-height:41px;box-shadow:0 6px 16px #0002}
.mdapp-gold-btn svg{width:16px;height:16px}.mdapp-hero-dots{position:absolute;z-index:3;bottom:14px;left:45%;display:flex;align-items:center;gap:7px}.mdapp-hero-dots b,.mdapp-hero-dots i{height:7px;width:7px;display:block;background:#e4dfd5a6;border-radius:30px}.mdapp-hero-dots b{width:17px;background:#fff}
.mdapp-section{margin-top:31px}.mdapp-section-title{display:flex;align-items:center;gap:15px;justify-content:space-between;margin-bottom:15px}
.mdapp-section-title h2{color:#184247;font-size:clamp(1.18rem,2vw,1.55rem);margin:0;display:flex;align-items:center;gap:16px}
.mdapp-section-title h2:after{content:"";width:35px;height:1px;background:#bd925c}
.mdapp-section-title>a{font-size:.77rem;color:#6c7b7c;display:inline-flex;align-items:center;gap:5px}.mdapp-section-title>a svg{width:15px;height:15px}
.mdapp-world-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.mdapp-world-card{display:flex;flex-direction:column;align-items:flex-start;position:relative;min-width:0;min-height:174px;background:var(--mdapp-panel);border:1px solid #eee7de;border-radius:15px;padding:15px 17px 14px;box-shadow:0 6px 17px #3143360a;transition:transform .16s,border .16s,box-shadow .16s}
.mdapp-world-card:hover{border-color:#d5b58b;box-shadow:0 12px 26px #31433617;transform:translateY(-3px)}
.mdapp-world-icon{width:54px;height:50px;border-radius:13px;background:#faf1e4;color:#a3763a;display:grid;place-items:center;margin-bottom:14px}
.mdapp-world-icon svg{width:29px;height:29px}
.mdapp-world-card strong{display:block;font-size:.93rem;color:#24444b;line-height:1.6}
.mdapp-world-card small{display:block;margin-top:3px;color:#6d7b7c;font-size:.68rem;line-height:1.8}
.mdapp-card-chevron{margin-top:auto;align-self:flex-end;color:#a97b41;font-size:25px;font-weight:700;line-height:1}
.mdapp-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-top:17px}
.mdapp-feature-card{position:relative;isolation:isolate;display:flex;align-items:center;min-width:0;min-height:202px;overflow:hidden;border-radius:18px;padding:24px clamp(23px,3vw,32px);color:#fff;background:#174e50}
.mdapp-feature-card .mdapp-feature-art{position:absolute;inset:0;overflow:hidden;z-index:-1}
.mdapp-feature-art svg{width:100%;height:100%;display:block}
.mdapp-feature-card:before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,transparent 15%,rgba(15,58,56,.22) 35%,#0e4445 85%)}
.mdapp-feature-copy{margin-left:auto;width:52%;text-align:right;direction:rtl;display:flex;align-items:flex-start;flex-direction:column}
.mdapp-feature-copy span{color:#e0c494;font-size:.62rem;font-weight:700}
.mdapp-feature-copy h2{font-size:clamp(1.22rem,2vw,1.65rem);line-height:1.55;margin:5px 0;color:inherit}
.mdapp-feature-copy p{line-height:1.8;font-size:.72rem;color:inherit;margin:0 0 10px}
.mdapp-feature-copy a{display:flex;align-items:center;gap:8px;background:#ead1a2;color:#2b4a45;padding:6px 17px;border-radius:100px;font-size:.69rem;font-weight:700}
.mdapp-feature-copy a svg{width:14px;height:14px}
.mdapp-children-card{color:#234f51;background:#f2e2c6}
.mdapp-children-card:before{background:linear-gradient(90deg,transparent 7%,rgba(254,243,221,.28) 38%,#f7e6c6 88%)}
.mdapp-children-card .mdapp-feature-copy span{color:#87663c}
.mdapp-children-card .mdapp-feature-copy a{background:#dfb879}
.mdapp-suggestions{margin-top:26px}.mdapp-tagline{display:flex;gap:8px;flex-wrap:wrap;margin:9px 0 12px}
.mdapp-tagline a{border:1px solid #e7dfd3;border-radius:10px;padding:5px 13px;background:#fffdf9;color:#69787b;font-size:.69rem}
.mdapp-tagline a[aria-current]{background:#16484b;color:white;border-color:#16484b}
.mdapp-recommend-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px}
.mdapp-recommend-card{display:block;min-width:0;background:var(--mdapp-panel);border:1px solid #e9e4dc;border-radius:13px;overflow:hidden;transition:transform .2s}
.mdapp-recommend-card:hover{transform:translateY(-2px)}
.mdapp-rec-cover{position:relative;height:105px;display:flex;align-items:center;justify-content:center;isolation:isolate;color:#c19356;overflow:hidden;background:linear-gradient(135deg,#e5d5ba,#f4eddd)}
.mdapp-rec-cover:before{content:"";position:absolute;width:125px;height:125px;border-radius:80px 80px 0 0;top:27px;left:calc(50% - 62px);background:#f5ecd5;box-shadow:0 0 0 12px #bdcfc133;z-index:-1}
.mdapp-rec-cover svg{width:45px;height:45px;filter:drop-shadow(0 6px 3px #28453f17)}
.mdapp-rec-cover>span{position:absolute;top:6px;right:7px;font-size:.57rem;background:#fffaeee8;color:#455650;padding:2px 7px;border-radius:6px}
.mdapp-rec-info{padding:9px 10px 11px}.mdapp-rec-info h3{font-size:.7rem;line-height:1.6;min-height:34px;margin:0 0 4px;color:#274247;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mdapp-rec-info small{font-size:.58rem;color:#758184}
.mdapp-art-dawah .mdapp-rec-cover{background:linear-gradient(135deg,#205b55,#85aea0);color:#ffe0a8}.mdapp-art-dawah .mdapp-rec-cover:before{background:#40766d}
.mdapp-art-sprout .mdapp-rec-cover{background:linear-gradient(135deg,#fbe3c2,#e3eace);color:#947746}
.mdapp-art-audio .mdapp-rec-cover{background:linear-gradient(135deg,#e9ddd1,#f7f1e5)}
.mdapp-art-articles .mdapp-rec-cover{background:linear-gradient(135deg,#d2e2d5,#f4ece0)}
.mdapp-art-steps .mdapp-rec-cover{background:linear-gradient(135deg,#e7decb,#eee6d3)}
.mdapp-art-books .mdapp-rec-cover{background:linear-gradient(135deg,#e0d0b6,#f5ebd6)}
/* Consistent shell, including the two full standalone portals. */
@media(min-width:1051px){
 body.mdx-site{padding-right:var(--mdapp-side)}
 html[dir="ltr"] body.mdx-site{padding-right:0;padding-left:var(--mdapp-side)}
 .mdapp-sidebar{display:flex;flex-direction:column;position:fixed;z-index:65;top:0;bottom:0;right:0;width:var(--mdapp-side);overflow-y:auto;padding:14px 12px 20px;background:#fffdf8;border-left:1px solid #e4ddd3;box-shadow:-7px 0 21px #283a3111}
 html[dir="ltr"] .mdapp-sidebar{right:auto;left:0;border-right:1px solid #e4ddd3;border-left:0}
 body.admin-bar .mdapp-sidebar{top:32px}
 .mdapp-side-logo{display:grid;place-items:center;padding:12px 10px 30px;margin-bottom:7px}
 .mdapp-side-logo img,.mdapp-side-logo svg{max-width:145px;width:100%;height:auto}
 .mdapp-side-items,.mdapp-side-extras{display:flex;align-items:stretch;flex-direction:column;gap:5px}
 .mdapp-sidebar nav a{padding:10px 13px;display:flex;gap:14px;align-items:center;text-align:start;border-radius:11px;color:#4b656b;font-size:.80rem;min-height:48px}
 .mdapp-sidebar nav a svg{width:21px;height:21px;color:#976e39}
 .mdapp-sidebar nav a[aria-current],.mdapp-sidebar nav a:hover{background:#f9f0e3;color:#1b4446;font-weight:700}
 .mdapp-side-separator{height:1px;background:#e9dfd1;margin:17px 11px}
 .mdapp-side-footer{margin-top:auto;text-align:center;color:#a69a88;font-size:.75rem;padding-top:17px}
 .mdx-header{background:#f7f2e9!important;border:0!important;position:relative;box-shadow:none!important;padding-block:11px}
 .mdx-header-row{max-width:none!important;width:calc(100% - 64px)!important;min-height:55px!important;justify-content:space-between;gap:18px}
 .mdx-header .mdx-brand,.mdx-header .mdx-nav{display:none!important}
 .mdx-header .mdx-header-tools{display:flex;align-items:center;gap:13px;order:1}
 .mdx-header .mdapp-global-search{order:0;margin-left:auto}
 html[dir="ltr"] .mdx-header .mdapp-global-search{margin-left:0;margin-right:auto}
 .mdx-header .mdx-mobile-menu,.mdx-header .mdx-menu{display:none!important}
 .mdx-header .mdx-search-btn{display:none}
 .mdx-header .language-switcher summary{background:#fffdfb;border:1px solid #efe7dd;border-radius:12px;padding:0 11px!important}
 .mdx-footer{margin-top:12px}
 .mdx-mobile-dock{display:none!important}
 .mds-catalog,.mdp-special-portal{max-width:100%;min-width:0}
}
@media(min-width:1051px) and (max-width:1390px){
 .mdapp-world-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .mdapp-recommend-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .mdapp-world-card{min-height:158px}
 .mdapp-feature-copy{width:62%}
}
@media(max-width:1050px){
 .mdapp-dashboard{padding:13px 20px 58px}
 .mdapp-global-search{max-width:100%;order:3;flex-basis:100%;width:100%}
 .mdx-header-row{flex-wrap:wrap}
 .mdapp-world-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .mdapp-recommend-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .mdapp-feature-copy{width:58%}
}
@media(max-width:700px){
 .mdapp-dashboard{padding:14px 15px 50px}
 .mdapp-promo{min-height:270px;border-radius:16px}
 .mdapp-promo:after{background:linear-gradient(90deg,rgba(16,59,57,.35),rgba(9,52,54,.94) 60%,#0b3a3b)}
 .mdapp-promo-text{padding:20px 20px 35px;width:79%}
 .mdapp-promo-text h1{font-size:1.5rem}
 .mdapp-promo-text p{font-size:.8rem}
 .mdapp-world-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .mdapp-world-card{min-height:136px;padding:13px}
 .mdapp-world-icon{width:39px;height:39px;margin-bottom:8px}
 .mdapp-world-icon svg{width:22px;height:22px}
 .mdapp-world-card strong{font-size:.78rem}
 .mdapp-world-card small{font-size:.61rem}
 .mdapp-feature-grid{grid-template-columns:1fr;gap:12px}
 .mdapp-feature-card{min-height:180px;padding:20px}
 .mdapp-feature-copy{width:62%}
 .mdapp-feature-copy h2{font-size:1.2rem}
 .mdapp-recommend-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .mdapp-suggestions{margin-top:24px}
 .mdapp-rec-cover{height:112px}
 .mdapp-rec-info h3{font-size:.7rem}
 .mdx-header-row{width:calc(100% - 30px)!important}
 .mdx-header .mdx-header-tools{margin-right:auto}
 .mdapp-global-search{height:44px}
 .mdapp-tagline{gap:6px}
}
@media(max-width:360px){.mdapp-feature-copy{width:72%}.mdapp-promo-text{width:88%}.mdapp-world-card{min-height:150px}}
@media(prefers-reduced-motion:reduce){.mdapp-world-card,.mdapp-recommend-card{transition:none}}
