.articles-index,
.article-page {
    padding: 56px 20px 72px;
    background: #f8f9fa;
}

.articles-intro,
.article-shell {
    max-width: 900px;
    margin: 0 auto;
}

.articles-intro {
    text-align: center;
    margin-bottom: 32px;
}

.articles-eyebrow,
.article-card__category {
    margin: 0 0 8px;
    color: #007bff;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.articles-intro h1 {
    margin: 0;
    color: #1d2438;
    font-size: clamp(2.2rem, 5vw, 3.3rem);
    line-height: 1.15;
}

.articles-intro > p:last-child {
    max-width: 660px;
    margin: 14px auto 0;
    color: #52627a;
    font-size: 1.08rem;
    line-height: 1.7;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.article-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--ui-card-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-card-surface);
    box-shadow: var(--ui-card-shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--ui-card-border-hover);
    box-shadow: var(--ui-card-shadow-hover);
}

.article-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 22px;
    border: 1px solid rgba(0, 123, 255, .20);
    border-radius: 14px;
    background: rgba(0, 123, 255, .10);
    color: #007bff;
    font-size: 1.2rem;
}

.article-card h2 {
    margin: 0 0 14px;
    color: #1d2438;
    font-size: 1.4rem;
    line-height: 1.3;
}

.article-card h2 a {
    color: inherit;
    text-decoration: none;
}

.article-card h2 a:hover,
.article-card h2 a:focus-visible {
    color: #007bff;
}

.article-card > p:not(.article-card__category) {
    margin: 0 0 22px;
    color: #52627a;
    line-height: 1.65;
}

.article-card__link,
.article-back {
    color: #006ad9;
    font-weight: 700;
    text-decoration: none;
}

.article-card__link {
    margin-top: auto;
}

.article-card__link:hover,
.article-card__link:focus-visible,
.article-back:hover,
.article-back:focus-visible {
    color: #004f9f;
    text-decoration: underline;
}

.article-card__link i,
.article-back i {
    margin-left: 5px;
}

.article-shell {
    max-width: 820px;
}

.article-back {
    display: inline-block;
    margin-bottom: 22px;
}

.article-back i {
    margin: 0 7px 0 0;
}

.article-content {
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--ui-card-border);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-card-surface);
    box-shadow: var(--ui-card-shadow);
    color: #40516c;
    font-size: 1.04rem;
    line-height: 1.75;
}

.article-content > :first-child {
    margin-top: 0;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: #1d2438;
    line-height: 1.3;
}

.article-content h1 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 5vw, 3rem);
}

.article-content h2 {
    margin: 44px 0 16px;
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.article-content h3 {
    margin: 30px 0 12px;
    font-size: 1.25rem;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin: 0 0 20px;
}

.article-content ul,
.article-content ol {
    padding-left: 1.4em;
}

.article-content li + li {
    margin-top: 8px;
}

.article-content a {
    color: #006ad9;
    text-underline-offset: 2px;
}

.article-content a:hover,
.article-content a:focus-visible {
    color: #004f9f;
}

.article-content img {
    display: block;
    width: 100%;
    height: auto;
    margin: 28px 0;
    border-radius: 12px;
}

.article-content blockquote {
    margin: 28px 0;
    padding: 18px 22px;
    border-left: 4px solid #007bff;
    border-radius: 0 12px 12px 0;
    background: rgba(0, 123, 255, .07);
    color: #30425f;
}

.article-content blockquote p:last-child,
.article-content blockquote ul:last-child {
    margin-bottom: 0;
}

.article-content hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid rgba(29, 36, 56, .16);
}

@media (prefers-color-scheme: dark) {
    .articles-index,
    .article-page {
        background: #1d2438;
    }

    .articles-intro h1,
    .article-card h2,
    .article-content h1,
    .article-content h2,
    .article-content h3 {
        color: #ecf2ff;
    }

    .articles-intro > p:last-child,
    .article-card > p:not(.article-card__category),
    .article-content {
        color: #d5e0f7;
    }

    .articles-eyebrow,
    .article-card__category,
    .article-card__icon {
        color: #8cc2ff;
    }

    .article-card,
    .article-content {
        border-color: var(--ui-card-dark-border);
        background: var(--ui-card-surface-dark);
        box-shadow: var(--ui-card-dark-shadow);
    }

    .article-card:hover {
        border-color: rgba(140, 194, 255, .42);
        box-shadow: var(--ui-card-dark-shadow-hover);
    }

    .article-card__icon {
        border-color: rgba(140, 194, 255, .28);
        background: rgba(140, 194, 255, .13);
    }

    .article-card h2 a:hover,
    .article-card h2 a:focus-visible,
    .article-card__link,
    .article-back,
    .article-content a {
        color: #8cc2ff;
    }

    .article-card__link:hover,
    .article-card__link:focus-visible,
    .article-back:hover,
    .article-back:focus-visible,
    .article-content a:hover,
    .article-content a:focus-visible {
        color: #c3ddff;
    }

    .article-content blockquote {
        border-left-color: #8cc2ff;
        background: rgba(140, 194, 255, .10);
        color: #d9e5ff;
    }

    .article-content hr {
        border-top-color: rgba(255, 255, 255, .16);
    }
}

@media (max-width: 720px) {
    .articles-index,
    .article-page {
        padding: 38px 16px 54px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-card {
        padding: 24px;
    }
}
