.article-page {
    background: #f8fafc;
}

.article-page main {
    min-height: 60vh;
}

body.article-page .mobile-menu-toggle {
    border-color: #64748b;
    color: #1f2937;
}

.article-hero {
    padding: 4.5rem 0 3rem;
    background: linear-gradient(145deg, #312e81 0%, #5b21b6 58%, #6d28d9 100%);
    color: #fff;
}

.article-hero .container,
.article-shell {
    max-width: 920px;
}

.article-kicker {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    color: #f5f3ff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.article-hero h1 {
    max-width: 820px;
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2.1rem, 6vw, 3.6rem);
}

.article-answer {
    max-width: 780px;
    margin-bottom: 1.5rem;
    color: #ede9fe;
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    line-height: 1.75;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 1.5rem;
    color: #ddd6fe;
    font-size: 0.925rem;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.article-hero .article-actions .btn-secondary {
    border-color: #c4b5fd;
    background: transparent;
    color: #fff;
}

.article-hero .article-actions .btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.article-content .article-actions .btn-secondary {
    border-color: #5b21b6;
    background: #fff;
    color: #5b21b6;
}

.article-content .article-actions .btn-secondary:hover {
    border-color: #312e81;
    background: #f5f3ff;
    color: #312e81;
}

.article-breadcrumbs {
    padding: 1rem 0 0;
    color: #64748b;
    font-size: 0.925rem;
}

.article-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0;
    list-style: none;
}

.article-breadcrumbs li:not(:last-child)::after {
    margin-left: 0.45rem;
    color: #94a3b8;
    content: "/";
}

.article-breadcrumbs a,
.article-content a,
.article-card a {
    color: #5b21b6;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.18em;
}

.article-content {
    padding: 2.5rem 0 4rem;
}

.article-content section {
    margin-top: 2.75rem;
    scroll-margin-top: 5.5rem;
}

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

.article-content h2 {
    margin-bottom: 0.8rem;
    color: #111827;
    font-size: clamp(1.55rem, 4vw, 2.05rem);
}

.article-content h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
    color: #1f2937;
}

.article-content p,
.article-content li,
.article-content td,
.article-content dd {
    color: #374151;
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.5rem 1.5rem;
}

.article-content li + li {
    margin-top: 0.55rem;
}

.article-callout,
.article-formula,
.article-disclaimer,
.article-policy {
    margin: 1.5rem 0;
    padding: 1.25rem 1.4rem;
    border: 1px solid #c4b5fd;
    border-radius: 0.85rem;
    background: #f5f3ff;
}

.article-formula code {
    display: block;
    overflow-wrap: anywhere;
    color: #312e81;
    font-size: 0.98rem;
    line-height: 1.7;
    white-space: normal;
}

.article-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #d1d5db;
    border-radius: 0.85rem;
    background: #fff;
}

.article-table-wrap table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.article-table-wrap th,
.article-table-wrap td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.article-table-wrap th {
    background: #ede9fe;
    color: #312e81;
}

.article-table-wrap tr:last-child td {
    border-bottom: 0;
}

.article-sources {
    padding: 1.5rem;
    border-top: 3px solid #7c3aed;
    background: #fff;
}

.article-sources li {
    overflow-wrap: anywhere;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.article-card {
    padding: 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.article-card h2 {
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
}

.article-card p:last-child,
.article-callout p:last-child,
.article-policy p:last-child,
.article-disclaimer p:last-child {
    margin-bottom: 0;
}

.article-page a:focus-visible,
.article-page button:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

html[data-theme="dark"] body.article-page,
html[data-theme="dark"] body.article-page main,
html[data-theme="dark"] body.article-page .article-content {
    background: #0f172a;
    color: #e2e8f0;
}

html[data-theme="dark"] body.article-page .navbar,
html[data-theme="dark"] body.article-page .footer {
    background: #111827;
}

html[data-theme="dark"] body.article-page .mobile-menu-toggle {
    border-color: rgba(255, 255, 255, 0.45);
    color: #f8fafc;
}

html[data-theme="dark"] body.article-page .article-content h2,
html[data-theme="dark"] body.article-page .article-content h3,
html[data-theme="dark"] body.article-page .article-card h2 {
    color: #f8fafc;
}

html[data-theme="dark"] body.article-page .article-content p,
html[data-theme="dark"] body.article-page .article-content li,
html[data-theme="dark"] body.article-page .article-content td,
html[data-theme="dark"] body.article-page .article-content dd,
html[data-theme="dark"] body.article-page .article-card p,
html[data-theme="dark"] body.article-page .article-breadcrumbs {
    color: #cbd5e1;
}

html[data-theme="dark"] body.article-page .article-callout,
html[data-theme="dark"] body.article-page .article-formula,
html[data-theme="dark"] body.article-page .article-disclaimer,
html[data-theme="dark"] body.article-page .article-policy,
html[data-theme="dark"] body.article-page .article-card,
html[data-theme="dark"] body.article-page .article-sources,
html[data-theme="dark"] body.article-page .article-table-wrap {
    border-color: #475569;
    background: #1e293b;
}

html[data-theme="dark"] body.article-page .article-table-wrap th {
    background: #312e81;
    color: #f5f3ff;
}

html[data-theme="dark"] body.article-page .article-table-wrap td {
    border-color: #475569;
}

html[data-theme="dark"] body.article-page .article-breadcrumbs a,
html[data-theme="dark"] body.article-page .article-content a,
html[data-theme="dark"] body.article-page .article-card a,
html[data-theme="dark"] body.article-page .article-formula code {
    color: #c4b5fd;
}

html[data-theme="dark"] body.article-page .article-content .article-actions .btn-secondary {
    border-color: #c4b5fd;
    background: #1e293b;
    color: #c4b5fd;
}

html[data-theme="dark"] body.article-page .article-content .article-actions .btn-secondary:hover {
    border-color: #fff;
    background: #312e81;
    color: #fff;
}

@media (max-width: 640px) {
    .article-hero {
        padding: 3.5rem 0 2.5rem;
    }

    .article-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .article-actions .btn {
        width: 100%;
        min-height: 2.75rem;
    }

    .article-content {
        padding-top: 2rem;
    }

    .article-callout,
    .article-formula,
    .article-disclaimer,
    .article-policy,
    .article-sources,
    .article-card {
        padding: 1.1rem;
    }
}
