/* HK Analytical: the Worker pages (/c/:id/:key report page, 404, message pages). Served at /c-assets/.
   The Vial brand of the site (site/src/styles/global.css, design/brand-final/BRAND.md): one black stage, near-white
   ink, one UV line. UV is light only (beams, traces, focus ring), never a fill or a wash. The square is the only
   status glyph. Semantic colours are for status and results only. Keep the tokens in step with the production theme's tokens.css. */

/* ---------- fonts: the production theme's files (site/src/themes/b-vial/fonts), served by the Worker ---------- */
@font-face {
	font-family: "HK Sans";
	src: url("fonts/hk-sans.woff2") format("woff2");
	font-weight: 400 700;
	font-stretch: 100% 112.5%;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "HK Mono";
	src: url("fonts/hk-mono.woff2") format("woff2");
	font-weight: 300 600;
	font-stretch: 100% 112.5%;
	font-style: normal;
	font-display: swap;
}
/* metric-matched fallbacks, as on the site */
@font-face {
	font-family: "HK Sans Fallback";
	src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
	size-adjust: 103%;
	ascent-override: 106%;
	descent-override: 31%;
	line-gap-override: 0%;
}
@font-face {
	font-family: "HK Mono Fallback";
	src: local("Menlo"), local("Consolas"), local("DejaVu Sans Mono"), local("Roboto Mono");
	size-adjust: 106%;
	ascent-override: 92%;
	descent-override: 26%;
}

/* ---------- tokens (the production theme, site/src/themes/b-vial/tokens.css; a theme stylesheet loaded after
   this file redefines them, docs/theming.md) ---------- */
:root {
	--bg: #000;
	--raised: #0c0c0f;
	--raised-2: #131318;
	--hair: #24232b;
	--hair-2: #34333d;
	--line-dim: #4a4855;
	--ink: #f4f3f7;
	--ink-2: #a3a1ae;
	--ink-3: #82808d;
	--accent: #7b5cff;
	--accent-core: #e6deff;
	--accent-ring: #a18cff;
	--cool: #d9e4f2;
	--paper: #f2f2f5;
	--highlight: #fff;
	--line-ghost: #45434f;
	/* channels for rgb(var(--x) / alpha) */
	--accent-rgb: 123 92 255;
	--caution-rgb: 227 166 74;
	--danger-rgb: 255 138 122;
	--pass-rgb: 116 211 158;
	--wash-rgb: 255 255 255;
	--scrim-rgb: 0 0 0;
	--caution: #e3a64a;
	--danger: #ff8a7a;
	/* results only (coa-spec §3.1.1 "pass green"), tuned for black: 11:1 */
	--pass: #74d39e;

	--sans: "HK Sans", "HK Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "HK Mono", "HK Mono Fallback", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--fs-h1: clamp(44px, 6.6vw, 108px);
	--fs-lede: clamp(17px, 1.3vw, 21px);
	--fs-body: 17px;
	--fs-small: 14px;
	--fs-mono: 12px;

	--gutter: clamp(16px, 4.4vw, 72px);
	--maxw: 1400px;
	--nav-h: 76px;
	--radius: 999px;
	--radius-box: 14px;

	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

	color-scheme: dark;
}
@media (max-width: 700px) {
	:root {
		--nav-h: 64px;
	}
}

/* ---------- reset and base ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	overflow-x: clip;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	background: var(--bg);
	scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: var(--fs-body);
	font-weight: 430;
	font-stretch: 100%;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
	text-rendering: optimizeLegibility;
}
img,
svg {
	display: block;
	max-width: 100%;
}
a {
	color: inherit;
}
p,
h1,
h2,
h3,
figure,
dl,
dd {
	margin: 0;
}
h1,
h2,
h3 {
	font-weight: inherit;
}
ul[role="list"],
ol[role="list"] {
	list-style: none;
	margin: 0;
	padding: 0;
}
button,
input {
	font: inherit;
	color: inherit;
}
::selection {
	background: var(--accent);
	color: var(--highlight);
}
:focus-visible {
	outline: 2px solid var(--accent-ring);
	outline-offset: 3px;
	border-radius: 4px;
}
[hidden] {
	display: none !important;
}
#main:focus {
	outline: none;
}

/* ---------- utilities ---------- */
.wrap {
	width: 100%;
	max-width: calc(var(--maxw) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip {
	position: absolute;
	left: 12px;
	top: -80px;
	z-index: 100;
	background: var(--ink);
	color: var(--bg);
	padding: 10px 18px;
	border-radius: var(--radius);
	font-weight: 560;
	text-decoration: none;
}
.skip:focus-visible {
	top: 12px;
}
/* inline data strings (IDs, lots, keys): Martian Mono, a touch smaller than the text around it */
.mono,
code {
	font-family: var(--mono);
	font-size: 0.86em;
	font-weight: 400;
	font-stretch: 100%;
	letter-spacing: 0.02em;
}
.muted {
	color: var(--ink-3);
}
.nowrap {
	white-space: nowrap;
}
.eyebrow {
	font-family: var(--mono);
	font-size: var(--fs-mono);
	font-weight: 400;
	letter-spacing: 0.08em;
	color: var(--ink-3);
}
.lede {
	font-size: var(--fs-lede);
	color: var(--ink-2);
	line-height: 1.45;
	max-width: 34em;
	text-wrap: pretty;
}
.link {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--hair-2);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	transition: text-decoration-color 0.2s ease;
}
.link:hover {
	text-decoration-color: var(--accent-ring);
}
.arrow-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	color: var(--ink);
	text-decoration: none;
	font-weight: 540;
	font-stretch: 106%;
}
.arrow-link .arr {
	transition: transform 0.25s var(--ease-out);
}
.arrow-link:hover .arr {
	transform: translateX(4px);
}

/* The status glyph (brand kit §8): an outline square; filled = a checked or settled state. The border keeps it
   visible in forced-colours mode, where backgrounds are dropped. */
.sq {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border: 1.5px solid var(--sq, var(--ink-3));
	background: var(--sq-fill, transparent);
}

/* ---------- buttons (site/src/components/Button.astro) ---------- */
.btn {
	--h: 50px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: var(--h);
	padding: 0 24px;
	border-radius: var(--radius);
	border: 1px solid transparent;
	font-family: var(--sans);
	font-size: 16px;
	font-weight: 560;
	font-stretch: 106%;
	letter-spacing: -0.005em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s var(--ease-out);
}
.btn:active {
	transform: scale(0.98);
}
.btn-primary {
	background: var(--ink);
	color: var(--bg);
}
.btn-primary:hover {
	background: var(--highlight);
}
.btn-ghost {
	color: var(--ink);
	border-color: var(--line-ghost);
	background: rgb(var(--scrim-rgb) / 0.35);
}
.btn-ghost:hover {
	border-color: var(--ink-2);
}
.btn-sm {
	--h: 38px;
	padding: 0 16px;
	font-size: 14px;
}
.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
@media (max-width: 560px) {
	.actions {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}
}

/* ---------- header (site/src/components/Header.astro) ---------- */
.hdr {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--nav-h);
	background: rgb(var(--scrim-rgb) / 0.72);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	backdrop-filter: blur(16px) saturate(1.2);
	border-bottom: 1px solid transparent;
}
/* the hairline appears once the page scrolls (the site does this with script) */
@supports (animation-timeline: scroll()) {
	.hdr {
		animation: hdr-line linear both;
		animation-timeline: scroll(root);
		animation-range: 0 48px;
	}
	@keyframes hdr-line {
		to {
			border-bottom-color: rgb(var(--wash-rgb) / 0.06);
		}
	}
}
.hdr-inner {
	height: 100%;
	max-width: calc(var(--maxw) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.hdr-brand {
	display: block;
	color: var(--ink);
	padding: 8px 0;
	flex: 0 1 auto;
	min-width: 0;
}
/* brand kit §2: size the lockup by its cap height (cap 18 on wide screens, 12 on phones); never clip it */
.hdr-logo {
	height: calc(18px * 896 / 729);
	width: auto;
	max-width: 100%;
	overflow: visible;
}
.menu-mark {
	height: 24px;
	width: auto;
}
.hdr-nav {
	margin-left: auto;
}
.hdr-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.2vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.hdr-nav a {
	position: relative;
	font-size: 15px;
	font-weight: 500;
	color: var(--ink-2);
	text-decoration: none;
	transition: color 0.2s ease;
}
.hdr-nav a:hover,
.hdr-nav a[aria-current] {
	color: var(--ink);
}
.hdr-nav a[aria-current]::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -8px;
	height: 1px;
	background: var(--accent);
	box-shadow: 0 0 6px rgb(var(--accent-rgb) / 0.6);
}
.hdr-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
}
.hdr-menu,
.menu-close {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	place-items: center end;
	color: var(--ink);
}
.hdr-menu-bars {
	position: relative;
	width: 20px;
	height: 1.5px;
	background: currentColor;
	box-shadow: 0 -6px 0 currentColor;
	transform: translateY(3px);
}
.menu-x {
	position: relative;
	width: 20px;
	height: 20px;
}
.menu-x::before,
.menu-x::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 9.25px;
	height: 1.5px;
	background: currentColor;
	transform: rotate(45deg);
}
.menu-x::after {
	transform: rotate(-45deg);
}

/* phone menu: the Popover API, no script needed */
.menu {
	display: none;
}
.menu[popover] {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0 var(--gutter) max(24px, env(safe-area-inset-bottom));
	border: 0;
	background: var(--bg);
	color: var(--ink);
	overflow: auto;
}
.menu:popover-open {
	display: grid;
	grid-template-rows: var(--nav-h) 1fr auto;
}
.menu-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.menu-close {
	display: grid;
}
.menu-nav {
	align-self: center;
}
.menu-nav ol {
	display: grid;
}
.menu-nav a {
	display: grid;
	grid-template-columns: 2.6em 1fr;
	align-items: baseline;
	padding: 12px 0;
	text-decoration: none;
	border-top: 1px solid var(--hair);
}
.menu-nav li:last-child a {
	border-bottom: 1px solid var(--hair);
}
.menu-idx {
	color: var(--ink-3);
	font-size: var(--fs-mono);
}
.menu-label {
	font-size: clamp(34px, 10vw, 52px);
	font-weight: 600;
	font-stretch: 112.5%;
	letter-spacing: -0.045em;
	line-height: 1.05;
}
.menu-nav a[aria-current] .menu-label {
	color: var(--accent-core);
}
.menu-foot {
	position: relative;
	display: grid;
	gap: 10px;
	padding-top: 28px;
}
.menu-beam {
	position: absolute;
	left: calc(-1 * var(--gutter));
	right: calc(-1 * var(--gutter));
	top: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		rgb(var(--accent-rgb) / 0),
		var(--accent) 40%,
		var(--accent-core) 80%,
		rgb(var(--accent-rgb) / 0)
	);
	box-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.5);
}
html:has(.menu:popover-open) {
	overflow: hidden;
}
@media (max-width: 900px) {
	.hdr-nav {
		display: none;
	}
	.hdr-menu {
		display: grid;
	}
}
@media (max-width: 700px) {
	.hdr-logo {
		height: calc(12px * 896 / 729);
	}
}
@media (max-width: 480px) {
	.hdr-inner {
		gap: 12px;
	}
	.hdr-actions {
		gap: 6px;
	}
	.hdr-cta {
		--h: 36px;
		padding: 0 14px;
		font-size: 13px;
	}
}

/* ---------- the flat UV line: reads nothing, no peak ---------- */
.beam {
	position: relative;
	height: 1px;
	margin-top: clamp(40px, 6vw, 80px);
}
.beam::after {
	content: "";
	position: absolute;
	left: 64%;
	right: 0;
	top: 0;
	height: 1px;
	background: var(--hair);
}
.beam span {
	position: absolute;
	left: 0;
	top: 0;
	width: 64%;
	height: 1px;
	background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0), var(--accent) 45%, var(--accent-core));
	box-shadow: 0 0 6px rgb(var(--accent-rgb) / 0.55);
	transform-origin: 0 50%;
}

/* ---------- message pages (404, verify errors, replaced links) ---------- */
.message {
	padding-top: clamp(56px, 9vw, 128px);
	padding-bottom: clamp(64px, 9vw, 128px);
}
.msg-inner {
	display: grid;
	gap: 22px;
	justify-items: start;
}
/* pages that send bare content (the form-error page) get the same column */
.message > h1,
.message > p,
.message > ul {
	width: min(100% - 2 * var(--gutter), var(--maxw));
	margin-inline: auto;
}
.message > p,
.message > ul {
	margin-top: 16px;
	color: var(--ink-2);
}
.message h1,
.msg-title {
	font-size: clamp(40px, 6vw, 96px);
	font-weight: 600;
	font-stretch: 112.5%;
	letter-spacing: -0.048em;
	line-height: 0.95;
	text-wrap: balance;
	max-width: 14em;
}
.msg-inner > p:not(.lede) {
	color: var(--ink-2);
	max-width: 40em;
}
.msg-inner a:not(.btn),
.message > p a,
.message > ul a {
	color: var(--ink);
	text-decoration-color: var(--hair-2);
	text-underline-offset: 0.22em;
}
.msg-inner a:not(.btn):hover {
	text-decoration-color: var(--accent-ring);
}
.msg-inner .actions {
	margin-top: 8px;
}

/* ---------- report page: head ---------- */
.rp-head {
	padding-top: clamp(28px, 4vw, 56px);
}
.rp-head-inner {
	display: grid;
	gap: 20px;
	justify-items: start;
}
.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--ink-3);
}
.crumbs li + li::before {
	content: "/";
	margin-right: 6px;
	color: var(--hair-2);
}
.crumbs a {
	color: var(--ink-2);
	text-decoration: none;
}
.crumbs a:hover {
	color: var(--ink);
}

/* DEMO: amber hatch, like the diagonal stamp on every page of a demo PDF. Unmissable, never "Valid". */
.demo-banner {
	width: 100%;
	max-width: 54rem;
	padding: 16px 22px;
	border: 1px solid var(--caution);
	border-radius: var(--radius-box);
	background: repeating-linear-gradient(
		-45deg,
		rgb(var(--caution-rgb) / 0.13) 0 10px,
		rgb(var(--caution-rgb) / 0) 10px 20px
	);
}
.demo-banner p {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
}
.demo-word {
	font-family: var(--mono);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1.2;
	color: var(--caution);
}
.demo-text {
	flex: 1 1 24em;
	color: var(--ink);
	font-size: 16px;
}

/* status banners */
.statuses {
	display: grid;
	justify-items: start;
	gap: 12px;
	width: 100%;
	max-width: 54rem;
}
.status {
	--word: clamp(24px, 2.4vw, 32px);
	position: relative;
	width: 100%;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	column-gap: 14px;
	padding: 18px 22px;
	border: 1px solid var(--hair-2);
	border-radius: var(--radius-box);
	background: var(--raised);
}
.status > .sq {
	grid-row: 1 / span 2;
	width: 12px;
	height: 12px;
	margin-top: calc((1.15 * var(--word) - 12px) / 2);
}
.status-word {
	font-size: var(--word);
	font-weight: 600;
	font-stretch: 112.5%;
	letter-spacing: -0.03em;
	line-height: 1.15;
}
.status-detail {
	grid-column: 2;
	margin-top: 4px;
	color: var(--ink);
	max-width: 52em;
}
.status .mono {
	color: var(--cool);
}
/* Valid: ink, the filled square (checked), one UV line of light under the word. No pass colour. */
.status.is-valid {
	width: auto;
	padding-right: 40px;
	--sq: var(--ink);
	--sq-fill: var(--ink);
	border-color: var(--line-dim);
}
.status.is-valid .status-word::after {
	content: "";
	display: block;
	width: 64px;
	height: 1px;
	margin-top: 10px;
	background: var(--accent);
	box-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.9);
}
.status.is-caution {
	--sq: var(--caution);
	border-color: rgb(var(--caution-rgb) / 0.6);
	background:
		linear-gradient(90deg, rgb(var(--caution-rgb) / 0.08), rgb(var(--caution-rgb) / 0) 60%), var(--raised);
}
.status.is-caution .status-word {
	color: var(--caution);
}
/* withdrawn is final: a filled square and a full-strength edge */
.status.is-withdrawn {
	--sq-fill: var(--caution);
	border-color: var(--caution);
	border-left-width: 4px;
}
.status.is-danger {
	--sq: var(--danger);
	--sq-fill: var(--danger);
	border-color: var(--danger);
	border-left-width: 4px;
	background:
		linear-gradient(90deg, rgb(var(--danger-rgb) / 0.1), rgb(var(--danger-rgb) / 0) 60%), var(--raised);
}
.status.is-danger .status-word {
	color: var(--danger);
}

/* title: the product as received, then the report ID and version as data */
.rp-title {
	display: grid;
	gap: 16px;
	margin-top: 16px;
}
.rp-name {
	font-size: clamp(40px, 5.6vw, 92px);
	font-weight: 600;
	font-stretch: 112.5%;
	letter-spacing: -0.048em;
	line-height: 0.95;
	text-wrap: pretty;
	max-width: 15em;
	overflow-wrap: anywhere;
}
.rp-meta {
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 400;
	font-stretch: 100%;
	letter-spacing: 0.04em;
	color: var(--ink-2);
}
.rp-meta .mono {
	font-size: inherit;
	letter-spacing: inherit;
	color: var(--cool);
}
.issued {
	color: var(--ink-2);
	font-size: 16px;
}
.issued .mono {
	color: var(--ink);
}

/* client relationship: always shown, one neutral border for both values, never a result colour (coa-spec §6) */
.relationship {
	display: grid;
	gap: 8px;
	width: 100%;
	max-width: 54rem;
	margin-top: 12px;
	padding: 20px 24px 22px;
	border: 1px solid var(--ink);
	border-radius: var(--radius-box);
	background: var(--raised);
}
.rel-k {
	margin-bottom: 2px;
}
.relationship p {
	color: var(--ink);
	text-wrap: pretty;
}
.relationship strong {
	font-weight: 620;
	font-stretch: 106%;
}
.relationship .rel-client {
	color: var(--ink-2);
	font-size: 15px;
}

/* ---------- report page: sections ---------- */
.rp-sec {
	padding-block: clamp(44px, 5vw, 80px);
	border-top: 1px solid var(--hair);
}
.rp-head + .rp-sec {
	border-top: 0;
}
.rp-last {
	padding-bottom: clamp(64px, 8vw, 120px);
}
.rp-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
	gap: 20px clamp(32px, 5vw, 88px);
	align-items: start;
}
.rp-side {
	position: sticky;
	top: calc(var(--nav-h) + 28px);
	display: grid;
	gap: 10px;
}
.rp-idx {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--accent-ring);
}
.rp-h {
	font-size: clamp(22px, 2vw, 30px);
	font-weight: 580;
	font-stretch: 112.5%;
	letter-spacing: -0.025em;
	line-height: 1.1;
	text-wrap: balance;
}
.rp-body {
	display: grid;
	gap: 22px;
	min-width: 0;
}

/* facts (sample) */
.facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(24px, 3vw, 48px);
	border-top: 1px solid var(--hair);
}
.facts > div {
	display: grid;
	align-content: start;
	gap: 4px;
	padding: 14px 0 15px;
	border-bottom: 1px solid var(--hair);
}
.facts dt {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--ink-3);
}
.facts dd {
	color: var(--ink);
	overflow-wrap: anywhere;
}
.tag {
	display: inline-block;
	margin-left: 2px;
	padding: 1px 8px 2px;
	border: 1px solid var(--hair-2);
	border-radius: var(--radius);
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 400;
	font-stretch: 100%;
	letter-spacing: 0.03em;
	line-height: 1.5;
	color: var(--ink-2);
	white-space: nowrap;
	vertical-align: 2px;
}
.photo-frame {
	position: relative;
	display: block;
	overflow: hidden;
	border: 1px solid var(--hair);
	border-radius: 10px;
	background: var(--raised);
}
.photo-frame img {
	display: block;
	width: 100%;
	height: auto;
}
/* the report ID over the corner of a displayed photo (coa-spec §3.2), as on the PDF */
.overlay {
	position: absolute;
	left: 12px;
	bottom: 12px;
	padding: 3px 8px;
	border-radius: 4px;
	background: rgb(0 0 0 / 0.62);
	color: #fff;
	font-size: 12px;
}

/* ---------- the answer: page 1 of the PDF (coa-spec §3.1) ---------- */
.rp-one {
	padding-block: clamp(36px, 4.4vw, 72px) clamp(48px, 5.4vw, 88px);
	border-top: 1px solid var(--hair);
}
.one-grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 40px clamp(32px, 5.6vw, 96px);
	align-items: stretch;
}
.one-grid.no-photo {
	grid-template-columns: minmax(0, 1fr);
}
.one-photo {
	max-width: 560px;
}
/* the photo and the result fit one 900 px screen */
.one-photo .photo-frame img {
	max-height: min(58vh, 600px);
	object-fit: cover;
}
/* record photo 1 is not public: say so, never show another photo in its place */
.one-photo-none .photo-none {
	padding: 28px 24px;
	border: 1px dashed var(--hair-2);
	color: var(--ink-2);
}
.one-photo figcaption {
	margin-top: 10px;
	font-size: 13px;
	color: var(--ink-3);
}
/* the result directly under the sample facts, next to the top of the photo */
.one-side {
	display: grid;
	align-content: start;
	gap: 40px;
	min-width: 0;
}
.one-facts {
	display: grid;
	gap: 8px;
	max-width: 36rem;
}
.one-facts > div {
	display: grid;
	grid-template-columns: 9.5rem minmax(0, 1fr);
	gap: 16px;
	align-items: baseline;
}
.one-facts dt {
	color: var(--ink-3);
	font-size: 15px;
}
.one-facts dd {
	color: var(--ink);
	overflow-wrap: anywhere;
}
.one-facts .one-rel {
	font-weight: 600;
	font-stretch: 106%;
}
/* one state for the order: its colour on the rule and the word, never the only signal */
.one-result {
	display: grid;
	gap: 10px;
	padding-top: 16px;
	border-top: 3px solid var(--sq, var(--ink-3));
}
.one-k {
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.06em;
	color: var(--ink-3);
}
.one-word {
	display: flex;
	align-items: center;
	gap: 0.32em;
	font-size: clamp(36px, 4.2vw, 64px);
	font-weight: 600;
	font-stretch: 112.5%;
	letter-spacing: -0.035em;
	line-height: 1;
	color: var(--sq, var(--ink));
}
.one-word > .ic {
	width: 0.62em;
	height: 0.62em;
}
/* "(conditional pass)": the zone of an inconclusive order, smaller than the word */
.one-detail {
	font-size: 0.42em;
	font-weight: 600;
	font-stretch: 100%;
	letter-spacing: 0;
	white-space: nowrap;
}
.one-result.c-reported .one-word,
.one-result.c-none .one-word {
	color: var(--ink);
}
.one-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	color: var(--ink-2);
	font-size: 15px;
}
.one-counts li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
/* one row per test, the standard set first; a test not run stays visible, quieter. In the answer's grid, under
   the photo and the result (the row gap spaces it), across both columns. */
.one-rows {
	grid-column: 1 / -1;
	margin-top: clamp(0px, 2vw, 32px);
	border-top: 1px solid var(--hair-2);
}
.one-rows tbody th,
.one-rows tbody td {
	padding: 17px 20px 17px 0;
	vertical-align: baseline;
}
.one-rows tbody th {
	width: 17%;
	font-weight: 600;
}
.one-rows .row-val {
	width: 30%;
	color: var(--ink);
	font-weight: 500;
}
.one-rows .row-note {
	color: var(--ink-2);
	font-size: 14px;
}
.one-rows .row-state {
	width: 23%;
	padding-right: 0;
}
.one-rows tr.is-open th,
.one-rows tr.is-open .row-val {
	color: var(--ink-3);
	font-weight: 450;
}
.dl-note {
	max-width: 46rem;
	font-size: 15px;
}

/* The result-state icons, drawn as on the PDF: a disc in the state colour with a knocked-out tick, cross,
   exclamation mark or dash; an open circle for a test not run. The colour is the state class's --sq. */
.ic {
	display: inline-block;
	flex: none;
	width: 1em;
	height: 1em;
	overflow: visible;
}
.ic-disc {
	fill: var(--sq, var(--ink-3));
}
.ic-ring {
	fill: none;
	stroke: var(--sq, var(--ink-3));
	stroke-width: 1.4;
}
.ic-mark {
	fill: none;
	stroke: var(--bg);
	stroke-width: 2.1;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.ic-dot {
	fill: var(--bg);
}

.c-pass {
	--sq: var(--pass);
	--sq-fill: var(--pass);
}
.c-fail {
	--sq: var(--danger);
	--sq-fill: var(--danger);
}
.c-caution {
	--sq: var(--caution);
	--sq-fill: var(--caution);
}
.c-reported {
	--sq: var(--ink-2);
	--sq-fill: var(--ink-2);
}
.c-none {
	--sq: var(--ink-3);
}

/* tables */
.table-wrap {
	overflow-x: auto;
}
table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
thead th {
	padding: 0 16px 12px 0;
	text-align: left;
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.06em;
	color: var(--ink-3);
	border-bottom: 1px solid var(--hair-2);
	white-space: nowrap;
}
tbody th,
tbody td {
	padding: 16px 16px 16px 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--hair);
}
tbody th {
	font-weight: 540;
	color: var(--ink);
}
tbody td {
	color: var(--ink-2);
}
tbody td:last-child,
thead th:last-child {
	padding-right: 0;
}
.value {
	color: var(--ink);
	font-size: 13px;
	line-height: 1.6;
	letter-spacing: 0;
}
td .mono {
	color: var(--ink);
}
.verdict {
	display: inline-flex;
	align-items: baseline;
	gap: 9px;
	color: var(--sq, var(--ink-2));
}
.verdict > .sq {
	transform: translateY(0.05em);
}
.verdict > .ic {
	width: 0.95em;
	height: 0.95em;
	transform: translateY(0.12em);
}
.verdict.c-reported,
.verdict.c-none {
	color: var(--ink-2);
}
.verdict.is-valid {
	--sq: var(--ink);
	--sq-fill: var(--ink);
	color: var(--ink);
}
.verdict.is-caution {
	--sq: var(--caution);
	color: var(--caution);
}
.verdict.is-withdrawn {
	--sq-fill: var(--caution);
}
.verdict.is-danger {
	--sq: var(--danger);
	--sq-fill: var(--danger);
	color: var(--danger);
}
.identity {
	color: var(--ink-2);
	max-width: 52em;
}
.identity-k {
	color: var(--ink);
	font-weight: 540;
}

/* downloads */
.downloads {
	display: grid;
	max-width: 46rem;
	border-top: 1px solid var(--hair);
}
.dl {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: baseline;
	gap: 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--hair);
	color: var(--ink);
	text-decoration: none;
}
.dl-name {
	font-size: clamp(18px, 1.5vw, 22px);
	font-weight: 560;
	font-stretch: 112.5%;
	letter-spacing: -0.02em;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	transition: text-decoration-color 0.2s ease;
}
.dl:hover .dl-name {
	text-decoration-color: var(--accent-ring);
}
.dl-meta {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--ink-3);
}
.dl-arr {
	color: var(--ink-2);
	transition: transform 0.25s var(--ease-out);
}
.dl:hover .dl-arr {
	transform: translateY(2px);
}

/* PDF check: the drop zone and the read-out, as on /verify; shown once the script runs */
.pdf-check {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: 16px clamp(16px, 2vw, 24px);
	align-items: stretch;
}
.drop,
.pdf-out {
	display: none;
}
.pdf-check.is-live .drop,
.pdf-check.is-live .pdf-out {
	display: grid;
}
.pdf-check.is-live .js-off {
	display: none;
}
.js-off,
.pdf-note {
	grid-column: 1 / -1;
	max-width: 48em;
	font-size: 15px;
}
.pdf-note {
	color: var(--ink-2);
}
.drop {
	position: relative;
	justify-items: center;
	align-content: center;
	gap: 14px;
	min-height: 220px;
	padding: 28px;
	border: 1px dashed var(--line-dim);
	border-radius: 20px;
	background: var(--raised);
	text-align: center;
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease;
}
.drop:hover,
.drop.is-over {
	border-color: var(--accent);
	background: var(--raised-2);
}
.drop:focus-within {
	outline: 2px solid var(--accent-ring);
	outline-offset: 3px;
}
.drop-doc {
	width: 40px;
	height: 50px;
}
.drop-doc-p,
.drop-doc-f {
	fill: none;
	stroke: var(--ink-2);
	stroke-width: 1.4;
	stroke-linejoin: round;
}
.drop-doc-l {
	stroke: var(--hair-2);
	stroke-width: 3;
}
.drop-t {
	max-width: 17em;
	font-size: 18px;
	font-weight: 560;
	font-stretch: 112.5%;
	letter-spacing: -0.02em;
	line-height: 1.3;
}
.drop-file {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}
.pdf-out {
	align-content: start;
	gap: 10px;
	padding: clamp(18px, 2vw, 26px);
	border: 1px solid var(--hair);
	border-radius: 20px;
	min-width: 0;
}
.pdf-k {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--ink-3);
}
.pdf-hash {
	min-height: 3.4em;
	max-width: 32ch;
	font-family: var(--mono);
	font-size: 12px;
	line-height: 1.7;
	color: var(--cool);
	overflow-wrap: anywhere;
}
.pdf-hash:empty::before {
	content: "the fingerprint of the file appears here";
	color: var(--ink-3);
}
.pdf-result {
	padding-top: 14px;
	border-top: 1px solid var(--hair);
	font-size: 17px;
	font-weight: 560;
	font-stretch: 106%;
	line-height: 1.4;
}
.pdf-result:empty {
	display: none;
}
.pdf-result.is-busy {
	color: var(--ink-2);
}
.pdf-result.is-match::after {
	content: "";
	display: block;
	width: 64px;
	height: 1px;
	margin-top: 12px;
	background: var(--accent);
	box-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.9);
}
.pdf-result.is-caution,
.pdf-result.is-nomatch {
	color: var(--caution);
}

/* integrity: the verify console look, every value in Martian Mono */
.console {
	padding: 6px clamp(18px, 2.4vw, 32px);
	border: 1px solid var(--hair-2);
	border-radius: 20px;
	background:
		linear-gradient(180deg, rgb(var(--wash-rgb) / 0.025), rgb(var(--wash-rgb) / 0) 40%), var(--raised);
	box-shadow: 0 1px 0 rgb(var(--wash-rgb) / 0.04) inset;
}
.integrity > div {
	display: grid;
	grid-template-columns: 11rem minmax(0, 1fr);
	gap: 6px 24px;
	padding: 18px 0;
	border-top: 1px solid var(--hair);
}
.integrity > div:first-child {
	border-top: 0;
}
.integrity dt {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	line-height: 1.9;
	color: var(--ink-3);
}
.integrity dd {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.75;
	letter-spacing: 0.01em;
	color: var(--ink-2);
	overflow-wrap: anywhere;
}
.integrity dd .mono {
	font-size: inherit;
	letter-spacing: inherit;
	color: var(--ink);
	white-space: nowrap;
}
.integrity .hash {
	color: var(--cool);
	letter-spacing: 0;
}
.sig-ok dd,
.sig-bad dd {
	display: flex;
	align-items: start;
	gap: 10px;
}
.integrity dd > .sq {
	margin-top: calc((1.75em - 10px) / 2);
}
.sig-ok {
	--sq: var(--ink);
	--sq-fill: var(--ink);
}
.sig-bad {
	--sq: var(--danger);
	--sq-fill: var(--danger);
}
.sig-bad dd {
	color: var(--danger);
}
.howto {
	max-width: 52em;
	font-size: 15px;
	color: var(--ink-2);
}
.howto code {
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--raised-2);
	color: var(--cool);
	font-size: 0.82em;
}

/* version history */
.versions tbody td .mono {
	color: inherit;
}
.versions tr[aria-current="true"] td {
	color: var(--ink);
}
.versions tr[aria-current="true"] td:first-child {
	box-shadow: inset 2px 0 0 var(--accent);
	padding-left: 14px;
}
.here {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--ink-3);
	white-space: nowrap;
}

/* what the report tells you: a note with the UV edge (site Callout) */
.what {
	position: relative;
	max-width: 48rem;
	padding: 18px 22px 18px 24px;
	border: 1px solid var(--hair);
	border-radius: var(--radius-box);
	background: var(--raised);
	color: var(--ink-2);
	line-height: 1.55;
}
.what::before {
	content: "";
	position: absolute;
	left: -1px;
	top: 16px;
	bottom: 16px;
	width: 2px;
	border-radius: 2px;
	background: var(--accent);
}

/* ---------- footer (site/src/components/Footer.astro) ---------- */
.ft {
	border-top: 1px solid var(--hair);
	padding: clamp(48px, 6vw, 72px) 0 clamp(28px, 4vw, 40px);
	font-size: var(--fs-small);
	color: var(--ink-2);
}
.ft a {
	color: var(--ink-2);
	text-decoration: none;
	transition: color 0.2s ease;
}
.ft a:hover {
	color: var(--ink);
}
.ft-report {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px 32px;
	margin-bottom: clamp(40px, 5vw, 56px);
	padding-bottom: clamp(32px, 4vw, 44px);
	border-bottom: 1px solid var(--hair);
	font-size: 16px;
}
.ft-host {
	display: flex;
	align-items: baseline;
	gap: 12px;
	color: var(--ink);
}
.ft-host .sq {
	--sq: var(--ink-2);
	transform: translateY(0.05em);
}
.ft .ft-report .arrow-link {
	color: var(--ink);
}
.ft-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 40px;
	align-items: start;
}
/* the lockup is one colour, ink on black (brand kit §5); only the links are dimmed */
.ft .ft-brand,
.ft .ft-brand:hover {
	display: inline-block;
	color: var(--ink);
}
.ft-logo {
	height: calc(18px * 896 / 729);
	width: auto;
	overflow: visible;
}
.ft-nav {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}
.ft-title {
	margin-bottom: 14px;
}
.ft-group ul {
	display: grid;
	gap: 9px;
}
.ft-facts {
	margin-top: 40px;
	color: var(--ink-3);
}
.ft-bottom {
	margin-top: clamp(40px, 5vw, 64px);
	padding-top: 20px;
	border-top: 1px solid var(--hair);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 12px 32px;
	align-items: baseline;
}
.ft-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
}
.ft-copy {
	color: var(--ink-3);
	white-space: nowrap;
}

/* ---------- widths ---------- */
@media (max-width: 1180px) {
	.rp-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.rp-side {
		position: static;
		display: flex;
		align-items: baseline;
		gap: 14px;
	}
}
@media (max-width: 900px) {
	.ft-top,
	.ft-bottom {
		grid-template-columns: 1fr;
	}
	.pdf-check {
		grid-template-columns: minmax(0, 1fr);
	}
	.drop {
		min-height: 180px;
	}
	.integrity > div {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}
	/* a SHA-256 breaks into two even rows of 32 */
	.integrity .hash {
		max-width: 32ch;
	}
}
/* the answer on narrow screens: the sample and the result first, then the rows, then the photo (a buyer who scans
   the QR code sees the answer on the first screen); each row as two lines */
@media (max-width: 900px) {
	.one-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
	.one-side {
		order: -2;
		gap: 32px;
	}
	.one-rows {
		order: -1;
		margin-top: 0;
	}
	.one-photo {
		max-width: 520px;
	}
	.one-photo .photo-frame img {
		max-height: 62vh;
	}
	.one-rows,
	.one-rows tbody,
	.one-rows tr {
		display: block;
		width: 100%;
	}
	.one-rows tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 4px 16px;
		padding: 14px 0 13px;
		border-bottom: 1px solid var(--hair);
	}
	.one-rows tbody th,
	.one-rows tbody td {
		display: block;
		width: auto;
		padding: 0;
		border: 0;
	}
	.one-rows .row-state {
		grid-column: 2;
		grid-row: 1;
		width: auto;
		text-align: right;
	}
	.one-rows tbody th,
	.one-rows .row-val,
	.one-rows .row-note {
		width: auto;
	}
	.one-rows .row-val,
	.one-rows .row-note {
		grid-column: 1 / -1;
	}
	.one-rows .row-note:empty {
		display: none;
	}
}
@media (max-width: 640px) {
	.one-facts > div {
		grid-template-columns: 7.5rem minmax(0, 1fr);
		gap: 12px;
	}
	.one-facts dt {
		font-size: 14px;
	}
	.one-counts {
		font-size: 14px;
	}
}
/* tables become one card per row */
@media (max-width: 900px) {
	table.stack,
	table.stack tbody,
	table.stack tr,
	table.stack th,
	table.stack td {
		display: block;
		width: 100%;
	}
	table.stack thead {
		display: none;
	}
	table.stack tr {
		padding: 16px 0 12px;
		border-bottom: 1px solid var(--hair);
	}
	table.stack tbody tr:first-child {
		border-top: 1px solid var(--hair-2);
	}
	table.stack th,
	table.stack td {
		border: 0;
		padding: 0;
	}
	table.stack tbody th {
		margin-bottom: 8px;
		font-size: 16px;
	}
	table.stack td {
		position: relative;
		min-height: calc(1.5em + 8px);
		padding: 4px 0 4px 7.75rem;
	}
	table.stack td::before {
		content: attr(data-label);
		position: absolute;
		left: 0;
		top: 4px;
		width: 7.25rem;
		font-family: var(--mono);
		font-size: 11.5px;
		letter-spacing: 0.02em;
		line-height: calc(15px * 1.5);
		color: var(--ink-3);
	}
	table.stack td.nowrap {
		white-space: normal;
	}
	.value {
		font-size: 12px;
	}
	.tag {
		max-width: 100%;
		border-radius: 6px;
		white-space: normal;
	}
	.versions tr[aria-current="true"] td:first-child {
		box-shadow: none;
		padding-left: 7.75rem;
	}
	.versions tr[aria-current="true"] {
		box-shadow: inset 2px 0 0 var(--accent);
		padding-left: 14px;
	}
}
@media (max-width: 640px) {
	.facts {
		grid-template-columns: minmax(0, 1fr);
	}
	.facts > div {
		gap: 2px;
		padding: 11px 0 12px;
	}
	.status {
		padding: 16px 18px;
	}
	.demo-banner {
		padding: 14px 16px;
	}
	.relationship {
		padding: 18px 18px 20px;
	}
	.ft-report {
		font-size: 15px;
	}
}
@media (max-width: 560px) {
	.ft-nav {
		grid-template-columns: 1fr 1fr;
		gap: 28px 20px;
	}
	.ft-group:last-child {
		grid-column: 1 / -1;
	}
	.ft-group:last-child ul {
		grid-template-columns: 1fr 1fr;
		column-gap: 20px;
	}
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
	.beam span {
		animation: beam-in 1.1s var(--ease-inout) 0.15s both;
	}
	.menu:popover-open .menu-nav li {
		animation: menu-in 0.6s var(--ease-out) both;
	}
	.menu-nav li:nth-child(2) {
		animation-delay: 0.04s;
	}
	.menu-nav li:nth-child(3) {
		animation-delay: 0.08s;
	}
	.menu-nav li:nth-child(4) {
		animation-delay: 0.12s;
	}
	.menu-nav li:nth-child(5) {
		animation-delay: 0.16s;
	}
}
@keyframes beam-in {
	from {
		transform: scaleX(0);
	}
	to {
		transform: scaleX(1);
	}
}
@keyframes menu-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
	}
}

/* ---------- print: paper and paper ink (brand kit §5), no chrome ---------- */
@media print {
	:root {
		--bg: #fff;
		--raised: #fff;
		--raised-2: #f2f2f5;
		--hair: #d6d5dd;
		--hair-2: #c9c8d1;
		--line-dim: #c9c8d1;
		--ink: #08080b;
		--ink-2: #4a4955;
		--ink-3: #5d5c68;
		--cool: #08080b;
		--caution: #9a5b00;
		--danger: #b42318;
		--pass: #1e7a4a;
		color-scheme: light;
	}
	.hdr {
		position: static;
		background: none;
		backdrop-filter: none;
	}
	.hdr-nav,
	.hdr-actions,
	.menu,
	.skip,
	.beam,
	.pdf-check,
	#check-h,
	.ft-nav,
	.ft-legal {
		display: none !important;
	}
	.rp-sec:has(#check-h) {
		display: none;
	}
	.rp-side {
		position: static;
	}
	.rp-sec,
	.one-grid,
	.one-rows tr,
	.status,
	.relationship,
	.console {
		break-inside: avoid;
	}
}
