.hbf {
	--hbf-ink: #18242b;
	--hbf-muted: #66727a;
	--hbf-paper: #f7f4ed;
	--hbf-border: #d9d2c4;
	--hbf-blueprint: #0d2b3b;
	--hbf-cyan: #72d9ee;
	--hbf-gold: #e7bd62;
	--hbf-red: #e66d63;
	--hbf-green: #3f7663;
	margin: clamp(2rem, 5vw, 4.5rem) 0;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border: 1px solid var(--hbf-border);
	border-radius: 6px;
	background: var(--hbf-paper);
	color: var(--hbf-ink);
	box-shadow: 0 18px 50px rgba(24, 36, 43, 0.08);
	font-family: inherit;
}

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

.hbf__header {
	max-width: 820px;
}

.hbf__eyebrow,
.hbf__result-kicker {
	margin: 0 0 0.45rem;
	color: #8a5c2a;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.16em;
}

.hbf__title {
	margin: 0;
	font-size: clamp(1.7rem, 4vw, 2.75rem);
	line-height: 1.06;
}

.hbf__intro {
	margin: 1rem 0 0;
	color: #43515a;
	font-size: 1rem;
	line-height: 1.65;
}

.hbf__form {
	display: grid;
	grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.5fr) minmax(160px, 0.85fr) auto;
	gap: 0.85rem;
	align-items: end;
	margin-top: 1.7rem;
	padding: 1.1rem;
	border: 1px solid rgba(24, 36, 43, 0.13);
	background: #fff;
}

.hbf__field label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}

.hbf__field label span {
	color: var(--hbf-muted);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

.hbf__field input,
.hbf__field select {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0.65rem 0.75rem;
	border: 1px solid #9fa8ad;
	border-radius: 2px;
	background: #fff;
	color: var(--hbf-ink);
	font: inherit;
	font-size: 0.92rem;
}

.hbf__field input:focus,
.hbf__field select:focus,
.hbf__submit:focus-visible,
.hbf__examples button:focus-visible {
	outline: 3px solid rgba(16, 95, 124, 0.24);
	outline-offset: 2px;
	border-color: #105f7c;
}

.hbf__submit {
	min-height: 48px;
	padding: 0.7rem 1.15rem;
	border: 1px solid var(--hbf-ink);
	border-radius: 2px;
	background: var(--hbf-ink);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.055em;
	text-transform: uppercase;
	transition: background 160ms ease, transform 160ms ease;
}

.hbf__submit:hover {
	background: #8a5c2a;
	transform: translateY(-1px);
}

.hbf__examples {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
	margin-top: 0.8rem;
	color: var(--hbf-muted);
	font-size: 0.78rem;
}

.hbf__examples button {
	padding: 0.3rem 0.55rem;
	border: 1px solid #c6c0b4;
	border-radius: 999px;
	background: transparent;
	color: #43515a;
	cursor: pointer;
	font: inherit;
	font-size: 0.76rem;
}

.hbf__examples button:hover {
	border-color: #8a5c2a;
	color: #8a5c2a;
}

.hbf__status {
	margin-top: 1rem;
	padding: 0.7rem 0.85rem;
	border-left: 3px solid #9ba5aa;
	background: rgba(255, 255, 255, 0.6);
	color: #4b5961;
	font-size: 0.84rem;
}

.hbf__status--success {
	border-left-color: var(--hbf-green);
}

.hbf__status--warning {
	border-left-color: #aa742f;
}

.hbf__results {
	margin-top: 1.15rem;
	scroll-margin-top: 2rem;
}

.hbf__result-card {
	margin-top: 1.25rem;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	border: 1px solid var(--hbf-border);
	background: #fff;
}

.hbf__result-card--primary {
	border-top: 5px solid #8a5c2a;
}

.hbf__result-heading {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	justify-content: space-between;
}

.hbf__result-heading h3 {
	margin: 0;
	font-size: clamp(1.35rem, 3vw, 2rem);
	line-height: 1.15;
}

.hbf__mount-badge {
	flex: none;
	padding: 0.45rem 0.7rem;
	border: 1px solid #8a5c2a;
	border-radius: 999px;
	color: #704719;
	font-size: 0.8rem;
	font-weight: 900;
	letter-spacing: 0.04em;
}

.hbf__confidence {
	display: flex;
	gap: 0.7rem;
	align-items: baseline;
	margin-top: 1rem;
	padding: 0.7rem 0.85rem;
	border-left: 3px solid #8a9aa3;
	background: #f5f7f7;
	font-size: 0.83rem;
}

.hbf__confidence span {
	color: #58666e;
}

.hbf__confidence--strong {
	border-left-color: var(--hbf-green);
}

.hbf__confidence--warning {
	border-left-color: var(--hbf-red);
	background: #fff5f2;
}

.hbf__facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 1rem 0;
	border-top: 1px solid #e2ded5;
	border-left: 1px solid #e2ded5;
}

.hbf__facts div {
	min-width: 0;
	padding: 0.75rem;
	border-right: 1px solid #e2ded5;
	border-bottom: 1px solid #e2ded5;
}

.hbf__facts dt {
	margin-bottom: 0.3rem;
	color: var(--hbf-muted);
	font-size: 0.67rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hbf__facts dd {
	margin: 0;
	font-size: 0.84rem;
	font-weight: 650;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.hbf__diagram {
	margin: 1.15rem 0;
}

.hbf-svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 540px;
}

.hbf-svg__background {
	fill: var(--hbf-blueprint);
}

.hbf-svg__grid {
	fill: url(#hbf-grid);
	opacity: 0.72;
}

.hbf-svg__grid-line {
	fill: none;
	stroke: #93bdcb;
	stroke-width: 0.45;
	opacity: 0.28;
}

.hbf-svg__heading,
.hbf-svg__panel-title,
.hbf-svg__panel-subtitle,
.hbf-svg__legend,
.hbf-svg__dimension-label {
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.hbf-svg__heading {
	fill: #e9f5f7;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 1.5px;
}

.hbf-svg__panel-title {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1px;
}

.hbf-svg__panel-subtitle,
.hbf-svg__legend {
	fill: #a9c2ca;
	font-size: 9px;
	letter-spacing: 0.7px;
}

.hbf-svg__divider,
.hbf-svg__extension {
	stroke: #a9c2ca;
	stroke-width: 1;
	opacity: 0.45;
}

.hbf-svg__body {
	fill: rgba(4, 18, 25, 0.62);
	stroke: #e0edf0;
	stroke-width: 2;
}

.hbf-svg__glass {
	fill: #07151c;
	stroke: #7696a1;
	stroke-width: 1;
}

.hbf-svg__ring {
	fill: none;
	stroke-width: 8;
}

.hbf-svg__ring--inner {
	stroke: var(--hbf-red);
}

.hbf-svg__ring--outer {
	stroke: var(--hbf-gold);
}

.hbf-svg__lug--inner {
	fill: var(--hbf-red);
}

.hbf-svg__lug--outer {
	fill: var(--hbf-gold);
}

.hbf-svg__dimension {
	stroke-width: 1.5;
}

.hbf-svg__dimension-label {
	paint-order: stroke;
	stroke: var(--hbf-blueprint);
	stroke-width: 7px;
	stroke-linejoin: round;
	font-size: 13px;
	font-weight: 900;
}

.hbf-svg__arrow {
	fill: #e9f5f7;
}

.hbf-svg__inner-colour {
	color: var(--hbf-red);
	fill: var(--hbf-red);
}

.hbf-svg__outer-colour {
	color: var(--hbf-gold);
	fill: var(--hbf-gold);
}

line.hbf-svg__inner-colour {
	stroke: var(--hbf-red);
}

line.hbf-svg__outer-colour {
	stroke: var(--hbf-gold);
}

.hbf__uses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
}

.hbf__uses > div {
	position: relative;
	padding: 0.8rem 0.85rem 0.8rem 2rem;
	border: 1px solid #e2ded5;
}

.hbf__uses strong {
	font-size: 0.82rem;
}

.hbf__uses p {
	margin: 0.15rem 0 0;
	color: #5b6870;
	font-size: 0.78rem;
	line-height: 1.45;
}

.hbf__dot {
	position: absolute;
	top: 0.95rem;
	left: 0.8rem;
	width: 9px;
	height: 9px;
	border-radius: 50%;
}

.hbf__dot--inner {
	background: var(--hbf-red);
}

.hbf__dot--outer {
	background: var(--hbf-gold);
}

.hbf__compatibility,
.hbf__warning,
.hbf__footnote,
.hbf__notice {
	font-size: 0.78rem;
	line-height: 1.55;
}

.hbf__compatibility {
	margin: 0.8rem 0 0;
	color: #43515a;
}

.hbf__warning {
	margin: 0.75rem 0 0;
	padding: 0.65rem 0.75rem;
	border-left: 3px solid #aa742f;
	background: #fff8e9;
}

.hbf__sources {
	margin-top: 0.9rem;
	font-size: 0.78rem;
}

.hbf__sources summary {
	cursor: pointer;
	font-weight: 750;
}

.hbf__sources ul {
	margin: 0.55rem 0 0;
	padding-left: 1.2rem;
}

.hbf__sources a {
	color: #0b5c79;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hbf__empty {
	padding: 1.2rem;
	border: 1px dashed #aa742f;
	background: #fff;
}

.hbf__empty h3,
.hbf__empty p {
	margin-top: 0;
}

.hbf__empty p {
	margin-bottom: 0;
}

.hbf__footnote {
	margin: 1.2rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--hbf-border);
	color: var(--hbf-muted);
}

@media (max-width: 980px) {
	.hbf__form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hbf__submit {
		width: 100%;
	}

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

@media (max-width: 620px) {
	.hbf {
		margin-right: -0.4rem;
		margin-left: -0.4rem;
		padding: 1rem;
	}

	.hbf__form {
		grid-template-columns: 1fr;
		padding: 0.85rem;
	}

	.hbf__result-heading,
	.hbf__confidence {
		align-items: flex-start;
		flex-direction: column;
	}

	.hbf__facts,
	.hbf__uses {
		grid-template-columns: 1fr;
	}

	.hbf-svg__panel-title {
		font-size: 13px;
	}

	.hbf-svg__panel-subtitle,
	.hbf-svg__legend {
		font-size: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hbf__submit {
		transition: none;
	}
}
