/*
 * MatchTV: the palette (through tabellen2026's CSS variables, which css/components.css uses), the
 * site's own parts (header, hero, day navigation, footer), the TV listing and the match page.
 * The markup inside the TV listing, the match hero and the match content is rendered by common
 * and can't be changed here, only styled.
 */

/* =================================== TOKENS =================================== */
:root {
	/* MatchTV orange rgb(253,106,0) and navy rgb(0,20,50). */
	--primary-h: 25;
	--primary-s: 100%;
	--primary-l: 50%;
	--primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
	/* Orange dark enough for text on white (WCAG AA). */
	--primary-text: hsl(22, 100%, 38%);
	--primary-trans-light: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.14);
	--base-h: 216;
	--base-s: 100%;
	--base-l: 10%;
	--teal: rgb(0, 70, 100);
	--live: hsl(356, 90%, 54%);
	--accent: var(--live);

	--page-max: 64rem;
	--page-pad: clamp(1rem, 3vw, 2rem);
	--day-nav-height: 4.25rem;
	--card-radius: 1rem;
	--card-border: 1px solid var(--base-light);
	--card-shadow: 0 1px 2px hsla(var(--base-h), 60%, 20%, 0.04), 0 4px 16px hsla(var(--base-h), 60%, 20%, 0.04);
	--brand-gradient: radial-gradient(60rem 30rem at 100% 0%, hsla(var(--primary-h), 100%, 50%, 0.16), transparent 60%),
		linear-gradient(120deg, rgb(0, 20, 50) 0%, rgb(0, 40, 75) 60%, rgb(0, 70, 100) 100%);

	/* Used by the components but defined in parts of tabellen2026 that aren't taken over. */
	--focus-offset: 2px;
	--focus-width: 2px;
	--hero-small-icon-size: clamp(1.5rem, 1.47vw + 1.06rem, 2rem);
	--image-wrapper-color: var(--white);
}

/* =================================== BASE =================================== */
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--base-ultra-light);
	color: var(--base);
	font-family: 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
main {
	flex: 1 0 auto;
}
strong, b {
	font-weight: 600;
}
a {
	color: var(--primary-text);
}
img {
	max-width: 100%;
	height: auto;
}
:focus-visible {
	outline: var(--focus-width) solid var(--primary);
	outline-offset: var(--focus-offset);
}
.skip-link:focus {
	position: fixed !important;
	inline-size: auto !important;
	block-size: auto !important;
	clip-path: none;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1000;
	padding: 0.5rem 1rem;
	margin: 0;
	background: var(--white);
	color: var(--base);
	border-radius: 0.5rem;
}

/* =================================== SITE HEADER =================================== */
.site-header {
	background: rgb(0, 20, 50);
	color: var(--white);
}
.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 0 var(--page-pad);
	min-height: 4.5rem;
}
.site-logo {
	display: block;
	flex: none;
}
.site-logo img {
	display: block;
	width: auto;
	height: 2.75rem;
}
.sport-nav {
	min-width: 0;
	margin-left: auto;
}
.sport-nav__list {
	display: flex;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sport-nav a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-radius: 999px;
	color: hsla(0, 0%, 100%, 0.78);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s, color 0.15s;
}
.sport-nav a:hover {
	background: hsla(0, 0%, 100%, 0.08);
	color: var(--white);
}
.sport-nav .current-menu-item > a,
.sport-nav .current-menu-ancestor > a {
	background: var(--primary);
	color: var(--white);
}
/* The sport icons of the old theme (tabellen sprite, 16px icons at 1.5rem). */
.sport-nav .icon {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	background-image: url('https://theme.tabellen.se/img/sport-logos/match-icons-16x16-19.png');
	background-size: 7.5rem auto;
	background-repeat: no-repeat;
	background-position: 0 -8.75rem;
}
.sport-nav .menu-item-home .icon {
	display: none;
}
.sport-nav .hockey .icon { background-position: -1.25rem -8.75rem; }
.sport-nav .handball .icon { background-position: -2.5rem -8.75rem; }
.sport-nav .basketball .icon { background-position: -3.75rem -8.75rem; }
.sport-nav .tennis .icon { background-position: -5rem -8.75rem; }
.sport-nav .americanfootball .icon { background-position: -6.25rem -8.75rem; }

@media (max-width: 899px) {
	.site-header__inner {
		flex-wrap: wrap;
		gap: 0;
		padding: 0;
	}
	.site-logo {
		padding: 0.625rem var(--page-pad);
	}
	.site-logo img {
		height: 2.25rem;
	}
	.sport-nav {
		flex: 1 0 100%;
		margin: 0;
		overflow-x: auto;
		scrollbar-width: none;
		/* Hint that the row scrolls. */
		-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
		mask-image: linear-gradient(90deg, #000 85%, transparent);
	}
	.sport-nav::-webkit-scrollbar {
		display: none;
	}
	.sport-nav__list {
		padding: 0 var(--page-pad) 0.75rem;
		width: max-content;
	}
	.sport-nav a {
		padding: 0.4375rem 0.75rem;
		background: hsla(0, 0%, 100%, 0.06);
		font-size: 0.75rem;
	}
}

/* =================================== BREADCRUMBS =================================== */
.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: hsla(0, 0%, 100%, 0.6);
}
.breadcrumbs li:not(:last-child)::after {
	content: '›';
	margin-left: 0.5rem;
	color: hsla(0, 0%, 100%, 0.4);
}
.breadcrumbs a {
	color: hsla(0, 0%, 100%, 0.8);
	text-decoration: none;
}
.breadcrumbs a:hover {
	color: var(--white);
	text-decoration: underline;
}
.breadcrumbs [aria-current] {
	color: hsla(0, 0%, 100%, 0.6);
}

/* =================================== PAGE HERO (TV pages, 404) =================================== */
.page-hero {
	background: var(--brand-gradient);
	color: var(--white);
	border-top: 1px solid hsla(0, 0%, 100%, 0.06);
}
.page-hero__inner {
	display: grid;
	gap: 2rem;
	align-items: end;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 3.5rem) var(--page-pad) clamp(2rem, 4vw, 3rem);
}
@media (min-width: 900px) {
	.page-hero__inner {
		grid-template-columns: minmax(0, 1fr) 20rem;
	}
}
.page-hero__text {
	display: grid;
	gap: 0.75rem;
}
.page-hero__text .breadcrumbs {
	margin-bottom: 0.25rem;
}
.page-hero__eyebrow {
	margin: 0;
	color: var(--primary);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.page-hero__title {
	margin: 0;
	font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
.page-hero__intro {
	max-width: 36rem;
	margin: 0;
	color: hsla(0, 0%, 100%, 0.78);
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
	font-weight: 300;
	text-wrap: pretty;
}
.page-hero__intro strong {
	color: var(--white);
	font-weight: 500;
}

@media (max-width: 899px) {
	.page-hero__inner {
		gap: 1.25rem;
		padding-top: 1.5rem;
		padding-bottom: 1.5rem;
	}
	.page-hero__intro {
		font-size: 0.9375rem;
	}
}

/* "Härnäst på TV": the next broadcast. */
.next-up {
	position: relative;
	display: grid;
	gap: 0.25rem;
	padding: 1.25rem 1.5rem 1.5rem;
	background: hsla(0, 0%, 100%, 0.07);
	border: 1px solid hsla(0, 0%, 100%, 0.14);
	border-radius: var(--card-radius);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: border-color 0.15s, background-color 0.15s;
}
.next-up:hover {
	border-color: var(--primary);
	background: hsla(0, 0%, 100%, 0.1);
}
.next-up p {
	margin: 0;
}
.next-up__label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: hsla(0, 0%, 100%, 0.7);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.next-up__label::before {
	content: '';
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--primary);
	box-shadow: 0 0 0 4px var(--primary-trans-light);
}
.next-up__day {
	margin-right: 0.375rem;
	color: hsla(0, 0%, 100%, 0.6);
	font-size: 0.45em;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: middle;
}
.next-up__time {
	font-size: 2.25rem;
	font-weight: 600;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
.next-up__teams {
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.3;
}
.next-up__link {
	color: inherit;
	text-decoration: none;
}
.next-up__link::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.next-up__league {
	color: hsla(0, 0%, 100%, 0.6);
	font-size: 0.875rem;
}
.next-up .channels {
	margin-top: 0.75rem;
}
/* Small screens: one compact row (time | teams, league, channels) so the listing starts sooner. */
@media (max-width: 899px) {
	.next-up {
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 1rem;
		row-gap: 0.125rem;
		padding: 0.875rem 1rem 1rem;
	}
	.next-up__label {
		grid-column: 1 / -1;
		margin-bottom: 0.375rem !important;
		font-size: 0.6875rem;
	}
	.next-up__time {
		grid-row: 2 / span 3;
		align-self: start;
		font-size: 1.5rem;
	}
	.next-up__teams {
		font-size: 1rem;
	}
	.next-up__league {
		font-size: 0.8125rem;
	}
	.next-up .channels {
		grid-column: 2;
		margin-top: 0.5rem;
	}
}

/* =================================== CHANNEL CHIPS =================================== */
/* A chip shows the channel's name; css/channel-logos.php turns the ones with a logo into the logo. */
.channels {
	--channel-height: 1.75rem;

	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.channels--large {
	--channel-height: 2.5rem;
	gap: 0.5rem;
}
.channel {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	height: var(--channel-height);
	padding: 0 0.625em;
	background-color: var(--white);
	background-repeat: no-repeat;
	border: 1px solid var(--base-light);
	border-radius: 0.375rem;
	color: var(--base-dark);
	font-size: 0.6875rem;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}
.channels--large .channel {
	font-size: 0.875rem;
	border-radius: 0.5rem;
}
.channel > .sr-only {
	position: static !important;
	inline-size: auto !important;
	block-size: auto !important;
	margin: 0;
	overflow: visible;
	clip-path: none;
}
/* Common's match facts print chips without the name, only with a title. */
.channel:empty::before {
	content: attr(title);
}

/* =================================== DAY NAV =================================== */
.day-nav {
	position: sticky;
	top: 0;
	z-index: 20;
	background: hsla(0, 0%, 100%, 0.88);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: var(--card-border);
}
.day-nav__list {
	display: flex;
	gap: 0.25rem;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 0.5rem var(--page-pad);
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-padding-inline: var(--page-pad);
}
.day-nav__list::-webkit-scrollbar {
	display: none;
}
.day-nav__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 3.75rem;
	height: 3.25rem;
	padding: 0 0.625rem;
	border-radius: 0.75rem;
	color: var(--base-dark);
	text-decoration: none;
	line-height: 1.1;
	transition: background-color 0.15s, color 0.15s;
}
.day-nav__link:hover {
	background: var(--base-ultra-light);
}
.day-nav__weekday {
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--base-medium);
}
.day-nav__date {
	font-size: 1.25rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.day-nav__link[aria-current] .day-nav__weekday {
	color: var(--primary-text);
}
.day-nav__link.is-active {
	background: rgb(0, 20, 50);
	color: var(--white);
}
.day-nav__link.is-active .day-nav__weekday {
	color: var(--primary);
}

/* =================================== TV LISTING =================================== */
.tv-listing {
	width: 100%;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: clamp(1.5rem, 4vw, 2.5rem) var(--page-pad) 3rem;
}
#tv-matches {
	display: grid;
	gap: clamp(2rem, 4vw, 2.75rem);
}
#tv-matches .section__block {
	display: grid;
	gap: 0.875rem;
	/* Keep the day heading below the sticky day nav when jumping to a day. */
	scroll-margin-top: calc(var(--day-nav-height) + 1rem);
}
#tv-matches .section__block-title {
	margin: 0;
	color: var(--base);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
}
#tv-show-earlier {
	justify-self: start;
	padding: 0.4375rem 1rem;
	background: var(--white);
	color: var(--base-dark);
	border: var(--card-border);
	border-radius: 999px;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
}
#tv-show-earlier:hover {
	border-color: var(--base-medium);
}
#tv-show-earlier[hidden] {
	display: none;
}

/* No matches (common's text): an empty-state card. */
#tv-matches .no_matches {
	padding: 2.5rem 1.5rem;
	background: var(--white);
	border: 1px dashed var(--base-light);
	border-radius: var(--card-radius);
	color: var(--base-medium);
	text-align: center;
}
#tv-matches .no_matches::after {
	content: ' på TV de kommande dagarna.';
}

/* One card per day, one row per match (components.css makes .match-list a grid of cards). */
.tv-listing .match-list {
	display: block;
	container-type: inline-size;
	margin: 0;
	padding: 0;
	list-style: none;
	background: var(--white);
	border: var(--card-border);
	border-radius: var(--card-radius);
	box-shadow: var(--card-shadow);
	overflow: clip;
}
.tv-match {
	position: relative;
	display: grid;
	grid-template-columns: 3.5rem 2rem minmax(0, 1fr) auto;
	grid-template-areas:
		"time logo teams channels"
		"time logo league channels";
	align-items: center;
	column-gap: 1rem;
	row-gap: 0.125rem;
	padding: 0.875rem 1.25rem;
	/* The divider above each row; the first one hides under the card's border. */
	box-shadow: 0 -1px 0 var(--base-light);
	transition: background-color 0.12s;
}
.tv-match:hover {
	background: hsl(var(--base-h), 40%, 97.5%);
}
/* Flatten common's wrappers into the row's grid. */
.tv-match-header,
.tv-match-header .inner,
.tv-match-footer,
.tv-match-footer .inner {
	display: contents;
}
.tv-match .time {
	grid-area: time;
	align-self: center;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
.tv-match .league-logo {
	grid-area: logo;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
}
.tv-match .league-logo::before {
	content: '';
	width: 100%;
	height: 100%;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}
.tv-match .tv-primary {
	grid-area: teams;
	align-self: end;
	overflow: hidden;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.tv-match .tv-secondary {
	grid-area: league;
	align-self: start;
	overflow: hidden;
	color: var(--base-medium);
	font-size: 0.8125rem;
	line-height: 1.3;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.tv-match .channels {
	grid-area: channels;
	justify-content: flex-end;
	max-width: 19rem;
}
/* The match link (the teams) covers the whole row. */
.tv-match__link {
	color: inherit;
	text-decoration: none;
}
.tv-match__link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}
.tv-match__link:focus-visible {
	outline: none;
}
.tv-match__link:focus-visible::after {
	outline: var(--focus-width) solid var(--primary);
	outline-offset: -3px;
	border-radius: 0.5rem;
}
.tv-match:hover .tv-match__link {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}
/* Live: a red marker, "Live" under the time and the progress along the bottom. */
.tv-match .progress {
	display: none;
}
.tv-match.ongoing {
	box-shadow: 0 -1px 0 var(--base-light), inset 3px 0 0 var(--live);
}
.tv-match.ongoing .time {
	color: var(--live);
}
.tv-match.ongoing .time::after {
	content: 'Live';
	display: block;
	width: max-content;
	margin-top: 0.25rem;
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	background: var(--live);
	color: var(--white);
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.tv-match.ongoing .progress {
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--base-ultra-light);
}
.tv-match .progress .completed {
	height: 100%;
	background: var(--live);
}
/* Finished matches are hidden until shown with "Visa avslutade matcher". */
.tv-match.inactive:not(.show) {
	display: none;
}
.tv-match.inactive.show {
	opacity: 0.55;
}

@container (max-width: 560px) {
	.tv-match {
		grid-template-columns: 3rem minmax(0, 1fr);
		grid-template-areas:
			"time teams"
			"logo league"
			"logo channels";
		column-gap: 0.875rem;
		row-gap: 0.125rem;
		padding: 0.875rem 1rem;
	}
	.tv-match .time {
		align-self: end;
		font-size: 1rem;
	}
	.tv-match .league-logo {
		align-self: start;
		justify-content: flex-start;
		width: 1.75rem;
		height: 1.75rem;
		margin-top: 0.25rem;
	}
	.tv-match .channels {
		justify-content: flex-start;
		max-width: none;
		margin-top: 0.5rem;
	}
	.tv-match.ongoing .time::after {
		display: none;
	}
}

/* =================================== MATCH PAGE =================================== */
/* post-type-<sport> (for the event icons) also sets the sport colour as --primary; keep MatchTV's. */
body.match-page {
	--primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
}
.match-page .match-hero {
	--broadcast-overlap: clamp(2.5rem, 6vw, 3.5rem);

	background: var(--brand-gradient);
	padding-top: 1.25rem;
	padding-bottom: calc(var(--broadcast-overlap) - 1rem);
}
/* The tabellen pattern and the dark top gradient of the hero are tabellen.se branding. */
.match-page .hero::before,
.match-page .hero::after {
	display: none;
}
.match-hero__crumbs {
	position: relative;
	width: 100%;
	/* Lines up with the header's logo (the hero has its own side padding). */
	max-width: calc(var(--page-max) - 2 * var(--page-pad));
	margin: 0 auto;
}
.match-page .match-hero__container {
	width: 100%;
	max-width: 48rem;
	margin: 0 auto;
}
.match-page .wrapper {
	display: grid;
	gap: clamp(1.5rem, 4vw, 2.5rem);
	width: 100%;
	max-width: calc(48rem + 2 * var(--page-pad));
	margin: 0 auto;
	padding: clamp(1.5rem, 4vw, 2.5rem) var(--page-pad) 3rem;
}
.match-page .match-dialog-content {
	display: grid;
	gap: clamp(1.5rem, 4vw, 2.5rem);
}
.match-page .section__title {
	font-size: 1.25rem;
	font-weight: 600;
}
/* No ads on MatchTV. */
.pr,
.section__pr {
	display: none !important;
}

/* "Sänds på": where to watch, the main thing on a MatchTV match page. */
.broadcast {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 1rem 1.25rem;
	padding: 1.25rem 1.5rem;
	background: var(--white);
	border: var(--card-border);
	border-radius: var(--card-radius);
	box-shadow: var(--card-shadow);
	/* Pulled up over the hero's extra bottom padding (the wrapper's top padding + --broadcast-overlap - 1rem). */
	margin-top: calc(-1 * clamp(1.5rem, 4vw, 2.5rem) - clamp(2.5rem, 6vw, 3.5rem) + 1rem);
	position: relative;
}
.broadcast__icon {
	width: 3rem;
	height: 3rem;
	border-radius: 0.75rem;
	background: var(--primary-trans-light);
	position: relative;
}
.broadcast__icon::before {
	content: '';
	position: absolute;
	inset: 0.75rem;
	background: var(--primary-text);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.broadcast__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.25;
}
.broadcast__when {
	margin: 0.125rem 0 0;
	color: var(--base-medium);
	font-size: 0.875rem;
}
.broadcast .channels {
	grid-column: 1 / -1;
}
@media (min-width: 640px) {
	.broadcast {
		grid-template-columns: auto auto minmax(0, 1fr);
	}
	.broadcast .channels {
		grid-column: auto;
		justify-content: flex-end;
	}
}
.broadcast--unknown .broadcast__icon {
	background: var(--base-ultra-light);
}
.broadcast--unknown .broadcast__icon::before {
	background: var(--base-medium);
}
/* The channels are in the callout, don't repeat them in the facts. */
.broadcast:not(.broadcast--unknown) ~ .match-dialog-content .match-fact.tv {
	display: none;
}

/* Facts: a compact grid of cards instead of a tall list. */
.match-page .facts-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.match-page .match-fact {
	--fact-icon-size: 2.75rem;
	gap: 1rem;
	padding: 1rem;
	border-radius: var(--card-radius);
}
.match-page .match-fact .fact-icon {
	width: var(--fact-icon-size);
	height: var(--fact-icon-size);
	flex: none;
}

/* More matches on TV the same day. */
.more-matches {
	display: grid;
	gap: 0.875rem;
}
.more-matches__list {
	container-type: inline-size;
	margin: 0;
	padding: 0;
	list-style: none;
	background: var(--white);
	border: var(--card-border);
	border-radius: var(--card-radius);
	box-shadow: var(--card-shadow);
	overflow: clip;
}
.more-matches__item {
	position: relative;
	display: grid;
	grid-template-columns: 3.25rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.25rem 1rem;
	padding: 0.875rem 1.25rem;
	box-shadow: 0 -1px 0 var(--base-light);
}
.more-matches__item:hover {
	background: hsl(var(--base-h), 40%, 97.5%);
}
.more-matches__time {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.more-matches__text {
	display: grid;
	min-width: 0;
}
.more-matches__link {
	overflow: hidden;
	color: inherit;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.more-matches__link::after {
	content: '';
	position: absolute;
	inset: 0;
}
.more-matches__item:hover .more-matches__link {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.more-matches__league {
	color: var(--base-medium);
	font-size: 0.8125rem;
}
@container (max-width: 520px) {
	.more-matches__item {
		grid-template-columns: 3rem minmax(0, 1fr);
		padding: 0.875rem 1rem;
	}
	.more-matches__item .channels {
		grid-column: 2;
	}
}
.more-matches__all {
	font-weight: 500;
}
.more-matches__all::after {
	content: ' →';
}

/* Loading overlay when leaving the match page through a link (js/matchtv.js). */
.match-dialog-loading {
	display: none;
}
.match-dialog-loading.active {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 100;
	background: hsla(var(--base-h), 60%, 10%, 0.35);
}

/* Lineups: the team heading (team, formation, Plan/Lista) sticks below tabellen.se's fixed header, hero
   and TOC, which MatchTV doesn't have, so it floated mid-screen over the pitch. Stick it to the top. */
#lineups .team-heading {
	top: 0;
}

/* =================================== INSTALL POPUP =================================== */
/* "Add to home screen" popup on phones (js/install-prompt.js). */
.install-popup {
	position: fixed;
	left: 0.75rem;
	right: 0.75rem;
	bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
	z-index: 90;
	max-width: 30rem;
	margin-inline: auto;
	padding: 1rem;
	background: var(--white);
	color: var(--base);
	border-radius: var(--card-radius);
	box-shadow: 0 8px 32px hsla(var(--base-h), 60%, 10%, 0.28);
	opacity: 0;
	transform: translateY(1.5rem);
	transition: opacity 0.25s, transform 0.25s;
}
.install-popup.is-visible {
	opacity: 1;
	transform: none;
}
.install-popup__head {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}
.install-popup__icon {
	flex: none;
	width: 3rem;
	height: 3rem;
	padding: 0.25rem;
	background: rgb(0, 20, 50);
	border-radius: 0.75rem;
}
.install-popup__title {
	margin: 0;
	font-weight: 600;
	line-height: 1.3;
}
.install-popup__text,
.install-popup__ios {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--base-medium);
}
.install-popup__ios {
	margin-top: 0.75rem;
	color: var(--base);
}
.install-popup__close {
	flex: none;
	margin: -0.5rem -0.5rem 0 auto;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	background: none;
	color: var(--base-medium);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.install-popup__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 0.75rem;
}
.install-popup__actions .btn {
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
}
/* iOS share icon (square with an arrow up), drawn inline so it needs no image. */
.install-popup__share {
	display: inline-block;
	width: 0.875em;
	height: 1.05em;
	vertical-align: -0.15em;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24' fill='none' stroke='%23007aff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 15V2M5.5 6.5 10 2l4.5 4.5M7 10H3v12h14V10h-4'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) {
	.install-popup {
		transition: none;
	}
}

/* =================================== 404 =================================== */
.not-found .page-hero__inner {
	padding-block: clamp(3rem, 10vw, 6rem);
}
.not-found .btn {
	text-decoration: none;
}

/* =================================== SITE FOOTER =================================== */
.site-footer {
	background: rgb(0, 20, 50);
	color: hsla(0, 0%, 100%, 0.72);
	font-size: 0.875rem;
}
.site-footer__inner {
	display: grid;
	gap: 2rem 3rem;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 3rem var(--page-pad) 2rem;
}
@media (min-width: 800px) {
	.site-footer__inner {
		grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
	}
}
.site-footer__about img {
	display: block;
	height: 2.5rem;
	width: auto;
	margin-bottom: 1rem;
}
.site-footer__about p {
	max-width: 30rem;
	margin: 0;
	line-height: 1.6;
}
.site-footer__heading {
	margin: 0 0 0.875rem;
	color: var(--white);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.site-footer__links ul {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-footer a {
	color: hsla(0, 0%, 100%, 0.8);
	text-decoration: none;
}
.site-footer a:hover {
	color: var(--primary);
}
.site-footer .spel-logo__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-footer .spel-logo__list a {
	display: flex;
	opacity: 0.85;
}
.site-footer .spel-logo__list a:hover {
	opacity: 1;
}
.site-footer__copy {
	width: calc(100% - 2 * var(--page-pad));
	max-width: calc(var(--page-max) - 2 * var(--page-pad));
	margin: 0 auto;
	padding: 1.25rem 0 2rem;
	border-top: 1px solid hsla(0, 0%, 100%, 0.08);
	color: hsla(0, 0%, 100%, 0.5);
	font-size: 0.8125rem;
}
