/*
 * Author profile. Flat surfaces, hairlines, no invented colour.
 *
 * `.claude/rules/design.md` lists where the accent may go — the price, the
 * grade seal, the CTA, the dashed coupon pill, the active pill, and a dot or
 * label for a market. Two of those are on this page: the grade seal in a review
 * row and the market dot beside it. NOTHING ELSE TAKES COLOUR. No tinted
 * panels, no coloured borders, no left bar, no glow; hover is a hairline
 * brightening and nothing lifts.
 *
 * THE --rv-* TOKENS DO NOT EXIST HERE. They are scoped to `.pfg-rv`, the review
 * container, so on /authors/ they resolve to nothing: the name fell through to
 * the theme's default link colour — the ACCENT — and picked up a permanent
 * underline, which design.md forbids on both counts. Measured
 * `rgb(230, 255, 0)` on a shipped page. Every colour below therefore declares
 * the same fallback chain review-context declares, so a page and a review
 * resolve to the same value rather than to two that happen to look alike.
 */

/* -------------------------------------------------------------------------
   Container

   THE PROFILE IS NOT PROSE, so it does not read at the prose column.
   `components.css` caps every direct child of `.wp-block-post-content` at
   `--pfg-document-col` (75ch), which is right for an article and wrong for a
   page whose job is a stat strip and a two-column list of fourteen rows. The
   theme serves author profiles from `templates/page-author-profile.html`,
   which stamps `.pfg-author-page` on the body group; three classes beats the
   theme's two, which is the same specificity argument the authors index
   records below.

   The BIO still reads at a measure — capped on itself, further down — so
   widening the container widens the panels and not the prose.
   ------------------------------------------------------------------------- */
.pfg-author-page > .wp-block-post-content > .pfg-author {
	max-width: none;
}

.pfg-author {
	display: flex;
	flex-direction: column;
	gap: clamp(22px, 2.4vw, 30px);
}

/* -------------------------------------------------------------------------
   Identity. Everything a reader needs before they scroll.
   ------------------------------------------------------------------------- */
.pfg-author__head {
	display: flex;
	align-items: center;
	gap: clamp(14px, 1.6vw, 20px);
}

.pfg-author__portrait {
	inline-size: clamp(64px, 7vw, 96px);
	block-size: clamp(64px, 7vw, 96px);
	flex: 0 0 auto;
	border-radius: 50%;
	border: 1px solid var(--border-2, rgba(255, 255, 255, 0.08));
	background: var(--surface-3, var(--wp--preset--color--surface-3, #171B26));
	object-fit: cover;
}

.pfg-author__portrait--mono {
	display: grid;
	place-items: center;
	font-family: var(--wp--preset--font-family--display, inherit);
	font-weight: 300;
	font-size: clamp(22px, 2.2vw, 30px);
	letter-spacing: 0.02em;
	line-height: 1;
	color: var(--text-2, var(--wp--preset--color--text-2, #C6CBDD));
}

.pfg-author__id {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-inline-size: 0;
}

.pfg-author__name {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, inherit);
	font-weight: 300;
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.08;
	letter-spacing: -0.01em;
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
}

.pfg-author__role {
	margin: 0;
	font-size: clamp(13px, 1vw, 15px);
	line-height: 1.3;
	color: var(--text-2, var(--wp--preset--color--text-2, #C6CBDD));
}

/* The one line a reader deciding whether to trust a grade will read, so it is
   set at body size rather than as fine print — and capped on itself, because
   at 1180px an unbroken sentence beside a 96px portrait is unreadable. */
.pfg-author__cred {
	margin: 2px 0 0;
	max-inline-size: 60ch;
	font-size: clamp(14px, 1.05vw, 16px);
	line-height: 1.5;
	color: var(--text-body, var(--wp--preset--color--text-body, #A6ACC0));
}

/* -------------------------------------------------------------------------
   Stat strip. Flat surface-2 tiles, hairline, radius from the token scale.
   ------------------------------------------------------------------------- */
.pfg-author__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 10px;
	margin: 0;
}

/* A QUANTITY QUERY, because the strip grew from four tiles to as many as six
   when the expert fields landed. auto-fit puts five across a 1180px container,
   so six tiles came out five-and-an-orphan — the same defect the team index had
   with auto-fill, one row down. Three columns from the fifth tile onward gives
   3+2 and 3+3. Four or fewer keeps auto-fit, which already fits them on one
   row. `:has()` is used in base.css and components.css already. */
@media (min-width: 901px) {
	.pfg-author__stats:has(> :nth-child(5)) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.pfg-author__stat {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border: 1px solid var(--border-1, rgba(255, 255, 255, 0.06));
	border-radius: var(--wp--custom--radius--lg, 16px);
	background: var(--surface-2, var(--wp--preset--color--surface-2, #161A25));
	min-inline-size: 0;
}

.pfg-author__stat dt {
	margin: 0;
	font-size: 11.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-label, var(--wp--preset--color--text-label, #9AA1B5));
}

.pfg-author__stat dd {
	margin: 0;
	font-size: 15px;
	line-height: 1.35;
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
	overflow-wrap: anywhere;
}

.pfg-author__stat dd.pfg-author__stat--num {
	font-family: var(--wp--preset--font-family--display, inherit);
	font-weight: 300;
	font-size: clamp(22px, 2vw, 28px);
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------
   Bio and the labelled blocks.
   ------------------------------------------------------------------------- */
.pfg-author__bio {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-inline-size: 68ch;
}

.pfg-author__bio p {
	margin: 0;
	font-size: clamp(15px, 1.05vw, 17px);
	line-height: 1.7;
	color: var(--text-body, var(--wp--preset--color--text-body, #A6ACC0));
}

.pfg-author__block {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-block-start: clamp(18px, 2vw, 24px);
	border-block-start: 1px solid var(--border-1, rgba(255, 255, 255, 0.06));
}

/* A real heading that looks like a label. Sentence case, no emoji, no rule. */
.pfg-author__lbl {
	margin: 0;
	font-family: var(--wp--preset--font-family--body, inherit);
	font-weight: 600;
	font-size: 11.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-label, var(--wp--preset--color--text-label, #9AA1B5));
}

.pfg-author__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pfg-author__chips li {
	padding: 6px 12px;
	border: 1px solid var(--border-2, rgba(255, 255, 255, 0.08));
	border-radius: var(--wp--custom--radius--pill, 999px);
	font-size: 13px;
	line-height: 1.3;
	color: var(--text-2, var(--wp--preset--color--text-2, #C6CBDD));
}

/* -------------------------------------------------------------------------
   Fact lists: roles, education, awards, work elsewhere.

   ONE IDIOM FOR ALL FOUR, because they are the same shape — a thing, and the
   place it happened. Four bespoke layouts would read as four different systems
   describing one person, which is the argument lib.php already records about
   the monogram. Hairline rows, no card, no accent: `design.md` does not list a
   biography among the places the accent may go.
   ------------------------------------------------------------------------- */
/* THE RULE SPANS THE COLUMN, THE TEXT READS AT A MEASURE. Capping the list
   itself put a 72ch hairline under each row while the section separators above
   and below ran the full container — three different edges in one section, the
   defect components.css records at length about the document column. The cap
   moved onto the text, where it belongs. */
.pfg-author__facts {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pfg-author__facts li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-block: 9px;
	border-block-end: 1px solid var(--border-1, rgba(255, 255, 255, 0.06));
}

.pfg-author__facts li:last-child {
	border-block-end: 0;
}

.pfg-author__fact-main {
	max-inline-size: 72ch;
	font-size: 15px;
	line-height: 1.4;
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
}

.pfg-author__fact-sub {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 7px;
	max-inline-size: 72ch;
	font-size: 13px;
	line-height: 1.45;
	color: var(--text-2, var(--wp--preset--color--text-2, #C6CBDD));
}

/* 24px target on an inline name-link, same measurement as the review byline. */
.pfg-author__facts a {
	display: inline-flex;
	align-items: center;
	min-block-size: 24px;
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--border-strong, rgba(255, 255, 255, 0.14));
	text-underline-offset: 3px;
}

.pfg-author__facts a:hover,
.pfg-author__facts a:focus-visible {
	text-decoration-color: currentColor;
}

.pfg-author__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 24px is the WCAG 2.2 minimum target; the padding is what makes a one-word
   link reach it without a visible box. */
.pfg-author__links li a {
	display: inline-flex;
	align-items: center;
	min-block-size: 24px;
	padding-block: 2px;
	font-size: 14px;
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
	text-decoration: underline;
	text-decoration-color: var(--border-strong, rgba(255, 255, 255, 0.14));
	text-underline-offset: 3px;
}

.pfg-author__links li a:hover,
.pfg-author__links li a:focus-visible {
	text-decoration-color: currentColor;
}

.pfg-author__note {
	margin: 0;
	max-inline-size: 72ch;
	font-size: 13px;
	line-height: 1.6;
	color: var(--text-2, var(--wp--preset--color--text-2, #C6CBDD));
}

.pfg-author__note a {
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Signed reviews.
   ------------------------------------------------------------------------- */
.pfg-author__work {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-block-start: clamp(18px, 2vw, 24px);
	border-block-start: 1px solid var(--border-1, rgba(255, 255, 255, 0.06));
}

.pfg-author__work-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, inherit);
	font-weight: 400;
	font-size: clamp(19px, 1.6vw, 24px);
	line-height: 1.2;
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
}

.pfg-author__list {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
}

.pfg-author__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 18px;
	padding-block: 10px;
	padding-inline: 4px;
	border-block-end: 1px solid var(--border-1, rgba(255, 255, 255, 0.06));
	border-radius: var(--wp--custom--radius--xs, 7px);
}

.pfg-author__row:last-child {
	border-block-end: 0;
}

/* Hover is a hairline brightening. No lift, no scale, no shadow, no fill. */
.pfg-author__row:hover {
	background: var(--hover-wash, rgba(255, 255, 255, 0.04));
}

.pfg-author__rowlink {
	display: flex;
	align-items: center;
	gap: 10px;
	min-block-size: 24px;
	min-inline-size: 0;
}

.pfg-author__seal {
	flex: 0 0 24px;
}

.pfg-author__firm {
	font-family: var(--wp--preset--font-family--display, inherit);
	font-weight: 400;
	font-size: clamp(15px, 1.15vw, 17px);
	line-height: 1.25;
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
}

.pfg-author__rowmeta {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	color: var(--text-2, var(--wp--preset--color--text-2, #C6CBDD));
}

.pfg-author__mkt {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* The market dot is the one place besides the seal where design.md lets the
   accent onto this page, and it takes it from the row's own `data-world` —
   never from a hex written here. */
.pfg-author__dot {
	inline-size: 6px;
	block-size: 6px;
	flex: 0 0 6px;
	border-radius: 50%;
	background: var(--acc, currentColor);
}

.pfg-author__sep {
	color: var(--text-label, var(--wp--preset--color--text-label, #9AA1B5));
}

.pfg-author__when {
	font-variant-numeric: tabular-nums;
}

.pfg-author__gstatus {
	font-style: normal;
}

/* -------------------------------------------------------------------------
   Narrow screens. Nothing may push the page sideways.
   ------------------------------------------------------------------------- */
/* Four tiles, and auto-fit fits three across a tablet — leaving the fourth
   alone on a second row, which reads as a mistake rather than a layout.
   Measured at 768: three 239px columns. Two-by-two instead. */
@media (min-width: 561px) and (max-width: 900px) {
	.pfg-author__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.pfg-author__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pfg-author__row {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}

	.pfg-author__rowmeta {
		padding-inline-start: 34px;
	}
}

@media (max-width: 380px) {
	.pfg-author__stats {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* -------------------------------------------------------------------------
   SPECIFICITY, NOT PREFERENCE. `components.css` styles prose list links —
   `.pfg-page-body .wp-block-post-content > ul li a`, which is (0,2,3) — and
   this block renders lists INSIDE post content, so the theme correctly reads
   them as prose and paints the accent plus an underline. A single block class
   is (0,1,0) and loses silently; `text-decoration` also propagates from an
   ancestor and cannot be switched off by a descendant. Measured on a shipped
   page before the authors index carried the same note: the anchor computed
   `rgb(230, 255, 0)` with `underline`.

   Three classes beats two, so these land.
   ------------------------------------------------------------------------- */
.pfg-author .pfg-author__work .pfg-author__rowlink,
.pfg-author .pfg-author__work .pfg-author__rowlink:link,
.pfg-author .pfg-author__work .pfg-author__rowlink:visited,
.pfg-author .pfg-author__work .pfg-author__rowlink .pfg-author__firm {
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
	text-decoration: none;
}

.pfg-author .pfg-author__work .pfg-author__rowlink:hover .pfg-author__firm,
.pfg-author .pfg-author__work .pfg-author__rowlink:focus-visible .pfg-author__firm {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.pfg-author .pfg-author__block .pfg-author__links a,
.pfg-author .pfg-author__block .pfg-author__links a:link,
.pfg-author .pfg-author__block .pfg-author__links a:visited {
	color: var(--text-1, var(--wp--preset--color--text-1, #F2F3F8));
}

/* Same fight, same weight: a fact list is a <ul> inside post content too. */
.pfg-author .pfg-author__block .pfg-author__facts a,
.pfg-author .pfg-author__block .pfg-author__facts a:link,
.pfg-author .pfg-author__block .pfg-author__facts a:visited {
	color: inherit;
}
