/* Scoped header and article fixes; decorative page overflow stays governed by the theme. */
@media (max-width: 899px) {
    .section.header {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    #header-inner {
        gap: 10px;
    }

    .header-start {
        min-width: 0;
        flex: 0 1 auto;
    }

    .header-start #header-logo {
        display: block;
        height: 20px;
        max-width: 32vw;
        margin-right: 0;
    }

    .header-middle {
        display: none;
    }

    .header-end {
        flex: 0 0 auto;
        gap: 8px;
        align-items: center;
    }

    .header-end .button {
        padding: 8px 12px;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
    }

    #hamburger {
        display: inline-flex;
        flex: 0 0 38px;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 6px;
        background: transparent;
        color: #fff;
        cursor: pointer;
    }

    #hamburger .hamburger-box {
        width: 22px;
        height: 18px;
    }

    #hamburger .hamburger-inner,
    #hamburger .hamburger-inner::before,
    #hamburger .hamburger-inner::after {
        width: 22px;
        background-color: #fff !important;
    }

    #mobile-menu[hidden] {
        display: none !important;
    }

    #mobile-menu:not([hidden]) {
        position: absolute;
        top: calc(100% + 4px);
        right: 16px !important;
        z-index: 20;
        display: block !important;
        width: min(320px, calc(100vw - 32px)) !important;
        height: auto;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        padding: 12px 20px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 10px;
        background: #151922;
        color: #fff;
        opacity: 1 !important;
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
    }

    #mobile-menu > nav,
    #mobile-menu > nav > div {
        display: block;
        height: auto;
    }

    #mobile-menu ul {
        display: flex;
        flex-direction: column;
        gap: 2px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #mobile-menu li {
        display: block;
        margin: 0;
    }

    #mobile-menu a {
        display: block;
        padding: 12px 4px;
        color: #fff;
        text-decoration: none;
    }

    #mobile-menu .sub-menu {
        display: block !important;
        position: static;
        height: auto !important;
        overflow: visible !important;
        opacity: 1;
        transform: none;
    }

    #mobile-menu .menu-item-has-children > a {
        width: 100%;
    }

    #mobile-menu a:focus-visible,
    #hamburger:focus-visible {
        outline: 2px solid #18c8d2;
        outline-offset: 3px;
    }
}

@media (min-width: 900px) {
    #hamburger {
        display: none !important;
    }
}

.single .article-body,
.single .article-body .section,
.heaan-blog-content {
    min-width: 0;
    max-width: 100%;
}

.heaan-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.heaan-table-scroll:focus-visible {
    outline: 2px solid #18c8d2;
    outline-offset: 2px;
}
