The error you get if from YAML parsing, so this means that your YAML header is probably not indented correctly to add the CSS. This is as @James_Murray shared.
If you get the exact same issue, it means there is still an issue in the YAML formatting that makes the YAML not correctly parsable. YAML needs to respect a specific format to be read.
There is several way to apply CSS to a HTML output format. This is one of them. You could also use a css chunk
```{css, echo = FALSE}
body {
background-color: #FEFEFE;
color: #2D1674;
margin: auto;
width: 85vw;
height: 85vh;
line-height: 2em;
font-size: 1em;
font-family: sans-serif;
}
```
Anyway, it seems this is working for you now, so it is good