/* ==========================================================================
   AARDIV — design system + site styles
   One stylesheet. No framework, no page builder, no icon fonts.

   Palette is sampled from the Aardiv logo:
     Navy #27408A  — 9.60:1 on white (AAA)
     Red  #F04029  — 3.84:1 on white, GRAPHICS AND LARGE DISPLAY ONLY.
                     Anywhere red carries readable text, use --red-600/700.

   Sections
     01 Tokens
     02 Reset & base
     03 Layout primitives
     04 Buttons & links
     05 Header
     06 Hero & spec band
     07 Sections, cards, chips, steps
     08 Forms
     09 Tables & prose
     10 Footer
     11 Utilities & responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   01 TOKENS

   The palette is the logo's own two colours set on a warm concrete neutral —
   the ground of a container yard rather than the blue-grey every logistics
   site defaults to. Navy carries structure, red carries action, and the
   neutrals are warm enough that the two brand colours read as deliberate
   against them.
   -------------------------------------------------------------------------- */
:root {
	/* Brand scales — navy and red sampled from the logo */
	--navy-50:#EFF1F7; --navy-100:#DDE2EF; --navy-200:#B9C3DF; --navy-300:#8FA0CD;
	--navy-400:#5E75B4; --navy-500:#27408A; --navy-600:#223878; --navy-700:#1D3068;
	--navy-800:#1A2B5E; --navy-900:#16224A;

	--red-50:#FDF3F0; --red-100:#FBE2DC; --red-200:#F7C0B4; --red-300:#F49B87;
	--red-400:#F4795F; --red-500:#F04029; --red-600:#CE3A20; --red-700:#A9301B;
	--red-800:#822822; --red-900:#5D211F;

	/* Warm concrete neutrals */
	--ground:     #F5F4F1;
	--surface:    #FFFFFF;
	--surface-2:  #EBE8E2;
	--ink:        #1B1D22;
	--ink-2:      #444851;
	--muted:      #63645F;
	--rule:       #DFDBD3;
	--rule-2:     #C7C2B8;

	--accent:     #27408A;   /* navy */
	--accent-ink: #FFFFFF;
	--accent-soft:#E9ECF5;
	--accent-deep:#1A2B5E;   /* large navy fields: hero scrim, CTA band */
	--pop:        #CE3A20;   /* red that may carry text — 5.0:1 on white */
	--pop-ink:    #FFFFFF;
	--pop-graphic:#F04029;   /* logo red: rules, marks, illustration only */
	--pop-text:   #A9301B;   /* small red text on a TINTED ground. --pop is only
	                            5.0:1 against white and drops to 4.04:1 on
	                            --surface-2, which fails AA at body sizes. */

	--dark:       #16224A;   /* footer ground */
	--dark-ink:   #E9EBF2;

	--ok:         #1B6B3E;
	--ok-bg:      #DFEFE5;
	--warn-bg:    #FAEBD3;
	--warn-tx:    #855507;
	--bad-bg:     #FBE1DB;
	--bad-tx:     #A7261A;

	--shadow:     0 1px 2px rgba(20,24,36,.06), 0 10px 28px -18px rgba(20,24,36,.4);
	--shadow-lg:  0 2px 4px rgba(20,24,36,.06), 0 24px 48px -28px rgba(20,24,36,.5);

	/* "Aardiv Display" is the self-hosted face declared in section 01b. Until
	   that file is in place the stack degrades through the system condensed
	   faces. "Roboto Condensed" and "Noto Sans Display" are listed because
	   nothing before them exists on Android, which was otherwise falling all
	   the way through to regular Arial and losing the display voice entirely. */
	--display: "Aardiv Display","Helvetica Neue Condensed","HelveticaNeue-CondensedBold","Arial Narrow","Roboto Condensed","Noto Sans Display",Haettenschweiler,Impact,Helvetica,Arial,sans-serif;
	--sans:    ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
	--mono:    ui-monospace,"Cascadia Mono","SFMono-Regular",Menlo,Consolas,monospace;

	--maxw: 78rem;
	--maxw-prose: 44rem;
	--pad: 1.5rem;
	--radius: 3px;

	/* Tells the browser which way to paint form controls, scrollbars and the
	   canvas behind the page. Without it, native widgets stay light in dark
	   mode and the select dropdowns on the quote form look pasted on. */
	color-scheme: light;
}

/* --------------------------------------------------------------------------
   01b DISPLAY WEBFONT

   The display stack above resolves to a different face on every platform —
   Helvetica Neue Condensed on macOS, Arial Narrow on Windows, and on Android
   nothing at all, which is why the headings there lose their character. One
   self-hosted condensed grotesque fixes all three at once.

   TO ENABLE: drop a woff2 at assets/fonts/aardiv-display.woff2 and uncomment
   the block below. Oswald, Archivo Narrow and Barlow Condensed are all
   open-licensed and close to the intended voice. font-display:swap means the
   page still paints immediately on the fallback if the file is slow.
   -------------------------------------------------------------------------- */
/*
@font-face {
	font-family: "Aardiv Display";
	src: url("../fonts/aardiv-display.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
*/

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ground:     #14151A;
		--surface:    #1D1F26;
		--surface-2:  #262932;
		--ink:        #EFEDE8;
		--ink-2:      #C6C4BE;
		--muted:      #96948E;
		--rule:       #2C2F38;
		--rule-2:     #3E424D;

		--accent:     #9EB2E8;
		--accent-ink: #12161F;
		--accent-soft:#1E2A4D;
		--accent-deep:#141F42;
		--pop:        #F5795F;
		--pop-ink:    #2A0B05;
		--pop-graphic:#F5795F;
		--pop-text:   #F5795F;

		--dark:       #101A38;
		--dark-ink:   #E9EBF2;

		--ok:         #7CC79A;
		--ok-bg:      #16301F;
		--warn-bg:    #332711;
		--warn-tx:    #E3B160;
		--bad-bg:     #351B17;
		--bad-tx:     #F19585;

		--shadow:     0 1px 2px rgba(0,0,0,.5), 0 10px 28px -18px rgba(0,0,0,.9);
		--shadow-lg:  0 2px 4px rgba(0,0,0,.5), 0 24px 48px -28px rgba(0,0,0,.9);

		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--ground:#14151A; --surface:#1D1F26; --surface-2:#262932;
	--ink:#EFEDE8; --ink-2:#C6C4BE; --muted:#96948E;
	--rule:#2C2F38; --rule-2:#3E424D;
	--accent:#9EB2E8; --accent-ink:#12161F; --accent-soft:#1E2A4D; --accent-deep:#141F42;
	--pop:#F5795F; --pop-ink:#2A0B05; --pop-graphic:#F5795F; --pop-text:#F5795F;
	--dark:#101A38; --dark-ink:#E9EBF2;
	--ok:#7CC79A; --ok-bg:#16301F;
	--warn-bg:#332711; --warn-tx:#E3B160;
	--bad-bg:#351B17; --bad-tx:#F19585;
	--shadow:0 1px 2px rgba(0,0,0,.5), 0 10px 28px -18px rgba(0,0,0,.9);
	--shadow-lg:0 2px 4px rgba(0,0,0,.5), 0 24px 48px -28px rgba(0,0,0,.9);

	color-scheme: dark;
}

/* --------------------------------------------------------------------------
   02 RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* The masthead is sticky, so anchored scrolls have to stop short of it or the
   target lands underneath. This matters most on the quote form: every failed
   submission redirects to #quote-form, and without this the error notice is
   the part that ends up hidden. */
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
	margin: 0;
	background: var(--ground);
	/* Removes the 300ms wait Safari and Chrome hold in case a tap becomes a
	   double-tap-to-zoom. Every button on the site felt slightly late without
	   it. Pinch zoom is untouched. */
	touch-action: manipulation;
	-webkit-tap-highlight-color: rgba(39,64,138,.15);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
figure img { border-radius: var(--radius); }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--pop); }

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

:where(:focus-visible) {
	outline: 3px solid var(--pop-graphic);
	outline-offset: 2px;
	border-radius: 1px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--accent);
	color: var(--accent-ink);
	padding: .75rem 1.25rem;
	font-weight: 700;
	text-decoration: none;
}
.skip-link:focus { left: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   03 LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
/* env() falls back to 0 everywhere it is not supported, so the max() is a
   no-op on desktop and only widens the gutter on notched phones in landscape,
   where the hero and footer would otherwise run under the rounded corner. */
.shell {
	max-width: var(--maxw);
	margin: 0 auto;
	padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right));
}
.shell-narrow {
	max-width: 58rem;
	margin: 0 auto;
	padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right));
}

.band { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.band-tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.band-alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-dark { background: var(--dark); color: var(--dark-ink); }
.band-dark a { color: var(--navy-200); }

.eyebrow {
	font-family: var(--mono);
	font-size: .68rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0;
}

.sec-head { max-width: 62ch; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.sec-head h2 {
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(1.9rem, 4vw, 2.9rem);
	line-height: 1.02;
	letter-spacing: .002em;
	text-transform: uppercase;
	margin: .5rem 0 0;
}
.sec-head p { margin-top: .9rem; color: var(--ink-2); font-size: 1.02rem; }
/* Short red rule under every section heading — the logo's one warm colour,
   repeated often enough to tie the pages together. */
.sec-head .rule {
	width: 3rem; height: 4px;
	background: var(--pop-graphic);
	margin-top: 1rem;
}

/* Explicit column counts rather than auto-fit.

   auto-fit picks however many tracks happen to fit, which for a known card
   count produces orphans: four cards in a 20rem auto-fit grid resolved to
   three columns at full width and left the fourth alone on its own row,
   stretched across the whole 1fr. The class names already say how many
   columns are wanted, so they now say it to the browser too — and a lone item
   on a last row keeps its column width instead of stretching. */
.grid { display: grid; gap: 1.25rem; }

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

/* Two-up is the right step down from four: three would just move the 3+1
   orphan to a narrower screen instead of removing it. */
@media (max-width: 62rem) {
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* .grid-3 holds exactly three, so it never steps through two columns — that
   would only turn one row into 2+1. Three across, then one down. */
@media (max-width: 46rem) {
	.grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   04 BUTTONS & LINKS
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-family: var(--sans);
	font-size: .88rem;
	font-weight: 700;
	line-height: 1.2;
	padding: .78rem 1.25rem;
	border: 2px solid transparent;
	border-radius: var(--radius);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--pop); color: var(--pop-ink); border-color: var(--pop); }
.btn-primary:hover { background: var(--red-700); border-color: var(--red-700); color: #fff; }
:root[data-theme="dark"] .btn-primary:hover,
:root:not([data-theme="light"]) .btn-primary:hover { background: var(--red-300); border-color: var(--red-300); color: var(--pop-ink); }

.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { background: transparent; color: var(--accent); }

.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .9; }
.btn-ghost:hover { opacity: 1; border-color: var(--pop-graphic); color: var(--pop-graphic); }

.btn-block { width: 100%; justify-content: center; }

.arrow-link {
	font-weight: 700;
	font-size: .9rem;
	text-decoration: none;
	display: inline-flex;
	gap: .35rem;
	align-items: center;
}
.arrow-link::after { content: "→"; transition: transform .15s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   05 HEADER
   -------------------------------------------------------------------------- */
.topline {
	background: var(--accent-deep);
	color: #E7EBF6;
	font-family: var(--mono);
	font-size: .74rem;
	letter-spacing: .04em;
}
.topline .shell {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	padding-top: .5rem;
	padding-bottom: .5rem;
}
.topline .badges { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }

.masthead {
	background: var(--surface);
	border-bottom: 1px solid var(--rule);
	position: sticky;
	top: 0;
	z-index: 40;
}
.masthead .shell {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding-top: .8rem;
	padding-bottom: .8rem;
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.brand-logo { height: 2.6rem; width: auto; }
.site-footer .brand-logo { height: 2.9rem; }

/* Header lockup: the arrow mark carries the red, the name carries the navy and
   the tagline sits under it in the red that is safe at text sizes. Set live
   rather than baked into the logo bitmap, so both lines stay sharp and both
   follow the theme. */
.brand-mark { height: 2.7rem; width: auto; flex: none; }
/* Only one mark is ever in the layout, so the header height cannot shift when
   the theme is switched. */
.brand-mark-ondark { display: none; }
:root[data-theme="dark"] .brand-mark-onlight { display: none; }
:root[data-theme="dark"] .brand-mark-ondark  { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .brand-mark-onlight { display: none; }
	:root:not([data-theme="light"]) .brand-mark-ondark  { display: block; }
}
.brand-lockup { display: flex; flex-direction: column; justify-content: center; gap: .18rem; }
.brand .name {
	font-family: var(--display);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: .015em;
	text-transform: uppercase;
	line-height: 1;
	color: var(--accent);
}
.brand .tag {
	font-family: var(--mono);
	font-size: .55rem;
	letter-spacing: .09em;
	text-transform: uppercase;
	line-height: 1.2;
	color: var(--pop-text);
}

.nav-toggle {
	margin-left: auto;
	display: none;
	background: transparent;
	border: 1px solid var(--rule-2);
	border-radius: var(--radius);
	color: var(--ink);
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: .55rem .7rem;
	cursor: pointer;
}

nav.main { margin-left: auto; }
nav.main ul { display: flex; gap: 1.35rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
nav.main a {
	font-size: .87rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--ink-2);
	padding: .25rem 0;
	border-bottom: 2px solid transparent;
	display: inline-block;
}
nav.main a:hover { color: var(--ink); border-bottom-color: var(--pop-graphic); }
nav.main .current-menu-item > a,
nav.main .current-menu-ancestor > a { color: var(--ink); border-bottom-color: var(--accent); }

/* Light / dark switch.

   Hidden until the head script confirms JavaScript is running, so nobody is
   offered a control that cannot work. Because that script runs before the body
   paints, the button is never visible-then-gone and the header does not shift.
   44px square meets the minimum touch target even though the glyph is 20px. */
.theme-toggle { display: none; }
.js .theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: none;
	padding: 0;
	background: transparent;
	border: 1px solid var(--rule-2);
	border-radius: var(--radius);
	color: var(--ink-2);
	cursor: pointer;
	transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.theme-toggle svg { display: block; }

/* One icon at a time: the moon offers dark, the sun offers a way back. */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

.head-cta { display: flex; align-items: center; gap: .8rem; flex: none; }
.head-phone {
	font-family: var(--display);
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: .01em;
	text-decoration: none;
	color: var(--ink);
	white-space: nowrap;
	line-height: 1.1;
}
.head-phone small {
	display: block;
	font-family: var(--mono);
	font-size: .55rem;
	letter-spacing: .13em;
	color: var(--ok);
	font-weight: 700;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   06 HERO & SPEC BAND
   -------------------------------------------------------------------------- */
/* Photo-led hero: the fleet image is the ground, with a navy scrim heavy
   enough on the text side to hold AA contrast and light enough on the far
   side that the photograph is still doing work. */
.hero {
	position: relative;
	isolation: isolate;
	background: var(--accent-deep);
	color: #F2F4FA;
	overflow: hidden;
}
.hero-bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	margin: 0;
}
.hero-bg picture { display: block; height: 100%; }
.hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(100deg, rgba(20,31,66,.96) 0%, rgba(20,31,66,.92) 38%, rgba(20,31,66,.62) 68%, rgba(20,31,66,.42) 100%);
}
.hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 5px;
	background: var(--pop-graphic);
}
.hero .shell {
	position: relative;
	padding-top: clamp(3rem, 8vw, 6rem);
	padding-bottom: clamp(3.25rem, 8vw, 6rem);
	max-width: var(--maxw);
}
.hero-copy { max-width: 34rem; }
.hero .eyebrow { color: var(--red-300); }
.hero h1 {
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(2.5rem, 6.2vw, 4.5rem);
	line-height: .95;
	letter-spacing: -.005em;
	text-transform: uppercase;
	margin: .75rem 0 0;
}
.hero h1 em { font-style: normal; color: var(--red-300); }
.hero .sub {
	font-size: 1.08rem;
	line-height: 1.55;
	max-width: 46ch;
	margin-top: 1.1rem;
	color: rgba(242,244,250,.92);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-trust {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.5rem;
	margin-top: 2rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(255,255,255,.18);
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: rgba(242,244,250,.86);
}
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust b { color: var(--red-300); }

.hero-caption {
	position: absolute;
	right: max(var(--pad), env(safe-area-inset-right));
	bottom: 1.4rem;
	max-width: 18rem;
	text-align: right;
	font-family: var(--mono);
	font-size: .68rem;
	line-height: 1.5;
	letter-spacing: .08em;
	text-transform: uppercase;
	/* The caption sits over the far side of the hero, where the scrim is only
	   .42 opaque — so against a bright sky it measured 2.24:1. Its own ground
	   makes the contrast a property of the CSS rather than of the photograph. */
	color: rgba(242,244,250,.95);
	background: rgba(15,23,50,.78);
	padding: .5rem .7rem;
	border-radius: var(--radius);
	border-right: 3px solid var(--pop-graphic);
}

/* Page hero for interior pages */
.page-hero {
	background: var(--accent-deep);
	color: #F2F4FA;
	padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(2.25rem, 4vw, 3.25rem);
	border-bottom: 5px solid var(--pop-graphic);
}
.page-hero h1 {
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(2.1rem, 5vw, 3.6rem);
	line-height: .98;
	text-transform: uppercase;
	margin: .6rem 0 0;
	max-width: 22ch;
}
.page-hero .eyebrow { color: var(--red-300); }
.page-hero .standfirst {
	margin-top: 1rem;
	font-size: 1.05rem;
	max-width: 58ch;
	color: rgba(242,244,250,.9);
}
.page-hero .hero-actions { margin-top: 1.4rem; }

/* Split hero: copy beside a photograph.

   The navy ground stays — it is the brand field and it guarantees the text
   contrast rather than depending on whatever is in the top-left of a photo.
   The photo sits as a discrete panel rather than bleeding to the edge, which
   is what lets a 4:3 phone shot sit here without being cropped to a strip. */
.page-hero-photo .shell {
	display: grid;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}
.page-hero-photo .page-hero-copy { min-width: 0; }
.page-hero-photo h1 { max-width: 16ch; }
.page-hero-photo .standfirst { max-width: 46ch; }

.page-hero-figure { margin: 0; min-width: 0; }
.page-hero-figure picture { display: block; }
.page-hero-figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius);
	/* A hairline of the logo red ties the panel to the brand without a caption. */
	border-bottom: 4px solid var(--pop-graphic);
	box-shadow: var(--shadow-lg);
}

@media (min-width: 62rem) {
	.page-hero-photo .shell { grid-template-columns: minmax(0, 1fr) 34rem; }
}

/* Below the split breakpoint the photo follows the copy, so the H1 is still
   the first thing read on a phone. */
@media (max-width: 61.999rem) {
	.page-hero-figure { margin-top: 1.75rem; }
	.page-hero-figure img { aspect-ratio: 16 / 10; }
}

.crumbs {
	font-family: var(--mono);
	font-size: .67rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(242,244,250,.62);
	margin: 0 0 .25rem;
}
/* Colour was the only thing marking these as links: 1.42:1 against the crumb
   text beside them, where WCAG 1.4.1 asks for 3:1. No ink in the palette gets
   there over the navy scrim — even pure white stops at 2.38:1 — so the
   underline carries the distinction and --dark-ink, which is one value in both
   themes, carries the contrast against the ground. */
.crumbs a {
	color: var(--dark-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
}
.crumbs a:hover { color: var(--red-300); }
.crumbs span { padding: 0 .4rem; }

/* The numbers band sits light, not dark: three stacked dark slabs in a row
   was what made the page feel heavy. */
.specs {
	background: var(--surface-2);
	color: var(--ink);
	border-bottom: 1px solid var(--rule);
}
/* The dividers are the grid gap showing the row's own background through,
   rather than a border on each cell. A border needs :first-child to clear the
   leading edge, and auto-fit wraps — so every wrapped row used to open with a
   rule hanging off nothing. A gap cannot do that, and it gives the horizontal
   dividers between wrapped rows for free. */
.specs .row {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1px;
	background: var(--rule);
}
/* Six stats: 6 across, then 3x2, then 2x3. auto-fit gave 5+1 at tablet. */
@media (max-width: 70rem) { .specs .row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .specs .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spec {
	padding: 1.5rem .85rem;
	background: var(--surface-2);
	text-align: center;
}
.spec .n {
	font-family: var(--display);
	font-size: 2.35rem;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--accent);
}
.spec .n sup { font-size: .44em; color: var(--pop-text); }
.spec .l {
	margin-top: .5rem;
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
	line-height: 1.4;
}

/* --------------------------------------------------------------------------
   07 SECTIONS, CARDS, CHIPS, STEPS
   -------------------------------------------------------------------------- */
.card {
	background: var(--surface);
	border: 1px solid var(--rule);
	border-top: 4px solid var(--accent);
	border-radius: var(--radius);
	padding: 1.5rem 1.4rem 1.6rem;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
}
.band-alt .card { background: var(--ground); }
/* :not([class]) so a heading that carries its own class — .block-head, say —
   keeps that styling. A plain .card h2 selector outranks .block-head and was
   silently turning those labels into 1.5rem display headings. */
.card h2:not([class]), .card h3:not([class]) {
	font-family: var(--display);
	font-size: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.05;
	margin: .8rem 0 .6rem;
}
.card h2 a, .card h3 a { color: inherit; text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); }
/* Restated because .card h3 above no longer matches a classed heading. */
.card .block-head { font-size: .72rem; margin-bottom: .6rem; }
.card p { font-size: .93rem; color: var(--ink-2); }
.card .card-body { flex: 1; }
.card .icon { color: var(--accent); }

.factlist {
	margin: 1rem 0 1.15rem;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .35rem .9rem;
	font-family: var(--mono);
	font-size: .73rem;
	border-top: 1px solid var(--rule);
	padding-top: .9rem;
}
.factlist dt { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.factlist dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
	font-family: var(--mono);
	font-size: .76rem;
	font-weight: 600;
	padding: .42rem .7rem;
	background: var(--surface);
	border: 1px solid var(--rule-2);
	border-radius: var(--radius);
	color: var(--ink-2);
}
.band-alt .chip { background: var(--ground); }
/* Two classes, not one: `.band-alt .chip` above is also (0,2,0), and a plain
   `.chip-key` loses to it — which stripped the navy ground off the key chips
   inside alt bands while leaving their text white. Invisible, in both themes. */
.chip.chip-key { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.block-head {
	font-family: var(--mono);
	font-size: .72rem;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 .9rem;
	padding-bottom: .5rem;
	border-bottom: 1px solid var(--rule);
}

/* Four process steps, so the same ladder as .grid-4: never 3+1. */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 62rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step { padding: 1.4rem 1.35rem; border-left: 3px solid var(--rule); }
.step:first-child { border-left-color: var(--pop-graphic); }
.step .num { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.step h3 { font-size: 1.02rem; margin: .5rem 0 .4rem; }
.step p { font-size: .89rem; color: var(--ink-2); margin: 0; }
.step .when {
	display: inline-block;
	margin-top: .7rem;
	font-family: var(--mono);
	font-size: .67rem;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--accent);
	background: var(--accent-soft);
	padding: .22rem .5rem;
	border-radius: var(--radius);
}
:root[data-theme="dark"] .step .when,
:root:not([data-theme="light"]) .step .when { color: var(--navy-100); }

/* Four trust items. At 1024 the auto-fit version resolved to three columns and
   orphaned the fourth. */
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 62rem) { .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .trust-grid { grid-template-columns: minmax(0, 1fr); } }
.trust { display: flex; gap: .9rem; align-items: flex-start; }
.trust .mark {
	flex: none;
	min-width: 2.6rem; height: 2.6rem;
	padding: 0 .4rem;
	display: grid; place-items: center;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: var(--radius);
	font-family: var(--display);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: .02em;
}
.trust h3 { font-size: .97rem; margin: 0 0 .25rem; }
.trust p { font-size: .86rem; color: var(--muted); margin: 0; }

.callout {
	background: var(--accent-soft);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius);
	padding: 1.1rem 1.25rem;
	margin: 1.75rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

/* The short answer at the top of a guide or article. A callout in the logo red
   rather than the accent blue, so it does not read as one of the page's own
   asides; it is the page's answer, set apart from the long version. */
.short-answer {
	background: var(--accent-soft);
	border-left: 4px solid var(--pop-graphic);
	border-radius: var(--radius);
	padding: 1.1rem 1.25rem;
	margin: 0 0 2rem;
}
.short-answer p { margin: 0 0 .6rem; max-width: 75ch; }
.short-answer p:last-child { margin-bottom: 0; }
.short-answer-k {
	font-family: var(--mono);
	font-size: .68rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--pop-text);
	font-weight: 700;
}
.short-answer-cta { font-size: .9rem; color: var(--ink-2); }

.cta-band {
	background: var(--accent-deep);
	color: #F2F4FA;
	padding: clamp(2.25rem,5vw,3.5rem) 0;
	border-top: 5px solid var(--pop-graphic);
}
.cta-band .inner {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
	justify-content: space-between;
}
.cta-band h2 {
	font-family: var(--display);
	font-size: clamp(1.7rem, 3.5vw, 2.5rem);
	text-transform: uppercase;
	line-height: 1.03;
	margin: 0;
	max-width: 20ch;
}
.cta-band p { margin: .6rem 0 0; color: rgba(242,244,250,.88); max-width: 46ch; }
.cta-band .actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.callbox {
	padding: 1.15rem 1.25rem;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: var(--radius);
}
/* Contact facts row: the callbox and the two cards sit in one grid row, so
   they need to agree on how they fill it. The callbox is a plain block, the
   cards are flex columns, and both stretch to the tallest. */
.contact-facts > * { height: 100%; }
.contact-facts .callbox { display: flex; flex-direction: column; }
.contact-facts .callbox p { margin-top: .6rem; }
/* Below the split breakpoint each of these cards is ~227px, and a two-column
   term/value list in that width wraps both halves onto two lines each. Stack
   them instead: label, then value, left aligned. */
@media (max-width: 62rem) {
	.contact-facts .factlist { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
	.contact-facts .factlist dd { text-align: left; margin-bottom: .45rem; }
}

/* The jump list earns its place at the top of a stacked layout; the "still
   need an answer" card does not, sitting above the answers. The closing CTA
   band already carries the same call to action, and the footer carries the
   same two resource links. */
@media (max-width: 62rem) {
	.faq-aside .card { display: none; }
}
/* The one number each card is really answering, set at display size so the row
   scans in one pass. */
.card .fact-lead {
	font-family: var(--display);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 .5rem;
}

.callbox .k {
	font-family: var(--mono);
	font-size: .64rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .85;
}
.callbox .v {
	font-family: var(--display);
	font-size: 2rem;
	font-weight: 700;
	margin-top: .2rem;
	display: block;
	text-decoration: none;
	color: inherit;
}
.callbox p { font-size: .84rem; margin: .5rem 0 0; opacity: .88; }

/* --------------------------------------------------------------------------
   08 FORMS
   -------------------------------------------------------------------------- */
.form-card {
	background: var(--surface);
	border: 1px solid var(--rule);
	border-top: 4px solid var(--pop-graphic);
	border-radius: var(--radius);
	padding: 1.75rem 1.6rem 1.85rem;
	box-shadow: var(--shadow);
}
.band-alt .form-card { background: var(--ground); }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .95rem; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label {
	font-family: var(--mono);
	/* Was .65rem — 10.4px, uppercase, tracked out. Legible enough to skim,
	   not to fill in accurately, on the one form the business runs on. */
	font-size: .74rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 700;
}
.field .req { color: var(--pop); }
.field input, .field select, .field textarea {
	font-family: var(--sans);
	font-size: .95rem;
	padding: .62rem .7rem;
	background: var(--ground);
	border: 1px solid var(--rule-2);
	border-radius: var(--radius);
	color: var(--ink);
	width: 100%;
}
.band-alt .field input, .band-alt .field select, .band-alt .field textarea { background: var(--surface); }
.field textarea { resize: vertical; min-height: 5rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field .hint { font-size: .76rem; color: var(--muted); }
.field-error input, .field-error select, .field-error textarea { border-color: var(--bad-tx); }
.field .err { font-size: .76rem; color: var(--bad-tx); font-weight: 600; }

/* Honeypot — hidden from people, visible to bots. Not display:none, which
   some bots detect and skip. */
.hp-field {
	position: absolute !important;
	left: -9999px;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* The search form used to borrow .fields and then override its grid with an
   inline style — which also beat the single-column rule at 40rem, so on a
   phone the input stayed crushed beside the button. Its own two rules instead. */
.search-form { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: end; }
@media (max-width: 30rem) { .search-form { grid-template-columns: 1fr; } }

.form-foot {
	margin-top: 1.3rem;
	display: flex;
	flex-wrap: wrap;
	gap: .9rem;
	align-items: center;
	justify-content: space-between;
}
.form-foot .note { font-size: .78rem; color: var(--muted); margin: 0; max-width: 30ch; }

.notice {
	border-radius: var(--radius);
	padding: 1rem 1.15rem;
	margin-bottom: 1.5rem;
	font-size: .95rem;
	border-left: 4px solid;
}
.notice p:last-child { margin-bottom: 0; }
.notice ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.notice li { margin-bottom: .2rem; }
.notice a { color: inherit; font-weight: 700; }
/* The summary is the one place a link has to be unmissable, so it keeps its
   underline rather than relying on colour that already matches the notice. */
.notice a:hover { text-decoration: none; }
.notice-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.notice-bad { background: var(--bad-bg); color: var(--bad-tx); border-color: var(--bad-tx); }
.notice-warn { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-tx); }

/* --------------------------------------------------------------------------
   09 TABLES & PROSE
   -------------------------------------------------------------------------- */
.prose { max-width: var(--maxw-prose); }
.prose h2 {
	font-family: var(--display);
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	text-transform: uppercase;
	line-height: 1.05;
	margin: 2.5rem 0 .75rem;
}
.prose h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.prose > *:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--pop-graphic); }
.prose blockquote {
	margin: 1.75rem 0;
	padding: .25rem 0 .25rem 1.25rem;
	border-left: 4px solid var(--accent);
	color: var(--ink-2);
	font-size: 1.05rem;
}

/* A horizontally scrolling region has to be focusable or a keyboard user can
   never reach the columns hidden off the right edge — the services comparison
   table is the one that matters. The markup carries tabindex="0" and
   role="region"; this gives that focus somewhere to show. */
.table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.5rem 0;
	scroll-padding-left: 1rem;
}
.table-scroll:focus-visible {
	outline: 3px solid var(--pop-graphic);
	outline-offset: 3px;
}
/* Scroll shadows that hide themselves at each end. The two `local` gradients
   scroll with the content and sit on top of the two `scroll` shadows, so the
   shadow at an edge is covered exactly when that edge is reached. No JS, and
   no fade permanently clipping the last column. */
.table-scroll {
	--scroll-edge: var(--ground);
	background:
		linear-gradient(to right, var(--scroll-edge) 40%, transparent) left center / 3rem 100% no-repeat local,
		linear-gradient(to left,  var(--scroll-edge) 40%, transparent) right center / 3rem 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%,   rgba(20,24,36,.16), transparent) left center / 1.1rem 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, rgba(20,24,36,.16), transparent) right center / 1.1rem 100% no-repeat scroll;
}
.band-alt .table-scroll { --scroll-edge: var(--surface); }
table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9rem;
	min-width: 34rem;
}
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--rule); }
thead th {
	font-family: var(--mono);
	font-size: .66rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
	border-bottom: 2px solid var(--rule-2);
	white-space: nowrap;
}
tbody tr:hover { background: var(--surface-2); }
td + td, th + th { font-variant-numeric: tabular-nums; }

/* FAQ.

   The narrow column is the navigation, not the content — the reverse of
   .split, which gives 1.1fr to the right-hand column. Twenty answers in a
   518px column made a 4,300px page; here they get the width. */
.faq-layout { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 62.001rem) {
	.faq-layout { grid-template-columns: 17rem minmax(0, 1fr); }
}

.faq-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: faq-group; }
.faq-nav li { counter-increment: faq-group; }
.faq-nav a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	padding: .6rem 0;
	border-bottom: 1px solid var(--rule);
	font-size: .92rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--ink-2);
}
.faq-nav a::before {
	content: counter(faq-group, decimal-leading-zero);
	font-family: var(--mono);
	font-size: .68rem;
	letter-spacing: .1em;
	color: var(--muted);
	margin-right: -.35rem;
}
.faq-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* Count of questions in the group, so the list says how much is behind each. */
.faq-nav a span {
	margin-left: auto;
	font-family: var(--mono);
	font-size: .7rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* The groups are native <details> disclosures now — twenty always-open answers
   were what made this page 4,300px long. Spacing below is deliberately tighter
   than the rest of the site for the same reason. */
.faq-group + .faq-group { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.faq-group-head {
	font-family: var(--display);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.05;
	margin: 0 0 .25rem;
	padding-bottom: .6rem;
	border-bottom: 3px solid var(--pop-graphic);
}

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

/* The row padding sits on the summary rather than on .faq-item, so the padded
   area is inside the tap target instead of a dead margin around it. */
.faq-item > summary {
	display: flex;
	align-items: center;
	gap: .9rem;
	min-height: 44px;
	padding: .8rem 0;
	cursor: pointer;
	/* Safari ignores this and needs the ::-webkit-details-marker rule below. */
	list-style: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--accent); }
.faq-item > summary:focus-visible {
	outline: 3px solid var(--pop-graphic);
	outline-offset: 2px;
	border-radius: 1px;
}

/* Chevron drawn from two borders, so it depends on no font and no icon file.
   The translateY keeps it optically centred through the half turn. */
.faq-item > summary::after {
	content: "";
	flex: none;
	margin-left: auto;
	width: .5rem;
	height: .5rem;
	border-right: 2px solid var(--accent);
	border-bottom: 2px solid var(--accent);
	transform: translateY(-.14em) rotate(45deg);
	transition: transform .18s ease;
}
.faq-item[open] > summary::after { transform: translateY(.1em) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) {
	.faq-item > summary::after { transition: none; }
}

/* Open drops the question's lower padding to the .25rem the heading margin
   used to give; the answer supplies the rest of the row. */
.faq-item[open] > summary { padding-bottom: .25rem; }

/* margin:0 so the heading does not push itself out of the summary's flex line.
   The type scale is unchanged. */
.faq-item h2, .faq-item h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.faq-a { padding-bottom: .8rem; }
.faq-item p { margin: 0; color: var(--ink-2); max-width: 68ch; }
.faq-a > * + * { margin-top: .6rem; }

/* Glossary.

   Same proportions as .faq-layout and for the same reason — the definitions
   are the content and the index is the navigation, where .split had it the
   other way round and gave the list the 518px side. */
.gloss-layout { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 62.001rem) {
	.gloss-layout { grid-template-columns: 17rem minmax(0, 1fr); }
}

/* The whole alphabet is printed, so the block does not change shape as terms
   are added; only the letters with entries behind them are links. */
.gloss-index ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
}
.gloss-index li { display: flex; }
.gloss-index a,
.gloss-index .is-empty {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	font-family: var(--mono);
	font-size: .82rem;
	font-weight: 700;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
}
.gloss-index a { color: var(--accent); text-decoration: none; }
.gloss-index a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.gloss-index .is-empty { color: var(--muted); opacity: .45; border-style: dashed; }
.gloss-count {
	margin: .9rem 0 0;
	font-family: var(--mono);
	font-size: .72rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
}

/* Below the split the index is the one thing worth keeping at the top of the
   page; the card is not, for the reason set out over .faq-aside. */
@media (max-width: 62rem) {
	.gloss-aside .card { display: none; }
	.gloss-index a,
	.gloss-index .is-empty { width: 2.75rem; height: 2.75rem; }
}

.gloss-group + .gloss-group { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.gloss-letter {
	font-family: var(--display);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 700;
	line-height: 1.05;
	margin: 0;
	padding-bottom: .6rem;
	border-bottom: 3px solid var(--pop-graphic);
}

.deflist dt {
	font-weight: 700;
	font-family: var(--mono);
	font-size: .9rem;
	color: var(--accent);
	margin-top: 1.25rem;
}
.deflist dd { margin: .25rem 0 0; color: var(--ink-2); font-size: .95rem; max-width: 68ch; }
.deflist dd p { margin: 0; }

/* The anchor affordance stays out of the way until the row is hovered or the
   link itself is tabbed to, which is the only way it can be reached by
   keyboard. It is never the only route to a term — the address bar carries the
   same fragment once the link is followed. */
.gloss-permalink {
	margin-left: .4rem;
	color: var(--muted);
	text-decoration: none;
	opacity: 0;
	transition: opacity .15s ease;
}
.deflist dt:hover .gloss-permalink,
.gloss-permalink:focus-visible { opacity: 1; }
.gloss-permalink:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
	.gloss-permalink { transition: none; }
}

/* A term arrived at by fragment marks itself, so a reader following a link
   from an article can see which of thirty definitions they were sent to. */
.deflist dt:target,
.deflist dt:target + dd {
	border-left: 3px solid var(--accent);
	padding-left: .9rem;
	/* Pulls the row back so the marker sits in the gutter rather than indenting
	   the text away from the definitions above and below it. */
	margin-left: -1.2rem;
}

.gloss-see { margin: .45rem 0 0; font-size: .85rem; }
.gloss-see span {
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-right: .35rem;
}
.gloss-see a { color: var(--ink-2); text-decoration-color: var(--rule-2); }
.gloss-see a + a { margin-left: .5rem; }
.gloss-see a:hover { color: var(--accent); }
.gloss-more { margin: .45rem 0 0; }
.gloss-more .arrow-link { font-size: .85rem; }

/* Post/blog listing */
/* Post count varies, so a partial last row is unavoidable — but with explicit
   tracks the leftover card keeps its column width instead of stretching to the
   full width of the grid. */
.post-list { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 62rem) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 44rem) { .post-list { grid-template-columns: minmax(0, 1fr); } }
.post-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card .pad { padding: 1.15rem 1.25rem 1.35rem; }
.post-card h2 { font-size: 1.2rem; margin: .3rem 0 .5rem; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card time { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-card p { font-size: .9rem; color: var(--ink-2); margin: 0; }

.pagination { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 2rem; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: .45rem .9rem;
	border: 1px solid var(--rule-2);
	border-radius: var(--radius);
	text-decoration: none;
	font-size: .85rem;
	font-weight: 600;
}
.pagination .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   10 FOOTER
   -------------------------------------------------------------------------- */
.site-footer { background: var(--dark); color: var(--dark-ink); padding: 3rem 0 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; }
.site-footer h2 {
	font-family: var(--mono);
	font-size: .66rem;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--red-300);
	margin: 0 0 .8rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: rgba(232,235,242,.82); text-decoration: none; font-size: .88rem; }
.site-footer a:hover { color: var(--red-300); }
.site-footer .brand .name { color: #fff; }
.site-footer .about { font-size: .87rem; color: rgba(232,235,242,.66); margin-top: .9rem; max-width: 36ch; }
.foot-phone {
	font-family: var(--display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--red-300) !important;
	text-decoration: none;
}
.foot-legal {
	margin-top: 2.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255,255,255,.14);
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.75rem;
	font-family: var(--mono);
	font-size: .68rem;
	letter-spacing: .05em;
	color: rgba(232,235,242,.6);
}

/* --------------------------------------------------------------------------
   11 UTILITIES & RESPONSIVE
   -------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.split-even { grid-template-columns: 1fr 1fr; }

/* Sticky sidebar column.

   align-items:start above sizes every grid item to its own content, which
   leaves a position:sticky child with a containing block exactly its own
   height — zero travel, so it scrolls away like static content and the short
   column becomes a long empty gutter. On /faq/ that gutter measured 2668px.
   Stretching just this column back to the row height gives the card somewhere
   to travel; `top` clears the sticky masthead. */
.split > .col-sticky { align-self: stretch; }

/* Sticky is opt-in on two conditions, so it is static by default and only
   engages where it actually helps:
     min-width  — below the split breakpoint the columns stack, so there is no
                  gutter to fill and a sticky card would just cover the content
                  it sits above.
     min-height — a sticky block taller than the viewport pins its top and puts
                  its own bottom permanently out of reach. The tallest of these
                  is the contact form at ~644px, so 46rem of viewport leaves
                  room for it plus the 6rem offset. */
@media (min-width: 62.001rem) and (min-height: 46rem) {
	.col-sticky > .sticky { position: sticky; top: 6rem; }
}
.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; }
/* A hard break that only applies once there is room for it. Below this the H1
   wraps on its own and text-wrap:balance evens the lines. */
.br-lg { display: none; }
@media (min-width: 34rem) { .br-lg { display: inline; } }
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* Below the full shell width the nav, phone and quote button take the whole
   bar, so the tagline is dropped rather than allowed to wrap the header onto a
   second line. The name and mark always stay. */
@media (max-width: 78rem) {
	.masthead .brand .tag { display: none; }
}

@media (max-width: 62rem) {
	.hero-caption { display: none; }
	.split, .split-even { grid-template-columns: 1fr; }
	.foot-grid { grid-template-columns: 1fr 1fr; }

	.nav-toggle { display: block; }
	nav.main {
		display: none;
		flex-basis: 100%;
		order: 10;
		margin-left: 0;
		border-top: 1px solid var(--rule);
		padding-top: .9rem;
		margin-top: .3rem;
	}
	nav.main.is-open { display: block; }
	/* The nav is inside a sticky header, so it is bounded by the viewport, not
	   by the page. In landscape on a phone the last items were unreachable. */
	nav.main.is-open ul {
		max-height: calc(100svh - 9rem);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	nav.main ul { flex-direction: column; gap: .1rem; }
	/* .55rem gave a 36px row. The nav is the primary way around the site on a
	   phone, so it gets the full 44px target. */
	nav.main a { display: block; padding: .78rem 0; border-bottom: 1px solid var(--rule); }
	.masthead .shell { flex-wrap: wrap; }
	.head-cta { order: 5; }
}

@media (max-width: 40rem) {
	.fields { grid-template-columns: 1fr; }
	.foot-grid { grid-template-columns: 1fr; }
	.step { border-left: 0; border-top: 3px solid var(--rule); }
	.step:first-child { border-top-color: var(--pop-graphic); }
	.head-phone { font-size: 1.15rem; }
	/* Was hiding the whole second group, which took the 1-Stop/VBS claim off
	   every phone. Only the two long secondary lines go now. */
	.topline .badge-wide { display: none; }
}

@media print {
	.masthead, .topline, .cta-band, .site-footer, .hero-actions, .nav-toggle { display: none !important; }
	body { background: #fff; color: #000; }

	/* A closed <details> prints nothing, so the JS forces every .faq-item open
	   before the dialog. Nothing here may hide or clip .faq-a — no display:none,
	   no content-visibility — or the answers go missing from the printed page. */
	.faq-item > summary::after { display: none; }
	.faq-item { break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   12 HERO MOTION & SCROLL REVEALS
   -------------------------------------------------------------------------- */
/* Everything in this section is gated on html.js, which inc/theme-mode.php
   stamps in a blocking inline script before first paint. Two consequences,
   both wanted: nothing here can appear and then be hidden a moment later, and
   with JavaScript off the page is the static page it has always been — no
   drift, no fade, and nothing sitting invisible waiting on a script that is
   never going to run. */

/* Hero drift.
   Twenty-two per cent over sixteen seconds — unmistakably moving. Three passes
   got here and the history is worth keeping, because the mistake it records is
   an easy one to repeat:

     6% / 34s   about a third of a per cent per second. Below the threshold at
                which anyone registers movement at all. Read as nothing.
     12% / 22s  noticeable if you looked at it, invisible if you did not.
     22% / 16s  current. Reads as a moving image rather than a still.

   Aiming for "depth, not animation" and landing on "nothing" is the trap. If
   this needs moving again, the two numbers are the scale below and the
   duration here, and they travel together: a larger scale over the same time
   reads as lurching, the same scale over a longer time reads as nothing.

   Held back to >= 62rem, the width at which .hero-caption is also allowed on
   screen: phones keep the static frame, which is the right answer for battery,
   for data, and for the fact that the hero is about one thumb-flick tall down
   there anyway. */
@media (min-width: 62rem) {
	.js .hero-bg picture {
		animation: hero-drift 16s ease-in-out infinite alternate;
		transform-origin: 62% 55%;
		will-change: transform;
	}
	.js .hero-bg.is-paused picture,
	.js .hero-bg.is-offscreen picture { animation-play-state: paused; }
}
/* Starts fractionally scaled rather than at 1, so the edges of the photograph
   never travel inside the frame at the bottom of the cycle. */
@keyframes hero-drift {
	from { transform: scale(1.02); }
	to   { transform: scale(1.22); }
}

/* Hero entrance.
   The drift is ambient — you notice it only if you stop and watch. This is the
   part that is actually felt, because it happens in the second and a half a
   visitor spends deciding whether this is a real company: the headline, the
   standfirst and the buttons arrive in sequence rather than being there all at
   once. Without it the page loads as a photograph with text welded to it, and
   no amount of ambient drift reads as "this site is alive".

   NOTE THE ABSENCE OF `opacity: 0` ON THE BASE RULE. The hidden state lives in
   the keyframe and is held by `backwards` during the delay only. So if the
   animation never runs — no support, a stylesheet that half-loaded, anything —
   the natural state of these elements is fully visible. The headline can never
   be left invisible by this.

   Runs at every width. It is over before a phone visitor has finished the
   scroll they started with, and costs nothing on a connection where the text
   is already there. */
@keyframes hero-enter {
	from { opacity: 0; transform: translateY(18px); }
	to   { opacity: 1; transform: none; }
}
/* Both heroes: the homepage's full-bleed one and the split hero every interior
   page uses. Same keyframe, same stagger, so a visitor moving from the front
   page to Services does not cross a line where the site stops being alive.

   The interior hero gets the entrance but NOT the drift. Its photograph is a
   framed 4:3 panel carrying a rounded corner, a shadow and the red hairline
   along the bottom — scaling that pushes the hairline out of frame, and a
   small framed photo that fidgets reads quite differently from a full-bleed
   scrim that breathes. Drift belongs to the scrim only. */
.js .hero-copy > *,
.js .page-hero-copy > * {
	animation: hero-enter .62s cubic-bezier(.22,.61,.36,1) backwards;
}
.js .hero-copy > *:nth-child(1),
.js .page-hero-copy > *:nth-child(1) { animation-delay: .06s; }
.js .hero-copy > *:nth-child(2),
.js .page-hero-copy > *:nth-child(2) { animation-delay: .15s; }
.js .hero-copy > *:nth-child(3),
.js .page-hero-copy > *:nth-child(3) { animation-delay: .26s; }
.js .hero-copy > *:nth-child(4),
.js .page-hero-copy > *:nth-child(4) { animation-delay: .37s; }
.js .hero-copy > *:nth-child(5),
.js .page-hero-copy > *:nth-child(5) { animation-delay: .48s; }
/* The photograph panel arrives as one piece, just behind the copy it sits
   beside rather than competing with it. */
.js .page-hero-figure {
	animation: hero-enter .7s cubic-bezier(.22,.61,.36,1) .2s backwards;
}
/* The caption and the pause control are the last things in, well after the
   copy has settled, so they arrive as detail rather than as competition. */
.js .hero-caption,
.js .motion-toggle:not([hidden]) {
	animation: hero-enter .6s cubic-bezier(.22,.61,.36,1) .72s backwards;
}

/* Hero footage.
   Over the photograph, never instead of it. Opacity is the only property that
   changes when it becomes ready, so nothing reflows and there is no moment
   where the hero is a blank navy box waiting on a download. */
.hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1.2s ease;
	pointer-events: none;
}
.hero-bg.is-playing .hero-video { opacity: 1; }

/* The pause control.
   Bottom left, opposite the caption, and deliberately quiet — WCAG 2.2.2 asks
   for a way to stop anything that moves for more than five seconds. That makes
   it a requirement, not a feature to advertise. Hidden until site.js starts
   something worth stopping. */
.motion-toggle {
	position: absolute;
	left: max(var(--pad), env(safe-area-inset-left));
	bottom: 1.4rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	cursor: pointer;
	color: rgba(242,244,250,.95);
	background: rgba(15,23,50,.78);
	border: 1px solid rgba(255,255,255,.22);
	border-radius: var(--radius);
	transition: background-color .2s ease, border-color .2s ease;
}
.motion-toggle:hover {
	background: rgba(15,23,50,.92);
	border-color: rgba(255,255,255,.42);
}
.motion-toggle[hidden] { display: none; }
.motion-toggle .icon-play { display: none; }
.hero-bg.is-paused ~ .motion-toggle .icon-pause { display: none; }
.hero-bg.is-paused ~ .motion-toggle .icon-play { display: inline-flex; }

/* Scroll reveals.
   Every page, not just the homepage. site.js reveals everything on any error
   and on a scroll that produces no reveal, so a band cannot end up permanently
   invisible because a script failed halfway.

   NOTHING CONTAINING A FORM IS EVER HIDDEN.
   The quote form is the entire commercial point of this site, and the lead
   pipeline is deliberately kept in a must-use plugin so a theme change cannot
   take it down. It would be absurd to then hide it behind an animation. Any
   .shell child with a form inside is exempt below and stays at full opacity
   from first paint, so no combination of failures can cost an enquiry.

   Where :has() is unavailable the exemption does not apply, but the element is
   still observed and still revealed on scroll — both paths end with a visible
   form, which is the only outcome that matters. */
.js .band .shell > * {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
}
.js .band .shell > *:nth-child(2) { transition-delay: .09s; }
.js .band .shell > *:nth-child(3) { transition-delay: .18s; }
.js .band .shell > *:nth-child(4) { transition-delay: .27s; }
.js .band .shell > .is-revealed { opacity: 1; transform: none; }
.js .reveals-off .band .shell > * { opacity: 1; transform: none; }
.js .band .shell > *:has(form),
.js .band .grid > .card:has(form),
.js .steps > .step:has(form) {
	opacity: 1;
	transform: none;
	transition: none;
}

/* Per-item stagger.
   Three blocks on this site are a row of peers rather than one object: the
   stats bar, the service cards and the four process steps. Revealing their
   container fades the row in as a slab, which is the one shape this effect
   has nothing to say about. So the item carries the motion and the container
   is stood down — nothing animates twice, and the wrapper keeps its layout.

   .specs IS NOT A .shell CHILD. It is a section in its own right, sitting
   between the hero and the first .band, which is why the observer above never
   saw it and why site.js names it explicitly alongside the band selector. The
   reveal class lands on the section; the stagger hangs off it.

   Duration, easing and travel are the block reveal's, unchanged, so a
   staggered group and a plain one arriving on the same screen read as one
   effect and not as two.

   STRUCTURAL REQUIREMENT — .grid AND .steps MUST STAY DIRECT CHILDREN OF
   .band .shell. is-revealed is applied by site.js to what it observes, and it
   observes `.band .shell > *` and `.specs` — the wrapper, never the items. The
   rules below hide the items and un-hide them from a class on their wrapper,
   so a wrapper the observer cannot see is a wrapper that never gets the class,
   and its cards or steps stay at opacity 0 for the life of the page. Nesting a
   .grid one level deeper — inside a .split column, a new wrapper div, anything
   — silently empties it.

   All ten .grid and .steps instances on the site are direct .shell children
   today: aardiv_service_cards() at four call sites, aardiv_process_steps() at
   two, and the hand-written grids on the front page, 404, contact, resources
   and where-we-deliver. If you add an eleventh, keep it at that depth, or move
   the reveal to the new wrapper and add it to the site.js selector. */
.js .band .shell > .grid,
.js .band .shell > .steps {
	opacity: 1;
	transform: none;
	transition: none;
}
.js .specs .spec,
.js .band .grid > .card,
.js .steps > .step {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
}
/* .06s, not the .09s used between .shell children. These arrive across a row
   rather than down a page, and six specs at .09s put the last one two thirds
   of a second behind the first — which reads as a queue forming instead of a
   sweep. No card grid or step row on this site runs past four items, so the
   shared delays stop there; the stats bar is the only block reaching six. */
.js .specs .spec:nth-child(2),
.js .band .grid > .card:nth-child(2),
.js .steps > .step:nth-child(2) { transition-delay: .06s; }
.js .specs .spec:nth-child(3),
.js .band .grid > .card:nth-child(3),
.js .steps > .step:nth-child(3) { transition-delay: .12s; }
.js .specs .spec:nth-child(4),
.js .band .grid > .card:nth-child(4),
.js .steps > .step:nth-child(4) { transition-delay: .18s; }
.js .specs .spec:nth-child(5) { transition-delay: .24s; }
.js .specs .spec:nth-child(6) { transition-delay: .30s; }
.js .specs.is-revealed .spec,
.js .band .shell > .grid.is-revealed > .card,
.js .band .shell > .steps.is-revealed > .step { opacity: 1; transform: none; }
/* The escape hatches reach the items too. site.js sets reveals-off on the
   body for all three of its failure paths — no IntersectionObserver, a throw,
   and an observer that is built without complaint and then never calls back —
   so every one of them has to put these back as well, or a script failure
   would empty the stats bar instead of the bands. */
.js .reveals-off .specs .spec,
.js .reveals-off .band .grid > .card,
.js .reveals-off .steps > .step { opacity: 1; transform: none; }

/* The global reduced-motion rule at the top of this file collapses every
   duration to nothing, which would leave a reveal correct but pointless and
   the drift stuttering at one frame. Switch both off outright instead. */
@media (prefers-reduced-motion: reduce) {
	.js .hero-bg picture { animation: none; }
	.js .hero-copy > *,
	.js .page-hero-copy > *,
	.js .page-hero-figure,
	.js .hero-caption,
	.js .motion-toggle:not([hidden]) { animation: none; }
	.js .band .shell > * { opacity: 1; transform: none; }
	.js .specs .spec,
	.js .band .grid > .card,
	.js .steps > .step { opacity: 1; transform: none; }
}

@media print {
	.motion-toggle { display: none !important; }
	.hero-video { display: none !important; }
	/* transition as well as opacity. Switching to print media only sets the
	   target value, so with the transition still live the reveal runs during
	   the print job and the page rasterises part-faded — measured at .14 the
	   instant print media applies, reaching 1 only after .65s. Whether a given
	   print lands inside that window is a race. Nothing printed should depend
	   on an animation having finished. */
	.band .shell > *,
	.specs .spec,
	.band .grid > .card,
	.steps > .step {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* --------------------------------------------------------------------------
   13 CONTAINER VIEWER
   -------------------------------------------------------------------------- */
/* A shipping container drawn in CSS. Six faces hung on a zero-size origin,
   sized from ISO external dimensions in metres and scaled by --u, the
   pixels-per-metre unit. Because every face derives its size and position from
   --l, --w and --h through calc(), changing those three numbers changes the
   whole box — which is all the type switcher does, and why one container
   morphs into another rather than cutting.

   WHY THIS IS CSS AND NOT WebGL
   A container is a rectangular box and the only interesting surface detail is
   corrugation, which is a repeating gradient. Three.js would have cost about
   600 KB and a bundler, and taken the theme's no-build-step deployment with it.

   COUPLING WORTH KNOWING ABOUT
   The four ids below (#c3d-20gp and friends) are the array keys from
   aardiv_container_models() in inc/business.php, and the metre figures are the
   same ones that function returns. A fifth container type means adding it in
   both places. Four ISO types have been stable since 1968, so this was left as
   the simpler of the two designs. */

/* Registering the three dimensions as typed properties is what lets them be
   transitioned at all — an unregistered custom property jumps. This is the
   entire reason a 20' morphs smoothly into a 45'. Browsers without @property
   still switch, just instantly. */
@property --l { syntax: "<number>"; inherits: true; initial-value: 12.192; }
@property --w { syntax: "<number>"; inherits: true; initial-value: 2.438; }
@property --h { syntax: "<number>"; inherits: true; initial-value: 2.896; }

.c3d {
	--u: clamp(11px, 2.6vw, 24px);
	--rx: -14deg;
	--ry: 34deg;
	--skin: #B4392A;
	--skin-hi: #CC4632;
	--skin-lo: #7E2A1F;
	--skin-dk: #5E2017;

	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	margin-bottom: 2.5rem;
}

.c3d-viewport { min-width: 0; }

.c3d-stage {
	position: relative;
	height: clamp(230px, 30vw, 330px);
	perspective: 1500px;
	perspective-origin: 50% 45%;
	border-radius: var(--radius);
	background:
		radial-gradient(120% 80% at 50% 15%, rgba(255,255,255,.06), transparent 70%),
		var(--accent-deep);
	overflow: hidden;
	cursor: grab;
	/* Vertical swipes still scroll the page; horizontal ones rotate the box. */
	touch-action: pan-y;
}
.c3d-stage:active { cursor: grabbing; }

/* Zero-size element at the centre of the stage. Every face positions itself
   against this one origin, so the box stays centred whatever its dimensions. */
.c3d-box {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	transform-style: preserve-3d;
	transform: rotateX(var(--rx)) rotateY(var(--ry));
	transition:
		--l .5s cubic-bezier(.22,.61,.36,1),
		--w .5s cubic-bezier(.22,.61,.36,1),
		--h .5s cubic-bezier(.22,.61,.36,1);
}

.c3d-face {
	position: absolute;
	left: 0;
	top: 0;
	/* A closed opaque box: a face turned away is one that should not be
	   showing through the near faces, and hiding it avoids the z-fighting that
	   appears at shallow angles. */
	backface-visibility: hidden;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.38);
}

/* Corrugation is a repeating gradient, which is what corrugation is. Vertical
   ribs on the sides and doors, lengthwise on the roof. */
.c3d-side {
	width: calc(var(--l) * var(--u));
	height: calc(var(--h) * var(--u));
	background:
		repeating-linear-gradient(90deg,
			rgba(0,0,0,.22) 0 1px,
			rgba(255,255,255,.07) 1px 4px,
			rgba(0,0,0,.10) 4px 8px,
			rgba(255,255,255,.03) 8px 11px),
		linear-gradient(180deg, var(--skin-hi) 0%, var(--skin) 62%, var(--skin-lo) 100%);
	transform: translate(-50%, -50%) translateZ(calc(var(--w) * var(--u) / 2));
}
/* The flat structural rails a corrugated side is welded between. Without them
   the ribs run edge to edge and the whole thing reads as fabric. */
.c3d-side::before,
.c3d-side::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: calc(var(--h) * var(--u) * .09);
	background: linear-gradient(180deg, var(--skin-hi), var(--skin-lo));
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.28);
}
.c3d-side::before { top: 0; }
.c3d-side::after { bottom: 0; }

.c3d-left {
	transform: translate(-50%, -50%) rotateY(180deg) translateZ(calc(var(--w) * var(--u) / 2));
	filter: brightness(.74);
}

.c3d-end {
	width: calc(var(--w) * var(--u));
	height: calc(var(--h) * var(--u));
	background: linear-gradient(180deg, var(--skin) 0%, var(--skin-lo) 100%);
}
/* The doors: centre seam, four locking bars, and the CSC plate. */
.c3d-doors {
	background:
		linear-gradient(90deg,
			transparent calc(50% - 1px), rgba(0,0,0,.5) calc(50% - 1px),
			rgba(0,0,0,.5) calc(50% + 1px), transparent calc(50% + 1px)),
		repeating-linear-gradient(90deg,
			transparent 0 11%, rgba(0,0,0,.30) 11% 13.5%, transparent 13.5% 25%),
		linear-gradient(180deg, var(--skin-hi) 0%, var(--skin) 55%, var(--skin-lo) 100%);
	filter: brightness(.92);
	transform: translate(-50%, -50%) rotateY(90deg) translateZ(calc(var(--l) * var(--u) / 2));
}
.c3d-doors::after {
	content: "";
	position: absolute;
	right: 12%;
	bottom: 14%;
	width: 22%;
	height: 13%;
	background: rgba(238,240,246,.72);
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}
.c3d-back {
	transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--l) * var(--u) / 2));
	filter: brightness(.6);
}

.c3d-top,
.c3d-bottom {
	width: calc(var(--l) * var(--u));
	height: calc(var(--w) * var(--u));
}
.c3d-top {
	background:
		repeating-linear-gradient(0deg,
			rgba(0,0,0,.16) 0 1px,
			rgba(255,255,255,.06) 1px 4px,
			rgba(0,0,0,.07) 4px 8px),
		linear-gradient(90deg, var(--skin-hi), var(--skin));
	transform: translate(-50%, -50%) rotateX(90deg) translateZ(calc(var(--h) * var(--u) / 2));
}
.c3d-bottom {
	background: var(--skin-dk);
	transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--h) * var(--u) / 2));
}

/* Grounds the box. Without a shadow it floats, and the whole thing reads as a
   diagram rather than as an object. */
.c3d-shadow {
	position: absolute;
	left: 50%;
	top: 50%;
	width: calc(var(--l) * var(--u) * 1.05);
	height: calc(var(--w) * var(--u) * 1.05);
	transform: translate(-50%, -50%) rotateX(90deg)
		translateZ(calc(var(--h) * var(--u) / -2 - 2px));
	background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,.5), transparent 70%);
	filter: blur(7px);
	pointer-events: none;
}

/* Nothing is draggable without JavaScript, so nothing should say "drag". */
.c3d-hint {
	display: none;
	margin: .6rem 0 0;
	font-family: var(--mono);
	font-size: .66rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
	text-align: center;
}
.js .c3d-hint { display: block; }

/* The type switcher.
   Real radio inputs, visually replaced by their labels. Arrow-key movement
   between the four is the browser's own rather than something reimplemented
   here badly, and the whole switch works with JavaScript off. */
.c3d-types {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
}
.c3d-types input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.c3d-types label {
	display: inline-block;
	padding: .5rem .8rem;
	cursor: pointer;
	font-family: var(--mono);
	font-size: .72rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink);
	background: transparent;
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.c3d-types label:hover { border-color: var(--pop-graphic); }
.c3d-types input:checked + label {
	color: #fff;
	background: var(--pop-graphic);
	border-color: var(--pop-graphic);
}
/* The input is off-screen, so its focus ring has to be drawn on the label or
   there is no visible focus at all. */
.c3d-types input:focus-visible + label {
	outline: 2px solid var(--pop-graphic);
	outline-offset: 2px;
}

.c3d-figures h3 { margin: 0 0 .75rem; font-size: 1.1rem; }
.c3d-note { margin: .9rem 0 0; font-size: .92rem; color: var(--muted); }
.c3d-foot {
	margin: 1.25rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--rule);
	font-size: .82rem;
	color: var(--muted);
}

/* Which type is showing.
   The first block is visible by default, which is the floor for anything
   without :has(). Where :has() works the default is stood down and the checked
   type wins — an id outranks it, so order is not carrying the result alone. */
.c3d-figures { display: none; }
.c3d-figures:first-of-type { display: block; }
.c3d:has(.c3d-types input:checked) .c3d-figures:first-of-type { display: none; }
.c3d:has(#c3d-20gp:checked) .c3d-figures[data-for="20gp"],
.c3d:has(#c3d-40gp:checked) .c3d-figures[data-for="40gp"],
.c3d:has(#c3d-40hc:checked) .c3d-figures[data-for="40hc"],
.c3d:has(#c3d-45hc:checked) .c3d-figures[data-for="45hc"] { display: block; }

/* Geometry per type, in metres. The @property initial values above are the
   40' HC, which is also the radio that ships checked — so a browser without
   :has() draws the default correctly rather than drawing a mismatch. */
/* The shadow lives inside the box, so it inherits these too. */
.c3d:has(#c3d-20gp:checked) .c3d-box { --l: 6.058;  --w: 2.438; --h: 2.591; }
.c3d:has(#c3d-40gp:checked) .c3d-box { --l: 12.192; --w: 2.438; --h: 2.591; }
.c3d:has(#c3d-40hc:checked) .c3d-box { --l: 12.192; --w: 2.438; --h: 2.896; }
.c3d:has(#c3d-45hc:checked) .c3d-box { --l: 13.716; --w: 2.438; --h: 2.896; }

/* One turn as it first scrolls into view: enough to say "this moves", without
   the perpetual spin that would need its own pause control to satisfy 2.2.2. */
@keyframes c3d-arrive {
	from { transform: rotateX(var(--rx)) rotateY(-18deg); }
	to   { transform: rotateX(var(--rx)) rotateY(var(--ry)); }
}
.c3d.is-arriving .c3d-box {
	animation: c3d-arrive 1.4s cubic-bezier(.22,.61,.36,1) both;
}

@media (max-width: 62rem) {
	.c3d { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.c3d-box { transition: none; }
	.c3d.is-arriving .c3d-box { animation: none; }
}
@media print {
	.c3d-types,
	.c3d-hint { display: none !important; }
}

/* --------------------------------------------------------------------------
   14 SIDE LOADER SEQUENCE
   -------------------------------------------------------------------------- */
/* A scale drawing of a ground drop, in four stages, with a sticky figure and
   the steps scrolling past it. Everything moves by transforming groups inside
   one inline SVG — no frames, no sprite sheet, no canvas.

   THE BASE STATE IS THE LAST STAGE, NOT THE FIRST
   Which is what makes this safe without JavaScript: the rules below draw the
   container already on the ground, and the [data-stage] overrides wind it back
   to earlier stages. So the fallback frame is the finished job — the one frame
   worth having if you only get one — rather than a truck that never unloads.

   Note the dimension labels use --pop-text and not --pop-graphic. The palette
   at the top of this file is explicit that --pop-graphic is for rules and marks
   only; at this text size on a tinted band it would not hold AA. */
.sl-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: start;
}
.sl-sticky { position: sticky; top: 5.5rem; }
.sl-svg { display: block; width: 100%; height: auto; }

.sl-cap {
	margin: .75rem 0 0;
	font-family: var(--mono);
	font-size: .66rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
}
.sl-cap-js { display: none; }
.js .sl-cap-js { display: inline; }

/* ---- The drawing -------------------------------------------------------- */
.sl-ground { stroke: var(--ink); stroke-width: 2; }
.sl-hatch line { stroke: var(--rule-2); stroke-width: 1.5; }

.sl-tyre { fill: var(--ink); }
.sl-chassis,
.sl-mast,
.sl-arm rect,
.sl-legs rect { fill: var(--accent-deep); }
.sl-cables rect { fill: var(--muted); }

.sl-box { fill: #B4392A; }
.sl-rail { fill: #8C2C20; }
.sl-ribs line { stroke: rgba(0,0,0,.20); stroke-width: 1.5; }

.sl-dim line { stroke: var(--pop-graphic); stroke-width: 1.5; }
.sl-dim text {
	fill: var(--pop-text);
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: .06em;
}

/* ---- Stage transitions --------------------------------------------------
   view-box rather than fill-box, so the origins below are plain viewBox
   coordinates and can be read straight off the markup: 255,68 is the crane
   pivot, 190,300 is the underside of the chassis, 355,74 is where the cables
   leave the arm. */
.sl-arm,
.sl-legs,
.sl-cables,
.sl-container,
.sl-dim {
	transform-box: view-box;
	transition:
		transform .6s cubic-bezier(.22,.61,.36,1),
		opacity .4s ease;
}
.sl-arm { transform-origin: 255px 68px; }
.sl-legs { transform-origin: 190px 300px; }
.sl-cables { transform-origin: 355px 74px; }

/* Stage 4, the default: on the ground, cranes still out. */
.sl-arm { transform: rotate(0deg) scaleX(1); }
.sl-legs { transform: scaleY(1); }
.sl-cables { transform: scaleY(1); }
.sl-container { transform: translate(165px, 68px); }

/* Stage 1 — arrived. Legs up, jib retracted against the mast, container on the
   deck. The jib retracts rather than swinging vertical because a 188-unit arm
   stood on end leaves the top of the viewBox 110 units below its own tip. */
[data-stage="1"] .sl-arm { transform: rotate(-14deg) scaleX(.3); }
[data-stage="1"] .sl-legs { transform: scaleY(0); }
[data-stage="1"] .sl-cables { transform: scaleY(0); }
[data-stage="1"] .sl-container { transform: translate(0, 0); }
[data-stage="1"] .sl-dim { opacity: 0; }

/* Stage 2 — legs down, jib out over the kerb. The landing width is the point
   of this stage, so that is the only dimension showing. */
[data-stage="2"] .sl-cables { transform: scaleY(0); }
[data-stage="2"] .sl-container { transform: translate(0, 0); }
[data-stage="2"] .sl-dim-head { opacity: 0; }

/* Stage 3 — lifted and swung out, hanging clear of the trailer. */
[data-stage="3"] .sl-cables { transform: scaleY(.38); }
[data-stage="3"] .sl-container { transform: translate(165px, -10px); }

/* ---- The steps ---------------------------------------------------------- */
.sl-steps { margin: 0; padding: 0; list-style: none; }
.sl-step {
	position: relative;
	min-height: 55vh;
	padding: 1.5rem 0 1.5rem 3.5rem;
}
.sl-step:last-child { min-height: 0; }
.sl-step h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.sl-step p { margin: 0; color: var(--ink-2); }

.sl-n {
	position: absolute;
	left: 0;
	top: 1.45rem;
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	font-family: var(--mono);
	font-size: .85rem;
	color: var(--muted);
	background: var(--ground);
	border: 1px solid var(--rule);
	transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

/* The dimming only starts once something is actually tracking the scroll.
   Without JavaScript every step stays at full strength, because there is no
   current step for the others to be quieter than. */
.sl.is-tracking .sl-step {
	opacity: .42;
	transition: opacity .35s ease;
}
.sl.is-tracking .sl-step.is-on { opacity: 1; }
.sl-step.is-on .sl-n {
	color: #fff;
	background: var(--pop-graphic);
	border-color: var(--pop-graphic);
}

@media (max-width: 62rem) {
	.sl-grid { grid-template-columns: 1fr; }
	.sl-sticky { top: 4rem; }
	.sl-step { min-height: 42vh; padding-left: 3rem; }
	.sl-n { width: 2.1rem; height: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.sl-arm,
	.sl-legs,
	.sl-cables,
	.sl-container,
	.sl-dim { transition: none; }
}
@media print {
	.sl-sticky { position: static; }
	.sl-step { min-height: 0; opacity: 1 !important; }
	.sl-cap-js { display: none !important; }
}
