/* Articles: the index, the topic archives and the cards (also used under "Keep reading" on an article). Values are from docs/mockups/articles.html
   and article.html. The cards are core Query Loop items: ul.a-grid > li > .a-card, so a list item holds one card and the card fills it (equal
   heights per row, the meta line at the bottom). */

svg.art *{ vector-effect: non-scaling-stroke; }
svg.art{ display: block; width: 100%; height: 100%; }

/* Pills: the topic and platform of an article (Post Terms links) and the plain .s-pill. */
.art-sec .s-pill,
.art-sec .a-pills .wp-block-post-terms a { display: inline-flex; align-items: center; gap: 0.375rem; box-sizing: border-box; max-width: 100%; padding: 0.25rem 0.75rem; border: 1px solid var(--control-border); border-radius: 999px; background: transparent; color: var(--ink); font-family: var(--font-display); font-size: 0.9375rem; letter-spacing: 0.04em; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.art-sec .a-pills .s-type a { border-color: var(--gold); background: var(--gold-wash); text-transform: uppercase; font-size: 0.8125rem; letter-spacing: 0.1em; }
.art-sec .a-pills .wp-block-post-terms { margin: 0; }
.a-pills .s-pill:empty { display: none; }
.a-pills .s-pill { margin: 0; }
.a-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.75rem; position: relative; z-index: 2; }

/* Intro. */
.idx-h { font-size: 4rem; }
@media (max-width: 40rem) { .idx-h { font-size: 2.75rem !important; } }
.a-find { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin: 1.5rem 0 0; color: var(--ink-muted); }
.a-find a { color: var(--ink); border-bottom: 1px solid var(--gold); text-decoration: none; }

/* Topic pills (the [xc_article_topics] shortcode). */
.a-topics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2.5rem; }
.a-topics .s-pill { padding: 0.375rem 1rem; font-size: 1rem; text-decoration: none; }
.a-topics .s-pill .n { color: var(--ink-muted); font-size: 0.9375rem; }
.a-topics .s-pill:hover { border-color: var(--gold); }
.a-topics .s-pill[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.a-topics .s-pill[aria-current="page"] .n { color: inherit; }
.a-topics .s-pill:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }

/* Cards. */
.a-query .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.a-query .wp-block-post-template > li { display: flex; margin: 0; min-width: 0; }
.a-query .wp-block-post-template > li > .a-card,
.a-query .wp-block-post-template > li > .a-feature { flex: 1; }
.a-card { position: relative; display: flex; flex-direction: column; background: var(--surface-200); border: 1px solid var(--hairline); border-radius: var(--radius-xs); overflow: hidden; transition: border-color 0.2s ease; }
.a-card:hover, .a-card:focus-within { border-color: var(--gold); }
.a-thumb { position: relative; aspect-ratio: 16 / 10; margin: 0; border-bottom: 1px solid var(--hairline); overflow: hidden; background: var(--wf-page); }
.a-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.a-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 1.25rem 1.5rem 1.5rem; }
.a-title { margin: 0 0 0.5rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.a-title a { color: var(--ink); text-decoration: none; }
.a-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.a-title a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -4px; }
.a-ex { margin: 0 0 1rem; color: var(--ink-muted); overflow-wrap: anywhere; text-wrap: pretty; }
.a-ex p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: auto 0 0; font-size: 0.9375rem; color: var(--ink-muted); }
.a-meta > * { margin: 0; color: inherit; }
.a-meta > * + *::before { content: ""; display: inline-block; width: 0.25rem; height: 0.25rem; border-radius: 50%; background: var(--gold); margin-right: 0.75rem; vertical-align: middle; }
.a-meta a { color: inherit; text-decoration: none; }
.a-meta time { color: inherit; }

.a-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 40rem) { .a-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .a-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.a-grid.two { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .a-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The featured article. */
.a-feature { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface-200); border: 1px solid var(--hairline); border-radius: var(--radius-xs); overflow: hidden; transition: border-color 0.2s ease; }
.a-feature:hover, .a-feature:focus-within { border-color: var(--gold); }
@media (min-width: 56rem) { .a-feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.a-feature .a-thumb { aspect-ratio: 19 / 10; }
@media (min-width: 56rem) { .a-feature .a-thumb { aspect-ratio: auto; min-height: 22rem; border-bottom: 0; border-right: 1px solid var(--hairline); } }
.a-feature .a-body { padding: 2rem 2rem 2.25rem; justify-content: center; }
@media (min-width: 56rem) { .a-feature .a-body { padding: 2.5rem 3rem; } }
.a-feature .a-title { -webkit-line-clamp: 5; font-size: 2.25rem; line-height: 1.2; }
@media (max-width: 40rem) { .a-feature .a-title { font-size: 1.75rem; } }
.a-feature .a-ex { font-size: 1.1875rem; margin-bottom: 1.5rem; }
.a-feature .a-ex p { -webkit-line-clamp: 4; }
.a-feature .a-meta { margin-top: 0; }
.a-flag { display: inline-block; margin: 0 0 1rem; font-family: var(--font-display); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); }

/* "More articles" and a topic's own heading. With a single article there is nothing to list, so the heading goes too. */
.a-sec { margin-top: 3.5rem; }
.a-sec:not(:has(.wp-block-post-template)) { display: none; }
.a-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; padding: 0.75rem 1rem; border: 1px solid var(--hairline); border-left: 3px solid var(--gold); border-radius: var(--radius-xs); background: var(--surface-200); }
.a-sec-h h2, .a-sec-h p { margin: 0; }

/* Pagination. */
.a-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 3rem 0 0; }
.a-pager a, .a-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; height: 2.75rem; box-sizing: border-box; padding: 0 0.75rem; border: 1px solid var(--control-border); border-radius: var(--radius-xs); color: var(--ink); font-family: var(--font-display); text-decoration: none; }
.a-pager .page-numbers.current { border-color: var(--gold); background: var(--gold-wash); }
.a-pager a:hover { border-color: var(--gold); }
.a-pager a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.a-pager .wp-block-query-pagination-numbers { display: contents; }

/* No articles yet. */
.a-empty { padding: 3rem 1.5rem; border: 1px dashed var(--control-border); border-radius: var(--radius-xs); }
.a-empty-h { margin: 0 0 1rem; font-family: var(--font-display); font-weight: 300; font-size: 2.25rem; }
.a-empty .body-lg { margin: 0; max-width: 40rem; }
.a-empty .btn { margin-top: 1.5rem; }

/* The Articles page's closing band has the heading and the button only. */
.cta-band.final-cta .cta-act { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }

/* The Articles page's closing band, as in the mockup: the heading on the left, the button on the right. */
.cta-band.final-cta .wrap.art-sec { display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; justify-content: space-between; }
.cta-band.final-cta .wrap.art-sec > .display { flex: 1 1 30rem; max-width: 46rem; margin: 0; font-size: 4.5rem; }
@media (max-width: 40rem) { .cta-band.final-cta .wrap.art-sec > .display { font-size: 2.75rem; } }
