Technical Documentation Page. Media query not fully working

My project is here:

It is passing all the tests but at mobile size there is padding on the left hand side and the h1 has top and bottom margins even though in the code I have removed this for small screens.

What am I missing?

You have two media query sections with the same dimensions; try to move everything to one section.

Then, move

#main-doc {
  padding-left: 17%;

to line 9 or 10, before the media queries.

Finally, remove the # before h1 since h1 is not an element ID.