:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-green: #059669;
  --accent-green-bg: #ecfdf5;
  --accent-red: #dc2626;
  --accent-red-bg: #fef2f2;
  --accent-blue: #2563eb;
  --accent-gold: #d97706;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --container-max: 1240px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== TICKER BAR ==================== */
.ticker-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.82rem;
  padding: 8px 0;
  position: relative;
  z-index: 40;
}

.ticker-inner {
  display: inline-flex;
  gap: 32px;
  animation: tickerSlide 45s linear infinite;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.ticker-item .symbol {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ticker-item .price {
  color: var(--text-primary);
  font-family: monospace;
}

.ticker-item .change {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.change.up {
  color: #047857;
  background: #d1fae5;
}

.change.down {
  color: #b91c1c;
  background: #fee2e2;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==================== NAVBAR ==================== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.brand .logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #059669 0%, #2563eb 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
}

.brand span.highlight {
  color: var(--accent-green);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent-green);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px 8px 36px;
  border-radius: 20px;
  font-size: 0.85rem;
  outline: none;
  width: 180px;
  transition: var(--transition);
}

.search-box input:focus {
  width: 240px;
  background: #ffffff;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

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

.search-box .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* ==================== SUB-NAV / CATEGORIES ==================== */
.category-nav {
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  padding: 10px 0;
  overflow-x: auto;
}

.category-list {
  display: flex;
  gap: 12px;
  list-style: none;
}

.cat-pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-color);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}

.cat-pill:hover, .cat-pill.active {
  color: #ffffff;
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

/* ==================== HERO / FEATURED SECTION ==================== */
.hero-section {
  padding: 32px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.featured-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 440px;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.featured-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.featured-card .card-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover .card-bg-img {
  transform: scale(1.03);
}

.featured-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.88) 80%);
}

.featured-card .card-content {
  position: relative;
  z-index: 10;
  padding: 32px;
  color: #ffffff;
}

.featured-card .featured-title {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #ffffff;
}

.featured-card .featured-summary {
  color: #e2e8f0;
  font-size: 0.98rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.featured-card .article-meta {
  color: #cbd5e1;
}

.category-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.category-tag.crypto { background: #fef3c7; color: #92400e; }
.category-tag.stocks { background: #dbeafe; color: #1e40af; }
.category-tag.economy { background: #dcfce7; color: #166534; }
.category-tag.banking { background: #ede9fe; color: #5b21b6; }
.category-tag.markets { background: #e0e7ff; color: #3730a3; }
.category-tag.personal-finance, .category-tag.wealth { background: #ccfbf1; color: #115e59; }

.featured-card .category-tag {
  background: var(--accent-green);
  color: #ffffff;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Secondary Hero Stack */
.hero-secondary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  height: calc(50% - 10px);
  box-shadow: var(--shadow-card);
}

.sub-card:hover {
  background: #ffffff;
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.sub-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 8px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

/* ==================== MAIN CONTENT & SIDEBAR ==================== */
.content-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 32px;
  padding: 40px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent-green);
  border-radius: 2px;
  display: inline-block;
}

/* News Feed Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-green);
  box-shadow: var(--shadow-hover);
}

.news-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.news-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 8px 0;
  color: var(--text-primary);
}

.news-title:hover {
  color: var(--accent-green);
}

.news-snippet {
  color: var(--text-secondary);
  font-size: 0.87rem;
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

/* Sidebar Widgets */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
}

.trending-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trending-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.trending-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #94a3b8;
  line-height: 1;
  font-family: monospace;
}

.trending-link {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

.trending-link:hover {
  color: var(--accent-green);
}

/* Newsletter Box */
.newsletter-card {
  background: linear-gradient(145deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.newsletter-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.newsletter-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.newsletter-form input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 0.88rem;
  margin-bottom: 10px;
  outline: none;
  transition: var(--transition);
}

.newsletter-form input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.btn-primary {
  display: inline-block;
  width: 100%;
  background: var(--accent-green);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: #047857;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(4, 120, 87, 0.25);
}

/* ==================== ARTICLE PAGE STYLING ==================== */
.article-header {
  padding: 40px 0 24px;
  max-width: 840px;
  margin: 0 auto;
}

.article-headline {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 16px 0 20px;
  color: var(--text-primary);
}

.article-hero-image {
  max-width: 960px;
  margin: 0 auto 36px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.article-body-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* Takeaways Box */
.takeaways-box {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.takeaways-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.takeaways-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.takeaways-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.5;
}

.takeaways-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #059669;
  font-size: 0.85rem;
}

/* Article Prose */
.article-prose {
  font-size: 1.12rem;
  line-height: 1.8;
  color: #334155;
}

.article-prose p {
  margin-bottom: 24px;
  color: #334155;
}

.article-prose h2, .article-prose h3 {
  color: var(--text-primary);
  margin: 36px 0 16px;
  font-weight: 700;
  line-height: 1.3;
}

.article-prose h2 { font-size: 1.6rem; }
.article-prose h3 { font-size: 1.3rem; }

.article-prose blockquote {
  border-left: 4px solid var(--accent-blue);
  padding: 12px 20px;
  margin: 28px 0;
  background: #eff6ff;
  font-style: italic;
  color: #1e3a8a;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-source-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-card);
}

.article-source-badge strong {
  color: var(--text-primary);
}

.article-source-badge a {
  color: var(--accent-blue);
  text-decoration: underline;
}

/* Comment Box */
.comment-box {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  margin-bottom: 12px;
  transition: var(--transition);
}

.comment-box:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

/* Disclaimer Footer */
.financial-disclaimer {
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Footer */
.site-footer {
  background: #ffffff;
  padding: 48px 0 24px;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .news-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .featured-title { font-size: 1.4rem; }
  .article-headline { font-size: 1.75rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
