/*
 * HelloNation Athlete Voices
 *
 * These groups sit inside somebody else's page - a correspondent's story, a
 * town's coverage list - so they have two jobs that pull against each other.
 * They must not compete with the reporting, and they must not read as an advert
 * that fell out of the sidebar.
 *
 * The answer is a panel: a clear top rule and a quiet tinted ground that says
 * "different kind of thing" without shouting, an eyebrow that names the network
 * the content comes from, and a sentence of context so a reader knows who these
 * people are before they decide whether to press play. Nothing here uses an
 * accent colour or a call-to-action button, because the moment it looks like
 * marketing it stops being what the athletes agreed to make.
 *
 * Videos are vertical 1080x1920, so every frame is 9:16 and capped in height.
 */

/* Section chrome ---------------------------------------------------------
 *
 * The newswire already has a house treatment for HelloNation content: the
 * navy card on the homepage, `.inw-hn`. It is contained rather than
 * full-bleed, has a small radius, and carries the wordmark. Borrowing it means
 * this block is unmistakably a different voice from the reporting around it,
 * and it stays distinct from the full-width navy call to action further down
 * the page because that one is a band and this one is a card.
 *
 * The section itself stays white, so the card floats with clear air on both
 * sides rather than butting into the CTA.
 */

.hnav-section {
	background: transparent;
}

.hnav-section .hnav {
	margin: 0;
}

.hnav {
	--hnav-navy: #0c243c;
	--hnav-ink: #ffffff;
	--hnav-muted: #c3d2e0;
	--hnav-dim: #9db0c4;
	--hnav-rule: rgba(255, 255, 255, 0.16);
	--hnav-orange: #f0821e;
	--hnav-sky: #29abe2;

	margin: 3rem 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--hnav-ink);
	clear: both;
}

.hnav-panel {
	background: var(--hnav-navy);
	border-radius: 6px;
	padding: 2.4rem 2.25rem 2rem;
	max-width: 1144px;
	margin: 2.5rem auto;
	color: var(--hnav-muted);
}

/* Head -------------------------------------------------------------------
 *
 * Centred, like the newswire's own section headings. Every margin is written
 * as .hnav <class> rather than the bare class: a theme rule such as
 * `.entry-content p { margin-bottom: 1em }` scores the same as a single class
 * and wins on source order, which was opening gaps inside the head.
 */

/* Wordmark in its own column with the copy beside it, which is how the
   homepage card is built. */
.hnav .hnav-head {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr);
	gap: 0.35rem 2.25rem;
	align-items: center;
	margin: 0 0 1.75rem;
	text-align: left;
}

.hnav .hnav-mark {
	grid-column: 1;
	grid-row: 1 / span 2;
	align-self: center;
	justify-self: center;
	display: block;
	margin: 0;
	line-height: 0;
}

.hnav .hnav-mark img {
	width: 100%;
	max-width: 150px;
	height: auto;
	display: block;

	/* The file is the dark wordmark. The newswire's own homepage band flips it
	   to white the same way rather than shipping a second image. */
	filter: brightness(0) invert(1);
}

.hnav .hnav-mark:hover img,
.hnav .hnav-mark:focus-visible img {
	opacity: 0.85;
}

.hnav .hnav-heading {
	grid-column: 2;
}

.hnav .hnav-intro {
	grid-column: 2;
}

.hnav .hnav-heading {
	margin: 0 0 0.6rem;
	color: var(--hnav-ink);
	font-size: 1.5rem;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--hnav-ink);
}

.hnav .hnav-intro {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--hnav-muted);
}

.hnav .hnav-player {
	box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.65);
}

/* Player ---------------------------------------------------------------- */

.hnav-player {
	position: relative;
	aspect-ratio: 9 / 16;
	background: #050a0f;
	border-radius: 5px;
	overflow: hidden;
}

.hnav-player video,
.hnav-player iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

/* Sideways layouts: card after a story, spotlight atop a community page ---
 *
 * The video sits on the right. A 9:16 frame on the left throws the weight of
 * the block to the outside of the text column and leaves a tall ragged gutter
 * down the middle; on the right it closes the block off and the reading order
 * still starts with words. Media stays first in the markup so a single column
 * on a phone leads with the face.
 */

.hnav-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 250px);
	gap: 2.25rem;
	align-items: center;
	text-align: left;
}

.hnav-split--wide {
	grid-template-columns: minmax(0, 1fr) minmax(0, 290px);
	gap: 2.5rem;
	align-items: center;
	text-align: left;
}

.hnav-split__media {
	grid-column: 2;
	grid-row: 1;
}

.hnav-split__text {
	grid-column: 1;
	grid-row: 1;
}

.hnav-split__media .hnav-player {
	max-height: 445px;
}

.hnav-split--wide .hnav-split__media .hnav-player {
	max-height: 515px;
}

.hnav .hnav-split--wide .hnav-head {
	margin-bottom: 0.9rem;
}

/* Rail -------------------------------------------------------------------
 *
 * Only ever used for two or more. A single voice is routed to the sideways
 * card instead, because one item in a row of fixed-width columns looks like
 * three failed to load. Items keep their own width and wrap rather than
 * stretching to fill, so two look deliberate and six look like a set.
 */

.hnav-rail {
	display: grid;
	grid-template-columns: repeat(var(--hnav-cols, 4), minmax(0, 1fr));
	gap: 1.75rem 1.5rem;
	justify-content: center;
	max-width: 940px;
	margin: 0 auto;
}

.hnav-rail > .hnav-item {
	min-width: 0;
}

.hnav-rail .hnav-player {
	max-width: 205px;
	margin: 0 auto;
}

.hnav-rail .hnav-body {
	text-align: center;
	align-items: center;
}

/* Prompt and credit ------------------------------------------------------ */

.hnav .hnav-prompt {
	margin: 0 0 0.9rem;
	padding: 0 0 0 1rem;
	border-left: 3px solid var(--hnav-sky);
	font-style: italic;
	font-size: 1rem;
	line-height: 1.5;
	color: #dbe6f1;
	quotes: none;
}

.hnav .hnav-body {
	margin-top: 0;
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
}

.hnav .hnav-name {
	font-weight: 700;
	font-size: 1rem;
	color: var(--hnav-ink);
}

.hnav .hnav-meta,
.hnav .hnav-place {
	font-size: 0.84rem;
	color: var(--hnav-dim);
}

.hnav .hnav-topic {
	margin-top: 0.45rem;
	font-size: 0.66rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--hnav-sky);
}

/* Transcript -------------------------------------------------------------
 *
 * Rendered in full and clamped by script, so it still reads with JavaScript
 * off and the whole text is present for screen readers and in-page search.
 */

.hnav .hnav-transcript {
	margin: 0.95rem 0 0;
	padding-top: 0.85rem;
	border-top: 1px solid var(--hnav-rule);
	font-size: 0.9rem;
	line-height: 1.6;
	color: #dbe6f1;
	max-width: 58ch;
}

.hnav .hnav-transcript p {
	margin: 0 0 0.65rem;
}

.hnav .hnav-transcript p:last-child {
	margin-bottom: 0;
}

.hnav .hnav-transcript__summary {
	margin: 0;
}

.hnav .hnav-transcript__toggle {
	color: var(--hnav-orange);
	display: inline-block;
	margin-top: 0.55rem;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hnav .hnav-transcript__toggle:hover,
.hnav .hnav-transcript__toggle:focus-visible {
	text-decoration: none;
}

/* Attribution ------------------------------------------------------------ */

.hnav .hnav-attribution {
	margin: 1.75rem 0 0;
	padding-top: 0.9rem;
	border-top: 1px solid var(--hnav-rule);
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--hnav-dim);
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1.25rem;
	align-items: baseline;
	justify-content: space-between;
}

.hnav .hnav-credit {
	flex: 1 1 auto;
	min-width: 0;
}

.hnav .hnav-brand,
.hnav .hnav-more {
	color: var(--hnav-orange);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	font-weight: 700;
}

.hnav .hnav-more {
	white-space: nowrap;
	text-decoration: none;
}

.hnav .hnav-more:hover,
.hnav .hnav-brand:hover,
.hnav .hnav-more:focus-visible,
.hnav .hnav-brand:focus-visible {
	color: #ffa04d;
	text-decoration: underline;
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 1080px) {
	.hnav-rail {
		grid-template-columns: repeat(min(var(--hnav-cols, 3), 3), minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.hnav-panel {
		padding: 1.75rem 1.35rem 1.5rem;
		margin: 1.75rem auto;
		border-radius: 5px;
	}

	.hnav .hnav-mark img {
		max-width: 124px;
	}

	.hnav-split,
	.hnav-split--wide {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.1rem;
		align-items: start;
	}

	.hnav-split__media,
	.hnav-split__text {
		grid-column: 1;
		grid-row: auto;
	}

	.hnav-split__media .hnav-player,
	.hnav-split--wide .hnav-split__media .hnav-player {
		max-width: 250px;
	}

	.hnav-rail {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.4rem 1rem;
	}

	.hnav .hnav-head {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.5rem;
	}

	.hnav .hnav-mark {
		grid-column: 1;
		grid-row: auto;
		justify-self: start;
		margin-bottom: 0.35rem;
	}

	.hnav .hnav-heading,
	.hnav .hnav-intro {
		grid-column: 1;
	}

	.hnav .hnav-attribution {
		display: block;
		text-align: left;
	}

	.hnav .hnav-attribution .hnav-more {
		display: inline-block;
		margin-top: 0.4rem;
	}
}

@media print {
	.hnav {
		display: none;
	}
}
