···314314 expect(html).not.toContain("--injected");
315315 // The entire dirty value must be dropped — not just the injected suffix
316316 // (a partial-strip bug would output '--color-bg: red' which looks safe)
317317- expect(html).not.toContain("--color-bg");
317317+ // Uses colon suffix to match the tokensToCss declaration format (--name: value)
318318+ // and avoid false matches on var(--color-bg) references in the template HTML
319319+ expect(html).not.toContain("--color-bg:");
318320 });
319321320322 it("drops token values containing '}' (CSS block-escape injection prevention)", async () => {
···338340 // The injected block-escape value must not appear
339341 expect(html).not.toContain("red} body");
340342 // The entire dirty value must be dropped — not just the injected suffix
341341- expect(html).not.toContain("--color-bg");
343343+ // (colon suffix matches tokensToCss format; avoids false match on var(--color-bg) in template)
344344+ expect(html).not.toContain("--color-bg:");
342345 });
343346344347 it("returns an empty-token preview fragment when no tokens are submitted (does not crash)", async () => {