/* ============================================================
   MarketMood — Design System v2
   Trading-terminal dark theme, elevated: richer palette, glow
   accents, card depth, clearer visual hierarchy for breaking
   vs. older news, mobile-first responsive grid.
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg: #0a0d14;
  --bg-alt: #0d1220;
  --bg-elevated: #11172a;
  --card: #131a2c;
  --card-hover: #161f36;
  --border: #22304a;
  --border-soft: #1a2338;
  --text: #eef1f8;
  --text-dim: #8b96b3;
  --text-faint: #5d6885;

  --accent: #22e0a8;       /* bullish green / brand primary */
  --accent-glow: rgba(34, 224, 168, 0.35);
  --accent-2: #4d9dff;     /* info blue */
  --accent-2-glow: rgba(77, 157, 255, 0.3);
  --purple: #a78bfa;       /* highlight accent for Trump Watch / special sections */
  --purple-glow: rgba(167, 139, 250, 0.3);
  --bear: #ff5c72;         /* bearish red */
  --bull: #22e0a8;
  --neutral: #ffc861;

  --gold: #f0b429;

  /* Opaque header background so the sticky nav never lets scrolled
     content "ghost" through it — same reason we avoid backdrop-filter
     here: a solid color is 100% reliable across browsers/themes. */
  --header-bg: #0d101a;

  --max-width: 1180px;
  --radius: 12px;
  --radius-lg: 18px;
  --mono: "SF Mono", "JetBrains Mono", "Consolas", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Light theme override ----------
   A fully designed alternative palette — not just an inverted dark theme.
   Keeps the same trading-terminal identity (mono accents, colored badges)
   but with a clean light background, dark text, and contrast-adjusted
   accent colors so bullish/bearish/info colors stay legible on white. */
[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-alt: #eaeef6;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --card-hover: #f3f6fc;
  --border: #d7deea;
  --border-soft: #e2e8f2;
  --text: #121826;
  --text-dim: #4d5872;
  --text-faint: #7c869c;

  --accent: #0f9d70;        /* bullish green, darkened for AA contrast on white */
  --accent-glow: rgba(15, 157, 112, 0.22);
  --accent-2: #1f6fd6;      /* info blue, darkened for contrast */
  --accent-2-glow: rgba(31, 111, 214, 0.18);
  --purple: #7c4fe0;
  --purple-glow: rgba(124, 79, 224, 0.2);
  --bear: #d6304a;          /* bearish red, darkened for contrast */
  --bull: #0f9d70;
  --neutral: #b6791a;       /* amber, darkened for contrast */

  --gold: #b6791a;

  /* Solid light-mode header background — must be explicitly opaque and
     legible; do not inherit the dark theme's --header-bg. */
  --header-bg: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(34, 224, 168, 0.07), transparent),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(77, 157, 255, 0.06), transparent);
  background-repeat: no-repeat;
}
[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(15, 157, 112, 0.06), transparent),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(31, 111, 214, 0.05), transparent);
}

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

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--accent-glow); }

/* ---------- Header ---------- */
/* FIX (2026-09-14): .site-header previously had a hardcoded dark
   rgba(10,13,20,0.85) background + backdrop-filter blur — fine on the
   dark theme, but in light mode it stayed dark/translucent, clashing with
   the light page and letting scrolled content "ghost" through while the
   bar looked like it wasn't cleanly pinned. Now uses a theme-aware, fully
   OPAQUE --header-bg (no backdrop-filter) so the sticky header is a clean
   solid bar in both themes with zero see-through/ghosting. */
.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
}
.logo-mark {
  color: var(--accent);
  font-size: 0.9em;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.logo-mark-img {
  width: 34px;
  height: 34px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 7px var(--accent-glow));
}
.logo:hover { text-decoration: none; color: var(--accent); }
.main-nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.navlink { color: var(--text-dim); font-weight: 600; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 2px; position: relative; }
.navlink:hover { color: var(--accent); text-decoration: none; }
.navlink-tool { color: var(--accent-2); border: 1px solid rgba(77,157,255,0.35); padding: 6px 12px; border-radius: 100px; }
.navlink-tool:hover { color: #05131f; background: var(--accent-2); border-color: var(--accent-2); }
.navlink-trump { color: var(--purple); border: 1px solid rgba(167,139,250,0.4); padding: 6px 12px; border-radius: 100px; }
.navlink-trump:hover { color: #150e2b; background: var(--purple); border-color: var(--purple); }
.navlink-ig { display: inline-flex; align-items: center; gap: 5px; color: var(--text-dim); }
.navlink-ig svg { width: 15px; height: 15px; }
.navlink-ig:hover { color: #e1306c; }
.navlink-fx { font-size: 0.76rem; opacity: 0.88; }
.navlink-fx:hover { opacity: 1; }
.static-page-intro { color: var(--text-dim); font-size: 0.96rem; margin: 4px 0 18px; }

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- Theme toggle button (header) ---------- */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.theme-toggle-btn:hover { border-color: var(--accent-2); color: var(--accent-2); transform: translateY(-1px); }

/* ---------- Mobile nav collapse (hamburger) ----------
   FIX (2026-09-14): the full nav (13 category links + Trump Watch + Tools +
   Founder + toggle) wraps to multiple lines on narrow viewports, making the
   sticky header 250-340px tall \u2014 on small phones that's over half the
   screen, permanently, at every scroll position. Below 860px this hides the
   inline nav and shows a compact hamburger button instead; .main-nav becomes
   a slide-down panel toggled by the .nav-open class on .site-header (added
   by site.js). Desktop/tablet (>860px) is completely unchanged. */
.nav-burger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-burger-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }

@media (max-width: 860px) {
  .nav-burger-btn { display: inline-flex; }
  .header-inner { flex-wrap: nowrap; position: relative; }
  /* .site-header keeps position:sticky (set earlier in the file) \u2014
     positioning context for the dropdown panel comes from .header-inner
     (position:relative, just above), NOT from overriding .site-header
     itself, so the sticky-on-scroll behavior stays intact. */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 16px 32px -12px rgba(0,0,0,0.4);
    padding: 8px 16px 14px;
    max-height: 75vh;
    overflow-y: auto;
    z-index: 25;
  }
  .site-header.nav-open .main-nav { display: flex; }
  .main-nav .navlink,
  .main-nav .navlink-ig {
    padding: 10px 4px;
    border-bottom: 1px solid var(--border-soft);
    width: 100%;
  }
  .main-nav .navlink-tool,
  .main-nav .navlink-trump {
    border-radius: 8px;
    text-align: center;
    margin: 6px 0;
    border-bottom: none;
  }
  /* Theme toggle is relocated by site.js (initMobileNav) to sit directly in
     .header-inner next to the burger, so it stays reachable in the compact
     bar even while the dropdown panel is closed. Hide the now-empty slot
     it left behind inside .main-nav (JS moves the actual node, this is a
     no-op safety rule in case JS hasn't run yet on a slow connection). */
  .header-inner > .theme-toggle-btn {
    margin-left: 8px;
  }
}

/* ---------- Breaking News (homepage, top of page) ---------- */
.breaking-news-section {
  padding: 22px 0 4px;
}
.breaking-news-head {
  margin-bottom: 4px;
}
.breaking-news-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bear);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
}
.breaking-news-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bear);
  display: inline-block;
  animation: pulse-dot 1.6s infinite;
  flex-shrink: 0;
}
.breaking-news-subtitle {
  color: var(--text-dim);
  text-transform: none;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0;
  margin-left: 6px;
}
.breaking-news-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  border: 1px solid rgba(255, 92, 108, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 92, 108, 0.04);
  overflow: hidden;
}
.breaking-news-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 92, 108, 0.14);
  color: var(--text);
  flex-wrap: wrap;
}
.breaking-news-item:last-child { border-bottom: none; }
.breaking-news-item:hover { text-decoration: none; background: rgba(255, 92, 108, 0.08); }
.breaking-news-item-cat {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  background: rgba(77, 157, 255, 0.12);
  padding: 3px 9px;
  border-radius: 100px;
  flex-shrink: 0;
}
.breaking-news-item-title {
  flex: 1 1 320px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- MarketMood — fundamental bias bar (replaces old ticker strip) ---------- */
.marketmood-section {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border-soft);
  padding: 24px 0 28px;
}
.marketmood-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.marketmood-title {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.marketmood-title .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse-dot 2s infinite;
  display: inline-block;
}
.marketmood-subtitle {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.marketmood-updated { font-family: var(--mono); font-size: 0.74rem; color: var(--text-faint); }

/* ---------- MarketMood signal slider/carousel (replaces static mood-grid) ---------- */
.mood-slider {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mood-slider-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: var(--radius);
  touch-action: pan-y;
  cursor: grab;
  position: relative;
}
.mood-slider-viewport:active { cursor: grabbing; }
.mood-slider-track {
  display: flex;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.mood-slider-track.dragging { transition: none; }
.mood-slide {
  flex: 0 0 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 0 2px;
}
@media (min-width: 720px) {
  .mood-slide { flex: 0 0 33.333%; min-width: 33.333%; }
}
.mood-arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.mood-arrow:hover { border-color: var(--accent-2); color: var(--accent-2); transform: translateY(-1px); }
.mood-slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.mood-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.mood-dot.active { background: var(--accent-2); transform: scale(1.25); }
@media (min-width: 720px) { .mood-slider-dots { display: none; } }

.mood-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  display: block;
}
.mood-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.45);
}
.mood-card:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.mood-card-hint {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
  opacity: 0.75;
  display: block;
}
.mood-card.mood-bullish { border-left-color: var(--bull); }
.mood-card.mood-bearish { border-left-color: var(--bear); }
.mood-card.mood-neutral { border-left-color: var(--neutral); }
.mood-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mood-label { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.02em; }
.mood-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: uppercase;
  white-space: nowrap;
}
.mood-badge-bullish { background: rgba(34, 224, 168, 0.14); color: var(--bull); border: 1px solid rgba(34, 224, 168, 0.4); }
.mood-badge-bearish { background: rgba(255, 92, 108, 0.14); color: var(--bear); border: 1px solid rgba(255, 92, 108, 0.4); }
.mood-badge-neutral { background: rgba(255, 200, 97, 0.14); color: var(--neutral); border: 1px solid rgba(255, 200, 97, 0.4); }
.mood-reasoning { margin: 0; font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; }
.marketmood-note {
  margin-top: 14px;
  font-size: 0.76rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* ---------- MarketMood — homepage hero variant (signal-bar-first layout) ---------- */
.marketmood-section-hero {
  padding: 40px 0 34px;
  border-bottom: 1px solid var(--border-soft);
}
.marketmood-section-hero .marketmood-title { font-size: 1.3rem; }
.marketmood-section-hero .mood-slider { margin-top: 6px; }
.marketmood-section-hero .mood-card-hint { display: block; }

/* ---------- Latest strip (minimal homepage news, replaces full article wall) ---------- */
.latest-strip {
  padding: 30px 0 6px;
}
.latest-strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}
.section-title-slim {
  margin: 0;
  padding-left: 12px;
}
.latest-strip-more {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 600;
  white-space: nowrap;
}
.latest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  flex-wrap: wrap;
}
.latest-item:last-child { border-bottom: none; }
.latest-item:hover { text-decoration: none; background: var(--card-hover); border-radius: 8px; }
.latest-item-cat {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  background: rgba(77, 157, 255, 0.12);
  padding: 3px 9px;
  border-radius: 100px;
  flex-shrink: 0;
}
.latest-item-title {
  flex: 1 1 320px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.latest-item-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-faint);
  flex-shrink: 0;
  margin-left: auto;
}

/* ---------- MarketMood detail modal (click-to-expand from signal bar) ---------- */
.mood-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.78);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mood-modal-overlay[hidden] { display: none; }
.mood-modal {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px 28px 26px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
}
.mood-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mood-modal-close:hover { color: var(--bear); border-color: var(--bear); }
.mood-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.mood-modal-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.mood-modal-title {
  font-size: 1.3rem;
  margin: 4px 0 14px;
  line-height: 1.35;
  color: var(--text);
  padding-right: 30px;
}
.mood-modal-reasoning {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 16px;
}
.mood-modal-source {
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.mood-modal-source a { font-weight: 600; }
.mood-modal-updated {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.mood-modal-tv {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  min-height: 220px;
}

/* ---------- TradingView price widgets (replaces old custom price panel) ---------- */
.tv-panel {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border-soft);
  padding: 22px 0 26px;
}
.tv-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tv-panel-title {
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.tv-panel-note {
  margin-top: 14px;
  font-size: 0.76rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.tv-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px 4px;
  min-height: 250px;
}
.tradingview-widget-container { width: 100%; height: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: 52px 20px 32px;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 40px 0 18px;
  letter-spacing: -0.01em;
  font-family: var(--mono);
  text-transform: uppercase;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.section-title .section-sub {
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.section-title.title-trump { border-left-color: var(--purple); }

/* ---------- Category page — overall Bullish/Bearish/Neutral verdict ---------- */
/* Reuses .mood-card / .mood-badge styling from the homepage Live Signals slider
   for visual consistency; sits directly below the page <h1>, before the article grid. */
#categoryOverallMood {
  margin: -4px 0 22px;
}
#categoryOverallMood:empty { margin: 0; }
.category-overall-mood {
  max-width: 480px;
}
.category-overall-mood .mood-label {
  font-size: 0.78rem;
}

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.grid-featured {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.grid-featured .card:first-child {
  grid-column: span 2;
}
@media (max-width: 760px) {
  .grid-featured .card:first-child { grid-column: span 1; }
}

.card {
  display: block;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
  box-shadow: 0 12px 28px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(77,157,255,0.15);
  text-decoration: none;
}
.card:hover::before { opacity: 1; }
.card-cat {
  display: inline-block;
  background: rgba(77, 157, 255, 0.12);
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
  font-family: var(--mono);
}
.card h3 {
  font-size: 1.12rem;
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.35;
}
.card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0 0 12px;
}
.card-meta {
  color: var(--text-faint);
  font-size: 0.74rem;
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
}
.card-breaking {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ff8a8a;
  background: rgba(255, 92, 108, 0.12);
  border: 1px solid rgba(255, 92, 108, 0.35);
  padding: 3px 8px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.card-breaking::before { content: "●"; font-size: 0.6em; animation: pulse-dot 1.6s infinite; }

/* ---------- Per-card live relative-age label ("30 min ago", "2 hr ago") ----------
   Sits inside .card-meta / .latest-item-meta / .breaking-news-item-meta,
   reusing their existing mono/faint text styling. A subtle live-dot echoes
   the corner news-age toast so the two features read as one system. Value
   is ticked forward in JS every 45s (see initArticleAgeTicker in site.js) —
   purely a display refresh, no extra network calls. */
.article-age {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-faint);
}
.article-age::before {
  content: "●";
  font-size: 0.55em;
  color: var(--accent-2);
  animation: pulse-dot 2.4s infinite;
}
.breaking-news-item-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  flex-shrink: 0;
}
.card-pinned-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.35);
  padding: 3px 8px;
  border-radius: 100px;
}

/* ---------- Impact badges ---------- */
.impact-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-bullish { background: rgba(34, 224, 168, 0.14); color: var(--bull); border: 1px solid rgba(34, 224, 168, 0.4); }
.badge-bearish { background: rgba(255, 92, 108, 0.14); color: var(--bear); border: 1px solid rgba(255, 92, 108, 0.4); }
.badge-mixed { background: rgba(255, 200, 97, 0.14); color: var(--neutral); border: 1px solid rgba(255, 200, 97, 0.4); }
.badge-neutral { background: rgba(139, 150, 179, 0.14); color: var(--text-dim); border: 1px solid var(--border); }

/* ---------- Instrument tags ---------- */
.instrument-tags { margin: 14px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 6px;
}

/* ---------- TL;DR box ---------- */
.tldr-box {
  background: linear-gradient(135deg, rgba(34,224,168,0.08), rgba(77,157,255,0.05));
  border: 1px solid rgba(34, 224, 168, 0.3);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0 24px;
}
.tldr-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tldr-box p { margin: 0; color: var(--text); font-size: 0.98rem; }

/* ---------- Impact box on article page ---------- */
.impact-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0 30px;
}
.impact-box-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* ---------- Source box ---------- */
.source-box {
  margin-top: 30px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.timestamp-line {
  color: var(--text-faint);
  font-size: 0.8rem;
  font-family: var(--mono);
  margin-top: 14px;
}

/* ---------- Article ---------- */
.article {
  max-width: 780px;
  padding-top: 36px;
  padding-bottom: 40px;
}
.article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article h1 {
  font-size: 2.05rem;
  line-height: 1.28;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.article-lede {
  color: var(--text-dim);
  font-size: 1.12rem;
  margin-bottom: 10px;
}
.article-body h2 {
  font-size: 1.42rem;
  margin: 34px 0 14px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.article-body h3 {
  font-size: 1.15rem;
  margin: 26px 0 12px;
}
.article-body p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1.02rem;
}
.article-body ul, .article-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 24px 0;
  padding: 4px 20px;
  color: var(--text-dim);
  font-style: italic;
}
.table-wrap { overflow-x: auto; margin: 0 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
th { background: var(--bg-alt); font-family: var(--mono); font-size: 0.85rem; text-transform: uppercase; }

.related-section { padding-bottom: 50px; }

/* ---------- Trump Watch section ---------- */
.trump-strip {
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(10,13,20,0));
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 0 36px;
}
.trump-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-elevated) 100%);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
}
.trump-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.trump-card h3 { font-size: 1.2rem; margin: 0 0 6px; color: var(--text); line-height: 1.35; }
.trump-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--purple);
  background: rgba(167, 139, 250, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.4);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  white-space: nowrap;
}
.trump-quote {
  border-left: 3px solid var(--purple);
  margin: 14px 0;
  padding: 10px 18px;
  color: var(--text);
  font-style: italic;
  font-size: 1.02rem;
  background: rgba(167, 139, 250, 0.05);
  border-radius: 0 8px 8px 0;
}
.trump-source {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 10px 0 14px;
}
.summary-toggle-btn {
  background: rgba(77, 157, 255, 0.12);
  border: 1px solid rgba(77, 157, 255, 0.4);
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.summary-toggle-btn:hover { background: var(--accent-2); color: #05131f; }
.summary-panel {
  display: none;
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
}
.summary-panel.show { display: block; }
.impact-section {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(255, 200, 97, 0.06);
  border: 1px solid rgba(255, 200, 97, 0.25);
  border-radius: var(--radius);
}
.impact-section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neutral);
  font-weight: 700;
  margin-bottom: 8px;
}
.impact-section ul { margin: 8px 0 0; padding-left: 20px; }
.impact-section li { margin-bottom: 6px; font-size: 0.92rem; }
.impact-section .instrument-tags { margin: 4px 0 10px; }

/* ---------- Poll widget ---------- */
.poll-widget {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 20px 0 36px;
}
.poll-widget h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin: 0 0 14px;
}
.poll-question { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.poll-option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 0.96rem;
  font-family: var(--sans);
  transition: border-color 0.15s ease;
}
.poll-option:hover { border-color: var(--accent-2); }
.poll-result-bar-wrap { display: none; }
.poll-widget.voted .poll-option { display: none; }
.poll-widget.voted .poll-result-bar-wrap { display: block; }
.poll-result-row { margin-bottom: 12px; }
.poll-result-label { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; color: var(--text-dim); }
.poll-result-bar-bg { background: var(--bg-alt); border-radius: 6px; height: 10px; overflow: hidden; }
.poll-result-bar-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); height: 100%; border-radius: 6px; transition: width 0.4s ease; }
.poll-total { font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); margin-top: 8px; }

/* ---------- Static pages ---------- */
.static-page {
  max-width: 780px;
  padding: 36px 20px 60px;
}
.static-page h1 { font-size: 1.9rem; margin-bottom: 20px; }
.static-page h2 { font-size: 1.3rem; margin: 28px 0 12px; }
.static-page p, .static-page ul { color: var(--text); font-size: 1.01rem; }
.static-page ul { padding-left: 22px; }
.static-page li { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-alt);
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 36px 20px;
}
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin: 0 0 12px;
  font-family: var(--mono);
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--accent); }
.footer-col p { color: var(--text-dim); font-size: 0.88rem; }
.disclaimer { font-size: 0.78rem !important; margin-top: 10px; opacity: 0.75; }
.footer-ig {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  color: #e1306c !important;
  font-weight: 600;
}
.footer-ig svg { width: 16px; height: 16px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding: 16px 20px;
  color: var(--text-faint);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- SL Calculator specific ---------- */
.calc-wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 60px; }
.calc-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 22px;
}
.calc-card h2 { font-family: var(--mono); font-size: 1.05rem; text-transform: uppercase; margin: 0 0 18px; color: var(--accent-2); }
.calc-field { margin-bottom: 16px; }
.calc-field label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 6px; font-family: var(--mono); }
.calc-field input, .calc-field select {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--mono);
}
.calc-field input:focus, .calc-field select:focus { outline: none; border-color: var(--accent-2); }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05131f;
  font-weight: 700;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.calc-btn:hover { opacity: 0.9; }
.calc-results { display: none; }
.calc-results.show { display: block; }
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
}
.result-row:last-child { border-bottom: none; }
.result-label { color: var(--text-dim); font-size: 0.88rem; }
.result-value { font-weight: 700; font-size: 1.05rem; }
.result-value.highlight { color: var(--accent); font-size: 1.2rem; }
.calc-disclaimer {
  background: rgba(255, 200, 97, 0.08);
  border: 1px solid rgba(255, 200, 97, 0.3);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.86rem;
  color: var(--text-dim);
  margin-top: 20px;
}
.calc-disclaimer strong { color: var(--neutral); }

/* ---------- Disclaimer modal ---------- */
.disclaimer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.disclaimer-modal-overlay[hidden] { display: none; }
.disclaimer-modal {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
}
.disclaimer-modal h2 {
  font-family: var(--mono);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.disclaimer-modal p {
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0 0 20px;
}
.disclaimer-modal-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05131f;
  font-weight: 700;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 0.98rem;
  cursor: pointer;
  font-family: var(--sans);
}
.disclaimer-modal-btn:hover { opacity: 0.92; }

/* ---------- Red Folder News (high-impact economic calendar) ---------- */
.red-folder-strip {
  padding: 22px 0 6px;
  border: 1px solid rgba(255, 60, 60, 0.35);
  border-radius: 12px;
  background: rgba(255, 60, 60, 0.05);
  margin-top: 8px;
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: 14px;
}
.red-folder-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bear);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
}
.red-folder-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bear);
  display: inline-block;
  animation: pulse-dot 1.6s infinite;
  flex-shrink: 0;
}
.red-folder-subtitle {
  color: var(--text-dim);
  text-transform: none;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0;
  margin-left: 6px;
}
.red-folder-subsection { margin-top: 4px; }
.red-folder-subsection + .red-folder-subsection { margin-top: 10px; }
.red-folder-subhead {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin: 4px 6px 2px;
  font-weight: 700;
}
.red-folder-subhead-released { color: var(--text-dim); }
.red-folder-subhead-upcoming { color: var(--accent-2); }
.red-folder-event-clickable { cursor: pointer; }
.red-folder-event-clickable:hover { background: rgba(255, 60, 60, 0.06); border-radius: 8px; }
.red-folder-list { margin-top: 6px; }
.red-folder-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255, 60, 60, 0.14);
  flex-wrap: wrap;
}
.red-folder-event:last-child { border-bottom: none; }
.red-folder-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--bear);
  padding: 3px 8px;
  border-radius: 100px;
  flex-shrink: 0;
  font-weight: 700;
}
.red-folder-badge-upcoming {
  background: var(--accent-2);
}
.red-folder-country {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent-2);
  background: rgba(77, 157, 255, 0.12);
  padding: 3px 8px;
  border-radius: 100px;
  flex-shrink: 0;
}
.red-folder-event-title {
  flex: 1 1 260px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.red-folder-event-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  flex-shrink: 0;
}
.red-folder-values {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  flex-shrink: 0;
  white-space: nowrap;
}
.red-folder-note {
  font-size: 0.68rem;
  color: var(--text-faint);
  padding: 8px 4px 2px;
}
.red-folder-empty {
  padding: 10px 6px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.trump-feed-empty {
  padding: 24px 6px;
  color: var(--text-dim);
  font-size: 0.95rem;
  grid-column: 1 / -1;
}
.breaking-news-empty {
  padding: 10px 6px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ---------- Site-wide "news age" toast (corner ticker) ---------- */
/* Small, unobtrusive corner widget (NOT a full section) that shows the
   most recent important headline with a live relative-age timer; see
   initNewsAgeToast() in site.js for the ticker/linger behavior. Reuses the
   same modal look-and-feel tokens (--bull/--bear/--neutral, --border,
   --bg-alt) as the rest of the site for visual consistency. */
.news-age-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  /* Above the entry disclaimer overlay (z-index: 1000) so this genuinely
     unobtrusive corner ticker stays visible site-wide even on a visitor's
     very first pageview, before they've dismissed the disclaimer — it's a
     small pill in the corner, not something that competes with the modal
     for attention, so layering it on top is safe and matches the "site-wide,
     always there" spec. */
  z-index: 1001;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  animation: news-toast-in 0.25s ease-out;
  transition: border-color 0.2s ease;
}
.news-age-toast:hover { border-color: var(--accent-2); }
@keyframes news-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.news-age-toast-badge {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(139, 150, 179, 0.14);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.news-age-toast-important .news-age-toast-badge {
  background: var(--bear);
  color: #fff;
  border-color: var(--bear);
  font-weight: 700;
  animation: pulse-dot 1.6s infinite;
}
.news-age-toast-title {
  flex: 1 1 auto;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.news-age-toast-age {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .calc-row { grid-template-columns: 1fr; }
  .mood-slide { flex: 0 0 100%; min-width: 100%; }
  .tv-grid { grid-template-columns: 1fr; }
  .trump-card-head { flex-direction: column; }
  .mood-modal { padding: 24px 18px 20px; }
  .latest-item-title { flex-basis: 100%; }
  .latest-item-meta { margin-left: 0; }
  .red-folder-event-title { flex-basis: 100%; }
  .news-age-toast { left: 12px; right: 12px; max-width: none; bottom: 12px; }
}
/* ============================================================
   MarketMood — Phase 1 Redesign additions (2026-09-14)
   Premium financial-terminal polish: market ticker, breaking
   news card upgrade, Market Impact/Interpretation emphasis,
   source-tier labels, disclaimer banner, trust/methodology
   pages, hero, live/closed status dot, gauge-style mood number,
   glassmorphism (scoped), micro-animations.
   Purely additive — does not remove or rename any existing
   selector used by prior features (mood slider, breaking news
   logic, category feed, trump feed, admin, calculator, polls,
   red folder, news-age toast, theme toggle, mobile nav).
   ============================================================ */

/* ---------- Body background: subtle gradient, not flat ---------- */
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(34, 224, 168, 0.07), transparent),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(77, 157, 255, 0.06), transparent),
    linear-gradient(180deg, #0a0d14 0%, #0d1220 55%, #0a0d14 100%);
  background-attachment: fixed;
}
[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(15, 157, 112, 0.05), transparent),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(31, 111, 214, 0.045), transparent),
    linear-gradient(180deg, #ffffff 0%, #f4f6fb 55%, #ffffff 100%);
  background-attachment: fixed;
}

/* ---------- Fade-in on load (subtle, no layout shift) ---------- */
@keyframes mm-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.mm-fade-in { animation: mm-fade-in 0.35s ease-out both; }

/* ---------- Market ticker (top of every page, above header) ---------- */
.market-ticker-wrap {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
}
.market-ticker-wrap::before,
.market-ticker-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}
.market-ticker-wrap::before { left: 0; background: linear-gradient(90deg, var(--header-bg), transparent); }
.market-ticker-wrap::after { right: 0; background: linear-gradient(270deg, var(--header-bg), transparent); }
.market-ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
  animation: mm-ticker-scroll 42s linear infinite;
}
.market-ticker-wrap:hover .market-ticker-track { animation-play-state: paused; }
@keyframes mm-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.market-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  border-right: 1px solid var(--border-soft);
  text-decoration: none;
  flex-shrink: 0;
}
.market-ticker-item:hover { color: var(--text); text-decoration: none; background: var(--card-hover); }
.market-ticker-item .mt-sym { font-weight: 700; color: var(--text); }
.market-ticker-item .mt-price { color: var(--text-dim); }
.market-ticker-item .mt-chg { font-weight: 700; }
.market-ticker-item .mt-chg.mt-up { color: var(--bull); }
.market-ticker-item .mt-chg.mt-down { color: var(--bear); }
.market-ticker-item .mt-flag {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
}
.mt-flag-live { background: rgba(34, 224, 168, 0.15); color: var(--bull); border: 1px solid rgba(34, 224, 168, 0.4); }
.mt-flag-delayed { background: rgba(255, 200, 97, 0.15); color: var(--neutral); border: 1px solid rgba(255, 200, 97, 0.4); }
.market-ticker-empty {
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-faint);
}
@media (max-width: 640px) {
  .market-ticker-item { padding: 0 12px; font-size: 0.72rem; }
}

/* ---------- Markets Live / Closed status dot ---------- */
.market-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.market-status-pill .msp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.market-status-pill.is-open .msp-dot { background: var(--bull); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse-dot 2s infinite; }
.market-status-pill.is-open { color: var(--bull); }
.market-status-pill.is-closed .msp-dot { background: var(--text-faint); }
.market-status-pill.is-closed { color: var(--text-faint); }

/* ---------- Homepage hero (adds above existing marketmood-section-hero) ---------- */
.mm-hero {
  padding: 46px 0 18px;
  text-align: center;
  position: relative;
}
.mm-hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.mm-hero h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--text) 25%, var(--accent-2) 75%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mm-hero-tagline {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 8px;
  font-weight: 600;
}
.mm-hero-sub {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-faint);
  margin: 0;
  letter-spacing: 0.01em;
}

/* ---------- Glassmorphism, scoped: hero / breaking news / mood only ---------- */
.mm-glass {
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
[data-theme="dark"] .mm-glass { background: rgba(19, 26, 44, 0.55); }
[data-theme="light"] .mm-glass { background: rgba(255, 255, 255, 0.65); }

/* ---------- Breaking News card redesign ---------- */
.breaking-news-section.mm-glass-wrap {
  padding-top: 22px;
}
.breaking-news-list.mm-redesigned {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 92, 108, 0.35);
  background: linear-gradient(160deg, rgba(255, 92, 108, 0.09), rgba(19, 26, 44, 0.5) 60%);
}
[data-theme="light"] .breaking-news-list.mm-redesigned {
  background: linear-gradient(160deg, rgba(214, 48, 74, 0.06), rgba(255, 255, 255, 0.7) 60%);
}
.bn-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 92, 108, 0.16);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.bn-card:last-child { border-bottom: none; }
.bn-card:hover { text-decoration: none; background: rgba(255, 92, 108, 0.07); transform: translateX(2px); }
.bn-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bn-importance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 5px;
}
.bn-importance-high { background: rgba(255, 92, 108, 0.16); color: var(--bear); border: 1px solid rgba(255, 92, 108, 0.4); }
.bn-importance-normal { background: rgba(139, 150, 179, 0.14); color: var(--text-dim); border: 1px solid var(--border); }
.bn-asset-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  background: rgba(77, 157, 255, 0.12);
  padding: 3px 9px;
  border-radius: 100px;
}
.bn-headline {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.bn-impact-mini {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.45;
  border-left: 2px solid var(--border);
  padding-left: 10px;
}
.bn-footer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}
.bn-source-tier {
  font-size: 0.62rem;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.tier-high { background: rgba(34, 224, 168, 0.14); color: var(--bull); border: 1px solid rgba(34, 224, 168, 0.35); }
.tier-standard { background: rgba(139, 150, 179, 0.14); color: var(--text-dim); border: 1px solid var(--border); }

/* ---------- Impact icon+label badges (compact) ---------- */
.impact-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 100px;
}
.impact-pill-bullish { background: rgba(34, 224, 168, 0.14); color: var(--bull); border: 1px solid rgba(34, 224, 168, 0.4); }
.impact-pill-bearish { background: rgba(255, 92, 108, 0.14); color: var(--bear); border: 1px solid rgba(255, 92, 108, 0.4); }
.impact-pill-neutral,
.impact-pill-mixed { background: rgba(255, 200, 97, 0.14); color: var(--neutral); border: 1px solid rgba(255, 200, 97, 0.4); }
.impact-pill-high { background: rgba(255, 92, 108, 0.16); color: var(--bear); border: 1px solid rgba(255, 92, 108, 0.4); }

/* ---------- Market Impact box emphasis (article/card display) ---------- */
.impact-box.mm-emphasized {
  border: 1px solid rgba(77, 157, 255, 0.35);
  border-left: 4px solid var(--accent-2);
  background: linear-gradient(135deg, rgba(77,157,255,0.07), rgba(19,26,44,0.4));
  box-shadow: 0 8px 22px -14px rgba(0,0,0,0.5);
}
[data-theme="light"] .impact-box.mm-emphasized {
  background: linear-gradient(135deg, rgba(31,111,214,0.05), rgba(255,255,255,0.7));
}
.impact-box-per-asset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.impact-box-per-asset-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.impact-box-hedge-note {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* ---------- Facts vs. Interpretation split (article page) ---------- */
.article-section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin: 26px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-section-label.label-interpretation { color: var(--neutral); margin-top: 30px; }
.article-section-label::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 2px;
  background: currentColor;
  display: inline-block;
  opacity: 0.7;
}
.article-body h2.mm-interpretation-heading {
  color: var(--neutral);
  border-left: 3px solid var(--neutral);
  padding-left: 12px;
  font-size: 1.2rem;
}

/* ---------- Source-tier label + Read Original link ---------- */
.source-box.mm-enhanced {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.source-box-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.read-original-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-2);
  white-space: nowrap;
}

/* ---------- Disclaimer banner (non-buried, homepage + article) ---------- */
.mm-disclaimer-banner {
  background: rgba(255, 200, 97, 0.07);
  border: 1px solid rgba(255, 200, 97, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.86rem;
  color: var(--text-dim);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mm-disclaimer-banner .mdb-icon { flex-shrink: 0; font-size: 1.1rem; line-height: 1.4; }
.mm-disclaimer-banner strong { color: var(--neutral); }
.footer-disclaimer-block {
  background: rgba(255, 200, 97, 0.06);
  border: 1px solid rgba(255, 200, 97, 0.25);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 20px 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.footer-disclaimer-block strong { color: var(--neutral); }

/* ---------- Gauge-style Market Mood number (per-instrument summary) ---------- */
.mm-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mm-gauge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.mm-gauge svg { display: block; }
.mm-gauge-track { fill: none; stroke: var(--border); stroke-width: 4; }
.mm-gauge-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dasharray 0.6s ease-out;
}
.mm-gauge-fill.gauge-bullish { stroke: var(--bull); }
.mm-gauge-fill.gauge-bearish { stroke: var(--bear); }
.mm-gauge-fill.gauge-neutral { stroke: var(--neutral); }

/* ---------- Trust / Methodology pages ---------- */
.trust-badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 100px;
}
.methodology-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.methodology-step:last-child { border-bottom: none; }
.methodology-step-num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(77, 157, 255, 0.12);
  border: 1px solid rgba(77, 157, 255, 0.35);
  color: var(--accent-2);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.methodology-step-body h3 { margin: 0 0 4px; font-size: 1.02rem; }
.methodology-step-body p { margin: 0; color: var(--text-dim); font-size: 0.93rem; }
.not-does-list {
  background: rgba(255, 92, 108, 0.05);
  border: 1px solid rgba(255, 92, 108, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
}
.not-does-list h3 { margin-top: 0; color: var(--bear); font-size: 1rem; }
.not-does-list ul { margin-bottom: 0; }

/* ---------- Empty-state polish (touched surfaces only) ---------- */
.mm-empty-state {
  padding: 22px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.mm-empty-state a { font-weight: 700; }

/* ---------- Card hover lift+glow (ticker/mood cards already have hover; extend subtly) ---------- */
.market-ticker-item, .mood-card, .card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.15s ease;
}

/* ---------- Light theme distinctiveness reinforcement ---------- */
[data-theme="light"] .site-header { box-shadow: 0 1px 0 rgba(18,24,38,0.04); }
[data-theme="light"] .card { box-shadow: 0 1px 3px rgba(18,24,38,0.05); }

/* ============================================================
   MarketMood — Phase 2: Market Mood Index gauge, Gold drivers,
   Economic Calendar page. Purely additive.
   ============================================================ */

/* ---------- Overall Market Mood Index gauge (homepage) ---------- */
.mmi-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  cursor: pointer;
  padding: 14px 4px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.mmi-wrap:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; }
.mmi-gauge {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  position: relative;
}
.mmi-gauge svg { display: block; width: 100%; height: 100%; }
.mmi-gauge-track { fill: none; stroke: var(--border); stroke-width: 8; }
.mmi-gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dasharray 0.8s ease-out, stroke 0.4s ease;
}
.mmi-gauge-score {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--text);
}
.mmi-body { flex: 1; min-width: 200px; }
.mmi-score-label {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.mmi-score-label .mmi-score-num { font-size: 1.3rem; }
.mmi-score-label.mmi-risk-on, .mmi-score-label.mmi-slightly-risk-on { color: var(--bull); }
.mmi-score-label.mmi-neutral { color: var(--neutral); }
.mmi-score-label.mmi-slightly-risk-off, .mmi-score-label.mmi-risk-off { color: var(--bear); }
.mmi-gauge-fill.mmi-risk-on, .mmi-gauge-fill.mmi-slightly-risk-on { stroke: var(--bull); }
.mmi-gauge-fill.mmi-neutral { stroke: var(--neutral); }
.mmi-gauge-fill.mmi-slightly-risk-off, .mmi-gauge-fill.mmi-risk-off { stroke: var(--bear); }
.mmi-change {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.mmi-change .mmi-change-up { color: var(--bull); font-weight: 700; }
.mmi-change .mmi-change-down { color: var(--bear); font-weight: 700; }
.mmi-hint {
  font-size: 0.82rem;
  color: var(--text-faint);
}
.mmi-hint .mmi-chevron { display: inline-block; transition: transform 0.25s ease; }
.mmi-wrap[aria-expanded="true"] .mmi-chevron { transform: rotate(180deg); }

/* ---------- Breakdown (progressive disclosure) ---------- */
.mmi-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}
.mmi-breakdown.mmi-breakdown-open {
  max-height: 600px;
  opacity: 1;
}
.mmi-sub-card {
  background: rgba(120, 130, 160, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.mmi-sub-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.mmi-sub-score {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.1rem;
}
.mmi-sub-score.mmi-risk-on, .mmi-sub-score.mmi-slightly-risk-on { color: var(--bull); }
.mmi-sub-score.mmi-neutral { color: var(--neutral); }
.mmi-sub-score.mmi-slightly-risk-off, .mmi-sub-score.mmi-risk-off { color: var(--bear); }
.mmi-omitted-note {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--text-faint);
  font-style: italic;
  margin-top: 2px;
}
.mmi-methodology-link {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 4px;
}

/* ---------- Gold page: Bullish drivers / Bearish risks ---------- */
.gold-drivers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0 26px;
}
@media (max-width: 720px) {
  .gold-drivers-grid { grid-template-columns: 1fr; }
}
.gold-drivers-col {
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--border);
}
.gold-drivers-col.drivers-bullish { border-color: rgba(34, 224, 168, 0.3); background: rgba(34, 224, 168, 0.05); }
.gold-drivers-col.drivers-bearish { border-color: rgba(255, 92, 108, 0.3); background: rgba(255, 92, 108, 0.05); }
.gold-drivers-col h3 { margin: 0 0 10px; font-size: 0.98rem; }
.gold-drivers-col.drivers-bullish h3 { color: var(--bull); }
.gold-drivers-col.drivers-bearish h3 { color: var(--bear); }
.gold-drivers-list { margin: 0; padding-left: 18px; }
.gold-drivers-list li { margin-bottom: 10px; font-size: 0.88rem; color: var(--text-dim); line-height: 1.45; }
.gold-drivers-list li a { font-size: 0.78rem; }
.gold-drivers-empty { color: var(--text-faint); font-size: 0.85rem; font-style: italic; }

/* ---------- Economic Calendar page ---------- */
.calendar-table-wrap { overflow-x: auto; margin: 14px 0 24px; }
.calendar-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 640px; }
.calendar-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.calendar-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.calendar-table tr:hover td { background: rgba(120, 130, 160, 0.05); }
.calendar-impact-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono);
  background: rgba(255, 92, 108, 0.12);
  color: var(--bear);
  border: 1px solid rgba(255, 92, 108, 0.3);
}
.calendar-verdict { font-weight: 700; font-family: var(--mono); font-size: 0.78rem; }
.calendar-verdict.verdict-bullish { color: var(--bull); }
.calendar-verdict.verdict-bearish { color: var(--bear); }
.calendar-verdict.verdict-neutral { color: var(--neutral); }
.calendar-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}
.calendar-section-sub { color: var(--text-dim); font-size: 0.86rem; font-weight: 400; margin-left: 6px; }
.calendar-empty-state {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 14px 0;
}
.calendar-source-note {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 18px;
}

/* ============================================================
   MarketMood — Phase 3 additions (Watchlist / News Heatmap /
   Relative Performance). Purely additive: reuses existing color
   vars (--bull/--bear/--neutral/--border/--radius/--mono/--text-*)
   and existing card/badge conventions from Phases 1-2.
   ============================================================ */

/* ---------- Star / watchlist toggle button ---------- */
.mm-star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.mm-star-btn:hover { transform: scale(1.15); }
.mm-star-btn.is-active { color: var(--neutral); }
.market-ticker-item { position: relative; }
.market-ticker-item .mm-star-btn {
  margin-left: 4px;
}
.category-overall-mood-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.category-overall-mood-wrap .mood-card { flex: 1; }
.category-overall-mood-wrap .mm-star-btn {
  margin-top: 10px;
  width: 30px;
  height: 30px;
  font-size: 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.category-overall-mood-wrap .mm-star-btn.is-active { border-color: rgba(255, 200, 97, 0.4); background: rgba(255, 200, 97, 0.1); }

/* ---------- My Watchlist section/page ---------- */
.watchlist-section { margin: 22px 0; }
.watchlist-local-note {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-style: italic;
  margin: 4px 0 14px;
}
.watchlist-empty-state {
  padding: 34px 20px;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 14px 0;
}
.watchlist-empty-state .we-star { color: var(--neutral); font-size: 1.2rem; }
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.watchlist-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
}
.watchlist-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.watchlist-card-title { font-weight: 700; font-size: 1rem; }
.watchlist-card-title a { color: var(--text); text-decoration: none; }
.watchlist-card-price { font-family: var(--mono); font-size: 0.92rem; color: var(--text-dim); margin-bottom: 6px; }
.watchlist-card-price .wc-chg-up { color: var(--bull); }
.watchlist-card-price .wc-chg-down { color: var(--bear); }
.watchlist-card-news { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.watchlist-card-news-item { display: block; font-size: 0.82rem; color: var(--text-dim); text-decoration: none; margin-bottom: 6px; line-height: 1.35; }
.watchlist-card-news-item:hover { color: var(--text); }
.watchlist-card-news-empty { font-size: 0.8rem; color: var(--text-faint); font-style: italic; }

/* ---------- News Heatmap ---------- */
.heatmap-section { margin: 22px 0; }
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.heatmap-tile {
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px 14px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s;
  cursor: pointer;
}
.heatmap-tile:hover { transform: translateY(-2px); }
.heatmap-tile-label { font-weight: 700; font-size: 0.95rem; display: block; margin-bottom: 6px; }
.heatmap-tile-bias { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; display: block; margin-bottom: 4px; }
.heatmap-tile-count { font-size: 0.76rem; color: var(--text-faint); display: block; }
.heatmap-tile.heat-bullish {
  background: rgba(34, 224, 168, var(--heat-alpha, 0.12));
  border-color: rgba(34, 224, 168, 0.35);
}
.heatmap-tile.heat-bullish .heatmap-tile-bias { color: var(--bull); }
.heatmap-tile.heat-bearish {
  background: rgba(255, 92, 108, var(--heat-alpha, 0.12));
  border-color: rgba(255, 92, 108, 0.35);
}
.heatmap-tile.heat-bearish .heatmap-tile-bias { color: var(--bear); }
.heatmap-tile.heat-neutral {
  background: rgba(139, 150, 179, var(--heat-alpha, 0.10));
  border-color: var(--border);
}
.heatmap-tile.heat-neutral .heatmap-tile-bias { color: var(--text-dim); }
.heatmap-note {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 6px;
}

/* ---------- Relative Performance bars ---------- */
.perf-section { margin: 22px 0; }
.perf-bars { margin: 14px 0; }
.perf-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 70px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.86rem;
}
.perf-bar-label { font-weight: 600; color: var(--text); }
.perf-bar-track {
  position: relative;
  height: 20px;
  background: var(--border-soft);
  border-radius: 6px;
  overflow: hidden;
}
.perf-bar-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--border); }
.perf-bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.perf-bar-fill.perf-up { background: var(--bull); left: 50%; }
.perf-bar-fill.perf-down { background: var(--bear); right: 50%; }
.perf-bar-val { font-family: var(--mono); font-weight: 700; text-align: right; }
.perf-bar-val.perf-up { color: var(--bull); }
.perf-bar-val.perf-down { color: var(--bear); }
.perf-note {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 10px;
}
@media (max-width: 560px) {
  .perf-bar-row { grid-template-columns: 76px 1fr 56px; font-size: 0.78rem; }
}

/* ============================================================
   MarketMood — Phase 4 additions (final phase). Purely additive:
   reuses existing color vars (--bull/--bear/--neutral/--border/
   --radius/--mono/--text-*) and existing card/badge conventions
   from Phases 1-3.
   ============================================================ */

/* ---------- Browser notifications toggle (watchlist page) ---------- */
.mm-notify-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 6px;
}
.mm-notify-toggle-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
.mm-notify-toggle-btn:hover { border-color: var(--accent-2); }
.mm-notify-toggle-btn.is-on {
  background: rgba(34, 224, 168, 0.12);
  border-color: rgba(34, 224, 168, 0.4);
  color: var(--bull);
}
.mm-notify-toggle-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mm-notify-status {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}
.mm-notify-disclaimer {
  font-size: 0.76rem;
  color: var(--text-faint);
  font-style: italic;
  margin: 8px 0 0;
  line-height: 1.4;
}
.mm-notify-unsupported {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Related News (article pages) ---------- */
.related-news-section { margin: 22px auto; max-width: 760px; }
.related-news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.related-news-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.related-news-item:hover { border-color: var(--accent-2); transform: translateX(2px); }
.related-news-badge {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--mono);
}
.related-news-badge.badge-bullish { background: rgba(34, 224, 168, 0.14); color: var(--bull); border: 1px solid rgba(34, 224, 168, 0.4); }
.related-news-badge.badge-bearish { background: rgba(255, 92, 108, 0.14); color: var(--bear); border: 1px solid rgba(255, 92, 108, 0.4); }
.related-news-badge.badge-mixed { background: rgba(255, 200, 97, 0.14); color: var(--neutral); border: 1px solid rgba(255, 200, 97, 0.4); }
.related-news-title { font-size: 0.9rem; line-height: 1.35; }

/* ---------- Reading-progress bar (article pages) ---------- */
.mm-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 999;
  pointer-events: none;
}
.mm-reading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.1s linear;
}

/* ---------- Admin stat cards (pageviews + pipeline health) ---------- */
.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-card .sym {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.price-card .val {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

/* ---------- 404 page ---------- */
.mm-404-wrap {
  max-width: 560px;
  margin: 60px auto 80px;
  text-align: center;
  padding: 0 20px;
}
.mm-404-code {
  font-family: var(--mono);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--accent-2);
  line-height: 1;
  margin: 0 0 6px;
}
.mm-404-title { font-size: 1.3rem; margin: 0 0 12px; }
.mm-404-sub { color: var(--text-dim); margin: 0 0 26px; }
.mm-404-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.mm-404-links a {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.mm-404-links a:hover { border-color: var(--accent-2); color: var(--accent-2); }
