/* HamzaBG Mods — system layer.
 *
 * Loaded last on every surface: the exported static pages, the storefront
 * application routes and the legal pages. One token board, one type scale, one
 * button, one field, one page head. Nothing below the page layer invents a
 * colour again.
 *
 * The prefix is `--hb-` because hbg-ui.css already used it. hbg-ui keeps the
 * card contract; this file owns the deck the cards sit on.
 *
 * DARK: bundle.css ships `body.dark * { border-color: #292929 !important }`.
 * That is the vendor's neutral, so --line in dark is pinned to the same value
 * and components agree with it instead of fighting it. Only a border that is
 * semantically coloured (error, success, accent) is allowed to raise its voice
 * with !important, and it says why where it happens.
 */

/* ================================================================== tokens */

:root {
	/* Ink ramp. 990-1000 on white once you measure it; --faint is the floor
	 * for text that still has to be read (10.4:1), never for body copy. */
	--hb-ink: #14161b;
	--hb-ink-2: #33363d;
	--hb-muted: #5d626b;
	--hb-faint: #686c74;

	/* Surfaces. The field is the same grey the homepage poster paints. A card
	 * is white so it lifts off the field without a shadow doing the work. */
	--hb-bg: #f2f2f2;
	--hb-bg-2: #e9eaed;
	--hb-bg-3: #e1e2e6;
	--hb-card: #ffffff;
	--hb-field: #f8f9fb;
	--hb-inverse: #14161b;
	--hb-on-inverse: #f7f7f8;

	/* Rules. */
	--hb-line: #e6e8ec;
	--hb-line-strong: #d5d8e1;

	/* Brand. One indigo, three weights, one wash. `--hb-accent` is the mark —
	 * borders, gradients, dots. Text and fills take their own token because
	 * white on #6571ff measures 3.92:1, under the 4.5 floor for 14px UI text. */
	--hb-accent: #6571ff;
	--hb-accent-hi: #7a85ff;
	--hb-accent-lo: #515df3;
	--hb-accent-ink: #4a55e0;
	--hb-accent-fill: #515df3;
	--hb-accent-soft: #eef0ff;
	--hb-accent-line: rgb(101 113 255 / 0.42);
	--hb-on-accent: #ffffff;

	/* Status. Paired fg/bg, both measured against the field they land on. */
	--hb-ok: #17795e;
	--hb-ok-bg: #eaf6f1;
	--hb-warn: #8a5a00;
	--hb-warn-bg: #fdf3e0;
	--hb-err: #c2263a;
	--hb-err-bg: #fdeef0;

	/* Shape. */
	--hb-radius-sm: 10px;
	--hb-radius: 12px;
	--hb-radius-md: 14px;
	--hb-radius-lg: 18px;
	--hb-radius-xl: 24px;
	--hb-radius-pill: 9999px;

	/* Elevation. Two levels only: resting and lifted. */
	--hb-shadow: 0 1px 2px rgb(16 18 24 / 0.04), 0 8px 24px -18px rgb(16 18 24 / 0.28);
	--hb-shadow-lift: 0 2px 4px rgb(16 18 24 / 0.05), 0 26px 50px -28px rgb(16 18 24 / 0.42);

	/* Motion. One duration, one curve, for everything that moves. */
	--hb-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--hb-dur: 180ms;

	/* Type. Proxima Nova is the only face the site ships; the display ramp
	 * uses the Bold cut with tighter tracking rather than a second family. */
	--hb-font: "Proxima Nova", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	--hb-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	/* Page rhythm. Every shell uses these two numbers, nothing else. */
	--hb-shell: 1200px;
	--hb-shell-narrow: 896px;
	--hb-gutter: 24px;
	--hb-section: 72px;

	/* Focus. One ring, used by every interactive thing on the site. */
	--hb-ring: 0 0 0 3px rgb(101 113 255 / 0.32);
}

body.dark {
	--hb-ink: #f2f2f2;
	--hb-ink-2: #d6d7da;
	--hb-muted: rgb(255 255 255 / 0.64);
	--hb-faint: rgb(255 255 255 / 0.5);

	--hb-bg: #151515;
	--hb-bg-2: #191b1f;
	--hb-bg-3: #202329;
	--hb-card: #1a1c20;
	--hb-field: #15171a;
	--hb-inverse: #f2f2f2;
	--hb-on-inverse: #14161b;

	/* Pinned to bundle.css's !important neutral so cards, fields and rules all
	 * sit on the same hairline. */
	--hb-line: #292929;
	--hb-line-strong: #363a43;

	--hb-accent-soft: rgb(101 113 255 / 0.16);
	--hb-accent-line: rgb(122 133 255 / 0.46);
	--hb-accent-ink: #99a1ff;

	--hb-ok: #6fd3b2;
	--hb-ok-bg: #12271f;
	--hb-warn: #e6b866;
	--hb-warn-bg: #2b2113;
	--hb-err: #ff8d9a;
	--hb-err-bg: #2a1519;

	--hb-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px -20px rgb(0 0 0 / 0.9);
	--hb-shadow-lift: 0 2px 6px rgb(0 0 0 / 0.5), 0 30px 60px -32px rgb(0 0 0 / 1);
}

@media (max-width: 640px) {
	:root {
		--hb-gutter: 20px;
		--hb-section: 52px;
	}
}

/* ------------------------------------------------- legacy prefix aliases */

/* The page sheets were written one at a time, each with its own prefix and its
 * own copy of the same fourteen colours. Rather than rename several thousand
 * lines and risk a regression, the prefixes are bound to the board here. A
 * page file that still reads --cw-line now reads --hb-line and gets dark for
 * free the moment body.dark flips.
 */

.hbg-custom {
	--cw-page: var(--hb-bg);
	--cw-bg: var(--hb-card);
	--cw-ink: var(--hb-ink);
	--cw-muted: var(--hb-muted);
	--cw-faint: var(--hb-faint);
	--cw-line: var(--hb-line);
	--cw-card: var(--hb-card);
	--cw-soft: var(--hb-bg-2);
	--cw-accent: var(--hb-accent);
	--cw-accent-hi: var(--hb-accent-hi);
	--cw-accent-soft: var(--hb-accent-soft);
	--cw-accent-ink: var(--hb-accent-ink);
}

.hbg-tool-page {
	--tp-bg: var(--hb-bg);
	--tp-ink: var(--hb-ink);
	--tp-muted: var(--hb-muted);
	--tp-faint: var(--hb-faint);
	--tp-line: var(--hb-line);
	--tp-card: var(--hb-card);
	--tp-soft: var(--hb-bg-2);
	--tp-accent: var(--hb-accent);
	--tp-accent-hi: var(--hb-accent-hi);
	--tp-accent-soft: var(--hb-accent-soft);
}

.acct-main {
	--acct-bg: var(--hb-bg);
	--acct-card: var(--hb-card);
	--acct-ink: var(--hb-ink);
	--acct-muted: var(--hb-muted);
	--acct-line: var(--hb-line);
	--acct-field: var(--hb-field);
	--acct-brand: var(--hb-accent);
	--acct-brand-hi: var(--hb-accent-hi);
	--acct-brand-ink: var(--hb-on-accent);
	--acct-ok: var(--hb-ok);
	--acct-ok-bg: var(--hb-ok-bg);
	--acct-err: var(--hb-err);
	--acct-err-bg: var(--hb-err-bg);
}

.sa-footer {
	--sa-f-bg: var(--hb-bg);
	--sa-f-ink: var(--hb-ink);
	--sa-f-muted: var(--hb-muted);
	--sa-f-faint: var(--hb-faint);
	--sa-f-line: var(--hb-line);
	--sa-f-accent: var(--hb-accent);
}

/* The button contract is consumed by six prefixes. Bind them once. */
:root,
.acct-main,
.hbg-consent {
	--hb-btn-radius: var(--hb-radius);
	--hb-btn-radius-sm: var(--hb-radius-sm);
	--hb-btn-primary: var(--hb-accent-fill);
	--hb-btn-primary-hi: #5f6af8;
	--hb-btn-primary-lo: #434dd8;
	--hb-btn-primary-ink: var(--hb-on-accent);
	--hb-btn-ink-bg: var(--hb-inverse);
	--hb-btn-ink-bg-hi: color-mix(in srgb, var(--hb-inverse) 88%, var(--hb-accent));
	--hb-btn-ink: var(--hb-on-inverse);
	--hb-btn-soft-bg: var(--hb-bg-2);
	--hb-btn-soft-ink: var(--hb-ink);
}

body.dark .acct-main,
body.dark .hbg-consent {
	--hb-btn-ink-bg: var(--hb-inverse);
	--hb-btn-ink-bg-hi: #ffffff;
	--hb-btn-ink: var(--hb-on-inverse);
}

/* ==================================================================== base */

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

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

/* `html body` (0,0,2), not `body`: bundle.css ships
 * `html body { font-family: "Inter"; font-size: 14px; color: #616161 }` and
 * outranked this rule on specificity, so every page fell back to Inter at
 * 14px grey while the tokens claimed Proxima at 16px ink. Same specificity,
 * later in the cascade, wins. */
html body {
	background: var(--hb-bg);
	color: var(--hb-ink);
	font-family: var(--hb-font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--hb-accent-fill);
	color: var(--hb-on-accent);
}

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

/* Theme swaps paint a new palette on every node at once. While the swap class
 * is on <html> (two frames, set by sa-nav.js), transitions are suppressed so
 * the page lands on the new theme instead of animating 80 vendor rules in
 * parallel. */
html.hbg-theme-swap *,
html.hbg-theme-swap *::before,
html.hbg-theme-swap *::after {
	transition: none !important;
}

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

/* The vendor theme styles every anchor as a link-blue at a specificity the
 * page layer cannot reach cheaply. Components opt back in with their own
 * colour, so the base rule only has to stop the blue bleeding through a
 * heading that happens to be wrapped in an <a>. */
a {
	color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--hb-ink);
	font-family: var(--hb-font);
	font-weight: 700;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

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

hr {
	height: 1px;
	margin: 32px 0;
	border: 0;
	background: var(--hb-line);
}

/* Keyboard users land here first. */
.hbg-skip {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 2147483001;
	padding: 12px 18px;
	border-radius: var(--hb-radius);
	background: var(--hb-inverse);
	color: var(--hb-on-inverse);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transform: translateY(-200%);
	transition: transform var(--hb-dur) var(--hb-ease);
}

.hbg-skip:focus-visible {
	transform: translateY(0);
}

/* The consent card is fixed, so the page reserves its height instead of the
 * last section hiding behind it. */
body:has(> .hbg-consent:not([hidden])) {
	padding-bottom: 132px;
}

@media (max-width: 640px) {
	body:has(> .hbg-consent:not([hidden])) {
		padding-bottom: 208px;
	}
}

/* =================================================================== shell */

.hbg-shell {
	width: 100%;
	max-width: var(--hb-shell);
	margin: 0 auto;
	padding: 0 var(--hb-gutter);
}

.hbg-shell--narrow {
	max-width: var(--hb-shell-narrow);
}

.hbg-shell--wide {
	max-width: 1400px;
}

/* The policy pages carry Gutenberg palette classes with literal colours
 * (`has-vivid-red-color` is #cf2e2e, 4.4:1 on white and 3.5:1 on the dark
 * field). They are semantic emphasis, so they map to the status tokens that
 * already flip per theme. */
.has-vivid-red-color {
	color: var(--hb-err) !important;
}

.has-vivid-green-color {
	color: var(--hb-ok) !important;
}

.has-vivid-orange-color {
	color: var(--hb-warn) !important;
}

/* ------------------------------------------------------------- page head */

/* One head for every secondary route. The catalogue pages used to ship three
 * different treatments — 90px/800 on cars, 62px/600 on tools, and a bare h1 on
 * the legal pages — which read as three different sites in one navigation.
 *
 * Markup:
 *   <header class="hbg-page-head">
 *     <div class="hbg-shell">
 *       <p class="hbg-page-eyebrow">Workshop</p>
 *       <h1 class="hbg-page-title">Cars<span class="hbg-page-accent">.</span></h1>
 *       <p class="hbg-page-lede">…</p>
 *       <ul class="hbg-page-meta">…</ul>
 *     </div>
 *   </header>
 */

.hbg-page-head {
	position: relative;
	margin-top: calc(var(--sa-nav-h, 0px) * -1);
	padding: calc(var(--sa-nav-h, 0px) + 64px) 0 56px;
	border-bottom: 1px solid var(--hb-line);
	background: var(--hb-bg);
	overflow: hidden;
}

/* Blueprint texture: the same grid on every archive, faded at the edges. */
.hbg-page-head::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--hb-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--hb-line) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(82% 78% at 50% 0%, #000 0%, transparent 76%);
	mask-image: radial-gradient(82% 78% at 50% 0%, #000 0%, transparent 76%);
	pointer-events: none;
}

.hbg-page-head > .hbg-shell {
	position: relative;
	z-index: 1;
}

.hbg-page-eyebrow {
	margin: 0 0 18px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--hb-faint);
}

.hbg-page-title {
	margin: 0;
	font-size: clamp(38px, 5.6vw, 68px);
	font-weight: 700;
	line-height: 0.98;
	letter-spacing: -0.045em;
	color: var(--hb-ink);
}

.hbg-page-accent {
	color: var(--hb-accent);
}

.hbg-page-lede {
	margin: 20px 0 0;
	max-width: 60ch;
	font-size: 16px;
	line-height: 1.6;
	color: var(--hb-muted);
}

.hbg-page-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--hb-muted);
}

.hbg-page-meta li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.hbg-page-meta li::before {
	content: "";
	width: 5px;
	height: 5px;
	flex: none;
	border-radius: 50%;
	background: var(--hb-accent-fill);
	opacity: 0.75;
}

/* Section body under a page head. */
.hbg-page-body {
	padding: 40px 0 var(--hb-section);
}

@media (max-width: 760px) {
	.hbg-page-head {
		padding: calc(var(--sa-nav-h, 0px) + 44px) 0 40px;
	}

	.hbg-page-lede {
		font-size: 15px;
	}

	.hbg-page-body {
		padding: 28px 0 56px;
	}
}

/* ================================================================ buttons */

/* One button. The four page-level copies (hbg-btn, acct-btn, hbg-cw-btn,
 * hbg-tp-btn, hbg-ab-btn) had the same forty lines pasted into each file; this
 * is the single definition and the old names now alias onto it. */

.hbg-btn,
.acct-btn,
.hbg-cw-btn,
.hbg-tp-btn,
.hbg-ab-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--hb-btn-radius);
	background: transparent;
	font-family: var(--hb-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
	transition:
		transform var(--hb-dur) var(--hb-ease),
		box-shadow var(--hb-dur) ease,
		background-color var(--hb-dur) ease,
		border-color var(--hb-dur) ease,
		color var(--hb-dur) ease,
		filter var(--hb-dur) ease;
}

.hbg-btn:focus-visible,
.acct-btn:focus-visible,
.hbg-cw-btn:focus-visible,
.hbg-tp-btn:focus-visible,
.hbg-ab-btn:focus-visible {
	outline: 2px solid var(--hb-accent);
	outline-offset: 2px;
}

/* The account shell's base button was the primary one — every form in that
 * set ships `class="acct-btn"` with no modifier. Keep that contract: the fill
 * lands here, and every `--secondary` / `--ghost` / `--soft` rule below is
 * later in the file, so the modifiers still win at equal specificity. */
.acct-btn {
	border-color: transparent;
	background-color: var(--hb-accent-fill);
	background-image: linear-gradient(180deg, var(--hb-btn-primary-hi), var(--hb-btn-primary) 55%, var(--hb-btn-primary-lo));
	color: var(--hb-on-accent);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.28),
		inset 0 -1px 0 rgb(33 38 120 / 0.18),
		0 1px 2px rgb(16 18 24 / 0.1),
		0 8px 18px -10px rgb(101 113 255 / 0.65);
}

.acct-btn:hover {
	transform: translateY(-1px);
	color: var(--hb-on-accent);
	filter: saturate(1.06) brightness(1.03);
}

/* Primary */
.hbg-btn--primary,
.acct-btn--primary,
.hbg-cw-btn--primary,
.hbg-tp-btn--primary,
.hbg-ab-btn--primary {
	border-color: transparent;
	background-color: var(--hb-accent-fill);
	background-image: linear-gradient(180deg, var(--hb-btn-primary-hi), var(--hb-btn-primary) 55%, var(--hb-btn-primary-lo));
	color: var(--hb-on-accent);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.28),
		inset 0 -1px 0 rgb(33 38 120 / 0.18),
		0 1px 2px rgb(16 18 24 / 0.1),
		0 8px 18px -10px rgb(101 113 255 / 0.65);
}

.hbg-btn--primary:hover,
.acct-btn--primary:hover,
.hbg-cw-btn--primary:hover,
.hbg-tp-btn--primary:hover,
.hbg-ab-btn--primary:hover {
	transform: translateY(-1px);
	color: var(--hb-on-accent);
	filter: saturate(1.06) brightness(1.03);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.34),
		inset 0 -1px 0 rgb(33 38 120 / 0.18),
		0 3px 6px rgb(16 18 24 / 0.12),
		0 14px 26px -12px rgb(101 113 255 / 0.75);
}

.hbg-btn--primary:active,
.acct-btn--primary:active,
.hbg-cw-btn--primary:active,
.hbg-tp-btn--primary:active,
.hbg-ab-btn--primary:active {
	transform: translateY(0);
	filter: none;
	box-shadow: inset 0 2px 6px rgb(24 28 90 / 0.24), 0 1px 2px rgb(16 18 24 / 0.12);
}

/* Secondary — ink on paper, paper on ink. */
.hbg-btn--secondary,
.acct-btn--secondary,
.hbg-cw-btn--secondary,
.hbg-tp-btn--secondary,
.hbg-ab-btn--secondary {
	border-color: transparent;
	background-color: var(--hb-btn-ink-bg);
	background-image: none;
	color: var(--hb-btn-ink);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.12),
		0 1px 2px rgb(16 18 24 / 0.12),
		0 8px 18px -12px rgb(16 18 24 / 0.55);
}

.hbg-btn--secondary:hover,
.acct-btn--secondary:hover,
.hbg-cw-btn--secondary:hover,
.hbg-tp-btn--secondary:hover,
.hbg-ab-btn--secondary:hover {
	transform: translateY(-1px);
	background-color: var(--hb-btn-ink-bg-hi);
	color: var(--hb-btn-ink);
}

/* Outline / ghost */
.hbg-btn--ghost,
.hbg-btn--outline,
.acct-btn--ghost,
.acct-btn--outline,
.hbg-cw-btn--ghost,
.hbg-cw-btn--outline,
.hbg-tp-btn--ghost,
.hbg-tp-btn--outline,
.hbg-ab-btn--ghost,
.hbg-ab-btn--outline {
	border-color: var(--hb-line-strong);
	background-color: var(--hb-card);
	/* The primary fills with a gradient image, not a colour. A variant that
	   only resets the colour would still paint that gradient. */
	background-image: none;
	color: var(--hb-ink);
	box-shadow: 0 1px 2px rgb(16 18 24 / 0.04);
}

.hbg-btn--ghost:hover,
.hbg-btn--outline:hover,
.acct-btn--ghost:hover,
.acct-btn--outline:hover,
.hbg-cw-btn--ghost:hover,
.hbg-cw-btn--outline:hover,
.hbg-tp-btn--ghost:hover,
.hbg-tp-btn--outline:hover,
.hbg-ab-btn--ghost:hover,
.hbg-ab-btn--outline:hover {
	transform: translateY(-1px);
	border-color: var(--hb-line-strong);
	background-color: var(--hb-bg-2);
	color: var(--hb-ink);
}

/* Soft */
.hbg-btn--soft,
.acct-btn--soft,
.hbg-cw-btn--soft,
.hbg-tp-btn--soft,
.hbg-ab-btn--soft {
	border-color: transparent;
	background-color: var(--hb-bg-2);
	background-image: none;
	color: var(--hb-ink);
}

.hbg-btn--soft:hover,
.acct-btn--soft:hover,
.hbg-cw-btn--soft:hover,
.hbg-tp-btn--soft:hover,
.hbg-ab-btn--soft:hover {
	transform: translateY(-1px);
	background-color: var(--hb-bg-3);
	color: var(--hb-ink);
}

/* Danger */
.hbg-btn--danger {
	border-color: transparent;
	background-color: var(--hb-err);
	color: #fff;
}

.hbg-btn--danger:hover {
	transform: translateY(-1px);
	color: #fff;
	filter: brightness(1.05);
}

/* Quiet — used inside cards and table rows. */
.hbg-btn--quiet {
	min-height: 34px;
	padding: 0 12px;
	border-color: transparent;
	border-radius: var(--hb-radius-sm);
	background: transparent;
	color: var(--hb-muted);
	font-size: 13px;
}

.hbg-btn--quiet:hover {
	background: var(--hb-bg-2);
	color: var(--hb-ink);
}

/* Sizes */
.hbg-btn--sm,
.acct-btn--sm,
.hbg-cw-btn--sm,
.hbg-tp-btn--sm,
.hbg-ab-btn--sm {
	min-height: 36px;
	padding: 0 14px;
	border-radius: var(--hb-btn-radius-sm);
	font-size: 13px;
	gap: 6px;
}

.hbg-btn--lg {
	min-height: 52px;
	padding: 0 26px;
	font-size: 15px;
}

.hbg-btn--block,
.acct-btn--block,
.hbg-cw-btn--block,
.hbg-tp-btn--block {
	width: 100%;
}

/* Disabled. Never fake it with pointer-events alone — the control has to read
 * as unavailable and drop out of the tab order for real. */
.hbg-btn[disabled],
.hbg-btn[aria-disabled="true"],
.acct-btn[disabled],
.acct-btn[aria-disabled="true"],
.hbg-cw-btn[disabled],
.hbg-tp-btn[disabled],
.hbg-ab-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
	filter: none;
}

/* Loading. The label stays for width; a spinner takes the icon slot. */
.hbg-btn[data-loading="true"] {
	position: relative;
	color: transparent;
	cursor: progress;
}

.hbg-btn[data-loading="true"]::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid currentcolor;
	border-top-color: transparent;
	border-radius: 50%;
	color: var(--hb-on-accent);
	animation: hbg-spin 0.7s linear infinite;
}

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

/* bundle.css forces a #292929 border onto every element in dark, which repaints
 * a transparent button edge as a hairline. The neutral rules above already use
 * --hb-line, so only the deliberately transparent edges need the weight. */
body.dark .hbg-btn--primary,
body.dark .hbg-btn--secondary,
body.dark .hbg-btn--soft,
body.dark .hbg-btn--danger,
body.dark .acct-btn--primary,
body.dark .acct-btn--secondary,
body.dark .hbg-cw-btn--primary,
body.dark .hbg-cw-btn--secondary,
body.dark .hbg-tp-btn--primary,
body.dark .hbg-tp-btn--secondary,
body.dark .hbg-ab-btn--primary,
body.dark .hbg-ab-btn--secondary {
	border-color: transparent !important;
}

body.dark .hbg-btn--ghost,
body.dark .hbg-btn--outline,
body.dark .acct-btn--ghost,
body.dark .acct-btn--outline,
body.dark .hbg-cw-btn--ghost,
body.dark .hbg-cw-btn--outline,
body.dark .hbg-tp-btn--ghost,
body.dark .hbg-tp-btn--outline,
body.dark .hbg-ab-btn--ghost,
body.dark .hbg-ab-btn--outline {
	border-color: var(--hb-line-strong) !important;
}

/* ================================================================= fields */

/* One field shape. The theme ships its own `input[type="text"]` with a bottom
 * margin and a grey fill; these rules carry enough specificity to replace it
 * without an !important, and the wrapper class keeps the intent readable. */

.hbg-field {
	display: grid;
	gap: 7px;
}

.hbg-label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--hb-ink);
}

.hbg-label span[aria-hidden="true"] {
	color: var(--hb-err);
}

.hbg-input,
.hbg-select,
.hbg-textarea,
.acct-main .acct-input {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-sm);
	background: var(--hb-field);
	color: var(--hb-ink);
	font-family: var(--hb-font);
	font-size: 14px;
	line-height: 1.4;
	transition: border-color var(--hb-dur) ease, box-shadow var(--hb-dur) ease;
}

.hbg-textarea {
	min-height: 120px;
	resize: vertical;
}

.hbg-select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a7f88' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.hbg-input::placeholder,
.hbg-textarea::placeholder,
.acct-main .acct-input::placeholder {
	color: var(--hb-faint);
	opacity: 1;
}

.hbg-input:hover,
.hbg-select:hover,
.hbg-textarea:hover,
.acct-main .acct-input:hover {
	border-color: var(--hb-line-strong);
}

.hbg-input:focus,
.hbg-select:focus,
.hbg-textarea:focus,
.acct-main .acct-input:focus {
	outline: none;
	border-color: var(--hb-accent);
	box-shadow: var(--hb-ring);
}

.hbg-input:disabled,
.hbg-select:disabled,
.hbg-textarea:disabled {
	background: var(--hb-bg-2);
	color: var(--hb-muted);
	cursor: not-allowed;
}

.hbg-input[aria-invalid="true"],
.hbg-select[aria-invalid="true"],
.hbg-textarea[aria-invalid="true"],
.acct-main .acct-input[aria-invalid="true"] {
	border-color: var(--hb-err);
	box-shadow: 0 0 0 3px rgb(194 38 58 / 0.16);
}

/* Read-only is not disabled — it is content you can copy. */
.hbg-input[readonly] {
	background: var(--hb-bg-2);
	color: var(--hb-ink-2);
}

.hbg-help {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--hb-muted);
}

.hbg-error {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--hb-err);
}

.hbg-error:empty {
	display: none;
}

.hbg-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--hb-muted);
	cursor: pointer;
}

.hbg-check input {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	accent-color: var(--hb-accent);
	cursor: pointer;
}

.hbg-check a {
	color: var(--hb-ink);
	text-underline-offset: 2px;
}

/* ================================================================ badges */

.hbg-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-pill);
	background: var(--hb-bg-2);
	color: var(--hb-ink-2);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.hbg-badge--accent {
	border-color: var(--hb-accent-line);
	background: var(--hb-accent-soft);
	color: var(--hb-accent-ink);
}

.hbg-badge--ok {
	border-color: color-mix(in srgb, var(--hb-ok) 30%, var(--hb-line));
	background: var(--hb-ok-bg);
	color: var(--hb-ok);
}

.hbg-badge--warn {
	border-color: color-mix(in srgb, var(--hb-warn) 30%, var(--hb-line));
	background: var(--hb-warn-bg);
	color: var(--hb-warn);
}

.hbg-badge--err {
	border-color: color-mix(in srgb, var(--hb-err) 30%, var(--hb-line));
	background: var(--hb-err-bg);
	color: var(--hb-err);
}

/* The product card's corner tag. White on #b9bcc4 was 2.1:1 — it now uses the
 * card's own ink plate so it reads on any cover art. */
.hbg-card-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	padding: 5px 10px;
	border-radius: var(--hb-radius-pill);
	background: rgb(16 18 24 / 0.82);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* An accent tag for the featured slot, still measured against cover art. */
.hbg-card-tag--accent {
	background: var(--hb-accent-fill);
	color: var(--hb-on-accent);
}

/* ================================================================= alerts */

.hbg-alert {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-md);
	background: var(--hb-bg-2);
	color: var(--hb-ink);
	font-size: 13.5px;
	line-height: 1.55;
}

.hbg-alert svg {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
}

.hbg-alert strong {
	font-weight: 700;
}

.hbg-alert--ok {
	border-color: color-mix(in srgb, var(--hb-ok) 34%, var(--hb-line));
	background: var(--hb-ok-bg);
	color: var(--hb-ok);
}

.hbg-alert--warn {
	border-color: color-mix(in srgb, var(--hb-warn) 34%, var(--hb-line));
	background: var(--hb-warn-bg);
	color: var(--hb-warn);
}

.hbg-alert--err {
	border-color: color-mix(in srgb, var(--hb-err) 34%, var(--hb-line));
	background: var(--hb-err-bg);
	color: var(--hb-err);
}

/* Info uses the brand wash. */
.hbg-alert--info {
	border-color: var(--hb-accent-line);
	background: var(--hb-accent-soft);
	color: var(--hb-accent-ink);
}

/* The vendor's dark border sweep would repaint these hairlines neutral. */
body.dark .hbg-alert--ok,
body.dark .hbg-alert--warn,
body.dark .hbg-alert--err,
body.dark .hbg-alert--info {
	border-color: currentcolor !important;
	opacity: 0.95;
}

/* ================================================================== table */

.hbg-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.hbg-table caption {
	margin-bottom: 12px;
	font-size: 13px;
	color: var(--hb-muted);
	text-align: left;
}

.hbg-table th {
	padding: 12px 16px;
	border-bottom: 1px solid var(--hb-line);
	color: var(--hb-faint);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

.hbg-table td {
	padding: 16px;
	border-bottom: 1px solid var(--hb-line);
	color: var(--hb-ink-2);
	vertical-align: middle;
}

.hbg-table tbody tr:last-child td {
	border-bottom: 0;
}

.hbg-table tbody tr:hover td {
	background: var(--hb-bg-2);
}

.hbg-table td strong {
	color: var(--hb-ink);
	font-weight: 600;
}

.hbg-table .hbg-table-num {
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

/* Scroll wrapper for narrow screens. */
.hbg-table-scroll {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
}

/* =================================================================== tabs */

.hbg-tabs {
	display: flex;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-pill);
	background: var(--hb-card);
	width: fit-content;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
}

.hbg-tabs::-webkit-scrollbar {
	display: none;
}

.hbg-tab {
	padding: 9px 16px;
	border: 0;
	border-radius: var(--hb-radius-pill);
	background: transparent;
	color: var(--hb-muted);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color var(--hb-dur) ease, color var(--hb-dur) ease;
}

.hbg-tab:hover {
	background: var(--hb-bg-2);
	color: var(--hb-ink);
}

.hbg-tab[aria-selected="true"],
.hbg-tab[aria-current="page"],
.hbg-tab.is-active {
	background: var(--hb-accent-fill);
	background-image: linear-gradient(180deg, var(--hb-btn-primary-hi), var(--hb-btn-primary));
	color: var(--hb-on-accent);
}

/* ============================================================ breadcrumbs */

.hbg-crumbs {
	font-size: 12.5px;
	color: var(--hb-faint);
}

.hbg-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hbg-crumbs a {
	color: var(--hb-muted);
	text-decoration: none;
}

.hbg-crumbs a:hover {
	color: var(--hb-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hbg-crumbs [aria-current="page"] {
	color: var(--hb-ink);
}

.hbg-crumbs li + li::before {
	content: "/";
	margin-right: 7px;
	color: var(--hb-line-strong);
}

/* ============================================================ pagination */

.hbg-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.hbg-pager a,
.hbg-pager span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-sm);
	background: var(--hb-card);
	color: var(--hb-ink-2);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color var(--hb-dur) ease, background-color var(--hb-dur) ease;
}

.hbg-pager a:hover {
	border-color: var(--hb-line-strong);
	background: var(--hb-bg-2);
	color: var(--hb-ink);
}

.hbg-pager [aria-current="page"] {
	border-color: transparent;
	background: var(--hb-accent-fill);
	color: var(--hb-on-accent);
}

.hbg-pager [aria-disabled="true"] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ============================================================ empty state */

.hbg-empty {
	display: grid;
	justify-items: center;
	gap: 12px;
	padding: 64px 24px;
	text-align: center;
}

.hbg-empty-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border: 1px solid var(--hb-line);
	border-radius: 50%;
	background: var(--hb-bg-2);
	color: var(--hb-muted);
}

.hbg-empty-icon svg {
	width: 26px;
	height: 26px;
}

.hbg-empty-title {
	margin: 6px 0 0;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--hb-ink);
}

.hbg-empty-copy {
	margin: 0;
	max-width: 46ch;
	font-size: 14px;
	line-height: 1.6;
	color: var(--hb-muted);
}

.hbg-empty-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 8px;
}

/* ============================================================== skeleton */

.hbg-skeleton {
	display: block;
	border-radius: var(--hb-radius-sm);
	background: linear-gradient(90deg, var(--hb-bg-2) 25%, var(--hb-bg-3) 37%, var(--hb-bg-2) 63%);
	background-size: 400% 100%;
	animation: hbg-shimmer 1.4s ease-in-out infinite;
}

@keyframes hbg-shimmer {
	0% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0 50%;
	}
}

/* ================================================================ prose */

/* Legal pages shipped with no stylesheet of their own and inherited whatever
 * Elementor had left in bundle.css. This is the reading column: 68 characters,
 * 17px, with rules that survive a machine-generated document. */

.hbg-prose {
	color: var(--hb-ink-2);
	font-size: 16px;
	line-height: 1.72;
}

.hbg-prose > * + * {
	margin-top: 18px;
}

.hbg-prose h2 {
	margin: 48px 0 0;
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.022em;
	color: var(--hb-ink);
}

.hbg-prose h3 {
	margin: 34px 0 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--hb-ink);
}

.hbg-prose h4 {
	margin: 26px 0 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--hb-ink);
}

.hbg-prose p,
.hbg-prose li {
	color: var(--hb-muted);
}

.hbg-prose strong {
	color: var(--hb-ink);
	font-weight: 700;
}

.hbg-prose a {
	color: var(--hb-accent-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.hbg-prose a:hover {
	color: var(--hb-accent);
}

.hbg-prose ul,
.hbg-prose ol {
	margin: 18px 0 0;
	padding-left: 22px;
}

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

.hbg-prose li::marker {
	color: var(--hb-accent);
}

.hbg-prose blockquote {
	margin: 28px 0;
	padding: 4px 0 4px 20px;
	border-left: 2px solid var(--hb-accent);
	color: var(--hb-ink-2);
	font-size: 16.5px;
}

.hbg-prose code {
	padding: 2px 6px;
	border: 1px solid var(--hb-line);
	border-radius: 6px;
	background: var(--hb-bg-2);
	font-family: var(--hb-mono);
	font-size: 0.9em;
	color: var(--hb-ink);
}

.hbg-prose pre {
	margin: 24px 0;
	padding: 18px 20px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-md);
	background: var(--hb-bg-2);
	overflow-x: auto;
}

.hbg-prose pre code {
	padding: 0;
	border: 0;
	background: none;
	line-height: 1.65;
}

.hbg-prose table {
	width: 100%;
	margin: 24px 0;
	border-collapse: collapse;
	font-size: 14px;
}

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

.hbg-prose th {
	background: var(--hb-bg-2);
	color: var(--hb-ink);
	font-weight: 600;
}

.hbg-prose hr {
	margin: 40px 0;
}

/* The export wraps policy copy in `.page-content .sh-text-content` and puts an
 * invisible <h1> above it. Both are handled here rather than in markup so the
 * existing files do not need re-exporting. */
.hbg-legal-page .page-content,
.hbg-legal-page .sh-text-content {
	max-width: 72ch;
	margin: 0 auto;
}

.hbg-legal-page .page-content {
	padding: 0;
}

.hbg-legal-page .page-content > h2:first-child,
.hbg-legal-page .page-content > h2:first-of-type {
	margin-top: 0;
}

/* ============================================================ consent */

/* Docked bottom-left and narrow. The centred 680px card sat directly over the
 * hero CTA on the homepage and over the first product row on every archive, so
 * it now reads as a note in the corner instead of a wall across the page. */
.hbg-consent {
	left: 20px;
	right: auto;
	bottom: 20px;
	width: min(380px, calc(100vw - 40px));
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-lg);
	background: var(--hb-card);
	color: var(--hb-ink);
	box-shadow: var(--hb-shadow-lift);
	transform: none;
}

.hbg-consent .hbg-consent-body {
	gap: 6px;
}

.hbg-consent.is-leaving {
	transform: translateY(10px);
}

.hbg-consent .hbg-consent-title {
	font-size: 14px;
	line-height: 1.3;
	color: var(--hb-ink);
}

.hbg-consent .hbg-consent-copy {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--hb-muted);
}

.hbg-consent .hbg-consent-copy a {
	color: var(--hb-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hbg-consent .hbg-consent-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hbg-consent .hbg-consent-btn {
	min-height: 38px;
	padding: 0 14px;
	border: 1px solid var(--hb-line-strong);
	border-radius: var(--hb-radius-sm);
	background: var(--hb-card);
	color: var(--hb-ink);
	font-family: var(--hb-font);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--hb-dur) ease, border-color var(--hb-dur) ease;
}

.hbg-consent .hbg-consent-btn:hover {
	border-color: var(--hb-line-strong);
	background: var(--hb-bg-2);
}

.hbg-consent .hbg-consent-btn--primary {
	border-color: transparent;
	background: var(--hb-accent-fill);
	color: var(--hb-on-accent);
}

.hbg-consent .hbg-consent-btn--primary:hover {
	border-color: transparent;
	background: var(--hb-accent-hi);
}

@media (max-width: 640px) {
	.hbg-consent {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		padding: 16px;
	}

	.hbg-consent .hbg-consent-btn {
		flex: 1 1 0;
	}
}

/* ============================================================== surfaces */

/* Section wrapper used by the account, custom-work and tool pages so their
 * vertical rhythm matches the archives. */
.hbg-section {
	padding: var(--hb-section) 0;
}

.hbg-section--tight {
	padding: calc(var(--hb-section) * 0.55) 0;
}

.hbg-card-surface {
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius-lg);
	background: var(--hb-card);
}

.hbg-divider {
	height: 1px;
	border: 0;
	background: var(--hb-line);
}

/* ================================================================== nav */

/* The bar is a glass capsule, so it needs a surface that is not the page's own
 * grey; at rest the mask alone made it read as a floating hole in light mode. */
.sa-nav .sa-nav-bar,
.sa-nav .sa-nav-glass {
	background-color: color-mix(in srgb, var(--hb-card) 78%, transparent);
}

body.dark .sa-nav .sa-nav-bar,
body.dark .sa-nav .sa-nav-glass {
	background-color: color-mix(in srgb, #101010 76%, transparent);
}

/* The wordmark. Both logo files are badges — a dark plate with a blue keyline,
 * not a transparent cut-out — so they read as a sticker on the light field and
 * as a plate on the dark one. Give them their own radius and never blend them;
 * blend modes on a baked plate only muddy the keyline. */
.sa-nav-logo img,
.sa-footer-logo img {
	display: block;
	height: auto;
	width: auto;
	max-height: 100%;
	border-radius: 10px;
	object-fit: contain;
}

.sa-footer-logo img {
	border-radius: 12px;
}

/* Footer column alignment: the brand column used to sit 8px proud of the link
 * columns because its tag was in a different line box. */
.sa-footer-brand {
	padding-top: 2px;
}

.sa-footer-cols {
	align-items: start;
}

.sa-footer-col h2 {
	margin-top: 2px;
}

/* ============================================================ motion/print */

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

	.hbg-skeleton {
		animation: none;
		background: var(--hb-bg-2);
	}
}

@media print {
	.sa-header,
	.sa-footer,
	.hbg-consent,
	.hbg-skip,
	.sa-back-to-top {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	.hbg-page-head {
		margin-top: 0;
		padding-top: 24px;
	}

	.hbg-page-head::before {
		display: none;
	}
}
