/* /compare/ — DepthField Photo beside the editors people weigh it against. Plain tables and
   prose on purpose: the page has to read the same to a person, a search engine and an AI
   assistant, so nothing on it is drawn by script. */

.cmp-checked {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--text-dim);
	margin: 22px 0 0;
}

.cmp-section {
	margin-top: clamp(56px, 8vw, 104px);
}
.cmp-section > .lp-h2 {
	font-size: clamp(28px, 3.6vw, 44px);
	margin: 0 0 22px;
}
.cmp-prose p,
.cmp-prose li {
	color: var(--text-muted);
	font-size: 16.5px;
	line-height: 1.65;
	max-width: 72ch;
}
.cmp-prose p {
	margin: 0 0 16px;
}
.cmp-prose strong {
	color: var(--text);
	font-weight: 600;
}
.cmp-prose a {
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 3px;
}
.cmp-prose a:hover {
	color: var(--amber);
}

/* Two lists side by side: who it's for and who it isn't, what it's good at and where it stops. */
.cmp-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 28px;
}
.cmp-card {
	background: var(--surface);
	border: 1px solid var(--border);
	padding: 24px 26px 26px;
}
.cmp-card .lp-h3 {
	margin: 0 0 14px;
}
.cmp-card ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.cmp-card li {
	position: relative;
	padding-left: 20px;
	font-size: 15.5px;
	line-height: 1.6;
}
.cmp-card li::before {
	content: '';
	position: absolute;
	left: 4px;
	top: 0.7em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--amber);
}
.cmp-card.is-not li::before {
	background: var(--text-dim);
}

/* The tables scroll sideways on a narrow screen instead of squeezing their columns. */
.cmp-table-wrap {
	overflow-x: auto;
	border-top: 1px solid var(--border-strong);
	scrollbar-width: thin;
	scrollbar-color: var(--border-strong) transparent;
	margin-top: 28px;
}
.cmp-table {
	width: 100%;
	min-width: 900px;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
}
.cmp-table caption {
	caption-side: bottom;
	text-align: left;
	padding-top: 14px;
	color: var(--text-dim);
	font-size: 13.5px;
	line-height: 1.55;
	max-width: 90ch;
}
.cmp-table th,
.cmp-table td {
	padding: 14px 18px 14px 0;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
	font-weight: 400;
	color: var(--text-muted);
}
.cmp-table thead th {
	padding-block: 10px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
}
.cmp-table tbody th {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--text-strong);
	white-space: nowrap;
}
.cmp-table small {
	display: block;
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 12.5px;
	color: var(--text-dim);
	white-space: normal;
}
.cmp-table .cmp-num {
	color: var(--text);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.cmp-table b {
	color: var(--text);
	font-weight: 600;
}
/* Our own row: marked by a rule down its edge, never by a brighter claim. */
.cmp-table tr.is-us th {
	box-shadow: inset 3px 0 0 var(--amber);
	padding-left: 14px;
}

.cmp-versus {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 36px 48px;
	margin-top: 32px;
}
.cmp-versus article .lp-h3 {
	margin: 0 0 10px;
}
.cmp-versus p {
	font-size: 15.5px;
	margin: 0 0 12px;
}

.cmp-sources {
	columns: 2;
	column-gap: 48px;
	padding-left: 18px;
	margin: 18px 0 0;
}
.cmp-sources li {
	font-size: 14.5px;
	break-inside: avoid;
	margin-bottom: 8px;
}

@media (max-width: 760px) {
	.cmp-pair,
	.cmp-versus {
		grid-template-columns: minmax(0, 1fr);
	}
	.cmp-sources {
		columns: 1;
	}
}

/* ───────── The AI-usage slider and the cost table it drives ───────── */

.cmp-usage {
	display: grid;
	grid-template-columns: max-content minmax(0, 560px) minmax(max-content, 1fr);
	align-items: start;
	gap: 6px 28px;
	margin-top: 28px;
	padding: 20px 24px;
	background: var(--surface);
	border: 1px solid var(--border);
}
.cmp-usage[hidden] {
	display: none;
}
.cmp-usage-label {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--text-strong);
}
.cmp-usage-range {
	width: 100%;
	accent-color: var(--amber);
	cursor: pointer;
}
.cmp-usage-stops {
	grid-column: 2;
	display: flex;
	justify-content: space-between;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-dim);
}
.cmp-prose .cmp-usage-says {
	grid-column: 2;
	margin: 8px 0 0;
	font-size: 15px;
	color: var(--text);
}

.cmp-costs .lv {
	min-width: 132px;
}
.cmp-costs .cmp-pay {
	width: 26%;
}
.cmp-amount {
	color: var(--text);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
/* A bar per figure, all on one scale, so the column reads at a glance. */
.cmp-bar {
	display: block;
	height: 6px;
	width: var(--w);
	min-width: 2px;
	margin: 7px 0 8px;
	background: linear-gradient(
		to right,
		var(--bar) 0 var(--solid, 100%),
		color-mix(in oklch, var(--bar) 40%, transparent) var(--solid, 100%) 100%
	);
	--bar: var(--text-muted);
	transition: width 0.25s var(--ease);
}
.is-us .cmp-bar {
	--bar: var(--amber);
}
/* Part of the cost is unpublished: the bar trails off instead of ending. */
.cmp-bar.is-open {
	min-width: 48px;
	mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
}

/* With the slider running, one level shows at a time and its figure gets the room. */
.cmp-costs.is-live {
	min-width: 640px;
}
.cmp-costs.is-live .lv {
	display: none;
	width: 52%;
}
.cmp-costs.is-live[data-level='0'] .lv-0,
.cmp-costs.is-live[data-level='1'] .lv-1,
.cmp-costs.is-live[data-level='2'] .lv-2,
.cmp-costs.is-live[data-level='3'] .lv-3,
.cmp-costs.is-live[data-level='4'] .lv-4 {
	display: table-cell;
}
.cmp-costs.is-live .cmp-amount {
	font-family: var(--font-display);
	font-size: 19px;
	font-weight: 600;
	color: var(--text-strong);
}
.cmp-costs.is-live td.lv small {
	display: inline;
	margin-left: 10px;
	font-size: 13.5px;
}

@media (max-width: 760px) {
	.cmp-usage {
		grid-template-columns: minmax(0, 1fr);
	}
	.cmp-usage-stops,
	.cmp-prose .cmp-usage-says {
		grid-column: 1;
	}
	/* A phone has room for the editor and its figure, nothing else. */
	.cmp-costs.is-live {
		min-width: 0;
	}
	.cmp-costs.is-live .cmp-pay,
	.cmp-costs.is-live thead th:nth-child(2) {
		display: none;
	}
	.cmp-costs.is-live tbody th {
		white-space: normal;
	}
	.cmp-costs.is-live td.lv small {
		display: block;
		margin-left: 0;
	}
}

/* The row that costs least at this level, among those with a full published price. */
.cmp-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 3px 9px;
	border: 1px solid var(--amber);
	border-radius: 999px;
	font-family: var(--font-mono);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--amber);
	vertical-align: 3px;
	white-space: nowrap;
}
/* An editor that can't do the work at this level: set aside at the foot of the table,
   dimmed and struck through (never by color alone). */
.cmp-costs tr.is-out th,
.cmp-costs tr.is-out td {
	opacity: 0.42;
}
.cmp-costs tr.is-out th {
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
}
.cmp-costs.is-live tr.is-out .cmp-amount {
	font-size: 15px;
	font-weight: 500;
	color: var(--text-muted);
}

/* With no generative AI in play nobody connects to a cloud: a row that is one way of paying
   for AI is hidden (compare.js sets `hidden`), and one that stays drops that part of its name. */
.cmp-costs.is-live[data-level='0'] .cmp-variant.is-ai-only {
	display: none;
}

/* "I run local AI models on my own GPU": a switch, off until the reader says so. */
.cmp-switch {
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 15px;
	color: var(--text);
	cursor: pointer;
	width: fit-content;
}
.cmp-switch input {
	appearance: none;
	flex: none;
	width: 38px;
	height: 22px;
	margin: 0;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	background: var(--surface-raised);
	cursor: pointer;
	position: relative;
	transition:
		background 0.18s var(--ease),
		border-color 0.18s var(--ease);
}
.cmp-switch input::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--text-muted);
	transition:
		translate 0.18s var(--ease),
		background 0.18s var(--ease);
}
.cmp-switch input:checked {
	background: var(--amber);
	border-color: var(--amber);
}
.cmp-switch input:checked::before {
	translate: 16px 0;
	background: var(--bg);
}
.cmp-switch input:focus-visible {
	outline: 2px solid var(--amber);
	outline-offset: 3px;
}
/* No room beside the slider: the switch goes under it. */
@media (max-width: 1100px) {
	.cmp-usage {
		grid-template-columns: max-content minmax(0, 560px);
	}
	.cmp-switch {
		grid-column: 2;
		grid-row: auto;
		justify-self: start;
		margin-top: 14px;
	}
}
@media (max-width: 760px) {
	.cmp-usage {
		grid-template-columns: minmax(0, 1fr);
	}
	.cmp-switch {
		grid-column: 1;
	}
}

/* Between the fully priced rows and the ones whose price is incomplete at this level. */
.cmp-costs .cmp-divider th {
	padding: 26px 0 8px;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-dim);
	white-space: normal;
}

/* The own-GPU switch takes the slider over: it rests at Regular and can't be moved. */
.cmp-usage-range:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.cmp-usage.is-local .cmp-usage-stops,
.cmp-usage.is-local .cmp-usage-label {
	opacity: 0.4;
}

/* An editor whose generative AI is one model, with no stronger or cheaper one to pick: the
   same badge as the lowest cost, in the text color, so the two read apart without hue. */
.cmp-badge.cmp-one {
	border-color: var(--text-muted);
	color: var(--text);
}

/* "What you get": the top rating in a column gets a tint, so the strongest editors in each
   respect show at a glance. The rating word stays bold, so it never rests on color alone. */
.cmp-caps th,
.cmp-caps td {
	padding-inline: 12px;
}
/* The next step down gets the same tint, fainter. */
.cmp-caps td.is-good {
	background: color-mix(in oklch, var(--amber) 8%, transparent);
	box-shadow: inset 0 0 0 1px var(--bg);
}
.cmp-caps td.is-best {
	background: color-mix(in oklch, var(--amber) 13%, transparent);
	box-shadow: inset 0 0 0 1px var(--bg);
	color: var(--text);
}

/* A three-step meter over each rating: how far along None / Basic / Solid / Extensive, or
   Gentle / Moderate / Steep, the editor sits. A lighter step is reached only with an add-on
   or at the far end of a range. */
.cmp-meter {
	display: flex;
	gap: 3px;
	margin: 3px 0 9px;
}
.cmp-meter i {
	width: 22px;
	height: 4px;
	background: var(--border-strong);
}
.cmp-meter i.on {
	background: var(--text-muted);
}
.cmp-meter i.to {
	background: color-mix(in oklch, var(--text-muted) 45%, var(--border-strong));
}
.cmp-caps td.is-best .cmp-meter i.on {
	background: var(--amber);
}

/* ───────── Head to head: "DepthField Photo versus ____" ───────── */

/* The blank is a select: pick an editor and only its comparison shows. */
.cmp-prose .cmp-pick {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 14px;
	max-width: none;
	margin: 30px 0 0;
	font-family: var(--font-display);
	font-size: clamp(24px, 3vw, 36px);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: var(--text-strong);
}
.cmp-pick[hidden] {
	display: none;
}
.cmp-pick select {
	appearance: none;
	font: inherit;
	letter-spacing: inherit;
	color: var(--amber);
	color-scheme: dark;
	padding: 2px 44px 4px 4px;
	border: 0;
	border-bottom: 2px solid var(--amber);
	border-radius: 0;
	cursor: pointer;
	background: transparent
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0a23a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
		no-repeat right 8px center / 0.75em;
	transition: background-color 0.18s var(--ease);
}
.cmp-pick select:hover {
	background-color: color-mix(in oklch, var(--amber) 10%, transparent);
}
.cmp-pick select:focus-visible {
	outline: 2px solid var(--amber);
	outline-offset: 4px;
}
/* One comparison at a time: the heading above already names the pair. */
.cmp-versus.is-picking {
	display: block;
	margin-top: 26px;
	max-width: 72ch;
}
.cmp-versus.is-picking article[hidden] {
	display: none;
}
.cmp-versus.is-picking article .lp-h3 {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.cmp-versus.is-picking p {
	font-size: 16.5px;
}
@media (prefers-reduced-motion: no-preference) {
	.cmp-versus.is-picking article:not([hidden]) {
		animation: cmp-pick-in 0.25s var(--ease);
	}
}
@keyframes cmp-pick-in {
	from {
		opacity: 0;
		translate: 0 6px;
	}
}
