aside{padding:20px;scrollbar-gutter:stable}
aside h2{margin-bottom:6px}
.search-intro{margin:0 0 18px;color:#456058;font-size:14px;line-height:1.5}
.search-step{margin:0 0 12px;padding:0 0 14px;border:0;border-bottom:1px solid #d5dfda}
aside h3{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:17px;color:#173f35}
aside h3 small{margin-left:auto;color:#60746c;font-size:11px;font-weight:500}
aside h3>span:first-child,#point-settings legend>span:first-child{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e3f2ec;color:#17614e;font-size:13px;font-weight:800}
.block{margin:10px 0}
#edge-settings p,#criteria-note,#coverage,#parcel-count{color:#485e54;font-size:13px;line-height:1.45}
#filters{display:grid;gap:7px;margin:8px 0}
#filters .filter{align-items:center;display:grid;grid-template-columns:minmax(0,1fr) auto 32px;gap:6px;background:#f1f5f1;border:1px solid #dce6e1;border-radius:8px;padding:6px 4px 6px 10px}
.filter span{font-size:14px;overflow-wrap:anywhere}
.filter select{width:auto;background:white}
.filter button{padding:4px;border:0;background:none;font-size:20px}
#presets{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
#presets button{font-size:13px;border-radius:16px;padding:5px 10px}
#presets [aria-pressed=true]{background:#174b3d;color:white}
#search-scope{background:#fff}
#source-settings,#example-searches{margin-top:9px;border:1px solid #cfdbd5;border-radius:9px;padding:8px 10px;background:#fbfdfc}
#source-settings summary,#example-searches summary{cursor:pointer;font-size:14px;font-weight:700;color:#31594d}
#example-searches summary span{font-size:11px;font-weight:500;color:#6c7e77}
.scope-choice{display:grid;grid-template-columns:22px 1fr;gap:7px;align-items:start;margin:9px 0}
.scope-choice input{width:auto;margin-top:4px}
.scope-choice strong,.scope-choice small{display:block}.scope-choice small{margin-top:2px;color:#52675e;font-size:12px;line-height:1.35}
.scope-warning{margin:9px 0 0;padding:8px;border-left:3px solid #c18a26;background:#fff7df;color:#654d1e;font-size:12px;line-height:1.4}
#shape-section .block{margin:0}
#point-settings{padding-top:0}
#point-settings legend{display:flex;align-items:center;gap:8px;padding:0;font-size:17px;font-weight:700;color:#173f35}
.criteria-status{display:flex;align-items:center;justify-content:space-between;gap:8px}.criteria-status p{margin:4px 0}.criteria-status button{border:0;background:transparent;color:#17614e;font-size:13px;padding:4px 2px}
.catalog-help{font-size:12px;color:#52675e;line-height:1.4}.field-label{margin-top:8px;font-size:13px}
.field-help{display:block;margin-top:4px;color:#52675e;font-size:12px;line-height:1.35}
.legal-check{margin:12px 0;padding:11px;border:1px solid #b9cbc3;border-radius:9px;background:#f8fbf9}.legal-check h3{margin:0 0 7px;font-size:16px}.legal-check ul{margin:8px 0;padding-left:20px}.legal-check li{margin:5px 0;font-size:13px;line-height:1.35}.legal-check.good{border-color:#45977b;background:#edf8f3}.legal-check.bad{border-color:#c65b51;background:#fff1ef}.legal-check.conditional{border-color:#c18a26;background:#fff8e7}.legal-check.pending{color:#52675e}
#add-kind{width:100%;margin-top:4px}
#filter-catalog{margin:8px 0;border:1px solid #9fc6b7;border-radius:9px;padding:9px;background:#f5fbf8}#filter-catalog summary{cursor:pointer;font-weight:750;color:#175442}
#freight-rank{display:block;margin-top:8px;width:100%;font-size:13px;background:white}
.results{padding-bottom:16px}
#query-summary{margin:0 0 8px;padding:9px;border-radius:8px;background:#eef6f2;color:#274f43;font-size:13px;line-height:1.4}
#count{margin-bottom:5px}
#show{width:100%;background:#194f41;color:white;font-weight:700}
.map-settings{border-top:1px solid #cdd8d2;padding:12px 0}.map-settings summary{cursor:pointer;font-weight:600}.map-settings label{margin-top:8px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
:focus-visible{outline:3px solid #167c63;outline-offset:1px}
@media(min-width:681px){main{grid-template-columns:minmax(310px,370px) 1fr}}
@media(max-width:680px){
  header{gap:14px;padding:10px 14px}header h1{font-size:22px;white-space:nowrap}header .tg-site-brand{display:none}
  html,body{width:100%;max-width:100%;overflow-x:hidden}main{width:100%;overflow:hidden}
  main,aside,#map{min-width:0;max-width:100vw}main>aside{width:100vw!important;flex-basis:auto!important;padding:12px 15px;overflow-x:hidden}aside *{min-width:0}#map{width:100vw;flex-shrink:0}
  .search-intro,.search-step{width:100%;max-width:calc(100vw - 30px);white-space:normal;overflow-wrap:anywhere}
  aside section,aside fieldset,aside details,aside select,aside input{max-width:100%}
  .leaflet-control-attribution{max-width:calc(100vw - 16px);overflow:hidden;white-space:nowrap}
  #area-settings:not([hidden]),#rect-settings:not([hidden]){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  #area-settings input,#rect-settings input{min-width:0}
}


/* Search builder: independent criteria, readable controls and optional explanations. */
[hidden],#freight-rank[hidden]{display:none!important}
main{min-width:0}aside{min-width:0}aside>*{min-width:0}
select,input,button{min-height:40px}button{touch-action:manipulation}
#collective-info{font-size:12px;padding:8px 10px!important;background:#f4f7f5!important}
#collective-info strong{font-weight:500}#collective-law{font-size:12px!important;margin-top:4px!important}
#criteria-note{margin:6px 0;font-size:13px}
#source-settings summary{font-size:12px}#source-summary{font-weight:400}
#purpose-summary{font-size:12px;font-weight:400;color:#52675e}
#filters .filter{grid-template-columns:minmax(0,1fr) minmax(100px,130px) 36px;padding:7px;gap:4px}
#filters select{width:100%;max-width:100%;padding:6px;font-size:13px}
#filters button{min-width:36px;min-height:40px}
#official-layers{margin:10px 0!important;padding:8px!important}
#official-layers input[type=checkbox],.scope-choice input,#truck-only{min-height:0;accent-color:#17614e}
.search-step{margin-bottom:14px}.results{margin-top:16px}
@media(max-width:680px){
 main{height:calc(100dvh - 54px)}main>aside{width:100%!important;max-width:100%!important;padding:12px;scrollbar-gutter:auto}
 .search-intro,.search-step{max-width:100%}#map{width:100%;max-width:100%;height:38%;min-height:160px}
 header{gap:16px;height:54px}header h1{font-size:20px}header a{font-size:14px}header .tg-site-brand{display:none!important}
 #filters .filter{grid-template-columns:minmax(0,1fr) minmax(95px,120px) 36px}
 input,select{font-size:16px}#filters select{font-size:14px}
}
