/*
 * 0-60 and Power-to-Weight Calculator -- tokens, layout, panels.
 *
 * The palette, the fonts and the 2px radius are lifted from the theme's
 * assets/css/main.css so the tool reads as part of the site even though the
 * theme is stripped from this page. Anything that crosses a file boundary is a
 * custom property declared here; see CONTRACT.md.
 *
 * Every size is calc(<base> * var(--z60-ui-scale)) so the whole UI rescales from
 * one number, and --z60-ui-scale: 1 reproduces the drawn design. Deliberately
 * NOT scaled: hairline borders, the radii, focus-ring widths and every reserved
 * min-height. A 1px rule is not proportional to type, a focus ring is a floor
 * rather than a ratio, and the reservations are measurements.
 *
 * There is no url() in this file, and there must not be: an optimiser that
 * aggregates stylesheets into a cache directory rewrites the document's base
 * and every relative path breaks silently.
 */

:root {
	color-scheme: dark;

	/* Theme palette, read from the live main.css v1.0.2 on 2026-09-17. */
	--z60-red: #e11d2a;
	--z60-red-dark: #b91320;
	--z60-bg: #0a0a0b;
	--z60-bg-2: #0f0f12;
	--z60-surface: #141417;
	--z60-surface-2: #1b1b21;
	--z60-surface-3: #23232a;
	--z60-line: rgba(255, 255, 255, .08);
	--z60-line-strong: rgba(255, 255, 255, .16);
	--z60-text: #f4f1ec;
	--z60-dim: #c1c1c7;
	--z60-muted: #8a8a90;
	--z60-faint: #6a6a72;

	/* Accents. Amber reads as "measured", cyan as "comparison". Both differ
	   from the brand red in lightness as well as hue, so they stay separable
	   in the common forms of colour blindness. */
	--z60-amber: #f5a524;
	--z60-cyan: #38bdf8;
	--z60-good: #4ade80;

	--z60-font-display: "Oswald", "Arial Narrow", Arial, sans-serif;
	--z60-font-body: "Spectral", Georgia, "Times New Roman", serif;
	--z60-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

	--z60-radius: 2px;
	--z60-ease: cubic-bezier(.2, .7, .2, 1);
	--z60-ease-out: cubic-bezier(.16, 1, .3, 1);
	--z60-ui-scale: 1;

	--z60-maxw: calc(1180px * var(--z60-ui-scale));
	--z60-pad: calc(28px * var(--z60-ui-scale));
	--z60-gap: calc(40px * var(--z60-ui-scale));
}

@media (max-width: 720px) {
	:root { --z60-ui-scale: .94; }
}
@media (max-width: 520px) {
	.z60-brand svg { height: calc(30px * var(--z60-ui-scale)); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.z60-body {
	margin: 0;
	background: var(--z60-bg);
	color: var(--z60-text);
	font-family: var(--z60-font-body);
	font-size: calc(17px * var(--z60-ui-scale));
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

body.z60-body a { color: var(--z60-cyan); }

/* ------------------------------------------------------------- structure */

.z60-wrap {
	max-width: var(--z60-maxw);
	margin: 0 auto;
	padding: 0 calc(20px * var(--z60-ui-scale));
}

.z60-masthead {
	border-bottom: 1px solid var(--z60-line);
	background: var(--z60-bg-2);
}
.z60-masthead-in {
	max-width: var(--z60-maxw);
	margin: 0 auto;
	padding: calc(14px * var(--z60-ui-scale)) calc(20px * var(--z60-ui-scale));
	display: flex;
	align-items: center;
	gap: calc(14px * var(--z60-ui-scale));
}
.z60-brand {
	display: inline-flex;
	line-height: 0;
	color: var(--z60-text);
	text-decoration: none;
}
/* The site's own logo, the same SVG the theme masthead draws at 48px. */
.z60-brand svg {
	display: block;
	height: calc(38px * var(--z60-ui-scale));
	width: auto;
}
/* Fallback only, for when assets/logo.svg cannot be read. */
.z60-brand-word {
	font-family: var(--z60-font-display);
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: calc(17px * var(--z60-ui-scale));
	line-height: 1;
}
.z60-brand-word b { color: var(--z60-red); }
.z60-masthead nav { margin-left: auto; display: flex; gap: calc(18px * var(--z60-ui-scale)); }
.z60-masthead nav a {
	font-family: var(--z60-font-ui);
	font-size: calc(13px * var(--z60-ui-scale));
	color: var(--z60-muted);
	text-decoration: none;
}
.z60-masthead nav a:hover { color: var(--z60-text); }

.z60-hero {
	padding: calc(34px * var(--z60-ui-scale)) 0 calc(10px * var(--z60-ui-scale));
}
.z60-hero h1 {
	font-family: var(--z60-font-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .01em;
	line-height: 1.04;
	font-size: calc(44px * var(--z60-ui-scale));
	margin: 0 0 calc(10px * var(--z60-ui-scale));
}
.z60-hero p {
	margin: 0;
	max-width: 62ch;
	color: var(--z60-dim);
	font-size: calc(18px * var(--z60-ui-scale));
}

.z60-app { padding-bottom: calc(40px * var(--z60-ui-scale)); }

.z60-panel {
	background: var(--z60-surface);
	border: 1px solid var(--z60-line);
	border-radius: var(--z60-radius);
	padding: var(--z60-pad);
	margin-top: calc(18px * var(--z60-ui-scale));
}

.z60-eyebrow {
	font-family: var(--z60-font-ui);
	font-size: calc(11px * var(--z60-ui-scale));
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--z60-faint);
	margin: 0 0 calc(14px * var(--z60-ui-scale));
}

/* ----------------------------------------------------------- input deck */

.z60-deck { display: grid; gap: calc(18px * var(--z60-ui-scale)); }

.z60-lookup { position: relative; }
.z60-lookup label,
.z60-field label {
	display: block;
	font-family: var(--z60-font-ui);
	font-size: calc(11px * var(--z60-ui-scale));
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--z60-muted);
	margin-bottom: calc(6px * var(--z60-ui-scale));
}

.z60-input,
.z60-select {
	width: 100%;
	background: var(--z60-bg-2);
	border: 1px solid var(--z60-line-strong);
	border-radius: var(--z60-radius);
	color: var(--z60-text);
	font-family: var(--z60-font-ui);
	font-size: calc(15px * var(--z60-ui-scale));
	padding: calc(11px * var(--z60-ui-scale)) calc(12px * var(--z60-ui-scale));
	font-variant-numeric: tabular-nums;
}
.z60-input:focus, .z60-select:focus,
.z60-btn:focus-visible, .z60-hit:focus-visible {
	outline: 3px solid var(--z60-cyan);
	outline-offset: 2px;
}
.z60-lookup .z60-input { font-size: calc(17px * var(--z60-ui-scale)); }

.z60-hits {
	position: absolute;
	z-index: 30;
	left: 0; right: 0;
	margin-top: 4px;
	background: var(--z60-surface-2);
	border: 1px solid var(--z60-line-strong);
	border-radius: var(--z60-radius);
	max-height: calc(320px * var(--z60-ui-scale));
	overflow-y: auto;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.z60-hit {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--z60-line);
	color: var(--z60-text);
	padding: calc(10px * var(--z60-ui-scale)) calc(12px * var(--z60-ui-scale));
	cursor: pointer;
	font-family: var(--z60-font-ui);
}
.z60-hit:last-child { border-bottom: 0; }
.z60-hit:hover { background: var(--z60-surface-3); }
.z60-hit-name { display: block; font-size: calc(14px * var(--z60-ui-scale)); }
.z60-hit-meta {
	display: block;
	font-size: calc(12px * var(--z60-ui-scale));
	color: var(--z60-muted);
	margin-top: 2px;
}
.z60-lookup-empty, .z60-lookup-note {
	margin: 0;
	padding: calc(10px * var(--z60-ui-scale)) calc(12px * var(--z60-ui-scale));
	font-family: var(--z60-font-ui);
	font-size: calc(12.5px * var(--z60-ui-scale));
	color: var(--z60-muted);
}

/*
 * The same reassurance the empty result set gives, but standing rather than
 * only after a failed search: 285 rows is a lot of cars and still not most of
 * them, and someone whose car is missing should not think the tool is for
 * other people. It sits under the input, so the absolutely positioned
 * .z60-hits dropdown covers it while a search is open, which is the wanted
 * order -- results first, fallback underneath.
 */
.z60-lookup-hint {
	margin: calc(7px * var(--z60-ui-scale)) 0 0;
	font-family: var(--z60-font-ui);
	font-size: calc(12.5px * var(--z60-ui-scale));
	line-height: 1.5;
	color: var(--z60-muted);
	border-left: 2px solid var(--z60-line-strong);
	padding-left: calc(9px * var(--z60-ui-scale));
}

.z60-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(calc(150px * var(--z60-ui-scale)), 1fr));
	gap: calc(14px * var(--z60-ui-scale));
}

.z60-toggles {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: calc(16px * var(--z60-ui-scale));
}
.z60-check {
	display: inline-flex;
	align-items: center;
	gap: calc(8px * var(--z60-ui-scale));
	font-family: var(--z60-font-ui);
	font-size: calc(13.5px * var(--z60-ui-scale));
	color: var(--z60-dim);
	cursor: pointer;
}

.z60-btn {
	font-family: var(--z60-font-display);
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	font-size: calc(13px * var(--z60-ui-scale));
	background: var(--z60-surface-3);
	color: var(--z60-text);
	border: 1px solid var(--z60-line-strong);
	border-radius: var(--z60-radius);
	padding: calc(10px * var(--z60-ui-scale)) calc(16px * var(--z60-ui-scale));
	cursor: pointer;
	transition: background .18s var(--z60-ease), color .18s var(--z60-ease);
}
.z60-btn:hover { background: var(--z60-surface-2); }
.z60-btn--primary {
	background: var(--z60-red);
	border-color: var(--z60-red);
	color: #fff;
	font-size: calc(15px * var(--z60-ui-scale));
	padding: calc(13px * var(--z60-ui-scale)) calc(26px * var(--z60-ui-scale));
}
.z60-btn--primary:hover { background: var(--z60-red-dark); }

/* ---------------------------------------------------------------- results */

.z60-results {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(calc(158px * var(--z60-ui-scale)), 1fr));
	gap: calc(2px * var(--z60-ui-scale));
	background: var(--z60-line);
	border: 1px solid var(--z60-line);
	/* CLS reservation: measured, not chosen. Do not scale, do not hand-tune. */
	min-height: 168px;
}
.z60-cell {
	background: var(--z60-surface);
	padding: calc(18px * var(--z60-ui-scale));
}
.z60-cell dt {
	font-family: var(--z60-font-ui);
	font-size: calc(10.5px * var(--z60-ui-scale));
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--z60-faint);
	margin-bottom: calc(6px * var(--z60-ui-scale));
}
.z60-cell dd {
	margin: 0;
	font-family: var(--z60-font-display);
	font-weight: 600;
	font-size: calc(32px * var(--z60-ui-scale));
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.z60-cell--hero { grid-column: span 2; }
.z60-cell--hero dd { font-size: calc(62px * var(--z60-ui-scale)); color: var(--z60-red); }
.z60-cell small {
	display: block;
	font-family: var(--z60-font-ui);
	font-size: calc(12px * var(--z60-ui-scale));
	color: var(--z60-muted);
	margin-top: calc(7px * var(--z60-ui-scale));
	font-variant-numeric: tabular-nums;
}

.z60-note {
	font-family: var(--z60-font-ui);
	font-size: calc(13px * var(--z60-ui-scale));
	color: var(--z60-muted);
	margin: calc(14px * var(--z60-ui-scale)) 0 0;
}
.z60-published {
	margin: calc(14px * var(--z60-ui-scale)) 0 0;
	padding: calc(12px * var(--z60-ui-scale));
	background: var(--z60-surface-2);
	border-left: 3px solid var(--z60-amber);
	font-family: var(--z60-font-ui);
	font-size: calc(13.5px * var(--z60-ui-scale));
	color: var(--z60-dim);
}

/* ------------------------------------------------------- power to weight */

.z60-spectrum {
	position: relative;
	height: calc(10px * var(--z60-ui-scale));
	border-radius: 999px;
	background: linear-gradient(90deg, #3d3d45 0%, var(--z60-amber) 58%, var(--z60-red) 100%);
	margin: calc(22px * var(--z60-ui-scale)) 0 calc(8px * var(--z60-ui-scale));
}
.z60-spectrum::after {
	content: "";
	position: absolute;
	top: 50%;
	left: var(--z60-mark, 50%);
	width: calc(4px * var(--z60-ui-scale));
	height: calc(24px * var(--z60-ui-scale));
	background: var(--z60-text);
	border-radius: 2px;
	transform: translate(-50%, -50%);
	transition: left .5s var(--z60-ease-out);
	box-shadow: 0 0 0 3px var(--z60-surface);
}
.z60-spectrum-scale {
	display: flex;
	justify-content: space-between;
	font-family: var(--z60-font-ui);
	font-size: calc(11px * var(--z60-ui-scale));
	color: var(--z60-faint);
}

.z60-traction {
	height: calc(8px * var(--z60-ui-scale));
	background: var(--z60-surface-3);
	border-radius: 999px;
	overflow: hidden;
	margin: calc(16px * var(--z60-ui-scale)) 0 calc(10px * var(--z60-ui-scale));
}
.z60-traction::before {
	content: "";
	display: block;
	height: 100%;
	width: var(--z60-traction, 0%);
	background: var(--z60-amber);
	transition: width .5s var(--z60-ease-out);
}

/* -------------------------------------------------------------- compare */

.z60-cmp-card { margin-top: calc(16px * var(--z60-ui-scale)); }
.z60-cmp-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: calc(12px * var(--z60-ui-scale));
	align-items: baseline;
	padding: calc(12px * var(--z60-ui-scale)) 0;
	border-bottom: 1px solid var(--z60-line);
	font-family: var(--z60-font-ui);
	font-size: calc(14px * var(--z60-ui-scale));
}
.z60-cmp-row b {
	font-family: var(--z60-font-display);
	font-size: calc(24px * var(--z60-ui-scale));
	font-variant-numeric: tabular-nums;
}
.z60-cmp-sub { color: var(--z60-muted); font-size: calc(12.5px * var(--z60-ui-scale)); }
.z60-cmp-verdict {
	margin: calc(12px * var(--z60-ui-scale)) 0 0;
	font-family: var(--z60-font-ui);
	font-size: calc(14px * var(--z60-ui-scale));
	color: var(--z60-dim);
}

/* ---------------------------------------------------------------- share */

.z60-share-row {
	display: flex;
	flex-wrap: wrap;
	gap: calc(10px * var(--z60-ui-scale));
	align-items: center;
}
.z60-copied {
	font-family: var(--z60-font-ui);
	font-size: calc(12.5px * var(--z60-ui-scale));
	color: var(--z60-good);
}
textarea.z60-input { min-height: calc(86px * var(--z60-ui-scale)); font-size: calc(12px * var(--z60-ui-scale)); }

/* --------------------------------------------------------------- article */

.z60-article {
	max-width: calc(760px * var(--z60-ui-scale));
	margin: calc(56px * var(--z60-ui-scale)) auto 0;
	padding: 0 calc(20px * var(--z60-ui-scale));
}
.z60-article h2 {
	font-family: var(--z60-font-display);
	text-transform: uppercase;
	letter-spacing: .01em;
	font-size: calc(27px * var(--z60-ui-scale));
	margin: calc(38px * var(--z60-ui-scale)) 0 calc(12px * var(--z60-ui-scale));
}
.z60-article h3 {
	font-family: var(--z60-font-display);
	font-size: calc(20px * var(--z60-ui-scale));
	margin: calc(26px * var(--z60-ui-scale)) 0 calc(8px * var(--z60-ui-scale));
}
.z60-article p { margin: 0 0 calc(17px * var(--z60-ui-scale)); }
.z60-article table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--z60-font-ui);
	font-size: calc(14px * var(--z60-ui-scale));
	margin: calc(20px * var(--z60-ui-scale)) 0;
}
.z60-article th, .z60-article td {
	text-align: left;
	padding: calc(9px * var(--z60-ui-scale)) calc(10px * var(--z60-ui-scale));
	border-bottom: 1px solid var(--z60-line);
}
.z60-article th {
	font-size: calc(11px * var(--z60-ui-scale));
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--z60-faint);
}
.z60-article td:not(:first-child) { font-variant-numeric: tabular-nums; }
.z60-formula {
	display: block;
	background: var(--z60-surface);
	border-left: 3px solid var(--z60-red);
	padding: calc(14px * var(--z60-ui-scale)) calc(16px * var(--z60-ui-scale));
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: calc(14px * var(--z60-ui-scale));
	overflow-x: auto;
	margin: calc(18px * var(--z60-ui-scale)) 0;
}

.z60-foot {
	border-top: 1px solid var(--z60-line);
	margin-top: calc(56px * var(--z60-ui-scale));
	padding: calc(26px * var(--z60-ui-scale)) 0 calc(44px * var(--z60-ui-scale));
	font-family: var(--z60-font-ui);
	font-size: calc(13px * var(--z60-ui-scale));
	color: var(--z60-muted);
}

/* --------------------------------------------------------------- embed */

body.z60-embedded .z60-masthead,
body.z60-embedded .z60-hero p,
body.z60-embedded .z60-article,
body.z60-embedded .z60-foot,
body.z60-embedded [data-z60-sharepanel] { display: none; }
body.z60-embedded .z60-hero { padding-top: calc(18px * var(--z60-ui-scale)); }

/* ------------------------------------------------------- reduced motion */

/*
 * One blanket rule, last. The tool stays fully functional: values arrive
 * instead of counting up, and the launch animation writes its final state
 * immediately rather than playing (see js/z60-run.js, which checks the same
 * query in script so it never even starts a frame loop).
 */
@media (prefers-reduced-motion: reduce) {
	.z60-app *,
	.z60-app *::before,
	.z60-app *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}

/* Visually hidden but available to a screen reader. Used for the aria-live
   region and for headings that the visual design carries some other way. */
.z60-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
