/* ============================================================
   CMarketData — refined design system
   Typography: Inter (with Noto Sans CJK fallbacks)
   ============================================================ */

:root {
  /* surfaces */
  --bg:           #fafbfd;
  --bg-soft:      #f4f6fb;
  --surface:      #ffffff;
  --surface-2:    #f7f9fc;

  /* lines */
  --border:        #ebeef4;
  --border-strong: #dde2ec;

  /* text */
  --text:        #0b1220;
  --text-2:      #3b4760;
  --text-muted:  #6b7a93;
  --text-soft:   #9aa4b7;

  /* brand */
  --primary:     #2f5bff;
  --primary-600: #1f47e0;
  --primary-50:  #eef2ff;
  --accent:      #7c5cff;

  --green: #16a34a;
  --red:   #dc2626;
  --amber: #f59e0b;

  /* effects */
  --shadow-xs: 0 1px 0 rgba(15, 23, 42, .03);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 1px rgba(15, 23, 42, .02);
  --shadow:    0 12px 28px -16px rgba(15, 23, 42, .14), 0 2px 8px -4px rgba(15, 23, 42, .06);
  --shadow-lg: 0 30px 70px -32px rgba(15, 23, 42, .26), 0 10px 24px -16px rgba(15, 23, 42, .10);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --container: 1200px;
}

/* ---- reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR",
               -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
               Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11", "cv05";
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:lang(zh-CN) body { font-family: "Inter", "Noto Sans SC", system-ui, sans-serif; }
:lang(ja)    body { font-family: "Inter", "Noto Sans JP", system-ui, sans-serif; }
:lang(ko)    body { font-family: "Inter", "Noto Sans KR", system-ui, sans-serif; }

a { color: inherit; text-decoration: none; }
a.link { color: var(--primary); }
a.link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

button { font: inherit; }
input, select { font: inherit; color: inherit; }

.muted { color: var(--text-muted); }
.up { color: var(--green); }
.down { color: var(--red); }
small { font-weight: 500; color: var(--text-muted); font-size: .65em; margin-left: 2px; }

/* ============================================================
   Brand
   ============================================================ */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background:
    conic-gradient(from 200deg at 50% 50%, #2f5bff, #7c5cff, #22d3ee, #2f5bff);
  position: relative; box-shadow: 0 2px 8px -2px rgba(47, 91, 255, .35);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 4px; background: #fff;
}
.brand-name { font-size: 15px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --b: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--b); background: #fff; color: var(--text);
  font-weight: 500; font-size: 14px; letter-spacing: -.005em;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }

.btn--primary {
  background: linear-gradient(180deg, #3a66ff 0%, #2447dc 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px -10px rgba(47, 91, 255, .55), inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.btn--primary:hover { filter: brightness(1.05); box-shadow: 0 12px 22px -10px rgba(47, 91, 255, .65); }

.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn--ghost:hover { background: #fff; color: var(--text); }

/* ============================================================
   Language switcher
   ============================================================ */
.lang-switcher { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 9px; border-radius: 9px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.lang-btn:hover { border-color: var(--border-strong); color: var(--text); }
.lang-btn__flag {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #4338ca; font-size: 11px; font-weight: 600;
}
.lang-btn__chev { color: var(--text-muted); }

.lang-menu {
  position: fixed; min-width: 200px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; margin: 0; list-style: none;
  z-index: 9999;
}
.lang-menu li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--text-2);
}
.lang-menu li:hover { background: var(--surface-2); color: var(--text); }
.lang-menu li[aria-selected="true"] { color: var(--primary); background: var(--primary-50); font-weight: 500; }
.lang-menu__flag {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: #4338ca; font-size: 11px; font-weight: 600;
}

/* ============================================================
   Landing
   ============================================================ */
.landing { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow-x: clip; }
.landing::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 480px at 88% -8%, rgba(124, 92, 255, .12), transparent 60%),
    radial-gradient(700px 380px at -6% 110%, rgba(47, 91, 255, .10), transparent 60%);
}

.landing-nav, .hero, .landing-foot { position: relative; z-index: 1; }
.landing-nav { z-index: 50; }
.hero__art { pointer-events: none; }
.hero__art .ranking-card, .hero__art .spark-card { pointer-events: auto; }

.landing-nav {
  max-width: var(--container); width: 100%; margin: 0 auto;
  padding: 22px 28px; display: flex; align-items: center; justify-content: space-between;
}
.landing-nav__right { display: flex; align-items: center; gap: 18px; }
.landing-nav__links { display: flex; gap: 6px; }
.landing-nav__links a {
  color: var(--text-muted); font-size: 13.5px; padding: 7px 12px; border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.landing-nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, .55); }

.hero {
  flex: 1; max-width: var(--container); width: 100%; margin: 0 auto;
  padding: 56px 28px 96px; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 64px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.hero__title {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.04; letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 22px;
  color: var(--text);
}
.hero__title-accent {
  background: linear-gradient(100deg, #2f5bff 0%, #7c5cff 60%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700;
}
.hero__subtitle {
  color: var(--text-muted); font-size: 16px; line-height: 1.65;
  max-width: 540px; margin: 0 0 32px; font-weight: 400;
}

.hero__features { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 10px; max-width: 540px; }
.hero__features li {
  display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .65);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: transform .2s ease, border-color .2s ease;
}
.hero__features li:hover { transform: translateX(2px); border-color: var(--border-strong); }
.hero__features strong { display: block; font-weight: 500; color: var(--text); font-size: 14px; }
.hero__features em { display: block; font-style: normal; color: var(--text-muted); font-size: 12.5px; margin-top: 1px; }
.feat-ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; color: #fff;
}
.feat-ico--1 { background: linear-gradient(135deg, #4f7bff, #2f5bff); }
.feat-ico--2 { background: linear-gradient(135deg, #9b7bff, #7c5cff); }
.feat-ico--3 { background: linear-gradient(135deg, #34c5e0, #22d3ee); }

.hero__cta { margin-top: 4px; display: flex; gap: 12px; }
.hero__terms { margin-top: 18px; color: var(--text-soft); font-size: 12.5px; }
.hero__terms a { color: var(--text-muted); }
.hero__terms a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* hero art */
.hero__art {
  position: relative; height: 540px;
  perspective: 1200px;
}
.grid-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(47, 91, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 91, 255, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 75%);
}
.orb {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; filter: blur(40px); opacity: .55; z-index: 0;
}
.orb--lg { width: 460px; height: 460px; background: radial-gradient(circle, #c7d4ff, transparent 60%); }
.orb--md { width: 280px; height: 280px; background: radial-gradient(circle, #e1d4ff, transparent 65%); }

.coin {
  position: absolute; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  box-shadow:
    0 22px 36px -18px rgba(15, 23, 42, .28),
    0 4px 10px -4px rgba(15, 23, 42, .10),
    inset 0 0 0 1px rgba(15, 23, 42, .04);
  z-index: 1;
  animation: float 6s ease-in-out infinite;
  overflow: hidden;
}
.coin img { width: 88%; height: 88%; display: block; }
/* fallback when CDN unreachable: gradient + glyph */
.coin--fallback {
  background: linear-gradient(135deg, var(--g1, #cbd5e1), var(--g2, #64748b));
  color: #fff; font-weight: 700; line-height: 1; box-shadow:
    0 22px 36px -18px rgba(15, 23, 42, .28),
    inset 0 -6px 14px rgba(0, 0, 0, .18),
    inset 0 2px 4px rgba(255, 255, 255, .35);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.coin--btc  { width: 96px; height: 96px; font-size: 42px; top: 14%; left: 36%; animation-delay: -1s; }
.coin--eth  { width: 70px; height: 70px; font-size: 30px; top: 6%;  left: 14%; animation-delay: -3s; }
.coin--usdt { width: 64px; height: 64px; font-size: 26px; top: 4%;  right: 18%; animation-delay: -2s; }
.coin--sol  { width: 54px; height: 54px; font-size: 22px; top: 64%; left: 8%;  animation-delay: -4s; }
.coin--bnb  { width: 50px; height: 50px; font-size: 20px; top: 72%; left: 38%; animation-delay: -5s; }

.ranking-card {
  position: absolute; right: 4%; top: 26%;
  width: 240px; padding: 14px 16px; z-index: 2;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}
.ranking-card__head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--text-muted); margin-bottom: 10px;
  font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
}
.pulse {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--green); text-transform: none; letter-spacing: 0;
}
.pulse i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.ranking-card__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ranking-card__list li {
  display: grid; grid-template-columns: 16px 18px 1fr auto auto; align-items: center; gap: 8px;
  font-size: 12.5px; padding: 4px 0;
}
.ranking-card__list .rk  { color: var(--text-soft); font-variant-numeric: tabular-nums; font-size: 11px; }
.ranking-card__list .ico { width: 18px; height: 18px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #fff; }
.ranking-card__list .ico img { width: 100%; height: 100%; display: block; }
.ranking-card__list .ico.coin--fallback {
  font-size: 9px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--g1, #cbd5e1), var(--g2, #64748b));
}
.ranking-card__list b    { font-weight: 500; color: var(--text); font-size: 13px; }
.ranking-card__list em   { font-style: normal; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.trend { font-size: 11px; font-weight: 500; padding: 1px 5px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.trend.up   { color: var(--green); background: #ecfdf5; }
.trend.down { color: var(--red);   background: #fef2f2; }
.trend.flat { color: var(--text-soft); background: var(--surface-2); }

.spark-card {
  position: absolute; left: 6%; bottom: 8%;
  width: 220px; padding: 14px 16px; z-index: 2;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  color: var(--primary);
}
.spark-card__row { display: flex; align-items: center; justify-content: space-between; }
.spark-card__label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.spark-card__delta { font-size: 11.5px; font-weight: 500; }
.spark-card__value { font-size: 22px; font-weight: 600; color: var(--text); margin: 6px 0 8px; letter-spacing: -.01em; }
.spark { width: 100%; height: 36px; display: block; }

/* ---- coin strip (under hero) ---- */
.coin-strip {
  position: relative; z-index: 1;
  max-width: var(--container); margin: 0 auto; width: 100%;
  padding: 8px 28px 36px;
}
.coin-strip__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px; padding: 0 2px;
}
.coin-strip__title {
  font-size: 12.5px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
.coin-strip__hint { font-size: 12px; color: var(--text-soft); }

.coin-strip__track {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.coin-strip__row {
  display: inline-flex; gap: 10px; padding: 6px 0;
  white-space: nowrap;
  animation: coinScroll 50s linear infinite;
}
.coin-strip__track:hover .coin-strip__row { animation-play-state: paused; }
@keyframes coinScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .8);
  font-size: 13px; font-weight: 500; color: var(--text);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.chip__ico {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: #fff;
  overflow: hidden; flex-shrink: 0;
}
.chip__ico img { width: 100%; height: 100%; display: block; }
.chip__ico.coin--fallback {
  color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--g1, #cbd5e1), var(--g2, #64748b));
}
.chip i { font-style: normal; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 12.5px; margin-left: 2px; }
.chip b { font-weight: 500; font-size: 11.5px; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.chip b.up   { color: var(--green); background: #ecfdf5; }
.chip b.down { color: var(--red);   background: #fef2f2; }
.chip b.flat { color: var(--text-soft); background: var(--surface-2); }

@media (prefers-reduced-motion: reduce) {
  .coin-strip__row { animation: none; }
  .coin { animation: none; }
}

.landing-foot {
  max-width: var(--container); margin: 0 auto; width: 100%;
  padding: 18px 28px 28px; color: var(--text-soft); font-size: 12px;
  display: flex; justify-content: space-between; gap: 12px;
}

/* ============================================================
   App layout
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; padding: 12px 28px; gap: 24px;
}
.topbar__nav { display: flex; gap: 4px; justify-self: center; }
.topbar__nav a {
  padding: 7px 14px; border-radius: 8px; font-size: 13.5px;
  color: var(--text-muted); font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.topbar__nav a:hover { color: var(--text); background: var(--surface-2); }
.topbar__nav a.active { color: var(--primary); background: var(--primary-50); }
.topbar__actions { display: flex; gap: 10px; }

.container { max-width: var(--container); margin: 0 auto; padding: 32px 28px; }

/* ---- page head ---- */
.page-head { margin-bottom: 28px; max-width: 880px; }
.page-head h1 {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.18; letter-spacing: -.022em;
  font-weight: 600; margin: 4px 0 12px;
}
.lede {
  color: var(--text-2); font-size: 15px; line-height: 1.7; margin: 0;
}
.lede strong { color: var(--text); font-weight: 500; }

/* ---- stats ---- */
.stats {
  margin: 0 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat-card {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  display: grid; gap: 6px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.stat-card__label {
  font-size: 11.5px; color: var(--text-muted);
  font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.stat-card__value {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
  color: var(--text);
}
.stat-card__value small { font-family: inherit; font-weight: 500; color: var(--text-muted); font-size: .55em; margin-left: 1px; }
.stat-card__hint { font-size: 12.5px; color: var(--text-muted); font-weight: 400; }

/* ---- card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 22px 24px;
  margin-bottom: 22px;
}
.card__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.card__head h2 {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 17px; font-weight: 600; letter-spacing: -.012em;
  margin: 0 0 4px;
}
.card__head p { margin: 0; font-size: 13px; }
.card__head--toolbar { align-items: center; }

.legend { display: flex; gap: 12px; color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.legend-dot--blue { background: var(--primary); }

.chart-wrap { width: 100%; padding-top: 4px; }
#marketChart { width: 100%; height: auto; display: block; }

/* ---- toolbar ---- */
.toolbar { display: flex; gap: 10px; align-items: center; }
.search {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: 9px;
  color: var(--text-muted);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.search:focus-within {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 91, 255, .10);
}
.search input {
  border: 0; outline: 0; background: transparent;
  width: 220px; font-size: 13.5px; color: var(--text);
}
.search input::placeholder { color: var(--text-soft); }

.select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface-2)
    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='%236b7a93' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    right 10px center / 12px no-repeat;
  border: 1px solid var(--border); border-radius: 9px;
  padding: 7px 32px 7px 12px;
  font-size: 13.5px; color: var(--text-2); cursor: pointer;
}
.select:hover { border-color: var(--border-strong); }
.select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47, 91, 255, .10); }

/* ---- table ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.table thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  text-align: left; padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.table thead th:hover { color: var(--text); }
.table thead th.num { text-align: right; }
.table thead th.sorted-asc, .table thead th.sorted-desc { color: var(--primary); }
.table thead th.sorted-asc::after  { content: " ↑"; }
.table thead th.sorted-desc::after { content: " ↓"; }
.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px; vertical-align: middle; color: var(--text-2);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: #fafbff; }
.table .num { text-align: right; }
.table .empty { text-align: center; padding: 32px; color: var(--text-muted); }

.ex { display: inline-flex; align-items: center; gap: 10px; }
.ex__logo {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4338ca; font-size: 10.5px; font-weight: 600;
  display: grid; place-items: center; letter-spacing: .02em;
  flex-shrink: 0;
}
.ex__logo--img {
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden; padding: 2px;
}
.ex__logo--img img { width: 100%; height: 100%; display: block; object-fit: contain; }
.ex__name { font-weight: 500; color: var(--text); }
.ex__name:hover { color: var(--primary); }

.score {
  display: inline-block;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.score--top  { background: #ecfdf5; color: #047857; }
.score--high { background: #d1fae5; color: #065f46; }
.score--mid  { background: #eff6ff; color: #1e40af; }
.score--ok   { background: #fef3c7; color: #92400e; }
.score--low  { background: #fee2e2; color: #991b1b; }

.pager {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 14px; margin-top: 16px;
  font-size: 13px;
}

/* ---- newsletter ---- */
.newsletter {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 280px at 0% 100%, rgba(47, 91, 255, .12), transparent 60%),
    radial-gradient(600px 240px at 100% 0%, rgba(124, 92, 255, .10), transparent 65%),
    linear-gradient(180deg, #f7f8ff 0%, #f1f3fb 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 28px; align-items: center;
  margin-bottom: 22px; box-shadow: var(--shadow-xs);
}
.newsletter h2 {
  font-family: "Manrope", "Inter", sans-serif;
  margin: 0 0 6px; font-size: 22px; font-weight: 600;
  letter-spacing: -.018em;
}
.newsletter p { margin: 0; color: var(--text-muted); max-width: 620px; line-height: 1.65; }
.newsletter__form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.newsletter__form input {
  min-width: 280px; padding: 11px 14px;
  border: 1px solid var(--border); background: #fff;
  border-radius: 10px;
  font-size: 14px; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.newsletter__form input:focus {
  outline: 0; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 91, 255, .10);
}
.newsletter__form .ok { color: var(--green); font-size: 13px; font-weight: 500; }

/* ---- disclaimer ---- */
.disclaimer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-xs);
}
.disclaimer h3 {
  margin: 0 0 8px; font-size: 11.5px;
  color: var(--text-muted); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
.disclaimer p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.75; }

.appfoot {
  max-width: var(--container); margin: 0 auto; width: 100%;
  padding: 24px 28px 36px;
  color: var(--text-soft); font-size: 12px;
  display: flex; justify-content: space-between; gap: 12px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 32px 24px 56px; gap: 32px; }
  .hero__art { height: 420px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .card__head { flex-direction: column; align-items: flex-start; }
  .toolbar { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .newsletter { grid-template-columns: 1fr; padding: 24px; }
  .topbar { grid-template-columns: auto auto; gap: 12px; }
  .topbar__nav { display: none; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px 16px; }
  .stat-card__value { font-size: 22px; }
  .table thead th, .table tbody td { padding: 10px 12px; font-size: 12.5px; }
  .ex__logo { display: none; }
  .container { padding: 22px 18px; }
  .landing-nav, .landing-foot { padding-left: 18px; padding-right: 18px; }
  .hero { padding: 18px 18px 40px; }
  .hero__features li { padding: 10px 12px; }
  .ranking-card { right: 0; width: 200px; }
  .spark-card { width: 180px; }
  .lang-btn__label { display: none; }
  .lang-btn { padding: 7px 8px; }
}
