/* Browse */
.browse{display:grid;grid-template-columns:minmax(230px,290px) minmax(0,1fr);gap:var(--s-6h);align-items:start;padding-top:var(--s-1)}
.filters{position:sticky;top:calc(var(--header-h) + 16px);max-height:calc(100vh - var(--header-h) - 32px);max-height:calc(100dvh - var(--header-h) - 32px);overflow-y:auto;padding-bottom:var(--s-1)}
.filters>summary{display:none;list-style:none}
.filters>summary::-webkit-details-marker{display:none}
.filters__head{display:flex;justify-content:space-between;align-items:baseline;padding:0 var(--s-1);margin-bottom:10px}
.filters__head h2{font-size:var(--t-md)}
.filtergroup{margin:0 0 10px;padding:var(--s-3h) var(--s-3h) var(--s-4);border-radius:var(--r-lg);border:0;min-width:0}
.filtergroup legend{padding:0;float:left;width:100%;margin-bottom:10px}
.filtergroup .chips{clear:both;gap:var(--s-1h)}
.browse .chip--tile{min-height:36px;padding:0 var(--s-3)}
.browse__main{min-width:0}
.sortform{display:flex;align-items:center;gap:var(--s-2)}
.sortform select{width:auto;min-width:170px;border-radius:var(--r-pill);background-color:var(--card);padding:0 var(--s-8) 0 var(--s-4h);border:0;min-height:46px}
.activechips{margin:-4px 0 16px}
.browse__main .pagehead{align-items:center}
@media (max-width:53.75em){
  .browse{grid-template-columns:minmax(0,1fr);gap:var(--s-3)}
  .filters{position:static;max-height:none;overflow:visible}
  .filters>summary{display:inline-flex}
  .filters[open]>summary{margin-bottom:12px}
  .filters__head{display:none}
  .filters__list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--s-2h)}
  .filtergroup{margin:0}

  /* The drawer (discover.js adds .filters--drawer; without the script the list above folds in the page). A sheet
   * from the bottom edge, under the thumb: a head that stays (title, Clear all, close), the groups scrolling
   * between, and a foot that stays with the button that shows the plants. The <details> itself is the dimmed page
   * behind it, so a tap there closes. */
  .filters--drawer[open]{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;justify-content:flex-end;
    background:var(--scrim);animation:fade var(--dur-2) var(--ease)}
  .filters--drawer[open]>summary{display:none}
  .filters--drawer[open]>.filters__body{display:flex;flex-direction:column;max-height:88vh;max-height:88dvh;border-radius:var(--r-xl) var(--r-xl) 0 0;
    background:var(--bg);box-shadow:var(--elev-3)}
  .filters--drawer .filters__head{display:flex;align-items:center;gap:var(--s-3);margin:0;padding:var(--s-3h) var(--gutter) var(--s-2h)}
  .filters--drawer .filters__head h2{margin-right:auto}
  .filters--drawer .filters__list{display:flex;flex-direction:column;gap:var(--s-2h);min-height:0;overflow-y:auto;overscroll-behavior:contain;
    padding:var(--s-0) var(--gutter) var(--s-3)}
  .filters--drawer .filters__foot{padding:var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--bg)}
}
@keyframes sheet{from{transform:translateY(24px)}}
html.has-drawer{overflow:hidden}  /* the page behind the open drawer does not scroll */
@media (max-width:53.75em) and (prefers-reduced-motion:no-preference){.filters--drawer[open]>.filters__body{animation:sheet var(--dur-2) var(--ease)}}
.countryform{display:flex;gap:var(--s-2);align-items:center;margin-top:10px}
.countryform select{width:100%;min-height:44px;border-radius:var(--r-pill);background-color:var(--tile);border:0;padding:0 var(--s-8) 0 var(--s-3h);font-size:var(--t-sm)}
/* on search results each filter option says how many of the matches it fits */
.chip__n{font:400 var(--t-micro) var(--mono)}
.activechips__clear{align-self:center;margin-left:4px;font-size:var(--t-sm)}
@media (min-width:53.8125em){.activechips__clear{display:none}}  /* the filter list has its own Clear all */
@media (forced-colors:active){.filtergroup,.filters--drawer[open]>.filters__body{border:1px solid CanvasText}}
@media (pointer:coarse){.filtergroup .chips{gap:var(--s-2)}.browse .chip--tile::after{inset:-4px 0}}
