.bpe-pinout {
	--bpe-board-color: #0f9b8d;
	--bpe-board-shadow: #0a6d61;
	--bpe-panel-color: #15263d;
	--bpe-panel-soft: #1d3557;
	--bpe-paper: #f6f1e9;
	--bpe-ink: #16202b;
	--bpe-digital: #ffd166;
	--bpe-analog: #67d4ff;
	--bpe-pwm: #ff7a91;
	--bpe-uart: #f7b267;
	--bpe-i2c: #67d5b5;
	--bpe-spi: #9ad17b;
	--bpe-power: #ff8b6a;
	--bpe-ground: #c5d0dc;
	--bpe-control: #d4b6ff;
	--bpe-aux: #f0c76c;
	color: var(--bpe-ink);
	font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.bpe-shell {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.88fr);
	gap: 1.5rem;
	padding: clamp(1.2rem, 2vw, 1.75rem);
	border-radius: 1.9rem;
	background:
		radial-gradient(circle at top right, rgba(255, 209, 102, 0.38), transparent 30%),
		radial-gradient(circle at bottom left, rgba(15, 155, 141, 0.22), transparent 34%),
		linear-gradient(145deg, #fbf7f1 0%, #f1e8dd 100%);
	box-shadow: 0 32px 60px rgba(17, 24, 39, 0.12);
}

.bpe-stage {
	display: grid;
	gap: 1rem;
}

.bpe-intro {
	display: grid;
	gap: 0.85rem;
}

.bpe-eyebrow,
.bpe-detail__eyebrow {
	margin: 0;
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #a95f2f;
}

.bpe-title,
.bpe-detail__title {
	margin: 0;
	font-family: "Space Grotesk", "Avenir Next", sans-serif;
	font-size: clamp(1.8rem, 3vw, 2.7rem);
	line-height: 1.05;
}

.bpe-summary,
.bpe-detail__summary,
.bpe-detail__aliases {
	margin: 0;
	line-height: 1.65;
	font-size: 1.5rem;
}

.bpe-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 0.75rem;
}

.bpe-stat {
	padding: 0.9rem 1rem;
	border: 1px solid rgba(22, 32, 43, 0.08);
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.68);
	backdrop-filter: blur(12px);
}

.bpe-stat__value,
.bpe-stat__label {
	display: block;
}

.bpe-stat__value {
	font-weight: 800;
	font-size: 1.5rem;
	color: #0d5c53;
}

.bpe-stat__label {
	font-weight: 600;
	margin-top: 0.22rem;
	font-size: 1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(22, 32, 43, 0.68);
}

.bpe-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
}

.bpe-filter {
	padding: 0.72rem 0.95rem;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: inset 0 0 0 1px rgba(22, 32, 43, 0.12);
	color: #233547;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bpe-filter:hover,
.bpe-filter:focus-visible {
	transform: translateY(-1px);
}

.bpe-filter.is-active {
	background: #113946;
	color: #fffaf2;
}

.bpe-filter--ghost {
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(22, 32, 43, 0.18);
}

.bpe-canvas {
	padding: clamp(0.4rem, 1vw, 0.75rem);
	border-radius: 1.6rem;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(237, 228, 214, 0.82)),
		repeating-linear-gradient(135deg, rgba(17, 57, 70, 0.025), rgba(17, 57, 70, 0.025) 12px, transparent 12px, transparent 26px);
	box-shadow: inset 0 0 0 1px rgba(22, 32, 43, 0.08);
}

.bpe-board {
	position: relative;
	width: min(100%, 1120px);
	margin: 0 auto;
	aspect-ratio: 100 / 60;
	container-type: inline-size;
	animation: bpe-rise 0.55s ease-out;
}

.bpe-board__body,
.bpe-decoration,
.bpe-pin {
	position: absolute;
}

.bpe-board__body {
	border-radius: 2rem 2.5rem 2.2rem 1.7rem;
	background:
		radial-gradient(circle at 22% 30%, rgba(255, 255, 255, 0.16), transparent 20%),
		repeating-linear-gradient(155deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 10px, transparent 10px, transparent 18px),
		linear-gradient(160deg, var(--bpe-board-color), #0d8a7e 54%, var(--bpe-board-shadow));
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.12),
		0 18px 28px rgba(10, 48, 53, 0.2);
}

.bpe-board__body::before,
.bpe-board__body::after {
	content: "";
	position: absolute;
	inset: 7%;
	border-radius: 1.4rem;
	pointer-events: none;
}

.bpe-board__body::before {
	border: 1px solid rgba(250, 250, 250, 0.08);
}

.bpe-board__body::after {
	background:
		radial-gradient(circle at 14% 72%, rgba(244, 208, 63, 0.11), transparent 14%),
		radial-gradient(circle at 78% 24%, rgba(244, 208, 63, 0.11), transparent 18%);
}

.bpe-decoration {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
	text-align: center;
	font-size: clamp(0.42rem, 0.9cqw, 0.82rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(12, 24, 37, 0.74);
	pointer-events: none;
}

.bpe-decoration span {
	line-height: 1.2;
}

.bpe-decoration--label {
	justify-content: flex-start;
	padding: 0;
	font-size: clamp(0.46rem, 0.98cqw, 0.9rem);
	letter-spacing: 0.14em;
	color: rgba(244, 244, 244, 0.85);
}

.bpe-decoration--badge {
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #ecf8f7;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.bpe-decoration--port,
.bpe-decoration--jack,
.bpe-decoration--chip,
.bpe-decoration--module,
.bpe-decoration--icsp,
.bpe-decoration--button,
.bpe-decoration--indicator {
	border-radius: 1rem;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 18px rgba(12, 24, 37, 0.16);
}

.bpe-decoration--port {
	background: linear-gradient(180deg, #c9d4dc, #8f9fa8);
	color: #233547;
}

.bpe-decoration--jack {
	background: linear-gradient(180deg, #28323c, #151c25);
	color: #f4f7fb;
}

.bpe-decoration--chip,
.bpe-decoration--module,
.bpe-decoration--icsp {
	background:
		repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.26) 4px, rgba(255, 255, 255, 0.02) 4px, rgba(255, 255, 255, 0.02) 8px),
		linear-gradient(180deg, #2b3848, #16202b);
	color: #d7e4ef;
}

.bpe-decoration--module {
	background: linear-gradient(180deg, #355070, #22334a);
}

.bpe-decoration--icsp {
	border-radius: 1.25rem;
}

.bpe-decoration--button {
	border-radius: 999px;
	background: linear-gradient(180deg, #f3ede5, #d7cec1);
	color: #1b2734;
}

.bpe-decoration--indicator {
	border-radius: 999px;
	background: radial-gradient(circle, rgba(255, 235, 156, 0.92), #f5ac3c 65%, #784c12 100%);
	color: #2b1200;
}

.bpe-pin {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.06rem;
	padding: 0.08rem 0.02rem;
	border: 0;
	border-radius: 1.08rem;
	box-shadow:
		inset 0 0 0 1px rgba(19, 25, 32, 0.18),
		0 8px 14px rgba(12, 24, 37, 0.16);
	color: #101820;
	text-align: center;
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.bpe-pin:hover,
.bpe-pin:focus-visible {
	transform: translateY(-2px);
	box-shadow:
		inset 0 0 0 1px rgba(19, 25, 32, 0.16),
		0 12px 20px rgba(12, 24, 37, 0.22);
}

.bpe-pin:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.92);
	outline-offset: 2px;
}

.bpe-pin.is-selected {
	transform: translateY(-3px) scale(1.04);
	box-shadow:
		0 0 0 3px rgba(255, 255, 255, 0.75),
		0 16px 24px rgba(12, 24, 37, 0.25);
	z-index: 2;
}

.bpe-pin.is-dimmed {
	opacity: 0.24;
	filter: saturate(0.45);
}

.bpe-pin__label {
	display: block;
	max-width: 100%;
	font-size: clamp(1rem, 1.2cqw, 1.5rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.bpe-pin__badge {
	display: block;
	max-width: 100%;
	font-size: clamp(.8rem, 1cqw, 1.2rem);
	font-weight: 700;
	line-height: 1;
	opacity: 0.82;
	white-space: nowrap;
}

.bpe-pin--digital {
	background: linear-gradient(180deg, rgba(255, 229, 153, 0.97), rgba(239, 186, 70, 0.95));
}

.bpe-pin--analog {
	background: linear-gradient(180deg, rgba(195, 242, 255, 0.98), rgba(103, 212, 255, 0.95));
}

.bpe-pin--pwm {
	background: linear-gradient(180deg, rgba(255, 186, 201, 0.98), rgba(255, 122, 145, 0.95));
}

.bpe-pin--uart {
	background: linear-gradient(180deg, rgba(255, 216, 172, 0.98), rgba(247, 178, 103, 0.95));
}

.bpe-pin--i2c {
	background: linear-gradient(180deg, rgba(192, 250, 230, 0.98), rgba(103, 213, 181, 0.95));
}

.bpe-pin--spi {
	background: linear-gradient(180deg, rgba(212, 244, 188, 0.98), rgba(154, 209, 123, 0.95));
}

.bpe-pin--power {
	background: linear-gradient(180deg, rgba(255, 205, 188, 0.98), rgba(255, 139, 106, 0.96));
}

.bpe-pin--ground {
	background: linear-gradient(180deg, rgba(228, 234, 240, 0.98), rgba(197, 208, 220, 0.95));
}

.bpe-pin--control {
	background: linear-gradient(180deg, rgba(232, 214, 255, 0.98), rgba(212, 182, 255, 0.95));
}

.bpe-pin--aux {
	background: linear-gradient(180deg, rgba(248, 228, 163, 0.98), rgba(240, 199, 108, 0.95));
}

.bpe-sources {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: flex-start;
}

.bpe-source-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: auto;
	max-width: 100%;
	padding: 0.58rem 0.82rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.76);
	color: #124559;
	font-size: 0.86rem;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
	box-shadow: inset 0 0 0 1px rgba(18, 69, 89, 0.12);
}

.bpe-detail .bpe-source-link {
	justify-content: flex-start;
	white-space: normal;
}

.bpe-source-link:hover,
.bpe-source-link:focus-visible {
	text-decoration: underline;
}

.bpe-detail {
	position: sticky;
	top: 1.25rem;
	align-self: start;
	min-height: 100%;
	padding: clamp(1.2rem, 2vw, 1.5rem);
	border-radius: 1.6rem;
	background:
		radial-gradient(circle at top right, rgba(255, 209, 102, 0.12), transparent 28%),
		linear-gradient(180deg, var(--bpe-panel-soft), var(--bpe-panel-color));
	color: #eff7ff;
	box-shadow: 0 24px 44px rgba(17, 24, 39, 0.22);
}

.bpe-detail__inner {
	display: grid;
	gap: 1rem;
}

.bpe-detail__eyebrow {
	color: rgba(255, 211, 142, 0.88);
}

.bpe-detail__title {
	font-size: clamp(1.45rem, 2vw, 2rem);
}

.bpe-detail__aliases {
	color: rgba(227, 239, 251, 0.8);
}

.bpe-pill-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.bpe-pill,
.bpe-back-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.52rem 0.78rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: #f8fbff;
	font-size: 0.8rem;
	font-weight: 700;
}

.bpe-back-link {
	border: 0;
	font: inherit;
	cursor: pointer;
}

.bpe-fact-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.72rem;
	margin: 0;
}

.bpe-fact-list dt {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(164, 198, 224, 0.88);
}

.bpe-fact-list dd {
	margin: 0.22rem 0 0;
	font-size: 1.2rem;
	color: #f6fbff;
}

.bpe-detail__section {
	padding: 0.92rem 1rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.06);
}

.bpe-detail__section--warning {
	background: rgba(255, 139, 106, 0.16);
	box-shadow: inset 0 0 0 1px rgba(255, 176, 154, 0.18);
}

.bpe-detail__section h4 {
	margin: 0 0 0.65rem;
	font-size: 0.84rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 223, 194, 0.9);
}

.bpe-list {
	margin: 0;
	padding-left: 1rem;
	line-height: 1.7;
}

.bpe-list li + li {
	margin-top: 0.32rem;
}

@keyframes bpe-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1080px) {
	.bpe-shell {
		grid-template-columns: 1fr;
	}

	.bpe-detail {
		position: static;
	}
}

@media (max-width: 740px) {
	.bpe-shell {
		padding: 1rem;
		border-radius: 1.35rem;
	}

	.bpe-toolbar {
		gap: 0.5rem;
	}

	.bpe-filter {
		padding: 0.62rem 0.8rem;
		font-size: 0.84rem;
	}

	.bpe-pin__badge {
		display: none;
	}

	.bpe-title {
		font-size: 1.7rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bpe-board,
	.bpe-pin,
	.bpe-filter {
		animation: none;
		transition: none;
	}
}
