Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

20.1 KB
Raw Blame
/* CA → x402 — turn any contract address into a payable x402 service.
 * Uses the platform token system (public/tokens.css). Brand blue marks the
 * x402/service surfaces; semantic green/red only ever mark price movement. */

.cx-shell {
	max-width: 980px;
	margin: 0 auto;
	padding: var(--space-2xl) var(--space-lg) var(--space-2xl);
	color: var(--ink);
	font-family: var(--font-body);
}

/* ── hero ─────────────────────────────────────────────────────────────── */
.cx-hero { text-align: center; margin-bottom: var(--space-xl); }
.cx-badge {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--brand-blue-light, var(--accent));
	background: var(--brand-blue-dim, var(--accent-soft));
	border: 1px solid var(--brand-blue-stroke, var(--stroke));
	border-radius: var(--radius-pill);
	padding: 4px 12px;
	margin-bottom: var(--space-md);
}
.cx-hero h1 {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(2.4rem, 7vw, 4rem);
	line-height: 1.02;
	margin: 0 0 var(--space-md);
	letter-spacing: -0.02em;
}
.cx-arrow { color: var(--accent); font-weight: 400; }
.cx-sub {
	font-size: var(--text-lg);
	line-height: 1.55;
	color: var(--ink-dim);
	max-width: 60ch;
	margin: 0 auto var(--space-xl);
}
.cx-sub strong { color: var(--ink-bright); font-weight: 600; }

.cx-form {
	display: flex;
	gap: var(--space-sm);
	max-width: 680px;
	margin: 0 auto;
}
.cx-input {
	flex: 1;
	min-width: 0;
	font-family: var(--font-mono);
	font-size: var(--text-sm);
	color: var(--ink-bright);
	background: var(--surface-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-md);
	padding: 0 var(--space-md);
	height: 52px;
	transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.cx-input::placeholder { color: var(--ink-faint); font-family: var(--font-body); }
.cx-input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
.cx-go {
	flex: none;
	height: 52px;
	padding: 0 var(--space-lg);
	font-family: var(--font-body);
	font-weight: 600;
	font-size: var(--text-sm);
	/* --accent-ink is not a token this design system defines, so the old #fff
	   fallback painted white text on the dark theme's white --accent: the page's
	   primary action read as a blank slab. --bg-0 inverts with the theme, so the
	   label stays legible on white (dark) and on blue (light) alike. */
	color: var(--accent-ink, var(--bg-0));
	background: var(--accent);
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: transform var(--duration-fast) var(--ease-standard), opacity var(--duration-fast) var(--ease-standard), filter var(--duration-fast) var(--ease-standard);
	white-space: nowrap;
}
.cx-go:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.cx-go:active:not(:disabled) { transform: translateY(0); }
.cx-go:disabled { opacity: 0.55; cursor: progress; }

.cx-examples {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	margin-top: var(--space-md);
	font-size: var(--text-2xs);
	color: var(--ink-faint);
}
.cx-chip {
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	color: var(--ink-bright);
	background: var(--surface-2);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-pill);
	padding: 3px 12px;
	cursor: pointer;
	transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.cx-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.cx-chip-hint { font-family: var(--font-mono); }

/* ── results / cards ──────────────────────────────────────────────────── */
.cx-results { margin-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-lg); }
.cx-card {
	background: var(--surface-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-lg);
	padding: var(--space-lg);
	animation: cx-in 0.3s ease both;
}
@keyframes cx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── empty state ──────────────────────────────────────────────────────── */
.cx-empty { padding: var(--space-md) 0; }
.cx-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.cx-step {
	display: flex;
	gap: var(--space-sm);
	align-items: flex-start;
	background: var(--surface-1);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-md);
	padding: var(--space-md);
}
.cx-step-n {
	flex: none;
	width: 26px; height: 26px;
	display: grid; place-items: center;
	font-family: var(--font-mono);
	font-size: var(--text-2xs);
	color: var(--accent);
	background: var(--accent-soft);
	border-radius: var(--radius-pill);
}
.cx-step-h { font-weight: 600; font-size: var(--text-sm); color: var(--ink-bright); margin-bottom: 2px; }
.cx-step-b { font-size: var(--text-2xs); color: var(--ink-dim); line-height: 1.45; }

/* ── token card ───────────────────────────────────────────────────────── */
.cx-token-head { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); }
.cx-av {
	flex: none; width: 52px; height: 52px;
	border-radius: var(--radius-pill);
	object-fit: cover;
	border: 1px solid var(--stroke);
	background: var(--surface-2);
}
.cx-av-ph {
	display: grid; place-items: center;
	font-family: var(--font-display); font-weight: 700; font-size: var(--text-md);
	color: var(--ink-dim); text-transform: uppercase;
}
.cx-token-id { flex: 1; min-width: 0; }
.cx-token-sym { display: flex; align-items: center; gap: var(--space-xs); font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); color: var(--ink-bright); }
.cx-chain {
	font-family: var(--font-mono); font-size: var(--text-2xs);
	text-transform: capitalize; color: var(--ink-dim);
	background: var(--surface-2); border: 1px solid var(--stroke);
	border-radius: var(--radius-pill); padding: 1px 8px;
}
.cx-token-name { font-size: var(--text-sm); color: var(--ink-dim); margin: 2px 0 6px; }
.cx-mint {
	font-family: var(--font-mono); font-size: var(--text-2xs);
	color: var(--ink-faint); background: none; border: none; padding: 0;
	cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
	transition: color var(--duration-fast) var(--ease-standard);
}
.cx-mint:hover { color: var(--accent); }
.cx-mint-ic { opacity: 0.7; }

.cx-stats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1px;
	background: var(--stroke);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-md);
	overflow: hidden;
}
.cx-stat { background: var(--surface-1); padding: var(--space-sm) var(--space-md); }
.cx-stat-k { font-size: var(--text-2xs); color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.cx-stat-v { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-bright); font-weight: 600; }
.cx-pos { color: var(--success); }
.cx-neg { color: var(--danger); }

.cx-pill {
	font-family: var(--font-mono); font-size: var(--text-2xs);
	text-transform: uppercase; letter-spacing: 0.05em;
	border-radius: var(--radius-pill); padding: 3px 11px; font-weight: 600;
}
.cx-bull { color: var(--success); background: rgba(74, 222, 128, 0.12); }
.cx-bear { color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.cx-neu { color: var(--ink-dim); background: var(--surface-2); }

.cx-signal {
	margin-top: var(--space-lg);
	padding: var(--space-md);
	background: var(--surface-2);
	border-radius: var(--radius-md);
	border-left: 2px solid var(--accent);
}
.cx-signal-h { font-weight: 600; font-size: var(--text-sm); color: var(--ink-bright); margin-bottom: 4px; }
.cx-signal-r { font-size: var(--text-2xs); color: var(--ink-dim); line-height: 1.5; }
.cx-dexlink { display: inline-block; margin-top: var(--space-md); font-size: var(--text-2xs); color: var(--accent); text-decoration: none; }
.cx-dexlink:hover { text-decoration: underline; }

/* ── momentum strip ───────────────────────────────────────────────────────
   Price change across 5m / 1h / 6h / 24h. Reading the four together shows
   whether a move is accelerating or fading, which the 24h stat alone hides. */
.cx-momentum {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	margin-top: var(--space-md);
	background: var(--stroke);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-md);
	overflow: hidden;
}
.cx-mom { background: var(--surface-2); padding: var(--space-sm) var(--space-md); text-align: center; }
.cx-mom-k {
	font-family: var(--font-mono); font-size: var(--text-2xs);
	color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 3px;
}
.cx-mom-v { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--ink-dim); }
.cx-mom-v.cx-pos { color: var(--success); }
.cx-mom-v.cx-neg { color: var(--danger); }

/* ── risk panel ───────────────────────────────────────────────────────────
   0 = clean, 100 = critical. The gauge arc is driven by --cx-risk (the score)
   and tinted by the level class, so the headline number reads at a glance. */
.cx-risk {
	margin-top: var(--space-lg);
	border: 1px solid var(--stroke);
	border-radius: var(--radius-md);
	padding: var(--space-md);
	background: var(--surface-2);
	--cx-risk-tone: var(--ink-dim);
}
.cx-risk-low { --cx-risk-tone: var(--success); }
.cx-risk-medium { --cx-risk-tone: var(--warning, #fbbf24); }
.cx-risk-high,
.cx-risk-critical { --cx-risk-tone: var(--danger); }

.cx-risk-head { display: flex; align-items: center; gap: var(--space-md); }
.cx-risk-gauge {
	flex: none;
	width: 62px; height: 62px; border-radius: 50%;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background:
		conic-gradient(var(--cx-risk-tone) calc(var(--cx-risk) * 1%), var(--stroke) 0);
	position: relative;
}
.cx-risk-gauge::before {
	content: ''; position: absolute; inset: 5px;
	border-radius: 50%; background: var(--surface-1);
}
.cx-risk-score {
	position: relative;
	font-family: var(--font-mono); font-size: var(--text-md, 1rem); font-weight: 700;
	color: var(--cx-risk-tone); line-height: 1;
}
.cx-risk-100 { position: relative; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-faint); }
.cx-risk-id { min-width: 0; }
.cx-risk-label {
	font-size: var(--text-2xs); color: var(--ink-faint);
	text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px;
}
.cx-risk-lvl { color: var(--cx-risk-tone); font-weight: 700; }
.cx-risk-summary { font-size: var(--text-sm); color: var(--ink-bright); line-height: 1.45; }

.cx-risk-factors { list-style: none; margin: var(--space-md) 0 0; padding: 0; display: grid; gap: 1px; background: var(--stroke); border-radius: var(--radius-sm, 6px); overflow: hidden; }
.cx-rf {
	display: grid;
	grid-template-columns: 10px minmax(0, 7rem) minmax(0, 1fr);
	align-items: baseline; gap: var(--space-sm);
	background: var(--surface-1); padding: var(--space-sm) var(--space-md);
	font-size: var(--text-2xs); line-height: 1.5;
}
.cx-rf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); align-self: center; }
.cx-rf-low .cx-rf-dot { background: var(--success); }
.cx-rf-medium .cx-rf-dot { background: var(--warning, #fbbf24); }
.cx-rf-high .cx-rf-dot,
.cx-rf-critical .cx-rf-dot { background: var(--danger); }
.cx-rf-label { color: var(--ink-bright); font-weight: 600; }
.cx-rf-detail { color: var(--ink-dim); overflow-wrap: anywhere; }

@media (max-width: 620px) {
	.cx-momentum { grid-template-columns: repeat(2, 1fr); }
	.cx-rf { grid-template-columns: 10px minmax(0, 1fr); }
	.cx-rf-detail { grid-column: 2; }
}

/* ── service card ─────────────────────────────────────────────────────── */
.cx-service { border-color: var(--brand-blue-stroke, var(--stroke)); }
.cx-service-label { font-size: var(--text-2xs); color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.cx-endpoint {
	display: flex; align-items: center; gap: var(--space-xs);
	width: 100%; text-align: left;
	font-family: var(--font-mono); font-size: var(--text-2xs);
	background: var(--surface-2); border: 1px solid var(--stroke);
	border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md);
	cursor: pointer; color: var(--ink-bright);
	transition: border-color var(--duration-fast) var(--ease-standard);
}
.cx-endpoint:hover { border-color: var(--accent); }
.cx-method { color: var(--accent); font-weight: 700; flex: none; }
.cx-url { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.cx-service-meta {
	display: flex; flex-wrap: wrap; gap: var(--space-lg);
	margin: var(--space-md) 0 var(--space-lg);
	padding-bottom: var(--space-md);
	border-bottom: 1px solid var(--stroke);
}
.cx-meta { display: flex; flex-direction: column; gap: 3px; }
.cx-meta-k { font-size: var(--text-2xs); color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.cx-meta-v { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-bright); font-weight: 600; }
.cx-meta-v em { font-style: normal; color: var(--ink-dim); font-weight: 400; font-size: var(--text-2xs); }
.cx-nets { display: flex; gap: 5px; }
.cx-net { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: capitalize; border-radius: var(--radius-pill); padding: 2px 9px; border: 1px solid var(--stroke); color: var(--ink-dim); }
.cx-net-solana { color: #9945ff; border-color: rgba(153, 69, 255, 0.4); }
.cx-net-base { color: #0052ff; border-color: rgba(0, 82, 255, 0.4); }
.cx-ok { color: var(--success); }

/* ── snippets ─────────────────────────────────────────────────────────── */
.cx-tabs { display: flex; gap: 4px; margin-bottom: var(--space-sm); }
.cx-tab {
	font-family: var(--font-body); font-size: var(--text-2xs); font-weight: 600;
	color: var(--ink-dim); background: none;
	border: 1px solid transparent; border-radius: var(--radius-md);
	padding: 5px 12px; cursor: pointer; transition: all var(--duration-fast) var(--ease-standard);
}
.cx-tab:hover { color: var(--ink-bright); }
.cx-tab-on { color: var(--ink-bright); background: var(--surface-2); border-color: var(--stroke); }
.cx-code-wrap { position: relative; }
.cx-code {
	font-family: var(--font-mono); font-size: var(--text-2xs); line-height: 1.6;
	color: var(--ink-bright); background: var(--surface-2);
	border: 1px solid var(--stroke); border-radius: var(--radius-md);
	padding: var(--space-md); margin: 0; overflow-x: auto; white-space: pre;
}
.cx-code-sm { margin-top: var(--space-sm); max-height: 360px; overflow: auto; }
.cx-copy {
	position: absolute; top: 8px; right: 8px;
	font-family: var(--font-body); font-size: var(--text-2xs); font-weight: 600;
	color: var(--ink-dim); background: var(--surface-1);
	border: 1px solid var(--stroke); border-radius: var(--radius-md);
	padding: 3px 10px; cursor: pointer; transition: all var(--duration-fast) var(--ease-standard);
}
.cx-copy:hover { color: var(--ink-bright); border-color: var(--accent); }
.cx-copied { color: var(--success) !important; border-color: var(--success) !important; }

/* ── live 402 challenge ───────────────────────────────────────────────── */
.cx-challenge { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--stroke); }
.cx-challenge-btn {
	font-family: var(--font-body); font-size: var(--text-2xs); font-weight: 600;
	color: var(--accent); background: var(--accent-soft);
	border: 1px solid var(--brand-blue-stroke, var(--stroke)); border-radius: var(--radius-md);
	padding: 7px 14px; cursor: pointer; transition: all var(--duration-fast) var(--ease-standard);
}
.cx-challenge-btn:hover:not(:disabled) { filter: brightness(1.1); }
.cx-challenge-btn:disabled { opacity: 0.6; cursor: progress; }
.cx-challenge-hint { display: block; margin-top: 8px; font-size: var(--text-2xs); color: var(--ink-faint); line-height: 1.5; }
.cx-challenge-out { margin-top: var(--space-md); animation: cx-in 0.25s ease both; }
.cx-challenge-status { font-size: var(--text-2xs); color: var(--ink-dim); margin-bottom: 6px; }
.cx-challenge-status strong { color: var(--accent); font-family: var(--font-mono); }
.cx-challenge-err { color: var(--danger); font-size: var(--text-2xs); }

/* ── error / skeleton ─────────────────────────────────────────────────── */
.cx-error { text-align: center; padding: var(--space-2xl) var(--space-lg); }
.cx-error-ic {
	width: 46px; height: 46px; margin: 0 auto var(--space-md);
	display: grid; place-items: center;
	font-family: var(--font-mono); font-size: var(--text-xl); font-weight: 700;
	color: var(--ink-dim); background: var(--surface-2);
	border: 1px solid var(--stroke); border-radius: var(--radius-pill);
}
.cx-error h2 { font-size: var(--text-lg); margin: 0 0 var(--space-xs); color: var(--ink-bright); }
.cx-error p { font-size: var(--text-sm); color: var(--ink-dim); max-width: 44ch; margin: 0 auto var(--space-lg); line-height: 1.5; }
.cx-retry {
	font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
	color: var(--ink-bright); background: var(--surface-2);
	border: 1px solid var(--stroke); border-radius: var(--radius-md);
	padding: 9px 18px; cursor: pointer; transition: all var(--duration-fast) var(--ease-standard);
}
.cx-retry:hover { border-color: var(--accent); }

.cx-skeleton .cx-sk { background: var(--surface-2); border-radius: var(--radius-md); position: relative; overflow: hidden; }
.cx-skeleton .cx-sk::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(90deg, transparent, var(--surface-3, rgba(255,255,255,0.06)), transparent);
	animation: cx-shimmer 1.3s infinite;
}
@keyframes cx-shimmer { 100% { transform: translateX(100%); } }
.cx-sk-row { display: flex; gap: var(--space-md); align-items: center; margin-bottom: var(--space-lg); }
.cx-sk-av { width: 52px; height: 52px; border-radius: var(--radius-pill); flex: none; }
.cx-sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.cx-sk-l1 { height: 18px; width: 40%; }
.cx-sk-l2 { height: 12px; width: 60%; }
.cx-sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.cx-sk-cell { height: 52px; }

/* ── focus visibility (a11y) ──────────────────────────────────────────── */
.cx-go:focus-visible, .cx-chip:focus-visible, .cx-tab:focus-visible,
.cx-copy:focus-visible, .cx-retry:focus-visible, .cx-challenge-btn:focus-visible,
.cx-mint:focus-visible, .cx-endpoint:focus-visible, .cx-dexlink:focus-visible {
	outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, var(--accent));
	outline-offset: var(--focus-ring-offset, 2px);
}

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 720px) {
	.cx-steps { grid-template-columns: 1fr; }
	.cx-stats { grid-template-columns: repeat(2, 1fr); }
	.cx-sk-grid { grid-template-columns: repeat(2, 1fr); }
	.cx-form { flex-direction: column; }
	.cx-go { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.cx-card, .cx-challenge-out { animation: none; }
	.cx-skeleton .cx-sk::after { animation: none; }
	.cx-go:hover:not(:disabled) { transform: none; }
}