/*--------------------------------------------------------------
# Membership — The Comparison, Grouped
# "Everything included, side by side": one table, its rows in three
# groups (Learn, Book, Get help), each plan headed by a small card in
# its finish. Inner Circle is a faint orange column, VIP a black one.
# The header row stays pinned under the site header while you scroll.
--------------------------------------------------------------*/

/* ── Section ──
   The same padding as .m-compare, which it replaced, so the gaps to
   .m-flight above and .m-unlocks below are unchanged. No overflow here,
   or the pinned header row would stop pinning (the same reason
   .site-main--membership clips rather than hides). */
.m-cmp {
	/* Card finishes, as in the concept: pearl, black metal, champagne */
	--m-cmp-pearl: linear-gradient(115deg, rgba(255, 214, 231, 0.32), rgba(201, 229, 255, 0.32) 45%, rgba(255, 255, 255, 0) 70%), linear-gradient(135deg, #FFFFFF, #F1EEE8 45%, #E2DDD3);
	--m-cmp-black: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px), linear-gradient(135deg, #3C3C3C, #151515 52%, #2B2B2B);
	--m-cmp-champagne: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 3px), linear-gradient(135deg, #F4EAD2, #CDB98E 48%, #EADDBD 68%, #BEA679);

	padding: 60px 0 100px;
}

.m-cmp__container {
	width: 100%;
	max-width: calc(1080px + 2 * var(--tpp-container-padding));
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}

/* The page's section heading scale (see .m-vip__heading) */
.m-cmp__heading {
	text-align: center;
	font-family: var(--tpp-font-heading);
	font-size: clamp(2rem, 4.5vw + 0.5rem, 3.5rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.03em;
	color: var(--tpp-black);
	margin: 0 0 48px;
}

.m-cmp__heading-accent {
	color: var(--tpp-text-light);
}

/* Small uppercase labels: the site's body font */
.m-cmp__label,
.m-cmp__tier-name,
.m-cmp__group-title {
	font-family: var(--tpp-font-body);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tpp-text-light);
}

.m-cmp__label {
	font-size: 0.6875rem;
}


/* ──────────────────────────────────────────────
   The table
   ────────────────────────────────────────────── */

.m-cmp__table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
}

.m-cmp__feature-col {
	width: 34%;
}

.m-cmp__table th,
.m-cmp__table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--tpp-border-light);
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	line-height: 1.4;
	text-align: center;
	vertical-align: middle;
}

/* Two classes, to outrank the centred .m-cmp__table th */
.m-cmp__table .m-cmp__feature {
	text-align: left;
	font-weight: 500;
	color: var(--tpp-black);
}

/* Header row: pinned under the site header while the table scrolls past.
   --m-cmp-pin is the header's height, set by the script (72px without
   it); when the header slides away on scroll-down, the row moves up with
   it, on the header's own timing. */
.m-cmp__table thead th {
	position: sticky;
	top: var(--m-cmp-pin, 72px);
	z-index: 2;
	padding: 22px 12px 18px;
	background: var(--tpp-white);
	border-bottom: 1.5px solid var(--tpp-black);
	vertical-align: bottom;
	transition: top 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

body:has(.site-header.header-hidden) .m-cmp__table thead th {
	top: 0;
}

.m-cmp__table thead th.m-cmp__corner {
	text-align: left;
	padding-left: 16px;
}

.m-cmp__tier {
	display: grid;
	justify-items: center;
	gap: 8px;
}

/* A small card in each plan's finish */
.m-cmp__mini {
	width: 58px;
	aspect-ratio: 1.586;
	border-radius: 6px;
	box-shadow: 0 8px 14px -8px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.m-cmp__mini--pearl {
	background: var(--m-cmp-pearl);
}

.m-cmp__mini--black {
	background: var(--m-cmp-black);
}

.m-cmp__mini--champagne {
	background: var(--m-cmp-champagne);
}

.m-cmp__tier-name {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
}

.m-cmp__tier-price {
	font-family: var(--tpp-font-heading);
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.035em;
	color: var(--tpp-black);
}

.m-cmp__tier-per {
	font-family: var(--tpp-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--tpp-text-light);
}

/* Inner Circle: a faint orange column. VIP: a black column, top to bottom. */
.m-cmp__table .is-ic {
	background: rgba(255, 153, 0, 0.12);
}

/* Solid, so rows scrolling under the pinned header don't show through */
.m-cmp__table thead th.is-ic {
	background: var(--tpp-accent-tint);
}

.m-cmp__table .is-vip {
	background: var(--tpp-black);
	color: var(--tpp-white);
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.m-cmp__table thead th.is-vip {
	border-radius: 18px 18px 0 0;
	border-bottom-color: var(--tpp-black);
}

.m-cmp__table thead th.is-vip .m-cmp__tier-name {
	color: rgba(255, 255, 255, 0.6);
}

.m-cmp__table thead th.is-vip .m-cmp__tier-price {
	color: var(--tpp-white);
}

.m-cmp__table thead th.is-vip .m-cmp__tier-per {
	color: rgba(255, 255, 255, 0.55);
}

/* Group rows (Learn, Book, Get help) — titles, not rows. Owen, 25 Nov 2026:
   they "need to be much clearer that they are titles". So: bigger, bolder
   black capitals; a gap above each one; and a light band behind it. The
   band is a background image that stops --m-cmp-gap short of the top, so
   the gap keeps each column's normal colour and the band itself is drawn
   in each column's own shade (light grey, light orange, dark grey on the
   black VIP column) — the columns still run unbroken top to bottom. */
/* Written as .m-cmp__table .m-cmp__group-row > td to outrank the column
   tints (.m-cmp__table .is-ic / .is-vip), whose `background` shorthand
   would otherwise reset the band image to none. */
.m-cmp__table .m-cmp__group-row > th,
.m-cmp__table .m-cmp__group-row > td {
	--m-cmp-gap: 18px;
	--m-cmp-band: #F1EEE8;
	padding: calc(var(--m-cmp-gap) + 14px) 16px 14px;
	border-bottom: 0;
	background-image: linear-gradient(var(--m-cmp-band), var(--m-cmp-band));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 100% calc(100% - var(--m-cmp-gap));
}

.m-cmp__table .m-cmp__group-row > td.is-ic {
	/* 24%, not the 34% the lime used: orange is a darker colour, so this is
	   what keeps the band the same step from its column as the grey one. */
	--m-cmp-band: rgba(255, 153, 0, 0.24);
	background-color: rgba(255, 153, 0, 0.12);
}

.m-cmp__table .m-cmp__group-row > td.is-vip {
	--m-cmp-band: #2C2C2C;
	background-color: var(--tpp-black);
}

.m-cmp__table .m-cmp__group-title {
	text-align: left;
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	color: var(--tpp-black);
}

.m-cmp__group-note {
	margin-left: 12px;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tpp-text-light);
}

/* Values */
.m-cmp__yes {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--tpp-black);
	color: var(--tpp-accent);
	vertical-align: middle;
}

.m-cmp__yes svg {
	width: 12px;
	height: 12px;
}

.is-vip .m-cmp__yes {
	background: var(--tpp-accent);
	color: var(--tpp-black);
}

.m-cmp__no {
	display: inline-block;
	width: 14px;
	height: 2px;
	border-radius: 1px;
	background: #CFCAC1;
	vertical-align: middle;
}

.m-cmp__text {
	font-weight: 600;
	color: var(--tpp-black);
}

.is-vip .m-cmp__text {
	color: var(--tpp-accent);
}

.m-cmp__text--note {
	margin-left: 8px;
	font-size: 0.8125rem;
}

.m-cmp__row:hover th,
.m-cmp__row:hover td:not(.is-vip) {
	background-color: rgba(26, 26, 26, 0.025);
}

.m-cmp__row:hover td.is-ic {
	background-color: rgba(255, 153, 0, 0.2);
}


/* ──────────────────────────────────────────────
   Buttons, at the foot of each column
   ────────────────────────────────────────────── */

.m-cmp__table tfoot td {
	padding: 22px 12px;
	border-bottom: 0;
}

.m-cmp__table tfoot td.is-vip {
	border-radius: 0 0 18px 18px;
}

.m-cmp__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 14px;
	border-radius: var(--tpp-radius-pill);
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.m-cmp__btn-short {
	display: none;
}

/* style.css sets every link state to color: inherit, so each is restated */
.m-cmp__btn--outline,
.m-cmp__btn--outline:visited {
	color: var(--tpp-black);
	box-shadow: inset 0 0 0 1.5px var(--tpp-black);
}

.m-cmp__btn--outline:hover,
.m-cmp__btn--outline:focus,
.m-cmp__btn--outline:active {
	color: var(--tpp-white);
	background: var(--tpp-black);
}

/* White, on the black VIP column. Since 29 Nov 2026 the Inner Circle's
   button is the orange key one (--accent) and VIP's is this; it was
   --solid, black, on the Inner Circle until then. */
.m-cmp__btn--light,
.m-cmp__btn--light:visited,
.m-cmp__btn--light:hover,
.m-cmp__btn--light:focus,
.m-cmp__btn--light:active {
	color: var(--tpp-black);
	background: var(--tpp-white);
}

.m-cmp__btn--light:hover {
	background: var(--tpp-border-light);
}

.m-cmp__btn--accent,
.m-cmp__btn--accent:visited,
.m-cmp__btn--accent:hover,
.m-cmp__btn--accent:focus,
.m-cmp__btn--accent:active {
	color: var(--tpp-black);
	background: var(--tpp-accent);
}

.m-cmp__btn--accent:hover {
	background: var(--tpp-accent-dark);
}

.m-cmp__btn:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 3px;
}

/* The theme's black focus ring would vanish on the black column */
.is-vip .m-cmp__btn:focus-visible {
	outline-color: var(--tpp-white);
}

/* No checkout link yet: shown, but plainly not a button */
.m-cmp__btn--pending,
.m-cmp__btn--pending:hover {
	opacity: 0.55;
	cursor: default;
}

.m-cmp__btn--outline.m-cmp__btn--pending:hover {
	color: var(--tpp-black);
	background: transparent;
}


/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

/* Tablet and below (≤991px) — the same padding steps as .m-compare */
@media screen and (max-width: 991px) {
	.m-cmp {
		padding: 40px 0 64px;
	}
}

/* Mobile (≤767px) — still four columns: shorter headings, no group notes,
   short button labels */
@media screen and (max-width: 767px) {
	.m-cmp {
		padding: 0 0 64px;
	}

	.m-cmp__heading {
		font-size: clamp(1.75rem, 7vw, 2.5rem);
		margin-bottom: 32px;
	}

	.m-cmp__feature-col {
		width: 40%;
	}

	.m-cmp__table th,
	.m-cmp__table td {
		padding: 12px 6px;
		font-size: 0.8125rem;
	}

	.m-cmp__table .m-cmp__feature {
		padding-left: 2px;
	}

	.m-cmp__table thead th {
		padding: 16px 4px 14px;
	}

	.m-cmp__table thead th.m-cmp__corner {
		padding-left: 2px;
	}

	.m-cmp__mini {
		width: 40px;
		border-radius: 4px;
	}

	.m-cmp__tier-name {
		font-size: 0.5625rem;
		letter-spacing: 0.04em;
	}

	.m-cmp__tier-price {
		font-size: 1.0625rem;
	}

	.m-cmp__tier-per,
	.m-cmp__group-note {
		display: none;
	}

	.m-cmp__table .m-cmp__group-row > th,
	.m-cmp__table .m-cmp__group-row > td {
		--m-cmp-gap: 14px;
		padding: calc(var(--m-cmp-gap) + 10px) 6px 10px;
	}

	.m-cmp__table .m-cmp__group-title {
		padding-left: 8px;
		font-size: 0.875rem;
		letter-spacing: 0.1em;
	}

	.m-cmp__text--note {
		display: block;
		margin: 4px 0 0;
		font-size: 0.6875rem;
	}

	.m-cmp__table tfoot td {
		padding: 14px 4px;
	}

	.m-cmp__btn {
		padding: 10px 4px;
		border-radius: 12px;
		font-size: 0.8125rem;
	}

	.m-cmp__btn-long {
		display: none;
	}

	.m-cmp__btn-short {
		display: inline;
	}
}

@media (prefers-reduced-motion: reduce) {
	.m-cmp__table thead th,
	.m-cmp__btn {
		transition: none;
	}
}

/* Tap targets at least 44px tall on phones (Owen's request). */
@media screen and (max-width: 767px) {
	.m-cmp__btn {
		min-height: 44px;
	}
}
