/* Lunardraw: Developers page ([ml_developers]). Builds on games, agents, draws and verification CSS. */

/* its own backdrop: the city on a build night, animated by developers-fx.js */
body.ml-developers-page::before {
	background-image: url("../images/developers-bg.webp?v=3");
	background-image: image-set(url("../images/developers-bg.webp?v=3") 1x, url("../images/developers-bg@2x.webp?v=3") 2x);
}

.mlx {
	--amber: #ffb347;
	--amber-rgb: 255, 179, 71;
}

.mlx .mlx-sign {
	font-size: clamp(30px, 6.4vw, 80px);
	color: var(--amber);
}

.mlx .mlx-sign-sub {
	color: #ff8fe6;
}

.mlx .mlg-hero {
	background: rgba(10, 4, 22, 0.62);
	border-color: #5a2a6a;
}

.mlx .mlg-panel {
	border-color: #3d2560;
}

.mlx .mlg-panel-title {
	color: var(--ml-ink); /* titles are ink on every page; the page colour lives in its hero */
}

/* ------------------------------------------------------------------ quickstart + console */
.mlx-top {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: var(--ml-s6);
	align-items: start;
}

.mlx-steps {
	display: flex;
	flex-direction: column;
	gap: var(--ml-s4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mlx-steps li {
	display: flex;
	flex-direction: column;
	gap: var(--ml-s2);
}

.mlx .mlx-steps h3 {
	font-size: var(--wp--preset--font-size--body, 16px);
	letter-spacing: 0;
	color: var(--ml-ink);
}

.mlx-tabs {
	border: 1px solid #3d2560;
	border-radius: var(--ml-r-sm);
	background: #07030f;
	overflow: hidden;
}

.mlx-tab-row {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 4px 4px 0;
	border-bottom: 1px solid #3d2560;
	background: rgba(52, 20, 72, 0.5);
}

.mlx-tab {
	padding: 5px 12px;
	font-size: 12px;
	letter-spacing: 0;
	color: var(--ml-muted);
	background: transparent;
	border: 0;
	border-radius: var(--ml-r-xs) var(--ml-r-xs) 0 0;
	cursor: pointer;
}

.mlx-tab.is-on {
	color: var(--amber);
	background: #07030f;
	box-shadow: inset 0 2px 0 var(--amber);
}

.mlx-tab:focus-visible,
.mlx-copy:focus-visible {
	outline: 2px solid var(--ml-cyan);
	outline-offset: -2px;
}

.mlx-copy {
	margin-left: auto;
	padding: 3px 10px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ml-ink);
	background: transparent;
	border: 1px solid #5a2a6a;
	border-radius: var(--ml-r-xs);
	cursor: pointer;
	margin-bottom: 4px;
}

.mlx-pre {
	margin: 0;
	padding: var(--ml-s3) var(--ml-s4);
	overflow-x: auto;
	font-family: var(--ml-mono);
	font-size: 14px;
	line-height: 1.55;
	color: #f0dcff;
	background: none;
	border: 0;
	white-space: pre;
}

.mlx-pre[hidden] {
	display: none;
}

.mlx-console {
	position: sticky;
	top: 96px;
	display: flex;
	flex-direction: column;
	border: 2px solid var(--ml-neon);
	border-radius: var(--ml-r-md);
	background: rgba(7, 3, 15, 0.95);
	box-shadow: 0 0 0 3px rgba(var(--ml-void-rgb), 0.9);
	overflow: hidden;
}

.mlx-console-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	background: rgba(52, 20, 72, 0.9);
	border-bottom: 1px solid #5a2a6a;
}

.mlx-console-bar span {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--ml-alert);
}

.mlx-console-bar span:nth-child(2) { background: #ffc440; }
.mlx-console-bar span:nth-child(3) { background: #50e6a0; }

.mlx-console-bar b {
	margin-left: 8px;
	font-weight: 400;
	font-size: 12px;
	color: var(--ml-muted);
}

.mlx-console-body {
	height: 420px;
	margin: 0;
	padding: var(--ml-s3) var(--ml-s4);
	overflow: hidden;
	font-family: var(--ml-mono);
	font-size: 14px;
	line-height: 1.6;
	white-space: pre-wrap;
	word-break: break-all;
	color: #b9a6e8;
	background: none;
	border: 0;
}

.mlx-console-body .c-cmd { color: #7fdcff; }
.mlx-console-body .c-out { color: #d9c8ff; }
.mlx-console-body .c-ok { color: #7dffc8; }
.mlx-console-body .c-note { color: #8a7aa8; }

.mlx-console-body::after {
	content: "▌";
	color: var(--amber);
	animation: mlx-blink 1s steps(1) infinite;
}

@keyframes mlx-blink {
	50% { opacity: 0; }
}

/* ------------------------------------------------------------------ try it */
.mlx-try {
	scroll-margin-top: 96px;
	border-color: rgba(var(--amber-rgb), 0.5) !important;
	box-shadow: 0 0 0 3px rgba(var(--ml-void-rgb), 0.9);
}

.mlx-req {
	display: grid;
	grid-template-columns: minmax(200px, 300px) minmax(0, 1fr) auto;
	gap: var(--ml-s3);
	align-items: stretch;
}

.mlx-req select {
	width: 100%;
	height: 100%;
	min-height: 44px;
	padding: 6px 8px;
	font-size: 14px;
	color: var(--ml-ink);
	background: var(--ml-raised);
	border: 1px solid #3d2560;
	border-radius: var(--ml-r-xs);
}

.mlx-req-url {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	padding: 0 10px;
	background: #07030f;
	border: 1px solid #3d2560;
	border-radius: var(--ml-r-xs);
}

.mlx-req-url:focus-within {
	border-color: var(--ml-cyan);
}

.mlx-base {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 12px;
	color: var(--ml-muted);
}

.mlx-req-url input {
	flex: 1 1 160px;
	min-width: 80px;
	height: 42px;
	padding: 0;
	font-family: var(--ml-mono);
	font-size: 14px;
	color: var(--amber);
	background: transparent;
	border: 0;
	outline: none;
}

.mlx-body {
	grid-column: 1 / -1;
	min-height: 150px;
	padding: 10px;
	font-family: var(--ml-mono);
	font-size: 14px;
	line-height: 1.5;
	color: #f0dcff;
	background: #07030f;
	border: 1px solid #3d2560;
	border-radius: var(--ml-r-xs);
	resize: vertical;
}

.mlx-body[hidden] {
	display: none;
}


.mlx-verb {
	flex: 0 0 auto;
	padding: 2px 6px;
	font-size: 12px;
	letter-spacing: 0;
	color: var(--ml-void);
	background: #7fdcff;
	border-radius: var(--ml-r-xs);
}

.mlx-verb-post {
	background: #ff8fe6;
}

.mlx-ep-note {
	margin-top: calc(-1 * var(--ml-s2)) !important;
}

.mlx-res {
	border: 1px solid #3d2560;
	border-radius: var(--ml-r-sm);
	background: #07030f;
	overflow: hidden;
}

.mlx-res-head {
	display: flex;
	justify-content: space-between;
	gap: var(--ml-s3);
	padding: 8px var(--ml-s3);
	border-bottom: 1px solid #3d2560;
	font-size: 12px;
	color: var(--ml-muted);
}

.mlx-res-head .is-ok { color: #7dffc8; }
.mlx-res-head .is-err { color: var(--ml-alert); }

.mlx-res-body {
	max-height: 380px;
	overflow: auto;
	font-size: 14px;
	white-space: pre;
}

.j-k { color: #7fdcff; }
.j-s { color: #ffd27a; }
.j-n { color: #ff8fe6; }
.j-b { color: #7dffc8; }

/* ------------------------------------------------------------------ three ways in */
.mlx-ways {
	display: flex;
	flex-direction: column;
	gap: var(--ml-s4);
}

.mlx .mld-section-title {
	align-self: center;
	padding: 6px var(--ml-s4);
	background: rgba(var(--ml-void-rgb), 0.85);
	border-radius: var(--ml-r-xs);
}

.mlx-ways-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--ml-s6);
}

.mlx-way {
	scroll-margin-top: 96px;
	gap: var(--ml-s3);
}

.mlx-way:target {
	border-color: var(--amber) !important;
	box-shadow: 0 0 0 3px rgba(var(--ml-void-rgb), 0.9);
}

.mlx-way-icon {
	font-family: var(--ml-pixel);
	font-size: 28px;
	line-height: 1;
	color: var(--amber);
}

.mlx-way-mcp .mlx-way-icon { color: #ff8fe6; }
.mlx-way-sdk .mlx-way-icon { color: #7fdcff; }

.mlx .mlx-way h3 {
	display: flex;
	align-items: center;
	gap: var(--ml-s2);
	font-weight: 600;
	font-size: 20px;
	letter-spacing: 0.04em;
	color: var(--ml-ink);
}

.mlx-way p {
	font-size: 14px;
	color: var(--ml-ink);
}

.mlx-badge {
	display: inline-block;
	padding: 2px 8px;
	font-weight: 400;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ml-muted);
	border: 1px dashed rgba(var(--ml-muted-rgb), 0.55);
	border-radius: var(--ml-r-xs);
	vertical-align: middle;
}

.mlx-badge.is-live {
	color: var(--ml-live);
	border: 1px solid rgba(var(--ml-live-rgb), 0.5);
}

.mlx-link {
	font-size: 14px;
}

/* ------------------------------------------------------------------ reference + tools */
.mlx-lower {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ml-s6);
	align-items: start;
}

.mlx-table {
	min-width: 560px;
}

.mlx-table code {
	font-family: var(--ml-mono);
	font-size: 14px;
	color: var(--amber);
	background: none;
}

.mlx-table td {
	font-size: 14px;
	vertical-align: top;
}

.mlx-table td:first-child {
	white-space: nowrap;
}

.mlx-tools {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--ml-s6);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mlx-tools li {
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--ml-s3);
	padding: 9px 0;
	border-bottom: 1px solid #3d2560;
	font-size: 14px;
	color: var(--ml-ink);
}

.mlx-tools li:nth-last-child(-n + 2) {
	border-bottom: 0;
}

.mlx-tools code {
	font-family: var(--ml-mono);
	font-size: 14px;
	color: #ff8fe6;
	background: none;
}

.mlx-scope {
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 1px 6px;
	border-radius: var(--ml-r-xs);
	border: 1px solid currentColor;
}

.mlx-scope-read { color: #7fdcff; }
.mlx-scope-write { color: var(--amber); }
.mlx-scope-private { color: var(--ml-violet-bright); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
	.mlx-top,
	.mlx-lower {
		grid-template-columns: minmax(0, 1fr);
	}
	.mlx-console {
		position: static;
	}
	.mlx-console-body {
		height: 300px;
	}
	.mlx-ways-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 700px) {
	.mlx-req {
		grid-template-columns: minmax(0, 1fr);
	}
	.mlx-base {
		display: none;
	}
	.mlx-tools {
		grid-template-columns: minmax(0, 1fr);
	}
	.mlx-tools li {
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.mlx-tools li span:not(.mlx-scope) {
		grid-column: 1 / -1;
		grid-row: 2;
		color: var(--ml-muted);
		font-size: 12px;
	}
}

/* ------------------------------------------------------------------ play on chain */
.mlx-chain .mla-steps.mlx-chain-steps {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mlx-chain .mla-steps h3 {
	font-size: var(--wp--preset--font-size--body, 16px);
	letter-spacing: 0;
	color: var(--ml-ink);
}

.mlx-contract {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ml-s2);
	margin: 0;
	color: var(--ml-ink);
}

.mlx-chain-grid {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: var(--ml-s5, 20px);
	align-items: start;
}

.mlx-chain-grid pre {
	overflow-x: auto;
}

.mlx-chain-sub {
	margin: 0 0 var(--ml-s2);
	font-size: var(--wp--preset--font-size--body, 16px);
	letter-spacing: 0;
	color: var(--ml-ink);
}

.mlx-chain-table td:nth-child(n+2),
.mlx-chain-table th:nth-child(n+2) {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
	.mlx-chain .mla-steps.mlx-chain-steps,
	.mlx-chain-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.mlx-chain .mla-steps li + li::before {
		display: none;
	}
}

.mlx-chain-steps li:nth-child(3n+1)::before {
	display: none;
}
