/* Browse Resources (/marketplace): filter sidebar, applied-filter chips and results header. Loaded after discover.css, so it refines the
   .br-* rules there; selectors are scoped to .br-layout so the site-wide input, label, fieldset and h2 defaults don't leak in. */

.br-hero{padding:36px 16px 20px}
.br-layout{grid-template-columns:272px minmax(0,1fr);gap:32px;max-width:1300px}

/* Sidebar: sticky, scrolls on its own only when taller than the window */
.br-layout .br-filters{position:sticky;top:12px;max-height:calc(100vh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:0;border-radius:14px;
  background:#fff;border:1px solid var(--line);scrollbar-width:thin}
.br-layout .br-filters-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:12px;padding:14px 16px;background:#fff;border-bottom:1px solid var(--line)}
.br-layout .br-filters-head h2{margin:0;padding:0;border:0;font-family:inherit;font-size:17px;font-weight:700;line-height:1.3;letter-spacing:0;color:var(--navy);flex:1}
.br-layout .br-filters-head h2::after,.br-layout .br-filters-head h2::before{content:none}
.br-layout .br-clear-all{font-size:13px;font-weight:600;color:var(--ttw-fuchsia,var(--pink));text-decoration:none;white-space:nowrap}
.br-layout .br-clear-all:hover,.br-layout .br-clear-all:focus-visible{text-decoration:underline}
.br-filter-form{margin:0;padding:0 16px 12px}

/* Collapsible groups */
.br-layout .br-group{border:0;border-bottom:1px solid var(--line);margin:0;padding:0}
.br-layout .br-group>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:46px;padding:10px 0;cursor:pointer;
  font-size:14px;font-weight:700;color:var(--navy)}
.br-layout .br-group>summary::-webkit-details-marker{display:none}
.br-layout .br-group>summary::after{content:"";width:8px;height:8px;margin-right:4px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);transition:transform .15s ease;flex:none}
.br-layout .br-group[open]>summary::after{transform:rotate(-135deg) translateY(-2px)}
.br-layout .br-group>summary:hover{color:var(--ttw-fuchsia,var(--pink))}
.br-layout .br-fieldset{border:0;margin:0;padding:0 0 12px;min-width:0;background:none;border-radius:0}

/* Option rows (about 32px apart), checkbox aligned with its label */
.br-layout .br-options{display:grid;gap:0;margin:0}
.br-layout .br-check{display:flex;flex-direction:row;align-items:center;gap:10px;min-height:32px;margin:0;padding:2px 6px;border-radius:6px;
  font-size:14px;font-weight:400;line-height:1.3;color:var(--navy);cursor:pointer}
.br-layout .br-check:hover{background:#f2f7fa}
.br-layout .br-check input[type=checkbox],.br-layout .br-check input[type=radio]{appearance:auto;-webkit-appearance:auto;box-sizing:border-box;width:16px;height:16px;
  min-width:16px;min-height:0;max-width:16px;flex:0 0 16px;margin:0;padding:0;border-radius:3px;accent-color:var(--ttw-fuchsia,var(--pink));cursor:pointer}
.br-layout .br-check-text{flex:1;min-width:0;overflow-wrap:anywhere}
.br-layout .br-count{margin-left:auto;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.br-layout .br-check:has(input:checked) .br-check-text{font-weight:600}

/* Show more / fewer (native details, so it works without JavaScript) */
.br-layout .br-showmore{margin:0}
.br-layout .br-showmore>summary{list-style:none;display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:2px 6px;cursor:pointer;
  font-size:13px;font-weight:600;color:var(--ttw-fuchsia,var(--pink))}
.br-layout .br-showmore>summary::-webkit-details-marker{display:none}
.br-layout .br-showmore>summary:hover{text-decoration:underline}
.br-layout .br-showmore .br-less-label,.br-layout .br-showmore[open] .br-more-label{display:none}
.br-layout .br-showmore[open] .br-less-label{display:inline}

/* Quick grade bands */
.br-layout .br-bands{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.br-layout .br-band{display:inline-flex;align-items:center;min-height:28px;padding:3px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;
  font-size:12px;font-weight:600;color:var(--navy);text-decoration:none}
.br-layout .br-band:hover{border-color:var(--navy)}
.br-layout .br-band[aria-current=true]{background:var(--navy);border-color:var(--navy);color:#fff}

/* Price range and selects */
.br-layout .br-range{display:flex;align-items:flex-end;gap:6px;margin-top:8px}
.br-layout .br-range label{display:grid;gap:2px;flex:1;min-width:0;margin:0;font-size:12px;font-weight:600;color:var(--muted)}
.br-layout .br-range input{width:100%;min-height:34px;padding:5px 8px;border-radius:7px}
.br-layout .br-range-to{padding-bottom:7px;color:var(--muted)}
.br-layout .br-range-go{min-height:34px;padding:5px 12px;border-radius:7px;font-size:13px}
.br-layout .br-hint{font-size:12px;color:var(--muted);margin:4px 6px 0}
.br-layout .br-selects{display:grid;gap:10px;padding:0 0 14px}
.br-layout .br-selects label{display:grid;gap:4px;margin:0;font-size:13px;font-weight:600;color:var(--navy)}
.br-layout .br-selects select{width:100%;min-height:36px;padding:6px 8px}

/* Apply (kept for no-JavaScript and the phone drawer; wide screens apply each change straight away) */
.br-layout .br-filter-actions{display:flex;align-items:center;gap:14px;margin:0;padding:14px 0 4px}
.br-layout .br-apply{flex:1;min-height:40px;padding:8px 14px;border-radius:9px;background:var(--navy);border-color:var(--navy)}
.br-filter-form.is-live .br-filter-actions{display:none}

/* Results column: search aligned with the grid, count with the sort on the right, chips */
.br-results .br-search{display:flex;gap:8px;max-width:none;margin:0 0 18px}
.br-results .br-search input{flex:1;min-width:0}
.br-layout .br-results-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.br-layout .br-results-head h2{margin:0;font-size:22px}
.br-layout .br-results-tools{display:flex;align-items:center;gap:10px;margin-left:auto}
.br-layout .br-sort{margin:0}
.br-layout .br-sort label{display:flex;flex-direction:row;align-items:center;gap:8px;margin:0;font-size:13px;font-weight:600;white-space:nowrap}
.br-layout .br-sort select{min-height:38px;padding:6px 10px}
.br-layout .br-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 18px}
.br-layout .br-chip{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:4px 8px 4px 12px;border:1px solid var(--navy);border-radius:999px;
  background:#fff;color:var(--navy);font-size:13px;font-weight:600;text-decoration:none}
.br-layout .br-chip span{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--aqua);font-size:14px;line-height:1}
.br-layout .br-chip:hover,.br-layout .br-chip:focus-visible{background:var(--navy);color:#fff}
.br-layout .br-chip:hover span,.br-layout .br-chip:focus-visible span{background:var(--ttw-fuchsia,var(--pink));color:#fff}
.br-layout .br-filter-toggle{display:none}

/* Phone and tablet: a "Filters" button opens the panel as a sheet from the left */
@media(max-width:899px){
  .br-layout{grid-template-columns:1fr;gap:0}
  .br-layout .br-filter-toggle{display:inline-flex;align-items:center;min-height:38px;padding:6px 14px;border-radius:9px;background:#fff;color:var(--navy);
    border:1px solid var(--navy);font-size:14px}
  .br-layout .br-filters{display:none;position:fixed;inset:0 auto 0 0;top:0;z-index:60;width:min(360px,100%);max-height:none;height:100dvh;border-radius:0;
    border:0;box-shadow:0 0 0 100vmax #0b255966}
  .br-layout .br-filters.is-open{display:block}
  .br-layout .br-drawer-close{display:inline-block;background:none;border:0;padding:4px 8px;color:var(--navy);font-size:18px}
  .br-filter-form.is-live .br-filter-actions,.br-layout .br-filter-actions{display:flex;position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);
    margin:0 -16px;padding:12px 16px}
  .br-layout .br-results-tools{width:100%;justify-content:space-between;margin:0}
}
@media(max-width:600px){.br-results .br-search{flex-direction:column}}
@media(prefers-reduced-motion:reduce){.br-layout .br-group>summary::after{transition:none}}

/* Approved Browse Resources design (Nov 2026): a banner, then one soft-aqua panel with the big search bar and a row of filter buttons that
   open as dropdowns (wide screens). Phones keep the Filters drawer. */
.pbn-compact{min-height:clamp(300px,22vw,440px)}
.br-layout{grid-template-columns:minmax(0,1fr)!important;gap:22px;max-width:1320px}
.br-panel{display:grid;gap:14px;padding:16px;border:1px solid #cfeef5;border-radius:16px;background:#eaf8fc}
.br-search-row{display:flex;align-items:center;gap:16px}
.br-panel .br-search{position:relative;flex:1;display:flex;align-items:center;gap:8px;margin:0;padding:6px;border:1px solid #d6e4ee;border-radius:12px;background:#fff}
.br-panel .br-search>.ico{width:22px;height:22px;margin:0 2px 0 10px;color:var(--navy);flex:none}
.br-panel .br-search input{flex:1;min-width:0;min-height:42px;border:0;box-shadow:none;background:transparent;font-size:16px;padding:6px 4px}
.br-panel .br-search input:focus{outline:none}
.br-panel .br-search:focus-within{border-color:var(--aqua);box-shadow:0 0 0 3px #00b5c833}
.br-panel .br-search button{min-height:42px;min-width:130px;padding:8px 22px;border:0;border-radius:9px;background:var(--fuchsia);color:#fff;font-weight:700;font-size:15px}
.br-panel .br-search button:hover{background:#c2055e}
.br-clear-everything{display:inline-flex;align-items:center;gap:6px;color:var(--navy);font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap}
.br-clear-everything .ico{width:18px;height:18px}
.br-clear-everything:hover{color:var(--fuchsia)}
.br-sum{display:grid;line-height:1.2;min-width:0;text-align:left}
.br-sum b{font-size:13px;font-weight:700;color:var(--navy)}
.br-sum small{font-size:12px;font-weight:400;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.br-layout .br-group>summary>.ico{width:22px;height:22px;flex:none;color:var(--navy)}
@media(min-width:900px){
  .br-layout .br-filters{position:static;max-height:none;overflow:visible;border:0;border-radius:0;background:none}
  .br-layout .br-filters-head{display:none}
  .br-filter-form{display:flex;flex-wrap:wrap;gap:10px;padding:0}
  .br-layout .br-group{position:relative;flex:1 1 140px;min-width:0;border:1px solid #d6e4ee;border-radius:10px;background:#fff}
  .br-layout .br-group>summary{min-height:52px;padding:8px 12px;justify-content:flex-start;gap:10px}
  .br-layout .br-group>summary .br-sum{flex:1}
  .br-layout .br-group[open]{border-color:var(--navy)}
  .br-layout .br-group>.br-fieldset,.br-layout .br-group>.br-selects{position:absolute;z-index:30;top:calc(100% + 6px);left:0;width:max(100%,290px);max-height:380px;overflow:auto;
    padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 16px 34px #0b25592e}
  .br-layout .br-group:nth-last-child(-n+4)>.br-fieldset,.br-layout .br-group:nth-last-child(-n+4)>.br-selects{left:auto;right:0}
  .br-layout .br-more{flex:1 1 150px}
  .br-layout .br-filter-actions{flex-basis:100%}
}
/* Results header and numbered pages */
.br-layout .br-results-head h2{font-size:26px}
.br-pager-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px 24px;margin:26px 0 8px;position:relative}
.br-pages{display:flex;align-items:center;gap:6px;margin:0;padding:0;border:0}
.br-page,.br-page-arrow{display:inline-grid;place-items:center;min-width:36px;height:36px;padding:0 8px;border:1px solid var(--line);border-radius:9px;background:#fff;
  color:var(--navy);font-weight:600;text-decoration:none}
.br-page-arrow{font-size:22px;line-height:1}
.br-page[aria-current=page]{background:var(--fuchsia);border-color:var(--fuchsia);color:#fff}
a.br-page:hover,.br-page-arrow:hover{border-color:var(--navy)}
.br-gap{color:var(--muted);padding:0 2px}
.br-showing{margin:0;color:var(--muted);font-size:13px}
@media(min-width:900px){.br-showing{position:absolute;right:0}}
@media(max-width:899px){.br-search-row{flex-direction:column;align-items:stretch}.br-clear-everything{align-self:flex-end}.br-panel .br-search button{min-width:0}}
@media(max-width:600px){.br-panel .br-search{flex-direction:row}}
.br-sum b,.br-sum small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:900px){.br-layout .br-group>summary{gap:8px;padding:8px 10px}.br-layout .br-group>summary::after{width:7px;height:7px}.br-filter-form{gap:8px}}
/* Phones: grid items may shrink below their content, so the search panel and its button never push the page sideways. */
.br-layout{grid-template-columns:minmax(0,1fr)}
.br-panel,.br-panel>*,.br-search-row>*{min-width:0}
@media(max-width:600px){.br-panel{padding:12px}.br-panel .br-search button{padding:8px 14px}}
