/* Agent Deployer: a monochrome product surface.
   One neutral ramp, one ink, no brand colour. Contrast and spacing do the work
   that colour usually does, which keeps the page readable in both themes and
   keeps attention on the one thing that matters: the deploy button. */

:root {
	--bg: #ffffff;
	--bg-sunk: #fafafa;
	--surface: #ffffff;
	--surface-2: #f5f5f5;
	--surface-3: #ededed;
	--line: #e4e4e4;
	--line-strong: #d0d0d0;
	--ink: #0a0a0a;
	--ink-2: #3d3d3d;
	--ink-3: #6e6e6e;
	--ink-4: #9a9a9a;
	--inverse: #ffffff;
	--danger: #b42318;
	--danger-bg: #fef3f2;
	--ok: #0a0a0a;
	--shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04);
	--shadow-lg: 0 2px 4px rgba(0, 0, 0, .04), 0 16px 48px rgba(0, 0, 0, .08);
	--r-sm: 6px;
	--r: 10px;
	--r-lg: 14px;
	--r-xl: 20px;
	--sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	--max: 1200px;
}

[data-theme='dark'] {
	--bg: #0a0a0b;
	--bg-sunk: #060607;
	--surface: #131315;
	--surface-2: #1a1a1d;
	--surface-3: #232327;
	--line: #26262a;
	--line-strong: #38383e;
	--ink: #f7f7f8;
	--ink-2: #c9c9cd;
	--ink-3: #8e8e96;
	--ink-4: #63636b;
	--inverse: #0a0a0b;
	--danger: #ff9b93;
	--danger-bg: rgba(255, 80, 70, .08);
	--ok: #f7f7f8;
	--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
	--shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 48px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }

/* Author display rules (.choice, .stages, .wallet-bar) outrank the user-agent
   [hidden] style, which quietly left "hidden" panels on screen. Everything in
   this page toggles with the attribute, so it has to win outright. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; letter-spacing: -.021em; line-height: 1.15; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
code, pre { font-family: var(--mono); }

.skip {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--ink); color: var(--inverse); padding: 10px 16px; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
	position: sticky; top: 0; z-index: 40;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--line);
}
.nav-in { max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.02em; }
.brand-mark {
	width: 18px; height: 18px; border-radius: 5px; flex: none;
	background: var(--ink);
	box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 5px var(--ink);
}
.brand-mark.small { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--ink); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-3); transition: color .12s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
	width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
	background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-3);
	transition: color .12s ease, border-color .12s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 2px solid var(--ink); outline-offset: 2px;
}
.theme-icon { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); box-shadow: inset -4px -3px 0 0 var(--bg); }
[data-theme='light'] .theme-icon { box-shadow: none; background: var(--ink); }
@media (max-width: 780px) { .nav-links a:nth-child(3) { display: none; } }
@media (max-width: 620px) { .nav-in { gap: 14px; padding: 0 16px; } .nav-links { gap: 14px; } .nav-links a:nth-child(4) { display: none; } }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { max-width: 820px; margin: 0 auto; padding: 96px 24px 72px; text-align: center; }
.eyebrow {
	font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
	color: var(--ink-4); margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.4rem, 6.2vw, 4rem); font-weight: 700; letter-spacing: -.035em; }
.lede { margin: 22px auto 0; max-width: 620px; font-size: 17px; color: var(--ink-3); }
.lede strong { color: var(--ink-2); font-weight: 600; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-stats {
	display: flex; justify-content: center; gap: 48px; margin: 56px 0 0; flex-wrap: wrap;
	padding-top: 32px; border-top: 1px solid var(--line);
}
.hero-stats div { text-align: center; }
.hero-stats dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); }
.hero-stats dd { margin: 6px 0 0; font-size: 18px; font-weight: 600; font-family: var(--mono); letter-spacing: -.02em; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: inherit; font-size: 14px; font-weight: 550; text-decoration: none; cursor: pointer;
	padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line-strong);
	background: var(--surface); color: var(--ink);
	transition: background .12s ease, border-color .12s ease, transform .08s ease, opacity .12s ease;
}
.btn:hover { border-color: var(--ink-4); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--inverse); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-primary:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--surface-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line-strong); }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }

/* ── Feature strip ────────────────────────────────────────────────────── */
.strip { border-block: 1px solid var(--line); background: var(--bg-sunk); }
.feature-row {
	max-width: var(--max); margin: 0 auto; padding: 48px 24px; list-style: none;
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px;
}
.feature-row h3 { font-size: 15px; margin-bottom: 8px; }
.feature-row p { font-size: 14px; color: var(--ink-3); }
@media (max-width: 900px) { .feature-row { grid-template-columns: repeat(2, 1fr); gap: 28px; } }
@media (max-width: 540px) { .feature-row { grid-template-columns: 1fr; } }

/* ── App shell ────────────────────────────────────────────────────────── */
.app { max-width: var(--max); margin: 0 auto; padding: 72px 24px 40px; scroll-margin-top: 70px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.app-head h2 { font-size: 26px; letter-spacing: -.03em; }
.net-switch { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.net-btn {
	font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; padding: 6px 15px;
	border: none; border-radius: 999px; background: transparent; color: var(--ink-3);
	display: inline-flex; align-items: center; gap: 6px; transition: background .12s ease, color .12s ease;
}
.net-btn span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); }
.net-btn:hover { color: var(--ink); }
.net-btn.active { background: var(--ink); color: var(--inverse); }
.net-btn.active span { color: color-mix(in srgb, var(--inverse) 62%, transparent); }

.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.app-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 980px) {
	.app-grid { grid-template-columns: 1fr; }
	.rail { position: static; }
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.card-quiet { box-shadow: none; background: var(--bg-sunk); }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head h3 { font-size: 16px; }
.card-head h3 .opt, .label .opt { font-style: normal; font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); margin-left: 6px; }
.card-sub { font-size: 13px; color: var(--ink-3); margin: -8px 0 16px; }
.step {
	width: 24px; height: 24px; flex: none; display: grid; place-items: center;
	border-radius: 50%; background: var(--ink); color: var(--inverse);
	font-size: 12px; font-weight: 700; font-family: var(--mono);
}
.card-status { margin-left: auto; font-size: 12px; color: var(--ink-4); font-family: var(--mono); }
.cost { margin-left: auto; font-size: 13px; font-family: var(--mono); color: var(--ink-3); }
.fee-note { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--ink-4); }
.fee-note a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.fee-note a:hover { color: var(--ink); }

/* ── Wallet choices ───────────────────────────────────────────────────── */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.choice {
	display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; width: 100%;
	font: inherit; color: inherit; padding: 14px; border: 1px solid var(--line);
	border-radius: var(--r); background: var(--surface);
	transition: border-color .12s ease, background .12s ease, transform .08s ease;
}
.choice:hover { border-color: var(--ink-4); background: var(--surface-2); }
.choice:active { transform: translateY(1px); }
.choice-wide { margin-top: 10px; }
.choice-ic {
	width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px;
	background: var(--surface-3); font-weight: 600; font-size: 16px; color: var(--ink-2);
}
.choice-ic img { width: 20px; height: 20px; border-radius: 4px; }
.choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-body strong { font-size: 14px; font-weight: 550; }
.choice-body small { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.choice-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; color: var(--ink-4); font-size: 12px; }
.choice-or::before, .choice-or::after { content: ''; height: 1px; flex: 1; background: var(--line); }

.wallet-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.wallet-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.wallet-id code { font-size: 13px; }
.wallet-kind { font-size: 13px; font-weight: 550; }
.dot-ok { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.wallet-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.balance { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }

/* ── Segmented control ────────────────────────────────────────────────── */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 18px; }
.seg-btn {
	font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 7px 14px;
	border: none; border-radius: 7px; background: transparent; color: var(--ink-3); transition: background .12s, color .12s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--surface); color: var(--ink); font-weight: 550; box-shadow: var(--shadow); }

/* ── Fields ───────────────────────────────────────────────────────────── */
.fields { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; }
.field + .field { margin-top: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row .field + .field { margin-top: 0; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.label { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.label em { font-style: normal; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); margin-left: 6px; }
input[type='text'], input[type='url'], input[type='number'], input[type='password'], textarea {
	font: inherit; font-size: 14px; width: 100%; color: var(--ink);
	background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r);
	padding: 10px 12px; transition: border-color .12s ease, box-shadow .12s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:hover, textarea:hover { border-color: var(--ink-4); }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
textarea { resize: vertical; min-height: 64px; }
.field small { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.field small code, .rail-note code, .hint code { font-size: .92em; color: var(--ink-2); }
.counter { position: absolute; right: 0; top: 0; font-size: 11px; color: var(--ink-4); }
.field-sm { max-width: 220px; }
.input-suffix { display: flex; align-items: center; gap: 8px; }
.input-suffix span { font-size: 13px; color: var(--ink-4); font-family: var(--mono); }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 10px; line-height: 1.55; }
.hint a { color: var(--ink-2); }

/* ── Switches and checks ──────────────────────────────────────────────── */
.switch-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .switch-row { grid-template-columns: 1fr; } }
.switch { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
	width: 36px; height: 21px; flex: none; margin-top: 2px; border-radius: 999px;
	background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: background .16s ease, border-color .16s ease;
}
.switch-track::after {
	content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
	background: var(--bg); box-shadow: var(--shadow); transition: transform .16s ease;
}
.switch input:checked + .switch-track { background: var(--ink); border-color: var(--ink); }
.switch input:checked + .switch-track::after { transform: translateX(15px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; gap: 1px; }
.switch-text strong { font-size: 13px; font-weight: 550; }
.switch-text small { font-size: 12px; color: var(--ink-3); }
.plugin-set { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .plugin-set { grid-template-columns: 1fr; } }
.plugin-set legend { font-size: 13px; font-weight: 550; padding: 0 6px; color: var(--ink-2); }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13px; }
.check input { accent-color: var(--ink); width: 15px; height: 15px; margin-top: 2px; flex: none; cursor: pointer; }
.check span { display: flex; flex-direction: column; }
.check small { font-size: 12px; color: var(--ink-3); }

/* ── Repeating rows ───────────────────────────────────────────────────── */
.rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1 1 0; min-width: 0; }
.row input.narrow { flex: 0 0 90px; }
.row-del {
	width: 30px; height: 30px; flex: none; display: grid; place-items: center; cursor: pointer;
	background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
	color: var(--ink-4); font-size: 17px; line-height: 1;
}
.row-del:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line); }

/* ── three.ws picker ──────────────────────────────────────────────────── */
.import-row { display: flex; gap: 8px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 14px; }
.picker-item {
	cursor: pointer; padding: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
	background: var(--surface-2); font: inherit; color: inherit; text-align: left; transition: border-color .12s, transform .12s;
}
.picker-item:hover { border-color: var(--ink-4); transform: translateY(-2px); }
.picker-item.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.picker-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-3); }
.picker-item span { display: block; padding: 7px 9px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker .skeleton { aspect-ratio: 1; border-radius: var(--r); background: var(--surface-3); animation: pulse 1.5s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ── Advanced ─────────────────────────────────────────────────────────── */
details summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary h3 { font-size: 16px; }
.summary-hint { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
details[open] > summary { margin-bottom: 20px; }
.adv { gap: 22px; }
.nested { border-top: 1px solid var(--line); padding-top: 16px; }
.nested summary { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.nested summary::before { content: '+'; font-family: var(--mono); color: var(--ink-4); }
.nested[open] summary::before { content: '\2212'; }
.nested > .field:first-of-type { margin-top: 14px; }

/* ── Stages, errors, success ──────────────────────────────────────────── */
.stages { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.stages li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--ink-4); transition: color .2s ease; }
.stages li::before {
	content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--surface-3);
	border: 1px solid var(--line-strong); transition: background .2s ease, border-color .2s ease;
}
.stages li.active { color: var(--ink); font-weight: 550; }
.stages li.active::before { background: var(--ink); border-color: var(--ink); animation: ping 1.5s ease infinite; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 30%, transparent); } 60% { box-shadow: 0 0 0 6px transparent; } }
.stages li.done { color: var(--ink-3); }
.stages li.done::before { background: var(--ink-3); border-color: var(--ink-3); }
.error, .warn, .ok {
	margin-top: 14px; font-size: 13.5px; line-height: 1.55; padding: 11px 14px; border-radius: var(--r);
	border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2);
}
.error { color: var(--danger); background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.ok { border-color: var(--ink-4); }
.success { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); animation: rise .4s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.success h4 { font-size: 17px; margin-bottom: 16px; }
.kv { margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.kv > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kv dt { font-size: 12px; color: var(--ink-3); min-width: 96px; }
.kv dd { margin: 0; display: flex; align-items: center; gap: 7px; min-width: 0; }
.kv code { font-size: 12.5px; overflow-wrap: anywhere; }
.copy {
	font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
	padding: 3px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
	background: var(--surface); color: var(--ink-3); transition: color .12s, border-color .12s;
}
.copy:hover { color: var(--ink); border-color: var(--ink-4); }
.copy.done { color: var(--ok); border-color: var(--ok); }
.out-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.out-links a {
	font-size: 13px; font-weight: 500; text-decoration: none; padding: 7px 13px;
	border: 1px solid var(--line-strong); border-radius: 999px; transition: border-color .12s, background .12s;
}
.out-links a:hover { border-color: var(--ink); background: var(--surface-2); }

/* ── Rail ─────────────────────────────────────────────────────────────── */
.preview { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.preview-media { aspect-ratio: 1.5; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.preview-media img { width: 100%; height: 100%; object-fit: cover; }
.preview-initial { font-size: 46px; font-weight: 700; color: var(--ink-4); letter-spacing: -.04em; }
.preview-body { padding: 16px 18px 18px; }
.preview-body h4 { font-size: 16px; margin-bottom: 5px; overflow-wrap: anywhere; }
.preview-body p { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; }
.chips span.on { color: var(--ink); border-color: var(--ink-4); }
.rail-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; background: var(--surface); }
.rail-card h5 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); font-weight: 600; }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rail-net { font-size: 15px; font-weight: 600; margin-top: 8px; }
.rail-rpc { font-size: 12px; color: var(--ink-3); margin: 3px 0 12px; overflow-wrap: anywhere; font-family: var(--mono); }
.tabs { display: inline-flex; padding: 2px; gap: 2px; background: var(--surface-2); border-radius: var(--r-sm); }
.tab { font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; padding: 4px 10px; border: none; border-radius: 5px; background: transparent; color: var(--ink-3); }
.tab.active { background: var(--ink); color: var(--inverse); }
.json { margin: 0; padding: 12px; max-height: 300px; overflow: auto; font-size: 11.5px; line-height: 1.55; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2); }
.rail-note { font-size: 11.5px; color: var(--ink-4); margin-top: 10px; }

/* ── Recent + sections ────────────────────────────────────────────────── */
.recent { max-width: var(--max); margin: 0 auto; padding: 40px 24px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 20px; }
.section-head a { font-size: 13px; color: var(--ink-3); text-decoration: none; }
.section-head a:hover { color: var(--ink); }
.recent-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.recent-card {
	display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--r);
	overflow: hidden; background: var(--surface); transition: border-color .12s, transform .12s;
}
.recent-card:hover { border-color: var(--ink-4); transform: translateY(-2px); }
.recent-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-2); }
.recent-meta { padding: 9px 11px; }
.recent-meta strong { display: block; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta small { font-size: 11px; color: var(--ink-4); }
.recent-card.skeleton { height: 190px; background: var(--surface-2); animation: pulse 1.5s ease infinite; }
.recent-empty { font-size: 13px; color: var(--ink-3); }

/* ── MCP band ─────────────────────────────────────────────────────────── */
.mcp { border-top: 1px solid var(--line); background: var(--bg-sunk); margin-top: 40px; }
.mcp-in { max-width: var(--max); margin: 0 auto; padding: 72px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .mcp-in { grid-template-columns: 1fr; gap: 36px; padding: 52px 24px; } }
.mcp h2 { font-size: 30px; letter-spacing: -.032em; margin-bottom: 14px; }
.mcp-copy p { color: var(--ink-3); font-size: 15px; }
.mcp-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.mcp-code { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); }
.mcp-code pre { margin: 0; padding: 16px 14px; overflow-x: auto; font-size: 12.5px; }
.tool-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tool-list li { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tool-list li:last-child { border-bottom: none; }
.tool-list code { font-size: 12px; color: var(--ink); flex: none; }
.tool-list span { color: var(--ink-3); font-size: 12.5px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 28px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.foot-in > div { display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.foot-in small { color: var(--ink-4); }
.foot-in small a { color: var(--ink-3); }
.foot nav { display: flex; gap: 20px; }
.foot nav a { color: var(--ink-3); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }

/* ── Modals ───────────────────────────────────────────────────────────── */
.modal {
	width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line);
	border-radius: var(--r-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); }
.modal-x { position: absolute; top: 10px; right: 10px; margin: 0; }
.modal-x button { width: 30px; height: 30px; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink-4); background: transparent; border: none; border-radius: var(--r-sm); }
.modal-x button:hover { color: var(--ink); background: var(--surface-2); }
.modal-body { padding: 26px; }
.modal-body h3 { font-size: 18px; margin-bottom: 10px; }
.modal-body > p { font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; line-height: 1.6; }
.modal-body > p a { color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal .field + .field { margin-top: 16px; }
.secret-box {
	font-family: var(--mono); font-size: 12px; word-break: break-all; padding: 12px;
	background: var(--bg-sunk); border: 1px solid var(--line-strong); border-radius: var(--r); margin: 14px 0 6px; user-select: all;
}
.danger-note { font-size: 12.5px; color: var(--danger); background: var(--danger-bg); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); padding: 11px 13px; border-radius: var(--r); line-height: 1.55; }
.modal-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.modal-steps li { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.modal-steps b { flex: none; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: 11px; }

/* ── Docs ─────────────────────────────────────────────────────────────── */
.docs { max-width: var(--max); margin: 0 auto; padding: 48px 24px 80px; display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 84px; font-size: 13.5px; }
.docs-nav h6 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); font-weight: 600; }
.docs-nav ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { display: block; padding: 4px 10px; margin-left: -10px; border-radius: var(--r-sm); color: var(--ink-3); text-decoration: none; }
.docs-nav a:hover { color: var(--ink); background: var(--surface-2); }
.docs-body { min-width: 0; max-width: 760px; }
.docs-body h1 { font-size: 34px; letter-spacing: -.035em; margin-bottom: 12px; }
.docs-body .lede { margin: 0 0 40px; text-align: left; font-size: 16px; }
.docs-body section { margin-bottom: 48px; scroll-margin-top: 78px; }
.docs-body h2 { font-size: 22px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); letter-spacing: -.028em; }
.docs-body h3 { font-size: 15.5px; margin: 26px 0 8px; }
.docs-body p, .docs-body li { font-size: 14.5px; color: var(--ink-2); }
.docs-body p + p { margin-top: 12px; }
.docs-body ul, .docs-body ol { padding-left: 20px; margin: 12px 0; display: flex; flex-direction: column; gap: 7px; }
.docs-body a { color: var(--ink); text-underline-offset: 2px; }
.docs-body pre {
	margin: 14px 0; padding: 14px 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.6;
	background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r);
}
.docs-body :not(pre) > code { font-size: .9em; padding: 1.5px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.docs-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; display: block; overflow-x: auto; }
.docs-body th, .docs-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-body th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-4); font-weight: 600; white-space: nowrap; }
.docs-body td code { white-space: nowrap; }
.note { border-left: 2px solid var(--ink); padding: 2px 0 2px 16px; margin: 16px 0; color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 860px) {
	.docs { grid-template-columns: 1fr; gap: 24px; }
	.docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
	.docs-nav > div { display: contents; }
	.docs-nav h6 { width: 100%; margin: 0; }
	.docs-nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 8px; }
	.docs-nav a { margin: 0; padding: 3px 8px; }
}
