.wp-block-noctograph-steps.noctograph-steps {
	counter-reset: noctograph-step;
	display: grid;
	gap: clamp(1.75rem, 5vw, 3.5rem);
	list-style: none;
	margin-bottom: clamp(2.5rem, 7vw, 5rem);
	margin-top: clamp(2.5rem, 7vw, 5rem);
	padding: 0;
}

.noctograph-step {
	counter-increment: noctograph-step;
	display: grid;
	gap: 1rem;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	margin: 0;
}

.noctograph-step__marker {
	align-items: center;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--signal);
	display: flex;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 700;
	height: 2.75rem;
	justify-content: center;
	line-height: 1;
	position: relative;
	width: 2.75rem;
}

.noctograph-step__marker::before {
	content: counter(noctograph-step, decimal-leading-zero);
}

.noctograph-step:not(:last-child) .noctograph-step__marker::after {
	background: var(--wp--preset--color--line);
	content: "";
	inset: calc(100% + 1px) auto -3.5rem 50%;
	position: absolute;
	width: 1px;
}

.noctograph-step__content > :first-child {
	margin-top: 0;
}

.noctograph-step__content > :last-child {
	margin-bottom: 0;
}

.wp-block-noctograph-command-output,
.wp-block-noctograph-diagram {
	margin-bottom: clamp(2rem, 6vw, 5rem);
	margin-top: clamp(2rem, 6vw, 5rem);
}

.noctograph-command__toolbar {
	align-items: center;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	display: flex;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	font-weight: 650;
	justify-content: space-between;
	min-height: 3rem;
	padding: 0.25rem 0.375rem 0.25rem 0.875rem;
}

.noctograph-command__toolbar > span:first-child {
	color: var(--wp--preset--color--muted);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.noctograph-command__toolbar button {
	background: transparent;
	border: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--signal);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.8125rem;
	font-weight: 750;
	min-height: 2.5rem;
	padding: 0.5rem 0.75rem;
}

.noctograph-command__toolbar button:hover {
	background: var(--wp--preset--color--signal);
	border-color: var(--wp--preset--color--signal);
	color: var(--wp--preset--color--ink);
}

.noctograph-command__session {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 0;
}

.noctograph-command :where(pre, code) {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.65;
}

.noctograph-command pre {
	background: transparent;
	border: 0;
	margin: 0;
	overflow-x: auto;
	padding: 1rem 1.25rem;
	white-space: pre;
}

.noctograph-command__prompt {
	color: var(--wp--preset--color--signal);
	font-weight: 700;
}

.noctograph-command__output {
	border-top: 1px solid var(--wp--preset--color--line) !important;
	color: var(--wp--preset--color--muted);
}

.noctograph-command figcaption,
.noctograph-diagram figcaption {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	margin-top: 0.75rem;
}

.noctograph-diagram__canvas {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	min-height: 12rem;
	overflow-x: auto;
	padding: clamp(1rem, 4vw, 2rem);
}

.noctograph-diagram__output {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
}

.noctograph-diagram__output svg {
	display: block;
	height: auto;
	margin-inline: auto;
	max-width: 100%;
}

.noctograph-diagram__fallback {
	background: transparent;
	border: 0;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	margin: 1rem 0 0;
	overflow-x: auto;
	padding: 0;
	white-space: pre;
}

.noctograph-diagram__description {
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	padding: 0.75rem 0;
}

.noctograph-diagram__description summary {
	cursor: pointer;
	font-weight: 700;
}

.noctograph-diagram__description p {
	color: var(--wp--preset--color--muted);
	line-height: 1.6;
}

@media (max-width: 600px) {
	.noctograph-step {
		grid-template-columns: 2.25rem minmax(0, 1fr);
	}

	.noctograph-step__marker {
		height: 2.25rem;
		width: 2.25rem;
	}
}

