/*
 * A finished event's results page (RecapSite.astro). Everything else comes from live.css as it is:
 * this file adds the hero, the night's timeline, the stage layout, the group folds and the
 * technology section.
 */

/* The jump targets land clear of the sticky bar. */
.rc-page [id] {
	scroll-margin-block-start: calc(64px + var(--ld-s4));
}

/* The hero: the event name in the sea, its results, the facts, what it was, the way down. */
.rc-hero {
	display: grid;
	gap: var(--ld-s4);
	margin: var(--ld-s7) 0 var(--ld-s4);
}
.rc-title {
	margin: 0;
	font: 600 clamp(40px, 4.6vw, 72px) / 0.96 var(--font-display);
	letter-spacing: var(--ld-track-display);
	text-transform: uppercase;
	color: var(--ld-fg);
}
.rc-hero-results {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ld-s2) var(--ld-s6);
	margin: 0;
	padding: 0;
	list-style: none;
	font: 600 var(--ld-t-name) / 1.3 var(--font-body);
	color: var(--ld-fg);
}
.rc-hero-score,
.rc-hero-prize {
	margin-inline-start: var(--ld-s3);
	white-space: nowrap;
}
.rc-hero-prize {
	color: var(--ld-prize);
}
@media (max-width: 699px) {
	.rc-hero-results {
		flex-direction: column;
		gap: var(--ld-s2);
	}
	/* A wrapped result keeps its second line flush with the names: the gap carries the 12px. */
	.rc-hero-results li {
		display: flex;
		flex-wrap: wrap;
		gap: 0 var(--ld-s3);
	}
	.rc-hero-score,
	.rc-hero-prize {
		margin-inline-start: 0;
	}
}
.rc-hero-hint {
	justify-self: start;
}
.rc-lead,
.rc-format,
.rc-tech-lead {
	max-inline-size: 60ch;
	margin: 0;
	font: 400 var(--ld-t-body) / 1.45 var(--font-body);
	color: var(--ld-muted);
}
.rc-facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ld-s1) var(--ld-s3);
	margin: 0;
	padding: 0;
	list-style: none;
	font: 600 var(--ld-t-meta) / 1.3 var(--font-body);
	color: var(--ld-fg);
}
.rc-facts li:not(:last-child)::after {
	content: '·';
	margin-inline-start: var(--ld-s3);
	color: var(--ld-dim);
}
.rc-fact-link {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--ld-hair-strong);
	text-underline-offset: 3px;
}
.rc-fact-link:hover {
	text-decoration-color: currentColor;
}
.rc-fact-link:focus-visible {
	outline: 2px solid var(--ld-fg);
	outline-offset: 3px;
}

/* The bar: the wordmark left, the rest right (the live page's phase line used to push them). */
.rc-bar .ld-trust {
	margin-inline-start: auto;
}
@media (min-width: 1024px) {
	.rc-bar .ld-wordmark {
		block-size: 44px;
	}
}

/*
 * The champions: two equal columns in one row from 1024 — the same text-then-image order in
 * both (the mirroring is gone), equal names and larger photos. Under 1024 the row stacks, one
 * champion under the other.
 */
.rc-page .ld-hero-row {
	margin-top: var(--ld-s6);
}
.rc-page .ld-ceremony {
	gap: var(--ld-s6);
	padding-block-start: 0;
}
.rc-page .ld-champ.is-main {
	gap: var(--ld-s5) var(--ld-s6);
}
.rc-page .ld-champ.is-main .ld-champ-prize {
	font-size: var(--ld-t-title);
}
.rc-page .ld-champ.is-main .ld-still-mono {
	font-size: var(--ld-t-title);
}
.rc-page .ld-champ-x {
	font-size: clamp(64px, 8vw, 110px);
}
@media (max-width: 699px) {
	.rc-page .ld-champ.is-main {
		grid-template-columns: 112px minmax(0, 1fr);
		gap: var(--ld-s4);
	}
	.rc-page .ld-champ.is-main .ld-champ-photo .ld-still {
		aspect-ratio: 3 / 4;
		max-block-size: none;
	}
}
@media (min-width: 1024px) {
	.rc-page .ld-ceremony {
		grid-template-columns: 1fr 1fr;
		align-items: start;
		gap: var(--ld-s6);
	}
	/* One order in both columns: the words, then the picture. Equal columns of equal inner
	   columns (the text keeps a 200 px floor at 1024; the photo grows to 320 px at 1440): the
	   names measure the same width and set the same size. */
	.rc-page .ld-champ,
	.rc-page .ld-champ.is-main {
		grid-template-columns: minmax(200px, 1fr) minmax(120px, 320px);
		border: 0;
		padding: 0;
		gap: var(--ld-s5) var(--ld-s6);
	}
	.rc-page .ld-champ .ld-champ-text {
		order: 1;
		align-self: start;
	}
	.rc-page .ld-champ .ld-champ-photo,
	.rc-page .ld-champ.is-main .ld-champ-photo {
		order: 2;
		justify-self: end;
		inline-size: 100%;
		max-inline-size: 320px;
	}
	.rc-page .ld-champ .ld-champ-name,
	.rc-page .ld-hero .ld-champ.is-main .ld-champ-name {
		--name-max: 32px;
	}
}

/* DER ABEND: the stops as played, each a link to its stage. Down on a phone, across on a desk. */
.rc-tl {
	display: grid;
	gap: var(--ld-s2);
	margin: 0;
	padding: 0;
	list-style: none;
}
.rc-tl a {
	display: grid;
	grid-template-columns: 9.5em minmax(0, 1fr);
	gap: 0 var(--ld-s3);
	padding: var(--ld-s2) 0;
	border-block-start: 1px solid var(--ld-hair);
	color: inherit;
	text-decoration: none;
}
.rc-tl-time {
	grid-row: span 2;
	white-space: nowrap;
	font: 600 var(--ld-t-meta) / 1.3 var(--font-body);
	font-variant-numeric: tabular-nums;
	color: var(--accent);
}
.rc-tl-label {
	font: 600 var(--ld-t-name) / 1.25 var(--font-body);
	color: var(--ld-fg);
	text-decoration: underline;
	text-decoration-color: var(--ld-hair-strong);
	text-underline-offset: 3px;
}
.rc-tl-detail {
	font: 400 var(--ld-t-meta) / 1.3 var(--font-body);
	color: var(--ld-muted);
}
.rc-tl a:hover .rc-tl-label,
.rc-tl a:focus-visible .rc-tl-label {
	text-decoration-color: currentColor;
}
@media (min-width: 1024px) {
	.rc-tl {
		grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
		gap: var(--ld-s4);
	}
	.rc-tl a {
		grid-template-columns: minmax(0, 1fr);
		align-content: start;
	}
	.rc-tl-time {
		grid-row: auto;
	}
}

/* The stages: the One Point line says why its scores read 1:0; its rounds get room to breathe. */
.rc-page .ld-opc-list .ld-slot {
	padding-block: var(--ld-s3);
}
.rc-page .ld-opc-round > h3 {
	margin-block-start: var(--ld-s5);
}
.rc-rule {
	margin: 0 0 var(--ld-s4);
	font: 600 var(--ld-t-meta) / 1.3 var(--font-body);
	color: var(--ld-fg);
}

/* The groups: both tables at once (no tabs), side by side on a desk, each with its matches folded. */
.rc-groups {
	display: grid;
	gap: var(--ld-s6) var(--ld-s5);
}
@media (min-width: 1024px) {
	.rc-groups {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
}
.rc-group .ld-table {
	display: block;
}
.rc-matches {
	margin-block-start: var(--ld-s3);
	border-block: 1px solid var(--ld-hair);
}
.rc-matches > summary {
	padding: var(--ld-s3) 0;
	font: 600 var(--ld-t-meta) / 1.3 var(--font-body);
	letter-spacing: var(--ld-track-label);
	text-transform: uppercase;
	color: var(--ld-fg);
	cursor: pointer;
}
.rc-round {
	margin: var(--ld-s3) 0 var(--ld-s1);
	font: 600 var(--ld-t-label) / 1.3 var(--font-body);
	letter-spacing: var(--ld-track-label);
	text-transform: uppercase;
	color: var(--ld-muted);
}
.rc-matches .ld-feed {
	margin-block-end: var(--ld-s3);
}

/* The technology section: seven parts of the night's platform, the control room, the makers. */
.rc-tech-lead {
	margin: 0 0 var(--ld-s5);
}
.rc-tech-list {
	display: grid;
	gap: var(--ld-s5) var(--ld-s6);
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 1024px) {
	.rc-tech-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.rc-tech-list li:nth-child(odd):last-child {
		grid-column: 1 / -1;
	}
}
.rc-tech-list li {
	display: grid;
	grid-template-columns: 2.5em minmax(0, 1fr);
	gap: var(--ld-s2) var(--ld-s4);
	padding-block-start: var(--ld-s4);
	border-block-start: 1px solid var(--ld-hair);
}
.rc-tech-num {
	font: 600 var(--ld-t-label) / 1.3 var(--font-display);
	letter-spacing: var(--ld-track-label);
	color: var(--ld-dim);
}
.rc-tech-list h3 {
	margin: 0 0 var(--ld-s1);
	font: 600 var(--ld-t-name) / 1.25 var(--font-display);
	letter-spacing: var(--ld-track-display);
	text-transform: uppercase;
	color: var(--ld-fg);
}
.rc-tech-list p {
	margin: 0;
	max-inline-size: 60ch;
	font: 400 var(--ld-t-body) / 1.45 var(--font-body);
	color: var(--ld-muted);
}
/*
 * The control-room photo is a 4:5 portrait: it is never cropped into a band (the faces sit in its
 * middle). On a phone it closes the section at full width; from a small desk it is a rail beside
 * the six items, the list in one column at 1024 and back to two from 1440.
 */
.rc-tech-photo {
	display: block;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 4 / 5;
	margin-block-start: var(--ld-s7);
	object-fit: cover;
	border-radius: var(--ld-radius-media);
}
@media (min-width: 700px) {
	.rc-tech-photo {
		inline-size: min(100%, 420px);
	}
}
@media (min-width: 1024px) {
	.rc-tech {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 300px;
		column-gap: var(--ld-s6);
		align-items: start;
	}
	.rc-tech > .ld-sec-head,
	.rc-tech > .rc-tech-lead {
		grid-column: 1 / -1;
	}
	.rc-tech-list {
		grid-column: 1;
		grid-template-columns: minmax(0, 1fr);
	}
	.rc-tech-list li:nth-child(odd):last-child {
		grid-column: auto;
	}
	.rc-tech-photo {
		grid-column: 2;
		grid-row: 3;
		inline-size: 300px;
		margin-block-start: 0;
	}
}
@media (min-width: 1440px) {
	.rc-tech {
		grid-template-columns: minmax(0, 1fr) 360px;
	}
	.rc-tech-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.rc-tech-list li:nth-child(odd):last-child {
		grid-column: 1 / -1;
	}
	.rc-tech-photo {
		inline-size: 360px;
	}
}
@media (min-width: 1920px) {
	.rc-tech {
		grid-template-columns: minmax(0, 1fr) 400px;
	}
	.rc-tech-photo {
		inline-size: 400px;
	}
}
