/* ── MarketMind Luxury White & Gold Theme ──────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Mono:wght@300;400;500&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --bg:        #f8f5ef;
  --bg2:       #f2ede4;
  --bg3:       #ede7db;
  --surface:   #ffffff;
  --surface2:  #faf7f2;
  --surface3:  #f5f0e8;
  --border:    #e8dfc8;
  --border2:   #d4c49a;

  --text:      #1a1508;
  --text2:     #5c4f2e;
  --text3:     #9c8a5a;

  --gold:      #c9a84c;
  --gold2:     #e2b95a;
  --gold3:     #f0cc78;
  --gold-dark: #8a6e24;
  --gold-glow: rgba(201,168,76,0.18);
  --gold-glow2:rgba(201,168,76,0.08);

  --green:     #2d7a4f;
  --green-bg:  rgba(45,122,79,0.08);
  --red:       #b84040;
  --red-bg:    rgba(184,64,64,0.08);
  --amber:     #c9851a;
  --amber-bg:  rgba(201,133,26,0.1);
  --purple:    #6b4fa8;

  --accent:    var(--gold);
  --accent2:   var(--gold2);

  --radius:    16px;
  --radius-sm: 10px;

  --shadow-sm: 0 2px 12px rgba(90,70,20,0.06);
  --shadow-md: 0 6px 30px rgba(90,70,20,0.10);
  --shadow-lg: 0 16px 60px rgba(90,70,20,0.14);
}

/* ── BASE ──────────────────────────────────────────────────────────────────── */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
  background-image: radial-gradient(ellipse at 20% 0%, rgba(201,168,76,0.06) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 100%, rgba(201,168,76,0.04) 0%, transparent 60%);
}

/* ── TICKER ────────────────────────────────────────────────────────────────── */
.ticker-wrap {
  background: var(--text);
  border-bottom: 1px solid rgba(201,168,76,0.3);
  height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-label {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.ticker-overflow { overflow: hidden; flex: 1; }
.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 55s linear infinite;
}
.ticker-item {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  padding: 0 22px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(255,255,255,0.55);
}
.ticker-item strong { color: #fff; font-weight: 600; }
.ticker-dot { color: rgba(201,168,76,0.4); }
.up   { color: #4caf7d !important; }
.down { color: #e07070 !important; }
@keyframes tickerScroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── NAV ───────────────────────────────────────────────────────────────────── */
nav {
  background: rgba(248,245,239,0.92);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.3px;
  color: var(--text);
  flex-shrink: 0;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 8px rgba(201,168,76,0.35);
}
.beta-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--gold-glow);
  color: var(--gold-dark);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
}
.nav-tabs { display: flex; gap: 2px; }
.nav-tab {
  background: none;
  border: none;
  color: var(--text3);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.nav-tab:hover { color: var(--text); background: var(--bg3); }
.nav-tab.active {
  color: var(--gold-dark);
  background: var(--gold-glow);
  border: 1px solid var(--border2);
}
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-page-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none !important;
  color: var(--text3);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nav-page-link:hover { color: var(--text); background: var(--bg3); text-decoration: none !important; }
.nav-page-link.active { color: var(--gold-dark); background: var(--gold-glow); border-color: var(--border2); }
.nav-pro-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold2));
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
}
.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.live-indicator { display: flex; align-items: center; gap: 7px; }
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--green);
  animation: pulsering 2.2s infinite;
  opacity: 0;
}
@keyframes pulsering { 0%{opacity:0.8;transform:scale(0.8)} 100%{opacity:0;transform:scale(1.9)} }
.live-label { font-size: 11px; color: var(--green); font-weight: 700; letter-spacing: 1.5px; }
.search-wrap { position: relative; }
.search-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 10px;
  width: 210px;
  outline: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.search-bar:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow2), var(--shadow-sm);
}
.search-bar::placeholder { color: var(--text3); }
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  z-index: 300;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  min-width: 260px;
}
.search-result-item {
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:hover { background: var(--bg2); }
.search-result-item:last-child { border-bottom: none; }
.search-result-sym {
  font-weight: 700;
  color: var(--gold-dark);
  margin-right: 8px;
  font-family: 'DM Mono', monospace;
}

/* ── LAYOUT ────────────────────────────────────────────────────────────────── */
.main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px;
}
.feed-col { min-width: 0; }

/* ── METRICS ───────────────────────────────────────────────────────────────── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.metric-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.metric-card:hover::before { opacity: 1; }
.metric-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.metric-val {
  font-size: 24px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  letter-spacing: -1px;
  color: var(--text);
}
.metric-sub { font-size: 11px; margin-top: 5px; font-weight: 600; }
.metric-bar {
  height: 2px;
  background: var(--bg3);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.metric-fill { height: 100%; border-radius: 2px; transition: width 1s ease; }
.sparkline-canvas { width:100%; height:32px; display:block; margin-top:8px; opacity:0.7; }

/* ── AI CONFIDENCE ─────────────────────────────────────────────────────────── */
.confidence-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.confidence-widget::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}
.ring-wrap { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-pct { font-size: 17px; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--gold-dark); }
.ring-sub { font-size: 9px; color: var(--text3); letter-spacing: 1px; }
.confidence-info { flex: 1; min-width: 0; }
.confidence-info h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.confidence-info p { font-size: 11px; color: var(--text2); line-height: 1.65; }
.accent { color: var(--gold-dark); font-weight: 700; }
.conf-count { text-align: right; flex-shrink: 0; }
.conf-count-label { font-size: 10px; color: var(--text3); margin-bottom: 3px; }
.conf-count-num { font-size: 28px; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--text); }
.conf-count-sub { font-size: 10px; color: var(--text3); }

/* ── SECTION HEADERS ───────────────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--text3);
}
.section-meta { font-size: 10px; color: var(--text3); }

/* ── HEATMAP ───────────────────────────────────────────────────────────────── */
.heatmap {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.heat-cell {
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
}
.heat-cell:hover { transform: scale(1.05); box-shadow: var(--shadow-sm); }
.hc-name { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; color: var(--text2); }
.hc-chg { font-size: 15px; font-weight: 700; font-family: 'DM Mono', monospace; margin-top: 4px; }

/* ── FEED FILTER ───────────────────────────────────────────────────────────── */
.feed-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
  flex-wrap: wrap; gap: 10px;
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 11px; font-weight: 600;
  padding: 5px 13px; border-radius: 20px;
  cursor: pointer; transition: all 0.15s;
  font-family: 'Space Grotesk', sans-serif;
  box-shadow: var(--shadow-sm);
}
.pill:hover, .pill.active {
  background: var(--gold-glow);
  border-color: var(--border2);
  color: var(--gold-dark);
}

/* ── EVENT CARDS ───────────────────────────────────────────────────────────── */
.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  transition: all 0.22s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
  box-shadow: var(--shadow-sm);
}
.event-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}
.event-card.bullish::before { background: linear-gradient(180deg, var(--green), transparent); }
.event-card.bearish::before { background: linear-gradient(180deg, var(--red), transparent); }
.event-card.neutral::before { background: linear-gradient(180deg, var(--gold), transparent); }
.event-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.event-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.event-card:hover::after { opacity: 1; }

.card-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px; margin-bottom: 11px;
}
.card-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.source-badge {
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  padding: 3px 9px; border-radius: 5px; text-transform: uppercase;
}
.badge-crypto  { background: rgba(107,79,168,0.1); color: #5a3d9a; border: 1px solid rgba(107,79,168,0.2); }
.badge-finance { background: var(--gold-glow);    color: var(--gold-dark); border: 1px solid var(--border2); }
.badge-macro   { background: rgba(45,122,79,0.1); color: var(--green);    border: 1px solid rgba(45,122,79,0.2); }
.badge-tech    { background: rgba(201,133,26,0.1);color: var(--amber);    border: 1px solid rgba(201,133,26,0.2); }
.badge-geo     { background: rgba(184,64,64,0.1); color: var(--red);      border: 1px solid rgba(184,64,64,0.2); }

.sentiment-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
}
.sent-bull { background: var(--green-bg); color: var(--green); border: 1px solid rgba(45,122,79,0.2); }
.sent-bear { background: var(--red-bg);   color: var(--red);   border: 1px solid rgba(184,64,64,0.2); }
.sent-neu  { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(201,133,26,0.2); }

.card-time { font-size: 10px; color: var(--text3); font-family: 'DM Mono', monospace; flex-shrink: 0; }
.card-headline {
  font-size: 15px; font-weight: 700; line-height: 1.4;
  margin-bottom: 8px; color: var(--text); letter-spacing: -0.3px;
}
.card-summary { font-size: 12px; color: var(--text2); line-height: 1.65; margin-bottom: 13px; }

.why-matters {
  background: linear-gradient(135deg, var(--gold-glow2), rgba(201,168,76,0.04));
  border: 1px solid var(--border2);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 13px;
}
.why-label {
  font-size: 9px; font-weight: 800; letter-spacing: 2px;
  color: var(--gold-dark); text-transform: uppercase; margin-bottom: 6px;
}
.why-text { font-size: 12px; color: var(--text2); line-height: 1.65; }

.assets-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.asset-chip {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 8px; font-family: 'DM Mono', monospace;
}
.chip-stock  { background: var(--gold-glow); color: var(--gold-dark); border: 1px solid var(--border2); }
.chip-crypto { background: rgba(107,79,168,0.08); color: #5a3d9a; border: 1px solid rgba(107,79,168,0.15); }
.chip-etf    { background: var(--green-bg); color: var(--green); border: 1px solid rgba(45,122,79,0.15); }
.chip-sector { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(201,133,26,0.2); }
.chip-chg    { font-size: 10px; opacity: 0.75; }

.card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.conf-meter  { display: flex; align-items: center; gap: 8px; }
.conf-label  { font-size: 10px; color: var(--text3); letter-spacing: 0.8px; text-transform: uppercase; }
.conf-track  { width: 80px; height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.conf-fill   { height: 100%; border-radius: 2px; }
.conf-pct    { font-size: 11px; font-family: 'DM Mono', monospace; font-weight: 700; }
.card-actions { display: flex; gap: 8px; }
.action-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text3); font-size: 11px; padding: 5px 11px;
  border-radius: 8px; cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.15s; font-weight: 600;
}
.action-btn:hover {
  border-color: var(--gold); color: var(--gold-dark);
  background: var(--gold-glow);
}

/* ── SKELETON ──────────────────────────────────────────────────────────────── */
.skeleton-wrap { display: flex; flex-direction: column; gap: 14px; }
.skeleton {
  border-radius: var(--radius); height: 170px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--bg2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border: 1px solid var(--border);
}
@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }

/* ── SIDEBAR ───────────────────────────────────────────────────────────────── */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text3);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* FEAR & GREED */
.fear-greed { text-align: center; }
.fg-gauge { display: flex; justify-content: center; margin-bottom: 4px; }
.fg-value { font-size: 32px; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--text); }
.fg-label { font-size: 13px; font-weight: 700; color: var(--gold-dark); }
.fg-sub   { font-size: 10px; color: var(--text3); margin-top: 5px; }

/* TRENDING */
.trend-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.trend-item:last-child { border-bottom: none; padding-bottom: 0; }
.trend-rank { font-size: 11px; font-family: 'DM Mono', monospace; color: var(--text3); width: 16px; flex-shrink: 0; }
.trend-info { flex: 1; min-width: 0; }
.trend-name { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.trend-sub  { font-size: 10px; color: var(--text3); }
.trend-chg  { font-size: 12px; font-weight: 700; font-family: 'DM Mono', monospace; flex-shrink: 0; }

/* OPPORTUNITIES */
.opp-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; margin-bottom: 8px;
}
.opp-card:last-child { margin-bottom: 0; }
.opp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.opp-name   { font-size: 13px; font-weight: 800; font-family: 'DM Mono', monospace; color: var(--text); }
.opp-type   { font-size: 10px; padding: 2px 9px; border-radius: 5px; font-weight: 800; letter-spacing: 0.5px; }
.type-long  { background: var(--green-bg);  color: var(--green); border: 1px solid rgba(45,122,79,0.2); }
.type-short { background: var(--red-bg);    color: var(--red);   border: 1px solid rgba(184,64,64,0.2); }
.type-watch { background: var(--amber-bg);  color: var(--amber); border: 1px solid rgba(201,133,26,0.2); }
.opp-reason { font-size: 11px; color: var(--text2); line-height: 1.5; }
.opp-pattern { font-size: 10px; color: var(--text3); margin-top: 5px; line-height: 1.4; font-style: italic; }
.opp-conf   { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.opp-dots   { display: flex; gap: 3px; }
.dot        { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.dot.lit    { background: var(--gold); }
.opp-conf-txt { font-size: 10px; color: var(--text3); }
.radar-badge { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; color: var(--gold-dark); background: var(--gold-glow); border: 1px solid var(--border2); border-radius: 4px; padding: 1px 5px; }

/* TIMELINE */
.timeline { position: relative; padding-left: 18px; }
.tl-item  { position: relative; padding-bottom: 13px; }
.tl-item::before {
  content: ''; position: absolute;
  left: -14px; top: 5px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold-glow);
}
.tl-item::after {
  content: ''; position: absolute;
  left: -12px; top: 12px;
  width: 2px; height: calc(100% - 6px);
  background: var(--border);
}
.tl-item:last-child::after { display: none; }
.tl-time { font-size: 10px; color: var(--text3); font-family: 'DM Mono', monospace; margin-bottom: 3px; }
.tl-text  { font-size: 11px; color: var(--text2); line-height: 1.55; }

/* CHAT */
.chat-response {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 14px;
  font-size: 12px; color: var(--text2); line-height: 1.7;
  margin-bottom: 10px; min-height: 58px; transition: all 0.3s;
}
.chat-related { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input {
  flex: 1; background: var(--surface);
  border: 1px solid var(--border); color: var(--text);
  font-family: 'Space Grotesk', sans-serif; font-size: 12px;
  padding: 9px 13px; border-radius: 10px; outline: none; transition: all 0.2s;
}
.chat-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow2); }
.chat-input::placeholder { color: var(--text3); }
.chat-send {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold2));
  border: none; color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 700;
  padding: 9px 16px; border-radius: 10px; cursor: pointer;
  transition: opacity 0.2s; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(201,168,76,0.3);
}
.chat-send:hover { opacity: 0.88; }
.chat-send:disabled { opacity: 0.45; cursor: not-allowed; }

/* AI CHIP */
.ai-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; background: var(--gold-glow);
  color: var(--gold-dark); border: 1px solid var(--border2);
  padding: 2px 8px; border-radius: 5px; font-weight: 800; letter-spacing: 0.5px;
}
.ai-blink {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); animation: blink 1.4s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

/* MISC */
.hidden { display: none !important; }
@keyframes fadeInUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }

#last-refreshed {
  font-size: 10px; color: var(--text3);
  font-family: 'DM Mono', monospace;
  padding: 3px 8px; border: 1px solid var(--border);
  border-radius: 5px; white-space: nowrap;
  background: var(--surface);
}

/* ── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media(max-width:900px) {
  .main { grid-template-columns: 1fr; padding: 16px; }
  .sidebar { display: block; }
  .heatmap { grid-template-columns: repeat(2,1fr); }
  .metrics-row { grid-template-columns: repeat(2,1fr); }
  nav { padding: 0 12px; gap: 6px; }
  .nav-tab { font-size: 12px; padding: 6px 10px; }
  .nav-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .search-bar { width: 130px; }
}
@media(max-width:600px) {
  .hamburger { display: flex !important; }
  .nav-links { display: none !important; }
  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 150;
    gap: 4px;
  }
  .nav-links.open .nav-page-link { width: 100%; padding: 11px 14px; font-size: 14px; border-radius: 8px; }
  .nav-tabs { max-width: calc(100vw - 220px); }
  #last-refreshed { display: none; }
  .search-bar { display: none; }
  .search-results { display: none; }
}
@media(max-width:480px) {
  .metrics-row { grid-template-columns: 1fr 1fr; }
}


/* NAV LINKS - Premium page buttons */
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text3);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--text);
    background: var(--bg3);
    text-decoration: none;
}
.nav-link.active {
    color: var(--gold-dark);
    background: var(--gold-glow);
    border: 1px solid var(--gold-border);
}
.nav-link .pro-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(201,168,76,0.15);
    color: var(--gold-dark);
    border: 1px solid rgba(201,168,76,0.3);
    padding: 1px 5px;
    border-radius: 4px;
}
nav a { text-decoration: none; }
nav a:hover { text-decoration: none; }

/* ── HAMBURGER ───────────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 7px 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--bg3); }
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Load More ─────────────────────────────────────────────────────────────── */
#load-more-container { margin: 4px 0 24px; }
.load-more-btn {
  display: block;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold2));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.18s, transform 0.12s;
}
.load-more-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.load-more-btn:active:not(:disabled) { transform: translateY(0); opacity: 1; }
.load-more-btn:disabled { opacity: 0.55; cursor: default; }
.load-more-count { opacity: 0.65; font-size: 12px; font-weight: 400; }

/* ── Mobile touch targets — minimum 44×44px for all interactive elements ─── */
button,
.btn,
input[type="submit"],
input[type="button"],
input[type="reset"],
a.btn,
.nav-link,
.nav-page-link,
.load-more-btn,
.tab-btn,
.filter-btn,
select {
  min-height: 44px;
}
@media (max-width: 768px) {
  button, .btn, input[type="submit"], input[type="button"],
  input[type="reset"], a.btn, select {
    min-height: 48px;
  }
}
/* ═══════════════════════════════════════════════════════════════════════════ */
/* ARTICLE DEEP DIVE PANEL                                                     */
/* ═══════════════════════════════════════════════════════════════════════════ */

#dd-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 300;
  backdrop-filter: blur(3px);
}

#dd-panel {
  position: fixed; top: 0; right: 0;
  width: 560px; max-width: 98vw; height: 100vh;
  background: var(--card, #fff);
  border-left: 1px solid var(--border, #e0d8c8);
  z-index: 301;
  display: flex; flex-direction: column;
  box-shadow: -12px 0 56px rgba(0,0,0,.38);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
#dd-panel.dd-open { transform: translateX(0); }

.dd-panel-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px; border-bottom: 1px solid var(--border, #e0d8c8);
  flex-shrink: 0; background: var(--surface, #f5f0e8);
}
.dd-title-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text3, #9c8a6a);
}
.dd-close {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border, #e0d8c8);
  background: var(--card, #fff); cursor: pointer;
  font-size: 13px; color: var(--text2, #555);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.dd-close:hover { background: var(--border, #e0d8c8); color: var(--text, #1a1a2e); }

#dd-body { flex: 1; overflow-y: auto; padding-bottom: 32px; }

/* ─── Panel sections ─────────────────────────────────────────────────────── */
.dd-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border, #e0d8c8);
}
.dd-header-badges { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.dd-headline {
  font-size: 15px; font-weight: 700;
  color: var(--text, #1a1a2e); line-height: 1.45; margin: 0 0 6px;
}
.dd-sub { font-size: 11px; color: var(--text3, #9c8a6a); margin: 0; }

.dd-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #e0d8c8);
}
.dd-section:last-child { border-bottom: none; }

.dd-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text3, #9c8a6a);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}

/* ─── AI Summary ─────────────────────────────────────────────────────────── */
.dd-summary-block { display: flex; flex-direction: column; gap: 10px; }
.dd-summary-row { display: flex; gap: 10px; align-items: flex-start; }
.dd-summary-badge {
  flex-shrink: 0; font-size: 9px; font-weight: 800; letter-spacing: .06em;
  background: rgba(201,168,76,.12); color: var(--gold-dark, #8a6e24);
  border: 1px solid rgba(201,168,76,.3); border-radius: 4px;
  padding: 2px 6px; margin-top: 2px;
}
.dd-summary-text {
  font-size: 13px; color: var(--text2, #333);
  line-height: 1.6; margin: 0;
}
.dd-nums { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.dd-num-item {
  font-size: 12px; color: var(--text2, #444);
  padding: 6px 10px; background: var(--surface, #f8f4ee);
  border-radius: 6px; border-left: 3px solid var(--gold, #c9a84c);
  line-height: 1.4;
}

/* ─── Market Impact chips ────────────────────────────────────────────────── */
.dd-chip-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px; margin-bottom: 8px;
}
.dd-chip-label {
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 4px; flex-shrink: 0;
}
.dd-chip-label.bull { color: var(--green, #22a869); background: rgba(34,168,105,.1); }
.dd-chip-label.neut { color: var(--text3, #9c8a6a); background: var(--surface, #f5f0e8); }
.dd-chip-label.bear { color: var(--red, #e05252); background: rgba(224,82,82,.1); }

.dd-chip {
  font-size: 11px; font-weight: 700;
  font-family: 'DM Mono', 'Courier New', monospace;
  padding: 3px 8px; border-radius: 5px;
}
.dd-chip-bull {
  background: rgba(34,168,105,.12); color: var(--green, #22a869);
  border: 1px solid rgba(34,168,105,.25);
}
.dd-chip-neut {
  background: var(--surface, #f5f0e8); color: var(--text3, #9c8a6a);
  border: 1px solid var(--border, #e0d8c8);
}
.dd-chip-bear {
  background: rgba(224,82,82,.1); color: var(--red, #e05252);
  border: 1px solid rgba(224,82,82,.22);
}

.dd-reason {
  font-size: 12px; line-height: 1.55;
  padding: 8px 10px; border-radius: 6px; margin-top: 6px;
}
.dd-reason-bull {
  background: rgba(34,168,105,.07); color: var(--text2, #333);
  border-left: 3px solid var(--green, #22a869);
}
.dd-reason-bear {
  background: rgba(224,82,82,.07); color: var(--text2, #333);
  border-left: 3px solid var(--red, #e05252);
}

/* ─── Confidence split bar ───────────────────────────────────────────────── */
.dd-conf-bar {
  display: flex; height: 10px; border-radius: 8px;
  overflow: hidden; background: var(--surface, #f0eae0);
  margin-bottom: 9px; gap: 2px;
}
.dd-conf-seg { height: 100%; transition: width .4s ease; }
.dd-conf-bull { background: var(--green, #22a869); border-radius: 8px 0 0 8px; }
.dd-conf-neut { background: var(--amber, #d4943a); }
.dd-conf-bear { background: var(--red, #e05252); border-radius: 0 8px 8px 0; }
.dd-conf-labels { display: flex; gap: 16px; flex-wrap: wrap; }
.dd-conf-lbl { font-size: 11px; display: flex; gap: 4px; align-items: center; }
.lbl-bull { color: var(--green, #22a869); }
.lbl-neut { color: var(--amber, #d4943a); }
.lbl-bear { color: var(--red, #e05252); }
.dd-conf-tag {
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
  background: rgba(201,168,76,.12); color: var(--gold-dark, #8a6e24);
  border: 1px solid rgba(201,168,76,.3);
}

/* ─── Historical precedent ───────────────────────────────────────────────── */
.dd-hist-ref {
  font-size: 12px; color: var(--text3, #9c8a6a);
  font-style: italic; line-height: 1.5; margin-bottom: 12px;
}
.dd-hist-boxes { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.dd-hist-box {
  background: var(--surface, #f8f4ee); border: 1px solid var(--border, #e0d8c8);
  border-radius: 8px; padding: 12px; text-align: center;
}
.dd-hist-period {
  font-size: 10px; font-weight: 700; color: var(--text3, #9c8a6a);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px;
}
.dd-hist-val {
  font-size: 20px; font-weight: 700;
  font-family: 'DM Mono', 'Courier New', monospace;
}

/* ─── Trade radar ────────────────────────────────────────────────────────── */
.dd-radar { display: flex; flex-direction: column; gap: 10px; }
.dd-radar-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 13px; background: var(--surface, #f8f4ee);
  border-radius: 8px; border: 1px solid var(--border, #e0d8c8);
}
.dd-radar-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.dd-radar-content { flex: 1; min-width: 0; }
.dd-radar-label {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gold-dark, #8a6e24); margin-bottom: 3px;
}
.dd-radar-text { font-size: 12px; color: var(--text2, #333); line-height: 1.55; }

/* ─── Community sentiment ────────────────────────────────────────────────── */
.dd-comm-track {
  height: 8px; border-radius: 6px;
  background: rgba(224,82,82,.2); overflow: hidden; margin-bottom: 6px;
}
.dd-comm-fill { height: 100%; background: var(--green, #22a869); border-radius: 6px; transition: width .4s; }
.dd-comm-pcts {
  display: flex; justify-content: space-between;
  font-size: 11px; font-weight: 700; margin-bottom: 12px;
}
.comm-bull { color: var(--green, #22a869); }
.comm-bear { color: var(--red, #e05252); }
.dd-comm-sources { display: flex; flex-direction: column; gap: 7px; }
.dd-comm-src {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface, #f8f4ee);
  border-radius: 7px;
}
.dd-comm-icon { font-size: 14px; width: 22px; text-align: center; flex-shrink: 0; }
.dd-comm-platform {
  font-size: 11px; font-weight: 600; color: var(--text3, #9c8a6a);
  width: 72px; flex-shrink: 0;
}
.dd-comm-lbl { font-size: 12px; font-weight: 600; color: var(--text, #1a1a2e); }

/* ─── Action buttons ─────────────────────────────────────────────────────── */
.dd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dd-btn {
  flex: 1; padding: 11px 18px; border-radius: 8px; font-size: 13px;
  font-weight: 700; cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-align: center; text-decoration: none; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
}
.dd-btn:hover { opacity: .85; transform: translateY(-1px); }
.dd-btn-save {
  background: rgba(201,168,76,.12); color: var(--gold-dark, #8a6e24);
  border: 1.5px solid rgba(201,168,76,.4);
}
.dd-btn-source {
  background: linear-gradient(135deg, #1a1a2e, #2c2c4a); color: #fff;
}

/* ─── Skeleton loader ────────────────────────────────────────────────────── */
.dd-loading { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.dd-loading-msg {
  text-align: center; padding: 24px 0; color: var(--text3, #9c8a6a);
  font-size: 13px; margin-top: 8px;
}
.dd-sk {
  height: 14px; border-radius: 7px;
  background: linear-gradient(
    90deg,
    var(--surface, #f5f0e8) 25%,
    var(--border, #e0d8c8) 50%,
    var(--surface, #f5f0e8) 75%
  );
  background-size: 200% 100%;
  animation: dd-shimmer 1.4s ease-in-out infinite;
}
.dd-sk-wide { width: 100%; }
.dd-sk-med  { width: 72%; }
.dd-sk-sm   { width: 45%; }
@keyframes dd-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

.dd-error {
  padding: 28px 20px; text-align: center;
  color: var(--text3, #9c8a6a); font-size: 13px;
}

/* Mobile full-screen panel */
@media (max-width: 600px) {
  #dd-panel { width: 100%; border-left: none; }
}

/* Deep Dive v2 — slide-in panel */
#dd-panel.open { transform: translateX(0) !important; }

.dds {
  padding: 20px 24px;
  border-bottom: 1px solid #1e2435;
}
.dds h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #c9a84c;
  margin: 0 0 14px;
}

.tk-b {
  background: rgba(34,197,94,.12); color: #22c55e;
  border: 1px solid rgba(34,197,94,.3);
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
  display: inline-block; margin: 2px;
}
.tk-n {
  background: rgba(148,163,184,.12); color: #94a3b8;
  border: 1px solid rgba(148,163,184,.3);
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
  display: inline-block; margin: 2px;
}
.tk-r {
  background: rgba(239,68,68,.12); color: #ef4444;
  border: 1px solid rgba(239,68,68,.3);
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
  display: inline-block; margin: 2px;
}

.dd-btn {
  padding: 9px 16px; border-radius: 8px;
  border: 1px solid #1e2435; background: transparent;
  color: #e2e8f0; cursor: pointer;
  font-size: 12px; font-weight: 600;
  transition: all .2s; text-decoration: none;
  display: inline-flex; align-items: center;
}
.dd-btn:hover { border-color: #c9a84c; color: #c9a84c; }
.dd-btn.gold {
  background: linear-gradient(135deg,#8a6e24,#c9a84c);
  color: #fff; border: none;
}

.hbox {
  flex: 1; background: #0a0a0f;
  border-radius: 8px; padding: 12px 8px; text-align: center;
}
.hbox .hv { font-size: 20px; font-weight: 700; }
.hbox .hl { font-size: 10px; color: #64748b; margin-top: 2px; }

/* ── Desktop: hamburger hidden ── */
.hamburger { display: none; }

@media (max-width: 768px) {
  nav { padding: 0 16px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    z-index: 999;
    padding: 12px 0;
  }
  .nav-links.open { display: flex; }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .event-card { padding: 14px; }
  .heatmap-grid { grid-template-columns: repeat(2, 1fr); }
  #dd-panel { width: 100vw !important; }
  #saved-drawer { width: 100vw !important; }
  .modal-box { width: calc(100vw - 32px) !important; }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 390px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
