/* Single-focus quick discovery; the catalog, top mode switch and reader remain separate. */
body.home-compact .quick-mode-content{
 display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;gap:6px;
}
body.home-compact .quick-find-row{display:flex;gap:6px;flex:0 0 auto;min-width:0;align-items:center}
body.home-compact .quick-find-box{
 display:flex;align-items:center;gap:8px;min-width:0;flex:1;
 background:#fff;border:1px solid #b9cfd9;border-radius:9px;
 padding:0 11px;min-height:40px;color:#3b6880;
}
body.home-compact .quick-find-box:focus-within{border-color:#2b7395;box-shadow:0 0 0 2px #2b73951e}
body.home-compact .quick-find-box>span{font-size:22px;font-weight:700}
body.home-compact .quick-find-box input{min-width:0;width:100%;height:36px;border:0;background:transparent;outline:none;font-size:13px;color:#253e4d}
body.home-compact .quick-find-box input::placeholder{color:#7d929c}
body.home-compact .quick-clear{min-height:38px;min-width:38px;border:1px solid #cadce2;border-radius:8px;background:#edf4f7;font-size:20px;color:#366079}
body.home-compact .quick-clear[hidden]{display:none!important}
body.home-compact .quick-groups{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(36px,auto));
 gap:5px;flex:0 0 auto;min-width:0;min-height:0;overflow:visible;
}
body.home-compact .quick-groups[hidden]{display:none!important}
body.home-compact .quick-group-button{
 display:flex;align-items:center;justify-content:center;gap:5px;
 min-width:0;min-height:37px;cursor:pointer;text-align:center;word-break:keep-all;
 background:#fbfcfd;border:1px solid #cbd9df;border-radius:8px;
 color:#385365;font-size:11.5px;font-weight:780;line-height:1.2;padding:4px;
}
body.home-compact .quick-group-button[aria-pressed=true]{background:#294b5d;color:#fff;border-color:#294b5d;box-shadow:inset 0 -2px #d2b078}
body.home-compact .quick-group-icon{display:inline-flex;justify-content:center;align-items:center;min-width:18px;color:#886b39;font-weight:900;flex:0 0 auto;font-size:14px}
body.home-compact .quick-group-button[aria-pressed=true] .quick-group-icon{color:#efc778}
body.home-compact .quick-discovery-head{
 display:flex;justify-content:space-between;align-items:center;gap:7px;
 padding:1px 2px;flex:0 0 auto;min-width:0;
}
body.home-compact .quick-discovery-heading{display:flex;align-items:baseline;gap:8px;min-width:0}
body.home-compact .quick-discovery-heading strong{color:#2a4757;font-size:14px;white-space:nowrap}
body.home-compact .quick-discovery-heading span{font-size:11px;color:#768c99;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
body.home-compact .quick-all-button{
 flex:0 0 auto;border:1px solid #b9ced7;border-radius:7px;background:#eef5f8;
 color:#23536f;padding:5px 8px;font-size:11px;font-weight:760;cursor:pointer;white-space:nowrap;
}
body.home-compact .quick-filter-bar{display:flex;align-items:center;gap:5px;flex:0 0 auto;overflow-x:auto;overscroll-behavior-x:contain;min-width:0;padding-bottom:2px}
body.home-compact .quick-filter-bar[hidden]{display:none!important}
body.home-compact .quick-kind-filter{
 display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;white-space:nowrap;
 border:1px solid #ccd9df;background:#f8fafb;border-radius:7px;
 padding:5px 7px;font-size:11px;color:#4b6270;font-weight:740;cursor:pointer;
}
body.home-compact .quick-kind-filter[aria-pressed=true]{color:white;background:#2b5367;border-color:#2b5367}
body.home-compact .quick-kind-filter small{opacity:.8;font-size:10px}
body.home-compact .quick-results-status{display:flex;justify-content:flex-start;align-items:center;min-height:17px;flex:0 0 auto;color:#748a96;font-size:10.5px;line-height:1.2;padding-left:3px}
body.home-compact .quick-rule-buttons{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 grid-auto-rows:minmax(35px,auto);gap:5px;min-width:0;
 flex:0 0 auto;min-height:0;max-height:145px;overflow-y:auto;
 align-content:start;padding:1px 2px 2px;overscroll-behavior:contain;
}
body.home-compact .quick-rule-button{
 display:flex;align-items:center;justify-content:space-between;gap:6px;
 min-height:35px;padding:5px 8px;line-height:1.24;cursor:pointer;
 background:#fff;border:1px solid #d6e0e4;border-radius:7px;
 color:#344d5d;font-size:11.5px;font-weight:760;text-align:left;
}
body.home-compact .quick-rule-button span{min-width:0;word-break:keep-all;overflow-wrap:anywhere}
body.home-compact .quick-rule-button small{font-size:9px;color:#899eaa;flex:0 0 auto}
body.home-compact .quick-rule-button[aria-pressed=true]{
 border-color:#326482;background:#e8f2f7;color:#16435e;box-shadow:inset 3px 0 #326482;
}
body.home-compact .quick-rule-button[aria-pressed=true] small{color:#486e86}
body.home-compact .quick-discovery-pager{
 display:flex;justify-content:center;align-items:center;gap:12px;flex:0 0 28px;
}
body.home-compact .quick-discovery-pager[hidden]{display:none!important}
body.home-compact .quick-discovery-pager button{
 border:1px solid #ccd9e1;background:#f5f8f9;color:#395d6f;border-radius:6px;
 min-height:26px;padding:4px 12px;font-weight:730;font-size:11px;
}
body.home-compact .quick-discovery-pager button:disabled{opacity:.37;cursor:default}
body.home-compact .quick-discovery-pager span{font-size:11px;color:#678290;font-variant-numeric:tabular-nums}
body.home-compact .quick-focus-panel{
 flex:1 1 auto;display:flex;flex-direction:column;min-height:0;min-width:0;
 border:1px solid #d3e0e5;border-radius:10px;background:#fff;
 padding:10px;gap:6px;overflow:hidden;
}
body.home-compact .quick-focus-heading{display:flex;align-items:baseline;justify-content:space-between;gap:6px;flex:0 0 auto}
body.home-compact .quick-focus-heading strong{font-size:14px;color:#234c62;line-height:1.35}
body.home-compact .quick-focus-heading span{color:#758a96;font-size:10px;white-space:nowrap}
body.home-compact .quick-sections{display:flex;gap:5px;min-width:0;flex:0 0 auto;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:2px}
body.home-compact .quick-section-button{
 min-width:0;min-height:31px;flex:0 0 auto;white-space:nowrap;
 border:1px solid #ccdbe0;border-radius:7px;background:#f4f7f8;color:#426070;
 font-size:11px;font-weight:770;padding:5px 12px;cursor:pointer;
}
body.home-compact .quick-section-button[aria-pressed=true]{background:#315970;color:#fff;border-color:#315970}
body.home-compact .quick-section-body{
 min-height:42px;flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
 font-size:12.5px;line-height:1.6;color:#314855;padding:1px 3px 3px;
}
body.home-compact .quick-section-body p{margin:2px 0 7px}
body.home-compact .quick-intro{font-size:13px;line-height:1.52;color:#294759;font-weight:720;margin:3px 0 8px}
body.home-compact .quick-information{margin:5px 0 10px}
body.home-compact .quick-information h3,body.home-compact .quick-relations h3{
 font-size:11.5px;color:#42667b;font-weight:870;margin:0 0 6px;
}
body.home-compact .quick-information ul{margin:0 0 4px;padding-left:20px;display:grid;gap:5px}
body.home-compact .quick-information li{overflow-wrap:anywhere}
body.home-compact .quick-answer{font-size:13px;line-height:1.64;color:#274454}
body.home-compact .quick-source-excerpt{
 white-space:pre-line;font-size:11.5px;line-height:1.6;color:#425968;
 padding:8px;background:#f5f8f9;border:1px solid #e0e8ea;border-radius:7px;
 overflow-wrap:anywhere;
}
body.home-compact .quick-relations{margin:11px 0 6px;padding-top:9px;border-top:1px solid #e4ecef}
body.home-compact .quick-relations>div,body.home-compact .quick-inline-links{display:flex;flex-wrap:wrap;gap:5px}
body.home-compact .quick-related-link{
 display:inline-flex;align-items:center;min-height:28px;max-width:100%;
 border:1px solid #d0e1e8;border-radius:6px;padding:4px 8px;
 background:#f2f7f9;color:#245c7b;font-size:11.5px;font-weight:730;
 text-decoration:none;line-height:1.35;white-space:normal;text-align:left;
}
body.home-compact .quick-focus-footer{
 display:flex;flex-direction:column;gap:5px;flex:0 0 auto;
 border-top:1px solid #e6edef;padding-top:7px;min-width:0;
}
body.home-compact .quick-source-row{display:flex;flex-wrap:wrap;align-items:center;gap:5px;max-height:57px;overflow:auto}
body.home-compact .quick-source-label{color:#728b98;font-size:10px;font-weight:800;flex:0 0 auto}
body.home-compact .quick-source-link{
 color:#286580;background:#eef6f9;border:1px solid #d3e4eb;
 border-radius:5px;font-size:10.5px;font-weight:770;padding:4px 7px;text-decoration:none;
}
body.home-compact .quick-source-more{color:#788d97;font-size:10px}
body.home-compact .quick-tool-links{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
body.home-compact .quick-tool-link{
 color:#714d24;background:#fff4e2;border:1px solid #ead2aa;
 border-radius:6px;padding:5px 7px;font-size:10.5px;font-weight:810;text-decoration:none;
}
body.home-compact .quick-deep-link{
 display:block;flex:0 0 auto;color:#225a79;text-decoration:underline;text-underline-offset:3px;
 font-weight:780;font-size:11.5px;padding:4px 2px;
}
body.home-compact .quick-unverified{
 padding:7px;border-radius:6px;border:1px solid #e2c397;
 background:#fff6e9;color:#835522;font-size:11.5px;line-height:1.5;
}
body.home-compact .quick-none{padding:9px;color:#778992;font-size:12px}
body.home-compact .quick-key-link{margin:8px 0}
body.home-compact .quick-mode-content :is(button,a):focus-visible{outline:2px solid #3483b0;outline-offset:2px}
@container (max-width:540px){
 body.home-compact .quick-mode-content{gap:4px}
 body.home-compact .quick-find-box{min-height:37px;padding:0 8px}
 body.home-compact .quick-find-box input{font-size:12px;height:35px}
 body.home-compact .quick-groups{gap:4px;grid-template-rows:repeat(2,minmax(33px,auto))}
 body.home-compact .quick-group-button{min-height:33px;font-size:10px;gap:2px;padding:3px 2px}
 body.home-compact .quick-group-icon{min-width:13px;font-size:11px}
 body.home-compact .quick-discovery-heading strong{font-size:13px}
 body.home-compact .quick-discovery-heading span{display:none}
 body.home-compact .quick-all-button{font-size:10px;padding:4px 6px}
 body.home-compact .quick-rule-buttons{grid-auto-rows:minmax(34px,auto);max-height:119px;gap:4px}
 body.home-compact .quick-rule-button{min-height:34px;font-size:11px;padding:4px 6px}
 body.home-compact .quick-focus-panel{padding:7px;gap:4px}
 body.home-compact .quick-focus-heading strong{font-size:12.5px}
 body.home-compact .quick-sections{gap:4px}
 body.home-compact .quick-section-button{min-height:29px;font-size:10.5px;padding:4px 9px}
 body.home-compact .quick-section-body{font-size:11.8px;line-height:1.5}
 body.home-compact .quick-intro{font-size:12px}
 body.home-compact .quick-source-row{max-height:55px}
}
@container (max-width:355px){
 body.home-compact .quick-group-button{font-size:9.4px}
 body.home-compact .quick-group-icon{display:none}
 body.home-compact .quick-rule-button{font-size:10.5px}
 body.home-compact .quick-rule-button small{font-size:8.5px}
 body.home-compact .quick-section-button{font-size:10px;padding:4px 7px}
}
@media(max-height:670px){
 body.home-compact .quick-groups{grid-template-rows:repeat(2,minmax(30px,auto))}
 body.home-compact .quick-group-button{min-height:30px}
 body.home-compact .quick-rule-buttons{max-height:105px;grid-auto-rows:minmax(31px,auto)}
 body.home-compact .quick-rule-button{min-height:31px}
 body.home-compact .quick-find-box{min-height:35px}
 body.home-compact .quick-find-box input{height:33px}
 body.home-compact .quick-focus-panel{padding:6px}
}

/* Show one search field at a time: unified quick search replaces the global catalog field in quick mode. */
/* One real search input remains visible in both search modes. */
body.home-compact[data-home-mode="quick"] .finder{display:block!important}
body.home-compact[data-home-mode="quick"] #search-scope{display:none!important}
body.home-compact[data-home-mode="quick"] .search-row{gap:5px}
body.home-compact[data-home-mode="quick"] .search-box{min-height:40px;height:40px}
body.home-compact[data-home-mode="quick"] .search-box input{font-size:13px}
body.home-compact[data-home-mode="quick"] #search-results[hidden]{display:none!important}

/* The quick explorer already searches the full unified corpus. Avoid showing two
   competing search bars in this mode; keep global search for the full catalog. */
body.home-compact[data-home-mode="quick"] .finder{display:none!important}
body.home-compact[data-home-mode="quick"] .shell{gap:6px}
body.home-compact .quick-extra-sources,
body.home-compact .quick-more-related{max-width:100%;min-width:0}
body.home-compact .quick-extra-sources summary,
body.home-compact .quick-more-related summary{
 display:inline-flex;align-items:center;min-height:29px;padding:5px 9px;
 border:1px solid #c9dbe3;border-radius:7px;background:#f2f7fa;
 color:#275a75;font-size:11px;font-weight:800;cursor:pointer;
}
body.home-compact .quick-extra-sources>div,
body.home-compact .quick-more-related>div{
 display:flex;flex-wrap:wrap;gap:5px;margin-top:6px;
}
body.home-compact .quick-more-related{width:100%}
body.home-compact .quick-source-row{flex-wrap:wrap}
body.home-compact .quick-relations>div{display:flex;flex-wrap:wrap;gap:5px}
body.home-compact .quick-source-link,
body.home-compact .quick-related-link{max-width:100%;overflow-wrap:anywhere}
body.home-compact .quick-find-box input{font-size:14px}
@container (max-width:380px){
 body.home-compact .quick-find-box{min-height:42px}
 body.home-compact .quick-group-button{font-size:10.5px}
 body.home-compact .quick-rule-button{min-height:39px}
}

/* In short visual viewports, the document rather than a clipped card becomes scrollable. */
body.home-compact.viewport-constrained .quick-rule-buttons{max-height:130px;overflow-y:auto}
body.home-compact.viewport-constrained .quick-focus-panel{overflow:visible;flex:1 0 auto}
body.home-compact.viewport-constrained .quick-section-body{max-height:330px;overflow-y:auto;min-height:115px}
body.home-compact.viewport-constrained .quick-mode-content{flex:1 0 auto}

/* Quick category view: only two persistent options, without redundant status text. */
body.home-compact .quick-view-switch{display:flex;align-items:center;gap:4px;flex:0 0 auto}
body.home-compact .quick-view-switch[hidden],body.home-compact #quick-status[hidden]{display:none!important}
body.home-compact .quick-view-switch .quick-all-button{min-width:48px;min-height:30px;padding:5px 11px;border-radius:7px;background:#f5f8fa;color:#3a6478;border:1px solid #c5d7de}
body.home-compact .quick-view-switch .quick-all-button[aria-pressed="true"]{background:#2b5367;color:#fff;border-color:#2b5367}
body.home-compact .quick-discovery-heading span:empty{display:none}
@container (max-width:380px){body.home-compact .quick-view-switch .quick-all-button{min-width:43px;min-height:29px;padding:4px 8px}}
