/* The existing CTA stylesheet is authoritative for all registered articles. */
@import url('/assets/article-cta.css');

/* Shared mobile contract. Non-CTA desktop layout remains untouched. */
@media (max-width: 768px) {
    nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 2rem;
        background: var(--white, #fff);
        box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
    }

    nav.menu-ready .nav-links.is-open {
        display: flex;
    }

    /* These are intentional separate desktop/mobile controls, not duplicate CTAs. */
    nav .nav-container > .nav-cta {
        display: none;
    }

    nav .nav-links .mobile-nav-cta {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Long URLs may wrap; preformatted code instead gets its own scroll area. */
    .article-content {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .article-content pre {
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        white-space: pre;
        overflow-wrap: normal;
    }

    .article-table-wrap {
        max-width: 100%;
        overflow-x: auto;
    }
}
