/* va-cx 0.1.0-pilot.6 · product context · light and dark
   ------------------------------------------------------------------------------------------
   The Vitale Arbeitskultur design system, built from tokens/ and css/ by tooling/build-css.mjs.
   Do not edit a vendored copy: change va-cx and sync (scripts/va-cx-sync.sh).

   Rules (ADR-002): everything in @layer va; classes `va-` with BEM modifiers; variants are
   modifier classes, never data-* (Datastar owns data-*); states come from ARIA and native state;
   no copy in CSS; 0 KB of JavaScript. Only text elements are styled bare; form controls carry
   their class. Dark mode follows the system (prefers-color-scheme); the values are written out
   per scheme instead of light-dark() so that browsers before 2024 keep the light values.

   Grammar (one small system, no further hues):
   teal, solid   = human action and confirmed content
   gold, dashed  = AI activity and drafts
   gold, solid   = "you are here": current phase, focus, attention
   red           = errors and destructive actions only                                        */

@layer va.reset, va.tokens, va.base, va.layout, va.components, va.patterns, va.utilities;

/* Geist (SIL OFL 1.1, fonts/OFL.txt): Latin subsets of the static cuts 400–700, plus a
   metric-matched system fallback so text does not jump while they load. Paths are relative
   to the built stylesheet (dist/va-cx.product.css next to dist/fonts/). */
/* Geist (SIL OFL 1.1, fonts/OFL.txt), Latin subsets of the static cuts 400–700 built with
   pyftsubset; metric-matched system fallback so text does not jump while they load. */
@font-face {
	font-family: 'Geist';
	src: url('fonts/geist-400-latin.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Geist';
	src: url('fonts/geist-500-latin.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Geist';
	src: url('fonts/geist-600-latin.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Geist';
	src: url('fonts/geist-700-latin.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Geist Fallback';
	src: local('Arial'), local('Helvetica Neue'), local('Liberation Sans');
	ascent-override: 92%;
	descent-override: 22%;
	line-gap-override: 10%;
	size-adjust: 104%;
}

@layer va.reset {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	body {
		margin: 0;
	}

	[hidden] {
		display: none !important;
	}

	h1,
	h2,
	h3,
	h4,
	p,
	ul,
	ol,
	figure,
	blockquote,
	fieldset,
	legend {
		margin: 0;
	}

	fieldset {
		padding: 0;
		border: 0;
		min-inline-size: 0;
	}

	legend {
		padding: 0;
	}

	button,
	input,
	select,
	textarea {
		font: inherit;
		color: inherit;
		letter-spacing: inherit;
	}

	img,
	svg {
		display: block;
		max-inline-size: 100%;
	}

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

/* Generated by tooling/build-tokens.mjs from tokens/. Do not edit: change the tokens. */
@layer va.tokens {
	:root {
		color-scheme: light dark;

		/* Primitives of the product context (tokens/primitive/scale.tokens.json). */
		--va-font-ui: 'Geist', 'Geist Fallback', system-ui, sans-serif;
		--va-font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
		--va-text-xs: 0.8125rem;
		--va-text-sm: 0.875rem;
		--va-text-base: 1rem;
		--va-text-md: 1.125rem;
		--va-text-lg: 1.375rem;
		--va-text-xl: 1.75rem;
		--va-text-2xl: 2.125rem;
		--va-leading: 1.55;
		--va-leading-tight: 1.25;
		--va-weight-regular: 400;
		--va-weight-medium: 500;
		--va-weight-semibold: 600;
		--va-weight-bold: 700;
		--va-sp-1: 0.25rem;
		--va-sp-2: 0.5rem;
		--va-sp-3: 0.75rem;
		--va-sp-4: 1rem;
		--va-sp-5: 1.25rem;
		--va-sp-6: 1.5rem;
		--va-sp-8: 2rem;
		--va-sp-10: 2.5rem;
		--va-sp-12: 3rem;
		--va-sp-16: 4rem;
		--va-radius-sm: 0.375rem;
		--va-radius: 0.625rem;
		--va-radius-lg: 0.875rem;
		--va-radius-full: 999px;
		--va-duration-fast: 150ms;
		--va-duration: 240ms;
		--va-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
		--va-tap: 2.75rem;
		--va-border: 1px;
		--va-border-strong: 1.5px;
		--va-measure: 44rem;
		--va-measure-wide: 80rem;
		--va-sidenav: 14rem;
		--va-statusbar-height: 3.5rem;
		--va-gutter: 1rem;
		--va-actionbar-height: 5.5rem;

		/* Product light (tokens/semantic/product.light.tokens.json). */
		--va-surface-page: #faf8f3;
		--va-surface: #ffffff;
		--va-surface-sunken: #f2efe7;
		--va-surface-raised: #ffffff;
		--va-line: #e5e1d7;
		--va-line-strong: #d1cdc4;
		--va-boundary: #8d8982;
		--va-ink: #1e3238;
		--va-ink-soft: #465d63;
		--va-ink-muted: #5b7076;
		--va-ink-on-action: #ffffff;
		--va-ink-on-danger: #ffffff;
		--va-ink-on-attention: #1e3238;
		--va-action: #21474d;
		--va-action-hover: #0e373c;
		--va-action-active: #03272c;
		--va-action-wash: #ecf8f9;
		--va-action-wash-strong: #daeef1;
		--va-link: #21474d;
		--va-link-hover: #1e3238;
		--va-attention: #efb708;
		--va-attention-strong: #a87f00;
		--va-attention-text: #846300;
		--va-attention-wash: #fff6e2;
		--va-danger: #a63634;
		--va-danger-hover: #7a2624;
		--va-danger-active: #681b1b;
		--va-danger-wash: #fef0ee;
		--va-ai-draft: #a87f00;
		--va-ai-wash: #fff6e2;
		--va-focus: #21474d;
		--va-status-success: #21474d;
		--va-status-info: #465d63;
		--va-status-warning: #a87f00;
		--va-status-error: #a63634;
		--va-disabled-surface: #f2efe7;
		--va-disabled-ink: #5b7076;
		--va-disabled-line: #d1cdc4;
		--va-shadow-soft: 0 1px 2px rgb(30 50 56 / 0.06), 0 4px 18px rgb(30 50 56 / 0.05);
		--va-shadow-raised: 0 2px 6px rgb(30 50 56 / 0.08), 0 10px 32px rgb(30 50 56 / 0.08);
	}

	@media (prefers-color-scheme: dark) {
		:root {
			/* Product dark (tokens/semantic/product.dark.tokens.json). */
			--va-surface-page: #15262b;
			--va-surface: #1d3035;
			--va-surface-sunken: #0d1c20;
			--va-surface-raised: #263a40;
			--va-line: #374c52;
			--va-line-strong: #485f66;
			--va-boundary: #6c848c;
			--va-ink: #efede7;
			--va-ink-soft: #c2cdcd;
			--va-ink-muted: #95a7a9;
			--va-ink-on-action: #0d1c20;
			--va-ink-on-danger: #0d1c20;
			--va-ink-on-attention: #0d1c20;
			--va-action: #5eadba;
			--va-action-hover: #7ec2cd;
			--va-action-active: #9ad3dd;
			--va-action-wash: #173e44;
			--va-action-wash-strong: #234f56;
			--va-link: #5eadba;
			--va-link-hover: #efede7;
			--va-attention: #efb708;
			--va-attention-strong: #efb708;
			--va-attention-text: #f7c445;
			--va-attention-wash: #413314;
			--va-danger: #e7867f;
			--va-danger-hover: #f5a29b;
			--va-danger-active: #fbb7b0;
			--va-danger-wash: #462623;
			--va-ai-draft: #efb708;
			--va-ai-wash: #413314;
			--va-focus: #5eadba;
			--va-status-success: #5eadba;
			--va-status-info: #c2cdcd;
			--va-status-warning: #efb708;
			--va-status-error: #e7867f;
			--va-disabled-surface: #0d1c20;
			--va-disabled-ink: #95a7a9;
			--va-disabled-line: #374c52;
			--va-shadow-soft: 0 1px 2px rgb(0 0 0 / 0.25), 0 4px 18px rgb(0 0 0 / 0.2);
			--va-shadow-raised: 0 2px 6px rgb(0 0 0 / 0.3), 0 10px 32px rgb(0 0 0 / 0.3);
		}
	}
}

/* Generated by tooling/build-icons.mjs from icons/phosphor/ (Phosphor, MIT). Do not edit. */
@layer va.tokens {
	:root {
		--va-icon-arrow-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E");
		--va-icon-caret-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z'/%3E%3C/svg%3E");
		--va-icon-check-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'/%3E%3C/svg%3E");
		--va-icon-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z'/%3E%3C/svg%3E");
		--va-icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E");
		--va-icon-lock-simple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z'/%3E%3C/svg%3E");
		--va-icon-sign-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z'/%3E%3C/svg%3E");
		--va-icon-sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z'/%3E%3C/svg%3E");
		--va-icon-tray: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z'/%3E%3C/svg%3E");
		--va-icon-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z'/%3E%3C/svg%3E");
		--va-icon-warning-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z'/%3E%3C/svg%3E");
		--va-icon-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='currentColor'%3E%3Cpath d='M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z'/%3E%3C/svg%3E");
	}
}

@layer va.base {
	html {
		font-family: var(--va-font-ui);
		font-size: 100%;
		line-height: var(--va-leading);
		background: var(--va-surface-page);
		color: var(--va-ink);
		/* A focused control is never hidden under a sticky action bar (WCAG 2.4.11). */
		scroll-padding-block: var(--va-sp-6) calc(var(--va-actionbar-height) + var(--va-sp-4));
	}

	body {
		min-height: 100dvh;
		display: flex;
		flex-direction: column;
		font-size: var(--va-text-base);
		-webkit-font-smoothing: antialiased;
		font-feature-settings: 'kern', 'liga', 'calt';
		overflow-wrap: break-word;
	}

	:lang(de) {
		hyphens: auto;
	}

	h1,
	h2,
	h3,
	h4 {
		font-weight: var(--va-weight-semibold);
		line-height: var(--va-leading-tight);
		letter-spacing: -0.01em;
		text-wrap: balance;
	}

	h1 {
		font-size: var(--va-text-xl);
	}

	h2 {
		font-size: var(--va-text-lg);
	}

	h3 {
		font-size: var(--va-text-md);
	}

	h4 {
		font-size: var(--va-text-base);
	}

	@media (min-width: 40rem) {
		h1 {
			font-size: var(--va-text-2xl);
		}
	}

	p,
	li {
		max-inline-size: 70ch;
	}

	a {
		color: var(--va-link);
		text-decoration: underline;
		text-decoration-thickness: 1px;
		text-underline-offset: 0.18em;
		transition: color var(--va-duration-fast) var(--va-ease);
	}

	a:hover {
		color: var(--va-link-hover);
		text-decoration-thickness: 2px;
	}

	strong,
	b {
		font-weight: var(--va-weight-semibold);
	}

	code,
	kbd,
	samp {
		font-family: var(--va-font-mono);
		font-size: 0.9em;
	}

	time,
	.va-num {
		font-variant-numeric: tabular-nums;
	}

	/* The focus ring (D-05, owner decision of 23.10.2026): one ring in the action colour, 3 px
	   wide with a 3 px gap, so the page (never a control's fill) is its neighbour and it reaches
	   3:1 on every surface; an outline, so it survives forced colours. */
	:focus-visible {
		outline: 3px solid var(--va-focus);
		outline-offset: 3px;
		border-radius: var(--va-radius-sm);
	}

	main:focus-visible {
		outline: none;
	}

	::selection {
		background: var(--va-attention-wash);
		color: var(--va-ink);
	}

	summary {
		cursor: pointer;
	}

	hr {
		border: 0;
		border-top: var(--va-border) solid var(--va-line);
		margin: var(--va-sp-6) 0;
	}
}

@layer va.layout {
	/* Skip link: off-screen until focused, then the first thing on the page. */
	.va-skip {
		position: absolute;
		inset-inline-start: -200vw;
		top: var(--va-sp-2);
		z-index: 100;
		padding: var(--va-sp-2) var(--va-sp-4);
		background: var(--va-surface);
		color: var(--va-ink);
		border-radius: var(--va-radius-sm);
		box-shadow: var(--va-shadow-raised);
	}

	.va-skip:focus {
		inset-inline-start: var(--va-sp-4);
	}

	/* Top bar: brand on the start side, navigation and the language switch on the end side; on a
	   phone the navigation wraps under the brand. */
	.va-topbar {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-2) var(--va-sp-4);
		padding: var(--va-sp-2) max(var(--va-gutter), env(safe-area-inset-right, 0px))
			var(--va-sp-2) max(var(--va-gutter), env(safe-area-inset-left, 0px));
		background: var(--va-surface);
		border-bottom: var(--va-border) solid var(--va-line);
		box-shadow: inset 0 -3px 0 var(--va-attention);
	}

	.va-brand {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-2);
		min-height: var(--va-tap);
		font-weight: var(--va-weight-semibold);
		color: var(--va-ink);
		text-decoration: none;
		letter-spacing: -0.01em;
	}

	.va-brand:hover {
		color: var(--va-action);
	}

	/* The ensō-like mark: a gold disc with a petrol ring, pure CSS. */
	.va-brand__mark {
		flex: none;
		inline-size: 1rem;
		block-size: 1rem;
		border-radius: 50%;
		background: var(--va-attention);
		box-shadow: inset 0 0 0 3px var(--va-action);
	}

	/* Top bar with a menu (a signed-in workspace): on a phone the brand and one "Menu"
	   disclosure fill a single row, and the open menu lists the navigation, the settings and
	   signing out below the bar; from the tablet width the navigation sits in the bar and the
	   disclosure is gone. Works without JavaScript. */
	.va-topbar--menu {
		position: relative;
	}

	.va-topbar__menu {
		display: none;
		margin-inline-start: auto;
	}

	.va-topbar__menu > summary {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-2);
		min-height: var(--va-tap);
		padding: 0 var(--va-sp-3);
		border: var(--va-border) solid var(--va-line-strong);
		border-radius: var(--va-radius-sm);
		color: var(--va-ink);
		font-weight: var(--va-weight-medium);
		list-style: none;
		cursor: pointer;
	}

	.va-topbar__menu > summary::-webkit-details-marker {
		display: none;
	}

	.va-topbar__menu > summary:focus-visible {
		outline: 3px solid var(--va-focus);
		outline-offset: 2px;
	}

	.va-topbar__menu[open] > summary {
		background: var(--va-surface-sunken);
	}

	.va-topbar__panel {
		position: absolute;
		inset-inline: 0;
		inset-block-start: 100%;
		z-index: 30;
		padding: var(--va-sp-3) max(var(--va-gutter), env(safe-area-inset-right, 0px))
			var(--va-sp-4) max(var(--va-gutter), env(safe-area-inset-left, 0px));
		background: var(--va-surface);
		border-bottom: var(--va-border) solid var(--va-line);
		box-shadow: var(--va-shadow-raised);
	}

	.va-topbar__panel .va-nav {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--va-sp-3);
		margin-inline-start: 0;
	}

	.va-topbar__panel .va-nav a,
	.va-topbar__panel .va-nav .va-button--quiet {
		padding-inline: 0;
	}

	@media (width < 40rem) {
		.va-topbar--menu > .va-nav {
			display: none;
		}

		.va-topbar--menu > .va-topbar__menu {
			display: block;
		}
	}

	.va-nav {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-1) var(--va-sp-2);
		margin-inline-start: auto;
	}

	.va-nav a {
		display: inline-flex;
		align-items: center;
		min-height: var(--va-tap);
		padding: 0 var(--va-sp-3);
		border-radius: var(--va-radius-sm);
		color: var(--va-ink-soft);
		text-decoration: none;
		font-weight: var(--va-weight-medium);
	}

	.va-nav a:hover {
		color: var(--va-ink);
		background: var(--va-surface-sunken);
	}

	.va-nav a[aria-current='page'] {
		color: var(--va-ink);
		box-shadow: inset 0 -2px 0 var(--va-attention);
	}

	/* The page: a reading column (participant flows, forms) or the wide workspace. The gutter
	   grows with the viewport; the column never exceeds its measure. */
	.va-page {
		flex: 1;
		inline-size: 100%;
		max-inline-size: calc(var(--va-measure) + 2 * var(--va-gutter));
		margin-inline: auto;
		/* The gutter grows under a phone's side inset (viewport-fit=cover), never shrinks. */
		padding: var(--va-sp-6) max(var(--va-gutter), env(safe-area-inset-right, 0px)) var(--va-sp-16)
			max(var(--va-gutter), env(safe-area-inset-left, 0px));
	}

	.va-page--wide {
		max-inline-size: calc(var(--va-measure-wide) + 2 * var(--va-gutter));
	}

	.va-page--narrow {
		max-inline-size: calc(32rem + 2 * var(--va-gutter));
	}

	@media (min-width: 40rem) {
		:root {
			--va-gutter: var(--va-sp-6);
		}

		.va-page {
			padding-block: var(--va-sp-8) var(--va-sp-16);
		}
	}

	@media (min-width: 64rem) {
		:root {
			--va-gutter: var(--va-sp-8);
		}
	}

	/* A wide page with a side navigation of its sections: one column until the desktop
	   breakpoint, then the navigation sticks beside the content. */
	.va-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: var(--va-sp-6);
		align-items: start;
	}

	@media (min-width: 64rem) {
		.va-layout {
			grid-template-columns: var(--va-sidenav) minmax(0, 1fr);
			gap: var(--va-sp-10);
		}

		.va-sidenav {
			position: sticky;
			top: var(--va-sp-6);
			max-block-size: calc(100dvh - var(--va-sp-8));
			overflow-y: auto;
		}
	}

	.va-sidenav__title {
		font-size: var(--va-text-xs);
		font-weight: var(--va-weight-semibold);
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--va-ink-muted);
		margin-block-end: var(--va-sp-2);
	}

	.va-sidenav ol,
	.va-sidenav ul {
		list-style: none;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		gap: var(--va-sp-1);
	}

	@media (min-width: 64rem) {
		.va-sidenav ol,
		.va-sidenav ul {
			flex-direction: column;
			gap: 0;
		}
	}

	.va-sidenav a {
		display: flex;
		align-items: center;
		gap: var(--va-sp-2);
		min-height: 2.5rem;
		padding: var(--va-sp-1) var(--va-sp-3);
		border-radius: var(--va-radius-sm);
		color: var(--va-ink-soft);
		font-size: var(--va-text-sm);
		font-weight: var(--va-weight-medium);
		text-decoration: none;
	}

	.va-sidenav a:hover {
		background: var(--va-surface-sunken);
		color: var(--va-ink);
	}

	.va-sidenav a[aria-current='true'],
	.va-sidenav a[aria-current='location'] {
		color: var(--va-ink);
		box-shadow: inset 3px 0 0 var(--va-attention);
	}

	/* Vertical rhythm: children of a stack are spaced, nothing else is. */
	.va-stack {
		--va-stack-gap: var(--va-sp-4);
		display: flex;
		flex-direction: column;
		gap: var(--va-stack-gap);
	}

	.va-stack--tight {
		--va-stack-gap: var(--va-sp-2);
	}

	/* A live region that stays on the page while its messages come and go (va-notices) takes no
	   room in the rhythm while it shows nothing; each shown message brings its own spacing. */
	.va-stack > .va-notices {
		margin-block-start: calc(-1 * var(--va-stack-gap));
	}

	.va-stack > .va-notices > * {
		margin-block-start: var(--va-stack-gap);
	}

	/* A button is as wide as its text, not as the column (a full-width button says
	   va-button--block or sits in a va-actionbar). */
	.va-stack > .va-button,
	.va-split > .va-button {
		align-self: flex-start;
	}

	.va-stack--loose {
		--va-stack-gap: var(--va-sp-8);
	}

	/* A section of a page: its heading carries the identity, the eyebrow (optional) the phase. */
	.va-section {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-4);
		padding-block-start: var(--va-sp-6);
		border-top: var(--va-border) solid var(--va-line);
		scroll-margin-block-start: var(--va-sp-6);
	}

	.va-section:first-child,
	.va-section--flush {
		padding-block-start: 0;
		border-top: 0;
	}

	.va-section__head {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		justify-content: space-between;
		gap: var(--va-sp-2) var(--va-sp-4);
	}

	/* The page header: eyebrow (context), title, a meta line and, on the end side, the primary
	   figure or action. */
	.va-pagehead {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-2);
	}

	.va-eyebrow {
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	.va-eyebrow a {
		color: inherit;
	}

	/* A row of controls that wraps; on a phone each takes a full line so every target is wide. */
	.va-actions {
		display: flex;
		flex-wrap: wrap;
		gap: var(--va-sp-2) var(--va-sp-3);
		align-items: center;
	}

	.va-actions--end {
		justify-content: flex-end;
	}

	.va-actions--stretch > * {
		flex: 1 1 auto;
	}

	@media (max-width: 39.99rem) {
		.va-actions--stack {
			flex-direction: column;
			align-items: stretch;
		}

		.va-actions--stack > .va-button,
		.va-actions--stack > form,
		.va-actions--stack > form > .va-button {
			inline-size: 100%;
		}
	}

	/* The sticky action bar: the one decision of a screen stays within thumb reach on a phone
	   (NN/g: primary actions in the easy-reach zone; WCAG 2.5.8 targets); from the tablet width
	   on it is an ordinary block, because the whole screen is in view. */
	.va-actionbar {
		position: sticky;
		bottom: 0;
		z-index: 10;
		margin-inline: calc(-1 * var(--va-gutter));
		padding: var(--va-sp-3) var(--va-gutter) calc(var(--va-sp-3) + env(safe-area-inset-bottom));
		background: var(--va-surface-page);
		border-top: var(--va-border) solid var(--va-line);
	}

	.va-actionbar > .va-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.va-actionbar .va-button {
		inline-size: 100%;
	}

	@media (min-width: 40rem) {
		.va-actionbar {
			position: static;
			margin-inline: 0;
			padding: 0;
			background: none;
			border-top: 0;
		}

		.va-actionbar > .va-actions {
			flex-direction: row;
			align-items: center;
		}

		.va-actionbar .va-button {
			inline-size: auto;
		}
	}

	/* A responsive grid of cards: as many columns as fit a comfortable card width. */
	.va-grid {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
		gap: var(--va-sp-4);
	}

	.va-grid--wide {
		grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
	}

	/* Two columns from the tablet width: a form beside its explanation, figures beside a list. */
	.va-split {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: var(--va-sp-6);
		align-items: start;
	}

	@media (min-width: 48rem) {
		.va-split {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}

		.va-split--aside {
			grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		}
	}

	.va-cluster {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-2);
	}

	.va-inline {
		display: inline;
	}

	/* Forms keep a comfortable line length even on a wide page. */
	.va-form {
		max-inline-size: 40rem;
	}

	/* ----------------------------------------------------------------------------------------
	   Workspace (admin-workspace-redesign): the signed-in work views use the full width, carry a
	   sticky status bar with the one primary action and the lifecycle tabs, and lay their work
	   out in panes that fold on narrower screens. Running text keeps its measure inside a pane
	   (p and li keep 70ch); lists, tables, builders and panes do not. */

	/* The full-width page: a gutter, no measure. */
	.va-page--full {
		max-inline-size: none;
		padding-block-start: 0;
	}

	/* The status bar: sticky under the viewport's top edge, opaque, bleeding into the gutter.
	   Crumbs and the title on the start side, state and the primary action on the end side,
	   the tabs on a second row (they wrap under the crumbs on a phone). */
	.va-statusbar {
		position: sticky;
		top: 0;
		z-index: 20;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-2) var(--va-sp-4);
		margin-inline: calc(-1 * var(--va-gutter));
		padding: var(--va-sp-2) var(--va-gutter);
		background: var(--va-surface-page);
		border-bottom: var(--va-border) solid var(--va-line);
	}

	.va-statusbar__crumbs {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-1) var(--va-sp-2);
		min-inline-size: 0;
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	.va-statusbar__crumbs a {
		color: inherit;
		text-decoration: none;
	}

	.va-statusbar__crumbs a:hover {
		color: var(--va-ink);
		text-decoration: underline;
	}

	.va-statusbar__crumbs > *::before {
		content: '›';
		margin-inline-end: var(--va-sp-2);
		color: var(--va-line-strong);
	}

	.va-statusbar__crumbs > :first-child::before {
		content: none;
		margin: 0;
	}

	/* The title is the current crumb: the page's h1, sized like a heading in a bar. */
	.va-statusbar__title {
		margin: 0;
		font-size: var(--va-text-md);
		font-weight: var(--va-weight-semibold);
		line-height: var(--va-leading-tight);
		color: var(--va-ink);
		text-wrap: balance;
	}

	.va-statusbar__state {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-2);
	}

	/* The end side: the search, the menu and the one primary action. */
	.va-statusbar__end {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-2);
		margin-inline-start: auto;
	}

	/* The tabs take the whole second row. */
	.va-statusbar__tabs {
		flex: 1 1 100%;
		margin-block-start: calc(-1 * var(--va-sp-1));
	}

	@media (min-width: 64rem) {
		.va-statusbar {
			padding-block: var(--va-sp-2);
		}

		/* From the desktop width the tabs sit in the row, between the crumbs and the end side. */
		.va-statusbar__tabs {
			flex: 0 1 auto;
			margin-block-start: 0;
			margin-inline-start: var(--va-sp-6);
		}
	}

	/* Lifecycle tabs: links, the current one underlined in gold like the top navigation; each
	   can carry a state (a lock, a count) after its label. */
	.va-tabs {
		display: flex;
		gap: var(--va-sp-1);
		margin: 0;
		padding: 0;
		list-style: none;
		overflow-x: auto;
	}

	.va-tab {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-2);
		min-height: var(--va-tap);
		padding: 0 var(--va-sp-3);
		border-bottom: 2px solid transparent;
		color: var(--va-ink-soft);
		font-weight: var(--va-weight-medium);
		text-decoration: none;
		white-space: nowrap;
	}

	.va-tab:hover {
		color: var(--va-ink);
		background: var(--va-surface-sunken);
		border-radius: var(--va-radius-sm) var(--va-radius-sm) 0 0;
	}

	.va-tab[aria-current='page'] {
		color: var(--va-ink);
		border-bottom-color: var(--va-attention);
	}

	.va-tab__state {
		font-size: var(--va-text-xs);
		font-weight: var(--va-weight-regular);
		color: var(--va-ink-muted);
		font-variant-numeric: tabular-nums;
	}

	/* Panes: one column on a phone, two from the tablet width, three from the desktop width.
	   The third pane goes under the first two until three fit. Every pane clips nothing: long
	   content wraps or scrolls inside it (min-inline-size: 0). */
	.va-panes {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: var(--va-sp-6);
		align-items: start;
	}

	.va-pane {
		min-inline-size: 0;
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-4);
	}

	.va-pane__head {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: var(--va-sp-2) var(--va-sp-3);
		padding-block-end: var(--va-sp-2);
		border-bottom: var(--va-border) solid var(--va-line);
	}

	.va-pane__head > h2,
	.va-pane__head > h3 {
		font-size: var(--va-text-md);
		margin: 0;
	}

	@media (min-width: 56rem) {
		.va-panes {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}

		.va-panes--three > :nth-child(3),
		.va-panes--cockpit > :nth-child(3) {
			grid-column: 1 / -1;
		}
	}

	@media (min-width: 75rem) {
		.va-panes--three {
			grid-template-columns: minmax(18rem, 1fr) minmax(0, 2fr) minmax(16rem, 1fr);
		}

		.va-panes--cockpit {
			grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1fr);
		}

		.va-panes--three > :nth-child(3),
		.va-panes--cockpit > :nth-child(3) {
			grid-column: auto;
		}

		/* A pane that stays in view while the middle one scrolls (the structure, the settings). */
		.va-pane--sticky {
			position: sticky;
			top: calc(var(--va-statusbar-height) + var(--va-sp-4));
			max-block-size: calc(100dvh - var(--va-statusbar-height) - var(--va-sp-8));
			overflow-y: auto;
		}
	}

	/* Two panes side by side from the desktop width (results: opinions beside figures). */
	@media (min-width: 75rem) {
		.va-panes--two {
			grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		}
	}

	/* Compact density: a body with va-density-compact halves the vertical rhythm and shows a
	   field's hint only while the field has the focus or the pointer (aria-describedby still
	   reads it). The preference is the consumer's; the class is the contract. */
	.va-density-compact {
		--va-sp-3: 0.5rem;
		--va-sp-4: 0.75rem;
		--va-sp-5: 1rem;
		--va-sp-6: 1rem;
		--va-sp-8: 1.25rem;
		--va-sp-10: 1.5rem;
		--va-sp-12: 2rem;
		--va-sp-16: 2.5rem;
	}

	.va-density-compact .va-field .va-hint {
		display: none;
	}

	.va-density-compact .va-field:focus-within .va-hint,
	.va-density-compact .va-field:hover .va-hint {
		display: block;
	}
}

@layer va.components {
	/* Button. The element is a <button> or an <a>; the modifier is the variant, aria-disabled and
	   aria-busy the state (the control stays focusable). */
	.va-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: var(--va-sp-2);
		min-height: var(--va-tap);
		padding: var(--va-sp-2) var(--va-sp-5);
		border: var(--va-border-strong) solid var(--va-action);
		border-radius: var(--va-radius);
		background: var(--va-action);
		color: var(--va-ink-on-action);
		font-weight: var(--va-weight-semibold);
		line-height: 1.2;
		text-align: center;
		text-decoration: none;
		cursor: pointer;
		-webkit-user-select: none;
		user-select: none;
		transition:
			background-color var(--va-duration-fast) var(--va-ease),
			border-color var(--va-duration-fast) var(--va-ease),
			color var(--va-duration-fast) var(--va-ease);
	}

	.va-button:hover {
		background: var(--va-action-hover);
		border-color: var(--va-action-hover);
		color: var(--va-ink-on-action);
	}

	.va-button:active {
		background: var(--va-action-active);
		border-color: var(--va-action-active);
	}

	.va-button--secondary {
		background: var(--va-surface);
		color: var(--va-action);
	}

	.va-button--secondary:hover {
		background: var(--va-action-wash);
		border-color: var(--va-action-hover);
		color: var(--va-action-hover);
	}

	.va-button--secondary:active {
		background: var(--va-action-wash-strong);
	}

	.va-button--quiet {
		padding-inline: var(--va-sp-3);
		background: transparent;
		border-color: transparent;
		color: var(--va-action);
		font-weight: var(--va-weight-medium);
		text-decoration: underline;
		text-underline-offset: 0.18em;
	}

	.va-button--quiet:hover {
		background: var(--va-action-wash);
		border-color: transparent;
		color: var(--va-action-hover);
	}

	.va-button--danger {
		background: var(--va-surface);
		border-color: var(--va-danger);
		color: var(--va-danger);
	}

	.va-button--danger:hover {
		background: var(--va-danger-wash);
		border-color: var(--va-danger-hover);
		color: var(--va-danger-hover);
	}

	.va-button--danger-solid {
		background: var(--va-danger);
		border-color: var(--va-danger);
		color: var(--va-ink-on-danger);
	}

	.va-button--danger-solid:hover {
		background: var(--va-danger-hover);
		border-color: var(--va-danger-hover);
		color: var(--va-ink-on-danger);
	}

	.va-button--small {
		min-height: 2.25rem;
		padding: var(--va-sp-1) var(--va-sp-3);
		font-size: var(--va-text-sm);
	}

	.va-button--block {
		inline-size: 100%;
	}

	.va-button[aria-pressed='true'] {
		background: var(--va-ink);
		border-color: var(--va-ink);
		color: var(--va-surface);
	}

	/* Disabled and busy keep legible text (no opacity trick) and stay focusable. */
	.va-button[aria-disabled='true'],
	.va-button:disabled {
		background: var(--va-disabled-surface);
		border-color: var(--va-disabled-line);
		color: var(--va-disabled-ink);
		cursor: not-allowed;
	}

	.va-button[aria-busy='true'] {
		cursor: progress;
	}

	/* Segmented control for a small, exclusive choice (the language). The pressed segment is
	   filled; aria-pressed is the state. */
	.va-segmented {
		display: inline-flex;
		border: var(--va-border) solid var(--va-boundary);
		border-radius: var(--va-radius-sm);
		overflow: hidden;
	}

	.va-segmented .va-button {
		min-height: 2.25rem;
		padding: 0 var(--va-sp-3);
		border: 0;
		border-radius: 0;
		background: var(--va-surface);
		color: var(--va-ink-soft);
		font-size: var(--va-text-sm);
		font-weight: var(--va-weight-medium);
	}

	.va-segmented .va-button + .va-button {
		border-inline-start: var(--va-border) solid var(--va-boundary);
	}

	.va-segmented .va-button:hover {
		background: var(--va-surface-sunken);
		color: var(--va-ink);
	}

	.va-segmented .va-button[aria-pressed='true'] {
		background: var(--va-ink);
		color: var(--va-surface);
		text-decoration: none;
	}

	.va-segmented .va-button:focus-visible {
		position: relative;
		z-index: 1;
		outline-offset: -4px;
	}

	/* Field: label above, control, hint and error below; everything wired with aria-describedby
	   by the consumer. */
	.va-field {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-1);
	}

	.va-label,
	.va-legend {
		font-weight: var(--va-weight-semibold);
		line-height: var(--va-leading-tight);
		padding-block: var(--va-sp-1);
	}

	.va-legend {
		font-size: var(--va-text-md);
		margin-block-end: var(--va-sp-1);
	}

	.va-input,
	.va-textarea,
	.va-select {
		inline-size: 100%;
		min-height: var(--va-tap);
		padding: var(--va-sp-2) var(--va-sp-3);
		border: var(--va-border-strong) solid var(--va-boundary);
		border-radius: var(--va-radius-sm);
		background: var(--va-surface);
		color: var(--va-ink);
		transition: border-color var(--va-duration-fast) var(--va-ease);
	}

	.va-input:hover,
	.va-textarea:hover,
	.va-select:hover {
		border-color: var(--va-ink-soft);
	}

	.va-input:focus-visible,
	.va-textarea:focus-visible,
	.va-select:focus-visible {
		border-color: var(--va-focus);
		outline-offset: 2px;
	}

	.va-input[aria-invalid='true'],
	.va-textarea[aria-invalid='true'],
	.va-select[aria-invalid='true'] {
		border-color: var(--va-danger);
		box-shadow: inset 0 0 0 1px var(--va-danger);
	}

	.va-input:read-only:not(.va-select),
	.va-textarea:read-only {
		background: var(--va-surface-sunken);
	}

	.va-input:disabled,
	.va-textarea:disabled,
	.va-select:disabled {
		background: var(--va-disabled-surface);
		border-color: var(--va-disabled-line);
		color: var(--va-disabled-ink);
		cursor: not-allowed;
	}

	.va-textarea {
		min-height: 7rem;
		resize: vertical;
		line-height: var(--va-leading);
	}

	.va-textarea--tall {
		min-height: 11rem;
	}

	.va-select {
		padding-inline-end: var(--va-sp-8);
		appearance: none;
		background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
			linear-gradient(135deg, currentColor 50%, transparent 50%);
		background-position:
			calc(100% - 1.1rem) 50%,
			calc(100% - 0.75rem) 50%;
		background-size: 0.35rem 0.35rem;
		background-repeat: no-repeat;
	}

	/* Short controls (a count, a code, a date) stay short on a wide form. */
	.va-input--short {
		max-inline-size: 12rem;
	}

	.va-input--medium {
		max-inline-size: 24rem;
	}

	.va-input--code {
		font-family: var(--va-font-mono);
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.va-hint {
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	.va-error {
		font-size: var(--va-text-sm);
		font-weight: var(--va-weight-semibold);
		color: var(--va-danger);
	}

	/* Notice: a bordered box on a wash. The kind is a modifier; the role (status, alert) and the
	   wording carry the meaning, the colour only underlines it. No coloured left border (brand). */
	.va-notice {
		padding: var(--va-sp-3) var(--va-sp-4);
		border: var(--va-border) solid var(--va-line-strong);
		border-radius: var(--va-radius);
		background: var(--va-surface);
		color: var(--va-ink);
	}

	.va-notice--info {
		background: var(--va-action-wash);
		border-color: var(--va-action);
	}

	.va-notice--success {
		background: var(--va-action-wash);
		border-color: var(--va-status-success);
	}

	.va-notice--warning,
	.va-notice--attention {
		background: var(--va-attention-wash);
		border-color: var(--va-attention-strong);
	}

	.va-notice--error {
		background: var(--va-danger-wash);
		border-color: var(--va-danger);
	}

	.va-notice--ai {
		background: var(--va-ai-wash);
		border: var(--va-border-strong) dashed var(--va-ai-draft);
	}

	/* The kind's marker (ADR-010, Phosphor): drawn in the kind's colour before the text through a
	   mask, decorative (the role and the wording carry the meaning). The plain notice has none.
	   The marker is positioned, not a grid cell, so inline content (a sentence with a link)
	   flows beside it as one block. */
	.va-notice--info,
	.va-notice--success,
	.va-notice--warning,
	.va-notice--attention,
	.va-notice--error,
	.va-notice--ai {
		position: relative;
		padding-inline-start: calc(var(--va-sp-4) + 1.25rem + var(--va-sp-3));
	}

	.va-notice--info::before,
	.va-notice--success::before,
	.va-notice--warning::before,
	.va-notice--attention::before,
	.va-notice--error::before,
	.va-notice--ai::before {
		content: '';
		position: absolute;
		inset-inline-start: var(--va-sp-4);
		inset-block-start: calc(var(--va-sp-3) + 0.15rem);
		inline-size: 1.25rem;
		block-size: 1.25rem;
		background: currentColor;
		-webkit-mask: var(--va-icon-info) center / contain no-repeat;
		mask: var(--va-icon-info) center / contain no-repeat;
	}

	.va-notice--info::before {
		color: var(--va-status-info);
	}

	.va-notice--success::before {
		color: var(--va-status-success);
		-webkit-mask-image: var(--va-icon-check-circle);
		mask-image: var(--va-icon-check-circle);
	}

	.va-notice--warning::before,
	.va-notice--attention::before {
		color: var(--va-status-warning);
		-webkit-mask-image: var(--va-icon-warning);
		mask-image: var(--va-icon-warning);
	}

	.va-notice--error::before {
		color: var(--va-status-error);
		-webkit-mask-image: var(--va-icon-warning-circle);
		mask-image: var(--va-icon-warning-circle);
	}

	.va-notice--ai::before {
		color: var(--va-ai-draft);
		-webkit-mask-image: var(--va-icon-sparkle);
		mask-image: var(--va-icon-sparkle);
	}

	.va-notice > :first-child {
		margin-block-start: 0;
	}

	.va-notice > * + * {
		margin-block-start: var(--va-sp-2);
	}

	.va-notice__title {
		font-size: var(--va-text-base);
		font-weight: var(--va-weight-semibold);
	}

	/* A live region that stays on the page while its messages come and go: empty, it takes no
	   room in a stack; a message keeps the stack's spacing. */
	.va-notices:empty {
		display: none;
	}

	/* Card: a bounded thing in a list or grid. */
	.va-card {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-3);
		padding: var(--va-sp-4);
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius-lg);
		background: var(--va-surface);
		box-shadow: var(--va-shadow-soft);
	}

	@media (min-width: 40rem) {
		.va-card {
			padding: var(--va-sp-5);
		}
	}

	.va-card--placeholder {
		background: transparent;
		border-style: dashed;
		border-color: var(--va-line-strong);
		box-shadow: none;
		color: var(--va-ink-muted);
	}

	.va-card--sunken {
		background: var(--va-surface-sunken);
		box-shadow: none;
	}

	/* AI draft (dashed gold) against human-confirmed (solid teal): the one distinction every
	   screen must keep visible (D-15). Both stay apart in forced colours by line style. */
	.va-card--ai {
		border: var(--va-border-strong) dashed var(--va-ai-draft);
		background: var(--va-ai-wash);
	}

	.va-card--confirmed {
		border: var(--va-border-strong) solid var(--va-action);
	}

	.va-card--current {
		border: var(--va-border-strong) solid var(--va-attention-strong);
	}

	.va-card--invalid {
		border: var(--va-border-strong) solid var(--va-danger);
	}

	.va-card__title {
		font-size: var(--va-text-md);
		font-weight: var(--va-weight-semibold);
		line-height: var(--va-leading-tight);
	}

	.va-card__title a {
		color: var(--va-ink);
		text-decoration: none;
	}

	.va-card__title a:hover {
		color: var(--va-action);
		text-decoration: underline;
	}

	/* The card's title row: title on the start side, a chip or figure on the end side. */
	.va-card__head {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		justify-content: space-between;
		gap: var(--va-sp-2) var(--va-sp-3);
	}

	.va-card__foot {
		margin-block-start: auto;
	}

	/* Icon (ADR-010): an inline Phosphor symbol from the sprite, sized to the text, drawn in
	   currentColor, always beside a label and hidden from assistive technology. */
	.va-icon {
		display: inline-block;
		inline-size: 1.25em;
		block-size: 1.25em;
		flex: none;
		vertical-align: -0.3em;
		fill: currentColor;
	}

	/* Chip: a short status or fact. Variants follow the grammar. */
	.va-chip {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-1);
		max-inline-size: 100%;
		padding: 0.125rem var(--va-sp-3);
		border: var(--va-border-strong) solid var(--va-line-strong);
		border-radius: var(--va-radius-full);
		background: var(--va-surface);
		color: var(--va-ink-soft);
		font-size: var(--va-text-xs);
		font-weight: var(--va-weight-medium);
		line-height: 1.5;
		white-space: nowrap;
	}

	.va-chip--ai {
		border-style: dashed;
		border-color: var(--va-ai-draft);
		background: var(--va-ai-wash);
		color: var(--va-ink);
	}

	.va-chip--ai::before {
		content: '';
		inline-size: 0.9em;
		block-size: 0.9em;
		background: var(--va-ai-draft);
		-webkit-mask: var(--va-icon-sparkle) center / contain no-repeat;
		mask: var(--va-icon-sparkle) center / contain no-repeat;
	}

	.va-chip--confirmed {
		border-color: var(--va-action);
		background: var(--va-action-wash);
		color: var(--va-action);
		font-weight: var(--va-weight-semibold);
	}

	.va-chip--current {
		border-color: var(--va-attention-strong);
		background: var(--va-attention-wash);
		color: var(--va-ink);
		font-weight: var(--va-weight-semibold);
	}

	.va-chip--danger {
		border-color: var(--va-danger);
		background: var(--va-danger-wash);
		color: var(--va-danger);
	}

	.va-chip--muted {
		border-color: var(--va-line);
		background: var(--va-surface-sunken);
		color: var(--va-ink-muted);
	}

	/* Lists of cards. */
	.va-list {
		list-style: none;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-3);
	}

	.va-list > li {
		max-inline-size: none;
	}

	.va-list.va-grid,
	.va-list.va-stats {
		display: grid;
	}

	.va-list--divided {
		gap: 0;
	}

	.va-list--divided > li {
		padding-block: var(--va-sp-3);
		border-top: var(--va-border) solid var(--va-line);
	}

	.va-list--divided > li:first-child {
		border-top: 0;
		padding-block-start: 0;
	}

	.va-short-list {
		margin: var(--va-sp-1) 0 0;
		padding-inline-start: 1.25rem;
	}

	.va-short-list li + li {
		margin-block-start: var(--va-sp-1);
	}

	/* Choices: short options (a scale, yes/no, a mode) as pill targets that wrap; the native
	   control stays visible inside, so the choice is never shown by colour alone. */
	.va-choices {
		display: flex;
		flex-wrap: wrap;
		gap: var(--va-sp-2);
	}

	.va-choice {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-2);
		min-height: var(--va-tap);
		padding: var(--va-sp-1) var(--va-sp-3) var(--va-sp-1) var(--va-sp-3);
		border: var(--va-border-strong) solid var(--va-boundary);
		border-radius: var(--va-radius);
		background: var(--va-surface);
		font-weight: var(--va-weight-regular);
		cursor: pointer;
		transition:
			background-color var(--va-duration-fast) var(--va-ease),
			border-color var(--va-duration-fast) var(--va-ease);
	}

	.va-choice:hover {
		background: var(--va-action-wash);
	}

	.va-choice:has(input:checked) {
		border-color: var(--va-action);
		background: var(--va-action-wash);
		box-shadow: inset 0 0 0 1px var(--va-action);
		font-weight: var(--va-weight-semibold);
	}

	.va-choice:has(input:focus-visible) {
		outline: 3px solid var(--va-focus);
		outline-offset: 3px;
	}

	.va-choice:has(input[aria-invalid='true']) {
		border-color: var(--va-danger);
	}

	.va-choice input {
		flex: none;
		inline-size: 1.125rem;
		block-size: 1.125rem;
		margin: 0;
		accent-color: var(--va-action);
	}

	/* Rows for long labels (key questions): one per line, the box beside the first line, the
	   whole row a target, a status on the end side. */
	.va-choice-list {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-2);
	}

	.va-choice-list .va-choice {
		display: flex;
		align-items: flex-start;
		padding: var(--va-sp-3);
	}

	.va-choice-list .va-choice input {
		margin-block-start: 0.2rem;
	}

	.va-choice-list .va-choice > span:first-of-type {
		flex: 1 1 auto;
	}

	.va-choice__status {
		margin-inline-start: auto;
		padding-inline-start: var(--va-sp-2);
		white-space: nowrap;
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	/* Scale: eleven (or n) equal targets, six per row on a phone, one row from the tablet width;
	   the ends are named below. */
	.va-scale {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr));
		gap: var(--va-sp-2);
	}

	@media (min-width: 40rem) {
		.va-scale {
			grid-template-columns: repeat(var(--va-scale-points, 11), minmax(0, 1fr));
		}
	}

	.va-scale .va-choice {
		flex-direction: column;
		justify-content: center;
		gap: 0.15rem;
		min-inline-size: 0;
		padding: var(--va-sp-1) 0;
		font-variant-numeric: tabular-nums;
	}

	.va-scale-ends {
		display: flex;
		justify-content: space-between;
		gap: var(--va-sp-4);
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	/* Fieldset as a group with a frame (a question, an option to rate). */
	.va-group {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-3);
		padding: var(--va-sp-4);
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius-lg);
		background: var(--va-surface);
	}

	.va-group--invalid {
		border: var(--va-border-strong) solid var(--va-danger);
	}

	.va-group > .va-legend {
		float: left;
		inline-size: 100%;
	}

	/* Disclosure: a <details> whose summary is a full-width target with a caret. */
	.va-disclosure {
		border-top: var(--va-border) solid var(--va-line);
	}

	.va-disclosure:last-child {
		border-bottom: var(--va-border) solid var(--va-line);
	}

	.va-disclosure > summary {
		display: flex;
		align-items: center;
		gap: var(--va-sp-3);
		min-height: var(--va-tap);
		padding: var(--va-sp-2) var(--va-sp-1);
		list-style: none;
		font-weight: var(--va-weight-semibold);
		color: var(--va-action);
		border-radius: var(--va-radius-sm);
	}

	.va-disclosure > summary::-webkit-details-marker {
		display: none;
	}

	.va-disclosure > summary::before {
		content: '';
		flex: none;
		inline-size: 1.1rem;
		block-size: 1.1rem;
		background: currentColor;
		-webkit-mask: var(--va-icon-caret-right) center / contain no-repeat;
		mask: var(--va-icon-caret-right) center / contain no-repeat;
		transition: transform var(--va-duration-fast) var(--va-ease);
	}

	.va-disclosure[open] > summary::before {
		transform: rotate(90deg);
	}

	.va-disclosure > summary:hover {
		background: var(--va-surface-sunken);
	}

	.va-disclosure > :not(summary) {
		padding-block: var(--va-sp-2) var(--va-sp-4);
	}

	.va-disclosure--card {
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius);
		background: var(--va-surface);
	}

	.va-disclosure--card:last-child {
		border-bottom-width: var(--va-border);
	}

	.va-disclosure--card > summary {
		padding-inline: var(--va-sp-3);
	}

	.va-disclosure--card > :not(summary) {
		padding-inline: var(--va-sp-3);
	}

	/* Table: header cells bold, numbers right-aligned and tabular, every row ruled; on a narrow
	   screen the wrapper scrolls sideways inside a focusable region (never the page). */
	.va-table-scroll {
		position: relative;
		overflow-x: auto;
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius);
		background: var(--va-surface);
	}

	.va-table {
		inline-size: 100%;
		border-collapse: collapse;
		font-size: var(--va-text-sm);
	}

	.va-table caption {
		padding: var(--va-sp-3) var(--va-sp-4);
		text-align: start;
		font-weight: var(--va-weight-semibold);
		color: var(--va-ink);
		position: sticky;
		inset-inline-start: 0;
		max-inline-size: calc(100vw - 2 * var(--va-gutter));
	}

	.va-table th,
	.va-table td {
		padding: var(--va-sp-2) var(--va-sp-4);
		border-top: var(--va-border) solid var(--va-line);
		text-align: start;
		vertical-align: top;
		overflow-wrap: break-word;
	}

	.va-table thead th {
		background: var(--va-surface-sunken);
		font-weight: var(--va-weight-semibold);
		color: var(--va-ink-soft);
		vertical-align: bottom;
	}

	.va-table th[scope='row'] {
		font-weight: var(--va-weight-medium);
	}

	.va-table th[scope='col']:lang(de) {
		hyphens: auto;
	}

	.va-table .va-num {
		text-align: end;
		font-variant-numeric: tabular-nums;
	}

	.va-table td.va-num {
		white-space: nowrap;
	}

	.va-table .va-row--passive {
		background: var(--va-surface-sunken);
	}

	/* A result table (figures per option, Systemic Consensing): the rank column stays narrow
	   and the row header carries the option. */
	.va-table--result td:first-child {
		white-space: nowrap;
	}

	.va-table--result th[scope='row'] {
		min-inline-size: 12rem;
	}

	.va-cell-note {
		display: block;
		font-size: var(--va-text-xs);
		font-weight: var(--va-weight-regular);
		color: var(--va-ink-muted);
	}

	/* Quote / result: a text by someone (a confirmed opinion, a released insight). A dashed gold
	   frame marks an AI draft, a solid teal one a confirmed text. */
	.va-quote {
		padding: var(--va-sp-4);
		border: var(--va-border) solid var(--va-line-strong);
		border-radius: var(--va-radius);
		background: var(--va-surface-sunken);
	}

	.va-quote--ai {
		border: var(--va-border-strong) dashed var(--va-ai-draft);
		background: var(--va-ai-wash);
	}

	.va-quote--confirmed {
		border: var(--va-border-strong) solid var(--va-action);
		background: var(--va-surface);
	}

	.va-quote--placeholder {
		border-style: dashed;
		background: transparent;
		color: var(--va-ink-muted);
	}

	.va-quote > * + * {
		margin-block-start: var(--va-sp-2);
	}

	/* Stat tile: a figure with its label; a row of them from the tablet width. */
	.va-stats {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
		gap: var(--va-sp-3);
	}

	.va-stat {
		padding: var(--va-sp-3) var(--va-sp-4);
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius);
		background: var(--va-surface);
	}

	.va-stat__value {
		display: block;
		font-size: var(--va-text-xl);
		font-weight: var(--va-weight-semibold);
		line-height: 1.1;
		font-variant-numeric: tabular-nums;
	}

	.va-stat__label {
		display: block;
		margin-block-start: var(--va-sp-1);
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	/* Definition list of facts: term and value side by side from the tablet width. */
	.va-facts {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: var(--va-sp-1) var(--va-sp-4);
		margin: 0;
	}

	.va-facts dt {
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	.va-facts dd {
		margin: 0 0 var(--va-sp-2);
	}

	@media (min-width: 40rem) {
		.va-facts {
			grid-template-columns: max-content minmax(0, 1fr);
		}

		.va-facts dd {
			margin: 0;
		}
	}

	/* Steps: a phase or progress line, the current step marked in gold (and named). */
	.va-steps {
		list-style: none;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		gap: var(--va-sp-2);
	}

	.va-steps > li {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-2);
		padding: var(--va-sp-1) var(--va-sp-3);
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius-full);
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
		max-inline-size: none;
	}

	.va-steps > li[aria-current='step'] {
		border: var(--va-border-strong) solid var(--va-attention-strong);
		background: var(--va-attention-wash);
		color: var(--va-ink);
		font-weight: var(--va-weight-semibold);
	}

	.va-steps > .va-steps__done {
		color: var(--va-action);
		border-color: var(--va-action);
	}

	/* Progress text (question 3 of 7) with a thin bar below. */
	.va-progress {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-1);
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	.va-progress__bar {
		block-size: 0.25rem;
		border-radius: var(--va-radius-full);
		background: var(--va-line);
		overflow: hidden;
	}

	.va-progress__bar > span {
		display: block;
		block-size: 100%;
		background: var(--va-action);
		inline-size: var(--va-progress, 0%);
	}

	/* ----------------------------------------------------------------------------------------
	   Workspace controls (admin-workspace-redesign). */

	/* Funnel: one bar of steps, each a share of the whole (issued → opened → started →
	   confirmed), the confirmed step in gold ("you are here"), a withdrawn step in red. Each
	   step's width is its share (style="--va-share: 45%"). The legend below names the shares. */
	.va-funnel {
		display: flex;
		block-size: 0.875rem;
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius-full);
		background: var(--va-surface-sunken);
		overflow: hidden;
	}

	.va-funnel__step {
		display: block;
		block-size: 100%;
		inline-size: var(--va-share, 0%);
		background: var(--va-action);
	}

	.va-funnel__step--soft {
		background: var(--va-action-wash-strong);
	}

	.va-funnel__step--confirmed {
		background: var(--va-attention);
	}

	.va-funnel__step--withdrawn {
		background: var(--va-danger);
	}

	.va-funnel-legend {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: var(--va-sp-1) var(--va-sp-3);
		margin: 0;
		padding: 0;
		list-style: none;
		font-size: var(--va-text-xs);
		color: var(--va-ink-muted);
		font-variant-numeric: tabular-nums;
	}

	/* A small inline bar for a figure in a table row (a range's count): the width is the share
	   of the row's answers (style="--va-share: 60%"). */
	.va-bar {
		display: inline-block;
		vertical-align: middle;
		inline-size: var(--va-share, 0%);
		min-inline-size: 2px;
		max-inline-size: 100%;
		block-size: 0.625rem;
		border-radius: var(--va-radius-sm);
		background: var(--va-action);
	}

	.va-bar--muted {
		background: var(--va-line-strong);
	}

	/* The bars of one row stack with their counts beside them. */
	.va-bars {
		display: flex;
		flex-direction: column;
		gap: 2px;
		min-inline-size: 8rem;
	}

	.va-bars > span {
		display: flex;
		align-items: center;
		gap: var(--va-sp-2);
		font-size: var(--va-text-xs);
		color: var(--va-ink-muted);
		font-variant-numeric: tabular-nums;
		white-space: nowrap;
	}

	/* Data table: a list of records. The header sticks to the top of its scroll region, a
	   sortable column header is a link with the sort direction after it, the current row
	   action sits in the last column. */
	.va-table--data thead th {
		position: sticky;
		top: 0;
		z-index: 1;
	}

	.va-table--data th[scope='col'] a {
		color: inherit;
		text-decoration: none;
	}

	.va-table--data th[scope='col'] a:hover {
		color: var(--va-ink);
		text-decoration: underline;
	}

	.va-table--data th[scope='col'][aria-sort] a::after {
		content: '↕';
		margin-inline-start: var(--va-sp-1);
		color: var(--va-ink-muted);
	}

	.va-table--data th[scope='col'][aria-sort='ascending'] a::after {
		content: '↑';
		color: var(--va-ink);
	}

	.va-table--data th[scope='col'][aria-sort='descending'] a::after {
		content: '↓';
		color: var(--va-ink);
	}

	.va-table--data td,
	.va-table--data th[scope='row'] {
		vertical-align: middle;
	}

	.va-table--data .va-cell-action {
		text-align: end;
		white-space: nowrap;
	}

	/* The table's toolbar: search and filters above a data table. */
	.va-table-tools {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-2) var(--va-sp-3);
	}

	/* Structure rows (the builder's question list): numbered rows that are links; the current
	   one is marked on its start edge in gold, like the side navigation. A row shows its
	   number, a type glyph, one line of text and a required mark. */
	.va-structure {
		display: flex;
		flex-direction: column;
		gap: 2px;
		margin: 0;
		padding: 0;
		list-style: none;
		counter-reset: va-structure;
	}

	.va-structure__row {
		display: flex;
		align-items: center;
		gap: var(--va-sp-2);
		min-height: var(--va-tap);
		padding: var(--va-sp-1) var(--va-sp-2);
		border-radius: var(--va-radius-sm);
		border: var(--va-border) solid transparent;
		color: var(--va-ink);
		text-decoration: none;
		max-inline-size: none;
	}

	.va-structure__row:hover {
		background: var(--va-surface-sunken);
	}

	.va-structure__row[aria-current='true'] {
		background: var(--va-action-wash);
		border-color: var(--va-action);
	}

	.va-structure__row[draggable='true'] {
		cursor: grab;
	}

	.va-structure__row.va-structure__row--dragging {
		opacity: 0.5;
	}

	.va-structure__row--over {
		box-shadow: inset 0 2px 0 var(--va-action);
	}

	.va-structure__num {
		flex: none;
		min-inline-size: 1.5rem;
		font-size: var(--va-text-xs);
		color: var(--va-ink-muted);
		font-variant-numeric: tabular-nums;
	}

	.va-structure__kind {
		flex: none;
		display: inline-grid;
		place-items: center;
		min-inline-size: 2rem;
		padding: 0 var(--va-sp-1);
		border: var(--va-border) solid var(--va-line-strong);
		border-radius: var(--va-radius-sm);
		font-family: var(--va-font-mono);
		font-size: var(--va-text-xs);
		color: var(--va-ink-muted);
	}

	.va-structure__text {
		flex: 1 1 auto;
		min-inline-size: 0;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		font-size: var(--va-text-sm);
	}

	.va-structure__required {
		flex: none;
		inline-size: 0.5rem;
		block-size: 0.5rem;
		border-radius: 50%;
		background: var(--va-attention);
	}

	.va-structure__grip {
		flex: none;
		color: var(--va-line-strong);
		font-family: var(--va-font-mono);
		cursor: grab;
	}

	/* A keyboard key, printed next to an action. */
	.va-kbd {
		display: inline-block;
		padding: 0 var(--va-sp-1);
		border: var(--va-border) solid var(--va-line-strong);
		border-bottom-width: 2px;
		border-radius: var(--va-radius-sm);
		background: var(--va-surface-sunken);
		font-family: var(--va-font-mono);
		font-size: var(--va-text-xs);
		color: var(--va-ink-muted);
		line-height: 1.5;
	}

	/* "Why?": explanatory copy folded behind a small link-like summary, opening in place. */
	.va-why {
		border: 0;
	}

	.va-why > summary {
		display: inline-flex;
		align-items: center;
		gap: var(--va-sp-1);
		min-height: 2rem;
		padding: 0;
		list-style: none;
		font-size: var(--va-text-sm);
		font-weight: var(--va-weight-medium);
		color: var(--va-link);
		text-decoration: underline;
		text-underline-offset: 0.18em;
		cursor: pointer;
	}

	.va-why > summary::-webkit-details-marker {
		display: none;
	}

	.va-why > summary:hover {
		color: var(--va-link-hover);
	}

	.va-why > :not(summary) {
		margin-block-start: var(--va-sp-2);
		font-size: var(--va-text-sm);
		color: var(--va-ink-soft);
	}

	/* Danger zone: destructive actions behind a disclosure in the danger colour; open, the
	   zone has a red wash so the buttons inside read as what they are. */
	.va-danger {
		border: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius);
	}

	.va-danger > summary {
		display: flex;
		align-items: center;
		gap: var(--va-sp-3);
		min-height: var(--va-tap);
		padding: var(--va-sp-2) var(--va-sp-3);
		list-style: none;
		font-weight: var(--va-weight-semibold);
		color: var(--va-danger);
		cursor: pointer;
	}

	.va-danger > summary::-webkit-details-marker {
		display: none;
	}

	.va-danger > summary::before {
		content: '';
		flex: none;
		inline-size: 1.1rem;
		block-size: 1.1rem;
		background: currentColor;
		-webkit-mask: var(--va-icon-caret-right) center / contain no-repeat;
		mask: var(--va-icon-caret-right) center / contain no-repeat;
		transition: transform var(--va-duration-fast) var(--va-ease);
	}

	.va-danger[open] > summary::before {
		transform: rotate(90deg);
	}

	.va-danger[open] {
		border-color: var(--va-danger);
		background: var(--va-danger-wash);
	}

	.va-danger > :not(summary) {
		padding: var(--va-sp-2) var(--va-sp-3) var(--va-sp-4);
	}

	/* Readiness: a checklist before a one-way action; each item is done, a warning or missing. */
	.va-readiness {
		margin: 0;
		padding: 0;
		list-style: none;
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-1);
		font-size: var(--va-text-sm);
	}

	.va-readiness > li {
		display: flex;
		align-items: baseline;
		gap: var(--va-sp-2);
		max-inline-size: none;
	}

	.va-readiness > li::before {
		content: '✓';
		flex: none;
		color: var(--va-action);
		font-weight: var(--va-weight-semibold);
	}

	.va-readiness > .va-readiness__warn::before {
		content: '!';
		color: var(--va-attention-text);
	}

	.va-readiness > .va-readiness__missing::before {
		content: '×';
		color: var(--va-danger);
	}

	/* Command palette: a <dialog> at the top of the viewport with a search field and a list of
	   results; the selected result is marked with aria-selected. */
	.va-palette {
		inline-size: min(100% - 2 * var(--va-gutter), 36rem);
		margin: 10vh auto auto;
		padding: 0;
		border: var(--va-border) solid var(--va-line-strong);
		border-radius: var(--va-radius-lg);
		background: var(--va-surface-raised);
		color: var(--va-ink);
		box-shadow: var(--va-shadow-raised);
	}

	.va-palette::backdrop {
		background: rgb(0 0 0 / 0.35);
	}

	.va-palette__input {
		inline-size: 100%;
		padding: var(--va-sp-3) var(--va-sp-4);
		border: 0;
		border-bottom: var(--va-border) solid var(--va-line);
		border-radius: var(--va-radius-lg) var(--va-radius-lg) 0 0;
		background: transparent;
		color: inherit;
		font: inherit;
		font-size: var(--va-text-md);
	}

	.va-palette__input:focus {
		outline: none;
		box-shadow: inset 0 -2px 0 var(--va-focus);
	}

	.va-palette__list {
		margin: 0;
		padding: var(--va-sp-2);
		list-style: none;
		max-block-size: 50vh;
		overflow-y: auto;
	}

	.va-palette__item {
		display: flex;
		align-items: center;
		gap: var(--va-sp-3);
		min-height: var(--va-tap);
		padding: var(--va-sp-1) var(--va-sp-3);
		border-radius: var(--va-radius-sm);
		color: var(--va-ink);
		text-decoration: none;
		max-inline-size: none;
		cursor: pointer;
	}

	.va-palette__item:hover,
	.va-palette__item[aria-selected='true'] {
		background: var(--va-action-wash);
	}

	.va-palette__group {
		font-size: var(--va-text-xs);
		color: var(--va-ink-muted);
		margin-inline-start: auto;
	}

	.va-palette__empty {
		padding: var(--va-sp-3) var(--va-sp-4);
		color: var(--va-ink-muted);
		font-size: var(--va-text-sm);
	}

	/* The scale preview's rating ranges: segments under the points, one per range, the selected
	   one on the action wash; a boundary between two segments is a handle. */
	.va-ranges {
		display: flex;
		gap: 2px;
		margin-block-start: var(--va-sp-2);
	}

	.va-ranges__segment {
		flex: var(--va-span, 1) 1 0;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 1.75rem;
		padding: 0 var(--va-sp-2);
		border: var(--va-border) solid var(--va-line-strong);
		border-radius: var(--va-radius-sm);
		background: var(--va-surface-sunken);
		font-size: var(--va-text-xs);
		color: var(--va-ink-soft);
		cursor: pointer;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.va-ranges__segment[aria-pressed='true'] {
		background: var(--va-action-wash);
		border-color: var(--va-action);
		color: var(--va-ink);
	}

	.va-ranges__handle {
		flex: none;
		inline-size: 0.75rem;
		border-radius: var(--va-radius-sm);
		background: var(--va-line-strong);
		cursor: col-resize;
	}

	.va-ranges__handle:focus-visible,
	.va-ranges__handle:hover {
		background: var(--va-action);
	}

	/* A saved state beside an autosaving form: quiet, tabular time. */
	.va-saved {
		font-size: var(--va-text-xs);
		color: var(--va-ink-muted);
		font-variant-numeric: tabular-nums;
	}
}

@layer va.patterns {
	/* Conversation: the AI's turns on the start side with a dashed gold frame (AI activity), the
	   person's on the end side with a solid frame; both are labelled in text by the consumer. */
	.va-turns {
		list-style: none;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-3);
	}

	.va-turn {
		max-inline-size: min(40rem, 94%);
		padding: var(--va-sp-3) var(--va-sp-4);
		border-radius: var(--va-radius-lg);
	}

	.va-turn p {
		max-inline-size: none;
	}

	.va-turn--ai {
		align-self: flex-start;
		border: var(--va-border-strong) dashed var(--va-ai-draft);
		background: var(--va-ai-wash);
		border-start-start-radius: var(--va-radius-sm);
	}

	.va-turn--person {
		align-self: flex-end;
		border: var(--va-border-strong) solid var(--va-action);
		background: var(--va-surface);
		border-end-end-radius: var(--va-radius-sm);
	}

	.va-turn__speaker {
		font-size: var(--va-text-xs);
		font-weight: var(--va-weight-semibold);
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: var(--va-ink-muted);
		margin-block-end: var(--va-sp-1);
	}

	.va-turn__ref {
		margin-block-start: var(--va-sp-2);
		padding-block-start: var(--va-sp-2);
		border-top: var(--va-border) dashed var(--va-line-strong);
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	.va-turn__typing {
		color: var(--va-ink-muted);
		font-style: italic;
	}

	/* The composer below a conversation: set apart by a rule, sticky at the bottom on a phone so
	   the reply field is always at hand. */
	.va-composer {
		position: sticky;
		bottom: 0;
		z-index: 10;
		margin-inline: calc(-1 * var(--va-gutter));
		padding: var(--va-sp-3) var(--va-gutter) calc(var(--va-sp-3) + env(safe-area-inset-bottom));
		border-top: var(--va-border) solid var(--va-line);
		background: var(--va-surface-page);
		/* Never more than half a phone screen: the history above stays readable. */
		max-block-size: 55dvh;
		overflow-y: auto;
	}

	.va-composer .va-textarea {
		min-height: 4.5rem;
	}

	@media (min-width: 40rem) {
		.va-composer {
			position: static;
			margin-inline: 0;
			padding: var(--va-sp-4) 0 0;
			background: none;
			max-block-size: none;
			overflow: visible;
		}

		.va-composer .va-textarea {
			min-height: 7rem;
		}
	}

	/* Chat (the AI interview): a full-height column with a slim header, the messages as the one
	   scrolling region and the composer pinned below, like a chat application. The page shell
	   drops its bottom padding (va-page--chat) so the composer meets the viewport's edge. */
	/* The chat page fills exactly the viewport below the top bar, whatever the top bar's height
	   (it wraps on phones): the body becomes one screen tall, the page takes the rest, and the
	   messages are the only part that scrolls, so the composer never leaves the viewport. */
	body:has(.va-page--chat) {
		block-size: 100dvh;
		min-block-size: 0;
		overflow: hidden;
	}

	.va-page--chat {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-block-size: 0;
		padding-block: 0;
	}

	/* The messages keep at least a few lines, so the newest turn stays readable however tall
	   the composer is; the composer takes the rest and scrolls inside when it needs more. */
	.va-chat {
		flex: 1 1 auto;
		min-block-size: 0;
		display: grid;
		grid-template-rows: auto minmax(6rem, 1fr) minmax(0, auto);
	}

	.va-chat__head {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--va-sp-1) var(--va-sp-4);
		padding-block: var(--va-sp-3);
		border-bottom: var(--va-border) solid var(--va-line);
	}

	.va-chat__head h1 {
		font-size: var(--va-text-md);
		flex: 1 1 12rem;
		min-inline-size: 0;
	}

	.va-chat__meta {
		display: flex;
		flex-wrap: wrap;
		gap: var(--va-sp-1) var(--va-sp-3);
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
		font-variant-numeric: tabular-nums;
	}

	/* The quiet way out: a disclosure that holds the confirmation, full width when open. */
	.va-chat__end {
		flex: 1 1 100%;
		border: 0;
	}

	.va-chat__end > summary {
		display: inline-flex;
		min-height: 2.25rem;
		padding: 0 var(--va-sp-1);
		font-size: var(--va-text-sm);
		font-weight: var(--va-weight-medium);
		color: var(--va-ink-muted);
	}

	.va-chat__end > summary:hover {
		color: var(--va-ink);
	}

	.va-chat__end:last-child {
		border-bottom: 0;
	}

	.va-chat__messages {
		overflow-y: auto;
		overscroll-behavior: contain;
		padding-block: var(--va-sp-4);
		scroll-padding-block-end: var(--va-sp-4);
	}

	/* The composer scrolls, so it clips whatever sticks out of it: the side room (pulled out again
	   by the negative margin, so the field keeps the column's width) leaves space for the focus
	   ring, 3px outline plus 2px offset; in px like the ring, so no root font size shrinks it. */
	.va-chat .va-composer {
		position: static;
		margin-inline: -6px;
		padding: var(--va-sp-3) 6px max(var(--va-sp-3), env(safe-area-inset-bottom, 0px));
		max-block-size: none;
		min-block-size: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: none;
	}

	.va-chat .va-composer .va-textarea {
		min-height: 3.25rem;
		max-block-size: 40dvh;
	}

	/* A component in the composer (a scale) is compact: its question was just asked in the
	   turn above, so the legend is small, and a scale takes at most six columns on a phone
	   (0–10 in two rows, 1–5 in one), with the control visible above each number. */
	.va-chat .va-composer .va-group {
		gap: var(--va-sp-2);
		padding: var(--va-sp-3);
	}

	.va-chat .va-composer .va-group > .va-legend {
		font-size: var(--va-text-sm);
		font-weight: var(--va-weight-medium);
		margin-block-end: 0;
	}

	.va-chat .va-scale {
		grid-template-columns: repeat(min(var(--va-scale-points, 11), 6), minmax(0, 1fr));
		gap: var(--va-sp-1) var(--va-sp-2);
	}

	.va-chat .va-scale .va-choice {
		gap: 0;
		padding-block: 0.125rem;
	}

	.va-chat .va-scale .va-choice input {
		inline-size: 1rem;
		block-size: 1rem;
	}

	@media (min-width: 40rem) {
		.va-chat .va-scale {
			grid-template-columns: repeat(var(--va-scale-points, 11), minmax(0, 1fr));
		}
	}

	/* A short screen (a small phone with its browser bars): the head takes less room. */
	@media (max-height: 40rem) {
		body:has(.va-page--chat) .va-topbar {
			padding-block: var(--va-sp-1);
		}

		.va-chat__head {
			padding-block: var(--va-sp-2);
		}

		.va-chat__end:not([open]) {
			flex: 0 0 auto;
		}
	}

	/* A very short screen (a small phone in landscape, an older one with its bars, 200 % zoom):
	   no room for messages and composer side by side, so the page scrolls as a whole, the
	   composer after the messages (WCAG 1.4.10). */
	@media (max-height: 30rem) {
		body:has(.va-page--chat) {
			block-size: auto;
			overflow: visible;
		}

		.va-chat {
			grid-template-rows: auto auto auto;
		}

		.va-chat__messages,
		.va-chat .va-composer {
			overflow: visible;
		}
	}

	/* Three dots that pulse while the interviewer's text streams; still, with reduced motion. */
	.va-typing {
		display: inline-flex;
		align-items: center;
		gap: 0.3rem;
	}

	.va-typing i {
		inline-size: 0.5rem;
		block-size: 0.5rem;
		border-radius: 50%;
		background: var(--va-ai-draft);
		animation: va-typing 1.2s ease-in-out infinite;
	}

	.va-typing i:nth-child(2) {
		animation-delay: 0.2s;
	}

	.va-typing i:nth-child(3) {
		animation-delay: 0.4s;
	}

	@keyframes va-typing {
		0%,
		80%,
		100% {
			opacity: 0.3;
		}
		40% {
			opacity: 1;
		}
	}

	/* A note under a turn the server worded because the AI could not. */
	.va-turn__note {
		margin-block-start: var(--va-sp-2);
		padding-block-start: var(--va-sp-2);
		border-top: var(--va-border) dashed var(--va-line-strong);
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	/* Trust gate facts: short cards that say who sees what. */
	/* Trust facts on a start page: plain information, so no frame, surface or hover that would
	   read as a card to open (ProzessOS issue 16a9997). One column, a small icon beside each
	   fact's heading and its one or two sentences; details sit in a disclosure below. */
	.va-trust {
		list-style: none;
		padding: 0;
		display: grid;
		gap: var(--va-sp-4);
	}

	.va-trust > li {
		display: grid;
		grid-template-columns: 1.25rem minmax(0, 1fr);
		column-gap: var(--va-sp-3);
		max-inline-size: none;
	}

	.va-trust > li > .va-icon {
		grid-row: 1 / span 2;
		inline-size: 1.25rem;
		block-size: 1.25rem;
		margin-block-start: 0.1rem;
		color: var(--va-action);
	}

	.va-trust > li > :not(.va-icon) {
		grid-column: 2;
	}

	.va-trust h2,
	.va-trust h3 {
		font-size: var(--va-text-base);
		margin-block-end: var(--va-sp-1);
	}

	.va-trust p {
		font-size: var(--va-text-sm);
		color: var(--va-ink-soft);
	}

	/* Empty state: a dashed, centred box with the one next step. */
	.va-empty {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: var(--va-sp-2);
		padding: var(--va-sp-5);
		border: var(--va-border-strong) dashed var(--va-line-strong);
		border-radius: var(--va-radius-lg);
		color: var(--va-ink-soft);
	}

	/* Inline confirmation: the step that replaces a destructive button and asks first. */
	.va-confirm {
		display: flex;
		flex-direction: column;
		gap: var(--va-sp-3);
		padding: var(--va-sp-4);
		border: var(--va-border-strong) solid var(--va-attention-strong);
		border-radius: var(--va-radius);
		background: var(--va-attention-wash);
	}

	/* Prose: Markdown-like content (none in the pilot yet), opt-in. */
	.va-prose > * + * {
		margin-block-start: var(--va-sp-3);
	}
}

@layer va.utilities {
	.va-sr-only {
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.va-meta {
		font-size: var(--va-text-sm);
		color: var(--va-ink-muted);
	}

	.va-soft {
		color: var(--va-ink-soft);
	}

	.va-lead {
		font-size: var(--va-text-md);
		color: var(--va-ink-soft);
	}

	.va-prewrap {
		white-space: pre-line;
	}

	.va-wrap {
		overflow-wrap: anywhere;
	}

	.va-nowrap {
		white-space: nowrap;
	}

	.va-measure {
		max-inline-size: 70ch;
	}

	.va-full {
		max-inline-size: none;
	}

	.va-mono {
		font-family: var(--va-font-mono);
	}

	.va-h1 {
		font-size: var(--va-text-xl);
	}

	.va-h2 {
		font-size: var(--va-text-lg);
	}

	.va-h3 {
		font-size: var(--va-text-md);
	}

	.va-h4 {
		font-size: var(--va-text-base);
	}

	.va-h1,
	.va-h2,
	.va-h3,
	.va-h4 {
		font-weight: var(--va-weight-semibold);
		line-height: var(--va-leading-tight);
		letter-spacing: -0.01em;
	}

	@media (min-width: 40rem) {
		.va-h1 {
			font-size: var(--va-text-2xl);
		}
	}

	.va-mt-0 {
		margin-block-start: 0;
	}

	.va-hide-narrow {
		display: none;
	}

	@media (min-width: 40rem) {
		.va-hide-narrow {
			display: revert;
		}

		.va-hide-wide {
			display: none;
		}
	}
}
