
.articles-page,
.avx-page {
    --editorial-focus: var(--ahbab-gold, #ffd166);
    --editorial-reading-width: 76ch;
}

.articles-page :where(a, button, input, select),
.avx-page :where(a, button, input, select),
.avx-lightbox :where(button) {
    -webkit-tap-highlight-color: transparent;
}

.articles-page :where(a, button, input, select):focus-visible,
.avx-page :where(a, button, input, select):focus-visible,
.avx-lightbox :where(button):focus-visible,
.avx-table-wrap:focus-visible {
    outline: 3px solid var(--editorial-focus);
    outline-offset: 3px;
}

.articles-page :where(.articles-lead, .articles-card, .articles-hero, .articles-toolbar),
.avx-page :where(.avx-hero, .avx-article, .avx-side-card, .avx-related-card) {
    min-inline-size: 0;
}

.articles-page :where(h1, h2, h3, p, .articles-excerpt),
.avx-page :where(h1, h2, h3, p, .avx-related-copy) {
    overflow-wrap: break-word;
}

.articles-page .articles-type-strip {
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 12px;
}

.articles-page .articles-type-chip[aria-current="page"] {
    border-color: var(--ap-gold);
}

.articles-page .articles-card,
.avx-page .avx-related-card {
    contain: layout;
}

.avx-page .avx-rich {
    max-inline-size: none;
    overflow-wrap: break-word;
    user-select: text;
    -webkit-user-select: text;
}

.avx-page .avx-rich > :where(p, ul, ol, blockquote, h2, h3, h4, h5, h6) {
    max-inline-size: var(--editorial-reading-width);
}

.avx-page .avx-rich :where(pre, code, kbd, samp) {
    direction: ltr;
    unicode-bidi: isolate;
    tab-size: 4;
}

.avx-page .avx-rich pre {
    max-inline-size: 100%;
    overflow-x: auto;
    padding: 1rem;
    border: 1px solid var(--avx-line);
    border-radius: 12px;
    background: rgba(0, 0, 0, .25);
    white-space: pre;
}

.avx-page .avx-rich :where(iframe, video, embed, object) {
    display: block;
    max-inline-size: 100%;
}

.avx-page .avx-table-wrap {
    max-inline-size: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    margin-block: 1.5rem;
    border: 1px solid var(--avx-line);
    border-radius: 12px;
}

.avx-page .avx-rich .avx-table-wrap > table {
    display: table;
    inline-size: max-content;
    min-inline-size: 100%;
    max-inline-size: none;
    border-collapse: collapse;
}

.avx-page .avx-rich .avx-table-wrap :where(thead, tbody) {
    display: table-row-group;
}

.avx-page .avx-rich .avx-table-wrap thead {
    display: table-header-group;
}

.avx-page .avx-rich .avx-table-wrap tr {
    display: table-row;
}

.avx-page .avx-rich .avx-table-wrap :where(td, th) {
    display: table-cell;
    inline-size: auto;
    min-inline-size: 6rem;
    overflow-wrap: normal;
    white-space: normal;
    padding: .8rem;
    text-align: start;
    border-block-end: 1px solid var(--avx-line);
}

.avx-page .avx-rich .avx-table-wrap td::before {
    content: none;
}

.avx-page .avx-short-url {
    direction: ltr;
    unicode-bidi: plaintext;
    user-select: text;
}

@media (max-width: 767px) {
    .articles-page .articles-shell {
        gap: 16px;
    }

    .articles-page .articles-hero-grid {
        gap: 14px;
    }

    .articles-page .articles-lead-body {
        padding: 18px;
    }

    .articles-page .articles-lead-image {
        min-block-size: 0;
        aspect-ratio: 16 / 10;
    }

    .articles-page .articles-actions {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    }

    .articles-page .articles-type-strip {
        padding-block-end: .7rem;
    }

    .avx-page .avx-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .avx-page .avx-article-inner {
        min-inline-size: 0;
    }

    .avx-page .avx-related-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .articles-page :where(.articles-card, .articles-card-image img),
    .avx-page :where(.avx-btn, .avx-gallery-item img, .avx-related-card, .avx-related-image img) {
        transition: none;
    }
}

@media print {
    .articles-page,
    .avx-page {
        color: #111;
        background: white;
    }

    .articles-page :where(.articles-toolbar, .articles-type-strip, .articles-pagination),
    .avx-page :where(.avx-aside, .avx-related, .avx-gallery, .avx-progress) {
        display: none;
    }

    .avx-page,
    .avx-page .avx-hero,
    .avx-page .avx-article,
    .avx-page .avx-rich,
    .articles-page :where(.articles-card, .articles-lead) {
        box-shadow: none;
        border-color: #ddd;
        background: white;
        color: #111;
    }

    .avx-page .avx-rich :where(p, h2, h3, h4),
    .avx-page .avx-title {
        color: #111;
    }

    .avx-page .avx-rich a,
    .articles-page a {
        color: #111;
        text-decoration: underline;
    }

    .avx-page .avx-hero-grid,
    .avx-page .avx-main,
    .articles-page .articles-lead,
    .articles-page .articles-grid {
        display: block;
    }

    .avx-page .avx-cover,
    .articles-page .articles-lead-image {
        max-block-size: 18rem;
        overflow: hidden;
    }

    .avx-page .avx-cover img {
        min-block-size: 0;
        max-block-size: 18rem;
        object-fit: contain;
    }
}
