/* R511 – reader-first, quiet book and author pages */
.dv-book-detail{background:#fff!important;border:1px solid #e7ece8!important;box-shadow:none!important;border-radius:16px!important;gap:22px!important}
.dv-book-detail h1{font-weight:760!important;color:#203c35!important;line-height:1.65!important;font-size:clamp(1.25rem,2vw,1.65rem)!important}
.dv-book-detail-author{color:#63716e!important;line-height:1.8!important}
.dv-book-detail-desc{color:#4d5f59!important;line-height:1.95!important;font-size:.9rem!important;max-width:72ch}
.dv-book-detail-actions .btn-primary{background:#315a50!important;border-color:#315a50!important}
.dv-edition-panel{border-color:#e9eeea!important;box-shadow:none!important}
.authors-public{background:#f8f9f8!important;color:#273c36!important}
.ap-hero{background:#f9faf8!important;border:1px solid #e7ece8!important;box-shadow:none!important;min-height:0!important;padding:25px 29px!important;border-radius:17px!important}
.ap-hero:before,.ap-hero:after{display:none!important}
.ap-eyebrow{background:transparent!important;padding:0!important;color:#557669!important}
.ap-hero h1{letter-spacing:0!important;font-size:clamp(1.45rem,2.5vw,1.85rem)!important;color:#233d36!important}
.ap-hero p{max-width:58ch!important}
.ap-stat{box-shadow:none!important;border:1px solid #e7ece8!important;min-width:145px!important}
.ap-search-wrap{margin:14px auto 19px!important;width:100%!important;max-width:none!important}
.ap-search-card{border-color:#e7ece8!important;border-radius:13px!important;box-shadow:none!important;padding:14px!important}
.ap-section{border-color:#e7ece8!important;box-shadow:none!important;border-radius:15px!important}
.ap-featured{gap:15px!important}
.ap-author-card{border-color:#e7ece8!important;min-height:0!important;box-shadow:none!important}
.ap-author-card:hover{transform:none!important;border-color:#cddbd2!important;box-shadow:0 2px 12px rgba(32,55,42,.035)!important}
.ap-author-name{font-size:.9rem!important;line-height:1.6!important;color:#29463d!important}
.ap-author-bio{line-height:1.7!important}
@media(max-width:760px){.dv-book-detail{padding:17px!important;gap:14px!important}.dv-book-detail h1{font-size:1.25rem!important}.ap-hero{padding:18px!important}.ap-search-wrap{margin:11px auto!important}.ap-search-card{padding:11px!important}.ap-section-head{padding:14px!important}}
@media(prefers-reduced-motion:reduce){.ap-author-card{transition:none!important}}

/* R512 – robust mobile widths and keyboard access */
.ap-grid,.ap-featured,.ap-author-card,.ap-author-top,.ap-author-copy,.ap-search-grid,.ap-search-grid>div{min-width:0}
.ap-author-name,.ap-featured-author strong{overflow-wrap:anywhere}
.ap-author-card a:focus-visible,.ap-featured-author:focus-visible{outline:2px solid #315a50!important;outline-offset:3px!important}
@media(max-width:600px){.ap-hero{min-height:0!important}.ap-search-wrap{width:100%!important}.ap-search-grid{grid-template-columns:minmax(0,1fr)!important}.ap-grid{grid-template-columns:minmax(0,1fr)!important}.ap-featured{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* R515 – authors as compact library entry */
.ap-main{padding-top:12px!important}
.ap-hero{padding:13px 19px!important;gap:12px!important}
.ap-hero h1{font-size:1.45rem!important}
.ap-hero p{font-size:.75rem!important}
.ap-eyebrow{margin-bottom:2px!important}
.ap-search-wrap{margin:9px auto 13px!important}
.ap-search-card{padding:10px!important}
.ap-search-card .form-control,.ap-search-card .form-select,.ap-search-actions .btn{min-height:39px!important}
.ap-section{margin-top:12px!important}
.ap-section-head{padding:11px 15px 5px!important}
.ap-featured{padding:7px 13px 11px!important;gap:6px!important}
.ap-featured-photo,.ap-featured-fallback{width:55px!important;height:55px!important;margin-bottom:3px!important}
.ap-featured-author{padding:5px 3px!important}
.ap-grid{padding-top:8px!important}
@media(max-width:700px){.ap-hero{padding:12px!important}.ap-hero .ap-stat{display:none!important}.ap-featured{grid-template-columns:repeat(4,minmax(0,1fr))!important}.ap-featured-photo,.ap-featured-fallback{width:44px!important;height:44px!important}.ap-featured-author span{display:none!important}}
@media(max-width:400px){.ap-featured{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* R519: consistent Arabic type scale for book details and author directory */
.dv-book-detail h1{font-size:clamp(1.42rem,2.2vw,1.82rem)!important}
.dv-book-detail-author,.dv-book-detail-desc{font-size:1rem!important}
.dv-edition-panel,.dv-edition-meta,.dv-contributor-list,.dv-book-detail-actions .btn{font-size:.94rem!important}
.ap-hero h1{font-size:1.65rem!important}
.ap-hero p,.ap-section p,.ap-author-bio{font-size:.84rem!important}
.ap-author-name{font-size:1rem!important}
.ap-author-years,.ap-author-field,.ap-featured-author strong,.ap-work-chip{font-size:.77rem!important}
.ap-field label,.ap-search-card .form-control,.ap-search-card .form-select,.ap-search-card .btn,.ap-link,.ap-section h3{font-size:.91rem!important}
@media(max-width:600px){.ap-hero h1{font-size:1.5rem!important}.ap-author-name{font-size:.96rem!important}}

/* R521 – compact authors total without orphan decorative icon */
.ap-stat{min-width:0!important;display:block!important;text-align:center!important;padding:11px 16px!important;border-radius:12px!important}
.ap-stat strong{font-variant-numeric:tabular-nums;line-height:1.2!important}
.ap-stat span{font-size:.78rem!important;line-height:1.45!important}
@media(max-width:700px){.ap-hero .ap-stat{display:none!important}}

/* R522 – author card reading rhythm and stable portraits */
.ap-grid{align-items:stretch!important;gap:14px!important}
.ap-author-card{padding:17px!important;gap:5px!important}
.ap-author-top{gap:12px!important;align-items:flex-start!important}
.ap-author-photo,.ap-author-fallback{width:66px!important;height:66px!important;flex:0 0 66px!important;aspect-ratio:1;object-fit:cover}
.ap-author-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.65!important}
.ap-author-field span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.ap-author-bio{font-size:.83rem!important;line-height:1.75!important;min-height:0!important;margin-top:8px!important}
.ap-author-foot{border-top:1px solid #eef1ef;padding-top:10px!important;gap:8px!important}
.ap-author-more{font-size:.81rem!important;padding:8px 10px!important;color:#315a50!important;background:#f0f5f1!important;border-radius:9px!important}
.ap-author-more:hover{background:#e3efe7!important}
.ap-featured-photo,.ap-featured-fallback{aspect-ratio:1;object-fit:cover}
.ap-featured-author strong{line-height:1.65!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
@media(max-width:600px){.ap-author-card{padding:14px!important}.ap-grid{gap:10px!important}.ap-author-more{min-height:40px;display:inline-flex;align-items:center}}

/* R523: preserve real navigation and readable spacing on mobile */
@media(max-width:900px){
 .ap-nav{height:auto!important;position:relative!important}
 .ap-nav-inner{min-height:60px;height:auto!important;display:flex!important;flex-wrap:wrap!important;gap:6px 12px!important;padding-block:8px!important}
 .ap-links{display:flex!important;order:3;flex:1 0 100%;margin-inline-start:0!important;gap:5px!important;overflow-x:auto;scrollbar-width:thin;white-space:nowrap;align-items:center!important;padding-bottom:2px}
 .ap-link{display:inline-flex!important;height:38px!important;min-height:38px!important;padding:5px 12px!important;border-bottom:0!important;border-radius:9px!important;white-space:nowrap}
 .ap-link.active{background:#eaf2ed!important;color:#315a50!important}
 .ap-user{margin-inline-start:auto!important}
 .ap-user .btn{min-height:38px!important}
}
@media(max-width:600px){
 .ap-main{padding-top:10px!important}
 .ap-search-wrap{margin:10px auto 13px!important}
 .ap-search-card .ap-search-actions .btn{min-height:43px!important}
 .ap-author-card{min-width:0!important}
 .ap-author-top{min-width:0!important}
 .ap-author-copy{min-width:0!important}
 .ap-author-name{overflow-wrap:anywhere}
 .ap-section-head{flex-wrap:wrap;gap:8px!important}
}

/* R524: accessible mobile navigation / explicit account label */
@media(max-width:900px){
 .ap-nav-inner{align-content:center!important}
 .ap-links{min-width:0!important;max-width:100%!important}
 .ap-link{font-size:.91rem!important;font-weight:700!important}
 .ap-user .btn{white-space:nowrap!important;padding:.45rem .7rem!important}
 .ap-user .ap-user-name{display:inline!important;font-size:.8rem!important}
 .ap-brand{font-size:.91rem!important}
}
@media(max-width:360px){.ap-user .btn{padding:.4rem .48rem!important}.ap-brand{font-size:.82rem!important}}

/* R525 — harmonious header, featured authors and footer */
.authors-public .ap-nav{background:#f2f6f2!important;border-bottom:1px solid #dfe9e1!important;box-shadow:none!important}
.authors-public .ap-featured-section{background:#eef4ef!important;border:1px solid #dbe7dd!important;border-radius:17px!important;box-shadow:none!important}
.authors-public .ap-featured-section .ap-section-head{padding:18px 21px 8px!important}
.authors-public .ap-featured-section .ap-section-icon{background:#dfece2!important;color:#315a50!important}
.authors-public .ap-featured{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:14px!important;padding:14px 19px 21px!important}
.authors-public .ap-featured-photo,.authors-public .ap-featured-fallback{width:84px!important;height:84px!important;max-width:100%!important;border:3px solid #fff!important;box-shadow:0 3px 12px rgba(37,72,56,.09)!important}
.authors-public .ap-featured-author{min-width:0!important;border-radius:12px!important}
.authors-public .ap-featured-author:hover{background:#e2ede5!important}
.authors-public .ap-featured-author strong{font-size:.94rem!important;color:#26473b!important}
.authors-public .ap-featured-author span{font-size:.77rem!important;color:#697f73!important}
.ap-site-footer{margin-top:28px;padding:21px 0;background:#f2f6f2;border-top:1px solid #dfe9e1;color:#526b5e;font-size:.84rem}
.ap-site-footer span{margin-inline:5px;color:#92a79a}
@media(max-width:1100px){.authors-public .ap-featured{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:700px){.authors-public .ap-featured{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important;padding:11px!important}.authors-public .ap-featured-photo,.authors-public .ap-featured-fallback{width:64px!important;height:64px!important}.authors-public .ap-featured-section .ap-section-head{padding:13px!important}.authors-public .ap-featured-author strong{font-size:.82rem!important}.ap-site-footer{margin-top:18px;text-align:center;padding:17px 0}}
@media(max-width:400px){.authors-public .ap-featured{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* R526: Featured authors ALWAYS in one horizontal row, never wrap */
.authors-public .ap-featured-section .ap-featured{display:flex!important;flex-wrap:nowrap!important;grid-template-columns:none!important;overflow-x:auto!important;overflow-y:hidden!important;gap:14px!important;scroll-snap-type:x proximity;scrollbar-width:thin;overscroll-behavior-inline:contain;padding:14px 19px 21px!important}
.authors-public .ap-featured-section .ap-featured-author{flex:0 0 126px!important;width:126px!important;min-width:126px!important;max-width:126px!important;scroll-snap-align:start;white-space:normal!important}
.authors-public .ap-featured-section .ap-featured-photo,.authors-public .ap-featured-section .ap-featured-fallback{width:84px!important;height:84px!important}
@media(max-width:700px){.authors-public .ap-featured-section .ap-featured{gap:10px!important;padding:12px 11px 17px!important}.authors-public .ap-featured-section .ap-featured-author{flex-basis:102px!important;width:102px!important;min-width:102px!important;max-width:102px!important}.authors-public .ap-featured-section .ap-featured-photo,.authors-public .ap-featured-section .ap-featured-fallback{width:64px!important;height:64px!important}}

/* R527: fill the entire featured row on desktop, keep one row on mobile */
@media(min-width:901px){
 .authors-public .ap-featured-section .ap-featured{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;overflow-x:hidden!important;gap:8px!important}
 .authors-public .ap-featured-section .ap-featured-author{min-width:0!important;max-width:none!important;width:100%!important;flex:initial!important}
}
@media(max-width:900px){
 .authors-public .ap-featured-section .ap-featured{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;grid-template-columns:none!important}
 .authors-public .ap-featured-section .ap-featured-author{flex:0 0 112px!important;min-width:112px!important;width:112px!important;max-width:112px!important}
}
@media(max-width:700px){.authors-public .ap-featured-section .ap-featured-author{flex-basis:102px!important;width:102px!important;min-width:102px!important;max-width:102px!important}}

/* R528 restrained editorial palette – warm ivory, muted sage, ink */
.authors-public{background:#faf9f5!important;color:#293b35!important}
.authors-public .ap-nav,.authors-public .ap-site-footer{background:#f2f1e9!important;border-color:#e6e4d9!important}
.authors-public .ap-hero{background:#f3f5ef!important;border-color:#e4e8dd!important;box-shadow:none!important}
.authors-public .ap-search-card{background:#fffdfa!important;border:1px solid #e9e6dd!important;box-shadow:none!important}
.authors-public .ap-featured-section{background:#eaf0e8!important;border-color:#dfe8dd!important}
.authors-public .ap-authors-section{background:#fcfbf8!important;border-color:#e9e6dd!important;box-shadow:none!important}
.authors-public .ap-author-card{background:#fffefa!important;border-color:#e9e7df!important;box-shadow:none!important;transform:none!important}
.authors-public .ap-author-card:hover{border-color:#b9cabe!important;box-shadow:0 3px 14px rgba(44,70,54,.045)!important;transform:none!important}
.authors-public .ap-section-icon{background:#edf2ec!important;color:#436a56!important}
.authors-public .ap-author-more{background:#edf2ec!important;color:#365847!important}

/* R529 – single centered author search, no filters or large buttons */
.authors-public .ap-search-only{width:min(100% - 28px,780px)!important;max-width:780px!important;margin:14px auto 18px!important}
.authors-public .ap-search-only .ap-search-card{padding:5px!important;border-radius:15px!important;background:#fffefa!important;border:1px solid #dce4da!important;box-shadow:0 2px 10px rgba(38,62,45,.035)!important}
.authors-public .ap-quick-search{display:flex!important;align-items:center!important;gap:7px!important;direction:rtl!important}
.authors-public .ap-quick-search .form-control{flex:1 1 auto!important;min-width:0!important;width:100%!important;min-height:47px!important;padding:10px 17px!important;background:transparent!important;border:0!important;box-shadow:none!important;font-size:1rem!important}
.authors-public .ap-quick-search .form-control:focus{outline:none!important;box-shadow:none!important}
.authors-public .ap-search-only .ap-search-card:focus-within{border-color:#8da99a!important;box-shadow:0 0 0 3px rgba(72,110,87,.09)!important}
.authors-public .ap-quick-submit{flex:0 0 38px;width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:10px;background:#e5eee7;color:#315a50;cursor:pointer;margin-inline-end:5px;font-size:1.12rem}
.authors-public .ap-quick-submit:hover{background:#d6e5da;color:#234737}
@media(max-width:600px){.authors-public .ap-search-only{width:calc(100% - 20px)!important;margin:11px auto 14px!important}.authors-public .ap-quick-search .form-control{min-height:44px!important;font-size:.96rem!important}}

/* R536 editorial footer: library purpose + understated studio identity */
.ap-site-footer .ap-footer-inner{display:flex;align-items:center;justify-content:space-between;gap:16px 30px;padding-block:9px}
.ap-footer-identity strong{font-size:1rem;color:#263f32;font-weight:800}
.ap-footer-identity p{margin:5px 0 0;color:#68776b;font-size:.84rem;line-height:1.7}
.ap-footer-studio{display:flex;align-items:center;gap:9px;white-space:nowrap;font-size:.8rem;color:#728074}
.ap-footer-studio a{display:inline-flex;align-items:center;gap:5px;text-decoration:none;color:#325b49;font-weight:800;padding:6px 2px;border-bottom:1px solid transparent;transition:color .15s ease,border-color .15s ease}
.ap-footer-studio a:hover,.ap-footer-studio a:focus-visible{color:#174c37;border-bottom-color:#719985}
.ap-footer-studio a:focus-visible{outline:2px solid #719985;outline-offset:3px;border-radius:3px}
@media(max-width:650px){.ap-site-footer .ap-footer-inner{flex-direction:column;align-items:center;text-align:center;gap:9px}.ap-footer-identity p{max-width:350px}.ap-footer-studio{justify-content:center}}
