/* Holdfast Hose Diagram. Override the custom properties to match the theme. */
.hfd {
	--hfd-accent: #f5a623;
	--hfd-bg: #0e1419;
	--hfd-panel: #151d24;
	--hfd-line: rgba(255, 255, 255, 0.1);
	--hfd-text: #e8edf1;
	--hfd-muted: #93a1ad;
	--hfd-radius: 16px;

	position: relative;
	overflow: hidden;
	padding: clamp(20px, 4vw, 48px);
	border-radius: var(--hfd-radius);
	color: var(--hfd-text);
	background-color: var(--hfd-bg);
	background-image:
		linear-gradient(var(--hfd-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--hfd-line) 1px, transparent 1px);
	background-size: 40px 40px;
	background-position: -1px -1px;
}

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

/* Head */
.hfd__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 32px;
	margin-bottom: clamp(8px, 2vw, 20px);
}
.hfd__intro { max-width: 620px; }
.hfd__eyebrow {
	margin: 0 0 8px;
	color: var(--hfd-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.hfd__title {
	margin: 0 0 10px;
	color: inherit;
	font-size: clamp(26px, 3.4vw, 40px);
	line-height: 1.1;
}
.hfd__text { margin: 0; color: var(--hfd-muted); line-height: 1.6; }

/* Buttons */
.hfd button { font: inherit; cursor: pointer; }
.hfd button:focus-visible,
.hfd__range:focus-visible,
.hfd__cta:focus-visible { outline: 2px solid var(--hfd-accent); outline-offset: 2px; }

.hfd__types {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--hfd-line);
	border-radius: 999px;
	background: var(--hfd-panel);
}
.hfd__type {
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	color: var(--hfd-muted);
	background: transparent;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s, color 0.2s;
}
.hfd__type:hover { color: var(--hfd-text); }
.hfd__type[aria-pressed="true"] { color: #111; background: var(--hfd-accent); }

/* Stage */
.hfd__stage { margin: 0 calc(clamp(20px, 4vw, 48px) * -0.5); }
.hfd__svg { display: block; width: 100%; height: auto; overflow: visible; }

.hfd-part { cursor: pointer; outline: none; transition: opacity 0.25s, filter 0.25s; }
.hfd.is-focused .hfd-part:not(.is-active) { opacity: 0.28; }
.hfd-part.is-active { filter: drop-shadow(0 0 6px var(--hfd-accent)); }
.hfd-part:focus-visible { filter: drop-shadow(0 0 3px var(--hfd-accent)) drop-shadow(0 0 3px var(--hfd-accent)); }

.hfd-edge { stroke: rgba(0, 0, 0, 0.45); stroke-width: 1; }
.hfd-flat { stroke: rgba(0, 0, 0, 0.28); stroke-width: 1.2; fill: none; pointer-events: none; }
.hfd-layline__brand { font-weight: 800; letter-spacing: 0.14em; }
.hfd-layline {
	fill: var(--hfd-layline, rgba(255, 255, 255, 0.72));
	font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.08em;
	pointer-events: none;
}

.hfd-callouts { pointer-events: none; }
.hfd-callout line { stroke: var(--hfd-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.hfd-callout circle { fill: var(--hfd-muted); }
.hfd-callout text { fill: var(--hfd-text); font-size: 15px; font-weight: 600; }
.hfd-callout.is-active text,
.hfd-callout.is-active circle { fill: var(--hfd-accent); }
.hfd-callout.is-active line { stroke: var(--hfd-accent); }

/* Controls */
.hfd__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	margin: clamp(8px, 2vw, 16px) 0 24px;
}
.hfd__toggle {
	min-width: 120px;
	padding: 10px 20px;
	border: 1px solid var(--hfd-accent);
	border-radius: 999px;
	color: var(--hfd-accent);
	background: transparent;
	font-weight: 700;
	transition: background 0.2s, color 0.2s;
}
.hfd__toggle:hover { color: #111; background: var(--hfd-accent); }
.hfd__range-wrap {
	display: flex;
	flex: 1 1 280px;
	align-items: center;
	gap: 12px;
	color: var(--hfd-muted);
	font-size: 13px;
}
.hfd__range { flex: 1; min-width: 0; accent-color: var(--hfd-accent); }

/* Parts + info */
.hfd__bottom {
	display: grid;
	gap: 16px;
}
@media (min-width: 800px) {
	.hfd__bottom { grid-template-columns: 1fr 1.2fr; align-items: start; }
}
.hfd__parts { display: flex; flex-wrap: wrap; gap: 8px; }
.hfd__chip {
	padding: 8px 14px;
	border: 1px solid var(--hfd-line);
	border-radius: 8px;
	color: var(--hfd-text);
	background: var(--hfd-panel);
	font-size: 14px;
	transition: border-color 0.2s, color 0.2s;
}
.hfd__chip:hover { border-color: var(--hfd-muted); }
.hfd__chip[aria-pressed="true"] { border-color: var(--hfd-accent); color: var(--hfd-accent); }

.hfd__info {
	min-height: 132px;
	padding: 20px 22px;
	border: 1px solid var(--hfd-line);
	border-left: 3px solid var(--hfd-accent);
	border-radius: 10px;
	background: var(--hfd-panel);
}
.hfd__spec {
	margin: 0 0 6px;
	color: var(--hfd-muted);
	font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.06em;
}
.hfd__info-title { margin: 0 0 6px; color: inherit; font-size: 20px; }
.hfd__info-body { margin: 0; color: var(--hfd-muted); line-height: 1.6; }

.hfd__cta {
	display: inline-flex;
	gap: 8px;
	margin-top: 24px;
	padding: 12px 22px;
	border-radius: 999px;
	color: #111;
	background: var(--hfd-accent);
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s;
}
.hfd__cta:hover { transform: translateY(-1px); color: #111; }

/* Small screens: labels would be unreadable, the chips + info panel take over. */
@media (max-width: 640px) {
	.hfd-callouts { display: none; }
	.hfd__stage { margin: 0 -12px; }
	.hfd__types { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-radius: 12px; }
	.hfd__type { min-width: 0; padding: 8px 4px; border-radius: 8px; font-size: 12px; line-height: 1.25; }
}

@media (prefers-reduced-motion: reduce) {
	.hfd-part, .hfd__cta, .hfd__type, .hfd__toggle { transition: none; }
}