/* Exact opt-in surfaces only; shared chrome and approved reading pages are untouched. */
body[data-ux-stage6]{--ux-read:18px;--ux-small:14px}
body[data-ux-stage6] :is(main,.page-404,.page-offline,.container,.page-wrap){min-width:0}
body[data-ux-stage6="public"] :is(.qm-faq-a,.qm-lede,.lede,.lead,.about-copy,.why-copy,.tf-copy,.lg-copy,.rs-intro,.rs-desc,.ch-blurb,.ch-note,.ch-ax p,.privacy-content p){font-size:var(--ux-read);line-height:1.9}
body[data-ux-stage6="public"] :is(.qm-faq-q,.qm-case-title,.ch-title,.rs-group-t,.lg-tip h3){font-size:20px;line-height:1.6}
body[data-ux-stage6="public"] :is(main p,main li){line-height:1.9}
body[data-ux-stage6="public"] :is(main h1){font-size:40px;line-height:1.35}
body[data-ux-route="privacy.html"] main{width:min(100% - 32px,820px);margin-inline:auto}
body[data-ux-route="privacy.html"] main :is(p,li){font-size:var(--ux-read)}
body[data-ux-route="privacy.html"] main h2{font-size:24px;line-height:1.5;margin-block:32px 12px}
body[data-ux-stage6] :is(main,.page-404,.page-offline,.container,.page-wrap) :is(button,input,select){min-height:44px;font-size:16px;box-sizing:border-box}
body[data-ux-stage6] :is(main,.page-404,.page-offline,.container,.page-wrap) :is(button,a,input,select,summary,[tabindex="0"]):focus-visible{outline:2px solid var(--qawlat-gold-bright,#c5942d);outline-offset:2px;box-shadow:0 0 0 6px var(--qawlat-focus-halo,rgba(7,18,13,.92))}
body[data-ux-stage6] :is(.ux-table-scroll){max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
body[data-ux-stage6] :is(.qaw-search-input,.search-input,.cmp-input){font-size:16px;min-height:44px;max-width:100%;min-width:0}
body[data-ux-stage6="special"] :is(.qaw-filter-bar,.filter-bar,.search-bar,.cmp-form){flex-wrap:wrap;gap:12px}
body[data-ux-stage6="special"] :is(.lead,.intro,.description,.desc,.modal-description,.qaw-ab-modal-body p,.asma-modal-body p,.dua-lataif,.lataif-body){font-size:var(--ux-read);line-height:1.9}
body[data-ux-stage6="special"] :is(.meta,.chip,.qaw-kicker,.qaw-results-bar,.results-count,.card-meta,.qaw-ab-meta,.qaw-ant-meta){font-size:14px;line-height:1.6}
body[data-ux-stage6="special"] :is(.qaw-ab-modal-close,.asma-modal-close,.qaw-search-clear,.search-clear){min-width:44px;min-height:44px}
body[data-ux-stage6="special"] :is(.qaw-ab-card,.qaw-ant-card,.asma-card){border-radius:12px}
body[data-ux-stage6="special"] :is(.qaw-ab-modal-card,.asma-modal){max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:12px}
body[data-ux-stage6="special"] :is(.qaw-ab-modal-body,.asma-modal-body){overscroll-behavior:contain}
body[data-ux-route="stats/compare.html"] .cmp-input{width:100%}
body[data-ux-route="stats/compare.html"] :is(.cmp-grid,.cmp-selectors){min-width:0}
body[data-ux-route="logo.html"] .lg-hot{width:44px;height:44px}
body[data-ux-route="logo.html"] .lg-dot{min-width:44px!important;min-height:44px!important;font-size:14px}
body[data-ux-route="logo.html"] .lg-tip{font-size:17px;line-height:1.8;max-width:min(330px,calc(100vw - 32px))}
body[data-ux-route="logo.html"] .lg-hot[data-open] .lg-tip{z-index:20}
body[data-ux-route="resources/index.html"] .rs-card{min-width:0;overflow-wrap:anywhere}
body[data-ux-route="resources/index.html"] :is(.rs-meta,.rs-type,.rs-size){font-size:14px;line-height:1.6}
.ux-resource-format{display:block;font-size:14px;line-height:1.6;color:var(--qm-muted,var(--qawlat-text-soft));margin-block-start:10px}
body[data-ux-route="channel/index.html"] :is(.ch-watch,.ch-rel){display:inline-flex;align-items:center;min-height:44px;padding-block:7px;font-size:16px}
body[data-ux-route="channel/index.html"] .ch-act{flex-wrap:wrap;gap:8px}
body[data-ux-stage6="error"] :is(.page-404,.page-offline){width:min(100% - 32px,680px);margin-inline:auto}
body[data-ux-stage6="error"] .err-title{font-size:32px;line-height:1.5}
body[data-ux-stage6="error"] .err-msg{font-size:17px;line-height:1.9}
body[data-ux-stage6="error"] .err-actions a{min-height:48px;font-size:16px}
.ux-recovery-search{width:min(100%,460px);margin:24px auto;text-align:start}
.ux-recovery-search label{display:block;font-size:16px;margin-bottom:8px}
.ux-recovery-search>div{display:flex;gap:8px}.ux-recovery-search input{min-width:0;flex:1;border:1px solid var(--qm-border);background:var(--qm-surface);color:var(--qm-text);border-radius:8px;padding:8px 12px}.ux-recovery-search button{border:0;border-radius:8px;background:var(--qawlat-green);color:var(--qawlat-on-green);padding:8px 20px}
.ux-route-status{font-size:14px;line-height:1.6;color:var(--qm-muted,var(--qawlat-text-soft))}
.ux-auxiliary{border:1px solid var(--qm-border,var(--qawlat-border));border-radius:12px;margin-block:16px;background:var(--qm-surface,var(--qawlat-surface))}
.ux-auxiliary>summary{padding:12px 16px;font-size:16px;min-height:48px;cursor:pointer}
.ux-auxiliary>div{padding:0 12px 12px}
@media(max-width:640px){body[data-ux-stage6]{--ux-read:17px}body[data-ux-stage6="public"] main h1{font-size:32px}body[data-ux-stage6="special"] :is(.qaw-ab-grid,.qaw-ant-grid,.asma-grid){grid-template-columns:minmax(0,1fr)}body[data-ux-stage6="special"] :is(.cmp-grid,.cmp-selectors){grid-template-columns:minmax(0,1fr)}body[data-ux-stage6="public"] :is(.rs-grid,.ch-grid){grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){body[data-ux-stage6] *,body[data-ux-stage6] *::before,body[data-ux-stage6] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{body[data-ux-stage6] .ux-table-scroll{overflow:visible}body[data-ux-stage6] .ux-auxiliary>*{display:block!important}body[data-ux-stage6] .ux-auxiliary>summary{display:none!important}.ux-recovery-search{display:none}}

body[data-ux-stage6="special"] :is(.qm-crest-mini__lead,.method-body,.qaw-ab-modal-body,.asma-modal-body){font-size:var(--ux-read);line-height:1.9}
body[data-ux-stage6="special"] :is(.toolbar,.ux-auxiliary,.method-card){width:min(100% - 32px,1200px);margin-inline:auto;box-sizing:border-box}
body[data-ux-stage6="special"] .toolbar{padding:0;margin-block:20px 12px}
body[data-ux-stage6="special"] .ux-auxiliary .kpi-strip{margin:0;padding:8px;max-width:none}
body[data-ux-stage6="special"] .ux-auxiliary .qaw-kpi-strip{margin:0}
body[data-ux-stage6="special"] .search-card>.ux-auxiliary{width:100%;margin:12px 0 0}
body[data-ux-stage6="special"] :is(.kpi-label,.qaw-kpi .l,.filter-group__head,.sort-label){font-size:14px;line-height:1.6}
body[data-ux-stage6="special"] :is(.fihris-row,.kpi-card[data-filter],.filter-group__head[data-has-toggle]){min-height:44px;cursor:pointer}
body[data-ux-stage6="special"] :is(.qaw-btn-g,.chip,.qaw-bab-chip,.reset-btn){min-height:44px;font-size:16px}
body[data-ux-stage6="special"] :is(.qaw-btn-g,.reset-btn) svg{width:20px;height:20px;flex-shrink:0}
body[data-ux-stage6="special"] :is(.qaw-ab-modal-close,.asma-modal-close){width:44px;height:44px}
body[data-ux-stage6="special"] .search-wrap input{font-size:16px;min-height:48px}

html body.theme-modern[data-ux-stage6="public"]{background-image:none}

body[data-ux-stage6] .ux-retry{display:block;min-height:44px;margin:18px auto 0;padding:8px 20px;border:1px solid var(--qm-border,var(--qawlat-border));border-radius:8px;font:inherit;font-size:16px;background:var(--qm-surface,var(--qawlat-surface));color:var(--qm-text,var(--qawlat-text));cursor:pointer}
body[data-ux-route="stats/methodology.html"] :is(.section-intro,.subtitle){font-size:var(--ux-read);line-height:1.9}
body[data-ux-route="stats/methodology.html"] :is(.stat-pill,.meth-note){font-size:14px;line-height:1.6}
body[data-ux-route="stats/compare.html"] .cmp-suggest-item{min-height:44px;font-size:16px;display:flex;align-items:center}
body[data-ux-stage6="special"] .method-card summary{min-height:44px;font-size:16px}

body[data-ux-stage6="special"] :is(.qaw-ab-head,.qaw-ant-head) .ux-auxiliary{width:100%;margin-block:12px 0}body[data-ux-stage6="special"] :is(.qaw-ab-head,.qaw-ant-head) .ux-auxiliary .lead{margin-block:6px}
@media print{body[data-ux-stage6] details::details-content{content-visibility:visible!important;display:block!important}}

body[data-ux-route="logo.html"] .lg-tip{width:min(300px,calc(100vw - 32px));transform:translate(var(--ux-tip-x,0px),calc(-50% + var(--ux-tip-y,0px)))!important;max-height:calc(100dvh - 96px);overflow:auto}
body[data-ux-route="logo.html"] .lg-tip p{font-size:var(--ux-read);line-height:1.9}
body[data-ux-route="logo.html"] .lg-tip b{font-size:18px;line-height:1.6}
body[data-ux-route="logo.html"] .lg-tip a{min-height:44px;font-size:16px}
body[data-ux-route="logo.html"] .lg-hot:not([data-open]):not(:hover) .lg-tip{opacity:0;visibility:hidden;pointer-events:none}

body[data-ux-route="logo.html"] .lg-hot.ux-tip-dismissed:not([data-open]) .lg-tip{opacity:0;visibility:hidden;pointer-events:none}
@media(hover:none){body[data-ux-route="logo.html"] .lg-hot:not([data-open]) .lg-tip{opacity:0;visibility:hidden;pointer-events:none}}

/* Reading colors are separate from ornamental gold and shared navigation tokens. */
body[data-ux-stage6]{--ux-gold-ink:#735117;--ux-muted-ink:#526359;--ux-read-ink:#172d24}
body.dark[data-ux-stage6]{--ux-gold-ink:#e6c462;--ux-muted-ink:#b8c8bf;--ux-read-ink:#eef5f0}
body[data-ux-route="logo.html"] .lg-tip{max-height:min(var(--ux-tip-max-height,100dvh),calc(100dvh - 96px))}
body[data-ux-route="stats/duas.html"] :is(.pagination button){min-height:44px;font-size:16px}
body[data-ux-route="stats/asma.html"] .chip.active{background:#173a2f;color:#fff;border-color:#527862}
body[data-ux-route="stats/asma.html"] .chip.active .chip__count{color:#fff;opacity:1}
body[data-ux-route="stats/asma.html"] .method-body h3{color:var(--ux-gold-ink)!important}
body[data-ux-route="stats/asma.html"] .fihris-row-num{color:var(--ux-muted-ink);opacity:1;font-size:14px}
body[data-ux-route="stats/duas.html"]{--duas-text-fade:var(--ux-muted-ink)}
body[data-ux-route="stats/duas.html"] :is(.meta-pill--theme,.detail-box__value strong){color:var(--ux-gold-ink)}
body.dark[data-ux-route="stats/duas.html"]{--duas-gold:#e6c462}
body[data-ux-stage6="public"] :is(.qm-name-rosette,.qm-quote-rosette,.ch-start,.ch-watch,.rs-card-f,.rs-license b){color:var(--ux-gold-ink)}
body[data-ux-route="why.html"] .qm-mini-steps li b{color:var(--ux-read-ink)}
body:is([data-ux-route="about.html"],[data-ux-route="why.html"],[data-ux-route="ai-guide.html"],[data-ux-route="tafsir.html"]) main a.primary{color:#fff;background:#173a2f;border-color:#173a2f}
body[data-ux-route="stats/abwab.html"] .qaw-bab-chip.active{background:#173a2f;color:#fff}
body[data-ux-route="stats/abwab.html"] .qaw-bab-chip.active .num{background:transparent;color:#fff;font-size:14px}

body[data-ux-route="stats/asma.html"] .chip.active{background:#173a2f!important;color:#fff!important;border-color:#527862!important}
body[data-ux-route="stats/asma.html"] .chip.active .chip__count{color:#fff!important;opacity:1;background:transparent!important}
body[data-ux-route="stats/ngrams.html"] .qaw-hubtabs .ic{color:var(--ux-gold-ink)!important}
body[data-ux-route="stats/ngrams.html"] .qaw-hubtabs button{min-height:44px;font-size:16px}

.ux-tier-note{width:min(100% - 40px,820px);margin:12px auto 0;font-size:14px;line-height:1.8;color:var(--ux-muted-ink);text-align:center}
body[data-ux-route="stats/methodology.html"] .meth-hero{padding-block:20px}
body[data-ux-route="stats/methodology.html"] .meth-hero .toc-jump{position:static;width:100%;margin:16px 0;padding:8px;display:flex;flex-wrap:wrap;gap:8px}
body[data-ux-route="stats/methodology.html"] .toc-jump a{min-height:44px;display:inline-flex;align-items:center;font-size:16px}
body[data-ux-route="stats/methodology.html"] .ux-method-intro{margin-block:12px;width:100%}
body[data-ux-route="stats/methodology.html"] .ux-method-intro>div>div[style]{font-size:var(--ux-read)!important;line-height:1.9!important}
.ux-guide-icon{vertical-align:middle;margin-inline-end:4px}
body[data-ux-route="logo.html"] .lg-dot::after{inset:0}
body[data-ux-route="logo.html"] :is(.lg-hot:hover,.lg-hot[data-open]) .lg-dot{transform:none}
@media(max-width:860px){body[data-ux-route="logo.html"] .grow-fig{width:min(280px,82vw)}}
body[data-ux-route="stats/methodology.html"] .meth-hero h1{font-size:40px;line-height:1.35}
@media(max-width:640px){body[data-ux-route="stats/methodology.html"] .meth-hero h1{font-size:32px}}

/* Explicit foregrounds for controls inside original gradient/green surfaces. */
body[data-ux-route="stats/asma.html"] .qm-crest-mini .ux-tier-note{color:#d5e3da}
body[data-ux-route="channel/index.html"] .ch-cta .primary{color:#102a20!important;background:#e6c462}
body[data-ux-route="logo.html"] .lg-btn.fill{color:#fff!important;background:#173a2f}
body[data-ux-route="stats/methodology.html"] .stat-pill{color:var(--ux-read-ink)!important}
body[data-ux-stage6]{--ux-cloud-2:#173a2f;--ux-cloud-3:#2c5b4a;--ux-cloud-4:#1a5c9c}
body.dark[data-ux-stage6]{--ux-cloud-2:#b9e5cd;--ux-cloud-3:#93d6b7;--ux-cloud-4:#9ecbff}

/* Block formatting prevents stale inline overflow when resizing the light-DOM hub. */
body[data-ux-route="stats/ngrams.html"] structures-hub{display:block;min-width:0}
