/*
 * Single article + team profile styles: header, hero, two-column layout with
 * sticky TOC, prose typography, TL;DR, reviewer badge, person boxes, related.
 */

/* ---------- Article masthead (hero band) ---------- */
/*
 * Full-bleed band: brand-tinted glow top corners fading to clean surface at
 * the bottom so the article body starts on plain white. Child themes can
 * replace the whole wash via --cotr-hero-wash.
 */
.cotr-article__masthead {
	overflow: hidden; /* tilted hero frame + sparkles never cause page scroll */
	background: var(
		--cotr-hero-wash,
		radial-gradient(56rem 30rem at 86% -12%, color-mix(in srgb, var(--cotr-color-accent) 13%, transparent), transparent 62%)
			no-repeat,
		radial-gradient(52rem 30rem at 4% -18%, color-mix(in srgb, var(--cotr-color-primary) 15%, transparent), transparent 60%)
			no-repeat,
		linear-gradient(180deg, color-mix(in srgb, var(--cotr-color-primary) 4%, var(--cotr-color-surface)), var(--cotr-color-surface) 92%)
	);
	padding-bottom: clamp(30px, 4.5vw, 54px);
}
/* .cotr-article__top / __layout carry .cotr-container, so their width tracks
   the store-aligned container token — no separate max-width here. */
.cotr-article__masthead-grid {
	margin-top: clamp(18px, 3vw, 34px);
}
@media (min-width: 1024px) {
	.has-media .cotr-article__masthead-grid {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: clamp(36px, 5vw, 72px);
		align-items: center;
	}
}
.cotr-article__header {
	max-width: 820px;
}
/* Explicit vertical rhythm: dek hugs the headline, meta rows breathe */
.cotr-article__header .cotr-chips {
	margin-bottom: 18px;
}
.cotr-article__title {
	font-size: clamp(1.9rem, 4.2vw, 3.1rem);
	letter-spacing: -0.015em;
	margin-bottom: 12px;
}
.cotr-article__dek {
	font-size: clamp(1.05rem, 2vw, 1.22rem);
	line-height: 1.55;
	color: var(--cotr-color-text-muted);
	max-width: 58ch;
	margin-bottom: 0;
}
.cotr-article__trust {
	margin-top: clamp(20px, 3vw, 28px);
}
.cotr-article__trust .cotr-byline {
	margin-bottom: 14px;
}

/* ---------- Reviewer badge ---------- */
.cotr-reviewer {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 18px 12px 14px;
	border-radius: var(--cotr-radius-card);
	background: color-mix(in srgb, var(--cotr-color-trust, #0e9f6e) 6%, white);
	border: 1px solid color-mix(in srgb, var(--cotr-color-trust, #0e9f6e) 20%, white);
	width: fit-content;
	max-width: 100%;
}
.cotr-reviewer__id {
	position: relative;
	flex-shrink: 0;
	line-height: 0;
}
.cotr-reviewer__id .cotr-avatar {
	width: 44px;
	height: 44px;
}
.cotr-reviewer__seal {
	position: absolute;
	right: -3px;
	bottom: -3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--cotr-color-trust, #0e9f6e);
	color: #fff;
	border: 2px solid var(--cotr-color-surface);
}
.cotr-reviewer__text {
	display: grid;
	gap: 2px;
	font-size: 0.88rem;
	line-height: 1.45;
	min-width: 0;
}
.cotr-reviewer__label {
	color: var(--cotr-color-text-muted);
}
.cotr-reviewer__name {
	font-weight: 700;
	color: var(--cotr-color-text);
	text-decoration: none;
}
.cotr-reviewer__name:hover {
	color: var(--cotr-color-trust, #0e9f6e);
}
.cotr-reviewer__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 10px;
	row-gap: 2px;
	font-size: 0.8rem;
}
.cotr-reviewer__role {
	color: var(--cotr-color-text-muted);
}
.cotr-reviewer__date {
	color: color-mix(in srgb, var(--cotr-color-trust, #0e9f6e) 80%, black);
	font-weight: 700;
	white-space: nowrap;
}
@media (max-width: 480px) {
	.cotr-reviewer {
		align-items: flex-start;
		padding: 12px 14px;
	}
	.cotr-reviewer__line,
	.cotr-reviewer__meta {
		margin: 0;
	}
}

/* ---------- Hero figure ---------- */
.cotr-article__hero {
	position: relative;
	margin: 0;
	max-width: 640px;
}
/* Tilted pastel slab peeking out behind the straight image */
.cotr-article__hero::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: calc(var(--cotr-radius-card) * 1.8);
	background: linear-gradient(
		135deg,
		color-mix(in srgb, var(--cotr-color-primary) 42%, white),
		color-mix(in srgb, var(--cotr-color-accent) 46%, white)
	);
	transform: rotate(2.2deg) translate(6px, 8px);
}
/* Natural height — hero illustrations often carry baked-in text; never crop */
.cotr-article__hero img {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	border-radius: calc(var(--cotr-radius-card) * 1.8);
	box-shadow: var(--cotr-shadow-card);
}
.cotr-article__hero-sparkle {
	position: absolute;
	z-index: 2;
	top: -15px;
	right: -8px;
	line-height: 0;
	color: var(--cotr-color-accent);
	animation: cotr-twinkle 4.5s ease-in-out infinite;
}
.cotr-article__hero-sparkle svg {
	fill: currentColor;
}
.cotr-article__hero-sparkle--small {
	top: auto;
	right: auto;
	bottom: -6px;
	left: -13px;
	color: var(--cotr-color-primary);
	animation-delay: -2.2s;
}
@keyframes cotr-twinkle {
	0%,
	100% {
		transform: scale(1) rotate(0deg);
		opacity: 0.95;
	}
	50% {
		transform: scale(0.72) rotate(18deg);
		opacity: 0.55;
	}
}
@media (prefers-reduced-motion: reduce) {
	.cotr-article__hero-sparkle {
		animation: none;
	}
}
@media (max-width: 1023px) {
	.cotr-article__hero {
		margin-top: clamp(30px, 6vw, 44px);
		max-width: 560px;
	}
}

/* ---------- Template presets (see inc/appearance.php) ----------
 * One template, runtime-selectable variations: hero style on the masthead
 * (.is-hero-side is the base look above), body alignment on the layout.
 */

/* Hero: side-large — image fills its grid column instead of the framed 640 */
.is-hero-side-large .cotr-article__hero {
	max-width: none;
}

/* No hero decorations — the tilted backing slab hides here; the sparkle
   spans aren't rendered at all (single.php) */
.no-hero-decor .cotr-article__hero::before {
	content: none;
}

/* Hero: stacked — centered header, image beneath at reading width */
@media (min-width: 1024px) {
	.is-hero-stacked.has-media .cotr-article__masthead-grid {
		display: block;
	}
}
.is-hero-stacked .cotr-article__header {
	margin-inline: auto;
	text-align: center;
}
.is-hero-stacked .cotr-chips,
.is-hero-stacked .cotr-breadcrumbs ol,
.is-hero-stacked .cotr-article__trust .cotr-byline {
	justify-content: center;
}
.is-hero-stacked .cotr-article__dek,
.is-hero-stacked .cotr-reviewer {
	margin-inline: auto;
}
.is-hero-stacked .cotr-article__hero {
	margin: clamp(28px, 4vw, 44px) auto 0;
	max-width: 760px;
}

/* Hero: background — featured image behind the masthead under a scrim.
 * --cotr-hero-image is inlined by single.php; text switches to light via the
 * same tokens every component already reads. */
.is-hero-background.has-media {
	background:
		linear-gradient(180deg, rgba(20, 12, 22, 0.74), rgba(20, 12, 22, 0.5) 55%, rgba(20, 12, 22, 0.74)),
		var(--cotr-hero-image) center / cover no-repeat;
	padding-bottom: clamp(44px, 6vw, 80px);
}
/* Light text on the scrim — scoped per element, NOT on the whole header, so
   card-like children (reviewer badge) keep their own light background + dark
   text tokens. */
.is-hero-background.has-media .cotr-breadcrumbs,
.is-hero-background.has-media .cotr-article__title,
.is-hero-background.has-media .cotr-article__dek,
.is-hero-background.has-media .cotr-byline {
	--cotr-color-text: #fff;
	--cotr-color-text-muted: rgba(255, 255, 255, 0.82);
	--cotr-color-border: rgba(255, 255, 255, 0.4);
	color: #fff;
}
.is-hero-background.has-media .cotr-chip {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}
.is-hero-background.has-media .cotr-breadcrumbs a:hover {
	color: #fff;
}

/* ---------- Layout: content + TOC ---------- */
.cotr-article__layout {
	display: grid;
	gap: clamp(24px, 4vw, 64px);
	padding-bottom: clamp(40px, 6vw, 72px);
}
.cotr-article__layout.has-toc {
	grid-template-columns: minmax(0, 1fr);
}
/* Two-column only once the store chrome is at its full 1170 width; below that
   its container narrows to 940 and a side rail would crush the reading column,
   so the TOC becomes the sticky bar instead. */
@media (min-width: 1200px) {
	/* Content left, TOC rail right */
	.cotr-article__layout.has-toc {
		grid-template-columns: minmax(0, var(--cotr-content-max)) 300px;
	}
	.cotr-article__main {
		order: 1;
	}
	.cotr-article__aside {
		order: 2;
	}
}
.cotr-article__main {
	min-width: 0;
	max-width: var(--cotr-content-max);
}

/* ---------- TOC ---------- */
.cotr-toc {
	background: var(--cotr-color-surface);
	border: 1px solid var(--cotr-color-border);
	border-radius: var(--cotr-radius-card);
	padding: 6px;
}
.cotr-toc__title {
	font-family: var(--cotr-font-heading);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cotr-color-text-muted);
	padding: 12px 14px 8px;
}
.cotr-toc__toggle {
	display: none;
	width: 100%;
	align-items: center;
	gap: 10px;
	padding: 14px;
	background: none;
	border: none;
	font: inherit;
	font-family: var(--cotr-font-heading);
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--cotr-color-text);
	cursor: pointer;
}
.cotr-toc__toggle .cotr-icon--chevron {
	margin-left: auto;
	transition: transform 0.25s var(--cotr-ease);
}
.cotr-toc.is-open .cotr-toc__toggle .cotr-icon--chevron {
	transform: rotate(180deg);
}
.cotr-toc__scroller {
	padding: 0 6px 8px;
}
.cotr-toc__list,
.cotr-toc__sublist {
	list-style: none;
	margin: 0;
	padding: 0;
}
/* Links: quiet type; the active item gains an em-dash that slides in while
   the label indents to make room — no boxes, borders, or background pills. */
.cotr-toc__link,
.cotr-toc__sublink {
	position: relative;
	display: block;
	padding: 8px 12px;
	color: var(--cotr-color-text-muted);
	text-decoration: none;
	font-size: 0.9rem;
	line-height: 1.4;
	transition: color 0.15s var(--cotr-ease), padding-left 0.22s var(--cotr-ease);
}
.cotr-toc__sublink {
	font-size: 0.84rem;
	padding: 6px 12px 6px 26px;
}
.cotr-toc__link::before,
.cotr-toc__sublink::before {
	content: "\2014";
	position: absolute;
	left: 12px;
	color: var(--cotr-color-primary);
	font-weight: 700;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.22s var(--cotr-ease), transform 0.22s var(--cotr-ease);
}
.cotr-toc__sublink::before {
	left: 26px;
}
.cotr-toc__link:hover,
.cotr-toc__sublink:hover {
	color: var(--cotr-color-primary);
}
[data-toc-item].is-active > .cotr-toc__link,
[data-toc-item].is-active > .cotr-toc__sublink {
	color: var(--cotr-color-primary);
	font-weight: 700;
}
[data-toc-item].is-active > .cotr-toc__link {
	padding-left: 36px;
}
[data-toc-item].is-active > .cotr-toc__sublink {
	padding-left: 50px;
}
[data-toc-item].is-active > .cotr-toc__link::before,
[data-toc-item].is-active > .cotr-toc__sublink::before {
	opacity: 1;
	transform: none;
}

/* Desktop: sticky rail; H3 accordion driven by scroll-spy.
   --cotr-header-offset is live-updated by toc.js when the store nav reveals
   itself on scroll-up, so the rail glides down instead of being overlapped.
   Matches the two-column layout breakpoint (store chrome at full width). */
@media (min-width: 1200px) {
	/* The rail sits in whitespace, so it needs no card chrome: title over a
	   hairline, then the bare list (contents-page style). The card styles
	   still apply below 1200 where the TOC overlays content. */
	.cotr-toc {
		position: sticky;
		top: calc(var(--cotr-anchor-offset) - 20px + var(--cotr-header-offset, 0px));
		border: 0;
		border-radius: 0;
		background: none;
		padding: 0;
	}
	.cotr-toc__title {
		margin: 0 12px 8px;
		padding: 0 0 10px;
		border-bottom: 1px solid var(--cotr-color-border);
	}
	.cotr-toc__scroller {
		padding: 0;
		max-height: calc(100vh - var(--cotr-anchor-offset) - 60px - var(--cotr-header-offset, 0px));
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}
	@media (prefers-reduced-motion: no-preference) {
		.cotr-toc {
			transition: top 0.3s var(--cotr-ease);
		}
	}
	/* H3 groups collapse unless reading that H2's section (scroll-spy toggles .is-open) */
	.cotr-toc.is-enhanced .cotr-toc__sublist {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.35s var(--cotr-ease);
	}
	.cotr-toc.is-enhanced .cotr-toc__sublist.is-open {
		max-height: 400px;
	}
}

/* Below the two-column breakpoint: sticky "On this page" bar; panel opens as a
   dropdown overlay. Also covers the 1024–1199 band where the store chrome
   narrows to 940 and there's no room for a side rail. */
@media (max-width: 1199.98px) {
	.cotr-article__layout.has-toc {
		display: block;
	}
	.cotr-article__aside {
		position: sticky;
		top: calc(10px + var(--cotr-header-offset, 0px)); /* dodges the reveal-on-scroll-up store nav */
		z-index: 12; /* below the store's sticky header (15) and mobile menu */
		margin-bottom: 24px;
	}
	@media (prefers-reduced-motion: no-preference) {
		.cotr-article__aside {
			transition: top 0.3s var(--cotr-ease);
		}
	}
	.cotr-toc {
		position: relative;
		background: var(--cotr-color-surface);
	}
	.cotr-toc.is-enhanced {
		box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
	}
	.cotr-toc.is-enhanced .cotr-toc__title {
		display: none;
	}
	.cotr-toc.is-enhanced .cotr-toc__toggle {
		display: flex;
	}
	.cotr-toc.is-enhanced .cotr-toc__scroller {
		display: none;
	}
	.cotr-toc.is-enhanced.is-open .cotr-toc__scroller {
		display: block;
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		right: 0;
		background: var(--cotr-color-surface);
		border: 1px solid var(--cotr-color-border);
		border-radius: var(--cotr-radius-card);
		box-shadow: var(--cotr-shadow-lift);
		max-height: 55vh;
		overflow-y: auto;
		padding: 8px;
	}
}

/* ---------- Body alignment preset: centered ----------
 * Reading column centered in the page. The TOC leaves the grid: on wide
 * screens it becomes a fixed rail floating in the left gutter; in the
 * 1200–1399 band (gutter too narrow) it renders as an inline "On this page"
 * card above the article; below 1200 the sticky-bar behaviour applies as-is.
 */
.cotr-article__layout.is-centered .cotr-article__main {
	margin-inline: auto;
}
@media (min-width: 1200px) {
	.cotr-article__layout.is-centered.has-toc {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
	.cotr-article__layout.is-centered .cotr-article__aside {
		order: 0; /* the base ≥1200 rule puts the rail after the content */
		width: 100%;
		max-width: var(--cotr-content-max);
		margin-inline: auto;
		margin-bottom: 24px;
	}
	.cotr-article__layout.is-centered .cotr-toc {
		position: static;
	}
	.cotr-article__layout.is-centered .cotr-toc__scroller {
		max-height: none;
	}
}
@media (min-width: 1400px) {
	/* Full-height absolute rail in the left gutter; the TOC inside keeps the
	   normal ≥1200 sticky behaviour, so it starts below the masthead and stops
	   at the end of the article instead of overlapping the store chrome. */
	.cotr-article__layout.is-centered.has-toc {
		position: relative;
	}
	.cotr-article__layout.is-centered .cotr-article__aside {
		position: absolute;
		top: 0;
		bottom: 0;
		left: calc(50% - (var(--cotr-content-max) / 2) - 324px);
		width: 300px;
	}
}

/* ---------- TL;DR ----------
 * Key-points panel (Guardian style): a flat brand-tinted box with a thick
 * rule across the top, run-in bold label, em-dash takeaways. No gradient
 * borders, icon chips, or uppercase kickers.
 */
.cotr-tldr {
	margin: 0 0 clamp(28px, 4vw, 40px);
	padding: clamp(18px, 2.5vw, 24px) clamp(18px, 3vw, 28px) clamp(18px, 2.5vw, 26px);
	background: color-mix(in srgb, var(--cotr-color-primary) 5%, var(--cotr-color-surface));
	border-top: 3px solid var(--cotr-color-primary);
	border-radius: 0 0 6px 6px;
}
.cotr-tldr__label {
	display: flex;
	align-items: center;
	font-family: var(--cotr-font-heading);
	font-weight: 700;
	font-size: 1.02rem;
	color: var(--cotr-color-text);
	margin-bottom: 10px;
}
.cotr-tldr__toggle {
	display: none;
	margin-left: auto;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--cotr-color-primary);
	padding: 6px;
	border-radius: 8px;
	line-height: 0;
}
.cotr-tldr__toggle[hidden] {
	display: none !important;
}
.cotr-tldr__toggle .cotr-icon--chevron {
	transition: transform 0.25s var(--cotr-ease);
}
.cotr-tldr.is-collapsed .cotr-tldr__toggle .cotr-icon--chevron {
	transform: rotate(-90deg);
}
@media (max-width: 767px) {
	.cotr-tldr__toggle {
		display: inline-flex;
	}
	.cotr-tldr.is-collapsed .cotr-tldr__body {
		display: none;
	}
	.cotr-tldr.is-collapsed .cotr-tldr__label {
		margin-bottom: 0;
	}
}
.cotr-tldr__summary {
	font-size: 1.05rem;
	line-height: 1.7;
	margin-bottom: 4px;
}
.cotr-tldr__list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.cotr-tldr__list li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 0.95rem;
	line-height: 1.6;
}
.cotr-tldr__list .cotr-icon--check {
	flex-shrink: 0;
	margin-top: 4px;
	color: var(--cotr-color-primary);
	background: color-mix(in srgb, var(--cotr-color-primary) 12%, white);
	border-radius: 50%;
	padding: 3px;
	width: 20px;
	height: 20px;
}

/* ---------- Prose (article body) ---------- */
.cotr-prose {
	font-size: 1.05rem;
	line-height: 1.8;
}
.cotr-prose > * + * {
	margin-top: 1.15em;
}
/* Editorial rhythm: generous air above headings, content hugs beneath them */
.cotr-prose h2 {
	font-size: clamp(1.45rem, 2.6vw, 1.8rem);
	letter-spacing: -0.012em;
	margin-top: 2.4em;
}
.cotr-prose h3 {
	font-size: clamp(1.15rem, 2vw, 1.35rem);
	letter-spacing: -0.008em;
	margin-top: 1.8em;
}
.cotr-prose h2 + *,
.cotr-prose h3 + * {
	margin-top: 0.55em;
}
.cotr-prose h2 + h3 {
	margin-top: 1em;
}
.cotr-prose a {
	color: var(--cotr-color-primary);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}
.cotr-prose a:hover {
	color: color-mix(in srgb, var(--cotr-color-primary) 70%, black);
}
.cotr-prose ul,
.cotr-prose ol {
	padding-left: 1.4em;
	display: grid;
	gap: 0.5em;
}
.cotr-prose ul li {
	list-style: disc;
}
.cotr-prose ol li {
	list-style: decimal;
}
.cotr-prose li::marker {
	color: var(--cotr-color-primary);
	font-weight: 700;
}
.cotr-prose img {
	border-radius: var(--cotr-radius-card);
	height: auto;
}
.cotr-prose figure {
	margin-inline: 0;
}
/* Legacy/imported content alignment classes */
.cotr-prose .aligncenter,
.cotr-prose img.aligncenter {
	display: block;
	margin-inline: auto;
}
.cotr-prose .wp-block-image {
	text-align: center;
}
.cotr-prose figcaption {
	font-size: 0.82rem;
	color: var(--cotr-color-text-muted);
	text-align: center;
	margin-top: 8px;
}
.cotr-prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 24px;
	border-left: 4px solid var(--cotr-color-primary);
	font-family: var(--cotr-font-heading);
	font-size: 1.15rem;
	line-height: 1.6;
	font-weight: 600;
	color: var(--cotr-color-text);
}
.cotr-prose blockquote cite {
	display: block;
	margin-top: 10px;
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--cotr-color-text-muted);
	font-style: normal;
}
.cotr-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
	display: block;
	overflow-x: auto;
}
.cotr-prose th,
.cotr-prose td {
	padding: 10px 14px;
	border: 1px solid var(--cotr-color-border);
	text-align: left;
}
.cotr-prose th {
	background: var(--cotr-color-surface-alt);
	font-family: var(--cotr-font-heading);
}

/* ---------- Person boxes ---------- */
.cotr-article-footer {
	margin-top: clamp(36px, 6vw, 56px);
	padding-top: clamp(24px, 4vw, 36px);
	border-top: 1px solid var(--cotr-color-border);
	display: grid;
	gap: 16px;
}
.cotr-person-box {
	display: flex;
	gap: 18px;
	padding: clamp(18px, 3vw, 26px);
	border-radius: var(--cotr-radius-card);
	background: var(--cotr-color-surface-alt);
	border: 1px solid var(--cotr-color-border);
}
.cotr-person-box--reviewer {
	background: color-mix(in srgb, var(--cotr-color-trust, #0e9f6e) 5%, white);
	border-color: color-mix(in srgb, var(--cotr-color-trust, #0e9f6e) 18%, white);
}
.cotr-person-box__photo {
	flex-shrink: 0;
	line-height: 0;
}
.cotr-person-box__body {
	display: grid;
	gap: 6px;
	font-size: 0.92rem;
}
.cotr-person-box__label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cotr-color-text-muted);
}
.cotr-person-box__name {
	font-family: var(--cotr-font-heading);
	font-size: 1.1rem;
	font-weight: 700;
}
.cotr-person-box__name a {
	color: inherit;
	text-decoration: none;
}
.cotr-person-box__name a:hover {
	color: var(--cotr-color-primary);
}
.cotr-person-box__role {
	color: var(--cotr-color-text-muted);
	font-weight: 600;
	font-size: 0.85rem;
}
.cotr-person-box__bio {
	line-height: 1.65;
}
.cotr-person-box__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin-top: 4px;
	font-size: 0.85rem;
}
.cotr-person-box__profile {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--cotr-color-primary);
	font-weight: 700;
	text-decoration: none;
}
.cotr-person-box__profile:hover {
	text-decoration: underline;
}
.cotr-person-box__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--cotr-color-border);
	color: var(--cotr-color-text-muted);
	text-decoration: none;
	transition: color 0.18s var(--cotr-ease), background 0.18s var(--cotr-ease),
		border-color 0.18s var(--cotr-ease), transform 0.18s var(--cotr-ease);
}
.cotr-person-box__social:hover,
.cotr-person-box__social:focus-visible {
	transform: translateY(-2px);
	border-color: transparent;
	color: #fff;
}
.cotr-person-box__social--instagram:hover,
.cotr-person-box__social--instagram:focus-visible {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.cotr-person-box__social--x:hover,
.cotr-person-box__social--x:focus-visible,
.cotr-person-box__social--tiktok:hover,
.cotr-person-box__social--tiktok:focus-visible,
.cotr-person-box__social--threads:hover,
.cotr-person-box__social--threads:focus-visible {
	background: #000;
}
.cotr-person-box__social--linkedin:hover,
.cotr-person-box__social--linkedin:focus-visible {
	background: #0a66c2;
}
.cotr-person-box__social--youtube:hover,
.cotr-person-box__social--youtube:focus-visible {
	background: #ff0000;
}
.cotr-person-box__social--facebook:hover,
.cotr-person-box__social--facebook:focus-visible {
	background: #1877f2;
}
.cotr-person-box__social--website:hover,
.cotr-person-box__social--website:focus-visible {
	background: var(--cotr-color-primary);
}
@media (max-width: 560px) {
	.cotr-person-box {
		flex-direction: column;
	}
}

/* Co-authored posts: one shared card under a single "Written by" label,
   authors stacked full-width with hairline dividers — side-by-side columns
   get too narrow inside the reading column and squash the bios. */
.cotr-person-box--group {
	display: grid;
	gap: 16px;
}
.cotr-person-box__people {
	display: grid;
	gap: 20px;
}
.cotr-person-box__people > * + * {
	border-top: 1px solid var(--cotr-color-border);
	padding-top: 20px;
}
.cotr-person-box__person {
	display: flex;
	gap: 18px;
}
@media (max-width: 560px) {
	.cotr-person-box__person {
		flex-direction: column;
	}
}

/* ---------- Related ---------- */
.cotr-related {
	background: var(--cotr-color-surface-alt);
	padding: clamp(36px, 6vw, 64px) 0;
}

/* ---------- Team profile ---------- */
.cotr-profile {
	/* padding-block only — see .cotr-people: a shorthand would zero the
	   .cotr-container gutter and leave profiles edge-to-edge on mobile. */
	padding-block: clamp(24px, 4vw, 48px);
}
.cotr-profile .cotr-breadcrumbs {
	padding-top: 0;
	margin-bottom: clamp(16px, 2.5vw, 26px);
}
.cotr-profile__links-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--cotr-font-heading);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cotr-color-text-muted);
	margin-bottom: 10px;
}
.cotr-profile__links-label .cotr-icon {
	color: var(--cotr-color-primary);
}
.cotr-profile__pinned {
	margin-top: 10px;
	padding-top: 18px;
	border-top: 1px solid var(--cotr-color-border);
}
.cotr-profile__pinned ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.cotr-profile__pinned a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 16px;
	border-radius: 10px;
	background: var(--cotr-color-surface-alt);
	border: 1px solid var(--cotr-color-border);
	color: var(--cotr-color-text);
	font-weight: 600;
	font-size: 0.92rem;
	text-decoration: none;
	transition: border-color 0.18s var(--cotr-ease), color 0.18s var(--cotr-ease), transform 0.18s var(--cotr-ease);
}
.cotr-profile__pinned a:hover {
	border-color: var(--cotr-color-primary);
	color: var(--cotr-color-primary);
	transform: translateX(2px);
}
.cotr-profile__pinned .cotr-icon {
	flex-shrink: 0;
	opacity: 0.6;
}
.cotr-profile__favourites {
	margin-top: 16px;
}
.cotr-profile__favourites-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.cotr-profile__favourites-pills a {
	padding: 8px 16px;
	border-radius: var(--cotr-radius-pill);
	background: color-mix(in srgb, var(--cotr-color-accent) 9%, white);
	border: 1px solid color-mix(in srgb, var(--cotr-color-accent) 25%, white);
	color: color-mix(in srgb, var(--cotr-color-accent) 75%, black);
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.18s var(--cotr-ease);
}
.cotr-profile__favourites-pills a:hover {
	background: var(--cotr-color-accent);
	border-color: var(--cotr-color-accent);
	color: #fff;
}
.cotr-profile__card {
	display: flex;
	gap: clamp(20px, 4vw, 40px);
	align-items: flex-start;
	padding: clamp(24px, 4vw, 44px);
	border-radius: calc(var(--cotr-radius-card) * 1.5);
	background: var(--cotr-color-surface);
	border: 1px solid var(--cotr-color-border);
	box-shadow: var(--cotr-shadow-card);
}
.cotr-profile__photo {
	flex-shrink: 0;
	line-height: 0;
}
.cotr-profile__body {
	display: grid;
	gap: 12px;
}
.cotr-profile__kicker {
	display: inline-flex;
	gap: 8px;
}
.cotr-profile__name {
	font-size: clamp(1.6rem, 3.4vw, 2.4rem);
}
.cotr-profile__role {
	font-size: 1.02rem;
	color: var(--cotr-color-text-muted);
	font-weight: 600;
}
.cotr-profile__bio {
	line-height: 1.75;
	max-width: 68ch;
}
.cotr-profile__stats {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--cotr-color-primary);
	margin-top: 2px;
}
.cotr-profile__expertise {
	margin-top: 4px;
}
.cotr-profile__expertise .cotr-chips {
	margin-top: 6px;
}
.cotr-profile__affiliations {
	font-size: 0.92rem;
	line-height: 1.6;
}
.cotr-profile__affiliations .cotr-profile__links-label {
	display: block;
	margin-bottom: 2px;
}
.cotr-profile__affiliations a {
	color: inherit;
	text-decoration-color: var(--cotr-color-border-strong, var(--cotr-color-border));
	text-underline-offset: 3px;
}
.cotr-profile__affiliations a:hover {
	color: var(--cotr-color-primary);
}
.cotr-profile__about {
	margin-top: clamp(28px, 4vw, 44px);
}
.cotr-profile__about .cotr-prose {
	margin-top: 14px;
	max-width: var(--cotr-content-max, 720px);
}
.cotr-profile__quals {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
	font-size: 0.92rem;
}
.cotr-profile__quals li {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}
.cotr-profile__quals .cotr-icon {
	color: var(--cotr-color-primary);
	margin-top: 4px;
	flex-shrink: 0;
}
.cotr-profile__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}
.cotr-profile__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--cotr-color-border);
	background: var(--cotr-color-surface);
	color: var(--cotr-color-text);
	text-decoration: none;
	transition: color 0.18s var(--cotr-ease), background 0.18s var(--cotr-ease),
		border-color 0.18s var(--cotr-ease), transform 0.18s var(--cotr-ease);
}
.cotr-profile__social .cotr-social-icon {
	display: block;
}
.cotr-profile__social:hover,
.cotr-profile__social:focus-visible {
	transform: translateY(-2px);
	border-color: transparent;
	color: #fff;
}
/* Fill with each platform's brand colour on hover for instant recognition. */
.cotr-profile__social--instagram:hover,
.cotr-profile__social--instagram:focus-visible {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.cotr-profile__social--x:hover,
.cotr-profile__social--x:focus-visible,
.cotr-profile__social--tiktok:hover,
.cotr-profile__social--tiktok:focus-visible {
	background: #000;
}
.cotr-profile__social--linkedin:hover,
.cotr-profile__social--linkedin:focus-visible {
	background: #0a66c2;
}
.cotr-profile__social--youtube:hover,
.cotr-profile__social--youtube:focus-visible {
	background: #ff0000;
}
.cotr-profile__social--facebook:hover,
.cotr-profile__social--facebook:focus-visible {
	background: #1877f2;
}
.cotr-profile__social--threads:hover,
.cotr-profile__social--threads:focus-visible {
	background: #000;
}
/* Website / unknown platforms use the brand primary. */
.cotr-profile__social--website:hover,
.cotr-profile__social--website:focus-visible {
	background: var(--cotr-color-primary);
}
.cotr-profile__articles {
	padding: clamp(28px, 5vw, 48px) 0 clamp(40px, 6vw, 72px);
}
@media (max-width: 700px) {
	.cotr-profile__card {
		flex-direction: column;
	}
}
