/* Fantasy section on the Mero11 home page. Colours from Core's tokens only; section heads use Core's .m11-section__head. */

.m11f-home {
	margin: 0; /* the home column's own gap spaces the sections */
}

.m11f-home__next {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	padding: var(--card-pad);
	background-color: var(--surface);
	border: var(--card-border);
	border-radius: var(--radius-card);
}

.m11f-home__teams {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sp-2);
	margin: var(--sp-1) 0;
	font-size: var(--fs-h3);
	font-weight: 700;
	line-height: var(--lh-heading);
}

.m11f-home__vs {
	color: var(--muted);
	font-size: var(--fs-small);
	font-weight: 600;
}

.m11f-home__lock {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--sp-2);
	margin: 0;
	color: var(--muted);
	font-size: var(--fs-body);
}

.m11f-home__clock {
	color: var(--text);
	font-size: var(--fs-h3);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.m11f-home__lock.is-locked .m11f-home__lock-text {
	color: var(--accent-text);
	font-weight: 700;
}

.m11f-home__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
}

.m11f-home__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sp-4);
	margin-top: var(--sp-4);
}

.m11f-home__insights {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sp-4);
}

@media (min-width: 768px) {
	.m11f-home__insights {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.m11f-home__card {
	padding: var(--card-pad);
	background-color: var(--surface);
	border: var(--card-border);
	border-radius: var(--radius-card);
}

.m11f-home__cardhead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--sp-3);
}

.m11f-home__h3 {
	margin: 0 0 var(--sp-2);
	font-size: var(--fs-label);
	font-weight: 700;
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
	color: var(--muted);
}

.m11f-home__table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: var(--fs-body);
}

.m11f-home__table th,
.m11f-home__table td {
	min-height: var(--control-height);
	padding: var(--sp-2) var(--sp-2);
	text-align: start;
	border-top: 1px solid var(--line);
}

.m11f-home__table thead th {
	border-top: 0;
	border-bottom: 1px solid var(--line-strong);
	color: var(--muted);
	font-size: var(--fs-label);
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
}

.m11f-home__table tbody th {
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* Rank is a narrow left column, points a narrow right one; the manager gets the rest. */
.m11f-home__table th:first-child,
.m11f-home__table td:first-child {
	width: 4rem;
	text-align: start;
}

.m11f-home__table th:last-child,
.m11f-home__table td:last-child {
	width: 5.5rem;
}

.m11f-home__table .m11f-num,
.m11f-home__table thead th:last-child {
	text-align: end;
}

.m11f-home__table .is-you {
	background-color: var(--accent-tint);
}

.m11f-home__gap td {
	color: var(--muted);
	text-align: center;
}

.m11f-home .m11f-num {
	font-variant-numeric: tabular-nums;
}

.m11f-home__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.m11f-home__list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-3);
	min-height: var(--control-height);
	border-top: 1px solid var(--line);
}

.m11f-home__list li:first-child {
	border-top: 0;
}

.m11f-home__pname {
	font-weight: 600;
}

.m11f-home__pteam {
	color: var(--muted);
	font-size: var(--fs-small);
	font-weight: 400;
}

.m11f-home__pvalue {
	font-weight: 700;
}

/* NPL's two columns under the top cards: one column on phones (main first), 3fr/2fr from 1024px. */
.m11f-home__cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sp-4);
	margin-top: var(--sp-4);
}

.m11f-home__col {
	display: flex;
	flex-direction: column;
	gap: var(--sp-4);
	min-width: 0;
}

/* The blocks space themselves on their own pages; here the column gap does it, and a block that rendered nothing leaves no gap. */
.m11f-home__col > * {
	margin: 0;
}

.m11f-home__col > :empty {
	display: none;
}

/* Both columns of a row are as tall as the taller one: each block fills its column and its card fills the block. */
.m11f-home__col > * {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.m11f-home__col > * > :is(.m11f-card, .m11f-top-performers__card, .m11f-next-match__hero, .m11f-transfers-wrap) {
	flex: 1 1 auto;
}

.m11f-home__col .m11f-transfers-wrap {
	display: flex;
	flex-direction: column;
}

.m11f-home__col .m11f-transfers-wrap > .m11f-card {
	flex: 1 1 auto;
}

.m11f-home__col > .m11f-section,
.m11f-home__col > .m11f-fantasy-dashboard,
.m11f-home__col > .m11f-fantasy-insights {
	margin-top: 0;
	margin-bottom: 0;
}

.m11f-home__tname {
	color: var(--muted);
	font-weight: 600;
}

.m11f-home__table-wrap,
.m11f-home__col .m11-table-wrap {
	max-width: 100%;
}

@media (min-width: 1024px) {
	.m11f-home__cols {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		gap: var(--sp-5);
	}

	/* A row with only one of its two columns (a visitor with no squad has no My Team) uses the full width. */
	.m11f-home__cols--solo {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Home promo row for a visitor with no squad yet. Tokens only, so it follows the dark theme. */
.m11f-promo {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sp-4);
}

.m11f-promo__body {
	display: flex;
	flex-direction: column;
	gap: var(--sp-5);
	min-width: 0;
	padding: var(--card-pad);
	background-color: var(--surface);
	border: var(--card-border);
	border-radius: var(--radius-card);
}

.m11f-promo__intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--sp-2);
}

.m11f-promo__tag {
	padding: 2px 10px;
	border-radius: var(--radius-pill);
	background-color: var(--positive-tint);
	color: var(--positive);
	font-size: var(--fs-small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.m11f-promo__title {
	margin: 0;
	color: var(--text);
	font-size: var(--fs-h3);
	line-height: var(--lh-heading);
	font-weight: 700;
	text-wrap: balance;
}

.m11f-promo__lead {
	margin: 0;
	color: var(--muted);
	font-size: var(--fs-small);
	line-height: var(--lh-body);
}

.m11f-promo__steps {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sp-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.m11f-promo__step {
	display: flex;
	flex-direction: column;
	gap: var(--sp-1);
	padding: var(--sp-3) var(--sp-4);
	background-color: var(--surface-2);
	border-radius: var(--radius-sm);
	color: var(--muted);
	font-size: var(--fs-small);
	line-height: var(--lh-body);
}

.m11f-promo__step strong {
	color: var(--text);
	font-size: var(--fs-body);
}

.m11f-promo__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background-color: var(--positive-tint);
	color: var(--positive);
	font-size: var(--fs-small);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.m11f-promo__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sp-3) var(--sp-4);
	margin-top: auto;
}

.m11f-promo__note {
	color: var(--muted);
	font-size: var(--fs-small);
}

@media (min-width: 900px) {
	.m11f-promo__steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* The member's hero row at the top of the Fantasy section: the same gap as the rows below it. */
.m11f-home-hero {
	margin-bottom: var(--sp-5);
}
