.circuit-board,
.circuit-board * {
	box-sizing: border-box;
}

/* Fills whatever element it is placed in, so size that wrapper (e.g. the
   Webflow Div/Section around the Code Embed). --circuit-min-height is the
   fallback when the wrapper has no height of its own. */
.w-embed:has(> .circuit-board) {
	width: 100%;
	height: 100%;
}

.circuit-board {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: var(--circuit-min-height, 480px);
	overflow: hidden;
	background: transparent;
	color: #c3d0dc;
	font: 11px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.circuit-board header,
.circuit-board footer {
	position: absolute;
	left: 88px;
	right: 88px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 2;
}

.circuit-board:not(.show-ui) header,
.circuit-board:not(.show-ui) footer,
.circuit-board:not(.show-ui) nav,
.circuit-board:not(.show-ui) .layers {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.circuit-board header {
	top: 26px;
}

.circuit-board .brand {
	display: flex;
	align-items: center;
	gap: 12px;
	letter-spacing: 0.14em;
}

.circuit-board .brand i,
.circuit-board footer b {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #1fc283;
	box-shadow: 0 0 10px #1fc28340;
}

.circuit-board .brand span {
	color: #526172;
	margin-left: 20px;
	font-size: 9px;
}

.circuit-board .tools {
	display: flex;
	gap: 8px;
}

.circuit-board .tools button,
.circuit-board nav button {
	color: #b9c9d7;
	background: #0b121b;
	border: 1px solid #25333f;
	border-radius: 6px;
	font: inherit;
	padding: 10px 13px;
	cursor: pointer;
	white-space: nowrap;
}

.circuit-board .tools button:hover,
.circuit-board nav button:hover {
	border-color: #1fc283;
	color: #e0fff2;
}

.circuit-board .tools button[aria-pressed='true'],
.circuit-board nav button[aria-pressed='true'] {
	border-color: #49a9ed;
	color: #d1f0ff;
	background: #102438;
}

.circuit-board .tools button:focus-visible,
.circuit-board nav button:focus-visible,
.circuit-board #stage:focus-visible {
	outline: 1px solid #1fc283;
	outline-offset: -4px;
}

.circuit-board #stage {
	position: absolute;
	inset: 0;
	touch-action: none;
	cursor: default;
}

.circuit-board #stage canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.circuit-board footer {
	bottom: 22px;
	font-size: 9px;
	letter-spacing: 0.12em;
	color: #677887;
}

.circuit-board footer span:first-child {
	display: flex;
	align-items: center;
	gap: 9px;
}

.circuit-board footer p {
	margin: 0;
	letter-spacing: 0;
	color: #8a9baa;
	font-size: 11px;
}

.circuit-board footer em {
	font-style: normal;
	padding: 0 10px;
	color: #3b4c5c;
}

.circuit-board #error {
	position: absolute;
	top: 45%;
	left: 20%;
	right: 20%;
	line-height: 1.8;
	text-align: center;
}

.circuit-board nav {
	position: absolute;
	bottom: 68px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	width: max-content;
	max-width: calc(100% - 32px);
	z-index: 3;
}

.circuit-board nav button {
	font-size: 10px;
	color: #6f8596;
	white-space: nowrap;
}

.circuit-board .layers {
	position: absolute;
	left: 32px;
	top: 28%;
	display: flex;
	flex-direction: column;
	gap: 65px;
	pointer-events: none;
	color: #536a7d;
	font-size: 9px;
	letter-spacing: 0.1em;
	z-index: 2;
}

.circuit-board .layers b {
	display: block;
	color: #91b3c8;
	font-weight: 400;
	margin: 8px 0;
}

.circuit-board .layers small {
	font-size: 10px;
	letter-spacing: 0;
	color: #506775;
}

@media (max-width: 1000px) {
	.circuit-board .layers {
		display: none;
	}
}

@media (max-width: 650px) {
	.circuit-board header {
		left: 16px;
		right: 16px;
		top: 14px;
	}

	.circuit-board .tools {
		gap: 6px;
	}

	.circuit-board .tools button {
		padding: 8px 9px;
		font-size: 10px;
	}

	.circuit-board footer {
		left: 18px;
		right: 18px;
		justify-content: center;
	}

	.circuit-board .brand span,
	.circuit-board .edition,
	.circuit-board footer span:first-child {
		display: none;
	}

	.circuit-board footer p {
		font-size: 10px;
	}

	.circuit-board .brand {
		font-size: 10px;
	}
}
