.code-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--rule, var(--border));
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color 160ms var(--ease, ease);
}

.doc-page .code-card { margin: 20px 0; }

.code-card:hover {
	border-color: var(--gold-edge, var(--accent));
}

.code-card h3 { padding: 22px 22px 0; margin-bottom: 6px; }
.code-card > p {
	padding: 0 22px 16px;
	font-size: 0.94rem;
	color: var(--ink-dim, var(--text-dim));
}

.code-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 14px;
	background: rgba(5, 18, 60, 0.85);
	border-top: 1px solid var(--rule, var(--border));
	border-bottom: 1px solid var(--rule, var(--border));
}

.code-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 5px;
	background: transparent;
	color: #d8e1ff;
	cursor: pointer;
	flex-shrink: 0;
}
.code-copy:hover { background: rgba(255, 255, 255, 0.1); }
.code-copy:focus-visible { outline: 2px solid #f7d774; outline-offset: 2px; }
.code-copy-status {
	flex: 1;
	margin: 0 10px;
	font-size: 0.8rem;
	color: #d8e1ff;
}
.code-copy-input { position: fixed; left: -9999px; top: 0; }

.code-lang {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-muted, var(--text-dim));
	padding: 3px 9px;
	border: 1px solid var(--rule, var(--border));
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
}

.code-card pre.syntax-block {
	margin: 0;
	padding: 18px 20px;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.32);
	border: 0;
	border-radius: 0;
	overflow-x: auto;
	white-space: pre;
	font-size: 0.8rem;
	line-height: 1.55;
	color: #eef2fb;
}

.code-card pre.syntax-block code.syntax-code {
	display: block;
	white-space: pre;
	min-width: max-content;
	font-family: var(--font-mono);
	font-size: inherit;
	background: none;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: inherit;
	tab-size: 2;
	-moz-tab-size: 2;
	font-variant-ligatures: none;
}

.code-note {
	padding: 12px 20px;
	margin: auto 0 0;
	font-size: 0.86rem;
	color: var(--ink-muted, var(--text-dim));
	border-top: 1px solid var(--rule, var(--border));
	background: rgba(255, 255, 255, 0.02);
}

.token.comment, .token.prolog, .token.doctype, .token.cdata {
	color: #7a8bb8;
	font-style: italic;
}
.token.keyword, .token.atrule, .token.important { color: #ff8ea1; font-weight: 700; }
.token.type, .token.class-name, .token.builtin { color: #8bd9ff; }
.token.function { color: #f7d774; }
.token.variable { color: #b8a7ff; }
.token.property, .token.attr-name { color: #ffd27c; }
.token.string, .token.char, .token.attr-value, .token.regex { color: #8ce6b4; }
.token.number, .token.boolean { color: #ffbf7a; }
.token.operator, .token.punctuation { color: #d8e1ff; }
.token.tag { color: #7ee3ff; font-weight: 700; }
