/* Display-only hadith typography. Scoped away from Qur'an, tafsir and mushaf. */
.qh-hadith-view{max-width:800px;min-width:0;margin:22px auto 24px;color:#173e2b}
.qh-hadith-heading{display:flex;justify-content:flex-end;margin:0 0 18px;gap:10px}
.qh-hadith-number{display:inline-flex;align-items:center;gap:12px;padding:7px 15px;border:1px solid #d6dfcf;border-radius:9px;background:#f2f5eb;color:#1c5136;font:24px/1.6 'IHA LPMQ',serif;white-space:normal;overflow-wrap:anywhere}
.qh-hadith-number-label{font:17px/1.8 'IHA LPMQ',serif;color:#536a53}
.qh-hadith-number bdi{font-variant-numeric:tabular-nums;unicode-bidi:isolate}
.qh-hadith-section{min-width:0;padding:18px 22px}
.qh-hadith-sanad{border:1px solid #e0e6d8;border-inline-start:3px solid #b49a5b;border-radius:10px;background:#f5f6ef}
.qh-hadith-matan{padding-top:24px}
.qh-hadith-section-label{margin:0 0 14px!important;color:#536750;font:650 11px/1.6 system-ui,sans-serif!important;letter-spacing:.11em;text-transform:uppercase}
.qh-hadith-matan>.qh-hadith-section-label{color:#1e5338}
.qh-page .qh-hadith-view .qh-prose{width:100%;margin:0!important;padding:0!important;font-family:'IHA LPMQ',serif!important;font-size:var(--search-arabic-size,26px)!important;line-height:2.15!important;letter-spacing:0;word-spacing:normal;overflow-wrap:break-word;word-break:normal}
.qh-page .qh-hadith-view .qh-prose>.qh-prose-paragraph{text-align:justify!important;text-align-last:right;direction:rtl;unicode-bidi:plaintext;text-justify:auto;hyphens:none;overflow-wrap:break-word;margin-bottom:.8em!important}
.qh-hadith-boundary-note{margin:10px 22px 0;color:#65715f;font:12px/1.7 system-ui,sans-serif}
.qh-page .qh-copy-source{min-height:44px;padding:11px 17px;border:1px solid #cbdac4;border-radius:9px;background:#eef4e8;color:#285438;font:600 13px/1.5 system-ui,sans-serif;cursor:pointer}
.qh-page .qh-copy-source:hover{background:#e4eeda;border-color:#a7bd9c}
.qh-page .qh-copy-source:focus-visible{outline:3px solid #b69a52;outline-offset:3px}
.qh-location-badge[lang=ar]{font:20px/1.4 'IHA LPMQ',serif;unicode-bidi:isolate}
@media(max-width:650px){.qh-hadith-view{margin:16px auto 20px}.qh-hadith-section{padding:15px 10px}.qh-hadith-matan{padding-top:22px}.qh-hadith-section-label{margin-bottom:12px!important}.qh-hadith-number{padding:5px 12px;font-size:23px}.qh-hadith-heading{margin-bottom:14px}.qh-hadith-boundary-note{margin-inline:10px}}
@media print{.qh-hadith-sanad{background:none}.qh-hadith-section-label,.qh-hadith-heading{break-after:avoid}.qh-hadith-view .qh-prose{orphans:2;widows:2}}
.qh-card:has(.qh-hadith-view)>.qh-card-top>.qh-ayah-no[lang=ar]{display:none}
.qh-page .qh-facsimile .qh-hadith-view .qh-prose{font-size:min(var(--search-arabic-size,26px),var(--reader-text-size,26px))!important}
.qh-hadith-bibliography{font:12px/1.9 system-ui,sans-serif;overflow-wrap:anywhere}
.qh-hadith-bibliography bdi{unicode-bidi:isolate}
/* R194: text after the marked matn belongs to the source note, not to the matn. */
.qh-hadith-note{margin-top:16px;border-top:1px solid #dfe5d8;color:#4e6252}
.qh-hadith-note>.qh-hadith-section-label{color:#6b684f}
.qh-page .qh-hadith-view .qh-prose>.qh-prose-paragraph:last-child{margin-bottom:0!important}
/* Keep server-rendered hadith and syarah paragraphs justified before enhancement. */
.qh-page [data-qh-hadith-number].qh-prose>.qh-prose-paragraph{text-align:justify!important;text-align-last:right;direction:rtl}
/* R195: compact recovery controls stay inside the source region on narrow screens. */
.qh-source-error{padding:16px;border:1px solid #d9ddcd;border-radius:10px;background:#f4f5ee;color:#435b46}
.qh-source-error>p,.qh-source-loading{margin:0 0 12px;font:13px/1.8 system-ui,sans-serif;overflow-wrap:anywhere}
.qh-source-loading{margin-bottom:0}.qh-page .qh-source-retry{max-width:100%}
