@charset "UTF-8";

/*
 * The CSS vs JavaScript comparison pages (src/_includes/comparison.njk, the owner's
 * "02 Race" layout) and their hub (src/css-vs-javascript.njk), 2026-11-14.
 *
 * Loads after /css/home.css (Jost, DM Mono, the chip and the focus ring) and
 * /css/example.css (the code blocks, the support table, the FAQ), and before
 * /css/chrome.css (the dark top bar), the way the approved mockups load their
 * stylesheets. Built from them (mockups/css-vs-javascript/): the charts from
 * 04-chart-gallery.css without the gallery page's own rules, the version
 * colors, the shared comparison layer _compare.css, then 02-race.css (scoped
 * to .rc and body.cv-rc) and 05-hub.css (scoped to .hub and body.cv-hub). The
 * mockups keep their own copies as the record of what was approved; this file
 * is the one the site uses.
 *
 * The page has no script: the test condition, the library build, the hub's
 * rival and the theme are radios and a checkbox, read with :has(). Every
 * chart is inline SVG drawn at build time (comparison/charts.mjs).
 *
 * Flat CSS only (the repo's iOS 15.2 rule).
 */

/* ══ Charts (from 04-chart-gallery.css) ══════════════════════════════════ */

/*
 * Paper by default, dark when #theme-toggle is checked, as on the home page.
 * The plots are inline SVG with no viewBox: x in percent of the plot's width,
 * y in pixels, so text keeps its size at every width. The version tokens
 * (--v-css, --v-van, --v-lib, --v-trim) are set under The version colors
 * below. The outcome tokens (--out-*) say only who wins: green, gray, red,
 * each shipped with an icon and a word, and never a version's identity.
 */

/* ── Tokens ────────────────────────────────────────────────────────────── */

body.cg-page {
	--cg-bg: #f4f1eb;
	--cg-ink: #0c0c0d;
	--cg-body: #1f1e1b;
	--cg-muted: #55534c;
	--cg-faint: #67655d;
	--cg-line: rgba(12, 12, 13, .18);
	--cg-rule: #0c0c0d;
	--cg-grid: rgba(12, 12, 13, .09);
	--cg-base: rgba(12, 12, 13, .5);
	--cg-track: rgba(12, 12, 13, .09);
	--cg-hover: rgba(12, 12, 13, .07);
	--cg-tie: #dcd8cf;
	--cg-tip: #0c0c0d;
	--cg-tip-ink: #f4f1eb;
	--cg-tip-muted: #bcb9b0;
	--cg-badge: #0c0c0d;
	--cg-badge-ink: #f4f1eb;
	--cg-rail: #0c0c0d;
	--cg-rail-ink: #f4f1eb;
	--cg-rail-line: rgba(244, 241, 235, .26);
	--cg-rail-muted: #b9b6ad;
	--cg-wrap: 86rem;
	/* who wins: a fill, the type that sits on it, and a mark-weight gray for a
	   tie drawn as a thin bar */
	--out-win: #14632b;
	--out-win-ink: #ffffff;
	--out-lose: #e8604c;
	--out-lose-ink: #0c0c0d;
	--out-tie: #dcd8cf;
	--out-tie-ink: #0c0c0d;
	--out-tie-mark: #67655d;
	/* the scorecard's steps: deeper the further ahead, each with its own ink */
	--sc-win1: #b2c5ae;
	--sc-win2: #6e9871;
	--sc-win3: #14632b;
	--sc-win1-ink: #0c0c0d;
	--sc-win2-ink: #0c0c0d;
	--sc-win3-ink: #ffffff;
	--sc-lose1: #f6c1b3;
	--sc-lose2: #f08c79;
	--sc-lose3: #e8604c;
	--sc-lose1-ink: #0c0c0d;
	--sc-lose2-ink: #0c0c0d;
	--sc-lose3-ink: #0c0c0d;
	color: var(--cg-ink);
	background: var(--cg-bg);
}

body.cg-page:has(#theme-toggle:checked) {
	--cg-bg: #0c0c0d;
	--cg-ink: #f4f1eb;
	--cg-body: #e4e1da;
	--cg-muted: #aeaba3;
	--cg-faint: #96938b;
	--cg-line: rgba(244, 241, 235, .18);
	--cg-rule: #f4f1eb;
	--cg-grid: rgba(244, 241, 235, .09);
	--cg-base: rgba(244, 241, 235, .5);
	--cg-track: rgba(244, 241, 235, .11);
	--cg-hover: rgba(244, 241, 235, .08);
	--cg-tie: #2c2c30;
	--cg-tip: #f4f1eb;
	--cg-tip-ink: #0c0c0d;
	--cg-tip-muted: #4f4e48;
	--cg-badge: #f4f1eb;
	--cg-badge-ink: #0c0c0d;
	--cg-rail: #1f1f22;
	--cg-rail-ink: #f4f1eb;
	--cg-rail-line: rgba(244, 241, 235, .22);
	--cg-rail-muted: #a9a69e;
	--out-win: #5fd17a;
	--out-win-ink: #0c0c0d;
	--out-lose: #c23b2c;
	--out-lose-ink: #ffffff;
	--out-tie: #2c2c30;
	--out-tie-ink: #f4f1eb;
	--out-tie-mark: #96938b;
	--sc-win1: #294830;
	--sc-win2: #3a7046;
	--sc-win3: #5fd17a;
	--sc-win1-ink: #f4f1eb;
	--sc-win2-ink: #f4f1eb;
	--sc-win3-ink: #0c0c0d;
	--sc-lose1: #57241d;
	--sc-lose2: #8a3025;
	--sc-lose3: #c23b2c;
	--sc-lose1-ink: #f4f1eb;
	--sc-lose2-ink: #f4f1eb;
	--sc-lose3-ink: #ffffff;
}

::selection {
	color: #0c0c0d;
	background: #b8ff57;
}

.cg-defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* ── The picked test condition chip ──────────────────────────────────── */

/* the picked chip: lime with ink type */
body:has(#cond-laptop:checked) [for="cond-laptop"],
body:has(#cond-phone:checked) [for="cond-phone"],
body:has(#cond-busy:checked) [for="cond-busy"] {
	color: #0c0c0d;
	background: #b8ff57;
	border-color: #0c0c0d;
}

body:has(#cond-laptop:focus-visible) [for="cond-laptop"],
body:has(#cond-phone:focus-visible) [for="cond-phone"],
body:has(#cond-busy:focus-visible) [for="cond-busy"] {
	outline: 3px solid #b8ff57;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #0c0c0d;
}

/* ── Only the picked test condition shows ──────────────────────────────── */

body:has(#cond-laptop:checked) .when:not(.when-laptop),
body:has(#cond-phone:checked) .when:not(.when-phone),
body:has(#cond-busy:checked) .when:not(.when-busy) {
	display: none;
}

/* without :has() the chips cannot switch, so the phone shows alone */
@supports not selector(:has(a)) {
	.when-laptop,
	.when-busy {
		display: none;
	}
}

/* ── Topics and forms ──────────────────────────────────────────────────── */

.chart {
	position: relative;
}

/* ── Keys and legends ──────────────────────────────────────────────────── */

.key {
	display: inline-block;
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 3px;
}

.key-css {
	background: var(--v-css);
}

.key-van {
	background: var(--v-van);
}

.key-lib {
	background: var(--v-lib);
}

.key-trim {
	background: var(--v-trim);
}

/* ── Who wins: chips, best badges, the tally bar ───────────────────────── */

/* a chart card's verdict: the measure it judges, then a chip from CSS's side */
.vd-row {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem .6rem;
	margin: 0;
}

.vd-what {
	font-size: .8rem;
	font-weight: 600;
	color: var(--cg-muted);
}

.vd {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-height: 28px;
	padding: .2rem .7rem .2rem .55rem;
	font-size: .85rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	border-radius: 999px;
}

.vd .fa-icon {
	width: .85rem;
	height: .85rem;
	flex: none;
	fill: currentColor;
}

.vd-win {
	color: var(--out-win-ink);
	background: var(--out-win);
}

.vd-tie {
	color: var(--out-tie-ink);
	background: var(--out-tie);
}

.vd-lose {
	color: var(--out-lose-ink);
	background: var(--out-lose);
}

.vd-none {
	color: var(--cg-muted);
	border: 1.5px dashed var(--cg-line);
}

/* a row that wins its measure on a chart of three or four versions */
.best {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	padding: .18rem .5rem .18rem .4rem;
	font: 700 .7rem/1.2 var(--font-sans);
	letter-spacing: .01em;
	white-space: nowrap;
	color: var(--out-win-ink);
	background: var(--out-win);
	border-radius: 999px;
}

.best .fa-icon {
	width: .65rem;
	height: .65rem;
	flex: none;
	fill: currentColor;
}

/* the tally: one segmented bar, a block per outcome */
.tb {
	display: block;
	width: 100%;
	overflow: visible;
}

.tb-win {
	fill: var(--out-win);
}

.tb-tie {
	fill: var(--out-tie);
}

.tb-lose {
	fill: var(--out-lose);
}

.tb-n {
	font: 700 14px var(--font-sans);
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.tb-n-win {
	fill: var(--out-win-ink);
}

.tb-n-tie {
	fill: var(--out-tie-ink);
}

.tb-n-lose {
	fill: var(--out-lose-ink);
}

.lg-out {
	display: inline-block;
	width: 22px;
	height: 12px;
	border-radius: 3px;
}

.lg-out-win {
	background: var(--out-win);
}

.lg-out-tie {
	background: var(--out-tie);
	box-shadow: inset 0 0 0 1px var(--cg-line);
}

.lg-out-lose {
	background: var(--out-lose);
}

.lg-icon {
	width: .8rem;
	height: .8rem;
	flex: none;
	fill: var(--cg-ink);
}

.legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem 1.4rem;
	margin: 0 0 1rem;
	font-size: .85rem;
	color: var(--cg-muted);
}

.lg-item {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
}

.lg-note {
	font-style: italic;
}

.lg-task,
.lg-over,
.lg-blank,
.lg-dead,
.lg-seg,
.lg-sc {
	display: inline-block;
	width: 22px;
	height: 12px;
	border-radius: 2px;
}

.lg-task {
	background: var(--cg-muted);
}

.lg-over {
	background: repeating-linear-gradient(45deg, var(--cg-muted) 0 3px, var(--cg-bg) 3px 5px);
}

.lg-warn {
	width: .9rem;
	height: .9rem;
	fill: var(--cg-ink);
}

.lg-on,
.lg-off {
	display: inline-block;
	width: 2px;
	height: 14px;
	background: var(--cg-muted);
}

.lg-off {
	height: 6px;
	align-self: flex-end;
	margin-bottom: 3px;
	background: var(--cg-faint);
}

.lg-still {
	display: inline-block;
	width: 22px;
	height: 6px;
	border: 1.5px solid var(--cg-ink);
	border-bottom: 0;
}

.lg-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--cg-muted);
}

.lg-med {
	display: inline-block;
	width: 2px;
	height: 16px;
	background: var(--cg-ink);
}

.lg-blank {
	height: 6px;
	background: var(--cg-track);
}

.lg-dead {
	background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--cg-muted) 45%, var(--cg-bg)) 0 3px, var(--cg-bg) 3px 5px);
}

.lg-html {
	background: color-mix(in srgb, var(--cg-muted) 34%, var(--cg-bg));
}

.lg-css {
	background: color-mix(in srgb, var(--cg-muted) 64%, var(--cg-bg));
}

.lg-js {
	background: var(--cg-muted);
}

/* ── Lanes: name, plot, value ──────────────────────────────────────────── */

.lanes {
	display: grid;
}

.lane {
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr) 10.5rem;
	align-items: center;
	column-gap: 1.25rem;
}

.lane + .lane:not(.lane-axis) {
	margin-top: .35rem;
}

.lane-name {
	display: flex;
	align-items: center;
	gap: .55rem;
	min-width: 0;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.2;
}

.lane-val {
	display: flex;
	flex-direction: column;
	gap: .1rem;
	min-width: 0;
}

.v-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .2rem .45rem;
	font: 500 .95rem/1.2 var(--font-mono);
	color: var(--cg-ink);
}

.v-sub {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font: 400 .78rem/1.3 var(--font-mono);
	color: var(--cg-muted);
}

.plot {
	display: block;
	position: relative;
	width: 100%;
	overflow: visible;
	font-family: var(--font-mono);
}

/* the lane under the pointer or focus draws over its neighbors, tooltip and all */
.plot:has(.mk:hover),
.plot:has(.mk:focus) {
	z-index: 5;
}

.plot-axis {
	margin-top: .3rem;
}

.axis-t {
	font-size: 11px;
	fill: var(--cg-faint);
	font-variant-numeric: tabular-nums;
}

.axis-unit {
	font: 400 .75rem/1.2 var(--font-mono);
	color: var(--cg-faint);
}

.lanes-sub {
	grid-column: 1 / -1;
	margin: 1.4rem 0 .3rem;
	padding-top: .8rem;
	border-top: 1px solid var(--cg-line);
}

.lanes-sub p {
	margin: 0;
	font-size: .9rem;
	font-weight: 700;
}

.lane-missing .plot-missing,
.cond-missing {
	display: flex;
	align-items: center;
	gap: .6rem;
	min-height: 30px;
	padding: .4rem .9rem;
	font-size: .9rem;
	color: var(--cg-muted);
	border: 1.5px dashed var(--cg-line);
	border-radius: 8px;
}

.cond-missing {
	min-height: 0;
	padding: 1.5rem;
}

.cond-missing p {
	margin: 0;
}

.plot-missing .fa-icon,
.cond-missing .fa-icon {
	width: 1rem;
	height: 1rem;
	flex: none;
	fill: currentColor;
}

/* ── Marks ─────────────────────────────────────────────────────────────── */

.gl {
	stroke: var(--cg-grid);
	stroke-width: 1;
}

.base {
	stroke: var(--cg-base);
	stroke-width: 1;
}

.fill-css {
	fill: var(--v-css);
}

.fill-van {
	fill: var(--v-van);
}

.fill-lib {
	fill: var(--v-lib);
}

.fill-trim {
	fill: var(--v-trim);
}

/* outcome fills, for the head to head: the side that wins, loses or ties */
.fill-out-win {
	fill: var(--out-win);
}

.fill-out-lose {
	fill: var(--out-lose);
}

.fill-out-tie {
	fill: var(--out-tie-mark);
}

.seg-rest,
.seg-lib,
.w-dead {
	fill-opacity: .38;
}

.seg-html {
	fill-opacity: .34;
}

.seg-css {
	fill-opacity: .64;
}

.gap {
	stroke: var(--cg-bg);
	stroke-width: 2;
}

.track {
	fill: var(--cg-track);
}

/* the part of a task past 50 ms: ground-colored stripes over the task's own color */
.over {
	fill: url(#cg-hatch);
}

.hatch-line {
	fill: var(--cg-bg);
	fill-opacity: .8;
}

.warn-icon {
	fill: var(--cg-ink);
}

.fr-off {
	fill: var(--cg-faint);
}

.still {
	stroke: var(--cg-ink);
	stroke-width: 1.5;
}

.dot {
	stroke: var(--cg-bg);
	stroke-width: 2;
}

.median {
	stroke: var(--cg-ink);
	stroke-width: 2;
}

.w-blank {
	fill: var(--cg-track);
}

/* With JavaScript off: a soft wash in the outcome color behind each row (the icon and the word
   carry the outcome too, so it never rests on color alone) */
.w-works {
	fill: color-mix(in oklab, var(--out-win) 20%, transparent);
}

.w-never {
	fill: color-mix(in oklab, var(--out-lose) 24%, transparent);
}

.w-hatch {
	fill: url(#cg-hatch);
}

.w-label,
.off-t,
.na-t {
	font-size: 12px;
	fill: var(--cg-body);
}

.off-yes {
	fill: var(--out-win);
}

.off-no {
	fill: var(--out-lose);
}

/* the row's result at the right edge: a pill like the "tied best" badge, in the outcome colors */
.off-pill {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .2rem .6rem .2rem .45rem;
	font: 700 .8rem/1.2 var(--font-sans);
	letter-spacing: .01em;
	white-space: nowrap;
	border-radius: 999px;
}

.off-pill .fa-icon {
	width: .7rem;
	height: .7rem;
	flex: none;
	fill: currentColor;
}

.off-pill-yes {
	color: var(--out-win-ink);
	background: var(--out-win);
}

.off-pill-no {
	color: var(--out-lose-ink);
	background: var(--out-lose);
}

/* ── Hover, focus and tooltips ─────────────────────────────────────────── */

.mk {
	cursor: default;
}

.mk:focus {
	outline: none;
}

.hit {
	fill: transparent;
}

.mk:hover .hit,
.mk:focus-visible .hit {
	fill: var(--cg-hover);
}

.mk:focus-visible .hit {
	stroke: var(--cg-ink);
	stroke-width: 2;
}

.mk:hover .task,
.mk:focus-visible .task,
.mk:hover .dot,
.mk:focus-visible .dot {
	stroke: var(--cg-ink);
	stroke-width: 1.5;
}

.tip {
	display: none;
	pointer-events: none;
}

.mk:hover .tip,
.mk:focus .tip {
	display: inline;
}

.tip-bg {
	fill: var(--cg-tip);
}

.tip-v {
	font: 500 13px var(--font-mono);
	fill: var(--cg-tip-ink);
}

.tip-t {
	font: 400 12px var(--font-mono);
	fill: var(--cg-tip-muted);
}

/* ── 1. Stat tiles ─────────────────────────────────────────────────────── */

.stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid var(--cg-line);
	border-bottom: 1px solid var(--cg-line);
}

.stat {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	min-width: 0;
	padding: 1.25rem 1.5rem 1.5rem;
}

.stat + .stat {
	border-left: 1px solid var(--cg-line);
}

.stat:first-child {
	padding-left: 0;
}

.stat:last-child {
	padding-right: 0;
}

.stat-label {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
}

.stat-sub {
	margin: 0;
	font-size: .82rem;
	color: var(--cg-muted);
}

.stat-big {
	display: flex;
	align-items: baseline;
	gap: .5rem;
	margin: .6rem 0 .5rem;
}

.stat-vd {
	margin: 0 0 1rem;
}

.big-n {
	font-size: clamp(2.1rem, 3vw, 2.75rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.02em;
}

.big-who {
	font-size: .9rem;
	font-weight: 600;
	color: var(--cg-muted);
}

.meter {
	display: grid;
	gap: .45rem;
	margin-top: auto;
}

.mrow {
	display: grid;
	grid-template-columns: 12px 7.25rem minmax(0, 1fr) auto;
	align-items: center;
	gap: .55rem;
	font-size: .82rem;
}

/* a long name wraps to a second line rather than being cut */
.mname {
	font-weight: 600;
	line-height: 1.15;
}

.mbar {
	display: block;
	width: 100%;
	overflow: visible;
}

.mbar-none {
	height: 12px;
}

.mval {
	font: 400 .78rem var(--font-mono);
	color: var(--cg-body);
	text-align: right;
	white-space: nowrap;
}

.stat-off .mrow {
	grid-template-columns: 12px 7.25rem minmax(0, 1fr);
}

.moff {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-weight: 600;
}

.moff .fa-icon {
	width: .95rem;
	height: .95rem;
	flex: none;
	fill: var(--cg-ink);
}

.moff.is-no {
	color: var(--cg-muted);
}

/* ── 9. Scorecard ──────────────────────────────────────────────────────── */

.sc-wrap {
	overflow-x: auto;
}

.scorecard {
	width: 100%;
	min-width: 60rem;
	border-collapse: separate;
	border-spacing: 3px;
	table-layout: fixed;
}

.scorecard thead th {
	padding: 0 .5rem .5rem;
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
	vertical-align: bottom;
	color: var(--cg-muted);
}

/* room for the topic and the version its row compares against */
.scorecard thead th:first-child {
	width: 9rem;
}

.scorecard tbody th {
	padding-right: .75rem;
	font-size: 1rem;
	font-weight: 700;
	text-align: left;
}

/* which version the row's cells compare against, under the topic's name */
.sc-topic {
	display: block;
}

.sc-vs {
	display: flex;
	align-items: center;
	gap: .4rem;
	margin-top: .3rem;
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--cg-muted);
}

.sc-vs .key {
	width: 10px;
	height: 10px;
	border-radius: 2px;
}

/* the table's caption names what every cell compares against */
.sc-cap {
	padding-bottom: .75rem;
	font-size: 1rem;
	font-weight: 700;
	text-align: left;
	caption-side: top;
}

.sc-cap-on {
	display: block;
	margin-top: .15rem;
	font-size: .82rem;
	font-weight: 500;
	color: var(--cg-muted);
}

.sc {
	padding: .6rem .6rem .7rem;
	vertical-align: top;
	border-radius: 6px;
}

.sc-word {
	display: flex;
	align-items: center;
	gap: .35rem;
	font-size: .82rem;
	font-weight: 700;
	line-height: 1.2;
}

.sc-word .fa-icon {
	width: .8rem;
	height: .8rem;
	flex: none;
	fill: currentColor;
}

/* each cell: the verdict, then CSS's figure and the JavaScript version's,
   that version named with its color key */
.sc-fig {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .1rem .75rem;
	margin-top: .4rem;
	font-size: .76rem;
	line-height: 1.35;
}

.sc-fig + .sc-fig {
	margin-top: .1rem;
}

.sc-who {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	min-width: 0;
	font-weight: 600;
	white-space: nowrap;
}

.sc-who .key {
	width: 9px;
	height: 9px;
	border-radius: 2px;
	box-shadow: 0 0 0 1.5px var(--cg-bg);
}

/* a figure stays on one line; a phrase ("shows, clicks do nothing") wraps
   under the name, still flush right */
.sc-n {
	margin-left: auto;
	font-family: var(--font-mono);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* in the hub's narrow columns the JavaScript version's name takes its own
   line, its figure flush right under it, so every cell has the same shape */
@media (min-width: 768px) {
	.scorecard:not(.cv-verdicts) .sc-fig + .sc-fig {
		flex-direction: column;
		align-items: stretch;
	}

	.scorecard:not(.cv-verdicts) .sc-fig + .sc-fig .sc-n {
		align-self: flex-end;
	}
}

/* green steps for CSS ahead, red steps for JavaScript ahead, gray for a tie;
   the ink on each step is picked for its contrast */
.sc-win1,
.lg-sc.sc-win1 {
	color: var(--sc-win1-ink);
	background: var(--sc-win1);
}

.sc-win2,
.lg-sc.sc-win2 {
	color: var(--sc-win2-ink);
	background: var(--sc-win2);
}

.sc-win3,
.lg-sc.sc-win3 {
	color: var(--sc-win3-ink);
	background: var(--sc-win3);
}

.sc-lose1,
.lg-sc.sc-lose1 {
	color: var(--sc-lose1-ink);
	background: var(--sc-lose1);
}

.sc-lose2,
.lg-sc.sc-lose2 {
	color: var(--sc-lose2-ink);
	background: var(--sc-lose2);
}

.sc-lose3,
.lg-sc.sc-lose3 {
	color: var(--sc-lose3-ink);
	background: var(--sc-lose3);
}

.sc-tie,
.lg-sc.sc-tie {
	color: var(--out-tie-ink);
	background: var(--out-tie);
}

.sc-none {
	color: var(--cg-muted);
	border: 1.5px dashed var(--cg-line);
}

.lg-sc + .lg-sc {
	margin-left: -2px;
}

.sc-key {
	margin-bottom: 1.25rem;
}

.sc-key .legend {
	margin-bottom: .45rem;
}

.sc-rule {
	max-width: 72ch;
	margin: 0;
	font-size: .85rem;
	line-height: 1.45;
	color: var(--cg-muted);
}

/* ── See the numbers ───────────────────────────────────────────────────── */

.nums {
	margin-top: 1.25rem;
}

.nums summary {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .35rem 0;
	font-size: .9rem;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.nums summary::-webkit-details-marker {
	display: none;
}

.nums summary .fa-icon {
	width: .95rem;
	height: .95rem;
	fill: currentColor;
}

.nums summary span {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
}

.nums-wrap {
	overflow-x: auto;
	margin-top: .5rem;
}

.nums table {
	width: 100%;
	border-collapse: collapse;
	font-size: .85rem;
}

.nums caption {
	padding-bottom: .5rem;
	font-size: .82rem;
	text-align: left;
	color: var(--cg-muted);
}

.nums th,
.nums td {
	padding: .4rem .75rem .4rem 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--cg-line);
}

.nums thead th {
	font-size: .78rem;
	color: var(--cg-muted);
}

.nums tbody th {
	font-weight: 500;
}

.nums td.num {
	font-family: var(--font-mono);
	font-size: .8rem;
	font-variant-numeric: tabular-nums;
}

.nums-note {
	margin: .6rem 0 0;
	font-size: .8rem;
	color: var(--cg-muted);
}

/* ── Code in chart text ───────────────────────────────────────────────── */

code {
	font-family: var(--font-mono);
	font-size: .9em;
}

/* ── Draw in once, when a chart scrolls into view ──────────────────────── */

/* At rest every chart is fully drawn. Where scroll-triggered animations exist
   and motion is welcome, a chart that scrolls into view draws in once, at a
   fixed speed: bars and blocks grow from the baseline, points fade up. The
   scroll only starts it. Scrolling halfway in never leaves a chart half drawn,
   and scrolling away never undraws it. Without the trigger, or under reduced
   motion, nothing here applies and the charts are simply drawn. The trigger
   and the animation are gated together, so a browser that has one without
   the other never waits at zero. */
@supports (timeline-trigger: --cg-draw view()) and (animation-trigger: --cg-draw play-once) {
	@media (prefers-reduced-motion: no-preference) {
		.chart,
		.h2h {
			timeline-trigger: --cg-draw view() entry 20% cover 100%;
		}

		.chart .grow,
		.h2h .h2h-grow {
			transform-box: view-box;
			transform-origin: 0 50%;
			animation: cg-grow .9s cubic-bezier(.16, 1, .3, 1) both;
			animation-trigger: --cg-draw play-once;
		}

		/* the head to head's CSS bar grows left, out from the middle line */
		.h2h-a .h2h-grow {
			transform-origin: 100% 50%;
		}

		.chart .fade {
			animation: cg-fade .7s cubic-bezier(.16, 1, .3, 1) both;
			animation-trigger: --cg-draw play-once;
		}

		/* the lanes follow one another down the chart */
		.lane:nth-child(2) .grow,
		.lane:nth-child(2) .fade,
		.h2h-row:nth-child(2) .h2h-grow {
			animation-delay: 60ms;
		}

		.lane:nth-child(3) .grow,
		.lane:nth-child(3) .fade,
		.h2h-row:nth-child(3) .h2h-grow {
			animation-delay: 120ms;
		}

		.lane:nth-child(4) .grow,
		.lane:nth-child(4) .fade,
		.h2h-row:nth-child(4) .h2h-grow {
			animation-delay: 180ms;
		}

		.lane:nth-child(n + 5) .grow,
		.lane:nth-child(n + 5) .fade,
		.h2h-row:nth-child(n + 5) .h2h-grow {
			animation-delay: 240ms;
		}
	}
}

@keyframes cg-grow {
	from {
		transform: scaleX(0);
	}

	to {
		transform: scaleX(1);
	}
}

@keyframes cg-fade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* ── Narrow screens ────────────────────────────────────────────────────── */

@media (max-width: 1199.98px) {
	.stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.stat:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}

	.stat:nth-child(2) {
		padding-right: 0;
	}

	.stat:nth-child(n + 3) {
		border-top: 1px solid var(--cg-line);
	}
}

@media (max-width: 767.98px) {

	.lane {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"name val"
			"plot plot";
		row-gap: .2rem;
	}

	.lane + .lane:not(.lane-axis) {
		margin-top: .9rem;
	}

	.lane-name {
		grid-area: name;
	}

	.lane-val {
		grid-area: val;
		align-items: flex-end;
		text-align: right;
	}

	.lane .plot,
	.lane .plot-missing {
		grid-area: plot;
	}

	.lane-axis {
		grid-template-areas:
			"plot plot"
			"name val";
	}

	.stats {
		grid-template-columns: minmax(0, 1fr);
	}

	.stat,
	.stat:first-child,
	.stat:last-child,
	.stat:nth-child(2),
	.stat:nth-child(3) {
		padding: 1.1rem 0 1.25rem;
	}

	.stat + .stat {
		border-top: 1px solid var(--cg-line);
		border-left: 0;
	}

	/* the scorecard turns into one block per topic, a row per measure */
	.scorecard,
	.scorecard caption,
	.scorecard tbody,
	.scorecard tr,
	.scorecard th,
	.scorecard td {
		display: block;
		width: auto;
		min-width: 0;
	}

	.scorecard thead {
		display: none;
	}

	.scorecard tbody tr {
		margin-bottom: 1.75rem;
	}

	.scorecard tbody th {
		padding: 0 0 .5rem;
		font-size: 1.15rem;
	}

	.sc {
		margin-bottom: 3px;
	}

	.sc::before {
		content: attr(data-metric);
		display: block;
		margin-bottom: .2rem;
		font-size: .78rem;
		font-weight: 600;
		color: inherit;
	}
}

/* ══ The version colors ══════════════════════════════════════════════════ */

/* One fixed color per version, the owner's palette B with palette A's violet
   for the trimmed build (2026-11-14). Light is the default; #theme-toggle
   checked is dark. Every chart reads these tokens. This block is PALETTE in
   comparison/charts.mjs (paletteTokens()); the build stops if they differ. */

body {
	--v-css: #548100;
	--v-van: #037bab;
	--v-lib: #c32777;
	--v-trim: #6f2fd6;
}

body:has(#theme-toggle:checked) {
	--v-css: #6da600;
	--v-van: #0097d2;
	--v-lib: #db428c;
	--v-trim: #9a73ff;
}

/* ══ The comparison layer (from _compare.css) ════════════════════════════ */

/*
 * What the comparison page and the hub share: the condition chips, the chart
 * cards, who wins, the demo and its frames, the code, the reading sections and
 * the switches. Every chart mark above is keyed to the --cg tokens on
 * body.cg-page. Breakpoints use Bootstrap's names: sm 576, md 768, lg 992,
 * xl 1200, xxl 1400.
 */

/* ── Page ──────────────────────────────────────────────────────────────── */

body.cv-page {
	--cv-wrap: 88rem;
	--cv-violet: #6f2fd6;
	background: var(--pg);
}

body.cv-page:has(#theme-toggle:checked) {
	--cv-violet: #c084fc;
}

.cv {
	display: block;
	color: var(--pg-ink);
}

/* the gallery sets every <code> a step smaller; code blocks keep the site's size */
.cv pre[class*="language-"] code {
	font-size: inherit;
}

.cv p {
	text-wrap: pretty;
}

.cv h1,
.cv h2,
.cv h3 {
	text-wrap: balance;
}

/* ── Test condition chips ──────────────────────────────────────────────── */

.cv-conds {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1rem;
}

/* the radios sit with their chips, so focusing one never scrolls the page */
.cv-pick {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.cv-conds-label {
	font-size: .9rem;
	font-weight: 700;
	color: var(--pg-muted);
}

.cv-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}

.cv-chip {
	min-height: 40px;
	padding: 0 1rem;
	color: var(--pg-ink);
	border-color: var(--pg-line);
}

.cv-chip:hover {
	border-color: var(--pg-ink);
}

.cv-chip .fa-icon {
	width: 1rem;
	height: 1rem;
	flex: none;
	fill: currentColor;
}

.cv-cond-note {
	margin: 0;
	font-size: .85rem;
	line-height: 1.45;
	color: var(--pg-muted);
}

/* ── Chart blocks ──────────────────────────────────────────────────────── */

.cv-chart {
	min-width: 0;
}

.cv-chart-head {
	margin-bottom: 1.5rem;
}

.cv-chart-head h2,
.cv-chart-head h3 {
	margin: 0;
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.015em;
}

/* the title, and beside it the chip saying who wins this chart's measure */
.cv-chart-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .6rem 1.5rem;
}

.cv-chart-vd .vd-what {
	color: var(--pg-muted);
}

/* a smaller chip, for a row inside a chart */
.vd-sm {
	min-height: 22px;
	padding: .1rem .55rem .1rem .45rem;
	font-size: .75rem;
}

.vd-sm .fa-icon {
	width: .7rem;
	height: .7rem;
}

/* ── Who wins: the tally per JavaScript version ────────────────────────── */

.vt-head {
	margin-bottom: 1.1rem;
}

.vt-head h2,
.vt-head h3 {
	margin: 0;
	font-size: clamp(2rem, 3.6vw, 3rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.025em;
}

.vt .tb-legend {
	margin-bottom: 1.25rem;
}

.vt-rows {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* name and count on one line, the bar under them; from lg the three share a row */
.vt-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: .45rem 1.5rem;
}

.vt-row .tb {
	grid-column: 1 / -1;
}

.vt-name {
	display: flex;
	align-items: center;
	gap: .55rem;
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
}

.vt-count {
	margin: 0;
	font-size: .95rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	color: var(--pg-body);
}

@media (max-width: 575.98px) {
	.vt-row {
		grid-template-columns: minmax(0, 1fr);
		gap: .3rem;
	}

	.vt-count {
		font-size: .9rem;
	}
}

@media (min-width: 992px) {
	.vt-row {
		grid-template-columns: 15rem 12.5rem minmax(0, 1fr);
		gap: 1.5rem;
	}

	.vt-row .tb {
		grid-column: auto;
	}
}

.vt-rule {
	max-width: 72ch;
	margin: 1.1rem 0 0;
	font-size: .85rem;
	line-height: 1.45;
	color: var(--pg-muted);
}

.cv-chart-cap {
	max-width: 62ch;
	margin: .45rem 0 0;
	font-size: .95rem;
	line-height: 1.5;
	color: var(--pg-muted);
}

.cv-sub-h {
	margin: 2.25rem 0 0;
	font-size: 1.05rem;
	font-weight: 700;
}

.cv-sub-h + .cv-chart-cap {
	margin: .25rem 0 1rem;
}

/* ── The verdict grid: one topic, a column per JavaScript version ──────── */

.cv-verdict-wrap {
	overflow-x: auto;
}

.cv-verdicts {
	min-width: 0;
	max-width: 56rem;
}

.cv-verdicts thead th:first-child {
	width: 11rem;
}

.cv-verdicts thead th {
	font-size: .85rem;
	color: var(--cg-body);
}

.cv-verdicts thead th .key {
	margin-right: .45rem;
	vertical-align: -1px;
}

.cv-verdicts tbody th {
	font-size: .92rem;
	line-height: 1.25;
}

.cv-tally {
	display: grid;
	gap: .35rem;
	margin: 0 0 1.1rem;
	padding: 0;
	list-style: none;
	font-size: 1rem;
	font-weight: 600;
}

.cv-tally li {
	display: flex;
	align-items: center;
	gap: .6rem;
}

.cv-verdicts .sc-fig {
	font-size: .8rem;
}

/* ── The live CSS demo ─────────────────────────────────────────────────── */

/* The rig's CSS version is written for a light page (its open header is a
   tint over whatever sits behind it), so it plays on the rig's own ground,
   #f6f5f8 from bench/shared/shell.css, in both themes. Demos keep their own
   colors; the frame shows the jQuery UI version on the same ground. */
.cv-plate {
	display: grid;
	place-items: center;
	width: 100%;
	max-width: 620px;
	margin-inline: auto;
	padding: clamp(1rem, 2.5vw, 1.75rem);
	background: #f6f5f8;
	border-radius: 14px;
}

.cv-demo {
	width: 100%;
	max-width: 560px;
	margin-inline: auto;
}

/* ── The frame: a closed <details>, a lazy sandboxed <iframe> ───────────── */

.cv-frame {
	width: 100%;
	max-width: 560px;
	margin-inline: auto;
}

.cv-frame-open {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: 1.1rem 1.25rem;
	color: var(--pg-ink);
	background: var(--pg);
	border: 1.5px solid var(--pg-line);
	border-radius: 14px;
	cursor: pointer;
	list-style: none;
	transition: border-color .2s var(--ease-out);
}

.cv-frame-open::-webkit-details-marker {
	display: none;
}

.cv-frame-open:hover {
	border-color: var(--pg-ink);
}

.cv-frame-icon {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	color: var(--pg);
	background: var(--pg-ink);
	border-radius: 50%;
	transition: background-color .2s var(--ease-out);
}

.cv-frame-icon .fa-icon {
	width: 1rem;
	height: 1rem;
	fill: currentColor;
}

.cv-frame-icon .cv-when-closed {
	margin-left: 3px;
}

.cv-frame-open:hover .cv-frame-icon {
	background: var(--cv-violet);
}

.cv-frame-words {
	display: grid;
	gap: .2rem;
	min-width: 0;
}

.cv-frame-title {
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.2;
}

.cv-frame-note {
	font-size: .88rem;
	line-height: 1.45;
	color: var(--pg-muted);
}

.cv-frame-chev {
	width: 1rem;
	height: 1rem;
	fill: currentColor;
	transition: transform .25s var(--ease-out);
}

.cv-frame[open] .cv-frame-chev {
	transform: rotate(180deg);
}

.cv-when-open,
.cv-frame[open] .cv-when-closed {
	display: none;
}

.cv-frame[open] .cv-when-open {
	display: inline;
}

.cv-frame[open] .cv-frame-icon .cv-when-open {
	display: block;
}

.cv-frame[open] .cv-frame-note.cv-when-open {
	display: block;
}

.cv-frame-box {
	margin-top: .75rem;
}

/* a fixed size, so opening it never moves anything below; it fits the
   library's tallest-panel layout at each width */
.cv-frame-view {
	display: block;
	width: 100%;
	height: 280px;
	border: 1px solid var(--pg-line);
	border-radius: 14px;
	background: #f6f5f8;
}

@media (max-width: 575.98px) {
	.cv-frame-view {
		height: 340px;
	}
}

@media (max-width: 419.98px) {
	.cv-frame-view {
		height: 400px;
	}
}

/* ── The recorded clip's place ─────────────────────────────────────────── */

.cv-clip {
	margin: 0;
}

.cv-clip-frame {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	aspect-ratio: 16 / 9;
	padding: clamp(1.25rem, 3vw, 2.5rem);
	text-align: center;
	color: var(--pg-ink);
	border: 2px dotted var(--pg-muted);
	border-radius: 14px;
}

.cv-clip-icon {
	width: 2rem;
	height: 2rem;
	fill: currentColor;
}

.cv-clip-label {
	margin: 0;
	font-size: clamp(1.05rem, 1.6vw, 1.35rem);
	font-weight: 800;
	line-height: 1.2;
}

.cv-clip-what {
	max-width: 46ch;
	margin: 0;
	font-size: .9rem;
	line-height: 1.5;
	color: var(--pg-muted);
}

/* the recorded clip: a dark film on either theme, so its edge is drawn in the page's own line;
   about 720px wide at most, so it fits a laptop screen with its caption */
.cv-clip-video > * {
	max-width: 45rem;
	margin-inline: auto;
}

.cv-clip-play,
.cv-clip-still img {
	display: block;
	width: 100%;
	height: auto;
	background: #0c0c0d;
	border-radius: 14px;
	box-shadow: 0 0 0 1px var(--pg-line);
}

.cv-clip-still {
	display: none;
}

.cv-clip-link {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	margin-top: .75rem;
	font-weight: 700;
	color: var(--pg-ink);
}

.cv-clip-link-icon {
	width: .85rem;
	height: .85rem;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	.cv-clip-play {
		display: none;
	}

	.cv-clip-still {
		display: block;
	}
}

.cv-clip-cap {
	margin-top: .75rem;
	font-size: .9rem;
	line-height: 1.5;
	color: var(--pg-muted);
}

@media (max-width: 575.98px) {
	.cv-clip-frame {
		aspect-ratio: auto;
		min-height: 15rem;
	}
}

/* ── Code ──────────────────────────────────────────────────────────────── */

.cv-code-stack {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {
	.cv-code-stack {
		grid-template-columns: minmax(0, 1fr);
	}
}

.cv-file > h4 {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.cv-file-name {
	font-family: var(--font-mono);
	font-size: .9rem;
	font-weight: 500;
	color: var(--pg-ink);
}

.fld .cv-file-name {
	color: var(--fld-ink);
}

.cv-file-n {
	font-size: .82rem;
	font-weight: 600;
}

.cv-libfiles {
	margin-top: 1.5rem;
	overflow-x: auto;
}

.cv-libfiles table {
	width: 100%;
	border-collapse: collapse;
	font-size: .88rem;
}

.cv-libfiles caption {
	padding-bottom: .5rem;
	font-size: .9rem;
	font-weight: 700;
	text-align: left;
}

.cv-libfiles th,
.cv-libfiles td {
	padding: .45rem .75rem .45rem 0;
	text-align: left;
	border-bottom: 1px solid var(--pg-line);
}

.fld .cv-libfiles th,
.fld .cv-libfiles td {
	border-bottom-color: var(--fld-line);
}

.cv-libfiles thead th {
	font-size: .78rem;
	color: var(--pg-muted);
}

.fld .cv-libfiles thead th {
	color: var(--fld-muted);
}

.cv-libfiles tbody th {
	font-weight: 500;
}

.cv-libfiles tbody th code {
	font-family: var(--font-mono);
	font-size: .82rem;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
}

.cv-libfiles .num {
	padding-right: 0;
	font-family: var(--font-mono);
	font-size: .82rem;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.cv-libfiles tbody th code,
.cv-libfiles .num {
	white-space: nowrap;
}

/* on a phone the kind column goes; the file names say it */
@media (max-width: 575.98px) {
	.cv-libfiles .cv-kind {
		display: none;
	}
}

.cv-libfiles tfoot th,
.cv-libfiles tfoot td {
	font-weight: 700;
	border-bottom: 0;
}

/* the vanilla version, folded away */
.cv-more-code {
	margin-top: 2rem;
	border-top: 1px solid var(--pg-line);
	border-bottom: 1px solid var(--pg-line);
}

.fld .cv-more-code {
	margin-top: 0;
	border-color: var(--fld-line);
}

.cv-more-code > summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .25rem 1rem;
	padding: 1.1rem 0;
	font-size: 1.15rem;
	font-weight: 800;
	cursor: pointer;
	list-style: none;
}

.cv-more-code > summary::-webkit-details-marker {
	display: none;
}

.cv-more-chev {
	width: .8rem;
	height: .8rem;
	align-self: center;
	fill: currentColor;
	transition: transform .25s var(--ease-out);
}

.cv-more-code[open] .cv-more-chev {
	transform: rotate(90deg);
}

.cv-more-n {
	font-size: .9rem;
	font-weight: 600;
	color: var(--pg-muted);
}

.fld .cv-more-n,
.fld .cv-more-lede {
	color: var(--fld-muted);
}

.cv-more-body {
	padding-bottom: 1.5rem;
}

.cv-more-lede {
	max-width: 62ch;
	margin: 0 0 1.25rem;
	font-size: .95rem;
	line-height: 1.55;
	color: var(--pg-muted);
}

@media (min-width: 1200px) {
	.cv-more-body .cv-code-stack {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ── When JavaScript still makes sense ─────────────────────────────────── */

.cv-when h2,
.cv-when h3,
.cv-switching h2,
.cv-switching h3,
.cv-support > h2,
.cv-faq > h2 {
	margin: 0 0 1.25rem;
	font-size: clamp(1.6rem, 2.4vw, 2.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.02em;
}

.cv-reasons {
	display: grid;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cv-reasons li {
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr);
	gap: 1rem;
}

.cv-reasons li > .fa-icon {
	width: 2.5rem;
	height: 2.5rem;
	padding: .6rem;
	color: var(--pg);
	background: var(--pg-ink);
	border-radius: 10px;
}

.cv-reasons p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
}

.cv-reasons .cv-reason-t {
	margin-bottom: .15rem;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
}

.cv-other-way {
	max-width: 62ch;
	margin: 1.5rem 0 0;
	padding-top: 1.1rem;
	font-size: .95rem;
	line-height: 1.6;
	color: var(--pg-muted);
	border-top: 1px solid var(--pg-line);
}

/* ── Switching steps: the order matters, so they are numbered ──────────── */

.cv-steps {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: cv-step;
}

.cv-steps li {
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr);
	gap: 1rem;
	padding: .95rem 0;
	font-size: 1rem;
	line-height: 1.6;
	border-top: 1px solid var(--pg-line);
	counter-increment: cv-step;
}

.cv-steps li:last-child {
	border-bottom: 1px solid var(--pg-line);
}

.cv-steps li::before {
	content: counter(cv-step);
	font: 500 1.35rem/1.15 var(--font-mono);
	color: var(--cv-violet);
}

/* ── Browser support, a placeholder in the example page's look ─────────── */

.cv-placeholder-tag {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	margin: 0 0 1rem;
	padding: .35rem .8rem;
	font-size: .85rem;
	font-weight: 600;
	color: var(--pg-ink);
	border: 1.5px dotted var(--pg-muted);
	border-radius: 999px;
}

.cv-placeholder-tag .fa-icon {
	width: .9rem;
	height: .9rem;
	fill: currentColor;
}

.support-table td.cv-tbd {
	font-size: .8rem;
	font-style: italic;
	color: var(--pg-muted);
}

/* ── The link to the CSS example ───────────────────────────────────────── */

.cv-css-link {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: .35rem 1.5rem;
	padding: clamp(1.5rem, 2.6vw, 2.5rem);
	color: #f4f1eb;
	text-decoration: none;
	background: #1f1f22;
	border-radius: 18px;
}

.cv-css-link-t {
	grid-column: 1;
	font-size: clamp(1.75rem, 3vw, 2.75rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.02em;
}

.cv-css-link-d {
	grid-column: 1;
	max-width: 46ch;
	font-size: .95rem;
	line-height: 1.5;
	color: #c9c6be;
}

.cv-css-link-arrow {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	width: 1.75rem;
	height: 1.75rem;
	color: #b8ff57;
	transition: transform .25s var(--ease-out);
}

.cv-css-link:hover .cv-css-link-arrow {
	transform: translateX(6px);
}

.cv-css-link:hover .cv-css-link-t {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: .12em;
}

/* ── Head to head (02): one zero-based scale per measure ───────────────── */

/* A strict grid shared by the header bar and every row: a fixed value column
   at each outer edge (wide enough for the longest figure, "124.3 KB" or
   "1,095 ms"), and two equal bar tracks that meet at the center line. The
   tracks never take "what's left" after the text: every row's tracks are the
   same length on both sides, and each row is scaled from zero to its larger
   value. */
.h2h,
.h2h-head-bar {
	--h2h-val: 7.5rem;
	--h2h-cols: var(--h2h-val) minmax(0, 1fr) minmax(0, 1fr) var(--h2h-val);
}

.h2h {
	display: grid;
	gap: 1.15rem;
}

/* the sides, named in a solid bar across the top: CSS on the left, the
   picked jQuery UI build on the right, split at the same center line */
.h2h-head-bar {
	position: relative;
	display: grid;
	grid-template-columns: var(--h2h-cols);
	align-items: center;
	margin: 0 0 1.5rem;
	color: var(--pg);
	background: var(--pg-ink);
	border-radius: 10px;
}

.h2h-head-bar::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - 1px);
	width: 2px;
	background: var(--pg);
}

.h2h-side,
.h2h-side-b .lv {
	display: flex;
	align-items: center;
	gap: .6rem;
	min-width: 0;
}

.h2h-side {
	margin: 0;
	padding: .75rem 1.1rem;
	font-size: clamp(1.05rem, 1.6vw, 1.35rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.01em;
}

.h2h-side-a {
	grid-column: 1 / 3;
}

.h2h-side-b {
	grid-column: 3 / 5;
	justify-content: flex-end;
	text-align: right;
}

.h2h-side .key {
	width: 14px;
	height: 14px;
	border-radius: 3px;
	box-shadow: 0 0 0 1.5px var(--pg);
}

.h2h-row {
	display: grid;
	gap: .4rem;
}

.h2h-name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .3rem .6rem;
	margin: 0;
	font-size: .9rem;
	font-weight: 700;
	text-align: center;
	color: var(--pg-muted);
}

.h2h-pair {
	position: relative;
	display: grid;
	grid-template-columns: var(--h2h-cols);
	align-items: center;
}

/* the center line both tracks grow out from */
.h2h-pair::after {
	content: "";
	position: absolute;
	top: -3px;
	bottom: -3px;
	left: calc(50% - 1px);
	width: 2px;
	background: var(--pg-ink);
}

.h2h-val {
	min-width: 0;
	font-size: clamp(1.05rem, 1.5vw, 1.4rem);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.h2h-val-a {
	padding-right: .7rem;
	text-align: right;
}

.h2h-val-b {
	padding-left: .7rem;
	text-align: left;
}

.h2h-bar {
	display: block;
	width: 100%;
	overflow: visible;
}

.h2h-off .h2h-pair::after {
	display: none;
}

.h2h-word {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font-size: 1rem;
	font-weight: 700;
}

.h2h-word-a {
	grid-column: 1 / 3;
	justify-content: flex-end;
	padding-right: .9rem;
}

.h2h-word-b {
	grid-column: 3 / 5;
	justify-content: flex-start;
	padding-left: .9rem;
}

.h2h-word .fa-icon {
	width: 1.05rem;
	height: 1.05rem;
	flex: none;
	fill: currentColor;
}

/* the JavaScript-off row has no bars, so its words wear the outcome as a
   short underline in the row's colors */
.h2h-word {
	text-decoration-line: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: .3em;
}

.h2h-word-win {
	text-decoration-color: var(--out-win);
}

.h2h-word-lose {
	text-decoration-color: var(--out-lose);
}

.h2h-word-tie {
	text-decoration-color: var(--out-tie-mark);
}

@media (max-width: 575.98px) {
	.h2h,
	.h2h-head-bar {
		--h2h-val: 5.6rem;
	}

	.h2h-val-a {
		padding-right: .5rem;
	}

	.h2h-val-b {
		padding-left: .5rem;
	}

	.h2h-side {
		padding: .65rem .8rem;
		font-size: 1rem;
	}
}

.cv-vanilla-line {
	display: flex;
	align-items: baseline;
	gap: .6rem;
	max-width: 62ch;
	margin: 1.75rem auto 0;
	font-size: .92rem;
	line-height: 1.5;
	color: var(--pg-muted);
}

.cv-vanilla-line .key {
	transform: translateY(1px);
}

/* ── Motion ────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.cv-frame-open,
	.cv-frame-icon,
	.cv-frame-chev,
	.cv-more-chev,
	.cv-css-link-arrow {
		transition: none;
	}
}

/* ── Containment ───────────────────────────────────────────────────────── */

/* a visually hidden label in a scrolled table is absolutely placed; this
   keeps it inside the scroll box instead of widening the page */
.cv .table-scroll,
.cv-verdict-wrap {
	position: relative;
}

.h2h,
.cv-reasons,
.cv-steps,
.cv-tally {
	grid-template-columns: minmax(0, 1fr);
}

/* ── The jQuery UI switch (02): only the picked build shows ────────────── */

body:has(#rc-lib-full:checked) .lv-trim,
body:has(#rc-lib-trim:checked) .lv-full {
	display: none;
}

/* ── The hub's comparison switch (05): the library or vanilla JavaScript ─ */

body:has(#hub-vs-library:checked) .vs-vanilla,
body:has(#hub-vs-vanilla:checked) .vs-library {
	display: none;
}

/* the radios stay put in the corner of the screen, so picking from the
   labels by the scorecard never scrolls the page back up to them */
.hub-vs-pick {
	position: fixed;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.cv-vs-pick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .9rem;
	margin: 1.5rem 0 0;
}

.cv-vs-lead {
	font-size: .9rem;
	font-weight: 700;
	color: var(--pg-muted);
}

.cv-switch {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 3px;
	border: 1.5px solid var(--pg-line);
	border-radius: 999px;
}

.cv-sw {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 1rem;
	font-size: .9rem;
	font-weight: 700;
	white-space: nowrap;
	color: var(--pg-ink);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}

.cv-sw:hover {
	background: var(--pg-tint);
}

body:has(#hub-vs-library:checked) .cv-sw-library,
body:has(#hub-vs-vanilla:checked) .cv-sw-vanilla {
	color: var(--pg);
	background: var(--pg-ink);
}

body:has(#hub-vs-library:focus-visible) .cv-sw-library,
body:has(#hub-vs-vanilla:focus-visible) .cv-sw-vanilla {
	outline: 3px solid #b8ff57;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #0c0c0d;
}

.cv-chart-head .cv-vs-pick {
	margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
	.cv-sw {
		transition: none;
	}
}

/* without :has() the switch cannot work, so the full build shows alone */
@supports not selector(:has(a)) {
	.lv-trim,
	.rc-switch,
	.vs-vanilla,
	.cv-vs-pick {
		display: none;
	}
}

/* ══ The Race page (from 02-race.css) ════════════════════════════════════ */

/*
 * 02 Race: the versions lead, side by side, both running as the page loads.
 * A compact opening, then the track: two lanes edge to edge, CSS live on the
 * left and the jQuery UI frame on the right (a two-way switch picks the full
 * or the trimmed build), each under its name, its JavaScript as a verdict
 * pill and its whole download. A paper condition bar sticks while the
 * numbers scroll (who wins, head to head, the clip, the charts) and lets go
 * at the code, which keeps the track's two columns.
 */

.rc {
	padding-bottom: clamp(4rem, 7vw, 7rem);
}

.rc-open,
.rc-h2h,
.rc-numbers,
.rc-code,
.rc-after {
	max-width: var(--cv-wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* ── Opening: short, so the track shows on the first screen ────────────── */

.rc-open {
	padding-top: clamp(1.75rem, 3vw, 2.5rem);
	padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.rc-open h1 {
	margin: 1rem 0 0;
	font-size: clamp(2.5rem, 5vw, 4.5rem);
	font-weight: 800;
	line-height: .95;
	letter-spacing: -.035em;
}

.rc-dek {
	max-width: 60ch;
	margin: 1rem 0 0;
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--pg-body);
}

/* ── The track ─────────────────────────────────────────────────────────── */

.rc-track {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	border-top: 1px solid var(--pg-line);
	border-bottom: 1px solid var(--pg-line);
}

@media (min-width: 992px) {
	.rc-track {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rc-lane + .rc-lane {
		border-left: 1px solid var(--pg-line);
	}
}

@media (max-width: 991.98px) {
	.rc-lane + .rc-lane {
		border-top: 1px solid var(--pg-line);
	}
}

.rc-lane {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	min-width: 0;
}

.rc-lane-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: 1rem 1.5rem;
	padding: clamp(1.25rem, 2.2vw, 2rem) var(--gutter) 0;
}

.rc-lane-words {
	display: grid;
	gap: .35rem;
	min-width: 0;
}

.rc-lane-name {
	margin: 0;
	font-size: clamp(1.75rem, 2.6vw, 2.5rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.02em;
}

.rc-lane-name > span:not(.key),
.rc-lane-name .lv {
	display: inline-flex;
	align-items: center;
	gap: .65rem;
}

.rc-lane-name .key {
	width: 16px;
	height: 16px;
	border-radius: 4px;
}

.rc-lane-css .rc-lane-name {
	display: flex;
	align-items: center;
	gap: .65rem;
}

.rc-lane-where {
	margin: 0;
	font-size: .95rem;
	line-height: 1.4;
	color: var(--pg-muted);
}

/* the lane's figure: its JavaScript as a verdict pill, its whole download
   under it */
.rc-stat {
	display: grid;
	justify-items: end;
	gap: .45rem;
}

/* the pill: who wins on JavaScript as a small label across its top, then the
   figure, then its unit */
.rc-pill {
	display: grid;
	justify-items: start;
	min-width: 10.5rem;
	padding: .5rem 1rem .75rem;
	border-radius: 12px;
}

.rc-pill-win {
	color: var(--out-win-ink);
	background: var(--out-win);
}

.rc-pill-lose {
	color: var(--out-lose-ink);
	background: var(--out-lose);
}

.rc-pill-tie {
	color: var(--out-tie-ink);
	background: var(--out-tie);
}

.rc-pill-mark {
	display: flex;
	align-items: center;
	justify-self: stretch;
	gap: .4rem;
	margin-bottom: .55rem;
	padding-bottom: .4rem;
	font-size: .8rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .02em;
	border-bottom: 1px solid color-mix(in srgb, currentColor 32%, transparent);
}

.rc-pill-mark .fa-icon {
	width: .8rem;
	height: .8rem;
	flex: none;
	fill: currentColor;
}

.rc-pill-n {
	font-size: clamp(1.6rem, 2.4vw, 2.25rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.01em;
	white-space: nowrap;
}

.rc-pill-u {
	margin-top: .3rem;
	font-size: .85rem;
	font-weight: 600;
	line-height: 1.2;
}

/* The lane's overall record: one split label. The filled half carries the
   icon and the result, in white or ink, whichever passes 4.5:1 on that
   outcome color; the open half sits on the lane's ground with the counts in
   the page's ink. The icon is a plain glyph centered on the text's line, not
   a dot of its own. The test it was judged on sits under it. */
.rc-result {
	margin: .55rem 0 0;
}

.rc-rec {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: stretch;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	font-size: .88rem;
	line-height: 1.2;
	border: 1.5px solid var(--rec-color);
	border-radius: 8px;
}

.rc-rec-win {
	--rec-color: var(--out-win);
	--rec-ink: var(--out-win-ink);
}

.rc-rec-lose {
	--rec-color: var(--out-lose);
	--rec-ink: var(--out-lose-ink);
}

.rc-rec-tie {
	--rec-color: var(--out-tie-mark);
	--rec-ink: var(--pg);
}

.rc-rec-head {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .42rem .75rem .42rem .65rem;
	font-weight: 700;
	white-space: nowrap;
	color: var(--rec-ink);
	background: var(--rec-color);
}

.rc-rec-head .fa-icon {
	display: block;
	width: .85rem;
	height: .85rem;
	flex: none;
	fill: currentColor;
}

.rc-rec-counts {
	display: inline-flex;
	align-items: center;
	gap: .85rem;
	padding: .42rem .8rem;
	color: var(--pg-ink);
}

.rc-rec-n {
	white-space: nowrap;
}

.rc-rec-n strong {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.rc-rec-on {
	margin: .4rem 0 0;
	font-size: .8rem;
	color: var(--pg-muted);
}

/* the lane's ground: a soft wash of its overall result, strongest at the top,
   over the page ground; the demo and the frame keep their own colors. The
   owner asked for a deeper green and a lighter red; text on the strongest
   part keeps at least 5.2:1. */
body.cv-rc {
	--rc-win-top: color-mix(in oklab, var(--out-win) 22%, transparent);
	--rc-win-low: color-mix(in oklab, var(--out-win) 8%, transparent);
	--rc-lose-top: color-mix(in oklab, var(--out-lose) 10%, transparent);
	--rc-lose-low: color-mix(in oklab, var(--out-lose) 4%, transparent);
}

body.cv-rc:has(#theme-toggle:checked) {
	--rc-win-top: color-mix(in oklab, var(--out-win) 23%, transparent);
	--rc-win-low: color-mix(in oklab, var(--out-win) 9%, transparent);
	--rc-lose-top: color-mix(in oklab, var(--out-lose) 19%, transparent);
	--rc-lose-low: color-mix(in oklab, var(--out-lose) 7%, transparent);
}

.rc-tints,
.rc-tints > .when,
.rc-tint {
	position: absolute;
	inset: 0;
}

.rc-tints {
	z-index: -1;
	pointer-events: none;
}

.rc-tint-win {
	background: linear-gradient(180deg, var(--rc-win-top), var(--rc-win-low) 70%);
}

.rc-tint-lose {
	background: linear-gradient(180deg, var(--rc-lose-top), var(--rc-lose-low) 70%);
}

.rc-tint-tie {
	background: var(--pg-tint);
}

/* the two-way switch between the full and the trimmed jQuery UI build */
.rc-switch {
	position: relative;
	display: inline-flex;
	flex-wrap: wrap;
	justify-self: start;
	gap: 2px;
	min-width: 0;
	margin: .5rem 0 0;
	padding: 3px;
	border: 1.5px solid var(--pg-line);
	border-radius: 999px;
}

.rc-sw {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	min-height: 36px;
	padding: 0 .95rem;
	font-size: .88rem;
	font-weight: 700;
	white-space: nowrap;
	color: var(--pg-ink);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}

.rc-sw:hover {
	background: var(--pg-tint);
}

.rc-sw .key {
	box-shadow: 0 0 0 1.5px var(--pg);
}

body:has(#rc-lib-full:checked) [for="rc-lib-full"],
body:has(#rc-lib-trim:checked) [for="rc-lib-trim"] {
	color: var(--pg);
	background: var(--pg-ink);
}

body:has(#rc-lib-full:focus-visible) [for="rc-lib-full"],
body:has(#rc-lib-trim:focus-visible) [for="rc-lib-trim"] {
	outline: 3px solid #b8ff57;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #0c0c0d;
}

/* both lanes' demos start at the top of their stage, so the CSS version and the library line up
   across the page even when one is shorter (the Popover's card, the Carousel's slides) */
.rc-stage {
	display: grid;
	place-items: start center;
	min-height: clamp(20rem, 46svh, 27rem);
	padding: clamp(1.5rem, 3vw, 3rem) var(--gutter);
}

/* the two builds' frames share one cell; the one picked loads with the page, the other loads
   when a reader switches to it (see the switch rules below) */
.rc-stage-frame {
	align-content: start;
	gap: .75rem;
}

.rc-frames {
	display: grid;
	width: 100%;
	max-width: 560px;
}

.rc-fr {
	grid-area: 1 / 1;
}

/* on a phone the widget measures about 300px tall; the frame keeps a little
   room for narrower screens without a band of empty gray under it */
@media (max-width: 419.98px) {
	.rc-frames .cv-frame-view {
		height: 340px;
	}
}

/* The build not picked is not drawn at all (owner, 2026-11-15, option A): a lazy frame that is
   not displayed does not load, so the page downloads only the full build until a reader switches,
   and the trimmed one starts when it is shown, at its full size. */
body:has(#rc-lib-full:checked) .rc-fr-trim,
body:has(#rc-lib-trim:checked) .rc-fr-full {
	display: none;
}

@supports not selector(:has(a)) {
	.rc-fr-trim {
		display: none;
	}
}

.rc-frame-note {
	width: 100%;
	max-width: 560px;
	margin: 0;
	font-size: .85rem;
	line-height: 1.45;
	color: var(--pg-muted);
}

@media (max-width: 575.98px) {
	.rc-lane-head {
		grid-template-columns: minmax(0, 1fr);
	}

	.rc-stat {
		justify-items: start;
	}
}

/* ── The bar: sticks while the numbers scroll ──────────────────────────── */

.rc-measured {
	margin-top: clamp(3rem, 5vw, 4.5rem);
}

.rc-bar {
	position: sticky;
	top: var(--head-h);
	z-index: 30;
	padding: .6rem var(--gutter);
	background: var(--pg);
	box-shadow: 0 1px 0 var(--pg-line);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (color: color-mix(in srgb, red 50%, transparent)) {
	.rc-bar {
		background: color-mix(in srgb, var(--pg) 92%, transparent);
		-webkit-backdrop-filter: blur(14px);
		backdrop-filter: blur(14px);
	}
}

@media (prefers-reduced-transparency: reduce) {
	.rc-bar {
		background: var(--pg);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

.rc-conds {
	justify-content: center;
}

@media (max-width: 767.98px) {
	.rc-conds {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.rc-conds .cv-conds-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.rc-conds .cv-chips {
		flex-wrap: nowrap;
	}

	.rc-conds .cv-chip {
		min-height: 36px;
		padding: 0 .8rem;
		font-size: .88rem;
	}
}

/* ── Who wins ──────────────────────────────────────────────────────────── */

.rc-verdict {
	max-width: var(--cv-wrap);
	margin-inline: auto;
	padding: clamp(2.5rem, 4vw, 3.5rem) var(--gutter) 0;
}

/* ── Head to head ──────────────────────────────────────────────────────── */

.rc-h2h {
	max-width: 62rem;
	margin-top: clamp(3rem, 5vw, 4.5rem);
	padding-top: clamp(2.5rem, 4vw, 3.5rem);
	border-top: 1px solid var(--pg-line);
}

.rc-h2h-note {
	max-width: 56ch;
	margin: 0;
	font-size: .9rem;
	line-height: 1.5;
	color: var(--pg-muted);
}

.rc-trim-note {
	display: flex;
	align-items: baseline;
	gap: .6rem;
	margin: 2rem 0 0;
	font-size: .95rem;
	line-height: 1.5;
	color: var(--pg-body);
}

.rc-trim-note .key {
	transform: translateY(1px);
}

.rc-trim-note + .cv-libfiles {
	margin-top: .75rem;
}

.rc-h2h-head {
	display: grid;
	justify-items: center;
	gap: .9rem;
	margin-bottom: 2rem;
	text-align: center;
}

.rc-h2h-head h2 {
	margin: 0;
	font-size: clamp(2rem, 3.6vw, 3rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.025em;
}

.rc-h2h .cv-cond-note {
	max-width: 62ch;
	margin: 1rem auto 0;
	text-align: center;
}

/* ── The clip, the numbers ─────────────────────────────────────────────── */

.rc-clip {
	max-width: 62rem;
	margin: clamp(3.5rem, 6vw, 5rem) auto 0;
	padding-inline: var(--gutter);
}

.rc-h2 {
	margin: 0;
	padding-top: 1rem;
	font-size: clamp(2.5rem, 5vw, 4.25rem);
	font-weight: 800;
	line-height: .95;
	letter-spacing: -.035em;
	border-top: 3px solid var(--pg-ink);
}

.rc-numbers,
.rc-code {
	margin-top: clamp(4rem, 7vw, 6.5rem);
}

.rc-chart {
	padding-block: clamp(2rem, 3.5vw, 3rem);
	border-bottom: 1px solid var(--pg-line);
}

.rc-chart:last-child {
	border-bottom: 0;
}

/* ── The code: the track's two columns again ───────────────────────────── */

.rc-code-lede {
	max-width: 62ch;
	margin: 1.5rem 0 0;
	font-size: 1.1rem;
	line-height: 1.55;
}

.rc-code > .rc-chart {
	border-bottom: 0;
}

.rc-code-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem 3rem;
	margin-top: 1rem;
}

@media (min-width: 992px) {
	.rc-code-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rc-code-col + .rc-code-col {
		padding-left: 3rem;
		border-left: 1px solid var(--pg-line);
	}

	.rc-code-grid {
		column-gap: 0;
	}

	.rc-code-col:first-child {
		padding-right: 3rem;
	}
}

.rc-code-h {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: 0 0 1rem;
	font-size: 1.5rem;
	font-weight: 800;
}

/* ── The CSS build: the CSS version in steps, between the head to head and the proof
   (owner, 2026-11-17). The measured block starts again below it, under a second chip bar. ── */

.rc-build {
	max-width: var(--cv-wrap);
	margin: clamp(4rem, 7vw, 6.5rem) auto 0;
	padding-inline: var(--gutter);
}

.rc-build > h2 {
	margin: 0;
	padding-top: 1rem;
	font-size: clamp(2.5rem, 5vw, 4.25rem);
	font-weight: 800;
	line-height: .95;
	letter-spacing: -.035em;
	border-top: 3px solid var(--pg-ink);
}

.cv-build-lede,
.cv-build-after {
	max-width: 62ch;
	margin: 1.5rem 0 0;
	font-size: 1.1rem;
	line-height: 1.55;
}

.cv-build-steps {
	display: grid;
	gap: 2.5rem 3rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 992px) {
	.cv-build-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.cv-build-step {
	display: grid;
	align-content: start;
	gap: .9rem;
	min-width: 0;
}

.cv-build-h {
	display: flex;
	align-items: baseline;
	gap: .75rem;
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.2;
}

.cv-build-n {
	font: 500 1.5rem/1 var(--font-mono);
	color: var(--cv-violet);
}

.cv-build-t {
	max-width: 62ch;
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
}

/* from lg the steps sit side by side; a subgrid lines their headings, texts and code up across
   the columns, even when a step has no text */
@supports (grid-template-rows: subgrid) {
	@media (min-width: 992px) {
		.cv-build-step {
			grid-row: span 3;
			grid-template-rows: subgrid;
			row-gap: .9rem;
		}

		.cv-build-step > .cv-build-h {
			grid-row: 1;
		}

		.cv-build-step > .cv-build-t {
			grid-row: 2;
		}

		.cv-build-step > .code-section {
			grid-row: 3;
		}
	}
}

.rc-measured-2 {
	margin-top: clamp(3rem, 5vw, 4.5rem);
}

/* with the CSS code moved up into the build, "The code" folds the library's code away and keeps
   its download tables open, in two columns from lg */
.rc-lib-files {
	display: grid;
	gap: 1.5rem 3rem;
	margin-top: 1.5rem;
}

.rc-trim-files {
	display: grid;
	align-content: start;
	gap: .75rem;
}

.rc-trim-files .rc-trim-note {
	margin: 0;
}

@media (min-width: 992px) {
	.rc-lib-files:has(.rc-trim-files) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.cv-lib-code .cv-code-stack {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ── The settings map: each library setting beside the CSS that does its job ── */

.rc-map {
	margin-top: clamp(2.5rem, 4vw, 3.5rem);
}

.cv-map-section > h2 {
	margin: 0 0 1.25rem;
	font-size: clamp(1.6rem, 2.4vw, 2.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.02em;
}

.cv-map-lede {
	max-width: 62ch;
	margin: 0 0 1.25rem;
	font-size: 1rem;
	line-height: 1.6;
}

.cv-map {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
	line-height: 1.55;
}

.cv-map th,
.cv-map td {
	padding: .8rem 1.25rem .8rem 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--pg-line);
}

.cv-map thead th {
	padding-top: 0;
	font-size: .82rem;
	font-weight: 700;
	color: var(--pg-muted);
	border-bottom: 2px solid var(--pg-ink);
}

.cv-map tbody th {
	width: 30%;
	font-weight: 600;
}

/* ── After ─────────────────────────────────────────────────────────────── */

.rc-after {
	grid-template-columns: minmax(0, 1fr);
	display: grid;
	gap: clamp(3.5rem, 6vw, 5.5rem);
	margin-top: clamp(4rem, 7vw, 6.5rem);
}

.rc-after-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	padding-top: clamp(2.5rem, 4vw, 3.5rem);
	border-top: 3px solid var(--pg-ink);
	gap: 3.5rem clamp(3rem, 6vw, 6rem);
}

@media (min-width: 992px) {
	.rc-after-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.rc-support {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	background: var(--pg-tint);
	border-radius: 18px;
}

.rc-end {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem clamp(3rem, 6vw, 6rem);
	align-items: start;
}

@media (min-width: 1200px) {
	.rc-end {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rc-sw {
		transition: none;
	}
}

/* ══ The hub (from 05-hub.css) ═══════════════════════════════════════════ */

/*
 * 05 Hub: the series page at /css-vs-javascript/. The opening states the
 * series-wide count, then one wide row per comparison (the way in), then the
 * proof: the scorecard across topics, the JavaScript each CSS version skips,
 * and how the tests run.
 */

.hub {
	padding-bottom: clamp(4rem, 7vw, 7rem);
}

.hub-open,
.hub-list,
.hub-block {
	max-width: var(--cv-wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.hub-open {
	padding-top: clamp(2rem, 3.5vw, 3rem);
	padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.hub-open h1 {
	margin: 1.25rem 0 0;
	font-size: clamp(3rem, 8vw, 7.5rem);
	font-weight: 800;
	line-height: .9;
	letter-spacing: -.04em;
}

.hub-dek {
	max-width: 56ch;
	margin: 1.5rem 0 0;
	font-size: clamp(1.1rem, 1.5vw, 1.3rem);
	line-height: 1.5;
	color: var(--pg-body);
}

/* the series-wide count, with its segmented bar */
.hub-overall {
	display: grid;
	gap: .75rem;
	max-width: 46rem;
	margin: 1.5rem 0 0;
}

.hub-overall p {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.45;
}

.hub-open .tb-legend {
	margin: 1rem 0 0;
}

/* ── The comparisons ───────────────────────────────────────────────────── */

.hub-list-head {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding-top: 1rem;
	border-top: 3px solid var(--pg-ink);
}

.hub-list-head h2,
.hub-block .cv-chart-head h2 {
	margin: 0;
	font-size: clamp(2rem, 3.6vw, 3rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.025em;
}

.hub-list > .when > .cv-cond-note {
	margin-top: .75rem;
}

.hub-rows {
	grid-template-columns: minmax(0, 1fr);
	display: grid;
	margin-top: 1.75rem;
}

.hub-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem 3rem;
	padding: clamp(1.5rem, 2.6vw, 2.25rem) 0;
	border-top: 1px solid var(--pg-line);
}

.hub-row:last-child {
	border-bottom: 1px solid var(--pg-line);
}

@media (min-width: 1200px) {
	.hub-row {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) 2rem;
		align-items: center;
	}
}

.hub-row h3 {
	margin: 0;
	font-size: clamp(1.6rem, 2.6vw, 2.4rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.02em;
}

.hub-link {
	color: inherit;
	text-decoration: none;
}

/* the whole row is the link */
.hub-link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hub-row-live:hover h3 {
	text-decoration: underline;
	text-decoration-color: var(--link-line);
	text-decoration-thickness: 3px;
	text-underline-offset: .12em;
}

.hub-row-live:has(.hub-link:focus-visible) {
	outline: 3px solid #b8ff57;
	outline-offset: 4px;
	box-shadow: 0 0 0 2px #0c0c0d;
}

.hub-link:focus-visible {
	outline: none;
	box-shadow: none;
}

.hub-vs {
	margin: .6rem 0 0;
	font-size: .95rem;
	line-height: 1.45;
	color: var(--pg-muted);
}

.hub-soon {
	display: inline-block;
	margin: .75rem 0 0;
	padding: .2rem .65rem;
	font-size: .8rem;
	font-weight: 600;
	color: var(--pg-muted);
	border: 1.5px dotted var(--pg-muted);
	border-radius: 999px;
}

.hub-figs {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem 2rem;
	margin: 0;
}

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

.hub-figs dt {
	font-size: .82rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--pg-muted);
}

.hub-figs dd {
	display: grid;
	gap: .2rem;
	margin: .3rem 0 0;
	font-size: clamp(1.5rem, 2vw, 1.85rem);
	font-weight: 700;
	line-height: 1;
}

.hub-figs dd span {
	font-size: .82rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--pg-muted);
}

.hub-figs .hub-tally {
	gap: .5rem;
}

.hub-figs dd .hub-tally-n {
	font-size: 1rem;
	font-weight: 700;
	color: var(--pg-ink);
}

/* the bar's blocks keep their tooltips above the row's link */
.hub-row .tb {
	position: relative;
	z-index: 1;
}

.hub-arrow {
	width: 1.5rem;
	height: 1.5rem;
	fill: currentColor;
	transition: transform .25s var(--ease-out);
}

.hub-row-live:hover .hub-arrow {
	transform: translateX(5px);
}

@media (max-width: 1199.98px) {
	.hub-arrow {
		position: absolute;
		top: clamp(1.5rem, 2.6vw, 2.25rem);
		right: 0;
	}

	.hub-row-live .hub-row-words {
		padding-right: 2.5rem;
	}
}

/* ── The proof ─────────────────────────────────────────────────────────── */

.hub-block {
	margin-top: clamp(4rem, 7vw, 6rem);
}

.hub-block > .cv-chart-head {
	padding-top: 1rem;
	border-top: 3px solid var(--pg-ink);
}

.hub-method-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 3rem;
	max-width: 72rem;
	margin: 0;
}

@media (min-width: 992px) {
	.hub-method-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.hub-method-list > div {
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr);
	gap: 1rem;
	padding: .85rem 0;
	border-top: 1px solid var(--pg-line);
}

.hub-method-list dt {
	font-size: .9rem;
	font-weight: 700;
}

.hub-method-list dd {
	margin: 0;
	font-size: .95rem;
	line-height: 1.5;
	color: var(--pg-body);
}

@media (max-width: 575.98px) {
	.hub-method-list > div {
		grid-template-columns: minmax(0, 1fr);
		gap: .2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hub-arrow {
		transition: none;
	}
}
