/* The article page's own styles (docs/design/prototype/pages/article.html), generated by scripts/page-styles.py;
   check with --check. Loaded only on the pages built from it (inc/page-design.php). */

.pg-article [hidden] { display: none !important; }
.pg-article .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pg-article .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; }
.pg-article .post { text-decoration: none; min-height: 0; padding: 0 0 24px; transition: border-color 0.2s; }
.pg-article .post:hover { border-color: var(--ink); }
.pg-article .post > :not(.cover) { margin-inline: 24px; }
.pg-article .post h3 { font-size: 20px; line-height: 1.25; margin-top: 8px; margin-bottom: 8px; }
.pg-article .post .ex { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pg-article .post .more { margin-top: auto; padding-top: 20px; font-weight: 500; font-size: 15px; }
.pg-article .post:hover .more { text-decoration: underline; text-underline-offset: 3px; }
.pg-article .meta { font: 12px/1.4 var(--mono); color: var(--ink-3); margin-top: 20px; }
.pg-article .meta i { font-style: normal; padding-inline: 4px; }
.pg-article .meta span { white-space: nowrap; }
.pg-article .cover { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; height: 156px; padding: 18px 20px 20px; background: var(--cream); border-bottom: 1px solid var(--line); transition: background-color 0.2s; }
.pg-article .cover::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.2px); background-size: 12px 12px; }
.pg-article .cover::after { content: ""; position: absolute; right: 14px; bottom: 14px; width: 8px; height: 8px; background: var(--signal); }
.pg-article .cover > * { position: relative; }
.pg-article .post:hover .cover:not(.wp) { background-color: var(--tint); }
.pg-article .cv-cat { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.pg-article .cv-ico { width: 16px; height: 16px; color: var(--signal); flex: none; }
.pg-article .cv-key { font-size: clamp(28px, 2.6vw, 36px); line-height: 1; font-weight: 500; letter-spacing: -0.035em; color: var(--ink); max-width: 11ch; }
.pg-article .cover.wp { background: var(--night); border-bottom-color: var(--night); }
.pg-article .cover.wp::before { background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0.8px, transparent 1px); background-size: 6px 6px; }
.pg-article .cover.wp .cv-cat { color: rgba(255, 255, 255, 0.75); }
.pg-article .cover.wp .cv-key { color: #fff; }
.pg-article .crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 12px/1.4 var(--mono); color: var(--ink-3); }
.pg-article .crumbs a { text-decoration: none; color: var(--ink-2); }
.pg-article .crumbs a:hover { color: var(--ink); text-decoration: underline; }
.pg-article .label { display: inline-flex; align-items: center; gap: 8px; font: 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; background: var(--paper); }
.pg-article .label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
@media (max-width: 960px) { .pg-article .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pg-article .grid { grid-template-columns: minmax(0, 1fr); } .pg-article .cover { height: 128px; } }

.pg-article .intro { padding: 40px 32px 36px; }
.pg-article .intro-in { max-width: 880px; }
.pg-article .kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.pg-article .kicker a { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal-ink); text-decoration: none; }
.pg-article .kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pg-article .kicker svg { width: 16px; height: 16px; }
.pg-article .badge { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: var(--night); color: #fff; }
.pg-article .badge svg { width: 14px; height: 14px; color: var(--signal); }
.pg-article h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.04; max-width: 22ch; margin-top: 18px; }
.pg-article h1.wp-h { font-size: clamp(30px, 4vw, 48px); }
.pg-article .dek { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; margin-top: 20px; }
.pg-article .by { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--line); }
.pg-article .who { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.pg-article .who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line); }
.pg-article .who strong { display: block; font-weight: 500; }
.pg-article .who span { display: block; font-size: 14px; color: var(--ink-2); }
.pg-article a.who:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.pg-article .facts { display: flex; flex-wrap: wrap; gap: 6px 20px; font: 13px/1.4 var(--mono); color: var(--ink-3); }
.pg-article .facts span { white-space: nowrap; }
.pg-article .facts b { font-weight: 500; color: var(--ink-2); }

.pg-article .cover-band { padding: 0 8px 8px; }
.pg-article .cover-big { position: relative; overflow: hidden; border-radius: 14px; background: radial-gradient(120% 110% at 30% 30%, var(--field) 55%, var(--field-edge) 100%); color: #fff; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: end; padding: clamp(28px, 4vw, 48px); min-height: 340px; }
.pg-article .cover-big::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0.8px, transparent 1px); background-size: 6px 6px; mask-image: radial-gradient(90% 90% at 30% 50%, #000 40%, transparent 100%); }
.pg-article .cover-big > * { position: relative; }
.pg-article .cover-big .cv-cat { color: rgba(255, 255, 255, 0.85); }
.pg-article .cover-big .cv-ico { color: #fff; }
.pg-article .cover-big .cv-key { display: block; color: #fff; font-size: clamp(64px, 11vw, 150px); line-height: 0.9; letter-spacing: -0.045em; margin-top: 64px; max-width: none; }
.pg-article .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: s; }
.pg-article .steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 999px; font-size: 15px; font-weight: 500; background: rgba(255, 255, 255, 0.06); }
.pg-article .steps li::before { content: "0" counter(s); font: 500 12px/1 var(--mono); opacity: 0.75; }
.pg-article .cover-big.wp { background: var(--night); }
.pg-article .cover-big.wp::before { background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0.8px, transparent 1px); }
.pg-article .cover-big.wp .cv-ico { color: var(--signal); }
.pg-article .cover-big.wp .cv-key { color: #fff; }
.pg-article .cover-big.wp .steps li { border-color: rgba(255, 255, 255, 0.28); }

.pg-article .layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 48px; padding: 56px 32px 72px; align-items: start; }
.pg-article .toc { position: sticky; top: 92px; font-size: 14px; }
.pg-article .toc summary { list-style: none; cursor: pointer; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 14px; }
.pg-article .toc summary::-webkit-details-marker { display: none; }
.pg-article .toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); counter-reset: t; }
.pg-article .toc li { counter-increment: t; }
.pg-article .toc a { display: grid; grid-template-columns: 26px 1fr; padding: 7px 0 7px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; transition: color 0.2s, border-color 0.2s; }
.pg-article .toc a::before { content: counter(t, decimal-leading-zero); font: 12px/1.6 var(--mono); color: var(--ink-3); }
.pg-article .toc a:hover { color: var(--ink); }
.pg-article .toc a.on { color: var(--ink); border-left-color: var(--signal); }
.pg-article .side { position: sticky; top: 92px; display: grid; gap: 12px; }
.pg-article .side .nudge { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: var(--soft); font-size: 14px; }
.pg-article .side .nudge::before, .pg-article .side .nudge::after { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid var(--line); background: var(--paper); }
.pg-article .side .nudge::before { top: -4px; left: -4px; } .pg-article .side .nudge::after { right: -4px; bottom: -4px; }
.pg-article .side .nudge strong { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.pg-article .side .nudge p { color: var(--ink-2); margin-bottom: 12px; }
.pg-article .side .nudge a { font-weight: 500; text-decoration: none; }
.pg-article .side .nudge a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pg-article .side .btn { justify-content: center; }
.pg-article .btn.sm { min-height: 32px; padding: 6px 14px; font-size: 13px; }

.pg-article .prose { max-width: 65ch; font-size: 18px; line-height: 1.7; color: var(--ink); }
.pg-article .prose > * + * { margin-top: 1.1em; }
.pg-article .prose p.first { font-size: 21px; line-height: 1.55; letter-spacing: -0.005em; }
.pg-article .prose h2 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; margin-top: 2.2em; scroll-margin-top: 96px; }
.pg-article .prose h2 + * { margin-top: 0.7em; }
.pg-article .prose a { color: inherit; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pg-article .prose a:hover { color: var(--signal-ink); }
.pg-article .prose strong { font-weight: 600; }
.pg-article .prose ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.pg-article .prose ul li { position: relative; padding-left: 26px; }
.pg-article .prose ul li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 7px; height: 7px; background: var(--signal); }
.pg-article .prose :not(pre) > code { font: 0.85em var(--mono); padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); }
.pg-article .prose figure { margin: 2em 0; }
.pg-article .prose figcaption { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.pg-article .prose figcaption .label { margin-right: 10px; vertical-align: 1px; }
.pg-article .tbl figcaption { margin-bottom: 12px; }
.pg-article .scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.pg-article table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.pg-article th, .pg-article td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--line); }
.pg-article thead th { border-top: 0; background: var(--soft); font: 500 12px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.pg-article tbody th { font-weight: 500; width: 28%; color: var(--ink-2); }
.pg-article .tbl .note { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.pg-article .code { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--soft); }
.pg-article .code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); background: var(--paper); font-size: 13px; color: var(--ink-2); }
.pg-article .code-head > span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pg-article pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 13px/1.75 var(--mono); tab-size: 4; }
.pg-article pre code { font: inherit; padding: 0; border: 0; background: none; }
.pg-article pre .c { color: var(--ink-3); }
.pg-article pre b { font-weight: 500; color: var(--signal-ink); }
.pg-article .pull { margin: 2em 0; padding: 28px 0 24px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); position: relative; }
.pg-article .pull::before { content: "\201C"; position: absolute; top: 4px; left: -4px; font-size: 64px; line-height: 1; color: var(--signal); }
.pg-article .pull p { font-size: clamp(22px, 2.2vw, 26px); line-height: 1.35; font-weight: 500; letter-spacing: -0.015em; padding-top: 22px; }
.pg-article .pull cite { display: block; margin-top: 12px; font: normal 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.pg-article .fig .art { padding: 20px; }
.pg-article .fig figcaption { margin-top: 14px; }
.pg-article .lane-name { font: 12px/1 var(--mono); color: var(--ink-3); margin: 4px 0 10px; }
.pg-article .lane-name.bad { color: var(--attack); margin-top: 20px; }
.pg-article .lane { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pg-article .lane.bad { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 60%; }
.pg-article .lane::before { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; border-top: 1px dashed var(--line); }
.pg-article .lane .node { font-size: 12px; line-height: 1.25; padding: 12px 4px; }
.pg-article .lane.bad .node:last-child { border-color: var(--attack); border-style: solid; background: var(--attack-tint); color: var(--attack); }

.pg-article .author { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 28px; align-items: start; margin: 8px; padding: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.pg-article .author img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.pg-article .author .eyebrow { margin-bottom: 10px; }
.pg-article .author h2 { font-size: 26px; }
.pg-article .author .role { color: var(--ink-2); margin-top: 4px; font-size: 15px; }
.pg-article .author .bio { margin-top: 14px; max-width: 62ch; color: var(--ink); }
.pg-article .author-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; font-size: 15px; font-weight: 500; }
.pg-article .author-links > a { text-decoration: none; }
.pg-article .author-links > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pg-article .author .socials { margin-top: 0; }
.pg-article .updated { font: 12px/1.4 var(--mono); color: var(--ink-3); margin-top: 18px; }

.pg-article .head.left { text-align: left; padding: 72px 24px 28px; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.pg-article .head.left h2 { font-size: clamp(28px, 3.2vw, 40px); }
.pg-article .head.left a { font-weight: 500; text-decoration: none; }
.pg-article .head.left a:hover { text-decoration: underline; text-underline-offset: 3px; }

.pg-article .wp-demo { padding: 0 0 8px; }
.pg-article .wp-note { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pg-article .wp-note div { padding: 20px 24px; border-right: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.pg-article .wp-note div:last-child { border-right: 0; }
.pg-article .wp-note b { display: block; font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--signal-ink); margin-bottom: 8px; }
.pg-article .inside { margin: 8px; padding: 28px 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.pg-article .inside h3 { font-size: 22px; }
.pg-article .inside > div > p { color: var(--ink-2); margin-top: 10px; font-size: 15px; }
.pg-article .inside .btn { margin-top: 18px; }
.pg-article .inside ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; counter-reset: w; }
.pg-article .inside li { counter-increment: w; break-inside: avoid; display: grid; grid-template-columns: 30px 1fr; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.pg-article .inside li::before { content: counter(w, decimal-leading-zero); font: 12px/1.7 var(--mono); color: var(--ink-3); }
.pg-article .wp-first { padding: 24px 32px 48px; }
.pg-article .wp-first p { max-width: 65ch; font-size: 21px; line-height: 1.55; font-weight: 600; }

@media (max-width: 1180px) {
	.pg-article .layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
	.pg-article .side { display: none; }
}
@media (max-width: 860px) {
	.pg-article .intro { padding: 28px 20px 28px; }
	.pg-article .kicker { margin-top: 24px; }
	.pg-article .cover-big { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 24px; }
	.pg-article .cover-big .cv-key { margin-top: 40px; }
	.pg-article .layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 20px 56px; }
	.pg-article .toc { position: static; border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 8px; }
	.pg-article .toc summary { padding-bottom: 8px; display: flex; justify-content: space-between; }
	.pg-article .toc summary::after { content: "+"; font-size: 16px; }
	.pg-article .toc[open] summary::after { content: "\2212"; }
	.pg-article .toc ol { margin-bottom: 8px; }
	.pg-article .prose { font-size: 17px; }
	.pg-article .prose p.first { font-size: 19px; }
	.pg-article .lane, .pg-article .lane.bad { grid-template-columns: minmax(0, 1fr); gap: 6px; }
	.pg-article .lane .node { display: flex; justify-content: flex-start; align-items: center; gap: 12px; padding: 10px 14px; font-size: 14px; text-align: left; }
	.pg-article .lane::before { display: none; }
	.pg-article .lane.bad { max-width: none; }
	.pg-article .author { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 18px; }
	.pg-article .author img { width: 88px; height: 88px; }
	.pg-article .head.left { padding: 56px 16px 24px; }
	.pg-article .wp-note { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pg-article .wp-note div:nth-child(2) { border-right: 0; }
	.pg-article .wp-note div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
	.pg-article .inside { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; gap: 20px; }
	.pg-article .inside ol { columns: 1; }
	.pg-article .wp-first { padding: 20px 20px 40px; }
	.pg-article .wp-first p { font-size: 19px; }
}
@media (max-width: 480px) {
	.pg-article .wp-note { grid-template-columns: minmax(0, 1fr); }
	.pg-article .wp-note div { border-right: 0; border-bottom: 1px solid var(--line); }
	.pg-article .wp-note div:last-child { border-bottom: 0; }
}
/* A heading for assistive technology only, so "In this paper" sits under a level-2 heading (D16 T01 §15). */
.pg-article .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Body images (docs/design/direction.md "Body images", D11 T05 §1): a photo or screenshot takes the frame
   the table's scroller and the code block share, never wider than the text column, its caption under it. */
.pg-article .prose img { max-width: 100%; height: auto; }
.pg-article .prose figure img { display: block; border: 1px solid var(--line); border-radius: 10px; }
.pg-article .prose figure:has(img) > figcaption { margin: 14px 0 0; text-align: left; }

/* Subheadings and numbered lists, which the kept articles use and the sample text does not (D11 T05 §1): an
   h3 a step under the h2, an h4 at the text's size, and list numbers in the contents list's mono. */
.pg-article .prose h3 { font-size: clamp(20px, 1.8vw, 22px); line-height: 1.3; margin-top: 1.8em; scroll-margin-top: 96px; }
.pg-article .prose h4 { font-size: 1em; font-weight: 600; line-height: 1.4; margin: 1.6em 0 0; }
.pg-article .prose h3 + *, .pg-article .prose h4 + * { margin-top: 0.6em; }
.pg-article .prose ol { padding-left: 1.6em; display: grid; gap: 12px; }
.pg-article .prose ol li::marker { font: 0.85em var(--mono); color: var(--ink-3); }

/* A list item in the text is prose, wrapped as base.css wraps a paragraph, so it does not end on a lone word. */
.pg-article .prose li { text-wrap: pretty; }

/* A sponsored article's disclosure (the kept Office articles open with one, D11 T05 §6) sits in the panel the
   next-step card uses: a soft box with a line border, in the smaller type. */
.pg-article .prose .rz-disclosure { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.pg-article .prose .rz-disclosure strong { font-weight: 500; color: var(--ink); }

/* A title's last two words stay together (rz_title_keep(), D11 T05 §6), so a heading does not end on a lone
   word, wherever the pair fits its column: in the related guides' cards from 360px, in the h1 from 600px. */
@media (min-width: 360px) { .pg-article .post .keep { white-space: nowrap; } }
@media (min-width: 600px) { .pg-article .intro h1 .keep { white-space: nowrap; } }

/* Inline code in the kept articles holds long paths and commands; it breaks anywhere rather than run past
   the column on a phone. */
.pg-article .prose :not(pre) > code { overflow-wrap: anywhere; }

/* An article with fewer than three sections has no contents list; its text keeps the middle column. */
@media (min-width: 861px) { .pg-article .layout.no-toc .prose { grid-column: 2; } }
