/*
 * Design tokens (docs/ux/design-system.md). The single source for colour, type, spacing and size.
 *
 * Styling approach: plain CSS custom properties plus one CSS module per component, not Tailwind.
 * Why: the design system is a small, fixed set of tokens with two densities (worker and admin) that
 * swap by one attribute (`data-density`), every component has a handful of named states, and the
 * contrast check (scripts/contrast.mts, tests/web/contrast.test.ts) parses this file directly. CSS
 * modules keep component styles next to the component, ship as static .css files (CSP style-src
 * 'self' holds), and add no build dependency. Feature screens use the components and the layout
 * helpers in base.css; they should not need their own colours or sizes (P32).
 *
 * Visual refresh (docs/specs/visual-refresh.md, docs/ux/decisions.md 15 October 2026): white chrome
 * separated by hairlines on a cool mist canvas, one accent (`action`) for the primary action, the
 * current nav item and links, and a colour per register on tinted icon tiles. Yellow is only the
 * warning status colour.
 *
 * Colours marked "darkened" differ from the design-system hypotheses so worker text meets 7:1;
 * docs/ux/contrast.md records every checked pair. Keep `--name: #RRGGBB;` on one line per colour:
 * the contrast script reads them.
 */
:root {
	/* Brand (the logo files keep the brand blue) */
	--brand-green: #48ac4d;

	/* Text and surfaces */
	--ink: #11231c;
	--ink-muted: #3d4f47;
	--ink-subtle: #5a6b63;
	--surface: #f4f6f5;
	--surface-raised: #ffffff;
	--surface-sunken: #eef1f0;
	--border: #7a8b83; /* darkened from #8A9A92 (2.95:1) to meet 3:1 on white and surface */
	--border-soft: #e2e7e5; /* decorative hairlines between regions and rows only */
	--white: #ffffff;

	/* Roles */
	--action: #0e5a8f;
	--action-pressed: #0a4570; /* hover, pressed, links on tinted surfaces, count chips */
	--accent-subtle: #e8f1f8; /* current tab pill, chosen rows, Before work chip, count chips */
	--success-text: #145a26; /* darkened from #1E7A34 for 7:1 on success-bg */
	--success-bg: #e3f5e7;
	--warning: #f2b705;
	--warning-text: #6e4800; /* darkened from #8A5A00 for 7:1 on warning-bg */
	--warning-bg: #fff4cc;
	--critical: #a1221b; /* darkened from #B3261E so white text on it meets 7:1 */
	--critical-pressed: #831a14;
	--critical-text: #951d17; /* critical words on critical-bg */
	--critical-bg: #fbe9e7;
	--info-bg: #e6f1f9;
	--consultant: #5b3fa8;

	/* Chrome: white header and tab bar, a faint accent tint on the desktop sidebar, hairlines */
	--chrome: #ffffff;
	--chrome-tint: #f3f7fb;
	--chrome-hover: #eef1f0;
	--chrome-line: #e2e7e5; /* decorative hairline under the header, beside the sidebar, above the tab bar */
	--onsite-strong: #2f7d38; /* on-site card border and tick badge, headcount bars, dots (3:1 non-text) */
	--on-onsite-strong: #ffffff; /* the tick on the solid green badge */
	--chart-track: #dce3e0;

	/* Register colours (direction B): text and icon colour, and the tile tint behind it */
	--reg-hazards: #7a4e00;
	--reg-hazards-bg: #fdf1d8;
	--reg-substances: #9c3d00;
	--reg-substances-bg: #ffe9d4;
	--reg-plant: #0a5f56;
	--reg-plant-bg: #ddf3ef;
	--reg-training: #0e5a8f;
	--reg-training-bg: #e3f0fa;
	--reg-health: #4f3699;
	--reg-health-bg: #ece7fa;
	--reg-contractors: #2f5a45;
	--reg-contractors-bg: #e1ede6;
	--reg-documents: #44515f;
	--reg-documents-bg: #e6eaef;
	--reg-totika: #11231c;
	--reg-totika-bg: #fdf1d8;

	/*
	 * Avatar colours (ui/Avatar): white initials on each at 7:1 or better. Cool tones only: no red, orange
	 * or amber, so an avatar never reads as a warning. The slot comes from the user id (domain/avatar).
	 */
	--avatar-0: #1b5791; /* blue */
	--avatar-1: #2b3f87; /* indigo */
	--avatar-2: #5b3fa8; /* violet */
	--avatar-3: #7a2e72; /* plum */
	--avatar-4: #075c6e; /* teal */
	--avatar-5: #125f48; /* jade */
	--avatar-6: #32611f; /* leaf */
	--avatar-7: #46566a; /* slate */
	--on-avatar: #ffffff;

	/* Risk bands (5x5): fill and text per band */
	--risk-low-bg: #e3f5e7;
	--risk-low-text: #145a26;
	--risk-medium-bg: #fff4cc;
	--risk-medium-text: #6e4800;
	--risk-high-bg: #f59e0b;
	--risk-high-text: #11231c;
	--risk-extreme-bg: #a1221b;
	--risk-extreme-text: #ffffff;

	/* Type */
	/* Inter for every role (titles and big numbers too); cv05 and cv08 keep I, l and 1 apart in glare. */
	--font-ui: "Inter", "Inter fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--font-features: "cv05" 1, "cv08" 1;

	/* Spacing (4 px base) */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 20px;
	--space-6: 24px;
	--space-8: 32px;
	--space-10: 40px;
	--space-12: 48px;
	--space-16: 64px;

	/* Radius and elevation (borders before shadows: shadows wash out in sun) */
	--radius-control: 8px;
	--radius-badge: 6px; /* status pills, nav counts, count chips */
	--radius-card: 12px;
	--radius-sheet: 16px;
	--radius-pill: 999px;
	--shadow-overlay: 0 12px 32px rgb(17 35 28 / 0.16);

	/* Layout */
	--worker-max: 560px;
	--content-max: 1440px;
	--sidebar-w: 256px;
	--tabbar-h: 64px;
	--header-h: 56px; /* rendered: 48 px targets, 4 px padding above and below; the hairline is a shadow below it */
	--screen-pad: 16px;

	/* Motion: quick and decelerating, never showy (reduced motion: base.css) */
	--motion-fast: 120ms;
	--motion: 180ms;
	--ease-out: cubic-bezier(0.2, 0.65, 0.25, 1);

	/* Focus: 2 px action ring with a 2 px white offset, on every focusable element */
	--focus-ring: 0 0 0 2px var(--white), 0 0 0 4px var(--action);
}

/*
 * Worker density (default): the phone scale of visual refresh phase 4 (Direction B, Mike, 16 October
 * 2026; visual-refresh.md 3.3): 16 px body and 14 px secondary text in Inter, large titles at 30 px,
 * 52 px controls and a 48 px floor for gloved hands (P11, P12). People who want larger text use the
 * phone's text size. Roll call and the site phone pin their own sizes.
 */
:root,
[data-density="worker"] {
	--primary: var(--action);
	--primary-pressed: var(--action-pressed);
	--text-display: 30px;
	--lh-display: 36px;
	--text-title-1: 24px;
	--lh-title-1: 30px;
	--text-title-2: 17px;
	--lh-title-2: 22px;
	--text-body-lg: 17px;
	--lh-body-lg: 24px;
	--text-body: 16px;
	--lh-body: 23px;
	--text-label: 15px;
	--lh-label: 21px;
	--text-button: 16px;
	--text-table: 16px;
	--text-meta: 14px;
	--lh-meta: 19px;
	--text-tab: 12px;
	--title-weight: 700;
	--title-tracking: -0.022em;
	--section-weight: 650;
	--row-tracking: -0.011em;
	--control-h: 52px;
	--button-h: 52px;
	--button-h-sm: 48px;
	--secondary-text: var(--ink-muted);
}

/*
 * Admin density: denser type and 44 px controls (also under a coarse pointer at any width). Drawn
 * controls go to 40 px only on a wide screen with a mouse.
 */
[data-density="admin"] {
	--primary: var(--action);
	--primary-pressed: var(--action-pressed);
	--text-display: 26px;
	--lh-display: 32px;
	--text-title-1: 22px;
	--lh-title-1: 28px;
	--text-title-2: 17px;
	--lh-title-2: 24px;
	--text-body-lg: 16px;
	--lh-body-lg: 24px;
	--text-body: 15px;
	--lh-body: 22px;
	--text-label: 14px;
	--lh-label: 20px;
	--text-button: 15px;
	--text-table: 14px;
	--text-meta: 13px;
	--lh-meta: 18px;
	--text-tab: 13px;
	--title-weight: 600;
	--title-tracking: -0.02em;
	--section-weight: 600;
	--row-tracking: -0.006em;
	--control-h: 44px;
	--button-h: 44px;
	--button-h-sm: 44px;
	--secondary-text: var(--ink-subtle);
}

@media (min-width: 1024px) and (pointer: fine) {
	[data-density="admin"] {
		--control-h: 40px;
		--button-h: 40px;
		--button-h-sm: 36px;
	}
}

@media (min-width: 600px) {
	:root {
		--screen-pad: 24px;
	}
}

@media (min-width: 1024px) {
	:root {
		--screen-pad: 32px;
	}
}

/*
 * Self-hosted fonts (docs/ux/design-system.md section 8; Inter chosen by Mike on 16 October 2026,
 * replacing Atkinson Hyperlegible Next and Poppins): Inter's text cut for all UI text, titles and big
 * numbers, with cv05 and cv08 on (tokens.css --font-features) so I, l and 1 stay apart in glare; one
 * variable file (weights 400 to 700) carrying Latin-1 and the ten NZ macron vowels, preloaded by
 * index.html. Atkinson Hyperlegible Mono for codes, loaded only on the screens that show one. Built by
 * scripts/build-web-fonts.sh. No Google Fonts requests. Licences: public/fonts/LICENSE.txt.
 */
@font-face {
	font-family: "Inter";
	src: url("/fonts/inter-text-latin.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Atkinson Hyperlegible Mono";
	src: url("/fonts/atkinson-mono-500-latin.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+2000-206F;
}

@font-face {
	font-family: "Atkinson Hyperlegible Mono";
	src: url("/fonts/atkinson-mono-500-latin-ext.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-017F;
}

@font-face {
	font-family: "Atkinson Hyperlegible Mono";
	src: url("/fonts/atkinson-mono-700-latin.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+2000-206F;
}

@font-face {
	font-family: "Atkinson Hyperlegible Mono";
	src: url("/fonts/atkinson-mono-700-latin-ext.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-017F;
}

/*
 * A metric-matched fallback for the moment before Inter arrives (no signal, a cold cache): Arial or
 * Roboto scaled to Inter's width and line metrics, so swapping in Inter does not move the layout.
 * Values from Inter 4's metrics (ascender 0.969, descender 0.242 of the em) against Arial's.
 */
@font-face {
	font-family: "Inter fallback";
	src: local("Arial"), local("Roboto"), local("Helvetica Neue");
	ascent-override: 90.44%;
	descent-override: 22.52%;
	line-gap-override: 0%;
	size-adjust: 107.12%;
}

/*
 * Website styles (docs/specs/public-site-relaunch.md, the approved mock-up direction A). site/build.ts puts
 * the app's src/web/styles/tokens.css and fonts.css in front of this file, so colours and the Inter font
 * come from the app and its visual refresh restyles the site. The few site-only colours (the dark band and
 * the softer hairlines of the frames) are defined here. One dark band, framed product screenshots, fluid
 * spacing; no shadows on the logo, no tape or hi-vis.
 */
:root {
	color-scheme: light;
	--ink-2: var(--ink-muted);
	--ink-3: var(--ink-subtle);
	--mist: var(--surface);
	--paper: var(--white);
	--line: var(--border-soft);
	--line-2: #c9d3cf;
	--action-2: var(--action-pressed);
	--tint: var(--accent-subtle);
	--tint-2: #d6e6f2;
	--green: var(--brand-green);
	--green-strong: var(--onsite-strong);
	--frame: #e1e8e5;
	--on-dark: #e6eeea;
	--on-dark-2: #bccdc5;
	--on-dark-3: #93aa9f;
	--dark-line: rgba(188, 205, 197, 0.18);
	--link-on-dark: #94cdf2;

	--wrap: 1200px;
	--gutter: clamp(16px, 5vw, 48px);
	--section: clamp(64px, 9vw, 128px);
	--masthead: 64px;
	--ease: cubic-bezier(0.2, 0.65, 0.25, 1);
}

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

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--masthead) + 16px);
}

body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-ui);
	font-feature-settings: var(--font-features);
	font-size: 1.0625rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

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

h1,
h2,
h3 {
	text-wrap: balance;
}

p,
li,
dd,
td {
	text-wrap: pretty;
}

a {
	color: var(--action);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

a:hover {
	color: var(--action-2);
}

:focus-visible {
	outline: 2px solid var(--action);
	outline-offset: 2px;
	border-radius: 6px;
}

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

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

.skip {
	position: absolute;
	left: 12px;
	top: -80px;
	z-index: 50;
	padding: 12px 16px;
	background: var(--ink);
	color: var(--paper);
	border-radius: 8px;
}

.skip:focus {
	top: 12px;
}

.staging-banner {
	padding: 8px var(--gutter);
	background: var(--warning-bg);
	color: var(--warning-text);
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
}

/* ---- buttons ------------------------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 12px 24px;
	border: 0;
	border-radius: 10px;
	background: var(--action);
	color: var(--paper);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 120ms var(--ease);
}

.btn:hover {
	background: var(--action-2);
	color: var(--paper);
}

.btn-lg {
	min-height: 56px;
	padding-inline: 28px;
	font-size: 1.06rem;
}

.btn-sm {
	min-height: 44px;
	padding: 8px 16px;
	font-size: 0.94rem;
	white-space: nowrap;
}

.btn-block {
	width: 100%;
}

.label-long {
	display: none;
}

.text-link {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	font-weight: 600;
	text-decoration: underline;
}

.link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 24px;
}

.invite-email {
	display: inline-block;
	color: var(--ink-2);
}

/* ---- masthead: static with a second row of links on phones, sticky from 960 px ------------------ */

.masthead {
	position: relative;
	z-index: 30;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 1px 0 var(--line);
}

.masthead-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 16px;
	min-height: var(--masthead);
}

.lockup {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
}

.lockup img {
	width: 150px;
	height: auto;
}

.masthead-nav {
	order: 3;
	width: 100%;
	margin-inline: -10px;
	padding-bottom: 6px;
	font-size: 0.95rem;
}

.masthead-nav ul {
	padding: 0;
	list-style: none;
}

.masthead-nav > ul {
	display: flex;
	gap: 2px;
}

.masthead-nav a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 10px;
	color: var(--ink-2);
	font-weight: 500;
	text-decoration: none;
	border-radius: 8px;
}

.masthead-nav a:hover,
.masthead-nav a[aria-current] {
	color: var(--ink);
	background: var(--mist);
}

/* The menus (site/nav.ts) only from 960 px: below it each top link goes to its hub. */
.nav-menu {
	display: none;
}

.masthead-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 4px;
}

.masthead-login {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding-inline: 10px;
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.masthead-login:hover {
	color: var(--action);
}

@media (max-width: 380px) {
	.lockup img {
		width: 124px;
	}

	.masthead .btn-sm {
		padding-inline: 12px;
	}

	.masthead-nav > ul > li > a {
		padding-inline: 8px;
	}
}

@media (min-width: 960px) {
	.masthead {
		position: sticky;
		top: 0;
		-webkit-backdrop-filter: saturate(1.3) blur(10px);
		backdrop-filter: saturate(1.3) blur(10px);
	}

	.masthead-inner {
		flex-wrap: nowrap;
		height: var(--masthead);
		column-gap: 24px;
	}

	.masthead-nav {
		order: 0;
		align-self: stretch;
		width: auto;
		margin: 0 0 0 8px;
		padding: 0;
	}

	/* Each top item is as tall as the header, so its menu starts at the header's edge with no gap to cross. */
	.masthead-nav > ul,
	.masthead-nav > ul > li {
		display: flex;
		align-items: center;
		height: 100%;
	}

	.nav-item {
		position: relative;
	}

	.nav-item > a::after {
		content: "";
		width: 6px;
		height: 6px;
		margin: -3px 0 0 8px;
		border: solid currentColor;
		border-width: 0 1.5px 1.5px 0;
		transform: rotate(45deg);
		opacity: 0.7;
	}

	/* Open on hover and on keyboard focus without JavaScript; site/page.js adds .is-open (a tap) and .is-shut (Escape). */
	.nav-menu {
		display: block;
		position: absolute;
		top: calc(100% + 4px);
		left: 0;
		min-width: 240px;
		padding: 6px;
		background: var(--paper);
		border: 1px solid var(--line);
		border-radius: var(--radius-card);
		box-shadow: var(--shadow-overlay);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-4px);
	}

	/* Bridges the 4 px between the header and the menu, so the pointer never leaves the item on the way down. */
	.nav-menu::before {
		content: "";
		position: absolute;
		inset: -5px 0 auto;
		height: 5px;
	}

	.nav-item:is(:hover, :focus-within, .is-open):not(.is-shut) > .nav-menu {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition:
			opacity 120ms var(--ease),
			transform 120ms var(--ease);
	}

	.nav-menu a {
		min-height: 40px;
		padding-inline: 12px;
		white-space: nowrap;
	}

	.nav-group,
	.nav-all {
		margin-top: 6px;
		padding-top: 6px;
		border-top: 1px solid var(--line);
	}

	.nav-all a {
		color: var(--action);
		font-weight: 600;
	}

	.label-short {
		display: none;
	}

	.label-long {
		display: inline;
	}
}

/* ---- the start bar on phones ---------------------------------------------------------------- */

.start-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 -1px 0 var(--line);
}

.start-bar .invite-email {
	display: none;
}

/* site/page.js: out of the way while the home page's film is on screen, or a scene on a feature page. */
.start-bar {
	transition:
		transform 0.25s var(--ease),
		visibility 0s;
}

.start-bar.start-bar-away {
	transform: translateY(110%);
	visibility: hidden;
	transition:
		transform 0.25s var(--ease),
		visibility 0s 0.25s;
}

body {
	padding-bottom: 76px;
}

@media (min-width: 960px) {
	.start-bar {
		display: none;
	}

	body {
		padding-bottom: 0;
	}
}

/* ---- breadcrumbs ---------------------------------------------------------------------------- */

.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	list-style: none;
	padding: 16px 0 0;
	font-size: 0.9rem;
	color: var(--ink-3);
}

.crumbs li + li::before {
	content: "/";
	padding-inline: 8px;
	color: var(--line-2);
}

.crumbs a {
	color: var(--ink-2);
}

/* ---- section scaffolding ------------------------------------------------------------------- */

.section {
	padding-block: var(--section);
}

.section-mist {
	background: var(--mist);
}

.section-tint {
	background: var(--tint);
}

.section-flush {
	padding-top: 0;
}

.section-head {
	max-width: 46rem;
	margin-bottom: clamp(32px, 4.5vw, 56px);
}

.section-head h2,
.h2 {
	font-size: clamp(1.875rem, 1.1rem + 2.6vw, 3.125rem);
	line-height: 1.04;
	letter-spacing: -0.038em;
	font-weight: 700;
}

.answer {
	margin-top: clamp(14px, 1.6vw, 20px);
	max-width: 40rem;
	color: var(--ink-2);
	font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
	line-height: 1.5;
}

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

h3 {
	font-size: clamp(1.2rem, 1.08rem + 0.45vw, 1.45rem);
	line-height: 1.2;
	letter-spacing: -0.022em;
	font-weight: 650;
}

.body {
	margin-top: 10px;
	color: var(--ink-2);
	max-width: 36rem;
}

.section-head .body {
	margin-top: 16px;
}

.small {
	font-size: 0.9rem;
	color: var(--ink-3);
	line-height: 1.5;
}

.eyebrow {
	margin-bottom: 12px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--green-strong);
}

/* ---- the film ------------------------------------------------------------------------------- */
/* Its section on the home page (site/marketing/film.ts). The film styles itself (film/film.css, loaded after
   this file); here it only gets its place: under the heading, then beside it on wide screens. */

.film-layout .film:not([data-mode="tall"]) {
	max-width: 960px;
}

/* A rail label on two lines stretches its row; keep every chapter's time on the same line at the top. */
.film-layout .film-rail button {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

@media (min-width: 1100px) {
	.film-layout {
		display: grid;
		grid-template-columns: minmax(0, 4fr) minmax(0, 9fr);
		gap: 56px;
		align-items: start;
	}

	.film-layout .section-head {
		margin-bottom: 0;
	}
}

/* Single scenes on the feature pages (site/marketing/scenes.ts): in a band of their own under the hero, or
   in a feature row in place of a screenshot. On phones a scene is the tall drawing, centred like a phone
   screenshot. Above that it is the wide one: under the row's words until there is room beside them. */

.scene-band {
	padding-bottom: 0;
}

/* The scene shows what the hero's answer says, so it sits close under it. */
.page-hero:has(+ .scene-band) {
	padding-bottom: clamp(28px, 3.4vw, 48px);
}

.scene-band .film {
	margin-inline: auto;
}

.scene-band .film:not([data-mode="tall"]) {
	max-width: 880px;
}

.scene-band + .section-flush .feature:first-child {
	margin-top: clamp(40px, 6vw, 72px);
	border-top: 1px solid var(--line);
}

.feature .film {
	width: 100%;
	justify-self: center;
}

.feature .film:not([data-mode="tall"]) {
	max-width: 880px;
	justify-self: start;
}

@media (min-width: 900px) {
	.feature.feature-scene {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.feature.feature-scene .feature-text {
		order: 0;
	}
}

@media (min-width: 1100px) {
	.feature.feature-scene {
		grid-template-columns: minmax(0, 4fr) minmax(0, 9fr);
		gap: 56px;
	}

	.feature.feature-scene:nth-of-type(even) {
		grid-template-columns: minmax(0, 9fr) minmax(0, 4fr);
	}

	.feature.feature-scene:nth-of-type(even) .feature-text {
		order: 2;
	}
}

/* ---- framed screenshots ---------------------------------------------------------------------- */
/* Phone screenshots sit in a device frame; desktop ones in a padded frame cropped to the top of the
   screen. Recordings (a later phase) drop into the same boxes. */

.rec {
	position: relative;
	width: min(100%, 300px);
	padding: 10px;
	border-radius: 30px;
	background: var(--frame);
	box-shadow:
		0 0 0 1px rgba(17, 35, 28, 0.08),
		0 40px 70px -40px rgba(17, 35, 28, 0.45);
}

.rec img {
	width: 100%;
	aspect-ratio: 390 / 844;
	object-fit: cover;
	object-position: top;
	border-radius: 21px;
	background: var(--paper);
}

/* Screen recordings (site/media.ts, site/video.js): the same phone frame, a video in place of the picture, and
   a play and pause button under the screen, beside the label. Without the script the native controls show. */
.rec-stage {
	position: relative;
}

.rec-video video {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 21px;
	background: var(--paper);
}

.rec .rec-caption {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin-top: 10px;
	padding-inline: 4px;
}

.rec-play {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px 0 14px;
	border: 0;
	border-radius: 999px;
	background: var(--ink);
	color: var(--white);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.rec-play:hover {
	background: var(--action);
}

.rec-play:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

.rec-play[hidden] {
	display: none;
}

.rec-play-icon {
	position: relative;
	width: 12px;
	height: 14px;
}

/* A triangle to play; two bars to pause. */
.rec-play-icon::before {
	content: "";
	position: absolute;
	inset: 0;
	background: currentColor;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

[data-state="playing"] .rec-play-icon::before {
	clip-path: none;
	background: none;
	border-inline: 4px solid currentColor;
}

.rec-label {
	font-size: 0.8rem;
	letter-spacing: 0.01em;
}

.rec-transcript {
	flex-basis: 100%;
	color: var(--ink-2);
}

.section-dark .rec-caption {
	color: var(--on-dark-3);
}

.section-dark .rec-play {
	background: var(--paper);
	color: var(--ink);
}

.section-dark .rec-play:hover {
	background: var(--on-dark);
}

/* The set-up film's steps, which are also its transcript. */
.setup-steps {
	display: grid;
	gap: 10px;
	margin-top: 22px;
	padding-left: 1.4em;
	max-width: 34rem;
}

.setup .hero-act {
	margin-top: 26px;
}

.shot {
	padding: 10px;
	border-radius: 18px;
	background: var(--frame);
	box-shadow:
		0 0 0 1px rgba(17, 35, 28, 0.08),
		0 40px 70px -44px rgba(17, 35, 28, 0.45);
}

.shot img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: top left;
	border-radius: 10px;
	background: var(--paper);
}

.shot figcaption,
.rec figcaption {
	margin-top: 12px;
	padding-inline: 8px;
	font-size: 0.86rem;
	color: var(--ink-3);
}

@media (max-width: 640px) {
	.shot img {
		aspect-ratio: 4 / 3;
	}
}

/* A shot without its right quarter (components.ts `trimRight`): the left 74% of the screen. */
.shot-trim-right img {
	aspect-ratio: 1070 / 900;
	object-position: 0 0;
}

/* A whole desktop screenshot (components.ts `whole`, the office's pictures): the whole 16:10 screen at every width,
   never the phone-width crop, as a link to the full-size image to open and zoom. */
.shot.shot-whole img {
	aspect-ratio: 16 / 10;
}

.shot.shot-trim-right img {
	aspect-ratio: 1070 / 900;
}

.shot-open {
	display: block;
	border-radius: 10px;
}

.shot-open:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

@media (max-width: 640px) {
	.shot.shot-whole {
		padding: 6px;
		border-radius: 12px;
	}

	.shot.shot-whole img {
		border-radius: 7px;
	}
}

/* A desktop recording (media.ts, wider than tall): the plain desktop frame, not the phone's. */
.rec.rec-screen {
	width: 100%;
	border-radius: 18px;
}

.rec-screen video {
	aspect-ratio: 16 / 10;
	border-radius: 10px;
}

/* ---- hero ---------------------------------------------------------------------------------- */

.hero {
	padding-top: clamp(20px, 3.4vw, 56px);
	padding-bottom: clamp(48px, 6vw, 88px);
}

.hero h1 {
	font-size: clamp(2.5rem, 1.2rem + 4vw, 4.25rem);
	line-height: 0.98;
	letter-spacing: -0.048em;
	font-weight: 700;
}

.page-hero + .section:not(.section-flush) {
	padding-top: clamp(32px, 4vw, 56px);
}

.hero-side .crew {
	margin-top: 0;
}

@media (min-width: 960px) {
	.hero-side {
		padding-top: 12px;
	}
}

.page-hero h1 {
	max-width: 18em;
	font-size: clamp(2.25rem, 1.2rem + 3.2vw, 3.75rem);
	line-height: 1.02;
}

.hero-sub {
	margin-top: clamp(14px, 1.6vw, 22px);
	max-width: 36rem;
	color: var(--ink-2);
	font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.25rem);
	line-height: 1.5;
}

.hero-act {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
	margin-top: 24px;
}

.card-line {
	margin-top: 12px;
	max-width: 30rem;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--ink-3);
}

.hero-a .hero-grid {
	display: grid;
	gap: 40px;
	align-items: start;
}

.from {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin-top: clamp(18px, 2vw, 28px);
}

.from-label,
.from-unit {
	font-size: 1rem;
	color: var(--ink-2);
}

.from-label {
	font-weight: 500;
}

.from-price {
	font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.crew {
	margin-top: 22px;
	padding: 18px;
	border: 1px solid var(--line-2);
	border-radius: 16px;
	background: var(--paper);
	max-width: 34rem;
	min-width: 0;
}

.crew legend {
	float: left;
	width: 100%;
	margin-bottom: 12px;
	padding: 0;
	font-weight: 650;
	font-size: 1.02rem;
}

.crew-opts {
	clear: both;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 6px;
}

.crew-opt {
	position: relative;
}

.crew-opt input {
	position: absolute;
	opacity: 0;
	inset: 0;
	margin: 0;
	cursor: pointer;
}

.crew-opt span[aria-hidden] {
	display: grid;
	place-items: center;
	min-height: 48px;
	padding-inline: 4px;
	border-radius: 10px;
	box-shadow: inset 0 0 0 1px var(--line-2);
	font-weight: 600;
	font-size: clamp(0.84rem, 0.62rem + 1.1vw, 0.98rem);
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	color: var(--ink);
	transition:
		background-color 120ms var(--ease),
		color 120ms var(--ease);
}

.crew-opt input:hover + span {
	box-shadow: inset 0 0 0 1px var(--action);
}

.crew-opt input:checked + span {
	background: var(--ink);
	color: var(--paper);
	box-shadow: none;
}

.crew-opt input:focus-visible + span {
	outline: 2px solid var(--action);
	outline-offset: 2px;
}

.crew-out {
	display: block;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}

.crew-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 16px;
}

.crew-line[hidden] {
	display: none;
}

.crew-plan {
	font-weight: 650;
}

.crew-plan small {
	display: block;
	font-weight: 400;
	font-size: 0.9rem;
	color: var(--ink-3);
}

.crew-price {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

.crew-price small {
	font-size: 0.88rem;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--ink-2);
}

.crew-note {
	margin-top: 10px;
	font-size: 0.9rem;
	color: var(--ink-3);
}

.hero-phones {
	position: relative;
	display: flex;
	justify-content: center;
}

.hero-phones .rec {
	width: min(78vw, 310px);
}

.hero-phones .rec-back {
	display: none;
}

@media (min-width: 960px) {
	.hero-a .hero-grid {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 56px;
	}

	.hero-phones {
		justify-content: flex-end;
		padding-top: 8px;
	}

	.hero-phones .rec {
		width: 300px;
		z-index: 1;
	}

	.hero-phones .rec-back {
		display: block;
		position: absolute;
		right: 210px;
		top: 72px;
		width: 250px;
		z-index: 0;
	}
}

@media (min-width: 1180px) {
	.hero-phones .rec-back {
		right: 250px;
	}
}

/* ---- works for everyone ---------------------------------------------------------------------- */

.who {
	border-top: 1px solid var(--line-2);
}

.who-row {
	display: grid;
	gap: 6px 32px;
	padding-block: 22px;
	border-bottom: 1px solid var(--line-2);
}

.who-row dt {
	font-weight: 650;
	font-size: 1.1rem;
	letter-spacing: -0.015em;
}

.who-row dd {
	color: var(--ink-2);
}

.who-row .cost {
	font-weight: 600;
	color: var(--ink);
}

.who-row .cost.free {
	color: var(--success-text);
}

.three-truths {
	display: grid;
	gap: 24px;
	margin-top: clamp(40px, 5vw, 64px);
}

.truth h3 {
	display: flex;
	align-items: center;
	gap: 10px;
}

.truth h3::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--green);
}

@media (min-width: 800px) {
	.who-row {
		grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr);
		align-items: baseline;
	}

	.who-row .cost {
		text-align: right;
	}

	.three-truths {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 40px;
	}
}

/* ---- feature rows (light), and the dark band on the home page ------------------------------------ */

.feature {
	display: grid;
	gap: 28px;
	align-items: center;
	padding-block: clamp(40px, 6vw, 72px);
	border-top: 1px solid var(--line);
}

.section-flush .feature:first-child {
	border-top: 0;
}

.feature h2,
.feature h3 {
	font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.1rem);
	letter-spacing: -0.032em;
	line-height: 1.12;
	font-weight: 700;
}

.feature .body {
	font-size: 1.06rem;
	max-width: 30rem;
	margin-top: 14px;
}

.ticks {
	list-style: none;
	padding: 0;
	margin-top: 18px;
	display: grid;
	gap: 8px;
	max-width: 30rem;
}

.ticks li {
	position: relative;
	padding-left: 22px;
	color: var(--ink-2);
	font-size: 0.98rem;
}

.ticks li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.55em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--green);
}

.feature .rec {
	justify-self: center;
	width: min(78vw, 290px);
}

.feature .shot {
	width: 100%;
}

.feature-note {
	margin-top: 16px;
	padding-left: 14px;
	border-left: 2px solid var(--warning);
	color: var(--ink-2);
	font-size: 0.95rem;
	max-width: 30rem;
}

@media (min-width: 900px) {
	.feature {
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		gap: 64px;
	}

	.feature:has(.shot) {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}

	.feature:nth-of-type(even) .feature-text {
		order: 2;
	}

	.feature .rec {
		width: 300px;
	}
}

.feature .rec.rec-screen {
	justify-self: stretch;
	width: 100%;
}

/* A wide row (components.ts `wide`): the words in a band across the top, the screen the full width under them. */
@media (min-width: 900px) {
	.feature.feature-wide,
	.feature.feature-wide:has(.shot) {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.feature.feature-wide .feature-text {
		order: 0;
		display: grid;
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		gap: 0 64px;
		align-items: end;
	}

	.feature-wide .feature-extra > :first-child {
		margin-top: 0;
	}
}

.section-dark {
	background: var(--ink);
	color: var(--on-dark);
}

.section-dark .section-head h2,
.section-dark h3 {
	color: var(--paper);
}

.section-dark .answer,
.section-dark .body,
.section-dark .ticks li {
	color: var(--on-dark-2);
}

.section-dark a {
	color: var(--link-on-dark);
}

.section-dark .feature {
	border-top-color: var(--dark-line);
}

.section-dark .rec {
	background: #22362d;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.06),
		0 50px 90px -40px rgba(0, 0, 0, 0.8);
}

.section-dark .feature-note {
	color: var(--on-dark);
}

.registers {
	padding-top: clamp(40px, 6vw, 72px);
	border-top: 1px solid var(--dark-line);
	display: grid;
	gap: 20px 48px;
}

.registers ul {
	list-style: none;
	padding: 0;
	display: grid;
	gap: 10px 32px;
}

.registers li {
	color: var(--on-dark-2);
	padding-top: 10px;
	border-top: 1px solid var(--dark-line);
}

.registers li b {
	display: block;
	color: var(--paper);
	font-weight: 600;
}

@media (min-width: 800px) {
	.registers {
		grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	}

	.registers ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---- two columns, and the NZ law section ----------------------------------------------------- */

.split {
	display: grid;
	gap: 32px;
	align-items: start;
}

.split .rec {
	justify-self: center;
}

.law {
	display: grid;
	gap: 48px;
}

.law-item {
	display: grid;
	gap: 24px;
}

.law-item .rec {
	justify-self: center;
}

.steps {
	list-style: none;
	padding: 0;
	margin-top: 16px;
	counter-reset: step;
	max-width: 34rem;
}

.steps li {
	counter-increment: step;
	position: relative;
	padding: 12px 0 12px 44px;
	border-top: 1px solid var(--line);
	color: var(--ink-2);
}

.steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 11px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--tint);
	color: var(--action-2);
	font-weight: 700;
	font-size: 0.9rem;
}

.callout {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--paper);
	border: 1px solid var(--line-2);
	font-size: 0.95rem;
	color: var(--ink-2);
	max-width: 34rem;
}

.callout strong {
	color: var(--ink);
}

@media (min-width: 900px) {
	.split {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 56px;
	}

	.split-phone {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		align-items: center;
	}

	.law-item {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 56px;
		align-items: center;
	}

	.law-item.flip {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}

	.law-item.flip .law-text {
		order: 2;
	}
}

/* ---- pricing ------------------------------------------------------------------------------- */

.plans {
	display: grid;
	gap: 12px;
}

.plan {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 2px 16px;
	padding: 18px 20px;
	border-radius: 14px;
	background: var(--paper);
	border: 1px solid var(--line-2);
}

.plan h3 {
	font-size: 1.25rem;
}

.plan .size,
.plan .year {
	grid-column: 1;
	color: var(--ink-2);
	font-size: 0.95rem;
}

.plan .year {
	color: var(--ink-3);
	font-size: 0.88rem;
}

.plan .price {
	grid-row: 1 / span 3;
	grid-column: 2;
	text-align: right;
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}

.plan .price small {
	display: block;
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--ink-3);
}

.plan-ent {
	background: transparent;
	border-style: dashed;
}

.plan-ent .price {
	font-size: 1.25rem;
	letter-spacing: -0.01em;
}

@media (min-width: 900px) {
	.plans {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 16px;
	}

	.plan {
		grid-template-columns: 1fr;
		align-content: start;
		padding: 24px;
		min-height: 220px;
	}

	.plan .price {
		grid-row: auto;
		grid-column: 1;
		text-align: left;
		margin-top: 28px;
		font-size: 2.5rem;
	}

	.plan .price small {
		margin-top: 6px;
	}

	.plan .year {
		margin-top: 8px;
	}

	.plan-ent {
		grid-column: 1 / -1;
		min-height: 0;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		padding-block: 18px;
	}

	.plan-ent .price {
		margin-top: 0;
		grid-column: 2;
		grid-row: 1 / span 2;
		text-align: right;
		font-size: 1.25rem;
	}
}

.plan-terms {
	display: grid;
	gap: 24px;
	margin-top: clamp(32px, 4vw, 48px);
}

.plan-terms h3 {
	font-size: 1.15rem;
}

.plan-terms p {
	margin-top: 8px;
	color: var(--ink-2);
	font-size: 0.98rem;
}

@media (min-width: 900px) {
	.plan-terms {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 40px;
	}
}

.pricing-act {
	margin-top: clamp(16px, 2vw, 24px);
}

.includes {
	margin-top: clamp(40px, 5vw, 56px);
	padding-top: 24px;
	border-top: 1px solid var(--line-2);
}

.includes ul {
	list-style: none;
	padding: 0;
	margin-top: 14px;
	display: grid;
	gap: 8px 32px;
	color: var(--ink-2);
	font-size: 0.98rem;
}

.includes li {
	padding-left: 20px;
	position: relative;
}

.includes li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.6em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--green-strong);
}

@media (min-width: 700px) {
	.includes ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.includes ul {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---- industries, tags, switching, cards, facts ------------------------------------------------- */

.industries {
	display: grid;
	gap: 40px;
}

.ind-lead {
	border-top: 1px solid var(--line-2);
}

.ind {
	display: grid;
	gap: 4px 32px;
	padding-block: 20px;
	border-bottom: 1px solid var(--line-2);
}

.ind h3,
.ind-any h3 {
	font-size: 1.2rem;
}

.ind p {
	color: var(--ink-2);
	font-size: 0.98rem;
}

.ind-any p {
	margin-top: 8px;
	color: var(--ink-2);
	max-width: 44rem;
}

@media (min-width: 800px) {
	.ind {
		grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	}
}

.tags {
	list-style: none;
	padding: 0;
	margin-top: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tags li {
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--paper);
	border: 1px solid var(--line-2);
	font-size: 0.95rem;
	font-weight: 500;
}

.tags-coming li {
	border-style: dashed;
	color: var(--ink-2);
}

.ways {
	display: grid;
	gap: 40px;
}

.way h3 {
	font-size: 1.3rem;
}

.way p {
	margin-top: 10px;
	color: var(--ink-2);
}

.way .shot {
	margin-top: 20px;
}

@media (min-width: 900px) {
	.ways {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 48px;
	}
}

/* The example site (site/marketing/try.ts, SITE_TRY=on): words beside the way in. The QR code shows on a wide
   screen with a mouse, where the phone is the other device; everywhere else the button opens it on this phone.
   The QR tile is white in every theme, with dark modules, so any phone camera reads it. */

.try-panel {
	display: grid;
	gap: 28px;
	padding: clamp(24px, 4vw, 48px);
	border-radius: 18px;
	border: 1px solid var(--line-2);
	background: var(--tint);
}

.try-head h2 {
	font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem);
	line-height: 1.08;
	letter-spacing: -0.034em;
	font-weight: 700;
}

/* "sign-in" never breaks at its hyphen on a phone. */
.try-head .keep {
	white-space: nowrap;
}

.try-act {
	display: grid;
	justify-items: start;
}

.try-qr {
	display: none;
}

.try-button {
	width: 100%;
}

.try-compact {
	padding-top: clamp(32px, 4vw, 48px);
	padding-bottom: 0;
}

.try-compact + .section-flush .feature:first-child {
	margin-top: clamp(40px, 6vw, 72px);
	border-top: 1px solid var(--line);
}

@media (min-width: 600px) {
	.try-button {
		width: auto;
	}
}

@media (hover: hover) and (min-width: 900px) {
	.try-panel {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 56px;
	}

	.try-qr {
		display: grid;
		grid-template-columns: auto minmax(0, 13rem);
		align-items: center;
		gap: 24px;
	}

	.try-button {
		display: none;
	}

	.qr-tile {
		padding: 8px;
		border-radius: 14px;
		border: 1px solid var(--line-2);
		background: #fff;
	}

	.qr {
		display: block;
		width: 216px;
		height: 216px;
	}

	.try-scan {
		font-weight: 650;
		font-size: 1.1rem;
		line-height: 1.3;
	}

	.try-qr .small {
		margin-top: 8px;
	}

	.try-qr b {
		color: var(--ink-2);
		font-weight: 600;
		overflow-wrap: anywhere;
	}
}

.cards {
	list-style: none;
	padding: 0;
	display: grid;
	gap: 16px;
}

.card {
	padding: 24px;
	border-radius: 14px;
	border: 1px solid var(--line-2);
	background: var(--paper);
}

.card h2,
.card h3 {
	font-size: 1.3rem;
	letter-spacing: -0.02em;
}

.card p {
	margin-top: 8px;
	color: var(--ink-2);
}

@media (min-width: 800px) {
	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.facts {
	list-style: none;
	padding: 0;
	max-width: 52rem;
	border-top: 1px solid var(--line-2);
}

.facts li {
	padding-block: 14px;
	border-bottom: 1px solid var(--line-2);
	color: var(--ink-2);
}

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

/* ---- FAQ (native details) --------------------------------------------------------------------- */

.faq {
	max-width: 52rem;
	border-top: 1px solid var(--line-2);
}

.faq details {
	border-bottom: 1px solid var(--line-2);
}

.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
	padding-block: 14px;
	font-weight: 650;
	font-size: 1.08rem;
	letter-spacing: -0.012em;
	cursor: pointer;
	list-style: none;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	content: "+";
	flex: none;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px var(--line-2);
	color: var(--action);
	font-weight: 500;
	font-size: 1.2rem;
}

.faq details[open] summary::after {
	content: "\2212";
}

.faq details p {
	padding-bottom: 20px;
	color: var(--ink-2);
	max-width: 44rem;
}

/* ---- the closing call to action and the footer ------------------------------------------------ */

.final .h2 {
	max-width: 18em;
}

.final .hero-act {
	margin-top: 28px;
}

/* ---- the sign-up panel (site/panel-markup.ts, site/panel.js) --------------------------------------
 * A frame of the app's embedded sign-up: inline in the closing section of home and /pricing/, in a dialog (a full
 * sheet on phones) everywhere else. Until the embed says it is ready the frame is invisible over a placeholder with
 * the form's shape at a fixed height, so nothing jumps; without JavaScript the card is not drawn at all. */

.final-grid {
	display: grid;
	gap: 32px;
}

@media (min-width: 960px) {
	.final-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 528px);
		gap: clamp(48px, 6vw, 96px);
		align-items: start;
	}

	.final-copy {
		position: sticky;
		top: calc(var(--masthead) + 40px);
	}
}

.final-copy .text-link {
	margin-top: 12px;
}

.signup {
	/* About the height of the real step 1 (the app's drawing in docs/specs/site-signup.md 2.2). */
	--ph-h: 1180px;
	position: relative;
}

.signup:not(.is-live) .signup-card {
	display: none;
}

.signup-card {
	position: relative;
}

.signup-inline .signup-card {
	padding: clamp(16px, 4vw, 36px);
	border: 1px solid var(--line);
	border-radius: var(--radius-sheet);
	background: var(--paper);
	box-shadow:
		0 1px 2px rgb(17 35 28 / 0.05),
		0 24px 56px -24px rgb(17 35 28 / 0.22);
}

@media (min-width: 600px) {
	.signup {
		--ph-h: 1000px;
	}
}

.signup-frame {
	display: block;
	width: 100%;
	height: var(--ph-h);
	border: 0;
	background: transparent;
	overflow-anchor: none;
}

.signup:not(.is-ready) .signup-frame {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
}

.signup.is-ready .signup-wait {
	display: none;
}

.signup-wait {
	position: relative;
}

/* The placeholder: the form's shape in soft grey, shimmering gently (still with reduced motion). */
.ph {
	display: flex;
	flex-direction: column;
	height: var(--ph-h);
	overflow: hidden;
}

.ph > span,
.ph-tick {
	display: block;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--surface-sunken) 0 30%, #f7f9f8 50%, var(--surface-sunken) 70% 100%) 0 0 / 300% 100%;
	animation: ph-shine 1.6s linear infinite;
}

@keyframes ph-shine {
	from {
		background-position: 100% 0;
	}
	to {
		background-position: 0 0;
	}
}

.ph-title {
	width: 78%;
	height: 30px;
	margin-bottom: 12px;
}

.ph-sub {
	width: 48%;
	height: 18px;
	margin-bottom: 28px;
}

.ph .ph-plan {
	height: 64px;
	margin-bottom: 28px;
	border-radius: 10px;
}

.ph-label {
	width: 38%;
	height: 16px;
	margin-bottom: 8px;
}

.ph .ph-field {
	height: 48px;
	margin-bottom: 20px;
	border-radius: var(--radius-control);
}

.ph .ph-block {
	display: grid;
	gap: 14px;
	align-content: start;
	flex: 1 1 196px;
	max-height: 320px;
	margin: 8px 0 20px;
	padding: 18px 16px;
	background: var(--surface);
	animation: none;
}

.ph-tick {
	height: 56px;
}

.ph .ph-button {
	height: 52px;
	margin-top: auto;
	border-radius: 10px;
	background: var(--tint-2);
	animation: none;
}

/* "Loading the sign-up form..." and, in the dialog, the not-ready line: a small card over the placeholder. */
.signup-note {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	pointer-events: none;
}

.signup-slow,
.signup-late {
	display: none;
}

.signup-slow {
	position: relative;
	max-width: 22rem;
	padding: 12px 18px 12px 46px;
	border-radius: var(--radius-pill);
	background: var(--paper);
	box-shadow: var(--shadow-overlay);
	color: var(--ink-2);
	font-size: 0.97rem;
	font-weight: 600;
}

.signup-slow::before {
	content: "";
	position: absolute;
	left: 18px;
	top: calc(50% - 9px);
	width: 18px;
	height: 18px;
	border: 2.5px solid var(--tint-2);
	border-top-color: var(--action);
	border-radius: 50%;
	animation: signup-spin 0.8s linear infinite;
}

@keyframes signup-spin {
	to {
		transform: rotate(360deg);
	}
}

/* When the form can't load: a calm block with the way on, in place of the placeholder (dialog) or under it (inline). */
.signup-late {
	width: 100%;
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: var(--surface);
	text-align: center;
	pointer-events: auto;
}

.signup-late-title {
	margin-bottom: 16px;
	color: var(--ink);
	font-size: 1.06rem;
	font-weight: 600;
	line-height: 1.4;
}

.signup-late-note {
	margin-top: 12px;
	color: var(--ink-2);
	font-size: 0.94rem;
}

.signup.is-slow .signup-slow,
.signup.is-late .signup-late {
	display: block;
}

.signup.is-late .signup-slow,
.signup.is-ready .signup-late {
	display: none;
}

/* Not ready after 8 s: the block takes the placeholder's place and the panel shrinks to it, in both layouts, so it
 * is where the reader is already looking. The frame stays, invisible and inside the card, until it says ready. */
.signup.is-late .ph {
	display: none;
}

.signup.is-late .signup-note {
	position: static;
	display: block;
	padding: 8px 0 0;
}

.signup:not(.is-ready) .signup-frame {
	max-height: 100%;
}

/* The dialog: 480 px on wide screens, a full-height sheet on phones. Scrolling happens inside the frame. */
html.signup-open {
	overflow: hidden;
	scrollbar-gutter: stable;
}

.signup-dialog {
	--bar: 52px;
	width: min(480px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 64px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--radius-sheet);
	background: var(--paper);
	color: var(--ink);
	box-shadow: 0 32px 80px -16px rgb(17 35 28 / 0.4);
	overflow: hidden;
	overscroll-behavior: contain;
}

.signup-dialog[open] {
	display: flex;
	flex-direction: column;
	animation: signup-in 0.22s var(--ease);
}

.signup-dialog::backdrop {
	background: rgb(17 35 28 / 0.56);
}

@keyframes signup-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}
}

.signup-bar {
	display: flex;
	flex: none;
	justify-content: flex-end;
	height: var(--bar);
	padding: 4px 6px 0;
}

.signup-x {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--ink-2);
	cursor: pointer;
}

.signup-x:hover {
	background: var(--surface);
	color: var(--ink);
}

.signup-modal {
	--ph-h: min(640px, calc(100dvh - 64px - var(--bar) - 24px));
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	padding: 0 28px 24px;
}

.signup-modal .signup-card,
.signup-modal .signup-wait {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.signup-modal .signup-frame {
	flex: 0 1 auto;
	min-height: 0;
	height: var(--content, var(--ph-h));
}

@media (max-width: 640px) {
	.signup-dialog {
		width: 100%;
		height: 100dvh;
		max-height: none;
		margin: 0;
		inset: 0;
		border-radius: 0;
	}

	.signup-dialog[open] {
		animation: signup-up 0.3s var(--ease);
	}

	@keyframes signup-up {
		from {
			transform: translateY(100%);
		}
	}

	.signup-modal {
		padding: 0 16px max(12px, env(safe-area-inset-bottom));
	}

	.signup-modal .signup-frame,
	.signup-modal .ph {
		flex: 1 1 auto;
		height: auto;
	}
}

.footer {
	background: var(--mist);
	border-top: 1px solid var(--line);
	padding-block: 48px 40px;
	font-size: 0.94rem;
	color: var(--ink-2);
}

.footer-grid {
	display: grid;
	gap: 28px;
}

.footer-brand img {
	width: 140px;
}

.footer-brand .small {
	margin-top: 12px;
	max-width: 22rem;
}

.footer h2 {
	font-size: 0.86rem;
	font-weight: 650;
	color: var(--ink);
}

.footer ul {
	list-style: none;
	padding: 0;
}

.footer nav a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	color: var(--ink-2);
}

.footer-legal-nav {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--line-2);
}

.footer-legal-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
}

.footer-legal {
	margin-top: 12px;
	font-size: 0.86rem;
	color: var(--ink-3);
}

@media (min-width: 700px) {
	.footer-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1000px) {
	.footer-grid {
		grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
	}

	.footer-brand {
		grid-column: auto;
	}
}

/* ---- one-column pages: help, legal, contact, Markdown pages ------------------------------------ */

.page {
	padding-bottom: var(--section);
}

.page h1 {
	margin-top: 24px;
	font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
	font-weight: 700;
}

.page h2 {
	margin-top: 40px;
	font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
	line-height: 1.15;
	letter-spacing: -0.025em;
	font-weight: 700;
}

.page h3,
.page h4 {
	margin-top: 28px;
	font-size: 1.15rem;
}

.page p,
.page ul,
.page ol {
	margin-top: 14px;
}

.page .faq {
	margin-top: 20px;
}

.page .faq h2 {
	margin-bottom: 12px;
}

.lead {
	margin-top: 14px;
	max-width: 40rem;
	color: var(--ink-2);
	font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
}

.updated,
.version,
.link-list span {
	color: var(--ink-3);
	font-size: 0.92rem;
}

.version {
	margin-top: 24px;
}

.version-draft {
	color: var(--warning-text);
	font-weight: 700;
}

.link-list {
	list-style: none;
	padding: 0;
	max-width: 46rem;
}

.link-list li {
	display: flex;
	flex-direction: column;
	padding-block: 12px;
	border-bottom: 1px solid var(--line);
}

.link-list a {
	font-weight: 650;
}

.prose {
	max-width: 46rem;
}

.prose li + li {
	margin-top: 6px;
}

.prose img {
	max-width: min(100%, 360px);
	margin-block: 16px;
	border-radius: 12px;
	border: 1px solid var(--line);
}

.prose blockquote {
	margin-top: 16px;
	padding: 12px 16px;
	background: var(--info-bg);
	border-left: 4px solid var(--action);
	border-radius: 8px;
}

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

.prose code {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: var(--surface-sunken);
	padding: 0 4px;
	border-radius: 4px;
}

.table-wrap {
	margin-top: 16px;
	overflow-x: auto;
}

.prose table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.92rem;
	background: var(--paper);
}

/* Markdown tables scroll inside their own box on a phone: a column never narrows below a short phrase. */
.prose .table-wrap {
	border: 1px solid var(--line);
	border-radius: 10px;
	-webkit-overflow-scrolling: touch;
}

.prose .table-wrap table {
	width: max-content;
	min-width: 100%;
	border-style: hidden;
}

.prose .table-wrap:focus-visible {
	outline-offset: 2px;
}

.prose .table-wrap th,
.prose .table-wrap td {
	min-width: 4.5rem;
	max-width: 16rem;
}

.prose th {
	background: var(--surface);
	font-weight: 650;
}

.prose > p + ul,
.prose > p + ol {
	margin-top: 8px;
}

.print-row {
	margin-top: 16px;
}

/* A template's PDF and Word downloads, under its Updated line (site/downloads.ts). */
.downloads {
	margin-top: 8px;
	font-weight: 600;
}

.downloads a {
	color: var(--primary);
}

.downloads span {
	color: var(--ink-3);
	font-weight: 400;
	font-size: 0.92rem;
}

/*
 * A comparison table marked `<!-- table: stack -->` (site/markdown.ts). On a wide screen it is wider than the
 * text, with its first column pinned and every column the same readable width; on a phone each row is a card,
 * the first cell its heading and each other cell a line labelled with its column. The header row stays for
 * screen readers.
 */
@media (min-width: 721px) {
	.prose .table-wrap:has(> .table-stack) {
		width: min(72rem, calc(100vw - 2 * var(--gutter) - 16px));
	}

	.prose .table-wrap .table-stack {
		width: 100%;
		min-width: 56rem;
		table-layout: fixed;
		font-size: 0.88rem;
		line-height: 1.45;
	}

	.prose .table-wrap .table-stack th,
	.prose .table-wrap .table-stack td {
		min-width: 0;
		max-width: none;
		padding: 10px 12px;
	}

	.prose .table-stack th:first-child {
		width: 12rem;
	}

	.prose .table-stack th:first-child,
	.prose .table-stack td:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		background: var(--surface);
		font-weight: 650;
	}

	.prose .table-stack thead th {
		vertical-align: bottom;
	}
}

@media (max-width: 720px) {
	.prose .table-wrap:has(> .table-stack) {
		overflow: visible;
		border: 0;
		border-radius: 0;
	}

	.prose .table-wrap .table-stack,
	.prose .table-stack tbody,
	.prose .table-stack tr,
	.prose .table-stack td {
		display: block;
		width: auto;
		min-width: 0;
		max-width: none;
	}

	.prose .table-wrap .table-stack {
		background: none;
		border-style: none;
	}

	.prose .table-stack thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.prose .table-stack tr {
		background: var(--paper);
		border: 1px solid var(--line);
		border-radius: 10px;
		overflow: hidden;
	}

	.prose .table-stack tr + tr {
		margin-top: 12px;
	}

	.prose .table-stack td {
		border: 0;
		padding: 8px 14px 0;
	}

	.prose .table-stack td:last-child {
		padding-bottom: 12px;
	}

	.prose .table-stack td:first-child {
		padding-block: 10px;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		font-size: 1rem;
		font-weight: 700;
	}

	.prose .table-stack td + td::before {
		content: attr(data-label);
		display: block;
		font-weight: 700;
	}
}

/* A template's empty cells are for writing in. */
.prose-template td:empty {
	height: 2.5rem;
}

/* ---- printing a page: the content only, on A4 -------------------------------------------------- */

@page {
	size: A4;
	margin: 14mm 12mm;
}

/* A template too wide for portrait (front matter "print: landscape") prints its form on A4 landscape. */
@page landscape {
	size: A4 landscape;
	margin: 12mm 12mm;
}

@media print {
	body {
		padding: 0;
		font-size: 10pt;
		line-height: 1.4;
		color: #000;
		background: #fff;
	}

	.skip,
	.staging-banner,
	.masthead,
	.crumbs,
	.start-bar,
	.signup,
	.signup-dialog,
	.footer,
	.print-row,
	.downloads,
	.final,
	button {
		display: none !important;
	}

	.page {
		padding: 0;
	}

	.page h1 {
		margin-top: 0;
		font-size: 20pt;
	}

	.page h2 {
		margin-top: 18pt;
		font-size: 14pt;
		break-after: avoid;
	}

	.page h3,
	.page h4 {
		break-after: avoid;
	}

	.prose {
		max-width: none;
	}

	.prose a {
		color: inherit;
	}

	.prose blockquote {
		background: none;
		border-left-color: #000;
	}

	.prose .table-wrap {
		overflow: visible;
		border: 0;
	}

	.prose .table-wrap table {
		width: 100%;
		border-style: solid;
		font-size: 8.5pt;
	}

	.prose .table-wrap th,
	.prose .table-wrap td {
		min-width: 0;
		max-width: none;
		padding: 4pt 5pt;
		border-color: #777;
	}

	.prose th {
		background: #eee;
		print-color-adjust: exact;
	}

	.prose thead {
		display: table-header-group;
	}

	.prose tr {
		break-inside: avoid;
	}

	/* The form starts on its own page, with room to write in its empty cells. */
	.prose-template #the-template {
		break-before: page;
		margin-top: 0;
	}

	.prose-template td:empty {
		height: 10mm;
	}

	.prose-template-landscape #the-template,
	.prose-template-landscape #the-template ~ * {
		page: landscape;
	}
}

.prose th,
.prose td {
	text-align: left;
	vertical-align: top;
	padding: 8px 12px;
	border: 1px solid var(--line);
}

.history {
	max-width: 46rem;
	margin-top: 40px;
	border-top: 1px solid var(--line);
}

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

	* {
		transition: none !important;
		animation: none !important;
	}
}

/* The home page's office section (home.ts office): the picture with the three cards beside it from 960 px, so the
   section stays about one screen tall. */
.office-grid .three-truths {
	margin-top: clamp(32px, 4vw, 48px);
}

.office-grid + .link-row {
	margin-top: 28px;
}

@media (min-width: 960px) {
	.office-grid {
		display: grid;
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
		gap: 48px;
		align-items: start;
	}

	.office-grid .three-truths {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		margin-top: 0;
	}
}
