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.

5.1 KB
Raw Blame
/*
 * /defi — DeFi TVL & protocols. Layered after coin-pages.css: reuses the cv-*
 * token system, cards, and table; this file only adds the stat grid, category
 * filter, and the small protocol-table affordances (chain chips, logo
 * fallback). Both themes inherit from the shared data-theme tokens.
 */

.defi-stat-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Rows open the protocol detail page through the name cell's anchor, so the
   whole row is the click target. A row without a slug has nowhere to go: drop
   the shared table's pointer there rather than signal a target that isn't. */
#defi-table .cv-table tbody tr[data-href] {
	cursor: pointer;
}
#defi-table .cv-table tbody tr:not([data-href]) {
	cursor: default;
}

/* Category filter cluster in the toolbar. */
.defi-filter {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.defi-filter-label {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cv-text-3);
}
.defi-select {
	appearance: none;
	background: var(--cv-surface);
	color: var(--cv-text);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	font: inherit;
	font-size: 0.875rem;
	padding: 0.4375rem 2rem 0.4375rem 0.75rem;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.5rem center;
	transition:
		border-color var(--duration-fast),
		box-shadow var(--duration-fast);
	max-width: 14rem;
}
.defi-select:hover {
	border-color: var(--cv-border-hover);
}
.defi-select:focus-visible {
	outline: none;
	border-color: var(--cv-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cv-accent) 20%, transparent);
}

/* Chain list cell: keep the "+N" overflow marker subdued. */
.defi-chains .defi-more {
	color: var(--cv-text-3);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
}

/* Placeholder swatch when a protocol has no logo, so the name column stays
   aligned with logo rows. */
.defi-logo-fallback {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--cv-surface-3);
	flex-shrink: 0;
}

/* Toolbar refresh. The figures move all day and the server caches them for
   five minutes, so the page needs a way to ask for new ones short of a full
   reload. The icon spins for exactly as long as the request is in flight. */
.defi-refresh {
	background: transparent;
	font-family: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}
.defi-refresh[disabled] {
	cursor: progress;
	color: var(--cv-text-3);
}
.defi-refresh-icon {
	width: 0.875rem;
	height: 0.875rem;
	flex-shrink: 0;
}
.defi-refresh[aria-busy='true'] .defi-refresh-icon {
	animation: defi-spin 0.9s linear infinite;
	transform-origin: 50% 50%;
}
@keyframes defi-spin {
	to {
		transform: rotate(360deg);
	}
}
@media (prefers-reduced-motion: reduce) {
	.defi-refresh[aria-busy='true'] .defi-refresh-icon {
		animation: none;
	}
}

/* Below 640px only three columns survive (rank, category, chains and the 7d
   move all drop out), so the shared 540px table floor buys nothing but a
   sideways scroll that parks the TVL and the 1d move off-screen. Let the table
   shrink to the viewport and tighten the cells so all three read at 320px.
   Mirrors the same override on /chains. */
@media (max-width: 639px) {
	#defi-table .cv-table {
		min-width: 0;
	}
	#defi-table .cv-table th,
	#defi-table .cv-table td {
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}
	#defi-table .cv-table .name-cell .nm {
		max-width: 8.5rem;
	}
}

/* Phone widths: the protocol names are the longest strings in the table, and
   at 320px they are what pushed the percentages off the edge. The logo steps
   down with them so the name still has room to read. */
@media (max-width: 479px) {
	#defi-table .cv-table {
		font-size: 0.8125rem;
	}
	#defi-table .cv-table th,
	#defi-table .cv-table td {
		padding-left: 0.375rem;
		padding-right: 0.375rem;
	}
	#defi-table .cv-table .name-cell .nm {
		max-width: 5.75rem;
	}
	#defi-table .cv-table .name-cell .inner {
		gap: 0.375rem;
	}
	#defi-table .cv-table .name-cell img,
	#defi-table .defi-logo-fallback {
		width: 20px;
		height: 20px;
	}
}

/* ── Interactive states (QB-07) ────────────────────────────────────────────
   A table row that navigates on click is a link with none of a link's
   affordances. It sets cursor: pointer and, until now, nothing else, so
   nothing told you which row you were about to open. */
#defi-table .cv-table tbody tr[data-href] {
	transition: background var(--duration-fast) var(--ease-standard);
}

#defi-table .cv-table tbody tr[data-href]:hover {
	background: var(--surface-1);
}

.defi-refresh {
	transition: color var(--duration-fast) var(--ease-standard);
}

.defi-refresh:hover:not([disabled]) {
	color: var(--ink-bright);
}