More robust critical CSS generator