/* /khalwati-public-assets/reader-google-r1.css */
/* Customer Google Sign-In button only; preserve the existing Khalwati green/gold theme. */
.kh-r2-buttons .kh-google-btn{display:inline-flex;align-items:center;justify-content:center;gap:.75rem;min-height:48px;padding:.7rem 1.2rem;background:#fff;color:#263238;border:1px solid #c9cfd4;border-radius:12px;font-weight:700;font-size:1rem;box-shadow:0 2px 6px rgba(0,0,0,.07);cursor:pointer}
.kh-r2-buttons .kh-google-btn:hover:not(:disabled){background:#f6f9fc;border-color:#a4b1b8}
.kh-r2-buttons .kh-google-btn:focus-visible{outline:3px solid #a88c42;outline-offset:3px}
.kh-r2-buttons .kh-google-btn:disabled{opacity:.55;cursor:wait}
.kh-google-logo{display:inline-flex;align-items:center;justify-content:center;font-family:Arial,sans-serif;font-size:1.4rem;font-weight:700;line-height:1;width:1.6rem;height:1.6rem;color:#4285f4;direction:ltr}

/* /khalwati-public-assets/site-unified-r107.css */
/* Khalwati R10.7 - consolidated, non-destructive site fixes. Base R23 shell remains intact. */
:root{--kh107-green:#064c3b;--kh107-deep:#04382f;--kh107-gold:#c9a059;--kh107-ivory:#F7F5EF;--kh107-border:#d6dfd6}
html body{overflow-x:clip}
html body .kh23-header{isolation:isolate;background:linear-gradient(180deg,#064c3b,#053b31)!important;color:#f7f5ef!important;border-bottom:1px solid #cca45f!important;box-shadow:0 3px 9px rgba(3,55,42,.12)!important}
html body .kh23-header::after{pointer-events:none}
html body .kh23-header .kh23-brand,html body .kh23-header .kh23-brand span{color:#fff8e9!important}
html body .kh23-header .kh23-nav>a,html body .kh23-header .kh23-nav>a.kh107-khatma-link{color:#f6f4e9!important;font-family:Tajawal,system-ui,sans-serif!important;font-weight:750!important;background:transparent!important;border:0!important;box-shadow:none!important;margin:0!important;padding:0 10px!important;border-radius:7px!important;font-size:15px!important;min-height:38px!important;display:inline-flex!important;align-items:center!important;text-decoration:none!important;white-space:nowrap!important}
html body .kh23-header .kh23-nav>a:hover,html body .kh23-header .kh23-nav>a:focus-visible{color:#f7d78e!important;background:#ffffff19!important}
html body .kh23-header .kh23-nav>a[aria-current="page"]{color:#f7d78e!important}
html body .kh23-panel a.kh107-khatma-link{color:#064c3b!important;font-weight:800!important;background:#f6f1e6!important}
html body .kh23-footer{background:linear-gradient(110deg,#04382f,#075440)!important;color:#f7f5ef!important;border-top:2px solid #c9a059!important;box-shadow:none!important}
html body .kh23-footer .kh23-brand,html body .kh23-footer .kh23-foot-links a{color:#fff9e9!important}
html body .kh23-footer .kh23-foot-links a:hover,html body .kh23-footer .kh23-foot-links a[aria-current="page"]{color:#f3d396!important}
html body .kh23-header~.kh23-header{display:none!important} /* fallback if stale script injects duplicates */
/* Compact, consistent banner geometry only on home page. */
body.home-refined .kh104-home-latest,body.home-refined .kh102-promo-pair{box-sizing:border-box!important;width:min(1160px,calc(100% - 32px))!important;max-width:1160px!important;margin-inline:auto!important}
body.home-refined .kh104-home-latest{border:1px solid var(--kh107-gold)!important;border-radius:17px!important;padding:14px 16px!important;margin-block:12px!important;background:#fcfaf4!important;min-height:unset!important;box-shadow:0 2px 12px #08372b0d!important}
body.home-refined .kh104-home-latest .kh104-feed-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
body.home-refined .kh102-promo-pair{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important;gap:14px!important;padding:0!important;margin-block:13px 18px!important;border:0!important;background:transparent!important}
body.home-refined .kh102-promo-pair>article{box-sizing:border-box!important;width:100%!important;min-height:156px!important;padding:16px 18px!important;border:1px solid #c9a059!important;border-radius:17px!important;box-shadow:0 4px 12px #063f3014!important}
body.home-refined .kh102-promo-pair h2{font-size:clamp(1.15rem,2vw,1.5rem)!important;line-height:1.4!important;margin:3px 0 6px!important}
body.home-refined .kh102-promo-pair p{font-size:.89rem!important;line-height:1.5!important;margin:3px 0 9px!important}
body.home-refined .kh102-promo-pair a{min-height:39px!important;box-sizing:border-box!important;border-radius:11px!important;padding:7px 12px!important;font-family:Tajawal,system-ui,sans-serif!important}
body.home-refined .kh104-home-latest .kh104-feed-card{min-width:0!important;min-height:0!important;box-sizing:border-box!important;border-radius:14px!important;padding:12px!important}
body.home-refined .kh104-feed-head{align-items:center!important;gap:12px!important}
body.home-refined .kh104-feed-head h2{font-size:clamp(1.15rem,2.2vw,1.55rem)!important}
/* Khatma list/layout: equal borders, heights only when content permits. */
#kh-main .kh-r95-steps>*{box-sizing:border-box!important;min-width:0!important}
#kh-main .kh-r96-switch-card,#kh-main .kh-r96-choice,#kh-main .kh-r96-side-card,#kh-main .kh-panel{box-sizing:border-box!important;border-width:1px!important;border-style:solid!important}
body .kh104-public-feed .kh104-feed-card,body .kh104-home-latest .kh104-feed-card{box-sizing:border-box!important;border:1px solid #d5e0d8!important;border-radius:14px!important}
/* QR modal: visible white modules and equal padding; drawn from original path in PNG. */
body .kh106-share-dialog{box-sizing:border-box!important;max-width:min(440px,calc(100vw - 24px))!important;width:100%!important;padding:18px!important;border:1px solid var(--kh107-gold)!important;border-radius:18px!important;background:#fffdf8!important;color:#064c3b!important;font-family:Tajawal,system-ui,sans-serif!important}
body .kh106-share-dialog .kh104-big-qr{box-sizing:border-box!important;padding:12px!important;margin:12px auto!important;border-radius:14px!important;background:#fff!important;border:1px solid #d8e4db!important;max-width:100%!important}
body .kh106-share-dialog img.kh106-qr-image{box-sizing:border-box!important;width:212px!important;height:212px!important;max-width:100%!important;object-fit:contain!important;background:#fff!important;border:8px solid white!important;border-radius:8px!important}
body .kh106-share-dialog .kh104-dialog-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
body .kh106-share-dialog .kh104-dialog-actions button{box-sizing:border-box!important;min-width:0!important;padding:10px 7px!important;font:800 .86rem/1.4 Tajawal,system-ui,sans-serif!important;border-radius:10px!important}
@media(max-width:1120px){html body .kh23-header .kh23-nav>a{padding-inline:7px!important}}
@media(max-width:1020px){html body .kh23-header .kh23-nav{display:none!important}}
@media(max-width:850px){body.home-refined .kh104-home-latest .kh104-feed-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}body.home-refined .kh102-promo-pair{grid-template-columns:1fr!important}body.home-refined .kh102-promo-pair>article{min-height:0!important}}
@media(max-width:580px){body.home-refined .kh104-home-latest,body.home-refined .kh102-promo-pair{width:calc(100% - 24px)!important}body.home-refined .kh104-home-latest .kh104-feed-cards{grid-template-columns:1fr!important}body.home-refined .kh104-feed-head{align-items:stretch!important;flex-direction:column!important}body .kh106-share-dialog .kh104-dialog-actions{grid-template-columns:1fr!important}}
@media(prefers-reduced-motion:reduce){html body .kh23-header *{transition:none!important}}

/* R10.8 unified additions: exactly one home khatma banner; accessible nav / social tiles */
body.home-refined .kh108-one-banner{width:min(1160px,calc(100% - 32px));box-sizing:border-box;margin:14px auto 16px;padding:clamp(17px,2.7vw,27px);border:1px solid #c9a059;border-radius:18px;background:linear-gradient(112deg,#075743,#064233);color:#fff9eb;display:flex;gap:20px;align-items:center;justify-content:space-between;min-width:0}
body.home-refined .kh108-one-content{flex:1 1 50%;min-width:0}body.home-refined .kh108-one-banner h2{margin:3px 0 8px;color:#fff9eb;font:700 clamp(1.3rem,2vw,1.75rem)/1.5 Amiri,Tajawal,serif}
body.home-refined .kh108-one-banner p{font:500 clamp(.85rem,1.1vw,.98rem)/1.7 Tajawal,system-ui,sans-serif;color:#e5f1eb;margin:0}
body.home-refined .kh108-one-banner .kh108-kicker{color:#f3d091;font:700 .85rem/1.5 Tajawal,system-ui,sans-serif}
body.home-refined .kh108-one-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;flex:0 1 410px;min-width:0}
body.home-refined .kh108-one-actions a{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;border:1px solid #afc8b5;border-radius:12px;padding:10px 12px;min-height:43px;font:800 .91rem/1.4 Tajawal,system-ui,sans-serif;color:#fff9ed;background:#ffffff16}
body.home-refined .kh108-one-actions a.kh108-primary,body.home-refined .kh108-one-actions a.kh108-google{background:#f3dca6;border-color:#f3dca6;color:#063f33}
body.home-refined .kh108-one-actions a:hover{filter:brightness(1.1);transform:translateY(-1px)}body.home-refined .kh108-one-actions a:focus-visible{outline:3px solid #ffe2a0;outline-offset:3px}
/* Service links are responsive, dark readable text for selected/hover/focus states. */
body.home-refined .community-home .community-grid{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:center;gap:8px 12px;max-width:1100px;margin-inline:auto;overflow:visible!important}
body.home-refined .community-home .community-grid>a.community-card{position:relative;box-sizing:border-box;min-width:150px;flex:1 1 155px;max-width:230px;display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:10px 12px!important;color:#073f34!important;background:#fffdf7!important;border:1px solid #e5d6b7!important;border-radius:999px!important;white-space:normal;overflow-wrap:break-word;text-align:center;text-decoration:none;font-family:Tajawal,system-ui,sans-serif!important}
body.home-refined .community-home .community-grid>a.community-card strong{color:#073f34!important;font:800 .9rem/1.55 Tajawal,system-ui,sans-serif!important;white-space:normal!important}
body.home-refined .community-home .community-grid>a.community-card:is(:hover,:focus-visible,:active){background:#f1d899!important;border-color:#c9a059!important;color:#073f34!important}
body.home-refined .community-home .community-grid>a.community-card:is(:hover,:focus-visible,:active) strong{color:#073f34!important}
body.home-refined .community-home .community-card .channel-icon{flex:none!important}
body.home-refined .community-home .community-card .channel-arrow{display:none!important}
/* Keep page menu's Khatma item legible on phone and tablet. */
html body .kh23-panel a[href="/khatma.html"],html body .drawer-panel a[href="/khatma.html"]{color:#073f34!important;font:800 1rem/1.5 Tajawal,system-ui,sans-serif!important;display:flex!important;align-items:center;min-height:43px;padding:9px 13px;border-radius:11px;background:#f3ead5!important;text-decoration:none!important}
html body .kh23-panel a[href="/khatma.html"]:focus-visible,html body .drawer-panel a[href="/khatma.html"]:focus-visible{outline:3px solid #c9a059;outline-offset:2px}
@media(max-width:860px){body.home-refined .kh108-one-banner{flex-direction:column;align-items:stretch;gap:13px}body.home-refined .kh108-one-actions{flex:1 1 auto;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){body.home-refined .kh108-one-banner{width:calc(100% - 24px);padding:17px 15px;border-radius:15px}body.home-refined .kh108-one-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.home-refined .kh108-one-actions a{font-size:.84rem;padding:10px 7px}body.home-refined .community-home .community-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}body.home-refined .community-home .community-grid>a.community-card{width:100%;min-width:0;max-width:none;min-height:54px;padding:9px 7px!important}body.home-refined .community-home .community-grid>a.community-card strong{font-size:.86rem!important}}
@media(max-width:340px){body.home-refined .kh108-one-actions{grid-template-columns:1fr}body.home-refined .community-home .community-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){body.home-refined .kh108-one-actions a:hover{transform:none}}


/* R10.8: Khatma / Hisn shared visual tokens; scoped to Khatma to preserve Firebase behavior. */
#kh-main.kh-khatma {--kh108-ivory:#f7f5ef;--kh108-green:#173e35;--kh108-gold:#a27b39;color:var(--kh108-green);background:var(--kh108-ivory)}
#kh-main.kh-khatma .kh-panel{box-sizing:border-box;border-radius:18px;border:1px solid #d9dfd7;box-shadow:0 3px 15px #133f3110}
#kh-main.kh-khatma :is(button,input,select,textarea){font-family:Tajawal,system-ui,sans-serif}
#kh-main.kh-khatma :is(button,a,input,select,textarea):focus-visible{outline:3px solid #c19a4e!important;outline-offset:3px}
#kh-main.kh-khatma .kh-r96-choice-grid{grid-auto-rows:1fr;gap:10px}
#kh-main.kh-khatma .kh-r96-choice{box-sizing:border-box;min-width:0;min-height:95px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:14px 12px!important;border:1px solid #d8dfd6;border-radius:14px;background:#fffdfa;color:#173e35;text-align:right}
#kh-main.kh-khatma .kh-r96-choice b{color:#173e35;white-space:normal;word-break:normal;overflow-wrap:break-word;line-height:1.5}
#kh-main.kh-khatma .kh-r96-choice small{color:#5f7569;white-space:normal;line-height:1.55;overflow-wrap:break-word}
#kh-main.kh-khatma .kh-r96-choice:has(input:checked){border-color:#a27b39;background:#f7efdb;box-shadow:inset 0 0 0 1px #d6bc80,0 2px 6px #143d3410}
#kh-main.kh-khatma .kh-r96-choice:has(input:checked) b{color:#0b4f3b}
#kh-main.kh-khatma .kh-r96-choice:has(input:disabled){cursor:not-allowed;opacity:.62;background:#f3f1ec}
#kh-main.kh-khatma .kh-r96-top-actions :is(button,a){min-height:44px;box-sizing:border-box;white-space:normal;line-height:1.5}
#kh-main.kh-khatma .kh104-feed-card{box-sizing:border-box;min-width:0;max-width:100%;border-radius:14px;border:1px solid #d4dfd6}
#kh-main.kh-khatma .kh104-feed-card :is(button,a){min-height:40px;border-radius:11px}
#kh-main.kh-khatma .kh-r96-services-banner{display:none!important} /* Requested removal of redundant second services banner on Khatma */
@media(max-width:780px){#kh-main.kh-khatma .kh-r96-form-grid{grid-template-columns:minmax(0,1fr)!important}#kh-main.kh-khatma .kh-r96-choice-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}#kh-main.kh-khatma .kh-r96-choice-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:410px){#kh-main.kh-khatma .kh-r96-choice-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}#kh-main.kh-khatma .kh-r96-choice{min-height:88px;padding:10px!important}#kh-main.kh-khatma .kh-r96-choice b{font-size:.94rem}#kh-main.kh-khatma .kh-r96-choice small{font-size:.8rem}}
@media(max-width:320px){#kh-main.kh-khatma .kh-r96-choice-grid-3,#kh-main.kh-khatma .kh-r96-choice-grid-2{grid-template-columns:1fr}}


/* R10.8.2 • Community services: consistent RTL card layout and readable focus/selection. */
body.home-refined .community-home .community-grid {
 direction:rtl;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:1000px;margin-inline:auto;align-items:stretch;justify-content:stretch;
}
body.home-refined .community-home .community-grid>a.community-card {
 direction:rtl;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:11px;
 width:100%;min-width:0;max-width:none;min-height:66px;padding:12px 16px!important;
 border:1px solid #dcc69f!important;border-radius:15px!important;
 background:#fffdf8!important;color:#073f34!important;
 text-align:right!important;box-shadow:0 3px 13px #073f340a;
 font:700 15px/1.5 Tajawal,system-ui,sans-serif!important;
}
body.home-refined .community-home .community-grid>a.community-card .channel-icon {
 flex:0 0 40px!important;width:40px!important;height:40px!important;margin:0!important;
 display:grid!important;place-items:center!important;order:0!important;
 border-radius:12px!important;background:#e5f1e9!important;color:#0c5b46!important;
}
body.home-refined .community-home .community-grid>a.community-card .channel-icon svg {width:21px;height:21px;max-width:21px;max-height:21px;}
body.home-refined .community-home .community-grid>a.community-card strong {
 color:#073f34!important;flex:1 1 auto;text-align:right!important;font:800 clamp(14px,1.35vw,16px)/1.5 Tajawal,system-ui,sans-serif!important;
}
body.home-refined .community-home .community-grid>a.community-card:is(:hover,:active),
body.home-refined .community-home .community-grid>a.community-card[aria-current="page"] {
 background:#f2dfb8!important;border-color:#b58b47!important;color:#073f34!important;
}
body.home-refined .community-home .community-grid>a.community-card:focus-visible {
 outline:3px solid #a27b39!important;outline-offset:3px!important;background:#fff3d8!important;
}
@media(max-width:710px){
 body.home-refined .community-home .community-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
 body.home-refined .community-home .community-grid>a.community-card {min-height:63px;padding:10px 11px!important;gap:8px;border-radius:13px!important;}
 body.home-refined .community-home .community-grid>a.community-card .channel-icon {flex-basis:35px!important;width:35px!important;height:35px!important;border-radius:10px!important;}
 body.home-refined .community-home .community-grid>a.community-card strong {font-size:14px!important;}
}
@media(max-width:350px){body.home-refined .community-home .community-grid {grid-template-columns:1fr;}}

