/* Article design v2 (2026-11-29). Loads last of the section files (file name), so it overrides
   the older article rules (content.css, zz-gl-blog.css, zzzz-blog-fixes.css) without editing them.
   Scope: body.sth-article only, the body class parts/blog/helpers.php adds to single posts in the
   article design that are not glossary entries (converted section-block posts, glossary posts,
   the blog index and archives never carry it). Markup hooks from helpers.php: .byline (hero),
   .prose-lead, .pfaq / .pfaq__item, .prose-cta, .prose-sources, .prose-fig.
   Contrast (page Mist #F6F8FC): body text Ink 82% 10.8:1, muted Ink 62% 5.3:1, Ink 68% on the
   Mist table frame 6.5:1, Brand Blue 10.0:1. Tokens only. */

/* ================================================================ 1. Hero */
body.sth-article .hero--editorial .hero__row { display: flex; flex-direction: column; gap: 24px; }
body.sth-article .hero--editorial .hero__copy { padding-top: 0; }
body.sth-article .hero--editorial .hero__sub { max-width: 560px; font-size: 17px; line-height: 27px; color: var(--ink-72); text-wrap: pretty; }
body.sth-article .hero--editorial .imgcard__frame { border-radius: 24px; }
@media (min-width: 768px) {
	body.sth-article .hero--editorial .hero__sub { font-size: 18px; line-height: 28px; }
}
@media (min-width: 1024px) {
	body.sth-article .hero--editorial .hero__row {
		display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: 56px; align-items: center;
	}
	body.sth-article .hero--editorial .hero__copy { gap: 20px; }
	body.sth-article .hero--editorial .h1 { max-width: none; font-size: 38px; line-height: 44px; }
	/* Library visuals 3:2; an uploaded featured image keeps its banner shape (zz-gl-blog.css). */
	body.sth-article .hero--editorial .imgcard--hero { aspect-ratio: 3 / 2; margin-top: 0; }
}
@media (min-width: 768px) and (max-width: 1023px) {
	/* Stacked hero beside the full-width image: a calmer H1 and a wider summary. */
	body.sth-article .hero--editorial .h1 { font-size: 40px; line-height: 46px; }
	body.sth-article .hero--editorial .hero__sub { max-width: 640px; }
	/* Library visuals (not uploads, which keep their banner shape) are cropped to 2:1 so the first
	   paragraph is not pushed a full screen down. */
	body.sth-article .hero--editorial .imgcard--hero:not(:has(img[src*="/wp-content/uploads/"])) { aspect-ratio: 2 / 1; }
	body.sth-article .hero--editorial .imgcard--hero .imgcard__frame img { object-fit: cover; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
	/* The copy column takes a little more share and the gap is capped, so a short copy stack (no
	   summary) beside a banner-shaped upload does not read thin. */
	body.sth-article .hero--editorial .hero__row { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); column-gap: 40px; }
}
@media (min-width: 1280px) {
	body.sth-article .hero--editorial .h1 { font-size: 44px; line-height: 50px; }
}

/* Byline: portrait, author link, date and reading time. */
body.sth-article .byline { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
body.sth-article .byline__img,
body.sth-article .byline__disc {
	flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
	box-shadow: 0 0 0 2px var(--c-white), var(--sh-soft);
}
body.sth-article .byline__disc { font-size: 14px; line-height: 40px; }
body.sth-article .byline__txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; margin: 0; }
body.sth-article .byline__name {
	display: inline-block; font: var(--fw-medium) 14px/20px var(--f-body); color: var(--c-ink);
	text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 3px;
	transition: text-decoration-color var(--dur-fast);
}
body.sth-article .byline__name:hover { text-decoration-color: currentColor; }
body.sth-article .byline__name:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; border-radius: 4px; }
body.sth-article .byline__meta { display: block; font-size: 13px; line-height: 18px; color: var(--ink-62); }
/* Touch: a 44px tap area without changing the row height (as .sb-rows__link). */
@media (pointer: coarse), (max-width: 1023px) {
	body.sth-article .byline__name { padding-block: 12px; margin-block: -12px; }
}

/* ================================================================ 2. Body typography */
body.sth-article .article__body { gap: 20px; max-width: 720px; }
@media (min-width: 1280px) {
	body.sth-article .article__body { flex-basis: 672px; }
}
@media (min-width: 1024px) {
	body.sth-article .article:not(.article--toc) > .article__body { flex-basis: 672px; }
}
body.sth-article .article__body :where(p, li) { font-size: 16px; line-height: 27px; }
body.sth-article .article__body > .prose-lead { font-size: 17px; line-height: 28px; color: var(--c-ink); }

body.sth-article .article__body > h2 { font-size: 25px; line-height: 31px; }
body.sth-article .article__body > h2:not(:first-child) { margin-top: 20px; }
body.sth-article .article__body > h2 + :not(h3, .prose-fig) { margin-top: -4px; }
body.sth-article .article__body > h3 { font-size: 19px; line-height: 26px; }
body.sth-article .article__body > h3:not(:first-child) { margin-top: 16px; }
body.sth-article .article__body > h3 + :not(h2, h3) { margin-top: -8px; }

/* Lists: 10px between items; dots and numbers in Brand Blue. */
body.sth-article .article__body > :is(ul, ol) { gap: 10px; }
body.sth-article .article__body > ul > li::before { top: calc(13.5px - 3px); }
body.sth-article .article__body > ol > li::marker { color: var(--c-blue); font: var(--fw-medium) 15px/27px var(--f-head); }

/* Pull quote: the 3px Brand Blue bar (content.css), 20/30 text. */
body.sth-article .article__body > blockquote :is(p, li) { font-size: 20px; line-height: 30px; }

/* Tables: 15/22 text, 14px 16px cells; the frame keeps its sideways scroll on phones. */
body.sth-article .article__body .article__table :is(td, th),
body.sth-article .article__body .article__table :is(td, th) :is(p, li) { font-size: 15px; line-height: 22px; }
body.sth-article .article__body .article__table :is(td, th) { padding: 14px 16px; }

@media (min-width: 768px) {
	body.sth-article .article__body :where(p, li) { font-size: 17px; line-height: 29px; }
	body.sth-article .article__body > .prose-lead { font-size: 19px; line-height: 31px; }
	body.sth-article .article__body > h2 { font-size: 30px; line-height: 36px; }
	body.sth-article .article__body > h2:not(:first-child) { margin-top: 36px; }
	body.sth-article .article__body > h3 { font-size: 21px; line-height: 28px; }
	body.sth-article .article__body > ul > li::before { top: calc(14.5px - 3px); }
	body.sth-article .article__body > ol > li::marker { font-size: 17px; line-height: 29px; }
	/* Rhythm (design review, round 3): 24px between blocks, 56px above an H2, about 18px under it. */
	body.sth-article .article__body { gap: 24px; }
	body.sth-article .article__body > h2:not(:first-child) { margin-top: 32px; }
	body.sth-article .article__body > h2 + :not(h3, .prose-fig) { margin-top: -6px; }
	body.sth-article .article__body > h3:not(:first-child) { margin-top: 12px; }
	body.sth-article .article__body > h3 + :not(h2, h3) { margin-top: -12px; }
}
/* Measure from 1024 (design review, round 3): a 672px column at 18/30, about 76 characters. */
@media (min-width: 1024px) {
	body.sth-article .article__body { max-width: 672px; }
	body.sth-article .article:not(.article--toc) > .article__body { flex-basis: 672px; }
	body.sth-article .article__body :where(p, li) { font-size: 18px; line-height: 30px; }
	body.sth-article .article__body > .prose-lead { font-size: 20px; line-height: 32px; }
	body.sth-article .article__body > h3 { font-size: 22px; line-height: 30px; }
	body.sth-article .article__body > ul > li::before { top: calc(15px - 3px); }
	body.sth-article .article__body > ol > li::marker { font-size: 17px; line-height: 30px; }
}

/* "On this page": a hairline track with the active entry marked in Brand Blue. */
@media (min-width: 1024px) {
	body.sth-article .toc--side .toc__list { position: relative; padding-left: 16px; box-shadow: inset 1px 0 0 var(--ink-10); }
	body.sth-article .toc--side .toc__list > li { position: relative; }
	body.sth-article .toc--side .toc__a[aria-current="true"]::before {
		content: ""; position: absolute; left: -16px; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: var(--c-blue);
	}
}

/* ================================================================ 3. FAQ cards */
body.sth-article .article__body > .pfaq { display: flex; flex-direction: column; gap: 12px; }
body.sth-article .article__body .pfaq__item {
	display: flex; flex-direction: column; gap: 8px; min-width: 0;
	padding: 20px 24px; border: 0; border-radius: var(--r-card-s);
	/* The in-body card surface (.st-card, .sv-m, .sv-stat): Mist with the white inner ring and the
	   soft shadow, so the column shows one card treatment on the Mist page. */
	background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-soft);
}
body.sth-article .article__body .pfaq__item > * { margin: 0; }
body.sth-article .article__body .pfaq__item > h3 {
	margin: 0; font: var(--fw-medium) 18px/26px var(--f-head); letter-spacing: -.3px; color: var(--c-ink);
}
body.sth-article .article__body .pfaq__item :where(p, li) { font-size: 16px; line-height: 26px; }
body.sth-article .article__body .pfaq__item > h3 { text-wrap: pretty; }
@media (max-width: 479px) {
	body.sth-article .article__body .pfaq__item { padding: 16px; }
}
body.sth-article .article__body .pfaq__item > :is(ul, ol) { display: flex; flex-direction: column; gap: 8px; padding: 0 0 0 20px; }
@media (min-width: 1024px) {
	body.sth-article .article__body .pfaq__item :where(p, li) { font-size: 17px; line-height: 27px; }
}

/* ================================================================ 4. Standalone call link */
body.sth-article .article__body > .prose-cta { margin-top: 4px; }
body.sth-article .article__body .prose-cta a.btn {
	height: auto; min-height: 48px; padding: 12px 20px; white-space: normal; text-align: center;
	overflow-wrap: normal; text-decoration: none;
}
@media (min-width: 768px) {
	body.sth-article .article__body .prose-cta a.btn { min-height: 44px; padding-block: 10px; }
}

/* ================================================================ 5. Sources table */
body.sth-article .article__body table.prose-sources { min-width: 0; }
body.sth-article .article__body table.prose-sources :is(td, th),
body.sth-article .article__body table.prose-sources :is(td, th) :is(p, li) { font-size: 13px; line-height: 20px; }
body.sth-article .article__body table.prose-sources td { color: var(--ink-68); }
/* Phones (under 600px): each source is one block, its three cells stacked with a small column
   label (data-label). The table, rowgroup, row, columnheader and cell roles are set in the
   markup (helpers.php decorate()), so the header association survives the display change; the
   header row stays for screen readers only, and the visible label is not spoken. */
@media (max-width: 599px) {
	body.sth-article .article__body table.prose-sources,
	body.sth-article .article__body table.prose-sources :is(tbody, tr, td) { display: block; width: auto; min-width: 0; }
	body.sth-article .article__body table.prose-sources thead {
		position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
		clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
	}
	body.sth-article .article__body table.prose-sources tr { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--ink-10); }
	body.sth-article .article__body table.prose-sources tbody tr:last-child { border-bottom: 0; }
	body.sth-article .article__body table.prose-sources td { padding: 0; border: 0; }
	body.sth-article .article__body table.prose-sources td:first-child { color: rgba(10, 13, 49, .82); }
	body.sth-article .article__body table.prose-sources td[data-label]::before {
		content: attr(data-label);
		content: attr(data-label) / "";
		display: block; margin-bottom: 1px;
		font: var(--fw-medium) 11px/16px var(--f-body); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-62);
	}
}
/* From 600px: a fixed three-column grid (fact, source, date). Addresses wrap only where a line
   cannot hold them; they break between words first (overflow-wrap: break-word), never mid-word
   while a break at a word boundary exists. */
@media (min-width: 600px) {
	body.sth-article .article__body table.prose-sources { table-layout: fixed; width: 100%; }
	body.sth-article .article__body table.prose-sources tr > :nth-child(1) { width: 46%; }
	body.sth-article .article__body table.prose-sources tr > :nth-child(2) { width: 38%; }
	body.sth-article .article__body table.prose-sources tr > :nth-child(3) { width: 16%; }
}
body.sth-article .article__body table.prose-sources .prose-sources__url,
body.sth-article .article__body table.prose-sources .prose-sources__url a { overflow-wrap: break-word; word-break: normal; }
body.sth-article .article__body table.prose-sources .prose-seg { display: inline-block; max-width: 100%; }

/* ================================================================ 5b. Step lists (.sv-steps)
   Each step is a bold title and a line. One item in the security checklist lacks the <br>
   between them, so the title ran into its line; the title is a block for every item instead. */
body.sth-article .article__body ol.sv-steps > li > b { display: block; }
body.sth-article .article__body ol.sv-steps > li > br { display: none; }

/* ================================================================ 5c. Wide tables on phones
   The scroll frame gets a CSS-only edge shadow on the side that hides more (background-attachment
   local covers fade it out at either end), in addition to the existing fade. */
@media (max-width: 1279px) {
	body.sth-article .article__body .article__table {
		background:
			linear-gradient(to right, var(--c-mist) 30%, rgba(246, 248, 252, 0)) left center / 40px 100% no-repeat local,
			linear-gradient(to left, var(--c-mist) 30%, rgba(246, 248, 252, 0)) right center / 40px 100% no-repeat local,
			radial-gradient(farthest-side at 0 50%, rgba(10, 13, 49, .16), rgba(10, 13, 49, 0)) left center / 14px 100% no-repeat scroll,
			radial-gradient(farthest-side at 100% 50%, rgba(10, 13, 49, .16), rgba(10, 13, 49, 0)) right center / 14px 100% no-repeat scroll,
			var(--c-mist);
	}
}

/* ================================================================ 6. Mid-article figures */
body.sth-article .article__body > .prose-fig { margin: 20px 0 8px; }
body.sth-article .article__body > .prose-fig + h2:not(:first-child) { margin-top: 0; }
body.sth-article .article__body .prose-fig img {
	display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
	border: 1px solid var(--ink-10); border-radius: 20px;
}

/* ================================================================ 7. Reading progress
   prose.php prints the bar; here it is Brand Blue, shown only where the scroll timeline works
   (driven by the reader's own scrolling) and never under reduced motion. */
body.sth-article .read-progress { display: none; pointer-events: none; }
@supports (animation-timeline: scroll()) {
	body.sth-article .read-progress { display: block; }
	body.sth-article .read-progress__bar { background: var(--c-blue); }
}
@media (prefers-reduced-motion: reduce) {
	body.sth-article .read-progress { display: none; }
}
