/* Article screens: scoped styles, using the site's existing color and type scale. */
[data-article-image][hidden] { display: none; }
.article-library > .container { max-width: 1480px; }
.home-articles { background: var(--white); border-top: 1px solid var(--line); }
.home-articles > .container { max-width: 1480px; }
.home-articles-heading { margin-bottom: 30px; }
.home-articles-heading .eyebrow { margin-bottom: 12px; }
.home-articles-heading .section-title { margin-bottom: 12px; }
.home-articles-heading .section-description { max-width: 540px; margin-bottom: 0; }
.article-library-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.article-library-heading .eyebrow { margin-bottom: 12px; }
.article-library-heading .section-title { margin: 0; }
.article-library-heading > p { margin: 0; max-width: 340px; color: var(--muted); font-size: 15px; }
.article-results-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; scroll-margin-top: 130px; }
.article-results-toolbar .article-pagination { margin-top: 0; margin-left: auto; }
.article-result-count { margin: 0; color: var(--text); font-size: 13px; }
.article-result-count > span { color: var(--muted); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; transition: opacity .18s ease; }
.article-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); transition: translate .28s ease, border-color .28s ease, box-shadow .28s ease; }
.article-card:focus-within { border-color: var(--brand); box-shadow: 0 10px 28px rgba(var(--brand-rgb), .12); }
.article-card-link { display: flex; flex-direction: column; height: 100%; }
.article-card-link:focus-visible { outline-offset: -4px; }
.article-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-section) url("../img/article-placeholder.svg") center / cover no-repeat; }
.article-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
.article-card-copy { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.article-card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 11px; color: var(--muted); font-size: 11px; }
.article-card-meta time { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 12px; white-space: nowrap; }
.article-card-meta time i { color: var(--brand); font-size: 12px; }
.article-card-meta > span { color: var(--text); font-weight: 600; letter-spacing: .09em; }
.article-card h3 { margin-bottom: 10px; font-size: 19px; font-weight: 600; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
.article-card-copy > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-bottom: 18px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.article-card-more { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; transition: border-color .28s ease; }
.article-card-more i { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; color: var(--brand); background: var(--brand-soft); transition: background-color .28s ease, color .28s ease, translate .28s ease; }
.article-card:focus-within .article-card-more { border-color: var(--brand-border); }
.article-card:focus-within .article-card-more i { background: var(--brand); color: var(--white); }
/* Translate stays separate from the AJAX entrance animation's transform. */
@media (hover: hover) and (pointer: fine) {
    .article-card:hover { translate: 0 -5px; border-color: var(--brand-border); box-shadow: 0 12px 32px rgba(var(--brand-rgb), .13); }
    .article-card:hover .article-card-media img { transform: scale(1.045); }
    .article-card:hover .article-card-more { border-color: var(--brand-border); }
    .article-card:hover .article-card-more i { background: var(--brand); color: var(--white); translate: 2px 0; }
}
.article-pagination { position: relative; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 32px; max-width: 100%; }
.article-results > .article-pagination { width: fit-content; margin-left: auto; margin-right: 0; }
.article-pagination a { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--text); font-size: 14px; }
.article-pagination a:hover { border-color: var(--brand); background: var(--brand-soft); }
.article-pagination a[aria-current="page"] { color: var(--white); background: var(--brand); border-color: var(--brand); font-weight: 600; }
.pagination-gap { color: var(--muted); }
.article-pagination-progress { position: absolute; inset: auto 0 -8px; height: 2px; overflow: hidden; border-radius: 2px; background: var(--brand-medium); opacity: 0; }
.article-pagination-progress > span { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--brand); }
[data-article-browser][aria-busy="true"] .article-pagination-progress { opacity: 1; }
[data-article-browser][aria-busy="true"] .article-pagination-progress > span { animation: article-loading-track 1.1s ease-in-out infinite; }
[data-article-browser][aria-busy="true"] .article-grid { opacity: .5; }
@keyframes article-loading-track { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
@keyframes article-loading-spin { to { transform: rotate(360deg); } }
.article-load-status { min-height: 24px; margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.article-load-status.is-error { color: var(--ink); }
.article-load-status.is-loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 9px; border: 2px solid var(--brand-medium); border-top-color: var(--brand); border-radius: 50%; vertical-align: -2px; animation: article-loading-spin .8s linear infinite; }
.article-empty { max-width: 720px; margin-inline: auto; padding: 45px 26px; text-align: center; border-radius: var(--radius-md); background: var(--brand-section); }
.article-empty > i { color: var(--brand); font-size: 32px; margin-bottom: 20px; }
.article-empty h2 { font-size: 25px; }
.article-empty p { font-size: 16px; color: var(--muted); }
.article-detail-layout { display: grid; grid-template-columns: minmax(0, 780px) minmax(260px, 300px); gap: clamp(32px, 4vw, 64px); max-width: 1144px; align-items: start; }
.article-reading { min-width: 0; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 28px; padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.article-meta-item { display: flex; align-items: center; gap: 11px; min-width: 0; }
.article-meta-item > i { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; color: var(--brand); background: var(--brand-soft); font-size: 14px; }
.article-meta-item small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.article-meta-item strong, .article-meta-item time { display: block; color: var(--ink); font-size: 13px; font-weight: 550; line-height: 1.5; }
.article-cover { height: clamp(240px, 30vw, 360px); margin-bottom: 32px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.article-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.article-prose { font-size: 17px; line-height: 1.9; overflow-wrap: anywhere; color: var(--text); }
.article-prose > :first-child { margin-top: 0; }
.article-prose > :last-child { margin-bottom: 0; }
.article-prose p { margin-bottom: 24px; }
.article-prose h2 { margin: 36px 0 18px; font-size: 25px; line-height: 1.4; }
.article-prose h3 { margin: 30px 0 16px; font-size: 21px; line-height: 1.45; }
.article-prose h4, .article-prose h5, .article-prose h6 { margin: 24px 0 14px; font-size: 19px; }
.article-prose img { display: block; max-width: 100%; height: auto; margin: 24px auto; border-radius: 12px; }
.article-prose figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.article-prose a { text-decoration: underline; text-decoration-color: var(--brand); }
.article-prose ul, .article-prose ol { padding-left: 24px; margin-bottom: 22px; }
.article-prose li + li { margin-top: 8px; }
.article-prose blockquote { margin: 28px 0; padding: 22px 26px; border-left: 3px solid var(--brand); border-radius: 0 12px 12px 0; background: var(--brand-section); }
.article-prose blockquote p:last-child { margin-bottom: 0; }
.article-prose table { display: block; max-width: 100%; overflow-x: auto; margin: 24px 0; border-collapse: collapse; font-size: 15px; }
.article-prose td, .article-prose th { padding: 12px; border: 1px solid var(--line); }
.article-prose pre { padding: 18px; overflow-x: auto; background: var(--surface); border-radius: 10px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.article-tags span { border-radius: 50px; background: var(--brand-soft); padding: 6px 13px; color: var(--text); font-size: 12px; }
.article-ending { margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); }
.article-editor { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 12px; background: var(--surface); }
.article-editor-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--brand-border); border-radius: 50%; color: var(--brand); background: var(--white); font-size: 14px; }
.article-editor p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.article-editor small { display: block; margin-bottom: 2px; font-size: 11px; }
.article-editor a { color: var(--ink); font-weight: 600; }
.article-editor p > span { display: block; margin-top: 2px; font-size: 12px; }
.article-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.article-actions .text-link { font-size: 13px; }
.article-copy-button { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font-size: 13px; font-weight: 550; transition: background .2s ease, border-color .2s ease; }
.article-copy-button[hidden] { display: none; }
.article-copy-button i { color: var(--brand); }
.article-copy-button:hover { border-color: var(--brand-border); background: var(--brand-soft); }
.article-copy-button:disabled { opacity: .6; cursor: wait; }
.article-copy-status { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 12px; text-align: right; }
.article-copy-fallback label { display: block; margin: 12px 0 6px; font-size: 12px; }
.article-copy-fallback input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
.article-sidebar { display: grid; gap: 24px; min-width: 0; }
.article-side-panel { padding: 24px; border: 1px solid var(--brand-border); border-radius: var(--radius-md); background: var(--brand-section); }
.article-side-panel .eyebrow { font-size: 10px; margin-bottom: 12px; }
.article-side-panel h2 { font-size: 21px; margin-bottom: 20px; }
.article-toc { background: var(--white); border-color: var(--line); }
.article-toc ol { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; list-style: none; padding: 3px; margin: -3px; scrollbar-width: thin; }
.article-toc a { display: block; padding: 10px 12px; border-left: 2px solid var(--line); border-radius: 0 8px 8px 0; color: var(--text); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.article-toc a:hover, .article-toc a[aria-current="location"] { border-left-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.article-toc a[aria-current="location"] { font-weight: 600; }
.article-toc-subheading { padding-left: 12px; }
.article-toc-subheading a { font-size: 12px; }
.article-related-link { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--brand-border); color: var(--ink); font-size: 13px; font-weight: 550; line-height: 1.55; }
.article-related-link > img { width: 64px; height: 64px; flex-shrink: 0; border-radius: 10px; object-fit: cover; background: var(--white); }
.article-related-link > span { min-width: 0; overflow-wrap: anywhere; }
.article-related-more { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 11px; font-weight: 400; }
.article-related-more i { color: var(--brand); font-size: 10px; }
.article-related-link:hover .article-related-more { color: var(--ink); }
.article-side-panel > .text-link { margin-top: 14px; font-size: 12px; }
.article-reading-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; overflow: hidden; background: var(--brand-soft); }
.article-reading-progress > span { display: block; height: 100%; background: var(--brand); transform: scaleX(0); transform-origin: left; }
@media (max-width: 991.98px) {
    .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .article-detail-layout { grid-template-columns: 1fr; max-width: 780px; gap: 36px; }
    .article-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .article-side-panel:only-child { grid-column: 1 / -1; }
    .article-card-copy { padding: 18px; }
}
@media (max-width: 575.98px) {
    .article-library-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .article-library-heading > p { font-size: 14px; }
    .article-grid { grid-template-columns: 1fr; }
    .article-card h3 { font-size: 19px; }
    .article-results-toolbar { align-items: flex-start; flex-direction: column; gap: 14px; }
    .article-pagination { gap: 6px; margin-top: 28px; }
    .article-pagination a { min-width: 38px; padding-inline: 10px; }
    .article-prose { font-size: 16px; }
    .article-prose h2 { font-size: 23px; }
    .article-prose h3 { font-size: 20px; }
    .article-sidebar { grid-template-columns: 1fr; }
    .article-side-panel { padding: 22px; }
    .article-meta { gap: 16px 20px; }
    .article-meta-item > i { width: 32px; height: 32px; }
    .article-cover { height: 260px; padding: 8px; margin-bottom: 26px; }
    .article-prose blockquote { padding: 18px 20px; }
    .article-editor { padding: 16px; }
    .article-actions { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .article-card, .article-grid, .article-copy-button, .article-card-media img, .article-card-more, .article-card-more i { transition: none; }
    .article-card:hover, .article-card:hover .article-card-more i { translate: none; }
    .article-card:hover .article-card-media img { transform: none; }
    [data-article-browser][aria-busy="true"] .article-pagination-progress > span, .article-load-status.is-loading::before { animation: none; }
}
@media print {
    .article-detail-layout { display: block; }
    .article-sidebar, .article-pagination, .article-load-status, .article-reading-progress, .article-actions, .article-copy-status, .article-copy-fallback { display: none; }
    .article-card, .article-cover { break-inside: avoid; }
    .article-card-copy > p { display: block; overflow: visible; }
    .article-prose { font-size: 12pt; }
}
