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.

79.6 KB
Raw Blame
/*
 * Global coin pages (/coins, /coin/:id) — adopted from the cryptocurrency.cv
 * design system ("The Block-inspired editorial"): Inter body, JetBrains Mono
 * numerals, blue accent, hairline borders, tight editorial radii. Light is the
 * design's default; dark maps its .dark tokens. Both are driven by three.ws's
 * data-theme attribute so the site-wide theme toggle works here like
 * everywhere else. Headings use the sitewide Space Grotesk display face — the
 * port's Source Serif 4 was retired 2026-07 to unify the site on one voice.
 */

:root {
	--cv-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
	/* Legacy token name from the cv port; now maps to the sitewide display
	   family (loaded by /fonts/fonts.css on every cv page). */
	--cv-font-serif: 'Space Grotesk', 'Inter', system-ui, sans-serif;
	--cv-font-mono: 'JetBrains Mono', ui-monospace, monospace;

	--cv-radius-sm: 4px;
	--cv-radius: 6px;
	--cv-radius-md: 8px;
	--cv-radius-lg: 10px;
	--cv-radius-xl: 12px;

	--cv-max-width: 1280px;
	--cv-content-padding: 1rem;
}

/* Reachable by assistive tech, invisible on screen: table captions and header
   labels that a sighted reader gets from the layout itself. */
.cv-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
@media (min-width: 768px) {
	:root {
		--cv-content-padding: 1.5rem;
	}
}
@media (min-width: 1024px) {
	:root {
		--cv-content-padding: 2rem;
	}
}

/* Light — the design's default palette. */
html[data-theme='light'] {
	--cv-accent: #3b82f6;
	--cv-accent-hover: #2563eb;
	/* A solid accent fill and the text that sits on it. White on --cv-accent is
	   3.7:1 in light and 2.2:1 in dark, both under the 4.5:1 AA floor, so a
	   filled control picks its own pair: 6.7:1 here, 7.9:1 in dark. */
	--cv-accent-solid: #1d4ed8;
	--cv-on-accent: #fff;
	/* --cv-green reads at 3.3:1 on white, so a table that colours whole cells by
	   sign needs a darker green for its text: 5.0:1 on the surface, 4.8:1 on the
	   tinted winner cell. Red already clears AA and is kept as it is. */
	--cv-green-text: #15803d;
	--cv-red-text: #dc2626;
	/* Text sitting ON a tinted badge fill rather than on the page. The tint
	   lifts the background, so --cv-red reads 4.22:1 and --cv-green 3.02:1
	   against their own fills, both under AA. Dark needs no such adjustment. */
	--cv-red-on-tint: #b91c1c;
	--cv-green-on-tint: #166534;
	--cv-surface: #fff;
	--cv-surface-2: #f8fafc;
	--cv-surface-3: #f1f5f9;
	--cv-border: #e2e8f0;
	--cv-border-hover: #cbd5e1;
	--cv-text: #0f172a;
	--cv-text-2: #475569;
	/* Muted text still has to clear WCAG AA (4.5:1) on the page surface. */
	--cv-text-3: #64748b;
	--cv-green: #16a34a;
	--cv-green-soft: rgba(34, 197, 94, 0.1);
	--cv-red: #dc2626;
	--cv-red-soft: rgba(239, 68, 68, 0.1);
	--cv-chart-green: #22c55e;
	--cv-chart-red: #ef4444;
	--cv-shadow-card: 0 0 0 1px rgb(0 0 0 / 0.03), 0 2px 4px 0 rgb(0 0 0 / 0.04);
	--cv-shadow-card-hover:
		0 0 0 1px rgb(0 0 0 / 0.04), 0 8px 16px -4px rgb(0 0 0 / 0.08),
		0 2px 4px -1px rgb(0 0 0 / 0.04);
	--cv-shadow-dropdown: 0 4px 24px -4px rgb(0 0 0 / 0.12), 0 8px 16px -8px rgb(0 0 0 / 0.08);
}

/* Dark — the design's .dark token set. */
html[data-theme='dark'],
html:not([data-theme='light']) {
	--cv-accent: #60a5fa;
	--cv-accent-hover: #93bbfc;
	--cv-accent-solid: #60a5fa;
	--cv-on-accent: var(--on-accent);
	--cv-green-text: var(--success);
	--cv-red-text: var(--danger);
	--cv-surface: #09090b;
	--cv-surface-2: #131316;
	--cv-surface-3: #1c1c21;
	--cv-border: #27272a;
	--cv-border-hover: #3f3f46;
	--cv-text: #fafafa;
	--cv-text-2: #a1a1aa;
	/* Muted text still has to clear WCAG AA (4.5:1) on every dark surface. */
	--cv-text-3: #8b8b93;
	--cv-green: var(--success);
	--cv-green-soft: rgba(34, 197, 94, 0.12);
	--cv-red: var(--danger);
	--cv-red-on-tint: var(--danger);
	--cv-green-on-tint: var(--success);
	--cv-red-soft: rgba(239, 68, 68, 0.12);
	--cv-chart-green: #22c55e;
	--cv-chart-red: #ef4444;
	--cv-shadow-card: 0 0 0 1px rgb(255 255 255 / 0.03), 0 2px 4px 0 rgb(0 0 0 / 0.4);
	--cv-shadow-card-hover: 0 0 0 1px rgb(255 255 255 / 0.05), 0 8px 16px -4px rgb(0 0 0 / 0.5);
	--cv-shadow-dropdown: 0 4px 24px -4px rgb(0 0 0 / 0.6), 0 8px 16px -8px rgb(0 0 0 / 0.5);
}

html.cv-page,
.cv-page body {
	background: var(--cv-surface);
	color: var(--cv-text);
}
.cv-page body {
	margin: 0;
	font-family: var(--cv-font-sans);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizelegibility;
}

/* Keep the shared three.ws header legible over the editorial background. */
.cv-page .site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--cv-surface) 88%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--cv-border);
}

.cv-container {
	max-width: var(--cv-max-width);
	margin: 0 auto;
	padding: 2.5rem var(--cv-content-padding) 4rem;
	width: 100%;
	/* width:100% + horizontal padding must not exceed the viewport — without
	   this every cv-page is 2×padding wider than small screens and scrolls
	   sideways. */
	box-sizing: border-box;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

.cv-h1 {
	font-family: var(--cv-font-serif);
	font-size: 1.875rem;
	line-height: 1.2;
	font-weight: 700;
	color: var(--cv-text);
	margin: 0 0 0.5rem;
}
@media (min-width: 768px) {
	.cv-h1 {
		font-size: 2.25rem;
	}
}

.cv-h2 {
	font-family: var(--cv-font-serif);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--cv-text);
	margin: 0 0 1rem;
}

.cv-sub {
	color: var(--cv-text-2);
	max-width: 42rem;
	margin: 0 0 2rem;
}

.cv-mono {
	font-family: var(--cv-font-mono);
	font-variant-numeric: tabular-nums;
}

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */

.cv-crumbs {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.875rem;
	color: var(--cv-text-3);
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}
.cv-crumbs a {
	color: inherit;
	text-decoration: none;
	transition: color var(--duration-fast);
}
.cv-crumbs a:hover,
.cv-crumbs a:focus-visible {
	color: var(--cv-accent);
}
.cv-crumbs .sep {
	opacity: 0.7;
}
.cv-crumbs .here {
	color: var(--cv-text);
	font-weight: 500;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.cv-card {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
}

.cv-stat-card {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	padding: 1.25rem;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	transition:
		box-shadow var(--duration-base),
		border-color var(--duration-base);
}
.cv-stat-card:hover {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
}
.cv-stat-card .label {
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cv-text-3);
	margin: 0 0 0.25rem;
}
.cv-stat-card .value {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--cv-text);
	margin: 0;
}
.cv-stat-card .delta {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	font-weight: 500;
}
.cv-stat-card .icon {
	color: var(--cv-accent);
	opacity: 0.6;
	flex-shrink: 0;
}
.cv-stat-card .icon svg {
	width: 1.25rem;
	height: 1.25rem;
	display: block;
}

/* --cv-green (3.3:1 on white) is the chart and fill green; --cv-green-text is
   the same hue darkened for body copy, and that is what a signed number in a
   table is. Dark maps both to the same value, so this only moves light out of
   a 3.29:1 reading it was failing AA on across every market table. */
.cv-up {
	color: var(--cv-green-text);
}
.cv-down {
	color: var(--cv-red);
}

/* Smaller stat tiles on the detail page's Market Stats grid. */
.cv-mini-stat {
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	padding: 1rem;
}
.cv-mini-stat .label {
	font-size: 0.75rem;
	color: var(--cv-text-3);
	margin: 0 0 0.25rem;
}
.cv-mini-stat .value {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--cv-text);
	margin: 0;
}
.cv-mini-stat .value.green {
	color: var(--cv-green);
}
.cv-mini-stat .value.red {
	color: var(--cv-red);
}
.cv-mini-stat .sub {
	font-size: 0.75rem;
	color: var(--cv-text-3);
	margin: 0.125rem 0 0;
}

/* ── Coin header (detail page) ──────────────────────────────────────────── */

.cv-coin-head {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 2rem;
}
.cv-coin-head img.coin-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--cv-surface-3);
}
.cv-coin-head .title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}
.cv-coin-head h1 {
	font-family: var(--cv-font-serif);
	font-size: 1.875rem;
	font-weight: 700;
	margin: 0;
	color: var(--cv-text);
}
@media (min-width: 768px) {
	.cv-coin-head h1 {
		font-size: 2.25rem;
	}
}
.cv-coin-head .ticker {
	font-size: 1.25rem;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--cv-text-3);
}
@media (min-width: 768px) {
	.cv-coin-head .ticker {
		font-size: 1.5rem;
	}
}
.cv-rank-badge {
	display: inline-flex;
	align-items: center;
	background: var(--cv-accent-solid);
	color: var(--cv-on-accent);
	border-radius: 999px;
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
	font-weight: 600;
}

.cv-price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 1rem;
	margin-top: 0.75rem;
}
.cv-price {
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--cv-text);
	font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
	.cv-price {
		font-size: 3rem;
	}
}
.cv-today {
	color: var(--cv-text-3);
	font-size: 0.875rem;
	margin: 0.375rem 0 0;
}

.cv-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border-radius: var(--cv-radius);
	padding: 0.125rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.cv-chip .win {
	font-size: 10px;
	opacity: 0.85;
}
.cv-chip.up {
	background: var(--cv-green-soft);
	color: var(--cv-green);
}
.cv-chip.down {
	background: var(--cv-red-soft);
	color: var(--cv-red);
}

/* ── Chart panel ────────────────────────────────────────────────────────── */

.cv-chart-panel {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	padding: 1rem;
	margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
	.cv-chart-panel {
		padding: 1.5rem;
	}
}

.cv-chart-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 1rem;
}
.cv-chart-bar .left {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.cv-chart-bar .title {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--cv-text-2);
}
.cv-chart-bar .pct {
	font-size: 0.875rem;
	font-weight: 600;
}

.cv-ranges {
	display: flex;
	gap: 0.25rem;
}
.cv-range-btn {
	appearance: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	border-radius: var(--cv-radius);
	padding: 0.375rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 500;
	font-family: inherit;
	color: var(--cv-text-2);
	transition:
		background var(--duration-fast),
		color var(--duration-fast);
}
.cv-range-btn:hover {
	background: var(--cv-surface-2);
}
.cv-range-btn[aria-pressed='true'] {
	background: var(--cv-accent-solid);
	color: var(--cv-on-accent);
}
.cv-range-btn:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}

.cv-chart-area {
	position: relative;
}
.cv-chart-area svg {
	width: 100%;
	height: auto;
	display: block;
	user-select: none;
}
.cv-chart-state {
	height: 300px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cv-text-3);
	gap: 0.5rem;
	font-size: 0.875rem;
}
/* A failure state carries a sentence and its recovery control, so it stacks. */
.cv-chart-state.col {
	flex-direction: column;
	text-align: center;
	padding: 0 1rem;
}
.cv-chart-state.col p {
	margin: 0;
	max-width: 32rem;
}
.cv-spinner {
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	border: 2px solid currentcolor;
	border-top-color: transparent;
	animation: cvSpin 0.8s linear infinite;
}
@keyframes cvSpin {
	to {
		transform: rotate(360deg);
	}
}

.cv-chart-tip {
	position: absolute;
	top: 0;
	z-index: 10;
	pointer-events: none;
	transform: translateX(-50%);
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	box-shadow: var(--cv-shadow-dropdown);
	padding: 0.5rem 0.75rem;
	font-size: 0.75rem;
	white-space: nowrap;
}
.cv-chart-tip .p {
	font-weight: 600;
	color: var(--cv-text);
	margin: 0;
}
.cv-chart-tip .d {
	color: var(--cv-text-3);
	margin: 0;
}

/* ── Stats grid ─────────────────────────────────────────────────────────── */

.cv-stats-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
}
@media (min-width: 768px) {
	.cv-stats-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.cv-section {
	margin-bottom: 2.5rem;
}

/* ── News cards ─────────────────────────────────────────────────────────── */

.cv-news-grid {
	display: grid;
	gap: 1rem;
}
@media (min-width: 640px) {
	.cv-news-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.cv-news-card {
	display: flex;
	gap: 0.875rem;
	align-items: flex-start;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	padding: 0.875rem;
	text-decoration: none;
	transition:
		box-shadow var(--duration-base),
		border-color var(--duration-base),
		transform var(--duration-base);
}
.cv-news-card:hover,
.cv-news-card:focus-visible {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
	transform: translateY(-1px);
}
.cv-news-card img {
	width: 72px;
	height: 72px;
	border-radius: var(--cv-radius-md);
	object-fit: cover;
	flex-shrink: 0;
	background: var(--cv-surface-3);
}
.cv-news-card .t {
	font-weight: 600;
	color: var(--cv-text);
	font-size: 0.875rem;
	line-height: 1.4;
	margin: 0 0 0.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cv-news-card .m {
	font-size: 0.75rem;
	color: var(--cv-text-3);
	margin: 0;
}
.cv-news-card .m .src {
	color: var(--cv-accent);
	font-weight: 500;
}

/* ── About / prose ──────────────────────────────────────────────────────── */

.cv-prose {
	color: var(--cv-text-2);
	font-size: 0.9375rem;
	max-width: none;
}
.cv-prose p {
	margin: 0 0 0.875rem;
}
.cv-prose p:last-child {
	margin-bottom: 0;
}

/* ── Link pills ─────────────────────────────────────────────────────────── */

.cv-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.cv-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border: 1px solid var(--cv-border);
	border-radius: 999px;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	color: var(--cv-text-2);
	text-decoration: none;
	transition:
		background var(--duration-fast),
		border-color var(--duration-fast),
		color var(--duration-fast);
}
.cv-pill:hover,
.cv-pill:focus-visible {
	background: var(--cv-surface-2);
	border-color: var(--cv-border-hover);
	color: var(--cv-text);
}
.cv-pill:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}

/* Contract row — mono address + copy affordance. */
.cv-contract {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	background: var(--cv-surface-2);
	padding: 0.375rem 0.625rem;
	font-family: var(--cv-font-mono);
	font-size: 0.8125rem;
	color: var(--cv-text-2);
}
.cv-contract button {
	appearance: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--cv-accent);
	font-size: 0.75rem;
	font-family: var(--cv-font-sans);
	padding: 0.125rem 0.25rem;
	border-radius: var(--cv-radius-sm);
}
.cv-contract button:hover {
	color: var(--cv-accent-hover);
}
.cv-contract button:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 1px;
}

/* ── Market table (/coins) ──────────────────────────────────────────────── */

.cv-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	-webkit-overflow-scrolling: touch;
	background: var(--cv-surface);
}
.cv-table {
	width: 100%;
	min-width: 540px;
	border-collapse: collapse;
	font-size: 0.875rem;
}
.cv-table th {
	position: sticky;
	top: 0;
	background: var(--cv-surface);
	border-bottom: 1px solid var(--cv-border);
	padding: 0.75rem 1rem;
	font-weight: 500;
	color: var(--cv-text-2);
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition: color var(--duration-fast);
	text-align: right;
}
.cv-table th:hover {
	color: var(--cv-text);
}
.cv-table th:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: -2px;
}
.cv-table th.left,
.cv-table td.left {
	text-align: left;
}
.cv-table th .arrow {
	display: inline-block;
	margin-left: 0.25rem;
	opacity: 0.4;
	font-size: 0.6875rem;
}
/* A sortable-but-inactive header carries aria-sort="none" so screen readers
   announce it as sortable; only the column actually sorted gets the bright
   arrow, so exclude "none" rather than matching the attribute's presence. */
.cv-table th[aria-sort]:not([aria-sort='none']) .arrow {
	opacity: 1;
}

.cv-table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--cv-border);
	background: var(--cv-surface);
	text-align: right;
	white-space: nowrap;
	transition: background var(--duration-fast);
}
.cv-table tbody tr {
	cursor: pointer;
}
.cv-table tbody tr:last-child td {
	border-bottom: 0;
}
.cv-table tbody tr:hover td,
.cv-table tbody tr:focus-within td {
	background: var(--cv-surface-2);
}

.cv-table .rank {
	color: var(--cv-text-2);
}
.cv-table .name-cell {
	position: sticky;
	left: 0;
	z-index: 5;
}
.cv-table .name-cell .inner {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.cv-table .name-cell img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--cv-surface-3);
}
.cv-table .name-cell .nm {
	font-weight: 500;
	color: var(--cv-text);
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cv-table .name-cell .sym {
	text-transform: uppercase;
	color: var(--cv-text-3);
	font-size: 0.75rem;
}
.cv-table .name-cell a {
	text-decoration: none;
	color: inherit;
	display: block;
}
.cv-table .name-cell a:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
	border-radius: var(--cv-radius-sm);
}
.cv-table .price {
	font-family: var(--cv-font-mono);
	color: var(--cv-text);
	font-variant-numeric: tabular-nums;
}
.cv-table .pct {
	font-family: var(--cv-font-mono);
	font-variant-numeric: tabular-nums;
}
.cv-table .dim {
	color: var(--cv-text-2);
}

@media (max-width: 639px) {
	.cv-table .hide-sm {
		display: none;
	}
	.cv-table .name-cell .sym {
		display: none;
	}
}
@media (max-width: 767px) {
	.cv-table .hide-md {
		display: none;
	}
}
@media (max-width: 1023px) {
	.cv-table .hide-lg {
		display: none;
	}
}
@media (max-width: 1279px) {
	.cv-table .hide-xl {
		display: none;
	}
}

/* ── Search (type-ahead) ────────────────────────────────────────────────── */

.cv-search {
	position: relative;
	max-width: 22rem;
	flex: 1 1 16rem;
}
.cv-search input {
	width: 100%;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	color: var(--cv-text);
	font: inherit;
	font-size: 0.875rem;
	padding: 0.5rem 0.75rem 0.5rem 2.125rem;
	transition:
		border-color var(--duration-fast),
		box-shadow var(--duration-fast);
}
.cv-search input::placeholder {
	color: var(--cv-text-3);
}
.cv-search input:focus {
	outline: none;
	border-color: var(--cv-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cv-accent) 20%, transparent);
}
.cv-search .mag {
	position: absolute;
	left: 0.625rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cv-text-3);
	pointer-events: none;
}
.cv-search .mag svg {
	width: 1rem;
	height: 1rem;
	display: block;
}

.cv-search-pop {
	position: absolute;
	top: calc(100% + 0.375rem);
	left: 0;
	right: 0;
	z-index: 40;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	box-shadow: var(--cv-shadow-dropdown);
	overflow: hidden;
	transition: opacity var(--duration-fast);
}
/* Results from the previous query stay readable while the next one resolves,
   dimmed so it is obvious they are about to be replaced. */
.cv-search-pop[aria-busy='true'] {
	opacity: 0.55;
}
/* Options are anchors on /coins (each one navigates to a coin page) and plain
   elements on /compare (picking one adds a column, it navigates nowhere).
   Style the role, not the tag, so both listboxes look identical. */
.cv-search-pop [role='option'] {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.5rem 0.75rem;
	text-decoration: none;
	color: var(--cv-text);
	font-size: 0.875rem;
	cursor: pointer;
}
.cv-search-pop [role='option']:hover,
.cv-search-pop [role='option'][data-active='1'] {
	background: var(--cv-surface-2);
}
.cv-search-pop img {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--cv-surface-3);
}
.cv-search-pop .sym {
	color: var(--cv-text-3);
	text-transform: uppercase;
	font-size: 0.75rem;
}
.cv-search-pop .rk {
	margin-left: auto;
	color: var(--cv-text-3);
	font-size: 0.75rem;
}
.cv-search-pop .none {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem;
	color: var(--cv-text-3);
	font-size: 0.875rem;
}

/* ── Toolbar row above the table ────────────────────────────────────────── */

.cv-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.cv-load-more {
	display: block;
	margin: 1.25rem auto 0;
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	background: var(--cv-surface);
	color: var(--cv-text-2);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	padding: 0.5rem 1.25rem;
	transition:
		background var(--duration-fast),
		color var(--duration-fast),
		border-color var(--duration-fast);
}
.cv-load-more:hover {
	background: var(--cv-surface-2);
	color: var(--cv-text);
	border-color: var(--cv-border-hover);
}
.cv-load-more:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.cv-load-more[disabled] {
	opacity: 0.5;
	cursor: default;
}

/* ── States ─────────────────────────────────────────────────────────────── */

.cv-empty {
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	background: var(--cv-surface);
	color: var(--cv-text-2);
	padding: 3rem 1.5rem;
	text-align: center;
}
.cv-empty a {
	color: var(--cv-accent);
}

/* A secondary strip that failed (the /coins global stats bar) states it in one
   quiet line rather than collapsing to a blank void. Same visual language as
   .cv-liq-offline so the two degraded strips read as one system. */
.cv-inline-note {
	color: var(--cv-text-3);
	font-size: 0.8125rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}
.cv-inline-note .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--cv-text-3);
	flex-shrink: 0;
}

/* Load-more outcomes that are not another page of rows: the end of the feed,
   and a failed fetch that must not read as a broken button. */
.cv-load-end,
.cv-load-err {
	margin: 1.25rem 0 0;
	text-align: center;
	font-size: 0.8125rem;
	color: var(--cv-text-3);
}
.cv-load-err {
	margin-top: 0.625rem;
	color: var(--cv-red);
}

/* An in-prose control that acts on this page (retry, clear a filter) is a button,
   not a link: it navigates nowhere. It still reads as a link so the sentence it
   sits in keeps working, and it gets the keyboard and focus behaviour a native
   button already carries. */
.cv-linkbtn {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--cv-accent);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.cv-linkbtn:hover {
	color: var(--cv-accent-hover);
}
.cv-linkbtn:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

.cv-skel {
	position: relative;
	overflow: hidden;
	background: var(--cv-surface-3);
	border-radius: var(--cv-radius);
}
.cv-skel::after {
	content: '';
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(
		90deg,
		transparent,
		color-mix(in srgb, var(--cv-text) 6%, transparent),
		transparent
	);
	animation: cvShimmer 2s infinite;
}
@keyframes cvShimmer {
	100% {
		transform: translateX(100%);
	}
}

.cv-updated {
	color: var(--cv-text-3);
	font-size: 0.75rem;
	margin-top: 1rem;
}
/* Named only when the page is served by a backup provider, so it should read as
   a quiet status note rather than an error. */
.cv-src-note {
	cursor: help;
}
.cv-src-note a {
	color: inherit;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 2px;
	transition: color var(--duration-fast) var(--ease-standard);
}
.cv-src-note a:hover,
.cv-src-note a:focus-visible {
	color: var(--cv-text-1);
}

/* Categories row on the detail page. */
.cv-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: 0.625rem;
}
.cv-cat {
	font-size: 0.6875rem;
	color: var(--cv-text-2);
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	border-radius: 999px;
	padding: 0.125rem 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
	.cv-skel::after,
	.cv-spinner {
		animation: none;
	}
	.cv-news-card,
	.cv-stat-card,
	.cv-range-btn {
		transition: none;
	}
}

/* Market-tools hub strip on /coins — every sibling surface, one row. */
.cv-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 2rem;
}
.cv-tools .cv-pill {
	font-size: 0.8125rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Market tools — /fear-greed, /heatmap, /gas, /compare
   Shared with the coin pages above (same tokens, fonts, card system).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fear & Greed ───────────────────────────────────────────────────────── */

.fg-now-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2rem;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	padding: 1.75rem;
}
.fg-gauge {
	position: relative;
	width: 320px;
	max-width: 100%;
	flex: 0 0 auto;
}
.fg-gauge-svg {
	width: 100%;
	height: auto;
	display: block;
}
.fg-gauge-center {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	pointer-events: none;
}
.fg-value {
	font-family: var(--cv-font-mono);
	font-size: 3rem;
	font-weight: 700;
	line-height: 1;
}
.fg-label {
	font-size: 0.9375rem;
	font-weight: 600;
	margin-top: 0.25rem;
}
.fg-now-meta {
	flex: 1 1 14rem;
	min-width: 0;
}
.fg-now-title {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--cv-text);
}
.fg-delta {
	margin: 0 0 0.5rem;
	font-size: 0.9375rem;
	font-weight: 500;
}
.fg-delta .dim {
	color: var(--cv-text-3);
	font-weight: 400;
}
.fg-cross {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}
.fg-legend-card {
	padding: 1.5rem;
}
.fg-bands {
	display: grid;
	gap: 0.5rem;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	margin: 1rem 0 1.25rem;
}
.fg-band {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
}
.fg-band .swatch {
	width: 0.875rem;
	height: 0.875rem;
	border-radius: 3px;
	flex: 0 0 auto;
}
.fg-band .range {
	color: var(--cv-text-3);
}
.fg-band .name {
	color: var(--cv-text-2);
}

/* ── Heatmap ────────────────────────────────────────────────────────────── */

.hm-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.hm-seg {
	display: inline-flex;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius);
	overflow: hidden;
}
.hm-seg button {
	appearance: none;
	border: 0;
	background: var(--cv-surface);
	color: var(--cv-text-2);
	font: inherit;
	font-size: 0.8125rem;
	padding: 0.375rem 0.75rem;
	cursor: pointer;
	border-right: 1px solid var(--cv-border);
	transition:
		background var(--duration-fast),
		color var(--duration-fast);
}
.hm-seg button:last-child {
	border-right: 0;
}
.hm-seg button:hover {
	background: var(--cv-surface-2);
	color: var(--cv-text);
}
.hm-seg button[aria-pressed='true'] {
	background: var(--cv-accent-solid);
	color: var(--cv-on-accent);
}
.hm-seg button:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: -2px;
}
.hm-legend {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: auto;
	font-size: 0.75rem;
	color: var(--cv-text-3);
}
.hm-legend .bar {
	width: 120px;
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(90deg, #dc2626, #6b7280, #16a34a);
}
.hm-grid {
	position: relative;
	width: 100%;
	height: 560px;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	background: var(--cv-surface-2);
	overflow: hidden;
}
.hm-tile {
	position: absolute;
	overflow: hidden;
	text-decoration: none;
	border: 1px solid rgba(0, 0, 0, 0.28);
	color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 2px;
	transition:
		filter var(--duration-fast),
		transform var(--duration-fast);
	contain: strict;
}
.hm-tile:hover,
.hm-tile:focus-visible {
	filter: brightness(1.12);
	z-index: 3;
	outline: none;
}
.hm-tile:focus-visible {
	box-shadow: inset 0 0 0 2px #fff;
}
.hm-tile .sym {
	font-weight: 700;
	line-height: 1.05;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hm-tile .chg {
	line-height: 1.05;
	opacity: 0.95;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
	font-variant-numeric: tabular-nums;
}
.hm-tile.tiny .chg {
	display: none;
}
.hm-tip {
	position: fixed;
	z-index: 40;
	pointer-events: none;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius);
	box-shadow: var(--cv-shadow-dropdown);
	padding: 0.5rem 0.625rem;
	font-size: 0.75rem;
	color: var(--cv-text-2);
	max-width: 220px;
}
.hm-tip .t {
	font-weight: 600;
	color: var(--cv-text);
	margin: 0 0 0.125rem;
}
.hm-tip .r {
	margin: 0.0625rem 0;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.hm-tip .r span:last-child {
	font-family: var(--cv-font-mono);
	color: var(--cv-text);
}

/* ── Gas tracker ────────────────────────────────────────────────────────── */

.gas-tiers {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(3, 1fr);
}
.gas-tier {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	padding: 1.25rem;
	text-align: center;
	position: relative;
}
.gas-tier.standard {
	border-color: var(--cv-accent);
	box-shadow:
		var(--cv-shadow-card),
		0 0 0 1px var(--cv-accent);
}
.gas-tier .tier-name {
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--cv-text-3);
	margin: 0;
}
.gas-tier .tier-name.slow {
	color: var(--cv-red);
}
.gas-tier .tier-name.standard {
	color: var(--cv-accent);
}
.gas-tier .tier-name.fast {
	color: var(--cv-green);
}
.gas-tier .gwei {
	font-family: var(--cv-font-mono);
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--cv-text);
	line-height: 1;
	margin: 0.5rem 0 0.125rem;
}
.gas-tier .gwei .unit {
	font-size: 0.875rem;
	color: var(--cv-text-3);
	font-weight: 500;
}
.gas-tier .tier-sub {
	font-size: 0.75rem;
	color: var(--cv-text-3);
	margin: 0;
}
.gas-tier .tier-cost {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--cv-text);
	font-family: var(--cv-font-mono);
}
.gas-actions-card {
	padding: 1.25rem 1.5rem;
}
.gas-actions-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}
.gas-actions-table th,
.gas-actions-table td {
	padding: 0.5rem 0.5rem;
	border-bottom: 1px solid var(--cv-border);
	text-align: right;
}
.gas-actions-table th:first-child,
.gas-actions-table td:first-child {
	text-align: left;
}
.gas-actions-table th {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--cv-text-3);
	font-weight: 600;
}
.gas-actions-table td {
	font-family: var(--cv-font-mono);
	color: var(--cv-text-2);
}
.gas-actions-table td:first-child {
	font-family: var(--cv-font-sans);
	color: var(--cv-text);
}
.gas-actions-table tbody tr:last-child td {
	border-bottom: 0;
}
.gas-base {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: baseline;
	margin: 0 0 1.25rem;
}
.gas-base .k {
	font-size: 0.75rem;
	color: var(--cv-text-3);
}
.gas-base .v {
	font-family: var(--cv-font-mono);
	font-weight: 600;
	color: var(--cv-text);
}

@media (max-width: 720px) {
	.gas-tiers {
		grid-template-columns: 1fr;
	}
	.hm-grid {
		height: 460px;
	}
}

/* ── Compare ────────────────────────────────────────────────────────────── */

.cmp-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-start;
	margin-bottom: 1.5rem;
}
.cmp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.cmp-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	border-radius: 999px;
	padding: 0.3125rem 0.375rem 0.3125rem 0.625rem;
	font-size: 0.8125rem;
}
.cmp-chip img {
	width: 18px;
	height: 18px;
	border-radius: 50%;
}
.cmp-chip .dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
}
.cmp-chip button {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--cv-text-3);
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0 0.25rem;
	border-radius: 50%;
}
.cmp-chip button:hover {
	color: var(--cv-red);
}
.cmp-chip button:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 1px;
	color: var(--cv-text);
}
/* A chip whose coin never resolved says so on the chip itself, so the gap in
   the chart and table is never unexplained. */
.cmp-chip .note {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--cv-text-3);
}
.cmp-chip[data-state='missing'],
.cmp-chip[data-state='failed'] {
	border-color: color-mix(in srgb, var(--cv-red) 45%, transparent) !important;
}
.cmp-chip[data-state='missing'] .note,
.cmp-chip[data-state='failed'] .note {
	color: var(--cv-red);
}
.cmp-chip[data-state='loading'] .note {
	color: var(--cv-text-3);
}

/* Copy-link: the URL is the shareable artifact, so the page needs a control
   that hands it over without a right-click. */
.cmp-share {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	appearance: none;
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-md);
	color: var(--cv-text-2);
	font: inherit;
	font-size: 0.8125rem;
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	transition:
		border-color var(--duration-fast),
		color var(--duration-fast),
		background var(--duration-fast);
}
.cmp-share:hover:not(:disabled) {
	color: var(--cv-text);
	border-color: var(--cv-text-3);
}
.cmp-share:active:not(:disabled) {
	transform: translateY(1px);
}
.cmp-share:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.cmp-share:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
#cmp-search input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.cmp-hint {
	margin: -0.75rem 0 1.25rem;
	font-size: 0.8125rem;
	color: var(--cv-text-3);
}
.cmp-hint:empty {
	display: none;
}

/* Coins the API could not resolve: named, with the action that clears them. */
.cmp-issues {
	border: 1px solid color-mix(in srgb, var(--cv-red) 35%, var(--cv-border));
	background: color-mix(in srgb, var(--cv-red) 7%, transparent);
	border-radius: var(--cv-radius-lg);
	padding: 0.875rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.875rem;
	color: var(--cv-text-2);
}
.cmp-issues p {
	margin: 0 0 0.25rem;
}
.cmp-issues strong {
	color: var(--cv-text);
	font-weight: 600;
}
.cmp-issues .acts {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.5rem;
}
.cmp-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	background: var(--cv-surface);
}
.cmp-table-wrap:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.cmp-scroll-hint {
	margin: 0.5rem 0 0;
	font-size: 0.75rem;
	color: var(--cv-text-3);
}
.cmp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	min-width: 480px;
}
.cmp-table th,
.cmp-table td {
	padding: 0.75rem 0.875rem;
	border-bottom: 1px solid var(--cv-border);
	text-align: right;
}
.cmp-table th:first-child,
.cmp-table td:first-child {
	text-align: left;
	color: var(--cv-text-3);
	font-weight: 500;
}
.cmp-table thead th {
	font-size: 0.8125rem;
}
.cmp-table thead th .coin {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	color: var(--cv-text);
	text-decoration: none;
}
/* The series colour identifies the column, but as text it is 2.1:1 for amber on
   white. It rides under the symbol instead, so the tie to the chart line holds
   and the label itself stays readable. */
.cmp-table thead th .coin .sym {
	border-bottom: 2px solid var(--cmp-series, var(--cv-text-3));
	padding-bottom: 0.125rem;
}
.cmp-table thead th img {
	width: 20px;
	height: 20px;
	border-radius: 50%;
}
.cmp-table td {
	font-family: var(--cv-font-mono);
	color: var(--cv-text);
	font-variant-numeric: tabular-nums;
}
.cmp-table tbody tr:last-child td {
	border-bottom: 0;
}
/* Order matters: `.cmp-table td` (0,1,1) outranks a bare `.cv-up`, so the signed
   rows rendered neutral white until these landed, and `.best` painted a -36%
   drawdown green. Sign wins the colour, `best` wins the weight and the tint. */
.cmp-table td.best {
	font-weight: 600;
	background: var(--cv-surface-2);
	/* The cell owns its screen-reader marker. Without a containing block here the
	   absolutely positioned .cv-sr-only resolves against the page, escapes the
	   wrapper's overflow clip, and stretches html's scroll width past the
	   viewport on a phone. */
	position: relative;
}
.cmp-table td.cv-up {
	color: var(--cv-green-text);
}
.cmp-table td.cv-down {
	color: var(--cv-red-text);
}
.cmp-table td.best:not(.cv-up):not(.cv-down) {
	color: var(--cv-green-text);
}
.cmp-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.75rem;
	font-size: 0.8125rem;
}
.cmp-legend .li {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	color: var(--cv-text-2);
}
.cmp-legend .dot {
	width: 12px;
	height: 3px;
	border-radius: 2px;
}
.cmp-legend .li.na {
	color: var(--cv-text-3);
}
.cmp-legend .li.na .dot {
	opacity: 0.4;
}
.cmp-legend .tag {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--cv-text-3);
}

/* ── Liquidations pulse strip (/coins) ─────────────────────────────────────
   Real-time long/short liquidation pain across Binance, Bybit, and OKX,
   fed by api/coin/liquidations.js. Optional enrichment above the markets
   table — degrades to a quiet single line when the collector is offline,
   never fabricated numbers. */

.cv-liq {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
	transition: box-shadow var(--duration-base), border-color var(--duration-base), opacity var(--duration-base);
}
.cv-liq:hover {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
}
.cv-liq[hidden] {
	display: none;
}

.cv-liq-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.3rem 0.625rem;
	border-radius: 999px;
	border: 1px solid var(--cv-border);
	white-space: nowrap;
	flex-shrink: 0;
}
.cv-liq-badge.pain {
	color: var(--cv-red);
	background: var(--cv-red-soft);
	border-color: color-mix(in srgb, var(--cv-red) 35%, var(--cv-border));
}
.cv-liq-badge.squeeze {
	color: var(--cv-green);
	background: var(--cv-green-soft);
	border-color: color-mix(in srgb, var(--cv-green) 35%, var(--cv-border));
}
.cv-liq-badge.balanced {
	color: var(--cv-text-2);
	background: var(--cv-surface-2);
}

.cv-liq-bars {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 160px;
	flex: 1 1 200px;
	max-width: 280px;
}
.cv-liq-bar-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
}
.cv-liq-bar-row .lbl {
	width: 3.75rem;
	flex-shrink: 0;
	white-space: nowrap;
	color: var(--cv-text-3);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.625rem;
	letter-spacing: 0.04em;
}
.cv-liq-bar-track {
	flex: 1;
	height: 6px;
	border-radius: 999px;
	background: var(--cv-surface-3);
	overflow: hidden;
}
.cv-liq-bar-fill {
	height: 100%;
	border-radius: 999px;
	transition: width var(--duration-slow) var(--ease-standard);
}
.cv-liq-bar-fill.long {
	background: var(--cv-red);
}
.cv-liq-bar-fill.short {
	background: var(--cv-green);
}
.cv-liq-bar-row .amt {
	font-family: var(--cv-font-mono);
	color: var(--cv-text-2);
	white-space: nowrap;
	min-width: 3.5rem;
	text-align: right;
}

.cv-liq-top {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	flex: 2 1 320px;
}
.cv-liq-item {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.75rem;
	padding: 0.3rem 0.625rem;
	border-radius: var(--cv-radius);
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	color: var(--cv-text);
	text-decoration: none;
	transition: border-color var(--duration-fast), background var(--duration-fast), transform var(--duration-fast);
}
a.cv-liq-item:hover,
a.cv-liq-item:focus-visible {
	border-color: var(--cv-border-hover);
	background: var(--cv-surface-3);
	transform: translateY(-1px);
}
a.cv-liq-item:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 1px;
}
.cv-liq-item .sym {
	font-weight: 700;
}
.cv-liq-item .side {
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 0.05rem 0.3rem;
	border-radius: 3px;
}
.cv-liq-item .side.long {
	color: var(--cv-red);
	background: var(--cv-red-soft);
}
.cv-liq-item .side.short {
	color: var(--cv-green);
	background: var(--cv-green-soft);
}
.cv-liq-item .bucket {
	color: var(--cv-text-3);
	font-size: 0.6875rem;
}
.cv-liq-item .usd {
	font-family: var(--cv-font-mono);
	font-weight: 600;
}

.cv-liq-offline {
	color: var(--cv-text-3);
	font-size: 0.8125rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.cv-liq-offline .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--cv-text-3);
	flex-shrink: 0;
}

.cv-liq-skel {
	display: flex;
	gap: 1rem;
	align-items: center;
	width: 100%;
}

@media (max-width: 640px) {
	.cv-liq {
		flex-direction: column;
		align-items: stretch;
	}
	.cv-liq-bars {
		max-width: none;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   Crypto News — /markets/news, /markets/news/article, /markets/archive
   Same token/card system as the coin pages and market tools above.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Filter tabs (scrollable pill row) ─────────────────────────────────── */

.nw-tabs {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	padding: 0.25rem 0.125rem 0.625rem;
	margin: 0 0 0.75rem;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.nw-tab {
	flex-shrink: 0;
	padding: 0.375rem 0.875rem;
	border-radius: 999px;
	border: 1px solid var(--cv-border);
	background: var(--cv-surface);
	color: var(--cv-text-2);
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
	transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
}
.nw-tab:hover {
	color: var(--cv-text);
	border-color: var(--cv-border-hover);
}
.nw-tab:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.nw-tab[aria-pressed='true'] {
	background: var(--cv-text);
	color: var(--cv-surface);
	border-color: var(--cv-text);
}

.nw-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin: 0 0 1.25rem;
}
.nw-toolbar .cv-search {
	flex: 1 1 240px;
}
.nw-select {
	appearance: none;
	padding: 0.5rem 2rem 0.5rem 0.875rem;
	border-radius: var(--cv-radius-md);
	border: 1px solid var(--cv-border);
	background: var(--cv-surface)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E")
		no-repeat right 0.75rem center;
	color: var(--cv-text);
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
	transition: border-color var(--duration-fast);
}
.nw-select:hover {
	border-color: var(--cv-border-hover);
}
.nw-select:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 1px;
}

/* ── Lead story + card grid ────────────────────────────────────────────── */

.nw-hero {
	display: grid;
	gap: 1.25rem;
	margin: 0 0 1.5rem;
	padding: 0;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow var(--duration-base), border-color var(--duration-base), transform var(--duration-base);
}
.nw-hero:hover {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
	transform: translateY(-2px);
}
.nw-hero:focus-within {
	border-color: var(--cv-accent);
}
@media (min-width: 760px) {
	.nw-hero {
		grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
	}
}
.nw-hero-media {
	min-height: 220px;
	background: var(--cv-surface-2);
}
.nw-hero-media img {
	width: 100%;
	height: 100%;
	max-height: 340px;
	object-fit: cover;
	display: block;
}
.nw-hero-body {
	padding: 1.25rem 1.5rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	justify-content: center;
}
.nw-hero-body h2 {
	font-size: 1.375rem;
	line-height: 1.3;
	margin: 0;
	font-family: var(--cv-font-serif, inherit);
}
.nw-hero-body h2 a {
	color: inherit;
	text-decoration: none;
}
.nw-hero-body h2 a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nw-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
}
@media (min-width: 640px) {
	.nw-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 1024px) {
	.nw-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.nw-card {
	display: flex;
	flex-direction: column;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow var(--duration-base), border-color var(--duration-base), transform var(--duration-base);
}
.nw-card:hover {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
	transform: translateY(-2px);
}
.nw-card:focus-within {
	border-color: var(--cv-accent);
}
.nw-media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--cv-surface-2);
	overflow: hidden;
}
.nw-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform var(--duration-base);
}
.nw-card:hover .nw-media img {
	transform: scale(1.03);
}
.nw-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--cv-text-3);
	background: linear-gradient(135deg, var(--cv-surface-2), var(--cv-surface-3));
	letter-spacing: 0.05em;
}
.nw-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.875rem 1rem 1rem;
	flex: 1;
}
.nw-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--cv-text-3);
	min-width: 0;
}
.nw-src {
	font-weight: 600;
	color: var(--cv-text-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.nw-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--cv-text-3);
}
.nw-dot.pos {
	background: var(--cv-green, #22c55e);
}
.nw-dot.neg {
	background: var(--cv-red, #ef4444);
}
.nw-title {
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.nw-title a {
	color: inherit;
	text-decoration: none;
}
.nw-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.nw-desc {
	font-size: 0.8125rem;
	color: var(--cv-text-2);
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.nw-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: auto;
	padding-top: 0.25rem;
}
.nw-chip {
	font-size: 0.6875rem;
	font-weight: 600;
	padding: 0.125rem 0.5rem;
	border-radius: 999px;
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	color: var(--cv-text-2);
	cursor: pointer;
	transition: border-color var(--duration-fast), color var(--duration-fast);
}
.nw-chip:hover {
	border-color: var(--cv-border-hover);
	color: var(--cv-text);
}
.nw-chip:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 1px;
}

.nw-count {
	font-size: 0.8125rem;
	color: var(--cv-text-3);
	margin: 0 0 1rem;
}

/* ── "Your briefing" layout (/markets/news) ────────────────────────────── */

.nwb-head {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	align-items: flex-end;
	justify-content: space-between;
	margin: 0 0 1rem;
}
.nwb-head .cv-h1 {
	margin: 0;
}
.nwb-date {
	color: var(--cv-text-3);
	margin: 0.375rem 0 0;
	font-size: 0.9rem;
}
.nwb-head-tools {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	align-items: flex-end;
	flex: 1 1 300px;
	max-width: 560px;
	min-width: 0;
}
.nwb-search {
	width: 100%;
	max-width: none;
	/* .cv-search carries flex: 1 1 16rem for row layouts; inside this column
	   that basis becomes 256px of HEIGHT. Reset to content height. */
	flex: 0 0 auto;
}
.nwb-controls {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.nwb-ask {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.875rem;
	border-radius: 999px;
	border: 1px solid var(--cv-border);
	background: var(--cv-surface);
	color: var(--cv-text-2);
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--duration-fast), border-color var(--duration-fast);
}
.nwb-ask:hover {
	color: var(--cv-text);
	border-color: var(--cv-border-hover);
}
.nwb-ask:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
@media (max-width: 640px) {
	.nwb-head-tools {
		align-items: stretch;
	}
	.nwb-controls {
		justify-content: flex-start;
	}
}

/* Primary briefing tabs — underline style, icons + labels. */
.nwb-tabs {
	display: flex;
	gap: 0.25rem;
	overflow-x: auto;
	border-bottom: 1px solid var(--cv-border);
	margin: 0 0 1rem;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.nwb-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	flex-shrink: 0;
	padding: 0.55rem 0.8rem;
	margin-bottom: -1px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	color: var(--cv-text-2);
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: color var(--duration-fast), border-color var(--duration-fast);
}
.nwb-tab:hover {
	color: var(--cv-text);
}
.nwb-tab:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: -2px;
	border-radius: var(--cv-radius-sm);
}
.nwb-tab[aria-pressed='true'] {
	color: var(--cv-accent);
	border-bottom-color: var(--cv-accent);
	font-weight: 600;
}
.nwb-cats {
	margin-top: -0.25rem;
}

/* Breaking-news ticker. */
.nwb-break {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	border: 1px solid var(--cv-border);
	background: var(--cv-surface);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	padding: 0.5rem 0.875rem;
	margin: 0 0 1rem;
	overflow: hidden;
}
.nwb-break-label {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	color: var(--cv-red);
	font-weight: 700;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	flex-shrink: 0;
}
.nwb-break-viewport {
	overflow: hidden;
	flex: 1;
	min-width: 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.nwb-break-track {
	display: flex;
	width: max-content;
	animation: nwb-marquee 45s linear infinite;
}
.nwb-break-track:hover,
.nwb-break-track:focus-within {
	animation-play-state: paused;
}
.nwb-break-run {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding-right: 1.25rem;
}
.nwb-break-item {
	display: inline-flex;
	align-items: baseline;
	gap: 0.5rem;
	color: var(--cv-text);
	text-decoration: none;
	font-size: 0.8125rem;
	white-space: nowrap;
}
.nwb-break-item:hover .nwb-break-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.nwb-break-item time {
	color: var(--cv-text-3);
	font-size: 0.72rem;
}
.nwb-break-sep {
	color: var(--cv-text-3);
	align-self: center;
}
@keyframes nwb-marquee {
	to {
		transform: translateX(-50%);
	}
}
@media (prefers-reduced-motion: reduce) {
	.nwb-break-track {
		animation: none;
	}
	.nwb-break-viewport {
		overflow-x: auto;
	}
}

/* Today's AI Briefing card. */
.nwb-brief {
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	background: var(--cv-surface);
	box-shadow: var(--cv-shadow-card);
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
}
.nwb-brief-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.nwb-brief-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
}
.nwb-brief-spark {
	color: #eab308;
}
.nwb-brief-time {
	color: var(--cv-text-3);
	font-size: 0.78rem;
}
.nwb-brief-toggle {
	margin-left: auto;
	display: inline-flex;
	background: none;
	border: 0;
	color: var(--cv-text-3);
	cursor: pointer;
	padding: 0.25rem;
	border-radius: var(--cv-radius);
	transition: color var(--duration-fast);
}
.nwb-brief-toggle:hover {
	color: var(--cv-text);
}
.nwb-brief-toggle:focus-visible {
	outline: 2px solid var(--cv-accent);
}
.nwb-brief-toggle svg {
	transition: transform var(--duration-base);
}
.nwb-brief-toggle[aria-expanded='false'] svg {
	transform: rotate(-90deg);
}
.nwb-brief-list {
	margin: 0.875rem 0 0;
	padding-left: 1.375rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.55;
}
.nwb-brief-list li::marker {
	color: var(--cv-accent);
	font-weight: 600;
}
.nwb-brief-list a {
	color: var(--cv-text);
	text-decoration: none;
}
.nwb-brief-list a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.nwb-brief-more {
	display: inline-block;
	margin-top: 0.875rem;
	color: var(--cv-accent);
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
}
.nwb-brief-more:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Section headings (Top stories / Latest). */
.nwb-section-h {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.125rem;
	margin: 0 0 1rem;
	font-family: var(--cv-font-serif, inherit);
}
.nwb-section-h svg {
	color: #eab308;
}
.nw-grid + .nwb-section-h,
.nwb-top + .nwb-section-h {
	margin-top: 1.75rem;
}

/* Top stories: hero left, compact rail right. */
.nwb-top {
	display: grid;
	gap: 1rem;
	margin: 0 0 1.75rem;
}
@media (min-width: 900px) {
	.nwb-top {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		align-items: start;
	}
}
/* Inside the briefing block the hero stacks vertically: image, then body. */
.nwb-top .nw-hero {
	margin: 0;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.nwb-top .nw-hero-media {
	min-height: 240px;
	flex: 1;
}
.nwb-top .nw-hero-media img {
	max-height: none;
}
.nwb-top .nw-hero-body {
	justify-content: flex-start;
	flex: 0 0 auto;
}
.nwb-rail {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 0;
}
.nwb-saved {
	max-width: 760px;
}

/* Compact headline row (rail + saved). */
.nw-row {
	display: flex;
	gap: 0.875rem;
	align-items: stretch;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	padding: 0.75rem 0.875rem;
	cursor: pointer;
	transition: box-shadow var(--duration-base), border-color var(--duration-base), transform var(--duration-base);
}
.nw-row:hover {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
	transform: translateY(-1px);
}
.nw-row:focus-within {
	border-color: var(--cv-accent);
}
.nw-row-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}
.nw-row-title {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.nw-row-title a {
	color: inherit;
	text-decoration: none;
}
.nw-row-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.nw-row-sub {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	font-size: 0.72rem;
	color: var(--cv-text-3);
	margin-top: auto;
}
.nw-row-cat {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
}
.nw-row-thumb {
	flex: 0 0 92px;
	align-self: center;
}
.nw-row-thumb .nw-media,
.nw-row-thumb .nw-hero-media {
	aspect-ratio: 1;
	width: 92px;
	border-radius: var(--cv-radius-md);
	overflow: hidden;
}
.nw-row-thumb .nw-fallback {
	font-size: 1.25rem;
}

/* Save-story star. */
.nw-star {
	background: none;
	border: 0;
	color: var(--cv-text-3);
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1;
	padding: 0.125rem 0.25rem;
	border-radius: var(--cv-radius-sm);
	transition: color var(--duration-fast), transform var(--duration-fast);
}
.nw-star:hover {
	color: #eab308;
	transform: scale(1.15);
}
.nw-star:focus-visible {
	outline: 2px solid var(--cv-accent);
}
.nw-star[aria-pressed='true'] {
	color: #eab308;
}
.nw-card .nw-meta time {
	margin-left: auto;
}

/* Trending narratives (digest clusters). */
.nwb-trend {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}
.nwb-trend-item {
	display: flex;
	gap: 1rem;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	padding: 1rem 1.125rem;
	cursor: pointer;
	transition: box-shadow var(--duration-base), border-color var(--duration-base), transform var(--duration-base);
}
.nwb-trend-item:hover {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
	transform: translateY(-1px);
}
.nwb-trend-item:focus-within {
	border-color: var(--cv-accent);
}
.nwb-trend-rank {
	font-family: var(--cv-font-mono);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--cv-text-3);
	min-width: 1.75rem;
	line-height: 1.2;
}
.nwb-trend-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}
.nwb-trend-title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.35;
	font-family: var(--cv-font-serif, inherit);
}
.nwb-trend-title a {
	color: inherit;
	text-decoration: none;
}
.nwb-trend-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.nwb-trend-srcs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem 0.875rem;
	font-size: 0.72rem;
	color: var(--cv-text-3);
}
.nwb-stance {
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.nwb-stance-bullish {
	color: var(--cv-green);
	background: var(--cv-green-soft);
}
.nwb-stance-bearish {
	color: var(--cv-red);
	background: var(--cv-red-soft);
}
.nwb-stance-neutral {
	color: var(--cv-text-2);
	background: var(--cv-surface-2);
}

/* ── Article reader ────────────────────────────────────────────────────── */

.art-hero {
	border-radius: var(--cv-radius-xl);
	overflow: hidden;
	margin: 0 0 1.25rem;
	border: 1px solid var(--cv-border);
	background: var(--cv-surface-2);
}
.art-hero img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	display: block;
}
.art-title {
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
	line-height: 1.2;
	margin: 0 0 0.75rem;
	font-family: var(--cv-font-serif, inherit);
}
.art-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	font-size: 0.8125rem;
	color: var(--cv-text-3);
	margin: 0 0 1.5rem;
}
.art-byline .src {
	font-weight: 600;
	color: var(--cv-text-2);
}
.art-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.1875rem 0.625rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	border: 1px solid var(--cv-border);
	background: var(--cv-surface-2);
	color: var(--cv-text-2);
}
.art-badge.bullish {
	color: var(--cv-green, #22c55e);
	border-color: color-mix(in srgb, var(--cv-green, #22c55e) 35%, transparent);
	background: color-mix(in srgb, var(--cv-green, #22c55e) 10%, transparent);
}
.art-badge.bearish {
	color: var(--cv-red, #ef4444);
	border-color: color-mix(in srgb, var(--cv-red, #ef4444) 35%, transparent);
	background: color-mix(in srgb, var(--cv-red, #ef4444) 10%, transparent);
}
.art-layout {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}
@media (min-width: 960px) {
	.art-layout {
		grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
		align-items: start;
	}
}
.art-summary-card {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	padding: 1.25rem 1.5rem;
	margin: 0 0 1.5rem;
}
.art-summary-card h2 {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cv-text-3);
	margin: 0 0 0.625rem;
}
.art-summary-card p {
	margin: 0 0 0.75rem;
	line-height: 1.6;
}
.art-keypoints {
	margin: 0;
	padding: 0 0 0 1.125rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	line-height: 1.5;
	font-size: 0.9375rem;
}
.art-provider {
	font-size: 0.6875rem;
	color: var(--cv-text-3);
	margin: 0.75rem 0 0;
}
/* ── Trading read (assets, priced-in, horizon, counter-argument) ───────── */
.art-trading {
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	padding: 1.25rem 1.5rem;
	margin: 0 0 1.5rem;
}
.art-trading h2 {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cv-text-3);
	margin: 0 0 0.75rem;
}
.art-assets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 0.875rem;
}
.art-asset {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.25rem 0.625rem;
	border: 1px solid var(--cv-border);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
}
.art-asset small {
	font-weight: 400;
	color: var(--cv-text-3);
}
.art-asset.up {
	color: var(--cv-chart-green);
}
.art-asset.down {
	color: var(--cv-chart-red);
}
.art-trading-meta {
	margin: 0 0 1rem;
	display: grid;
	gap: 0.5rem;
}
.art-trading-meta div {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
}
.art-trading-meta dt {
	min-width: 5.5rem;
	color: var(--cv-text-3);
	font-size: 0.8125rem;
}
.art-trading-meta dd {
	margin: 0;
	font-size: 0.9375rem;
}
.art-counter {
	border-left: 3px solid var(--cv-border);
	padding: 0.125rem 0 0.125rem 0.875rem;
}
.art-counter h3 {
	margin: 0 0 0.25rem;
	font-size: 0.8125rem;
	color: var(--cv-text-2, var(--cv-text-3));
}
.art-counter p {
	margin: 0;
	line-height: 1.55;
	font-size: 0.9375rem;
}
/* ── Coins-in-this-story cards ─────────────────────────────────────────── */
.art-coins {
	margin: 0 0 1.5rem;
}
.art-coins > h2 {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cv-text-3);
	margin: 0 0 0.75rem;
}
.art-coin-grid {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.art-coin-card {
	display: block;
	position: relative;
	padding: 0.875rem 1rem 1rem;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	background: var(--cv-surface);
	box-shadow: var(--cv-shadow-card);
	text-decoration: none;
	color: inherit;
	transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.art-coin-card:hover {
	transform: translateY(-2px);
	border-color: var(--cv-accent);
	box-shadow: var(--cv-shadow-card-hover, var(--cv-shadow-card));
}
.art-coin-card:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.art-coin-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}
.art-coin-logo {
	border-radius: 50%;
	flex: none;
}
.art-coin-id {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.15;
}
.art-coin-sym {
	font-weight: 700;
	font-size: 0.9375rem;
}
.art-coin-name {
	font-size: 0.6875rem;
	color: var(--cv-text-3);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.art-coin-rank {
	margin-left: auto;
	font-size: 0.625rem;
	color: var(--cv-text-3);
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	border-radius: 999px;
	padding: 0.0625rem 0.4rem;
	flex: none;
}
.art-coin-spark {
	display: block;
	width: 100%;
	height: 44px;
	margin: 0.25rem 0 0.5rem;
}
.art-coin-price {
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
}
.art-coin-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	font-size: 0.75rem;
	margin-top: 0.25rem;
}
.art-coin-stats .cv-up {
	color: var(--cv-chart-green);
}
.art-coin-stats .cv-down {
	color: var(--cv-chart-red);
}
.art-coin-stats .dim {
	color: var(--cv-text-3);
}
.art-coins-note {
	font-size: 0.6875rem;
	color: var(--cv-text-3);
	margin: 0.625rem 0 0;
}
/* ── Topic / entity tags ───────────────────────────────────────────────── */
.art-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0 0 1.5rem;
}
.art-tag {
	font-size: 0.6875rem;
	color: var(--cv-text-2);
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	border-radius: 999px;
	padding: 0.1875rem 0.625rem;
}

.art-prose {
	font-size: 1.0625rem;
	line-height: 1.75;
	max-width: 70ch;
}
.art-prose p {
	margin: 0 0 1.125rem;
}
/* Sits under a truncated excerpt: makes the cut-off read as deliberate
   attribution, not a failed extraction. Pairs with the .art-cta below it. */
.art-continue {
	max-width: 70ch;
	margin: -0.25rem 0 0;
	padding-left: 0.875rem;
	border-left: 2px solid var(--cv-accent);
	color: var(--cv-text-dim);
	font-size: 0.9375rem;
	line-height: 1.6;
}
.art-preview-note {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 1rem 1.25rem;
	border: 1px solid var(--cv-border);
	border-left: 3px solid var(--cv-accent);
	border-radius: var(--cv-radius-lg);
	background: var(--cv-surface-2);
	font-size: 0.9375rem;
	line-height: 1.55;
	margin: 0 0 1.5rem;
}
.art-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	border-radius: var(--cv-radius-md);
	background: var(--cv-text);
	color: var(--cv-surface);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: opacity var(--duration-fast), transform var(--duration-fast);
}
.art-cta:hover {
	opacity: 0.85;
}
.art-cta:active {
	transform: scale(0.98);
}
.art-cta:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.art-rail h2 {
	font-size: 1rem;
	margin: 0 0 0.875rem;
}
.art-rail .nw-grid {
	grid-template-columns: 1fr;
}

/* ── Archive explorer ──────────────────────────────────────────────────── */

.arc-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 0.75rem;
	margin: 0 0 1.5rem;
}
.arc-filters {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	align-items: end;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	padding: 1rem 1.25rem 1.25rem;
	margin: 0 0 1rem;
}
.arc-field {
	display: flex;
	flex-direction: column;
	gap: 0.3125rem;
	min-width: 0;
}
.arc-field label {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cv-text-3);
}
.arc-field input,
.arc-field select {
	padding: 0.5rem 0.75rem;
	border-radius: var(--cv-radius-md);
	border: 1px solid var(--cv-border);
	background: var(--cv-surface-2);
	color: var(--cv-text);
	font: inherit;
	font-size: 0.875rem;
	min-width: 0;
	transition: border-color var(--duration-fast);
}
.arc-field input:hover,
.arc-field select:hover {
	border-color: var(--cv-border-hover);
}
.arc-field input:focus-visible,
.arc-field select:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 1px;
}
.arc-actions {
	display: flex;
	gap: 0.5rem;
}
.arc-btn {
	padding: 0.5rem 1.125rem;
	border-radius: var(--cv-radius-md);
	border: 1px solid var(--cv-text);
	background: var(--cv-text);
	color: var(--cv-surface);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity var(--duration-fast), transform var(--duration-instant);
}
.arc-btn:hover {
	opacity: 0.85;
}
.arc-btn:active {
	transform: scale(0.97);
}
.arc-btn:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.arc-btn.ghost {
	background: transparent;
	color: var(--cv-text-2);
	border-color: var(--cv-border);
}
.arc-btn.ghost:hover {
	border-color: var(--cv-border-hover);
	color: var(--cv-text);
	opacity: 1;
}
.arc-years {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0 0 1.25rem;
}
.arc-coverage {
	font-size: 0.8125rem;
	color: var(--cv-text-3);
	margin: 0 0 0.875rem;
	line-height: 1.5;
}
.arc-list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	background: var(--cv-surface);
	box-shadow: var(--cv-shadow-card);
	overflow: hidden;
}
.arc-row {
	display: grid;
	grid-template-columns: 92px 10px minmax(0, 1fr) auto;
	gap: 0.75rem;
	align-items: baseline;
	padding: 0.75rem 1.125rem;
	border-bottom: 1px solid var(--cv-border);
	font-size: 0.875rem;
	transition: background var(--duration-fast);
}
.arc-row:last-child {
	border-bottom: 0;
}
.arc-row:hover {
	background: var(--cv-surface-2);
}
.arc-date {
	font-size: 0.75rem;
	color: var(--cv-text-3);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.arc-row .nw-dot {
	align-self: center;
}
.arc-title {
	min-width: 0;
	line-height: 1.45;
}
.arc-title a {
	color: var(--cv-text);
	text-decoration: none;
	font-weight: 500;
}
.arc-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.arc-title .lang {
	font-size: 0.625rem;
	font-weight: 700;
	vertical-align: 2px;
	margin-left: 0.375rem;
	padding: 0.0625rem 0.3125rem;
	border-radius: 4px;
	border: 1px solid var(--cv-border);
	color: var(--cv-text-3);
}
.arc-src {
	font-size: 0.75rem;
	color: var(--cv-text-3);
	white-space: nowrap;
}
@media (max-width: 640px) {
	.arc-row {
		grid-template-columns: 10px minmax(0, 1fr);
	}
	.arc-date,
	.arc-src {
		display: none;
	}
}

/* ── /markets hub ──────────────────────────────────────────────────────── */

.mkt-suite {
	display: grid;
	gap: 0.875rem;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	margin: 0 0 2rem;
}
.mkt-hero-card {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	padding: 1rem 1.125rem 1.125rem;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-lg);
	box-shadow: var(--cv-shadow-card);
	color: inherit;
	text-decoration: none;
	transition: box-shadow var(--duration-base), border-color var(--duration-base), transform var(--duration-base);
}
.mkt-hero-card:hover {
	box-shadow: var(--cv-shadow-card-hover);
	border-color: var(--cv-border-hover);
	transform: translateY(-2px);
}
.mkt-hero-card:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
}
.mkt-hero-card .glyph {
	width: 34px;
	height: 34px;
	border-radius: var(--cv-radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cv-surface-2);
	border: 1px solid var(--cv-border);
	color: var(--cv-text-2);
	margin-bottom: 0.25rem;
}
.mkt-hero-card .glyph svg {
	width: 18px;
	height: 18px;
}
.mkt-hero-card h3 {
	font-size: 0.9375rem;
	margin: 0;
}
.mkt-hero-card p {
	font-size: 0.8125rem;
	color: var(--cv-text-2);
	line-height: 1.45;
	margin: 0;
}
.mkt-hero-card .stat {
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--cv-text);
	font-variant-numeric: tabular-nums;
}
.mkt-hero-card .stat .dim {
	color: var(--cv-text-3);
	font-weight: 500;
}
.mkt-cols {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
	align-items: start;
}
@media (min-width: 1024px) {
	.mkt-cols {
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	}
}
.mkt-rail {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.mkt-rail .nw-grid {
	grid-template-columns: 1fr;
}
.mkt-more {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--cv-text-2);
	text-decoration: none;
	transition: color var(--duration-fast);
}
.mkt-more:hover {
	color: var(--cv-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Reduced motion: news/hub cards stay still. */
@media (prefers-reduced-motion: reduce) {
	.nw-card,
	.nw-hero,
	.nw-row,
	.nwb-trend-item,
	.nw-star,
	.mkt-hero-card,
	.nw-card:hover .nw-media img {
		transition: none;
		transform: none;
	}
}

/* ═══════════════════════════════════════════════════════════════════════════
   News Digest — /markets/digest
   Narrative cards: rank, stance, coverage, expandable source list.
   ═══════════════════════════════════════════════════════════════════════════ */

.dg-windows {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.dg-band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem 2rem;
	padding: 1rem 1.5rem;
	background: var(--cv-surface);
	border: 1px solid var(--cv-border);
	border-radius: var(--cv-radius-xl);
	box-shadow: var(--cv-shadow-card);
	margin: 0 0 1.75rem;
}
.dg-band-stat {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}
.dg-band-stat strong {
	font-size: 1.125rem;
	font-variant-numeric: tabular-nums;
	text-transform: capitalize;
}
.dg-band .label,
.dg-band-tickers .label {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cv-text-3);
}
.dg-band-tickers {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin-left: auto;
}
.dg-band-tickers .nw-chips {
	margin: 0;
	padding: 0;
}

.dg-story {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1.25rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--cv-border);
}
.dg-story:last-child {
	border-bottom: 0;
}
.dg-rank {
	font-family: var(--cv-font-serif, inherit);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
	color: var(--cv-text-3);
	width: 2ch;
	text-align: right;
	font-variant-numeric: tabular-nums;
}
.dg-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.dg-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.875rem;
	font-size: 0.75rem;
	color: var(--cv-text-3);
}
.dg-coverage {
	font-weight: 500;
	color: var(--cv-text-2);
}
.dg-title {
	font-family: var(--cv-font-serif, inherit);
	font-size: 1.375rem;
	line-height: 1.3;
	margin: 0;
}
.dg-summary {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--cv-text-2);
	margin: 0;
	max-width: 72ch;
}
.dg-sources {
	margin-top: 0.25rem;
}
.dg-sources summary {
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--cv-text-2);
	padding: 0.25rem 0;
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	transition: color var(--duration-fast);
}
.dg-sources summary::-webkit-details-marker {
	display: none;
}
.dg-sources summary::before {
	content: '▸';
	transition: transform var(--duration-fast);
	display: inline-block;
}
.dg-sources[open] summary::before {
	transform: rotate(90deg);
}
.dg-sources summary:hover {
	color: var(--cv-text);
}
.dg-sources summary:focus-visible {
	outline: 2px solid var(--cv-accent);
	outline-offset: 2px;
	border-radius: 4px;
}
.dg-sources ul {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0 0 0 1rem;
	border-left: 2px solid var(--cv-border);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.dg-sources li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.45;
}
.dg-sources li a {
	color: var(--cv-text);
	text-decoration: none;
}
.dg-sources li a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.dg-sources .dim {
	font-size: 0.75rem;
	color: var(--cv-text-3);
}
.dg-out {
	color: var(--cv-text-3) !important;
	font-size: 0.8125rem;
}
.dg-out:hover {
	color: var(--cv-text) !important;
}

@media (max-width: 640px) {
	.dg-story {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.5rem;
	}
	.dg-rank {
		text-align: left;
		font-size: 1.25rem;
	}
	.dg-band-tickers {
		margin-left: 0;
	}
}