Media queries for phone text size and page border

When I place a media querie for phone size to reduce the size of text and border in my page class. It reduces it on all viewport sizes not just the one set in the media querie.

You most likely have the classes in the wrong order.