/* Content group: prose, definition, featured, posts, groups, list.
   Values from the Figma page-builder kit (kit3.js R.prose/R.definition/R.featured/R.posts/
   R.groups/R.list, kit3x _prose7 and the posts pager patch). Phone values below 768px
   (Figma 390 frames), desktop values from 1024px (Figma 1440 frames, 1200 content). */

/* ================================================================ Reading progress (spec 9) */
.read-progress {
	position: fixed; left: 0; right: 0; top: 0; z-index: var(--z-progress);
	height: 2px; pointer-events: none;
}
.read-progress__bar {
	display: block; height: 100%;
	background: linear-gradient(90deg, var(--c-lavender), var(--c-blue));
	transform: scaleX(var(--read, 0)); transform-origin: 0 50%;
}
@supports (animation-timeline: scroll()) {
	html:not(.motion-paused) .read-progress__bar {
		animation: sth-read linear both;
		animation-timeline: scroll(root block);
	}
}
@keyframes sth-read { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media print { .read-progress { display: none; } }

/* ================================================================ Prose (kit R.prose) */
.article { display: flex; flex-direction: column; gap: 20px; }
.article__body { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 760px; }
.article__body > * { margin: 0; }
.article__body p, .article__body li { font-size: 16px; line-height: 27px; color: rgba(10, 13, 49, .82); }
.article__body > :is(h2, .article__h) {
	font: var(--fw-medium) 23px/29px var(--f-head); letter-spacing: -.6px; color: var(--c-ink);
}
.article__body > :is(h2, .article__h):not(:first-child) { margin-top: 8px; }
.article__body > :is(h3, .article__h3) {
	font: var(--fw-medium) 19px/25px var(--f-head); letter-spacing: -.3px; color: var(--c-ink);
}
.article__body > :is(h3, .article__h3):not(:first-child) { margin-top: 4px; }
/* Anchor offset: html scroll-padding-top (base.css) only; a second 96px here doubled it (mobile QA 2026-11-23). */
.article__body :is(strong, b) { font-weight: var(--fw-semibold); color: var(--c-ink); }

/* Bullets: 6px Brand Blue dot in a 10px column, 14px gap */
.article__body > ul, .article__body > ol { display: flex; flex-direction: column; gap: 8px; padding: 0; list-style: none; }
.article__body > ul > li { position: relative; padding-left: 24px; }
.article__body > ul > li::before {
	content: ""; position: absolute; left: 2px; top: calc(13.5px - 3px);
	width: 6px; height: 6px; border-radius: 50%; background: var(--c-blue);
}
.article__body > ol { counter-reset: sth-ol; }
.article__body > ol > li { position: relative; padding-left: 28px; counter-increment: sth-ol; }
.article__body > ol > li::before {
	content: counter(sth-ol) "."; position: absolute; left: 0; top: 0;
	font: var(--fw-medium) 15px/27px var(--f-head); color: var(--c-blue);
}

/* Callout: Lavender soft fill, 3px Brand Blue bar, Geist Medium */
.article__callout, .article__body > blockquote {
	display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: var(--c-lav-soft);
}
.article__callout::before, .article__body > blockquote::before {
	content: ""; flex: none; width: 3px; border-radius: 2px; background: var(--c-blue);
}
.article__callout p, .article__body > blockquote p {
	font: var(--fw-medium) 19px/27px var(--f-head); letter-spacing: -.3px; color: var(--c-ink);
}

/* Links inside prose (spec 7.4): always underlined, hover Brand Blue 2px, no movement */
.article__body a {
	color: var(--c-blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
	transition: text-decoration-thickness var(--dur-fast), color var(--dur-fast);
	overflow-wrap: anywhere;
}
.article__body a:hover { text-decoration-thickness: 2px; }

/* Tables and media (WordPress post content) */
.article__table, .article__body > .wp-block-table {
	overflow-x: auto; border-radius: 16px; background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-soft);
}
.article__table:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 3px; }
.article__body table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; line-height: 21px; }
.article__body caption { padding: 14px 16px 0; text-align: left; font: var(--fw-medium) 13px/18px var(--f-body); color: var(--ink-60); }
.article__body :is(th, td) { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ink-10); color: rgba(10, 13, 49, .82); }
.article__body thead th { background: var(--c-lav-soft); font: var(--fw-medium) 13px/18px var(--f-body); color: var(--c-ink); }
.article__body tbody th { font-weight: var(--fw-medium); color: var(--c-ink); }
.article__body tr:last-child > :is(th, td) { border-bottom: 0; }
.article__body > :is(figure, img) { margin: 4px 0; }
.article__body img { border-radius: 16px; }
.article__body figcaption { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--ink-55); }
.article__body hr { margin: 8px 0; }

/* "On this page": phones show a collapsible card; desktop shows the side column */
.toc--side { display: none; }
.toc--drop {
	border-radius: 16px; background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-soft);
}
.toc__sum {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 16px 18px; list-style: none; cursor: pointer; border-radius: 16px;
	font: var(--fw-medium) 15px/22px var(--f-body); color: var(--c-ink);
}
.toc__sum::-webkit-details-marker { display: none; }
.toc__chev { width: 12px; height: 7px; color: var(--c-blue); stroke-width: 2; transition: transform 400ms var(--ease-out-quint); }
.toc--drop[open] .toc__chev { transform: rotate(180deg); }
.toc--drop .toc__list { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 18px; }
.toc__a { display: block; font-size: 14px; line-height: 22px; color: var(--ink-68); transition: color var(--dur-fast); }
.toc__a:hover { color: var(--c-blue); }
.toc__a[aria-current="true"] { color: var(--c-blue); font-weight: var(--fw-medium); }

@media (min-width: 768px) {
	.article__body { gap: 20px; }
	.article__body p, .article__body li { font-size: 18px; line-height: 30px; }
	.article__body > :is(h2, .article__h) { font-size: 30px; line-height: 37px; }
	.article__body > :is(h2, .article__h):not(:first-child) { margin-top: 14px; }
	.article__body > :is(h3, .article__h3) { font-size: 22px; line-height: 28px; }
	.article__body > ul, .article__body > ol { gap: 10px; }
	.article__body > ul > li::before { top: calc(15px - 3px); }
	.article__body > ol > li::before { font-size: 17px; line-height: 30px; }
	.article__callout, .article__body > blockquote { gap: 20px; padding: 24px 28px; }
	.article__callout p, .article__body > blockquote p { font-size: 24px; line-height: 33px; }
	.article__body table { font-size: 15px; line-height: 23px; }
}
@media (min-width: 1024px) {
	.article { flex-direction: row; align-items: flex-start; gap: 0; }
	.article--toc { gap: 48px; }
	.article__body { flex: 1 1 auto; }
	.toc--drop { display: none; }
	.toc--side {
		display: flex; flex-direction: column; gap: 12px; flex: 0 0 210px;
		position: sticky; top: calc(var(--nav-h) + 24px);
		max-height: calc(100vh - var(--nav-h) - 48px); overflow: auto; overscroll-behavior: contain;
	}
	.toc__t { font: var(--fw-medium) 12px/16px var(--f-body); letter-spacing: .8px; text-transform: uppercase; color: var(--ink-55); }
	.toc--side .toc__list { display: flex; flex-direction: column; gap: 12px; }
	.toc--side .toc__a { font-size: 15px; line-height: 22px; }
}
@media (min-width: 1280px) {
	.article--toc { gap: 96px; }
	.toc--side { flex-basis: 260px; }
	.article__body { flex: 0 1 760px; }
}

/* ================================================================ Definition (kit R.definition) */
.def {
	display: flex; flex-direction: column; gap: 12px; padding: 26px 22px;
	border-radius: 22px; box-shadow: var(--ring-card), var(--sh-big);
}
.def__label {
	font: var(--fw-medium) 12px/16px var(--f-body); letter-spacing: .8px; text-transform: uppercase; color: var(--c-blue);
}
.def__text { font: var(--fw-medium) 22px/31px var(--f-head); letter-spacing: -.6px; color: var(--c-ink); max-width: 860px; }
.def__term { font-style: normal; color: var(--c-blue); }
.def__also { font-size: 14px; line-height: 22px; color: var(--ink-60); }
@media (min-width: 768px) {
	.def { gap: 16px; padding: 48px 56px; border-radius: var(--r-card-xl); }
	.def__text { font-size: 34px; line-height: 45px; }
	.def__also { font-size: 15px; }
	/* Term underline draw (spec 5.3): scaleX 0 to 1 from the left, 600ms, +300ms */
	.def__term { position: relative; display: inline-block; }
	.def__term::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; border-radius: 1px;
		background: var(--c-lavender); opacity: .5; transform-origin: 0 50%;
	}
	html.motion-ok .def:not(.is-in) .def__term::after { transform: scaleX(0); }
	html.motion-ok .def .def__term::after { transition: transform 600ms var(--ease-out-quart) 300ms; }
}

/* ================================================================ Featured (kit R.featured) */
.feat {
	display: flex; flex-direction: column; gap: 16px; padding: 12px;
	border-radius: 22px;
}
.feat__media {
	position: relative; overflow: hidden; height: 200px; border-radius: 14px; background: var(--c-lav-soft);
}
.feat__media > img, .feat__media > .pattern { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.feat__media > img { transition: transform 600ms var(--ease-out-quart); }
.feat__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 0 8px 10px; }
.feat__top { display: flex; align-items: center; gap: 10px; }
.feat__tag { font-size: 13px; line-height: 18px; color: var(--ink-60); }
.feat__t { font: var(--fw-medium) 24px/30px var(--f-head); letter-spacing: -.8px; color: var(--c-ink); text-wrap: balance; }
.feat__d { font-size: 15px; line-height: 24px; color: var(--ink-72); }
.feat__meta { font-size: 13px; line-height: 18px; color: var(--ink-55); }
.feat__more { font-size: 15px; line-height: 22px; }
.feat__more .ico { width: 12px; height: 10px; }
@media (min-width: 768px) {
	.feat { padding: 16px; border-radius: var(--r-card-xl); }
	.feat__media { height: 320px; border-radius: 18px; }
	.feat__copy { gap: 16px; padding: 0 28px 12px; }
	.feat__t { font-size: 36px; line-height: 42px; }
	.feat__d { font-size: 17px; line-height: 27px; }
}
@media (min-width: 1024px) {
	.feat { flex-direction: row; align-items: center; gap: 44px; }
	.feat__media { flex: 0 0 48%; height: 360px; }
	.feat__copy { flex: 1 1 0; min-width: 0; padding: 0 28px 0 0; }
}
@media (min-width: 1280px) { .feat__media { flex-basis: 560px; } }
@media (hover: hover) and (pointer: fine) {
	.feat[data-card-link]:hover .feat__media > img { transform: scale(1.04); }
	.feat[data-card-link]:hover .feat__more { text-decoration-color: currentColor; }
	.feat[data-card-link]:hover .feat__more .ico { transform: translateX(3px); }
}

/* ================================================================ Posts (kit R.posts + pager) */
.sec--posts > .wrap { gap: 18px; }
.posts__h { font: var(--fw-medium) 26px/30px var(--f-head); letter-spacing: -.4px; text-wrap: balance; }
.posts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.post {
	display: flex; flex-direction: column; gap: 12px; padding: 10px 10px 16px;
	border-radius: 18px;
}
.post__media { overflow: hidden; height: 160px; border-radius: 12px; background: var(--c-lav-soft); }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out-quart); }
.post__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 6px 0; }
.post--img .post__body { padding-top: 0; }
.post__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post__t { font: var(--fw-medium) 18px/24px var(--f-head); letter-spacing: -.3px; color: var(--c-ink); }
.post__meta { padding: 0 6px; font-size: 13px; line-height: 18px; color: var(--ink-55); }
.post__dot { margin: 0 7px; }
@media (hover: hover) and (pointer: fine) {
	.post[data-card-link]:hover .post__media img { transform: scale(1.04); }
}
/* Pager */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.pager__btn {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px;
	padding: 9px 13px; border-radius: 12px;
	background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-soft);
	font: var(--fw-medium) 14px/20px var(--f-body); color: var(--c-ink);
	transition: background-color var(--dur-fast), box-shadow var(--dur-hover) var(--ease-out-quart);
}
a.pager__btn:hover { background: var(--c-lav-soft); }
a.pager__btn:active { box-shadow: var(--sh-pressed); }
.pager__btn.is-current { background: var(--c-ink); color: var(--c-white); box-shadow: none; }
.pager__btn.is-disabled { cursor: default; }
.pager__gap { padding: 0 4px; color: var(--ink-55); }
@media (min-width: 768px) {
	.sec--posts > .wrap { gap: 28px; }
	.posts__h { font-size: 36px; line-height: 41px; letter-spacing: -.9px; }
	.posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.post { gap: 18px; padding: 12px 12px 22px; border-radius: 22px; }
	.post__media { height: 190px; border-radius: 14px; }
	.post__body { gap: 12px; padding: 10px 10px 0; }
	.post__t { font-size: 20px; line-height: 27px; }
	.post__meta { padding: 0 10px; }
	.pager__btn { padding: 9px 16px; }
}
@media (min-width: 1024px) { .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ================================================================ Groups (kit R.groups) */
.groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.group { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; border-radius: var(--r-card); }
.group__n { font: var(--fw-medium) 13px/18px var(--f-head); color: var(--c-blue); }
.group__t { font: var(--fw-medium) 22px/28px var(--f-head); letter-spacing: -.5px; color: var(--c-ink); }
.group__d { font-size: 15px; line-height: 23px; color: var(--ink-72); }
.group__links { padding-top: 6px; }
.group__links li { border-top: 1px solid var(--ink-10); }
.group__a {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0;
	font: var(--fw-medium) 15px/22px var(--f-body); color: var(--c-ink);
	transition: color var(--dur-fast);
}
.group__a .arrow-ne { transition: transform var(--dur-hover) var(--ease-out-quart); }
a.group__a:hover { color: var(--c-blue); }
a.group__a:hover .arrow-ne { transform: translate(2px, -2px); }
a.group__a:focus-visible { outline-offset: 2px; border-radius: 4px; }
@media (min-width: 768px) {
	.groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.group { gap: 12px; padding: 32px; border-radius: var(--r-card-l); }
	.group__t { font-size: 28px; line-height: 34px; }
	.group__a { padding: 13px 0; font-size: 16px; }
}
@media (min-width: 1024px) { .groups { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); } }

/* ================================================================ List (kit R.list) */
.rlist { display: flex; flex-direction: column; gap: var(--sec-gap); }
.rlist__card { padding: 4px 20px; border-radius: var(--r-card); overflow: hidden; }
.rlist__row { position: relative; display: flex; gap: 14px; padding: 18px 0; }
.rlist__row + .rlist__row { border-top: 1px solid var(--ink-10); }
.rlist__n { flex: none; width: 26px; font: var(--fw-medium) 13px/26px var(--f-head); color: var(--c-blue); }
.rlist__copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rlist__t { font: var(--fw-medium) 19px/26px var(--f-head); letter-spacing: -.3px; color: var(--c-ink); }
.rlist__d { font-size: 14px; line-height: 22px; color: rgba(10, 13, 49, .7); }
/* Link rows: whole row is the link; hover tint spans the card width */
.rlist__a { transition: color var(--dur-fast); }
.rlist__a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rlist__a:focus-visible { outline: none; }
.rlist__row.is-link:has(.rlist__a:focus-visible) { outline: 2px solid var(--c-blue); outline-offset: -2px; border-radius: 8px; }
.rlist__row.is-link::before {
	content: ""; position: absolute; inset: 0 -20px; z-index: -1; background: var(--c-lav-soft);
	opacity: 0; transition: opacity var(--dur-fast);
}
.rlist__card { position: relative; isolation: isolate; }
@media (hover: hover) and (pointer: fine) {
	.rlist__row.is-link:hover::before { opacity: 1; }
	.rlist__row.is-link:hover .rlist__a { color: var(--c-blue); }
}
html.motion-ok [data-reveal="rise"]:not(.is-in) { transform: translateY(var(--dist-small)); }
@media (min-width: 768px) {
	.rlist__card { padding: 8px 32px; border-radius: var(--r-card-l); }
	.rlist__row { gap: 24px; padding: 24px 0; }
	.rlist__row.is-link::before { inset: 0 -32px; }
	.rlist__n { font-size: 14px; line-height: 28px; }
	.rlist__t { font-size: 22px; line-height: 28px; }
	.rlist__d { font-size: 16px; line-height: 24px; }
}
@media (min-width: 1024px) {
	.rlist { flex-direction: row; align-items: flex-start; gap: 64px; }
	.rlist > .head--side { flex: 0 0 360px; }
	.rlist > .head--side .h2 { font-size: 40px; line-height: 46px; letter-spacing: -.9px; }
	.rlist > .head--side .lead { font-size: 16px; line-height: 26px; }
	.rlist__card { flex: 1 1 auto; min-width: 0; }
}
