Refactor and format CSS