function addSpecificityLevel(cssText: string, index: number): string {
  if (cssText.startsWith('@keyframes')) {
    return cssText;
  }

  const pseudoSelector = Array.from({ length: index })
    .map(() => ':not(#\\#)')
    .join('');

  const lastOpenCurly = cssText.includes('::')
    ? cssText.indexOf('::')
    : cssText.lastIndexOf('{');
  const beforeCurly = cssText.slice(0, lastOpenCurly);
  const afterCurly = cssText.slice(lastOpenCurly);

  return `${beforeCurly}${pseudoSelector}${afterCurly}`;
}
Adds :not(#\#) to selectors to increase their specificity.
This is used to polyfill @layer