/* MSPSEO article bodies. Keep internal and external links identifiable without color. */
:is(.article-body, .entry-content, section.article-content) a:any-link {
    text-decoration-line: underline;
    text-underline-offset: 0.16em;
    text-decoration-thickness: 0.08em;
}

/* Give paired disclosures and actions a clear hierarchy within the original paragraph. */
:is(.article-body, .entry-content, section.article-content)
p:has(> a[rel~="sponsored"]:is([href$=".apk" i], [href*=".apk?" i], [href*="/download" i], .article-download))
> a[rel~="sponsored"][href^="https://"] {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    min-height: 36px;
    max-width: 100%;
    margin: 0.18em 0.2em;
    padding: 0.18rem 0.7rem;
    border: 1px solid var(--action-border, #124b89);
    border-radius: 0.42rem;
    background-color: var(--action-background, #124b89);
    color: var(--action-ink, #fff);
    box-sizing: border-box;
    line-height: 1.35;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

:is(.article-body, .entry-content, section.article-content)
p > a[rel~="sponsored"][href^="https://"]:is([href$=".apk" i], [href*=".apk?" i], [href*="/download" i], .article-download) {
    --action-ink: #143c67;
    --action-background: #f4f8fe;
    --action-border: #547699;
    --action-hover: #e2eefc;
}

:is(.article-body, .entry-content, section.article-content)
p:has(> a[rel~="sponsored"]:is([href$=".apk" i], [href*=".apk?" i], [href*="/download" i], .article-download))
> a[rel~="sponsored"][href^="https://"]:hover {
    background-color: var(--action-hover, #0a3769);
    text-decoration-line: underline;
}

:is(.article-body, .entry-content, section.article-content) a:any-link:focus-visible {
    outline: 2px solid #147fbb;
    outline-offset: 2px;
}

@media (max-width: 600px), (pointer: coarse) {
    :is(.article-body, .entry-content, section.article-content)
    p:has(> a[rel~="sponsored"]:is([href$=".apk" i], [href*=".apk?" i], [href*="/download" i], .article-download))
    > a[rel~="sponsored"][href^="https://"] {
        min-height: 44px;
    }
}

/* The mgblog article shell otherwise sizes to its longest unbroken item. */
@media (max-width: 991px) {
    .page-shell > .container-main:has(> .content-body > .content-left article > section.article-content) {
        width: 100%;
        min-width: 0;
    }

    .content-body > .content-left:has(article > section.article-content) {
        min-width: 0;
        max-width: 100%;
    }
}
