/* R198: scoped reading rhythm; source content and Quran/tafsir layouts stay independent. */
.qh-hadith-page .qh-form .qh-search-categories{display:flex;flex-wrap:wrap;gap:8px 12px;margin:0;padding:10px 0 14px}
.qh-hadith-page .qh-form .qh-search-categories>legend{font-size:13px;margin-bottom:6px}
.qh-hadith-page .qh-form .qh-search-categories>label{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:44px;margin:0;padding:8px 12px;border:1px solid #d6dfd1;border-radius:9px;font:600 13px/1.5 system-ui;cursor:pointer}
.qh-hadith-page .qh-form .qh-search-categories>label:has(:checked){background:#edf3e7;border-color:#8da88d;color:#174b31}
.qh-hadith-page .qh-search-categories input[type=radio]{appearance:auto;width:17px;height:17px;margin:0;flex:0 0 17px;accent-color:#195536}
.qh-hadith-page .qh-search-refine{margin:20px 0 16px;border:1px solid #d9e1d4;border-radius:12px;background:#fbfbf5;overflow:hidden}
.qh-hadith-page .qh-search-refine>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:12px 18px;cursor:pointer;list-style:none}
.qh-hadith-page .qh-search-refine>summary::-webkit-details-marker{display:none}
.qh-hadith-page .qh-search-refine>summary strong{font:650 14px/1.6 system-ui;color:#245039}
.qh-hadith-page .qh-search-refine>summary strong:after{content:' +';margin-inline-start:8px}
.qh-hadith-page .qh-search-refine[open]>summary strong:after{content:' −'}
.qh-hadith-page .qh-search-refine>summary>span{font:13px/1.7 system-ui;color:#56674e;text-align:end;overflow-wrap:anywhere;min-width:0}
.qh-hadith-page .qh-search-refine>summary bdi{unicode-bidi:isolate}
.qh-hadith-page .qh-search-refine>.qh-search-panel{margin:0;border:0;border-top:1px solid #e1e6da;border-radius:0;box-shadow:none}
.qh-hadith-page.qh-has-search .qh-hero{padding:8px 0 18px}
.qh-hadith-page.qh-has-search .qh-hero h1{font-size:38px;margin:8px 0 0}
.qh-hadith-page.qh-has-search .qh-hero>p{display:none}
.qh-hadith-page.qh-has-search .qh-tabs{margin-block:18px}
.qh-hadith-page .qh-results-help{font-size:14px;line-height:1.75;color:#53654e}
.qh-hadith-page .qh-result-count{font-size:13px;line-height:1.7;white-space:normal}
.qh-hadith-page .qh-hadith-family>header>span{font-size:13px;color:#52674e}
.qh-hadith-page .qh-hadith-table thead th{font-size:12px;letter-spacing:.045em;white-space:nowrap}
.qh-hadith-page .qh-hadith-record summary{min-height:48px;align-items:center;gap:14px}
.qh-hadith-page .qh-record-copy strong{font:600 14px/1.8 system-ui}
.qh-hadith-page .qh-record-copy bdi[lang=ar]{font:18px/1.9 'IHA LPMQ',serif;unicode-bidi:isolate}
.qh-hadith-page .qh-record-copy small{font:13px/1.7 system-ui;color:#52674e}
.qh-hadith-page .qh-hadith-family>.qh-table-shell .qh-row-book{display:none}
.qh-hadith-page .qh-fold-action{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:100px;padding:10px 12px;font:600 12px/1.5 system-ui;flex:0 0 auto}
.qh-hadith-page .qh-source-link{display:inline-flex;align-items:center;min-height:44px;margin-top:2px;font-size:13px}
.qh-hadith-page .qh-row-type{display:inline-block;font:600 12px/1.6 system-ui;color:#52664d}
.qh-hadith-page .qh-source-expanded>td{padding:0!important}
.qh-hadith-page .qh-hadith-record-body{padding:20px 24px!important}
.qh-hadith-page .qh-hadith-record-body>.qh-hadith-view{width:100%;max-width:820px;margin:18px auto 0}
.qh-hadith-page .qh-hadith-record-body .qh-hadith-heading{display:none}
.qh-hadith-page .qh-hadith-section{padding:0 6px}
.qh-hadith-page .qh-hadith-sanad{border:0;border-radius:0;background:transparent}
.qh-hadith-page .qh-hadith-matan{padding-top:22px;margin-top:22px;border-top:1px solid #dce3d5}
.qh-hadith-page .qh-hadith-section-label{font:600 13px/1.6 system-ui!important;letter-spacing:.04em;text-transform:none;margin-bottom:12px!important;color:#52654d}
.qh-hadith-page .qh-hadith-matan>.qh-hadith-section-label{color:#194e33}
.qh-hadith-page .qh-hadith-view .qh-prose{line-height:2!important}
.qh-hadith-page .qh-hadith-bibliography{width:100%;max-width:820px;margin:0 auto 16px;padding:0;background:transparent;border:0;border-bottom:1px solid #dce3d5;border-radius:0;color:#4c604b;font:13px/1.8 system-ui}
.qh-hadith-page .qh-hadith-bibliography>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px;padding:8px 0;list-style:none;cursor:pointer}
.qh-hadith-page .qh-hadith-bibliography>summary::-webkit-details-marker{display:none}
.qh-hadith-page .qh-citation-action{font-weight:600;color:#28583b}
.qh-hadith-page .qh-citation-action:after{content:' +'}
.qh-hadith-page .qh-hadith-bibliography[open] .qh-citation-action:after{content:' −'}
.qh-hadith-page .qh-source-citation{margin:0;padding:4px 0 12px;font:13px/1.9 system-ui;color:#4c604b;overflow-wrap:anywhere}
.qh-hadith-page .qh-source-citation [lang=ar]{font:17px/1.9 'IHA LPMQ',serif}
.qh-hadith-page .qh-hadith-record-body>.qh-copy-source{margin-top:24px;margin-inline-start:max(0px,calc((100% - 820px)/2));min-height:44px}
.qh-hadith-page .qh-sharh-fold>summary{min-height:56px}
.qh-hadith-page .qh-sharh-fold>summary small{font:13px/1.65 system-ui;color:#5c654c}
.qh-hadith-page .qh-sharh-fold>summary em{font-size:12px;font-style:normal}
.qh-hadith-page .qh-sharh-book>h3{font-size:16px}
.qh-hadith-page .qh-card>.qh-book-ar{font-size:22px!important;line-height:1.9!important}
.qh-hadith-page .qh-hierarchy [lang=ar]{font:18px/1.9 'IHA LPMQ',serif}
.qh-hadith-page :is(.qh-search-refine,.qh-hadith-bibliography)>summary:focus-visible{outline:3px solid #a58a48;outline-offset:-3px}
@media(max-width:650px){
 .qh-hadith-page .qh-main{padding:24px 14px 44px}
 .qh-hadith-page .qh-hadith-record-body{padding:16px 10px!important}
 .qh-hadith-page .qh-hadith-section{padding-inline:4px}
 .qh-hadith-page .qh-hadith-family>header{padding:16px 14px}
 .qh-hadith-page .qh-source-row>td:nth-child(2){min-width:0}
 .qh-hadith-page .qh-hadith-record summary{gap:8px}
 .qh-hadith-page .qh-fold-action{min-width:96px;padding-inline:10px}
 .qh-hadith-page .qh-hadith-bibliography>summary{flex-wrap:wrap;gap:4px 16px}
 .qh-hadith-page .qh-search-refine>summary{padding:12px 14px;flex-wrap:wrap;gap:4px 12px}
 .qh-hadith-page .qh-search-refine>summary>span{text-align:start}
 .qh-hadith-page.qh-has-search .qh-hero h1{font-size:32px}
}
@media print{
 .qh-hadith-page .qh-hadith-bibliography>.qh-source-citation{display:block!important}
 .qh-hadith-page .qh-citation-action{display:none}
}

.qh-hadith-page .qh-form input[lang=ar]{font:24px/1.5 'IHA LPMQ',serif;height:58px}
.qh-hadith-page .qh-search-refine>summary bdi[lang=ar]{font:20px/1.8 'IHA LPMQ',serif}
.qh-hadith-page .qh-commentary-table th:first-child{width:76px}
.qh-hadith-page .qh-row-type{padding:3px 6px;background:#edf1e6;border-radius:5px}
.qh-hadith-page .qh-fold-action:after{display:none}
@media(max-width:650px){.qh-hadith-page .qh-commentary-table .qh-source-row{grid-template-columns:64px minmax(0,1fr)}}

.qh-hadith-page .qh-form .qh-search-categories>label{flex:1 1 140px}
.qh-hadith-page .qh-table-shell .qh-hadith-table th:last-child{width:128px}

.qh-hadith-page .qh-sharh-book .qh-row-book{display:none}

/* R200: consistent reading measure in nested syarah and standalone sources.
   Paragraph boundaries and every source character remain controlled by the source renderer. */
.qh-hadith-page .qh-card:has([data-qh-hadith-number],.qh-hadith-view){min-width:0}
.qh-hadith-page .qh-sharh-book{padding:18px 0!important}
.qh-hadith-page .qh-sharh-book>h3{padding-inline:18px}
.qh-hadith-page .qh-card>.qh-source-note{font:13px/1.8 system-ui;color:#52654d}
.qh-hadith-page .qh-card .qh-bibliography dd[lang=ar]{font:18px/1.9 'IHA LPMQ',serif}
.qh-hadith-page .qh-card>[data-qh-hadith-number],
.qh-hadith-page .qh-card>.qh-hadith-view{width:100%;max-width:820px;margin-inline:auto!important}
.qh-hadith-page .qh-card>[data-qh-hadith-number]{padding-inline:6px}
.qh-hadith-page .qh-hadith-record>summary:focus-visible,
.qh-hadith-page .qh-sharh-fold>summary:focus-visible{outline:3px solid #a58a48;outline-offset:-3px;border-radius:6px}
@media(max-width:650px){
 .qh-hadith-page .qh-sharh-book{padding:16px 0!important}
 .qh-hadith-page .qh-sharh-book>h3{padding-inline:14px}
 .qh-hadith-page .qh-sharh-book>.qh-table-shell{border-inline:0;border-radius:0;box-shadow:none}
 .qh-hadith-page .qh-card:has([data-qh-hadith-number],.qh-hadith-view){padding:18px 10px}
 .qh-hadith-page .qh-card>[data-qh-hadith-number]{padding-inline:4px}
 .qh-hadith-page .qh-hadith-record>summary{flex-wrap:wrap;row-gap:8px}
 .qh-hadith-page .qh-hadith-record>summary>.qh-record-copy{flex:1 1 140px}
 .qh-hadith-page .qh-hadith-record>summary>.qh-fold-action{margin-inline-start:auto}
}
