.global-search{margin:0 0 21px}
.global-search-field{height:52px;display:flex;align-items:center;gap:11px;width:100%;padding:0 17px;background:#fff;border:1px solid #dce4e7;border-radius:9px}
.global-search-field:focus-within{border-color:#e58f77;box-shadow:0 0 0 3px #e84c3110}
.global-search-field>span{width:19px;height:19px;flex:none;color:#91a0a7}
.global-search-field svg{width:19px;height:19px}
.global-search-field input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:14px}
.global-search-field input::placeholder{color:#98a5ab}
.utility{justify-content:flex-end;margin-bottom:0}
.browse-controls{display:flex;align-items:center;gap:18px;margin:2px 0 16px}
#browse-view>.page-heading{margin-bottom:13px}
.browse-controls .topic-row{flex:1;min-width:0;align-items:center;gap:10px;padding:0}
.browse-controls .filter-label{margin:0}
.browse-controls .utility{flex:none;margin:0}
.browse-controls .utility select{min-height:40px;padding:8px 30px 8px 12px}
.search-results #project-tabs,.search-results #resource-tabs{display:none!important}
.mobile-search-trigger{display:none}
.mobile-search-dialog{width:min(440px,calc(100% - 24px));border:0;border-radius:18px;padding:22px;background:#fff;color:var(--ink);box-shadow:0 24px 72px #162a3740}
.mobile-search-dialog::backdrop{background:#142a3880}
.mobile-search-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.mobile-search-head span{font-size:11px;color:#8c9ba3}
.mobile-search-head h2{margin:2px 0 0;font-size:21px;line-height:1.3}
.mobile-search-close{flex:none;width:38px;height:38px;border:0;border-radius:50%;background:#f2f5f6;color:#536872;font-size:16px}
.mobile-search-status{margin:12px 0 18px;font-size:12px;color:#71828b}
.mobile-search-submit{width:100%;min-height:46px;border:0;border-radius:8px;background:var(--accent);color:#fff;font-size:14px;font-weight:700}
.mobile-search-submit:disabled{background:#e5ebee;color:#7d8e97;cursor:default}
@media(max-width:760px){
  .browse-controls{flex-direction:column-reverse;align-items:stretch;gap:8px;margin:10px 0 15px}
  .browse-controls .utility{align-self:flex-end}
  .browse-controls .topic-row{width:100%}
  #browse-view>.page-heading{margin-bottom:13px}
  #main>.global-search{display:none}
  .mobile-search-trigger{position:fixed;left:max(12px,env(safe-area-inset-left));bottom:calc(103px + env(safe-area-inset-bottom));z-index:6;display:flex;align-items:center;justify-content:center;gap:7px;min-width:110px;min-height:48px;padding:0 13px;border:1px solid #d7e0e4;border-radius:12px;background:#fff;color:#29414e;box-shadow:0 5px 20px #1e344024;font-size:13px}
  .mobile-search-trigger span,.mobile-search-trigger svg{display:block;width:18px;height:18px}
  .mobile-search-trigger strong{font-size:13px;font-weight:700}
  .mobile-search-trigger[data-has-query="true"]{border-color:#e8aa96;color:var(--accent)}
  .mobile-search-dialog{position:fixed;inset:0 0 auto;width:100%;max-width:none;max-height:min(72dvh,520px);margin:0;padding:calc(18px + env(safe-area-inset-top)) 18px 22px;border-radius:0 0 20px 20px;overflow:auto}
  .mobile-search-dialog .global-search{margin:0}
  .global-search-field{height:50px;padding:0 13px;gap:8px}
  .global-search-field input{font-size:15px}
}

#search-all{border:0;background:none;color:var(--accent);cursor:pointer;padding:5px;font:inherit}
@media(max-width:760px){#browse-view .page-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.browse-controls{gap:4px;margin:4px 0 12px}.browse-controls .utility select{min-height:40px}.topic{min-height:40px}}

.browse-controls .utility select{min-width:116px;font-size:13px}

.search-project-heading{font-size:13px;font-weight:600;color:var(--muted);margin:0 0 8px}

/* Compact header search: one input and the existing all-site results. */
.topbar:has(.header-search){gap:clamp(14px,1.5vw,28px)}
.topbar:has(.header-search) .site-navigation{gap:clamp(16px,1.7vw,28px)}
.topbar:has(.header-search) .top-actions{gap:14px}
.topbar .header-search{display:flex;align-items:center;flex:0 1 280px;min-width:210px;height:40px;margin:0;padding:3px;border:1px solid #e8ab9d;border-radius:999px;background:#fff}
.topbar .header-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px #e84c3110}
.header-search .global-search-field{flex:1;min-width:0;height:32px;padding:0 8px 0 10px;gap:7px;border:0;border-radius:0;background:transparent;box-shadow:none}
.header-search .global-search-field input{font-size:13px}
.header-search .global-search-field>span,.header-search .global-search-field svg{width:16px;height:16px}
.header-search-submit{flex:none;height:32px;padding:0 15px;border:0;border-radius:999px;background:var(--accent);color:white;font-size:13px;line-height:1;font-weight:600}
.header-search-submit:hover{background:#d74128}
#main{scroll-margin-top:100px}
@media(min-width:1191px) and (max-width:1390px){
 .topbar:has(.header-search){padding-left:24px;padding-right:24px;gap:16px}
 .topbar:has(.header-search) .brand{font-size:18px;gap:8px}
 .topbar:has(.header-search) .site-navigation{gap:16px}
 .topbar:has(.header-search) .site-nav-link{font-size:14px}
 .topbar:has(.header-search) .top-actions{gap:10px}
 .topbar .header-search{min-width:200px;flex-basis:240px}
}
@media(min-width:761px) and (max-width:1190px){
 .topbar:has(.header-search){display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:0 20px}
 .topbar:has(.header-search) .site-navigation{grid-row:2;grid-column:1;justify-content:flex-start;gap:22px}
 .topbar .header-search{grid-row:2;grid-column:2;min-width:210px;margin:7px 0}
 .topbar:has(.header-search) .top-actions{margin-left:auto}
 .topbar:has(.header-search) .brand{margin-right:0;grid-row:1;grid-column:1}
 #main{scroll-margin-top:144px}
}
@media(max-width:760px){
 :root:has(.header-search){--site-header-height:168px}
 .topbar:has(.header-search){gap:4px 10px;padding-bottom:10px}
 .topbar:has(.header-search) .site-navigation{gap:24px}
 .topbar .header-search{order:4;flex:0 0 100%;width:100%;min-width:0;height:38px}
 .header-search .global-search-field input{font-size:16px}
 .header-search .global-search-field{height:30px}
 .header-search-submit{height:30px}
 .mobile-search-trigger{display:none}
 #main{scroll-margin-top:180px}
}

/* Each module opens with one short explanation. */
#browse-view>.module-intro{display:block;margin:0 0 20px}
.module-intro #page-title[hidden]{display:none}
.module-intro #page-description{margin:0;color:#607078;font-size:16px;font-weight:400;line-height:1.8;max-width:none}
@media(max-width:760px){#browse-view>.module-intro{margin-bottom:14px}.module-intro #page-description{font-size:14px}}
