/* alhamdulillah.net 1.6.0 – one responsive visual language across all pages */
:root{--alh160-main:#078873;--alh160-deep:#173d32;--alh160-line:#dbece3;--alh160-pale:#eaf8f1;--alh160-shadow:0 10px 32px rgba(13,81,56,.055)}
html{scroll-behavior:smooth}
body.alh160-subpage,body.alh160-main{color-scheme:light;background:#f8fbf9;color:#18382f}
body.alh160-subpage{--bg:#f8fbf9;--paper:#fff;--surface:#fff;--text:#18382f;--ink:#18382f;--muted:#64786e;--soft:#64786e;--main:#078873;--brand:#078873;--brand2:#075f4d;--border:#dbece3;--line:#dbece3;--subtle:#eaf8f1;--shadow:var(--alh160-shadow);font:16px/1.7 system-ui,-apple-system,'Segoe UI',Arial,sans-serif;margin:0}
body.alh160-subpage a{color:#087a68}
body.alh160-subpage a:hover{color:#075b4d}
.alh160-skip{position:absolute;left:12px;top:-90px;padding:10px 16px;z-index:999;background:white;color:#124f41;border-radius:8px}
.alh160-skip:focus{top:12px}
/* Header: exactly the same HTML is emitted for main site and every subpage. */
.alh160-site-header{position:sticky;top:0;z-index:70;background:rgba(255,255,255,.97);border-bottom:1px solid #dceae2;box-shadow:0 3px 20px rgba(12,75,54,.03);backdrop-filter:blur(14px)}
.alh160-nav-wrap{max-width:1560px;margin:0 auto;display:flex;align-items:center;gap:clamp(12px,1.4vw,22px);min-height:73px;padding:9px clamp(16px,3vw,36px)}
.alh160-site-header .brand{font-size:1.31rem;letter-spacing:-.048em;white-space:nowrap;color:#173c32;font-weight:830;text-decoration:none;margin-right:auto}
.alh160-site-header .brand-mark{color:#078873;margin-right:5px}
.alh160-site-header .brand-tld{color:#05846c}
.alh160-primary{display:flex;gap:clamp(12px,1.25vw,23px);align-items:center;flex-wrap:nowrap;min-width:0}
.alh160-site-header .alh160-primary>a,.alh160-site-header .alh160-more summary{font-size:.86rem;padding:9px 0;color:#506e60;font-weight:720;white-space:nowrap;text-decoration:none;cursor:pointer;list-style:none;position:relative}
.alh160-site-header .alh160-primary>a:hover,.alh160-site-header .alh160-primary>a.active,.alh160-site-header .alh160-primary>a[aria-current="page"]{color:#078873}
.alh160-site-header .alh160-primary>a.active:after,.alh160-site-header .alh160-primary>a[aria-current="page"]:after{content:"";position:absolute;bottom:1px;left:0;right:0;height:2px;background:#078873;border-radius:2px}
.alh160-more{position:relative;flex-shrink:0}
.alh160-more summary::-webkit-details-marker{display:none}
.alh160-more[open] .alh160-more-links{display:grid}
.alh160-more-links{display:grid;min-width:240px;position:absolute;right:0;top:100%;padding:9px;background:#fff;border:1px solid var(--alh160-line);border-radius:13px;box-shadow:0 16px 40px rgba(22,65,49,.13);z-index:75}
.alh160-more-links>a{padding:10px 13px;color:#38594c!important;text-decoration:none;font-weight:650;font-size:.88rem;border-radius:7px}
.alh160-more-links>a:hover{background:#eaf8f1;color:#087863!important}
.alh160-header-search{display:flex;align-items:stretch;min-width:145px;width:clamp(165px,18vw,270px);border:1px solid #cde1d7;border-radius:11px;overflow:hidden;background:white}
.alh160-header-search input{width:100%;min-width:0;border:0;background:transparent;padding:9px 10px;font-size:.82rem;color:#214d3e;outline:none}
.alh160-header-search button{min-width:37px;border:0;background:#e8f7f0;color:#087563;display:grid;place-items:center;padding:0 9px;border-radius:0;cursor:pointer}
.alh160-theme-toggle,.alh160-menu-toggle{border:1px solid #dce9e1;background:white;color:#185747;border-radius:999px;padding:8px 12px;cursor:pointer}
.alh160-menu-toggle{display:none;align-items:center;gap:6px;border-radius:11px}
.alh160-site-header :is(a,button,input,summary):focus-visible{outline:3px solid #47bda8;outline-offset:3px}
/* All content types share pale background, white cards and green actions. */
body.alh160-subpage main.wrap{max-width:1120px;width:min(1120px,calc(100% - 36px));margin:0 auto;min-height:55vh;padding:24px 0 64px}
body.alh160-subpage .crumb{color:#6d8278;font-size:.83rem;margin:7px 0 23px}
body.alh160-subpage .crumb a{color:#527466}
body.alh160-subpage .hero{max-width:none;text-align:left;padding:12px 0 24px;margin:0}
body.alh160-subpage .hero .overline,body.alh160-subpage .overline{color:#078873;font-size:.72rem;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
body.alh160-subpage .hero h1{font-size:clamp(2rem,4.6vw,3rem);line-height:1.15;letter-spacing:-.047em;margin:7px 0 11px;color:#173b31}
body.alh160-subpage .hero .lead{font-size:1.04rem;color:#60796b;margin:0;max-width:850px}
body.alh160-subpage h2{color:#183e32;font-size:1.4rem;letter-spacing:-.025em}
body.alh160-subpage .search-panel,body.alh160-subpage .result,body.alh160-subpage .card,body.alh160-subpage .text-card,body.alh160-subpage .facts,body.alh160-subpage .book,body.alh160-subpage .panel{background:#fff;border:1px solid #dcebe2;box-shadow:var(--alh160-shadow);border-radius:16px;color:#18382f}
body.alh160-subpage .search-panel,body.alh160-subpage .result,body.alh160-subpage .text-card{padding:clamp(16px,2.8vw,27px)}
body.alh160-subpage .card{padding:21px}
body.alh160-subpage .card:hover,body.alh160-subpage .book:hover{border-color:#82cfb3;box-shadow:0 14px 28px rgba(28,112,77,.09)}
body.alh160-subpage .chip{background:#eff9f3;border:1px solid #d2e9dc;color:#087c68;border-radius:999px}
body.alh160-subpage .chip.chosen{background:#d9f4e6;border-color:#6cb999;color:#0c6855}
body.alh160-subpage .pill{background:#e6f6ed;color:#08745f;border-radius:999px}
body.alh160-subpage button:not(.alh160-menu-toggle):not(.alh160-theme-toggle):not(.alh160-header-search button),body.alh160-subpage .button{background:#078873;color:white;border-radius:10px;border:1px solid #078873;transition:background-color .15s ease}
body.alh160-subpage button:not(.alh160-menu-toggle):not(.alh160-theme-toggle):hover,body.alh160-subpage .button:hover{background:#086957;color:white}
body.alh160-subpage .button.soft{background:#e7f6ed;color:#087462;border-color:#d6eadd}
body.alh160-subpage :is(input,select,textarea){font:inherit;max-width:100%}
body.alh160-subpage .search-panel :is(input,select),body.alh160-subpage .verse-search input{border-color:#cee1d5;background:white;color:#193f32;border-radius:11px}
body.alh160-subpage .feature-links a{background:#e9f6ef;color:#086d59;border-radius:10px}
body.alh160-subpage .notice{background:#fffaf0;border-color:#dab96a;color:#68542e}
body.alh160-subpage .arabic{font-family:'Noto Naskh Arabic','Amiri','Traditional Arabic',serif;font-size:clamp(1.45rem,2.65vw,2.05rem);direction:rtl;text-align:right;line-height:2.15;color:#194b3d}
body.alh160-subpage .arabic.excerpt{font-size:clamp(1.18rem,2.4vw,1.62rem)}
body.alh160-subpage .result h3{font-size:1.12rem}
/* Legal pages: keep form-free content but use same visual surfaces. */
body.alh160-subpage main.shell.main{max-width:1060px;margin:0 auto;padding:40px 22px 75px;min-height:62vh;width:100%}
body.alh160-subpage main.shell.main>.eyebrow{color:#087f6c}
body.alh160-subpage main.shell.main>h1{font-size:clamp(2rem,4vw,3rem);color:#1a3d33}
body.alh160-subpage main.shell.main .panel{padding:23px;margin:18px 0}
body.alh160-subpage .link-cards a{background:#fff;border-color:#d9eae0;border-radius:14px}
/* Shared footer is the only footer across public pages. */
.alh160-footer{display:block;position:relative;margin:0;width:100%;max-width:none;min-height:unset;padding:0;border-top:1px solid #dceae1;background:white;color:#647d6e;box-shadow:none}
.alh160-footer-inner{max-width:1180px;margin:0 auto;min-height:94px;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px 26px}
.alh160-footer-brand{font-weight:850!important;color:#078873!important;text-decoration:none;white-space:nowrap}
.alh160-footer-links{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.alh160-footer-links>a,.alh160-copyright,.alh160-copyright>a{color:#658072!important;font-weight:550;font-size:.83rem;text-decoration:none}
.alh160-footer-links>a:hover,.alh160-copyright>a:hover{color:#087e68!important;text-decoration:underline}
body.alh160-subpage.dark,body.alh160-main.dark{color-scheme:dark;background:#101f19;color:#e5f4ea;--bg:#101f19;--paper:#182c23;--surface:#182c23;--text:#e5f4ea;--ink:#e5f4ea;--muted:#aec7b9;--soft:#aec7b9;--border:#345445;--line:#345445;--subtle:#1c3e30;--main:#67d4ab;--brand:#67d4ab;--brand2:#23836b;--shadow:0 12px 25px #0002}
body:is(.alh160-subpage,.alh160-main).dark .alh160-site-header{background:#192d25;border-color:#345144}
body:is(.alh160-subpage,.alh160-main).dark .alh160-site-header .brand{color:#e0f3e9}
body:is(.alh160-subpage,.alh160-main).dark .alh160-site-header .alh160-primary>a,body:is(.alh160-subpage,.alh160-main).dark .alh160-more summary{color:#bcd9c9}
body:is(.alh160-subpage,.alh160-main).dark .alh160-header-search,body:is(.alh160-subpage,.alh160-main).dark .alh160-menu-toggle,body:is(.alh160-subpage,.alh160-main).dark .alh160-theme-toggle{background:#213d30;color:#e8f5ec;border-color:#365647}
body:is(.alh160-subpage,.alh160-main).dark .alh160-header-search input{color:#e8f5ed}
body:is(.alh160-subpage,.alh160-main).dark .alh160-header-search button{background:#295540;color:#cdf4dd}
body:is(.alh160-subpage,.alh160-main).dark .alh160-more-links{background:#20382e;border-color:#365647}
body:is(.alh160-subpage,.alh160-main).dark .alh160-more-links a{color:#e2f3e9!important}
body.alh160-subpage.dark .hero h1,body.alh160-subpage.dark h2,body.alh160-subpage.dark .hero .lead{color:#e4f3e9}
body.alh160-subpage.dark :is(.search-panel,.result,.card,.text-card,.facts,.book,.panel){background:#1b3025;color:#e4f3e9;border-color:#375847}
body.alh160-subpage.dark .arabic{color:#e3f6e9}
body.alh160-subpage.dark :is(.search-panel input,.search-panel select,.verse-search input){background:#213d2f;color:#e8f5ed}
body:is(.alh160-subpage,.alh160-main).dark .alh160-footer{background:#192d25;border-color:#345144}
body:is(.alh160-subpage,.alh160-main).dark .alh160-footer-links>a,body:is(.alh160-subpage,.alh160-main).dark .alh160-copyright{color:#b1d4bf!important}
@media(max-width:1250px){.alh160-nav-wrap{gap:12px}.alh160-header-search{width:165px}.alh160-primary{gap:12px}}
@media(max-width:1050px){.alh160-menu-toggle{display:inline-flex}.alh160-primary{display:none;position:absolute;left:16px;right:16px;top:calc(100% - 2px);background:white;border:1px solid #dceae2;border-radius:0 0 16px 16px;box-shadow:0 15px 32px #143a241e;padding:13px 17px;flex-direction:column;align-items:stretch;gap:2px;max-height:70vh;overflow:auto}.alh160-primary.is-open{display:flex}.alh160-primary>a,.alh160-more summary{padding:9px 12px!important}.alh160-more-links{position:static;box-shadow:none;border:0;padding:0}.alh160-header-search{margin-left:auto;width:clamp(150px,32vw,270px)}.alh160-site-header .brand{margin-right:0}body:is(.alh160-subpage,.alh160-main).dark .alh160-primary{background:#1b3025;border-color:#365647}}
@media(max-width:640px){.alh160-nav-wrap{padding:10px 14px;gap:9px;flex-wrap:wrap}.alh160-site-header .brand{font-size:1.13rem;flex:1}.alh160-header-search{order:4;width:100%;margin:0}.alh160-menu-toggle{order:2}.alh160-theme-toggle{order:3}.alh160-footer-inner{justify-content:flex-start;align-items:flex-start;flex-direction:column}.alh160-footer-links{gap:9px 15px}body.alh160-subpage main.wrap{width:calc(100% - 28px)}body.alh160-subpage .search-line{flex-direction:column}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* The original reader stylesheet switches to a menu at 1330px. Match that breakpoint. */
@media(max-width:1330px){
  .alh160-nav-wrap{display:flex;flex-wrap:wrap;position:relative;min-height:68px;gap:10px}
  .alh160-menu-toggle{display:inline-flex;order:3}
  .alh160-theme-toggle{order:4}
  .alh160-header-search{order:2;margin-left:auto}
  .alh160-primary{display:none;position:absolute;left:15px;right:15px;top:calc(100% - 2px);z-index:72;background:white;border:1px solid #dceae2;border-radius:0 0 14px 14px;padding:15px;box-shadow:0 16px 35px #143a241a;flex-direction:column;align-items:stretch;gap:3px;max-height:70vh;overflow:auto}
  .alh160-primary.is-open,.alh160-primary.reader-nav-open{display:flex}
  body:is(.alh160-subpage,.alh160-main).dark .alh160-primary{background:#1b3025;border-color:#365647}
}
@media(max-width:640px){
  .alh160-nav-wrap .brand{order:1;flex:1}
  .alh160-nav-wrap .alh160-header-search{order:6;flex-basis:100%;width:100%;max-width:none}
  .alh160-nav-wrap .alh160-menu-toggle{order:2}
  .alh160-nav-wrap .alh160-theme-toggle{order:3}
}
/* Consistent one-row navigation on tablet; avoid legacy reader grid search taking full width. */
@media(min-width:641px) and (max-width:1330px){
 .alh160-nav-wrap .alh160-header-search{flex:0 1 265px;width:clamp(170px,23vw,265px);max-width:265px;min-width:160px;margin-left:auto;order:2}
 .alh160-nav-wrap .brand{flex:0 0 auto;order:1}
}
