/* Base styles and layout */
* {
    box-sizing: border-box;
}

/*
 * Keep viewport-level horizontal overflow disabled so fixed elements remain
 * anchored to the visual viewport on mobile. Horizontal overflow is handled
 * by .main-content instead.
 */
html {
    overflow-x: hidden;
}

body {
    font-family: 'PT Sans Narrow', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;
    padding-top: var(--nav-offset, 74px);
    overflow-x: hidden;
}

a,
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none !important;
}

.navbar {
    flex-shrink: 0;
}

.app-top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    overflow: visible;
    transform: translateZ(0);
    backface-visibility: hidden;
    z-index: 1100;
}

.app-top-navbar .container-fluid {
    max-width: 100%;
}

.main-content {
    flex: 1 1 auto;
    margin-left: 0;
    width: 100%;
    position: relative;
    overflow-x: auto;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    body {
        padding-top: var(--nav-offset, 66px);
    }
}

/* ===== PAGE SHELL ===== */
/* Replaces repeated inline `padding: 2rem 1rem; width: 100%; margin: 0 auto` on every page */
.page-shell {
    padding: 0.5rem 1rem;
    width: 100%;
    margin: 0 auto;
}

.page-shell--sm     { max-width: 1000px; }
.page-shell--sm     { max-width: 1200px; }
.page-shell--default { max-width: 1280px; }
.page-shell--narrow  { max-width: 1100px; }
.page-shell--wide    { max-width: 1400px; }