:root {
  --paper: #ffffff;
  --ink: #0b0c0e;
  --on-ink: #f4f3ef;
  --track: rgba(244, 243, 239, 0.34);
  --accent: #c4f04a;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.filters {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 999px;
}
.filters:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
/* the pill: GSAP moves this element, the CSS shadow stays on it */
.filters__body {
  display: flex;
  align-items: center;
  height: clamp(52px, 9vmin, 60px);
  padding: 0 clamp(18px, 3vmin, 22px) 0 clamp(14px, 2.4vmin, 18px);
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 12px 26px -16px rgba(11,12,14,.6), 0 2px 4px -2px rgba(11,12,14,.3);
  will-change: transform;
}
.filters__icon {
  width: clamp(30px, 5.2vmin, 34px);
  height: clamp(30px, 5.2vmin, 34px);
  overflow: visible;
  flex: none;
}
.filters__track, .filters__fill { stroke-width: 1.6; stroke-linecap: round; }
.filters__track { stroke: var(--track); }
.filters__fill { stroke: var(--accent); }
/* the knob is cut out of its track by a ring in the pill's colour */
.filters__knob {
  fill: var(--on-ink);
  stroke: var(--ink);
  stroke-width: 2;
  paint-order: stroke;
}
.filters__label {
  margin-left: clamp(8px, 1.4vmin, 11px);
  font-size: clamp(17px, 2.8vmin, 19px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  white-space: nowrap;
  font-variation-settings: 'wght' 560, 'wdth' 100;
}
/* the slot opens to make room for the count; GSAP animates its width */
.filters__slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 0;
  height: 24px;
  overflow: visible;
}
.filters__badge {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  overflow: hidden;
  will-change: transform;
}
.filters__count {
  display: block;
  font-size: 13px;
  line-height: 1;
  font-variation-settings: 'wght' 680, 'wdth' 100;
}
