/* Filter bar on /work/ (BRAND.md 6.18). Works without JS: each chip links to #<service>,
   an empty target with that id sits above the bar, and :target + :has() hide the cards
   whose data-services do not include it. filter.js only adds aria-current and announces the count.
   The service slugs are the site's fixed taxonomy. */
.ws-work-filter{ margin-bottom:var(--ws-space-4); }
.ws-work-filter__list{ display:flex; flex-wrap:wrap; gap:8px; }
.ws-work-filter__target{
  display:block;
  height:0;
  scroll-margin-top:calc(var(--ws-nav-h) + var(--ws-space-4));
}

/* Active chip: "All" when nothing is targeted, otherwise the targeted service. */
[data-filter-scope]:not(:has(.ws-work-filter__target:target)) a.ws-chip[href="#all"],
[data-filter-scope]:has(#campaign-systems:target) a.ws-chip[href="#campaign-systems"],
[data-filter-scope]:has(#lead-generation:target) a.ws-chip[href="#lead-generation"],
[data-filter-scope]:has(#custom-platforms:target) a.ws-chip[href="#custom-platforms"],
[data-filter-scope]:has(#websites:target) a.ws-chip[href="#websites"],
[data-filter-scope]:has(#performance:target) a.ws-chip[href="#performance"]{
  background:var(--ws-fg);
  border-color:var(--ws-fg);
  color:var(--ws-bg);
}

/* Hide the cards that do not match the targeted service. */
[data-filter-scope]:has(#campaign-systems:target) [data-services]:not([data-services~="campaign-systems"]),
[data-filter-scope]:has(#lead-generation:target) [data-services]:not([data-services~="lead-generation"]),
[data-filter-scope]:has(#custom-platforms:target) [data-services]:not([data-services~="custom-platforms"]),
[data-filter-scope]:has(#websites:target) [data-services]:not([data-services~="websites"]),
[data-filter-scope]:has(#performance:target) [data-services]:not([data-services~="performance"]){
  display:none;
}
