/* ==========================================================================
   Libretto marketing site — layout & components.
   Everything here reads from the vendored tokens (tokens.css); never a
   hardcoded hex/font value. "Editorial × Instrument": serif headings, mono
   labels/numerals, warm paper, forest-green accent.
   ========================================================================== */
@layer components {

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

.container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 clamp(20px, 4vw, 40px);
}

/* Visually hidden but still in the a11y tree -- e.g. a heading required to
   keep a page's hierarchy sequential where a visible one would be redundant. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.paper-grain {
	position: fixed;
	inset: 0;
	z-index: 60;
	pointer-events: none;
	opacity: 0.04;
	mix-blend-mode: multiply;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2"/></filter><rect width="160" height="160" filter="url(%23n)" opacity="0.6"/></svg>');
}

.eyebrow {
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-4);
	margin: 0 0 22px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.eyebrow__rule { display: inline-block; width: 26px; height: 1px; background: var(--text-4); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font-size: 15px;
	font-weight: 550;
	padding: 13px 26px;
	border-radius: var(--radius-control);
	border: none;
	cursor: pointer;
	transition: transform var(--timing-base) var(--ease-out), box-shadow var(--timing-base), border-color var(--timing-base), color var(--timing-base);
}
.btn--primary {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient(135deg, var(--accent) 0%, color-mix(in oklab, var(--accent) 82%, #000) 100%);
	color: var(--accent-ink);
	box-shadow: 0 3px 16px var(--accent-glow);
	transition: transform var(--timing-base) var(--ease-out), box-shadow var(--timing-base);
}
/* A soft diagonal sheen that glides across on hover. It sits above the gradient
   but below the label (z-index:-1 inside the button's own stacking context), and
   is a single no-tiling streak, so there is no seam and the loop point is
   invisible (the streak rests fully off-screen at both ends). */
.btn--primary::after {
	content: "";
	position: absolute;
	top: -20%;
	bottom: -20%;
	left: 0;
	width: 60%;
	z-index: -1;
	background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.16) 50%, transparent 100%);
	transform: translateX(-140%) skewX(-12deg);
	pointer-events: none;
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 5px 22px var(--accent-glow); }
.btn--primary:hover::after { animation: btn-shimmer 3.5s linear infinite; }
@keyframes btn-shimmer {
	from { transform: translateX(-140%) skewX(-12deg); }
	to   { transform: translateX(320%) skewX(-12deg); }
}
.btn--secondary {
	background: var(--tint-sm);
	border: 1px solid var(--border);
	color: var(--text-2);
}
.btn--secondary:hover { transform: translateY(-1px); border-color: var(--text-4); color: var(--ink); }
.btn--sm { padding: 9px 18px; font-size: 13.5px; }
.btn--block { display: flex; justify-content: center; width: 100%; }
/* Loading state — toggled by a data-indicator signal while a Datastar request is
   in flight. A spinner takes the first flex slot (the .btn's 10px gap sets it off
   from the label) and the button locks so a submit cannot fire twice. */
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before {
	content: "";
	width: 15px;
	height: 15px;
	flex: none;
	border-radius: 50%;
	border: 2px solid currentColor;
	border-top-color: transparent;
	opacity: 0.85;
	animation: btn-spin 0.65s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.btn.is-loading::before { animation-duration: 1.4s; }
}

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in oklab, var(--surface) 82%, transparent);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.site-header__logo { text-decoration: none; color: var(--ink); display: flex; align-items: baseline; gap: 10px; }
.site-header__wordmark { font-family: var(--font-serif); font-size: 28px; font-weight: 560; letter-spacing: -0.015em; }
.site-header__burger { display: none; background: none; border: none; color: var(--ink); cursor: pointer; padding: 8px; flex-shrink: 0; }
.site-header__nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-header__nav a { text-decoration: none; color: var(--text-3); font-size: 13.5px; letter-spacing: 0.01em; transition: color var(--timing-fast); }
.site-header__nav a:hover, .site-header__nav a[aria-current] { color: var(--ink); }
.site-header__cta { flex-shrink: 0; }
.lang-switch { display: flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; margin-left: 4px; }
.lang-switch__item {
	text-decoration: none;
	border-radius: var(--radius-pill);
	padding: 4px 9px;
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.08em;
	color: var(--text-4);
	transition: color var(--timing-fast), background var(--timing-fast);
}
.lang-switch__item[aria-current] { background: var(--tint-sm); color: var(--ink); }
.lang-switch__item:hover { color: var(--ink); }

/* Light/dark toggle. Shows the icon for the theme a click switches *to*:
   a moon on light, a sun on dark. The choice is expressed purely via the
   effective color scheme -- system preference when no override is set, the
   [data-theme] attribute once the visitor picks one -- so the button always
   matches what's actually on screen without any per-load JS. */
.site-header__theme {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: none;
	border: none;
	color: var(--text-3);
	cursor: pointer;
	padding: 8px;
	flex-shrink: 0;
	transition: color var(--timing-fast);
}
.site-header__theme:hover { color: var(--ink); }
/* Label reads only inside the mobile dropdown; the desktop bar is icon-only. */
.site-header__theme-label { display: none; }
.site-header__theme-icon--sun { display: none; }
.site-header__theme-icon--moon { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) .site-header__theme-icon--sun { display: block; }
	:root:not([data-theme]) .site-header__theme-icon--moon { display: none; }
}
:root[data-theme="dark"] .site-header__theme-icon--sun { display: block; }
:root[data-theme="dark"] .site-header__theme-icon--moon { display: none; }
:root[data-theme="light"] .site-header__theme-icon--sun { display: none; }
:root[data-theme="light"] .site-header__theme-icon--moon { display: block; }

/* Dims the page behind the open mobile menu: white in light mode, black in
   dark. Hidden by default and on desktop (never opened there). */
.site-header__scrim {
	display: none;
	position: fixed;
	/* The header carries backdrop-filter, so it (not the viewport) is the
	   containing block for this fixed child — hence an explicit height rather
	   than bottom:0, which would resolve against the 64px header box. */
	top: 64px; left: 0; right: 0; height: 100dvh;
	z-index: 1;
	background: light-dark(rgba(255, 255, 255, 0.55), rgba(0, 0, 0, 0.55));
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--timing-base) var(--ease-out);
}

@media (max-width: 760px) {
	.site-header__cta { padding: 9px 14px; font-size: 13px; }
	.site-header__burger { display: block; margin-left: auto; }
	.site-header__scrim { display: block; }
	.site-header__scrim--open { opacity: 1; pointer-events: auto; }
	.site-header__nav {
		display: none;
		position: absolute;
		top: 64px; left: 0; right: 0;
		z-index: 2;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		background: var(--surface);
		border-bottom: 1px solid var(--border-subtle);
		padding: 8px clamp(20px, 4vw, 40px) 16px;
	}
	.site-header__nav--open { display: flex; }
	.site-header__nav a { padding: 10px 0; }
	/* Full-width segmented control instead of the cramped desktop pill. */
	.lang-switch {
		width: 100%;
		margin: 14px 0 0;
		gap: 4px;
	}
	.lang-switch__item {
		flex: 1;
		text-align: center;
		padding: 10px 0;
		font-size: 12px;
	}
	/* In the stacked menu the toggle becomes a labelled, left-aligned row
	   like the other links rather than a bare icon. */
	.site-header__theme {
		width: 100%;
		justify-content: flex-start;
		gap: 12px;
		padding: 10px 0;
		font-size: 13.5px;
	}
	.site-header__theme:hover { color: var(--ink); }
	.site-header__theme-label { display: inline; }
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--border-subtle); }
.hero__grid {
	padding: clamp(56px, 9vw, 110px) clamp(20px, 4vw, 40px) clamp(56px, 8vw, 96px);
	display: grid;
	grid-template-columns: 1.02fr 0.98fr;
	gap: clamp(36px, 5vw, 72px);
	align-items: center;
}
.hero__title {
	font-size: clamp(40px, 5.6vw, 68px);
	line-height: 1.06;
	letter-spacing: -0.018em;
	margin: 0 0 26px;
	font-feature-settings: 'dlig';
}
.hero__subtitle { font-size: clamp(15.5px, 1.5vw, 17.5px); line-height: 1.6; color: var(--text-2); max-width: 46ch; margin: 0 0 36px; }
.hero__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero__selfhost-link { text-decoration: none; color: var(--text-3); font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 2px; transition: color var(--timing-fast); }
.hero__selfhost-link:hover { color: var(--ink); border-color: var(--text-3); }
.hero__footnote { margin: 16px 0 0; font-size: 13.5px; color: var(--text-4); }
.hero__tech { margin: 34px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-5); text-transform: uppercase; }

.hero__frame-link { display: block; text-decoration: none; color: inherit; border-radius: 12px; transition: transform var(--timing-slow) var(--ease-out); }
.hero__frame-link:hover { transform: translateY(-3px); }
.hero__frame {
	margin: 0;
	background: var(--surface-raised);
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	box-shadow: 0 24px 60px -28px var(--scrim-lg), 0 2px 8px var(--scrim-xs);
	overflow: hidden;
}
.hero__frame-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--border-subtle); }
.hero__frame-dots { display: flex; gap: 5px; }
.hero__frame-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--border); }
.hero__frame-title { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--text-4); }
.hero__frame-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--text-4); border: 1px dashed var(--border); border-radius: 6px; padding: 3px 8px; }
.hero__frame-tag--live { color: var(--accent); border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); border-style: solid; background: var(--accent-soft); }
.hero__frame-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-sunken); }
.hero__frame-placeholder { position: absolute; inset: 0; display: grid; place-items: center; justify-items: center; gap: 10px; }
.hero__frame-placeholder-rule { width: 30px; height: 1px; background: var(--accent); }
.hero__frame-placeholder span:last-child { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--text-5); }
.hero__frame-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Theme-aware screenshots (see themedShot in home.templ): a light + dark
   <picture> stacked, only the one matching the effective theme shown. The
   default follows the OS (prefers-color-scheme); an explicit <html data-theme>
   override from the header toggle wins -- which a plain <picture media> can't
   react to. display:contents keeps the wrapper layout-transparent so the frame
   rules still target the <img> directly; the hidden variant is display:none, so
   a lazy <img> isn't fetched until a toggle reveals it (one download per state). */
.themed-shot { display: contents; }
.themed-shot--dark { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) .themed-shot--light { display: none; }
	:root:not([data-theme]) .themed-shot--dark { display: contents; }
}
:root[data-theme="dark"] .themed-shot--light { display: none; }
:root[data-theme="dark"] .themed-shot--dark { display: contents; }

@media (max-width: 980px) {
	.hero__grid { grid-template-columns: 1fr; }
}

/* ── Truth in numbers ────────────────────────────────────────────────── */
.truth { border-bottom: 1px solid var(--border-subtle); }
.truth__grid { padding: clamp(64px, 9vw, 120px) clamp(20px, 4vw, 40px); display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 6vw, 88px); }
.truth__title { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 20px; }
.truth__subtitle { font-size: 16px; line-height: 1.62; color: var(--text-2); max-width: 52ch; margin: 0 0 48px; }
.truth__stat { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.truth__stat-unit, .truth__stat-suffix { font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.1em; color: var(--text-3); }
.truth__stat-unit { align-self: flex-start; padding-top: clamp(10px, 1.6vw, 22px); }
.truth__stat-value {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: clamp(88px, 13vw, 168px);
	line-height: 0.95;
	letter-spacing: -0.04em;
	color: var(--ink);
	font-variant-numeric: tabular-nums slashed-zero;
}
.truth__caption { margin: 20px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-5); }
.truth__breakdown { margin-top: 44px; max-width: 440px; }
.truth__breakdown-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; }
.truth__breakdown-seg--buy { background: var(--clr-buy); }
.truth__breakdown-seg--fuel { background: var(--clr-fuel); }
.truth__breakdown-seg--fixed { background: var(--clr-fixed); }
.truth__breakdown-seg--service { background: var(--clr-service); }
.truth__breakdown-seg--repair { background: var(--clr-repair); }
.truth__breakdown-list { margin: 14px 0 0; display: grid; }
.truth__breakdown-list > div {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	padding: 8px 0;
	border-top: 1px solid var(--border-subtle);
}
.truth__breakdown-list dt { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-3); }
.truth__breakdown-list dd { margin: 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; text-align: right; }
.truth__breakdown-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.truth__breakdown-dot--buy { background: var(--clr-buy); }
.truth__breakdown-dot--fuel { background: var(--clr-fuel); }
.truth__breakdown-dot--fixed { background: var(--clr-fixed); }
.truth__breakdown-dot--service { background: var(--clr-service); }
.truth__breakdown-dot--repair { background: var(--clr-repair); }
.truth__breakdown-caption { margin: 12px 0 0; font-size: 13px; color: var(--text-4); }

/* ── Interactive fleet breakdown (Flottenschnitt): hovering a bar segment or a
   list row cross-highlights the matching pair. Pure CSS via :has(), keyed on
   the shared data-seg attribute. ──────────────────────────────────────────── */
.truth__breakdown [data-seg="buy"]     { --seg: var(--clr-buy); }
.truth__breakdown [data-seg="fuel"]    { --seg: var(--clr-fuel); }
.truth__breakdown [data-seg="fixed"]   { --seg: var(--clr-fixed); }
.truth__breakdown [data-seg="service"] { --seg: var(--clr-service); }
.truth__breakdown [data-seg="repair"]  { --seg: var(--clr-repair); }

.truth__breakdown-bar { transition: height .2s ease; overflow: visible; }
.truth__breakdown-seg { position: relative; transition: opacity .18s ease; }
/* Enlarge the pointer target: the visible band stays 6px, but each segment is
   hoverable ±7px into the surrounding empty space (no text/rows sit there). */
.truth__breakdown-seg::after { content: ""; position: absolute; inset-block: -7px; inset-inline: 0; }
.truth__breakdown-seg:first-child { border-start-start-radius: 3px; border-end-start-radius: 3px; }
.truth__breakdown-seg:last-child  { border-start-end-radius: 3px; border-end-end-radius: 3px; }
.truth__breakdown-list > div { border-radius: 5px; transition: opacity .18s ease, background .18s ease, box-shadow .18s ease; }

/* While interacting: swell the bar and fade the rest of the field back. */
.truth__breakdown:has([data-seg]:hover) .truth__breakdown-bar { height: 12px; }
.truth__breakdown:has([data-seg]:hover) .truth__breakdown-seg { opacity: .28; }
.truth__breakdown:has([data-seg]:hover) .truth__breakdown-list > div { opacity: .42; }

/* Restore full opacity on the matching category — hits both bar segment and row. */
.truth__breakdown:has([data-seg="buy"]:hover)     [data-seg="buy"],
.truth__breakdown:has([data-seg="fuel"]:hover)    [data-seg="fuel"],
.truth__breakdown:has([data-seg="fixed"]:hover)   [data-seg="fixed"],
.truth__breakdown:has([data-seg="service"]:hover) [data-seg="service"],
.truth__breakdown:has([data-seg="repair"]:hover)  [data-seg="repair"] { opacity: 1; }

/* Tint + ring the active list row for a clear callout. */
.truth__breakdown:has([data-seg="buy"]:hover)     .truth__breakdown-list > [data-seg="buy"],
.truth__breakdown:has([data-seg="fuel"]:hover)    .truth__breakdown-list > [data-seg="fuel"],
.truth__breakdown:has([data-seg="fixed"]:hover)   .truth__breakdown-list > [data-seg="fixed"],
.truth__breakdown:has([data-seg="service"]:hover) .truth__breakdown-list > [data-seg="service"],
.truth__breakdown:has([data-seg="repair"]:hover)  .truth__breakdown-list > [data-seg="repair"] {
	opacity: 1; /* outrank the (0,4,1) dim rule so the active row stays lit */
	background: color-mix(in oklab, var(--seg) 13%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--seg) 32%, transparent);
}

@media (prefers-reduced-motion: reduce) {
	.truth__breakdown-bar, .truth__breakdown-seg, .truth__breakdown-list > div { transition: none; }
}

.truth__rail { border-left: 1px solid var(--border-subtle); padding-left: clamp(28px, 3.5vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.truth__rail-item { padding: 32px 0; border-top: 1px solid var(--border-subtle); }
.truth__rail-item:first-child { padding-top: 0; border-top: none; }
.truth__rail-item h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.005em; }
.truth__rail-item p { font-size: 14px; line-height: 1.6; color: var(--text-3); }
.truth__rail-value { margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.truth__rail-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--text-5); }
.rank-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.rank-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 10px; padding: 6px 0; border-top: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-2); }
.rank-list li:last-child { border-bottom: 1px solid var(--border-subtle); }
.rank-list__pos { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.rank-list__pos--top { color: var(--accent); }

@media (max-width: 980px) {
	.truth__grid { grid-template-columns: 1fr; }
	.truth__rail { border-left: none; padding-left: 0; border-top: 1px solid var(--border-subtle); padding-top: 32px; }
}

/* ── Features ────────────────────────────────────────────────────────── */
.features { border-bottom: 1px solid var(--border-subtle); background: var(--surface-sunken); }
.features__intro { max-width: 620px; margin: clamp(64px, 9vw, 120px) 0 clamp(40px, 5vw, 64px); }
.features__intro h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; letter-spacing: -0.015em; }
.features__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.features__foot { padding: clamp(30px, 4vw, 46px) 0 clamp(64px, 9vw, 120px); }
.features__more { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 4px; transition: color var(--timing-fast), border-color var(--timing-fast); }
.features__more:hover { color: var(--ink); border-color: var(--accent); }
.features__more svg { color: var(--accent); transition: transform var(--timing-fast); }
.features__more:hover svg { transform: translateX(3px); }
.feature-card {
	background: var(--surface-raised);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-card);
	/* No top padding: the thumbnail is full-bleed and sits flush on the card's
	   top edge. overflow:hidden lets it inherit the card's corner radius instead
	   of restating it (and re-deriving it against the border). */
	padding: 0 26px 26px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 14px;
	transition: transform var(--timing-slow) var(--ease-out), box-shadow var(--timing-slow), border-color var(--timing-slow);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px -18px var(--scrim-lg); border-color: var(--border); }
.feature-card__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature-card h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.005em; }
.feature-card p { font-size: 14px; line-height: 1.6; color: var(--text-3); flex: 1; }
.feature-card__media {
	display: block;
	/* Escape the card's 26px side padding so the thumb spans the full card width
	   and sits flush on the top edge (the card clips its corners). 2:1 keeps it a
	   banner rather than a second hero -- the captures are 16:10, so the crop is
	   anchored to their top, where the identifying chrome lives. */
	width: auto;
	margin: 0 -26px;
	position: relative;
	aspect-ratio: 2 / 1;
	border: 0;
	border-bottom: 1px solid var(--border-subtle);
	overflow: hidden;
	background: var(--surface-sunken);
	padding: 0;
	cursor: zoom-in;
	transition: border-color var(--timing-fast);
}
.feature-card__media:hover { border-color: var(--accent); }
/* Placeholder variant (no capture yet): same footprint, but nothing to open. */
.feature-card__media--empty { cursor: default; }
.feature-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; justify-items: center; gap: 8px; padding: 0 12px; text-align: center; }
.feature-card__placeholder-rule { width: 26px; height: 1px; background: var(--accent); }
.feature-card__placeholder span:last-child { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-5); }
.feature-card__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ── Feature screenshot lightbox (native Popover) — a gallery row's modal reuses
   the inline carousel's index signal, so it's the same gallery enlarged, plus the
   feature's title + description. ─────────────────────────────────────────────── */
.lightbox {
	margin: auto;
	flex-direction: column;
	gap: 14px;
	padding: 14px 14px 20px;
	max-width: min(94vw, 1120px);
	max-height: 94vh;
	overflow: auto;
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-card);
	background: var(--surface-raised);
	box-shadow: var(--shadow-modal);
}
/* Lay the popover out only while it's open. A bare `display:flex` on .lightbox is an
   author rule that overrides the UA `[popover]:not(:popover-open){display:none}`, which
   would make every lightbox render on page load (all "open" at once). */
.lightbox:popover-open { display: flex; }
.lightbox::backdrop { background: var(--scrim-lg); backdrop-filter: blur(2px); }
.lightbox__stage { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox__slide { display: block; }
.lightbox__image { display: block; max-width: 100%; max-height: 64vh; border-radius: 6px; }

/* Modal nav — mirrors the inline gallery nav; hidden until Datastar is live so the
   arrows never show as dead controls (the popover still opens with no JS). */
.lightbox__nav { display: none; align-items: center; justify-content: center; gap: 18px; }
.lightbox__nav.is-ready { display: flex; }
.lightbox__arrow {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--surface-raised);
	color: var(--text-3);
	cursor: pointer;
	transition: border-color var(--timing-fast), color var(--timing-fast), opacity var(--timing-fast);
}
.lightbox__arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.lightbox__arrow:disabled { opacity: 0.35; cursor: default; }
.lightbox__counter { min-width: 4ch; text-align: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--text-3); font-variant-numeric: tabular-nums slashed-zero; }

.lightbox__caption { max-width: 62ch; margin: 0 auto; text-align: center; }
.lightbox__title { font-size: clamp(18px, 2.2vw, 24px); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 8px; }
.lightbox__desc { font-size: 14px; line-height: 1.62; color: var(--text-2); margin: 0; }

.lightbox__close {
	position: absolute;
	top: 20px;
	right: 20px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: color-mix(in oklab, var(--surface-raised) 85%, transparent);
	color: var(--ink);
	cursor: pointer;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* ── Two ways ────────────────────────────────────────────────────────── */
.two-ways { color-scheme: dark; background: var(--surface); border-bottom: 1px solid var(--border-subtle); padding: clamp(72px, 10vw, 130px) 0; }
.two-ways__intro { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.two-ways__intro h2 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 20px; }
.two-ways__intro p { font-size: 16px; line-height: 1.62; color: var(--text-2); max-width: 54ch; margin: 0 0 16px; }
.two-ways__quote { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; color: var(--accent); }
.two-ways__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.plan-card { position: relative; background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: 32px; }
.plan-card--recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-card__badge { position: absolute; top: -12px; right: 24px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); }
.plan-card__eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--text-5); margin: 0 0 12px; text-transform: uppercase; }
.plan-card h3 { font-size: 22px; margin: 0 0 8px; }
.plan-card__tagline { color: var(--text-3); margin: 0 0 20px; }
.plan-card__bullets { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.plan-card__bullets li { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); text-transform: uppercase; padding-left: 18px; position: relative; }
.plan-card__bullets li::before { content: ''; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.download-grid { margin-top: 8px; }
.download-grid__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.download-grid__eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--text-5); text-transform: uppercase; margin: 0; }
.download-grid__version { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--text-5); margin: 0; }
.download-grid__os { border-top: 1px solid var(--border-subtle); }
.download-grid__os-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; background: none; border: none; font: inherit; text-align: left; cursor: pointer; }
.download-grid__os-name { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-2); }
.download-grid__os-icon { flex-shrink: 0; color: var(--text-4); }
.download-grid__chevron { transition: transform var(--timing-fast); flex-shrink: 0; color: var(--text-5); }
.download-grid__chevron--open { transform: rotate(180deg); }
.download-grid__archs { display: flex; flex-direction: column; gap: 8px; padding: 0 0 12px; }
.download-grid__item { display: flex; align-items: center; gap: 12px; }
.download-grid__arch {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	color: var(--text-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-control);
	padding: 5px 10px;
}
.download-grid__meta:empty { display: none; }
.download-grid__meta { flex: 1; display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; font-family: var(--font-mono); font-size: 10px; color: var(--text-5); }
.download-grid__hash {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--text-5);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-decoration: underline dotted;
}
.download-grid__hash:hover { color: var(--ink); }
.download-grid__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-control);
	color: var(--text-3);
	transition: border-color var(--timing-fast), color var(--timing-fast);
}
.download-grid__download:hover { border-color: var(--accent); color: var(--ink); }
.download-grid__docker { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 6px; }
.download-grid__cmd {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
	background: var(--surface-sunken);
	border: 1px solid var(--border);
	border-radius: var(--radius-control);
	padding: 8px 10px;
	cursor: pointer;
	transition: border-color var(--timing-fast);
}
.download-grid__cmd:hover { border-color: var(--accent); }
.download-grid__cmd-text {
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	white-space: nowrap;
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-2);
	scrollbar-width: none;
}
.download-grid__cmd-text::-webkit-scrollbar { display: none; }
.download-grid__cmd-copy, .download-grid__cmd-copied { flex-shrink: 0; transition: color var(--timing-fast); }
.download-grid__cmd-copy { color: var(--text-5); }
.download-grid__cmd:hover .download-grid__cmd-copy { color: var(--ink); }
.download-grid__cmd-copied { color: var(--accent); }
.download-grid__docker-note { margin: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.03em; color: var(--text-5); }
.download-grid__changelog-link { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--text-3); text-decoration: underline; }
.download-grid__changelog-link:hover { color: var(--ink); }

/* ── Changelog page ──────────────────────────────────────────────────── */
.changelog-entry { padding: 24px 0; border-top: 1px solid var(--border-subtle); }
.changelog-entry:first-child { border-top: none; }
.changelog-entry__heading { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; font-size: 18px; }
.changelog-entry__version { font-family: var(--font-mono); }
.changelog-entry__date { font-family: var(--font-mono); font-size: 12px; color: var(--text-5); font-weight: normal; }
.changelog-entry__items { margin: 0; padding-left: 20px; color: var(--text-2); display: grid; gap: 6px; }
.changelog-back { display: inline-block; margin-top: 24px; color: var(--text-3); text-decoration: underline; }
.changelog-back:hover { color: var(--ink); }

/* ── Language band ───────────────────────────────────────────────────── */
.lang-band { padding: 56px 0; text-align: center; border-bottom: 1px solid var(--border-subtle); }
.lang-band p { font-size: 15px; color: var(--text-2); margin: 0 0 8px; }
.lang-band__codes { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--text-5); }

/* ── Closing CTA ─────────────────────────────────────────────────────── */
.closing { padding: clamp(72px, 10vw, 130px) 0; text-align: center; border-bottom: 1px solid var(--border-subtle); }
.closing h2 { font-size: clamp(32px, 4.2vw, 54px); margin: 0 0 20px; }
.closing p { font-size: 16px; color: var(--text-2); max-width: 54ch; margin: 0 auto; }
.closing__actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 32px 0 16px; }
.closing__footnote { font-size: 13.5px; color: var(--text-4); }

/* ── Dealer / waitlist ───────────────────────────────────────────────── */
.dealer { padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--border-subtle); }
.dealer__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.dealer h3 { font-size: 22px; margin: 0 0 12px; }
.dealer p { color: var(--text-3); font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.dealer__form { display: flex; gap: 10px; flex-wrap: wrap; }
.dealer__input {
	flex: 1;
	min-width: 200px;
	padding: 12px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-control);
	background: var(--surface-raised);
	color: var(--ink);
	font-size: 14px;
}
.dealer__response { margin-top: 12px; font-size: 13.5px; color: var(--accent); }
@media (max-width: 760px) {
	.dealer__inner { grid-template-columns: 1fr; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { padding: 56px 0 24px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.site-footer__wordmark { font-family: var(--font-serif); font-size: 28px; text-decoration: none; color: var(--ink); }
.site-footer__tagline { font-family: var(--font-serif); font-style: italic; color: var(--text-3); font-size: 15px; margin: 8px 0 12px; }
.site-footer__made { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin: 0 0 12px; }
.site-footer__ticino { font-size: 13px; color: var(--text-4); line-height: 1.6; max-width: 46ch; }
.site-footer__heading { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--text-5); text-transform: uppercase; margin: 0 0 14px; }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer__list a { text-decoration: none; color: var(--text-3); font-size: 14px; }
.site-footer__list a:hover { color: var(--ink); }
.site-footer__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-5); }
.site-footer__bar a { color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }
.site-footer__bar a:hover { color: var(--ink); }

@media (max-width: 760px) {
	.site-footer__grid { grid-template-columns: 1fr; row-gap: 28px; }
}
/* Four columns need one intermediate step, or the brand column is squeezed to a
   word per line long before the single-column breakpoint. */
@media (max-width: 900px) and (min-width: 641px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ── Legal pages (Datenschutz / Impressum) ──────────────────────────────── */
.legal-intro { padding: clamp(56px, 8vw, 96px) 0 40px; }
.legal-intro h1 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 12px; }
.legal-intro p { color: var(--text-2); font-size: 15px; max-width: 62ch; margin: 0 0 8px; }
.legal-updated { color: var(--text-4) !important; font-size: 13px !important; font-family: var(--font-mono); }
.legal-body { padding-bottom: clamp(56px, 8vw, 96px); border-top: 1px solid var(--border-subtle); }
.legal-body__inner { max-width: 68ch; margin: 0 auto; padding-top: 8px; }
.legal-section { padding: 28px 0; border-bottom: 1px solid var(--border-subtle); }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { font-size: 19px; margin: 0 0 12px; }
.legal-section p { color: var(--text-3); font-size: 14.5px; line-height: 1.7; margin: 0 0 12px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legal-facts li { color: var(--text-3); font-size: 14.5px; }
.legal-facts a { color: var(--accent); }
.legal-address { font-style: normal; color: var(--text-3); font-size: 14.5px; line-height: 1.7; }
.legal-address a { color: var(--accent); }

/* ── Contact page ────────────────────────────────────────────────────── */
/* Shares the legal pages' intro + inset body layout (see .legal-intro /
   .legal-body__inner); the form sits in that indented column at the bottom. */
.contact__form { display: flex; flex-direction: column; gap: 12px; margin-top: clamp(32px, 5vw, 56px); }
.contact__input {
	padding: 12px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-control);
	background: var(--surface-raised);
	color: var(--ink);
	font-size: 14px;
	font-family: inherit;
}
.contact__input--message { resize: vertical; min-height: 120px; }
.contact__submit { align-self: flex-start; }
.contact__note { font-size: 12.5px; color: var(--text-4); line-height: 1.5; margin: 0; }
.contact__response { margin-top: 12px; font-size: 13.5px; }
.contact__response p { margin: 0; }
.contact__response--ok { color: var(--accent); }
.contact__response--error { color: var(--critical); }

/* ── Pricing page ────────────────────────────────────────────────────── */
.pricing-intro { padding: clamp(56px, 9vw, 100px) 0 48px; text-align: center; }
.pricing-intro h1 { font-size: clamp(34px, 4.4vw, 52px); margin: 0 0 20px; }
.pricing-intro > .container > p { font-size: 16px; color: var(--text-2); max-width: 60ch; margin: 0 auto 32px; }
.pricing-toggle { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; }
.pricing-toggle__btn { position: relative; background: none; border: none; border-radius: var(--radius-pill); padding: 8px 18px; font-size: 13.5px; color: var(--text-3); cursor: pointer; }
.pricing-toggle__btn--active { background: var(--tint-sm); color: var(--ink); }
.pricing-toggle__savings { margin-left: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); }

.pricing-tiers { padding-bottom: 64px; }
.pricing-tiers__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; margin-bottom: 24px; }
.pricing-tiers__nocard { text-align: center; font-size: 13.5px; color: var(--text-4); }
/* Four persona tiers (§74): 4-up on desktop, 2-up on tablet, stacked on phones. */
@media (max-width: 980px) { .pricing-tiers__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pricing-tiers__grid { grid-template-columns: 1fr; } }

.pricing-card { position: relative; background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; }
.pricing-card--recommended { border-color: var(--accent); box-shadow: 0 8px 32px -16px var(--accent-glow); }
.pricing-card__badge { position: absolute; top: -12px; right: 24px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); }
.pricing-card__name { font-size: 22px; margin: 0 0 6px; }
.pricing-card__tagline { color: var(--text-3); font-size: 14px; margin: 0 0 20px; }
.pricing-card__price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 20px; }
.pricing-card__price-currency { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); }
.pricing-card__price-value { font-family: var(--font-mono); font-size: 40px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.pricing-card__price-period { font-size: 13px; color: var(--text-3); }
.pricing-card__bullets { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.pricing-card__bullets li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.pricing-card__bullets svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.pricing-card__footnote { font-size: 12.5px; color: var(--text-4); margin: 0; }

.dealer-strip { padding: 32px 0; }
.dealer-strip__inner { border: 1px dashed var(--border); border-radius: var(--radius-card); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dealer-strip__inner p { margin: 0; color: var(--text-3); font-size: 14px; }
.dealer-strip__inner a { color: var(--accent); font-size: 14px; }

.faq { padding: 64px 0; border-top: 1px solid var(--border-subtle); }
.faq h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 32px; }
.faq__list { display: grid; }
.faq-item { border-top: 1px solid var(--border-subtle); }
.faq-item:last-child { border-bottom: 1px solid var(--border-subtle); }
.faq-item__question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: none; border: none; padding: 20px 0; text-align: left; font-size: 15.5px; color: var(--ink); cursor: pointer; }
.faq-item__chevron { transition: transform var(--timing-base) var(--ease-out); flex-shrink: 0; color: var(--text-4); }
.faq-item__chevron--open { transform: rotate(180deg); }
.faq-item__answer { padding: 0 0 20px; max-width: 68ch; }
.faq-item__answer p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-3); }

.trust-band { padding: 48px 0 72px; }
.trust-band__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.trust-item { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13.5px; }
.trust-item svg { color: var(--accent); flex-shrink: 0; }

/* ── Features page (/funktionen) ─────────────────────────────────────────── */
.features-hero { padding: clamp(64px, 10vw, 120px) 0 clamp(28px, 4vw, 52px); border-bottom: 1px solid var(--border-subtle); }
.features-hero__title { font-size: clamp(34px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.018em; margin: 0 0 24px; max-width: 18ch; font-feature-settings: 'dlig'; }
.features-hero__subtitle { font-size: clamp(15.5px, 1.5vw, 18px); line-height: 1.6; color: var(--text-2); max-width: 56ch; margin: 0; }

/* ── Chapters ──────────────────────────────────────────────────────────────
   The 21-row tour is grouped into four chapters and only one is on screen at a
   time. Three states, in the order they degrade (see featuresChapterRail):

     1. no JS      — no `js` on <html>, so nothing below hides a panel and the
                     rail stays display:none: the plain, complete 21-row page.
     2. no Datastar — `js` hid the inactive panels before first paint, and the
                     :target rule still opens whatever panel a tab links to.
     3. Datastar   — .is-active (from $fchapter) is what actually selects, and
                     :target agrees with it because every way of changing the
                     chapter also sets the hash (see chapterKeyExpr).

   The :target rule must out-specify the hide rule above it, so it cannot be
   wrapped in :where() — that would zero its specificity and quietly kill the
   whole no-Datastar layer. It also has to keep working with Datastar live: it is
   what gives the *browser* a laid-out element to scroll to when a deep link like
   #f-handoff arrives, long before $fchapter exists. */
.features-rail {
	display: none;
	--fgap: 6px;
	--fcount: 4;                        /* == len(content.FeatureChapters) */
}
html.js .features-rail.is-ready {
	display: block;
	position: sticky;
	top: 64px;                          /* .site-header__inner height */
	z-index: 40;
	background: color-mix(in oklab, var(--surface) 94%, transparent);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}
.features-rail__inner {
	position: relative;
	display: flex;
	gap: var(--fgap);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	padding: 10px clamp(20px, 4vw, 40px);
}
.features-rail__inner::-webkit-scrollbar { display: none; }
.features-rail__tab {
	flex: 1 0 auto;
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 13px 20px;
	border-radius: 9px;
	text-decoration: none;
	color: var(--text-3);
	white-space: nowrap;
	transition: color var(--timing-fast), background var(--timing-fast);
}
.features-rail__tab:hover { color: var(--ink); background: var(--tint-xs); }
.features-rail__tab.is-active { color: var(--ink); background: var(--accent-soft); }
.features-rail__tab-num {
	display: grid;
	place-items: center;
	min-width: 24px;
	padding: 3px 0;
	border-radius: 5px;
	border: 1px solid var(--border);
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.06em;
	color: var(--text-4);
	font-variant-numeric: tabular-nums;
	transition: color var(--timing-fast), background var(--timing-fast), border-color var(--timing-fast);
}
.features-rail__tab.is-active .features-rail__tab-num {
	color: var(--accent-ink);
	background: var(--accent);
	border-color: var(--accent);
}
.features-rail__tab-label { font-size: 15.5px; font-weight: 480; letter-spacing: -0.008em; }
.features-rail__tab.is-active .features-rail__tab-label { font-weight: 570; }

/* The ink bar rides --fi, the active index Datastar writes onto the tablist. It
   can only line up with the tabs while they share a width, so it is confined to
   the ≥720px branch below — the narrow rail scrolls and the filled active pill
   carries the state on its own. */
.features-rail__ink { display: none; }

@media (min-width: 720px) {
	.features-rail__tab { flex: 1 1 0; justify-content: center; }
	.features-rail__ink {
		display: block;
		position: absolute;
		left: clamp(20px, 4vw, 40px);
		right: clamp(20px, 4vw, 40px);
		bottom: -1px;
		height: 2px;
		pointer-events: none;
		/* one tab's share of the row, with the inter-tab gaps taken out */
		--tab-w: calc((100% - (var(--fcount) - 1) * var(--fgap)) / var(--fcount));
	}
	/* Slid with `left`, not translateX: a percentage inside a transform resolves
	   against the element's *own* width, which would shrink every step to a
	   quarter of a tab. In `left` it resolves against the containing block, which
	   is the full-width ink track — the measurement --tab-w is written against. */
	.features-rail__ink::after {
		content: "";
		position: absolute;
		top: 0;
		bottom: 0;
		left: calc(var(--fi, 0) * (var(--tab-w) + var(--fgap)));
		width: var(--tab-w);
		background: var(--accent);
		transition: left var(--timing-slow) var(--ease-out);
	}
}

/* Landing on a panel or a row inside one must clear the sticky header (65px) plus
   the sticky rail (~69px). Rows get more: they are still translated down 22px by
   the scroll-reveal when the anchor scroll is computed, so they rise by that much
   the moment they reveal — without the extra the row would settle under the rail. */
.showcase-panel { scroll-margin-top: 136px; }
.showcase { scroll-margin-top: 178px; }
html.js .showcase-panel { display: none; }
html.js .showcase-panel.is-active,
html.js .showcase-panel:target,
html.js .showcase-panel:has(.showcase:target) { display: block; }

/* The chapter opener is a full-bleed, centred band on the sunken surface with the
   chapter numeral set behind it as a watermark. Every showcase row is a
   left-aligned two-column band on the page surface, so nothing here rhymes with
   one — the chapter reads as a divider, not as feature zero. */
.chapter-head {
	position: relative;
	overflow: hidden;
	padding: clamp(52px, 8vw, 104px) 0 clamp(44px, 6vw, 84px);
	text-align: center;
	background: var(--surface-sunken);
	border-bottom: 1px solid var(--border-subtle);
}
.chapter-head__ghost {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: var(--font-serif);
	font-size: clamp(190px, 30vw, 340px);
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: color-mix(in oklab, var(--ink) 4%, transparent);
	pointer-events: none;
	user-select: none;
}
.chapter-head__inner { position: relative; }
.chapter-head__kicker {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0 0 20px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--accent);
}
.chapter-head__rule { width: clamp(24px, 6vw, 64px); height: 1px; background: color-mix(in oklab, var(--accent) 40%, transparent); }
.chapter-head__icon { display: grid; place-items: center; color: var(--accent); }
.chapter-head__title {
	font-family: var(--font-serif);
	font-size: clamp(34px, 5.2vw, 64px);
	line-height: 1.04;
	letter-spacing: -0.02em;
	margin: 0 auto 18px;
	max-width: 16ch;
	font-feature-settings: 'dlig';
}
.chapter-head__lead { font-size: clamp(15.5px, 1.6vw, 18.5px); line-height: 1.58; color: var(--text-2); margin: 0 auto 26px; max-width: 52ch; }
.chapter-head__count {
	display: inline-block;
	margin: 0;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-5);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	padding: 7px 16px;
	font-variant-numeric: tabular-nums;
	background: var(--surface);
}

.chapter-next {
	display: flex;
	align-items: center;
	gap: clamp(14px, 3vw, 28px);
	margin: clamp(36px, 5vw, 64px) auto clamp(12px, 2vw, 24px);
	padding: clamp(20px, 3vw, 30px) clamp(20px, 4vw, 34px);
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	background: var(--surface-raised);
	text-decoration: none;
	color: inherit;
	transition: border-color var(--timing-fast), transform var(--timing-slow) var(--ease-out), box-shadow var(--timing-slow);
}
.chapter-next:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 24px 48px -32px var(--scrim-lg); }
.chapter-next__kicker {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--text-5);
	flex-shrink: 0;
}
.chapter-next__title { flex: 1; display: flex; align-items: baseline; gap: 12px; font-size: clamp(17px, 2vw, 23px); letter-spacing: -0.012em; }
.chapter-next__num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent); font-variant-numeric: tabular-nums; }
.chapter-next__arrow { display: grid; place-items: center; color: var(--accent); transition: transform var(--timing-base) var(--ease-out); }
.chapter-next:hover .chapter-next__arrow { transform: translateX(5px); }

.showcase { border-bottom: 1px solid var(--border-subtle); }
.showcase-panel .showcase:last-of-type { border-bottom: 0; }
.showcase__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
	padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 40px);
}
/* Alternate the screenshot side row to row (screenshot left on even rows).
   Scoped to the panel, so the rhythm restarts with copy-left in every chapter. */
.showcase-panel .showcase:nth-of-type(even) .showcase__copy { order: 2; }

.showcase__copy { max-width: 30rem; }
.showcase__kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-4); }
.showcase__kicker-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.showcase__title { font-size: clamp(24px, 3vw, 37px); line-height: 1.14; letter-spacing: -0.015em; margin: 0 0 16px; }
.showcase__body { font-size: 16px; line-height: 1.62; color: var(--text-2); margin: 0 0 26px; }
.showcase__stat { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-3); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 6px 14px; font-variant-numeric: tabular-nums slashed-zero; }

/* Screenshot frame — a larger sibling of the hero frame; shared browser chrome
   so the home page and the tour read as one system. */
.showcase__frame {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	background: var(--surface-raised);
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 30px 70px -34px var(--scrim-lg), 0 2px 8px var(--scrim-xs);
	transition: transform var(--timing-slow) var(--ease-out), box-shadow var(--timing-slow), border-color var(--timing-fast);
}
.showcase__frame--zoom { cursor: zoom-in; }
.showcase__frame--zoom:hover { transform: translateY(-4px); box-shadow: 0 40px 84px -34px var(--scrim-lg); border-color: var(--accent); }
.showcase__frame-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--border-subtle); }
.showcase__frame-dots { display: flex; gap: 6px; }
.showcase__frame-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--border); }
.showcase__frame-title { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--text-4); }
.showcase__frame-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-sunken); }
.showcase__frame-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Multi-shot gallery — a horizontal scroll-snap carousel inside the shared frame.
   Works with no JS (native touch/scroll swipe on the track); gallery.js only
   un-hides the nav and wires dots/arrows/keyboard. */
.showcase__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;              /* the dots replace the native scrollbar */
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
}
.showcase__track::-webkit-scrollbar { display: none; }
.showcase__slide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: zoom-in;
}
/* Hidden until Datastar adds .is-ready (data-class:is-ready) — so with no JS the
   dots/arrows never show as dead controls; the track still swipes natively. */
.showcase__gallery-nav {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 11px 16px;
	border-top: 1px solid var(--border-subtle);
}
.showcase__gallery-nav.is-ready { display: flex; }
.showcase__gallery-arrow {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--surface-raised);
	color: var(--text-3);
	cursor: pointer;
	transition: border-color var(--timing-fast), color var(--timing-fast), opacity var(--timing-fast);
}
.showcase__gallery-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.showcase__gallery-arrow:disabled { opacity: 0.35; cursor: default; }
.showcase__gallery-dots { display: flex; align-items: center; gap: 9px; }
.showcase__gallery-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--border);
	cursor: pointer;
	transition: background var(--timing-fast), transform var(--timing-fast);
}
.showcase__gallery-dot:hover { background: var(--text-4); }
.showcase__gallery-dot[aria-current="true"] { background: var(--accent); transform: scale(1.3); }

@media (prefers-reduced-motion: reduce) {
	.showcase__track { scroll-behavior: auto; }
}

/* Placeholder frame — the final state for rows whose marketing screenshot has
   not been captured yet; styled to look intentional, not broken. */
.showcase__placeholder { position: absolute; inset: 0; display: grid; place-items: center; justify-items: center; align-content: center; gap: 14px; padding: 0 24px; text-align: center; }
.showcase__placeholder-icon { color: color-mix(in oklab, var(--accent) 55%, transparent); display: grid; }
.showcase__placeholder-rule { width: 34px; height: 1px; background: var(--accent); }
.showcase__placeholder-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-5); }

.features-cta { padding: clamp(72px, 10vw, 130px) 0; text-align: center; }
.features-cta h2 { font-size: clamp(30px, 4vw, 48px); margin: 0 0 18px; }
.features-cta p { font-size: 16px; color: var(--text-2); max-width: 52ch; margin: 0 auto; }
.features-cta__actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

@media (max-width: 900px) {
	.showcase__row { grid-template-columns: 1fr; gap: 28px; }
	.showcase-panel .showcase:nth-of-type(even) .showcase__copy { order: 0; }
	.showcase__copy { max-width: none; }
}
@media (max-width: 719px) {
	.chapter-head__ghost { font-size: 160px; }
	.features-rail__tab { padding: 11px 15px; gap: 9px; }
	.features-rail__tab-label { font-size: 14.5px; }
	.chapter-next { flex-wrap: wrap; gap: 8px 16px; }
	.chapter-next__title { flex-basis: 100%; }
}

/* Scroll-reveal — the class is added by static/js/reveal.js only when motion is
   allowed, so with JS off (or reduced motion) the rows are never hidden. The
   per-row delay makes a freshly opened chapter cascade in rather than snap: its
   rows all cross the observer at once, so --row-i (set on each .showcase) is
   what staggers them. */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity var(--timing-slower) var(--ease-out), transform var(--timing-slower) var(--ease-out); }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
.reveal-ready .showcase[data-reveal] { transition-delay: calc(var(--row-i, 0) * 60ms); }

/* Chapter swap. Only the panel animates — the rows inside it are already handled
   by the reveal cascade above, and doubling the two would fight over opacity. */
@media (prefers-reduced-motion: no-preference) {
	html.js .showcase-panel.is-active { animation: chapter-in var(--timing-slower) var(--ease-out) both; }
	@keyframes chapter-in {
		from { opacity: 0; transform: translateY(14px); }
		to   { opacity: 1; transform: none; }
	}
}

}

/* §90 public Typenschein finder ---------------------------------------------- */
.finder-hero { padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.finder-hero__inner { max-width: 720px; }
.finder-hero__title { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.06; margin: 0 0 18px; }
.finder-hero__subtitle { font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 56ch; margin: 0 0 36px; }

.finder-form { max-width: 560px; }
.finder-form__label { display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); margin: 0 0 10px; }
.finder-form__row { display: flex; gap: 10px; flex-wrap: wrap; }
.finder-form__input {
	flex: 1 1 220px; min-width: 0;
	font-family: var(--font-mono); font-size: 18px; letter-spacing: 0.04em;
	padding: 14px 16px; color: var(--ink);
	background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-control);
	transition: border-color var(--timing-slow) var(--ease-out), box-shadow var(--timing-slow) var(--ease-out);
}
.finder-form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.finder-form__submit { flex: 0 0 auto; }
.finder-form__hint { font-size: 13.5px; color: var(--text-3); margin: 12px 0 0; }

.finder-points { padding: clamp(24px, 5vw, 64px) 0 clamp(72px, 10vw, 120px); }
.finder-points__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.finder-point { border-top: 1px solid var(--border); padding-top: 20px; }
.finder-point__title { font-size: 18px; margin: 0 0 8px; }
.finder-point__body { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: 0; }

/* Result page */
/* scroll-margin-top clears the 64px sticky header when a lookup scrolls its answer
   into view (§109: the sheet is patched in below the form, never navigated to). */
.finder-result { padding: clamp(40px, 7vw, 96px) 0 clamp(72px, 10vw, 120px); scroll-margin-top: 72px; }
.finder-result__inner { max-width: 760px; }

.finder-sheet { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-1); padding: clamp(24px, 4vw, 44px); }
.finder-sheet__head { border-bottom: 1px solid var(--border-subtle); padding-bottom: 22px; margin-bottom: 24px; }
.finder-sheet__title { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; margin: 6px 0 6px; }
.finder-sheet__code { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--text-4); margin: 0; }

.finder-sheet__specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(20px, 4vw, 48px); margin: 0; }
.finder-spec { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.finder-spec__label { font-size: 14px; color: var(--text-3); margin: 0; }
.finder-spec__value { font-family: var(--font-mono); font-size: 14px; color: var(--ink); margin: 0; text-align: right; }
.finder-sheet__source { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-4); margin: 22px 0 0; }
.finder-sheet__pdf { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; text-decoration: none; color: var(--text-2); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 9px 15px; transition: border-color 0.15s ease, color 0.15s ease; }
.finder-sheet__pdf::before { content: "PDF"; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); }
.finder-sheet__pdf:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }

.finder-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.finder-badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 11px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-2); }
.finder-badge--collectible { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.finder-badge--uncommon { color: var(--clr-orange); border-color: color-mix(in srgb, var(--clr-orange) 40%, transparent); }
.finder-badge--preserved { color: var(--clr-green); border-color: color-mix(in srgb, var(--clr-green) 40%, transparent); }
.finder-badge--produced { color: var(--text-3); }

.finder-cta { margin-top: 32px; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-card); background: var(--surface-sunken); border: 1px solid var(--border-subtle); text-align: center; }
.finder-cta__title { font-size: clamp(20px, 2.6vw, 28px); margin: 0 0 12px; }
.finder-cta__body { font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 54ch; margin: 0 auto 24px; }

.finder-notfound { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-1); padding: clamp(32px, 5vw, 56px); text-align: center; }
.finder-notfound__title { font-size: clamp(22px, 3vw, 32px); margin: 0 0 14px; }
.finder-notfound__body { font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 52ch; margin: 0 auto; }

@media (max-width: 760px) {
	.finder-points__grid { grid-template-columns: 1fr; gap: 24px; }
	.finder-sheet__specs { grid-template-columns: 1fr; }
	.finder-form__submit { flex: 1 1 100%; }
}

/* §90 finder: EU-No/VIN candidate list ("which variant?") */
.finder-candidates { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-1); padding: clamp(24px, 4vw, 40px); }
.finder-candidates__title { font-size: clamp(20px, 2.6vw, 28px); margin: 0 0 6px; }
.finder-candidates__hint { font-size: 15px; color: var(--text-2); margin: 0 0 20px; }
.finder-candidates__list { list-style: none; margin: 0; padding: 0; }
.finder-candidate { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.finder-candidate:last-child { border-bottom: 0; }
.finder-candidate__model { display: block; font-size: 16px; color: var(--ink); }
.finder-candidate__code { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--text-4); margin-top: 2px; }
.finder-candidate__view { flex: 0 0 auto; }

/* §90 superlative / Rekorde page */
.records-hero { padding: clamp(64px, 9vw, 120px) 0 clamp(32px, 5vw, 56px); }
.records-hero__inner { max-width: 720px; }
.records-hero__title { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.06; margin: 0 0 18px; }
.records-hero__subtitle { font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 60ch; margin: 0; }
.records-body { padding-bottom: clamp(72px, 10vw, 120px); }
.records-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); align-items: start; }
.record-board { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-1); padding: clamp(20px, 2.4vw, 28px); }
.record-board__head { border-bottom: 1px solid var(--border-subtle); padding-bottom: 14px; margin-bottom: 6px; }
.record-board__title { font-size: 18px; margin: 0 0 4px; }
.record-board__blurb { font-size: 13px; color: var(--text-3); margin: 0; }
.record-board__list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.record-row { display: grid; grid-template-columns: 1.6em 1fr auto; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-subtle); }
.record-row:last-child { border-bottom: 0; }
.record-row__rank { font-family: var(--font-mono); font-size: 12px; color: var(--text-4); text-align: right; }
.record-row__name { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-row__value { font-family: var(--font-mono); font-size: 13px; color: var(--accent); white-space: nowrap; }
.records-source { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-4); margin: 28px 0 0; }
.records-finder-cta { margin: 20px 0 0; }
.records-finder-cta a { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--accent); text-decoration: none; }
.records-finder-cta a:hover { text-decoration: underline; }
.records-empty { font-size: 15px; color: var(--text-3); padding: 40px 0; }

/* §90 records: decade filter tabs */
.records-decades { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(28px, 4vw, 44px); }
.records-decade { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-3); transition: border-color var(--timing-slow) var(--ease-out), color var(--timing-slow) var(--ease-out); }
.records-decade:hover { color: var(--ink); border-color: var(--text-4); }
.records-decade--active { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.records-decade--active:hover { color: var(--accent-ink); }

@media (max-width: 860px) {
	.records-grid { grid-template-columns: 1fr; gap: 20px; }
	.finder-candidate { flex-wrap: wrap; }
}

/* ── §90 model pages ─────────────────────────────────────────────────── */
.model-hero { padding: clamp(32px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); }
.model-hero__back { color: var(--text-3); text-decoration: none; }
.model-hero__back:hover { color: var(--accent); }
.model-hero__title { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.05; margin: 8px 0 10px; }
.model-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.03em; color: var(--text-3); margin: 0; }
.model-hero__meta span { position: relative; }
.model-hero__meta span + span::before { content: "·"; position: absolute; left: -11px; color: var(--text-4); }
.model-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(20px, 3vw, 36px); align-items: stretch; padding-bottom: clamp(40px, 6vw, 72px); }
.model-section__title { font-size: 15px; font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 16px; }
.model-sheet { grid-column: 1; }
.model-cost { grid-column: 2; grid-row: 1; border: 1px dashed var(--border); border-radius: var(--radius-card); background: var(--surface-sunken); padding: clamp(20px, 3vw, 28px); }
.model-cost__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.model-cost__body { font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 0; }

/* §97 cost calculator (replaces the dashed "Bald" placeholder — now a real card) */
.model-estimate { border-style: solid; }
/* §97 on the finder result: the calculator sits BESIDE the spec sheet in the same
   1.6fr/1fr split the model page uses, with the CTA full-width below both. The
   result column is normally 760px, so it widens for this two-column case only. */
.finder-result__inner--wide { max-width: 1080px; }
/* align-items: stretch (the grid default, stated for intent) so the Werksdaten
   sheet and the calculator are equal-height cards rather than two ragged boxes. */
.finder-grid { display: grid; gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.finder-grid--split { grid-template-columns: 1.6fr 1fr; }
.model-estimate__form { margin: 16px 0 0; }
.model-estimate__fields { display: grid; gap: 12px; }
.model-estimate__field { display: grid; gap: 5px; }
.model-estimate__flabel { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
.model-estimate__input {
	width: 100%; min-width: 0; box-sizing: border-box;
	font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.02em;
	padding: 11px 13px; color: var(--ink);
	background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-control);
	transition: border-color var(--timing-slow) var(--ease-out), box-shadow var(--timing-slow) var(--ease-out);
}
.model-estimate__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.model-estimate__submit { width: 100%; margin-top: 14px; }
/* Disabled while the collector prompt is up — the valuation field below is then the
   only way forward, so the main submit must read as inactive, not merely be inert. */
.model-estimate__submit:disabled { opacity: 0.35; cursor: default; }
.model-estimate__result:empty { display: none; }
.model-estimate__result { margin-top: 18px; }
.model-estimate__headline { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 14px; }
.model-estimate__stat { margin: 0; }
.model-estimate__stat dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); margin: 0 0 3px; }
.model-estimate__value, .model-estimate__perkm { margin: 0; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.model-estimate__perkm { color: var(--accent); }
.model-estimate__breakdown { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 1px; }
.model-estimate__brow { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.model-estimate__note { font-size: 12px; line-height: 1.5; color: var(--text-3); margin: 4px 0 0; }
.model-estimate__assumptions { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-4); margin: 12px 0 0; }
.model-estimate__disclaimer { font-size: 12.5px; line-height: 1.5; color: var(--text-3); margin: 6px 0 0; font-style: italic; }
.model-estimate__error { font-size: 14px; color: var(--text-2); margin: 0; }
.model-estimate__needs-text { font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 0 0 12px; }
/* Stacked, not a flex row: the valuation field then a full-width button, so the
   prompt's "Berechnen" is exactly as wide as the main one above it. */
.model-estimate__vrow { display: grid; gap: 10px; }
.model-estimate__cta { display: inline-block; margin-top: 16px; }

.model-variants { grid-column: 1 / -1; margin-top: clamp(20px, 3vw, 32px); }
.model-variants__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.model-variant { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.model-variant__code { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.model-variant__facts { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); text-align: right; }
.model-variants__more { font-family: var(--font-mono); font-size: 12px; color: var(--text-4); margin: 12px 0 0; }
.model-cta { grid-column: 1 / -1; }

.models-hub__body { padding-bottom: clamp(40px, 6vw, 72px); }
.models-strip { margin-bottom: clamp(32px, 5vw, 52px); }
.models-strip__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.models-card { display: flex; }
.models-card__link { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-1); text-decoration: none; transition: border-color 0.15s ease; }
.models-card__link:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.models-card__name { color: var(--ink); font-size: 15px; }
.models-card__years { font-family: var(--font-mono); font-size: 12px; color: var(--text-4); }
.models-all { margin-top: clamp(24px, 4vw, 40px); }
.models-make { padding: 14px 0; border-top: 1px solid var(--border-subtle); }
.models-make__name { font-size: 16px; margin: 0 0 8px; }
.models-make__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.models-make__list a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.models-make__list a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 860px) {
	.model-body { grid-template-columns: 1fr; }
	.model-sheet, .model-cost, .model-variants, .model-cta { grid-column: 1; }
	.model-cost { grid-row: auto; }
	/* §97: the finder's sheet+calculator split stacks on narrow screens too. */
	.finder-grid--split { grid-template-columns: 1fr; }
}

/* §90 cross-surface links (finder→model, records→model, model→siblings/make-hub) */
.model-siblings { grid-column: 1 / -1; margin-top: clamp(20px, 3vw, 32px); }
.model-siblings__list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.model-siblings__list a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.model-siblings__list a:hover { color: var(--accent); text-decoration: underline; }
.model-siblings__all { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--accent); text-decoration: none; }
.model-siblings__all:hover { text-decoration: underline; }
.finder-sheet__model { display: block; margin-top: 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--accent); text-decoration: none; }
.finder-sheet__model:hover { text-decoration: underline; }
.record-row__name--link { color: var(--ink); text-decoration: none; }
.record-row__name--link:hover { color: var(--accent); text-decoration: underline; }

/* ==========================================================================
   §109 instrument blocks — Energieetikette + Motorfahrzeugsteuer
   Composed from the existing primitives (.record-board/.record-row for the
   26-canton comparison, which is a leaderboard; the .instrument__* rows mirror
   .finder-sheet__specs). Inc 1 is the data layer; Inc 2 replaces the class
   chips with the drawn A–G bar (D2) on the --clr-eff-* ramp (D3).
   ========================================================================== */
.instruments { display: grid; gap: clamp(16px, 2.5vw, 24px); margin-top: clamp(20px, 3vw, 32px); }
@media (min-width: 861px) { .instruments { grid-template-columns: 1fr 1fr; align-items: start; } }

.instrument { padding: clamp(18px, 2.5vw, 26px); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-raised); }
.instrument__head { margin-bottom: 16px; }
.instrument__title { font-family: var(--font-serif); font-size: clamp(19px, 2.2vw, 23px); margin: 0 0 6px; }
.instrument__intro { margin: 0; font-size: 14px; color: var(--text-3); }
.instrument__subhead { margin: 18px 0 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); }
.instrument__explain { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-3); }
.instrument__hedge { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-4); font-style: italic; }
.instrument__empty { margin: 0; font-size: 14px; color: var(--text-4); }
.instrument__source,
.instrument__disclaimer { margin: 14px 0 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--text-5); overflow-wrap: anywhere; }

.instrument__specs { margin: 16px 0 0; display: grid; gap: 6px; }
.instrument__row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px solid var(--border-subtle); }
.instrument__label { margin: 0; font-size: 13px; color: var(--text-3); }
.instrument__value { margin: 0; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }

/* The class pair. Never one bare letter: the whole finding is the gap. */
.eff-pair { display: flex; flex-wrap: wrap; gap: 12px; }
.eff-chip { flex: 1 1 120px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg-2); }
.eff-chip--lead { border-color: color-mix(in oklab, var(--accent) 40%, transparent); background: var(--accent-soft); }
.eff-chip__label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); }
.eff-chip__class { display: block; margin-top: 4px; font-family: var(--font-serif); font-size: clamp(30px, 5vw, 40px); line-height: 1; color: var(--ink); }
.eff-chip__note { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--text-5); }
.eff-drift { margin: 12px 0 0; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-3); }
.eff-drift--worse { color: var(--clr-repair); }

/* Tax figure. Mono + tabular so a column of francs scans as a ranking. */
.tax-figure__amount { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.tax-figure__currency { font-family: var(--font-mono); font-size: 13px; color: var(--text-4); }
.tax-figure__value { font-family: var(--font-mono); font-size: clamp(30px, 5vw, 40px); font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink); }
.tax-figure__per { font-size: 13px; color: var(--text-4); }
.tax-figure__none { margin: 0; font-size: 14px; color: var(--text-4); }

.tax-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tax-part { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.tax-part__label { color: var(--text-3); }
.tax-part__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.tax-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.tax-note { font-size: 12.5px; line-height: 1.5; color: var(--text-4); padding-left: 12px; border-left: 2px solid var(--border); }

/* No scroll box: the board is the two ends of the ranking (7 + 3), not all 26, so every
   row it does show is worth showing in full. */
.tax-compare__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); }
.tax-compare__head:first-of-type { margin-top: 0; }
.tax-compare__unit { letter-spacing: 0.04em; color: var(--text-5); }
/* The elided middle, and any canton with no schedule. Stated, never silently dropped. */
.tax-compare__gap { margin: 8px 0 0; padding-left: 12px; border-left: 2px solid var(--border); font-size: 12.5px; color: var(--text-5); }
.tax-compare__row { display: grid; grid-template-columns: 2.5em 1fr auto; gap: 10px; align-items: baseline; }

/* §109 D2 — the Energieetikette drawn. Server-rendered inline SVG (no charting
   runtime): var(--token) resolves natively in fill/stroke, so it themes light and
   dark for free. Fixed viewBox + intrinsic aspect-ratio so the graphic arriving in
   an SSE patch cannot shift the page beneath it. */
.eff-bar { margin: 0 0 16px; }
.eff-bar__svg { display: block; width: 100%; max-width: 420px; aspect-ratio: 280 / 96; height: auto; }
.eff-band { opacity: 0.42; transition: opacity 0.2s ease; }
.eff-band.is-at, .eff-band.is-now { opacity: 1; }
/* Letters are their own pass, drawn over every band and never dimmed with one. An
   inactive band is washed most of the way to the page, so the paper-white letter that
   reads on a saturated band would vanish on it — hence the ink swap. Dimming may cost
   emphasis; it must not cost the scale its labels. */
.eff-band__letter { font-family: var(--font-sans); font-size: 15px; font-weight: 600; dominant-baseline: middle; text-anchor: middle; fill: var(--clr-eff-ink); }
.eff-band__letter.is-dim { fill: var(--text-3); }
.eff-marker__pointer { fill: var(--ink); }
.eff-marker__label { font-family: var(--font-mono); font-size: 8.5px; fill: var(--text-4); }
.eff-marker--lead .eff-marker__pointer { fill: var(--accent); }
.eff-marker--lead .eff-marker__label { fill: var(--accent); }

/* §109 Inc 7b — the survival records. Reuses the drift story's section rhythm; only
   the two-column ranking and its rows are new. */
.survivors-window { margin: 0 0 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-5); }
.survivors-spread { margin: 0 0 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; color: var(--accent); }
.survivors-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px 36px; }
.survivors-col__head { margin: 0 0 10px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); }
.survivors-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
/* Three columns: name, the raw pair, the share. The pair is what makes a reader stop --
   "1.3 %" is an abstraction, "8'348 → 108" is not -- so it gets its own column rather
   than hiding in a tooltip. */
.survivor { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border-subtle); }
.survivor__name { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; min-width: 0; }
.survivor__make { font-size: 14px; color: var(--ink); }
.survivor__model { font-size: 13px; color: var(--text-4); }
.survivor__stock { font-family: var(--font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text-5); white-space: nowrap; }
.survivor__pct { font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--clr-repair); min-width: 4.5em; text-align: right; }
.survivor__pct.is-best { color: var(--clr-sell); }
.survivors-method { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.survivors-method__item { font-size: 14px; line-height: 1.6; color: var(--text-3); padding-left: 14px; border-left: 2px solid var(--border); }

/* §109 Inc 7a — the full Werksdatenblatt. Collapsed by default: forty rows of factory
   data is the thing you scroll INTO, not past on the way to the instruments. */
.datasheet { margin: 22px 0 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-1); }
.datasheet__summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px clamp(18px, 3vw, 28px); cursor: pointer; list-style: none; }
.datasheet__summary::-webkit-details-marker { display: none; }
.datasheet__summary::after { content: "+"; font-family: var(--font-mono); color: var(--text-4); }
.datasheet[open] .datasheet__summary::after { content: "\2212"; }
.datasheet__summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-card); }
.datasheet__title { font-family: var(--font-serif); font-size: clamp(17px, 2vw, 20px); color: var(--ink); }
.datasheet__count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); margin-inline-start: auto; }
.datasheet__body { padding: 0 clamp(18px, 3vw, 28px) clamp(18px, 3vw, 28px); }
.datasheet__intro { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--text-3); }
.datasheet__lean { margin: 0 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--text-4); padding-left: 12px; border-left: 2px solid var(--border); }
.datasheet__section + .datasheet__section { margin-top: 18px; }
.datasheet__sectitle { margin: 0 0 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); }
.datasheet__rows { margin: 0; display: grid; gap: 4px; }
.datasheet__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--border-subtle); }
.datasheet__label { margin: 0; font-size: 13px; color: var(--text-3); }
/* Values wrap: a brake or suspension description is a sentence, not a figure, and
   truncating it would hide exactly the detail this sheet exists to carry. */
.datasheet__value { margin: 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.datasheet__source { margin: 16px 0 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-5); }
.datasheet__cert { margin: 18px 0 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg-2); }
.datasheet__certtext { margin: 0 0 12px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
@media (max-width: 560px) {
	.datasheet__row { grid-template-columns: 1fr; gap: 2px; }
}

/* §109 Inc 6 — the total-cost curve. Stacked columns, server-rendered SVG (D1).
   Band colours reuse the existing cost-category tokens rather than inventing a
   palette: the same franc that is "Service" in the app is "Service" here. */
.cost-curve { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.cost-curve__title { margin: 0 0 4px; font-family: var(--font-serif); font-size: clamp(18px, 2.2vw, 22px); }
.cost-curve__intro { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--text-3); }
.cost-curve__figure { margin: 0; }
.cost-curve__svg { display: block; width: 100%; aspect-ratio: 320 / 122; height: auto; }
.cost-year { font-family: var(--font-mono); font-size: 7px; fill: var(--text-5); }
.cost-axis { stroke: var(--border); stroke-width: 0.5; }
.cost-band--depreciation { fill: var(--clr-buy); background: var(--clr-buy); }
.cost-band--maintenance  { fill: var(--clr-service); background: var(--clr-service); }
.cost-band--energy       { fill: var(--clr-fuel); background: var(--clr-fuel); }
.cost-band--tax          { fill: var(--clr-fixed); background: var(--clr-fixed); }
.cost-band--capital      { fill: var(--clr-asset); background: var(--clr-asset); }
.cost-band--vignette     { fill: var(--clr-upgrade); background: var(--clr-upgrade); }

.cost-curve__headline { margin: 10px 0 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; color: var(--accent); }
.cost-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 5px; }
.cost-legend__item { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: baseline; font-size: 13px; }
.cost-legend__swatch { width: 10px; height: 10px; border-radius: 2px; }
.cost-legend__label { color: var(--text-3); }
.cost-legend__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.cost-curve__scale { margin: 8px 0 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-5); }
/* Every exclusion, named. A franc figure with hidden caveats is the false-precision
   trap §97 and §109 both forbid, so these are structure, not fine print. */
.cost-caveats { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.cost-caveats li { font-size: 12px; line-height: 1.5; color: var(--text-5); padding-left: 12px; border-left: 2px solid var(--border); }

/* §109 doors — the two instrument entry pages. */
.door-form { max-width: 620px; }
.door-form__or { position: relative; margin: 22px 0 16px; text-align: center; }
.door-form__or::before { content: ""; position: absolute; inset-inline: 0; top: 50%; border-top: 1px solid var(--border-subtle); }
.door-form__or span { position: relative; padding: 0 12px; background: var(--surface); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); }
.door-form__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; }
.door-field { display: flex; flex-direction: column; gap: 4px; text-align: start; }
.door-field__label { font-size: 13px; color: var(--text-2); }
.door-field__input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-raised); color: var(--ink); font-family: var(--font-mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.door-field__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.door-field__hint { font-size: 11.5px; line-height: 1.4; color: var(--text-5); }

/* The tax-door cluster row: three vehicle groups, one click apart. Reads as a
   secondary nav rather than a call to action — the visitor already chose a door, this
   is only there for the one who chose wrong. */
.door-siblings { padding: 20px 0; border-top: 1px solid var(--border-subtle); }
.door-siblings__inner { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.door-siblings__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--text-5); text-transform: uppercase; }
.door-siblings__row { display: flex; gap: 8px; flex-wrap: wrap; }
.door-siblings__link,
.door-siblings__here { font-size: 14px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-subtle); }
.door-siblings__link { color: var(--text-3); text-decoration: none; }
.door-siblings__link:hover { color: var(--ink); border-color: var(--border); }
.door-siblings__here { color: var(--text-5); border-style: dashed; }

.door-explain { padding: clamp(28px, 5vw, 56px) 0; border-top: 1px solid var(--border-subtle); }
.door-explain__inner { max-width: 720px; }
.door-explain__title { font-family: var(--font-serif); font-size: clamp(21px, 2.6vw, 27px); margin: 0 0 12px; }
.door-explain__body { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }

/* People print a 26-canton comparison and an Energieetikette before a purchase. */
@media print {
	.instruments { grid-template-columns: 1fr; }
	.instrument { border-color: #999; break-inside: avoid; }
	/* Print un-dims every band, so the ink letter that the dimmed band needed on
	   screen would now sit on a saturated colour — put the paper letter back. */
	.eff-band { opacity: 1; }
	.eff-band__letter.is-dim { fill: var(--clr-eff-ink); }
	.door-form, .finder-form, .finder-points { display: none; }
}

/* §109 Inc 3 — canton pages. */
.canton-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 20px 0 0; }
.canton-fact { display: flex; flex-direction: column; gap: 2px; }
.canton-fact__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); }
.canton-fact__value { font-size: 15px; color: var(--ink); }
.canton-none { margin: 18px 0 0; font-size: 14px; color: var(--text-4); }
.canton-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin: 24px 0 0; }
.canton-cta__all { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--accent); text-decoration: none; }
.canton-cta__all:hover { text-decoration: underline; }
.canton-others { padding: clamp(24px, 4vw, 40px) 0; border-top: 1px solid var(--border-subtle); }
.canton-others__title { font-size: 16px; margin: 0 0 10px; }
.canton-others__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.canton-others__list a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.canton-others__list a:hover { color: var(--accent); text-decoration: underline; }
.canton-schedule { margin: 12px 0 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-4); }

/* §109 Inc 4 — the scale-drift story. Static editorial page. */
.drift-section { padding: clamp(28px, 5vw, 60px) 0; }
.drift-section--tinted { background: var(--bg-2); }
.drift-section__inner { max-width: 760px; }
.drift-section__title { font-family: var(--font-serif); font-size: clamp(22px, 3vw, 30px); margin: 0 0 12px; }
.drift-section__body { margin: 0 0 22px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.drift-note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--text-3); padding-left: 12px; border-left: 2px solid var(--border); }
.drift-note--peak { border-left-color: var(--accent); }
.drift-caption { margin: 10px 0 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-5); }

/* The inverted U, one bar per consumption band. */
.drift-bands { display: grid; gap: 5px; }
.drift-band { display: grid; grid-template-columns: 4.5em 1fr 3em 4em; gap: 10px; align-items: center; font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.drift-band__cons { color: var(--text-2); text-align: right; }
.drift-band__bar { height: 14px; background: var(--tint-xs); border-radius: 2px; overflow: hidden; }
.drift-band__fill { display: block; height: 100%; background: var(--clr-eff-d); border-radius: 2px; }
.drift-band--peak .drift-band__fill { background: var(--clr-eff-f); }
.drift-band--peak .drift-band__lost { color: var(--ink); font-weight: 600; }
.drift-band__lost { color: var(--text-2); text-align: right; }
.drift-band__n { color: var(--text-5); text-align: right; font-size: 11px; }
.drift-legend { display: grid; grid-template-columns: 4.5em 1fr 3em 4em; gap: 10px; margin: 8px 0 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-5); }
.drift-legend span:first-child { text-align: right; }
.drift-legend span:nth-child(2) { grid-column: 3; text-align: right; }
.drift-legend span:nth-child(3) { grid-column: 4; text-align: right; }

.drift-examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drift-example { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-control); background: var(--surface-raised); }
.drift-example__name { font-size: 14.5px; color: var(--ink); }
.drift-example__pair { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 15px; }
.drift-example__from { color: var(--clr-eff-a); font-weight: 600; }
.drift-example__arrow { color: var(--text-5); }
.drift-example__to { color: var(--clr-eff-e); font-weight: 600; }

/* Wide table scrolls in its own container; the page body never scrolls sideways. */
.drift-matrix__scroll { overflow-x: auto; margin: 0 0 4px; }
.drift-matrix { border-collapse: collapse; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.drift-matrix th, .drift-matrix td { padding: 6px 10px; text-align: center; border-bottom: 1px solid var(--border-subtle); }
.drift-matrix thead th { font-size: 11px; letter-spacing: 0.04em; color: var(--text-4); font-weight: 500; }
.drift-matrix tbody th { text-align: right; color: var(--text-3); font-weight: 500; }
.drift-cell { color: var(--clr-eff-ink); font-weight: 600; }
.drift-cell--a { background: var(--clr-eff-a); }
.drift-cell--b { background: var(--clr-eff-b); }
.drift-cell--c { background: var(--clr-eff-c); }
.drift-cell--d { background: var(--clr-eff-d); }
.drift-cell--e { background: var(--clr-eff-e); }
.drift-cell--f { background: var(--clr-eff-f); }
.drift-cell--g { background: var(--clr-eff-g); }
.drift-cell--mark { outline: 2px solid var(--ink); outline-offset: -2px; }
/* The ?tg= sweep: one real car across 25 years, so the columns are narrower and there is
   no row header. Scrolls inside .drift-matrix__scroll like the matrix does. */
.drift-matrix--car { width: 100%; table-layout: fixed; }
.drift-matrix--car th, .drift-matrix--car td { padding: 7px 0; min-width: 0; }
.drift-matrix--car thead th { font-size: 10px; letter-spacing: 0; }
/* A letter no published source can corroborate (label years 2012-2019). Hatched rather
   than dimmed: dimming reads as "less important", and the point is that it is exactly as
   important and merely unverifiable. */
.drift-cell--hedged {
	background-image: repeating-linear-gradient(
		135deg, transparent 0 4px, color-mix(in oklab, var(--ink) 22%, transparent) 4px 5px);
}
.instrument__more { display: inline-block; margin-top: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--accent); text-decoration: none; }
.instrument__more:hover { text-decoration: underline; }

/* §109 block 5 — the forward tax curve. Step chart, not a line: the tax is a fixed
   amount for a whole year and changes on 1 January, and a slope would claim a
   gradual change that does not happen. Server-rendered SVG, no charting runtime. */
.tax-curve { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.tax-curve__figure { margin: 12px 0 0; }
.tax-curve__svg { display: block; width: 100%; aspect-ratio: 320 / 120; height: auto; }
.tax-curve__axis { stroke: var(--border); stroke-width: 1; }
.tax-curve__area { fill: var(--accent-soft); }
.tax-curve__step { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.tax-curve__markline { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.tax-curve__marktext { font-family: var(--font-mono); font-size: 8px; fill: var(--text-4); }
.tax-curve__caption { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0 0; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-5); }
.tax-curve__steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.tax-curve__stepitem { font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-2); padding-left: 10px; border-left: 2px solid var(--clr-sell); }
.tax-curve__stepitem.is-rise { border-left-color: var(--clr-repair); }

/* ── Canton page: the five vehicle groups and their tax bases ───────────── */
/* The contrast between the rows IS the content, so the table is plain and dense
   rather than carded — a reader compares down a column, not across a grid. */
.canton-groups { padding: clamp(28px, 5vw, 56px) 0; border-top: 1px solid var(--border-subtle); }
.canton-groups__inner { max-width: 720px; }
.canton-groups__title { font-family: var(--font-serif); font-size: clamp(21px, 2.6vw, 27px); margin: 0 0 10px; }
.canton-groups__intro { margin: 0 0 20px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
/* Three columns do not fit a phone; the table scrolls inside its own box so the
   page body never does. */
.canton-groups__scroll { overflow-x: auto; }
.canton-groups__table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
.canton-groups__table th,
.canton-groups__table td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--border-subtle); }
.canton-groups__table thead th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-5); font-weight: 400; }
.canton-groups__table tbody th { font-weight: 500; color: var(--ink); white-space: nowrap; }
.canton-groups__table td { color: var(--text-2); }
.canton-groups__year { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-3); }
.canton-groups__none { color: var(--text-5); font-style: italic; }

/* ── Cheapest-canton rankings (§109 archetypes) ─────────────────────────── */
.cheapest-crumb { color: inherit; text-decoration: none; border-bottom: 1px solid var(--border-subtle); }
.cheapest-crumb:hover { color: var(--ink); }
/* The vehicle that was priced, stated before the numbers — a ranking whose inputs
   are hidden is the false-precision trap. */
.cheapest-spec { margin: 20px 0 0; font-size: 14px; color: var(--text-3); line-height: 1.6; }
.cheapest-spec__label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-5); margin-right: 10px; }
.cheapest-board { padding-top: clamp(20px, 3vw, 32px); }
.cheapest-board__head { font-family: var(--font-serif); font-size: clamp(19px, 2.3vw, 24px); margin: 0 0 6px; }
.cheapest-board__note { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 62ch; }
/* The second board is the finding on the camper page, so it is separated rather than
   stacked — the reader has to see that these are two answers, not one long list. */
.cheapest-board--compare { border-top: 1px solid var(--border-subtle); margin-top: clamp(28px, 4vw, 44px); padding-top: clamp(24px, 3.5vw, 38px); }
.cheapest-list { padding: clamp(28px, 5vw, 56px) 0; }
.cheapest-list__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cheapest-card { border: 1px solid var(--border-subtle); border-radius: 10px; }
.cheapest-card__link { display: block; padding: 20px; text-decoration: none; color: inherit; height: 100%; }
.cheapest-card:hover { border-color: var(--border); }
.cheapest-card__title { font-family: var(--font-serif); font-size: 19px; margin: 0 0 6px; }
.cheapest-card__blurb { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-3); }
