/*
 * CoinBatmi Pro v16 — Main Stylesheet
 * Imports design-system.css first.
 * Full replacement for style.css + all asset CSS files.
 *
 * Theme Name: CoinBatmi Pro
 * Theme URI: https://coinbatmi.com
 * Version: 16.0.0
 * Description: Premium cryptocurrency news & market intelligence — v16 redesign
 * Requires at least: 6.4
 * Text Domain: coinbatmi
 */

@import url('./assets/css/design-system.css');

/* ═══════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--bg-canvas);
  color: var(--text-secondary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 0; /* mobile nav handled per breakpoint */
  transition: background-color var(--t), color var(--t);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { display: block; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ── Skip Link ─────────────────────────────────── */
.skip-to-main {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--r);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: top var(--t-fast);
}
.skip-to-main:focus { top: 16px; }

/* ── Container ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 28px; } }
@media (min-width: 1280px) { .container { padding: 0 40px; } }

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   TOP BAR (market stats + clock — ONE slim bar)
   Replaces: stats-bar + price-ticker (was ~80px total → now 36px)
═══════════════════════════════════════════════════════ */
.market-topbar {
  height: var(--topbar-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 300;
}
.market-topbar .container {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}
.topbar-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  overflow: hidden;
  height: 100%;
}
.topbar-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-right: 1px solid var(--border);
  height: 100%;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-stat:first-child { padding-left: 0; }
.topbar-stat-label {
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.topbar-stat-val {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 600;
  color: var(--text-primary);
}
.topbar-stat-chg {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
.topbar-stat-chg.up { color: var(--bull); }
.topbar-stat-chg.down { color: var(--bear); }

/* Ticker — right side of topbar */
.topbar-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  flex: 1;
  height: 100%;
  position: relative;
}
.topbar-ticker::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, var(--bg-white), transparent);
  z-index: 2;
  pointer-events: none;
}
.topbar-ticker::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(-90deg, var(--bg-white), transparent);
  z-index: 2;
  pointer-events: none;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 28px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
  padding: 0 20px;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.topbar-ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-coin {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
}
.ticker-coin-sym { font-weight: 700; color: var(--text-primary); }
.ticker-coin-price { color: var(--text-secondary); }
.ticker-coin-chg { font-weight: 700; font-size: 10px; }
.ticker-coin-chg.up { color: var(--bull); }
.ticker-coin-chg.down { color: var(--bear); }
.topbar-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  height: 100%;
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bull);
  flex-shrink: 0;
  animation: live-pulse 2.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ═══════════════════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════════════════ */
#site-header {
  position: sticky;
  top: var(--topbar-h);
  z-index: 200;
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t);
}
#site-header.scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

/* ── Logo ──────────────────────────────────── */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.logo-wordmark { line-height: 1.15; }
.logo-name {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 17px;
  color: var(--text-primary);
  letter-spacing: -.03em;
}
.logo-name span { color: var(--accent); }
.logo-tagline {
  display: block;
  font-size: var(--text-2xs);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── 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: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.nav-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-link:hover,
.nav-link.active { background: var(--bg-subtle); color: var(--text-primary); }
.nav-link.active { color: var(--accent); }

/* Live dot on News */
.nav-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bull);
  margin-left: 2px;
  animation: live-pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* Tools Dropdown */
.nav-has-dropdown { position: relative; }
.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: 200px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
  z-index: 100;
}
.nav-has-dropdown .nav-link[aria-expanded="true"] + .nav-dropdown,
.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-dropdown a:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* ── Header Actions ─────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-icon-nav {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.btn-icon-nav:hover { background: var(--bg-subtle); color: var(--text-primary); }
.btn-icon-nav svg { width: 18px; height: 18px; }
.btn-subscribe {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn-subscribe:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}
.btn-subscribe svg { width: 13px; height: 13px; }

/* Mobile Menu Toggle */
.mobile-menu-btn { display: none; }
@media (max-width: 900px) {
  .primary-nav { display: none; }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--r);
    background: var(--bg-subtle);
    color: var(--text-primary);
  }
  .mobile-menu-btn svg { width: 20px; height: 20px; }
}
@media (max-width: 640px) { .btn-subscribe span { display: none; } }

/* ═══════════════════════════════════════════════════════
   MOBILE NAV OVERLAY
═══════════════════════════════════════════════════════ */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t), visibility var(--t);
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }
.mobile-nav-panel {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(320px, 88vw);
  background: var(--bg-white);
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--t) var(--ease);
}
.mobile-nav-overlay.open .mobile-nav-panel { transform: none; }
.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r);
  background: var(--bg-subtle);
  color: var(--text-muted);
  margin-bottom: 24px;
}
.mobile-nav-close svg { width: 18px; height: 18px; }
.mobile-nav-logo {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -.04em;
  margin-bottom: 24px;
}
.mobile-nav-logo span { color: var(--accent); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--t-fast), color var(--t-fast);
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active { background: var(--accent-light); color: var(--accent); }
.mobile-nav-links a svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }
.mobile-nav-links a:hover svg,
.mobile-nav-links a.active svg { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   BREAKING NEWS BAR
═══════════════════════════════════════════════════════ */
.breaking-bar {
  background: var(--accent);
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.breaking-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-size: var(--text-2xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #fff;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.2);
  height: 100%;
}
.breaking-label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.8);
  animation: live-pulse 2.5s ease-in-out infinite;
}
.breaking-marquee {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}
.breaking-inner {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-scroll 35s linear infinite;
}
.breaking-bar:hover .breaking-inner { animation-play-state: paused; }
.breaking-item {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,.92);
  transition: color var(--t-fast);
}
.breaking-item::before {
  content: '·';
  margin-right: 40px;
  opacity: .5;
}
.breaking-item:first-child::before { display: none; }
.breaking-item:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════
   SECTION PRIMITIVES
═══════════════════════════════════════════════════════ */
.section { padding: var(--section-gap) 0; }
.section-sm { padding: 36px 0; }
.section-divider { border-top: 1px solid var(--border); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-eyebrow {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 6px;
}
.section-title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.03em;
  line-height: 1.15;
}
.section-title em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
}
.section-action {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  transition: color var(--t-fast);
}
.section-action:hover { color: var(--accent-hover); }

/* Widget chrome */
.widget-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
}
.widget-card:hover { box-shadow: var(--shadow-md); }
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.widget-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}
.widget-action {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════ */
.hero-section { padding: 32px 0 var(--section-gap); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--col-gap);
  align-items: start;
}
@media (max-width: 1100px) { .hero-grid { grid-template-columns: 1fr 300px; } }
@media (max-width: 800px)  { .hero-grid { grid-template-columns: 1fr; } }

/* Featured Article */
.hero-featured {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  transition: box-shadow var(--t);
}
.hero-featured:hover { box-shadow: var(--shadow-lg); }
.hero-featured-img-wrap { aspect-ratio: 16/9; overflow: hidden; }
.hero-featured-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.hero-featured:hover .hero-featured-img { transform: scale(1.03); }
.hero-featured-body { padding: 28px 32px 32px; }

.article-category {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--r-full);
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 14px;
  transition: background var(--t-fast);
}
.article-category:hover { background: var(--accent-mid); }

.hero-featured-body h1 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.hero-featured-body h1 a { color: inherit; transition: color var(--t-fast); }
.hero-featured-body h1 a:hover { color: var(--accent); }
.excerpt {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-meta .sep { opacity: .5; }
.author-link { font-weight: 600; color: var(--text-secondary); }
.author-link:hover { color: var(--accent); }
.read-time { display: flex; align-items: center; gap: 4px; }
.read-time svg { width: 12px; height: 12px; }

/* Hero Sidebar */
.hero-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Snapshot list */
.snapshot-list { list-style: none; }
.snapshot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
  gap: 10px;
}
.snapshot-item:last-child { border-bottom: none; }
.snapshot-item:hover { background: var(--bg-subtle); }
.snapshot-coin { display: flex; align-items: center; gap: 10px; }
.snapshot-coin-img { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.snapshot-coin-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.snapshot-coin-sym {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.snapshot-price-block { text-align: right; }
.snapshot-price {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.snapshot-chg {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 700;
  margin-top: 2px;
}
.snapshot-chg.up { color: var(--bull); }
.snapshot-chg.down { color: var(--bear); }

/* Fear & Greed Widget */
.fg-widget-card { padding-bottom: 4px; }
.fg-gauge-wrap { display: flex; align-items: center; gap: 16px; padding: 16px 18px 10px; }
.fg-dial {
  width: 70px; height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.fg-val {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}
.fg-info { flex: 1; }
.fg-info .title { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.fg-info .label { font-size: var(--text-md); font-weight: 800; }
.fg-bar-track {
  height: 4px;
  background: var(--bg-muted);
  border-radius: var(--r-full);
  overflow: hidden;
  margin: 0 18px 8px;
}
.fg-bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--bull);
  transition: width 1s var(--ease);
}
.fg-bar-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 18px 14px;
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   TRADING INTELLIGENCE — CHART PANEL
═══════════════════════════════════════════════════════ */
.intelligence-section { background: var(--bg-canvas); }
.intelligence-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--col-gap);
  align-items: start;
}
@media (max-width: 1100px) { .intelligence-grid { grid-template-columns: 1fr 290px; } }
@media (max-width: 900px)  { .intelligence-grid { grid-template-columns: 1fr; } }

.chart-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.wrt-coin-select {
  padding: 7px 11px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  min-width: 110px;
  font-family: var(--font-mono);
}
.tf-group { display: flex; gap: 3px; }
.tf-btn {
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: var(--text-2xs);
  font-weight: 700;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-mono);
}
.tf-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.tf-btn.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent-border); }
.price-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wrt-price { font-family: var(--font-mono); font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); }
.wrt-change { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; }
.wrt-change.up { color: var(--bull); }
.wrt-change.down { color: var(--bear); }
.ws-status { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bull); flex-shrink: 0; }
.ws-dot.offline { background: var(--bear); animation: none; }
.ws-lbl { font-size: var(--text-2xs); color: var(--text-muted); font-weight: 600; }
.chart-area { height: 320px; background: var(--bg-canvas); position: relative; overflow: hidden; }
@media (min-width: 1200px) { .chart-area { height: 360px; } }

/* TA Indicators Row */
.ta-row {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}
.ta-ind {
  flex: 1;
  min-width: 90px;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  transition: background var(--t-fast);
}
.ta-ind:last-child { border-right: none; }
.ta-ind:hover { background: var(--bg-subtle); }
.ta-ind-name {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.ta-ind-val {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.ta-ind-sig { font-size: var(--text-2xs); font-weight: 800; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.ta-ind-sig.buy, .ta-ind-sig.BUY { color: var(--bull); }
.ta-ind-sig.sell, .ta-ind-sig.SELL { color: var(--bear); }
.ta-ind-sig.neutral, .ta-ind-sig.NEUTRAL { color: var(--neut); }

/* OHLCV Strip */
.ohlcv-strip {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.ohlcv-item {
  flex: 1;
  min-width: 80px;
  padding: 9px 14px;
  border-right: 1px solid var(--border);
}
.ohlcv-item:last-child { border-right: none; }
.ohlcv-lbl {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ohlcv-val {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.text-up { color: var(--bull); }
.text-down { color: var(--bear); }
.ta-overall {
  padding: 9px 18px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* ═══════════════════════════════════════════════════════
   MARKET PULSE (Heatmap, Movers, Global Stats)
═══════════════════════════════════════════════════════ */
.pulse-section { background: var(--bg-subtle); }
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1000px) { .pulse-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .pulse-grid { grid-template-columns: 1fr; } }

.pulse-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: box-shadow var(--t), border-color var(--t);
}
.pulse-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.pulse-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.pulse-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Heatmap */
.heatmap-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 4px;
  min-height: 180px;
}
.hm-cell {
  border-radius: var(--r-sm);
  padding: 8px 5px;
  text-align: center;
  cursor: pointer;
  transition: filter var(--t-fast), transform var(--t-fast);
}
.hm-cell:hover { filter: brightness(1.15); transform: scale(1.05); }
.hm-sym { font-size: var(--text-2xs); font-weight: 800; color: #fff; margin-bottom: 2px; }
.hm-chg { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.85); }

/* Movers */
.movers-tabs { display: flex; gap: 6px; padding: 12px 16px 8px; }
.mover-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--r-full);
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
}
.mover-tab:hover { background: var(--bg-subtle); color: var(--text-primary); }
.mover-tab.active { background: var(--bull-mid); color: var(--bull); border-color: rgba(5,150,105,.3); }
.mover-tab[data-panel="losers"].active { background: var(--bear-mid); color: var(--bear); border-color: rgba(220,38,38,.3); }
.movers-list { padding: 4px 0; }
.mover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.mover-row:last-child { border-bottom: none; }
.mover-row:hover { background: var(--bg-subtle); }
.mover-id { display: flex; align-items: center; gap: 10px; }
.mover-img { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.mover-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.mover-sym { font-size: var(--text-2xs); color: var(--text-muted); font-family: var(--font-mono); font-weight: 600; }
.mover-price { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); text-align: right; }
.mover-chg { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 700; text-align: right; }

/* ═══════════════════════════════════════════════════════
   CONTENT SECTION (News + Sidebar)
═══════════════════════════════════════════════════════ */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--col-gap);
  align-items: start;
}
@media (max-width: 1100px) { .home-layout { grid-template-columns: 1fr 275px; } }
@media (max-width: 900px)  { .home-layout { grid-template-columns: 1fr; } }

/* Category Tabs */
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-tab {
  padding: 7px 16px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
}
.cat-tab:hover { background: var(--bg-subtle); color: var(--text-primary); }
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Spotlight Grid (3-up) */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 700px) { .spotlight-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .spotlight-grid { grid-template-columns: 1fr; } }

/* Latest Grid (2-up) */
.latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 600px) { .latest-grid { grid-template-columns: 1fr; } }

/* News Card */
.news-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t) var(--ease);
  position: relative;
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.news-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-subtle);
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-img-placeholder {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--bull));
  background-size: 200% 100%;
  animation: gradient-shift 4s ease infinite;
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.news-card-body { padding: 16px 18px 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.news-card-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.news-card-title a { color: inherit; transition: color var(--t-fast); }
.news-card-title a:hover { color: var(--accent); }
.news-card-excerpt {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Load More */
.btn-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  font-family: var(--font-body);
}
.btn-load-more:hover { background: var(--bg-subtle); color: var(--text-primary); border-color: var(--border-hover); }

/* ═══════════════════════════════════════════════════════
   SIDEBAR WIDGETS
═══════════════════════════════════════════════════════ */
.home-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Coin table rows */
.coin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.coin-row:last-child { border-bottom: none; }
.coin-row:hover { background: var(--bg-subtle); }
.coin-rank { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); font-weight: 700; width: 18px; flex-shrink: 0; }
.coin-identity { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.coin-img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.coin-name-text { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-sym-text { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); font-weight: 600; }
.coin-price-text { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; color: var(--text-primary); margin-left: auto; }
.coin-change-text { font-family: var(--font-mono); font-size: 11px; font-weight: 700; margin-left: 7px; flex-shrink: 0; }
.coin-change-text.up { color: var(--bull); }
.coin-change-text.down { color: var(--bear); }

/* Gas Widget */
.gas-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.gas-item { text-align: center; padding: 14px 8px; border-right: 1px solid var(--border); }
.gas-item:last-child { border-right: none; }
.gas-val { font-family: var(--font-body); font-size: var(--text-2xl); font-weight: 800; color: var(--text-primary); letter-spacing: -.04em; line-height: 1; }
.gas-lbl { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-top: 5px; }

/* Halving Widget */
.halving-widget { padding: 12px 16px 16px; }
.halving-digits { display: flex; gap: 8px; }
.halving-unit {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 6px;
  text-align: center;
}
.halving-num { font-family: var(--font-body); font-size: 22px; font-weight: 800; color: var(--bitcoin); letter-spacing: -.04em; }
.halving-lbl { font-size: 10px; color: var(--text-muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-white) 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-xl);
  padding: 22px 20px;
}
.newsletter-widget h4 { font-weight: 800; font-size: var(--text-md); color: var(--text-primary); margin-bottom: 7px; letter-spacing: -.02em; }
.newsletter-widget p { font-size: var(--text-xs); color: var(--text-secondary); margin-bottom: 14px; line-height: 1.55; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.newsletter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-mid);
}
.newsletter-submit {
  padding: 10px 18px;
  background: var(--accent);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition: background var(--t-fast), box-shadow var(--t-fast);
}
.newsletter-submit:hover { background: var(--accent-hover); box-shadow: var(--shadow-accent); }
.newsletter-disclaimer { font-size: 11px; color: var(--text-faint); margin-top: 10px; text-align: center; }

/* ═══════════════════════════════════════════════════════
   COIN CARDS (Market Overview)
═══════════════════════════════════════════════════════ */
.coin-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .coin-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .coin-cards-grid { grid-template-columns: repeat(2, 1fr); } }

.coin-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t) var(--ease);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.coin-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.coin-card--up::before { background: linear-gradient(90deg, var(--bull), #86efac); }
.coin-card--down::before { background: linear-gradient(90deg, var(--bear), #fca5a5); }
.coin-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-hover); transform: translateY(-3px); }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.cc-icon { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.cc-icon-placeholder {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--bull));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #fff;
}
.cc-rank {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  background: var(--bg-subtle); padding: 3px 7px;
  border-radius: var(--r-full); border: 1px solid var(--border);
}
.cc-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); letter-spacing: -.01em; }
.cc-sym { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.cc-price { font-family: var(--font-mono); font-size: var(--text-md); font-weight: 800; color: var(--text-primary); letter-spacing: -.03em; }
.cc-change { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; margin-bottom: 6px; }
.cc-change.up { color: var(--bull); }
.cc-change.down { color: var(--bear); }
.cc-spark { margin: 6px 0 4px; }
.cc-mcap { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); font-weight: 600; margin-top: 3px; }

/* Sparkline */
.spark-svg { display: block; overflow: visible; }

/* Favorites */
.fav-star { cursor: pointer; color: var(--text-faint); font-size: 14px; transition: color var(--t-fast), transform var(--t-fast); display: inline-block; }
.fav-star:hover { color: var(--neut); transform: scale(1.2); }
.fav-star.starred { color: var(--neut); }

/* ═══════════════════════════════════════════════════════
   NEWSLETTER CTA SECTION
═══════════════════════════════════════════════════════ */
.newsletter-cta-section {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
  text-align: center;
}
.container-sm { max-width: 520px; margin: 0 auto; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.badge-accent { background: var(--accent-light); color: var(--accent); border: 1px solid var(--accent-border); }
.newsletter-cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.newsletter-cta-section p { font-size: var(--text-md); color: var(--text-secondary); margin-bottom: 28px; line-height: 1.6; }
.cta-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; }
.cta-form .newsletter-input { border-radius: var(--r-full); font-size: var(--text-base); padding: 13px 20px; }
.cta-form .newsletter-submit { padding: 13px 22px; font-size: var(--text-base); border-radius: var(--r-full); display: flex; align-items: center; gap: 8px; }
.cta-note { font-size: var(--text-xs); color: var(--text-faint); margin-top: 14px; }

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
#site-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.65; max-width: 280px; margin-top: 14px; }
.footer-social { display: flex; gap: 8px; margin-top: 18px; }
.social-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-muted);
  transition: all var(--t-fast);
}
.social-btn:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent-border); }
.social-btn svg { width: 15px; height: 15px; }
.footer-col h4 {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: var(--text-sm); color: var(--text-secondary); transition: color var(--t-fast); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); transition: color var(--t-fast); }
.footer-bottom a:hover { color: var(--text-primary); }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
═══════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  display: none;
  align-items: stretch;
  z-index: 400;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
@media (max-width: 767px) {
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: 56px; }
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color var(--t-fast);
  text-decoration: none;
  letter-spacing: .03em;
}
.mobile-nav-item svg { width: 20px; height: 20px; }
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 700;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-accent); transform: translateY(-1px); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent-border);
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 700;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.btn-outline:hover { background: var(--accent-light); border-color: var(--accent); }
.btn-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--t-fast);
}
.btn-icon:hover { background: var(--bg-muted); color: var(--text-primary); }
.btn-icon svg { width: 14px; height: 14px; }
.btn-subscribe-nav {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 700;
  transition: background var(--t-fast);
}
.btn-subscribe-nav:hover { background: var(--accent-hover); }

/* ═══════════════════════════════════════════════════════
   SKELETONS
═══════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-muted) 50%, var(--bg-subtle) 75%);
  background-size: 300% 100%;
  animation: skeleton-shimmer 1.6s ease infinite;
  border-radius: var(--r);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: -100% 50%; }
}

/* ═══════════════════════════════════════════════════════
   REVEAL ANIMATIONS
═══════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .07s; }
.reveal-delay-2 { transition-delay: .14s; }
.reveal-delay-3 { transition-delay: .21s; }

/* ═══════════════════════════════════════════════════════
   ARTICLE / SINGLE POST
═══════════════════════════════════════════════════════ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
  padding-top: 36px;
  padding-bottom: 56px;
}
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }

.article-header { margin-bottom: 28px; }
.article-headline {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 16px 0 14px;
}
.article-deck {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}
.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.author-name a { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.article-date-read { font-size: var(--text-xs); color: var(--text-muted); margin-top: 3px; }

.article-content {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text-secondary);
}
.article-content h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  color: var(--text-primary);
  margin: 36px 0 16px;
  letter-spacing: -.02em;
}
.article-content h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
}
.article-content p { margin-bottom: 20px; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0;
  padding: 16px 20px;
  background: var(--accent-light);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  color: var(--text-primary);
  font-size: var(--text-md);
}
.article-content img { border-radius: var(--r-lg); max-width: 100%; margin: 24px 0; }
.article-content ul, .article-content ol { margin: 0 0 20px 24px; }
.article-content li { margin-bottom: 8px; }

/* ═══════════════════════════════════════════════════════
   SEARCH PAGE
═══════════════════════════════════════════════════════ */
.search-header { padding: 40px 0 32px; border-bottom: 1px solid var(--border); }
.search-count { font-size: var(--text-sm); color: var(--text-muted); margin-top: 8px; }

/* ═══════════════════════════════════════════════════════
   404
═══════════════════════════════════════════════════════ */
.error-page { text-align: center; padding: 80px 0; }
.error-code { font-family: var(--font-display); font-size: 100px; color: var(--bg-muted); font-weight: 400; line-height: 1; }
.error-page h1 { font-size: var(--text-2xl); font-weight: 800; color: var(--text-primary); margin: 16px 0 12px; }
.error-page p { font-size: var(--text-md); color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   TVL / DeFi Rows
═══════════════════════════════════════════════════════ */
.tvl-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 18px; border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.tvl-row:last-child { border-bottom: none; }
.tvl-row:hover { background: var(--bg-subtle); }
.tvl-protocol { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tvl-protocol-img { width: 22px; height: 22px; border-radius: var(--r-xs); flex-shrink: 0; object-fit: cover; }
.tvl-protocol-name { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.tvl-chain { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); font-weight: 600; }
.tvl-vals { text-align: right; }
.tvl-amount { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.tvl-chg { font-family: var(--font-mono); font-size: 11px; font-weight: 700; }

/* ═══════════════════════════════════════════════════════
   COIN NEWS FEED
═══════════════════════════════════════════════════════ */
#coin-news-feed .news-feed-item {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
#coin-news-feed .news-feed-item:last-child { border-bottom: none; }
#coin-news-feed .news-feed-item:hover { background: var(--bg-subtle); }
#coin-news-feed .nfi-title {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
  line-height: 1.4; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#coin-news-feed .nfi-title a { color: inherit; transition: color var(--t-fast); }
#coin-news-feed .nfi-title a:hover { color: var(--accent); }
#coin-news-feed .nfi-meta { font-size: var(--text-2xs); color: var(--text-muted); display: flex; gap: 10px; }

/* ═══════════════════════════════════════════════════════
   TRENDING PILLS
═══════════════════════════════════════════════════════ */
#trending-coins {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 16px;
}
#trending-coins .trend-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary);
  transition: all var(--t-fast); cursor: pointer;
}
#trending-coins .trend-pill:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-light); }
#trending-coins .trend-pill img { width: 18px; height: 18px; border-radius: 50%; }
#trending-coins .trend-rank { font-size: 11px; color: var(--text-faint); font-weight: 700; }

/* ═══════════════════════════════════════════════════════
   MINI COIN TABLE (Intelligence panel)
═══════════════════════════════════════════════════════ */
.mini-coin-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.mini-coin-table th {
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 9px 12px; background: var(--bg-subtle); text-align: right;
}
.mini-coin-table th:nth-child(1), .mini-coin-table th:nth-child(2) { text-align: left; }
.mini-coin-table td {
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary); text-align: right; vertical-align: middle; white-space: nowrap;
}
.mini-coin-table tr:last-child td { border-bottom: none; }
.mini-coin-table tr:hover td { background: var(--bg-subtle); }
.mini-coin-table td:nth-child(1), .mini-coin-table td:nth-child(2) { text-align: left; color: var(--text-primary); }
.coin-rank-num { color: var(--text-faint); font-weight: 700; font-family: var(--font-mono); font-size: 11px; }
.coin-cell { display: flex; align-items: center; gap: 8px; }
.coin-cell-img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.coin-cell-name { font-weight: 700; font-size: var(--text-sm); }
.coin-cell-sym { color: var(--text-muted); font-size: 10px; font-family: var(--font-mono); }
.hide-mobile { display: none; }
@media (min-width: 600px) { .hide-mobile { display: table-cell; } }

/* Coin details grid */
.coin-details-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: hidden; }
.cd-item { padding: 10px 14px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.cd-item:nth-child(2n) { border-right: none; }
.cd-item:nth-last-child(-n+2) { border-bottom: none; }
.cd-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.cd-val { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }

/* Chart right panel */
.chart-right { display: flex; flex-direction: column; gap: 16px; }
.top10-widget {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: box-shadow var(--t);
}
.top10-widget:hover { box-shadow: var(--shadow-md); }

/* Global Stats */
.global-stats-list { padding: 4px 0; }
.gstat-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 18px; border-bottom: 1px solid var(--border); }
.gstat-row:last-child { border-bottom: none; }
.gstat-lbl { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); }
.gstat-val { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }

/* Dominance bars */
.dom-bar-wrap { padding: 0 16px 12px; }
.dom-lbl-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; }
.dom-bar { height: 5px; background: var(--bg-muted); border-radius: var(--r-full); overflow: hidden; margin-bottom: 10px; }
.dom-fill { height: 100%; border-radius: var(--r-full); background: var(--bitcoin); transition: width 1s var(--ease); }

/* ═══════════════════════════════════════════════════════
   BREADCRUMBS
═══════════════════════════════════════════════════════ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-muted); transition: color var(--t-fast); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: .4; }
.breadcrumbs .current { color: var(--text-primary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   ALERTS & BADGES
═══════════════════════════════════════════════════════ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.tag:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-light); }
.tag-bull { background: var(--bull-mid); color: var(--bull); border-color: rgba(5,150,105,.25); }
.tag-bear { background: var(--bear-mid); color: var(--bear); border-color: rgba(220,38,38,.25); }

/* ═══════════════════════════════════════════════════════
   SCROLL TO TOP
═══════════════════════════════════════════════════════ */
#btn-scroll-top {
  position: fixed;
  bottom: 80px; right: 20px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  color: var(--text-muted);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all var(--t);
  z-index: 100;
}
#btn-scroll-top.visible { opacity: 1; visibility: visible; transform: none; }
#btn-scroll-top:hover { color: var(--accent); border-color: var(--accent-border); }
#btn-scroll-top svg { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════ */
main { min-height: 60vh; }
.text-bull { color: var(--bull); }
.text-bear { color: var(--bear); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.font-mono { font-family: var(--font-mono); }
.home-main { min-width: 0; }

/* ═══════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════ */
@media print {
  .market-topbar, .breaking-bar, .mobile-bottom-nav,
  #site-header, .newsletter-cta-section, #site-footer,
  .home-sidebar { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}

/* ═══════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION — Accessibility
═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .breaking-inner { animation: none !important; overflow-x: auto; }
  .live-dot { animation: none !important; }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .news-card,
  .coin-card { transition: border-color var(--t-fast), box-shadow var(--t-fast) !important; }
  .news-card:hover,
  .coin-card:hover { transform: none !important; }
  .hero-featured-img,
  .news-card-img img { transition: none !important; }
}
