/* ===== BAKED BLUEBERRIES — Clean Rebuild ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

[data-theme="dark"] {
  --bg:       #0f0f0f;
  --bg2:      #1a1a1a;
  --border:   #2a2a2a;
  --text:     #f0f0f0;
  --muted:    #888888;
  --dim:      #555555;
  --accent:   #6366f1;
  --green:    #22c55e;
  --red:      #ef4444;
}

:root {
  --bg:       #ffffff;
  --bg2:      #f9fafb;
  --border:   #e5e7eb;
  --text:     #111827;
  --muted:    #6b7280;
  --dim:      #9ca3af;
  --accent:   #4f46e5;
  --green:    #16a34a;
  --red:      #dc2626;
}

html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
  transition: background 0.2s, color 0.2s;
}
.topbar, .bottom-nav { transition: background 0.2s, border-color 0.2s; }
a { color: inherit; text-decoration: none; }

/* ===== LIVE TICKER ===== */
.tick-bar {
  display: flex;
  align-items: center;
  height: 32px;
  background: var(--text);
  color: #fff;
  overflow: hidden;
  position: sticky;
  top: 52px;
  z-index: 99;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tick-status {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.15);
  height: 100%;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}
@keyframes pulse-green { 0%,100%{opacity:1} 50%{opacity:0.3} }
.tick-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  animation: pulse-green 1.5s infinite;
}
.tick-live-label { color: #4ade80; }
.tick-closed-label { color: rgba(255,255,255,0.45); }
.tick-scroll-wrap { flex: 1; overflow: hidden; height: 100%; display: flex; align-items: center; }
@keyframes ticker-scroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.tick-scroll {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 35s linear infinite;
  will-change: transform;
}
.tick-scroll:hover { animation-play-state: paused; }
.tick-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 32px;
}
.tick-sym {
  font-size: 0.72rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.3px;
}
.tick-price {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}
.tick-dim { color: rgba(255,255,255,0.3); }
.tick-change {
  font-size: 0.68rem;
  font-weight: 700;
}
.tick-up { color: #4ade80; }
.tick-down { color: #f87171; }
.tick-divider {
  color: rgba(255,255,255,0.2);
  padding: 0 4px;
  font-size: 0.7rem;
}

/* ===== TOP BAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  height: 52px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar-logo {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.topbar-logo span { color: var(--accent); }
.topbar-date {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

/* ===== FEED ===== */
.feed { max-width: 600px; margin: 0 auto; padding: 0 16px; }

/* ===== HERO ===== */
.hero {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.hero p { font-size: 0.9rem; color: var(--muted); }

/* ===== SECTION HEADER ===== */
.section-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dim);
  margin-bottom: 10px;
}

/* ===== CARD ===== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 10px;
}

/* ===== TOP PICK ===== */
.top-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.top-pick .card { flex: 1; cursor: pointer; transition: border-color 0.15s; }
.top-pick .card:hover { border-color: var(--accent); }
.pick-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.pick-ticker {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.pick-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}
.pick-gain {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -1px;
  white-space: nowrap;
}

/* ===== BRIEF ROWS (Congress + Markets) ===== */
.brief-section { margin-bottom: 24px; }
.brief-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.brief-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg2);
}
.brief-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.brief-row-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}
.brief-row-meta {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.brief-row-meta.green { color: var(--green); font-weight: 600; }
.brief-more {
  display: block;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}
.brief-more:hover { opacity: 0.75; }

/* ===== NEWS ITEMS ===== */
.news-section { margin-bottom: 24px; }
.news-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; }
.news-item:hover .news-headline { color: var(--accent); }
.news-item-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.news-thumb {
  width: 80px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg2);
}
.news-item-body { flex: 1; min-width: 0; }
.news-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--dim);
  margin-bottom: 4px;
}
.news-headline {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 4px;
  transition: color 0.1s;
}
.news-summary {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 5px;
}
.news-meta {
  font-size: 0.75rem;
  color: var(--dim);
}
.breaking-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--red);
  margin-left: 6px;
}
.see-all {
  display: block;
  margin: 12px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.see-all:hover { opacity: 0.75; }
.top-pick-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.top-pick-card:hover { border-color: var(--accent); }

/* ===== SUBSCRIBE ===== */
.sub-strip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 24px;
}
.sub-strip h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.sub-strip p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.sub-form {
  display: flex;
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
}
.sub-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.sub-form input:focus { border-color: var(--accent); }
.sub-btn {
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.sub-btn:hover { opacity: 0.88; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--dim);
  transition: color 0.15s;
}
.bn-item.active { color: var(--accent); }
.bn-item:hover { color: var(--text); }
.bn-item svg {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ===== OTHER PAGES ===== */
.page-wrap { max-width: 600px; margin: 0 auto; padding: 32px 16px; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.4px; }
.page-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 28px; }

/* Markets */
.report-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 12px; }
.report-date { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--dim); margin-bottom: 12px; }
.report-accuracy { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.report-accuracy span { color: var(--green); }
.ticker-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ticker-row:last-of-type { border-bottom: none; }
.ticker-name { font-size: 1rem; font-weight: 700; }
.ticker-desc { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.ticker-result { text-align: right; }
.ticker-pct { font-size: 1rem; font-weight: 700; }
.ticker-pct.win { color: var(--green); }
.ticker-pct.lose { color: var(--red); }
.ticker-call { font-size: 0.75rem; color: var(--dim); margin-top: 2px; }

/* Congress */
.bill-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 10px; }
.bill-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; line-height: 1.35; }
.bill-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; }
.bill-summary { font-size: 0.88rem; color: var(--text); line-height: 1.55; }
.bill-impact { display: inline-block; margin-top: 10px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 10px; border-radius: 20px; }
.impact-high { background: #fef2f2; color: var(--red); }
.impact-med  { background: #fefce8; color: #a16207; }
.impact-low  { background: #f0fdf4; color: var(--green); }

/* News page */
.news-page-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.news-page-item:last-child { border-bottom: none; }

/* Pricing */
.pricing-card { border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; margin-bottom: 16px; }
.pricing-card.featured { border-color: var(--accent); }
.pricing-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 10px; }
.pricing-price { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 4px; }
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pricing-desc { font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; }
.pricing-features li { font-size: 0.88rem; padding: 6px 0; border-bottom: 1px solid var(--bg2); list-style: none; }
.pricing-features li:last-child { border-bottom: none; }
.pricing-btn { display: block; width: 100%; margin-top: 20px; padding: 12px; background: var(--accent); color: #fff; border-radius: 8px; font-size: 0.92rem; font-weight: 600; text-align: center; cursor: pointer; border: none; }
.pricing-btn:hover { opacity: 0.88; }
.pricing-btn.outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

/* Subscribe page */
.subscribe-hero { text-align: center; padding: 40px 0 32px; }
.subscribe-hero h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 10px; }
.subscribe-hero p { font-size: 0.95rem; color: var(--muted); margin-bottom: 28px; }
.subscribe-form input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.95rem; margin-bottom: 10px; outline: none; }
.subscribe-form input:focus { border-color: var(--accent); }
.subscribe-form button { width: 100%; padding: 13px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.subscribe-form button:hover { opacity: 0.88; }

@media (max-width: 480px) {
  .sub-form { flex-direction: column; }
  .hero h1 { font-size: 1.45rem; }
  .pick-ticker { font-size: 1.6rem; }
  .pick-gain { font-size: 1.5rem; }
}

/* ===== DESKTOP LAYOUT (768px+) ===== */
@media (min-width: 768px) {

  /* Body gets extra top padding for sticky desktop nav + ticker */
  body {
    padding-bottom: 0;
    padding-top: 60px;
  }

  /* ── Desktop top nav (replaces mobile bottom nav) ── */
  .bottom-nav {
    position: fixed;
    top: 0; bottom: auto;
    left: 0; right: 0;
    height: 60px;
    border-top: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    justify-content: center;
    gap: 0;
    padding: 0 24px;
    z-index: 200;
  }
  .bn-item {
    flex: none;
    flex-direction: row;
    gap: 8px;
    padding: 0 20px;
    font-size: 0.85rem;
    font-weight: 600;
    height: 100%;
    border-bottom: 2px solid transparent;
    border-radius: 0;
  }
  .bn-item.active {
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
  }
  .bn-item:hover { background: var(--bg2); }
  .bn-item svg { width: 17px; height: 17px; }

  /* ── Original topbar becomes a footer on desktop ── */
  .topbar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0; right: 0;
    height: 44px;
    border-top: 1px solid var(--border);
    border-bottom: none;
    background: var(--bg2);
    z-index: 100;
    padding: 0 32px;
  }
  .topbar-logo { font-size: 0.88rem; }
  .topbar-date  { font-size: 0.78rem; }

  /* Feed/page max-width wider on desktop */
  .feed, .page, .brief-page, .pick-page {
    max-width: 780px;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 60px;
  }

  /* Hero bigger on desktop */
  .hero h1 { font-size: 2rem; }

  /* Card hover lift */
  .card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
}
