/*
 * The public artist profile: direction A, "the artist's stage" (design §4).
 *
 * The page sits on the counter field (`.ti-counter-field`, the canvas #080808 in both palettes)
 * and reads only the field contract (--ti-field, --ti-strong, --ti-quiet, --ti-muted, --ti-line,
 * --ti-well, --ti-flare). The stage reads the variables the server prints per profile from the
 * shared stage palette (--stage, --stage-ink, --stage-soft, --stage-action, --stage-on-action,
 * --stage-glow, --stage-glow-strength, --focus): every text colour on a stage was decided and
 * measured by resolve_palette(), never here. No colour literal in this file.
 *
 * Measured on #080808:
 *   strong 19.8:1; quiet (78 %) 14.1:1; muted (66 %) 10.4:1 — all text;
 *   control edge = strong 42 % over the field, about #707070: 4.05:1 on the field (≥ 3:1);
 *   flare #F65D00 as a fill with the field as its label: 6.18:1; white on flare would be 3.24:1
 *   and is never used for normal text;
 *   the photo backdrop: ≥ 72 % of the canvas under every line of the copy, worst pixel white:
 *   ink 8.45:1, soft ink 6.16:1 (design §4.4).
 *
 * One motion moment: the name settles 0.12em from where it already is, 700 ms, exponential out,
 * only with prefers-reduced-motion: no-preference. Nothing starts hidden or transparent.
 */

.ti-profile {
	--cp-edge: color-mix( in srgb, var( --ti-strong ) 42%, var( --ti-field ) );
	--cp-gutter: var( --wp--style--root--padding-left, 1.5rem );
	--cp-fs-label: 0.8125rem;
	--cp-fs-small: 0.875rem;
	--cp-fs-body: 1rem;
	--cp-fs-large: 1.35rem;
	--cp-fs-title: 2.35rem;
	--cp-s20: 0.5rem;
	--cp-s30: 1rem;
	--cp-s40: 1.5rem;
	--cp-s50: 2.25rem;
	--cp-s60: 3.5rem;
	--cp-s70: 5.5rem;
	--cp-display: var( --wp--preset--font-family--display, "Jost", sans-serif );
	--cp-body: var( --wp--preset--font-family--body, "Hanken Grotesk", sans-serif );
	background: var( --ti-field );
	color: var( --ti-strong );
	font-family: var( --cp-body );
	font-size: var( --cp-fs-body );
	line-height: 1.6;
	padding-bottom: var( --player-bar-space, 0 );
}

.ti-profile *,
.ti-profile *::before,
.ti-profile *::after {
	box-sizing: border-box;
}

.ti-profile ::selection {
	background: var( --ti-flare );
	color: var( --ti-field );
}

.ti-profile :where( h1, h2, h3, h4, p, ul, figure ) {
	margin: 0;
}

.ti-profile :where( h1, h2, h3 ) {
	color: inherit;
	font-family: var( --cp-display );
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1.08;
}

.ti-profile img {
	display: block;
	max-width: 100%;
	height: auto;
}

.ti-profile a {
	color: inherit;
	text-underline-offset: 0.22em;
	text-decoration-thickness: 1px;
}

.ti-profile :focus-visible,
.player-bar :focus-visible {
	outline: 2px solid var( --stage-ink, var( --ti-strong ) );
	outline-offset: 3px;
}

/* The site's one container: the header row's width and left edge. */
.ti-profile .wrap {
	width: min( 100% - 2 * var( --cp-gutter ), var( --wp--style--global--wide-size, 86rem ) );
	margin-inline: auto;
}

.ti-profile .sr-only,
.player-bar .sr-only,
body > .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset( 50% );
	white-space: nowrap;
	/* Never seen, but read by contrast tools: give it the field's own pair. */
	background: var( --ti-field );
	color: var( --ti-strong );
}

.ti-profile .icon,
.player-bar .icon,
.player-inline .icon {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ti-profile .mark {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
	fill: currentColor;
}

.ti-profile .tabular {
	font-variant-numeric: tabular-nums;
}

/* ---------- buttons: straight, 52 px for the main pair, 44 px for the quiet ones ---------- */

.ti-profile .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3.25rem;
	padding: 0 1.4rem;
	border: 1px solid transparent;
	border-radius: 0;
	font: 600 1.0625rem / 1 var( --cp-body );
	text-decoration: none;
	cursor: pointer;
}

.ti-profile .btn .icon,
.ti-profile .btn .mark {
	width: 1.15rem;
	height: 1.15rem;
}

.ti-profile .btn--primary {
	background: var( --stage-action, var( --ti-strong ) );
	color: var( --stage-on-action, var( --ti-field ) );
}

.ti-profile .btn--secondary {
	border-color: var( --stage-ink, var( --ti-strong ) );
	color: var( --stage-ink, var( --ti-strong ) );
	background: transparent;
}

/* "Listen here" inside a section: ink on the canvas, whatever the stage colour. */
.ti-profile .btn--light {
	background: var( --ti-strong );
	color: var( --ti-field );
}

.ti-profile .btn--quiet {
	min-height: 44px;
	padding: 0 0.9rem;
	border-color: var( --cp-edge );
	color: var( --ti-strong );
	background: transparent;
	font-size: var( --cp-fs-small );
}

.ti-profile .btn--quiet:hover,
.ti-profile .store:hover,
.ti-profile .links__link:hover {
	border-color: var( --ti-strong );
}

.ti-profile .btn[hidden],
.ti-profile .play[hidden] {
	display: none;
}

/* ---------- the stage ---------- */

.ti-profile .stage {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var( --stage, var( --ti-field ) );
	color: var( --stage-ink, var( --ti-strong ) );
}

.ti-profile .stage__frame {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1.05fr );
	align-items: end;
	min-height: min( 88svh, 52rem );
	padding-block: var( --cp-s70 ) var( --cp-s60 );
	gap: var( --cp-s60 );
}

.ti-profile .stage__copy {
	display: grid;
	/* One track the width of the column: an implicit `auto` track grew with the widest line at 200 % text. */
	grid-template-columns: minmax( 0, 1fr );
	gap: var( --cp-s40 );
	align-content: end;
	max-width: 40rem;
	container-type: inline-size;
}

/*
 * NameFit (design §4.3.1): the band caps the size by character count; the server prints --name-em,
 * the measured width of the longest word in em of Jost 400 at -0.035em (+2 %), and the size never
 * passes the copy column (100cqi). The first font-size is the fallback without container units.
 * overflow-wrap only acts above 19.5 em at 312 px: an edge guard, not the design.
 */
.ti-profile .stage__name {
	font-family: var( --cp-display );
	font-weight: 400;
	letter-spacing: -0.035em;
	line-height: 0.92;
	text-wrap: balance;
	hyphens: manual;
	overflow-wrap: anywhere;
	font-size: var( --name-max );
	font-size: clamp( 1.75rem, calc( 100cqi / var( --name-em, 6 ) ), var( --name-max ) );
}

.ti-profile .stage__name--xxl {
	--name-max: clamp( 3.25rem, 14vw, 6rem );
}

.ti-profile .stage__name--xl {
	--name-max: clamp( 2.6rem, 10vw, 4.8rem );
}

.ti-profile .stage__name--l {
	--name-max: clamp( 2rem, 8vw, 3.2rem );
}

/* Band s: the longest word does not fit at the display floor; it leaves the display. */
.ti-profile .stage__name--s {
	--name-max: 2.35rem;
	letter-spacing: -0.02em;
	line-height: 1.1;
	font-size: clamp( 1rem, calc( 100cqi / var( --name-em, 20 ) ), var( --name-max ) );
}

@media ( prefers-reduced-motion: no-preference ) {
	.ti-profile .stage__name {
		animation: ti-community-name-settles 700ms cubic-bezier( 0.16, 1, 0.3, 1 );
	}
}

@keyframes ti-community-name-settles {
	from {
		transform: translateY( 0.12em );
	}

	to {
		transform: none;
	}
}

/* One separator, glued to the item before it; a line only breaks after it (design §5.3). */
.ti-profile .stage__facts {
	font-size: var( --cp-fs-body );
	color: var( --stage-soft, var( --ti-quiet ) );
	line-height: 1.45;
}

.ti-profile .stage__facts span {
	white-space: nowrap;
}

.ti-profile .stage__genres {
	margin-top: -1.1rem;
	font-size: var( --cp-fs-small );
	color: var( --stage-soft, var( --ti-quiet ) );
}

.ti-profile .stage__short {
	max-width: 32rem;
	color: var( --stage-soft, var( --ti-quiet ) );
	font-size: 1.0625rem;
}

.ti-profile .stage__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.ti-profile .stage--sparse .stage__frame {
	min-height: min( 70svh, 40rem );
}

.ti-profile .stage__glow {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: radial-gradient( 60% 70% at 72% 55%, color-mix( in srgb, var( --stage-glow, var( --ti-flare ) ) var( --stage-glow-strength, 24% ), transparent ), transparent 70% );
}

/* Photo: the right part of the stage on the desktop, the whole first screen on the phone. */
.ti-profile .stage--photo .stage__media {
	position: absolute;
	z-index: 0;
	inset: 0 0 0 42%;
}

.ti-profile .stage--photo .stage__media picture {
	display: contents;
}

.ti-profile .stage__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var( --focus, 50% 30% );
	/* The artist photo in the house tones (ti-artists → Portrait filter); absent, the photo as sent. */
	filter: var( --ti-portrait-filter, none );
}

/*
 * Each box shows the variant of its own place, cut by the frame the artist chose for it (D77):
 * the phone's first screen (9:16) below 40rem, the 4:5 card between 40 and 64rem, the desktop stage
 * (6:5) above (the <picture> of CommunityProfileSource::STAGE_SOURCES). A box of another shape than
 * its place crops a little at the profile's focus, which for a framed portrait is centred across
 * with its top kept (PlacementFraming::BOX_FOCUS). A box much wider than its place keeps the photo
 * on its right at the place's shape, on the stage's own ground, so nothing the artist framed is cut.
 */
@supports ( width: 1cqw ) {
	.ti-profile .stage--photo .stage__media {
		container: stage-photo / size;
	}
	@media ( min-width: 64.01rem ) {
		@container stage-photo ( aspect-ratio > 6 / 5 ) {
			.ti-profile .stage--photo .stage__image {
				display: block;
				width: calc( 100cqh * 6 / 5 );
				margin-inline-start: auto;
				mask-image: linear-gradient( to right, transparent, #000 4rem );
			}
		}
	}
}
.ti-profile .stage--photo .stage__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( 90deg, var( --ti-field ) 0%, color-mix( in srgb, var( --ti-field ) 70%, transparent ) 22%, transparent 55% );
}

/*
 * The copy carries its own backdrop: whatever its height, every line sits on ≥ 72 % of the canvas
 * over the worst pixel (design §4.4). It is a pseudo-element, so it paints past the column; the
 * column has no paint containment.
 */
.ti-profile .stage--photo .stage__copy,
.ti-profile .stage--cover .stage__copy {
	position: relative;
	isolation: isolate;
}

.ti-profile .stage--photo .stage__copy::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -6rem calc( -1 * var( --cp-s40 ) ) calc( -1 * var( --cp-s60 ) ) -100vw;
	background: linear-gradient( 90deg, var( --ti-field ) 0%, var( --ti-field ) calc( 100% - 8rem ), transparent 100% );
	/* Its top edge fades over the 6rem above the copy, so a bright photo shows no hard step. */
	mask-image: linear-gradient( 180deg, transparent 0, var( --ti-field ) 6rem );
	pointer-events: none;
}

/* Colour: the artist's colour field, with the logo beside the name. */
.ti-profile .stage__visual {
	margin: 0;
}

.ti-profile .stage__visual--logo {
	justify-self: center;
	align-self: center;
	width: min( 26rem, 80% );
	aspect-ratio: 1;
	display: grid;
	place-items: center;
}

.ti-profile .stage__visual--logo .stage__visualImage {
	width: 78%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
}

/* Cover: the release art sharp, its server-blurred texture behind (an image, never a CSS filter). */
.ti-profile .stage__texture {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.ti-profile .stage__textureImage {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ti-profile .stage__texture::after {
	content: "";
	position: absolute;
	inset: 0;
	background: color-mix( in srgb, var( --ti-field ) 58%, transparent );
}

.ti-profile .stage__visual--cover {
	justify-self: center;
	align-self: center;
	width: min( 30rem, 86% );
}

.ti-profile .stage__visual--cover .stage__visualImage {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	/* A soft shadow of the canvas: a coloured glow here lit the caption under the cover to 4.4:1. */
	box-shadow: 0 2rem 4rem -1.5rem color-mix( in srgb, var( --ti-field ) 85%, transparent );
}

/*
 * The caption sits under the cover, over the texture and the stage light, so it carries its own
 * backing: 80 % of the canvas, whatever the texture (with the texture forced to white the bare
 * caption measured 3.07:1; on the backing, white reads about 11.6:1).
 */
.ti-profile .stage__release {
	display: inline-block;
	margin-top: 0.9rem;
	padding: 0.15rem 0.45rem;
	background: color-mix( in srgb, var( --ti-field ) 80%, transparent );
	font-size: var( --cp-fs-small );
	color: var( --stage-ink, var( --ti-strong ) );
}

.ti-profile .quick {
	display: grid;
	gap: 0.5rem;
}

.ti-profile .quick__row {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	min-height: 3.5rem;
	padding: 0.55rem 0.9rem;
	border: 1px solid color-mix( in srgb, var( --stage-ink, var( --ti-strong ) ) 34%, transparent );
	background: color-mix( in srgb, var( --stage, var( --ti-field ) ) 30%, transparent );
	text-decoration: none;
}

.ti-profile .quick__text {
	display: grid;
	min-width: 0;
}

.ti-profile .quick__row strong {
	font-weight: 600;
	line-height: 1.25;
}

.ti-profile .quick__row .small {
	font-size: var( --cp-fs-small );
	color: var( --stage-soft, var( --ti-quiet ) );
	line-height: 1.3;
}

.ti-profile .quick__row .end {
	margin-left: auto;
}

.ti-profile .quick__thumb {
	width: 2.4rem;
	height: 2.4rem;
	flex: none;
	aspect-ratio: 1;
	object-fit: cover;
}

.ti-profile .quick__date {
	display: grid;
	width: 2.4rem;
	flex: none;
	text-align: center;
	font-family: var( --cp-display );
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.ti-profile .quick__date b {
	font-size: 1.35rem;
	font-weight: 500;
}

.ti-profile .quick__date small {
	font-size: var( --cp-fs-label );
	color: var( --stage-soft, var( --ti-quiet ) );
}

.ti-profile .icon-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ti-profile .icon-links a {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border: 1px solid color-mix( in srgb, var( --stage-ink, var( --ti-strong ) ) 34%, transparent );
	color: var( --stage-ink, var( --ti-strong ) );
}

.ti-profile .icon-links .icon-links__more {
	width: auto;
	padding: 0 1rem;
	font-size: var( --cp-fs-small );
	font-weight: 600;
	text-decoration: none;
}

/* ---------- sections ---------- */

.ti-profile .section {
	padding-block: var( --cp-s70 ) 0;
}

.ti-profile .section__title {
	margin-bottom: var( --cp-s50 );
	font-size: var( --cp-fs-title );
}

.ti-profile .split {
	display: grid;
	grid-template-columns: 18rem minmax( 0, 1fr );
	gap: var( --cp-s60 );
}

.ti-profile .split .section__title {
	margin-bottom: 0;
}

.ti-profile .listen {
	display: grid;
	grid-template-columns: minmax( 0, 1.2fr ) minmax( 0, 1fr );
	gap: var( --cp-s50 );
	align-items: start;
}

.ti-profile .facade {
	display: grid;
	grid-template-columns: 9rem minmax( 0, 1fr );
	gap: var( --cp-s40 );
	align-items: center;
	padding: var( --cp-s40 );
	background: var( --ti-well );
	border: 1px solid var( --ti-line );
}

.ti-profile .facade__art {
	display: block;
	width: 9rem;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
}

.ti-profile .facade__art--stage {
	background: radial-gradient( 70% 70% at 60% 55%, color-mix( in srgb, var( --stage-glow ) var( --stage-glow-strength, 24% ), transparent ), transparent 70% ), var( --stage );
}

.ti-profile .facade__title {
	font-size: var( --cp-fs-large );
	line-height: 1.15;
}

.ti-profile .facade__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin: 0.3rem 0 1rem;
	font-size: var( --cp-fs-small );
	color: var( --ti-muted );
}

.ti-profile .facade__meta .mark {
	width: 1rem;
	height: 1rem;
}

.ti-profile .facade__note {
	margin-top: 0.75rem;
	font-size: var( --cp-fs-label );
	color: var( --ti-muted );
}

.ti-profile .facade__note a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var( --ti-strong );
}

.ti-profile .play {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var( --cp-edge );
	border-radius: 50%;
	background: transparent;
	color: var( --ti-strong );
	cursor: pointer;
}

.ti-profile .play .icon {
	width: 1rem;
	height: 1rem;
}

.ti-profile button.play .icon {
	fill: currentColor;
	stroke: none;
	margin-left: 2px;
}

.ti-profile .tracks {
	list-style: none;
	padding: 0;
	border-top: 1px solid var( --ti-line );
}

.ti-profile .tracks__item {
	display: grid;
	grid-template-columns: 2.75rem minmax( 0, 1fr ) auto;
	gap: var( --cp-s30 );
	align-items: center;
	min-height: 4rem;
	padding-block: 0.5rem;
	border-bottom: 1px solid var( --ti-line );
}

.ti-profile .tracks__text {
	display: grid;
	min-width: 0;
}

.ti-profile .tracks__title {
	font-weight: 600;
	line-height: 1.3;
}

.ti-profile .tracks__provider {
	display: inline-flex;
	gap: 0.4rem;
	align-items: center;
	color: var( --ti-muted );
	font-size: var( --cp-fs-small );
}

.ti-profile .tracks__provider .mark {
	width: 1rem;
	height: 1rem;
}

.ti-profile .tracks small {
	color: var( --ti-muted );
	font-size: var( --cp-fs-small );
}

/* The latest release is a row; the others line up under it, so no void beside a tall cover. */
.ti-profile .releases {
	display: grid;
	gap: var( --cp-s50 );
}

.ti-profile .release-lead {
	display: grid;
	grid-template-columns: minmax( 0, 26rem ) minmax( 0, 1fr );
	gap: var( --cp-s50 );
	align-items: end;
}

.ti-profile .release-lead__cover {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.ti-profile .release-lead__copy {
	display: grid;
	gap: 0.6rem;
}

.ti-profile .release-lead__title {
	font-size: var( --cp-fs-title );
}

.ti-profile .release-meta {
	color: var( --ti-muted );
	font-size: var( --cp-fs-small );
}

.ti-profile .stores {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ti-profile .release-list .stores {
	margin-top: 0.5rem;
}

.ti-profile .store {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 44px;
	padding: 0 0.9rem;
	border: 1px solid var( --cp-edge );
	font-size: var( --cp-fs-small );
	font-weight: 600;
	text-decoration: none;
}

.ti-profile .release-list {
	list-style: none;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 22rem, 1fr ) );
	gap: var( --cp-s40 );
	padding: var( --cp-s40 ) 0 0;
	border-top: 1px solid var( --ti-line );
}

.ti-profile .release-list__item {
	display: grid;
	grid-template-columns: 6rem minmax( 0, 1fr );
	gap: var( --cp-s30 );
	align-items: center;
}

.ti-profile .release-list__cover {
	display: block;
	width: 6rem;
	aspect-ratio: 1;
	object-fit: cover;
}

.ti-profile .release-list__cover--none {
	background: var( --ti-well );
}

.ti-profile .release-list__title {
	font-size: var( --cp-fs-large );
}

.ti-profile .dates {
	list-style: none;
	padding: 0;
	border-top: 1px solid var( --ti-line );
}

.ti-profile .dates__item {
	display: grid;
	grid-template-columns: 7.5rem minmax( 0, 1fr ) auto;
	gap: var( --cp-s40 );
	align-items: center;
	min-height: 5rem;
	padding-block: 0.75rem;
	border-bottom: 1px solid var( --ti-line );
}

.ti-profile .dates__when {
	display: grid;
	font-family: var( --cp-display );
	font-size: var( --cp-fs-large );
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.ti-profile .dates__when small {
	font-family: var( --cp-body );
	font-size: var( --cp-fs-small );
	color: var( --ti-muted );
}

.ti-profile h3.dates__venue {
	font-size: var( --cp-fs-large );
}

.ti-profile .dates__meta {
	color: var( --ti-muted );
	font-size: var( --cp-fs-small );
}

.ti-profile .dates--past .dates__item {
	min-height: 3.5rem;
	grid-template-columns: 7.5rem minmax( 0, 1fr );
}

.ti-profile h4.dates__venue {
	font: 600 var( --cp-fs-body ) / 1.3 var( --cp-body );
}

.ti-profile .subhead {
	margin: var( --cp-s50 ) 0 var( --cp-s30 );
	font: 600 var( --cp-fs-body ) / 1.3 var( --cp-body );
	letter-spacing: 0;
	color: var( --ti-quiet );
}

/* The Techno Inspire nights: the flare frame and the brand's seal, the brand speaking. */
.ti-profile .played {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	gap: var( --cp-s50 );
	align-items: start;
	padding: var( --cp-s50 );
	border: 1px solid var( --ti-flare );
}

.ti-profile .played .section__title {
	margin-bottom: var( --cp-s40 );
}

.ti-profile .played__list {
	list-style: none;
	display: grid;
	gap: var( --cp-s30 );
	padding: 0;
}

.ti-profile .played__link {
	display: grid;
	grid-template-columns: 6.5rem minmax( 0, 1fr ) auto;
	gap: var( --cp-s30 );
	align-items: center;
	min-height: 4.5rem;
	text-decoration: none;
}

.ti-profile .played__image {
	display: block;
	width: 6.5rem;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.ti-profile .played__image--none {
	background: var( --ti-well );
}

.ti-profile .played__title {
	font-size: var( --cp-fs-large );
}

.ti-profile .played__detail,
.ti-profile .played__note {
	display: block;
	color: var( --ti-muted );
	font-size: var( --cp-fs-small );
}

.ti-profile .played__note {
	margin-top: var( --cp-s40 );
}

.ti-profile .seal {
	display: grid;
	place-items: center;
	width: 7rem;
	height: 7rem;
	padding: 0.75rem;
	border: 1px solid var( --ti-flare );
	border-radius: 50%;
	text-align: center;
	font: 600 0.78rem / 1.2 var( --cp-body );
}

.ti-profile .seal__logo {
	width: 4.6rem;
	height: auto;
}

.ti-profile .links {
	list-style: none;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 17rem, 1fr ) );
	gap: 0.5rem;
	padding: 0;
}

.ti-profile .links__link {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	min-height: 3.5rem;
	padding: 0 1rem;
	border: 1px solid var( --cp-edge );
	font-weight: 600;
	text-decoration: none;
}

.ti-profile .links__account {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-width: 0;
	margin-left: auto;
	color: var( --ti-muted );
	font-weight: 400;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/*
 * The platform name keeps its words whole and the account gives way with an ellipsis: an e-mail
 * of booking used to squeeze "Booking" into "Booki / ng". The ellipsis needs its own box, since
 * text straight inside the flex account is an anonymous item that cannot be cut.
 */
.ti-profile .links__link .links__name {
	flex-shrink: 0;
	max-width: 70%;
}

.ti-profile .links__handle {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ti-profile .links__account .icon {
	flex: none;
	width: 1rem;
	height: 1rem;
}

.ti-profile .bio {
	max-width: 40rem;
	color: var( --ti-quiet );
	font-size: 1.0625rem;
}

.ti-profile .bio p + p {
	margin-top: 1rem;
}

/*
 * The press kit (D73): each preview in its own proportion (the grid aligns to the top, never
 * stretches), in the house photo tones like every photo of the artist; the download under it is
 * the original in colour, a 44 px target. Muted text on the field: 10.4:1. Nothing moves.
 */
.ti-profile .press__note {
	max-width: 40rem;
	margin-bottom: var( --cp-s40 );
	color: var( --ti-muted );
	font-size: var( --cp-fs-small );
}

.ti-profile .press__document {
	margin-bottom: var( --cp-s40 );
}

.ti-profile .press {
	list-style: none;
	display: grid;
	/* min(): with text at 200 % a 16rem column is wider than a 320 px screen. */
	grid-template-columns: repeat( auto-fill, minmax( min( 16rem, 100% ), 1fr ) );
	align-items: start;
	gap: var( --cp-s40 );
	padding: 0;
}

.ti-profile .press__item {
	display: grid;
	gap: 0.6rem;
	min-width: 0;
}

.ti-profile .press__figure {
	display: grid;
	gap: 0.5rem;
}

.ti-profile .press__image {
	width: 100%;
	height: auto;
	background: var( --ti-well );
	filter: var( --ti-portrait-filter, none );
}

.ti-profile .press__caption {
	display: grid;
	gap: 0.15rem;
	color: var( --ti-quiet );
	font-size: var( --cp-fs-small );
}

.ti-profile .press__credit {
	color: var( --ti-muted );
}

.ti-profile .press__download {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 0.55rem;
	row-gap: 0.1rem;
	min-height: 44px;
	padding: 0.45rem 0.9rem;
	border: 1px solid var( --cp-edge );
	font-size: var( --cp-fs-small );
	font-weight: 600;
	text-decoration: none;
}

.ti-profile .press__download:hover {
	border-color: var( --ti-strong );
}

.ti-profile .press__download .icon {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
}

.ti-profile .press__label {
	color: var( --ti-muted );
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

.ti-profile .profile-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: var( --cp-s40 );
	margin-top: var( --cp-s70 );
	padding-block: var( --cp-s50 );
	border-top: 1px solid var( --ti-line );
}

.ti-profile .community-sign {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-width: 0;
	font-size: var( --cp-fs-small );
	color: var( --ti-quiet );
}

/* A 40-letter name without a space still wraps here, at 320 px (reflow). */
.ti-profile .community-sign span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.ti-profile .profile-foot__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ti-profile .profile-foot__status {
	flex-basis: 100%;
	min-height: 1.5em;
	font-size: var( --cp-fs-small );
	color: var( --ti-quiet );
	text-align: right;
}

/* ---------- the player, after a click ---------- */

.player-bar {
	position: fixed;
	inset: auto 0 0;
	z-index: 100;
	display: grid;
	grid-template-columns: minmax( 0, 16rem ) minmax( 0, 1fr ) auto;
	gap: 1rem;
	align-items: center;
	padding: 0.6rem var( --wp--style--root--padding-left, 1.5rem );
	background: var( --ti-field );
	border-top: 1px solid color-mix( in srgb, var( --ti-strong ) 42%, var( --ti-field ) );
	color: var( --ti-strong );
	font-family: var( --wp--preset--font-family--body, sans-serif );
}

.player-bar__info {
	display: grid;
	min-width: 0;
}

.player-bar__info strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.player-bar__info small {
	color: var( --ti-muted );
	font-size: 0.8125rem;
}

.player__frame {
	display: block;
	width: 100%;
	border: 0;
}

.player__controls {
	display: flex;
	gap: 0.5rem;
}

.player__control {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid color-mix( in srgb, var( --ti-strong ) 42%, var( --ti-field ) );
	background: transparent;
	color: var( --ti-strong );
	cursor: pointer;
}

.player-inline {
	grid-column: 1 / -1;
	display: grid;
	gap: 0.5rem;
	justify-items: end;
	width: 100%;
}

.player-inline__frame {
	width: 100%;
}

.player-inline .player__frame {
	aspect-ratio: 16 / 9;
	height: auto;
}

@media ( prefers-reduced-motion: no-preference ) {
	.player-bar {
		animation: ti-community-bar-rises 240ms cubic-bezier( 0.16, 1, 0.3, 1 );
	}
}

@keyframes ti-community-bar-rises {
	from {
		transform: translateY( 100% );
	}

	to {
		transform: none;
	}
}

/* ---------- narrower ---------- */

@media ( max-width: 64rem ) {
	.ti-profile .split,
	.ti-profile .listen,
	.ti-profile .release-lead {
		grid-template-columns: minmax( 0, 1fr );
		gap: var( --cp-s40 );
	}

	.ti-profile .release-list {
		grid-template-columns: minmax( 0, 1fr );
	}

	.ti-profile .section {
		padding-block-start: var( --cp-s60 );
	}

	.player-bar {
		grid-template-columns: minmax( 0, 1fr ) auto;
	}

	.player-bar__frame {
		grid-column: 1 / -1;
		grid-row: 2;
	}
}

/* The phone: the first screen is the link in the bio. */
@media ( max-width: 40rem ) {
	.ti-profile .stage__frame {
		grid-template-columns: minmax( 0, 1fr );
		align-content: end;
		min-height: calc( 100svh - 3.75rem );
		padding-block: var( --cp-s60 ) var( --cp-s30 );
		gap: var( --cp-s40 );
	}

	.ti-profile .stage__copy {
		gap: 0.85rem;
	}

	.ti-profile .stage__short,
	.ti-profile .stage__genres {
		display: none;
	}

	.ti-profile .stage__facts {
		font-size: var( --cp-fs-small );
	}

	.ti-profile .stage__actions .btn {
		flex: 1 1 auto;
		min-height: 3rem;
	}

	.ti-profile .quick__row {
		min-height: 3.25rem;
		padding-block: 0.4rem;
	}

	.ti-profile .icon-links a {
		width: 44px;
		height: 44px;
	}

	.ti-profile .icon-links .icon-links__more {
		padding: 0 0.75rem;
	}

	.ti-profile .stage--photo .stage__media {
		inset: 0;
	}

	.ti-profile .stage--photo .stage__media::after {
		background: none;
	}

	/*
	 * The phone's backdrop rises from the bottom, under every line of the copy. It holds 72 % up to
	 * 2.5rem above the copy, because the name's ascenders rise above its line box (line-height
	 * .92): measured 5.66:1 on the top of the name with the fade starting at the box itself.
	 */
	.ti-profile .stage--photo .stage__copy::before {
		inset: -6rem -100vw calc( -1 * var( --cp-s60 ) ) -100vw;
		background: linear-gradient( 0deg, color-mix( in srgb, var( --ti-field ) 92%, transparent ) 0%, color-mix( in srgb, var( --ti-field ) 72%, transparent ) calc( 100% - 3.5rem ), transparent 100% );
		mask-image: none;
	}

	/* The visual sits right above the name, never a void between them. */
	.ti-profile .stage__visual--logo,
	.ti-profile .stage__visual--cover {
		order: -1;
		width: 62%;
		justify-self: start;
	}

	.ti-profile .section__title {
		font-size: 2rem;
	}

	.ti-profile .facade {
		grid-template-columns: 5.5rem minmax( 0, 1fr );
		padding: var( --cp-s30 );
		gap: var( --cp-s30 );
	}

	.ti-profile .facade__art {
		width: 5.5rem;
	}

	.ti-profile .dates__item {
		grid-template-columns: 5.25rem minmax( 0, 1fr );
	}

	.ti-profile .dates__item .btn {
		grid-column: 2;
		justify-self: start;
	}

	.ti-profile .played {
		grid-template-columns: minmax( 0, 1fr );
		padding: var( --cp-s40 );
	}

	.ti-profile .played__link {
		grid-template-columns: 5rem minmax( 0, 1fr );
	}

	.ti-profile .played__image {
		width: 5rem;
	}

	.ti-profile .played__arrow {
		display: none;
	}

	.ti-profile .profile-foot__status {
		text-align: left;
	}
}

/*
 * Text at 200 % (WCAG 1.4.4) and narrow columns. A column narrower than 20 root ems only happens
 * when the text is enlarged (the phone column is 342 px at 16 px, wider than 20rem), so these rows
 * stack only then and the drawn layouts stay as designed. Measured: at 390 px and 200 % the rows
 * of the stage, "Listen", the agenda and the links used to pass the viewport by up to 250 px.
 */
.ti-profile .section,
.ti-profile .profile-foot {
	container-type: inline-size;
}

.ti-profile .links {
	grid-template-columns: repeat( auto-fill, minmax( min( 17rem, 100% ), 1fr ) );
}

.ti-profile .quick__row,
.ti-profile .links__link {
	min-width: 0;
}

.ti-profile .quick__text,
.ti-profile .links__name,
.ti-profile .tracks__title,
.ti-profile .dates__copy {
	min-width: 0;
	overflow-wrap: anywhere;
}

@container ( max-width: 20rem ) {
	.ti-profile .quick__row {
		flex-wrap: wrap;
	}

	.ti-profile .facade,
	.ti-profile .dates__item,
	.ti-profile .dates--past .dates__item,
	.ti-profile .release-list__item,
	.ti-profile .played__link,
	.ti-profile .release-lead {
		grid-template-columns: minmax( 0, 1fr );
	}

	.ti-profile .dates__item .btn {
		grid-column: auto;
	}

	.ti-profile .tracks__item {
		grid-template-columns: 2.75rem minmax( 0, 1fr );
	}

	.ti-profile .links__link {
		flex-wrap: wrap;
		padding-block: 0.5rem;
	}

	.ti-profile .links__account {
		margin-left: 0;
		white-space: normal;
	}

	.ti-profile .btn {
		max-width: 100%;
		white-space: normal;
		text-align: center;
	}
}

/* Below 30rem a cover or logo takes the column's width, centred, up to 20rem (design §5.3). */
@media ( max-width: 30rem ) {
	.ti-profile .stage__visual--logo,
	.ti-profile .stage__visual--cover {
		width: min( 100%, 20rem );
		justify-self: center;
	}
}
