:root {
	color-scheme: light;
	--bg: #f6f5fb;
	--surface: #ffffff;
	--surface-2: #f2effc;
	--fg: #17152b;
	--muted: #6b6883;
	--accent: #6a3df0;
	--accent-soft: #efe9ff;
	--accent-ink: #ffffff;
	--border: #e8e5f2;
	--up: #0e9a61;
	--down: #dc4449;
	--up-soft: rgba(14, 154, 97, 0.1);
	--down-soft: rgba(220, 68, 73, 0.1);
	--danger: #c93a3f;
	--radius: 22px;
	--radius-sm: 14px;
	--space: 1.1rem;
	--shadow: 0 1px 2px rgba(23, 21, 43, 0.04), 0 10px 30px rgba(23, 21, 43, 0.06);
	--shadow-lg: 0 24px 60px rgba(86, 52, 200, 0.16);
	--font: "Plus Jakarta Sans", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
	--display: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

button {
	font: inherit;
	color: inherit;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.num {
	font-variant-numeric: tabular-nums;
}

.muted {
	color: var(--muted);
}

.up {
	color: var(--up);
}

.down {
	color: var(--down);
}

.flat {
	color: var(--muted);
}

.right {
	text-align: right !important;
}

/* Top bar */
.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--border);
}

.topbar-inner {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas: "brand chip" "tabs tabs";
	align-items: center;
	gap: 0.5rem 1rem;
	max-width: 88rem;
	margin: 0 auto;
	padding: 0.6rem var(--space);
}

.brand {
	grid-area: brand;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0;
	background: none;
	border: 0;
	font-family: var(--display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	cursor: pointer;
}

.tabs {
	grid-area: tabs;
	display: flex;
	gap: 0.25rem;
	overflow-x: auto;
}

.tab {
	min-height: 40px;
	padding: 0.4rem 0.9rem;
	background: none;
	border: 0;
	border-radius: var(--radius-sm);
	color: var(--muted);
	font-weight: 500;
	cursor: pointer;
}

.tab:hover {
	color: var(--fg);
	background: var(--surface);
}

.tab-active {
	color: var(--fg);
	background: var(--surface-2);
}

.balance-chip {
	grid-area: chip;
	justify-self: end;
	display: grid;
	text-align: right;
	padding: 0.3rem 0.75rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	line-height: 1.25;
}

.balance-label {
	font-size: 0.75rem;
	color: var(--muted);
}

.balance-value {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

@media (min-width: 48rem) {
	.topbar-inner {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "brand tabs chip";
		padding: 0.75rem 1.5rem;
	}

	.tabs {
		padding-left: 1rem;
	}
}

/* Layout */
.shell {
	max-width: 88rem;
	margin: 0 auto;
	padding: 1.5rem var(--space) 3rem;
}

@media (min-width: 48rem) {
	.shell {
		padding: 2rem 1.5rem 4rem;
	}
}

.stack {
	display: grid;
	gap: var(--space);
}

.stack-sm {
	display: grid;
	gap: 0.5rem;
}

.stack-lg {
	display: grid;
	gap: 2rem;
}

.row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.grid {
	display: grid;
	gap: var(--space);
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.pad {
	padding: var(--space);
}

h1 {
	margin: 0 0 1rem;
	font-family: var(--display);
	font-size: clamp(2.3rem, 6.5vw, 4rem);
	line-height: 1.05;
	letter-spacing: -0.035em;
	font-weight: 700;
}

.lede {
	margin: 0 0 1.5rem;
	max-width: 34rem;
	font-size: 1.1rem;
	color: #4d4a66;
}

.hint {
	margin: 0;
	color: var(--muted);
}

.section-title {
	margin: 0;
	font-family: var(--display);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.updated {
	margin: 0.1rem 0 0;
	font-size: 0.8125rem;
	color: var(--muted);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.55rem 1.1rem;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: var(--accent-ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.12s ease;
}

.btn:hover {
	filter: brightness(1.08);
}

.btn:active {
	transform: scale(0.98);
}

.btn-secondary {
	background: transparent;
	color: var(--fg);
	border-color: var(--border);
}

.btn-secondary:hover {
	background: var(--surface-2);
}

.btn-lg {
	min-height: 52px;
	padding: 0.7rem 1.5rem;
	font-size: 1.05rem;
}

.btn-small {
	min-height: 36px;
	padding: 0.3rem 0.85rem;
	font-size: 0.9rem;
}

.btn-block {
	width: 100%;
	min-height: 52px;
	font-size: 1.05rem;
}

.btn-buy {
	background: var(--up);
	color: #ffffff;
}

.btn-sell {
	background: var(--down);
	color: #ffffff;
}

/* Cards */
.card {
	padding: var(--space);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	min-width: 0;
}

.card-flush {
	padding: 0;
	overflow: hidden;
}

.card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.9rem var(--space);
	border-bottom: 1px solid var(--border);
}

/* Inputs */
.input,
.select,
.textarea {
	width: 100%;
	min-height: 44px;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--bg);
	color: var(--fg);
	font: inherit;
}

.input::placeholder {
	color: #9a97b0;
}

.field {
	display: grid;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

.field > label {
	font-size: 0.875rem;
	color: var(--muted);
}

/* Hero */
.hero {
	display: grid;
	gap: 2rem;
	padding: 1rem 0 0.5rem;
}

@media (min-width: 60rem) {
	.hero {
		grid-template-columns: 1.3fr 1fr;
		align-items: center;
		gap: 4rem;
		padding: 2.5rem 0 1rem;
	}
}

.movers {
	display: grid;
	gap: 0.6rem;
	padding: 1.25rem;
	background: linear-gradient(160deg, var(--surface-2), var(--surface));
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.movers .section-title {
	margin-bottom: 0.25rem;
}

.mover {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.7rem 0.75rem;
	background: var(--bg);
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	text-align: left;
	cursor: pointer;
}

.mover:hover {
	border-color: var(--border);
}

.mover-name,
.mover-price {
	display: grid;
	line-height: 1.3;
}

.mover-name {
	flex: 1;
	min-width: 0;
}

.mover-price {
	text-align: right;
}

.mover-name .muted,
.coin-cell .muted {
	font-size: 0.8125rem;
}

.coin {
	flex: none;
	display: inline-grid;
	place-items: center;
	border-radius: 50%;
	background: color-mix(in srgb, var(--coin) 18%, white);
	color: color-mix(in srgb, var(--coin) 70%, #17152b);
	border: 0;
	font-family: var(--display);
	font-weight: 700;
}

/* Markets table */
.search {
	position: relative;
	display: block;
	flex: 1 1 14rem;
	max-width: 20rem;
}

.search svg {
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted);
}

.search .input {
	padding-left: 2.2rem;
}

.table-wrap {
	overflow-x: auto;
}

.table {
	width: 100%;
	border-collapse: collapse;
}

.table th,
.table td {
	padding: 0.7rem var(--space);
	text-align: left;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.table th {
	font-size: 0.8125rem;
	color: var(--muted);
	font-weight: 500;
}

.th-btn {
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font-weight: 500;
	cursor: pointer;
}

.market-row {
	cursor: pointer;
}

.market-row:hover td {
	background: var(--surface-2);
}

.coin-cell {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0;
	background: none;
	border: 0;
	text-align: left;
	cursor: pointer;
}

.coin-cell > span:last-child {
	display: grid;
	line-height: 1.3;
}

.table-note {
	margin: 0;
	padding: 0.75rem var(--space);
	font-size: 0.8125rem;
	color: var(--muted);
}

@media (max-width: 40rem) {
	.hide-sm {
		display: none;
	}

	.table th,
	.table td {
		padding: 0.7rem 0.75rem;
	}
}

/* Trade screen */
.pair-head {
	display: grid;
	gap: 0.75rem 2rem;
	align-items: center;
}

@media (min-width: 60rem) {
	.pair-head {
		grid-template-columns: auto auto 1fr;
	}
}

.pair-id {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.pair-select {
	min-height: 40px;
	padding: 0.2rem 1.8rem 0.2rem 0.5rem;
	margin-left: -0.5rem;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%238e98ae' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.4rem center;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	color: var(--fg);
	font-family: var(--display);
	font-size: 1.35rem;
	font-weight: 700;
	appearance: none;
	cursor: pointer;
	max-width: 100%;
}

.pair-select:hover {
	border-color: var(--border);
}

.pair-select option {
	background: var(--surface);
	font-size: 1rem;
}

.big-price {
	font-family: var(--display);
	font-size: clamp(1.9rem, 5vw, 2.4rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.pair-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
	margin: 0;
}

.pair-stats dt {
	font-size: 0.8125rem;
	color: var(--muted);
}

.pair-stats dd {
	margin: 0;
	font-weight: 500;
}

.trade-grid {
	display: grid;
	gap: var(--space);
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "chart" "form" "book" "trades";
}

@media (min-width: 48rem) {
	.trade-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas: "chart chart" "form book" "trades book";
	}
}

@media (min-width: 72rem) {
	.trade-grid {
		grid-template-columns: minmax(0, 1fr) 19rem 21rem;
		grid-template-areas: "chart book form" "chart book form" "chart trades form";
		align-items: start;
	}

	.area-chart {
		grid-row: 1 / 3;
	}
}

.area-chart {
	grid-area: chart;
}

.area-form {
	grid-area: form;
}

.area-book {
	grid-area: book;
}

.area-trades {
	grid-area: trades;
}

.seg {
	display: inline-flex;
	padding: 3px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.seg-btn {
	min-width: 44px;
	min-height: 34px;
	padding: 0.2rem 0.6rem;
	background: none;
	border: 0;
	border-radius: 6px;
	color: var(--muted);
	font-weight: 500;
	font-size: 0.875rem;
	cursor: pointer;
}

.seg-on {
	background: var(--surface-2);
	color: var(--fg);
}

/* Chart */
.chart {
	padding: 0.75rem var(--space) var(--space);
}

.chart-readout {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.9rem;
	margin-bottom: 0.5rem;
	font-size: 0.8125rem;
	color: var(--muted);
}

.chart-readout b {
	font-weight: 500;
}

.chart-plot {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.5rem;
}

.chart-canvas {
	position: relative;
	height: clamp(240px, 42vw, 440px);
	touch-action: pan-y;
	cursor: crosshair;
}

.chart-canvas svg {
	display: block;
	width: 100%;
	height: 100%;
}

.grid-line {
	stroke: var(--border);
	stroke-width: 1;
}

.c-up {
	fill: var(--up);
	stroke: var(--up);
}

.c-down {
	fill: var(--down);
	stroke: var(--down);
}

.c-up line,
.c-down line {
	stroke-width: 1;
}

.c-up rect,
.c-down rect {
	stroke: none;
}

.vol {
	opacity: 0.25;
}

.last-line {
	stroke: var(--accent);
	stroke-width: 1;
	stroke-dasharray: 4 4;
}

.crosshair {
	stroke: var(--muted);
	stroke-width: 1;
	stroke-dasharray: 3 3;
}

.chart-axis {
	position: relative;
	width: 4.8rem;
	font-size: 0.75rem;
	color: var(--muted);
}

.chart-axis span {
	position: absolute;
	right: 0;
	transform: translateY(-50%);
}

.chart-axis .last-tag {
	padding: 0.05rem 0.35rem;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: 4px;
	font-weight: 600;
}

.chart-times {
	display: flex;
	justify-content: space-between;
	margin-top: 0.4rem;
	margin-right: 5.3rem;
	font-size: 0.75rem;
	color: var(--muted);
}

.chart-skeleton {
	height: clamp(260px, 44vw, 480px);
	margin: var(--space);
}

/* Order book & trades */
.book {
	padding: 0.4rem 0 0.6rem;
	font-size: 0.875rem;
}

.book-row {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0.5rem;
	padding: 0.2rem var(--space);
}

.book-row > span:not(.depth) {
	position: relative;
}

.book-row > span:nth-child(n + 3),
.book-head > span:nth-child(n + 2) {
	text-align: right;
}

.area-trades .book-row > span:nth-child(n + 2) {
	text-align: right;
}

.book-head {
	padding-bottom: 0.4rem;
	font-size: 0.75rem;
	color: var(--muted);
}

.depth {
	position: absolute;
	inset: 1px 0;
	transform-origin: right;
}

.ask .depth {
	background: var(--down-soft);
}

.bid .depth {
	background: var(--up-soft);
}

.book-spread {
	display: flex;
	justify-content: space-between;
	margin: 0.35rem 0;
	padding: 0.45rem var(--space);
	background: var(--bg);
	border-block: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.8125rem;
}

/* Order form */
.side-toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 4px;
	margin-bottom: 1rem;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.side {
	min-height: 42px;
	background: none;
	border: 0;
	border-radius: 6px;
	color: var(--muted);
	font-weight: 600;
	cursor: pointer;
}

.side-buy.side-on {
	background: var(--up);
	color: #ffffff;
}

.side-sell.side-on {
	background: var(--down);
	color: #ffffff;
}

.avail {
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.input-affix {
	position: relative;
}

.input-affix .input {
	padding-right: 4rem;
	font-size: 1.15rem;
	font-weight: 500;
}

.affix {
	position: absolute;
	right: 0.8rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.pct-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.4rem;
	margin-bottom: 1rem;
}

.pct {
	min-height: 36px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 6px;
	color: var(--muted);
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
}

.pct:hover {
	color: var(--fg);
	border-color: var(--muted);
}

.quote {
	display: grid;
	gap: 0.4rem;
	margin: 0 0 1rem;
	font-size: 0.9rem;
}

.quote div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.quote dt {
	color: var(--muted);
}

.quote dd {
	margin: 0;
	text-align: right;
}

.quote-total {
	padding-top: 0.5rem;
	border-top: 1px solid var(--border);
	font-weight: 600;
}

.quote-total dt {
	color: var(--fg);
}

.form-error {
	margin: 0 0 0.75rem;
	color: var(--danger);
	font-size: 0.9rem;
}

.form-done {
	margin: 0.75rem 0 0;
	padding: 0.7rem 0.85rem;
	background: var(--up-soft);
	border: 1px solid color-mix(in srgb, var(--up) 40%, transparent);
	border-radius: var(--radius-sm);
	color: var(--fg);
	font-size: 0.9rem;
	animation: pop 0.25s ease;
}

@keyframes pop {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
}

.fine {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: var(--muted);
}

/* Portfolio */
.summary {
	padding: 1rem 0 0;
}

.summary p {
	margin: 0;
}

.summary-value {
	margin: 0.2rem 0 0.3rem !important;
	font-family: var(--display);
	font-size: clamp(2.6rem, 8vw, 4.2rem);
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1.05;
}

.holdings,
.fills {
	margin: 0;
	padding: 0;
	list-style: none;
}

.holding,
.fill {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem var(--space);
	border-bottom: 1px solid var(--border);
}

.holding:last-child,
.fill:last-child {
	border-bottom: 0;
}

.holding-name,
.holding-value,
.fill-main,
.fill-side {
	display: grid;
	line-height: 1.35;
	min-width: 0;
}

.holding-name,
.fill-main {
	flex: 1;
}

.holding-value,
.fill-side {
	text-align: right;
}

.holding-value .muted,
.holding-name .muted,
.fill-main .muted,
.fill-side .muted {
	font-size: 0.8125rem;
}

.holding-spacer {
	width: 68px;
	flex: none;
}

@media (max-width: 30rem) {
	.holding-spacer {
		display: none;
	}
}

.tag {
	flex: none;
	min-width: 3.2rem;
	padding: 0.15rem 0.5rem;
	border-radius: 6px;
	text-align: center;
	font-size: 0.8125rem;
	font-weight: 600;
}

.tag-buy {
	background: var(--up-soft);
	color: var(--up);
}

.tag-sell {
	background: var(--down-soft);
	color: var(--down);
}

/* Footer */
.footer {
	border-top: 1px solid var(--border);
}

.footer p {
	max-width: 88rem;
	margin: 0 auto;
	padding: 1.5rem var(--space) 2rem;
	font-size: 0.8125rem;
	color: var(--muted);
}

/* Seeded state primitives */
.list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.empty {
	display: grid;
	justify-items: center;
	gap: 0.5rem;
	padding: calc(var(--space) * 2);
	text-align: center;
	color: var(--muted);
}

.empty-title {
	margin: 0;
	color: var(--fg);
	font-weight: 600;
}

.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: calc(var(--space) * 1.5);
	color: var(--muted);
}

.spinner {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: fab-spin 0.7s linear infinite;
}

@keyframes fab-spin {
	to {
		transform: rotate(360deg);
	}
}

.skeleton {
	display: block;
	height: 1rem;
	border-radius: calc(var(--radius) / 2);
	background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2));
	background-size: 200% 100%;
	animation: fab-shimmer 1.2s linear infinite;
}

.skeleton-tall {
	height: 3.5rem;
}

.skeleton-row {
	height: 2.6rem;
}

.skeleton-price {
	display: inline-block;
	width: 9rem;
	height: 2rem;
	vertical-align: middle;
}

@keyframes fab-shimmer {
	to {
		background-position: -200% 0;
	}
}

.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-left: 3px solid var(--muted);
	border-radius: var(--radius-sm);
}

.alert-error {
	border-left-color: var(--danger);
	color: var(--danger);
}

.badge {
	display: inline-block;
	padding: 0.1rem 0.5rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.8125rem;
	color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
	.spinner,
	.skeleton,
	.form-done {
		animation: none;
	}

	.btn {
		transition: none;
	}
}

/* Modern, friendly finish */
body {
	background:
		radial-gradient(60rem 30rem at 85% -10%, rgba(106, 61, 240, 0.1), transparent 60%),
		radial-gradient(40rem 24rem at -10% 10%, rgba(14, 154, 97, 0.06), transparent 60%),
		var(--bg);
	background-attachment: fixed;
}

h1 {
	font-weight: 800;
	letter-spacing: -0.04em;
}

.hl {
	background: linear-gradient(95deg, #6a3df0, #b04cf0 60%, #ef6aa8);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.1rem;
	padding: 0.35rem 0.85rem 0.35rem 0.45rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	box-shadow: var(--shadow);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--fg);
}

.eyebrow-dot {
	display: inline-grid;
	place-items: center;
	padding: 0.1rem 0.55rem;
	background: var(--accent-soft);
	color: var(--accent);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
}

.tabs {
	padding: 4px;
	background: var(--surface-2);
	border-radius: 999px;
	justify-self: start;
	max-width: 100%;
}

@media (min-width: 48rem) {
	.tabs {
		margin-left: 1rem;
		padding-left: 4px;
	}
}

.tab {
	min-height: 38px;
	padding: 0.35rem 1.1rem;
	border-radius: 999px;
	font-weight: 600;
}

.tab:hover {
	background: rgba(255, 255, 255, 0.6);
}

.tab-active,
.tab-active:hover {
	background: var(--surface);
	color: var(--accent);
	box-shadow: 0 1px 3px rgba(23, 21, 43, 0.1);
}

.balance-chip {
	padding: 0.35rem 1rem;
	background: var(--accent-soft);
	border: 0;
	border-radius: 999px;
	transition: transform 0.15s ease;
}

.balance-chip:hover {
	transform: translateY(-1px);
}

.balance-label {
	color: #6b5aa8;
}

.balance-value {
	color: var(--accent);
}

.btn {
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(106, 61, 240, 0.22);
	transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
	filter: none;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(106, 61, 240, 0.28);
}

.btn-secondary {
	background: var(--surface);
	box-shadow: var(--shadow);
}

.btn-secondary:hover {
	background: var(--surface);
	box-shadow: 0 10px 24px rgba(23, 21, 43, 0.1);
}

.btn-buy {
	box-shadow: 0 6px 18px rgba(14, 154, 97, 0.25);
}

.btn-sell {
	box-shadow: 0 6px 18px rgba(220, 68, 73, 0.25);
}

.btn-small {
	box-shadow: none;
}

.card {
	border-color: transparent;
	box-shadow: var(--shadow);
}

.card-head {
	padding: 1.1rem 1.25rem;
	border-bottom-color: var(--border);
}

.section-title {
	font-weight: 700;
}

.input,
.select,
.textarea {
	background: var(--bg);
	border-color: var(--border);
	border-radius: var(--radius-sm);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input:focus {
	background: var(--surface);
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
	outline: none;
}

.search .input {
	border-radius: 999px;
}

.hero {
	position: relative;
}

.movers {
	background: var(--surface);
	border: 0;
	box-shadow: var(--shadow-lg);
	padding: 1.4rem;
}

.mover {
	border-radius: 16px;
	transition: transform 0.15s ease, background 0.15s ease;
}

.mover:hover {
	border-color: transparent;
	background: var(--surface-2);
	transform: translateX(2px);
}

.table th {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.table th,
.table td {
	border-bottom-color: #f0eef6;
}

.table tbody tr:last-child td {
	border-bottom: 0;
}

.market-row td {
	padding-top: 0.85rem;
	padding-bottom: 0.85rem;
	transition: background 0.12s ease;
}

.market-row:hover td {
	background: #faf9fe;
}

.market-row .btn-small {
	background: var(--accent-soft);
	color: var(--accent);
}

.market-row:hover .btn-small {
	background: var(--accent);
	color: var(--accent-ink);
}

.pair-select option {
	background: #ffffff;
}

.seg,
.side-toggle {
	background: var(--surface-2);
	border: 0;
	border-radius: 999px;
}

.seg-btn,
.side {
	border-radius: 999px;
}

.seg-on {
	background: var(--surface);
	color: var(--accent);
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(23, 21, 43, 0.1);
}

.pct {
	border-radius: 999px;
	background: var(--surface-2);
	border-color: transparent;
	font-weight: 600;
}

.pct:hover {
	background: var(--accent-soft);
	border-color: transparent;
	color: var(--accent);
}

.book-spread {
	background: var(--surface-2);
	border-block: 0;
	font-weight: 500;
}

.chart-axis .last-tag {
	border-radius: 999px;
	padding: 0.05rem 0.45rem;
}

.form-done {
	border: 0;
	border-radius: var(--radius-sm);
}

.tag {
	border-radius: 999px;
}

.alert {
	background: var(--surface);
	border-radius: var(--radius-sm);
}

.badge {
	border-radius: 999px;
}

.footer {
	border-top: 0;
}

.footer p {
	text-align: center;
	max-width: 44rem;
}

/* Trusted exchange look */
body {
	background: var(--bg);
}

.statusbar {
	background: #120c2c;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.8125rem;
}

.statusbar-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	max-width: 88rem;
	margin: 0 auto;
	padding: 0.4rem var(--space);
}

@media (min-width: 48rem) {
	.statusbar-inner {
		padding: 0.4rem 1.5rem;
	}
}

.status-item {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.status-dot,
.live-dot {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2ee59d;
	box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.6);
	animation: live-pulse 2s ease-out infinite;
}

.status-dot-off {
	background: #ff8a8d;
	animation: none;
}

@keyframes live-pulse {
	70% {
		box-shadow: 0 0 0 7px rgba(46, 229, 157, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(46, 229, 157, 0);
	}
}

.hero {
	overflow: hidden;
	padding: 2rem 1.25rem;
	background:
		radial-gradient(40rem 22rem at 90% 0%, rgba(122, 82, 255, 0.45), transparent 60%),
		linear-gradient(135deg, #120c2c, #1f1450 55%, #2d1a78);
	border-radius: 28px;
	color: #ffffff;
	box-shadow: var(--shadow-lg);
}

@media (min-width: 60rem) {
	.hero {
		padding: 3.25rem 3rem;
	}
}

.hero h1 {
	font-size: clamp(2.1rem, 5.5vw, 3.6rem);
	color: #ffffff;
}

.hero .hl {
	background: none;
	color: #c6b6ff;
}

.hero .lede {
	color: rgba(255, 255, 255, 0.74);
}

.hero .eyebrow {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.14);
	box-shadow: none;
	color: rgba(255, 255, 255, 0.9);
	padding: 0.4rem 0.9rem;
	font-weight: 500;
}

.hero .btn {
	background: #ffffff;
	color: #1f1450;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hero .btn-secondary {
	background: transparent;
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.3);
	box-shadow: none;
}

.hero .btn-secondary:hover {
	background: rgba(255, 255, 255, 0.08);
}

.hero-copy :focus-visible,
.footer :focus-visible {
	outline-color: #ffffff;
}

.hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2.25rem;
	margin: 2rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stats dt {
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.6);
}

.hero-stats dd {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.hero .movers {
	color: var(--fg);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.trust {
	display: grid;
	gap: 1.25rem;
}

.trust-head {
	display: grid;
	gap: 0.35rem;
}

.trust-title {
	margin: 0;
	font-size: clamp(1.4rem, 3vw, 1.85rem);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.trust-grid {
	display: grid;
	gap: var(--space);
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.trust-card {
	padding: 1.4rem;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.trust-card h3 {
	margin: 1rem 0 0.35rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.trust-card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.trust-icon {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: var(--accent-soft);
	color: var(--accent);
}

.footer {
	margin-top: 1rem;
	background: #120c2c;
	color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
	display: grid;
	gap: 1rem;
	max-width: 88rem;
	margin: 0 auto;
	padding: 2.25rem var(--space) 2.5rem;
}

@media (min-width: 48rem) {
	.footer-inner {
		grid-template-columns: auto 1fr;
		align-items: center;
		padding: 2.5rem 1.5rem 3rem;
	}

	.footer-links {
		justify-self: end;
	}

	.footer-inner p {
		grid-column: 1 / -1;
	}
}

.footer-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.05rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.footer-links button {
	min-height: 40px;
	padding: 0.3rem 0.8rem;
	background: none;
	border: 0;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.75);
	font-weight: 500;
	cursor: pointer;
}

.footer-links button:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.08);
}

.footer .footer-inner p {
	max-width: none;
	margin: 0;
	padding: 1.25rem 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	text-align: left;
	color: rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
	.status-dot,
	.live-dot {
		animation: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.btn,
	.mover,
	.balance-chip {
		transition: none;
		transform: none !important;
	}
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
