/* Article page chrome: share bar + sticky side rails.
 * IMPORTANT: do not put overflow-x/y:hidden on <main>, or position:sticky breaks. */

.article-engage__btn {
    display: inline-flex !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 9999px;
    box-sizing: border-box;
}

.article-engage__icon,
.article-engage__btn img,
.article-engage__actions img {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain !important;
    display: block !important;
}

.article-engage__share {
    display: inline-flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.article-engage__row {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem;
    align-items: stretch;
}

.article-engage__actions {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.article-engage__tags {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* Keep share + tags stacked (not side-by-side), even on wide screens. */
@media (min-width: 1024px) {
    .article-engage__row {
        flex-direction: column !important;
        align-items: stretch;
        justify-content: flex-start;
    }

    .article-engage__tags {
        max-width: none;
        justify-content: flex-start;
    }
}

/* Sticky rails: plain CSS so it works even if Tailwind responsive utilities are missing. */
@media (min-width: 1280px) {
    .article-rail {
        position: sticky !important;
        top: 7rem !important;
        align-self: start !important;
        z-index: 10;
    }

    .article-toc {
        position: sticky !important;
        top: 7rem !important;
        max-height: calc(100vh - 8rem) !important;
        overflow-y: auto !important;
        z-index: 10;
    }
}
