/* Search controls use their own scale, independent of long-form reading size. */
.qh-page .qh-form input[type=search][name=q]{box-sizing:border-box;min-width:0;width:100%;height:56px;min-height:56px;padding:8px 14px;font:16px/1.6 system-ui;letter-spacing:normal}
.qh-page .qh-form input[type=search][name=q][lang=ar]{font:21px/1.8 'IHA LPMQ',serif!important;height:56px!important;min-height:56px;padding-block:7px!important}
.qh-page .qh-form input[type=search][name=q]::placeholder{font:14px/1.5 system-ui}
.qh-page .qh-search-history{margin:12px 0;border:1px solid #dbe3d5;border-radius:10px;background:#fcfcf7;font:13px/1.6 system-ui;color:#31533a}
.qh-page .qh-search-history>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px;padding:10px 15px;cursor:pointer;font-weight:600}
.qh-page .qh-history-content{padding:0 14px 12px}
.qh-page .qh-history-note,.qh-page [data-history-status]{margin:4px 0 10px;font:12px/1.7 system-ui;color:#687862}
.qh-page [data-history-list]{list-style:none;padding:0;margin:0;max-height:320px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.qh-page [data-history-list]>li{display:flex;align-items:center;gap:8px;border-top:1px solid #e2e7dc;min-width:0}
.qh-page .qh-history-run{display:grid;flex:1;min-width:0;gap:2px;padding:9px 2px;color:#285137;text-decoration:none}
.qh-page .qh-history-run bdi{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:15px/1.7 system-ui}
.qh-page .qh-history-run bdi[lang=ar]{font:20px/1.8 'IHA LPMQ',serif}
.qh-page .qh-history-run small{font:11px/1.6 system-ui;color:#6d7b66}
.qh-page .qh-history-remove{width:44px;height:44px;flex:none;border:0;background:transparent;color:#7d8875;font:22px/1 system-ui;border-radius:7px;cursor:pointer}
.qh-page [data-history-clear]{min-height:44px;border:0;background:transparent;padding:8px 0;color:#68715b;text-decoration:underline;cursor:pointer}
.qh-page .qh-history-run:focus-visible,.qh-page .qh-history-remove:focus-visible{outline:2px solid #ac944e;outline-offset:1px}
.qh-page .qh-library-edition{margin-top:15px;padding-top:14px;border-top:1px solid #dbe3d4;font:13px/1.7 system-ui;color:#3a583f}
.qh-page .qh-library-edition h4{font:600 13px/1.6 system-ui;margin:0 0 10px;color:#536a4b}
.qh-page .qh-library-edition dl{display:grid;grid-template-columns:95px minmax(0,1fr);gap:6px 12px;margin:0}
.qh-page .qh-library-edition dt{color:#75816d}.qh-page .qh-library-edition dd{margin:0;overflow-wrap:anywhere;unicode-bidi:plaintext}
.qh-page .qh-library-edition .qh-library-scan{margin-top:15px;border:1px solid #d6e0ce;border-radius:8px;background:#f5f7ee;overflow:hidden}
.qh-page .qh-library-scan>summary{min-height:48px;padding:12px;cursor:pointer;display:block;font:600 13px/1.7 system-ui}
.qh-page .qh-library-scan>summary:after{content:' +';float:right}.qh-page .qh-library-scan[open]>summary:after{content:' −'}
.qh-page .qh-library-scan iframe{display:block;width:100%;height:min(650px,75dvh);border:0;background:#f4f2e9}
.qh-page .qh-library-note{font:12px/1.7 system-ui;color:#718067;margin:12px 0 0}
.qh-page .qh-library-retry{min-height:44px;border:1px solid #d3ddcc;background:#f3f6ec;border-radius:7px;color:#45603f;padding:8px 12px;cursor:pointer}
@media(max-width:450px){.qh-page .qh-library-edition dl{grid-template-columns:78px minmax(0,1fr);gap:6px 8px}.qh-page .qh-library-scan iframe{height:70dvh}}
.qh-page .qh-corpus-edition-label{margin:14px 0 8px;font:600 13px/1.6 system-ui;color:#65765c}
.qh-page .qh-digital-origin{margin-top:14px;padding-top:10px;border-top:1px solid #e2e7db;font:12px/1.7 system-ui;color:#75816d}
.qh-page .qh-digital-origin>summary{min-height:44px;padding:10px 0;cursor:pointer;font-weight:500}
.qh-page .qh-digital-origin .qh-source-citation{font-size:12px;line-height:1.8;color:#78836e}
