# Venn diagram filter

> Three overlapping circles: switch on several diets and only the area of products that meet them all gets hatched.

- Category: [Filters](https://library.aimran.es/components/filters)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-f-venn
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

When filters combine with AND, people do not always see why results shrink, and a Venn diagram makes the logic visible. Three SVG circles share clip paths, the intersection of every active set is drawn as a hatched region, and a count for that region appears below. Everything is driven by checkboxes and CSS :has selectors.

The first two circles take the main and second colours and the third uses amber. Rename the sets for allergens, features or skills, update the counts for each combination, and keep the labels next to their circle colours.

## Code

### HTML

```html
<fieldset class="uvq05-vn"><legend>Diet</legend><svg viewBox="0 0 200 160" aria-hidden="true"><defs><clipPath id="uvq05-vn-c0"><circle cx="78" cy="64" r="46"/></clipPath><clipPath id="uvq05-vn-c1"><circle cx="122" cy="64" r="46"/></clipPath><clipPath id="uvq05-vn-c2"><circle cx="100" cy="102" r="46"/></clipPath><pattern id="uvq05-vn-h" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="6" height="6" fill="currentColor" fill-opacity=".85"/><rect width="2.4" height="6" fill="#fff" fill-opacity=".4"/></pattern></defs><circle class="cc c0" cx="78" cy="64" r="46" style="--cl:var(--c1)"/><circle class="cc c1" cx="122" cy="64" r="46" style="--cl:var(--c2)"/><circle class="cc c2" cx="100" cy="102" r="46" style="--cl:#d97706"/><g class="r r1"><circle cx="78" cy="64" r="46" fill="url(#uvq05-vn-h)"/></g><g class="r r2"><circle cx="122" cy="64" r="46" fill="url(#uvq05-vn-h)"/></g><g class="r r3"><g clip-path="url(#uvq05-vn-c0)"><circle cx="122" cy="64" r="46" fill="url(#uvq05-vn-h)"/></g></g><g class="r r4"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)"/></g><g class="r r5"><g clip-path="url(#uvq05-vn-c0)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)"/></g></g><g class="r r6"><g clip-path="url(#uvq05-vn-c1)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)"/></g></g><g class="r r7"><g clip-path="url(#uvq05-vn-c0)"><g clip-path="url(#uvq05-vn-c1)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)"/></g></g></g></svg><div class="ch"><label style="--cl:var(--c1)"><input type="checkbox" class="i0" checked><span>Vegan</span></label><label style="--cl:var(--c2)"><input type="checkbox" class="i1" checked><span>Gluten free</span></label><label style="--cl:#d97706"><input type="checkbox" class="i2"><span>Organic</span></label></div><p class="rs"><span class="ks"><b class="k k0">240</b><b class="k k1">64</b><b class="k k2">88</b><b class="k k3">23</b><b class="k k4">120</b><b class="k k5">41</b><b class="k k6">52</b><b class="k k7">15</b></span> <span>products</span></p></fieldset>
```

### CSS

```css
.uvq05-vn {
  --c1: #db2777;
  --c2: #0891b2;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq05-vn {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  width: 16em;
}

.uvq05-vn legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq05-vn svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.uvq05-vn .cc {
  fill: color-mix(in srgb,var(--cl) 9%,transparent);
  stroke: var(--cl);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  transition: fill calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1),stroke-width calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-vn .r {
  color: var(--fg);
  opacity: 0;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-vn .ch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35em;
  margin-top: .6em;
}

.uvq05-vn label {
  position: relative;
  cursor: pointer;
}

.uvq05-vn input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq05-vn label span {
  display: flex;
  align-items: center;
  gap: .4em;
  padding: .42em .75em;
  border-radius: 2em;
  font-size: .8em;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--fg) 14%,transparent);
  transition: background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn label span::before {
  content: "";
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: var(--cl);
}

.uvq05-vn label:hover span {
  box-shadow: inset 0 0 0 1.5px var(--cl);
}

.uvq05-vn label:active span {
  transform: scale(.94);
}

.uvq05-vn input:checked+span {
  background: color-mix(in srgb,var(--cl) 16%,transparent);
  box-shadow: inset 0 0 0 1.5px var(--cl);
  font-weight: 800;
}

.uvq05-vn input:focus-visible+span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-vn .rs {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .3em;
  margin: .7em 0 0;
  font-size: .85em;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
}

.uvq05-vn .k {
  display: none;
  font-size: 1.5em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.uvq05-vn:has(.i0:checked) .c0 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(1):hover) .c0 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i1:checked) .c1 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(2):hover) .c1 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i2:checked) .c2 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(3):hover) .c2 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:not(:checked)) .k0 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:not(:checked)) .k1 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:not(:checked)) .r1 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:not(:checked)) .k2 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:not(:checked)) .r2 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:not(:checked)) .k3 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:not(:checked)) .r3 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:checked) .k4 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:checked) .r4 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:checked) .k5 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:checked) .r5 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:checked) .k6 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:checked) .r6 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:checked) .k7 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:checked) .r7 {
  opacity: 1;
}

@keyframes uvq05-vnp {
  from {
    transform: translateY(.3em) scale(.85);
    opacity: 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq05-vn,.uvq05-vn *,.uvq05-vn *::before,.uvq05-vn *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
```

### React

```tsx
import type { CSSProperties } from "react";

const css = `
.uvq05-vn {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  width: 16em;
}

.uvq05-vn legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq05-vn svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.uvq05-vn .cc {
  fill: color-mix(in srgb,var(--cl) 9%,transparent);
  stroke: var(--cl);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  transition: fill calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1),stroke-width calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-vn .r {
  color: var(--fg);
  opacity: 0;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-vn .ch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35em;
  margin-top: .6em;
}

.uvq05-vn label {
  position: relative;
  cursor: pointer;
}

.uvq05-vn input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq05-vn label span {
  display: flex;
  align-items: center;
  gap: .4em;
  padding: .42em .75em;
  border-radius: 2em;
  font-size: .8em;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--fg) 14%,transparent);
  transition: background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn label span::before {
  content: "";
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: var(--cl);
}

.uvq05-vn label:hover span {
  box-shadow: inset 0 0 0 1.5px var(--cl);
}

.uvq05-vn label:active span {
  transform: scale(.94);
}

.uvq05-vn input:checked+span {
  background: color-mix(in srgb,var(--cl) 16%,transparent);
  box-shadow: inset 0 0 0 1.5px var(--cl);
  font-weight: 800;
}

.uvq05-vn input:focus-visible+span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-vn .rs {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .3em;
  margin: .7em 0 0;
  font-size: .85em;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
}

.uvq05-vn .k {
  display: none;
  font-size: 1.5em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.uvq05-vn:has(.i0:checked) .c0 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(1):hover) .c0 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i1:checked) .c1 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(2):hover) .c1 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i2:checked) .c2 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(3):hover) .c2 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:not(:checked)) .k0 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:not(:checked)) .k1 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:not(:checked)) .r1 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:not(:checked)) .k2 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:not(:checked)) .r2 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:not(:checked)) .k3 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:not(:checked)) .r3 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:checked) .k4 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:checked) .r4 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:checked) .k5 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:checked) .r5 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:checked) .k6 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:checked) .r6 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:checked) .k7 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:checked) .r7 {
  opacity: 1;
}

@keyframes uvq05-vnp {
  from {
    transform: translateY(.3em) scale(.85);
    opacity: 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq05-vn,.uvq05-vn *,.uvq05-vn *::before,.uvq05-vn *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

export default function FVenn() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#db2777",
          "--c2": "#0891b2",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq05-vn"><legend>Diet</legend><svg viewBox="0 0 200 160" aria-hidden="true"><defs><clipPath id="uvq05-vn-c0"><circle cx="78" cy="64" r="46" /></clipPath><clipPath id="uvq05-vn-c1"><circle cx="122" cy="64" r="46" /></clipPath><clipPath id="uvq05-vn-c2"><circle cx="100" cy="102" r="46" /></clipPath><pattern id="uvq05-vn-h" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="6" height="6" fill="currentColor" fillOpacity=".85" /><rect width="2.4" height="6" fill="#fff" fillOpacity=".4" /></pattern></defs><circle className="cc c0" cx="78" cy="64" r="46" style={{ "--cl": "var(--c1)" } as CSSProperties} /><circle className="cc c1" cx="122" cy="64" r="46" style={{ "--cl": "var(--c2)" } as CSSProperties} /><circle className="cc c2" cx="100" cy="102" r="46" style={{ "--cl": "#d97706" } as CSSProperties} /><g className="r r1"><circle cx="78" cy="64" r="46" fill="url(#uvq05-vn-h)" /></g><g className="r r2"><circle cx="122" cy="64" r="46" fill="url(#uvq05-vn-h)" /></g><g className="r r3"><g clipPath="url(#uvq05-vn-c0)"><circle cx="122" cy="64" r="46" fill="url(#uvq05-vn-h)" /></g></g><g className="r r4"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g><g className="r r5"><g clipPath="url(#uvq05-vn-c0)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g></g><g className="r r6"><g clipPath="url(#uvq05-vn-c1)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g></g><g className="r r7"><g clipPath="url(#uvq05-vn-c0)"><g clipPath="url(#uvq05-vn-c1)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g></g></g></svg><div className="ch"><label style={{ "--cl": "var(--c1)" } as CSSProperties}><input type="checkbox" className="i0" checked={true} /><span>Vegan</span></label><label style={{ "--cl": "var(--c2)" } as CSSProperties}><input type="checkbox" className="i1" checked={true} /><span>Gluten free</span></label><label style={{ "--cl": "#d97706" } as CSSProperties}><input type="checkbox" className="i2" /><span>Organic</span></label></div><p className="rs"><span className="ks"><b className="k k0">240</b><b className="k k1">64</b><b className="k k2">88</b><b className="k k3">23</b><b className="k k4">120</b><b className="k k5">41</b><b className="k k6">52</b><b className="k k7">15</b></span> <span>products</span></p></fieldset>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Venn diagram filter” block (Filters) from AIMRAN Library to my project.

## What it is
Three overlapping circles: switch on several diets and only the area of products that meet them all gets hatched.

## Chosen settings
- Main color: #db2777
- Secondary color: #0891b2
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Dieta"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
import type { CSSProperties } from "react";

const css = `
.uvq05-vn {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  width: 16em;
}

.uvq05-vn legend {
  padding: 0;
  margin: 0 0 .8em;
  font-weight: 700;
}

.uvq05-vn svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.uvq05-vn .cc {
  fill: color-mix(in srgb,var(--cl) 9%,transparent);
  stroke: var(--cl);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  transition: fill calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1),stroke-width calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-vn .r {
  color: var(--fg);
  opacity: 0;
  transition: opacity calc(0.35s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq05-vn .ch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35em;
  margin-top: .6em;
}

.uvq05-vn label {
  position: relative;
  cursor: pointer;
}

.uvq05-vn input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.uvq05-vn label span {
  display: flex;
  align-items: center;
  gap: .4em;
  padding: .42em .75em;
  border-radius: 2em;
  font-size: .8em;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb,var(--fg) 14%,transparent);
  transition: background calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),box-shadow calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.3s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn label span::before {
  content: "";
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: var(--cl);
}

.uvq05-vn label:hover span {
  box-shadow: inset 0 0 0 1.5px var(--cl);
}

.uvq05-vn label:active span {
  transform: scale(.94);
}

.uvq05-vn input:checked+span {
  background: color-mix(in srgb,var(--cl) 16%,transparent);
  box-shadow: inset 0 0 0 1.5px var(--cl);
  font-weight: 800;
}

.uvq05-vn input:focus-visible+span {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq05-vn .rs {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .3em;
  margin: .7em 0 0;
  font-size: .85em;
  color: color-mix(in srgb,var(--fg) 58%,transparent);
}

.uvq05-vn .k {
  display: none;
  font-size: 1.5em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.uvq05-vn:has(.i0:checked) .c0 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(1):hover) .c0 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i1:checked) .c1 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(2):hover) .c1 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i2:checked) .c2 {
  fill: color-mix(in srgb,var(--cl) 20%,transparent);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.uvq05-vn:has(label:nth-of-type(3):hover) .c2 {
  stroke-width: 3.5;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:not(:checked)) .k0 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:not(:checked)) .k1 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:not(:checked)) .r1 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:not(:checked)) .k2 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:not(:checked)) .r2 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:not(:checked)) .k3 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:not(:checked)) .r3 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:checked) .k4 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:not(:checked)):has(.i2:checked) .r4 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:checked) .k5 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:not(:checked)):has(.i2:checked) .r5 {
  opacity: 1;
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:checked) .k6 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:not(:checked)):has(.i1:checked):has(.i2:checked) .r6 {
  opacity: 1;
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:checked) .k7 {
  display: inline-block;
  animation: uvq05-vnp calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq05-vn:has(.i0:checked):has(.i1:checked):has(.i2:checked) .r7 {
  opacity: 1;
}

@keyframes uvq05-vnp {
  from {
    transform: translateY(.3em) scale(.85);
    opacity: 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq05-vn,.uvq05-vn *,.uvq05-vn *::before,.uvq05-vn *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

export default function FVenn() {
  return (
    <>
      <style>{css}</style>
      <div
        style={{
          "--c1": "#db2777",
          "--c2": "#0891b2",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <fieldset className="uvq05-vn"><legend>Diet</legend><svg viewBox="0 0 200 160" aria-hidden="true"><defs><clipPath id="uvq05-vn-c0"><circle cx="78" cy="64" r="46" /></clipPath><clipPath id="uvq05-vn-c1"><circle cx="122" cy="64" r="46" /></clipPath><clipPath id="uvq05-vn-c2"><circle cx="100" cy="102" r="46" /></clipPath><pattern id="uvq05-vn-h" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="6" height="6" fill="currentColor" fillOpacity=".85" /><rect width="2.4" height="6" fill="#fff" fillOpacity=".4" /></pattern></defs><circle className="cc c0" cx="78" cy="64" r="46" style={{ "--cl": "var(--c1)" } as CSSProperties} /><circle className="cc c1" cx="122" cy="64" r="46" style={{ "--cl": "var(--c2)" } as CSSProperties} /><circle className="cc c2" cx="100" cy="102" r="46" style={{ "--cl": "#d97706" } as CSSProperties} /><g className="r r1"><circle cx="78" cy="64" r="46" fill="url(#uvq05-vn-h)" /></g><g className="r r2"><circle cx="122" cy="64" r="46" fill="url(#uvq05-vn-h)" /></g><g className="r r3"><g clipPath="url(#uvq05-vn-c0)"><circle cx="122" cy="64" r="46" fill="url(#uvq05-vn-h)" /></g></g><g className="r r4"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g><g className="r r5"><g clipPath="url(#uvq05-vn-c0)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g></g><g className="r r6"><g clipPath="url(#uvq05-vn-c1)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g></g><g className="r r7"><g clipPath="url(#uvq05-vn-c0)"><g clipPath="url(#uvq05-vn-c1)"><circle cx="100" cy="102" r="46" fill="url(#uvq05-vn-h)" /></g></g></g></svg><div className="ch"><label style={{ "--cl": "var(--c1)" } as CSSProperties}><input type="checkbox" className="i0" checked={true} /><span>Vegan</span></label><label style={{ "--cl": "var(--c2)" } as CSSProperties}><input type="checkbox" className="i1" checked={true} /><span>Gluten free</span></label><label style={{ "--cl": "#d97706" } as CSSProperties}><input type="checkbox" className="i2" /><span>Organic</span></label></div><p className="rs"><span className="ks"><b className="k k0">240</b><b className="k k1">64</b><b className="k k2">88</b><b className="k k3">23</b><b className="k k4">120</b><b className="k k5">41</b><b className="k k6">52</b><b className="k k7">15</b></span> <span>products</span></p></fieldset>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
