/* =====================================================
   SINOLMC V4 — Bloomberg Data Style
   Polish pass by Vera V · The Vertex (#4)
   ===================================================== */

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

:root {
  --maroon: #7a2332;
  --maroon-dark: #5a1825;
  --maroon-light: #8f3040;
  --bg: #faf9f7;
  --bg-cream: #f5f4f0;
  --bg-light: #f0eeea;
  --bg-paper: #fcfbf9;
  --text-primary: #2a2a2a;
  --text-secondary: #5a5a5a;
  --text-muted: #939393;
  --border: #ddd9d3;
  --border-light: #eae7e2;
  --green: #1a7f3f;
  --red: #b83024;
  --ticker-bg: #1c1c1c;
  --breaking-bg: #222222;
  --cat-tech: #7b5ea7;
  --cat-geopolitics: #3a8a7a;
  --cat-defense: #6b7f3a;
  --cat-economy: #8a6a2a;
  --cat-markets: #3a6a8a;
  --cat-society: #8a4a6a;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =====================================================
   VV LOGO MARK
   ===================================================== */
.logo-vv {
  color: var(--maroon);
  opacity: 0.7;
  margin-left: 0.15rem;
  position: relative;
  top: -1px;
  transition: opacity 0.2s ease;
}

.logo-vv:hover {
  opacity: 1;
}

/* =====================================================
   1. TICKER BAR
   ===================================================== */
.ticker-bar {
  background: var(--ticker-bg);
  color: #bbbbbb;
  font-size: 0.72rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  height: 32px;
  overflow: hidden;
  position: relative;
  letter-spacing: 0.02em;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  padding-left: 1rem;
  flex: 1;
}

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

.ticker-item {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.ticker-item .label {
  color: #8a8a8a;
  font-weight: 500;
}

.ticker-item .value {
  color: #e0e0e0;
  font-weight: 600;
}

.ticker-item .change.up { color: #5cb85c; }
.ticker-item .change.down { color: #e85050; }

.ticker-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0 1.2rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  background: var(--ticker-bg);
  z-index: 1;
}

.ticker-date { color: #8a8a8a; }
.ticker-link { color: #bbbbbb; cursor: pointer; transition: color 0.15s; }
.ticker-link:hover { color: #ffffff; }
.ticker-lang {
  color: #bbbbbb;
  cursor: pointer;
  border: 1px solid #444;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 0.67rem;
  letter-spacing: 0.03em;
  transition: all 0.15s;
}
.ticker-lang:hover { color: #ffffff; border-color: #777; }

/* =====================================================
   2. LEADERBOARD AD
   ===================================================== */
.ad-leaderboard {
  text-align: center;
  padding: 12px 0;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}

.ad-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  font-weight: 400;
}

.ad-placeholder {
  display: inline-block;
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: var(--bg-cream);
  border: 1px dashed var(--border);
  line-height: 90px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

/* =====================================================
   3. HEADER
   ===================================================== */
.site-header {
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  flex-direction: column;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.logo-en {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--maroon);
}

.logo-zh {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--maroon);
}

.tagline {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.header-link {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.header-link:hover { color: var(--text-primary); }

.btn-subscribe {
  background: var(--maroon);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 8px 22px;
  border-radius: 2px;
  display: inline-block;
  transition: background 0.15s;
}
.btn-subscribe:hover { background: var(--maroon-dark); }

/* =====================================================
   4. NAV BAR
   ===================================================== */
.nav-bar {
  background: var(--bg-paper);
  border-bottom: 2px solid var(--text-primary);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}

.nav-item {
  font-size: 0.76rem;
  font-weight: 500;
  padding: 10px 18px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}

.nav-item:first-child {
  padding-left: 0;
}

.nav-item:hover { color: var(--text-primary); }
.nav-item.active {
  color: var(--text-primary);
  border-bottom-color: var(--maroon);
  font-weight: 600;
}

/* =====================================================
   5. INDICATORS BAR
   ===================================================== */
.indicators-bar {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  display: flex;
  max-width: 100%;
  overflow-x: auto;
  padding: 12px 0;
}

.indicator {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 4px 14px;
  border-right: 1px solid var(--border);
}

.indicator:last-child { border-right: none; }

.indicator .ind-label {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

.indicator .ind-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 3px 0;
  font-variant-numeric: tabular-nums;
}

.indicator .ind-detail {
  font-size: 0.63rem;
  font-weight: 500;
}

.indicator .ind-detail.up { color: var(--green); }
.indicator .ind-detail.down { color: var(--red); }
.indicator .ind-detail.neutral { color: var(--text-muted); }

/* =====================================================
   6. BREAKING NEWS BAR
   ===================================================== */
.breaking-bar {
  background: var(--breaking-bg);
  padding: 10px 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  overflow: hidden;
}

.breaking-label {
  background: var(--red);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.breaking-text {
  color: #d8d8d8;
  font-size: 0.82rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================
   7. MAIN CONTENT GRID
   ===================================================== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 260px;
  gap: 2rem;
}

/* Hero Story */
.hero-story {
  border-right: 1px solid var(--border-light);
  padding-right: 2rem;
}

.hero-category {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cat-economy);
  margin-bottom: 0.7rem;
}

.hero-headline {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}

.hero-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.hero-meta .author { font-weight: 500; color: var(--text-secondary); }

.hero-image {
  width: 100%;
  height: 240px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-bottom: 1.2rem;
}

.hero-excerpt {
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--text-secondary);
}

/* Secondary Stories */
.secondary-stories {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--border-light);
  padding-right: 2rem;
}

.secondary-card {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border-light);
}

.secondary-card:first-child {
  padding-top: 0;
}

.secondary-card:last-child { border-bottom: none; }

.card-category {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.card-category.tech { color: var(--cat-tech); }
.card-category.geopolitics { color: var(--cat-geopolitics); }
.card-category.defense { color: var(--cat-defense); }
.card-category.economy { color: var(--cat-economy); }
.card-category.markets { color: var(--cat-markets); }
.card-category.society { color: var(--cat-society); }

.card-headline {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  transition: color 0.15s;
}
.card-headline:hover { color: var(--maroon); }

.card-excerpt {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.card-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.card-meta .author { font-weight: 500; color: var(--text-secondary); }

/* =====================================================
   8. SIDEBAR
   ===================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.sidebar-panel {
  background: transparent;
}

.sidebar-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text-primary);
  margin-bottom: 4px;
}

.sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.76rem;
}

.sidebar-row:last-child {
  border-bottom: none;
}

.sidebar-row .row-label {
  color: var(--text-secondary);
  font-weight: 400;
}

.sidebar-row .row-change {
  font-variant-numeric: tabular-nums;
}

.sidebar-row .row-change.up { color: var(--green); font-weight: 600; }
.sidebar-row .row-change.down { color: var(--red); font-weight: 600; }

/* =====================================================
   9. MORE STORIES
   ===================================================== */
.more-stories {
  background: var(--bg-cream);
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
}

.more-stories-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--text-primary);
  letter-spacing: 0.01em;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.story-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-light);
  padding: 1.2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.story-card:hover {
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.story-card .card-category {
  margin-bottom: 0.5rem;
}

.story-card .card-headline {
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.story-card .card-excerpt {
  font-size: 0.75rem;
  line-height: 1.55;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card .card-meta {
  font-size: 0.65rem;
}

/* =====================================================
   SPONSORED / AD
   ===================================================== */
.sponsored-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.sponsored-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.sponsored-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 400;
}

.ad-infeed {
  display: inline-block;
  width: 970px;
  max-width: 100%;
  height: 250px;
  background: var(--bg-cream);
  border: 1px dashed var(--border);
  line-height: 250px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

/* =====================================================
   10. FOOTER
   ===================================================== */
.site-footer {
  background: var(--ticker-bg);
  color: #8a8a8a;
  padding: 2.5rem 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1.2rem;
}

.footer-links a {
  font-size: 0.76rem;
  color: #8a8a8a;
  transition: color 0.15s;
}
.footer-links a:hover { color: #e0e0e0; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.footer-social a {
  width: 30px;
  height: 30px;
  border: 1px solid #444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a8a8a;
  transition: all 0.15s;
}
.footer-social a:hover { color: #e0e0e0; border-color: #777; }

.footer-vv {
  color: #555;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: center;
}

.footer-copy {
  font-size: 0.68rem;
  color: #666666;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sidebar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
  }
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html { font-size: 14px; }

  .ticker-right {
    gap: 0.6rem;
    font-size: 0.65rem;
  }
  .ticker-date { display: none; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0 1.2rem;
  }

  .header-right {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .nav-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 1.2rem;
  }

  .nav-item {
    font-size: 0.72rem;
    padding: 8px 12px;
    white-space: nowrap;
  }

  .indicators-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-content {
    padding: 1.5rem 1.2rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-story {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
  }

  .secondary-stories {
    border-right: none;
    padding-right: 0;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .hero-headline {
    font-size: 1.5rem;
  }

  .stories-grid {
    grid-template-columns: 1fr;
  }

  .more-stories-inner,
  .sponsored-inner {
    padding: 0 1.2rem;
  }

  .breaking-bar {
    padding: 10px 1.2rem;
  }

  .ad-placeholder {
    width: 100%;
    font-size: 0.65rem;
  }

  .footer-inner {
    padding: 0 1.2rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 1rem;
  }
}
