/*
 * CoinBatmi Pro v18 — Premium Design System
 * "Precision Intelligence" — Terminal-grade crypto platform
 * Glassnode × Linear × Bloomberg Terminal aesthetic
 * ─────────────────────────────────────────────────────────────
 */

/* ════════════════════════════════════════════════════════════
   FONTS — Syne (Display) · DM Sans (Body) · JetBrains Mono (Data)
════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ════════════════════════════════════════════════════════════
   V18 TOKEN OVERRIDES — Deeper, Richer, More Dramatic
════════════════════════════════════════════════════════════ */
:root {
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Light Mode Refinements */
  --bg-canvas:    #f4f6fb;
  --bg-white:     #ffffff;
  --bg-subtle:    #eef0f7;
  --bg-muted:     #e3e7f0;
  --border:       #d8dde9;
  --border-hover: #c2c9d8;
  --text-primary:   #0a0f1e;
  --text-secondary: #374263;
  --text-muted:     #697089;
  --text-faint:     #9ba3bc;

  /* Orange-Blue Dual Accent System */
  --accent:         #2563eb;
  --accent-hover:   #1d4ed8;
  --accent-light:   #eff6ff;
  --accent-mid:     rgba(37, 99, 235, .09);
  --accent-border:  rgba(37, 99, 235, .22);
  --accent-glow:    rgba(37, 99, 235, .20);
  --btc-accent:     #f7931a;
  --btc-hover:      #e8841a;
  --btc-mid:        rgba(247, 147, 26, .10);
  --btc-border:     rgba(247, 147, 26, .25);
  --btc-glow:       rgba(247, 147, 26, .18);

  /* Radius — Slightly sharper in v18 */
  --r-xs:  3px;
  --r-sm:  5px;
  --r:     7px;
  --r-md:  10px;
  --r-lg:  13px;
  --r-xl:  18px;
  --r-2xl: 24px;

  /* Shadows — deeper */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.03);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.11), 0 4px 16px rgba(0,0,0,.06);
  --shadow-xl: 0 24px 80px rgba(0,0,0,.14), 0 8px 24px rgba(0,0,0,.08);
  --shadow-accent: 0 4px 24px var(--accent-glow), 0 1px 4px rgba(37,99,235,.15);
  --shadow-btc:    0 4px 24px var(--btc-glow);

  /* ── V18 New Tokens ── */
  --header-h:     62px;
  --topbar-h:     34px;
  --topbar-bg:    #0a0f1e;
  --grid-line:    rgba(0,0,0,.05);

  --transition:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ════════════════════════════════════════════════════════════
   DARK MODE V18 — Deeper Void, Richer Glows
════════════════════════════════════════════════════════════ */
[data-theme="dark"],
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-canvas:    #070b12;
    --bg-white:     #0d1220;
    --bg-subtle:    #111827;
    --bg-muted:     #1a2236;
    --bg-overlay:   rgba(0,0,0,.80);
    --text-primary:   #e8edf8;
    --text-secondary: #8b96b2;
    --text-muted:     #5a6480;
    --text-faint:     #2e3552;
    --border:         #1a2236;
    --border-hover:   #243050;
    --accent:         #3b82f6;
    --accent-hover:   #60a5fa;
    --accent-light:   rgba(59, 130, 246, .08);
    --accent-mid:     rgba(59, 130, 246, .09);
    --accent-border:  rgba(59, 130, 246, .22);
    --accent-glow:    rgba(59, 130, 246, .20);
    --btc-accent:     #f7931a;
    --btc-mid:        rgba(247, 147, 26, .08);
    --btc-border:     rgba(247, 147, 26, .22);
    --btc-glow:       rgba(247, 147, 26, .18);
    --bull:          #22c55e;
    --bull-light:    rgba(34, 197, 94, .08);
    --bull-mid:      rgba(34, 197, 94, .08);
    --bear:          #ef4444;
    --bear-light:    rgba(239, 68, 68, .08);
    --bear-mid:      rgba(239, 68, 68, .08);
    --neut:          #eab308;
    --shadow-xs: 0 1px 3px rgba(0,0,0,.5);
    --shadow-sm: 0 2px 10px rgba(0,0,0,.55);
    --shadow-md: 0 4px 28px rgba(0,0,0,.60);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.65);
    --shadow-xl: 0 24px 80px rgba(0,0,0,.70);
    --shadow-accent: 0 0 24px rgba(59,130,246,.22), 0 4px 20px rgba(59,130,246,.12);
    --shadow-btc:    0 0 24px rgba(247,147,26,.20), 0 4px 20px rgba(247,147,26,.10);
    --grid-line:    rgba(255,255,255,.03);
    --hover-bg:     rgba(255, 255, 255, 0.04);
    --bg-glass:     rgba(13, 18, 32, 0.60);
    --border-glass: rgba(255, 255, 255, 0.07);
    --topbar-bg:    #04070e;
  }
}

[data-theme="dark"] {
  --bg-canvas:    #070b12;
  --bg-white:     #0d1220;
  --bg-subtle:    #111827;
  --bg-muted:     #1a2236;
  --text-primary:   #e8edf8;
  --text-secondary: #8b96b2;
  --text-muted:     #5a6480;
  --text-faint:     #2e3552;
  --border:         #1a2236;
  --border-hover:   #243050;
  --accent:         #3b82f6;
  --accent-hover:   #60a5fa;
  --accent-light:   rgba(59, 130, 246, .08);
  --accent-mid:     rgba(59, 130, 246, .09);
  --accent-border:  rgba(59, 130, 246, .22);
  --accent-glow:    rgba(59, 130, 246, .20);
  --btc-accent:     #f7931a;
  --btc-mid:        rgba(247, 147, 26, .08);
  --btc-border:     rgba(247, 147, 26, .22);
  --btc-glow:       rgba(247, 147, 26, .18);
  --bull:          #22c55e;
  --bull-light:    rgba(34, 197, 94, .08);
  --bull-mid:      rgba(34, 197, 94, .08);
  --bear:          #ef4444;
  --bear-light:    rgba(239, 68, 68, .08);
  --bear-mid:      rgba(239, 68, 68, .08);
  --neut:          #eab308;
  --shadow-accent: 0 0 24px rgba(59,130,246,.22), 0 4px 20px rgba(59,130,246,.12);
  --shadow-btc:    0 0 24px rgba(247,147,26,.20), 0 4px 20px rgba(247,147,26,.10);
  --grid-line:    rgba(255,255,255,.03);
  --hover-bg:     rgba(255, 255, 255, 0.04);
  --bg-glass:     rgba(13, 18, 32, 0.60);
  --border-glass: rgba(255, 255, 255, 0.07);
  --topbar-bg:    #04070e;
}

/* ════════════════════════════════════════════════════════════
   BASE TYPOGRAPHY — V18
════════════════════════════════════════════════════════════ */
body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-weight: 700;
}

.price, .data-val, .mono, [class*="stat-val"], [class*="price"],
.coin-price, .change-pct { font-family: var(--font-mono); }

/* ════════════════════════════════════════════════════════════
   MARKET TOPBAR — Premium Dark Strip
════════════════════════════════════════════════════════════ */
.market-topbar {
  background: var(--topbar-bg);
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(59, 130, 246, .12);
  position: relative;
  overflow: hidden;
}

/* Subtle scanline texture */
.market-topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,.008) 2px,
    rgba(255,255,255,.008) 4px
  );
  pointer-events: none;
}

/* Bitcoin orange accent line at top */
.market-topbar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(247,147,26,.6) 25%,
    rgba(59,130,246,.6) 50%,
    rgba(247,147,26,.6) 75%,
    transparent 100%
  );
}

.market-topbar .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.topbar-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 100%;
  border-right: 1px solid rgba(255,255,255,.05);
  white-space: nowrap;
}

.topbar-stat:first-child { padding-left: 0; }

.topbar-stat-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
  font-family: var(--font-mono);
}

.topbar-stat-val {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

.topbar-stat-chg {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.topbar-stat-chg.up   { color: #22c55e; }
.topbar-stat-chg.down { color: #ef4444; }

/* Live badge */
.topbar-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #22c55e;
  padding: 0 12px;
  flex-shrink: 0;
}

.live-dot {
  width: 5px;
  height: 5px;
  background: #22c55e;
  border-radius: 50%;
  animation: livePulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 5px #22c55e;
  flex-shrink: 0;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 5px #22c55e; }
  50% { opacity: .5; box-shadow: 0 0 2px #22c55e; }
}

/* Ticker */
.topbar-ticker {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.ticker-track {
  display: flex;
  gap: 28px;
  animation: ticker 40s linear infinite;
  width: max-content;
  align-items: center;
  height: 100%;
}

@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.ticker-track:hover { animation-play-state: paused; }

.ticker-coin {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 4px;
}

.ticker-coin-sym {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.ticker-coin-price {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  font-family: var(--font-mono);
}

.ticker-coin-chg {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
}

.ticker-coin-chg.up   { color: #22c55e; background: rgba(34,197,94,.10); }
.ticker-coin-chg.down { color: #ef4444; background: rgba(239,68,68,.10); }

/* ════════════════════════════════════════════════════════════
   SITE HEADER V18 — Glass + Gradient Border
════════════════════════════════════════════════════════════ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--transition),
              box-shadow 0.3s var(--transition),
              border-color 0.3s var(--transition);
  backdrop-filter: none;
}

#site-header.scrolled {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,.07);
}

[data-theme="dark"] #site-header.scrolled {
  background: rgba(13, 18, 32, .88);
}

/* Rainbow border at bottom of header */
#site-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    var(--border) 0%,
    var(--accent-border) 30%,
    rgba(247,147,26,.3) 55%,
    var(--accent-border) 70%,
    var(--border) 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

#site-header.scrolled::after { opacity: 1; }

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 0;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 32px;
}

.logo-mark {
  width: 33px;
  height: 33px;
  background: linear-gradient(135deg, var(--btc-accent), #e87c16);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
  box-shadow: 0 2px 12px var(--btc-glow), 0 1px 3px rgba(0,0,0,.15);
  transition: box-shadow 0.2s;
  flex-shrink: 0;
}

.site-logo:hover .logo-mark {
  box-shadow: 0 4px 20px var(--btc-glow), 0 2px 6px rgba(0,0,0,.2);
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.02em;
  line-height: 1;
}

.logo-name span { color: var(--btc-accent); }

.logo-tagline {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Primary Nav */
.primary-nav { flex: 1; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  position: relative;
  white-space: nowrap;
}

.nav-link svg { width: 15px; height: 15px; flex-shrink: 0; opacity: .7; }

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-mid);
}

.nav-link.active svg { opacity: 1; stroke: var(--accent); }

/* Live dot on News */
.nav-live-dot {
  width: 5px;
  height: 5px;
  background: #22c55e;
  border-radius: 50%;
  animation: livePulse 1.8s ease-in-out infinite;
  margin-left: 1px;
}

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.18s var(--transition),
              visibility 0.18s,
              transform 0.18s var(--transition);
  z-index: 600;
}

.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.nav-dropdown a:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.nav-dropdown a svg { color: var(--text-muted); flex-shrink: 0; }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
}

.btn-icon-nav {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-icon-nav svg { width: 17px; height: 17px; }

.btn-icon-nav:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.btn-subscribe {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 10px var(--accent-glow);
  margin-left: 4px;
  white-space: nowrap;
}

.btn-subscribe svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-subscribe:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
}

.mobile-menu-btn svg { width: 17px; height: 17px; }

/* Mobile nav overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(320px, 90vw);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s var(--transition);
  box-shadow: var(--shadow-xl);
}

.mobile-nav-overlay.open .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.mobile-nav-logo span { color: var(--btc-accent); }

.mobile-nav-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  border: none;
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.mobile-nav-links a:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.mobile-nav-links a svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   PREMIUM CARD SYSTEM V18
════════════════════════════════════════════════════════════ */
.cb-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: box-shadow 0.22s var(--transition),
              border-color 0.22s var(--transition),
              transform 0.22s var(--transition);
  position: relative;
  overflow: hidden;
}

.cb-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Glow variant */
.cb-card--glow:hover {
  box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
  border-color: var(--accent-border);
}

/* BTC glow variant */
.cb-card--btc:hover {
  box-shadow: var(--shadow-btc);
  border-color: var(--btc-border);
}

/* ════════════════════════════════════════════════════════════
   HERO SLIDER V18 — Cinematic Upgrade
════════════════════════════════════════════════════════════ */
.cb-hero-slider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: #040810;
}

@media (max-width: 900px) { .cb-hero-slider { height: 380px; } }
@media (max-width: 600px) { .cb-hero-slider { height: 300px; } }

.cb-slide-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 8s ease;
  filter: brightness(0.75);
}

.cb-slide.active .cb-slide-img {
  transform: scale(1);
}

.cb-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(4,8,16,.96) 0%, rgba(4,8,16,.7) 45%, rgba(4,8,16,.15) 100%),
    linear-gradient(to top, rgba(4,8,16,.6) 0%, transparent 40%);
}

.cb-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 42%;
  padding: 40px 48px;
  z-index: 2;
}

@media (max-width: 900px) {
  .cb-slide-content {
    right: 0;
    padding: 20px 20px;
    background: linear-gradient(to top, rgba(4,8,16,.95) 0%, transparent 100%);
  }
}

.cb-slide-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--btc-accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
}

.cb-slide-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: #fff;
  margin-bottom: 12px;
}

.cb-slide-title a { color: inherit; text-decoration: none; }
.cb-slide-title a:hover { color: rgba(255,255,255,.8); }

.cb-slide-excerpt {
  font-size: 13.5px;
  color: rgba(255,255,255,.62);
  line-height: 1.65;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 440px;
}

@media (max-width: 600px) { .cb-slide-excerpt { display: none; } }

.cb-slide-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cb-slide-date {
  font-size: 11px;
  color: rgba(255,255,255,.38);
  font-family: var(--font-mono);
}

.cb-slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  padding: 8px 18px;
  border-radius: var(--r);
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
  backdrop-filter: blur(6px);
}

.cb-slide-btn:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.3);
}

/* Slider controls */
.cb-slider-dots {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  gap: 5px;
  z-index: 10;
}

.cb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s var(--transition);
}

.cb-dot.active {
  background: var(--btc-accent);
  width: 24px;
  border-radius: 3px;
  box-shadow: 0 0 8px var(--btc-glow);
}

.cb-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.75);
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.18s, border-color 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.cb-slider-arrow:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.25);
}

.cb-slider-prev { left: 16px; }
.cb-slider-next { right: 16px; }

@media (max-width: 600px) { .cb-slider-arrow { display: none; } }

/* ════════════════════════════════════════════════════════════
   INTELLIGENCE HERO V18 — Refined Stat Tiles
════════════════════════════════════════════════════════════ */
.intelligence-hero {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.intelligence-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 0% 50%, var(--accent-mid) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 50%, var(--btc-mid) 0%, transparent 55%);
  pointer-events: none;
}

/* Grid dot pattern */
.intelligence-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.intel-hero-grid {
  display: grid;
  /* Fluid: tiles shrink gracefully, dividers removed from markup with CSS */
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  position: relative;
  z-index: 1;
  /* Prevent any tile from overflowing the container */
  overflow: hidden;
  width: 100%;
}

.intel-hero-divider {
  display: none; /* Replaced by border-right on tiles — far safer across widths */
}

.intel-tile {
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  transition: background 0.18s;
  border-right: 1px solid var(--border);
  min-width: 0; /* Prevent flex/grid blowout */
  overflow: hidden;
}

.intel-tile:last-child { border-right: none; }

.intel-tile:hover { background: var(--hover-bg); }

.intel-tile-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 5px;
}

.intel-tile-label svg { width: 10px; height: 10px; }

.intel-tile-value {
  font-size: clamp(16px, 2vw, 24px); /* Fluid — never overflows */
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.03em;
  line-height: 1;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intel-tile-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Badge system */
.intel-tile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  width: fit-content;
}

.intel-tile-badge.bullish, .intel-tile-badge.up, .intel-tile-badge.low {
  background: var(--bull-mid); color: var(--bull);
}
.intel-tile-badge.bearish, .intel-tile-badge.down, .intel-tile-badge.high {
  background: var(--bear-mid); color: var(--bear);
}
.intel-tile-badge.neutral, .intel-tile-badge.sideways, .intel-tile-badge.medium {
  background: var(--bg-subtle); color: var(--text-muted);
}

/* AI Headline tile */
.intel-tile--headline .intel-tile-value {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.4;
  font-family: var(--font-body);
}

/* ════════════════════════════════════════════════════════════
   COIN CARDS V18 — Premium Fintech
════════════════════════════════════════════════════════════ */
.mini-coin-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.2s var(--transition),
              border-color 0.2s var(--transition),
              transform 0.2s var(--transition);
  position: relative;
  overflow: hidden;
}

/* Subtle left accent bar */
.mini-coin-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2.5px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.18s;
}

.mini-coin-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.mini-coin-card:hover::before { opacity: 1; }

.mini-coin-card.up::before { background: var(--bull); }
.mini-coin-card.down::before { background: var(--bear); }

.mini-coin-card.up:hover   { border-color: rgba(34,197,94,.2); box-shadow: 0 4px 20px rgba(34,197,94,.08); }
.mini-coin-card.down:hover { border-color: rgba(239,68,68,.2); box-shadow: 0 4px 20px rgba(239,68,68,.08); }

.coin-card-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}

.coin-card-info { flex: 1; min-width: 0; }

.coin-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coin-card-symbol {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--font-mono);
}

.coin-card-price {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  letter-spacing: -.01em;
}

.coin-card-change {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  padding: 2px 6px;
  border-radius: var(--r-sm);
}

.coin-card-change.up   { color: var(--bull); background: var(--bull-mid); }
.coin-card-change.down { color: var(--bear); background: var(--bear-mid); }

/* Sparkline */
.coin-card-spark {
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   NEWS CARDS V18 — Editorial Quality
════════════════════════════════════════════════════════════ */
.news-card--v17,
.news-card--v18 {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow 0.22s var(--transition),
              border-color 0.22s var(--transition),
              transform 0.22s var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card--v17:hover,
.news-card--v18:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Thumbnail hover zoom */
.news-card--v18 .nc-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.news-card--v18 .nc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--transition);
}

.news-card--v18:hover .nc-thumb img {
  transform: scale(1.04);
}

.news-card--v18 .nc-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(4,8,16,.82);
  color: rgba(255,255,255,.88);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  backdrop-filter: blur(4px);
  font-family: var(--font-mono);
}

.news-card--v18 .nc-body {
  padding: 14px 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card--v18 .nc-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: -.01em;
  flex: 1;
}

.news-card--v18 .nc-title a {
  color: inherit;
  text-decoration: none;
}

.news-card--v18 .nc-title a:hover { color: var(--accent); }

.news-card--v18 .nc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.news-card--v18 .nc-date,
.news-card--v17 .nc-date {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.news-card--v18 .nc-source {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: var(--r-sm);
}

/* ════════════════════════════════════════════════════════════
   MARKET HEATMAP V18 — Deeper Colors, Better Contrast
════════════════════════════════════════════════════════════ */
.market-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

@media (max-width: 900px) { .market-heatmap-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .market-heatmap-grid { grid-template-columns: repeat(3, 1fr); } }

.market-heatmap-card {
  border-radius: var(--r);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 68px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--transition), filter 0.18s;
  position: relative;
  overflow: hidden;
}

.market-heatmap-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.07) 0%, transparent 60%);
  pointer-events: none;
}

.market-heatmap-card:hover {
  transform: scale(1.04);
  filter: brightness(1.08);
  z-index: 1;
}

.market-heatmap-card.up {
  background: linear-gradient(135deg, #166534 0%, #14532d 100%);
}

.market-heatmap-card.down {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

.market-heatmap-card.neut {
  background: linear-gradient(135deg, #78350f 0%, #713f12 100%);
}

/* Intensity variants */
.market-heatmap-card.up.hi { background: linear-gradient(135deg, #15803d 0%, #166534 100%); }
.market-heatmap-card.up.lo { background: linear-gradient(135deg, #14532d 0%, #052e16 100%); }
.market-heatmap-card.down.hi { background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%); }
.market-heatmap-card.down.lo { background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%); }

.market-heatmap-sym {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,.92);
  letter-spacing: .03em;
  font-family: var(--font-mono);
}

.market-heatmap-change {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  font-family: var(--font-mono);
}

.market-heatmap-name {
  font-size: 9px;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   SECTION HEADERS V18
════════════════════════════════════════════════════════════ */
.section-header--v18 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.section-header--v18 h2, .section-header--v18 h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.03em;
}

.section-header--v17 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.section-badge--live {
  background: rgba(34,197,94,.10);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,.2);
}

.section-badge--ai {
  background: var(--accent-mid);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.section-badge--btc {
  background: var(--btc-mid);
  color: var(--btc-accent);
  border: 1px solid var(--btc-border);
}

/* ════════════════════════════════════════════════════════════
   PRICE / DATA VALUES — Glow on Change
════════════════════════════════════════════════════════════ */
@keyframes priceUp {
  0%   { background: rgba(34,197,94,.25); color: #22c55e; }
  100% { background: transparent; color: inherit; }
}

@keyframes priceDown {
  0%   { background: rgba(239,68,68,.25); color: #ef4444; }
  100% { background: transparent; color: inherit; }
}

.price-flash-up   { animation: priceUp   0.6s ease-out; }
.price-flash-down { animation: priceDown 0.6s ease-out; }

/* Percentage changes */
.pct-up   { color: var(--bull); font-family: var(--font-mono); font-weight: 600; }
.pct-down { color: var(--bear); font-family: var(--font-mono); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   GLOBAL SEARCH V18 — Premium Modal
════════════════════════════════════════════════════════════ */
.global-search-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
  opacity: 0;
  transition: opacity 0.2s;
}

.global-search-modal.open { opacity: 1; }

.gs-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 580px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.2s var(--spring);
}

.global-search-modal.open .gs-panel {
  transform: translateY(0) scale(1);
}

.gs-header {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.gs-icon { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

.gs-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.gs-input::placeholder { color: var(--text-muted); }

.gs-esc {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.gs-body { max-height: 60vh; overflow-y: auto; padding: 6px; }

.gs-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

.gs-section-title {
  padding: 10px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .08em;
  font-family: var(--font-mono);
}

.gs-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--r);
  text-decoration: none;
  gap: 11px;
  transition: background 0.12s;
}

.gs-item:hover { background: var(--hover-bg); }

.gs-item-img { border-radius: 50%; }

.gs-item-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.gs-item-sym { font-size: 10px; color: var(--text-muted); text-transform: uppercase; font-family: var(--font-mono); }
.gs-item-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }

.gs-item-rank {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
}

/* ════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV V18
════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 400;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    height: 58px;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mbn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 0;
    flex: 1;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .03em;
    transition: color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
  }

  .mbn-item svg { width: 21px; height: 21px; flex-shrink: 0; }

  .mbn-item.active, .mbn-item:hover { color: var(--accent); }
  .mbn-item.active svg { stroke: var(--accent); }

  /* Special AI button */
  #mbn-ai-btn {
    color: var(--btc-accent);
    position: relative;
  }

  #mbn-ai-btn::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background: var(--btc-mid);
    border-radius: 50%;
    z-index: -1;
  }

  body { padding-bottom: 58px !important; }
  .mobile-menu-btn { display: flex; }
}

/* ════════════════════════════════════════════════════════════
   SIGNAL / SMART TAG SYSTEM V18 — Bolder
════════════════════════════════════════════════════════════ */
.smart-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 7px;
  border-radius: var(--r-full);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
  transition: opacity 0.15s, transform 0.15s;
  font-family: var(--font-mono);
}

.smart-tag svg { width: 9px; height: 9px; flex-shrink: 0; }
.smart-tag:hover { opacity: .8; transform: scale(1.02); }

.smart-tag--whale        { background: rgba(56,189,248,.10); color: #0ea5e9; border-color: rgba(56,189,248,.22); }
.smart-tag--regulation   { background: rgba(245,158,11,.10); color: #d97706; border-color: rgba(245,158,11,.22); }
.smart-tag--institutional{ background: rgba(124,58,237,.10); color: #7c3aed; border-color: rgba(124,58,237,.22); }
.smart-tag--bullish      { background: rgba(34,197,94,.10);  color: #16a34a; border-color: rgba(34,197,94,.22); }
.smart-tag--warning      { background: rgba(239,68,68,.10);  color: #dc2626; border-color: rgba(239,68,68,.22); }
.smart-tag--defi         { background: rgba(99,102,241,.10); color: #6366f1; border-color: rgba(99,102,241,.22); }
.smart-tag--airdrop      { background: rgba(236,72,153,.10); color: #db2777; border-color: rgba(236,72,153,.22); }
.smart-tag--nft          { background: rgba(251,191,36,.10); color: #d97706; border-color: rgba(251,191,36,.22); }
.smart-tag--layer2       { background: rgba(20,184,166,.10); color: #0d9488; border-color: rgba(20,184,166,.22); }
.smart-tag--ai           { background: rgba(139,92,246,.10); color: #7c3aed; border-color: rgba(139,92,246,.22); }
.smart-tag--hack         { background: rgba(239,68,68,.14);  color: #b91c1c; border-color: rgba(239,68,68,.28); }
.smart-tag--gamefi       { background: rgba(34,211,238,.10); color: #0891b2; border-color: rgba(34,211,238,.22); }

[data-theme="dark"] .smart-tag--whale        { color: #38bdf8; }
[data-theme="dark"] .smart-tag--regulation   { color: #fbbf24; }
[data-theme="dark"] .smart-tag--institutional{ color: #a78bfa; }
[data-theme="dark"] .smart-tag--bullish      { color: #22c55e; }
[data-theme="dark"] .smart-tag--warning      { color: #ef4444; }
[data-theme="dark"] .smart-tag--defi         { color: #818cf8; }
[data-theme="dark"] .smart-tag--hack         { color: #f87171; }

/* ════════════════════════════════════════════════════════════
   LOADING / SKELETON STATES V18
════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(
    90deg,
    var(--bg-subtle) 0%,
    var(--bg-muted) 50%,
    var(--bg-subtle) 100%
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* ════════════════════════════════════════════════════════════
   BUTTONS — V18 System
════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px var(--accent-glow);
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: var(--font-body);
}

.btn-outline:hover {
  background: var(--hover-bg);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: none;
  color: var(--accent);
  border: none;
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-body);
  text-decoration: none;
}

.btn-ghost:hover { background: var(--accent-mid); }

/* ════════════════════════════════════════════════════════════
   FOOTER V18 — Premium
════════════════════════════════════════════════════════════ */
#site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding-top: 56px;
  position: relative;
  overflow: hidden;
}

/* Ambient glow */
#site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse, var(--accent-mid) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px 48px;
  padding-bottom: 48px;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 10px;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.01em;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  line-height: 1;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.social-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.social-btn svg { width: 15px; height: 15px; }

.social-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; text-align: center; }
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom a:hover { color: var(--text-primary); }

/* ════════════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON
════════════════════════════════════════════════════════════ */
.scroll-top-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s, visibility 0.22s, transform 0.22s, box-shadow 0.2s;
  z-index: 300;
  box-shadow: var(--shadow-sm);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.scroll-top-btn svg { width: 16px; height: 16px; }

@media (min-width: 901px) { .scroll-top-btn { bottom: 24px; } }

/* ════════════════════════════════════════════════════════════
   PAGE TRANSITIONS & ENTRY ANIMATIONS
════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-in {
  animation: fadeUp 0.5s var(--transition) both;
}

.animate-in-1 { animation-delay: 0.05s; }
.animate-in-2 { animation-delay: 0.10s; }
.animate-in-3 { animation-delay: 0.15s; }
.animate-in-4 { animation-delay: 0.20s; }

/* ════════════════════════════════════════════════════════════
   CONTAINER & LAYOUT UTILITIES
════════════════════════════════════════════════════════════ */
.container {
  max-width: var(--max-w, 1360px);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 600px) { .container { padding: 0 14px; } }

.section-pad { padding: var(--section-gap, 56px) 0; }
.section-pad-sm { padding: 32px 0; }

/* Grid layouts */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-main-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) { .grid-main-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════════════════════
   FOCUS / ACCESSIBILITY
════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-to-main {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 var(--r) var(--r);
}

.skip-to-main:focus {
  left: 50%;
  transform: translateX(-50%);
  outline: none;
}

/* ════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-canvas); }
::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE HEADER
════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .primary-nav { display: none; }
  .btn-subscribe span { display: none; }
  .btn-subscribe { padding: 7px; width: 34px; justify-content: center; }
  .mobile-menu-btn { display: flex; }
}

@media (max-width: 600px) {
  .btn-subscribe { display: none; }
  .logo-tagline { display: none; }
}

/* ════════════════════════════════════════════════════════════
   v19 INTELLIGENCE FEED — News Cards
════════════════════════════════════════════════════════════ */
.cb-news-card{background:var(--bg-white);border:1px solid var(--border);border-radius:14px;overflow:hidden;transition:box-shadow .18s,border-color .18s,transform .18s}
.cb-news-card:hover{box-shadow:0 4px 24px rgba(0,0,0,.12);border-color:var(--accent);transform:translateY(-1px)}
[data-theme="dark"] .cb-news-card:hover{box-shadow:0 4px 24px rgba(0,0,0,.4)}
.cb-news-card__inner{display:flex;align-items:stretch;gap:0}
.cb-news-card__body{flex:1;min-width:0;padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.cb-news-card__top{display:flex;align-items:center;flex-wrap:wrap;gap:5px}

/* Category pills */
.cb-cat-pill{display:inline-flex;align-items:center;gap:3px;font-size:9px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;padding:3px 8px;border-radius:20px;border:1px solid transparent;white-space:nowrap}
.cb-cat--bitcoin{background:rgba(247,147,26,.12);color:#f7931a;border-color:rgba(247,147,26,.25)}
.cb-cat--ethereum{background:rgba(98,126,234,.12);color:#627eea;border-color:rgba(98,126,234,.25)}
.cb-cat--defi{background:rgba(16,185,129,.12);color:#10b981;border-color:rgba(16,185,129,.25)}
.cb-cat--altcoins{background:rgba(139,92,246,.12);color:#8b5cf6;border-color:rgba(139,92,246,.25)}
.cb-cat--regulation{background:rgba(239,68,68,.12);color:#ef4444;border-color:rgba(239,68,68,.25)}
.cb-cat--markets{background:rgba(99,102,241,.12);color:#6366f1;border-color:rgba(99,102,241,.25)}
.cb-cat--macro{background:rgba(107,114,128,.12);color:#6b7280;border-color:rgba(107,114,128,.25)}
.cb-cat--nfts{background:rgba(236,72,153,.12);color:#ec4899;border-color:rgba(236,72,153,.25)}
.cb-cat--layer2,.cb-cat--layer-2{background:rgba(6,182,212,.12);color:#06b6d4;border-color:rgba(6,182,212,.25)}
.cb-cat--mining{background:rgba(245,158,11,.12);color:#d97706;border-color:rgba(245,158,11,.25)}
.cb-cat--ai{background:rgba(14,165,233,.12);color:#0ea5e9;border-color:rgba(14,165,233,.25)}
.cb-cat--web3{background:rgba(168,85,247,.12);color:#a855f7;border-color:rgba(168,85,247,.25)}
.cb-cat--security{background:rgba(239,68,68,.12);color:#dc2626;border-color:rgba(239,68,68,.25)}
.cb-cat--crypto-news,.cb-cat--markets{background:rgba(99,102,241,.12);color:#6366f1;border-color:rgba(99,102,241,.25)}

/* Sentiment chips */
.cb-sent-chip{display:inline-flex;align-items:center;gap:2px;font-size:9px;font-weight:700;padding:2px 7px;border-radius:20px}
.cb-sent--bull{background:rgba(16,185,129,.12);color:#10b981}
.cb-sent--bear{background:rgba(239,68,68,.12);color:#ef4444}
.cb-sent--warn{background:rgba(245,158,11,.12);color:#f59e0b}
.cb-sent--neut{background:rgba(100,116,139,.1);color:#64748b}

/* AI engine badge */
.cb-ai-eng-badge{display:inline-flex;align-items:center;font-size:9px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:20px;background:linear-gradient(135deg,rgba(99,102,241,.15),rgba(168,85,247,.15));color:#818cf8;border:1px solid rgba(99,102,241,.2);margin-left:auto}
[data-theme="dark"] .cb-ai-eng-badge{background:linear-gradient(135deg,rgba(99,102,241,.2),rgba(168,85,247,.2));border-color:rgba(99,102,241,.3)}

/* Title */
.cb-news-card__title{font-size:14px;font-weight:700;line-height:1.45;margin:0;color:var(--text-primary)}
.cb-news-card__title a{color:inherit;text-decoration:none}
.cb-news-card__title a:hover{color:var(--accent)}

/* AI-rewritten description */
.cb-news-card__desc{font-size:12px;line-height:1.6;color:var(--text-secondary);margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cb-news-card__desc--ai{color:var(--accent);font-style:italic}

/* Footer row */
.cb-news-card__foot{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:8px;border-top:1px solid var(--border)}
.cb-news-card__meta{display:flex;align-items:center;gap:8px}
.cb-src-lbl{display:inline-flex;align-items:center;gap:4px;font-size:9.5px;font-weight:700;letter-spacing:.06em;color:var(--text-muted);text-transform:uppercase}
.cb-src-lbl svg{opacity:.6}
.cb-time-lbl{font-size:10px;color:var(--text-faint,var(--text-muted));font-variant-numeric:tabular-nums}

/* Impact dots */
.cb-impact{display:flex;align-items:center;gap:3px}
.cb-idot{width:6px;height:6px;border-radius:50%;background:var(--border);transition:background .2s}
.cb-idot--on{background:var(--accent)}
.cb-impact__val{font-size:10px;font-weight:800;margin-left:3px}

/* Thumbnail */
.cb-news-thumb{width:88px;min-width:88px;height:88px;object-fit:cover;border-left:1px solid var(--border);flex-shrink:0;align-self:stretch;display:block}
.cb-news-thumb--icon{display:flex;align-items:center;justify-content:center;font-size:26px;background:var(--bg-canvas);width:88px;min-width:88px;height:88px;border-left:1px solid var(--border)}

/* Responsive — stack on mobile */
@media(max-width:480px){
  .cb-news-card__top{gap:4px}
  .cb-news-card__title{font-size:13px}
  .cb-news-thumb,.cb-news-thumb--icon{width:66px;min-width:66px;height:auto;min-height:80px}
  .cb-ai-eng-badge{display:none}
}

/* ════════════════════════════════════════════════════════════
   v19 MARKETS PAGE — Mobile Improvements
════════════════════════════════════════════════════════════ */
@media(max-width:768px){
  .mk-wrap{padding:0 8px 60px}
  .mk-bar-inner{gap:10px;padding:0 8px}
  .mk-stat{flex-direction:column;align-items:flex-start;gap:1px;min-width:80px}
  .mk-stat-l{font-size:8px}
  .mk-stat-v{font-size:12px}
  .mk-ph{flex-direction:column;gap:10px;align-items:flex-start;padding:10px 8px}
  .mk-ph-right{width:100%;display:flex;gap:6px}
  .mk-ph-right .mk-select{flex:1}
  .mk-ph-right .mk-refbtn{flex-shrink:0}
  .mk-controls{flex-direction:column;gap:8px;padding:8px}
  .mk-cats{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:5px;padding-bottom:2px;scrollbar-width:none}
  .mk-cats::-webkit-scrollbar{display:none}
  .mk-cat{flex-shrink:0;font-size:10px;padding:5px 10px;white-space:nowrap}
  .mk-search-wrap{width:100%}
  .mk-search{width:100%;font-size:13px}
  .mk-view-btns{display:flex;gap:4px;align-self:flex-end}
  /* Table — hide less-critical columns */
  .mk-h-sm{display:none!important}
  /* Card view — 1 column */
  .mk-cards-grid{grid-template-columns:1fr!important}
  /* Modal full-screen on mobile */
  .mk-modal-panel{width:100%!important;max-width:100%!important;border-radius:16px 16px 0 0;align-self:flex-end;max-height:92vh}
  .mk-modal{align-items:flex-end}
  .mk-modal-head{padding:14px 16px}
  .mk-modal-body{padding:0 16px 12px}
  .mk-modal-foot{padding:10px 16px 16px;flex-direction:column}
  .mk-modal-foot .mk-btn-a,.mk-modal-foot .mk-btn-b{width:100%;flex:none}
  .mk-ind-grid{grid-template-columns:1fr 1fr!important}
  /* Ticker scrolls cleanly */
  .mk-ticker{font-size:10px}
  .mk-title{font-size:16px}
  .mk-sub{font-size:11px}
}
@media(max-width:420px){
  .mk-stat{min-width:60px}
  .mk-stat-v{font-size:11px}
  .mk-cat{font-size:9px;padding:4px 8px}
  .mk-ind-grid{grid-template-columns:1fr!important}
  .cb-news-card__body{padding:10px 12px}
  .cb-news-thumb,.cb-news-thumb--icon{width:54px;min-width:54px}
}

/* ════════════════════════════════════════════════════════════
   v19 INTELLIGENCE DB FEED — enhanced layout
════════════════════════════════════════════════════════════ */
.cb-intel-db-wrap{display:flex;flex-direction:column;gap:0}
.cb-intel-db-item{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);text-decoration:none;transition:background .15s;align-items:flex-start}
.cb-intel-db-item:hover{background:var(--bg-canvas)}
.cb-intel-db-item:last-child{border-bottom:none}
.cb-intel-db-num{font-size:11px;font-weight:800;color:var(--text-faint,var(--text-muted));min-width:20px;padding-top:2px;font-variant-numeric:tabular-nums}
.cb-intel-db-body{flex:1;min-width:0}
.cb-intel-db-tags{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.cb-intel-db-title{font-size:13px;font-weight:700;color:var(--text-primary);line-height:1.4;margin-bottom:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cb-intel-db-title:hover{color:var(--accent)}
.cb-intel-db-summary{font-size:11px;color:var(--text-secondary);line-height:1.5;margin-bottom:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cb-intel-db-summary--ai{color:var(--accent);font-style:italic}
.cb-intel-db-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cb-intel-db-src{font-size:9.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}
.cb-intel-db-time{font-size:9.5px;color:var(--text-faint,var(--text-muted))}
.cb-intel-db-eng{font-size:9px;padding:1px 6px;border-radius:10px;background:rgba(99,102,241,.1);color:#818cf8;font-weight:700}
@media(max-width:480px){
  .cb-intel-db-item{padding:10px 12px;gap:8px}
  .cb-intel-db-num{display:none}
}

/* AI Sentiment Badges */
.cb-sentiment{
  display:inline-block;
  margin-left:6px;
  padding:2px 6px;
  border-radius:6px;
  font-size:10px;
  font-weight:600;
  text-transform:uppercase;
}

.cb-sentiment.bullish{
  background:#22c55e;
  color:white;
}

.cb-sentiment.bearish{
  background:#ef4444;
  color:white;
}

.cb-sentiment.neutral{
  background:#f59e0b;
  color:white;
}

