/* v2026.11.16.21 — one focused rule, explicit default-screen selectors, duplicate-free catalog. */
#catalog-mode-content[hidden],#quick-mode-content[hidden],#home-recent-panel[hidden]{display:none!important}
.quick-mode-content{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;gap:7px}
.quick-topbar{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex:0 0 auto;padding:2px 3px}
.quick-topbar strong{font-size:16px;color:#233f50}
.quick-topbar span{font-size:11px;color:#687d88}
.quick-layout{display:grid;grid-template-columns:173px minmax(0,1fr);gap:10px;flex:1;min-height:0;min-width:0}
.quick-groups{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(8,minmax(0,1fr));gap:6px;min-height:0;align-content:start}
.quick-group-button{width:100%;min-width:0;border:1px solid #cfdbde;background:#fff;color:#29485a;border-radius:8px;padding:7px 10px;font-size:13px;font-weight:760;cursor:pointer;text-align:left;line-height:1.3;word-break:keep-all}
.quick-group-button[aria-pressed=true]{background:#244a60;border-color:#244a60;color:#fff}
.quick-group-button:hover:not([aria-pressed=true]){background:#edf5f7}
.quick-detail-panel{display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #d1dfe3;border-radius:10px;background:#fff;padding:12px;gap:8px}
.quick-detail-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex:0 0 auto}
.quick-detail-head strong{font-size:17px;color:#263f4e;white-space:nowrap}
.quick-description{font-size:12px;color:#71828b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quick-rule-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(41px,auto);gap:6px;flex:0 0 auto;min-width:0}
.quick-rule-button{min-height:40px;text-align:left;border:1px solid #d0dce1;background:#f9fbfc;color:#2b4655;border-radius:8px;padding:7px 10px;font-size:12px;font-weight:720;line-height:1.35;cursor:pointer;word-break:keep-all;overflow-wrap:anywhere}
.quick-rule-button[aria-pressed=true]{border-color:#35647b;background:#e3eff5;color:#173d53;box-shadow:inset 3px 0 #2d657f}
.quick-rule-button:hover:not([aria-pressed=true]){background:#eaf3f6}
.quick-focus-panel{display:flex;flex-direction:column;min-height:0;min-width:0;flex:1;border:1px solid #dbe4e6;border-radius:9px;padding:10px 12px;background:#fff;gap:8px;overflow:hidden}
.quick-focus-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex:0 0 auto}
.quick-focus-heading strong{font-size:15px;font-weight:820;color:#21465b;min-width:0}
.quick-focus-heading span{font-size:11px;color:#788994;flex:0 0 auto}
.quick-sections{display:flex;align-items:center;gap:5px;flex:0 0 auto;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:3px}
.quick-section-button{border:1px solid #cfdbdf;background:#f4f7f8;border-radius:7px;color:#2f5364;font-size:12px;font-weight:720;min-height:34px;padding:5px 11px;flex:0 0 auto;white-space:nowrap;cursor:pointer}
.quick-section-button[aria-pressed=true]{border-color:#2a5c75;background:#2a5268;color:#fff}
.quick-section-body{min-height:0;min-width:0;flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:2px 5px 4px 1px;font-size:13px;line-height:1.65;color:#2d4856}
.quick-intro{font-size:14px;font-weight:660;color:#2a4655;margin:3px 0 10px;line-height:1.55}
.quick-facts{margin:5px 0 13px}
.quick-facts h3{font-size:13px;color:#31566a;font-weight:800;margin:0 0 5px}
.quick-facts ul{margin:0;padding-left:19px;display:grid;gap:6px}
.quick-facts li{overflow-wrap:anywhere}
.quick-facts a{color:#175b85;text-decoration:underline;text-underline-offset:2px}
.quick-full-rule{display:block;flex:0 0 auto;font-size:13px;font-weight:800;color:#185b84;text-decoration:underline;text-underline-offset:3px;padding:7px 2px;border-top:1px solid #e5eded;margin-top:1px}
.home-mode-bar{
 display:flex;align-items:center;gap:2px;flex:0 0 auto;min-width:0;
 background:#172f3e;border:1px solid #76919f;border-radius:9px;
 padding:3px;min-height:36px;
}
.home-mode-tab{
 display:inline-flex;justify-content:center;align-items:center;position:relative;
 border:0;border-radius:6px;background:transparent;color:#ccdde4;
 min-height:29px;min-width:64px;padding:3px 9px;font-size:12px;font-weight:800;
 white-space:nowrap;cursor:pointer;
}
.home-mode-tab[aria-pressed="true"]{background:#f1f6f8;color:#21475c;box-shadow:0 1px 3px #0b263322}
.home-mode-tab.is-default::after{
 content:"";position:absolute;right:3px;top:3px;width:4px;height:4px;
 border-radius:50%;background:#d7a14d;
}
.home-default-toggle{
 display:flex;align-items:center;justify-content:center;border:0;
 border-left:1px solid #526b78;border-radius:0 5px 5px 0;
 background:transparent;color:#e7bf70;cursor:pointer;
 font-size:19px;min-width:28px;min-height:29px;padding:1px 3px;
}
.home-default-toggle[aria-pressed="true"]{color:#ffce73}
.home-default-toggle:hover{background:#ffffff15}
.home-mode-tab:focus-visible,.home-default-toggle:focus-visible,
.quick-group-button:focus-visible,.quick-rule-button:focus-visible,
.quick-section-button:focus-visible{outline:2px solid #64bbf1;outline-offset:2px}
.mode-label-short{display:none}
.home-recent-toggle{display:flex;align-items:center;gap:4px;border:1px solid #7893a0;color:#f4f8fa;background:#23465a;border-radius:8px;min-height:35px;padding:4px 9px;font-weight:700;font-size:12px;white-space:nowrap;cursor:pointer;flex:0 0 auto}
.home-recent-toggle[aria-expanded=true]{background:#486d80}
.home-recent-toggle span[aria-hidden=true]{font-size:17px;line-height:1}
#home-recent-panel{position:fixed;right:12px;top:65px;z-index:2000;background:#fff;color:#273e4d;box-shadow:0 14px 32px #122b3b3b;border:1px solid #afc3cf;border-radius:12px;width:min(380px,calc(100vw - 24px));max-height:min(65dvh,490px);overflow:auto;padding:10px;display:flex;flex-direction:column;gap:3px}
.recent-heading{display:flex;align-items:center;justify-content:space-between;padding:4px 5px 9px;font-size:15px}
.recent-heading button{border:0;background:transparent;font-size:22px;cursor:pointer;color:#466071}
#home-recent-panel a{padding:10px;border-radius:7px;font-size:13px;text-decoration:none;color:#253f50;white-space:normal}
#home-recent-panel a:hover,#home-recent-panel a:focus{background:#eaf2f5;text-decoration:underline}
#home-recent-panel p{color:#647987;font-size:12px;margin:12px}
/* Current six full-explorer tabs are disjoint; original eight source tabs were normalized. */
.compact-categories{grid-template-rows:repeat(6,minmax(0,1fr))}
@container (max-width:780px){
 .quick-mode-content{gap:5px}
 .quick-topbar strong{font-size:14px}
 .quick-topbar span{font-size:10px}
 .quick-layout{display:flex;flex-direction:column;gap:6px}
 .quick-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,38px);gap:5px;flex:0 0 auto;overflow:visible}
 .quick-group-button{text-align:center;font-size:11px;padding:4px 1px;line-height:1.2}
 .quick-detail-panel{flex:1;min-height:0;padding:8px;gap:6px}
 .quick-detail-head strong{font-size:14px}
 .quick-description{font-size:10px}
 .quick-rule-buttons{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:36px;gap:4px}
 .quick-rule-button{min-height:34px;font-size:11px;padding:3px 6px;line-height:1.2}
 .quick-focus-panel{padding:8px;gap:5px}
 .quick-focus-heading strong{font-size:13px}
 .quick-sections{gap:4px}
 .quick-section-button{min-height:31px;font-size:11px;padding:4px 8px}
 .quick-section-body{font-size:12px;line-height:1.5}
 .quick-intro{font-size:12px}
 .quick-facts h3{font-size:12px}
 .quick-full-rule{font-size:12px;padding:5px 2px}
 .compact-categories{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,43px)}
}
@container (max-width:540px){
 .home-recent-toggle .recent-label{display:none}
 .home-recent-toggle{min-width:33px;justify-content:center;padding:4px 6px}
}
@container (max-width:355px){
 .quick-group-button{font-size:10px}
 .quick-rule-button{font-size:10.5px}
}
@media(max-height:650px){
 .quick-topbar span{display:none}
 .quick-groups{grid-template-rows:repeat(2,33px)}
 .quick-group-button{padding:2px 1px}
 .quick-rule-buttons{grid-auto-rows:32px}
 .quick-rule-button{min-height:31px}
 .quick-focus-heading span{display:none}
}
}


/* v2026.11.16.22 — Hierarchical catalogue navigation: primary topics vs rulebook-symbol secondary topics. */
body.home-compact .compact-ui{--catalog-accent:#2b5a74;--catalog-tint:#eaf2f7;--catalog-ink:#274657}
body.home-compact #catalog-mode-content[data-category="situations"]{--catalog-accent:#8b5945;--catalog-tint:#f7eee8;--catalog-ink:#633c2d}
body.home-compact #catalog-mode-content[data-category="toc"]{--catalog-accent:#41577c;--catalog-tint:#eaf0fa;--catalog-ink:#354765}
body.home-compact #catalog-mode-content[data-category="scenarios"]{--catalog-accent:#626f40;--catalog-tint:#f0f4e6;--catalog-ink:#475132}
body.home-compact #catalog-mode-content[data-category="bot"]{--catalog-accent:#775673;--catalog-tint:#f5ecf3;--catalog-ink:#614460}
body.home-compact #catalog-mode-content[data-category="library"]{--catalog-accent:#4f6a71;--catalog-tint:#ebf2f3;--catalog-ink:#374e55}
body.home-compact .category-button[data-major="actions"]{--major:#2c6073;--major-bg:#e8f3f5}
body.home-compact .category-button[data-major="situations"]{--major:#996447;--major-bg:#f8efe9}
body.home-compact .category-button[data-major="toc"]{--major:#435d83;--major-bg:#edf2fa}
body.home-compact .category-button[data-major="scenarios"]{--major:#687745;--major-bg:#f0f4e8}
body.home-compact .category-button[data-major="bot"]{--major:#805d78;--major-bg:#f5eef4}
body.home-compact .category-button[data-major="library"]{--major:#58737a;--major-bg:#edf3f4}
body.home-compact .compact-categories{grid-template-rows:repeat(6,minmax(0,1fr));gap:6px}
body.home-compact .category-button{
 display:flex;align-items:center;justify-content:flex-start;flex-direction:row;gap:9px;
 background:linear-gradient(90deg,var(--major-bg,#eaf3f7),#fff 62%);
 border:1px solid #d1dbdf;border-left:3px solid var(--major,#34596c);
 border-radius:9px;color:#304958;font-size:13px;font-weight:790;
 padding:7px 9px;min-width:0;white-space:normal;text-align:left;
}
body.home-compact .category-button .category-icon{
 display:inline-flex;align-items:center;justify-content:center;
 width:29px;height:29px;flex:0 0 29px;border-radius:8px;
 background:var(--major-bg,#edf3f6);color:var(--major,#34596c);
 border:1px solid color-mix(in srgb,var(--major,#34596c) 20%,transparent);
}
body.home-compact .category-button .category-name{min-width:0;flex:1;word-break:keep-all;line-height:1.23}
body.home-compact .category-button .category-count{font-size:10px;color:#7a8c96;flex:0 0 auto}
body.home-compact .category-button.selected{
 background:var(--major,#34596c);border-color:var(--major,#34596c);
 color:#fff;box-shadow:0 2px 5px #162e3e21;
}
body.home-compact .category-button.selected .category-icon{background:#ffffff29;border-color:#ffffff4a;color:#fff}
body.home-compact .category-button.selected .category-count{color:#e0eaf0}
body.home-compact .category-button:hover:not(.selected){background:var(--major-bg,#edf3f6)}
body.home-compact .compact-workspace{gap:8px}
body.home-compact .compact-panel-head{min-height:28px;flex:0 0 auto}
body.home-compact .compact-panel-head h1{font-size:16px}
body.home-compact .compact-medium-filters{
 display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));
 grid-auto-rows:minmax(33px,auto);align-content:start;
 flex:0 0 auto;gap:5px;min-width:0;max-height:160px;overflow-y:auto;overscroll-behavior:contain;
 padding:1px 2px 3px 1px;
}
body.home-compact .compact-medium-filters[hidden]{display:none!important}
body.home-compact .medium-filter{
 display:flex;align-items:center;justify-content:flex-start;
 min-width:0;min-height:33px;gap:5px;padding:4px 8px;
 border:1px solid #d7e1e5;border-radius:8px;
 background:#f9fbfc;color:#3b5260;font-size:11.5px;font-weight:700;
 line-height:1.2;text-align:left;cursor:pointer;
}
body.home-compact .medium-filter .medium-symbol{
 display:inline-flex;align-items:center;justify-content:center;
 height:23px;min-width:26px;flex:0 0 auto;padding:0 3px;
 border-radius:6px;background:var(--catalog-tint);color:var(--catalog-accent);
 border:1px solid color-mix(in srgb,var(--catalog-accent) 18%,transparent);
 font-size:12px;font-weight:850;line-height:1;
}
body.home-compact .medium-filter .medium-name{flex:1;min-width:0;word-break:keep-all;overflow-wrap:anywhere}
body.home-compact .medium-filter .medium-count{font-size:10px;color:#84939e;font-variant-numeric:tabular-nums}
body.home-compact .medium-filter.is-active{
 background:var(--catalog-tint);border-color:var(--catalog-accent);
 color:var(--catalog-ink);box-shadow:inset 0 -2px var(--catalog-accent);
}
body.home-compact .medium-filter.is-active .medium-symbol{background:var(--catalog-accent);color:#fff;border-color:var(--catalog-accent)}
body.home-compact .medium-filter.is-active .medium-count{color:var(--catalog-accent)}
body.home-compact .medium-filter:hover:not(.is-active){background:var(--catalog-tint)}
body.home-compact .category-button:focus-visible,body.home-compact .medium-filter:focus-visible{outline:3px solid #2687be;outline-offset:2px}
@container (max-width:780px){
 body.home-compact .compact-categories{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,45px);gap:5px}
 body.home-compact .category-button{font-size:11px;padding:4px 6px;gap:5px;border-left-width:2px}
 body.home-compact .category-button .category-icon{width:23px;height:23px;flex-basis:23px;border-radius:6px}
 body.home-compact .category-button .category-icon svg{height:16px;width:16px}
 body.home-compact .category-button .category-count{display:none}
 body.home-compact .compact-workspace{gap:5px}
 body.home-compact .compact-panel-head{min-height:25px}
 body.home-compact .compact-panel-head h1{font-size:14px}
 body.home-compact .compact-medium-filters{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(32px,auto);max-height:165px;gap:4px;padding-bottom:1px}
 body.home-compact .medium-filter{padding:4px 5px;gap:4px;min-height:31px;font-size:10.5px;border-radius:6px}
 body.home-compact .medium-filter .medium-symbol{height:21px;min-width:22px;font-size:11px;padding:0 2px}
 body.home-compact .medium-filter .medium-count{font-size:9px}
}
@container (max-width:355px){
 body.home-compact .category-button{font-size:10px;gap:3px;padding:3px 4px}
 body.home-compact .category-button .category-icon{width:20px;height:20px;flex-basis:20px}
 body.home-compact .category-button .category-icon svg{width:14px;height:14px}
 body.home-compact .compact-medium-filters{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 body.home-compact .medium-filter{font-size:9.5px;gap:2px;padding:3px}
 body.home-compact .medium-filter .medium-symbol{min-width:18px;height:19px;font-size:10px}
}
@media(max-height:650px){
 body.home-compact .compact-medium-filters{max-height:120px;overflow-y:auto}
}

/* The legacy #compact-filter was a fixed-size SELECT. Explicitly reset its ID rules for the button NAV. */
body.home-compact .app-stage #compact-filter.compact-medium-filters{
 width:100%;max-width:100%;height:auto;min-height:0;
 border:0;background:transparent;border-radius:0;
 padding:1px 2px 3px 1px;
}


/* Mobile-first header: two-way switch sits directly before recent history. */
body.home-compact .site-header .header-inner{
 display:flex;align-items:center;justify-content:flex-end;gap:6px;
 min-height:56px;padding:5px 10px;
}
body.home-compact .site-header .brand{margin-right:auto;flex:1 1 auto;min-width:0}
body.home-compact .site-header .brand-title-short{display:none}
body.home-compact .home-mode-bar{margin-left:auto}
body.home-compact .home-recent-toggle{
 min-width:34px;min-height:36px;justify-content:center;padding:5px 7px;
}
body.home-compact #pdf-library-root.pdf-header-slot{margin-left:0}
@container (max-width:650px){
 body.home-compact .site-header .header-inner{gap:5px;padding:4px 8px}
 body.home-compact .brand-version{display:none}
 body.home-compact .mode-label-long{display:none}
 body.home-compact .mode-label-short{display:inline}
 body.home-compact .home-mode-tab{min-width:45px;padding:4px 7px;font-size:12px}
 body.home-compact .home-mode-bar{min-height:33px;padding:2px}
 body.home-compact .home-default-toggle{min-width:25px;min-height:29px}
 body.home-compact .home-recent-toggle .recent-label{display:none}
 body.home-compact .home-recent-toggle{min-width:31px;min-height:33px;padding:4px 6px}
 body.home-compact .site-header .brand-text{flex-direction:row;gap:3px;align-items:center}
}
@container (max-width:450px){
 body.home-compact .site-header .brand-title-full{display:none}
 body.home-compact .site-header .brand-title-short{display:inline}
 body.home-compact .site-header .brand-title{font-size:12px}
 body.home-compact .site-header .brand{gap:4px}
 body.home-compact .site-header .brand-square{width:25px;height:25px;flex-basis:25px}
}
@container (max-width:355px){
 body.home-compact .site-header .brand-square{display:none}
 body.home-compact .site-header .header-inner{gap:3px;padding:4px 5px}
 body.home-compact .home-mode-tab{min-width:42px;padding:4px 5px}
 body.home-compact .home-default-toggle{min-width:23px}
 body.home-compact .home-recent-toggle{min-width:28px;padding:4px}
}
@media (min-width:900px){
 body.home-compact .compact-link-text strong{font-size:13px}
 body.home-compact .medium-filter{font-size:12px}
 body.home-compact .quick-rule-button{font-size:12.5px}
 body.home-compact .quick-section-body{font-size:13.5px}
}

/* Align the recent-history panel to the centered app column on wide monitors. */
@media (min-width:744px){
 body.home-compact #home-recent-panel{right:max(12px,calc((100vw - 720px)/2 + 12px))}
}

/* Preserve card-catalog access in the shared header, without reducing quick-search space. */
body.home-compact .home-cards-link{
 display:inline-flex;align-items:center;justify-content:center;gap:4px;
 min-height:34px;flex:0 0 auto;padding:4px 7px;
 border:1px solid #617d8c;border-radius:7px;
 color:#e9e1c9;background:#234354;text-decoration:none;
 font-size:12px;font-weight:800;white-space:nowrap;
}
body.home-compact .home-cards-link:focus-visible{outline:2px solid #73b8de;outline-offset:2px}
@container (max-width:390px){
 body.home-compact .home-cards-link{padding:4px 5px;min-width:29px}
 body.home-compact .home-cards-link span{display:none}
}
