/* Unit Checkup design system. Mobile-first, system fonts, WCAG 2.2 AA. Owner: web-foundation.
   Tokens first; components follow in the same order as src/web/components. No inline styles anywhere (CSP). */

:root {
	color-scheme: light;

	--teal-50: #f0fdfa;
	--teal-100: #ccfbf1;
	--teal-200: #99f6e4;
	--teal-700: #0f766e;
	--teal-800: #115e59;
	--teal-900: #134e4a;

	--ink: #0f172a;
	--ink-2: #334155;
	--muted: #475569;
	--line: #64748b;
	--rule: #dbe3e1;
	--rule-strong: #b6c3c0;
	--wash: #f2f6f5;
	--surface: #ffffff;
	--focus: #0f172a;

	--sev-lt: #b91c1c;
	--sev-severe: #c2410c;
	--sev-moderate-bg: #fde68a;
	--sev-moderate-fg: #713f12;
	--sev-moderate-rail: #d97706;
	--sev-low-bg: #e2e8f0;
	--sev-low-fg: #334155;
	--sev-low-rail: #94a3b8;

	--font:
		system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans",
		Arial, sans-serif;
	--font-mono:
		ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

	--fs-xs: 0.8125rem;
	--fs-sm: 0.9375rem;
	--fs-md: 1.0625rem;
	--fs-lg: 1.25rem;
	--fs-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.625rem);
	--fs-2xl: clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem);
	--fs-3xl: clamp(2rem, 1.45rem + 2.5vw, 3.125rem);

	--sp-1: 0.25rem;
	--sp-2: 0.5rem;
	--sp-3: 0.75rem;
	--sp-4: 1rem;
	--sp-5: 1.5rem;
	--sp-6: 2rem;
	--sp-7: 3rem;

	--radius-control: 6px;
	--radius-card: 10px;
	--radius-tag: 4px;
	--max: 72rem;
	--narrow: 46rem;
	--gutter: 1rem;
}

@media (min-width: 48rem) {
	:root {
		--gutter: 1.5rem;
	}
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--sp-4);
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	color: var(--ink-2);
	font: 400 var(--fs-md) / 1.6 var(--font);
	-webkit-font-smoothing: antialiased;
}

main {
	flex: 1 0 auto;
}

main:focus {
	outline: none;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 var(--sp-3);
	color: var(--ink);
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-3xl);
	line-height: 1.08;
	letter-spacing: -0.022em;
}

h2 {
	font-size: var(--fs-2xl);
	letter-spacing: -0.015em;
}

h3 {
	font-size: var(--fs-xl);
	letter-spacing: -0.01em;
}

h4 {
	font-size: var(--fs-lg);
}

p,
ul,
ol,
dl,
blockquote,
figure {
	margin: 0 0 var(--sp-4);
}

p {
	text-wrap: pretty;
}

a {
	color: var(--teal-800);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

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

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

img,
video {
	display: block;
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: var(--sp-6) 0;
}

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

strong {
	color: var(--ink);
	font-weight: 650;
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

::selection {
	background: var(--teal-100);
	color: var(--ink);
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

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

.muted {
	color: var(--muted);
}

.text-sm {
	font-size: var(--fs-sm);
}

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

.text-xl,
.text-2xl,
.text-3xl {
	color: var(--ink);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

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

.text-2xl {
	font-size: var(--fs-2xl);
}

.text-3xl {
	font-size: var(--fs-3xl);
}

.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

/* ---------- Layout ---------- */

.container {
	width: min(100% - 2 * var(--gutter), var(--max));
	margin-inline: auto;
}

.container--narrow {
	width: min(100% - 2 * var(--gutter), var(--narrow));
}

.section {
	padding-block: clamp(2rem, 5vw, 4rem);
}

.section--wash {
	background: var(--wash);
	border-block: 1px solid var(--rule);
}

.is-app .section:first-child {
	padding-top: var(--sp-5);
}

.cluster {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sp-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.grid {
	display: grid;
	gap: var(--sp-4);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
}

.split {
	display: grid;
	gap: var(--sp-6);
}

@media (min-width: 56rem) {
	.split {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

/* ---------- Skip link, header, navigation ---------- */

.skip-link {
	position: absolute;
	left: var(--sp-3);
	top: -5rem;
	z-index: 100;
	padding: var(--sp-3) var(--sp-4);
	background: var(--ink);
	color: #fff;
	font-weight: 650;
	border-radius: var(--radius-control);
	text-decoration: none;
}

.skip-link:focus {
	top: var(--sp-3);
	color: #fff;
}

.site-header {
	position: relative;
	z-index: 20;
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
}

.site-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	min-height: 4rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}

.brand__logo {
	height: 2rem;
	width: auto;
}

.nav--desktop {
	display: none;
}

.nav__list {
	display: flex;
	align-items: center;
	gap: var(--sp-1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--sp-2) var(--sp-3);
	border-radius: var(--radius-control);
	color: var(--ink-2);
	font-weight: 550;
	text-decoration: none;
}

.nav__link:hover {
	background: var(--wash);
	color: var(--ink);
}

.nav__link[aria-current="page"] {
	color: var(--teal-800);
	box-shadow: inset 0 -3px 0 var(--teal-700);
	border-radius: var(--radius-control) var(--radius-control) 0 0;
}

.nav__cta {
	margin-inline: var(--sp-2);
}

.nav__account {
	margin-left: var(--sp-2);
	padding-left: var(--sp-3);
	border-left: 1px solid var(--rule);
}

.nav-mobile {
	display: flex;
	align-items: center;
	gap: var(--sp-2);
}

.nav-mobile__toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	min-height: 44px;
	padding: var(--sp-2) var(--sp-3);
	border: 1.5px solid var(--rule-strong);
	border-radius: var(--radius-control);
	color: var(--ink);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.nav-mobile__toggle::-webkit-details-marker {
	display: none;
}

.nav-mobile .btn {
	white-space: nowrap;
}

.nav-mobile__close,
.nav-mobile__menu[open] .nav-mobile__open {
	display: none;
}

/* Small phones: shorter logo, icon-only menu toggle (the label stays for screen readers). */
@media (max-width: 29.99rem) {
	.brand__logo {
		height: 1.75rem;
	}

	.nav-mobile__toggle {
		padding-inline: 0.625rem;
	}

	.nav-mobile__label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

.nav-mobile__menu[open] .nav-mobile__close {
	display: block;
}

.nav-mobile__panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	padding: var(--sp-2) var(--gutter) var(--sp-4);
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
	box-shadow: 0 12px 24px -16px rgb(15 23 42 / 0.35);
}

.nav__list--mobile {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.nav__list--mobile .nav__link {
	width: 100%;
	padding-inline: var(--sp-2);
	border-bottom: 1px solid var(--rule);
	border-radius: 0;
}

.nav__list--mobile .nav__link[aria-current="page"] {
	box-shadow: inset 4px 0 0 var(--teal-700);
	padding-left: var(--sp-4);
}

.nav__list--mobile .nav__account {
	margin: 0;
	padding: 0;
	border: 0;
}

@media (min-width: 62rem) {
	.nav--desktop {
		display: block;
	}

	.nav-mobile {
		display: none;
	}
}

/* ---------- Footer ---------- */

.site-footer {
	margin-top: var(--sp-7);
	padding-block: var(--sp-6) var(--sp-5);
	background: var(--wash);
	border-top: 1px solid var(--rule);
	font-size: var(--fs-sm);
}

.site-footer__grid {
	display: grid;
	gap: var(--sp-5) var(--sp-6);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}

.site-footer__about {
	grid-column: 1 / -1;
	max-width: 34rem;
}

@media (min-width: 62rem) {
	.site-footer__grid {
		grid-template-columns: 1.6fr repeat(3, 1fr);
	}

	.site-footer__about {
		grid-column: auto;
	}
}

.site-footer__brand {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	margin-bottom: var(--sp-3);
	color: var(--ink);
	font-size: var(--fs-lg);
	font-weight: 700;
	text-decoration: none;
}

.site-footer__heading {
	margin-bottom: var(--sp-2);
	font-size: var(--fs-sm);
	letter-spacing: 0;
}

.site-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__list a {
	display: inline-block;
	padding-block: 0.3rem;
	color: var(--ink-2);
}

.site-footer__list a:hover {
	color: var(--teal-800);
}

.site-footer__disclaimer {
	margin: var(--sp-6) 0 var(--sp-2);
	padding-top: var(--sp-4);
	border-top: 1px solid var(--rule-strong);
	color: var(--muted);
	max-width: 70ch;
}

.site-footer__copy {
	margin: 0;
	color: var(--muted);
}

/* ---------- Page header, breadcrumbs ---------- */

.page-head {
	margin-bottom: var(--sp-5);
}

.page-head__title {
	max-width: 22ch;
}

.page-head__lead {
	max-width: 60ch;
	font-size: var(--fs-lg);
	line-height: 1.5;
	color: var(--ink-2);
}

.page-head__actions {
	margin-top: var(--sp-5);
}

.breadcrumbs {
	margin-bottom: var(--sp-4);
	font-size: var(--fs-sm);
}

.breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-1);
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--muted);
}

.breadcrumbs__item + .breadcrumbs__item::before {
	content: "/";
	margin-right: var(--sp-1);
	color: var(--rule-strong);
}

.breadcrumbs [aria-current="page"] {
	color: var(--ink-2);
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);
	min-height: 2.75rem;
	padding: 0.625rem 1.125rem;
	border: 1.5px solid transparent;
	border-radius: var(--radius-control);
	font: inherit;
	font-weight: 650;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 0.12s ease,
		border-color 0.12s ease,
		color 0.12s ease;
}

.btn:hover {
	text-decoration: none;
}

.btn--primary {
	background: var(--teal-700);
	color: #fff;
}

.btn--primary:hover {
	background: var(--teal-800);
	color: #fff;
}

.btn--secondary {
	background: var(--surface);
	border-color: var(--teal-700);
	color: var(--teal-800);
}

.btn--secondary:hover {
	background: var(--teal-50);
	color: var(--teal-900);
}

.btn--ghost {
	background: transparent;
	color: var(--ink-2);
	border-color: var(--rule-strong);
}

.btn--ghost:hover {
	background: var(--wash);
	color: var(--ink);
}

.btn--danger {
	background: var(--sev-lt);
	color: #fff;
}

.btn--danger:hover {
	background: #991b1b;
	color: #fff;
}

.btn--sm {
	min-height: 2.25rem;
	padding: 0.375rem 0.75rem;
	font-size: var(--fs-sm);
}

.btn--lg {
	min-height: 3.25rem;
	padding: 0.8125rem 1.5rem;
	font-size: var(--fs-lg);
}

.btn--block {
	display: flex;
	width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ---------- Cards, badges ---------- */

.card {
	padding: var(--sp-5);
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius-card);
}

.card > :last-child {
	margin-bottom: 0;
}

.card__title {
	font-size: var(--fs-lg);
	letter-spacing: 0;
}

.badge,
.sev {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.3125rem 0.5rem;
	border: 1px solid transparent;
	border-radius: var(--radius-tag);
	font-size: var(--fs-xs);
	font-weight: 650;
	line-height: 1.1;
	white-space: nowrap;
}

.badge--neutral {
	background: #f1f5f9;
	border-color: #e2e8f0;
	color: var(--ink-2);
}

.badge--teal {
	background: var(--teal-100);
	border-color: var(--teal-200);
	color: var(--teal-900);
}

.badge--info {
	background: #dbeafe;
	border-color: #bfdbfe;
	color: #1e3a8a;
}

.badge--success {
	background: #dcfce7;
	border-color: #bbf7d0;
	color: #14532d;
}

.badge--warning {
	background: #fef3c7;
	border-color: #fde68a;
	color: #78350f;
}

.badge--danger {
	background: #fee2e2;
	border-color: #fecaca;
	color: #7f1d1d;
}

.sev--lt {
	background: var(--sev-lt);
	color: #fff;
}

.sev--severe {
	background: var(--sev-severe);
	color: #fff;
}

.sev--moderate {
	background: var(--sev-moderate-bg);
	border-color: var(--sev-moderate-rail);
	color: var(--sev-moderate-fg);
}

.sev--low {
	background: var(--sev-low-bg);
	border-color: #cbd5e1;
	color: var(--sev-low-fg);
}

/* ---------- Alerts ---------- */

.alert {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--sp-3);
	padding: var(--sp-4);
	border: 1px solid;
	border-left-width: 4px;
	border-radius: 8px;
}

.alert__icon {
	margin-top: 0.15rem;
}

.alert__body > :last-child {
	margin-bottom: 0;
}

.alert__title {
	margin-bottom: var(--sp-1);
	font-weight: 700;
}

.alert--info {
	background: #eff6ff;
	border-color: #bfdbfe;
	border-left-color: #1d4ed8;
	color: #1e3a8a;
}

.alert--success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	border-left-color: #15803d;
	color: #14532d;
}

.alert--warning {
	background: #fffbeb;
	border-color: #fde68a;
	border-left-color: #b45309;
	color: #78350f;
}

.alert--danger {
	background: #fef2f2;
	border-color: #fecaca;
	border-left-color: var(--sev-lt);
	color: #7f1d1d;
}

.alert strong,
.alert .alert__title {
	color: inherit;
}

.alert a {
	color: inherit;
}

/* ---------- Forms ---------- */

.form {
	max-width: 36rem;
}

.field {
	display: grid;
	gap: 0.375rem;
	min-width: 0;
}

.field__label {
	color: var(--ink);
	font-weight: 650;
}

.field__flag {
	color: var(--muted);
	font-weight: 400;
}

.field__hint {
	margin: 0;
	color: var(--muted);
	font-size: var(--fs-sm);
}

.field__error {
	display: flex;
	gap: var(--sp-2);
	align-items: flex-start;
	margin: 0;
	color: var(--sev-lt);
	font-weight: 600;
	font-size: var(--fs-sm);
}

.field__error .icon {
	margin-top: 0.1rem;
}

.input,
.select,
.textarea {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.5625rem 0.75rem;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: var(--radius-control);
	color: var(--ink);
	font: inherit;
	line-height: 1.4;
}

.select {
	padding-right: 2.25rem;
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
		linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
	background-position:
		right 1.05rem center,
		right 0.75rem center;
	background-size: 0.3rem 0.3rem;
	background-repeat: no-repeat;
}

.textarea {
	resize: vertical;
}

.input--xs {
	max-width: 7rem;
}

.input--sm {
	max-width: 14rem;
}

.input--md {
	max-width: 22rem;
}

.input--file {
	padding: 0.5rem;
	cursor: pointer;
}

.input--file::file-selector-button {
	margin-right: var(--sp-3);
	padding: 0.4rem 0.8rem;
	background: var(--teal-50);
	border: 1.5px solid var(--teal-700);
	border-radius: var(--radius-control);
	color: var(--teal-800);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

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

/* Chrome's calendar button inside a date field takes focus without the field matching :focus-visible (e2e F3). */
.input[type="date"]:focus-within {
	border-color: var(--teal-700);
}

.input::placeholder,
.textarea::placeholder {
	color: #64748b;
}

[aria-invalid="true"] {
	border-color: var(--sev-lt);
}

.field--error > .input,
.field--error > .select,
.field--error > .textarea {
	border-left-width: 4px;
}

.fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	display: grid;
	gap: 0.375rem;
	min-width: 0;
}

.fieldset > legend {
	padding: 0;
	margin-bottom: 0.375rem;
}

.radios {
	display: grid;
	gap: var(--sp-2);
	margin-top: var(--sp-1);
}

.radios--inline {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), max-content));
	column-gap: var(--sp-5);
}

/* Checkboxes and radios are 24 x 24 CSS px: the WCAG 2.2 target-size minimum (2.5.8) without relying on spacing. */
.check {
	display: grid;
	grid-template-columns: 1.5rem 1fr;
	gap: var(--sp-3);
	align-items: start;
}

.check__input {
	width: 1.5rem;
	height: 1.5rem;
	margin: 0;
	accent-color: var(--teal-700);
	cursor: pointer;
}

.check__text {
	display: grid;
	gap: 0.25rem;
}

.check__label {
	color: var(--ink);
	cursor: pointer;
}

.turnstile {
	min-height: 65px;
}

/* ---------- Stepper, progress ---------- */

.stepper {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.stepper__item {
	position: relative;
	display: grid;
	grid-template-columns: 2rem 1fr;
	gap: var(--sp-3);
	padding-bottom: var(--sp-4);
}

.stepper__item:not(:last-child)::after {
	content: "";
	position: absolute;
	left: calc(1rem - 1px);
	top: 2.25rem;
	bottom: 0.25rem;
	width: 2px;
	background: var(--rule);
}

.stepper__item--done:not(:last-child)::after {
	background: var(--teal-700);
}

.stepper__marker {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border: 2px solid var(--rule-strong);
	border-radius: 50%;
	background: var(--surface);
	color: var(--muted);
	font-size: var(--fs-sm);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.stepper__marker .icon {
	width: 1rem;
	height: 1rem;
}

.stepper__item--done .stepper__marker {
	background: var(--teal-700);
	border-color: var(--teal-700);
	color: #fff;
}

.stepper__item--current .stepper__marker {
	border-color: var(--teal-700);
	color: var(--teal-800);
	box-shadow: 0 0 0 4px var(--teal-100);
}

.stepper__text {
	display: grid;
	align-content: center;
	min-height: 2rem;
}

.stepper__label,
.stepper__text > a {
	font-weight: 600;
	color: var(--ink);
}

.stepper__item--todo .stepper__label {
	color: var(--muted);
	font-weight: 500;
}

.stepper__detail {
	color: var(--muted);
	font-size: var(--fs-sm);
}

@media (min-width: 48rem) {
	.stepper--inline {
		display: flex;
		gap: var(--sp-3);
	}

	.stepper--inline .stepper__item {
		flex: 1;
		grid-template-columns: 2rem 1fr;
		padding-bottom: 0;
	}

	.stepper--inline .stepper__item:not(:last-child)::after {
		display: none;
	}
}

.progress {
	display: grid;
	gap: var(--sp-2);
}

.progress__top {
	display: flex;
	justify-content: space-between;
	gap: var(--sp-3);
}

.progress__label {
	color: var(--ink);
	font-weight: 600;
}

.progress__value {
	color: var(--ink-2);
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.progress__bar {
	width: 100%;
	height: 0.75rem;
	appearance: none;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--wash);
	overflow: hidden;
	color: var(--teal-700);
}

.progress__bar::-webkit-progress-bar {
	background: var(--wash);
}

.progress__bar::-webkit-progress-value {
	background: var(--teal-700);
	transition: width 0.2s ease;
}

.progress__bar::-moz-progress-bar {
	background: var(--teal-700);
}

/* ---------- Finding card: a work-order slip ---------- */

.findings {
	display: grid;
	gap: var(--sp-4);
	max-width: 60rem;
}

.finding {
	--rail: var(--sev-low-rail);
	position: relative;
	padding: var(--sp-4) var(--sp-4) var(--sp-4) calc(var(--sp-4) + 6px);
	background: var(--surface);
	border: 1px solid var(--rule-strong);
	border-radius: 8px;
	overflow: hidden;
}

.finding::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 6px;
	background: var(--rail);
}

.finding--lt {
	--rail: var(--sev-lt);
}

.finding--severe {
	--rail: var(--sev-severe);
}

.finding--moderate {
	--rail: var(--sev-moderate-rail);
}

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

.finding__standard {
	color: var(--muted);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.finding__status {
	margin-left: auto;
}

.finding__title {
	margin: var(--sp-3) 0 var(--sp-3);
	font-size: var(--fs-lg);
	letter-spacing: 0;
	line-height: 1.3;
}

.finding__facts {
	margin: 0;
	border-top: 1px dashed var(--rule-strong);
}

.finding__row {
	display: grid;
	gap: 0.125rem;
	padding-block: var(--sp-2);
	border-bottom: 1px dashed var(--rule-strong);
}

.finding__row dt {
	color: var(--muted);
	font-size: var(--fs-xs);
	font-weight: 700;
}

.finding__row dd {
	margin: 0;
	color: var(--ink-2);
}

@media (min-width: 40rem) {
	.finding {
		padding: var(--sp-5) var(--sp-5) var(--sp-5) calc(var(--sp-5) + 6px);
	}

	.finding__row {
		grid-template-columns: 8.5rem 1fr;
		gap: var(--sp-4);
	}

	.finding__row dt {
		padding-top: 0.2rem;
	}
}

.watch {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	min-height: 2rem;
	font-weight: 650;
}

.cost-band {
	display: inline-block;
	min-width: 2.25rem;
	padding: 0 0.3rem;
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-tag);
	color: var(--ink);
	font-weight: 700;
	text-align: center;
	letter-spacing: 0.05em;
}

.finding__verify {
	display: flex;
	gap: var(--sp-2);
	margin: var(--sp-4) 0 0;
	padding: var(--sp-3);
	background: #fffbeb;
	border: 1px dashed #b45309;
	border-radius: var(--radius-control);
	color: #78350f;
	font-size: var(--fs-sm);
}

.finding__verify strong {
	color: inherit;
}

.finding__verify .icon {
	margin-top: 0.1rem;
}

.finding__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
	margin-top: var(--sp-4);
}

/* ---------- FAQ ---------- */

.faq {
	border-top: 1px solid var(--rule);
}

.faq__item {
	border-bottom: 1px solid var(--rule);
}

.faq__q {
	display: flex;
	justify-content: space-between;
	gap: var(--sp-4);
	padding: var(--sp-4) 0;
	color: var(--ink);
	font-weight: 650;
	cursor: pointer;
	list-style: none;
}

.faq__q::-webkit-details-marker {
	display: none;
}

.faq__q::after {
	content: "+";
	flex: none;
	width: 1.5rem;
	color: var(--teal-700);
	font-size: 1.375rem;
	font-weight: 500;
	line-height: 1;
	text-align: center;
}

.faq__item[open] > .faq__q::after {
	content: "\2212";
}

.faq__a {
	padding-bottom: var(--sp-4);
}

/* ---------- Prose ---------- */

.prose {
	max-width: 68ch;
	color: var(--ink-2);
}

@media (min-width: 48rem) {
	.prose {
		font-size: 1.125rem;
		line-height: 1.65;
	}
}

.prose > :first-child {
	margin-top: 0;
}

.prose > :last-child {
	margin-bottom: 0;
}

.prose h2 {
	margin-top: 2.25em;
	font-size: var(--fs-xl);
}

.prose h3 {
	margin-top: 1.75em;
	font-size: var(--fs-lg);
}

.prose h4 {
	margin-top: 1.5em;
	font-size: 1em;
}

.prose ul,
.prose ol {
	padding-left: 1.35em;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose li::marker {
	color: var(--teal-700);
}

.prose blockquote {
	margin-inline: 0;
	padding-left: var(--sp-4);
	border-left: 3px solid var(--rule-strong);
	color: var(--ink-2);
}

.prose .summary {
	padding: var(--sp-4) var(--sp-5);
	background: var(--teal-50);
	border-left: 4px solid var(--teal-700);
	border-radius: 0 8px 8px 0;
	color: var(--ink);
	font-size: 1.125em;
	line-height: 1.55;
}

.prose figure img {
	border-radius: 8px;
	border: 1px solid var(--rule);
}

.prose figcaption {
	margin-top: var(--sp-2);
	color: var(--muted);
	font-size: var(--fs-sm);
}

.prose table {
	width: 100%;
	margin-bottom: var(--sp-5);
	border-collapse: collapse;
	font-size: var(--fs-sm);
}

.prose th,
.prose td {
	padding: var(--sp-2) var(--sp-3);
	border-bottom: 1px solid var(--rule);
	text-align: left;
	vertical-align: top;
}

.prose th {
	color: var(--ink);
	background: var(--wash);
}

.prose .sources {
	font-size: var(--fs-sm);
}

.prose .sources li {
	overflow-wrap: anywhere;
}

/* ---------- Tables ---------- */

.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--rule);
	border-radius: 8px;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-sm);
}

.table caption {
	padding: var(--sp-3) var(--sp-4);
	color: var(--ink);
	font-weight: 650;
	text-align: left;
	border-bottom: 1px solid var(--rule);
}

.table th,
.table td {
	padding: var(--sp-3) var(--sp-4);
	border-bottom: 1px solid var(--rule);
	text-align: left;
	vertical-align: top;
}

.table thead th {
	background: var(--wash);
	color: var(--ink);
	font-weight: 650;
	white-space: nowrap;
}

.table tbody tr:last-child > * {
	border-bottom: 0;
}

.table .num {
	text-align: right;
}

/* ---------- Empty state, disclaimer, errors ---------- */

.empty {
	display: grid;
	justify-items: center;
	gap: var(--sp-2);
	padding: var(--sp-6) var(--sp-5);
	border: 1.5px dashed var(--rule-strong);
	border-radius: var(--radius-card);
	text-align: center;
}

.empty__icon {
	width: 2.5rem;
	height: 2.5rem;
	color: var(--teal-700);
}

.empty__title {
	margin: 0;
	font-size: var(--fs-xl);
}

.empty__body {
	max-width: 42ch;
	color: var(--muted);
}

.empty__body > :last-child {
	margin-bottom: 0;
}

.empty__action {
	margin-top: var(--sp-2);
}

.disclaimer {
	padding-top: var(--sp-3);
	border-top: 1px solid var(--rule);
	color: var(--muted);
	font-size: var(--fs-sm);
	max-width: 75ch;
}

.disclaimer > :last-child {
	margin-bottom: 0;
}

.disclaimer--long {
	padding: var(--sp-4);
	background: var(--wash);
	border: 1px solid var(--rule);
	border-radius: 8px;
	color: var(--ink-2);
}

.disclaimer__ai {
	color: var(--ink);
	font-weight: 600;
}

.error-page {
	padding-block: var(--sp-7);
}

.error-page__links li + li {
	margin-top: var(--sp-2);
}

/* ---------- Style guide (noindex page) ---------- */

.sg-section + .sg-section {
	border-top: 1px solid var(--rule);
}

.sg-toc a {
	font-size: var(--fs-sm);
}

.swatches {
	display: grid;
	gap: var(--sp-3);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.swatch {
	display: grid;
	gap: 0.125rem;
	font-size: var(--fs-sm);
}

.swatch__chip {
	height: 3rem;
	margin-bottom: var(--sp-1);
	border: 1px solid var(--rule-strong);
	border-radius: var(--radius-control);
}

.swatch__name {
	color: var(--ink);
	font-weight: 650;
}

.swatch__token {
	color: var(--muted);
	font-size: var(--fs-xs);
}

.swatch--teal-700 {
	background: var(--teal-700);
}
.swatch--teal-800 {
	background: var(--teal-800);
}
.swatch--teal-50 {
	background: var(--teal-50);
}
.swatch--ink {
	background: var(--ink);
}
.swatch--ink-2 {
	background: var(--ink-2);
}
.swatch--muted {
	background: var(--muted);
}
.swatch--rule {
	background: var(--rule);
}
.swatch--wash {
	background: var(--wash);
}
.swatch--sev-lt {
	background: var(--sev-lt);
}
.swatch--sev-severe {
	background: var(--sev-severe);
}
.swatch--sev-moderate {
	background: var(--sev-moderate-bg);
}
.swatch--sev-low {
	background: var(--sev-low-bg);
}

/* ---------- Flow spacing ----------
   Defined after every component on purpose: a component's own margin reset (same specificity) must not cancel
   the gap a .stack puts between its children. */

.stack > * {
	margin-block: 0;
}

.stack > * + * {
	margin-top: var(--sp-5);
}

.stack--sm > * + * {
	margin-top: var(--sp-3);
}

.stack--lg > * + * {
	margin-top: var(--sp-6);
}

/* ---------- Motion ---------- */

@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;
	}
}

/* ---------- Print (reports and checklists) ---------- */

@media print {
	@page {
		margin: 16mm 14mm;
	}

	body {
		display: block;
		background: #fff;
		color: #000;
		font-size: 10.5pt;
		line-height: 1.45;
	}

	.skip-link,
	.nav--desktop,
	.nav-mobile,
	.site-footer__grid,
	.btn,
	.finding__actions,
	.breadcrumbs,
	.no-print {
		display: none !important;
	}

	.site-header {
		border-bottom: 1px solid #000;
	}

	.site-footer {
		margin-top: 12pt;
		padding: 6pt 0 0;
		background: none;
		border-top: 1px solid #000;
	}

	.section,
	.section--wash {
		padding-block: 8pt;
		background: none;
		border: 0;
	}

	.container,
	.container--narrow {
		width: 100%;
	}

	h1,
	h2,
	h3 {
		break-after: avoid;
	}

	.finding,
	.card,
	.alert,
	.table tr {
		break-inside: avoid;
	}

	.finding,
	.finding::before,
	.sev,
	.badge {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.prose a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		color: #333;
		overflow-wrap: anywhere;
	}

	.print-only {
		display: block !important;
	}
}

.print-only {
	display: none;
}
