/* ==========================================================================
   CryptoWatchHub — design system v1.1
   Token layer from crypto-platform-design-system (CoinGecko × Messari):
   purple brand, dark default, mono data font, glass header.
   Up/down direction is always color + ▲/▼ arrow (+ aria-label), never color alone.
   ========================================================================== */

:root {
	/* Brand: purple spectrum */
	--color-brand-300: #c4b5fd;
	--color-brand-400: #a78bfa;
	--color-brand-500: #8b5cf6;
	--color-brand-600: #7c3aed;
	--color-brand-700: #6d28d9;
	--color-brand-950: #3b0764;

	/* Market direction */
	--color-up-400: #34d399;
	--color-up-500: #10b981;
	--color-up-600: #059669;
	--color-down-400: #f87171;
	--color-down-500: #ef4444;
	--color-down-600: #dc2626;
	--color-warning-500: #f59e0b;

	/* Typography */
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', 'Cascadia Mono', 'Fira Code', 'SF Mono', Consolas, ui-monospace, monospace;
	--tracking-mono: -0.01em;

	/* Radius / motion / z */
	--radius-sm: 4px;
	--radius-md: 6px;
	--radius-lg: 8px;
	--radius-xl: 12px;
	--radius-full: 9999px;
	--duration-fast: 150ms;
	--duration-normal: 250ms;
	--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
	--z-sticky: 200;
	--header-height: 56px;

	/* ---- DARK THEME (default) ---- */
	--bg: #0a0e14;               /* surface-root */
	--bg-base: #0f1419;          /* surface-base */
	--bg-soft: #1a1f2e;          /* surface-raised */
	--card: #1e2433;             /* surface-card */
	--elevated: #252d3f;
	--glass: rgba(15, 20, 25, 0.85);
	--glass-border: rgba(255, 255, 255, 0.06);
	--border: rgba(255, 255, 255, 0.06);
	--border-strong: rgba(255, 255, 255, 0.1);
	--text: #f1f5f9;
	--muted: #94a3b8;
	--faint: #64748b;
	--accent: var(--color-brand-500);
	--accent-link: var(--color-brand-400);
	--accent-soft: rgba(139, 92, 246, 0.14);
	--accent-ink: #ffffff;
	--up: var(--color-up-400);
	--down: var(--color-down-400);
	--focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.25);
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow-lift: 0 10px 15px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.3);
	--shadow-glow-brand: 0 0 20px rgba(139, 92, 246, 0.25);
	color-scheme: dark;
}

html[data-theme="light"] {
	--bg: #f8fafc;
	--bg-base: #ffffff;
	--bg-soft: #f1f5f9;
	--card: #ffffff;
	--elevated: #e2e8f0;
	--glass: rgba(255, 255, 255, 0.85);
	--glass-border: rgba(0, 0, 0, 0.06);
	--border: rgba(0, 0, 0, 0.06);
	--border-strong: rgba(0, 0, 0, 0.12);
	--text: #0f1729;
	--muted: #475569;
	--faint: #94a3b8;
	--accent: var(--color-brand-600);
	--accent-link: var(--color-brand-600);
	--accent-soft: rgba(124, 58, 237, 0.1);
	--accent-ink: #ffffff;
	--up: var(--color-up-600);
	--down: var(--color-down-600);
	--focus-ring: 0 0 0 3px rgba(124, 58, 237, 0.18);
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	--shadow-lift: 0 10px 24px rgba(15, 23, 41, 0.1);
	--shadow-glow-brand: 0 0 20px rgba(124, 58, 237, 0.15);
	color-scheme: light;
}

/* ---------- Reset-ish ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; }
img[width][height] { height: auto; }

a { color: var(--accent-link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--text); margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(1.65rem, 3.2vw, 2.25rem); letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

button { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Utilities ---------- */

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section { margin: 40px auto; }
.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums lining-nums; letter-spacing: var(--tracking-mono); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	clip-path: inset(50%);
	overflow: hidden; white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important;
	top: 8px; left: 8px;
	width: auto; height: auto;
	clip-path: none;
	background: var(--card);
	color: var(--text);
	padding: 10px 14px;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lift);
	z-index: 600;
}

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.sec-head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; margin: 0 0 16px;
}
.sec-head h2, .sec-title { margin: 0; }
.sec-title { margin: 28px 0 14px; }

/* ---------- Buttons, badges, chips ---------- */

.btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 14px;
	border-radius: var(--radius-lg);
	border: 1px solid transparent;
	font-weight: 600; font-size: 0.9rem;
	cursor: pointer; text-decoration: none !important;
	transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
	background: transparent;
}
.btn-primary { background: var(--color-brand-600); color: var(--accent-ink); }
.btn-primary:hover { background: var(--color-brand-500); box-shadow: var(--shadow-glow-brand); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-link); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:active { transform: translateY(1px); }

.badge {
	display: inline-flex; align-items: center;
	padding: 2px 9px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-full);
	background: var(--bg-soft);
	color: var(--muted);
	font-size: 0.72rem; font-weight: 600;
	letter-spacing: 0.02em; text-transform: uppercase;
}
.badge-cat {
	color: var(--accent-link);
	border-color: transparent;
	background: var(--accent-soft);
	text-decoration: none !important;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.coin-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-full);
	background: var(--card);
	color: var(--text);
	font-size: 0.85rem; font-weight: 600;
	text-decoration: none !important;
	transition: border-color var(--duration-fast) var(--ease-standard);
}
.coin-chip:hover { border-color: var(--accent); }
.coin-chip img { border-radius: 50%; }

/* ---------- Percent chips & sparklines ---------- */

.pct { font-weight: 650; white-space: nowrap; }
.pct.up { color: var(--up); }
.pct.down { color: var(--down); }
.pct-na { color: var(--faint); }
.pct .tri { font-size: 0.62em; vertical-align: 12%; margin-right: 2px; }

.cwh-spark { width: 132px; height: 40px; display: block; }
.cwh-spark.up { color: var(--up); }
.cwh-spark.down { color: var(--down); }

/* ---------- Cards & tiles ---------- */

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 20px;
	box-shadow: var(--shadow);
}

.cwh-empty { text-align: center; color: var(--muted); padding: 44px 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-tile {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 14px 16px;
	display: flex; flex-direction: column; gap: 3px;
	box-shadow: var(--shadow);
}
.stat-tile .k {
	color: var(--muted);
	font-size: 0.7rem; font-weight: 650;
	text-transform: uppercase; letter-spacing: 0.05em;
}
.stat-tile .v { font-size: 1.5rem; font-weight: 700; }

.supply-bar {
	display: block; height: 4px; margin-top: 6px;
	background: var(--bg-soft);
	border-radius: var(--radius-full); overflow: hidden;
}
.supply-bar span { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-full); }

/* ---------- Global stats ticker ---------- */

.cwh-ticker {
	background: var(--bg-base);
	border-bottom: 1px solid var(--border);
	font-size: 0.76rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.cwh-ticker::-webkit-scrollbar { display: none; }
.cwh-ticker-in {
	max-width: 1280px; margin: 0 auto; padding: 7px 20px;
	display: flex; gap: 22px; white-space: nowrap;
}
.cwh-ticker .k { color: var(--muted); }
.cwh-ticker .v { font-weight: 650; }
.cwh-ticker a { color: inherit; }

/* ---------- Header (glass) ---------- */

.site-header {
	position: sticky; top: 0; z-index: var(--z-sticky);
	background: var(--glass);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--glass-border);
}
.header-in { display: flex; align-items: center; gap: 26px; height: var(--header-height); }

.brand {
	display: inline-flex; align-items: center; gap: 9px;
	color: var(--text); text-decoration: none !important;
}
.brand-mark { color: var(--accent); flex: none; }
.brand-word { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-word b { color: var(--accent-link); }

.site-nav { flex: 1; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
	display: block; padding: 7px 12px;
	color: var(--muted); font-weight: 600; font-size: 0.92rem;
	border-radius: var(--radius-lg); text-decoration: none !important;
	transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
}
.nav-list a:hover { color: var(--text); background: var(--bg-soft); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { color: var(--accent-link); }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px;
	border: none; background: transparent;
	border-radius: var(--radius-lg); cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }

html[data-theme="light"] .ico-sun { display: none; }
html[data-theme="dark"] .ico-moon { display: none; }

.nav-burger { display: none; }

.header-search { border-top: 1px solid var(--border); background: var(--bg-base); padding: 12px 0; }
.header-search form, .search-again { display: flex; gap: 10px; max-width: 640px; }
.header-search input, .search-again input {
	flex: 1; padding: 9px 14px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-lg);
	background: var(--card); color: var(--text);
	font: inherit;
}
.header-search input:focus-visible, .search-again input:focus-visible { border-color: var(--accent); }
.search-again { margin: 18px 0; }

/* ---------- Hero ---------- */

.hero {
	padding: 44px 0 8px;
	background:
		radial-gradient(60% 120% at 15% 0%, var(--accent-soft) 0%, transparent 60%),
		radial-gradient(40% 90% at 90% 10%, rgba(52, 211, 153, 0.06) 0%, transparent 60%);
}
.hero h1 { margin-bottom: 8px; }
.hero-sub { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin-bottom: 26px; }
.hero-tiles { margin-bottom: 10px; }

.cta-band {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; padding: 28px;
	background: linear-gradient(120deg, var(--accent-soft), var(--card) 70%);
}
.cta-band h2 { margin-bottom: 4px; }
.cta-band p { margin: 0; }
.cta-actions { display: flex; gap: 10px; flex: none; }

/* ---------- Mini cards (trending / gainers / losers) ---------- */

.mini-card { padding: 16px 18px; }
.mini-card h3 {
	margin: 0 0 8px;
	font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em;
	color: var(--muted);
}
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li a {
	display: flex; align-items: center; gap: 9px;
	padding: 7px 8px; margin: 0 -8px;
	border-radius: var(--radius-lg);
	color: var(--text); text-decoration: none !important;
	font-size: 0.9rem;
}
.mini-list li a:hover { background: var(--bg-soft); }
.mini-list img { border-radius: 50%; flex: none; }
.mini-rank { width: 14px; flex: none; font-size: 0.78rem; }
.mini-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sym { font-size: 0.76rem; }
.mini-right { margin-left: auto; }

/* ---------- Market table ---------- */

.cwh-tablewrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.cwh-table-tools {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	padding: 14px 16px; border-bottom: 1px solid var(--border);
	flex-wrap: wrap;
}
.cwh-filter {
	padding: 8px 13px; min-width: 260px;
	border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
	background: var(--bg-base); color: var(--text); font: inherit;
}
.cwh-table-note { color: var(--faint); font-size: 0.76rem; }

.cwh-scroll { overflow-x: auto; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.cwh-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 0.88rem; }
.cwh-table th {
	position: sticky; top: 0; z-index: 2;
	background: var(--card);
	color: var(--muted);
	font-size: 0.7rem; font-weight: 650;
	text-transform: uppercase; letter-spacing: 0.05em;
	text-align: left;
	padding: 11px 14px;
	border-bottom: 1px solid var(--border-strong);
	white-space: nowrap;
}
.cwh-table th.sortable { cursor: pointer; user-select: none; }
.cwh-table th.sortable:hover { color: var(--text); }
.cwh-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cwh-table tbody tr:last-child td { border-bottom: none; }
.cwh-table tbody tr { transition: background var(--duration-fast) var(--ease-standard); }
.cwh-table tbody tr:hover { background: var(--bg-soft); box-shadow: inset 2px 0 0 var(--color-brand-500); }
.cwh-table .num, .cwh-table th.num { text-align: right; }
.cwh-table td:first-child, .cwh-table th:first-child { padding-left: 18px; }

.coin-cell {
	display: flex; align-items: center; gap: 9px;
	color: var(--text); text-decoration: none !important; font-weight: 600;
	font-family: var(--font-sans);
}
.coin-cell img { border-radius: 50%; flex: none; }
.coin-cell:hover .coin-name { color: var(--accent-link); }
.coin-sym { color: var(--faint); font-size: 0.76rem; font-weight: 600; }
.sparkcell { width: 148px; }

.cwh-pager {
	display: flex; align-items: center; justify-content: center; gap: 16px;
	padding: 14px; border-top: 1px solid var(--border);
}
.pager-info { color: var(--muted); font-size: 0.85rem; }

/* ---------- Tools ---------- */

.tool-card {
	display: block; color: var(--text); text-decoration: none !important;
	transition: transform var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-glow-brand); }
.tool-ico { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.tool-card h3 { margin-bottom: 6px; }
.tool-card p { margin: 0; font-size: 0.88rem; }

.learn-card { display: block; color: var(--text); text-decoration: none !important; transition: border-color var(--duration-fast) var(--ease-standard); }
.learn-card:hover { border-color: var(--accent); }
.post-mini { display: block; color: var(--text); text-decoration: none !important; }
.post-mini:hover { border-color: var(--accent); }
.post-mini h3 { font-size: 0.98rem; }

/* ---------- Converter ---------- */

.conv-grid {
	display: grid; grid-template-columns: 1fr auto 1fr;
	gap: 14px; align-items: end;
}
.conv-side { display: flex; flex-direction: column; gap: 8px; }
.conv-side label { font-size: 0.76rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.conv-side input, .conv-side select {
	padding: 11px 13px;
	border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
	background: var(--bg-base); color: var(--text);
	font: inherit; font-size: 1.05rem; width: 100%;
}
.conv-side input { font-family: var(--font-mono); }
.conv-swap { align-self: center; margin-bottom: 4px; font-size: 1.1rem; }
.conv-note { margin: 12px 0 0; font-size: 0.85rem; font-family: var(--font-mono); }

/* ---------- Page two-column layout + info sidebar ---------- */

.page-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 34px;
	align-items: start;
	margin-top: 6px;
}
.page-main { min-width: 0; }
.page-aside {
	position: sticky; top: 76px;
	display: flex; flex-direction: column; gap: 16px;
}
.aside-card { padding: 16px 18px; }
.aside-title {
	font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
	color: var(--muted); margin: 0 0 12px;
}
.aside-coins { list-style: none; margin: 0 0 12px; padding: 0; }
.aside-coins li a {
	display: flex; align-items: center; gap: 8px;
	padding: 8px; margin: 0 -8px;
	border-radius: var(--radius-lg);
	color: var(--text); text-decoration: none !important;
	font-size: 0.9rem;
}
.aside-coins li a:hover { background: var(--bg-soft); }
.aside-coins img { border-radius: 50%; flex: none; }
.aside-coins .ac-sym { font-weight: 700; }
.aside-coins .ac-price { margin-left: auto; font-weight: 650; }
.aside-coins .ac-chg { min-width: 62px; text-align: right; }
.aside-coins .ac-fng { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.aside-coins .ac-fng .ac-price { margin-left: auto; }
.aside-btn { display: block; text-align: center; width: 100%; }
.aside-links { list-style: none; margin: 0; padding: 0; }
.aside-links li a {
	display: flex; align-items: center; gap: 10px;
	padding: 9px 0;
	color: var(--text); text-decoration: none !important;
	font-weight: 600; font-size: 0.92rem;
	border-bottom: 1px solid var(--border);
}
.aside-links li:last-child a { border-bottom: none; }
.aside-links li a:hover { color: var(--accent-link); }
.aside-links .al-ico { width: 20px; text-align: center; }
.aside-links [aria-current] { color: var(--accent-link); }
.aside-cta .muted { font-size: 0.86rem; margin: 0 0 14px; }
.aside-cta-btns { display: flex; gap: 8px; }
.aside-cta-btns .btn { flex: 1; justify-content: center; }

/* ---------- Fear & Greed ---------- */

.cwh-fng { padding: 26px 28px; }
.fng-top {
	display: flex; align-items: center; gap: 36px; flex-wrap: wrap;
	padding-bottom: 22px;
}
.cwh-gauge { width: 320px; max-width: 100%; color: var(--text); flex: none; }
.fng-now { flex: 1; min-width: 200px; }
.fng-value { font-size: 4rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.fng-label { font-size: 1.35rem; font-weight: 700; margin: 6px 0 4px; }
.fng-legend {
	display: flex; flex-wrap: wrap; gap: 8px;
	padding: 20px 0 4px; border-top: 1px solid var(--border);
}
.fng-seg {
	display: flex; align-items: center; gap: 7px;
	font-size: 0.78rem; color: var(--muted);
}
.fng-seg .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.fng-hist { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.fng-chip {
	flex: 1; min-width: 120px;
	display: flex; flex-direction: column; gap: 3px;
	padding: 12px 16px;
	border: 1px solid var(--border); border-radius: var(--radius-lg);
	background: var(--bg-soft);
	font-size: 0.82rem;
}
.fng-chip strong { font-size: 1.25rem; font-family: var(--font-mono); }

/* ---------- Halving ---------- */

.halv-count { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.halv-cell {
	flex: 1; min-width: 90px;
	display: flex; flex-direction: column; align-items: center; gap: 2px;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 14px 8px;
}
.halv-num { font-size: 1.9rem; font-weight: 800; }
.halv-bar {
	height: 8px; background: var(--bg-soft);
	border-radius: var(--radius-full); overflow: hidden;
	border: 1px solid var(--border);
}
.halv-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--color-brand-600), var(--color-brand-400)); }
.halv-stats {
	display: grid; grid-template-columns: repeat(4, 1fr);
	gap: 14px; margin: 18px 0 8px;
}
.halv-stats > div { display: flex; flex-direction: column; gap: 2px; font-size: 0.95rem; }
.halv-stats .muted { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Coin page ---------- */

.coin-page { padding-top: 22px; }
.coin-hero { margin: 14px 0 22px; }
.coin-idline { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.coin-idline img { border-radius: 50%; }
.coin-idline h1 { margin: 0; }
.coin-idline .coin-sym { font-size: 1rem; }
.coin-priceline { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; }
.coin-price { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
.coin-priceline .pct { font-size: 1.05rem; }
.coin-spark-big { margin-top: 14px; max-width: 660px; }
.coin-spark-big svg { width: 100%; height: 96px; }
.coin-spark-big .muted { display: block; margin-top: 2px; }

.coin-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; margin: 26px 0; align-items: start; }
.coin-main, .coin-side { display: flex; flex-direction: column; gap: 18px; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid var(--border); }
.link-list li:last-child { border-bottom: none; }
.link-list a { display: block; padding: 9px 0; font-weight: 600; }

.cwh-buybox h2 { font-size: 1.1rem; }
.buy-list { list-style: none; margin: 0 0 12px; padding: 0; }
.buy-list li {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 11px 0; border-bottom: 1px solid var(--border);
}
.buy-list li:last-child { border-bottom: none; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
	cursor: pointer; font-weight: 650;
	padding: 13px 0; list-style-position: outside;
}
.faq-item summary:hover { color: var(--accent-link); }
.faq-item p { padding: 0 0 14px; margin: 0; color: var(--muted); }

.disclaimer-box {
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius-lg);
	padding: 14px 18px;
	color: var(--muted); font-size: 0.85rem;
	margin: 26px 0;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
	display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
	font-size: 0.82rem; color: var(--faint);
	margin: 18px 0 14px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 600; }

/* ---------- Pages & prose ---------- */

.page-wrap { padding-bottom: 40px; }
.page-title { margin-top: 18px; }

.prose { font-size: 1rem; line-height: 1.75; }
.prose > p, .prose > h2, .prose > h3, .prose > ul, .prose > ol, .prose > blockquote { max-width: 760px; }
.page-body > p, .page-body > h2, .page-body > h3, .page-body > ul, .page-body > ol { max-width: 760px; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose a { text-decoration: underline; text-decoration-color: var(--accent-soft); text-underline-offset: 2px; }
.prose blockquote {
	margin: 1.2em 0; padding: 4px 20px;
	border-left: 3px solid var(--accent);
	background: var(--bg-soft); border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
	color: var(--muted);
}
.prose code {
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm); padding: 1px 6px;
	font-size: 0.88em;
	font-family: var(--font-mono);
}
.prose img { border-radius: var(--radius-lg); }
.prose table { border-collapse: collapse; width: 100%; }
.prose table td, .prose table th { border: 1px solid var(--border); padding: 8px 12px; }

/* ---------- Articles ---------- */

.article-head { max-width: 800px; margin: 6px 0 20px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.88rem; margin-top: 10px; }
.article-hero { margin: 0 0 24px; max-width: 980px; }
.article-hero img { border-radius: 14px; }
.article-body { max-width: 760px; }

.post-grid .post-card { padding: 0; overflow: hidden; }
.post-card { position: relative; transition: border-color var(--duration-fast) var(--ease-standard); }
.post-card:hover { border-color: var(--accent); }
.post-card-link { color: var(--text); text-decoration: none !important; }
.post-card-link::after { content: ""; position: absolute; inset: 0; }
.post-card .badge-cat { position: relative; z-index: 2; }
.post-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { padding: 16px 18px 18px; }
.post-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
.post-card h3 { font-size: 1.02rem; margin-bottom: 7px; }
.post-card h3 a:hover { color: var(--accent-link); }
.post-card p { margin: 0; font-size: 0.88rem; }

.cat-pills { margin: 16px 0 4px; }

/* ---------- Glossary ---------- */

.az-nav {
	display: flex; flex-wrap: wrap; gap: 6px;
	margin: 18px 0 6px;
	position: sticky; top: var(--header-height); z-index: 5;
	background: var(--bg); padding: 10px 0;
	border-bottom: 1px solid var(--border);
}
.az-nav a {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 30px; height: 30px; padding: 0 6px;
	border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
	color: var(--muted); font-weight: 700; font-size: 0.85rem;
	text-decoration: none !important;
	font-family: var(--font-mono);
}
.az-nav a:hover { border-color: var(--accent); color: var(--accent-link); }

.az-group { margin: 26px 0; scroll-margin-top: 120px; }
.az-letter {
	font-size: 1rem; color: var(--accent-link);
	border-bottom: 1px solid var(--border);
	padding-bottom: 6px; margin-bottom: 14px;
	font-family: var(--font-mono);
}
.term-card { display: block; color: var(--text); text-decoration: none !important; padding: 16px 18px; transition: border-color var(--duration-fast) var(--ease-standard); }
.term-card:hover { border-color: var(--accent); }
.term-card h3 { margin-bottom: 5px; font-size: 0.98rem; }
.term-card p { margin: 0; font-size: 0.85rem; }

.term-single { max-width: 760px; }
.term-tldr {
	font-size: 1.12rem; color: var(--muted);
	border-left: 3px solid var(--accent);
	padding-left: 16px; margin: 14px 0 20px;
}

/* ---------- Search ---------- */

.search-results { display: flex; flex-direction: column; gap: 12px; max-width: 800px; }
.search-hit { display: block; color: var(--text); text-decoration: none !important; transition: border-color var(--duration-fast) var(--ease-standard); }
.search-hit:hover { border-color: var(--accent); }
.search-hit h2 { font-size: 1.08rem; margin: 8px 0 6px; }
.search-hit p { margin: 0; font-size: 0.9rem; }
.error-404 { max-width: 620px; margin: 60px auto; }
.error-404 .search-again { justify-content: center; }

/* ---------- Pagination (WP core) ---------- */

.pagination { margin: 28px 0; }
.pagination .nav-links { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 10px;
	border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
	color: var(--muted); font-weight: 600; text-decoration: none !important;
	font-family: var(--font-mono);
}
.pagination .page-numbers.current { background: var(--color-brand-600); border-color: var(--color-brand-600); color: var(--accent-ink); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--accent); color: var(--accent-link); }

/* ---------- Footer ---------- */

.site-footer {
	margin-top: 56px;
	background: var(--bg-base);
	border-top: 1px solid var(--border);
	padding: 44px 0 0;
	font-size: 0.9rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
	gap: 28px;
	padding-bottom: 32px;
}
.footer-brand p { margin-top: 12px; max-width: 300px; }
.footer-col h2 {
	font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
	color: var(--faint); margin-bottom: 12px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a {
	display: block; padding: 4px 0;
	color: var(--muted); text-decoration: none !important;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
	display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	padding: 16px 0 22px;
	border-top: 1px solid var(--border);
	font-size: 0.8rem; color: var(--faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.stat-grid { grid-template-columns: repeat(2, 1fr); }
	.grid4 { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
	.halv-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
	.nav-burger { display: inline-flex; }
	.site-nav {
		display: none;
		position: absolute; top: var(--header-height); left: 0; right: 0;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		box-shadow: var(--shadow-lift);
		padding: 10px 20px 16px;
	}
	.nav-open .site-nav { display: block; }
	.nav-list { flex-direction: column; gap: 2px; }
	.coin-cols { grid-template-columns: 1fr; }
	.cta-band { flex-direction: column; align-items: flex-start; }
	.page-layout { grid-template-columns: 1fr; gap: 24px; }
	.page-aside { position: static; }
}

@media (max-width: 768px) {
	.grid3 { grid-template-columns: 1fr; }
	.conv-grid { grid-template-columns: 1fr; }
	.conv-swap { justify-self: center; transform: rotate(90deg); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.hero { padding-top: 30px; }
	.cwh-table-tools { flex-direction: column; align-items: stretch; }
	.cwh-filter { min-width: 0; }
}

@media (max-width: 560px) {
	.grid4 { grid-template-columns: 1fr; }
	.stat-grid { grid-template-columns: 1fr 1fr; }
	.stat-tile .v { font-size: 1.05rem; }
	.footer-grid { grid-template-columns: 1fr; }
	.brand-word { font-size: 1rem; }
	.halv-num { font-size: 1.4rem; }
	.fng-top { gap: 16px; }
}

/* ---------- Motion & forced colors ---------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (forced-colors: active) {
	.pct.up::after { content: " (up)"; }
	.pct.down::after { content: " (down)"; }
}
