/* An article (docs/mockups/article.html): the header, the byline, the illustration, the contents and share aside, the reading column, the
   short version, the recoveries tiles, the callout, the questions and the author note, then "Keep reading". The body is a flat run of core
   blocks inside .art-body. */

.prog { position: fixed; left: 0; top: var(--hdr, 4.5rem); height: 3px; width: 0; background: var(--gold); z-index: 19; pointer-events: none; }

.ah { padding-block: 3rem 2.5rem; }
.ah .a-h1 { font-family: var(--font-display); font-size: 3.5rem; line-height: 1.1; font-weight: 300; letter-spacing: -0.01em; margin: 0 0 1.5rem; max-width: 56rem; overflow-wrap: anywhere; text-wrap: balance; }
@media (max-width: 40rem) { .ah .a-h1 { font-size: 2.5rem; } }
.ah .a-stand { margin: 0; max-width: 56rem; }
/* A second paragraph straight after the standfirst (article 1's introduction) reads as body text: the article body's paragraph style and the standard gap. */
.ah .a-stand + .a-stand { margin-top: 1.5rem; max-width: 44rem; font-size: 1.1875rem; line-height: 1.75; color: var(--ink); text-wrap: pretty; }
.art-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 2rem 0 3.5rem; }
.by-mark { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--control-border); border-radius: var(--radius-xs); background: var(--surface-200); }
.by-mark svg { width: 1.5rem; height: 1.5rem; }
.art-byline .a-meta { margin: 0; font-size: 1rem; }
.art-byline .a-meta a { color: var(--ink); border-bottom: 1px solid var(--gold); }
.a-hero { margin: 0; border: 1px solid var(--control-border); border-radius: var(--radius-xs); overflow: hidden; aspect-ratio: 19 / 10; width: 100%; background: var(--wf-page); }
.a-hero svg { width: 100%; height: 100%; }
.a-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 40rem) { .a-hero { aspect-ratio: 3.2 / 1; } }
/* Featured-image hero: the frame matches the 1200x630 image at every breakpoint, so nothing crops. The drawn SVG hero keeps the frames above. */
/* Wide screens: cap the frame at 640px tall (640 x 1200 / 630 = 1219px wide), centred, so it never crops. */
.a-hero:has(.a-hero-img) { aspect-ratio: 1200 / 630; max-width: 1219px; margin-inline: auto; }

.a-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (min-width: 64rem) { .a-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 4rem; } }
.aside { min-width: 0; }
/* A long contents list (ten or more entries) is taller than a laptop screen: the list itself scrolls (the heading and the share buttons stay in view). 17rem is the heading, the share block and the gaps. */
@media (min-width: 64rem) {
	.aside { position: sticky; top: calc(var(--hdr, 4.5rem) + 1.5rem); }
	.art-toc-list { max-height: max(10rem, calc(100vh - var(--hdr, 4.5rem) - 17rem)); overflow-y: auto; overscroll-behavior: contain; }
}
.toc { border: 1px solid var(--hairline); border-radius: var(--radius-xs); background: var(--surface-200); max-width: none; }
.toc > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; font-family: var(--font-display); font-size: 1.125rem; }
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (min-width: 64rem) { .toc > summary { pointer-events: none; font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); } .toc > summary .icon { display: none; } }
.toc ol { list-style: none; margin: 0; padding: 0 1.25rem 1rem; counter-reset: t; }
.toc li { counter-increment: t; margin: 0; }
.toc li a { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.25rem; padding: 0.5rem 0; color: var(--ink); opacity: 0.72; border-left: 0; line-height: 1.35; font-size: 1rem; text-decoration: none; }
.toc li a::before { content: counter(t) "."; color: var(--ink-muted); }
.toc li a:hover { color: var(--ink); }
.toc li a[aria-current="true"] { color: var(--ink); opacity: 1; }
.toc li a[aria-current="true"]::before { color: var(--gold-text); }
.toc li a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.share { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.share .caption { width: 100%; margin: 0; }
.share .btn { background: transparent; border: 1px solid var(--control-border); color: var(--ink); }
.share .btn:hover { border-color: var(--gold); }

.art-body { min-width: 0; font-size: 1.1875rem; line-height: 1.75; }
.art-body > :not(.rec) { max-width: 44rem; }
.art-body > :first-child { margin-top: 0; }
.art-body p { margin: 0 0 1.5rem; text-wrap: pretty; }
.art-body h2 { font-family: var(--font-display); font-size: 2.25rem; line-height: 1.2; font-weight: 400; letter-spacing: -0.005em; margin: 3.5rem 0 1.25rem; scroll-margin-top: calc(var(--hdr, 4.5rem) + 1.5rem); overflow-wrap: anywhere; }
@media (max-width: 40rem) { .art-body h2 { font-size: 1.875rem; } }
.art-body h2 a.anchor { margin-left: 0.5rem; color: var(--ink-muted); opacity: 0; font-size: 1.25rem; border: 0; text-decoration: none; transition: opacity 0.2s; }
.art-body h2:hover a.anchor, .art-body h2 a.anchor:focus-visible { opacity: 1; }
.art-body ul, .art-body ol { margin: 0 0 1.75rem; padding-left: 1.5rem; }
.art-body li { margin: 0 0 0.75rem; padding-left: 0.25rem; text-wrap: balance; }
.art-body li::marker { color: var(--gold-text); }
.art-body a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 0.2em; }
.art-body strong { font-weight: 600; }

.takeaways { margin: 0 0 3rem; padding: 1.5rem 1.75rem; background: var(--surface-200); border: 1px solid var(--hairline); border-left: 3px solid var(--gold); border-radius: var(--radius-xs); }
.art-body .takeaways h2 { margin: 0 0 1rem; font-size: 1.125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); font-weight: 500; }
.takeaways ul { margin: 0; }
.takeaways li:last-child { margin-bottom: 0; }

.rec { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.5rem; row-gap: 0; margin: 2rem 0; }
@media (min-width: 48rem) { .rec { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rec .tile { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; align-content: start; margin-bottom: 1.5rem; padding: 1.5rem; background: var(--surface-200); border: 1px solid var(--hairline); border-radius: var(--radius-xs); font-size: 1.0625rem; line-height: 1.6; }
.rec .tile > .s-pill { margin: 0 0 0.75rem; justify-self: start; align-self: start; display: inline-flex; padding: 0.25rem 0.75rem; border: 1px solid var(--control-border); border-radius: 999px; font-family: var(--font-display); font-size: 0.9375rem; letter-spacing: 0.04em; line-height: 1.4; white-space: nowrap; }
.rec .tile h3 { margin: 0 0 1rem; font-family: var(--font-display); font-size: 1.375rem; line-height: 1.25; font-weight: 500; min-height: 2.6em; }
@media (max-width: 48rem) { .rec .tile h3 { min-height: 0; } }
.rec .tile h4 { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--ink-muted); }
.rec .tile ul { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.rec .tile li { position: relative; margin: 0 0 0.5rem; padding-left: 1.25rem; font-size: 1rem; line-height: 1.5; text-wrap: pretty; }
.rec .tile li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--ink-muted); }
.rec .tile ul.fix li::before { background: var(--gold); }
.rec .tile ul.fix { margin-bottom: 0; }

.callout { margin: 3rem 0; padding: 1.75rem; border: 1px solid var(--gold); border-radius: var(--radius-xs); background: var(--gold-wash); font-size: 1.125rem; line-height: 1.6; }
.callout p { margin: 0 0 1.25rem; }
.callout strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; line-height: 1.25; margin-bottom: 0.75rem; }

.faq details { border-top: 1px solid var(--hairline); max-width: none; }
.faq details:last-of-type { border-bottom: 1px solid var(--hairline); }
.faq summary { font-size: 1.25rem; }
.faq details p { font-size: 1.0625rem; line-height: 1.6; margin: 0 0 1.5rem; }

.author { display: flex; gap: 1.25rem; align-items: flex-start; margin: 4rem 0 0; padding: 1.5rem; border: 1px solid var(--hairline); border-radius: var(--radius-xs); background: var(--surface-200); font-size: 1.0625rem; line-height: 1.6; }
.author .by-mark { flex: none; width: 3.5rem; height: 3.5rem; }
.author .by-mark svg { width: 2rem; height: 2rem; }
.author p { margin: 0; }
.author .nm { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; margin: 0 0 0.25rem; }

/* Keep reading: two cards; with no other article in the topic, the band goes. */
.rel-grid .a-thumb { aspect-ratio: 21 / 8; }
.band:has(.a-rel):not(:has(.a-rel .wp-block-post-template)) { display: none; }
.a-rel-all { margin: 1.5rem 0 0; }
.a-rel-all a { color: var(--ink); border-bottom: 1px solid var(--gold); text-decoration: none; }

/* Spacing and box model as in the mockup: the box-shaped blocks are content-box inside the 44rem column (the mockup's 763px takeaways),
   and the illustration and the aside sit a little further apart than the bare grid gives. */
.art-body > .takeaways, .art-body > .callout, .art-body > .author { box-sizing: content-box; }

.a-layout { padding-top: 0.9375rem; }

/* The check-up button is always the large one (xcelsior/cta-button); the callout in the mockup has the regular size. */
.callout a.btn.btn-lg { display: flex; width: fit-content; min-height: 3.25rem; padding: 0 2rem; }
.callout p:has(> strong:only-child) { margin: 0; }

/* The summary is uppercase on a wide screen; the icon inside it must not inherit that (the ligature would not form). */
.toc > summary .icon { text-transform: none; letter-spacing: normal; }
