.main-nav .nav-active {
	background: var(--black);
	color: var(--paper-2);
	border-color: var(--black);
}

.hardware-overview {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(420px, .8fr);
	align-items: center;
	gap: clamp(50px, 7vw, 110px);
	background: radial-gradient(circle at 82% 28%, rgba(0,199,217,.06), transparent 28%), var(--paper);
}

.hardware-overview-copy { min-width: 0; max-width: 820px; }
.hardware-title-heading { grid-template-columns: 70px 1fr; margin-bottom: 34px; }
.hardware-title-heading h1 { font-size: clamp(64px, 7vw, 112px); line-height: .82; }
.hardware-title-heading .lead { margin-top: 32px; max-width: 720px; }

.hardware-body {
	max-width: 720px;
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.8;
	color: var(--muted);
}

.hardware-diagram {
	max-width: 600px;
	display: grid;
	gap: 14px;
	padding: 20px;
	border: 1px solid var(--ink);
	background: var(--paper-2);
	box-shadow: 10px 10px 0 rgba(0,0,0,.07), -3px -3px 0 rgba(0,199,217,.28), 3px 3px 0 rgba(238,46,145,.20);
}

.diagram-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.diagram-node {
	min-height: 116px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 16px;
	border: 1px solid rgba(21,21,21,.35);
	background: rgba(255,255,255,.28);
}

.diagram-main { min-height: 145px; background: var(--black); color: var(--paper-2); }
.diagram-wide { min-height: 108px; }
.diagram-node small { font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.diagram-main small { color: var(--cyan); }
.diagram-node strong { font-family: "VT323", monospace; font-size: clamp(25px, 2.4vw, 36px); font-weight: 400; line-height: 1; }
.diagram-node span { font-size: 11px; color: var(--muted); }
.diagram-main span { color: #aaa; }
.diagram-line { width: 1px; height: 20px; margin: -2px auto; background: var(--ink); }

.hardware-bom { display: block; min-height: auto; background: var(--paper-2); }

.bom-intro {
	max-width: 880px;
	margin: 0 0 42px 75px;
	font-size: 14px;
	line-height: 1.8;
	color: var(--muted);
}

.bom-list { border-top: 1px solid var(--ink); }
.bom-item { border-bottom: 1px solid var(--ink); background: transparent; }

.bom-item summary {
	position: relative;
	display: grid;
	grid-template-columns: 60px minmax(0,1fr) 40px;
	align-items: center;
	gap: 18px;
	min-height: 96px;
	padding: 16px 8px;
	cursor: pointer;
	list-style: none;
	transition: background .16s ease;
}

.bom-item summary::-webkit-details-marker { display: none; }
.bom-item summary:hover { background: rgba(255,255,255,.32); }
.bom-number { font-family: "VT323", monospace; font-size: 34px; }

.bom-summary-copy {
	display: grid;
	grid-template-columns: 190px minmax(0,1fr);
	align-items: center;
	gap: 18px;
}

.bom-summary-copy small { font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.bom-summary-copy strong { font-size: 15px; font-weight: 600; }
.bom-summary-copy > span { font-size: 12px; color: var(--muted); }

.bom-toggle {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	justify-self: end;
	border: 1px solid var(--ink);
	font-family: "VT323", monospace;
	font-size: 26px;
	line-height: 1;
}

.bom-item[open] .bom-toggle { background: var(--black); color: var(--paper-2); font-size: 0; }
.bom-item[open] .bom-toggle::before { content: "−"; font-size: 26px; }

.bom-detail {
	display: grid;
	grid-template-columns: minmax(0,1fr);
	gap: clamp(38px,6vw,86px);
	padding: 30px 58px 42px 78px;
	border-top: 1px dashed rgba(21,21,21,.24);
}

.bom-detail-main { max-width: 720px; }
.bom-detail-main h3 { margin-bottom: 20px; font-size: 28px; }
.bom-detail-main p { margin: 0 0 16px; font-size: 13px; line-height: 1.8; color: var(--muted); }

.bom-specs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border: 1px solid rgba(21,21,21,.4);
}

.bom-specs > span {
	min-height: 80px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 8px;
	padding: 12px;
	border-right: 1px solid rgba(21,21,21,.2);
	border-bottom: 1px solid rgba(21,21,21,.2);
}

.bom-specs > span:nth-child(2n) { border-right: 0; }
.bom-specs > span:nth-last-child(-n+2) { border-bottom: 0; }
.bom-specs small { font-size: 8px; letter-spacing: .08em; color: var(--muted); }
.bom-specs strong { font-family: "VT323", monospace; font-size: 22px; font-weight: 400; line-height: 1; }

.bom-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.bom-links a { padding-bottom: 4px; border-bottom: 1px solid var(--ink); text-decoration: none; font-size: 11px; }
.bom-links a:hover, .bom-links a:focus-visible { color: var(--cyan); border-color: var(--cyan); }

.hardware-lessons {
	min-height: calc(100svh - var(--footer-h));
	display: block;
	padding-bottom: 54px;
	background: var(--paper);
}

.hardware-lesson-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	border: 1px solid var(--ink);
}

.hardware-lesson-grid article {
	min-height: 250px;
	padding: 28px;
	border-right: 1px solid var(--ink);
	border-bottom: 1px solid var(--ink);
}

.hardware-lesson-grid article:nth-child(2n) { border-right: 0; }
.hardware-lesson-grid article:nth-last-child(-n+2) { border-bottom: 0; }
.hardware-lesson-grid article > span { display: block; margin-bottom: 42px; font-size: 11px; color: var(--muted); }
.hardware-lesson-grid h3 { margin-bottom: 18px; font-size: 25px; }
.hardware-lesson-grid p { margin: 0; max-width: 620px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.hardware-next { margin-top: 46px; }

@media (max-width: 1000px) {
	.hardware-overview { grid-template-columns: 1fr; }
	.hardware-diagram { max-width: 760px; }
	.bom-detail { grid-template-columns: 1fr; }
	.bom-specs { max-width: 700px; }
}

@media (max-width: 900px) {
	.bom-intro { margin-left: 0; }
	.bom-summary-copy { grid-template-columns: 1fr; gap: 5px; }
	.bom-detail { padding-left: 18px; padding-right: 18px; }
	.hardware-lessons { min-height: auto; }
}

@media (max-width: 620px) {
	.hardware-title-heading { grid-template-columns: 44px minmax(0,1fr); gap: 12px; }
	.hardware-title-heading h1 { font-size: clamp(52px, 15vw, 72px); }
	.diagram-row { grid-template-columns: 1fr; }
	.hardware-diagram { padding: 12px; }
	.bom-item summary { grid-template-columns: 42px minmax(0,1fr) 34px; gap: 10px; min-height: 88px; }
	.bom-number { font-size: 27px; }
	.bom-toggle { width: 30px; height: 30px; }
	.bom-detail { padding: 24px 0 34px; }
	.bom-specs { grid-template-columns: 1fr; }
	.bom-specs > span, .bom-specs > span:nth-child(2n), .bom-specs > span:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid rgba(21,21,21,.2); }
	.bom-specs > span:last-child { border-bottom: 0; }
	.hardware-lesson-grid { grid-template-columns: 1fr; }
	.hardware-lesson-grid article, .hardware-lesson-grid article:nth-child(2n), .hardware-lesson-grid article:nth-last-child(-n+2) { min-height: 0; border-right: 0; border-bottom: 1px solid var(--ink); }
	.hardware-lesson-grid article:last-child { border-bottom: 0; }
}


/* Component-list notice */

.hardware-note {
	max-width: 1000px;
	margin: 0 0 46px 75px;
	padding: 20px 22px;
	border: 1px solid var(--ink);
	background: rgba(255,255,255,.28);
	box-shadow: inset 4px 0 0 var(--cyan);
}

.hardware-note p {
	margin: 0 0 12px;
	font-size: 12px;
	line-height: 1.75;
	color: var(--muted);
}

.hardware-note p:last-child {
	margin-bottom: 0;
}

.hardware-note strong {
	color: var(--ink);
}

.hardware-note a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.hardware-note a:hover,
.hardware-note a:focus-visible {
	color: var(--cyan);
}

.bom-price {
	width: max-content;
	margin-bottom: 20px;
	padding: 7px 10px;
	border: 1px solid var(--ink);
	background: var(--black);
	color: var(--paper-2);
	font-family: "VT323", monospace;
	font-size: 24px;
	line-height: 1;
}

.bom-detail-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 40px;
	align-items: start;
}

.bom-description {
	min-width: 0;
}

.bom-price {
	margin: 0;
	white-space: nowrap;
	text-align: right;
}

.bom-detail-main p {
	max-width: 900px;
}

@media (max-width: 900px) {
	.hardware-note {
		margin-left: 0;
	}
}

@media (max-width: 620px) {
	.hardware-note {
		padding: 16px;
	}

	.bom-summary-copy {
		grid-template-columns: 1fr;
	}

	.bom-summary-copy small {
		margin-bottom: 3px;
	}
}

.hardware-note .support-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;

	margin-top: 14px;
	padding: 10px 14px;

	border: 1px solid var(--ink);
	background: var(--black);
	color: var(--paper-2);

	font-family: "IBM Plex Mono", monospace;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;

	box-shadow:
		4px 4px 0 rgba(0,0,0,.10),
		-2px -2px 0 rgba(0,199,217,.45),
		2px 2px 0 rgba(238,46,145,.35);

	transition:
		transform .15s ease,
		color .15s ease,
		box-shadow .15s ease;
}

.support-button:hover,
.support-button:focus-visible {
	color: var(--cyan);
	transform: translateY(-2px);

	box-shadow:
		6px 6px 0 rgba(0,0,0,.10),
		-2px -2px 0 rgba(0,199,217,.65),
		2px 2px 0 rgba(238,46,145,.55);

	outline: none;
}

.support-button:active {
	transform: translateY(0);
}

.hardware-note p:last-child {
	margin-bottom: 0;
}
