.bk-code {
	--bk-code-bg: #0f172a;
	--bk-code-fg: #e2e8f0;
	margin: 1.5em 0;
	border-radius: 8px;
	background: var(--bk-code-bg);
	color: var(--bk-code-fg);
	overflow: hidden;
}
.bk-code__header {
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.5em 1em;
	background: var(--bk-code-header-bg, rgba(255, 255, 255, 0.06));
	color: var(--bk-code-header-color, inherit);
	font-size: 0.8em;
}
.bk-code__file {
	flex: 1;
	font-weight: 600;
}
.bk-code__lang {
	opacity: 0.6;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.bk-code__copy {
	padding: 0.25em 0.75em;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 4px;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.bk-code__copy:hover,
.bk-code__copy:focus-visible {
	background: rgba(255, 255, 255, 0.15);
}
.bk-code__pre {
	margin: 0;
	padding: 1em 0;
	max-height: var(--bk-code-max-height, none);
	overflow: auto;
	background: none;
	color: inherit;
	font-size: 0.9em;
	line-height: 1.6;
}
.bk-code__code {
	display: block;
	min-width: max-content;
	background: none;
	color: inherit;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bk-code__line {
	display: block;
	min-height: 1.6em;
	padding: 0 1em;
	white-space: pre;
}
.bk-code--numbers .bk-code__code {
	counter-reset: bk-line;
}
.bk-code--numbers .bk-code__line::before {
	display: inline-block;
	width: 2.5em;
	margin-right: 1em;
	counter-increment: bk-line;
	content: counter(bk-line);
	color: var(--bk-code-ln, inherit);
	opacity: 0.4;
	text-align: right;
	user-select: none;
}
.bk-code__line.is-highlighted {
	background: var(--bk-code-highlight, rgba(250, 204, 21, 0.15));
	box-shadow: inset 3px 0 0 #facc15;
}
.bk-tok--comment {
	color: #94a3b8;
	font-style: italic;
}
.bk-tok--string {
	color: #86efac;
}
.bk-tok--keyword {
	color: #c4b5fd;
}
.bk-tok--number {
	color: #fdba74;
}
.bk-tok--variable {
	color: #7dd3fc;
}
.bk-tok--function {
	color: #fde68a;
}
/* Light theme. */
.bk-code--light {
	--bk-code-bg: #f8fafc;
	--bk-code-fg: #0f172a;
	border: 1px solid #e2e8f0;
}
.bk-code--light .bk-code__header {
	background: var(--bk-code-header-bg, rgba(15, 23, 42, 0.05));
}
.bk-code--light .bk-code__copy {
	border-color: rgba(15, 23, 42, 0.3);
}
.bk-code--light .bk-code__copy:hover,
.bk-code--light .bk-code__copy:focus-visible {
	background: rgba(15, 23, 42, 0.08);
}
.bk-code--light .bk-tok--comment {
	color: #64748b;
}
.bk-code--light .bk-tok--string {
	color: #15803d;
}
.bk-code--light .bk-tok--keyword {
	color: #7c3aed;
}
.bk-code--light .bk-tok--number {
	color: #c2410c;
}
.bk-code--light .bk-tok--variable {
	color: #0369a1;
}
.bk-code--light .bk-tok--function {
	color: #b45309;
}

/* Editor: transparent textarea over the coloured lines. */
.bk-code--editor .bk-code__scroll {
	max-height: var(--bk-code-max-height, none);
	overflow: auto;
}
.bk-code--editor .bk-code__stack {
	position: relative;
}
.bk-code--editor .bk-code__pre {
	max-height: none;
	overflow: visible;
	min-height: 3em;
	pointer-events: none;
}
.bk-code--editor .bk-code__input {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 1em 1em 1em 1em;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	caret-color: var(--bk-code-fg);
	color: transparent;
	font: inherit;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
	line-height: 1.6;
	overflow: hidden;
	resize: none;
	white-space: pre;
}
.bk-code--editor.bk-code--numbers .bk-code__input {
	padding-left: 4.5em;
}
.bk-code--editor .bk-code__input:focus {
	outline: none;
	box-shadow: none;
}
.bk-code--editor .bk-code__input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}
.bk-code--light.bk-code--editor .bk-code__input::placeholder {
	color: rgba(15, 23, 42, 0.4);
}
