html.mobile-priority,
html[data-device-profile="mobile"] {
    font-size: clamp(15px, calc(16px * var(--oe-ui-scale-mobile, 1)), 18px) !important;
}

.mobile-static-nav {
    display: none;
}

body.mobile-priority:not(.admin-page),
html[data-device-profile="mobile"] body:not(.admin-page) {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    font-size: 16px !important;
}

body.mobile-priority:not(.admin-page) .site-shell,
html[data-device-profile="mobile"] body:not(.admin-page) .site-shell {
    width: calc(100% - 0.56rem) !important;
    margin: 0.24rem auto 1rem !important;
    border-radius: 16px !important;
    box-shadow: 0 11px 28px rgba(22, 34, 47, 0.13) !important;
}

html[data-device-profile="mobile"] body:not(.admin-page) .container {
    width: calc(100% - 0.86rem) !important;
    min-width: 0 !important;
}

html[data-device-profile="mobile"] body:not(.admin-page) .site-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.84rem 0 calc(4.2rem + env(safe-area-inset-bottom)) !important;
}

html[data-device-profile="mobile"] body:not(.admin-page) .navbar {
    padding: 0.72rem 0 !important;
}

html[data-device-profile="mobile"] body:not(.admin-page) .search-form input,
html[data-device-profile="mobile"] body:not(.admin-page) .search-form button {
    min-height: 52px !important;
    font-size: 16px !important;
}

html[data-device-profile="mobile"] body:not(.admin-page) h1,
html[data-device-profile="mobile"] body:not(.admin-page) .hero-content h1,
html[data-device-profile="mobile"] body:not(.admin-page) .hero-content h2,
html[data-device-profile="mobile"] body:not(.admin-page) .archive-header h1,
html[data-device-profile="mobile"] body:not(.admin-page) .article-full h1 {
    font-size: clamp(32px, 8vw, 46px) !important;
    line-height: 1.06 !important;
}

html[data-device-profile="mobile"] body:not(.admin-page) h2,
html[data-device-profile="mobile"] body:not(.admin-page) .archive-header p,
html[data-device-profile="mobile"] body:not(.admin-page) .hero-content p,
html[data-device-profile="mobile"] body:not(.admin-page) .article-content,
html[data-device-profile="mobile"] body:not(.admin-page) .content-body,
html[data-device-profile="mobile"] body:not(.admin-page) p {
    font-size: clamp(16px, 4.2vw, 19px);
    line-height: 1.6;
}

body.mobile-priority:not(.admin-page) .nav-wrapper,
body.mobile-priority:not(.admin-page) .nav-wrapper-home,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-wrapper,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-wrapper-home {
    position: relative !important;
    overflow: visible !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
        "logo logo logo"
        "tools tools tools"
        "nav nav nav" !important;
    row-gap: 0.7rem !important;
    column-gap: 0 !important;
    align-items: center !important;
}

body.mobile-priority:not(.admin-page) .hamburger,
html[data-device-profile="mobile"] body:not(.admin-page) .hamburger {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

body.mobile-priority:not(.admin-page) .logo-image,
html[data-device-profile="mobile"] body:not(.admin-page) .logo-image {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 72px !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin-inline: auto !important;
}

body.mobile-priority:not(.admin-page) .logo,
html[data-device-profile="mobile"] body:not(.admin-page) .logo {
    grid-area: logo !important;
    justify-self: stretch !important;
    align-self: center !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
}

body.mobile-priority:not(.admin-page) .logo picture,
html[data-device-profile="mobile"] body:not(.admin-page) .logo picture {
    display: block !important;
    width: 100% !important;
}

body.mobile-priority:not(.admin-page) .nav-tools,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-tools {
    grid-area: tools !important;
    justify-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.45rem !important;
    width: 100% !important;
    min-width: 0 !important;
}

body.mobile-priority:not(.admin-page) .site-header,
body.mobile-priority:not(.admin-page) .navbar,
body.mobile-priority:not(.admin-page) .navbar > .container,
html[data-device-profile="mobile"] body:not(.admin-page) .site-header,
html[data-device-profile="mobile"] body:not(.admin-page) .navbar,
html[data-device-profile="mobile"] body:not(.admin-page) .navbar > .container {
    position: relative !important;
    overflow: visible !important;
}

body.mobile-priority:not(.admin-page) .nav-menu,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu {
    display: none !important;
}

body.mobile-priority:not(.admin-page) .nav-menu li,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu li {
    flex: 1 1 calc(50% - 0.25rem) !important;
    width: auto !important;
    min-width: 0 !important;
}

body.mobile-priority:not(.admin-page) .nav-menu li.dropdown,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu li.dropdown {
    flex-basis: 100% !important;
}

body.mobile-priority:not(.admin-page) .nav-menu a,
body.mobile-priority:not(.admin-page) .dropbtn,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu a,
html[data-device-profile="mobile"] body:not(.admin-page) .dropbtn {
    min-height: 42px !important;
    justify-content: center !important;
    padding: 0.7rem 0.8rem !important;
    border: 1px solid rgba(201, 176, 109, 0.28) !important;
    border-radius: 12px !important;
    background: rgba(255, 252, 246, 0.96) !important;
    text-align: center !important;
}

body.mobile-priority:not(.admin-page) .dropdown-content,
html[data-device-profile="mobile"] body:not(.admin-page) .dropdown-content {
    position: static !important;
    display: none !important;
    width: 100% !important;
    margin-top: 0.35rem !important;
    padding: 0.35rem !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

body.mobile-priority:not(.admin-page) .dropdown.active .dropdown-content,
html[data-device-profile="mobile"] body:not(.admin-page) .dropdown.active .dropdown-content {
    display: block !important;
}

body.mobile-priority:not(.admin-page) .dropdown-content a,
html[data-device-profile="mobile"] body:not(.admin-page) .dropdown-content a {
    justify-content: flex-start !important;
    margin: 0.2rem 0 !important;
}

body.mobile-priority:not(.admin-page) .language-switcher select,
html[data-device-profile="mobile"] body:not(.admin-page) .language-switcher select {
    height: 44px !important;
    min-height: 44px !important;
    max-width: 84px !important;
    font-size: 16px !important;
}

body.mobile-priority:not(.admin-page) .language-switcher-submit,
html[data-device-profile="mobile"] body:not(.admin-page) .language-switcher-submit {
    display: none !important;
}

body.mobile-priority:not(.admin-page) .theme-toggle,
html[data-device-profile="mobile"] body:not(.admin-page) .theme-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
}


html[data-device-profile="mobile"] body:not(.admin-page) img,
html[data-device-profile="mobile"] body:not(.admin-page) svg,
html[data-device-profile="mobile"] body:not(.admin-page) canvas,
html[data-device-profile="mobile"] body:not(.admin-page) iframe,
html[data-device-profile="mobile"] body:not(.admin-page) video {
    max-width: 100%;
}

html[data-device-profile="mobile"] body:not(.admin-page) input,
html[data-device-profile="mobile"] body:not(.admin-page) select,
html[data-device-profile="mobile"] body:not(.admin-page) textarea {
    font-size: 16px;
}

html[data-device-profile="mobile"] body:not(.admin-page) .mobile-primary-dock {
    padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
}

html[data-device-profile="mobile"] body.mobile-reading-mode:not(.admin-page) {
    --oe-mobile-dock-height: 0px;
}

html[data-device-profile="mobile"] body.mobile-reading-mode:not(.admin-page) .mobile-primary-dock {
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
}

html[data-device-profile="mobile"] body.mobile-reading-mode:not(.admin-page) .site-main {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
}

html[data-device-profile="mobile"] body.mobile-reading-mode:not(.admin-page) .premium-pdf-host[data-device-profile="mobile"] .ppv-stage {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

html[data-device-profile="mobile"] body.mobile-reading-mode:not(.admin-page) .newspaper-pdf-frame-full,
html[data-device-profile="mobile"] body.mobile-reading-mode:not(.admin-page) .pdf-viewer-wrapper {
    width: 100%;
    max-width: 100%;
}

/* Keep the phone header stable even when the browser forces desktop mode. */
body.mobile-priority:not(.admin-page) .navbar > .container,
html[data-device-profile="mobile"] body:not(.admin-page) .navbar > .container {
    min-width: 0 !important;
}

body.mobile-priority:not(.admin-page) .nav-wrapper,
body.mobile-priority:not(.admin-page) .nav-wrapper-home,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-wrapper,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-wrapper-home {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
        "logo"
        "tools"
        "nav" !important;
    row-gap: 0.72rem !important;
    column-gap: 0 !important;
    align-items: stretch !important;
}

body.mobile-priority:not(.admin-page) .logo,
html[data-device-profile="mobile"] body:not(.admin-page) .logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    justify-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
}

body.mobile-priority:not(.admin-page) .logo.logo-with-image,
html[data-device-profile="mobile"] body:not(.admin-page) .logo.logo-with-image {
    display: block !important;
    padding: 0 !important;
}

body.mobile-priority:not(.admin-page) .logo picture,
html[data-device-profile="mobile"] body:not(.admin-page) .logo picture {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.mobile-priority:not(.admin-page) .logo-image,
html[data-device-profile="mobile"] body:not(.admin-page) .logo-image {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin-inline: auto !important;
}

body.mobile-priority:not(.admin-page) .nav-tools,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-tools {
    justify-self: stretch !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

body.mobile-priority:not(.admin-page) .language-switcher-form,
html[data-device-profile="mobile"] body:not(.admin-page) .language-switcher-form {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
}

body.mobile-priority:not(.admin-page) .nav-menu,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    width: 100% !important;
    min-width: 0 !important;
}

body.mobile-priority:not(.admin-page) .nav-menu.is-static-mobile,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu.is-static-mobile {
    display: none !important;
}

body.mobile-priority:not(.admin-page) .nav-menu li,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu li {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
}

body.mobile-priority:not(.admin-page) .nav-menu li.dropdown,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu li.dropdown {
    grid-column: 1 / -1 !important;
}

body.mobile-priority:not(.admin-page) .nav-menu a,
body.mobile-priority:not(.admin-page) .dropbtn,
html[data-device-profile="mobile"] body:not(.admin-page) .nav-menu a,
html[data-device-profile="mobile"] body:not(.admin-page) .dropbtn {
    justify-content: flex-start !important;
    text-align: left !important;
}

body.mobile-priority:not(.admin-page) .dropdown-content,
html[data-device-profile="mobile"] body:not(.admin-page) .dropdown-content {
    width: 100% !important;
}

body.mobile-priority:not(.admin-page) .hamburger[hidden],
html[data-device-profile="mobile"] body:not(.admin-page) .hamburger[hidden] {
    display: none !important;
}

body.mobile-priority:not(.admin-page) .mobile-static-nav,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.68rem;
}

body.mobile-priority:not(.admin-page) .mobile-static-nav__link,
body.mobile-priority:not(.admin-page) .mobile-static-nav__summary,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__link,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 54px;
    padding: 0.78rem 0.86rem;
    border: 1px solid rgba(201, 176, 109, 0.28);
    border-radius: 14px;
    background: rgba(255, 252, 246, 0.96);
    color: inherit;
    font-weight: 700;
    line-height: 1.24;
    text-decoration: none;
    box-sizing: border-box;
}

body.mobile-priority:not(.admin-page) .mobile-static-nav__summary,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__summary {
    list-style: none;
    cursor: pointer;
}

body.mobile-priority:not(.admin-page) .mobile-static-nav__summary::-webkit-details-marker,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__summary::-webkit-details-marker {
    display: none;
}

body.mobile-priority:not(.admin-page) .mobile-static-nav__icon,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__icon {
    display: inline-flex;
    width: 1.1rem;
    justify-content: center;
    color: var(--tm-text-soft, var(--text-soft, #5a5b5f));
}

body.mobile-priority:not(.admin-page) .mobile-static-nav__details,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__details {
    grid-column: 1 / -1;
}

body.mobile-priority:not(.admin-page) .mobile-static-nav__categories,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
    margin-top: 0.42rem;
    padding: 0.1rem 0;
}

body.mobile-priority:not(.admin-page) .mobile-static-nav__category-link,
html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__category-link {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0.68rem 0.74rem;
    border: 1px solid rgba(201, 176, 109, 0.2);
    border-radius: 12px;
    background: rgba(255, 252, 246, 0.9);
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
}

@media (min-width: 720px) {
    body.mobile-priority:not(.admin-page) .mobile-static-nav,
    html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body.mobile-priority:not(.admin-page) .mobile-static-nav__categories,
    html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1121px) {
    html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    html[data-device-profile="mobile"] body:not(.admin-page) .mobile-static-nav__categories {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    html[data-device-profile="mobile"] body:not(.admin-page) .logo-image {
        width: 100% !important;
        min-width: 100% !important;
    }
}
