

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
table { border-collapse: collapse; width: 100%; }
.num, .metrics dd, .trk td.r, .trk th.r, .stat dd { font-variant-numeric: tabular-nums; }

:root {
  --green: #0C8A56;
  --green-ink: #0A7A4C;
  --up: #107C49;
  --down: #C6352B;
  --bg: #F6F7F8;
  --surface: #FFFFFF;
  --text: #0C1222;
  --muted: #5C6678;
  --faint: #8B93A1;
  --line: #E4E7EC;
  --line-strong: #D0D5DD;
  --soft: #F2F4F6;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

html[data-theme="dark"] {
  --green: #0C8A56;
  --green-ink: #9AD4B4;
  --up: #3DC47A;
  --down: #F06559;
  --bg: #0B0B0C;
  --surface: #111113;
  --elev: #161618;
  --soft: #161618;
  --text: #EDEDEF;
  --muted: #8F8F94;
  --faint: #6A6A70;
  --line: #232326;
  --line-strong: #2C2C30;
  --line2: #2C2C30;
  --shadow: none;
  --nav-bg: var(--bg);
}
:root {
  --elev: #F2F4F6;
  --nav-bg: var(--surface);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[data-theme="dark"] .nav,
html[data-theme="dark"] .bull-strip { background: var(--bg); }
html[data-theme="dark"] .chip.is-on,
html[data-theme="dark"] .m-filters .chip.is-on {
  background: var(--elev);
  border-color: var(--line2, var(--line-strong));
  color: var(--text);
}
html[data-theme="dark"] .chip.is-on span,
html[data-theme="dark"] .m-filters .chip.is-on span { color: var(--muted); }
html[data-theme="dark"] .theme-toggle .is-on,
html[data-theme="dark"] .theme-toggle [data-theme-set].is-on {
  background: var(--elev);
  color: var(--text);
  box-shadow: none;
}
html[data-theme="dark"] .m-badge-full { color: #9AD4B4; background: #102018; border: 1px solid #1E3D2E; }
html[data-theme="dark"] .m-badge-close, html[data-theme="dark"] .badge-close { color: #D4C39A; background: #1A1812; }
html[data-theme="dark"] .m-badge-unusual, html[data-theme="dark"] .badge-unusual, html[data-theme="dark"] .tag.UNUSUAL { color: #8CB6E8; background: #101820; border: 1px solid #1E3348; }
html[data-theme="dark"] .badge-full { color: #9AD4B4; background: #102018; }

/* Desktop theme toggle in the top-right nav (kept even though the desk photos omit it) */
.theme-toggle {
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: var(--elev, var(--soft));
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.theme-toggle button,
.theme-toggle a,
.theme-toggle [data-theme-set] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: -0.01em;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.theme-toggle .is-on,
.theme-toggle [data-theme-set].is-on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.card-link { display: block; color: inherit; text-decoration: none; }
.sr-search { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.session-pill { margin-left: 0; }
#day-select.session-select,
#day-select-m.session-select { margin: 0; }
.m-top { display: none; }
.tabbar { display: none; }
.panel-head .m-meta { display: none; }
.dash-chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 8px 6px;
  margin: 0 0 10px;
  box-shadow: var(--shadow);
}
.dash-chart .trk-chart-box { height: 84px; padding: 0 36px; }
#logout, .foot { display: none; } /* keep in DOM, off the mockup fold */


html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}
body { min-height: 900px; }
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 52px;
  padding: 0 28px;
  background: var(--nav-bg, var(--surface));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 26px; height: 26px; display: block; }
.wordmark { font-size: 15px; font-weight: 600; letter-spacing: -0.03em; }
.tabs { display: flex; gap: 4px; }
.tab {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}
.tab.is-active { color: var(--text); background: var(--soft); }
.nav-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); }
.session strong { color: var(--text); font-weight: 600; }
.mkt {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}
.bull-strip { display: none !important; } /* removed: Feed/Tracker reclaim the row */
.bull-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.bull-items { display: flex; gap: 18px; min-width: 0; }
.bull-item { white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.bull-item b { color: var(--text); font-weight: 600; margin-right: 4px; }
.bull-item em { font-style: normal; color: var(--up); font-weight: 500; font-variant-numeric: tabular-nums; }
.page {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(420px, 0.9fr);
  gap: 20px;
  padding: 12px 28px 14px;
}
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-head h1 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.quiet { color: var(--faint); font-size: 12px; }
.filters { display: flex; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.chip span { color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--text); border-color: var(--text); color: #fff; }
.chip.is-on span { color: rgba(255,255,255,0.72); }
.feed { display: flex; flex-direction: column; min-width: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px 8px;
  margin-bottom: 7px;
  box-shadow: var(--shadow);
}
.card-top { display: flex; align-items: center; gap: 8px; }
.card-top time { margin-left: auto; color: var(--faint); font-size: 11.5px; }
.badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}
.badge-full { color: var(--green-ink); background: #E7F5EE; }
.badge-close { color: #7A5A12; background: #F6F0E4; }
.badge-unusual, .tag.UNUSUAL { color: #1A4E8C; background: #E6F0FB; border-color: transparent; }
.tag {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 999px;
}
.card-title { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 5px; gap: 12px; }
.card-title h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.co { margin-top: 3px; color: var(--muted); font-size: 12px; }
.contract { font-size: 12.5px; font-weight: 500; color: var(--text); }
.print { margin: 5px 0 7px; color: var(--muted); font-size: 12.5px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.metrics dt { font-size: 10.5px; color: var(--faint); font-weight: 500; margin-bottom: 2px; }
.metrics dd { margin: 0; font-size: 13px; font-weight: 550; letter-spacing: -0.01em; }
.metrics .sub { display: block; color: var(--faint); font-size: 10.5px; font-weight: 500; margin-top: 1px; }
.side { min-width: 0; }
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 8px;
  box-shadow: var(--shadow);
}
.stat { padding: 0 8px; }
.stat dt, .stats .stat:nth-child(1) dt { display: block; font-size: 10.5px; color: var(--faint); font-weight: 500; margin-bottom: 3px; }
.stat dd { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.wl { display: block; margin-top: 2px; font-size: 10.5px; color: var(--faint); font-weight: 500; }
.asof { margin: 8px 0 10px; color: var(--faint); font-size: 11px; }
.trk {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 12.5px;
}
.trk th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--faint);
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.trk td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.trk tr:last-child td { border-bottom: 0; }
.trk .r { text-align: right; }
.trk .tk { color: var(--text); font-weight: 600; letter-spacing: -0.02em; }
.trk .side-sh { white-space: nowrap; font-variant-numeric: tabular-nums; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }


/* —— Mobile app shell (phone only; desktop layout unchanged) —— */
.m-shell { display: none; }

@media (max-width: 720px) {
  html, body {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    overflow: hidden;
    background: var(--bg);
  }
  body { min-height: 100%; }
  .nav, .bull-strip { display: none !important; } /* .page is the live phone feed/tracker shell */

  .m-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
    color: var(--text);
  }
  .m-top {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--line);
  }
  .m-top .brand { gap: 8px; }
  .m-top .logo-mark { width: 24px; height: 24px; }
  .m-top .wordmark { font-size: 17px; font-weight: 600; letter-spacing: -0.03em; }
  .theme-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 999px;
    background: var(--elev, var(--soft, #F2F4F6));
    border: 1px solid var(--line);
  }
  .theme-toggle a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 550;
    color: var(--muted);
    letter-spacing: -0.01em;
  }
  .theme-toggle a.is-on {
    background: var(--surface, #fff);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  }
  .m-sub {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 16px 0;
  }
  .m-sub h1 {
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }
  .m-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
  .m-meta .mkt {
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: var(--faint);
    background: transparent;
  }
  .m-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 16px 12px;
  }
  .m-panel { display: none; }
  html[data-view="feed"] .m-panel-feed,
  html[data-view="tracker"] .m-panel-tracker,
  html[data-view="bullseye"] .m-panel-bullseye { display: contents; }

  .m-filters {
    display: flex;
    gap: 6px;
    padding: 8px 16px 6px;
    flex-shrink: 0;
    overflow: auto;
  }
  .m-filters .chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
  }
  .m-filters .chip span { color: var(--faint); font-variant-numeric: tabular-nums; }
  .m-filters .chip.is-on {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
  }
  .m-filters .chip.is-on span { color: color-mix(in srgb, var(--bg) 70%, transparent); }

  .m-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px 10px;
    margin-bottom: 8px;
  }
  .m-card-top { display: flex; align-items: center; gap: 6px; }
  .m-card-top time { margin-left: auto; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
  .m-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
  }
  .m-badge-full { color: var(--green-ink, #0A7A4C); background: #E7F5EE; }
  .m-badge-close { color: #7A5A12; background: #F6F0E4; }
  .m-badge-unusual { color: #1A4E8C; background: #E6F0FB; }
  .m-tag {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 999px;
  }
  .m-card-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 6px; }
  .m-card-title h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; }
  .m-co { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
  .m-contract { font-size: 12.5px; font-weight: 550; color: var(--text); text-align: right; }
  .m-print { margin: 6px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.35; }
  .m-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .m-metrics dt { font-size: 10.5px; color: var(--faint); font-weight: 500; margin-bottom: 2px; }
  .m-metrics dd { margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .m-metrics .sub { display: inline; color: var(--faint); font-size: 10.5px; font-weight: 500; margin-left: 4px; }

  .m-note { margin: 0 0 10px; color: var(--faint); font-size: 12px; }
  .m-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }
  .m-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
  }
  .m-stat.span2 { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
  .m-stat dt { display: block; font-size: 11px; color: var(--faint); font-weight: 500; margin-bottom: 3px; }
  .m-stat dd { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
  .m-stat.span2 dd { font-size: 26px; }
  .m-stat .wl { display: block; margin-top: 2px; font-size: 11px; color: var(--faint); font-weight: 500; }

  .m-pos {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 13px;
    margin-bottom: 8px;
  }
  .m-pos-left { min-width: 0; }
  .m-pos .tk { font-size: 16px; font-weight: 650; letter-spacing: -0.03em; }
  .m-pos .side { margin-top: 2px; font-size: 12px; color: var(--muted); }
  .m-pos .spots { margin-top: 2px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
  .m-pos-pnl { text-align: right; }
  .m-pos-pnl .amt { display: block; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .m-pos-pnl .pct { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 550; font-variant-numeric: tabular-nums; }

  .m-bull-lead {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .m-bull {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 13px;
    margin-bottom: 8px;
  }
  .m-bull .num {
    flex-shrink: 0;
    width: 22px;
    color: var(--faint);
    font-size: 12px;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
    padding-top: 3px;
  }
  .m-bull-body { flex: 1; min-width: 0; }
  .m-bull-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .m-bull .tk { font-size: 16px; font-weight: 650; letter-spacing: -0.03em; }
  .m-bull .name { margin-left: 6px; font-size: 12.5px; font-weight: 450; color: var(--muted); }
  .m-bull .move { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .m-bull .detail { margin-top: 3px; font-size: 12px; color: var(--faint); line-height: 1.35; }

  .tabbar {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px 22px;
    background: var(--surface, #fff);
    border-top: 1px solid var(--line);
    position: relative;
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 550;
    letter-spacing: 0.01em;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  html[data-view="feed"] .tb-feed,
  html[data-view="news"] .tb-news,
  html[data-view="tracker"] .tb-tracker,
  html[data-view="bullseye"] .tb-bullseye {
    color: var(--text);
  }
  .home-ind {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 134px;
    height: 5px;
    margin-left: -67px;
    border-radius: 99px;
    background: currentColor;
    opacity: 0.18;
    pointer-events: none;
  }
  .up { color: var(--up) !important; }
  .down { color: var(--down) !important; }

  /* Live-app wiring: hide desktop chrome, show phone shell */
  body { display: flex; flex-direction: column; }
  .nav { display: none !important; }
  .bull-strip { display: none !important; }
  .m-top { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
    gap: 0;
  }
  .page > aside.side, aside.side { display: none !important; } /* not .m-pos .side */
  .feed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 8px 16px 0;
    flex-shrink: 0;
  }
  .panel-head h1 {
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }
  .panel-head .m-meta { display: flex; }
  .panel-head .filters,
  .m-filters-row {
    flex: 1 1 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 8px;
  }
  .filters .chip,
  .m-filters .chip { /* already defined */ }
  #stream, .m-scroll-host, .trk-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 4px 16px 12px;
    -webkit-overflow-scrolling: touch;
  }
  /* Restyle desktop card markup to match m-card */
  .card, .m-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px 10px;
    margin-bottom: 8px;
    box-shadow: none;
  }
  .card-top { gap: 6px; }
  .card-title h2 { font-size: 22px; font-weight: 650; }
  .co { font-size: 12.5px; }
  .print { margin: 6px 0 8px; font-size: 13px; line-height: 1.35; }
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
    padding-top: 8px;
  }
  .metrics dd { font-size: 13.5px; font-weight: 600; }
  .metrics .sub { display: inline; margin-left: 4px; }
  .tabbar { display: grid; }
  .trk-page-table { display: none !important; }
  .trk-page-mobile { display: block; }
  .bull-list-detailed { display: none !important; }
  .bull-compact { display: block; }
  .dash-chart { display: none; } /* phone tracker mockup has no chart */

}

/* Dark-theme badge surfaces when the Linear tokens are present */
@media (max-width: 720px) {
  html[data-theme="dark"] .m-badge-full { color: #9AD4B4; background: #102018; border: 1px solid #1E3D2E; }
  html[data-theme="dark"] .m-badge-close { color: #D4C39A; background: #1A1812; border: 1px solid #3A3424; }
  html[data-theme="dark"] .m-badge-unusual, html[data-theme="dark"] .badge-unusual, html[data-theme="dark"] .tag.UNUSUAL { color: #8CB6E8; background: #101820; border: 1px solid #1E3348; }
  html[data-theme="dark"] .theme-toggle a.is-on {
    background: #2A2A2E;
    box-shadow: none;
  }
  html[data-theme="dark"] .m-filters .chip.is-on {
    background: var(--elev, #161618);
    border-color: var(--line2, var(--line));
    color: var(--text);
  }
  html[data-theme="dark"] .m-filters .chip.is-on span { color: var(--muted); }
}

  

@media (min-width: 721px) {
  .trk-page-mobile { display: none; }
  .m-note { display: none !important; }
}
.bull-compact { display: none; }
.bull-list-detailed { display: block; }


/* —— Chart + auth (preserved) —— */
.trk-chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px 10px;
  margin: 0 0 14px;
  box-shadow: var(--shadow);
}
.trk-chart-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; min-height: 1.1em; }
.trk-chart-head .trk-k { margin: 0; }
.trk-chart-val { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; color: var(--text); }
.trk-chart-tip { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.trk-chart-box { position: relative; width: 100%; height: 120px; padding: 0 44px; box-sizing: border-box; }
.trk-chart-svg { width: 100%; height: 100%; display: block; touch-action: pan-y; overflow: visible; }
.rc-line-up, .rc-line-down { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.rc-line-up { stroke: var(--up); }
.rc-line-down { stroke: var(--down); }
.rc-fill-up { fill: color-mix(in srgb, var(--up) 16%, transparent); }
.rc-fill-down { fill: color-mix(in srgb, var(--down) 14%, transparent); }
.rc-zero { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.rc-cursor { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rc-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rc-yl { position: absolute; transform: translateY(-50%); font-size: 10px; color: var(--faint); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.rc-yl-l { left: 0; } .rc-yl-r { right: 0; }
.rc-rngs { display: flex; gap: 4px; margin: 0 0 8px; }
.rc-rng {
  flex: 1;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0;
  color: var(--muted);
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 0;
  cursor: pointer;
  font-family: var(--font);
  text-transform: none;
}
.rc-rng.on { color: var(--chip-on-fg); background: var(--chip-on-bg); border-color: var(--chip-on-bg); }
html[data-theme="dark"] .rc-rng.on { background: var(--elev); color: var(--text); border-color: var(--line-strong); }
.trk-note { color: var(--faint); font-size: 12px; margin: 0 0 12px; }
.trk-note[hidden] { display: none; }
.trk-block { margin: 18px 0; }
.trk-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.trk-sort-wrap { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.trk-sort {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: var(--font);
  font-size: 12.5px;
}
.trk-list { display: flex; flex-direction: column; gap: 8px; }
.trk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.trk-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trk-card-head .ticker { font-size: 16px; }
.trk-side {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.trk-side.long { color: var(--green-ink); background: var(--full-bg); border-color: transparent; }
.trk-side.short { color: var(--close); background: var(--close-bg); border-color: transparent; }
.trk-exp { margin-left: auto; color: var(--faint); font-size: 12px; }
.trk-card-link { font-size: 12px; color: var(--muted); }
.trk-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
}
.trk-grid .dk { display: block; font-size: 10.5px; color: var(--faint); font-weight: 500; margin-bottom: 2px; }
.trk-grid .dv { font-size: 13px; font-weight: 550; letter-spacing: -0.01em; }
.trk-print { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.trk-reason, .trk-hint { color: var(--muted); font-size: 12.5px; }

/* Bullseye scorecard */
.score-def {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0 16px;
  box-shadow: var(--shadow);
}
.score-steps { margin: 8px 0 0; padding-left: 18px; color: var(--text); }
.score-steps li { margin: 4px 0; }
.score-note { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.bull-list { display: flex; flex-direction: column; gap: 10px; }
.bull-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.bull-num { flex-shrink: 0; width: 28px; color: var(--faint); font-weight: 550; font-variant-numeric: tabular-nums; padding-top: 2px; }
.bull-body { flex: 1; min-width: 0; }
.bull-body h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.bull-name { font-weight: 450; color: var(--muted); font-size: 14px; margin-left: 4px; }
.bull-body .blurb { margin-top: 4px; }
.bull-sections { display: grid; gap: 8px; margin-top: 10px; }
.bull-sec { padding-top: 8px; border-top: 1px solid var(--line); }
.bull-sec-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}
.bull-sec p { font-size: 13px; color: var(--text); }

/* Card detail */
.detail { margin-top: 16px; }
.detail-sec { margin-top: 16px; }
.detail-sec-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.detail-kv { display: flex; flex-direction: column; gap: 2px; }
.detail-kv .dk { font-size: 11px; color: var(--faint); font-weight: 500; }
.detail-kv .dv { font-size: 13.5px; font-weight: 550; }
.detail-id { display: none !important; }

/* Auth / maintenance */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
  position: relative;
}
.login-wrap .theme-toggle { position: absolute; top: 16px; right: 16px; }
.login-card, .login-stack {
  width: 100%;
  max-width: 400px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
}
.login-card .brand { margin-bottom: 20px; }
.login-card h1, .login-card .wordmark { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; text-transform: none; color: var(--text); font-family: var(--font); }
.login-card .sub { margin-top: 4px; color: var(--muted); font-size: 13px; font-family: var(--font); text-transform: none; letter-spacing: 0; }
.login-card button[type="submit"], .login-card #go, .auth-submit {
  width: 100%;
  margin-top: 8px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 12px;
  cursor: pointer;
}
html[data-theme="dark"] .login-card button[type="submit"],
html[data-theme="dark"] .login-card #go { color: #0B0B0C; }
.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 16px;
  padding: 11px 12px;
  outline: none;
}
.login-card input:focus { border-color: var(--line-strong); }
.login-err { margin-top: 12px; font-size: 13px; color: var(--down); min-height: 1.2em; }
.login-ok { color: var(--up) !important; }
.login-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; font-weight: 500; }
.login-links a { color: var(--muted); }
.login-links a:hover { color: var(--text); }
.login-built { margin-top: 12px; font-size: 11px; color: var(--faint); }
.login-trump { display: none; } /* drop the old decorative gif in the restyle */

/* Mobile tab bar */
.tabbar { display: none; }

@media (min-width: 640px) {
  .trk-chart-box { height: 140px; }
}
@media (max-width: 860px) {
  .trk-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .app { padding: 0 16px 110px; }
  .top {
    margin: 0 -16px;
    padding: 10px 16px;
    min-height: 52px;
    position: sticky;
  }
  .tabs { display: none; }
  .brand-text .sub { display: none; }
  .top-meta .muted, .top-meta .back-link { display: none; }
  .theme-toggle button, .theme-toggle [data-theme-set] { min-width: 50px; height: 26px; font-size: 12px; }
  .trk-summary { grid-template-columns: 1fr 1fr; }
  .trk-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    padding: 6px 8px calc(10px + env(safe-area-inset-bottom));
    background: var(--tabbar-bg);
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 550;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.is-on, .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar .home-ind {
    position: absolute;
    left: 50%;
    bottom: calc(4px + env(safe-area-inset-bottom) * 0.15);
    width: 134px;
    height: 5px;
    margin-left: -67px;
    border-radius: 99px;
    background: currentColor;
    opacity: 0.18;
    pointer-events: none;
  }
  .bull-card { flex-direction: column; gap: 6px; }
}

.login-note {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.side .trk-chart, .dash-chart.trk-chart { margin-top: 0; }
@media (max-width: 720px) {
  .login-wrap .theme-toggle { position: absolute; top: 16px; right: 16px; display: flex; }
}

/* Tracker / bullseye page extras */
a.m-pos { color: inherit; text-decoration: none; }
.m-stats { display: none; }
.m-note[hidden] { display: none !important; }
.bull-compact { padding: 12px 28px 28px; max-width: 720px; }
html[data-view="bullseye"] .page { display: block; }
@media (max-width: 720px) {
  .trk-page .stats:not(.m-stats),
  .trk-page .trk-chart,
  .trk-page .asof,
  .trk-page label[for="open-sort"] { display: none !important; }
  .m-stats, #m-summary { display: grid !important; }
  .m-note { display: block; }
  .m-note[hidden] { display: none !important; }
  .quiet:not(.m-meta span) { }
  .bull-compact { padding: 4px 16px 12px; max-width: none; display: block; }
  .bull-lead-desktop { display: none; }
}

/* Compact bullseye rows (same as phone mockup) also on desktop */
.m-bull-lead {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.m-bull {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.m-bull .num {
  width: 22px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 550;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.m-bull-body { flex: 1; min-width: 0; }
.m-bull-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.m-bull .tk { font-size: 16px; font-weight: 650; letter-spacing: -0.03em; }
.m-bull .name { margin-left: 6px; font-size: 12.5px; font-weight: 450; color: var(--muted); }
.m-bull .move { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-bull .detail { margin-top: 3px; font-size: 12px; color: var(--faint); line-height: 1.35; }
.bull-list-detailed, .score-def, .day-bar.search-bar { display: none !important; }
.bull-compact { display: block; padding: 8px 28px 28px; max-width: 760px; }

html[data-view="bullseye"] body { min-height: 100%; }
@media (max-width: 720px) {
  html[data-view="bullseye"] body,
  html[data-view="tracker"] body,
  html[data-view="feed"] body,
  html[data-view="news"] body {
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }
  html[data-view="bullseye"] .panel-head,
  html[data-view="bullseye"] .m-bull-lead {
    padding-left: 16px !important;
    padding-right: 16px !important;
    flex-shrink: 0;
  }
  html[data-view="bullseye"] .bull-compact {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 4px 16px 12px !important;
    max-width: none;
  }
}

/* Range chips on tracker page */
.rc-rngs { display: flex; gap: 4px; margin: 0 0 6px; }
.rc-rng {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
}
.rc-rng.on, .rc-rng[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
html[data-theme="dark"] .rc-rng.on {
  background: var(--elev);
  color: var(--text);
  border-color: var(--line-strong);
}

@media (max-width: 720px) {
  .trk-page-mobile { display: block !important; }
  #block-review, #block-skipped { display: none !important; }
  .trk-page .panel-head > .quiet,
  .trk-page .bull-lead-desktop { display: none !important; }
}

/* Card-detail kind tags use the same pills as feed badges */
.tag.FULL_MATCH { color: var(--green-ink); background: #E7F5EE; border-color: transparent; }
.tag.CLOSE_MISS { color: #7A5A12; background: #F6F0E4; border-color: transparent; }
html[data-theme="dark"] .tag.FULL_MATCH { color: #9AD4B4; background: #102018; border: 1px solid #1E3D2E; }
html[data-theme="dark"] .tag.CLOSE_MISS { color: #D4C39A; background: #1A1812; border: 1px solid #3A3424; }

/* —— News panel + /news page —— */
.news-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 64px);
}
.news-search-wrap { margin: 0 0 8px; }
.news-search {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font, Inter, system-ui, sans-serif);
  font-size: 13px;
  outline: none;
}
.news-search:focus { border-color: var(--line-strong, var(--text)); }
.news-status { margin: 0 0 8px; }
.news-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.news-empty {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}
.news-item {
  display: flex;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 7px;
  box-shadow: var(--shadow);
}
.news-item.is-new { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.news-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-body { min-width: 0; flex: 1; }
.news-headline {
  display: block;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-decoration: none;
}
.news-headline:hover { text-decoration: underline; }
.news-sum {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin-top: 5px;
  color: var(--faint);
  font-size: 11px;
}
.news-src { font-weight: 550; color: var(--muted); }
.news-new {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--up);
  background: color-mix(in srgb, var(--up) 12%, var(--surface));
  padding: 1px 6px;
  border-radius: 999px;
}
.news-ticks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.news-tick {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.news-tick:hover { border-color: var(--line-strong, var(--text)); }
.news-list-compact .news-headline { font-size: 13px; }
.news-list-compact .news-thumb { width: 48px; height: 48px; }
.news-page { padding-bottom: 28px; }
html[data-view="news"] .news-wrap { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; min-height: 0; }
@media (max-width: 720px) {
  html[data-view="news"] .page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
  }
  html[data-view="news"] .news-wrap { max-width: none; flex: 1; min-height: 0; }
  html[data-view="news"] .panel-head { padding: 8px 16px 0; }
  html[data-view="news"] .news-search-wrap { padding: 0 16px; }
  html[data-view="news"] .news-list { padding: 4px 16px 12px; }
}

/* Card detail page (opened card) */
.app {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px 48px;
}
.top {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
  margin: 0 -28px 8px;
  padding: 0 28px;
  background: var(--nav-bg, var(--surface));
  border-bottom: 1px solid var(--line);
}
.top-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.back-link, .pill {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover, .pill:hover { color: var(--text); }
.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px 20px;
  box-shadow: var(--shadow);
}
.detail-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.detail-card .card-head .ticker {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-left: 8px;
}
.detail-card .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-earn, .badge-bull {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--soft);
}
.detail-blurb {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.detail-sec.insight-sec,
.catalysts {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.catalysts { margin-top: 16px; }
.cat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.cat-body { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.earn-mark { color: var(--muted); font-weight: 550; }
.insight-body p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}
.insight-body p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}
.empty { color: var(--muted); font-size: 14px; padding: 24px 0; }
@media (max-width: 720px) {
  .app { max-width: none; }
  .top {
    margin: 0 -16px 8px;
    padding: 10px 16px;
  }
  .detail-card { padding: 14px; }
  .detail-card .card-head .ticker { font-size: 20px; }
  .detail-sec.insight-sec, .catalysts { padding: 12px 13px; }
  .insight-body p { font-size: 13px; }
}

/* —— Mobile scroll + tab-bar clearance (authoritative) —— */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-bg: var(--surface);
  --tabbar-clear: calc(80px + var(--safe-bottom));
}

@media (max-width: 720px) {
  html,
  body,
  html[data-view="feed"] body,
  html[data-view="tracker"] body,
  html[data-view="bullseye"] body,
  html[data-view="news"] body {
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    display: block !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Top bars stay in flow (not covering content); clear the notch in standalone PWA. */
  .m-top,
  header.top,
  .top {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: calc(10px + var(--safe-top));
    background: var(--nav-bg, var(--surface));
  }

  /* Unlock inner 100%/flex overflow traps so the page itself scrolls. */
  .page,
  .feed,
  .news-wrap,
  .news-page,
  .trk-page,
  .trk-page-mobile,
  .app,
  .detail,
  #stream,
  #news-list,
  #detail,
  .m-scroll-host,
  .trk-scroll,
  .bull-compact,
  .news-list,
  html[data-view="news"] .page,
  html[data-view="news"] .news-wrap,
  html[data-view="news"] .news-list,
  html[data-view="bullseye"] .bull-compact,
  html[data-view="bullseye"] body,
  html[data-view="tracker"] .page {
    flex: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  /* Fixed tab bar must not sit on top of items — pad the document. */
  body {
    padding-bottom: var(--tabbar-clear) !important;
  }
  .app {
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 0;
  }

  .tabbar {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 6px 8px calc(10px + var(--safe-bottom));
    background: var(--tabbar-bg, var(--surface)) !important;
    border-top: 1px solid var(--line);
  }
  .tabbar .home-ind,
  .home-ind {
    bottom: calc(4px + var(--safe-bottom) * 0.15);
  }
}

/* —— Feed ticker / company search —— */
.feed-search-wrap {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 0 2px;
  min-width: 0;
}
.feed-search {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font, Inter, system-ui, sans-serif);
  font-size: 13px;
  outline: none;
}
.feed-search:focus { border-color: var(--line-strong, var(--text)); }
.feed-search::placeholder { color: var(--faint); }
.feed-search-clear {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
  padding: 6px 8px;
  cursor: pointer;
  background: none;
  border: 0;
}
.feed-search-clear:hover { color: var(--text); }
.feed-search-clear[hidden] { display: none !important; }
.search-sum {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.search-day {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

@media (max-width: 720px) {
  .feed-search-wrap {
    flex: 1 1 100%;
    padding: 2px 0 8px;
  }
  .feed-search { font-size: 16px; } /* avoid iOS focus zoom */
}

/* Desktop News column: sticky, full viewport height, list fills and scrolls */
@media (min-width: 721px) {
  .page { align-items: start; }
  aside.side.news-side {
    position: sticky;
    top: 12px;
    align-self: start;
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    min-height: 0;
  }
  aside.side.news-side .news-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* —— Tracker search, filters, and sort pill —— */
.trk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 12px;
}
.trk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.trk-sort-pill {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 2px;
  border-radius: 999px;
  background: var(--elev, var(--soft));
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.trk-sort-lab {
  padding: 0 8px 0 10px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.trk-sort-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  height: 26px;
  padding: 0 26px 0 10px;
  border-radius: 999px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%238B93A1' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .trk-sort-select {
  background-color: var(--elev);
  box-shadow: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%238F8F94' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.trk-sort-select:focus { outline: none; }
.trk-m-head, .trk-m-empty { display: none; }

@media (max-width: 720px) {
  .trk-toolbar {
    flex-direction: column;
    align-items: stretch;
    margin: 0 0 10px;
    padding: 0 16px;
  }
  .trk-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .trk-filters .chip { flex-shrink: 0; }
  .trk-sort-pill { margin-left: 0; align-self: flex-end; }
  .trk-m-block { padding: 0 16px; }
  .trk-m-head {
    display: block;
    margin: 12px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
  }
  .trk-m-head span { color: var(--faint); font-weight: 550; }
  .trk-m-empty { display: block; padding: 8px 0 12px; }
  .trk-m-empty[hidden] { display: none !important; }
}

/* session pill in mobile feed head */
@media (max-width: 720px) {
  html[data-view="feed"] .panel-head .session-pill { margin-left: 0; }
  html[data-view="feed"] .panel-head .trk-sort-lab { padding: 0 6px 0 8px; }
}


/* Bullseye page layout + detail */
.bull-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 32px 56px;
}
html[data-view="bullseye"] .panel-head {
  gap: 10px 16px;
  margin-bottom: 10px;
  align-items: center;
}
html[data-view="bullseye"] .panel-head h1 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
html[data-view="bullseye"] .panel-head #bull-count {
  font-variant-numeric: tabular-nums;
}
html[data-view="bullseye"] .bull-page .feed-search-wrap {
  margin-left: auto;
  flex: 1 1 240px;
  max-width: 360px;
  min-width: 200px;
}
.bull-lead {
  margin: 0 0 16px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.bull-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.bull-steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  box-shadow: var(--shadow);
}
.bull-steps li strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bull-cols {
  display: grid;
  grid-template-columns: 52px minmax(100px, 0.75fr) minmax(160px, 1.4fr) 128px minmax(200px, 2fr) 92px;
  gap: 8px 16px;
  align-items: end;
  padding: 0 18px 8px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bull-view { display: flex; flex-direction: column; gap: 8px; }
.bull-row {
  display: grid;
  grid-template-columns: 52px minmax(100px, 0.75fr) minmax(160px, 1.4fr) 128px minmax(200px, 2fr) 92px;
  gap: 8px 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.bull-row:hover, .bull-row:focus-visible {
  border-color: var(--line-strong, var(--text));
  outline: none;
}
.br-id { display: contents; }
.br-num { color: var(--faint); font-weight: 550; font-variant-numeric: tabular-nums; font-size: 13px; }
.br-ticker { font-size: 15px; font-weight: 650; letter-spacing: -0.03em; }
.br-name { color: var(--muted); font-size: 13px; font-weight: 450; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-flag { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.br-type .tag { display: inline-flex; }
.br-cat { color: var(--muted); font-size: 12.5px; line-height: 1.35; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.br-move { text-align: right; font-size: 15px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.br-move.up, .bull-d-sec .up { color: var(--up); }
.br-move.down, .bull-d-sec .down { color: var(--down, #C23B3B); }
.bull-empty { margin: 16px 0; color: var(--muted); font-size: 13px; }

.bull-detail[hidden] { display: none !important; }
.bull-detail {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.bull-detail-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.48);
}
html[data-theme="dark"] .bull-detail-scrim { background: rgba(0, 0, 0, 0.62); }
.bull-detail-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  padding: 22px 24px 28px;
}
.bull-d-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.bull-d-kicker { color: var(--faint); font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; }
.bull-d-head h2 { flex: 1 1 auto; font-size: 22px; font-weight: 650; letter-spacing: -0.03em; margin: 0; }
.bull-d-head .ticker { letter-spacing: -0.03em; }
.bull-d-close {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--elev, var(--soft));
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
}
.bull-d-blurb { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.bull-d-sec { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.bull-d-sec .detail-grid { margin: 0 0 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; }
.bull-d-prose p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--text); }
.bull-d-prose p:last-child { margin-bottom: 0; }
.bull-d-prose a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.bull-news-list { margin-top: 8px; }
.bull-news-item { box-shadow: none; }

html.is-bull-detail,
html.is-bull-detail body {
  overflow: hidden !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
}

@media (max-width: 720px) {
  .bull-page { padding: 8px 16px 12px; max-width: none; }
  html[data-view="bullseye"] .bull-page .feed-search-wrap {
    margin-left: 0;
    max-width: none;
    flex: 1 1 100%;
    width: 100%;
  }
  html[data-view="bullseye"] .panel-head { padding-left: 0 !important; padding-right: 0 !important; }
  html[data-view="bullseye"] .panel-head h1 { font-size: 20px; }
  .bull-lead { margin-bottom: 12px; font-size: 13px; }
  .bull-steps, .bull-cols { display: none !important; }
  .bull-view { gap: 0; }
  .bull-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas:
      "num id move"
      "num cat cat";
    gap: 2px 10px;
    padding: 11px 13px;
    margin-bottom: 8px;
    border-radius: 12px;
  }
  .br-id { display: flex; align-items: baseline; gap: 6px; min-width: 0; grid-area: id; }
  .br-num { grid-area: num; padding-top: 3px; font-size: 12px; }
  .br-ticker { font-size: 16px; }
  .br-name { font-size: 12.5px; }
  .br-flag, .br-type { display: none; }
  .br-cat { grid-area: cat; -webkit-line-clamp: 2; }
  .br-move { grid-area: move; font-size: 15px; }

  .bull-detail { padding: 0; align-items: stretch; }
  .bull-detail-panel {
    width: 100%;
    max-height: none;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: calc(12px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
  }
  .bull-d-head h2 { font-size: 20px; }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .bull-cols, .bull-row {
    grid-template-columns: 48px minmax(88px, 0.8fr) minmax(150px, 1.3fr) 118px minmax(0, 1.8fr) 84px;
    padding-left: 14px;
    padding-right: 14px;
    gap: 8px 12px;
  }
}
