/*
 * proof/why, after designwithblink.com's section (003), kept open: the
 * shared centred head, then the comparison as a plain list on hairlines.
 * Criteria 1.6 fr, PROOF and the others 1 fr each. The PROOF column: a lime
 * mark under its head and a blue check in a soft lime disc; the others
 * thin quiet marks. No card, no column fill. Padded top and bottom alike.
 */

.pf-block.pf-whysec {
	--pf-why-bg: #fff; /* the page is white here (reset.css); the sticky criteria column covers with the same colour */
	padding-top: calc(120 * var(--pf-u));
	padding-bottom: calc(120 * var(--pf-u));
	background: var(--pf-why-bg);
}
.pf-block .pf-why-scroll {
	margin-top: calc(64 * var(--pf-u));
}
/* reset.css (loaded after the blocks) gives every table cell a grey border,
   15px padding, zebra rows and a hover tint: all of that is undone here with
   higher specificity. Only our own hairlines remain. */
.pf-block table.pf-why-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
	background: transparent;
	font-family: var(--pf-sans);
	font-size: inherit;
}
.pf-block table.pf-why-table th,
.pf-block table.pf-why-table td {
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	vertical-align: middle;
	font-weight: 400;
	line-height: 1.3;
}
.pf-block table.pf-why-table thead:first-child tr:first-child th {
	border-block-start: 0;
}
.pf-block table.pf-why-table tbody > tr:nth-child(odd) > td,
.pf-block table.pf-why-table tbody > tr:nth-child(odd) > th,
.pf-block table.pf-why-table tbody tr:hover > td,
.pf-block table.pf-why-table tbody tr:hover > th {
	background: transparent;
}
.pf-block table.pf-why-table .pf-why-crit {
	width: 34%;
	padding-right: calc(24 * var(--pf-u));
	text-align: left;
	font-size: calc(20 * var(--pf-t));
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--pf-ink);
}
.pf-block table.pf-why-table thead th {
	padding-bottom: calc(18 * var(--pf-u));
	font-family: var(--pf-mono);
	font-size: calc(12 * var(--pf-t));
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pf-muted);
}
.pf-block .pf-why-table thead .pf-why-col--hl {
	position: relative;
	color: var(--pf-ink);
}
.pf-block .pf-why-table thead .pf-why-col--hl::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -2px;
	width: 36px;
	height: 3px;
	transform: translateX(-50%);
	border-radius: 2px;
	background: var(--pf-lime);
}
.pf-block table.pf-why-table tbody > tr > th,
.pf-block table.pf-why-table tbody > tr > td {
	height: calc(88 * var(--pf-u));
	border-top: 1px solid var(--pf-rule);
}
.pf-block table.pf-why-table tbody > tr > .pf-why-crit {
	text-align: left;
}
/* Marks */
.pf-block .pf-why-mark {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	color: rgba(16, 17, 20, 0.28);
}
.pf-block .pf-why-mark svg {
	width: 24px;
	height: 24px;
}
.pf-block .pf-why-mark--yes {
	color: var(--pf-ink);
}
.pf-block .pf-why-mark--partial {
	color: var(--pf-muted);
}
.pf-block .pf-why-mark--hl {
	color: var(--pf-blue);
	border-radius: 50%;
	background: rgba(173, 247, 30, 0.55);
}
.pf-block .pf-why-legend {
	margin-top: calc(24 * var(--pf-u));
	font-family: var(--pf-mono);
	font-size: calc(12 * var(--pf-t));
	letter-spacing: 0.04em;
	color: var(--pf-muted);
}

@media (max-width: 1024px) {
	.pf-block.pf-whysec {
		padding-top: 80px;
		padding-bottom: 80px;
	}
	.pf-block .pf-why-scroll {
		margin-top: 40px;
	}
	.pf-block table.pf-why-table .pf-why-crit {
		font-size: 17px;
	}
	.pf-block table.pf-why-table tbody th,
	.pf-block table.pf-why-table tbody td {
		height: 76px;
	}
}
/* Phone: the criteria column stays, the rest scrolls sideways. */
@media (max-width: 767px) {
	.pf-block .pf-why-scroll {
		margin-right: calc(-1 * var(--pf-gutter));
		padding-right: var(--pf-gutter);
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.pf-block .pf-why-scroll::-webkit-scrollbar {
		display: none;
	}
	.pf-block .pf-why-table {
		table-layout: auto;
	}
	/* The criteria column stays while the marks scroll beneath it; a rule
	   and a soft shadow on its right edge make that read as intended
	   (the marks "disappear" under it, they are not hidden). Narrower
	   column, so three mark columns fit beside it. */
	.pf-block table.pf-why-table .pf-why-crit {
		position: sticky;
		left: 0;
		z-index: 2;
		width: 40vw;
		min-width: 40vw;
		padding-right: 12px;
		background: var(--pf-why-bg);
		background-clip: padding-box;
		box-shadow: 1px 0 0 var(--pf-rule), 8px 0 12px -6px rgba(16, 17, 20, 0.12);
		font-size: 14px;
		line-height: 1.3;
	}
	.pf-block table.pf-why-table thead .pf-why-crit {
		box-shadow: 1px 0 0 var(--pf-rule);
	}
	/* Outranks the transparent zebra / hover / thead resets above. */
	.pf-block table.pf-why-table tbody > tr:nth-child(odd) > .pf-why-crit,
	.pf-block table.pf-why-table tbody > tr:nth-child(even) > .pf-why-crit,
	.pf-block table.pf-why-table tbody > tr:hover > .pf-why-crit,
	.pf-block table.pf-why-table thead:first-child tr:first-child th.pf-why-crit {
		background: var(--pf-why-bg);
	}
	/* The rule lines are translucent; an opaque equivalent, so nothing
	   (e.g. the lime underline of the PROOF column) shows through them. */
	.pf-block table.pf-why-table tbody > tr > .pf-why-crit {
		border-top-color: #e6e6e6;
	}
	.pf-block table.pf-why-table thead .pf-why-crit {
		z-index: 3;
	}
	/* Keep the PROOF underline inside its header cell, so it cannot peek
	   out in the collapsed border row beside the sticky column. */
	.pf-block .pf-why-table thead .pf-why-col--hl::after {
		bottom: 1px;
	}
	.pf-block table.pf-why-table thead th {
		padding-bottom: 12px;
		font-size: 11px;
	}
	.pf-block .pf-why-col {
		width: 76px;
		min-width: 76px;
	}
	.pf-block table.pf-why-table tbody th,
	.pf-block table.pf-why-table tbody td {
		height: 68px;
	}
	.pf-block .pf-why-mark {
		width: 38px;
		height: 38px;
	}
	.pf-block .pf-why-mark svg {
		width: 20px;
		height: 20px;
	}
}
