/*
 * The artist directory, `/artists/` (design §5.4, mocks/directory.html), and the example stages of
 * the invitation (design §5.1). On top of the profile's stylesheet: the same field contract, the same
 * container, buttons and facts line, so a community row and a team row look the same everywhere.
 *
 * An editorial composition, not a grid of equal cards: a wide stage for today's artist, a
 * typographic row of dates, a mosaic of four sizes, and an index set as type in three columns.
 *
 * No colour literal: the field contract (--ti-*) and the stage variables the server prints per
 * card (--stage-*, --c, --c-ink for the initial on the artist's colour, chosen by best_ink()).
 *
 * Measured on #080808: strong 19.8:1, quiet 14.1:1, muted 10.4:1; flare as text 6.18:1 (the "Techno
 * Inspire party" marker and the index letters); the field on flare 6.18:1 (the flare buttons);
 * control edge about 4.05:1 (≥ 3:1). Text over a photo sits on ≥ 72 % of the canvas (design §4.4).
 *
 * One motion moment: today's name settles 0.12em from where it already is, as on a profile, only with
 * prefers-reduced-motion: no-preference. Nothing starts hidden.
 */

.ti-directory {
	--cp-fs-title: 2.35rem;
	padding-bottom: var( --cp-s70 );
}

.ti-directory :where( ul, ol ) {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ti-directory .btn--flare {
	background: var( --ti-flare );
	color: var( --ti-field );
}

.ti-directory .btn--flare:hover {
	background: var( --ti-strong );
}

/* ---------- head ---------- */

.ti-directory .dir-head {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	gap: var( --cp-s40 );
	align-items: end;
	margin-block: 0;
	padding-block: var( --cp-s60 ) var( --cp-s40 );
}

.ti-directory .dir-head__copy > * {
	margin-block: 0;
}

.ti-directory .dir-head__title {
	font-size: clamp( 3.4rem, 6vw, 4.8rem );
	letter-spacing: -0.035em;
	line-height: 0.95;
}

.ti-directory .dir-head__lede {
	max-width: 36rem;
	margin-top: var( --cp-s30 );
	color: var( --ti-quiet );
	font-size: var( --cp-fs-large );
	line-height: 1.45;
}

/* ---------- bands ---------- */

.ti-directory .dir-band {
	margin-block: 0;
	padding-top: var( --cp-s70 );
}

.ti-directory .rail-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: end;
	gap: var( --cp-s20 ) var( --cp-s30 );
	margin-bottom: var( --cp-s40 );
}

.ti-directory .rail-head__title {
	font-size: var( --cp-fs-title );
}

.ti-directory .rail-head__link,
.ti-directory .dir-index__clear {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: var( --cp-fs-small );
	font-weight: 600;
}

/* ---------- featured today: a wide stage ---------- */

.ti-directory .featured {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1.3fr );
	min-height: 34rem;
	background: color-mix( in srgb, var( --ti-flare ) 5%, var( --ti-field ) );
	/* The stage's own inks (resolve_palette() on the canvas), opaque and measured, as on a profile. */
	color: var( --stage-ink, var( --ti-strong ) );
}

.ti-directory .featured__glow {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient( 55% 80% at 30% 60%, color-mix( in srgb, var( --ti-flare ) 22%, transparent ), transparent 70% );
}

.ti-directory .featured__copy {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	align-content: end;
	gap: var( --cp-s30 );
	padding: var( --cp-s60 );
	container-type: inline-size;
}

.ti-directory .featured__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-directory .featured__name--xxl {
	--name-max: clamp( 3.25rem, 9vw, 6rem );
}

.ti-directory .featured__name--xl {
	--name-max: clamp( 2.6rem, 7vw, 4.8rem );
}

.ti-directory .featured__name--l {
	--name-max: clamp( 2rem, 6vw, 3.2rem );
}

.ti-directory .featured__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-directory .featured__name {
		animation: ti-community-name-settles 700ms cubic-bezier( 0.16, 1, 0.3, 1 );
	}
}

.ti-directory .featured__why {
	max-width: 30rem;
	color: var( --stage-soft, var( --ti-quiet ) );
	font-size: var( --cp-fs-body );
}

.ti-directory .featured .stage__facts {
	color: var( --stage-soft, var( --ti-quiet ) );
}

.ti-directory .featured .stage__genres {
	margin-top: -0.7rem;
	color: var( --stage-soft, var( --ti-quiet ) );
}

.ti-directory .featured__media {
	position: relative;
	min-height: 100%;
}

.ti-directory .featured__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var( --focus, 50% 30% );
}

.ti-directory .featured__media--logo {
	background: var( --c );
}

.ti-directory .featured__media--logo .featured__image,
.ti-directory .featured__media--cover .featured__image {
	inset: 14%;
	width: 72%;
	height: 72%;
	object-fit: contain;
}

/* ---------- playing this week: a typographic row ---------- */

.ti-directory .week {
	display: grid;
	grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	border-top: 1px solid var( --ti-line );
}

.ti-directory .week__item {
	padding: var( --cp-s40 ) var( --cp-s40 ) var( --cp-s40 ) 0;
	border-bottom: 1px solid var( --ti-line );
}

.ti-directory .week__item:not( :nth-child( 4n + 1 ) ) {
	padding-left: var( --cp-s40 );
	border-left: 1px solid var( --ti-line );
}

/* The date is one plain line, no caps and no colour; the artist right under it. */
.ti-directory .week__date {
	display: block;
	color: var( --ti-quiet );
	font: 400 var( --cp-fs-large ) / 1.2 var( --cp-display );
}

.ti-directory .week__name {
	font-size: var( --cp-fs-large );
	overflow-wrap: anywhere;
}

/* The name is the cell's link: 44 px tall, the line itself centred in it. */
.ti-directory .week__name a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

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

/* The one flare of the row, inside the venue line, so every cell keeps the same three lines. */
.ti-directory .week__party {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var( --ti-flare );
	font-size: var( --cp-fs-label );
	font-weight: 600;
	white-space: nowrap;
}

.ti-directory .week__party .icon {
	width: 1rem;
	height: 1rem;
}

/* ---------- just arrived: a mosaic of four sizes ---------- */

.ti-directory .newcomers {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	grid-template-rows: repeat( 2, 17rem );
	gap: var( --cp-s30 );
}

.ti-directory .newcomers--4 > :nth-child( 1 ),
.ti-directory .newcomers--3 > :nth-child( 1 ) {
	grid-row: span 2;
}

.ti-directory .newcomers--4 > :nth-child( 4 ) {
	grid-column: span 2;
}

.ti-directory .newcomers--3 {
	grid-template-columns: 1.4fr 1fr;
}

.ti-directory .newcomers--2 {
	grid-template-columns: 1.4fr 1fr;
	grid-template-rows: 26rem;
}

.ti-directory .newcomers--1 {
	grid-template-columns: minmax( 0, 1fr );
	grid-template-rows: 26rem;
}

.ti-directory .newcomer {
	position: relative;
	overflow: hidden;
	background: var( --ti-well );
	container-type: inline-size;
}

.ti-directory .newcomer--logo {
	background: var( --c );
}

.ti-directory .newcomer__link {
	position: absolute;
	inset: 0;
	display: block;
	color: var( --ti-strong );
	text-decoration: none;
}

.ti-directory .newcomer__link:focus-visible {
	outline: 2px solid var( --ti-strong );
	outline-offset: -4px;
}

.ti-directory .newcomer__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var( --focus, 50% 40% );
}

/* Logo card: the logo sits above the label, whose height is reserved, never under the name. */
.ti-directory .newcomer__logo {
	position: absolute;
	inset: 0 0 5.25rem 0;
	display: grid;
	/* One track the height of the space: an auto track grew to the image's own 400 px and put the
	   logo under the label (measured: 331 px below the top of a 188 px space). */
	grid-template: minmax( 0, 1fr ) / minmax( 0, 1fr );
	place-items: center;
}

.ti-directory .newcomer__logoImage {
	width: auto;
	height: min( 62%, 9rem );
	aspect-ratio: 1;
	object-fit: contain;
}

.ti-directory .newcomer__label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	gap: 0.2rem;
	padding: 0.75rem var( --cp-s30 ) var( --cp-s30 );
	background: color-mix( in srgb, var( --ti-field ) 84%, transparent );
}

.ti-directory .newcomer__label::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 3rem;
	background: linear-gradient( 0deg, color-mix( in srgb, var( --ti-field ) 84%, transparent ), transparent );
	pointer-events: none;
}

/* NameFit, as on the stage: the longest word never passes the card. --name-em is measured with the
   display tracking (band s with -0.02em), so the name is set with the same tracking; at 0 the word
   ran 7 % wider than measured and "Thunderdrumsoundsystem" broke before its last letter at 390. */
.ti-directory .newcomer__name {
	font: 400 var( --cp-fs-large ) / 1.1 var( --cp-display );
	font-size: clamp( 1rem, calc( ( 100cqi - 2 * var( --cp-s30 ) ) / var( --name-em, 6 ) ), var( --cp-fs-large ) );
	letter-spacing: -0.035em;
	overflow-wrap: anywhere;
}

.ti-directory .newcomers > :nth-child( 1 ) .newcomer__name {
	font-size: clamp( 1rem, calc( ( 100cqi - 2 * var( --cp-s30 ) ) / var( --name-em, 6 ) ), var( --cp-fs-title ) );
}

.ti-directory .newcomer__name--s {
	letter-spacing: -0.02em;
}

.ti-directory .newcomer__facts {
	color: var( --ti-quiet );
	font-size: var( --cp-fs-small );
}

.ti-directory .newcomer__link:hover .newcomer__name {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* ---------- all artists ---------- */

.ti-directory .dir-index__count {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 var( --cp-s30 );
	color: var( --ti-muted );
	font-size: var( --cp-fs-small );
}

.ti-directory .filters {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 0.5rem;
	padding: var( --cp-s40 ) 0;
	border-block: 1px solid var( --ti-line );
}

.ti-directory .filters__field {
	display: grid;
	gap: 0.35rem;
	min-width: 12rem;
}

.ti-directory .filters__field--search {
	flex: 1 1 18rem;
}

.ti-directory .filters label {
	font-size: var( --cp-fs-small );
	font-weight: 600;
}

.ti-directory .filters input,
.ti-directory .filters select {
	width: 100%;
	min-height: 3rem;
	padding: 0 0.9rem;
	border: 1px solid var( --cp-edge );
	border-radius: 0;
	background: var( --ti-field );
	color: var( --ti-strong );
	font: inherit;
	color-scheme: dark;
}

.ti-directory .filters input:focus-visible,
.ti-directory .filters select:focus-visible {
	outline: 2px solid var( --ti-strong );
	outline-offset: 2px;
}

.ti-directory .filters__submit {
	min-height: 3rem;
}

.ti-directory .genres {
	padding-block: var( --cp-s30 );
}

.ti-directory .genres__list {
	display: flex;
	gap: 0.4rem;
	overflow-x: auto;
	padding-bottom: 0.25rem;
	scrollbar-color: var( --cp-edge ) transparent;
}

.ti-directory .chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.9rem;
	border: 1px solid var( --cp-edge );
	color: var( --ti-strong );
	font-size: var( --cp-fs-small );
	text-decoration: none;
	white-space: nowrap;
}

.ti-directory .chip:hover {
	border-color: var( --ti-strong );
}

.ti-directory .chip[aria-current] {
	border-color: var( --ti-strong );
	background: var( --ti-strong );
	color: var( --ti-field );
	font-weight: 600;
}

/*
 * The index: three columns of type. The breathing room between letters lives under each group,
 * never above the letter: a top margin is kept in the first column and cut at the top of the
 * others. The space above the index is the container's own padding, the same in every column.
 */
.ti-directory .index {
	columns: 3 18rem;
	column-gap: var( --cp-s50 );
	padding-top: var( --cp-s40 );
}

.ti-directory .index__group {
	break-inside: avoid;
	padding-block-end: var( --cp-s40 );
}

.ti-directory .index__letter {
	margin: 0 0 var( --cp-s20 );
	color: var( --ti-flare );
	font: 400 var( --cp-fs-title ) / 1 var( --cp-display );
	break-after: avoid;
}

.ti-directory .index--arrivals .index__entry {
	break-inside: avoid;
}

.ti-directory .index__link {
	display: grid;
	grid-template-columns: 2.75rem minmax( 0, 1fr );
	gap: 0.85rem;
	align-items: center;
	min-height: 3.75rem;
	padding-block: 0.4rem;
	border-bottom: 1px solid var( --ti-line );
	color: var( --ti-strong );
	text-decoration: none;
}

.ti-directory .index__thumb {
	width: 2.75rem;
	height: 2.75rem;
	aspect-ratio: 1;
	object-fit: cover;
}
/*
 * Each card shows the variant of its own place, cut by the frame the artist chose for it (D77):
 * "Featured today" its 5:4 place on a computer (the card's 4:5 below 64rem, DirectoryPage::
 * FEATURED_SOURCES), "Just arrived" and the index their square place. A box wider than its place
 * keeps the photo on its right at the place's shape, on the card's own ground, so nothing the
 * artist framed is cut; a box of another shape crops a little at the profile's focus, which for a
 * framed portrait is centred across with its top kept (PlacementFraming::BOX_FOCUS).
 */
@supports ( width: 1cqw ) {
	.ti-directory .featured__media--photo {
		container: featured-photo / size;
	}
	@container featured-photo ( aspect-ratio > 5 / 4 ) {
		.ti-directory .featured__media--photo .featured__image {
			inset: 0 0 0 auto;
			width: calc( 100cqh * 5 / 4 );
			mask-image: linear-gradient( to right, transparent, #000 4rem );
		}
	}
	/*
	 * The label never covers the face: it covered the lower part of every tile 192 to 272 px tall
	 * (technoinspire.com.br, 09/11/2026) and 37 % of a 163 × 208 phone tile, the chin of a close-up.
	 * A tile up to 1.3:1 stacks the photo above the name, on the tile's ground; the photo box is then
	 * wider than its square and keeps the top (the profile's focus). A wider tile puts the photo on the
	 * right, at most half the tile, and the name beside it. The label is its own inline-size container,
	 * so NameFit measures the name against its column.
	 */
	.ti-directory .newcomer--photo .newcomer__link {
		container: newcomer-tile / size;
		display: flex;
		flex-direction: column;
	}
	.ti-directory .newcomer--photo .newcomer__image {
		position: static;
		flex: 1 1 0;
		min-height: 0;
		height: auto;
	}
	.ti-directory .newcomer--photo .newcomer__label {
		position: relative;
		background: none;
		container-type: inline-size;
	}
	.ti-directory .newcomer--photo .newcomer__label::before {
		content: none;
	}
	@container newcomer-tile ( aspect-ratio > 1.3 ) {
		.ti-directory .newcomer--photo .newcomer__image {
			position: absolute;
			inset: 0 0 0 auto;
			width: min( 50cqw, 100cqh );
			height: 100%;
			mask-image: linear-gradient( to right, transparent, #000 2rem );
		}
		.ti-directory .newcomer--photo .newcomer__label {
			position: absolute;
			top: 0;
			bottom: 0;
			left: 0;
			right: min( 50cqw, 100cqh );
			align-content: end;
		}
	}
}

.ti-directory .index__thumb--logo {
	padding: 0.3rem;
	object-fit: contain;
	background: var( --ti-well );
}

.ti-directory .index__thumb--initial {
	display: grid;
	place-items: center;
	/* The edge keeps the tile visible when the artist's colour is the canvas itself. */
	box-shadow: inset 0 0 0 1px var( --ti-line );
	background: var( --c );
	color: var( --c-ink );
	font: 400 1.1rem / 1 var( --cp-display );
}

.ti-directory .index__text {
	display: grid;
	min-width: 0;
	container-type: inline-size;
}

/* A 40-character name without a space broke inside the word in a 244 px column; NameFit shrinks it
   to the column, down to 0.875rem, and only a longer word than that still wraps. */
.ti-directory .index__name {
	font: 400 1.2rem / 1.15 var( --cp-display );
	font-size: clamp( 0.875rem, calc( 100cqi / var( --name-em, 1 ) ), 1.2rem );
	letter-spacing: -0.035em;
	overflow-wrap: anywhere;
}

.ti-directory .index__name--s {
	letter-spacing: -0.02em;
}

.ti-directory .index__link:hover .index__name {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

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

.ti-directory .dir-index__empty {
	display: grid;
	justify-items: start;
	gap: var( --cp-s30 );
	padding-block: var( --cp-s50 );
}

.ti-directory .dir-index__emptyText {
	font: 400 var( --cp-fs-large ) / 1.3 var( --cp-display );
}

/* ---------- pages ---------- */

.ti-directory .pager {
	padding-block: var( --cp-s50 );
	font-size: var( --cp-fs-small );
}

.ti-directory .pager__full,
.ti-directory .pager__compact {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.ti-directory .pager__compact {
	display: none;
	justify-content: space-between;
}

.ti-directory .pager a,
.ti-directory .pager span {
	display: inline-grid;
	grid-auto-flow: column;
	place-items: center;
	gap: 0.4rem;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.8rem;
	border: 1px solid var( --cp-edge );
	color: var( --ti-strong );
	text-decoration: none;
	white-space: nowrap;
}

.ti-directory .pager .icon {
	width: 1rem;
	height: 1rem;
}

.ti-directory .pager [aria-current] {
	border-color: var( --ti-strong );
	background: var( --ti-strong );
	color: var( --ti-field );
	font-weight: 600;
}

.ti-directory .pager .pager__where,
.ti-directory .pager .pager__gap {
	border: 0;
	color: var( --ti-quiet );
}

.ti-directory .pager .pager__off {
	border-color: var( --ti-line );
	color: var( --ti-muted );
}

.ti-directory .pager a:hover {
	border-color: var( --ti-strong );
}

/* ---------- the invitation ---------- */

.ti-directory .invite-band {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	align-items: center;
	gap: var( --cp-s40 );
	margin-top: var( --cp-s70 );
	padding: var( --cp-s50 );
	border: 1px solid var( --ti-flare );
}

.ti-directory .invite-band__title {
	font-size: var( --cp-fs-title );
}

.ti-directory .invite-band__text {
	margin-top: 0.5rem;
	color: var( --ti-quiet );
}

/* ---------- narrow screens ---------- */

@media ( max-width: 64rem ) {
	.ti-directory .dir-head {
		grid-template-columns: minmax( 0, 1fr );
	}

	.ti-directory .dir-head__action {
		justify-self: stretch;
	}

	/* The visual is the card (4:5, by the focus point); the copy sits on its lower part over its
	   own backdrop: ≥ 72 % of the canvas under every line, as on the profile's stage. */
	.ti-directory .featured {
		grid-template-columns: minmax( 0, 1fr );
		min-height: 0;
	}

	.ti-directory .featured__media {
		grid-area: 1 / 1;
		aspect-ratio: 4 / 5;
		min-height: 0;
	}

	.ti-directory .featured__copy {
		grid-area: 1 / 1;
		align-self: end;
		padding: var( --cp-s40 );
		isolation: isolate;
	}

	.ti-directory .featured__copy::before {
		content: "";
		position: absolute;
		z-index: -1;
		inset: -5rem 0 0 0;
		background: linear-gradient( 0deg, color-mix( in srgb, var( --ti-field ) 92%, transparent ) 0%, color-mix( in srgb, var( --ti-field ) 74%, transparent ) calc( 100% - 5rem ), transparent 100% );
	}

	.ti-directory .featured__media--logo .featured__image,
	.ti-directory .featured__media--cover .featured__image {
		inset: 10% 14% auto;
		height: 52%;
	}

	.ti-directory .week {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 78%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-color: var( --cp-edge ) transparent;
	}

	.ti-directory .week__item {
		scroll-snap-align: start;
	}

	.ti-directory .week__item:not( :nth-child( 4n + 1 ) ),
	.ti-directory .week__item + .week__item {
		padding-left: var( --cp-s40 );
		border-left: 1px solid var( --ti-line );
	}

	.ti-directory .newcomers,
	.ti-directory .newcomers--3,
	.ti-directory .newcomers--2 {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 26rem 13rem 12rem;
	}

	.ti-directory .newcomers--2 {
		grid-template-rows: 26rem 13rem;
	}

	.ti-directory .newcomers--1 {
		grid-template-rows: 26rem;
	}

	.ti-directory .newcomers > :nth-child( 1 ) {
		grid-column: span 2;
		grid-row: auto;
	}

	.ti-directory .newcomers--4 > :nth-child( 4 ) {
		grid-column: span 2;
	}

	.ti-directory .newcomers--2 > :nth-child( 2 ) {
		grid-column: span 2;
	}

	/* Small cards wrap the name to two lines: the label's height is reserved for that. */
	.ti-directory .newcomer__logo {
		inset: 0 0 6.75rem 0;
	}

	.ti-directory .newcomer__logoImage {
		height: min( 70%, 6rem );
	}

	.ti-directory .filters__field {
		flex: 1 1 45%;
		min-width: 0;
	}

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

@media ( max-width: 30rem ) {
	.ti-directory .pager__full {
		display: none;
	}

	.ti-directory .pager__compact {
		display: flex;
	}

	.ti-directory .rail-head__title {
		font-size: 2rem;
	}
}

/* ---------- the example stages (join and closed screen, design §5.1) ---------- */

.ti-examples {
	padding-bottom: 0;
	background: none;
}

/* Side by side and staggered, never overlapping: every line of every card stays whole. */
.ti-examples .examples {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: var( --cp-s30 );
	align-items: start;
}

.ti-examples .example:nth-child( 1 ) {
	margin-top: 3rem;
}

.ti-examples .example:nth-child( 3 ) {
	margin-top: 5rem;
}

.ti-examples .example {
	border: 1px solid var( --ti-line );
}

.ti-examples .example__bar {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.55rem 0.75rem;
	border-bottom: 1px solid var( --ti-line );
	background: var( --ti-field );
	color: var( --ti-quiet );
	font-size: var( --cp-fs-label );
}

.ti-examples .example__address {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ti-examples .example__mark {
	white-space: nowrap;
}

.ti-examples .example__frame {
	position: relative;
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	align-content: end;
	gap: 0.7rem;
	min-height: 25rem;
	padding: 1rem 0.8rem;
	container-type: inline-size;
}

.ti-examples .example__visual {
	align-self: start;
}

.ti-examples .example__image {
	display: block;
	width: 100%;
	height: auto;
}

/* Photo: the picture fills the top of the card and fades into the canvas under the name. */
.ti-examples .example__visual--photo {
	position: absolute;
	inset: 0 0 auto;
	height: 64%;
	overflow: hidden;
}

.ti-examples .example__visual--photo .example__image {
	height: 100%;
	object-fit: cover;
	object-position: var( --focus, 50% 40% );
}

.ti-examples .example__visual--photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( 0deg, var( --stage ) 0%, transparent 45% );
}

.ti-examples .example--photo .example__frame > :not( .example__visual ) {
	position: relative;
	z-index: 1;
}

.ti-examples .example__visual--colour {
	width: 42%;
	max-width: 5.5rem;
	margin-bottom: auto;
}

.ti-examples .example__visual--cover {
	width: 62%;
	margin-bottom: auto;
}

.ti-examples .example--colour .example__frame,
.ti-examples .example--cover .example__frame {
	align-content: space-between;
}

.ti-examples .stage__name {
	animation: none;
	font-size: clamp( 1.35rem, calc( 100cqi / var( --name-em, 6 ) ), var( --name-max ) );
}

.ti-examples .stage__name--xxl {
	--name-max: 2.15rem;
}

.ti-examples .stage__name--xl,
.ti-examples .stage__name--l {
	--name-max: 1.9rem;
}

.ti-examples .stage__facts,
.ti-examples .example__release {
	color: var( --stage-soft );
	font-size: var( --cp-fs-label );
}

.ti-examples .example__actions {
	display: grid;
	gap: 0.5rem;
}

.ti-examples .btn {
	width: 100%;
	min-height: 2.5rem;
	padding: 0 0.75rem;
	font-size: var( --cp-fs-label );
	cursor: default;
}

@media ( max-width: 40rem ) {
	.ti-examples .examples {
		grid-template-columns: minmax( 0, 18rem );
		justify-content: center;
	}

	/* Only the middle stage on a phone, so the group never turns into a collage. */
	.ti-examples .example:nth-child( 1 ),
	.ti-examples .example:nth-child( 3 ) {
		display: none;
	}
}

/*
 * Artist photographs, never logos or release covers, go through the portrait filter in use
 * (ti-artists → Portrait filter, the brand duotone since 15/10/2026), so the roster reads as one.
 * The value comes from the page root; without ti-artists it is absent and the photo shows as sent.
 */
.ti-directory .featured__media--photo .featured__image,
.ti-directory .newcomer--photo .newcomer__image,
.ti-directory .index__thumb--photo {
	filter: var( --ti-portrait-filter, none );
}
