/* Region-first research controls; result alignment remains owned by style.css. */
#region-controls{display:flex;align-items:center;gap:10px;padding:10px 16px 6px;background:#fff;flex:0 0 auto;border-top:1px solid var(--line)}
#region-controls h2,#region-controls>strong{font-size:14px;white-space:nowrap;margin:0 4px 0 0}
#region-controls label{font-size:12px;white-space:nowrap;color:var(--muted)}
#region-controls select{min-height:36px;padding:6px 10px;max-width:230px;font-size:13px}
#regional-overview{flex:0 0 auto;min-width:0;max-height:176px;overflow:auto;padding:9px 16px 10px;background:#fff;border-bottom:1px solid var(--line)}
.research-overview-heading{display:flex;align-items:baseline;gap:20px;margin-bottom:8px;flex-wrap:wrap}
.research-overview-intro{display:flex;align-items:baseline;gap:12px;min-width:0}
.research-overview-intro h2{font-size:15px;white-space:nowrap}
.research-region-name{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.research-overview-total{display:flex;gap:6px;align-items:baseline;font-size:11px;color:var(--muted)}
.research-overview-total strong{font-size:21px;line-height:1;font-variant-numeric:tabular-nums;color:var(--ink)}
.research-results-total{margin-left:auto;color:var(--brand);font-size:12px;font-weight:650}
.research-coverage-toggle{font-size:10px;min-height:26px;padding:3px 6px;color:var(--muted);border-color:transparent;background:transparent}
.research-coverage-toggle[aria-expanded=true]{color:var(--brand);background:var(--soft)}
.research-category-cards{display:flex;gap:7px;overflow:auto;padding:0 1px 3px;scrollbar-width:thin}
.research-category-card{display:flex;align-items:center;justify-content:flex-start;gap:7px;min-height:37px;padding:7px 10px;border-color:var(--line);border-radius:7px;text-align:left;flex:0 0 auto;font-size:12px;background:#fff}
.research-category-card strong{margin-left:7px;font-variant-numeric:tabular-nums;font-size:14px}
.research-category-card[aria-pressed=true]{border-color:#b6a5df;background:var(--soft);color:#4e358d}
.research-category-card[aria-pressed=false]{color:var(--muted)}
.research-card-check{width:14px;text-align:center;font-size:13px;font-weight:700;flex-shrink:0}
.research-coverage{display:flex;flex-wrap:wrap;align-items:center;gap:9px 24px;padding-top:6px;font-size:11px}
.research-coverage-item{display:inline-flex;align-items:center;gap:7px}
.research-coverage-item>span:first-child{color:var(--muted)}
.research-coverage-item strong{font-weight:500;color:var(--ink)}
.research-missing{color:#7b5f2e}
.research-overview-note{font-size:10px;line-height:1.4;color:var(--muted);margin:5px 0 0}
#research-facets{margin:0 0 20px}
.research-section-title{font-size:14px;margin:0 0 8px;font-weight:650}
.research-category-detail{border:1px solid var(--line);border-radius:8px;margin:9px 0;overflow:hidden;background:#fff}
.research-category-detail>summary{padding:10px 11px;min-height:43px;background:#faf9fc;font-size:13px;font-weight:650;cursor:pointer}
.research-category-detail[open]>summary{border-bottom:1px solid var(--line);background:var(--soft)}
.research-branch-state{display:block;font-size:11px;color:var(--muted);font-weight:400;margin:3px 0 0 14px}
.research-branch-body{padding:12px}
.research-facet{margin:0 0 14px;padding:0 0 11px;border:0;border-bottom:1px solid var(--line);min-width:0}
.research-facet legend{font-size:12px;font-weight:650;margin-bottom:6px;padding:0}
.research-facet-options{display:grid;gap:2px}
.research-facet-option{display:flex;gap:8px;align-items:center;min-height:33px;font-size:12px;cursor:pointer}
.research-option-label{min-width:0;overflow-wrap:anywhere;flex:1}
.research-facet-option small{font-size:10px;flex-shrink:0;color:var(--muted);font-variant-numeric:tabular-nums}
.research-facet-missing{color:#7b5f2e;padding-top:5px;border-top:1px dashed var(--line);margin-top:4px}
.research-facet-options>.research-facet-missing:first-child{border-top:0;margin-top:0;padding-top:0}
.research-more-options{margin-top:4px}
.research-more-options>summary{font-size:11px;line-height:1.5;min-height:34px;padding:8px 0;color:var(--muted);cursor:pointer}
.research-more-options[open]>summary{color:var(--brand)}
.research-more-options>summary:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:3px}
.facility-more-actions{font-size:12px;margin-top:4px}
.facility-more-actions>summary{min-height:34px;padding:8px 0;color:var(--muted);cursor:pointer}
.facility-more-actions>button{margin-top:4px;font-size:12px}
.research-clear-branch{font-size:11px;white-space:normal;min-height:32px;padding:5px 0;text-align:left}
.research-legacy-note{padding:8px 10px;background:#fff8e9;border:1px solid #ead7b1;border-radius:6px;color:#6f542c;font-size:11px}
.research-company-form{display:grid;gap:6px}
.research-company-form>label{font-size:12px;color:var(--muted);margin-top:4px}
.research-company-form input,.research-company-form select{width:100%;font-size:13px}
.research-company-form .filter-actions{margin-top:4px;gap:5px}
.research-company-status{font-size:11px;color:#7b5f2e;line-height:1.5;margin-bottom:0}
.point .research-point-note{font-size:10px;color:#7b5f2e;line-height:1.5;margin-top:5px}
@media(max-width:700px){
  #region-controls{gap:6px;padding:7px 10px 4px;flex-wrap:wrap}
  #region-controls h2,#region-controls>strong{font-size:12px}
  #region-controls label{font-size:11px}
  #region-controls select{max-width:calc(50vw - 20px);min-height:34px;font-size:12px;padding:5px 7px}
  #regional-overview{padding:7px 10px 8px;max-height:174px}
  .research-overview-heading{gap:5px 12px;margin-bottom:6px}
  .research-overview-intro{gap:8px;flex:1 1 auto}
  .research-overview-intro h2{font-size:13px}
  .research-region-name{font-size:11px}
  .research-overview-total{font-size:10px}
  .research-overview-total strong{font-size:18px}
  .research-results-total{font-size:11px}
  .research-coverage-toggle{font-size:10px;min-height:24px;padding:2px 5px}
  .research-category-card{min-height:36px;padding:6px 8px;gap:5px;font-size:11px}
  .research-category-card strong{font-size:13px;margin-left:3px}
  .research-coverage{gap:4px 14px;padding-top:4px;font-size:10px}
  .research-coverage-item{gap:4px}
  .research-overview-note{font-size:10px;margin-top:4px;max-height:28px;overflow:auto}
  .research-company-form input{font-size:16px}
  .research-facet-option{min-height:37px}
  .research-more-options>summary,.facility-more-actions>summary{min-height:44px;padding-top:12px;padding-bottom:12px}
  .research-category-detail>summary{min-height:44px}
  #map-area .panel{position:fixed;top:88px;left:8px;right:8px;bottom:12px;height:auto;max-height:calc(100dvh - 100px);width:auto;z-index:15}
}

@media(min-width:701px){#panel-filters,#panel-results{position:fixed;top:126px;bottom:20px;width:420px;max-height:none}}

/* Keep the region context compact; optional coverage and map tools open on demand. */
.map-research-context{display:flex;align-items:center;gap:12px;flex:0 0 auto;background:#fff;border-bottom:1px solid var(--line);padding:5px 16px}
.map-research-context #region-controls{flex:1;min-width:0;border:0;padding:0;gap:8px}
.map-research-context #region-controls select{min-height:38px;max-width:210px}
.map-research-context #regional-overview{padding:0;border:0;max-height:110px;overflow:auto}
.research-overview-heading{align-items:center;gap:12px;margin:0}
.research-overview-total{font-size:12px;white-space:nowrap}
.research-overview-total strong{font-size:16px}
.research-coverage-toggle{font-size:12px;min-height:36px;padding:5px 8px}
#research-coverage-panel{padding:4px 0 6px}
.research-overview-note{font-size:11px;max-height:none}
.toolbar{padding:6px 16px;gap:7px}
.toolbar .search-field{max-width:none;flex:1 1 240px}
.map-more-tools{position:relative;flex:0 0 auto}
.map-more-tools>summary{display:flex;align-items:center;justify-content:center;min-height:38px;padding:7px 10px;border:1px solid var(--line);border-radius:7px;font-size:12px;cursor:pointer;white-space:nowrap;list-style:none}
.map-more-tools>summary::-webkit-details-marker{display:none}
.map-more-tools>summary::after{content:'⌄';margin-left:6px}
.map-more-tools[open]>summary{background:var(--soft);color:var(--brand)}
.map-more-tools-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:12;width:230px;padding:10px;display:grid;gap:7px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow)}
.map-more-tools-panel button,.map-more-tools-panel select{width:100%;max-width:none;min-height:40px;text-align:left;font-size:12px}
.condition-bar{padding-top:2px;padding-bottom:5px;min-height:30px}
.map-release-scope{padding-top:5px;padding-bottom:5px;font-size:12px}
@media(max-width:1000px){.map-research-context{flex-wrap:wrap;gap:3px 10px}.map-research-context #regional-overview{margin-left:auto}}
@media(max-width:700px){
 .map-research-context{padding:5px 10px;gap:2px}
 .map-research-context #region-controls{display:grid;grid-template-columns:1fr 1fr;gap:7px;flex-basis:100%}
 #region-controls>strong,#region-controls>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 .map-research-context #region-controls select{width:100%;max-width:none;min-height:42px;font-size:13px}
 .map-research-context #regional-overview{max-height:100px;max-width:100%}
 .research-overview-heading{gap:10px}
 .research-overview-total{font-size:11px}.research-overview-total strong{font-size:14px}
 .research-coverage-toggle{font-size:11px;min-height:32px;padding:3px 5px}
 .toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:5px 10px}
 .toolbar .search-field{grid-column:1/4;grid-row:1;min-width:0}
 .toolbar .search-field input{height:42px;min-height:42px;font-size:16px}
 .toolbar>.map-more-tools{grid-column:4;grid-row:1}
 .map-more-tools>summary{height:42px;min-height:42px;padding:4px;font-size:11px}
 .toolbar>button{min-height:42px;padding:4px;font-size:12px;line-height:1.3;white-space:normal}
 #open-filters{grid-column:1;grid-row:2}#open-saved-filters{grid-column:2;grid-row:2}#open-kml-export{grid-column:3;grid-row:2}#open-results{grid-column:4;grid-row:2}
 .map-more-tools-panel{width:min(250px,calc(100vw - 24px))}
 .map-more-tools-panel button,.map-more-tools-panel select{min-height:44px}
 .condition-bar{padding:2px 10px 5px;gap:6px}
}

/* Local compact-header candidate; retain existing map controls and identity. */
.map-top-compact .toolbar{position:relative;z-index:10;display:flex;align-items:center;gap:7px;padding:6px 12px;flex-wrap:nowrap}
.map-top-compact .map-research-context,.map-top-compact #region-controls{display:contents}
.map-top-compact #region-controls>strong,.map-top-compact #region-controls>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.map-top-compact #country-filter{width:112px;max-width:112px}.map-top-compact #region-filter{width:160px;max-width:160px}
.map-top-compact .toolbar select,.map-top-compact .toolbar>button{min-height:38px;height:38px;padding:5px 8px;font-size:12px}
.map-top-compact .toolbar>.search-field,.map-top-compact .free-mill-search{flex:1 1 280px;min-width:180px;max-width:360px}
.map-top-compact .free-mill-search{position:relative;margin:0;padding:0;border:0;background:transparent}
.map-top-compact .free-mill-search-form{display:flex;align-items:center;gap:5px;margin:0}
.map-top-compact .free-mill-search-form>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.map-top-compact .free-mill-search-form input{width:100%;min-width:0;flex:1;min-height:38px;height:38px;padding:6px 9px;font-size:13px}
.map-top-compact .free-mill-search-form button{min-height:38px;height:38px;padding:6px 9px;font-size:12px}
.map-top-compact .compact-search-feedback{display:none;position:absolute;top:calc(100% + 5px);left:0;width:min(420px,calc(100vw - 24px));max-height:45vh;overflow:auto;background:white;padding:10px;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);z-index:30}
.map-top-compact .has-search-feedback .compact-search-feedback{display:block}
.map-top-compact .compact-search-feedback .free-mill-search-status{margin:3px 0 8px;font-size:12px;line-height:1.4}
.map-top-compact .compact-search-close{float:right;font-size:11px;padding:3px 6px;min-height:28px}
.map-top-compact .map-more-tools-panel{max-height:65vh;overflow:auto;z-index:25;grid-template-columns:minmax(0,1fr)}
.map-top-compact .map-more-tools-panel>*{grid-column:1!important;grid-row:auto!important;min-width:0}
.map-top-compact .map-more-tools-panel #regional-overview{padding:8px 0;max-height:180px;background:transparent}
.map-top-compact .condition-bar{min-height:0;padding:2px 12px 4px;max-height:54px;overflow:auto}
.map-top-compact .condition-bar:has(#active-chips:empty){display:none}
@media(max-width:700px){
 .map-top-compact .toolbar{display:grid;grid-template-columns:92px minmax(0,1fr) 54px 72px;gap:5px;padding:5px 8px}
 .map-top-compact .toolbar>.search-field,.map-top-compact .free-mill-search{grid-row:1;grid-column:1/4;min-width:0;max-width:none}
 .map-top-compact .toolbar>.map-more-tools{grid-row:1;grid-column:4}
 .map-top-compact #country-filter{grid-row:2;grid-column:1}.map-top-compact #region-filter{grid-row:2;grid-column:2}
 .map-top-compact #country-filter,.map-top-compact #region-filter{width:100%;max-width:none;min-width:0;font-size:12px}
 .map-top-compact #open-filters{grid-row:2;grid-column:3}.map-top-compact #open-results{grid-row:2;grid-column:4}
 .map-top-compact .toolbar select,.map-top-compact .toolbar>button,.map-top-compact .free-mill-search-form input,.map-top-compact .free-mill-search-form button{height:42px;min-height:42px}
 .map-top-compact .free-mill-search-form input{font-size:16px}
 .map-top-compact .map-more-tools>summary{font-size:11px;height:42px;min-height:42px}
 .map-top-compact .condition-bar{padding:2px 8px 4px;font-size:11px}
}

.research-category-conditions{margin-top:10px;padding-top:10px;border-top:1px solid #e1dce7}.research-review-label{display:block;font-size:12px;margin:12px 0 5px}.research-category-conditions>select{width:100%;font-size:13px}.research-category-conditions .field-note{font-size:11px;line-height:1.45}

/* Source-based biogas scale controls share the filter panel. */
#biogas-scale-form{display:grid;gap:10px}#biogas-scale-form label{display:grid;gap:5px;font-size:13px}#biogas-scale-form input,#biogas-scale-form select{width:100%;min-width:0;box-sizing:border-box;padding:9px;border:1px solid #d8d3e2;border-radius:7px;background:white;color:#262232}#biogas-scale-section>p{font-size:12px;color:#65616d;line-height:1.6}

/* Purpose and comparable project scale lead; source fields open on demand. */
#bio-project-search h2{font-size:16px;margin:0 0 12px}
#bio-use-choices{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#bio-use-choices button{min-height:44px;padding:9px 10px;font-size:13px;line-height:1.45;white-space:normal;text-align:left}
#bio-use-choices button:first-child{grid-column:1/-1}
#bio-use-choices button[aria-pressed=true]{border-color:var(--brand);color:#4e358d;background:var(--soft);box-shadow:inset 3px 0 var(--brand)}
#bio-project-form{margin:20px 0 0}
#bio-project-metric{font-size:14px;margin:0 0 10px}
.bio-range{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.bio-range label{display:grid;gap:5px;min-width:0;font-size:12px;color:var(--muted)}
.bio-range input{width:100%;min-width:0;min-height:44px;font-size:16px;padding:8px}
.bio-include{display:flex;align-items:center;gap:8px;min-height:44px;font-size:12px;cursor:pointer;margin-top:4px}
.bio-include input{width:17px;height:17px;flex-shrink:0}
.bio-search-actions{display:flex;align-items:center;gap:12px}
.bio-search-actions button{min-height:44px;font-size:13px}
#bio-project-apply{background:var(--brand);color:#fff;border-color:var(--brand);flex:1}
#bio-project-explanation{font-size:12px;line-height:1.6;color:var(--muted);margin:12px 0}
#bio-project-coverage{border-left:3px solid #a693c7;padding:9px 11px;background:#f5f2fa;font-size:12px;line-height:1.7;font-variant-numeric:tabular-nums}
#bio-project-unrated{min-height:44px;padding:8px 0;font-size:12px;text-align:left}
.bio-optional{border-top:1px solid var(--line);margin-top:14px;padding-top:3px}
.bio-optional>summary{font-size:13px;min-height:44px;padding:12px 0;cursor:pointer;font-weight:600}
#bio-advanced .filter-section{margin-top:12px}
#bio-company-optional .filter-section{margin-top:0}
.point .research-point-note{font-size:12px;line-height:1.6;color:#58446f}

/* Category-first entry; no added toolbar height. */
#category-group h2{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}#category-group .fold-content{padding:0}#bio-project-search{border:0;padding:0;margin:0 0 16px}#bio-project-search>p{font-size:14px;line-height:1.5}.rr-advanced-groups{margin-top:16px}.rr-advanced-groups>summary{font-weight:600;cursor:pointer}.research-category-detail>.research-branch-body{min-width:0}
