/* Coinbell — design system */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0d10;
  --bg-2: #0e1014;
  --surface: #121519;
  --surface-2: #171a1f;
  --surface-3: #1e2228;
  --border: #23272e;
  --border-strong: #31363e;
  --text: #eceef1;
  --text-2: #b1b6bf;
  --muted: #8a909a;
  --accent: #fdb52b;
  --accent-hover: #fdc23f;
  --accent-text: #fdbc3a;
  --brand-grad: linear-gradient(135deg, #fdd331 0%, #fdaf29 52%, #fd8a1c 100%);
  --accent-ink: #1a1305;
  --accent-soft: rgba(253, 181, 43, 0.12);
  --up: #3ccf8e;
  --up-soft: rgba(60, 207, 142, 0.11);
  --down: #f0616d;
  --down-soft: rgba(240, 97, 109, 0.11);
  --info: #8fa6c4;
  --info-soft: rgba(143, 166, 196, 0.12);
  --shadow: none;
  --shadow-lg: 0 24px 60px -20px rgba(2, 4, 8, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.02);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --header-h: 60px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --z-header: 40; --z-dropdown: 50; --z-cookie: 150; --z-toast: 200;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-2: #eceef1;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --border: #e2e5e9;
  --border-strong: #cdd2d9;
  --text: #111317;
  --text-2: #3a3f48;
  --muted: #5d636d;
  --accent: #f5a524;
  --accent-hover: #ee9a14;
  --accent-text: #b45309;
  --brand-grad: linear-gradient(135deg, #fdc93a 0%, #fba825 52%, #f7861c 100%);
  --accent-ink: #1a1305;
  --accent-soft: rgba(234, 169, 44, 0.14);
  --up: #0f9a5c;
  --up-soft: rgba(15, 154, 92, 0.09);
  --down: #d93a48;
  --down-soft: rgba(217, 58, 72, 0.08);
  --info: #5b6f8c;
  --info-soft: rgba(91, 111, 140, 0.1);
  --shadow: 0 1px 2px rgba(17, 19, 23, 0.04);
  --shadow-lg: 0 24px 60px -24px rgba(17, 19, 23, 0.28), 0 0 0 1px rgba(17, 19, 23, 0.04);
  color-scheme: light;
}

*, *::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: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
/* Fine grain so large dark areas don't feel flat */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
:root[data-theme="light"] body::after { opacity: 0.035; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p a, .prose a, .link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font-weight: 500; }
p a:hover, .prose a:hover, .link:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; font-weight: 640; text-wrap: balance; }
h1 { font-size: clamp(32px, 4.4vw, 58px); letter-spacing: -0.04em; font-weight: 660; line-height: 1.04; }
h2 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.03em; }
h3 { font-size: 16.5px; font-weight: 620; letter-spacing: -0.015em; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: clamp(16px, 3.2vw, 48px); padding-right: clamp(16px, 3.2vw, 48px); }
@media (min-width: 1800px) { .container { max-width: 1640px; } }
@media (min-width: 2200px) { .container { max-width: 1960px; } body { font-size: 16px; } }
.section { margin-top: 28px; }
.section-lg { margin-top: 88px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); height: var(--header-h); border-bottom: 1px solid var(--border); }
/* Blur on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile menu */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 680; font-size: 17px; letter-spacing: -0.03em; flex-shrink: 0; }
.brand { gap: 8px; }
.brand-mark { width: auto; height: 28px; }
.brand-word { width: auto; height: 21px; margin-top: 1px; }
:root[data-theme="light"] .brand-word.on-dark, :root:not([data-theme="light"]) .brand-word.on-light { display: none; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav > a { position: relative; padding: 8px 11px; color: var(--muted); font-weight: 500; font-size: 14px; transition: color .15s; white-space: nowrap; }
.nav > a:hover { color: var(--text); }
.nav > a.active { color: var(--text); }
.nav > a.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -11px; height: 2px; background: var(--accent); border-radius: 2px; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: transparent; color: var(--text-2); transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; }
.nav-mobile-extra { display: none; }

.cur-select { height: 34px; padding: 0 26px 0 10px; border-radius: 9px; border: 1px solid var(--border); background-color: transparent; font-family: var(--mono); font-size: 13px; color: var(--text-2); appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237f858e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.cur-select:hover { border-color: var(--border-strong); color: var(--text); }
.cur-select option { background: var(--surface); color: var(--text); }

/* Theme switch: sun/moon, knob slides under the active mode */
.theme-switch { position: relative; width: 60px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: space-between; padding: 0 8px; border-radius: 9px; border: 1px solid var(--border); background: transparent; transition: border-color .15s; }
.theme-switch:hover { border-color: var(--border-strong); }
.ts-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 6px; background: var(--surface-3); box-shadow: 0 0 0 1px var(--border-strong); transition: transform .26s cubic-bezier(.3, 1.3, .6, 1); }
:root[data-theme="dark"] .ts-knob { transform: translateX(28px); }
.ts-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 14px; height: 14px; color: var(--muted); transition: color .2s, transform .3s; }
.ts-icon svg { width: 14px; height: 14px; }
:root[data-theme="light"] .ts-sun { color: var(--accent-text); transform: rotate(45deg); }
:root[data-theme="dark"] .ts-moon { color: var(--accent); }
:root[data-theme="dark"] .ts-moon svg { fill: currentColor; }

.user-menu { position: relative; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border-radius: 10px; border: 1px solid var(--border); background: transparent; font-weight: 550; font-size: 14px; transition: border-color .15s, background .15s; }
.user-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.user-chip .name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 248px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: var(--z-dropdown); transform-origin: top right; animation: ddIn .14s ease-out; }
/* Transform only: animating opacity inside the blurred (backdrop-filter) header leaves Chrome painting menus see-through. */
@keyframes ddIn { from { transform: translateY(-4px) scale(.98); } to { transform: none; } }
.dropdown-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; min-width: 0; }
.dropdown-head > div { min-width: 0; }
.dropdown-head strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 0; background: none; text-align: left; font-size: 14px; color: var(--text-2); transition: background .12s, color .12s; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--text); }
.dropdown a svg, .dropdown button svg { width: 16px; height: 16px; color: var(--muted); }
.dropdown hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* Nav dropdowns (Tools, Learn) */
.nav-group { position: relative; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 11px; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; transition: color .15s; }
.nav-dd-btn svg { width: 13px; height: 13px; transition: transform .15s; }
.nav-dd-btn:hover, .nav-dd-btn.active, .nav-dd-btn[aria-expanded="true"] { color: var(--text); }
.nav-dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dd { position: absolute; top: calc(100% + 12px); left: -8px; width: 540px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; z-index: var(--z-dropdown); animation: ddIn .14s ease-out; }
.nav-dd.narrow { width: 300px; grid-template-columns: 1fr; }
@media (min-width: 1021px) { .nav-dd::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } } /* keeps hover alive across the gap */
.nav-dd a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 9px; color: var(--text); font-size: 14px; font-weight: 550; transition: background .12s; }
.nav-dd a span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.nav-dd a:hover, .nav-dd a.current { background: var(--surface-2); }
.nav-dd a.current { box-shadow: inset 2px 0 0 var(--accent); }

/* Avatars: rounded squares, emoji / initial / photo */
.avatar { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; flex-shrink: 0; overflow: hidden; background: var(--accent); color: #14100a; font-weight: 650; font-size: 13px; line-height: 1; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-emoji { font-size: 16px; }
.avatar-md { width: 40px; height: 40px; border-radius: 11px; font-size: 17px; }
.avatar-md.is-emoji { font-size: 22px; }
.avatar-lg { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
.avatar-lg.is-emoji { font-size: 30px; }
.avatar-xl { width: 104px; height: 104px; border-radius: 26px; font-size: 42px; }
.avatar-xl.is-emoji { font-size: 56px; }

/* ---------- Ticker tape ---------- */
.ticker { border-bottom: 1px solid var(--border); background: var(--bg-2); height: 34px; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; gap: 34px; width: max-content; height: 100%; align-items: center; padding-left: 34px; animation: tick 90s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; gap: 8px; align-items: baseline; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.ticker-item b { color: var(--text-2); font-weight: 550; }
.ticker-item span:first-of-type { color: var(--text); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 560; font-size: 14.5px; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s, color .15s; user-select: none; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.985); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand-grad); color: #1d1300; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .25); font-weight: 600; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.05) saturate(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 18px -6px rgba(253, 140, 30, .55); }
.btn-primary:focus-visible { outline-color: #fd8a1c; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 55%, var(--border-strong)); background: var(--surface-2); }
.btn-subtle { background: transparent; color: var(--text-2); }
.btn-subtle:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--down); border-color: color-mix(in srgb, var(--down) 35%, transparent); }
.btn-danger:hover:not(:disabled) { background: var(--down-soft); }
.btn-telegram { background: #229ed9; color: #fff; }
.btn-telegram:hover:not(:disabled) { background: #1c8cc2; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google:hover:not(:disabled) { background: #f6f7f8; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn .spinner { width: 16px; height: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; color: var(--text); border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; transition: border-color .15s, color .15s; }
.text-link:hover { border-color: var(--accent); color: var(--accent-text); }
.text-link svg { width: 15px; height: 15px; transition: transform .15s; }
.text-link:hover svg { transform: translateX(2px); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card-tight { padding: 16px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 10px; }
.card-link { font-size: 13.5px; font-weight: 550; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; transition: color .15s; }
.card-link:hover { color: var(--accent-text); }
.card-hover { transition: border-color .15s, background .15s; }
.card-hover:hover { border-color: var(--border-strong); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 var(--up); animation: pulse 2.2s infinite; flex-shrink: 0; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge-pro { background: var(--brand-grad); color: var(--accent-ink); font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; height: 19px; padding: 0 6px; border-radius: 4px; }
.badge-up { background: var(--up-soft); color: var(--up); }
.badge-down { background: var(--down-soft); color: var(--down); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }

.chg { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .95em; }
.chg.up::before { content: "+"; }
.chg.down::before { content: "−"; }
.chg-pill { padding: 2px 7px; border-radius: 6px; }
.chg-pill.up { background: var(--up-soft); }
.chg-pill.down { background: var(--down-soft); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; padding-top: clamp(40px, 6vw, 84px); padding-bottom: 8px; }
.hero h1 { margin: 16px 0 18px; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.lead { font-size: 17.5px; color: var(--text-2); max-width: 54ch; line-height: 1.6; }
.hero-cta { display: flex; gap: 20px; margin-top: 30px; flex-wrap: wrap; align-items: center; }
.hero-points { display: flex; gap: 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points svg { width: 15px; height: 15px; color: var(--accent); }

.page-head { padding-top: clamp(32px, 4.5vw, 56px); padding-bottom: 8px; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 46px); margin-top: 10px; max-width: 22ch; }
.page-head .lead { margin-top: 14px; }

/* ---------- Stats ---------- */
.stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-value { font-family: var(--mono); font-size: 24px; font-weight: 560; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub { font-size: 13px; color: var(--muted); }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat-strip > .stat { padding: 20px 22px; border-left: 1px solid var(--border); }
.stat-strip > .stat:first-child { border-left: 0; }

/* ---------- Gauge ---------- */
.gauge-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge { width: 100%; max-width: 250px; }
.gauge-value { font-family: var(--mono); font-size: 46px; font-weight: 600; margin-top: -64px; letter-spacing: -0.05em; }
.gauge-label { font-weight: 600; font-size: 15px; margin-top: 2px; }
.gauge-history { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; gap: 8px; }
.gauge-history div { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.gauge-history strong { font-family: var(--mono); color: var(--text); font-size: 15px; font-weight: 560; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td.num, td .num { font-size: 13.5px; }
th.r, td.r { text-align: right; }
th.c, td.c { text-align: center; }
.th-sort { cursor: pointer; user-select: none; }
.th-sort:hover { color: var(--text); }
.coin-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.coin-cell img { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); }
.coin-cell .coin-name { font-weight: 560; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.coin-cell .coin-sym { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.rank { color: var(--muted); font-size: 12.5px; width: 36px; font-family: var(--mono); }
.spark { display: block; }
.flash-up { animation: flashUp 1.2s; }
.flash-down { animation: flashDown 1.2s; }
@keyframes flashUp { from { background: var(--up-soft); } to { background: transparent; } }
@keyframes flashDown { from { background: var(--down-soft); } to { background: transparent; } }
.bell-btn, .star-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; transition: color .15s, background .15s, transform .15s; }
.bell-btn:hover { color: var(--accent-text); background: var(--accent-soft); }
.star-btn:hover { color: var(--accent-text); }
.star-btn[aria-pressed="true"] { color: var(--accent); }
.star-btn[aria-pressed="true"] svg { fill: currentColor; }
.star-btn:active { transform: scale(.85); }
.bell-btn svg, .star-btn svg { width: 16px; height: 16px; }

/* ---------- Toolbar / controls ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 520; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
.seg-block { display: flex; }
.seg-block button { flex: 1; justify-content: center; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button, .tabs a { position: relative; padding: 12px 0; border: 0; background: none; color: var(--muted); font-weight: 520; font-size: 14.5px; white-space: nowrap; }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs [aria-selected="true"] { color: var(--text); }
.tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.tabs .count { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 6px; }

.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 34px; width: 240px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13.5px; font-weight: 550; color: var(--text-2); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field-hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea { height: 40px; width: 100%; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: 14.5px; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--down); }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f858e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .prefix, .input-group .suffix { position: absolute; color: var(--muted); font-weight: 500; font-size: 14px; pointer-events: none; }
.input-group .prefix { left: 12px; }
.input-group .suffix { right: 12px; }
.input-group .prefix ~ .input { padding-left: 28px; }
.input-group .input:has(~ .suffix) { padding-right: 52px; }
.input-group .reveal { position: absolute; right: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 12.5px; }
.input-group .reveal:hover { color: var(--text); background: var(--surface-3); }
.input-group .input:has(~ .reveal) { padding-right: 56px; }
.form-error { color: var(--down); font-size: 13.5px; background: var(--down-soft); border-radius: 8px; padding: 9px 12px; }
.form-ok { color: var(--up); font-size: 13.5px; background: var(--up-soft); border-radius: 8px; padding: 9px 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-2); font-weight: 520; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-text); }
.chips-mono .chip { font-family: var(--mono); font-size: 12.5px; }

.switch { position: relative; width: 40px; height: 23px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(17px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .45; }

/* ---------- Charts ---------- */
.chart { position: relative; width: 100%; touch-action: pan-y; }
.chart svg { display: block; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .grid line { stroke: var(--border); stroke-dasharray: 2 4; }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 11px; font-size: 12.5px; box-shadow: var(--shadow-lg); min-width: 150px; z-index: 5; transform: translate(-50%, 0); white-space: nowrap; }
.chart-tip .tip-date { color: var(--muted); margin-bottom: 4px; }
.chart-tip .tip-row { display: flex; justify-content: space-between; gap: 14px; font-family: var(--mono); }
.chart-tip .tip-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; }
.chart-empty { display: grid; place-items: center; height: 100%; min-height: 200px; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }

/* ---------- Pro lock ---------- */
.cells > .span-all { grid-column: 1 / -1; padding: 0; }
.seg button .badge-pro, .chip .badge-pro { height: 16px; font-size: 9.5px; padding: 0 4px; }
.lock-cta-row td { padding: 14px; text-align: center; background: linear-gradient(180deg, transparent, var(--accent-soft)); }
.locked { position: relative; border-radius: 10px; overflow: hidden; }
.locked-blur { filter: blur(6px); opacity: .5; pointer-events: none; user-select: none; }
.locked-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; }
.locked-cta p { max-width: 340px; font-weight: 550; color: var(--text); }
.lock-row td { text-align: center; background: var(--surface-2); }
.pro-banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); flex-wrap: wrap; }
.pro-banner p { flex: 1; min-width: 220px; color: var(--text-2); }
.pro-banner strong { color: var(--text); font-weight: 600; }

/* ---------- Editorial blocks ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.split-sticky { position: sticky; top: calc(var(--header-h) + 28px); }
.tool-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.tool-list a { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 22px 4px; border-bottom: 1px solid var(--border); transition: background .15s; }
.tool-list a:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.tool-list .idx { font-family: var(--mono); color: var(--muted); font-size: 13px; padding-top: 3px; }
.tool-list h3 { font-size: 19px; }
.tool-list p { color: var(--text-2); margin-top: 6px; max-width: 58ch; }
.tool-list .go { color: var(--muted); padding-top: 3px; transition: transform .15s, color .15s; }
.tool-list .go svg { width: 18px; height: 18px; }
.tool-list a:hover .go { transform: translateX(3px); color: var(--accent-text); }
.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 34px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-band h2 { max-width: 24ch; }
.cta-band p { color: var(--text-2); margin-top: 10px; max-width: 60ch; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border); }
.step { padding: 22px 22px 0 0; }
.step + .step { padding-left: 22px; border-left: 1px solid var(--border); }
.step-num { font-family: var(--mono); color: var(--accent-text); font-size: 13px; margin-bottom: 10px; display: block; }
.step p { color: var(--text-2); font-size: 14.5px; margin-top: 6px; }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.feature-icon svg { width: 20px; height: 20px; }

/* ---------- Rates ---------- */
.rate-card { display: flex; flex-direction: column; gap: 6px; }
.rate-big { font-family: var(--mono); font-size: clamp(30px, 3.6vw, 42px); font-weight: 560; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rate-big small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.rate-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.mini-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-rate { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.mini-rate .label { font-size: 12.5px; color: var(--muted); }
.mini-rate .value { font-family: var(--mono); font-size: 21px; font-weight: 560; margin-top: 4px; letter-spacing: -0.03em; }
.merchant { display: flex; flex-direction: column; gap: 2px; }
.merchant strong { font-weight: 560; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.methods { display: flex; gap: 4px; flex-wrap: wrap; max-width: 240px; white-space: normal; }
.ex-badge { font-weight: 600; font-size: 11.5px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--border); color: var(--text-2); }
.ex-Binance { color: #c99a0a; border-color: rgba(201, 154, 10, .35); }
:root[data-theme="light"] .ex-Binance { color: #8c6a00; }

/* ---------- Brief ---------- */
.brief-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.brief-article h1 { font-size: clamp(28px, 3.4vw, 42px); margin: 12px 0 16px; max-width: 24ch; }
.brief-article .intro { font-size: 17px; color: var(--text-2); line-height: 1.7; max-width: 70ch; }
.mover-list { display: flex; flex-direction: column; }
.mover { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.mover:last-child { border-bottom: 0; }
.news-list { display: flex; flex-direction: column; }
.news-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.news-item:last-child { border-bottom: 0; }
.news-item a { font-weight: 540; line-height: 1.45; }
.news-item a:hover { color: var(--accent-text); }
.news-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.watch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.watch-list li { padding: 12px 0 12px 18px; border-bottom: 1px solid var(--border); color: var(--text-2); position: relative; }
.watch-list li:last-child { border-bottom: 0; }
.watch-list li::before { content: ""; position: absolute; left: 0; top: 20px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.archive-list { display: flex; flex-direction: column; gap: 2px; max-height: 520px; overflow-y: auto; }
.archive-list a, .archive-list button { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 9px; border: 0; background: transparent; text-align: left; width: 100%; }
.archive-list a:hover, .archive-list button:hover { background: var(--surface-2); }
.archive-list .active { background: var(--surface-3); }
.archive-list .date { font-size: 12px; color: var(--muted); font-family: var(--mono); display: flex; align-items: center; gap: 6px; }
.archive-list .title { font-size: 13.5px; font-weight: 520; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.outlook { white-space: normal; min-width: 260px; color: var(--text-2); font-size: 13.5px; }

/* ---------- Alerts ---------- */
.alert-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.alert-item:last-child { border-bottom: 0; }
.alert-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); flex-shrink: 0; overflow: hidden; }
.alert-icon img { width: 26px; height: 26px; border-radius: 50%; }
.alert-icon svg { width: 18px; height: 18px; color: var(--accent-text); }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 560; overflow: hidden; text-overflow: ellipsis; }
.alert-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--surface-3); color: var(--text-2); }
.empty-icon svg { width: 22px; height: 22px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { max-width: 46ch; margin: 0 auto; }
.current-price { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: 13.5px; }

/* ---------- DCA ---------- */
.dca-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.dca-summary { font-size: 19px; line-height: 1.55; color: var(--text-2); max-width: 64ch; }
.dca-summary strong { color: var(--text); font-weight: 600; }
.compare-table td:first-child { font-weight: 600; }

/* ---------- Pricing ---------- */
.billing-toggle { display: flex; margin: 28px 0 8px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 960px; margin: 28px 0 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); }
.plan { display: grid; grid-template-rows: auto 96px auto auto 1fr; gap: 18px; padding: 30px; position: relative; border-radius: 0; border: 0; }
.plan + .plan { border-left: 1px solid var(--border); }
.plan-pro { background: linear-gradient(180deg, var(--accent-soft), transparent 55%); box-shadow: inset 0 3px 0 var(--accent); }
.plan-tag { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.plan-price { font-family: var(--mono); font-size: 44px; font-weight: 560; letter-spacing: -0.05em; }
.plan-price small { font-family: var(--font); font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 14.5px; }
.check-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--accent-text); }
.check-list li.no { color: var(--muted); }
.check-list li.no svg { color: var(--muted); }
.coins-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-banner { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.status-banner.ok { border-color: color-mix(in srgb, var(--up) 40%, transparent); background: var(--up-soft); }
.status-banner.wait { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-soft); }
.status-banner.warn { border-color: color-mix(in srgb, var(--down) 40%, transparent); background: var(--down-soft); }

/* ---------- Q&A (replaces accordions) ---------- */
.qa { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); margin: 0; border-top: 1px solid var(--border); }
.qa dt { padding: 20px 24px 20px 0; border-bottom: 1px solid var(--border); font-weight: 580; letter-spacing: -0.01em; }
.qa dd { margin: 0; padding: 20px 0; border-bottom: 1px solid var(--border); color: var(--text-2); max-width: 70ch; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 15px 0; font-weight: 580; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 16px; color: var(--text-2); }

/* ---------- Prose (legal) ---------- */
.prose { max-width: 720px; color: var(--text-2); font-size: 15.5px; line-height: 1.75; }
.prose h1 { color: var(--text); font-size: clamp(30px, 3.6vw, 44px); margin: 10px 0 8px; }
.prose h2 { color: var(--text); font-size: 20px; margin: 38px 0 10px; }
.prose h3 { color: var(--text); margin: 22px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose table { margin: 10px 0 18px; font-size: 14px; }
.prose td, .prose th { white-space: normal; vertical-align: top; }
.prose code { font-family: var(--mono); font-size: 13px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.prose .updated { color: var(--muted); font-size: 14px; }
.notice { padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); color: var(--text); }

/* ---------- Profile ---------- */
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: clamp(32px, 4.5vw, 56px) 0 28px; }
.profile-head h1 { font-size: clamp(28px, 3.4vw, 40px); }
.profile-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 10px; align-items: center; }
.profile-bio { color: var(--text-2); margin-top: 10px; max-width: 60ch; }
.profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.profile-stats > div { padding: 18px 0; display: flex; flex-direction: column; gap: 4px; }
.profile-stats > div + div { padding-left: 22px; border-left: 1px solid var(--border); }
.profile-stats strong { font-family: var(--mono); font-size: 24px; font-weight: 560; letter-spacing: -0.03em; }
.profile-stats span { color: var(--muted); font-size: 13px; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); font-size: 20px; display: grid; place-items: center; transition: border-color .12s, transform .12s; }
.emoji-grid button:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.emoji-grid button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; outline: 1px solid var(--border); }
.swatches button[aria-pressed="true"] { border-color: var(--bg); outline: 2px solid var(--text); }

/* ---------- Settings ---------- */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.settings-nav { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 520; transition: color .12s, background .12s; white-space: nowrap; }
.settings-nav a:hover { color: var(--text); background: var(--surface-2); }
.settings-nav a.active { color: var(--text); background: var(--surface-3); }
.settings-section { scroll-margin-top: calc(var(--header-h) + 20px); padding-bottom: 8px; }
.settings-section + .settings-section { margin-top: 40px; }
.settings-section > h2 { font-size: 20px; margin-bottom: 4px; }
.settings-section > .section-desc { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 0; border-top: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 1px solid var(--border); }
.setting-row .label { font-weight: 560; }
.setting-row .desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.setting-row .controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.setting-form { grid-column: 1 / -1; display: grid; gap: 12px; max-width: 460px; padding-top: 4px; }
.provider { display: flex; align-items: center; gap: 12px; }
.provider-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); flex-shrink: 0; }
.provider-icon svg { width: 18px; height: 18px; }

/* ---------- Auth modal ---------- */
.auth-providers { display: flex; flex-direction: column; gap: 10px; }
.auth-providers .btn { justify-content: center; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-form { display: grid; gap: 12px; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-switch button, .link-btn { border: 0; background: none; padding: 0; color: var(--text); font-weight: 550; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.auth-switch button:hover, .link-btn:hover { text-decoration-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--accent); width: 15px; height: 15px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--border); background: var(--bg-2); padding: 48px 0 26px; font-size: 14px; color: var(--text-2); }
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px 28px; align-items: start; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 34ch; font-size: 13.5px; line-height: 1.6; }
.footer-col h4 { font-size: 12.5px; font-weight: 600; color: var(--text); margin: 4px 0 14px; letter-spacing: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col .link-btn { color: var(--muted); font-size: 13.5px; font-weight: 400; text-decoration: none; transition: color .15s; }
.footer-col a:hover, .footer-col .link-btn:hover { color: var(--text); }
.footer-rates { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.footer-rates .label { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.footer-rates a { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.footer-rates a:hover { color: var(--accent-text); }
.footer-bottom { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.footer-bottom p { max-width: 80ch; line-height: 1.6; }
.footer-bottom .made { white-space: nowrap; display: inline-flex; gap: 16px; align-items: center; }

/* ---------- Modal ---------- */
dialog.modal { border: 1px solid var(--border); border-radius: 16px; padding: 0; background: var(--surface); color: var(--text); width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-shadow: var(--shadow-lg); }
dialog.modal.modal-lg { width: min(620px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(6, 8, 11, .6); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.modal-close:hover { color: var(--text); background: var(--surface-2); }
.modal-close svg { width: 16px; height: 16px; }
.login-steps { margin: 0; padding-left: 20px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; justify-content: center; padding: 6px; }
.legal-note { font-size: 12.5px; color: var(--muted); text-align: center; }
.legal-note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 520; animation: toastIn .2s ease-out; max-width: 400px; }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; background: var(--accent); }
.toast.ok::before { background: var(--up); }
.toast.err::before { background: var(--down); }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Cookie notice ---------- */
.cookie-bar { position: fixed; left: 20px; bottom: 20px; z-index: var(--z-cookie); max-width: 400px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: var(--text-2); animation: toastIn .25s ease-out; }
.cookie-bar strong { color: var(--text); font-weight: 600; }
.cookie-bar .row { gap: 8px; }

/* ---------- Loading ---------- */
.skeleton { display: inline-block; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; min-height: 1em; vertical-align: middle; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { padding: 28px 20px; text-align: center; color: var(--muted); }
.error-box strong { display: block; color: var(--text); margin-bottom: 6px; font-weight: 600; }
.updated-at { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }

/* ---------- 404 ---------- */
.not-found { padding: 110px 0 40px; }
.not-found .code { font-family: var(--mono); font-size: clamp(72px, 12vw, 132px); font-weight: 600; letter-spacing: -0.06em; color: var(--accent); line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav > a, .nav-dd-btn { padding: 8px 7px; font-size: 13.5px; }
  .nav > a.active::after { left: 7px; right: 7px; }
  .header-inner { gap: 16px; }
  .hide-lg { display: none; }
}
@media (max-width: 1020px) {
  .menu-btn { display: inline-grid; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 16px; background: var(--bg); border-top: 1px solid var(--border); transform: translateX(100%); transition: transform .22s ease; overflow-y: auto; z-index: 39; }
  .nav.open { transform: none; }
  .nav > a { padding: 14px 12px; font-size: 17px; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--text-2); }
  .nav > a.active::after { display: none; }
  .nav > a.active { color: var(--accent-text); }
  .nav-group { border-bottom: 1px solid var(--border); }
  .nav-dd-btn { width: 100%; justify-content: space-between; padding: 14px 12px; font-size: 17px; color: var(--text-2); }
  .nav-dd { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 12px; background: transparent; animation: none; }
  .nav-dd.narrow { width: auto; }
  .nav-mobile-extra { display: flex; gap: 10px; align-items: center; padding: 18px 12px; color: var(--muted); font-size: 14px; }
  .hero { grid-template-columns: 1fr; align-items: start; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip > .stat:nth-child(3) { border-left: 0; }
  .stat-strip > .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .grid-3 { grid-template-columns: 1fr; }
  .brief-layout, .dca-layout, .split, .settings-layout { grid-template-columns: 1fr; }
  .split-sticky, .settings-nav { position: static; }
  .settings-nav { flex-direction: row; overflow-x: auto; }
  .hide-md { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); margin-top: 22px; }
  .qa { grid-template-columns: 1fr; }
  .qa dt { padding-bottom: 6px; border-bottom: 0; }
  .qa dd { padding-top: 0; }
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--border); }
  .plan { grid-template-rows: none; }
  .search input { width: 100%; }
  .search { flex: 1; min-width: 180px; }
  .hide-sm { display: none; }
  .cta-band { grid-template-columns: 1fr; }
  .user-chip .name { display: none; }
  .user-chip { padding-right: 4px; }
  .header-actions .cur-select { display: none; }
  .profile-head { grid-template-columns: auto minmax(0, 1fr); }
  .profile-head > .actions { grid-column: 1 / -1; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .profile-stats > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .tool-list a { grid-template-columns: 36px minmax(0, 1fr); }
  .tool-list .go { display: none; }
  .setting-row { grid-template-columns: 1fr; }
  .setting-row .controls { justify-content: flex-start; }
  .emoji-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .card { padding: 18px; }
  .card-flush { padding: 0; }
  .stat-value { font-size: 20px; }
  td, th { padding: 11px 10px; }
  .toolbar { padding: 12px; }
  .cookie-bar { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .mini-rates { grid-template-columns: 1fr; }
  .lead { font-size: 16px; }
  .avatar-xl { width: 76px; height: 76px; border-radius: 20px; font-size: 30px; }
  .avatar-xl.is-emoji { font-size: 40px; }
}
@media (max-width: 420px) {
  .grid-4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Coin analytics page ---------- */
.coin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: clamp(22px, 3vw, 34px); }
.breadcrumb { font-size: 13.5px; color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.coin-picker { position: relative; width: min(360px, 100%); }
.coin-picker .search input { width: 100%; }
.picker-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 380px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: var(--z-dropdown); }
.picker-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.picker-list a:hover, .picker-list a.active { background: var(--surface-2); }
.picker-list img { width: 22px; height: 22px; border-radius: 50%; }
.picker-list .sym { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.picker-list .note { padding: 10px; font-size: 13px; color: var(--muted); }
.coin-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; padding: 22px 0 4px; }
.coin-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.coin-title img { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); }
.coin-title h1 { font-size: clamp(26px, 3vw, 38px); }
.coin-price { font-family: var(--mono); font-size: clamp(34px, 4.6vw, 56px); font-weight: 560; letter-spacing: -0.05em; line-height: 1; margin-top: 16px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.coin-price .chg { font-size: 17px; letter-spacing: 0; }
.coin-sub { color: var(--muted); font-size: 13.5px; margin-top: 10px; font-family: var(--mono); }
.coin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.coin-actions .star-btn { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; }
.coin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.chart-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.range-change { font-family: var(--mono); font-size: 13px; }
.vol-label { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--mono); text-align: right; font-size: 13.5px; }
.kv .v small { display: block; color: var(--muted); font-size: 11.5px; }
.range-bar { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--down) 45%, transparent), color-mix(in srgb, var(--up) 45%, transparent)); margin: 12px 0 6px; }
.range-bar i { position: absolute; top: -5px; width: 3px; height: 16px; border-radius: 2px; background: var(--text); transform: translateX(-50%); }
.range-ends { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.supply-bar { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.supply-bar i { display: block; height: 100%; background: var(--accent); }
.cells { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cells > div { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cells .k { font-size: 12.5px; color: var(--muted); }
.cells .v { font-family: var(--mono); font-weight: 560; font-size: 16px; }
.cells .note { font-size: 12.5px; color: var(--text-2); }
.perf { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.tech { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.tech .v { font-size: 20px; }
.rsi-bar { position: relative; height: 6px; border-radius: 999px; margin-top: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--up) 55%, transparent) 0 30%, var(--surface-3) 30% 70%, color-mix(in srgb, var(--down) 55%, transparent) 70%); }
.rsi-bar i { position: absolute; top: -5px; width: 3px; height: 16px; border-radius: 2px; background: var(--text); transform: translateX(-50%); }
.about p { color: var(--text-2); margin-bottom: 12px; max-width: 75ch; line-height: 1.7; }
.link-list { display: flex; flex-wrap: wrap; gap: 6px; }
.contract { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.contract:last-child { border-bottom: 0; }
.contract code { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.related a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color .15s; font-size: 14px; min-width: 0; }
.related a:hover { border-color: var(--border-strong); }
.related img { width: 22px; height: 22px; border-radius: 50%; }
.related .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-link { color: inherit; }
.coin-link:hover .coin-name { color: var(--accent-text); }
@media (max-width: 1020px) {
  .coin-layout { grid-template-columns: 1fr; }
  .coin-head { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 640px) {
  .contract { grid-template-columns: 1fr auto; }
  .contract .chain { grid-column: 1 / -1; }
}

/* ---------- Tools pages ---------- */
.page-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* Heatmap (treemap) */
.treemap { position: relative; width: 100%; height: clamp(440px, 72vh, 820px); border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.tile { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; overflow: hidden; text-align: center; color: #fff; border: 1px solid var(--bg); line-height: 1.15; transition: filter .15s; }
.tile:hover { filter: brightness(1.18); z-index: 1; }
.tile b { font-weight: 650; letter-spacing: -0.01em; }
.tile .tp, .tile .tc { font-family: var(--mono); opacity: .92; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.heat-legend i { width: 160px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #b3263a, #3a3f48, #12804f); }

/* Donut */
.donut-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center; }
.donut { width: 200px; height: 200px; }
.legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.legend-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.legend-list i { width: 12px; height: 12px; border-radius: 3px; }
.legend-list .num { color: var(--text-2); }

/* Uptime bars */
.svc { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.svc:last-child { border-bottom: 0; }
.svc-name { display: flex; align-items: center; gap: 10px; font-weight: 560; }
.svc-meta { font-size: 12.5px; color: var(--muted); font-family: var(--mono); text-align: right; white-space: nowrap; }
.uptime { display: flex; gap: 2px; height: 26px; }
.uptime i { flex: 1; border-radius: 2px; background: var(--up); opacity: .85; }
.uptime i.s1 { background: var(--accent); }
.uptime i.s2 { background: var(--down); }
.uptime i.sx { background: var(--surface-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.operational { background: var(--up); }
.dot.slow { background: var(--accent); }
.dot.down { background: var(--down); }
.dot.unknown { background: var(--muted); }

/* Countdown */
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.countdown > div { background: var(--surface); padding: clamp(16px, 3vw, 28px) 12px; text-align: center; }
.countdown strong { display: block; font-family: var(--mono); font-size: clamp(34px, 6vw, 76px); font-weight: 560; letter-spacing: -0.05em; line-height: 1; }
.countdown span { color: var(--muted); font-size: 13px; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* Converter */
.conv { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; }
.conv-side { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
.conv .input { height: 52px; font-size: 20px; font-family: var(--mono); }
.conv .select { height: 52px; }
.swap-btn { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: grid; place-items: center; transition: transform .2s, border-color .15s; }
.swap-btn:hover { border-color: var(--border-strong); color: var(--text); transform: rotate(180deg); }
.swap-btn svg { width: 20px; height: 20px; }
.conv-result { font-family: var(--mono); font-size: clamp(22px, 3vw, 32px); font-weight: 560; letter-spacing: -0.03em; margin-top: 18px; }

/* Article (guides, news) */
.article { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 280px); gap: clamp(28px, 5vw, 72px); align-items: start; }
.article aside { position: sticky; top: calc(var(--header-h) + 28px); display: flex; flex-direction: column; gap: 18px; }
.article aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.article-meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.headlines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

/* Compare */
.vs-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.vs-head .vs { font-family: var(--mono); color: var(--muted); }
.vs-coin { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vs-coin img { width: 40px; height: 40px; border-radius: 50%; }
.vs-coin .price { font-family: var(--mono); font-size: 22px; font-weight: 560; }
.win { color: var(--up); font-weight: 600; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-grid > div { background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.admin-grid strong { font-family: var(--mono); font-size: 24px; font-weight: 560; letter-spacing: -0.03em; }
.admin-grid span { font-size: 12.5px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 8px; }
.bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars i { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars span { font-size: 10.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }

/* Invite */
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.copy-field .input { font-family: var(--mono); font-size: 13.5px; }

@media (max-width: 1020px) {
  .article { grid-template-columns: 1fr; }
  .article aside { position: static; }
  .svc { grid-template-columns: 1fr auto; }
  .svc .uptime { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 720px) {
  .conv { grid-template-columns: 1fr; }
  .swap-btn { justify-self: center; transform: rotate(90deg); }
  .swap-btn:hover { transform: rotate(270deg); }
  .countdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .vs-head { grid-template-columns: 1fr; }
  .vs-head .vs { display: none; }
}
.vs-head .coin-picker { width: 100%; }

.bell-btn[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-soft); }
.svc { grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto auto; }
@media (max-width: 1020px) { .svc { grid-template-columns: 1fr auto auto; } }

/* ---------- Global stats bar ---------- */
.statsbar { border-bottom: 1px solid var(--border); background: var(--bg-2); font-size: 12.5px; }
.statsbar .container { display: flex; align-items: center; gap: 22px; height: 34px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.statsbar .container::-webkit-scrollbar { display: none; }
.statsbar .k { color: var(--muted); }
.statsbar b { font-family: var(--mono); font-weight: 500; color: var(--text); margin-left: 4px; }
.statsbar a:hover b { color: var(--accent-text); }
.statsbar .chg { font-size: 11.5px; margin-left: 4px; }

/* ---------- Home ---------- */
.home-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: clamp(22px, 3vw, 34px); flex-wrap: wrap; }
.home-top h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.035em; }
.home-top .lead { font-size: 15.5px; margin-top: 8px; max-width: 80ch; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; margin-top: 20px; }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.hl-card { padding: 18px; display: flex; flex-direction: column; min-width: 0; }
.hl-card .card-head { margin-bottom: 10px; }
.hl-card .card-head h3 { font-size: 15.5px; }
.hl-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; font-size: 14px; border-top: 1px solid var(--border); }
.hl-row:first-child { border-top: 0; }
.hl-row img { width: 22px; height: 22px; border-radius: 50%; }
.hl-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 520; }
.hl-row .px { font-family: var(--mono); font-size: 13px; }
.hl-row:hover .nm { color: var(--accent-text); }
.mo-nums { display: flex; gap: 22px; flex-wrap: wrap; }
.mo-nums strong { display: block; font-family: var(--mono); font-size: 19px; font-weight: 560; letter-spacing: -0.03em; }
.mo-nums span { font-size: 12.5px; color: var(--muted); }
.side { display: flex; flex-direction: column; gap: 14px; }
.side .card { padding: 18px; }
.side .gauge { max-width: 190px; }
.side .gauge-value { font-size: 36px; margin-top: -50px; }
.news-mini { display: flex; flex-direction: column; }
.news-mini a { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); align-items: start; }
.news-mini a:first-child { border-top: 0; padding-top: 2px; }
.news-mini .t { font-size: 13.5px; font-weight: 540; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-mini a:hover .t { color: var(--accent-text); }
.news-mini .m { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.news-mini img { width: 64px; height: 48px; object-fit: cover; border-radius: 7px; background: var(--surface-3); }
.cta-mini { background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; min-width: 0; }
.news-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.news-card .thumb { aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 15.5px; line-height: 1.38; letter-spacing: -0.01em; }
.news-card:hover h3 { color: var(--accent-text); }
.news-card p { color: var(--text-2); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.news-meta .src { color: var(--text-2); font-weight: 550; }
.news-feature { grid-column: span 2; }
.news-feature .thumb { aspect-ratio: 21 / 9; }
.news-feature h3 { font-size: 21px; }
.top-story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; overflow: hidden; padding: 0; }
.top-story .thumb { min-height: 220px; background: var(--surface-3); }
.top-story .thumb img { width: 100%; height: 100%; object-fit: cover; }
.top-story .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.top-story h3 { font-size: 20px; line-height: 1.3; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-header); height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 500; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.on { color: var(--accent-text); }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .toasts, .cookie-bar { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@media (max-width: 1180px) {
  .home-layout { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .top-story { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .highlights, .side { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-feature { grid-column: auto; }
  .news-feature .thumb { aspect-ratio: 16 / 9; }
  .news-feature h3 { font-size: 16px; }
  .site-footer { margin-top: 64px; }
}

/* News hub */
.news-card .thumb.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); }
.news-card .thumb > span { display: none; }
.news-card .thumb.ph span { display: block; font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.news-card .thumb.noimg img { display: none; }
.news-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.news-tags span { font-size: 11px; font-weight: 560; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; }
.link-list { display: flex; flex-direction: column; }
.link-list li a { display: block; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; line-height: 1.45; color: var(--text); transition: color .15s; }
.link-list li:first-child a { border-top: 0; padding-top: 0; }
.link-list li a:hover { color: var(--accent-text); }
.link-list .d { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }

/* ---------- Tools added in the second round ---------- */
.row-best td { background: color-mix(in srgb, var(--up) 6%, transparent); }
.net-cell { display: flex; flex-direction: column; gap: 2px; }
.status-banner > svg { width: 22px; height: 22px; color: var(--accent-text); flex: none; }

/* Mood poll */
.poll-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-up { background: var(--up-soft); color: var(--up); border: 1px solid color-mix(in srgb, var(--up) 45%, transparent); }
.btn-down { background: var(--down-soft); color: var(--down); border: 1px solid color-mix(in srgb, var(--down) 45%, transparent); }
.poll-bar { height: 8px; border-radius: 99px; background: var(--down); overflow: hidden; margin-top: 12px; }
.poll-bar i { display: block; height: 100%; background: var(--up); border-right: 2px solid var(--surface); transition: width .4s ease; }
.poll-brief { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.poll-brief strong { font-size: 18px; margin-left: 2px; }
.poll-brief .poll-bar { margin-top: 0; }

/* Token checker */
.tc-form, .sm-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tc-form .field:first-child { width: 190px; }
.verdict { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.verdict h2 { font-size: 22px; margin-top: 4px; }
.verdict-badge { display: flex; flex-direction: column; gap: 4px; max-width: 360px; padding: 12px 16px; border-radius: 10px; }
.verdict-badge strong { font-size: 18px; }
.verdict-badge span { font-size: 13.5px; color: var(--text-2); }
.verdict-danger { border-color: color-mix(in srgb, var(--down) 50%, transparent); }
.verdict-danger .verdict-badge { background: var(--down-soft); color: var(--down); }
.verdict-warn .verdict-badge, .verdict-caution .verdict-badge { background: var(--accent-soft); color: var(--accent-text); }
.verdict-ok .verdict-badge { background: var(--up-soft); color: var(--up); }
.risk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.risk-list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.risk-list li:first-child { border-top: 0; padding-top: 2px; }
.risk-list p { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }
.risk-list .ci { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.risk-list .lvl-danger .ci { background: var(--down-soft); color: var(--down); }
.risk-list .lvl-warn .ci { background: var(--accent-soft); color: var(--accent-text); }
.risk-list .lvl-ok .ci { background: var(--up-soft); color: var(--up); }

/* Send money */
.sm-form .field { min-width: 0; }
.sm-form .input-group .input { width: 140px; }
.sm-form .sm-cur { width: auto; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.sm-form #sm-to { min-width: 240px; }
.sm-arrow { align-self: center; padding-top: 22px; color: var(--muted); font-size: 18px; }
.sm-provider { display: flex; align-items: center; gap: 12px; }
.sm-provider img { width: 92px; height: 26px; object-fit: contain; object-position: left center; background: #fff; border-radius: 6px; padding: 3px 6px; flex: none; }
.sm-logo-ph { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 16px; flex: none; }

/* Widgets */
.widget-builder { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }
.widget-preview { display: flex; flex-direction: column; gap: 10px; position: sticky; top: calc(var(--header-h) + 20px); }
.wg-stage { padding: 28px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: var(--bg-2); display: grid; place-items: center; min-height: 240px; }
.wg-stage.wg-light { background: #eceef1; }
.wg-code { resize: vertical; font-size: 12px; line-height: 1.5; height: auto; padding: 10px 12px; }

/* CSV import */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; margin-top: 14px; border: 1.5px dashed var(--border-strong); border-radius: 12px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }

/* New listings */
.listing-list strong.mono { color: var(--accent-text); }

/* Local-language pages: the site shell stays English; the content follows the language. */
.local-page[dir="rtl"] { text-align: right; }
.local-page[dir="rtl"] .tool-list .idx { margin-left: 0; }
.local-page .lead, .local-page .qa dd, .local-page .prose p, .local-page .prose li { line-height: 1.75; }
.local-switch .chip[aria-current] { cursor: default; }
.local-page:lang(si), .local-page:lang(hi) { font-family: var(--font), "Nirmala UI", "Iskoola Pota", "Noto Sans Sinhala", "Noto Sans Devanagari", sans-serif; }
.local-page:lang(ur) { font-family: "Segoe UI", "Noto Naskh Arabic", Tahoma, var(--font), sans-serif; }

.print-only { display: none; }
@media print {
  .site-header, .site-footer, .statsbar, .tabbar, .no-print, .cookie-bar, .toasts, .page-head .lead, .lock-row { display: none !important; }
  .print-only { display: block; margin-bottom: 14px; font-size: 18px; }
  body { background: #fff; color: #000; padding: 0; }
  .card { border-color: #ccc; break-inside: avoid; }
}

@media (max-width: 900px) {
  .widget-builder { grid-template-columns: 1fr; }
  .widget-preview { position: static; }
}
@media (max-width: 720px) {
  .sm-arrow { display: none; }
  .sm-form > *, .tc-form > *, .tc-form .field:first-child, .sm-form #sm-to { width: 100%; min-width: 0; }
  .sm-form .input-group .input { width: 100%; }
  .poll-brief { gap: 10px; }
}
