/* === THE SIGNAL — Main Stylesheet v2 === */
:root {
  --bg-primary: #06060e;
  --bg-secondary: #0a0a18;
  --bg-card: #0f0f20;
  --bg-card-hover: #161630;
  --bg-accent: #12123a;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555570;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --accent-light: #60a5fa;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --gold: #f59e0b;
  --gold-dim: rgba(245, 158, 11, 0.12);
  --purple: #a78bfa;
  --border: #181830;
  --radius: 12px;
  --radius-sm: 6px;
}

html { overflow-x: hidden; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: all 0.25s ease; }
a:hover { color: var(--accent-light); }

/* === BACKGROUND EFFECT === */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(59, 130, 246, 0.06) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 80% 40%, rgba(139, 92, 246, 0.04) 0%, transparent 60%),
              radial-gradient(ellipse 50% 40% at 20% 60%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* === NAVIGATION === */
.nav {
  background: rgba(6, 6, 14, 0.92);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.8px;
}
.logo:hover { color: var(--text-primary); }
.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: contain;
  display: block;
}
.logo-text {
  font-weight: 400;
  font-family: 'Anton', 'Impact', sans-serif;
  font-size: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.logo-text strong {
  font-weight: 400;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Anton', 'Impact', sans-serif;
}
.logo-icon {
  display: none;
}
.nav-links { display: flex; gap: 0; }
.nav-link {
  padding: 6px 11px;
  border-radius: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.2s;
  position: relative;
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.2s ease;
}
.nav-link:hover::after {
  width: 16px;
}

/* === TICKER TAPE === */
.ticker-tape {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  z-index: 1;
  height: 34px;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: flex;
  gap: 0;
  animation: tickerScroll 60s linear infinite;
  white-space: nowrap;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 18px;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2px;
  border-right: 1px solid var(--border);
}
.ticker-sym { color: var(--text-primary); font-weight: 600; }
.ticker-prc { color: var(--text-secondary); }
.ticker-chg { font-weight: 600; }
.ticker-chg.up { color: var(--green); }
.ticker-chg.down { color: var(--red); }

/* === HERO === */
.hero {
  position: relative;
  z-index: 1;
  padding: 80px 24px 48px;
  text-align: center;
  overflow: hidden;
}
.hero-video-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}
.hero-content { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid rgba(59, 130, 246, 0.15);
  margin-bottom: 16px;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-title {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.hero-gradient {
  background: linear-gradient(135deg, #3b82f6, #60a5fa, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto 10px;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

/* === FOCUS BAR === */
.focus-bar {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(15, 15, 32, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}
.focus-item {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}
.focus-item:hover {
  opacity: 0.8;
}
.focus-item.focus-ai { color: #60a5fa; }
.focus-item.focus-cyber { color: #4ade80; }
.focus-item.focus-defense { color: #fbbf24; }
.focus-item.focus-space { color: #a78bfa; }
.focus-item.focus-mega { color: #f87171; }
.focus-divider { color: var(--text-muted); font-size: 14px; }

/* === FEED === */
.feed {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.feed-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.feed-title .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
  animation: pulseDot 2s ease-in-out infinite;
}
.feed-sectors { display: flex; gap: 6px; flex-wrap: wrap; }
.sector-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.25s ease;
}
.sector-badge:hover { transform: translateY(-1px); }
.sector-badge.ai {
  background: var(--accent-glow); color: var(--accent-light);
  border: 1px solid rgba(59, 130, 246, 0.15);
}
.sector-badge.cyber {
  background: var(--green-dim); color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.15);
}
.sector-badge.defense {
  background: var(--gold-dim); color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.15);
}
.sector-badge.space {
  background: rgba(147, 51, 234, 0.12); color: var(--purple);
  border: 1px solid rgba(147, 51, 234, 0.15);
}
.sector-badge.megacap {
  background: rgba(248, 113, 113, 0.12); color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.15);
}

/* === FEATURED ARTICLE === */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.featured-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(59, 130, 246, 0.08);
}
.featured-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.featured-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.featured-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.featured-ticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.featured-ticker .ticker-badge { font-size: 12px; padding: 3px 9px; }
.featured-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.featured-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}
.featured-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.featured-image {
  position: relative;
  overflow: hidden;
  min-height: 200px;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-image::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, var(--bg-card) 0%, transparent 30%);
}

/* === ARTICLE GRID === */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}
.article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.article-card:hover::before { opacity: 1; }
.article-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.06);
}
.card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.article-card:hover .card-image img {
  transform: scale(1.05);
}
.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.price-chip {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.price-chip.up { background: var(--green-dim); color: var(--green); }
.price-chip.down { background: var(--red-dim); color: var(--red); }
.price-chip span { font-weight: 700; }
.card-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}
.ticker-badge {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.ticker-badge.bullish { background: var(--green-dim); color: var(--green); }
.ticker-badge.bearish { background: var(--red-dim); color: var(--red); }
.ticker-badge.neutral { background: rgba(145, 145, 170, 0.1); color: var(--text-secondary); }
.sentiment-label { font-size: 11px; font-weight: 500; }
.sentiment-label.bullish { color: var(--green); }
.sentiment-label.bearish { color: var(--red); }
.sentiment-label.neutral { color: var(--text-muted); }
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.card-summary {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* === ARTICLE PAGE === */
.article-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 72px;
  position: relative;
  z-index: 1;
}
.article-header { margin-bottom: 28px; }
.article-breadcrumbs {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.article-breadcrumbs a { color: var(--text-secondary); }
.article-breadcrumbs a:hover { color: var(--accent); }
.article-breadcrumbs span { color: var(--text-muted); }
.article-ticker-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ticker-badge.large { font-size: 13px; padding: 3px 10px; }
.sentiment-label.large { font-size: 12px; }
.price-info {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.price-value { color: var(--text-primary); font-weight: 600; }
.price-change.up { color: var(--green); }
.price-change.down { color: var(--red); }
.article-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.article-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 400;
}
.article-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}
.article-image {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
}
.article-body {
  font-size: 16px;
  line-height: 1.85;
  color: #d0d0e0;
}
.article-body p { margin-bottom: 1.3em; }
.article-body h2 {
  font-size: 23px;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text-primary);
}
.article-body strong { color: var(--text-primary); font-weight: 700; }
.article-body a {
  color: var(--accent-light);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(96, 165, 250, 0.2);
  text-underline-offset: 2px;
}
.article-body a:hover {
  color: #93c5fd;
  text-decoration-color: #93c5fd;
}
.article-body ul {
  margin: 16px 0;
  padding-left: 20px;
}
.article-body li {
  margin-bottom: 8px;
  color: #c8c8d8;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 14px 22px;
  margin: 24px 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body blockquote p { margin-bottom: 0; }
.stats-grid {
  margin: 24px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.stat-row:last-child { border-bottom: none; }
.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-value {
  color: var(--text-primary);
  font-weight: 700;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}
.article-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.article-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tag {
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}
.article-links {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.article-links h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-links ul { list-style: none; }
.article-links li { margin-bottom: 6px; }
.article-links li:last-child { margin-bottom: 0; }
.article-links a {
  font-size: 14px;
  font-weight: 500;
}

/* === TICKER PAGE === */
.ticker-page { max-width: 1200px; margin: 0 auto; padding: 36px 24px 60px; position: relative; z-index: 1; }
.ticker-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}
.ticker-symbol {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.ticker-price-block { margin-bottom: 6px; }
.price-value.large { font-size: 26px; font-weight: 700; }
.price-change.large { font-size: 15px; margin-left: 8px; font-weight: 600; }
.price-volume { font-size: 12px; color: var(--text-muted); margin-left: 10px; }
.price-missing { color: var(--text-muted); font-size: 13px; }
.company-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
}
.article-count { color: var(--text-secondary); font-size: 14px; }
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 14px;
}
.feed-continued {
  padding-top: 0;
  margin-top: -24px;
}

/* === SECTOR PAGE === */
.sector-page { max-width: 1200px; margin: 0 auto; padding: 36px 24px 60px; position: relative; z-index: 1; }
.sector-header { margin-bottom: 28px; }
.sector-title { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.sector-tickers { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-ticker {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
}
.mini-ticker:hover { border-color: var(--accent); color: var(--accent); }
.sector-prices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.mini-price-card {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  transition: all 0.2s;
}
.mini-price-card:hover { border-color: var(--accent); }
.mini-symbol { color: var(--text-primary); font-weight: 700; }
.mini-price { color: var(--text-secondary); }
.mini-change.up { color: var(--green); }
.mini-change.down { color: var(--red); }

/* === VIDEO EMBED === */
.video-section {
  margin: 28px 0;
}
.video-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}
.video-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.06);
}
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-body .youtube-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.article-body .youtube-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-info {
  padding: 12px 16px;
}
.video-info-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}
.video-info-source {
  font-size: 11px;
  color: var(--text-muted);
}

/* === STATS CARD — "The Numbers That Matter" === */
.article-body .stats-card {
  background: #1a1a2e;
  border: 1px solid #2a2a44;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}
.article-body .stats-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.article-body .stats-table {
  width: 100%;
  border-collapse: collapse;
}
.article-body .stats-table tr {
  border-bottom: 1px solid #2a2a44;
}
.article-body .stats-table tr:last-child {
  border-bottom: none;
}
.article-body .stats-table td {
  padding: 12px 4px;
  font-size: 15px;
  line-height: 1.4;
}
.article-body .stats-table .stat-label {
  color: #8888aa;
  font-weight: 400;
  text-align: left;
  width: 50%;
}
.article-body .stats-table .stat-value {
  color: #ffffff;
  font-weight: 700;
  text-align: right;
  width: 50%;
}
.article-body .stats-table .stat-value.positive {
  color: #22c55e;
}
.article-body .stats-table .stat-value.negative {
  color: #ef4444;
}

/* === FOOTER === */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  font-family: 'Anton', 'Impact', sans-serif;
}
.footer-logo {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  object-fit: contain;
}
.footer-brand strong { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-family: 'Anton', 'Impact', sans-serif; }
.footer-tag { color: var(--text-muted); font-size: 12px; }
.footer-copy { color: var(--text-muted); font-size: 11px; width: 100%; text-align: center; margin-top: 6px; }

/* === PULSE AI RESEARCH AGENT === */
.pulse-section {
  max-width: 720px;
  margin: 0 auto 48px;
  position: relative;
  z-index: 1;
  padding: 32px 24px 0;
  border-top: 1px solid var(--border);
}
.pulse-section::before {
  content: 'AI RESEARCH';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  padding: 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
}
.pulse-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.pulse-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
}
.pulse-header-text { flex: 1; }
.pulse-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pulse-gradient {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pulse-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.pulse-chat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pulse-messages {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}
.pulse-messages::-webkit-scrollbar { width: 4px; }
.pulse-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.pulse-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 85%;
}
.pulse-message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.pulse-message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
}
.pulse-bubble {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-primary);
}
.pulse-bubble strong { color: var(--accent-light); }
.pulse-bubble-user {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--text-primary);
}
.pulse-bullet { color: var(--accent); margin-right: 4px; }
.pulse-loading { display: flex; gap: 4px; padding: 12px 16px; align-items: center; }
.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: pulseDot 1.4s ease-in-out infinite;
}
.pulse-dot:nth-child(2) { animation-delay: 0.2s; }
.pulse-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulseDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}
.pulse-sources {
  margin-top: 4px;
  margin-left: 38px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
}
.pulse-sources-title {
  font-weight: 600;
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.pulse-source-link {
  display: block;
  color: var(--text-secondary);
  padding: 3px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.pulse-source-link:hover { color: var(--accent); }
.pulse-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}
.pulse-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  padding: 6px 0;
}
.pulse-input::placeholder { color: var(--text-muted); }
.pulse-send {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.pulse-send:hover { background: var(--accent-light); }
.pulse-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* Pulse responsive */
@media (max-width: 768px) {
  .pulse-section { padding: 0 16px; margin-bottom: 32px; }
  .pulse-avatar { width: 40px; height: 40px; }
  .pulse-title { font-size: 18px; }
  .pulse-desc { font-size: 12px; }
  .pulse-messages { max-height: 320px; padding: 12px; }
  .pulse-message { max-width: 90%; }
  .pulse-bubble { font-size: 13px; padding: 8px 12px; }
  .pulse-input-area { padding: 8px 12px; }
  .feed-continued { padding-top: 0; }
}
@media (max-width: 480px) {
  .pulse-messages { max-height: 280px; }
  .pulse-message { max-width: 95%; }
  .feed-continued { padding-top: 0; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero-title { font-size: 30px; }
  .hero-desc { font-size: 13px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-image { min-height: 180px; order: -1; }
  .featured-image::after {
    background: linear-gradient(0deg, var(--bg-card) 0%, transparent 40%);
  }
  .article-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 24px; }
  .nav-links { gap: 0; }
  .nav-link { padding: 6px 8px; font-size: 11px; }
  .ticker-symbol { font-size: 28px; }
  .nav-inner { padding: 0 16px; }
  .feed { padding: 0 16px 40px; }
  .focus-bar { gap: 10px; padding: 10px 16px; font-size: 11px; }
  .ticker-tape { height: 28px; }
  .ticker-item { font-size: 10px; padding: 0 12px; }
  .nav-actions { gap: 2px; }
  .nav-links { gap: 0; }
}

@media (max-width: 480px) {
  .nav-link { padding: 4px 5px; font-size: 10px; letter-spacing: 0; }
  .nav-inner { padding: 0 8px; gap: 2px; }
  .nav-links { gap: 0; }
  .nav-btn { padding: 6px; }
  .logo-text { font-size: 13px; letter-spacing: 0.8px; }
  .hero-title { font-size: 24px; }
  .focus-bar { gap: 6px; padding: 8px 10px; font-size: 10px; }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === Selection === */
::selection { background: var(--accent); color: white; }

/* === NAV ACTIONS (search + auth) === */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-btn:hover {
  color: var(--text-primary);
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.06);
}
.nav-btn svg { flex-shrink: 0; }
.auth-label { font-size: 12px; font-weight: 500; }
.auth-container { position: relative; }
.auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: none;
  z-index: 150;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}
.auth-dropdown.active { display: block; }
.auth-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.auth-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.auth-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.auth-signout-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.auth-signout-btn:hover {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}
.auth-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.auth-option {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}
.auth-option:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}
.auth-option.google:hover { border-color: rgba(219, 68, 55, 0.3); }
.auth-option.github:hover { border-color: rgba(110, 84, 148, 0.3); }
.auth-option.email:hover { border-color: rgba(59, 130, 246, 0.3); }
.auth-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  background: var(--bg-secondary);
  border-radius: 4px;
}

/* === SEARCH OVERLAY === */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.search-overlay.active {
  opacity: 1;
  visibility: visible;
}
.search-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 6, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.search-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 20px;
  z-index: 1;
}
.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  margin-bottom: 12px;
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 18px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 8px 0;
}
.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}
.search-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.search-close:hover {
  color: var(--text-primary);
  border-color: rgba(59, 130, 246, 0.3);
}
.search-results {
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.search-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text-primary);
}
.search-result-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}
.search-result-ticker {
  color: var(--accent);
  font-weight: 600;
}
.search-result-sector {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.search-result-date {
  color: var(--text-muted);
  margin-left: auto;
}

/* === ARTICLE COMMENTS === */
.article-comments {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  position: relative;
  z-index: 1;
}
.comments-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.comments-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.giscus-container {
  min-height: 120px;
}

/* === RELATED / SUGGESTED ARTICLES === */
.related-articles {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 0;
  position: relative;
  z-index: 1;
}
.related-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.related-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--text-primary);
  text-decoration: none;
}
.related-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.06);
  color: var(--text-primary);
}
.related-card-image {
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.related-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.related-card:hover .related-card-image img {
  transform: scale(1.05);
}
.related-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.related-card-body .ticker-badge {
  align-self: flex-start;
}
.related-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
}

/* === RESPONSIVE: search + auth + related === */
@media (max-width: 768px) {
  .search-overlay {
    padding-top: 48px;
    align-items: stretch;
  }
  .search-modal {
    max-width: 100%;
    margin: 0 12px;
  }
  .search-input { font-size: 16px; }
  .search-header { padding: 10px 12px; }
  .search-result-item {
    padding: 14px 14px;
    min-height: 52px;
  }
  .search-result-title { font-size: 14px; }
  .search-results { max-height: 50vh; }
  .search-close { padding: 10px; }
  .related-grid { grid-template-columns: 1fr; }
  .auth-label { display: none; }
  .nav-actions { gap: 2px; }
  .nav-btn { padding: 8px; }
  .article-comments { padding: 32px 16px 16px; }
  .related-articles { padding: 16px 16px 0; }
}

@media (max-width: 480px) {
  .search-overlay { padding-top: 32px; }
  .search-modal { margin: 0 8px; }
  .search-input { font-size: 15px; }
  .search-header { padding: 8px; }
  .search-result-item { padding: 12px 10px; }
  .search-result-title { font-size: 13px; }
  .search-result-meta { gap: 6px; font-size: 10px; flex-wrap: wrap; }
  .search-close { padding: 12px; }
  .search-results { max-height: 45vh; }
  .search-empty { font-size: 13px; padding: 24px 16px; }
}

/* === FLOATING PULSE BUBBLE === */
.pulse-float-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #7c3aed);
  border: 2px solid rgba(59, 130, 246, 0.4);
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}
.pulse-float-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.45);
}
.pulse-float-bubble:active {
  transform: scale(0.95);
}
.pulse-float-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}
.pulse-float-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Floating Pulse pulsing ring */
.pulse-float-bubble::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.2);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* === FLOATING PULSE MODAL === */
.pulse-float-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.pulse-float-open {
  opacity: 1;
  pointer-events: auto;
}
.pulse-float-modal {
  width: 380px;
  max-width: 100%;
  height: 560px;
  max-height: calc(100vh - 140px);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.pulse-float-open .pulse-float-modal {
  transform: translateY(0);
}
.pulse-float-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pulse-float-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}
.pulse-float-header-text { flex: 1; }
.pulse-float-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.pulse-float-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.pulse-float-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.pulse-float-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.pulse-float-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pulse-float-messages .pulse-message {
  max-width: 90%;
}
.pulse-float-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.pulse-float-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}
.pulse-float-input:focus {
  border-color: var(--accent);
}
.pulse-float-send {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.pulse-float-send:hover {
  background: var(--accent-hover);
}
.pulse-float-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Floating bubble responsive */
@media (max-width: 600px) {
  .pulse-float-bubble {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
  .pulse-float-icon {
    width: 28px;
    height: 28px;
  }
  .pulse-float-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .pulse-float-modal {
    width: 100%;
    height: 85vh;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }
}

/* Prevent body scroll when modal is open */
body.pulse-modal-open {
  overflow: hidden;
}
