/* ============================================================
   GLITCHWIRE — Main Stylesheet
   ============================================================
   Brand palette:
     Main combo  — Salmon #ff4444  + Purple #48003e
     Green combo — #7bf981 + #173e4f
     Red/Yellow  — #871937 + #edf052
     Red/Blue    — #a42115 + #bae2e8
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES & THEMING
   ============================================================ */
:root {
  /* Brand — main combo */
  --brand-red:      #ff4444;
  --brand-purple:   #48003e;
  --brand-red-dark: #d93030;

  /* Light Theme (default) */
  --bg:             #F7F7F5;
  --bg-card:        #FFFFFF;
  --bg-subtle:      #F0F0EE;
  --bg-nav:         #FFFFFF;
  --text:           #111111;
  --text-secondary: #444444;
  --text-muted:     #888888;
  --border:         #DDDDD8;
  --border-light:   #EBEBEB;
  --tag-bg:         #EEEEEC;
  --tag-text:       #333333;
  --nav-shadow:     0 1px 0 var(--border);
  --card-shadow:    0 1px 3px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 4px 14px rgba(0,0,0,0.12);
  --overlay-start:  rgba(0,0,0,0);
  --overlay-end:    rgba(0,0,0,0.78);
  --skeleton:       #E8E8E6;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Typography */
  --font-headline: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body:     'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:     'Space Mono', 'Courier New', monospace;

  /* NO border-radius — hard corners everywhere */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;

  /* Transitions */
  --transition: 0.18s ease;
  --transition-slow: 0.4s ease;

  /* Layout */
  --container: 1280px;
  --nav-height: 56px;
}

[data-theme="dark"] {
  --bg:             #0A0008;
  --bg-card:        #140012;
  --bg-subtle:      #0f000d;
  --bg-nav:         #0A0008;
  --text:           #F0F0F0;
  --text-secondary: #AAAAAA;
  --text-muted:     #666666;
  --border:         #2a1028;
  --border-light:   #1e0a1c;
  --tag-bg:         #1e0a1c;
  --tag-text:       #CCCCCC;
  --nav-shadow:     0 1px 0 var(--border);
  --card-shadow:    0 1px 4px rgba(0,0,0,0.4);
  --card-shadow-hover: 0 4px 20px rgba(0,0,0,0.6);
  --overlay-start:  rgba(0,0,0,0);
  --overlay-end:    rgba(0,0,0,0.88);
  --skeleton:       #1e0a1c;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-red); }

ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-nav);
  box-shadow: var(--nav-shadow);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: var(--nav-height);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Logo */
.nav-logo { flex-shrink: 0; display: flex; align-items: center; }
.nav-logo img { height: 26px; width: auto; transition: opacity var(--transition); }
.nav-logo:hover img { opacity: 0.8; }

.logo-light { display: block; }
.logo-dark  { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark  { display: block; }

/* Category links */
.nav-links {
  display: flex;
  align-items: center;
  flex: 1;
  overflow: hidden;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 11px 0; /* 10px top padding shifts text ~5px below vertical center; ::after stays at bottom: 0 */
  height: var(--nav-height);
  font-family: var(--font-headline);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--brand-red); }
.nav-link:hover::after, .nav-link.active::after { background: var(--brand-red); }

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  margin-left: auto;
}

/* Dark mode toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.theme-toggle:hover { color: var(--brand-red); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Hamburger — always visible */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 6px;
  color: var(--text);
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav dropdown — right-aligned under hamburger */
.nav-drawer {
  display: none;
  position: absolute;
  top: 100%;
  right: var(--space-lg);
  min-width: 180px;
  background: var(--bg-nav);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  z-index: 1001;
  padding: var(--space-xs) 0;
}
.nav-drawer.open { display: block; }

.nav-drawer-links { display: flex; flex-direction: column; }
.nav-drawer-links a {
  display: block;
  padding: 11px var(--space-lg);
  font-family: var(--font-headline);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-drawer-links a:hover { color: var(--brand-red); background: var(--bg-subtle); }

/* ============================================================
   6. TOP BAR & BREAKING TICKER
   ============================================================ */
.top-bar {
  background: var(--brand-red);
  color: #fff;
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.top-bar-label {
  flex-shrink: 0;
  font-family: var(--font-headline);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.18);
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  animation: ticker-scroll 70s linear infinite;
  white-space: nowrap;
  will-change: transform;
}
.ticker-track:hover { animation-play-state: paused; }

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-xl);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
}
.ticker-item a { color: inherit; }
.ticker-item a:hover { color: #fff; text-decoration: underline; }
.ticker-sep {
  display: inline-block;
  margin: 0 var(--space-sm);
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   7. FINANCIAL TICKER
   ============================================================ */
.finance-ticker {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  height: 46px;
  overflow: hidden;
  transition: background var(--transition);
}
.finance-ticker .tradingview-widget-container,
.finance-ticker .tradingview-widget-container__widget {
  height: 46px !important;
}
.finance-ticker .tradingview-widget-copyright { display: none !important; }
.finance-ticker .tv-ticker-mount { overflow: hidden; }

/* ============================================================
   8. HERO SECTION
   ============================================================ */
.hero-section {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

/* Main hero card */
.hero-main {
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: var(--bg-card);
  transition: box-shadow var(--transition);
  display: block;
}
.hero-main:hover { box-shadow: var(--card-shadow-hover); }

.hero-main-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.hero-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hero-main:hover .hero-main-image img { transform: scale(1.03); }

.hero-main-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
  background: linear-gradient(to bottom, var(--overlay-start), var(--overlay-end));
}
.hero-main-overlay h2 {
  color: #ffffff;
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  line-height: 1.22;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  margin-top: var(--space-xs);
}
.hero-main-meta {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
}

/* Hero sidebar */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero-side-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition);
  border: 1px solid var(--border-light);
}
.hero-side-card:hover { box-shadow: var(--card-shadow-hover); }

.hero-side-image {
  flex-shrink: 0;
  width: 96px;
  height: 72px;
  overflow: hidden;
}
.hero-side-image img { width: 100%; height: 100%; object-fit: cover; }

.hero-side-content { flex: 1; min-width: 0; }
.hero-side-content h4 {
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.hero-side-card:hover h4 { color: var(--brand-red); }
.hero-side-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   9. CATEGORY TAGS
   ============================================================ */
.cat-tag {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-headline);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--brand-red);
  color: #fff;
  white-space: nowrap;
  vertical-align: middle;
}

/* purple secondary tag (fallback when no data-cat) */
.cat-tag.secondary {
  background: var(--brand-purple);
  color: #fff;
}

/* neutral tag (inside listing filter etc.) */
.cat-tag.neutral {
  background: var(--tag-bg);
  color: var(--tag-text);
}

/* ── Shared category colour tokens ──────────────────────────────────
   Set --cat-color / --cat-text on any element with data-cat or
   data-filter. These drive: cat-tag backgrounds, filter-btn
   hover/active states, and trending-tag hover states.
   ─────────────────────────────────────────────────────────────── */
[data-cat="ai"],          [data-filter="ai"]          { --cat-color:#ff4444; --cat-text:#fff; }
[data-cat="ai-agents"],   [data-filter="ai-agents"]   { --cat-color:#c0392b; --cat-text:#fff; }
[data-cat="tech"],        [data-filter="tech"]        { --cat-color:#48003e; --cat-text:#fff; }
[data-cat="policy"],      [data-filter="policy"]      { --cat-color:#871937; --cat-text:#fff; }
[data-cat="crypto"],      [data-filter="crypto"]      { --cat-color:#7bf981; --cat-text:#0d2a1f; }
[data-cat="finance"],     [data-filter="finance"]     { --cat-color:#173e4f; --cat-text:#fff; }
[data-cat="science"],     [data-filter="science"]     { --cat-color:#bae2e8; --cat-text:#0a2030; }
[data-cat="energy"],      [data-filter="energy"]      { --cat-color:#edf052; --cat-text:#1a1a00; }
[data-cat="security"],    [data-filter="security"]    { --cat-color:#a42115; --cat-text:#fff; }
[data-cat="culture"],     [data-filter="culture"]     { --cat-color:#8b006a; --cat-text:#fff; }
[data-cat="legal"],       [data-filter="legal"]       { --cat-color:#1a3a5c; --cat-text:#fff; }
[data-cat="gadgets"],     [data-filter="gadgets"]     { --cat-color:#c04a00; --cat-text:#fff; }
[data-cat="quantum"],     [data-filter="quantum"]     { --cat-color:#0d4a6b; --cat-text:#fff; }
/* blockchain and web3 merged into crypto */
[data-cat="bitcoin"],     [data-filter="bitcoin"]     { --cat-color:#c07000; --cat-text:#fff; }
[data-cat="openai"],      [data-filter="openai"]      { --cat-color:#0a1f3d; --cat-text:#fff; }
[data-cat="apple"],       [data-filter="apple"]       { --cat-color:#2c2c2e; --cat-text:#fff; }
[data-cat="stablecoins"], [data-filter="stablecoins"] { --cat-color:#1a5c2e; --cat-text:#fff; }
[data-cat="ethereum"],    [data-filter="ethereum"]    { --cat-color:#312080; --cat-text:#fff; }
[data-cat="solana"],      [data-filter="solana"]      { --cat-color:#006e51; --cat-text:#fff; }

/* Cat-tag backgrounds — pull from the token above */
.cat-tag[data-cat] { background: var(--cat-color); color: var(--cat-text); }

/* ============================================================
   10. ARTICLE CARDS
   ============================================================ */

/* Standard card (image top, text below) */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.article-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.article-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--tag-bg);
}
.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .article-card-image img { transform: scale(1.04); }

.article-card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.article-card-title {
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  transition: color var(--transition);
}
.article-card:hover .article-card-title { color: var(--brand-red); }

.article-card-excerpt {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: var(--space-xs);
  flex-wrap: wrap;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
  flex-shrink: 0;
}

/* Horizontal list card — image left, text right */
.list-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
  transition: opacity var(--transition);
  text-decoration: none;
  color: inherit;
}
.list-card:last-child { border-bottom: none; padding-bottom: 0; }
.list-card:hover { opacity: 0.85; }

.list-card-image {
  flex-shrink: 0;
  width: 110px;
  height: 80px;
  overflow: hidden;
  background: var(--tag-bg);
}
.list-card-image img { width: 100%; height: 100%; object-fit: cover; }

.list-card-content { flex: 1; min-width: 0; }

.list-card-title {
  font-family: var(--font-headline);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.list-card:hover .list-card-title { color: var(--brand-red); }

.list-card-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 5px; }

/* Numbered ranked card */
.ranked-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-sm) 0;
}
.ranked-number {
  font-family: var(--font-headline);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 36px;
  text-align: right;
}
.ranked-content { flex: 1; min-width: 0; }
.ranked-title {
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
a:hover .ranked-title { color: var(--brand-red); }
.ranked-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; }

/* ============================================================
   11. SECTION HEADERS & CONTENT SECTIONS
   ============================================================ */
.content-section { padding: var(--space-xl) 0; }

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--brand-red);
}
.section-header h2 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-header-link {
  margin-left: auto;
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-red);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-header-link:hover { opacity: 0.8; color: var(--brand-red); }
.section-header-link svg { width: 13px; height: 13px; }

.section-two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.section-divider { height: 1px; background: var(--border); }
.latest-section { padding: var(--space-xl) 0; }

/* ============================================================
   12. WIDGETS ROW (Weather / Trending / Clock)
   ============================================================ */
.widgets-row {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}

.widgets-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-lg);
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  min-height: 40px;
}

/* Weather — compact single line */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.weather-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.weather-info { display: flex; flex-direction: column; gap: 1px; }
.weather-temp {
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.weather-desc { font-size: 0.65rem; color: var(--text-secondary); line-height: 1.2; }
.weather-location { font-size: 0.6rem; color: var(--text-muted); line-height: 1.2; }

/* Trending — single scrollable row, no wrapping */
.trending-widget {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow: hidden;
  min-width: 0;
}
.trending-label {
  font-family: var(--font-headline);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}
.trending-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
  padding-bottom: 1px;         /* prevent clipping on webkit */
}
.trending-tags::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.trending-tag {
  padding: 2px 9px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.trending-tag:hover { background: var(--cat-color, var(--brand-red)); color: var(--cat-text, #fff); }

/* Clock — compact, right-aligned */
.datetime-widget { text-align: right; white-space: nowrap; }
.datetime-time {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}
.datetime-date { font-size: 0.62rem; color: var(--text-muted); }

/* ============================================================
   13. NEWSLETTER
   ============================================================ */
.newsletter-section {
  background: #173e4f;
  padding: var(--space-xl) 0;
}

.newsletter-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.newsletter-copy h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}
.newsletter-copy p { color: rgba(255,255,255,0.8); font-size: 1rem; line-height: 1.6; }

.newsletter-form { display: flex; flex-direction: column; gap: var(--space-sm); }
.newsletter-fields { display: flex; gap: var(--space-sm); }

.newsletter-input {
  flex: 1;
  padding: 12px var(--space-md);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(123,249,129,0.3);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.45); }
.newsletter-input:focus {
  border-color: #7bf981;
  background: rgba(255,255,255,0.11);
}

.newsletter-btn {
  padding: 12px var(--space-lg);
  background: #7bf981;
  color: #0d2a1f;
  font-family: var(--font-headline);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.newsletter-btn:hover { opacity: 0.88; }

.newsletter-disclaimer { font-size: 0.7rem; color: rgba(255,255,255,0.45); }
.newsletter-success {
  display: none;
  color: #7bf981;
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  padding: var(--space-lg);
  background: rgba(123,249,129,0.1);
  border: 1px solid rgba(123,249,129,0.3);
}
.newsletter-success.show { display: block; }

/* ============================================================
   14. ARTICLE PAGE
   ============================================================ */

/* Parallax hero — outer clip + inner oversized bg panel */
.article-hero-parallax {
  position: relative;
  height: clamp(300px, 45vw, 520px);
  overflow: hidden;
  display: block;
}
/* Inner panel is taller than the container so it has room to travel */
.parallax-bg {
  position: absolute;
  top: -25%;
  left: 0;
  right: 0;
  bottom: -25%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform;
}
/* Subtle gradient at the bottom — blends into the article content below */
.parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 55%,
    rgba(0,0,0,0.28) 100%
  );
  pointer-events: none;
}
/* Disable the JS translateY on reduced-motion / mobile — fall back to static cover */
@media (prefers-reduced-motion: reduce) {
  .parallax-bg { top: 0; bottom: 0; will-change: auto; }
}

.article-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.article-breadcrumb a { color: var(--text-secondary); }
.article-breadcrumb a:hover { color: var(--brand-red); }

.article-categories { display: flex; gap: var(--space-xs); flex-wrap: wrap; margin-bottom: var(--space-md); }

.article-headline {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-md);
}

.article-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}
.byline-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
}
.byline-info { display: flex; flex-direction: column; gap: 1px; }
.byline-author {
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.byline-author:hover { color: var(--brand-red); }
.byline-author-title { font-size: 0.71rem; color: var(--text-muted); font-style: italic; }
.byline-date { font-size: 0.8rem; color: var(--text-secondary); }
.byline-dot { color: var(--border); }
.byline-readtime { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }

/* Share bar */
.article-share {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}
.share-label {
  font-family: var(--font-headline);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition);
}
.share-btn:hover { border-color: var(--brand-red); color: var(--brand-red); }
.share-btn svg { width: 13px; height: 13px; }

/* Article body */
.article-body {
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--text);
}
.article-body p { margin-bottom: 1.4em; }
.article-body h2 {
  font-size: 1.45rem;
  margin: 2em 0 0.7em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--border);
}
.article-body h3 { font-size: 1.18rem; margin: 1.75em 0 0.55em; }
.article-body strong { font-weight: 700; }
.article-body ul, .article-body ol { padding-left: 1.5em; margin-bottom: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.5em; list-style: inherit; }
.article-body blockquote {
  margin: 1.75em 0;
  padding: var(--space-md) var(--space-xl);
  border-left: 4px solid var(--brand-red);
  background: var(--bg-subtle);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-secondary);
}
.article-body a {
  color: var(--brand-red);
  text-decoration: underline;
  text-decoration-color: rgba(255,68,68,0.4);
  text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-color: var(--brand-red); }
.article-body img {
  width: 100%;
  height: auto;
  margin: var(--space-lg) 0;
}

.article-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--border);
}
.related-section-title {
  font-family: var(--font-headline);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.related-section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
}

/* ============================================================
   15. NEWS LISTING PAGE
   ============================================================ */
.listing-page { padding: var(--space-xl) 0 var(--space-2xl); }

/* ── Featured story hero on news listing ─────────────── */
.listing-featured {
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.listing-featured-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-decoration: none;
  color: inherit;
  min-height: 340px;
}
.listing-featured-link:hover .listing-featured-title { color: var(--brand-red); }
.listing-featured-image {
  overflow: hidden;
  background: var(--border);
}
.listing-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.listing-featured-link:hover .listing-featured-image img { transform: scale(1.03); }
.listing-featured-content {
  padding: var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
}
.listing-featured-label {
  font-family: var(--font-headline);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-red);
}
.listing-featured-title {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.25;
  margin: var(--space-xs) 0;
  transition: color .2s;
}
.listing-featured-excerpt {
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-featured-meta {
  font-size: .82rem;
  color: var(--text-secondary);
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  margin-top: auto;
}

@media (max-width: 768px) {
  .listing-featured-link { grid-template-columns: 1fr; min-height: auto; }
  .listing-featured-image { height: 220px; }
  .listing-featured-content { padding: var(--space-lg); }
}

.listing-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 3px solid var(--brand-red);
}
.listing-header h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
.listing-header p { color: var(--text-secondary); margin-top: var(--space-sm); }

.category-filter {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.filter-btn {
  padding: 6px 14px;
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--cat-color, var(--brand-red));
  border-color: var(--cat-color, var(--brand-red));
  color: var(--cat-text, #fff);
}

/* ============================================================
   16. ABOUT PAGE
   ============================================================ */
.about-page { padding: 0; }

/* ── Video hero ─────────────────────────────────────────────── */
.about-hero-video {
  position: relative;
  width: 100%;
  height: 65vh;
  min-height: 380px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-hero-bg {
  position: absolute;
  inset: -10% 0;          /* extra vertical room for parallax travel */
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}
.about-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 1;
}
.about-intro-headline {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 var(--space-lg);
  letter-spacing: -0.02em;
}

/* ── Two-column layout ──────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-2xl);
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  align-items: start;
}
.about-main h2 { font-size: 1.35rem; margin: var(--space-xl) 0 var(--space-md); }
.about-main h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: var(--space-lg) 0 var(--space-xs);
}
.about-main p { font-size: 1.05rem; line-height: 1.75; color: var(--text-secondary); }
.about-sidebar { position: sticky; top: calc(var(--nav-h, 60px) + var(--space-lg)); }
.about-sidebar-ads { display: flex; flex-direction: column; gap: var(--space-md); align-items: center; }

/* Legacy selectors kept for safety */
.about-content { max-width: 720px; margin: 0 auto; padding: 0 var(--space-lg); }
.about-content h2 { font-size: 1.35rem; margin: var(--space-xl) 0 var(--space-md); }
.about-content p { font-size: 1.05rem; line-height: 1.75; color: var(--text-secondary); }
.about-pillars { display: none; }

/* Team grid */
.team-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}
.team-card {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  align-items: flex-start;
}
.team-avatar {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
}
.team-info { flex: 1; min-width: 0; }
.team-name {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}
.team-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.team-beat {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  font-style: italic;
}
.team-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 480px) {
  .team-card { flex-direction: column; gap: var(--space-md); }
}

/* ============================================================
   17. FOOTER
   ============================================================ */
.site-footer {
  background: var(--brand-purple);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-lg); }

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand .footer-logo { height: 22px; width: auto; margin-bottom: var(--space-md); opacity: 0.9; }
.footer-brand p { font-size: 0.83rem; color: rgba(255,255,255,0.65); line-height: 1.65; max-width: 260px; }

.footer-social { display: flex; gap: var(--space-sm); margin-top: var(--space-md); }
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
}
.social-link:hover { border-color: var(--brand-red); color: var(--brand-red); }
.social-link svg { width: 15px; height: 15px; }

.footer-col h4 {
  font-family: var(--font-headline);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: var(--space-md);
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col li a { font-size: 0.83rem; color: rgba(255,255,255,0.7); transition: color var(--transition); }
.footer-col li a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-copyright { font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.footer-legal { display: flex; gap: var(--space-lg); }
.footer-legal a { font-size: 0.75rem; color: rgba(255,255,255,0.35); transition: color var(--transition); }
.footer-legal a:hover { color: rgba(255,255,255,0.7); }

/* Kill any injected content (AdSense anchor ads) below footer */
.site-footer ~ * { display: none !important; }
.site-footer ~ ins { display: none !important; }
.site-footer ~ div { display: none !important; }

/* ============================================================
   18. CONTACT FORM
   ============================================================ */
.contact-form-wrap {
  max-width: 600px;
  margin: var(--space-xl) 0;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  border-radius: 0;
  transition: border-color var(--transition);
  width: 100%;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-red);
}
.form-group textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}
.contact-submit-btn {
  background: var(--brand-red);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  align-self: flex-start;
  border-radius: 0;
  transition: background var(--transition);
}
.contact-submit-btn:hover  { background: var(--brand-red-dark); }
.contact-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.contact-success {
  background: #0e3d2a;
  color: #7bf981;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1rem;
  border-left: 4px solid #7bf981;
  margin-top: var(--space-md);
  line-height: 1.5;
}
.contact-error {
  background: rgba(255,68,68,0.08);
  color: var(--brand-red);
  padding: 12px 16px;
  font-size: 0.9rem;
  border-left: 3px solid var(--brand-red);
  margin-top: var(--space-sm);
}
.cf-turnstile { margin: 4px 0; }

/* ============================================================
   19. ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.07s; }
.fade-up:nth-child(3) { transition-delay: 0.14s; }
.fade-up:nth-child(4) { transition-delay: 0.21s; }

body { animation: page-in 0.25s ease; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

/* Ticker fade edges */
.ticker-wrap::before, .ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  z-index: 1;
  pointer-events: none;
}
.ticker-wrap::before { left: 0; background: linear-gradient(to right, var(--brand-red), transparent); }
.ticker-wrap::after  { right: 0; background: linear-gradient(to left,  var(--brand-red), transparent); }

/* ============================================================
   18a. PREDICTION MARKETS — SIDEBAR + ARTICLE PULSE
   ============================================================ */

/* ── Homepage sidebar layout wrapper ── */
.homepage-sidebar-layout { padding: 0; }

.homepage-sidebar-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-2xl);
  align-items: start;
}

.homepage-sidebar-main { min-width: 0; }

/* Thin divider between Latest and AI inside the sidebar layout */
.sidebar-section-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xl) 0;
}

/* ── Sidebar panel ── */
.market-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 12px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}

.market-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--brand-purple);
  border-bottom: 2px solid var(--brand-red);
}

.market-sidebar-label {
  font-family: var(--font-headline);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.market-sidebar-source {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.55);
  margin-left: auto;
  text-decoration: none;
  transition: color var(--transition);
}
.market-sidebar-source:hover { color: #fff; }

/* Live indicator dot */
.market-live-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-live 2.4s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.75); }
}

.market-sidebar-inner {
  overflow-y: auto;
  max-height: 680px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Individual market card ── */
.market-card {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--transition);
}
.market-card:hover { background: var(--bg-subtle); }
.market-card:last-child { border-bottom: none; }

.market-question {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-bar-wrap {
  height: 3px;
  background: var(--border);
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}
.market-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--brand-red);
  transition: width 0.7s ease;
}
.market-bar-fill.bullish  { background: #22c55e; }
.market-bar-fill.neutral  { background: #f59e0b; }

.market-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.63rem;
  color: var(--text-muted);
}

.market-yes-pct {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--brand-red);
}
.market-yes-pct.bullish { color: #22c55e; }
.market-yes-pct.neutral { color: #f59e0b; }

/* Loading dots animation */
.market-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: var(--space-xl);
}
.market-loading-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: market-bounce 1.2s ease-in-out infinite;
}
.market-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.market-loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes market-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

.market-error {
  padding: var(--space-lg);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Article Market Pulse widget ── */
.market-pulse-widget {
  margin-bottom: var(--space-xl);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.market-pulse-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--brand-purple);
  border-bottom: 2px solid var(--brand-red);
}

.market-pulse-label {
  font-family: var(--font-headline);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.market-pulse-source {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.55);
  margin-left: auto;
  text-decoration: none;
}
.market-pulse-source:hover { color: #fff; }

.market-pulse-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.market-pulse-inner .market-card {
  border-bottom: none;
  border-right: 1px solid var(--border);
}
.market-pulse-inner .market-card:last-child { border-right: none; }

/* ── Responsive: collapse sidebar below content on tablet ── */
@media (max-width: 1024px) {
  .homepage-sidebar-grid {
    grid-template-columns: 1fr 260px;
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  .homepage-sidebar-grid {
    grid-template-columns: 1fr;
  }
  .market-sidebar {
    position: static;   /* no longer sticky on mobile */
  }
  .market-sidebar-inner { max-height: 360px; }
  .market-pulse-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   18b. AD UNITS
   ============================================================ */

/* Common wrapper — equal margin + padding on every ad unit site-wide */
.ad-unit {
  width: 100%;
  margin: var(--space-xl) auto;  /* 40px above and below, every unit, every page */
  padding: var(--space-xl);      /* 40px inside on all 4 sides */
  text-align: center;
  clear: both;
}
/* Fixed sidebar units (tall/square) live inside .sidebar-ads which manages its own spacing */
.ad-fixed {
  margin: 0;
  padding: var(--space-sm) 0;
}
.ad-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

/* Dev-mode placeholder — clearly labelled, grey box */
.ad-placeholder {
  background: repeating-linear-gradient(
    45deg,
    var(--bg-card),
    var(--bg-card) 10px,
    var(--border) 10px,
    var(--border) 11px
  );
  border: 1px dashed var(--border);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.ad-placeholder .ad-label { margin-bottom: 0; }

/* Leaderboard — constrain width, collapse adjacent dividers */
.ad-leaderboard { max-width: var(--container); }
.ad-leaderboard .ad-placeholder { min-height: 90px; }

/* Section-dividers adjacent to any ad already have the ad margin for separation */
.section-divider + .ad-unit,
.ad-unit + .section-divider { margin: 0; height: 0; }

/* Rectangle — constrain width, base class handles margin+padding */
.ad-rectangle { max-width: 800px; }
.ad-rectangle .ad-placeholder { min-height: 280px; }

/* In-article — flows with article text */
.ad-in-article {
  margin: var(--space-xl) 0;
}
.ad-in-article .ad-placeholder { min-height: 120px; }

/* Fixed-size sidebar units (tall + square) */
.ad-fixed {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-sm) 0;
}
.ad-fixed .ad-placeholder {
  width: 100%;
  max-width: 300px;
}

/* Sidebar ad stack: tall on top, square below */
.sidebar-ads {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* On mobile: hide tall vertical, keep square only */
@media (max-width: 768px) {
  .sidebar-ads .ad-fixed:first-child { display: none; }
}

/* On narrow screens collapse remaining fixed unit to full width */
@media (max-width: 480px) {
  .ad-fixed ins.adsbygoogle,
  .ad-fixed .ad-placeholder {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Ensure AdSense ins block fills wrapper */
.ad-unit ins.adsbygoogle { display: block !important; }

/* ============================================================
   19. MEDIA QUERIES
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 3fr 2fr; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  /* Weather auto-sizes left; trending fills remaining space left-to-right; clock hidden */
  .widgets-inner { grid-template-columns: auto 1fr; }
  .datetime-widget { display: none; }
  .newsletter-inner { gap: var(--space-xl); }
}

@media (max-width: 768px) {
  :root { --nav-height: 50px; }

  .nav-links  { display: none; }

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

  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section-two-col { grid-template-columns: 1fr; }

  .newsletter-inner { grid-template-columns: 1fr; gap: var(--space-xl); }
  .newsletter-fields { flex-direction: column; }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .about-layout { grid-template-columns: 1fr; }
  .about-sidebar { position: static; }
  .about-hero-video { height: 52vh; min-height: 300px; }
  .article-page { padding: var(--space-lg) var(--space-md); }
}

@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-md); }
  .hero-section { padding: var(--space-lg) 0; }
  .content-section { padding: var(--space-lg) 0; }
  .footer-top { grid-template-columns: 1fr; }
  /* Keep weather + trending on same row — weather auto, trending fills left-to-right */
  .widgets-inner { grid-template-columns: auto 1fr; gap: var(--space-md); }
  .datetime-widget { display: none; }
  .trending-widget { display: flex; }
}

/* ============================================================
   DARK MODE — Remove red accents; use teal-green (#7bf981)
   Red is reserved ONLY for: breaking-news ticker + any
   category tag explicitly assigned red (AI, Policy, Security).
   ============================================================ */

/* Dark mode accent variable — used everywhere red was */
[data-theme="dark"] {
  --dm-accent: #7bf981;
  --dm-accent-text: #0d2a1f;
}

/* General link hover */
[data-theme="dark"] a:hover { color: var(--dm-accent); }

/* Nav underline indicator */
[data-theme="dark"] .nav-link:hover::after,
[data-theme="dark"] .nav-link.active::after { background: var(--dm-accent); }
[data-theme="dark"] .nav-link:hover   { color: var(--dm-accent); }
[data-theme="dark"] .theme-toggle:hover { color: var(--dm-accent); }
[data-theme="dark"] .nav-drawer-links a:hover { color: var(--dm-accent); }

/* Section header rule & "See all" link */
[data-theme="dark"] .section-header   { border-bottom-color: var(--dm-accent); }
[data-theme="dark"] .section-header-link { color: var(--dm-accent); }
[data-theme="dark"] .section-header-link:hover { color: var(--dm-accent); opacity: 0.8; }

/* Card title hovers */
[data-theme="dark"] .hero-side-card:hover h4              { color: var(--dm-accent); }
[data-theme="dark"] .article-card:hover .article-card-title { color: var(--dm-accent); }
[data-theme="dark"] .list-card:hover .list-card-title     { color: var(--dm-accent); }
[data-theme="dark"] a:hover .ranked-title                 { color: var(--dm-accent); }
[data-theme="dark"] .ranked-number                        { color: #555; }

/* Trending tags — use category colour if set, else green accent */
[data-theme="dark"] .trending-tag:hover { background: var(--cat-color, var(--dm-accent)); color: var(--cat-text, var(--dm-accent-text)); }

/* Article page elements */
[data-theme="dark"] .article-breadcrumb a:hover { color: var(--dm-accent); }
[data-theme="dark"] .article-body a             { color: var(--dm-accent); }
[data-theme="dark"] .article-body a:hover       { text-decoration-color: var(--dm-accent); }
[data-theme="dark"] blockquote                  { border-left-color: var(--dm-accent); }
[data-theme="dark"] .share-btn:hover            { border-color: var(--dm-accent); color: var(--dm-accent); }

/* Category filter bar — use category colour if set, else green accent */
[data-theme="dark"] .filter-btn.active  { background: var(--cat-color, var(--dm-accent)); color: var(--cat-text, var(--dm-accent-text)); border-color: var(--cat-color, var(--dm-accent)); }
[data-theme="dark"] .filter-btn:hover   { background: var(--cat-color, var(--dm-accent)); color: var(--cat-text, var(--dm-accent-text)); border-color: var(--cat-color, var(--dm-accent)); }

/* Footer social links */
[data-theme="dark"] .social-link:hover { border-color: var(--dm-accent); color: var(--dm-accent); }

/* Contact form */
[data-theme="dark"] .contact-input:focus  { border-color: var(--dm-accent); }
[data-theme="dark"] .contact-submit-btn   { background: var(--dm-accent); color: var(--dm-accent-text); }
[data-theme="dark"] .contact-submit-btn:hover { background: #5fd966; }
[data-theme="dark"] .contact-success      { color: var(--dm-accent); border-left-color: var(--dm-accent); }

/* Improve legibility: lift secondary & muted text brightness in dark mode */
[data-theme="dark"] { --text-secondary: #C8C8C8; --text-muted: #888888; }

/* Breaking-news ticker: KEEP red — do not override */
/* .ticker-label, .breaking-wrap — intentionally excluded */

/* ============================================================
   20. LEGAL + ADVERTISE PAGES
   ============================================================ */
.legal-page { padding: var(--space-2xl) 0 var(--space-2xl); }
.advertise-page { padding: 0; }

/* Advertise page re-uses .about-layout / .about-main for consistent type styling */
.advertise-page .about-main ul {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}
.advertise-page .about-main li {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.advertise-page .about-main a {
  color: var(--brand-red);
  text-decoration: underline;
}

/* Legal pages keep their own inner wrapper */
.legal-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) 0;
}
.legal-inner h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}
.legal-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}
.legal-content h2 {
  font-size: 1.2rem;
  margin: var(--space-xl) 0 var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}
.legal-content h2:first-child { border-top: none; margin-top: 0; }
.legal-content p {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}
.legal-content ul { padding-left: var(--space-lg); margin-bottom: var(--space-md); }
.legal-content li {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.legal-content a { color: var(--brand-red); text-decoration: underline; }

/* Advertise form */
.advertise-form {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--brand-red);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Override .form-group label for advertise form — give it breathing room */
.advertise-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.advertise-form .form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.advertise-form .form-group input,
.advertise-form .form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  border-radius: 0;
  transition: border-color var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.advertise-form .form-group input:focus,
.advertise-form .form-group textarea:focus {
  outline: none;
  border-color: var(--brand-red);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-red);
  flex-shrink: 0;
}

/* Consent checkbox — inline, left of text */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-red);
  flex-shrink: 0;
  margin-top: 2px; /* align with first line of text */
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
