/* Trueearnings — clean light-theme finance UI. */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fb;
  --bg-tint: #eef2ff;
  --surface: #ffffff;
  --line: #e6e9ef;
  --line-strong: #d4d9e2;

  --fg: #0b1220;
  --fg-soft: #3b4252;
  --muted: #6b7280;
  --muted-soft: #9aa3b2;

  /* Brand accent is monochrome (black on white) — the old bright green
     (#00E838) was removed app-wide. Everything that reads var(--accent*)
     (links, toggles, buttons, badges, focus rings, score bars, the onboarding
     funnel) recolors from this one block. NOTE: --good/--bad (gains/losses) and
     the risk-band colors are intentionally left as-is — that green/red encodes
     data direction, not branding. */
  --accent: #0b1220;
  --accent-soft: #eef0f4;
  --accent-deep: #000000;
  --accent-fg: #ffffff;
  --accent-glow: rgba(11, 18, 32, 0.22);

  --good: #16a34a;
  --good-soft: #dcfce7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;

  --low-bg: #ecfdf5;  --low-fg: #047857;
  --mid-bg: #fffbeb;  --mid-fg: #b45309;
  --high-bg: #fef2f2; --high-fg: #b91c1c;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .04);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "SFMono-Regular", "Roboto Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Top navigation ─────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1120px; margin: 0 auto;
  min-height: 56px;
}
.brand {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0;
  max-width: min(58vw, 240px);
}
.brand:hover { text-decoration: none; opacity: 0.85; }
.brand-logo {
  display: block;
  height: auto;
  width: auto;
  flex-shrink: 0;
}
.brand-logo--sm { height: 1.15rem; }
.brand-logo--md { height: 2.18rem; }
.brand-logo--lg { height: 1.75rem; }
.brand-logo--sidebar { width: auto; height: auto; max-width: none; object-fit: contain; }
.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: block; }
.brand-wordmark {
  font-family: "Inter Tight", var(--font);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--fg);
  line-height: 1;
}
/* Brand green accent on the "True" — echoes the old logo's green mark. */
.brand-wm-a { color: #16c47f; }
.brand-wordmark--sm { font-size: 1.2rem; }
.brand-wordmark--md { font-size: 1.6rem; }
.brand-wordmark--lg { font-size: 1.6rem; }
.brand-wordmark--sidebar { font-size: 1.45rem; }
.site-brand-inline {
  display: inline-flex; align-items: center;
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 0;
  background: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg);
}
.brand-mark svg { width: 18px; height: 22px; }
.nav {
  display: flex; align-items: center; gap: 0.5rem;
}
/* `:not(.btn)` so button-styled anchors like the Sign up CTA keep their
   own color + padding. Otherwise this generic .nav a rule wins on
   specificity and bleeds dark-on-dark text into the button. */
.nav a:not(.btn) {
  color: var(--fg-soft); padding: 0.5rem 0.85rem; border-radius: 8px;
  font-size: 0.94rem; font-weight: 500;
}
.nav a:not(.btn):hover { background: var(--bg-soft); text-decoration: none; }
.nav a.active:not(.btn) { color: var(--fg); background: var(--bg-soft); }

/* Theme toggle — sun/moon icon swap driven by <html data-theme> */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; margin: 0 0.15rem;
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; color: var(--fg-soft);
  transition: background-color 80ms ease, border-color 80ms ease, color 80ms ease;
}
.theme-toggle:hover {
  background: var(--bg-soft); border-color: var(--line-strong);
  color: var(--fg);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.theme-toggle .theme-toggle-icon { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }
/* Fallback when JS hasn't set data-theme yet — default is light, show moon */
html:not([data-theme]) .theme-toggle .icon-moon { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.6rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 80ms ease, transform 80ms ease, box-shadow 80ms ease;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-deep); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

main.container { padding-top: 0; padding-bottom: 4rem; }

/* Real footer styles live further down — see "Site footer" block. The
   small declarations here are kept light-weight so nothing depends on the
   short-footer reset. */
.site-footer { color: var(--muted); font-size: 0.9rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 3.5rem; text-align: center;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 0.35rem 0.85rem; border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.05;
  margin: 0 auto 1rem; max-width: 22ch;
  letter-spacing: -0.02em; font-weight: 700;
}
.hero .tagline {
  font-size: 1.15rem; color: var(--muted);
  max-width: 38rem; margin: 0 auto 2.25rem;
}
.search-form {
  display: flex; gap: 0.5rem; max-width: 36rem; margin: 0 auto 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem; box-shadow: var(--shadow);
}
.search-form input {
  flex: 1; padding: 0.75rem 1rem; font-size: 1rem;
  border: none; background: transparent; color: var(--fg);
  outline: none;
}
.search-form input::placeholder { color: var(--muted-soft); }
.search-form button {
  padding: 0.75rem 1.4rem;
}
.search-error { color: var(--bad); margin-top: 0.75rem; }

/* ── Search home (Google-style `/`) ─────────────────────────────────────── */
.search-home {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.search-home-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 1rem 1.25rem;
}
.search-home-top-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}
.search-home-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.search-home-nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.search-home-nav-link:hover { color: var(--fg); }
.search-home-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
}
.search-home-center {
  width: 100%;
  max-width: 584px;
  text-align: center;
}
.search-home-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.search-home-mark {
  display: inline-flex;
  justify-content: center;
}
.search-home-mark .brand-logo {
  height: clamp(3.25rem, 7.8vw, 4.55rem);
  width: auto;
}
.search-home-form { margin: 0; }
.search-home-combobox {
  position: relative;
  text-align: left;
}
.search-home-combobox.is-open .search-home-input-wrap {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom-color: transparent;
  box-shadow: none;
}
.search-home-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  margin-top: 0;
  padding: 0.35rem 0 0.5rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: none;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  max-height: min(380px, 52vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-home-dropdown:empty { display: none; }
.search-home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem 0.35rem;
}
.search-home-section-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.search-home-section-clear {
  background: none;
  border: none;
  padding: 0.25rem 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.12s ease;
}
.search-home-section-clear:hover { color: var(--fg); }
.search-home-section-clear:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.search-home-result {
  align-items: center;
  gap: 0.85rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
  transition: background 0.12s ease;
}
.search-home-result:hover,
.search-home-result:focus-visible {
  background: var(--bg-soft);
  outline: none;
}
.search-home-result-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--bg-soft);
}
.search-home-result-img--avatar { border-radius: 50%; object-fit: cover; }
.search-home-result-img--placeholder {
  display: inline-block;
  border: 1px solid var(--line);
}
.search-home-result-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}
.search-home-result-primary {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.search-home-result-secondary {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-home-result--cta .search-home-result-action {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.search-home-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem 0.65rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-home-input-wrap:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.search-home-input-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.search-home-field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.search-home-typewriter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  text-align: left;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--muted-soft);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.12s ease;
}
.search-home-typewriter.is-hidden { opacity: 0; }
.search-home-type-cursor::after {
  content: '|';
  margin-left: 1px;
  font-weight: 300;
  animation: search-home-cursor-blink 1s step-end infinite;
}
@keyframes search-home-cursor-blink { 50% { opacity: 0; } }
.search-home-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--fg);
  outline: none;
}
.search-home-input-wrap input::placeholder { color: var(--muted-soft); }
.search-home-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.12s ease;
}
.search-home-submit svg { width: 18px; height: 18px; }
.search-home-submit:hover { opacity: 0.92; }
.search-home-submit:active { transform: scale(0.96); }
.search-home-error {
  margin: 0.85rem 0 0;
  color: var(--bad);
  font-size: 0.92rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .search-home-input-wrap,
  .search-home-submit { transition: none; }
  .search-home-type-cursor::after { animation: none; }
}

.hero-foot {
  color: var(--muted); margin-top: 1.5rem; font-size: 0.95rem;
}

/* ── Section banding ─────────────────────────────────────────────────────── */
.section {
  padding: 4rem 0;
}
.section.tinted {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.section-head h2 {
  font-size: 1.6rem; margin: 0; letter-spacing: -0.01em; font-weight: 700;
}
.section-head p { color: var(--muted); margin: 0.35rem 0 0; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-lg {
  padding: 2rem; border-radius: var(--radius-lg);
}

/* Preview cards (homepage): mini leaderboard tiles */
.preview-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.5rem;
  color: inherit; text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
a.preview-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent, #2563eb);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
}
.preview-card .pc-rank {
  font-size: 0.75rem; font-weight: 600; color: var(--muted);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.preview-card .pc-profile {
  display: flex; align-items: center; gap: 0.6rem;
}
.preview-card .pc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; background: var(--line);
  flex-shrink: 0;
}
.preview-card .pc-handle {
  font-weight: 600; font-size: 1.05rem; color: var(--fg);
}
.preview-card .pc-stats {
  display: flex; justify-content: space-between; margin-top: auto; padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.preview-card .pc-stats span { color: var(--muted); font-size: 0.85rem; }
.preview-card .pc-stats strong { color: var(--fg); font-weight: 600; }

/* ── Page heads ──────────────────────────────────────────────────────────── */
.page-head {
  padding: 3rem 0 1.5rem;
}
.page-head h1 {
  font-size: 2rem; margin: 0 0 0.35rem; letter-spacing: -0.015em; font-weight: 700;
}
.page-head .meta { color: var(--muted); }

/* ── Sort filter tabs ────────────────────────────────────────────────────── */
.filter-tabs {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 0.25rem; border-radius: 999px;
}
.filter-tabs a {
  padding: 0.4rem 0.85rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 500; color: var(--fg-soft);
}
.filter-tabs a:hover { text-decoration: none; color: var(--fg); }
.filter-tabs a.active {
  background: var(--surface); color: var(--fg);
  box-shadow: var(--shadow-sm);
}

/* ── Leaderboard table ───────────────────────────────────────────────────── */
.leaderboard-wrap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.leaderboard {
  width: 100%; border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.leaderboard th, .leaderboard td {
  padding: 0.85rem 1.1rem; text-align: left;
  border-bottom: 1px solid var(--line);
}
.leaderboard thead th {
  background: var(--bg-soft);
  font-weight: 600; font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.leaderboard tbody tr:last-child td { border-bottom: none; }
.leaderboard tbody tr:hover { background: var(--bg-soft); }
.leaderboard tbody tr.clickable-row { cursor: pointer; }
.leaderboard .col-rank { width: 3rem; color: var(--muted-soft); font-weight: 600; }
.leaderboard .col-num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.leaderboard .col-tickers { min-width: 7rem; }
.leaderboard .col-sortable {
  cursor: pointer; user-select: none; white-space: nowrap;
}
.leaderboard .col-sortable:hover { color: var(--fg); }
.leaderboard .col-sortable .sort-icon {
  font-size: 0.7em; opacity: 0.4; margin-left: 2px;
}
.leaderboard .col-sortable.sorted { color: var(--fg); font-weight: 700; }
.leaderboard .col-sortable.sorted .sort-icon { opacity: 1; }
.leaderboard a { color: inherit; }

/* Universal client-side sortable headers (progressive enhancement applied by
   the table-sort script in base.html). Mirrors .col-sortable so the affordance
   reads identically whether a column sorts server-side or in the browser. */
.leaderboard th.js-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.leaderboard th.js-sortable:hover { color: var(--fg); }
.leaderboard th.js-sortable .js-sort-ind { font-size: 0.7em; opacity: 0.35; margin-left: 2px; font-weight: 600; }
.leaderboard th.js-sortable.js-sorted { color: var(--fg); font-weight: 700; }
.leaderboard th.js-sortable.js-sorted .js-sort-ind { opacity: 1; }

.ticker-stack {
  display: flex; align-items: center;
}
.ticker-logo-wrap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-soft); border: 2px solid var(--surface);
  overflow: hidden; flex-shrink: 0;
}
.ticker-logo-wrap::before {
  content: attr(data-letter);
  font-size: 0.65rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase;
}
.ticker-logo-wrap > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit; z-index: 1;
}
.ticker-logo-wrap.ticker-logo-stacked { margin-left: -8px; }
.ticker-logo-wrap.ticker-logo-stacked:first-child { margin-left: 0; }
.ticker-stack .ticker-more {
  margin-left: 4px; font-size: 0.72rem; font-weight: 600;
  color: var(--muted); white-space: nowrap;
}
.empty-row { text-align: center; color: var(--muted); padding: 2.5rem; }
.pagination-row td { text-align: center; padding: 1rem; }
.pagination-row a { margin: 0 0.75rem; color: var(--fg-soft); font-weight: 500; }
.infinite-scroll-sentinel td { text-align: center; padding: 1.5rem; color: var(--muted); }
.infinite-loading { text-align: center; padding: 1.25rem; color: var(--muted); font-size: 0.85rem; }
.loading-dots::after {
  content: '';
  animation: dots 1.2s steps(3, end) infinite;
}
@keyframes dots {
  0% { content: ''; }
  33% { content: '.'; }
  66% { content: '..'; }
  100% { content: '...'; }
}

.handle { font-weight: 600; color: var(--fg); }
.handle:hover { color: var(--accent); }
.col-firm { white-space: nowrap; }
.firm-name { color: var(--muted); font-size: 0.86rem; font-weight: 500; }
.handle-with-avatar {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
}
.handle-with-avatar:hover { text-decoration: none; }
.handle-with-avatar:hover span { color: var(--accent); }
.row-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  flex-shrink: 0;
}

/* ── Pct + risk pill ─────────────────────────────────────────────────────── */
.pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.pct-pos { color: var(--good); }
.pct-neg { color: var(--bad); }
.pct-zero { color: var(--muted); }

.risk-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
}
.risk-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.7;
}
.risk-low  { background: var(--low-bg);  color: var(--low-fg);  }
.risk-medium { background: var(--mid-bg);  color: var(--mid-fg);  }
.risk-high { background: var(--high-bg); color: var(--high-fg); }

/* ── Profile ─────────────────────────────────────────────────────────────── */
.profile-head {
  display: flex; gap: 1.5rem; align-items: center;
  padding: 2.5rem 0 2rem;
}
.avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}
.profile-id h1 { margin: 0 0 0.25rem; font-size: 1.85rem; letter-spacing: -0.015em; }
.profile-id .meta { color: var(--muted); margin: 0 0 0.75rem; }

.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.metric { padding: 1.5rem 1.6rem; }
.metric-label {
  font-size: 0.78rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 600;
}
.metric-value { font-size: 2rem; margin: 0.5rem 0 0.25rem; letter-spacing: -0.02em; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-foot { color: var(--muted); font-size: 0.9rem; }

.risk-card { margin-bottom: 2rem; }
.risk-card h2 { margin-top: 0; font-size: 1.25rem; }

/* ── Latest calls card ──────────────────────────────────────────────────── */
.latest-calls-card { margin-bottom: 2rem; }
.latest-calls-card h2 { margin-top: 0; font-size: 1.25rem; }
.latest-calls-card .tweet-list { margin-top: 1rem; }
.ticker-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  background: var(--accent-bg, rgba(59, 130, 246, 0.08));
  color: var(--accent, #3b82f6);
}
.rationale { padding-left: 1.1rem; margin: 0.75rem 0; }
.rationale li { margin-bottom: 0.4rem; }
.components { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.components li {
  display: flex; justify-content: space-between;
  padding: 0.45rem 0; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.components li:last-child { border-bottom: none; }
.components span { color: var(--muted); text-transform: capitalize; }

.bests {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem;
}
.bests h2 { margin-top: 0; font-size: 1.15rem; }
.pick-list { padding: 0; margin: 0.5rem 0 0; list-style: none; }
.pick-list li {
  display: grid; grid-template-columns: 5rem 1fr auto;
  gap: 1rem; padding: 0.5rem 0; align-items: center;
  border-bottom: 1px solid var(--line);
}
.pick-list li:last-child { border-bottom: none; }
.ticker {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-weight: 600; color: var(--fg);
}

.perf-table {
  width: 100%; border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.perf-table th, .perf-table td {
  padding: 0.75rem 1.1rem; text-align: left;
  border-bottom: 1px solid var(--line);
}
.perf-table tr:last-child td { border-bottom: none; }
.perf-table th {
  color: var(--muted); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.05em; background: var(--bg-soft);
}
.perf-table td:nth-child(n+2), .perf-table th:nth-child(n+2) { text-align: right; }

/* ── Pricing (legacy classes removed — see px-* in the marketing section) ─ */

/* ── Checkout page (/billing/checkout) ────────────────────────────────────── */
.ck-page {
  background: #0a0a0a;
  color: #e5e5e5;
  min-height: 100vh;
  padding: 2rem 2rem 4rem;
}
.ck-back {
  display: inline-block;
  font-size: 0.88rem; color: #999; text-decoration: none;
  margin-bottom: 2rem;
  transition: color 120ms ease;
}
.ck-back:hover { color: #fff; }
.ck-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 3rem;
  align-items: start;
  max-width: 1100px; margin: 0 auto;
}
.ck-form-col {
  min-height: 480px;
}
#checkout-mount {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ck-summary {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  position: sticky; top: 2rem;
}
.ck-summary-name {
  font-family: var(--font);
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.025em;
  color: #fff; margin: 0 0 0.5rem;
}
.ck-summary-logo {
  display: block;
  height: 34px; width: auto; max-width: 100%;
}
.ck-summary-tagline {
  font-size: 0.95rem; color: #aaa; line-height: 1.55;
  margin: 0 0 1.5rem;
}

.ck-summary-features {
  list-style: none; padding: 0; margin: 0 0 1.75rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.ck-summary-features li {
  padding-left: 1.75rem; position: relative;
  font-size: 0.9rem; color: #e5e5e5; line-height: 1.5;
}
.ck-summary-features li::before {
  content: ""; position: absolute; left: 0; top: 0.3rem;
  width: 16px; height: 16px;
  background-color: var(--good);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6 11.5L2.5 8l1-1L6 9.5l6.5-6.5 1 1z'/></svg>") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6 11.5L2.5 8l1-1L6 9.5l6.5-6.5 1 1z'/></svg>") no-repeat center / contain;
}

.ck-summary-trust {
  display: flex; gap: 1.5rem; margin-bottom: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #2a2a2a;
}
.ck-trust-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: #888; font-weight: 500;
}
.ck-trust-item svg { color: var(--good); flex-shrink: 0; }

.ck-summary-legal {
  font-size: 0.75rem; color: #666; line-height: 1.55;
  margin: 0;
}
.ck-summary-legal a {
  color: #999; text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 820px) {
  .ck-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ck-summary { position: static; order: -1; }
}

.notice {
  max-width: 540px; margin: 1.5rem auto 0;
  background: var(--bg-tint); border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  color: var(--fg-soft); font-size: 0.92rem;
}
.notice.warn { background: var(--bad-soft); border-color: #fecaca; color: var(--high-fg); }

/* ── Loading + error ─────────────────────────────────────────────────────── */
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  flex-shrink: 0; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { text-align: center; padding: 3rem 1rem 4rem; position: relative; overflow: hidden; }
/* Keep the real loading copy above the decorative liquid-glass orb. */
.loading-state > *:not(.lg-orb) { position: relative; z-index: 1; }

/* Liquid-glass orb: an animated multi-color gradient (the refracted "content")
   under a drifting glass lens built by the vendored engine. Ambient only. */
.lg-orb {
  position: absolute;
  top: -120px; left: 50%;
  width: 300px; height: 300px;
  margin-left: -150px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
  filter: saturate(1.05);
}
.lg-orb-visual {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(60% 60% at 30% 28%, #8fb6ff 0%, transparent 60%),
    radial-gradient(55% 55% at 76% 35%, #c89bff 0%, transparent 62%),
    radial-gradient(60% 60% at 62% 78%, #7be8d0 0%, transparent 60%),
    conic-gradient(from 210deg at 50% 50%, #6b8df0, #2c5fe6, #9b7bff, #2c5fe6, #6b8df0);
  animation: lgOrbSpin 22s linear infinite;
}
@keyframes lgOrbSpin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .lg-orb-visual { animation: none; }
}
.loading-state h1 { margin: 0 0 0.15rem; font-size: 1.5rem; }
.loading-head {
  display: block; max-width: 560px; margin: 0 auto;
  text-align: center;
}
.error-state h1 { margin-top: 0; }

/* Progress bar — CSS-animated over 30s, JS syncs the percentage label. */
.progress-wrap {
  margin: 1.25rem auto 0; max-width: 560px;
}
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.4rem; font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.progress-pct { font-weight: 700; color: var(--fg); }
.progress-picks { color: var(--muted); }
.progress-track {
  width: 100%; height: 10px; border-radius: 999px;
  background: var(--bg-soft); overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, white));
  width: 0%;
  animation: progressFill 30s cubic-bezier(.15,.8,.35,1) forwards;
}
.progress-fill.done {
  animation: none;
  width: 100%;
  transition: width 400ms ease;
}
@keyframes progressFill { to { width: 95%; } }
.progress-track::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(255,255,255,0.15));
  border-radius: 999px; pointer-events: none;
}

/* Cycling status phrases — JS adds .on to one <span> at a time. */
.status-rotate {
  position: relative;
  height: 1.4em;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.6rem auto 0;
  max-width: 560px;
}
.status-rotate span {
  position: absolute; inset: 0;
  text-align: center;
  opacity: 0; transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-rotate span::after {
  content: "\2026"; margin-left: 0.05em;
}
.status-rotate span.on {
  opacity: 1; transform: translateY(0);
}

/* Scrolling feed of classified mentions — shows multiple cards at once,
   newest at top, older cards push down. */
.analyzing-stream {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
  margin: 1.5rem auto 0; max-width: 560px;
  max-height: 380px; overflow-y: hidden;
  text-align: left;
}
.mini-tweet {
  display: flex; gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  animation: cardSlideIn 350ms ease both;
  flex-shrink: 0;
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mini-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line);
  object-fit: cover; background: var(--bg-soft);
}
.mini-body { flex: 1; min-width: 0; }
.mini-head {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--muted);
}
.mini-head strong { color: var(--fg); font-weight: 600; }
.mini-dot { color: var(--muted-soft); }
.mini-pill {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem; border-radius: 999px;
  background: var(--bg-soft); color: var(--fg-soft);
}
.mini-ticker {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 0;
  background: var(--bg-tint); color: var(--accent);
}
.mini-pill-bullish { background: var(--low-bg); color: var(--low-fg); }
.mini-pill-bearish { background: var(--high-bg); color: var(--high-fg); }
.mini-pill-neutral { background: var(--bg-soft); color: var(--muted); }
.mini-text {
  margin: 0.3rem 0 0;
  color: var(--fg-soft);
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 2rem; color: var(--muted);
}
.empty-state h2 { margin: 0 0 0.5rem; color: var(--fg); }
/* Inline variant: sits between the stock chart/stats and the options-flow
   intelligence as a quiet note, not a full-page takeover. */
.empty-state--inline {
  text-align: left; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
}
.empty-state--inline h2 { font-size: 1.05rem; }
.empty-state--inline p { margin: 0; max-width: 60ch; }
.empty-state code {
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em;
}

/* ── Ticker explorer (profile body) ──────────────────────────────────────── */
.ticker-explorer {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}
.ticker-sidebar {
  position: sticky; top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  box-shadow: var(--shadow-sm);
}
.ticker-sidebar h2 {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin: 0.25rem 0.75rem 0.75rem; font-weight: 600;
}
.ticker-sidebar ul { list-style: none; padding: 0; margin: 0; }
.ticker-sidebar li { margin: 0; }
.ticker-sidebar li a {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.55rem 0.75rem; border-radius: 8px;
  color: var(--fg); text-decoration: none;
  border-left: 3px solid transparent;
}
.ticker-sidebar li a:hover { background: var(--bg-soft); text-decoration: none; }
.ticker-sidebar li.active a {
  background: var(--bg-soft);
  border-left-color: var(--line-strong);
}
.ticker-sidebar .ticker { font-weight: 600; }
.ticker-sidebar .ticker-row-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.5rem;
}
.ticker-sidebar .sidebar-ago {
  font-size: 0.7rem; color: var(--muted-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.ticker-sidebar li.active .sidebar-ago { color: var(--fg-soft); }
.ticker-sidebar .sidebar-meta {
  font-size: 0.8rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ticker-sidebar li.hide { display: none; }

.sidebar-search {
  padding: 0 0.5rem 0.6rem;
}
.sidebar-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  outline: none;
  transition: border-color 80ms ease, background-color 80ms ease;
}
.sidebar-search input::placeholder { color: var(--muted-soft); }
.sidebar-search input:focus {
  border-color: var(--accent);
  background: var(--surface);
}
/* Native search-input clear button — show in WebKit only; default browser
   chrome is fine. */
.sidebar-search input::-webkit-search-cancel-button { cursor: pointer; }
.sidebar-empty {
  margin: 0.5rem 0.75rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.sidebar-empty.hide { display: none; }

.ticker-panel {
  padding: 1.5rem 1.75rem;
  min-width: 0;  /* lets the inner canvas shrink in the grid */
}
.ticker-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.ticker-panel-id h2 {
  margin: 0 0 0.25rem; font-size: 1.6rem; letter-spacing: -0.01em;
}
.ticker-panel-id .meta { color: var(--muted); margin: 0; }
.metric-strip {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.metric-cell {
  display: flex; flex-direction: column; align-items: flex-end;
  text-align: right;
}
.metric-cell label {
  font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}
.metric-cell span {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.metric-cell small { color: var(--muted); font-size: 0.8rem; }

.chart-wrap {
  position: relative;
  height: 360px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
}
.chart-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.95rem;
  pointer-events: none;
}
/* Ticker hero chart: left-to-right shimmer while /history JSON loads. */
.chart-overlay--loading {
  align-items: stretch; justify-content: stretch;
  padding: 0;
}
.skel-chart--hero {
  display: block; width: 100%; height: 100%;
  border-radius: 10px;
}

/* Robinhood-style "live" price dot at the end of the 1D line. JS positions it
   at the last point and sets --live-dot-color to match the line. */
.live-dot {
  position: absolute; z-index: 3; pointer-events: none;
  width: 0; height: 0;
  --live-dot-color: var(--accent);
}
.live-dot-core, .live-dot-ring {
  position: absolute; top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.live-dot-core {
  width: 9px; height: 9px;
  background: var(--live-dot-color);
  box-shadow: 0 0 0 2px var(--surface);
}
.live-dot-ring {
  width: 9px; height: 9px;
  background: var(--live-dot-color);
  opacity: 0.65;
  animation: live-dot-pulse 1.6s ease-out infinite;
}
@keyframes live-dot-pulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.55; }
  70%  { transform: translate(-50%, -50%) scale(3.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(3.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot-ring { animation: none; opacity: 0; }
}

.marker-legend {
  display: flex; gap: 1.25rem; align-items: center;
  list-style: none; padding: 0; margin: 1rem 0 0;
  font-size: 0.85rem; color: var(--muted);
}
.marker-legend li.dot {
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.marker-legend li.dot::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  display: inline-block;
}
.dot-bullish::before { background: var(--good); }
.dot-bearish::before { background: var(--bad); }
.dot-neutral::before { background: var(--muted-soft); }

/* Tweet-card tooltip — shown on chart-marker hover */
.tweet-card-tooltip {
  position: absolute;
  z-index: 9999;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1rem 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 90ms ease;
  font-family: var(--font);
  font-size: 0.92rem;
  line-height: 1.45;
}
.tcc-head {
  display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.55rem;
}
.tcc-profile-link {
  display: flex; align-items: center; gap: 0.65rem;
  flex: 1; min-width: 0;
  color: inherit; text-decoration: none;
}
.tcc-profile-link:hover .tcc-id strong { color: var(--accent); }
.tcc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; background: var(--bg-soft); flex-shrink: 0;
  border: 1px solid var(--line);
}
.tcc-id {
  display: flex; flex-direction: column; min-width: 0; flex: 1;
}
.tcc-id strong { color: var(--fg); font-weight: 600; font-size: 0.95rem; }
.tcc-id time { color: var(--muted); font-size: 0.78rem; }
.tcc-pill {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.18rem 0.55rem; border-radius: 999px;
  flex-shrink: 0;
}
.tcc-bullish { background: var(--low-bg); color: var(--low-fg); }
.tcc-bearish { background: var(--high-bg); color: var(--high-fg); }
.tcc-body {
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--fg);
}
.tcc-foot {
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
  padding-top: 0.55rem; border-top: 1px solid var(--line);
  font-size: 0.85rem; font-variant-numeric: tabular-nums;
}
.tcc-meta { color: var(--muted); }
.tcc-link { margin-left: auto; color: var(--accent); font-weight: 600; }
.tcc-link:hover { text-decoration: underline; }

/* Compact price readout — shown while scrubbing the price line (Robinhood-style) */
.tweet-card-tooltip--price {
  width: auto;
  min-width: 0;
  padding: 0.45rem 0.7rem;
  pointer-events: none;
}
.tcc-price { display: flex; flex-direction: column; gap: 0.1rem; }
.tcc-price-value {
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  line-height: 1.2;
}
.tcc-price-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Tweet list under the chart */
.tweet-list { margin-top: 2rem; }
.tweet-list h3 {
  font-size: 1.05rem; margin: 0 0 0.85rem;
  color: var(--fg);
}
.tweet-list ol { list-style: none; padding: 0; margin: 0; }

.tweet-row {
  display: flex; gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.65rem;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.tweet-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.tweet-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--bg-soft);
}
.tweet-body {
  flex: 1;
  min-width: 0;  /* allows long lines / URLs to wrap inside the flex child */
}
.tweet-row-head {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.tweet-author {
  color: var(--fg);
  font-weight: 600;
  font-size: 0.95rem;
}
.tweet-dot {
  color: var(--muted-soft);
}
.tweet-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tweet-sentiment {
  margin-left: auto;
  text-transform: uppercase;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem; border-radius: 999px;
}
.tweet-row.tweet-bullish .tweet-sentiment { background: var(--low-bg); color: var(--low-fg); }
.tweet-row.tweet-bearish .tweet-sentiment { background: var(--high-bg); color: var(--high-fg); }
.tweet-row.tweet-neutral .tweet-sentiment { background: var(--bg-tint); color: var(--accent); }

.tweet-text {
  margin: 0.45rem 0 0.65rem;
  color: var(--fg);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}
.tweet-row-foot {
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.tweet-meta { color: var(--muted); }
/* "Now $X" price value — directional color (red down / grey flat / green up)
   vs the entry/post price, tabular figures so digits don't jitter. */
.tweet-price-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.tweet-price-val.pct-pos { color: var(--good); }
.tweet-price-val.pct-neg { color: var(--bad); }
.tweet-price-val.pct-zero { color: var(--muted); }
.tweet-link {
  margin-left: auto;
  font-size: 0.85rem; color: var(--accent); font-weight: 600;
}

@media (max-width: 720px) {
  .ticker-explorer { grid-template-columns: 1fr; }
  .ticker-sidebar { position: static; max-height: 240px; }
  .ticker-panel { padding: 1.1rem 1.1rem; }
  .ticker-panel-head { flex-direction: column; gap: 0.75rem; }
  .metric-strip { gap: 1rem; }
  .metric-cell { align-items: flex-start; text-align: left; }
  .chart-wrap { height: 280px; }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav a:not(.btn) { padding: 0.45rem 0.6rem; font-size: 0.9rem; }
  .hero { padding: 3rem 0 2rem; }
  .metric-grid, .bests { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .avatar { width: 72px; height: 72px; }
  .leaderboard th, .leaderboard td { padding: 0.7rem 0.6rem; }
  /* Legacy public-leaderboard mobile trim. Scoped OFF the Most Bought matrix
     (.sentiment-matrix) AND the Latest Trades feed (.trades-feed) — those
     tables have their own mobile handling (horizontal scroll + sticky header)
     and these positional nth-child hides would blank arbitrary headers
     (Win rate / Entry) while leaving their body cells, shifting every column
     label one cell to the left. */
  .leaderboard:not(.sentiment-matrix):not(.trades-feed):not(.uw-mini-table) .col-tickers,
  .leaderboard:not(.sentiment-matrix):not(.trades-feed):not(.uw-mini-table) th:nth-child(3),
  .leaderboard:not(.sentiment-matrix):not(.trades-feed):not(.uw-mini-table) .col-num:nth-child(6),
  .leaderboard:not(.sentiment-matrix):not(.trades-feed):not(.uw-mini-table) th:nth-child(6) { display: none; }

  /* Tweet cards on a 375-414px phone — tighter padding, smaller avatar,
     and a flex-wrap on the row head so the sentiment pill drops to a new
     line instead of getting cropped past the right edge. */
  .tweet-row { gap: 0.6rem; padding: 0.75rem 0.85rem; }
  .tweet-avatar { width: 36px; height: 36px; }
  .avatar-wrap.tweet-avatar { font-size: 36px; }
  .tweet-row-head {
    flex-wrap: wrap;
    row-gap: 0.25rem;
    font-size: 0.85rem;
  }
  .tweet-date { white-space: nowrap; }
  .tweet-sentiment {
    /* Stop the pill being margin-left:auto'd off the right edge — let it
       wrap onto its own line on small screens. */
    margin-left: 0;
    order: 4;
    flex-basis: 100%;
    align-self: flex-start;
    width: max-content;
  }
  .tweet-text { font-size: 0.95rem; }
  .tweet-row-foot {
    gap: 0.5rem; font-size: 0.8rem;
    padding-top: 0.55rem;
  }
  .tweet-link { margin-left: 0; flex-basis: 100%; }
}

/* Narrow phones (≤480px): hide text nav links, keep only the primary CTA
   so the header stays a single clean row. */
@media (max-width: 480px) {
  .site-header-inner {
    padding: 0.7rem 1rem;
  }
  .nav a:not(.btn),
  .nav .nav-account,
  .nav .nav-logout-form { display: none; }
  .container { padding: 0 1rem; }
}

/* ── Homepage: stats strip ───────────────────────────────────────────────── */
.stats-strip {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem;
}
.stat-tile {
  display: flex; flex-direction: column; gap: 0.25rem;
  text-align: left;
}
.stat-tile .stat-num {
  font-family: "Inter Tight", var(--font);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700; letter-spacing: -0.01em;
  color: var(--fg); line-height: 1;
}
.stat-tile .stat-label {
  font-size: 0.85rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Homepage: smart-money spotlight ─────────────────────────────────────── */
.spotlight-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.spotlight-card {
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  color: inherit; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.spotlight-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.spot-eyebrow {
  font-size: 0.75rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.spotlight-card h3 {
  font-size: 1.15rem; line-height: 1.3; margin: 0;
  letter-spacing: -0.005em; color: var(--fg);
}
.spot-hero {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.spot-hero-meta {
  display: flex; flex-direction: column; gap: 0.2rem;
}
.spot-handle { font-weight: 600; color: var(--fg); }
.spot-pct {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem; color: var(--muted);
}
.spot-cta {
  margin-top: auto; color: var(--accent); font-weight: 600;
  font-size: 0.9rem;
}

/* ── Homepage: feature grid ──────────────────────────────────────────────── */
.feature-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.feature-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem; color: var(--muted);
  letter-spacing: 0.05em;
}
.feature h3 {
  margin: 0; font-size: 1.05rem; color: var(--fg);
  letter-spacing: -0.005em;
}
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ── Homepage: versus grid (FinTwit vs Trueearnings) ────────────────────────── */
.versus-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.versus-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.versus-card h3 {
  margin: 0 0 0.85rem; font-size: 1.1rem; color: var(--fg);
}
.versus-card ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.versus-card li {
  position: relative; padding-left: 1.55rem;
  color: var(--fg-soft); font-size: 0.95rem; line-height: 1.45;
}
.versus-card li::before {
  position: absolute; left: 0; top: 0;
  width: 1.15rem; height: 1.15rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.versus-bad li::before {
  content: "×"; color: var(--bad);
  background: var(--bad-soft);
}
.versus-good li::before {
  content: "✓"; color: var(--good);
  background: var(--good-soft);
}
.versus-good { border-color: var(--good); }

/* ── Homepage: FAQ ───────────────────────────────────────────────────────── */
.faq-list {
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 780px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600; font-size: 1rem; color: var(--fg);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+";
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.1rem; color: var(--muted);
  transition: transform 150ms ease;
}
.faq-item[open] > summary::after { content: "−"; }
.faq-item[open] > summary { border-bottom: 1px solid var(--line); }
.faq-body {
  padding: 0.9rem 1.25rem 1.1rem;
  color: var(--fg-soft); font-size: 0.95rem; line-height: 1.55;
}
.faq-body p { margin: 0; }
.faq-body code {
  background: var(--bg-soft); border-radius: 4px;
  padding: 0.05rem 0.35rem; font-size: 0.9em;
}

/* ── Homepage: bottom CTA band ───────────────────────────────────────────── */
.cta-band {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 3.5rem 0;
}
.cta-inner {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr; align-items: center;
}
.cta-inner h2 {
  margin: 0 0 0.35rem; font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.01em; color: var(--fg);
}
.cta-inner .muted { margin: 0; }
.cta-form { margin: 0; max-width: 540px; }
@media (min-width: 820px) {
  .cta-inner { grid-template-columns: 1fr auto; gap: 2.5rem; }
}

/* ── Site footer ─────────────────────────────────────────────────────────────
   Editorial four-column footer with a giant "FOLLOW THE SMART MONEY"
   watermark that fades into the page bottom. Colors flow from theme tokens
   so light/dark both work without overrides.
   ────────────────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.92rem;
  overflow: hidden;  /* clip the watermark's bleed */
  position: relative;
}
.site-footer-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 4rem 1.5rem 0;
}

/* — Top: brand + link columns ———————————————————————————————————————— */
.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand-block {
  display: flex; flex-direction: column; gap: 1rem;
  max-width: 22rem;
}
.footer-brand {
  display: inline-flex; align-items: center;
  text-decoration: none;
  padding: 0.25rem 0;
}
.footer-brand:hover { text-decoration: none; opacity: 0.85; }
.footer-brand .brand-logo--lg { height: 1.85rem; }
.footer-brand-name {
  font-family: "Inter Tight", var(--font);
}
.footer-tagline {
  margin: 0;
  font-family: "Inter Tight", var(--font);
  font-size: 1.15rem; line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--fg); font-weight: 600;
}
.footer-tagline .muted {
  display: block; font-weight: 400; font-size: 0.98rem;
  color: var(--muted); letter-spacing: 0;
}
.footer-social {
  display: inline-flex; align-items: center; gap: 0.5rem;
  align-self: flex-start;
  padding: 0.45rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg-soft); font-size: 0.88rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: color 100ms ease, border-color 100ms ease, background-color 100ms ease;
}
.footer-social:hover {
  color: var(--fg); border-color: var(--fg);
  text-decoration: none; background: var(--surface);
}
.footer-social svg { display: block; opacity: 0.9; }

/* — Link columns —————————————————————————————————————————————————— */
.footer-col {
  display: flex; flex-direction: column; gap: 0.85rem;
}
.footer-col-h {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin: 0; font-weight: 500;
}
.footer-col ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.footer-col a,
.footer-inline-button {
  color: var(--fg-soft);
  font-size: 0.94rem;
  text-decoration: none;
  transition: color 80ms ease;
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.94rem;
  text-align: left;
}
.footer-col a:hover,
.footer-inline-button:hover {
  color: var(--accent); text-decoration: none;
}
.footer-inline-form { margin: 0; }

/* — Giant watermark ——————————————————————————————————————————————— */
.footer-watermark {
  display: block;
  font-family: "Inter Tight", var(--font);
  font-size: clamp(3rem, 13vw, 10.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.88;
  text-align: center;
  white-space: nowrap;
  margin: 2.5rem 0 -1.5rem;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--fg) 14%, transparent) 0%,
    color-mix(in srgb, var(--fg) 4%, transparent) 55%,
    transparent 95%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  user-select: none; pointer-events: none;
}

/* — Bottom strip: regulatory disclosure ——————————————————————————— */
.footer-bottom {
  position: relative; z-index: 1;
  padding: 1.75rem 0 2.25rem;
  border-top: 1px solid var(--line);
}
.footer-disclosure {
  display: flex; flex-direction: column; gap: 0.85rem;
  font-size: 0.78rem; line-height: 1.65;
  color: var(--muted);
}
.footer-disclosure p { margin: 0; }
.footer-disclosure strong {
  color: var(--fg-soft); font-weight: 600;
}
.footer-disclosure a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.footer-disclosure a:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

/* — Responsive ————————————————————————————————————————————————————— */
@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 2rem;
  }
  .footer-brand-block { grid-column: 1 / -1; }
  .footer-watermark { margin: 1.5rem 0 -0.75rem; }
  .footer-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .site-footer-inner { padding: 3rem 1.25rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand-block { max-width: none; }
}

/* ── Legal pages (privacy + terms) ───────────────────────────────────────── */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 0 4rem;
  color: var(--fg-soft);
  font-size: 1rem; line-height: 1.65;
}
.legal-head { margin-bottom: 2rem; }
.legal-kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 0.5rem;
}
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.02em; margin: 0 0 0.5rem;
  color: var(--fg); font-weight: 700;
}
.legal-effective {
  margin: 0 0 1.5rem; color: var(--muted); font-size: 0.92rem;
}
.legal-intro { color: var(--fg-soft); margin: 0; }
.legal-section { margin-top: 2.2rem; }
.legal-section h2 {
  font-size: 1.25rem; margin: 0 0 0.75rem;
  color: var(--fg); letter-spacing: -0.005em;
}
.legal-section h3 {
  font-size: 1rem; margin: 1.1rem 0 0.4rem;
  color: var(--fg); font-weight: 600;
}
.legal-section p { margin: 0 0 0.85rem; }
.legal-section ul {
  margin: 0 0 0.85rem; padding-left: 1.25rem;
}
.legal-section li { margin-bottom: 0.4rem; }
.legal-callout {
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
}
.legal-callout-warn {
  border-left-color: var(--bad);
  background: var(--bad-soft);
}
.legal-callout-warn h2 { color: var(--bad); }
.legal-footnote {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.88rem;
}

/* ── Nav additions: account chip + logout form ───────────────────────────── */
.nav-account {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.85rem; border-radius: 8px;
  font-size: 0.94rem; font-weight: 500;
  color: var(--fg-soft);
}
.nav-account:hover { background: var(--bg-soft); text-decoration: none; color: var(--fg); }
.nav-account-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--good); display: inline-block;
}
.nav-logout-form { margin: 0; display: inline; }
.nav-logout-form button { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

/* ── Auth pages (signup, login) ──────────────────────────────────────────── */
.auth-shell {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 2rem 1rem;
  background: var(--bg-soft);
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.auth-head { margin-bottom: 1.75rem; text-align: center; }
.auth-brand {
  display: flex; justify-content: center;
  margin: 0 0 1.25rem;
}
.auth-brand .site-brand-inline { display: inline-flex; align-items: center; }
.auth-brand .brand-logo--lg { height: 1.85rem; }
.auth-kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 0.4rem;
}
.auth-head h1 {
  font-size: 1.35rem;
  letter-spacing: -0.01em; font-weight: 700;
  margin: 0 0 0.35rem; color: var(--fg);
}
.auth-sub { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.auth-form {
  display: flex; flex-direction: column; gap: 0.75rem;
}
.auth-field {
  display: flex; flex-direction: column; gap: 0.3rem;
}
.auth-label {
  font-size: 0.82rem; font-weight: 500; color: var(--fg);
}
.auth-field input[type="date"] {
  padding: 0.7rem 0.9rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg);
  font: inherit; font-size: 1rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.auth-field input[type="date"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-hint { font-size: 0.82rem; color: var(--muted); margin: 0; }
.auth-error {
  background: var(--bad-soft); color: var(--bad-fg, var(--bad));
  border: 1px solid var(--bad);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem; font-size: 0.88rem;
  margin: 0;
}
.auth-success {
  background: #f0fdf4; color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem; font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}
.auth-hint {
  color: var(--muted); font-size: 0.82rem; margin: 0;
}
.auth-input {
  width: 100%;
  padding: 0.65rem 0.85rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--fg);
  font: inherit; font-size: 0.95rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-input::placeholder { color: var(--muted); opacity: 0.5; }
.btn-auth-email {
  width: 100%;
  padding: 0.7rem 1rem; font-size: 0.95rem; font-weight: 600;
  border-radius: var(--radius) !important;
  margin-top: 0.35rem;
}
.auth-form .btn-auth-email.btn-ghost {
  padding: 0.55rem 1rem; font-size: 0.88rem;
  margin-top: 0;
  border-radius: var(--radius) !important;
}
#email-form .auth-field { margin-bottom: 0.75rem; }
.auth-tos {
  margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--muted);
  line-height: 1.45; text-align: center;
}
.auth-tos a { color: var(--muted); text-decoration: underline; }
.auth-tos a:hover { color: var(--fg); }
.auth-alt {
  margin: 1.5rem 0 0; text-align: center;
  color: var(--muted); font-size: 0.93rem;
}

/* ── Account page meta list ──────────────────────────────────────────────── */
.account-meta {
  margin: 0; display: grid; gap: 0.5rem 1rem;
  grid-template-columns: max-content 1fr;
  font-size: 0.95rem;
}
.account-meta dt {
  color: var(--muted); font-weight: 500;
}
.account-meta dd {
  margin: 0; color: var(--fg); font-variant-numeric: tabular-nums;
}

/* ── Homepage: locked preview cards (blur tease) ─────────────────────────── */
.preview-card-locked {
  position: relative;
}
.locked-value {
  display: inline-block;
  filter: blur(7px);
  color: var(--fg);
  user-select: none;
  letter-spacing: 0.02em;
  transition: filter 200ms ease;
}
.preview-card-locked:hover .locked-value { filter: blur(9px); }
.locked-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  border: 1px solid var(--line);
  color: var(--fg-soft);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.locked-pill svg { opacity: 0.85; }

/* ── Homepage: horizontal scrolling strip ────────────────────────────────── */
.scroll-section { padding-bottom: 3.5rem; }
.scroll-strip {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(1.5rem, calc((100vw - 1120px) / 2));
  padding: 1rem max(1.5rem, calc((100vw - 1120px) / 2)) 1.5rem;
  /* Hide scrollbar on macOS-style trackpads; keep functional. */
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  /* Soft fade on left + right edges to hint at more content. */
  -webkit-mask-image: linear-gradient(90deg,
    transparent 0,
    #000 32px,
    #000 calc(100% - 32px),
    transparent 100%);
          mask-image: linear-gradient(90deg,
    transparent 0,
    #000 32px,
    #000 calc(100% - 32px),
    transparent 100%);
}
.scroll-strip::-webkit-scrollbar { height: 6px; }
.scroll-strip::-webkit-scrollbar-thumb {
  background: var(--line-strong); border-radius: 3px;
}
.scroll-strip::-webkit-scrollbar-track { background: transparent; }
.strip-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  color: inherit; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.strip-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.strip-card-head {
  display: flex; align-items: center; gap: 0.6rem;
}
.strip-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; background: var(--line);
  flex-shrink: 0;
}
.strip-meta {
  display: flex; flex-direction: column; gap: 0.1rem;
  min-width: 0;
}
.strip-handle {
  font-weight: 600; font-size: 0.95rem; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.strip-rank {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem; letter-spacing: 0.05em;
  color: var(--muted); text-transform: uppercase;
}
.strip-stats {
  display: flex; align-items: baseline; gap: 0.45rem;
  padding-top: 0.6rem; border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.strip-ytd {
  font-family: "Inter Tight", var(--font);
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--fg);
}
.strip-ytd-label {
  font-size: 0.7rem; color: var(--muted); font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.strip-card .pct-pos { color: var(--good); }
.strip-card .pct-neg { color: var(--bad); }
.strip-card .strip-ytd .pct {
  /* Inherit when wrapped in <span class="pct ..."> */
  color: inherit;
}

/* ── Avatar with first-letter fallback ───────────────────────────────────
   unavatar.io is rate-limited by X and occasionally 404s. The macro emits
   a span.avatar-wrap[data-letter] with the <img> inside; img.onerror
   removes the img, exposing the CSS-rendered initial underneath. Sizes
   and border-radius are still owned by the per-context class
   (.avatar / .row-avatar / .pc-avatar / .tweet-avatar / .strip-avatar /
   .mini-avatar). Source order matters: this block follows the per-context
   rules so the gradient + letter win over their flat backgrounds. */
.avatar-wrap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #6b8df0, #2c5fe6);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  user-select: none;
}
.avatar-wrap::before {
  content: attr(data-letter);
  font-size: 0.42em;
  line-height: 1;
  text-align: center;
}
/* Leaderboard row monogram: pin the initial to a flex-centered overlay filling
   the fixed 28px circle so it sits dead-center (the bare in-flow glyph rode a
   hair high off the baseline), and bump it to ~half the circle so it reads
   clearly. Scoped to `.row-avatar` because it always has an explicit box; the
   global `::before` stays in normal flow so unsized wraps still size off it. */
.avatar-wrap.row-avatar::before {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5em;
  line-height: 1;
}
.avatar-wrap > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 1;
}
/* Letter size in absolute px so 88px wrappers get a 36px "M" and 28px
   leaderboard rows get an 11px one. (`::before { font-size: 0.42em }`
   above scales off these values.) */
.avatar-wrap.avatar        { font-size: 88px; }
.avatar-wrap.tweet-avatar  { font-size: 44px; }
.avatar-wrap.strip-avatar  { font-size: 40px; }
.avatar-wrap.pc-avatar     { font-size: 36px; }
.avatar-wrap.tcc-avatar    { font-size: 36px; }
.avatar-wrap.mini-avatar   { font-size: 32px; }
.avatar-wrap.row-avatar    { font-size: 28px; }
/* Leaderboard row monograms render as a black letter on a bright green tile
   (the "no logo found" fallback) rather than the blue gradient. Fixed colors
   (not theme tokens) so the green/black pairing stays consistent in dark mode.
   The <img>, when it loads, still covers this via `.avatar-wrap > img`. */
.avatar-wrap.row-avatar {
  background: #10FF33;
  color: #0b1220;
}
/* Brand-favicon avatars (firm/analyst logos) are square icons with transparent
   padding, so the dark monogram background shows through them. Back ONLY the
   <img> with a white tile (object-fit: contain so the mark isn't cropped) — the
   wrap keeps its monogram bg, so if the favicon fails the `onload` guard and the
   <img> is removed, the letter fallback still renders correctly. */
.avatar-wrap--logo > img {
  background: #fff;
  object-fit: contain;
  padding: 2px;
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Safety net (flag-independent): the per-source `logo_is_favicon` flag that
   adds `--logo` above isn't always present (merged "All" board, older cached
   snapshots), so a logo avatar can miss that treatment and render a transparent
   favicon straight over the green monogram tile — showing green THROUGH the
   logo, or the letter doubled BEHIND it. Whenever a leaderboard avatar actually
   contains an <img>, drop the monogram tile to a neutral white backing and hide
   the letter so nothing bleeds through. If the <img> errors and is removed,
   `:has()` flips off and the green-letter fallback returns automatically.
   (Opaque profile photos are object-fit:cover and simply hide the white tile.) */
.avatar-wrap.row-avatar:has(> img) { background: #fff; }
.avatar-wrap.row-avatar:has(> img)::before { content: ""; }
/* Google-s2 brand favicons are square marks with transparent padding — contain
   them on the white tile (+ a hairline) so they sit cleanly and aren't cropped
   even when the `--logo` flag was missed. */
.avatar-wrap.row-avatar > img[src*="s2/favicons"] {
  object-fit: contain;
  padding: 2px;
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ── Footer: theme-toggle row ────────────────────────────────────────────── */
.footer-theme-row {
  display: flex; justify-content: flex-end;
  margin-bottom: 1.1rem;
}
.footer-theme-row .theme-toggle {
  width: auto; height: auto;
  padding: 0.4rem 0.85rem 0.4rem 0.65rem;
  gap: 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-soft);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.footer-theme-row .theme-toggle:hover {
  color: var(--fg); border-color: var(--fg);
}
.theme-toggle-label { line-height: 1; }

/* ── Ticker page (reverse-lookup) ────────────────────────────────────────── */
.ticker-head {
  padding: 3.5rem 0 1.5rem;
  text-align: left;
}
.ticker-head .ticker-kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem; letter-spacing: 0.12em;
  color: var(--muted); margin: 0 0 0.5rem;
}
.ticker-head h1 {
  font-family: "Inter Tight", var(--font);
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em; font-weight: 800;
  margin: 0 0 0.75rem; color: var(--fg);
  line-height: 1;
}
.ticker-head .ticker-sub {
  margin: 0 0 0.5rem;
  font-size: 1rem; color: var(--fg-soft);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
}
.ticker-head .ticker-sub strong { color: var(--fg); }
.ticker-head .ticker-prose {
  margin: 1rem 0 0;
  font-size: 1rem; line-height: 1.6; color: var(--fg-soft);
  max-width: 70ch;
}
.ticker-head .ticker-prose strong { color: var(--fg); }
.ticker-foot {
  margin: 1.5rem 0 0;
  font-size: 0.82rem; color: var(--muted);
}

/* — Sentiment pill (also used by the per-creator stance column) ——————— */
.pill {
  display: inline-flex; align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.02em;
}
.pill-good {
  background: var(--good-soft); color: var(--good);
}
.pill-bad {
  background: var(--bad-soft); color: var(--bad);
}
.pill-neutral {
  background: var(--bg-soft); color: var(--muted);
  border: 1px solid var(--line);
}

/* — Inline creator chip used in tables ——————————————————————————— */
.row-creator {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--fg); text-decoration: none;
  font-weight: 500;
}
.row-creator:hover { color: var(--accent); text-decoration: none; }

/* Ticker title becomes a discreet link to /tickers/{T}. Inherits the h2
   color so it doesn't read as a "hot" link, only on hover. */
.ticker-panel-id h2 a.ticker-link {
  color: inherit;
  text-decoration: none;
}
.ticker-panel-id h2 a.ticker-link:hover {
  color: var(--accent);
  text-decoration: none;
}
.all-callers-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.all-callers-link:hover { text-decoration: underline; }

/* ── App shell (/app/*) ────────────────────────────────────────────────────
   Nansen-style data-dense dashboard. Persistent 220px sidebar + main panel
   with a top-bar (search + actions) and tight screener tables. Reuses the
   existing color tokens — only the LAYOUT rules + density changes here.   */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  background: var(--bg-soft);
}
.app-sidebar {
  position: sticky; top: 0;
  align-self: start;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 0.85rem 0.7rem 0.85rem;
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  font-size: 0.9rem;
}
.app-brand {
  display: flex; align-items: center;
  padding: 0.5rem 0.25rem 1rem;
  width: 100%;
  box-sizing: border-box;
}
.app-brand:hover { text-decoration: none; opacity: 0.85; }
.app-brand .brand-logo--sidebar {
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
  object-position: left center;
}

/* Section label between nav groups: "MAIN", "ACCOUNT" etc. */
.app-nav-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--muted-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.7rem 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.app-nav-soon {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  white-space: nowrap;
}

.app-nav {
  display: flex; flex-direction: column; gap: 0.1rem;
}
/* Flat row: icon + label inline. No nested rows, no subtitle column —
   the previous grid layout collapsed "Log in" into two stacked lines
   for items without an icon. */
.app-nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 7px;
  color: var(--fg-soft);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 36px;  /* keeps icon-less rows the same height */
}
.app-nav-item svg {
  flex-shrink: 0; color: var(--muted);
  width: 16px; height: 16px;
}
.app-nav-item:hover {
  background: var(--bg-soft); text-decoration: none; color: var(--fg);
}
.app-nav-item:hover svg { color: var(--fg-soft); }
.app-nav-item.active {
  background: var(--bg-tint);
  color: var(--fg);
  border-left-color: var(--fg);
  font-weight: 600;
}
.app-nav-item.active svg { color: var(--fg-soft); }
.app-nav-item--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}
.app-nav-item--disabled:hover {
  background: transparent;
  color: var(--fg-soft);
}
.app-nav-item--disabled:hover svg { color: var(--muted); }

.app-sidebar-divider {
  height: 1px; background: var(--line);
  margin: 0.6rem 0.5rem;
}

.app-sidebar-spacer { flex: 1; }  /* push secondary nav to the bottom */

.app-nav-secondary {
  display: flex; flex-direction: column; gap: 0.1rem;
}

/* Floating collapse toggle — a circular button straddling the sidebar's right
   edge. Fixed to the viewport so the scrolling sidebar can't clip it; its
   `left` tracks the sidebar/content boundary (220px expanded, 64px collapsed). */
.app-sidebar-toggle {
  position: fixed; z-index: 60;
  top: 74px; left: 207px;  /* 220px sidebar − 13px (half button) */
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.14);
  color: var(--muted); cursor: pointer; font-family: inherit;
  transition: left 0.16s ease, background 0.12s ease, color 0.12s ease,
              box-shadow 0.12s ease;
}
.app-sidebar-toggle svg { width: 14px; height: 14px; }
.app-sidebar-toggle:hover {
  background: var(--bg-soft); color: var(--fg);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

/* Brand-logo source glyphs (X/Reddit/StockTwits) render in their real brand
   colors in the sidebar nav — a splash of brand identity that helps the
   Channels list scan faster. The generic line glyphs (Hedge Funds, Analysts,
   Options Flow, Congress, Insiders) stay nav-state colored. */
.app-nav-item img.src-icon {
  width: 18px; height: 18px; border-radius: 4px; object-fit: cover;
  filter: none; opacity: 1;
}
/* X = brand black/white (track the foreground), Reddit = brand orange. Listed
   across every nav state so they keep their color even when active/hovered
   (where the line glyphs flip to the accent). */
.app-nav-item .src-logo--x,
.app-nav-item:hover .src-logo--x,
.app-nav-item.active .src-logo--x { color: var(--fg); }
.app-nav-item .src-logo--reddit,
.app-nav-item:hover .src-logo--reddit,
.app-nav-item.active .src-logo--reddit { color: #ff4500; }

/* ── Collapsed (icon-only) sidebar — desktop only ───────────────────── */
@media (min-width: 841px) {
  .app-shell.app-sidebar-collapsed { grid-template-columns: 64px 1fr; }
  .app-sidebar-collapsed .app-sidebar { padding-left: 0.4rem; padding-right: 0.4rem; }
  .app-sidebar-collapsed .app-sidebar-toggle { left: 51px; }  /* 64px − 13px */
  .app-sidebar-collapsed .app-sidebar-toggle svg { transform: rotate(180deg); }
  .app-sidebar-collapsed .app-nav-item {
    justify-content: center; gap: 0; padding-left: 0; padding-right: 0;
    border-left-width: 0;
  }
  .app-sidebar-collapsed .app-nav-item > span,
  .app-sidebar-collapsed .app-nav-label,
  .app-sidebar-collapsed .app-brand { display: none; }
  .app-sidebar-collapsed .app-nav-item.active {
    border-left-width: 0;
    box-shadow: inset 0 0 0 1.5px var(--line-strong);
  }
}

/* Mobile quick tabs + drawer — hidden on desktop */
.app-mobile-tabbar { display: none; }
.app-menu-backdrop { display: none; }

/* Desktop: the drawer is just the sidebar content, no transforms */
.app-sidebar-drawer {
  display: flex; flex-direction: column; flex: 1;
  min-height: 0;
}

/* ── Main content panel ──────────────────────────────────────────────── */
.app-main {
  min-width: 0;  /* lets tables shrink in the grid */
  display: flex; flex-direction: column;
}

/* Sticky top-bar — page title on the left, search + actions on the right.
   Sits above the scroll content; gives the screener a real product
   shell instead of floating naked under a giant title. */
.app-topbar {
  /* z-index must beat the mobile sticky .sentiment-matrix-head (7) or the
     "Latest Trades + Filters" band paints THROUGH the search dropdown —
     the dropdown's own z-index:100 is trapped inside this stacking context. */
  position: sticky; top: 0; z-index: 9;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}
/* Search → ticker navigation: server can take a few seconds on cold symbols. */
html.ot-nav-pending { cursor: wait; }
html.ot-nav-pending .app-shell {
  opacity: 0.92;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.app-topbar-search {
  flex: 1 1 auto;
  min-width: 0;                 /* allow it to condense around the inline CTA */
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-left: auto;
  position: relative;
}
.app-topbar-search input {
  flex: 1; border: none; background: transparent;
  font: inherit; font-size: 0.88rem; color: var(--fg);
  outline: none;
}
.app-topbar-search input::placeholder { color: var(--muted-soft); }
.app-topbar-search svg { color: var(--muted); width: 14px; height: 14px; flex-shrink: 0; }

.search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 4px; border-radius: 8px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 100; overflow: hidden;
}
.search-dropdown:empty { display: none; }
.search-result {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  color: var(--fg); text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.1s;
}
.search-result:hover { background: var(--bg-soft); }
.search-result-row { display: flex; align-items: center; }
.search-result-row:hover { background: var(--bg-soft); }
.search-result-row .search-result { flex: 1 1 auto; min-width: 0; }
.search-result-row .search-result:hover { background: transparent; }
.search-add-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 0.25rem;
  margin-right: 0.6rem; padding: 0.32rem 0.62rem 0.32rem 0.48rem;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 0.78rem; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, background 0.12s, box-shadow 0.12s;
}
/* Override the blanket `.app-topbar-search svg { color: var(--muted) }` rule
   that would otherwise grey out the plus to near-invisible. */
.search-add-btn svg { width: 14px; height: 14px; color: var(--accent-fg); }
.search-add-btn:hover { background: var(--accent-deep); box-shadow: var(--shadow); }
.search-add-btn:active { transform: scale(0.96); }
.search-add-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-add-btn.is-added { background: var(--accent-deep); box-shadow: none; }
/* Added pill: green check + "Added" by default; swaps to a red "Remove" on
   hover/focus so the same control both confirms membership and removes. */
.search-add-btn.is-added .sab-ico-x,
.search-add-btn.is-added .sab-txt-remove { display: none; }
.search-add-btn.is-added .sab-ico-check,
.search-add-btn.is-added .sab-txt-added { display: inline; }
.search-add-btn.is-added:hover,
.search-add-btn.is-added:focus-visible {
  background: var(--bad, #dc2626);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.38);
}
.search-add-btn.is-added:hover .sab-ico-check,
.search-add-btn.is-added:hover .sab-txt-added,
.search-add-btn.is-added:focus-visible .sab-ico-check,
.search-add-btn.is-added:focus-visible .sab-txt-added { display: none; }
.search-add-btn.is-added:hover .sab-ico-x,
.search-add-btn.is-added:hover .sab-txt-remove,
.search-add-btn.is-added:focus-visible .sab-ico-x,
.search-add-btn.is-added:focus-visible .sab-txt-remove { display: inline; }
.search-add-btn:disabled { cursor: default; opacity: 0.7; }
@media (prefers-reduced-motion: reduce) {
  .search-add-btn:active { transform: none; }
}
.search-result-icon { font-size: 0.9rem; flex-shrink: 0; }
.search-result-img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.search-result-label { font-weight: 600; min-width: 0; }
.search-result-sublabel { margin-left: 0.4rem; font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.search-result--cta .search-result-sublabel { color: var(--accent); font-weight: 600; }
.search-result-cta-action {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.search-result-meta { margin-left: auto; font-size: 0.75rem; color: var(--muted); }
.search-empty { padding: 0.75rem; font-size: 0.82rem; color: var(--muted); text-align: center; }
.search-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.75rem;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.search-section-clear {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent);
}
.search-section-clear:hover { text-decoration: underline; }
.app-topbar-actions { display: flex; align-items: center; gap: 0.5rem; }
/* Portfolio on mobile: Account lives in the topbar (sidebar Account is hidden). */
.app-topbar-account { display: none; align-items: center; gap: 0.35rem; }
.app-topbar-account svg { width: 16px; height: 16px; flex-shrink: 0; }

.app-content {
  padding: 1.25rem 1.5rem 3rem;
}

/* Page head — denser than before. Title is meaningful but doesn't
   dominate the viewport with empty space. */
.app-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.app-page-head h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.015em; font-weight: 700;
  line-height: 1.15;
}
.app-page-head .meta {
  color: var(--muted); margin: 0.25rem 0 0;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.app-page-head-actions {
  display: flex; gap: 0.4rem; flex-shrink: 0;
}
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; font-weight: 600; }

/* Ticker-index filter input — paired with the page-head actions slot */
.ticker-filter-input {
  padding: 0.45rem 0.85rem;
  font: inherit; font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--fg);
  outline: none;
  min-width: 220px;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.ticker-filter-input::placeholder { color: var(--muted-soft); }
.ticker-filter-input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

/* In-shell filter tabs */
.filter-tabs-app {
  display: flex; gap: 0.3rem; flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.filter-tabs-app a {
  padding: 0.4rem 0.85rem; border-radius: 7px;
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.filter-tabs-app a:hover {
  color: var(--fg); text-decoration: none;
  background: var(--bg-soft);
}
.filter-tabs-app a.active {
  color: var(--fg); background: var(--bg-tint);
  border-color: transparent;
}

/* ── Screener — dense data table ─────────────────────────────────────── */
.screener-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* `clip` clips overflow to the rounded box exactly like `hidden` did, but —
     unlike `hidden` — it does NOT establish a scroll container. That's what
     lets the sticky `thead th` below resolve against the page/viewport instead
     of getting pinned to this card's own top (which is why the sticky header
     used to overlap the first row and was disabled). */
  overflow: clip;
  box-shadow: var(--shadow-sm);
}
.screener-wrap .leaderboard {
  font-size: 0.875rem;
}
/* Tighter rows than the marketing leaderboard. The header is opaque so rows
   never bleed through when it sticks (sticky behavior is the desktop block at
   the bottom of this file — see ".screener-wrap .leaderboard thead th" under
   the min-width:841px media query). */
.screener-wrap .leaderboard thead th {
  background: var(--bg-soft);
  font-size: 0.7rem;
  padding: 0.55rem 0.85rem;
}
.screener-wrap .leaderboard td {
  padding: 0.6rem 0.85rem;
  font-variant-numeric: tabular-nums;
}
.screener-wrap .leaderboard tbody tr {
  transition: background-color 120ms ease;
}
.screener-wrap .leaderboard tbody tr:hover { background: var(--bg-tint); }

/* Section header (title + optional description) sitting directly inside a
   screener card — entity/tracker profile pages. The table or chart below
   carries its own internal padding, so the header is padded to match instead
   of hugging the card's top-left corner (which read as a cramped, misaligned
   gap). Also gives `.section-title` a controlled size in place of the oversized
   browser-default <h2>. */
.screener-wrap > .section-title {
  margin: 0;
  padding: 1.1rem 1.25rem 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.screener-wrap > .tracker-perf-head {
  padding: 1.1rem 1.25rem 0.6rem;
  margin-bottom: 0;
}
.screener-wrap > .tracker-perf-head .section-title {
  padding: 0;
}
/* When a description follows the title, tuck it close and let it own the
   bottom gap before the table/chart. */
.screener-wrap > .meta {
  margin: -0.35rem 0 0;
  padding: 0 1.25rem 0.9rem;
  color: var(--muted);
}

.screener-table .col-ticker { min-width: 8rem; }
.screener-table .col-num { font-feature-settings: "tnum"; font-weight: 600; }
.screener-table .col-sentiment { min-width: 8.5rem; width: 10.5rem; }
.screener-table .col-chg7d { min-width: 5rem; }
.screener-table .col-mcap { min-width: 6.5rem; }
.screener-table .col-pe { min-width: 4.5rem; }
.screener-table .col-since { min-width: 5.5rem; white-space: nowrap; }
.screener-table .col-pickers { min-width: 14rem; }
.screener-table .col-pick { max-width: 260px; }
.screener-row { cursor: pointer; }
.screener-table td { padding-top: 0.5rem; padding-bottom: 0.5rem; vertical-align: middle; }
.screener-table .picker-chip-row { flex-wrap: nowrap; overflow: hidden; }

/* Ticker cell — logo + symbol with monospace styling for $TICKER */
.ticker-link {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--fg); font-weight: 700; font-size: 0.92rem;
  font-family: "JetBrains Mono", "Fira Mono", "SF Mono", Menlo, monospace;
  letter-spacing: -0.01em;
}
.ticker-link:hover { color: var(--accent); text-decoration: none; }
.ticker-link .ticker-logo {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); object-fit: cover; background: var(--bg-soft);
  margin: 0;
}
.ticker-link .ticker-logo-wrap {
  width: 22px; height: 22px;
  border: 1px solid var(--line);
}
.ticker-link .ticker-logo-wrap::before {
  font-size: 0.6rem;
}

/* Sentiment bar — wider, with always-visible labels */
.sentiment-cell {
  display: flex; flex-direction: column; gap: 0.3rem;
  min-width: 11rem;
}
.sentiment-bar {
  display: flex; height: 5px; border-radius: 999px; overflow: hidden;
  background: var(--bg-soft);
}
.sentiment-bar-lg { height: 8px; margin-bottom: 0.5rem; }
.sentiment-bar-bull { background: var(--good); }
.sentiment-bar-bear { background: var(--bad); }
.sentiment-bar-label {
  display: inline-flex; gap: 0.45rem; align-items: center;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Sentiment gauge — bull/bear take on the Smart Bets consensus gauge.
   Reuses .consensus-gauge / .gauge-track / .gauge-dot (defined with the
   sports table) and swaps the win/lose fills for green/red bull/bear. */
.sentiment-gauge-cell { gap: 0.32rem; }
.sentiment-gauge { max-width: 150px; }

/* Smart Investors column — overlapping avatar stack of the smart-money pickers
   covering a ticker. Each avatar gets a sentiment-coded ring. When falling back
   to the broader picker set (no smart-money call yet) the stack is dimmed. */
.smart-avatars { display: inline-flex; align-items: center; }
.smart-avatar {
  display: inline-block; margin-left: -8px; border-radius: 50%;
  transition: transform 0.12s ease, z-index 0s;
}
.smart-avatar:first-child { margin-left: 0; }
.smart-avatar:hover { transform: translateY(-2px) scale(1.08); z-index: 2; }
.smart-avatar .pc-avatar {
  width: 28px; height: 28px; font-size: 28px;
  border: 2px solid var(--surface); border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.smart-avatar--bullish .pc-avatar { border-color: var(--good); }
.smart-avatar--bearish .pc-avatar { border-color: var(--bad); }
.sentiment-gauge-label {
  font-size: 0.78rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: baseline; gap: 0.3rem;
}
.sentiment-gauge-count { font-size: 0.7rem; font-weight: 500; color: var(--muted); }
.gauge-fill--bull {
  height: 100%; background: var(--good);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gauge-fill--bear {
  height: 100%; background: var(--bad);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gauge-team--bull { color: var(--good); width: 26px; }
.gauge-team--bear { color: var(--bad); width: 26px; }
/* Extra breathing room between the gauge track and the BEAR label (scoped to
   the sentiment gauge so the sports consensus gauge is unaffected). */
.sentiment-gauge .gauge-team--bear { margin-left: 8px; }

/* Picker chips — compact, clickable, sentiment-coded border accent */
.picker-chip-row {
  display: flex; gap: 0.3rem; flex-wrap: wrap;
}
.picker-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.2rem 0.55rem 0.2rem 0.25rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 500;
  color: var(--fg-soft);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.picker-chip:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--fg);
  text-decoration: none;
}
.picker-chip .chip-avatar {
  width: 18px; height: 18px; font-size: 9px;
  border-radius: 50%;
}
.picker-chip-bullish { border-color: var(--good-soft); }
.picker-chip-bearish { border-color: var(--bad-soft); }
.chip-handle { line-height: 1; }

/* Smart-money leaderboard inside the app shell — same density treatment */
.app-content .leaderboard-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* `clip` (not `hidden`) so this card is NOT a scroll container and the
     sticky `thead th` resolves against the page — see the sticky-header block
     further down. Clips to the rounded box exactly like `hidden`. */
  overflow: clip;
  box-shadow: var(--shadow-sm);
}
.app-content .leaderboard {
  font-size: 0.875rem;
}
.app-content .leaderboard thead th {
  background: var(--bg-soft);
  font-size: 0.7rem;
  padding: 0.55rem 0.85rem;
}
.app-content .leaderboard td {
  padding: 0.6rem 0.85rem;
}
.app-content .leaderboard tbody tr {
  transition: background-color 120ms ease;
}
.app-content .leaderboard tbody tr:hover { background: var(--bg-tint); }

/* Ticker drill-down (/app/tickers/{ticker}) */
.ticker-detail-head {
  display: flex; align-items: center; gap: 1rem;
}
.ticker-detail-logo {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--line); object-fit: cover; background: var(--bg-soft);
}
.ticker-detail-head h1 { margin: 0; }
.ticker-detail-head-body { flex: 1 1 auto; min-width: 0; }
.ticker-detail-name {
  margin: 0.15rem 0 0; color: var(--muted); font-size: 0.95rem; font-weight: 500;
}
.ticker-price-hero { text-align: left; flex: 0 0 auto; }
.ticker-price-hero-value {
  font-size: 2.8rem; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
/* Robinhood-style rolling-digit price. Each numeric character is a fixed-height
   window onto a stacked 0–9 strip; a live update translateY-rolls the strip to
   the new digit. Non-digit chars ($ . ,) sit static between the reels. A brief
   color flash on the whole value cues that it just ticked. */
/* Aligned by flex box-edges, NOT text baselines: each reel and separator is the
   same integer-pixel-tall box, flex-end aligned, and its glyph is vertically
   centered inside that box via line-height == box height. This sidesteps the
   per-reel baseline rounding that made overflow:hidden inline-blocks land a
   hair off after a roll. */
.ticker-price-hero-value.odo {
  display: inline-flex; align-items: flex-end; line-height: 1; white-space: nowrap;
}
.ticker-price-hero-value .odo-digit {
  display: block; flex: 0 0 auto; overflow: hidden; height: var(--odo-h, 1em);
}
.ticker-price-hero-value .odo-strip {
  display: block;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ticker-price-hero-value .odo-strip > span {
  display: block; height: var(--odo-h, 1em); line-height: var(--odo-h, 1em);
  text-align: center;
}
.ticker-price-hero-value .odo-sep {
  display: block; flex: 0 0 auto; height: var(--odo-h, 1em);
  line-height: var(--odo-h, 1em); text-align: center;
}
.ticker-price-hero-value.odo-noanim .odo-strip { transition: none; }
.ticker-price-hero-value.odo-flash { animation: odoFlash 0.6s ease-out; }
@keyframes odoFlash {
  0% { color: var(--accent); }
  100% { color: inherit; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-price-hero-value .odo-strip { transition: none; }
  .ticker-price-hero-value.odo-flash { animation: none; }
}

/* Rolling-digit odometer reused across the Most Bought matrix — price, 24h
   change, mention counts, velocity, and the consensus % all roll their digits
   with the same slot-machine roll + accent flash as the stock-page hero,
   scaled to the table cell (height pinned to an integer px via --odo-h).
   Generic `.odo` selector so any numeric cell can opt in. */
.odo {
  display: inline-flex; align-items: flex-end; line-height: 1; white-space: nowrap;
  /* Center the reel box on the text midline instead of its synthesized flex
     baseline (= the box's bottom edge). The reel box is shorter than the line
     of text it replaces, so baseline alignment let it drift up/down a few px
     vs the row's other content once the real mono font loaded; middle
     alignment is height-independent and stays consistent across rows. */
  vertical-align: middle;
}
.odo .odo-digit {
  display: block; flex: 0 0 auto; overflow: hidden; height: var(--odo-h, 1em);
}
.odo .odo-strip {
  display: block;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.odo .odo-strip > span {
  display: block; height: var(--odo-h, 1em); line-height: var(--odo-h, 1em);
  text-align: center;
}
/* `pre` keeps separator whitespace (e.g. the space in "56% bullish") from
   collapsing when each non-digit char is rendered in its own flex box. */
.odo .odo-sep {
  display: block; flex: 0 0 auto; height: var(--odo-h, 1em);
  line-height: var(--odo-h, 1em); text-align: center; white-space: pre;
}
.odo.odo-noanim .odo-strip { transition: none; }
.odo.odo-flash { animation: odoFlash 0.6s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .odo .odo-strip { transition: none; }
  .odo.odo-flash { animation: none; }
}
.ticker-price-hero-change {
  font-size: 0.95rem; font-weight: 600; margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}
.ticker-price-hero-change.pct-pos { color: var(--good); }
.ticker-price-hero-change.pct-neg { color: var(--bad); }
.ticker-price-hero-change.pct-zero { color: var(--muted); }
.ticker-price-hero-foot {
  font-size: 0.75rem; color: var(--muted); font-weight: 500; margin-left: 0.4rem;
}

/* Robinhood-style hero: chart (2/3) + sentiment doughnut (1/3) */
.ticker-hero-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 1rem;
  margin-bottom: 1.5rem;
}
/* No tracked calls → no sentiment card; the chart takes the full width so
   the hero doesn't render a lopsided 2-col grid with an empty right column. */
.ticker-hero-grid--solo { grid-template-columns: 1fr; }
.chart-card-head { margin-bottom: 0.75rem; }

.ticker-sentiment-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.25rem 1.5rem;
  /* Subtle blue tint (not off-white) plus an accent border + soft halo ring so
     the Smart Money card reads as a distinct, highlighted element next to the
     plain white cards around it. */
  background: var(--bg-tint);
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm);
}
.ticker-sentiment-title {
  align-self: flex-start; margin: 0 0 0.5rem; font-size: 1.15rem;
}
.sentiment-pie-wrap {
  position: relative; width: 100%; max-width: 220px;
  aspect-ratio: 1 / 1; margin: 0.5rem auto 1rem;
}
.sentiment-pie-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
  line-height: 1.1;
}
.sentiment-pie-pct {
  font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em;
}
.sentiment-pie-word {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  text-transform: lowercase;
}
.sentiment-pie-legend {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  font-size: 0.85rem; font-weight: 600;
}
.sentiment-pie-legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.legend-dot--bull { background: var(--good); }
.legend-dot--bear { background: var(--bad); }
.sentiment-pie-foot {
  width: 100%; margin-top: auto; padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between;
}
.sentiment-pie-foot-label { font-size: 0.8rem; color: var(--muted); }
.sentiment-pie-foot-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Smart-money consensus verdict + coverage stats (fills the card) */
.sentiment-consensus { width: 100%; text-align: center; margin-bottom: 1rem; }
.consensus-label {
  display: block; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); font-weight: 600;
  margin-bottom: 0.4rem;
}
.consensus-verdict {
  display: inline-block; padding: 0.32rem 0.85rem; border-radius: 999px;
  font-weight: 700; font-size: 0.98rem; line-height: 1.1;
}
.consensus-verdict--bull { background: var(--good-soft); color: var(--good); }
.consensus-verdict--bear { background: var(--bad-soft); color: var(--bad); }
.consensus-verdict--mixed {
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
}
.consensus-sub {
  display: block; margin-top: 0.5rem; font-size: 0.8rem; color: var(--muted);
}
.sentiment-stats { width: 100%; margin: 0 0 0.25rem; }
.sentiment-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.85rem;
}
.sentiment-stat dt { margin: 0; color: var(--muted); }
.sentiment-stat dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Per-source sentiment bars — same directional pressure bar as the Most Bought
   matrix (.mx-bar/.mx-bar-fill), stacked vertically with a label + dominant %. */
/* Hero consensus: a distinct headline block (big dominant % + direction word)
   over a full-width proportional bar, set apart from the per-source rows by a
   hairline divider. The card title already says "Smart Money Sentiment", so the
   old "Smart-money consensus" sub-label is dropped — show the number, not a
   redundant label. */
.sentiment-consensus--hero {
  width: 100%; text-align: left; margin: 0 0 1.25rem;
  padding-bottom: 1.1rem; border-bottom: 1px solid var(--line);
}
.consensus-headline {
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
}
.consensus-pct {
  font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.consensus-word {
  font-size: 1rem; font-weight: 600; text-transform: lowercase;
}
.consensus-bar { display: block; width: 100%; margin-top: 0.7rem; height: 10px; }
.consensus-bar .mx-bar-fill { height: 100%; }
.sentiment-source-bars {
  list-style: none; padding: 0; margin: 0 0 1rem; width: 100%;
  display: flex; flex-direction: column; gap: 0.85rem;
  /* Grow to fill the card's remaining height (the chart card next to it is
     taller) and spread the rows evenly so there's no dead white space at the
     bottom. gap acts as the minimum row spacing. */
  flex: 1 1 auto; justify-content: space-between;
}
.ssb-row {
  display: grid; grid-template-columns: 84px 1fr 62px;
  align-items: center; gap: 0.6rem;
}
/* Rows that map to a detail section below act as jump links: pointer cursor,
   a hover tint that bleeds slightly past the grid so the affordance reads, and
   a chevron hint appended after the value. */
.ssb-row--link {
  cursor: pointer;
  border-radius: 10px;
  /* Enlarge the hit target well beyond the bar itself: pull the row out to the
     card padding on both sides and pad generously top/bottom. Negative margins
     are offset by equal padding so layout/alignment is unchanged. */
  margin: -0.42rem -0.85rem; padding: 0.42rem 0.85rem;
  transition: background 0.12s ease;
}
.ssb-row--link:hover,
.ssb-row--link:focus-visible {
  background: var(--accent-soft);
  outline: none;
}
.ssb-bar .mx-bar, .ssb-bar .mx-bar-fill { height: 10px; }

/* Smart Money card: loading skeleton (cold off-universe ticker, on-demand
   source fetch still in flight) + empty + social-feed loading states. */
.sentiment-loading { width: 100%; display: flex; flex-direction: column; gap: 0.85rem; flex: 1 1 auto; }
.sentiment-loading-head {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 600; color: var(--fg-soft);
}
.sentiment-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; flex: none;
}
.sentiment-source-bars--skeleton { margin-top: 0.2rem; }
.ssb-row--skeleton { opacity: 0.7; }
.skel {
  display: block; border-radius: 6px;
  /* NOTE: the theme token is --line, not --border (an invalid var() makes the
     whole gradient compute to none and the skeleton renders invisible). */
  background: linear-gradient(90deg, var(--line) 25%, var(--bg-soft) 37%, var(--line) 63%);
  background-size: 400% 100%; animation: skelShimmer 1.4s ease infinite;
}
.skel-label { width: 60px; height: 12px; }
.skel-bar { width: 100%; height: 10px; border-radius: 999px; }
.skel-val { width: 48px; height: 12px; margin-left: auto; }
@keyframes skelShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
/* Unknown metric in a Latest Trades cell — left-to-right shimmer instead of "--". */
.skel-cell {
  display: inline-block; width: 52px; height: 12px;
  border-radius: 6px; vertical-align: middle;
}
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
/* Social / intel loading shells — reuse .skel shimmer, no spinners. */
.social-loading-section { min-height: 0; display: block; }
.ticker-social-section--skeleton { pointer-events: none; }
.social-col-sentiment--skeleton {
  display: flex; flex-direction: column; gap: 0.55rem;
  margin: 0.35rem 0 0.85rem;
}
.social-consensus-skeleton {
  display: flex; align-items: baseline; gap: 0.45rem;
}
.skel-social-icon { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.skel-social-title { width: 148px; height: 18px; }
.skel-social-pct { width: 52px; height: 1.6rem; border-radius: 8px; }
.skel-social-word { width: 64px; height: 1rem; border-radius: 6px; }
.skel-social-bar { width: 100%; height: 10px; border-radius: 999px; }
.tweet-row--skeleton {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.social-feed--skeleton > li:last-child .tweet-row--skeleton { border-bottom: none; }
.skel-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.tweet-body--skeleton {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.45rem;
  min-width: 0; padding-top: 0.15rem;
}
.skel-line { width: 100%; height: 12px; }
.skel-line--meta { width: 42%; height: 11px; }
.skel-line--short { width: 68%; }
.sentiment-consensus--skeleton {
  display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 0.15rem;
}
.uw-intel-skeleton { display: flex; flex-direction: column; gap: 1.5rem; margin: 1rem 0; }
.uw-intel-skeleton-block { display: flex; flex-direction: column; gap: 0.85rem; }
.skel-section-title { width: 168px; height: 18px; border-radius: 6px; }
.uw-trends-grid--skeleton { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; }
.uw-trend-card--skeleton {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.skel-chart { width: 100%; height: 180px; border-radius: 10px; }
.skel-earnings { width: 100%; height: 220px; border-radius: 10px; }
.skel-table { width: 100%; height: 140px; border-radius: 10px; }
@media (max-width: 900px) {
  .uw-trends-grid--skeleton { grid-template-columns: 1fr; }
}
.sentiment-empty {
  width: 100%; color: var(--fg-soft); font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex: 1 1 auto; text-align: center; padding: 1.5rem 0;
}
.social-loading {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--fg-soft); font-size: 0.85rem; padding: 1rem 0;
}
.uw-intel-loading {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--fg-soft); font-size: 0.9rem;
  padding: 1.5rem; margin: 1rem 0;
  border: 1px solid var(--border); border-radius: 14px; background: var(--card);
}
.uw-intel-empty {
  color: var(--fg-soft); font-size: 0.85rem;
  padding: 1.25rem; margin: 1rem 0;
  border: 1px dashed var(--border); border-radius: 14px; text-align: center;
}
.ssb-label {
  font-size: 0.82rem; font-weight: 600; color: var(--fg-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center;
}
/* Brand sources (X / StockTwits) render their logo tile instead of a text
   label, matching the stocks matrix header. No off-white tile background — the
   X tile keeps its black brand square, StockTwits sits on the card directly. */
.ssb-label .src-tile {
  width: 22px; height: 22px; border-radius: 6px;
  background: transparent; border: none;
}
.ssb-label .src-tile--x { background: #000; }
.ssb-label .src-icon { width: 16px; height: 16px; }
.ssb-label .src-tile--x .src-icon { width: 100%; height: 100%; padding: 4px; }
.ssb-bar { display: flex; align-items: center; width: 100%; }
.ssb-val {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600;
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}

@media (max-width: 900px) {
  .ticker-hero-grid { grid-template-columns: 1fr; }
  .sentiment-pie-wrap { max-width: 200px; }
}

/* Range selector sits below the chart, Robinhood-style */
.ticker-detail-chart .chart-range-row { margin: 0.9rem 0 0; }
.chart-range-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem 1rem;
}
.chart-range-tabs {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0;
}
.chart-legend--avwap {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.78rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; cursor: help;
  border-radius: 6px;
  outline: none;
}
.chart-legend--avwap[hidden] { display: none; }
.chart-legend--avwap:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--earnings-avwap, var(--chart-line, #2563eb));
}
.chart-legend-swatch {
  width: 20px; height: 2px; border-radius: 1px; flex-shrink: 0;
  background: var(--earnings-avwap, var(--chart-line, #2563eb));
}
.chart-legend-tip {
  position: absolute; right: 0; bottom: calc(100% + 0.55rem);
  z-index: 12; width: max-content; max-width: min(288px, calc(100vw - 2rem));
  padding: 0.65rem 0.75rem;
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 0.76rem; font-weight: 500; line-height: 1.45;
  text-align: left; white-space: normal;
  pointer-events: none; opacity: 0; visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}
.chart-legend--avwap:hover .chart-legend-tip,
.chart-legend--avwap:focus .chart-legend-tip,
.chart-legend--avwap:focus-within .chart-legend-tip {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.chart-legend-tip-title {
  display: block; font-weight: 700; color: var(--fg);
  margin-bottom: 0.35rem; font-size: 0.8rem;
}
.chart-legend-tip-lead {
  margin: 0; color: var(--fg-soft);
}
.chart-range-tab {
  appearance: none; border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--muted); font: inherit; font-size: 0.78rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: 999px; cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.chart-range-tab:hover { color: var(--text); border-color: var(--line-strong); }
.chart-range-tab.is-active {
  background: var(--fg); border-color: var(--fg); color: var(--bg);
}

/* Key-stats grid (high-level company metrics) */
.ticker-stats { margin-bottom: 1.5rem; }
.ticker-stats h2 { margin: 0 0 1rem; font-size: 1.15rem; }
/* Flat, borderless grid that matches the About facts grid exactly — no card
   box / rounded corners / interior gridlines; spacing comes from the grid gap
   so the two sections read as one consistent treatment on the flat page. */
.ticker-stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1rem 1.25rem; margin: 0;
}
.ticker-stat { padding: 0; }
.ticker-stat dt {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 600; margin: 0 0 0.25rem;
}
.ticker-stat .stat-icon {
  width: 15px; height: 15px; flex: 0 0 auto;
  color: inherit; opacity: 0.65;
}
.ticker-stat dd {
  margin: 0; font-size: 0.95rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ticker-stats-foot {
  margin: 0.85rem 0 0; font-size: 0.75rem; color: var(--muted);
}
/* Match the About facts' 2-column mobile reflow so both grids stay in sync. */
@media (max-width: 720px) {
  .ticker-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* About / company description card (Robinhood-style) */
.ticker-about { margin-bottom: 1.5rem; }
.ticker-about h2 { margin: 0 0 0.85rem; font-size: 1.15rem; }
.about-summary { margin-bottom: 1.1rem; }
.about-text {
  margin: 0; color: var(--fg); line-height: 1.6; font-size: 0.95rem;
}
.about-summary[data-collapsed="true"] .about-text {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.about-toggle {
  appearance: none; border: none; background: none; padding: 0;
  margin-top: 0.4rem; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 0.9rem; font-weight: 600;
}
.about-toggle:hover { text-decoration: underline; color: var(--fg); }
.about-facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem 1.25rem; margin: 0;
  padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.about-fact dt {
  font-size: 0.72rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 600; margin: 0 0 0.25rem;
}
.about-fact dd {
  margin: 0; font-size: 0.95rem; font-weight: 600; word-break: break-word;
}
.about-fact dd a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); }
@media (max-width: 720px) {
  .about-facts { grid-template-columns: repeat(2, 1fr); }
}

.ticker-detail-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}
.metric-sentiment { display: flex; flex-direction: column; }
.sentiment-hero {
  display: flex; align-items: baseline; gap: 0.35rem;
  margin: 0.5rem 0 0.75rem; line-height: 1;
}
.sentiment-hero .sentiment-hero-pct {
  font-size: 2rem; font-weight: 700; letter-spacing: -0.02em;
}
.sentiment-hero-word {
  font-size: 0.95rem; font-weight: 600; text-transform: lowercase;
}
.sentiment-hero-word--bullish { color: var(--good); }
.sentiment-hero-word--bearish { color: var(--bad); }
.sentiment-tug-track {
  display: flex; height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--bg-soft);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
  margin-bottom: 0.75rem;
}
.sentiment-tug-bull {
  background: linear-gradient(90deg, var(--good-soft), var(--good));
}
.sentiment-tug-bear {
  background: linear-gradient(90deg, var(--bad), var(--bad-soft));
}
.sentiment-tug-counts {
  display: flex; justify-content: space-between; gap: 0.5rem;
}
.sentiment-tug-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.55rem; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sentiment-tug-chip--bull { background: var(--good-soft); color: var(--good); }
.sentiment-tug-chip--bear { background: var(--bad-soft); color: var(--bad); }
.sentiment-tug-arrow { font-size: 0.85em; opacity: 0.85; line-height: 1; }
.ticker-detail-chart { margin-bottom: 1.5rem; padding: 1.25rem 1.5rem; }

/* ── Robinhood-flat ticker page ─────────────────────────────────────────────
   The /app/tickers/{T} page reads as one continuous white surface (à la
   Robinhood): the content panel is pure white, every section drops its card
   chrome (border / shadow / fill / box-radius), and blocks are separated by
   whitespace + a single hairline rule rather than nested boxes. Scoped to the
   ticker page via :has(.ticker-detail-head) so other /app/* pages keep cards. */

/* 1. Pure-white content panel — no off-white tint behind the page. */
.app-main:has(.ticker-detail-head) { background: var(--bg); }

/* 2. Strip card chrome from every section card + nested data card / table box. */
.app-content:has(.ticker-detail-head) .card,
.app-content:has(.ticker-detail-head) .screener-wrap {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.ticker-detail-chart .chart-wrap {
  background: transparent;
  border: none;
  padding: 0;
  height: 340px;
  position: relative;
}
@media (max-width: 640px) { .ticker-detail-chart .chart-wrap { height: 260px; } }

/* 3. Section rhythm: one hairline divider + even vertical space between blocks,
      flush to the panel edge (no side padding) for the full-width RH look. */
.app-content:has(.ticker-detail-head) > .ticker-detail-chart { margin: 0 0 1.75rem; padding: 0; }
.app-content:has(.ticker-detail-head) > .ticker-about,
.app-content:has(.ticker-detail-head) > .ticker-stats,
.app-content:has(.ticker-detail-head) > .ticker-detail-pickers,
.app-content:has(.ticker-detail-head) > .ticker-detail-similar,
.app-content:has(.ticker-detail-head) > .ticker-detail-calls,
.app-content:has(.ticker-detail-head) .ticker-section {
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 1.75rem 0;
}
/* The price chart is the lead block — no divider rule above it. */
.app-content:has(.ticker-detail-head) .ticker-detail-chart.ticker-section {
  border-top: none;
  padding-top: 0;
}
.ticker-smart-money-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ticker-smart-money-stack > .ticker-sentiment-card {
  margin-bottom: 0;
}

/* ── Redesigned ticker page: uniform standalone sections ────────────────────
   Trading activity = three same-size graph panels (2-up on desktop), each its
   own self-contained block. Social = two stacked standalone sections. */
.uw-trends-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}
/* Re-add light panel chrome so each side-by-side graph reads as standalone
   (the page otherwise strips card chrome for the flat look). */
.app-content:has(.ticker-detail-head) .uw-trend-card.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.uw-trend-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.75rem;
}
.uw-trend-card-head h2 { font-size: 1.02rem; margin: 0; letter-spacing: -0.01em; }
.uw-trend-sub {
  margin: 0.15rem 0 0; font-size: 0.72rem; font-weight: 500;
  color: var(--muted); letter-spacing: 0.01em;
}
.uw-trend-card .uw-trend-chart-wrap { height: 220px; position: relative; }
.uw-trend-card .uw-trend-toggle { margin-top: 0.6rem; }

/* Per-ticker earnings card (full-width above the trends grid). */
:root {
  --earnings-est: rgba(22, 163, 74, 0.42);
  --earnings-est-border: rgba(22, 163, 74, 0.88);
}
.uw-earnings-card {
  margin-bottom: 1rem;
  --ot-earnings-dot: 14px;
  --ot-earnings-dot-border: 2px;
}
.uw-earnings-chart-wrap {
  height: 220px; position: relative; overflow: hidden;
  padding: 0 0.5rem 0 0.35rem;
}
.uw-earnings-card .uw-earnings-legend--est::before,
.uw-earnings-card .uw-earnings-legend--act::before,
.uw-earnings-card .uw-earnings-dot {
  width: var(--ot-earnings-dot);
  height: var(--ot-earnings-dot);
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
}
.uw-earnings-card .uw-earnings-legend--est::before,
.uw-earnings-card .uw-earnings-legend--act::before {
  content: '';
  display: inline-block;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.uw-earnings-card .uw-earnings-legend--est::before,
.uw-earnings-card .uw-earnings-dot--est {
  background: var(--earnings-est);
  border: var(--ot-earnings-dot-border) solid var(--earnings-est-border);
}
.uw-earnings-card .uw-earnings-legend--act::before,
.uw-earnings-card .uw-earnings-dot--act {
  background: var(--good, #16a34a);
  border: var(--ot-earnings-dot-border) solid var(--good, #16a34a);
}
.uw-earnings-foot {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 0.85rem; padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.uw-earnings-foot-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem;
  font-size: 0.82rem;
}
.uw-earnings-foot-item .uw-earnings-dot { align-self: center; }
.uw-earnings-foot-label { font-weight: 700; color: var(--fg); }
.uw-earnings-foot-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.uw-earnings-foot-item--expected .uw-earnings-foot-val { color: var(--fg); }

@media (max-width: 720px) {
  .uw-earnings-card.card { padding: 1rem; }
  .uw-earnings-card .uw-trend-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .uw-earnings-card .uw-trend-legend {
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
  }
  .uw-earnings-chart-wrap { height: 240px; }
  .uw-earnings-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .uw-earnings-foot-item {
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.4rem 0.5rem;
  }
  .uw-earnings-foot-val {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Earnings Drift Grade — standalone ticker section above #uw-earnings */
.edg-section.card {
  padding: 1rem 1.1rem;
}
.edg-title {
  margin: 0; font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em;
}
.edg-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.35rem;
}
.edg-sub {
  margin: 0.15rem 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.4;
}
.edg-head-grade {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem;
}
.edg-badge { font-size: 0.95rem; }
.edg-score {
  font-size: 0.72rem; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums; font-family: var(--font-mono);
}
.edg-meta {
  margin: 0 0 0.75rem; font-size: 0.78rem; color: var(--muted); line-height: 1.45;
}
.edg-meta strong { color: var(--fg); font-variant-numeric: tabular-nums; }
.edg-partial-note {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--fg-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 6px);
}
.edg-components {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.edg-row { margin: 0; }
.edg-row-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem 0.65rem;
  align-items: baseline;
  font-size: 0.84rem;
}
.edg-row-label { font-weight: 600; color: var(--fg); }
.edg-row-weight {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase;
}
.edg-row-score {
  min-width: 2rem; text-align: right; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.edg-row-score--hi { color: var(--good); }
.edg-row-score--mid { color: #92600a; }
.edg-row-score--lo { color: var(--bad); }
.edg-row-score--na { color: var(--muted); font-weight: 500; }
.edg-bar {
  height: 6px; border-radius: 999px; background: var(--bg-soft);
  overflow: hidden; margin-top: 0.25rem;
}
.edg-bar-fill {
  display: block; height: 100%; border-radius: 999px;
  transition: width 0.25s ease;
}
.edg-bar-fill--hi { background: var(--good); }
.edg-bar-fill--mid { background: #fbbf24; }
.edg-bar-fill--lo { background: var(--bad); }
.edg-bar-fill--na { background: var(--line-strong); width: 0 !important; }
.edg-row-note {
  margin: 0.2rem 0 0; font-size: 0.76rem; color: var(--fg-soft); line-height: 1.4;
}
.edg-summary {
  margin: 0.75rem 0 0; font-size: 0.84rem; color: var(--fg); line-height: 1.45;
}
.edg-transcript {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 6px);
}
.edg-transcript-title {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.edg-transcript-body {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--fg);
}
.edg-transcript-guidance {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--fg-soft);
}
.edg-transcript-k {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.35rem;
}
.edg-foot {
  margin: 0.55rem 0 0; font-size: 0.72rem; color: var(--muted); line-height: 1.4;
}
.edg-foot a { font-weight: 600; }

/* Grade components as square tiles (Earnings-Whisper-style module strip):
   each component is a titled square with a circular score ring instead of a
   full-width progress bar. Used by _ticker_earnings_grade.html + the
   earnings-grade landing sample. */
.edg-grid {
  list-style: none; margin: 0.5rem 0 0; padding: 0;
  display: grid; gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 560px) { .edg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.edg-tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  text-align: center; padding: 0.8rem 0.6rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm, 10px);
  background: var(--bg-soft);
  --ring-c: var(--muted); --num-c: var(--fg); --track: var(--line-strong);
}
.edg-tile--hi  { --ring-c: var(--good); --num-c: var(--good); }
.edg-tile--mid { --ring-c: #f5b301;    --num-c: #92600a; }
.edg-tile--lo  { --ring-c: var(--bad);  --num-c: var(--bad); }
.edg-tile--na  { --ring-c: var(--line-strong); --num-c: var(--muted); }
.edg-tile-label { font-size: 0.8rem; font-weight: 700; color: var(--fg); line-height: 1.2; letter-spacing: -0.01em; }
.edg-tile-weight {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.edg-tile-ring {
  position: relative; width: 68px; height: 68px; border-radius: 50%;
  margin: 0.1rem 0;
  background: conic-gradient(var(--ring-c) calc(var(--p, 0) * 3.6deg), var(--track) 0);
}
.edg-tile-ring::before {
  content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-soft);
}
.edg-tile-ring-val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--num-c);
}
.edg-tile-note {
  margin: 0; font-size: 0.7rem; color: var(--fg-soft); line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Two standalone social sections (X / StockTwits), stacked full-width. */
.ticker-social-section .social-col-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem;
}
.ticker-social-section .social-col-title {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 1.15rem; font-weight: 700; margin: 0; letter-spacing: -0.01em;
}
.social-col-tools { display: inline-flex; align-items: center; gap: 0.9rem; }

/* 4. Tweet/call rows: borderless, separated by a single hairline divider. */
.app-content:has(.ticker-detail-head) .tweet-list { margin-top: 1rem; }
.app-content:has(.ticker-detail-head) .tweet-row {
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.app-content:has(.ticker-detail-head) .tweet-list > li:last-child .tweet-row,
.app-content:has(.ticker-detail-head) .tweet-list li:last-child .tweet-row {
  border-bottom: none;
}

/* 5. Flatten the UW sub-cards so options/flow/dark-pool blocks sit flush. */
.app-content:has(.ticker-detail-head) .uw-stat,
.app-content:has(.ticker-detail-head) .uw-gex-card,
.app-content:has(.ticker-detail-head) .uw-feed-card { padding-left: 0; padding-right: 0; }
.ticker-detail-pickers { margin-bottom: 1.5rem; }
.ticker-detail-pickers h2 { margin: 0 0 1rem; font-size: 1.15rem; }

/* Per-picker table (trends/screener styled) */
.picker-table .col-stance,
.picker-table .col-position { text-align: left; }
.picker-cell { display: inline-flex; align-items: center; gap: 0.55rem; }
.picker-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.picker-name strong { font-weight: 600; }
.picker-name .picker-handle { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.stance-chips { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }
.stance-chip {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.5rem; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stance-chip--bull { background: var(--good-soft); color: var(--good); }
.stance-chip--bear { background: var(--bad-soft); color: var(--bad); }
.stance-chip--neutral { background: var(--bg-soft); color: var(--muted); }

/* Unusual Whales per-ticker enrichment sections. */
.ticker-uw { margin: 1.5rem 0; }
.ticker-uw-title { font-size: 1.15rem; margin: 0 0 0.75rem; }

/* Analysts per-ticker section — shares .uw-feed-card chrome with options flow. */
.ticker-analysts { margin-bottom: 0; }

/* ── Live social feed (X + StockTwits) ──────────────────────────────────────
   Two side-by-side chatter columns that htmx self-polls every 30s. Each column
   reuses the .tweet-row language; the feed list is height-capped + scrollable so
   the section stays compact while still streaming the latest posts. */
.ticker-social { margin: 1.5rem 0; }
.social-section-title {
  display: flex; align-items: center; gap: 0.6rem;
}
.social-live {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--bad);
}
.social-live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bad);
  box-shadow: 0 0 0 0 var(--bad-soft);
  animation: social-pulse 1.8s ease-out infinite;
}
@keyframes social-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .social-live-dot { animation: none; }
}
.social-feed-controls {
  margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem;
}
.social-refresh-btn,
.social-live-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card, #fff);
  color: var(--fg); cursor: pointer;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  line-height: 1; white-space: nowrap;
}
.social-refresh-btn:hover,
.social-live-toggle:hover { border-color: var(--accent); color: var(--accent); }
.social-refresh-ico { display: inline-block; }
.social-refresh-btn.htmx-request { opacity: 0.6; pointer-events: none; }
.social-refresh-btn.htmx-request .social-refresh-ico { animation: social-spin 0.6s linear infinite; }
@keyframes social-spin { to { transform: rotate(360deg); } }
.social-live-toggle-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
}
.social-live-toggle.is-live {
  border-color: var(--bad); color: var(--bad); background: var(--bad-soft);
}
.social-live-toggle.is-live .social-live-toggle-dot {
  background: var(--bad); animation: social-pulse 1.8s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .social-refresh-btn.htmx-request .social-refresh-ico,
  .social-live-toggle.is-live .social-live-toggle-dot { animation: none; }
}
/* One-shot flash on a post that just arrived via a live refresh. */
.tweet-row.tweet-new { animation: tweet-new-flash 1.8s ease-out; }
@keyframes tweet-new-flash {
  0% { background: var(--accent-soft, rgba(37, 99, 235, 0.12)); }
  100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .tweet-row.tweet-new { animation: none; }
}
.ticker-social-cols {
  display: flex; flex-direction: column; gap: 1rem;
}
.ticker-social-col {
  margin: 0; padding: 1rem 1.1rem;
  background: var(--card, #fff); border: 1px solid var(--line);
  border-radius: 14px; min-width: 0;
}
.social-col-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; margin-bottom: 0.75rem;
}
.social-col-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1rem; font-weight: 700;
}
.social-col-title .src-tile {
  width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
}
.social-col-title .src-tile--x { background: #000; }
.social-col-title .src-icon { width: 16px; height: 16px; }
.social-col-title .src-tile--x .src-icon { width: 100%; height: 100%; padding: 4px; }
.social-col-meta {
  font-size: 0.74rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.social-col-sentiment {
  padding-bottom: 0.85rem; margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.social-col-sentiment .consensus-pct { font-size: 1.6rem; }
.social-counts { font-size: 0.82rem; color: var(--muted); margin: 0.45rem 0 0; }
.social-feed {
  margin-top: 0.4rem; max-height: 520px; overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
}
.social-feed .tweet-row { padding: 0.7rem 0; }
.social-feed > li:first-child .tweet-row { padding-top: 0.35rem; }
.social-empty {
  font-size: 0.88rem; color: var(--muted); margin: 0.6rem 0 0.2rem;
}
/* "+12% since" chip in the Latest-calls row header — the return measured from
   the price when the call was posted to now. Pushed to the right edge of the
   header so it reads as the headline number for each call. */
.tweet-return {
  font-family: var(--font-mono);
  font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.uw-stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; margin-bottom: 1rem;
}
.uw-stat { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.85rem 1rem; }
.uw-stat-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}
.uw-stat-value { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.uw-gex-card, .uw-feed-card { padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.uw-feed-card h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.85rem; line-height: 1.2; }
/* Recent options flow: show only the first 10 rows; the expand button reveals
   the rest. */
.uw-feed-card .uw-flow-row--extra { display: none; }
.uw-feed-card.is-expanded .uw-flow-row--extra { display: table-row; }
/* Unified expand / contract control — one clean, static pill shared by the
   options-flow "Show all", the Trading Trends "Expand" (chart modal), and the
   per-tab "Show details" buttons so every bottom section reads identically.
   No transitions/animations anywhere (hover state applies instantly). */
.uw-flow-expand,
.uw-trend-expand,
.uw-trend-toggle {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-soft); color: var(--fg-soft);
  font: inherit; font-size: 0.8rem; font-weight: 600;
}
.uw-flow-expand:hover,
.uw-trend-expand:hover,
.uw-trend-toggle:hover { color: var(--accent); border-color: var(--accent); }
/* Contextual placement only (shared visual chrome above): show-all sits under
   its table; show-details sits centered under the chart. */
.uw-flow-expand { margin-top: 0.85rem; }
.uw-gex-card h3, .uw-feed-card h3 { font-size: 1rem; margin: 0 0 0.75rem; }
.uw-gex-sub { font-size: 0.78rem; font-weight: 500; color: var(--muted); margin-left: 0.4rem; }
.uw-gex-wrap { position: relative; height: 280px; }
.uw-mini-table { font-size: 0.85rem; }
.uw-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.15rem;
  padding: 0 0.15rem;
}
.uw-table-scroll .uw-mini-table { min-width: 36rem; }
.uw-table-scroll .trades-feed { min-width: 42rem; }
.uw-table-scroll .trades-feed:has(.mx-firm-col) { min-width: 52rem; }
.uw-table-scroll .trades-feed:has(.num-bar-cell) { min-width: 58rem; }
/* Ticker intel detail tables reuse Latest Trades picker typography. */
.uw-trend-detail .trades-feed .col-picker { min-width: 210px; }
.uw-trend-detail .trades-feed .mx-picker { max-width: 260px; }
.uw-trend-detail .trades-feed .mx-picker-handle {
  white-space: normal;
  text-overflow: clip;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.uw-trend-detail .trades-feed .mx-firm-col { min-width: 130px; max-width: 200px; }
/* Inline pill for an insider-trade attribute (e.g. Rule 10b5-1 planned sale). */
.uw-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 4px;
  color: var(--muted);
  background: var(--bg-soft);
  vertical-align: middle;
}
/* Single-letter party badge (D / R / I) beside a politician's name. */
.uw-party {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 50%;
  color: #fff;
  vertical-align: middle;
}
.uw-party--d { background: #2563eb; }
.uw-party--r { background: #dc2626; }
.uw-party--i { background: #6b7280; }
/* Premium cell: dollar value with a scaled green/red bar beneath it (scaled to
   the largest premium in the table) so relative trade size reads at a glance.
   Same .mx-bar language as the stocks Most Bought matrix. */
.uw-prem-cell { vertical-align: middle; }
.uw-prem-val { display: block; }
.uw-prem-bar {
  display: block; width: 100%; max-width: 120px; height: 6px;
  margin: 0.3rem 0 0 auto;
}
.uw-prem-bar .mx-bar-fill { height: 100%; }
/* Generic "value + scaled bar" numeric cell (e.g. institution holdings Change):
   the dollar/share value with a green/red bar beneath it scaled to the largest
   magnitude in the column, so relative buy/sell size reads at a glance. Same
   .mx-bar language as the stocks matrix. */
.num-bar-cell { vertical-align: middle; }
.num-bar-val { display: block; }
.num-bar {
  display: block; width: 100%; max-width: 120px; height: 6px;
  margin: 0.3rem 0 0 auto;
}
.num-bar .mx-bar-fill { height: 100%; }

/* Trading Trends — Robinhood-style text tabs over Institutions/Insiders/Congress. */
.uw-trend-tabs {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.85rem; border-bottom: 1px solid var(--line);
}
.uw-trend-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: 0.4rem 0.1rem; margin-bottom: -1px;
  font-size: 0.9rem; font-weight: 600; color: var(--fg-soft);
  border-bottom: 2px solid transparent;
}
.uw-trend-tab:hover { color: var(--fg); }
.uw-trend-tab.is-active { color: var(--fg); border-bottom-color: var(--fg); }
.uw-trend-panel { display: none; }
.uw-trend-panel.is-active { display: block; }
.uw-trend-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.uw-trend-head h3 { margin: 0; }
.uw-trend-chart-wrap { position: relative; height: 240px; margin-bottom: 0.85rem; }
.uw-trend-chart-wrap--lg { height: min(60vh, 480px); margin-bottom: 0; }
.uw-trend-empty {
  color: var(--muted); font-size: 0.9rem; text-align: center;
  padding: 1.75rem 0.5rem; margin: 0;
}
.uw-trend-legend {
  display: flex; gap: 1rem; justify-content: center;
  padding: 0.25rem 0 0.5rem; font-size: 0.8rem; color: var(--muted);
}
.uw-trend-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.uw-trend-legend-item::before {
  content: ''; display: inline-block; width: 10px; height: 10px;
  border-radius: 2px;
}
.uw-trend-legend--buy::before { background: var(--good, #16a34a); }
.uw-trend-legend--sell::before { background: var(--bad, #dc2626); }
/* Centered under the chart (shared pill chrome defined with .uw-flow-expand).
   width:fit-content keeps the pill shrink-wrapped while margin auto centers it. */
.uw-trend-toggle { display: flex; width: fit-content; margin: 0.85rem auto 0; }
.uw-trend-detail { margin-top: 0.75rem; }
/* Expand modal */
.uw-trend-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.uw-trend-modal[hidden] { display: none; }
.uw-trend-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.uw-trend-modal-card {
  position: relative; z-index: 1; width: min(900px, 92vw);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg, var(--shadow-sm));
  padding: 1.25rem 1.5rem;
}
.uw-trend-modal-title { margin: 0 2rem 1rem 0; font-size: 1.05rem; }
.uw-trend-modal-close {
  position: absolute; top: 0.6rem; right: 0.85rem;
  appearance: none; background: none; border: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--muted);
}
.uw-trend-modal-close:hover { color: var(--fg); }

/* Market Tide sentiment strip atop the Dark Pool feed. */
.market-tide-strip {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.85rem 1.1rem; margin-bottom: 1rem;
}
.market-tide-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.market-tide-verdict { font-size: 1.05rem; font-weight: 700; }
.market-tide-detail {
  font-size: 0.85rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.position-pill {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.position-pill--long { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.position-pill--short { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.position-pill--mixed { background: var(--bg-soft); color: var(--muted); border-color: var(--line); }
.ticker-detail-calls h2 {
  margin: 1.25rem 0 0.75rem; font-size: 1.15rem;
}

/* ── Call feed (Home) ──────────────────────────────────────────────────────── */

.call-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.call-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  border-left: 4px solid var(--line);
}
.call-card--win { border-left-color: var(--green, #16a34a); }
.call-card--loss { border-left-color: var(--red, #dc2626); }
.call-card--pending { border-left-color: var(--muted, #94a3b8); }

.call-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}
.call-card-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-scored { background: var(--green, #16a34a); }
.dot-pending { background: var(--muted, #94a3b8); }
.call-card-label { font-weight: 600; color: var(--fg); }
.call-card-subtitle { color: var(--muted); margin-left: auto; }

.call-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.call-card-body > * {
  background: var(--card-bg, #fff);
  padding: 1.25rem;
}

.call-card-post-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.call-card-profile-link {
  display: flex; align-items: center; gap: 0.5rem;
  flex: 1; min-width: 0;
  color: inherit; text-decoration: none;
}
.call-card-profile-link:hover .call-card-handle { color: var(--accent); }
.call-card-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; }
.call-card-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.call-card-author { display: flex; flex-direction: column; }
.call-card-handle { font-weight: 600; font-size: 0.9rem; }
.call-card-meta { font-size: 0.75rem; color: var(--muted); }
.call-card-view {
  margin-left: auto;
  font-size: 0.75rem; font-weight: 500;
  color: var(--accent); text-decoration: none;
}
.call-card-view:hover { text-decoration: underline; }
.call-card-text {
  font-size: 0.85rem; line-height: 1.5;
  color: var(--fg);
  margin: 0 0 0.5rem;
  word-break: break-word;
}
.call-card-time { font-size: 0.72rem; color: var(--muted); }

.call-card-parsed { display: flex; flex-direction: column; gap: 0.75rem; }
.call-card-parsed-head {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem;
}
.call-card-parsed-head::before {
  content: "⚡"; font-size: 0.8rem;
}
.call-card-asset, .call-card-stance, .call-card-hit-rate {
  display: flex; align-items: baseline; gap: 0.5rem;
}
.call-card-asset-label, .call-card-stance-label, .call-card-hit-rate-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); min-width: 50px;
}
.call-card-ticker {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  color: inherit; text-decoration: none;
}
.call-card-ticker:hover { text-decoration: underline; }
.sentiment-pill {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.6rem; border-radius: 4px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
}
.sentiment-pill--bullish {
  background: #dcfce7; color: #166534;
}
.sentiment-pill--bearish {
  background: #fee2e2; color: #991b1b;
}
/* Generic stat pill — same shape as .sentiment-pill so secondary metrics
   sit alongside the stance chip without visual whiplash. Tier modifier
   tints by threshold so a low hit rate reads as a warning at a glance. */
.stat-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 4px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-pill--good { background: var(--low-bg);  color: var(--low-fg); }
.stat-pill--mid  { background: var(--mid-bg);  color: var(--mid-fg); }
.stat-pill--bad  { background: var(--high-bg); color: var(--high-fg); }
.stat-pill--neutral {
  background: var(--bg-soft); color: var(--fg-soft);
  border: 1px solid var(--line);
}
.call-card-snippet {
  font-size: 0.82rem; color: var(--fg); line-height: 1.45;
  margin: 0;
}
.call-card-tag {
  display: inline-block;
  font-size: 0.7rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0.15rem 0.45rem;
}

.call-card-outcome {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--bg-subtle, #f8fafc);
}
.call-card-outcome-section {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.15rem;
}
.call-card-outcome-label {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); font-weight: 600;
}
.call-card-price { font-size: 1.1rem; font-weight: 600; font-family: var(--font-mono, monospace); }
.call-card-pct { font-size: 0.75rem; }
.call-card-outcome-arrow { font-size: 1.2rem; color: var(--muted); }
.call-card-result { margin-left: auto; text-align: right; }
.call-card-result-value {
  font-size: 1.2rem; font-weight: 700; font-family: var(--font-mono, monospace);
  padding: 0.3rem 0.7rem; border-radius: 6px;
}
.call-card-result-value.pct-pos { background: #dcfce7; color: #166534; }
.call-card-result-value.pct-neg { background: #fee2e2; color: #991b1b; }
.call-card-pending { color: var(--muted); font-style: italic; }

.call-feed-pagination {
  display: flex; justify-content: center; padding: 1rem 0;
}

/* Call-feed table rows */
.call-row--win td:first-child { box-shadow: inset 3px 0 0 var(--green, #16a34a); }
.call-row--loss td:first-child { box-shadow: inset 3px 0 0 var(--red, #dc2626); }
.call-row--pending td:first-child { box-shadow: inset 3px 0 0 var(--muted, #94a3b8); }
.col-snippet { max-width: 260px; }
.call-row-tweet {
  font-size: 0.8rem; line-height: 1.4;
  color: var(--fg-soft); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.call-row-tweet:hover { color: var(--accent); }
.call-price { font-family: var(--font-mono, monospace); font-size: 0.85rem; }
.col-when { white-space: nowrap; font-size: 0.8rem; color: var(--muted); }

/* Mobile: 4 quick tabs + More → left drawer with full sidebar nav. */
@media (max-width: 840px) {
  .app-shell { grid-template-columns: 1fr; }
  /* The drawer shows full labels on mobile; collapse toggle is desktop-only. */
  .app-sidebar-toggle { display: none; }

  /* On the blur (locked) paywall page the marketing footer just pushes the
     paywall sheet down and adds clutter on a small screen — drop it on mobile. */
  .app-shell--locked ~ .site-footer { display: none; }

  .app-sidebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    top: auto; height: auto;
    z-index: 1000;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    pointer-events: none;
  }

  .app-mobile-tabbar {
    display: flex;
    pointer-events: auto;
    position: relative;
    z-index: 1003;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.06);
  }

  .app-mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0 0.35rem;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .app-mobile-tab svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--muted);
  }
  /* Source-channel tabs use the shared source_icon macro (svg logos + a
     StockTwits <img>); size + tint them like the native tab glyphs. */
  .app-mobile-tab .src-icon,
  .app-mobile-tab img.src-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    color: var(--muted);
  }
  .app-mobile-tab.active .src-icon { color: var(--accent); }
  /* X + StockTwits render as rounded "app icon" tiles (no text label). */
  .app-mobile-tab--icon { gap: 0; justify-content: center; }
  .app-mobile-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--surface-2, #f0f2f5);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  }
  .app-mobile-icon.src-tile--x { background: #000; box-shadow: none; }
  .app-mobile-icon .src-icon { width: 19px; height: 19px; }
  .app-mobile-icon.src-tile--x .src-icon { color: #fff; }
  .app-mobile-icon img.src-icon,
  .app-mobile-icon .src-logo--img { width: 34px; height: 34px; border-radius: 9px; }
  .app-mobile-tab--icon.active .app-mobile-icon {
    box-shadow: 0 0 0 2px var(--accent, #2f6df6);
  }
  .app-mobile-tab { white-space: nowrap; position: relative; }
  .app-mobile-tab:hover { color: var(--fg); text-decoration: none; }
  /* Selected tab: accent the icon + label (primary cue) plus a small accent
     bar pinned to the BOTTOM edge. No background tint, no top bar. */
  .app-mobile-tab.active {
    color: var(--accent);
    font-weight: 700;
  }
  .app-mobile-tab.active svg { color: var(--accent); }
  .app-mobile-tab.active::after {
    content: "";
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 28px; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--accent);
  }
  .app-mobile-tab--disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
  }

  /* "More" dot when the drawer is open */
  .app-shell.app-menu-open [data-action="toggle-app-menu"] {
    color: var(--accent-deep);
  }
  .app-shell.app-menu-open [data-action="toggle-app-menu"] svg {
    color: var(--accent);
  }

  .app-sidebar-spacer { display: none; }

  .app-sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.7rem;
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-right: 1px solid var(--line);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    pointer-events: auto;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    visibility: hidden;
  }
  .app-shell.app-menu-open .app-sidebar-drawer {
    transform: translateX(0);
    visibility: visible;
  }

  .app-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(15, 23, 42, 0.45);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.22s ease;
  }
  .app-shell.app-menu-open .app-menu-backdrop {
    opacity: 1;
  }
  .app-menu-backdrop[hidden] { display: none; }

  body.app-menu-scroll-lock { overflow: hidden; }

  .app-main { padding-bottom: 56px; }

  .app-topbar-account { display: inline-flex; }
  .app-topbar {
    padding: 0.55rem 1rem;
    /* Keep search + inline CTA on one row; the search condenses (min-width:0)
       around the pill instead of the pill wrapping to a second line. */
    flex-wrap: nowrap; min-height: auto; gap: 0.6rem;
  }
  .app-content { padding: 1rem 1rem 1.5rem; }
  .ticker-detail-metrics { grid-template-columns: 1fr; }
  .ticker-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ticker-stats-grid .ticker-stat:nth-child(-n + 4) { border-top: 1px solid var(--line); }
  .ticker-stats-grid .ticker-stat:nth-child(-n + 2) { border-top: none; }
  .ticker-stats-grid .ticker-stat:nth-child(4n + 1) { border-left: 1px solid var(--line); }
  .ticker-stats-grid .ticker-stat:nth-child(2n + 1) { border-left: none; }
  .ticker-detail-head { flex-wrap: wrap; }
  .ticker-price-hero { text-align: left; width: 100%; }
  .screener-table .col-sentiment,
  .screener-table .col-mcap,
  .screener-table .col-pe,
  .screener-table .col-chg7d,
  .screener-table .col-since,
  .screener-table .col-pickers { display: none; }

  /* Stock feed: keep Picker, Ticker, Result, When.
     Hide Stance, Post, Entry, Last. (Scope to the home call feed only —
     don't hide Rating / Status columns on ticker intel tables.) */
  .stock-feed .col-stance { display: none; }
  .stock-feed .col-snippet { display: none; }
  .stock-feed .col-entry { display: none; }
  .stock-feed .col-last { display: none; }

  /* Bet feed: keep Capper, Pick, Result, When.
     Hide Sport, Odds, Profit. */
  .col-sport { display: none; }
  .col-odds { display: none; }
  .col-profit { display: none; }
  .col-pick { max-width: 140px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Marketing surface — landing, /about, /pricing redesign.
   All classes prefixed `.ml-*` to keep them isolated from the app shell
   styles above. Browser-frame chrome (`.browser-frame`) is shared across
   marketing surfaces to make embedded screenshots look productized.
   ────────────────────────────────────────────────────────────────────── */

/* ── browser-frame chrome (wraps screenshots) ───────────────────────── */
.browser-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.browser-frame-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.browser-frame-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line-strong);
  flex-shrink: 0;
}
.browser-frame-dot:nth-child(1) { background: #ff5f57; }
.browser-frame-dot:nth-child(2) { background: #febc2e; }
.browser-frame-dot:nth-child(3) { background: #28c840; }
.browser-frame-url {
  flex: 1; text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem; color: var(--muted);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.18rem 0.85rem;
  max-width: 60%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-frame img {
  display: block; width: 100%; height: auto;
  background: var(--bg-soft);
}
.browser-frame-fallback-content {
  display: none;
}
/* When the screenshot fails to load, swap in a placeholder block so the
   layout doesn't collapse. The `onerror` handler in the template adds
   .browser-frame-fallback to the parent. */
.browser-frame.browser-frame-fallback img { display: none; }
.browser-frame.browser-frame-fallback {
  min-height: 400px;
}
.browser-frame.browser-frame-fallback .browser-frame-fallback-content {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; gap: 0.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-soft), var(--accent-soft));
}
.browser-frame.browser-frame-fallback .browser-frame-fallback-content strong {
  font-size: 1.15rem;
  color: var(--fg);
}

/* ── landing hero (split layout) ────────────────────────────────────── */
.ml-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}
.ml-hero-copy { display: flex; flex-direction: column; gap: 1.25rem; }
.ml-hero-copy h1 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0;
}
.ml-hero-copy .tagline {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--fg-soft);
  margin: 0;
  max-width: 36rem;
}
.ml-hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-top: 0.25rem;
}
.ml-hero-proof {
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1rem 1.1rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ml-hero-proof-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 600;
}
.ml-hero-proof-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem;
}
.ml-hero-picker {
  display: inline-flex; align-items: center; gap: 0.45rem;
  text-decoration: none; color: var(--fg);
  font-size: 0.88rem;
  transition: color 0.12s ease;
}
.ml-hero-picker:hover { color: var(--accent); }
.ml-hero-avatar {
  width: 22px; height: 22px;
  border-radius: 50%; overflow: hidden;
  background: var(--bg-soft);
}
.ml-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ml-hero-handle { font-weight: 500; }
.ml-hero-ytd {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600; color: var(--good);
  font-variant-numeric: tabular-nums;
}
.ml-hero-search { margin-top: 0.25rem; max-width: 100%; }

.ml-hero-shot { position: relative; }
.browser-frame-hero {
  transform: none;
}
.ml-hero-callouts { display: none; }
@media (min-width: 900px) {
  .ml-hero-callouts {
    display: block; position: absolute; inset: 0; pointer-events: none;
  }
  .ml-hero-callout {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.72rem; font-weight: 600; color: var(--fg);
    box-shadow: var(--shadow);
    white-space: nowrap;
  }
  .ml-hero-callout code {
    background: var(--accent-soft); color: var(--accent-deep);
    padding: 0 0.3rem; border-radius: 4px;
    font-family: "JetBrains Mono", monospace; font-size: 0.7rem;
  }
  .ml-hero-callout-1 { top: 6%; right: -8%; }
  .ml-hero-callout-2 { top: 45%; left: -10%; }
  .ml-hero-callout-3 { bottom: 6%; right: -4%; }
}

/* ── trust strip ────────────────────────────────────────────────────── */
.ml-trust-strip {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0;
}
.ml-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.ml-trust-tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
}
.ml-trust-num {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.ml-trust-label {
  font-size: 0.78rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
}

/* ── shared section helpers ─────────────────────────────────────────── */
.section-head-centered {
  flex-direction: column; align-items: center; text-align: center;
  margin-bottom: 2rem;
}
.section-head-centered > div { max-width: 38rem; }
.section-head-centered h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  letter-spacing: -0.02em;
}
.center { text-align: center; }
.container-narrow {
  max-width: 720px; margin: 0 auto; padding: 0 1.5rem;
}

/* ── problem grid (3-up) ───────────────────────────────────────────── */
.ml-problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.ml-problem-card { padding: 1.5rem; position: relative; }
.ml-problem-num {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.5rem; border-radius: 6px;
  margin-bottom: 0.85rem;
}
.ml-problem-card h3 {
  font-size: 1.05rem; margin: 0 0 0.45rem;
  letter-spacing: -0.01em;
}
.ml-problem-card p { margin: 0; color: var(--fg-soft); line-height: 1.5; }

/* ── solution 3-up (screenshot cards) ───────────────────────────────── */
.ml-solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.ml-solution-card {
  display: flex; flex-direction: column; gap: 1rem;
}
.ml-solution-card .browser-frame { aspect-ratio: 16 / 10; }
.ml-solution-card h3 {
  margin: 0; font-size: 1.05rem; letter-spacing: -0.01em;
}
.ml-solution-card p {
  margin: 0; font-size: 0.92rem; color: var(--fg-soft); line-height: 1.5;
}

/* ── how it works (3-step pipeline) ─────────────────────────────────── */
.ml-howit-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
}
.ml-howit-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.ml-howit-num {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 700; font-size: 0.95rem;
  font-family: "JetBrains Mono", monospace;
}
.ml-howit-step h3 { margin: 0; font-size: 1rem; letter-spacing: -0.01em; }
.ml-howit-step p { margin: 0; color: var(--fg-soft); font-size: 0.9rem; line-height: 1.5; }
.ml-howit-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--muted);
}
.ml-howit-shot {
  max-width: 920px; margin: 0 auto;
}
.ml-howit-link { text-align: center; margin: 2rem 0 0; }

/* ── feature pillars (4-up grid) ────────────────────────────────────── */
.ml-pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.ml-pillar { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.ml-pillar-shot {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.ml-pillar-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.ml-pillar.browser-frame-fallback .ml-pillar-shot {
  background: linear-gradient(135deg, var(--bg-soft), var(--accent-soft));
}
.ml-pillar h3 { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; }
.ml-pillar p { margin: 0; color: var(--fg-soft); font-size: 0.92rem; line-height: 1.5; }

/* ── how-it-works page (long-form pillar layout) ────────────────────── */
.marketing-hero {
  max-width: 800px; margin: 0 auto;
  padding: 4rem 1.5rem 2.5rem;
  text-align: center;
}
.marketing-hero-tight { padding: 3rem 1.5rem 1.5rem; }
.marketing-hero .eyebrow {
  display: inline-block; margin-bottom: 0.85rem;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.75rem; border-radius: 999px; font-weight: 600;
}
.marketing-hero h1 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.025em;
  line-height: 1.1; margin: 0;
}
.marketing-hero .tagline {
  font-size: 1.05rem; color: var(--fg-soft);
  line-height: 1.55;
  max-width: 38rem; margin: 1rem auto 0;
}

.method-pillar-grid {
  display: flex; flex-direction: column; gap: 3rem;
}
.method-pillar {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem;
  align-items: center;
}
.method-pillar:nth-child(even) {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.method-pillar:nth-child(even) .method-step-shot { order: -1; }
.method-step-num {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem; font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.65rem; border-radius: 6px;
  margin-bottom: 0.85rem;
}
.method-pillar h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
}
.method-step-lede {
  font-size: 1.02rem; color: var(--fg); line-height: 1.5;
  margin: 0 0 1rem;
}
.method-step-detail {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.method-step-detail li {
  padding-left: 1.25rem; position: relative;
  font-size: 0.92rem; color: var(--fg-soft); line-height: 1.5;
}
.method-step-detail li::before {
  content: "→"; position: absolute; left: 0;
  color: var(--accent); font-weight: 600;
}
.method-step-shot .browser-frame { aspect-ratio: 16 / 10; }

.risk-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.risk-signal { padding: 1.35rem; position: relative; }
.risk-signal-weight {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem; font-weight: 600;
  color: var(--fg);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 0.15rem 0.5rem; border-radius: 6px;
  margin-bottom: 0.65rem;
}
.risk-signal h3 { margin: 0 0 0.4rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.risk-signal p { margin: 0; color: var(--fg-soft); font-size: 0.92rem; line-height: 1.5; }

.exclusions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.exclusion { padding: 1.35rem; }
.exclusion h3 { margin: 0 0 0.4rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.exclusion p { margin: 0; color: var(--fg-soft); font-size: 0.92rem; line-height: 1.5; }

/* ── about page prose ───────────────────────────────────────────────── */
.prose {
  max-width: 720px; margin: 0 auto;
}
.prose h2 {
  font-size: 1.4rem; letter-spacing: -0.015em;
  margin: 2.25rem 0 0.85rem;
}
.prose h2:first-of-type { margin-top: 0; }
.prose p {
  margin: 0 0 1rem;
  font-size: 1.02rem; line-height: 1.6; color: var(--fg-soft);
}
.prose p code {
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 0.05rem 0.35rem; border-radius: 4px;
  font-family: "JetBrains Mono", monospace; font-size: 0.92rem;
  color: var(--fg);
}

/* ── pricing page ──────────────────────────────────────────────────── */
.px-hero {
  max-width: 720px; margin: 0 auto;
  padding: 4.5rem 1.5rem 2rem;
  text-align: center;
}
.px-hero h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--fg); margin: 0 0 1.75rem;
}
.px-hero-accent {
  color: var(--good);
}

/* ── billing toggle ────────────────────────────────────────────────── */
.px-toggle {
  display: inline-flex; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.3rem;
  gap: 0.2rem;
}
.px-toggle-btn {
  padding: 0.55rem 1.35rem; border-radius: 999px;
  border: none; background: none; cursor: pointer;
  font-family: var(--font); font-size: 0.88rem; font-weight: 500;
  color: var(--muted); transition: all 120ms ease;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.px-toggle-btn:hover { color: var(--fg); }
.px-toggle-btn.active {
  background: var(--fg); color: var(--bg);
  box-shadow: var(--shadow);
}
.px-toggle-save {
  font-size: 0.72rem; font-weight: 600;
  color: var(--good); background: var(--good-soft);
  padding: 0.15rem 0.55rem; border-radius: 999px;
  letter-spacing: 0.01em;
}
.px-toggle-btn.active .px-toggle-save {
  background: rgba(255,255,255,.18); color: #fff;
}

/* ── two-card grid ─────────────────────────────────────────────────── */
.px-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 880px; margin: 0 auto;
  align-items: start;
}

.px-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  position: relative;
}
.px-card-featured {
  border-color: var(--good);
  box-shadow: 0 0 0 1px var(--good), var(--shadow-lg);
}

.px-card-head {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.px-plan-name {
  font-family: var(--font);
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}
.px-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--good); background: var(--good-soft);
  border: 1px solid var(--good);
  padding: 0.25rem 0.65rem; border-radius: 999px;
  white-space: nowrap;
}

/* price row: $3.30  ~~$4~~ (OddsJam-style) */
.px-price-block {
  margin-bottom: 1.25rem;
}
.px-price-row {
  display: flex; align-items: baseline; gap: 0.4rem;
}
.px-amount {
  font-size: 3rem; font-weight: 800; letter-spacing: -0.04em;
  color: var(--fg); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.px-amount-cents {
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--fg); line-height: 1;
  align-self: flex-start; margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.px-amount-orig {
  font-size: 1.1rem; font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 0.25rem;
}
.px-price-sub {
  display: block;
  font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem;
}

/* logo row (between price and tagline) */
.px-logos {
  display: flex; align-items: center; gap: 0.45rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.px-logos img {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}
.px-logos-more {
  font-size: 0.78rem; font-weight: 600;
  color: var(--muted);
  padding-left: 0.15rem;
}

.px-tagline {
  font-size: 0.92rem; color: var(--fg-soft); line-height: 1.55;
  margin: 0 0 1.5rem; min-height: 2.85em;
}

.px-cta {
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem; font-weight: 600;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  background: var(--good); color: #fff; border: none;
  text-align: center; text-decoration: none;
  display: block;
  transition: background 120ms ease, transform 80ms ease;
}
.px-cta:hover { background: #12904a; transform: translateY(-1px); text-decoration: none; color: #fff; }
.px-cta-disabled {
  background: var(--line); color: var(--muted); cursor: not-allowed;
  border: none;
}
.px-cta-disabled:hover { background: var(--line); transform: none; }
.px-card form { margin: 0; }
.px-fine {
  font-size: 0.78rem; color: var(--muted); margin: -0.75rem 0 1.25rem;
  text-align: center;
}

.px-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.px-features li {
  padding-left: 1.75rem; position: relative;
  font-size: 0.88rem; color: var(--fg-soft); line-height: 1.5;
}
.px-features li strong { color: var(--fg); font-weight: 600; }
.px-features li::before {
  content: ""; position: absolute; left: 0; top: 0.3rem;
  width: 15px; height: 15px;
  background-color: var(--good);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6 11.5L2.5 8l1-1L6 9.5l6.5-6.5 1 1z'/></svg>") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6 11.5L2.5 8l1-1L6 9.5l6.5-6.5 1 1z'/></svg>") no-repeat center / contain;
}

/* ── CTA band (refresh existing) ────────────────────────────────────── */
.cta-band .cta-actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center;
}
.cta-band .cta-actions form { display: inline; }

/* ── mobile responsive (consolidated breakpoint for marketing) ───────── */
@media (max-width: 920px) {
  .ml-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.25rem 1.5rem;
  }
  .ml-hero-shot { order: 2; }
  .browser-frame-hero { transform: none; }
  .method-pillar,
  .method-pillar:nth-child(even) {
    grid-template-columns: 1fr; gap: 1.5rem;
  }
  .method-pillar:nth-child(even) .method-step-shot { order: 0; }
  .ml-howit-pipeline {
    grid-template-columns: 1fr;
  }
  .ml-howit-arrow {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }
  .px-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}


/* ──────────────────────────────────────────────────────────────────────────
   Public ticker page (/tickers/{TICKER}) — minimal additions on top of the
   existing .ticker-head / .leaderboard / .faq-item base styles. The heavier
   TipRanks-style layout was reverted — only the data-prose, related-tickers
   strip, and FAQ block remain visible.
   ────────────────────────────────────────────────────────────────────── */
.ticker-related {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
}
.ticker-related a {
  color: var(--accent); font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  text-decoration: none;
}
.ticker-related a:hover { text-decoration: underline; }

.ticker-faq {
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.ticker-faq h2 {
  font-size: 1.15rem; letter-spacing: -0.01em;
  margin: 0 0 1rem;
}


/* ──────────────────────────────────────────────────────────────────────────
   Subscribe gate — in-app paywall for authenticated users without a plan.
   ────────────────────────────────────────────────────────────────────── */
.subscribe-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem;
}
.subscribe-card {
  max-width: 480px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.subscribe-header { margin-bottom: 1.5rem; text-align: center; }
.subscribe-brand {
  display: flex; justify-content: center;
  margin: 0 0 1.25rem;
}
.subscribe-brand .site-brand-inline { display: inline-flex; align-items: center; }
.subscribe-brand .brand-logo--lg { height: 2rem; }
.subscribe-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
}
.subscribe-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.subscribe-features {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.subscribe-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .6rem;
  font-size: 0.9rem;
  color: var(--fg);
  line-height: 1.5;
}
.subscribe-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.subscribe-price {
  margin: 1.5rem 0 1rem;
}
.subscribe-amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.subscribe-period {
  font-size: 1rem;
  color: var(--muted);
}
.subscribe-cta {
  width: 100%;
  margin-top: .5rem;
}
.subscribe-fine {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: .75rem;
}
.subscribe-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.subscribe-logout-form { display: inline; margin: 0; }
.subscribe-logout {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.subscribe-logout:hover { color: var(--fg); text-decoration: underline; }

/* ── Hot Stocks velocity badges ─────────────────────────────────────────── */
.hot-badge {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hot-badge--up {
  color: var(--good);
}
.hot-badge--new {
  color: var(--accent);
}
.hot-badge--steady {
  color: var(--muted);
}

/* ── Bettor profile ───────────────────────────────────────────────────── */
.bettor-profile { max-width: 960px; }

.bettor-header {
  display: flex; align-items: center; gap: 1.25rem;
  margin-bottom: 2rem;
}
.bettor-avatar .avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--line);
}
.bettor-info h1 {
  font-size: 1.5rem; font-weight: 700; margin: 0;
}
.bettor-info .handle { color: var(--muted); font-weight: 400; font-size: 1rem; }
.bettor-meta { color: var(--muted); font-size: 0.875rem; margin-top: 0.25rem; }
.bettor-meta span + span::before { content: " · "; }

.bettor-metrics {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.bettor-metrics .metric-card {
  flex: 1; min-width: 120px; max-width: 180px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem; text-align: center;
}
.bettor-metrics .metric-value {
  font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.bettor-metrics .metric-label { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

.bettor-section { margin-bottom: 2rem; }
.bettor-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }

.breakdown-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.breakdown-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.875rem;
}
.breakdown-sport { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.03em; margin-bottom: 0.25rem; }
.breakdown-record { font-size: 1rem; font-weight: 600; }
.breakdown-roi { font-size: 0.85rem; }
.breakdown-units { font-size: 0.8rem; color: var(--muted); }

.picks-table-wrap { overflow-x: auto; }
.picks-table {
  width: 100%; border-collapse: collapse; font-size: 0.875rem;
}
.picks-table th {
  text-align: left; padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--line); font-weight: 600; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
}
.picks-table td {
  padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.pick-row:hover { background: var(--surface); }
.pick-sport { font-weight: 600; font-size: 0.8rem; letter-spacing: 0.03em; }
.pick-event { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-selection { font-weight: 500; }
.pick-odds { font-variant-numeric: tabular-nums; }
.pick-profit { font-weight: 600; font-variant-numeric: tabular-nums; }
.pick-date { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

.outcome-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 700;
}
.outcome-win { background: rgba(16,185,129,0.15); color: var(--good); }
.outcome-loss { background: rgba(239,68,68,0.15); color: var(--bad); }
.outcome-push { background: rgba(156,163,175,0.15); color: var(--muted); }
.outcome-pending { background: rgba(59,130,246,0.1); color: var(--accent); }
.outcome-void { background: rgba(156,163,175,0.1); color: var(--muted); }

.confidence-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  padding: 0.1rem 0.35rem; border-radius: 4px; margin-left: 0.4rem;
  vertical-align: middle;
}
.conf-lock { background: rgba(245,158,11,0.15); color: #d97706; }
.conf-max { background: rgba(239,68,68,0.12); color: var(--bad); }

.streak-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 6px;
}
.streak-win { background: rgba(16,185,129,0.12); color: var(--good); }
.streak-loss { background: rgba(239,68,68,0.12); color: var(--bad); }

.pending-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.75rem; }

/* ── Bettor sport panel overrides ─────────────────────────────────── */
.pick-event {
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-selection { max-width: 220px; }
.pick-odds { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pick-profit { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.pick-date a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.pick-date a:hover { text-decoration: underline; }
.pick-row.pick-win { background: rgba(16,185,129,0.03); }
.pick-row.pick-loss { background: rgba(239,68,68,0.03); }
.pick-row.pick-pending { color: var(--muted); }
.pick-row.pick-pending .pick-event,
.pick-row.pick-pending .pick-selection { color: var(--text); }

.pending-picks-section { margin-top: 1.5rem; }
.pending-picks-heading {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); margin: 0 0 0.5rem;
  padding-bottom: 0.4rem; border-bottom: 1px dashed var(--border);
}
.picks-table--pending .outcome-badge { width: 20px; height: 20px; }
.picks-table--pending .outcome-badge svg { width: 12px; height: 12px; }

.sidebar-pending { font-size: 0.72rem; color: var(--accent); opacity: 0.85; }

.ticker-explorer.single-sport { grid-template-columns: 1fr; }

/* ── Sport filter dropdown ──────────────────────────────────────── */

.sport-filter-wrap { position: relative; }

.sport-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem; font-weight: 600;
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--line); border-radius: var(--radius-sm, 6px);
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
  transition: border-color 0.15s;
}
.sport-filter-btn:hover { border-color: var(--line-strong, var(--line)); }
.sport-filter-btn[aria-expanded="true"] { border-color: var(--accent); }
.sport-filter-btn[aria-expanded="true"] .sport-filter-chevron { transform: rotate(180deg); }
.sport-filter-chevron { transition: transform 0.15s; flex-shrink: 0; }
.sport-filter-emoji { font-size: 1rem; line-height: 1; }

.sport-filter-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 200px; max-height: 420px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 100; padding: 4px 0;
}

.sport-filter-group-label {
  padding: 0.55rem 0.9rem 0.25rem;
  font-size: 0.78rem; font-weight: 700;
  color: var(--fg); text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 6px;
}
.sport-filter-group-label .sport-filter-emoji { font-size: 0.9rem; }

.sport-filter-item {
  display: block; padding: 0.4rem 0.9rem 0.4rem 1.8rem;
  font-size: 0.82rem; font-weight: 500;
  color: var(--fg-soft, var(--fg));
  text-decoration: none; white-space: nowrap;
  transition: background 0.1s;
}
.sport-filter-item:hover { background: var(--bg-soft); }
.sport-filter-item.active {
  color: var(--fg); font-weight: 700;
}
.sport-filter-item--group {
  padding-left: 0.9rem; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}

/* ── Sports Smart Money table ────────────────────────────────────── */

.smart-money-table .col-when { width: 110px; white-space: nowrap; font-size: 0.82rem; }
.smart-money-table .col-matchup { min-width: 180px; }
.smart-money-table .col-consensus { width: 180px; }
.smart-money-table .col-odds { width: 80px; }

.matchup-sport {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.matchup-sport .sport-label {
  font-size: 0.72rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.matchup-teams {
  display: flex; align-items: center; gap: 4px;
  font-weight: 600; font-size: 0.88rem;
}
.matchup-at {
  font-weight: 400; color: var(--muted); font-size: 0.78rem;
}

.odds-stack {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-end;
}
.odds-line {
  font-weight: 600; font-size: 0.82rem; font-variant-numeric: tabular-nums;
}

.consensus-cell {
  display: flex; flex-direction: column; gap: 5px;
  align-items: flex-start;
}
.consensus-cell .consensus-label {
  font-weight: 600; font-size: 0.84rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 160px;
}

.consensus-gauge {
  display: flex; align-items: center; gap: 5px;
  width: 100%; max-width: 170px;
}
.gauge-team {
  font-size: 0.62rem; font-weight: 700; color: var(--muted);
  letter-spacing: 0.03em; flex-shrink: 0; width: 22px;
  font-variant-numeric: tabular-nums;
}
.gauge-team--away { text-align: right; }
.gauge-team--home { text-align: left; }
.gauge-track-wrap {
  position: relative; flex: 1; height: 6px;
}
.gauge-track {
  display: flex; width: 100%; height: 100%;
  border-radius: 3px; overflow: hidden;
}
.gauge-fill--win {
  height: 100%;
  background: var(--fg);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gauge-fill--lose {
  height: 100%;
  background: var(--bg-soft);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gauge-dot {
  position: absolute; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--fg);
  box-shadow: 0 0 4px rgba(0,0,0,0.10);
  transform: translate(-50%, -50%);
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
.smart-money-row:hover .gauge-dot {
  box-shadow: 0 0 0 1px var(--fg), 0 0 8px var(--accent-glow, rgba(0,0,0,0.12));
}

.smart-money-row { cursor: default; }

.game-time {
  font-variant-numeric: tabular-nums; color: var(--muted);
  font-weight: 500;
}

@media (max-width: 840px) {
  .smart-money-table .col-odds { display: none; }
  .smart-money-table .col-consensus { width: 130px; }
  .consensus-cell .consensus-label { max-width: 120px; font-size: 0.78rem; }
  .consensus-gauge { max-width: 150px; }
}
@media (max-width: 600px) {
  .smart-money-table .col-when { width: 70px; font-size: 0.75rem; }
  .matchup-teams { font-size: 0.78rem; }
  .smart-money-table .col-consensus { width: 110px; }
  .consensus-cell .consensus-label { max-width: 100px; font-size: 0.72rem; }
  .consensus-gauge { max-width: 120px; }
  .gauge-team { display: none; }
}

/* ── Bettor profile mobile ───────────────────────────────────────── */
@media (max-width: 720px) {
  .picks-table-wrap { margin: 0 -1rem; }
  .picks-table { font-size: 0.8rem; }
  .picks-table th, .picks-table td { padding: 0.5rem 0.5rem; }
  .picks-table th:nth-child(4),
  .picks-table td.pick-odds { display: none; }
  .pick-event { max-width: 110px; font-size: 0.75rem; }
  .pick-selection { max-width: 120px; font-size: 0.8rem; }
  .outcome-badge { width: 22px; height: 22px; font-size: 0.65rem; }
  .metric-strip { gap: 1rem; }
  .metric-cell span { font-size: 1.2rem; }
  .ticker-panel-id h2 { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .picks-table th:nth-child(5),
  .picks-table td.pick-profit { display: none; }
  .pick-event { max-width: 90px; }
  .pick-selection { max-width: 100px; font-size: 0.75rem; }
  .metric-strip { flex-direction: column; gap: 0.5rem; }
  .metric-cell { align-items: flex-start; text-align: left; }
}

/* ── Trueearnings 5-tab: Picks / Stocks / Pickers / Alerts / Watchlist ──────── */

/* Filter / sort chips shared by Picks, Stocks, Pickers. */
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem;
}
.filter-chip {
  display: inline-flex; align-items: center; padding: 0.35rem 0.85rem;
  font-size: 0.85rem; font-weight: 600; color: var(--fg-soft);
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; transition: all 0.12s ease;
}
.filter-chip:hover { border-color: var(--line-strong); text-decoration: none; }
.filter-chip.active {
  color: var(--bg); background: var(--fg);
  border-color: var(--fg);
}

/* Smart Pick Score chip — tiered by strength. */
.score-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; padding: 0.2rem 0.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums; border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.score-chip--strong { background: var(--good); color: #fff; }
.score-chip--good { background: var(--good-soft); color: var(--good); }
.score-chip--weak { background: var(--mid-bg); color: var(--mid-fg); }
.score-chip--low { background: var(--bg-soft); color: var(--muted); }
.score-chip--inline { min-width: 0; margin-left: 0.4rem; font-size: 0.78rem; }

/* Signal verdict badge. */
.signal-badge {
  display: inline-flex; align-items: center; padding: 0.25rem 0.6rem;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.01em;
  border-radius: 999px; white-space: nowrap;
  background: var(--bg-soft); color: var(--fg-soft); border: 1px solid var(--line);
}
.signal-badge--strong-buy-signal { background: var(--good-soft); color: var(--good); border-color: transparent; }
.signal-badge--early-momentum { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.signal-badge--crowded-trade { background: var(--mid-bg); color: var(--mid-fg); border-color: transparent; }
.signal-badge--high-risk-high-upside { background: #f5f3ff; color: #6d28d9; border-color: transparent; }
.signal-badge--fade-signal { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.signal-badge--already-ran { background: var(--bg-tint); color: var(--muted); border-color: transparent; }
.signal-badge--watch-only { background: var(--bg-soft); color: var(--muted); }

/* Score breakdown bars (stock detail Verdict panel). */
.signal-breakdown { margin-top: 1rem; display: grid; gap: 0.5rem; }
.signal-breakdown-title { font-size: 0.95rem; margin: 0 0 0.35rem; }
.score-bar-row {
  display: grid; grid-template-columns: 130px 1fr 34px; align-items: center;
  gap: 0.6rem; font-size: 0.85rem;
}
.score-bar-label { color: var(--fg-soft); }
.score-bar-track {
  height: 8px; border-radius: 999px; background: var(--bg-soft);
  overflow: hidden;
}
.score-bar-fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}
.score-bar-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.signal-risk-note { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--bad); }

/* Trueearnings Verdict card on the stock detail page. */
.opentrades-verdict { margin-bottom: 1.25rem; }
.verdict-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.verdict-score { display: flex; align-items: center; gap: 0.6rem; }
.verdict-score-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.verdict-summary { margin: 0.75rem 0 0; font-size: 1.02rem; color: var(--fg); line-height: 1.5; }

/* Watch button + row actions. */
.pick-actions { display: inline-flex; align-items: center; gap: 0.5rem; }
.watch-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.32rem 0.7rem; font-size: 0.82rem; font-weight: 600;
  color: var(--fg-soft); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.12s ease;
}
.watch-btn svg { width: 15px; height: 15px; }
.watch-btn:hover { border-color: var(--accent); color: var(--accent); }
.watch-btn--on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.portfolio-btn:hover { border-color: var(--good); color: var(--good); }
.portfolio-btn.watch-btn--on { color: var(--good); border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.see-why-btn {
  display: inline-flex; align-items: center; padding: 0.32rem 0.7rem;
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.see-why-btn:hover { border-color: var(--accent); text-decoration: none; }
.ticker-detail-head-actions { margin-left: auto; }

/* Ticker id stack (symbol + company name). */
.ticker-id { display: inline-flex; flex-direction: column; line-height: 1.2; }
.ticker-sym { font-weight: 600; }
.ticker-company { font-size: 0.76rem; color: var(--muted); }

/* Compact consensus pill in the Stocks table. */
.consensus-mini {
  display: inline-flex; padding: 0.18rem 0.5rem; font-size: 0.78rem;
  font-weight: 600; border-radius: 999px;
}
.consensus-mini--bull { background: var(--good-soft); color: var(--good); }
.consensus-mini--bear { background: var(--bad-soft); color: var(--bad); }
.col-score { width: 64px; }
.col-signal { width: 150px; }
.col-mentions { width: 90px; }
.col-actions { width: 1%; white-space: nowrap; }

/* Alerts table. */
.alert-badge {
  display: inline-flex; padding: 0.22rem 0.55rem; font-size: 0.74rem;
  font-weight: 700; border-radius: 999px; white-space: nowrap;
}
.alert-badge--new-high-quality { background: var(--good-soft); color: var(--good); }
.alert-badge--picker-convergence { background: var(--accent-soft); color: var(--accent-deep); }
.alert-badge--breaks-top-picks { background: #f5f3ff; color: #6d28d9; }
.alert-badge--watched-stock { background: var(--mid-bg); color: var(--mid-fg); }
.alert-badge--watched-picker { background: var(--mid-bg); color: var(--mid-fg); }
.col-alert-type { width: 150px; }
.col-alert-title { display: flex; align-items: center; gap: 0.5rem; }
.alert-row--watched { background: var(--bg-tint); }

/* "New today" pill on the watchlist. */
.new-pill {
  display: inline-flex; padding: 0.18rem 0.5rem; font-size: 0.72rem;
  font-weight: 700; border-radius: 999px;
  background: var(--good-soft); color: var(--good);
}
.section-head { margin: 1.5rem 0 0.75rem; font-size: 1.1rem; }
.metric-grid--calls .metric-ticker { font-size: 0.85rem; color: var(--muted); margin-right: 0.25rem; }

@media (max-width: 720px) {
  .col-signal, .col-mentions, .col-pickers { display: none; }
  .score-bar-row { grid-template-columns: 100px 1fr 30px; }
}

/* ── Primary tabs (People / Most Bought / Most Sold) ─────────────── */
.primary-tabs {
  display: flex; gap: 0; margin: 0 0 1.25rem;
  border-bottom: 2px solid var(--line);
}
.primary-tab {
  position: relative; padding: 0.65rem 1.25rem; font-size: 0.9rem;
  font-weight: 600; color: var(--fg-soft); cursor: pointer;
  transition: color 0.15s ease; white-space: nowrap;
}
.primary-tab:hover { color: var(--fg); text-decoration: none; }
.primary-tab.active { color: var(--fg); }
.primary-tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--fg); border-radius: 1px 1px 0 0;
}

/* ── Category chips (All / Analysts / Politicians / …) ───────────── */
.category-chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem;
}
.cat-chip {
  display: inline-flex; align-items: center; padding: 0.3rem 0.8rem;
  font-size: 0.8rem; font-weight: 600; color: var(--fg-soft);
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; transition: all 0.12s ease;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cat-chip.active {
  color: #fff; background: var(--fg);
  border-color: var(--fg);
}
/* People tab: Funds / Politicians / Analysts selector sits above the table. */
.people-cat-bar { margin-top: -0.25rem; }

/* ── Stocks | Investors segmented toggle (single-source matrix) ───── */
/* Sits on the LEFT of the matrix toolbar (margin-right:auto pushes the
   funnel Filters button to the right). Pill container, filled active option. */
.mx-view-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  margin-right: auto; padding: 2px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px;
}
.mx-view-opt {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.32rem 0.9rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; color: var(--fg-soft);
  cursor: pointer; white-space: nowrap;
  transition: color 0.12s ease, background 0.12s ease;
}
.mx-view-opt:hover { color: var(--accent); text-decoration: none; }
.mx-view-opt.active { color: #fff; background: var(--fg); }

/* ── Leaderboard category pill ───────────────────────────────────── */
/* Neutral pill + a small on-brand category icon. Text matches the table's
   .pct numbers (same size / weight / tabular figures) so the column reads as
   one consistent typographic family rather than a tiny muted label. */
.category-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0;
  font-family: var(--font);
  font-size: inherit; font-weight: 600; letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--fg); background: none; border: none;
}
/* The icon carries the per-category brand color (currentColor on the SVG); the
   label stays in the normal text color. */
.category-pill-ico {
  flex: none; width: 1em; height: 1em;
  color: var(--cat-dot, var(--muted));
}
.category-pill--x { --cat-dot: var(--fg); }
.category-pill--institution { --cat-dot: #64748b; }
.category-pill--analyst { --cat-dot: #d97706; }
.category-pill--politician { --cat-dot: #db2777; }
.category-pill--insider { --cat-dot: #16a34a; }

/* ── Entity profile header ───────────────────────────────────────── */
.entity-head { display: flex; align-items: center; gap: 0.9rem; }
/* Give the header avatar an explicit circular size. The base `.avatar-wrap`
   sizes itself off its `::before` letter glyph (≈15px), which is far too small
   for a profile header — pin it to a 56px circle so the congressional headshot
   (or the monogram fallback) renders at a proper size. */
.entity-head .pc-avatar {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  font-size: 56px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border, rgba(0,0,0,.08));
}
/* Headshots are portrait crops — anchor to the top so the face (not the chin)
   stays in frame inside the circular mask. */
.entity-head .pc-avatar > img { object-position: top center; }
.entity-head h1 { margin: 0; }
.entity-head .meta { display: flex; align-items: center; gap: 0.5rem; margin: 0.3rem 0 0; }

/* ── Performance vs. S&P 500 card ─────────────────────────────────── */
.perf-card {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  align-items: stretch;
}
.perf-chart { position: relative; min-height: 320px; height: 340px; }
.perf-chart > canvas { width: 100% !important; height: 100% !important; }
.perf-stats {
  display: flex; flex-direction: column; gap: 1.1rem;
  border-left: 1px solid var(--border, rgba(0,0,0,.08));
  padding-left: 1.25rem;
  justify-content: center;
}
.perf-stat-label {
  font-size: 0.8rem; color: var(--muted, #6b7280);
  margin-bottom: 0.15rem;
}
.perf-stat-value {
  font-size: 1.6rem; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.perf-stat-foot {
  font-size: 0.72rem; color: var(--muted, #6b7280);
  margin-top: auto; padding-top: 0.5rem;
}
/* Earnings Grades vs S&P 500 performance card */
.grades-perf-wrap { margin-bottom: 1.25rem; }
.grades-perf-wrap .section-title { margin-bottom: 0.35rem; }
.grades-perf-note { margin: 0 0 0.85rem; max-width: 52rem; }
.grades-perf-prompt { margin: 0 0 1.25rem; padding: 0.85rem 1.1rem; }
.grades-perf-prompt p { margin: 0; color: var(--muted, #6b7280); font-size: 0.9rem; }
.grades-perf-head {
  display: flex; align-items: center; gap: 0.55rem;
  margin-bottom: 0.35rem;
}
.grades-perf-title {
  font-size: 0.95rem; font-weight: 600; color: var(--text, #111827);
}
.grades-perf-fallback { font-weight: 500; color: var(--muted, #6b7280); font-size: 0.82rem; }
.grades-perf-meta { margin: 0.15rem 0 0; font-size: 0.82rem; }
.grades-perf-card { grid-template-columns: 1fr; }
.grades-perf-headline .section-title { margin-bottom: 0; }
.grades-perf-foot { margin-top: 0.5rem; }
@media (max-width: 720px) {
  .perf-card { grid-template-columns: 1fr; }
  .perf-stats {
    border-left: none; padding-left: 0;
    border-top: 1px solid var(--border, rgba(0,0,0,.08));
    padding-top: 1rem;
    flex-direction: row; flex-wrap: wrap; gap: 1.25rem;
  }
  .perf-stat-foot { width: 100%; margin-top: 0; }
}

/* ── Unified entity tracker ───────────────────────────────────────── */
/* Range buttons sit centered below the performance card (Robinhood-style). */
.tracker-perf-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.35rem;
}
.tracker-perf-head .section-title { margin: 0; }
.tracker-range-foot {
  display: flex; justify-content: center;
  padding: 0.85rem 1.25rem 1.1rem;
}
.tracker-range {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--surface-2, rgba(0,0,0,.04));
  border-radius: 999px; padding: 3px;
}
.tracker-range-btn {
  border: none; background: transparent; cursor: pointer;
  font: inherit; font-size: 0.78rem; font-weight: 600;
  color: var(--muted, #6b7280);
  padding: 0.28rem 0.7rem; border-radius: 999px; line-height: 1;
  transition: background-color .12s ease, color .12s ease;
}
.tracker-range-btn:hover { color: var(--text, #111); }
.tracker-range-btn.is-active {
  background: var(--card-bg, #fff); color: var(--fg, #111);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
/* Range windows too short for the curve's resolution (e.g. 1M/3M on a quarterly
   institution curve) are disabled rather than silently showing the full range. */
.tracker-range-btn.is-disabled,
.tracker-range-btn:disabled {
  opacity: 0.38; cursor: not-allowed; color: var(--muted, #6b7280);
  background: transparent; box-shadow: none;
}

/* Holdings table + distribution donut side by side. */
.tracker-holdings-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem;
  align-items: start;
}
.tracker-holdings-table { min-width: 0; }
.tracker-donut-card { padding: 1rem 1.1rem; }
.tracker-donut-title {
  font-size: 0.8rem; font-weight: 600; color: var(--muted, #6b7280);
  margin-bottom: 0.5rem;
}
.tracker-donut-wrap { position: relative; height: 260px; }
.tracker-donut-wrap > canvas { width: 100% !important; height: 100% !important; }
@media (max-width: 860px) {
  .tracker-holdings-grid { grid-template-columns: 1fr; }
}

/* Weight cell: a thin allocation bar + % value. */
.tracker-weight {
  display: inline-flex; align-items: center; gap: 0.5rem;
  justify-content: flex-end; width: 100%;
}
.tracker-weight-bar {
  position: relative; flex: 1; max-width: 110px; height: 6px;
  background: var(--surface-2, rgba(0,0,0,.06)); border-radius: 999px;
  overflow: hidden;
}
.tracker-weight-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.tracker-weight-fill--long { background: var(--good, #16a34a); }
.tracker-weight-fill--short { background: var(--bad, #dc2626); }
.tracker-weight-val {
  font-variant-numeric: tabular-nums; font-size: 0.82rem;
  min-width: 3.2em; text-align: right;
}

/* Trade-volume-by-year card reuses the UW-trend chart frame. */
.tracker-volume .uw-trend-chart-wrap { height: 260px; }
/* Legend swatches mirror the bars: translucent fill + solid full-color
   border (instead of the default solid square), scoped to the volume card. */
.tracker-volume .uw-trend-legend-item::before {
  width: 12px; height: 12px; border: 2px solid transparent;
}
.tracker-volume .uw-trend-legend--buy::before {
  background: rgba(22, 163, 74, 0.15); border-color: var(--good, #16a34a);
}
.tracker-volume .uw-trend-legend--sell::before {
  background: rgba(220, 38, 38, 0.15); border-color: var(--bad, #dc2626);
}

/* Uniform vertical rhythm between the entity-tracker sections (metric grid,
   perf card, volume card, holdings, history). Each block previously carried
   its own ad-hoc margin (2rem / 1rem / 0), so the stack read unevenly — one
   gap owns the spacing now. */
.tracker-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.tracker-stack > * { margin-bottom: 0; }

/* Horizontal-scroll guard: a wide tracker table scrolls inside its own card on
   small screens instead of forcing the whole page to scroll sideways. */
.tracker-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Sticky data-table headers (desktop) ─────────────────────────────────
   Anchor the column titles of EVERY data table in the app shell just under the
   sticky top-bar as you scroll, so you never lose track of which column is
   which on a long list. Covers:
     • every `.leaderboard` table in `.app-content` — screener / profile / feed
       tables (in `.screener-wrap` or `.leaderboard-wrap`) AND the Most Bought
       matrix (`.matrix-wrap`, handled as a special case below)
     • every `.picks-table` (bettor sport panels, prediction wallet)

   Mechanics: the page (window) is the scroller, so for `position: sticky` to
   resolve against the window NO ancestor between the <th> and the window may
   be a scroll container. The card wrappers are `overflow: clip` (clips like
   `hidden` but is NOT a scroll container), and the horizontal-scroll guards
   (`.tracker-table-scroll`, `.picks-table-wrap`) are only needed on phones, so
   we relax them to `visible` on desktop (these tables fit the panel at
   >=841px).

   The Most Bought matrix is the one exception (see the matrix block lower in
   this file): it is genuinely wider than the panel and MUST keep a horizontal
   scrollbar — which is necessarily a scroll container — so it becomes a
   self-contained frozen-header grid instead of a page-scroll sticky header.

   Scoped to desktop: on phones the top-bar wraps to a variable height and the
   horizontal guards must stay live, so headers render static there. */
@media (min-width: 841px) {
  .tracker-table-scroll,
  .picks-table-wrap { overflow: visible; }

  .app-content .leaderboard thead th,
  .app-content .picks-table thead th,
  .screener-wrap .leaderboard thead th {
    position: sticky;
    top: 56px;        /* clears the 56px sticky .app-topbar */
    z-index: 2;       /* above body rows, below the topbar (z-index:9) */
  }
  /* `.picks-table` headers are transparent by default — give them the same
     opaque fill as the leaderboard headers so rows never bleed through the
     header when it sticks. */
  .app-content .picks-table thead th { background: var(--bg-soft); }
}

/* The generic `@media (max-width:720px) .leaderboard th:nth-child(3)/(6)` rule
   (~line 1128) is tuned for the PUBLIC leaderboard's fixed columns and would
   desync the tracker tables' headers from their cells (it hides only specific
   header/`.col-num` cells by position). Neutralize it for the tracker tables —
   their column priority is owned by the `.tracker-col-*` classes below. Scoped
   to `.tracker-table-scroll` so it outranks the generic rule by specificity. */
@media (max-width: 720px) {
  .tracker-table-scroll .leaderboard .col-tickers,
  .tracker-table-scroll .leaderboard th:nth-child(3),
  .tracker-table-scroll .leaderboard th:nth-child(6),
  .tracker-table-scroll .leaderboard .col-num:nth-child(6) { display: table-cell; }
}

/* Mobile column-priority: keep the core story on a 375px screen —
   Ticker · Trade size · Return · Date (trades) and
   Ticker · Est. value · Latest trade · Date (holdings) — and drop the
   secondary price/weight columns. Cells stay in the DOM (display:none) so the
   header→cell sort mapping is unaffected. */
@media (max-width: 540px) {
  /* (0,4,0) — outranks the ≤720 neutralizer's nth-child re-show (0,3,1) above,
     so the low-value columns hide cleanly on BOTH the th and td (the class sits
     on both, keeping header↔cell alignment + sort mapping intact). */
  .tracker-table-scroll .leaderboard.screener-table .tracker-col-entry,
  .tracker-table-scroll .leaderboard.screener-table .tracker-col-current,
  .tracker-table-scroll .leaderboard.screener-table .tracker-col-target,
  .tracker-table-scroll .leaderboard.screener-table .tracker-col-price,
  .tracker-table-scroll .leaderboard.screener-table .tracker-col-weight { display: none; }
  /* The big metric values (+202%) overwhelm a single-column phone card.
     Descendant selectors (0,2,0) outrank the top-level .metric-value/.metric
     rules in cursor_light.css (0,1,0), which load after this sheet. */
  .metric-grid .metric { padding: 1.1rem 1.15rem; }
  .metric-grid .metric-value { font-size: 1.5rem; }
  /* Keep charts from dominating the fold. */
  .perf-chart { min-height: 220px; height: 240px; }
  .tracker-donut-wrap { height: 220px; }
  .tracker-volume .uw-trend-chart-wrap { height: 220px; }
  /* Range buttons become full-width, 44px-tall touch targets. */
  .tracker-range { width: 100%; justify-content: space-between; }
  .tracker-range-btn { flex: 1; padding: 0.75rem 0.5rem; min-height: 44px; }
  /* Sortable headers + rows get comfortable tap height. */
  .tracker-table-scroll .screener-table th,
  .tracker-table-scroll .screener-table td { padding-top: 0.7rem; padding-bottom: 0.7rem; }
}

/* ── Sentiment matrix (Most Bought) ──────────────────────────────── */
.sentiment-matrix-head {
  display: flex; flex-direction: column; gap: 0.7rem; margin: 0 0 1rem;
}
.sentiment-matrix-head .meta { margin: 0; }
/* Toolbar row: Filters menu pinned to the far right above the table. */
.matrix-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; gap: 0.75rem;
}
/* Titled variant (single "Latest Picks" matrix): page title sits on the left,
   Filters on the right — one clean header row directly above the table, instead
   of a standalone heading with a lonely Filters button floating below it. */
.matrix-toolbar--titled { justify-content: space-between; }
.matrix-title {
  margin: 0; gap: 0.55rem;
  font-size: 1.5rem; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.01em; color: var(--fg);
}
.matrix-title-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
}
.matrix-title-ico svg { width: 18px; height: 18px; }
.period-chips {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.matrix-legend {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.72rem; color: var(--muted); white-space: nowrap;
}
.matrix-legend .mx-bar { width: 40px; }
.legend-sep { width: 1px; height: 14px; background: var(--line); margin: 0 0.2rem; }

/* ── Filters menu (funnel button → popover) ──────────────────────── */
.filter-menu { position: relative; }
.filter-menu > summary { list-style: none; cursor: pointer; }
.filter-menu > summary::-webkit-details-marker { display: none; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 0.8rem; font-weight: 600; color: var(--fg-soft);
  transition: border-color 0.12s ease, color 0.12s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn svg { width: 15px; height: 15px; }
.filter-btn.has-active { border-color: var(--accent); color: var(--accent); }
.filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 0.66rem; font-weight: 700;
}
.filter-menu[open] > summary .filter-btn,
.filter-menu[open] .filter-btn { border-color: var(--accent); color: var(--accent); }
.filter-pop {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 30;
  min-width: 260px; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.85rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.filter-pop-group { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-pop-label {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted-soft);
}
.filter-pop-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* The matrix has many source columns — size to content and scroll
   horizontally rather than squishing every column to fit. */
.app-content .leaderboard-wrap.matrix-wrap { overflow-x: auto; }
.sentiment-matrix { width: max-content; min-width: 100%; }
/* The Latest Trades feed lives in the same .matrix-wrap (scrolls horizontally),
   so size its columns to content + fill at minimum — like the matrix — instead
   of stretching the last column to fill leftover width. */
.trades-feed { width: max-content; min-width: 100%; }

/* Most Bought matrix → frozen-header grid on desktop. It can't use the
   page-scroll sticky header (it needs a horizontal scrollbar, which is also a
   vertical scroll container), so instead the whole grid pins under the top-bar
   and scrolls its rows INTERNALLY with the header frozen at the grid's own top.
   Result: the source-column headers stay visible while you scroll the rows,
   same as every other table. (Placed after the base rule above so it wins on
   source order.) */
@media (min-width: 841px) {
  .app-content .leaderboard-wrap.matrix-wrap {
    position: sticky;
    top: 56px;                       /* pin just under the .app-topbar */
    overflow: auto;                  /* both axes: keeps horizontal scroll */
    max-height: calc(100vh - 56px);  /* fill the viewport below the top-bar */
  }
  .app-content .leaderboard-wrap.matrix-wrap thead th {
    top: 0;       /* freeze at the grid's own top, not the page top */
    z-index: 3;
  }
}

/* Mobile (Most Bought board): mirror the desktop frozen-header grid so the
   "Latest Picks" toolbar + Filters AND the column titles stay pinned while the
   rows scroll. Phones can't use a window-scroll sticky <th> (the matrix needs a
   horizontal scrollbar, which is necessarily a vertical scroll container too),
   so the toolbar pins under the sticky top-bar and the matrix becomes its own
   internal scroller with the header frozen at its top. Offsets are the live
   element heights, fed in as CSS vars by the measurer in app/base.html. */
@media (max-width: 840px) {
  .app-content .sentiment-matrix-head {
    position: sticky;
    top: calc(var(--ot-topbar-h, 50px) - 1px);   /* sit flush under the top-bar */
    z-index: 7;                                    /* above rows; popover sits above this; BELOW .app-topbar (9) so the search dropdown wins */
    background: var(--bg);                         /* opaque so rows don't bleed through */
    margin: 0 -1rem;                               /* bleed to the panel edges */
    padding: 0.7rem 1rem;
  }
  .app-content .leaderboard-wrap.matrix-wrap {
    position: sticky;
    top: calc(var(--ot-topbar-h, 50px) + var(--ot-mhead-h, 56px) - 1px);
    overflow: auto;                               /* both axes: keeps horizontal swipe */
    max-height: calc(100vh - var(--ot-topbar-h, 50px) - var(--ot-mhead-h, 56px) - var(--ot-tabbar-mh, 56px));
    max-height: calc(100dvh - var(--ot-topbar-h, 50px) - var(--ot-mhead-h, 56px) - var(--ot-tabbar-mh, 56px));
    -webkit-overflow-scrolling: touch;
  }
  .app-content .leaderboard-wrap.matrix-wrap thead th {
    position: sticky;
    top: 0;       /* freeze at the grid's own top */
    z-index: 3;
  }
}
.sentiment-matrix th.heat-col {
  text-align: center; width: 110px; min-width: 110px;
  white-space: nowrap; vertical-align: middle;
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.sentiment-matrix th.chg-col {
  text-align: center; width: 72px; min-width: 72px;
  white-space: nowrap; vertical-align: middle;
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.sentiment-matrix td.chg-cell { text-align: right; white-space: nowrap; }
.src-word--chg { font-size: 0.7rem; color: var(--fg-soft); letter-spacing: 0.02em; }
.sentiment-matrix td.heat-cell {
  text-align: center; vertical-align: middle; padding: 0.55rem 0.7rem;
}

/* Consistent square app-icon tile for every source logo. */
.src-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  overflow: hidden; flex-shrink: 0; transition: box-shadow 0.12s ease;
}
.src-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--fg-soft); }
.src-tile img.src-icon { width: 100%; height: 100%; }
.src-logo--img { object-fit: contain; }
.src-logo--avatar { object-fit: cover; }
.src-tile--x { background: #000; }
.src-logo--x { color: #fff; }
.src-tile--reddit { background: #ff4500; }
.src-logo--reddit { color: #fff; }

/* Header: logo tile (brand) or text word (non-brand) + a sort caret. */
.heat-col-inner { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 0.3rem; }
.src-word {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; max-width: 92px; font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-soft);
  line-height: 1.15; text-align: center;
}
.sort-caret { width: 12px; height: 13px; opacity: 0.45; vertical-align: middle; }
.col-sortable:hover .sort-caret,
.sort-caret.on { opacity: 1; }
/* Active sort direction: highlight the relevant caret half */
.sort-caret.on.sort-caret--asc polyline:first-child { stroke: var(--fg); stroke-width: 3; }
.sort-caret.on.sort-caret--asc polyline:last-child { opacity: 0.25; }
.sort-caret.on.sort-caret--desc polyline:last-child { stroke: var(--fg); stroke-width: 3; }
.sort-caret.on.sort-caret--desc polyline:first-child { opacity: 0.25; }

/* Single % Chg column. */
/* Live-board flash: brief green/red highlight when a value ticks. */
@keyframes mxFlashUp {
  0% { background-color: color-mix(in srgb, var(--good) 28%, transparent); }
  100% { background-color: transparent; }
}
@keyframes mxFlashDown {
  0% { background-color: color-mix(in srgb, var(--bad) 28%, transparent); }
  100% { background-color: transparent; }
}
.mx-flash-up { animation: mxFlashUp 0.9s ease; border-radius: 4px; }
.mx-flash-down { animation: mxFlashDown 0.9s ease; border-radius: 4px; }

/* On-brand hover tooltip for the sentiment-matrix bars. */
.mx-tooltip {
  position: fixed; top: 0; left: 0; z-index: 200;
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  padding: 0.5rem 0.65rem; max-width: 240px;
  font-size: 0.78rem; line-height: 1.35;
  pointer-events: none; opacity: 0; transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.mx-tooltip.on { opacity: 1; transform: translateY(0); }
.mx-tooltip.below.on { transform: translateY(0); }
.mx-tt-src { display: block; font-weight: 700; margin-bottom: 2px; }
.mx-tt-row { display: flex; align-items: center; gap: 0.4rem; color: var(--fg-soft); white-space: nowrap; }
.mx-tt-row strong { color: var(--fg); font-weight: 700; }
.mx-tt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mx-tt-dot.is-long { background: var(--good); }
.mx-tt-dot.is-short { background: var(--bad); }

/* Single-source view: source logo beside the page heading. */
.page-head-title { display: inline-flex; align-items: center; gap: 0.55rem; }
.page-head-logo { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.page-head-logo .src-icon { width: 26px; height: 26px; }

/* Single-source view: bullish / bearish mention counts. */
.src-count-col { min-width: 96px; text-align: right; white-space: nowrap; }
.sentiment-matrix td.src-count-col { text-align: right; }
.src-count { font-family: var(--font-mono); font-weight: 600; font-size: 0.9rem; }
.src-count--bull { color: var(--good); }
.src-count--bear { color: var(--bad); }
/* Stocks glyph leading the Mentions group header. */
.src-win-head { display: inline-flex; align-items: center; gap: 0.3rem; justify-content: flex-end; white-space: nowrap; }
.src-count-icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--fg-soft); }
/* The chatter matrix carries five narrow windowed columns — tighten them so
   the wider table stays readable (the .matrix-wrap scrolls if needed). */
.src-matrix .src-count-col { min-width: 64px; }

.mx-chg-col { min-width: 84px; white-space: nowrap; }
.mx-winrate-col { min-width: 78px; text-align: right; white-space: nowrap; }
.mx-ytd-col { min-width: 92px; text-align: right; white-space: nowrap; }
.mx-winrate { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }
.mx-ytd { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }

/* "Picker" column — one placeholder owning handle per ticker. */
.col-picker { min-width: 150px; }
.mx-picker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--fg); text-decoration: none; max-width: 168px;
}
.mx-picker:hover { text-decoration: none; }
.mx-picker:hover .mx-picker-handle { color: var(--accent); }
.mx-picker-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  font-size: 26px; overflow: hidden;
}
.mx-picker-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ── Liquid-glass placeholder avatars ──────────────────────────────────────
   `.lg-avatar` (a marked `.avatar-wrap`) renders its placeholder state as a
   frosted white/black glass disc. The `.lg-av-visual` layer paints a
   white→black gradient + soft highlight blobs, and — once OTGlass has installed
   the shared SVG displacement filter (`html.lg-glass-ready`) — that layer is
   REFRACTED by `#ot-avatar-glass`, the vendored engine's displacement map
   reused as one global, static, size-independent filter (no per-element engine,
   so it survives the matrix's row cloning + htmx swaps with zero JS lifecycle).
   The data-letter initial floats crisp on top; a loaded profile <img> covers
   everything. Pure CSS still looks glassy if the engine never loads. */
.lg-av-visual {
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(42% 42% at 30% 26%, rgba(255, 255, 255, 0.92), transparent 64%),
    radial-gradient(46% 46% at 76% 80%, rgba(255, 255, 255, 0.30), transparent 70%),
    linear-gradient(150deg,
      rgba(12, 14, 18, 0.92) 0%,
      rgba(70, 74, 82, 0.60) 50%,
      rgba(255, 255, 255, 0.42) 100%);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.55),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.15);
}
/* Refract the glass layer only in the placeholder state (no resolved photo). */
.lg-glass-ready .lg-avatar:not(:has(> img)) .lg-av-visual { filter: url(#ot-avatar-glass); }
/* Initial floats crisp above the glass; a loaded opaque <img> (z-index 2)
   covers both it and the glass layer. */
.lg-avatar::before {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
.lg-avatar > img { z-index: 2; }

.mx-picker-handle {
  font-size: 0.82rem; font-weight: 500; color: var(--fg-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Latest Trades feed: the picker is often a full entity name
   ("Rep. Gilbert Cisneros (D-CA)", analysts, insiders), not a short @handle.
   Give the column room and wrap to two lines rather than ellipsing it away.
   Scoped to .trades-feed so the bought matrix (always short @handles) is
   unaffected. */
.trades-feed .col-picker { min-width: 210px; }
.trades-feed .mx-picker { max-width: 260px; }
.trades-feed .mx-picker-handle {
  white-space: normal;
  text-overflow: clip;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* Analyst-only "Firm" column (e.g. JP Morgan). Desktop-only — hidden under the
   840px app-shell breakpoint (where the mobile tab bar takes over) so the
   phone table keeps to its core columns. */
.trades-feed .mx-firm-col { min-width: 130px; max-width: 200px; }
.trades-feed .mx-firm {
  font-size: 0.85rem; font-weight: 600; color: var(--fg-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; max-width: 200px;
}
@media (max-width: 840px) {
  .trades-feed .mx-firm-col { display: none; }
}
.mx-price-col { min-width: 84px; text-align: right; }
.sentiment-matrix td.mx-price-col { text-align: right; white-space: nowrap; }
.mx-price { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }
.mx-na { color: var(--fg-soft); font-weight: 500; }
.mx-ticker { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }

.mx-consensus-col { min-width: 124px; text-align: right; white-space: nowrap; }
.mx-consensus { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }
/* Consensus cell: majority-side label stacked over a red/green bar, matching
   the stock-page sentiment bar (.mx-bar/.mx-bar-fill). */
.mx-consensus-wrap {
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.mx-consensus-bar { width: 96px; }

/* Smart Money consensus column. Reuses the .mx-consensus label/bar treatment;
   no special highlight so it reads as a peer of the other source columns. */
.mx-smart-col { min-width: 128px; text-align: right; white-space: nowrap; }

.mx-flow-col { min-width: 110px; text-align: right; white-space: nowrap; position: relative; padding-bottom: 10px !important; }
.mx-flow-val { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }
.mx-net-col { min-width: 120px; }

/* Single-source flow cells reuse the Stocks-tab pill bar (faded track + solid
   fill). The `flow-bar` classes stay as semantic hooks on the fill. */
.mx-flow-col .mx-bar {
  display: flex; align-items: center;
  width: 100%; margin-top: 4px;
}
.mx-updated-col { min-width: 100px; text-align: right; white-space: nowrap; }
.mx-updated {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--muted); font-variant-numeric: tabular-nums;
}

/* Pin matrix rows to a fixed 48px pitch. The row separator is drawn with an
   inset box-shadow (NOT a border) so it does NOT add to the row's box height.
   With border-collapse a 1px border would make the real per-row pitch 49px —
   an odd number — and under fractional display scaling (125%/150%) each row
   then lands on a different device-pixel phase, so the centered 6px bars round
   to slightly different thicknesses. A 48px pitch (a multiple of 4) maps to a
   whole number of device pixels at 100/125/150/200% scaling, so every bar
   shares the same phase and renders at an identical thickness. */
.sentiment-matrix tbody tr { height: 60px; }
/* Fixed 60px rows (25% taller than the original 48px for more breathing room;
   still a multiple of 4 so the bar-thickness device-pixel alignment above
   holds). Center every cell's content so odometer reels, plain numbers, logos,
   and bars all sit on one midline instead of a text baseline. */
.sentiment-matrix tbody td { padding-top: 0; padding-bottom: 0; vertical-align: middle; }

/* Live incoming tape — recent picker call slides into row 1. */
@keyframes matrixRowEnter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sentiment-matrix tbody tr.matrix-row-enter,
.trades-feed tbody tr.matrix-row-enter {
  animation: matrixRowEnter 0.65s ease-out;
}
/* Incoming tape: ticker stays normal body color — no sentiment tint. */
.sentiment-matrix tbody tr[data-incoming="1"] .mx-ticker,
.sentiment-matrix tbody tr[data-incoming="1"] .handle,
.sentiment-matrix tbody tr.matrix-row-enter .mx-ticker,
.sentiment-matrix tbody tr.matrix-row-enter .handle,
.sentiment-matrix tbody tr[class*="matrix-row-promote"] .mx-ticker {
  color: var(--fg);
}
/* Latest Trades live incoming row — slide + brief accent flash. */
.trades-feed tbody tr.trade-row[data-incoming="1"] {
  animation: matrixRowEnter 0.65s ease-out, trade-row-flash 2.2s ease-out;
}
@keyframes trade-row-flash {
  0%, 100% { background-color: transparent; }
  12% { background-color: color-mix(in srgb, var(--accent, #2563eb) 10%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .sentiment-matrix tbody tr.matrix-row-enter,
  .trades-feed tbody tr.matrix-row-enter,
  .trades-feed tbody tr.trade-row[data-incoming="1"] {
    animation: none;
  }
}

/* Source cell: a single full-width directional pressure bar; its % change
   lives in the adjacent .chg-cell column.
   Each bar (track + fill) is promoted to its own compositing layer via
   translateZ(0). That snaps it to the device-pixel grid so the 6px height
   rasterizes identically in every row instead of being antialiased onto a
   different sub-pixel boundary per row under fractional display scaling. */
.sentiment-matrix td.heat-cell .mx-bar {
  display: flex; align-items: center; width: 100%;
  height: 8px; border-radius: 999px;
  transform: translateZ(0); backface-visibility: hidden;
}
.sentiment-matrix td.heat-cell--pending .mx-bar--skel {
  background: transparent;
}
.sentiment-matrix td.heat-cell--pending .skel-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
}
.src-matrix[data-chatter] .src-count.skel-bar,
.src-matrix[data-chatter] .mx-updated.skel-bar,
.src-matrix[data-chatter] .mx-consensus-wrap .skel-bar {
  display: inline-block;
  width: 3.5rem;
  height: 10px;
  border-radius: 999px;
}
.src-matrix[data-chatter] td[data-win="bull"] .skel-bar {
  width: 5.5rem;
}
/* Hide the matrix while the saved tape order is replayed after refresh — avoids
   one frame of SSR sort/rank numbers before rows shuffle into place. */
.matrix-wrap.matrix-restoring .sentiment-matrix tbody {
  visibility: hidden;
}
.mx-bar { height: 8px; border-radius: 999px; }
.mx-bar-fill {
  display: block; height: 8px; border-radius: 999px;
  transform: translateZ(0); backface-visibility: hidden;
}
/* Solid fill on a faded track of the same color (no gradient). */
.mx-bar--long { background: var(--good-soft); }
.mx-bar--short { background: var(--bad-soft); }
.mx-bar-fill--long { background: var(--good); }
.mx-bar-fill--short { background: var(--bad); }
.mx-change {
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; text-align: right;
}
.mx-change.pct-pos { color: var(--good); }
.mx-change.pct-neg { color: var(--bad); }

/* Subtle row separation only — no vertical grid lines, no zebra. Drawn with an
   inset box-shadow rather than a border so it stays out of the layout box and
   the row pitch remains an exact 48px (see the bar-thickness note above). */
.sentiment-matrix tbody tr td {
  border-bottom: none;
  box-shadow: inset 0 -1px 0 var(--line);
}
.sentiment-matrix tbody tr:last-child td { box-shadow: none; }
.sentiment-matrix tbody tr:hover td { background: var(--bg-soft); }
/* Sorted / focused source: thin accent underline under the header + tile ring. */
.sentiment-matrix th.heat-col.sorted,
.sentiment-matrix th.heat-col.src-focus { box-shadow: inset 0 -2px 0 var(--accent); }
.sentiment-matrix th.heat-col.sorted .src-tile,
.sentiment-matrix th.heat-col.src-focus .src-tile { box-shadow: 0 0 0 2px var(--accent-soft); }

@media (max-width: 720px) {
  .sentiment-matrix th.heat-col { width: 92px; min-width: 92px; }
  .sentiment-matrix th.chg-col { width: 60px; min-width: 60px; }
  .sentiment-matrix td.heat-cell { padding: 0.45rem 0.4rem; }

  /* The matrix is wide (picker + price + entry/return/trades/win/ytd + every
     source) so it scrolls horizontally on narrow screens. No column is frozen
     — every column (rank, picker, ticker, …) scrolls together when you swipe
     sideways. */
  .app-content .leaderboard-wrap.matrix-wrap { -webkit-overflow-scrolling: touch; }
  /* Trim the economics columns so more fits before the swipe. */
  .sentiment-matrix td, .sentiment-matrix th { font-size: 0.8rem; }
  .sentiment-matrix .mx-entry-col,
  .sentiment-matrix .mx-return-col,
  .sentiment-matrix .mx-trades-col,
  .sentiment-matrix .mx-winrate-col,
  .sentiment-matrix .mx-ytd-col { padding-left: 0.4rem; padding-right: 0.4rem; }
}

/* Buy/sell direction arrows in the people leaderboard ticker columns. */
.trade-arrow { flex-shrink: 0; }
.trade-arrow--buy { color: var(--good); }
.trade-arrow--sell { color: var(--bad); }

/* ── Avatar stacking for top-pickers columns ─────────────────────── */
.picker-stack {
  display: flex; align-items: center;
}
.avatar-mini {
  width: 24px; height: 24px; font-size: 10px;
  margin-left: -6px;
  border: 2px solid var(--surface);
  border-radius: 50%;
}
.avatar-mini:first-child { margin-left: 0; }
.avatar-mini img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-overflow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: -6px;
  background: var(--bg-soft); border: 2px solid var(--surface);
  border-radius: 50%; font-size: 0.65rem; font-weight: 700;
  color: var(--muted);
}

@media (max-width: 720px) {
  .primary-tab { padding: 0.55rem 0.85rem; font-size: 0.82rem; }
  .category-chips { gap: 0.35rem; }
  .cat-chip { padding: 0.25rem 0.65rem; font-size: 0.75rem; }
  .people-cat-bar {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem; margin-bottom: 0.75rem;
    scrollbar-width: none;
  }
  .people-cat-bar::-webkit-scrollbar { display: none; }
  .people-cat-bar .cat-chip { flex: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Onboarding funnel (/start) — Subpilot-style stepped selling page.
   Single-page, JS-advanced steps. All colors route through :root tokens so
   the funnel inherits light/dark themes automatically.
   ═══════════════════════════════════════════════════════════════════════════ */
.fn-app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── Top bar + progress ──────────────────────────────────────────────────── */
.fn-top {
  position: sticky; top: 0; z-index: 10;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.6rem;
  background: var(--bg);
}
.fn-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: none; background: transparent;
  color: var(--fg-soft); cursor: pointer; border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.fn-back:hover { background: var(--bg-soft); color: var(--fg); }
.fn-top .fn-brand { justify-self: center; }
/* Funnel brand sits ~3x larger than the default `sm` wordmark. */
.fn-top .fn-brand .brand-logo { height: 2.55rem; }
.fn-count {
  justify-self: end;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8rem; font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.fn-progress {
  height: 4px;
  background: var(--line);
  overflow: hidden;
}
.fn-progress-bar {
  height: 100%; width: 6%;
  background: var(--accent);
  border-radius: 0 999px 999px 0;
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}
/* First step is a clean intro: no progress bar, no step counter (back is
   already hidden on step 0). The brand stays centered (count column reserved). */
.fn-app.fn-at-start .fn-progress { display: none; }
.fn-app.fn-at-start .fn-count { visibility: hidden; }

/* ── Stage + steps ───────────────────────────────────────────────────────── */
.fn-stage {
  flex: 1 1 auto;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
}
.fn-step { display: none; }
.fn-step.is-active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  animation: fnFade .35s ease both;
}
@keyframes fnFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Typography ──────────────────────────────────────────────────────────── */
.fn-eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-deep);
}
.fn-h1 {
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  line-height: 1.12; font-weight: 800; letter-spacing: -0.02em;
  color: var(--fg); margin: 0.35rem 0 0;
}
.fn-h2 {
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  line-height: 1.18; font-weight: 800; letter-spacing: -0.015em;
  color: var(--fg); margin: 0;
}
.fn-accent { color: var(--accent-deep); }
.fn-sub { color: var(--muted); font-size: 1.02rem; line-height: 1.5; margin: 0; }
.fn-sub--tight { margin-top: -0.4rem; font-size: 0.92rem; }
.fn-body { color: var(--fg-soft); font-size: 1.02rem; line-height: 1.6; margin: 0; }
.fn-question { font-size: 1.15rem; font-weight: 700; color: var(--fg); margin: 0.5rem 0 0; }
.fn-fineprint { color: var(--muted-soft); font-size: 0.8rem; line-height: 1.45; margin: 0; }
.fn-lock { display: flex; gap: 0.35rem; align-items: baseline; }

/* ── Hook ────────────────────────────────────────────────────────────────── */
.fn-step[data-id="hook"] { text-align: center; align-items: center; }
.fn-step[data-id="hook"] > * { width: 100%; }
.fn-hero { display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }
.fn-hook-figure {
  margin-top: 0.85rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.fn-hook-img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 22%;
}
@media (max-width: 560px) {
  .fn-hook-img { height: 240px; }
}
.fn-hook-legal {
  text-align: center;
  color: var(--muted-soft);
  font-size: 0.82rem; line-height: 1.5;
  margin: 0.35rem 0 0;
}
.fn-hook-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ── Stat / loss chart interstitial ──────────────────────────────────────── */
.fn-step--chart { text-align: center; align-items: center; }
.fn-chart-head { display: flex; flex-direction: column; gap: 0.15rem; }
.fn-chart-stat {
  font-size: clamp(1.5rem, 5.5vw, 2rem); font-weight: 800;
  letter-spacing: -0.02em; color: var(--accent-deep);
}
.fn-chart-sub { font-size: 1rem; color: var(--muted); }
.fn-chart { margin: 0; width: 100%; }
.fn-chart-svg { display: block; width: 100%; height: auto; }

/* 100-person waffle: 97 lose (red), 3 win (green). */
.fn-waffle {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  width: 100%; max-width: 340px;
  margin: 0.4rem auto 0;
}
.fn-waffle-dot {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: var(--bad);
  opacity: 0.88;
}
.fn-waffle-dot.is-win {
  background: var(--good);
  opacity: 1;
  box-shadow: 0 0 8px var(--good);
}
.fn-chart-cap { margin-top: 0.4rem; font-size: 1.05rem; font-weight: 700; color: var(--fg); }
.fn-chart-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.1rem;
  margin-top: 0.55rem;
}
.fn-legend-item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600; color: var(--muted);
}
.fn-legend-item i {
  width: 16px; height: 3px; border-radius: 2px; flex: none;
  background: var(--muted);
}
.fn-legend-flat { background: var(--muted) !important; }
.fn-legend-loss, .fn-legend-win {
  width: 13px !important; height: 13px !important; border-radius: 3px !important;
}
.fn-legend-loss { background: var(--bad) !important; }
.fn-legend-win { background: var(--good) !important; }

/* ── Choices (Yes/No) ────────────────────────────────────────────────────── */
.fn-choices { display: flex; flex-direction: row; gap: 0.7rem; margin-top: 0.25rem; }
.fn-choice {
  flex: 1 1 0; min-width: 0;
  padding: 1.05rem 1.25rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg);
  font-size: 1.05rem; font-weight: 600;
  text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .08s ease;
}
.fn-choice:hover { border-color: var(--accent); background: var(--bg-soft); }
.fn-choice:active { transform: scale(.99); }
.fn-choice--yes { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-fg); }
.fn-choice--yes:hover { background: var(--accent); }

/* Hook Yes/No: uppercase label + trailing chevron + filled background. */
.fn-choices--hook .fn-choice {
  display: flex; align-items: center; justify-content: space-between;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
  background: var(--bg-soft);
}
.fn-choices--hook .fn-choice svg { flex: none; opacity: 0.55; transition: transform .15s ease, opacity .15s ease; }
.fn-choices--hook .fn-choice:hover svg { opacity: 1; transform: translateX(2px); }

/* ── Option lists (single-select quizzes) ───────────────────────────────── */
.fn-opts { display: flex; flex-direction: column; gap: 0.65rem; }
.fn-opt, .fn-check {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  width: 100%;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font-size: 1.02rem; font-weight: 600; text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .08s ease;
}
.fn-opt:hover, .fn-check:hover { border-color: var(--accent); background: var(--bg-soft); }
.fn-opt:active, .fn-check:active { transform: scale(.99); }
.fn-opt-emoji { font-size: 1.25rem; line-height: 1; }
.fn-check { position: relative; padding-left: 3rem; padding-right: 3rem; }
.fn-check-box {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line-strong);
  transition: background .15s ease, border-color .15s ease;
}
.fn-check.is-checked { border-color: var(--accent); background: var(--accent-soft); }
.fn-check.is-checked .fn-check-box {
  border-color: var(--accent-deep); background: var(--accent-deep);
}
.fn-check.is-checked .fn-check-box::after {
  content: "✓"; color: #fff; font-size: 0.8rem; font-weight: 800;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}

/* ── Continue / CTA buttons ──────────────────────────────────────────────── */
.fn-continue, .fn-cta {
  width: 100%;
  padding: 1.05rem 1.25rem;
  margin-top: 0.5rem;
  border: none; border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 1.08rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px var(--accent-glow);
  transition: background .15s ease, transform .08s ease, box-shadow .15s ease;
}
.fn-continue:hover, .fn-cta:hover { background: var(--accent-deep); }
.fn-continue:active, .fn-cta:active { transform: scale(.99); }
a.fn-cta { display: block; text-align: center; text-decoration: none; }

/* ── Info interstitials ──────────────────────────────────────────────────── */
.fn-info {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.fn-stat { display: flex; flex-direction: column; gap: 0.35rem; }
.fn-stat-num {
  font-size: clamp(2.4rem, 9vw, 3.2rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  color: var(--good);
}
.fn-stat-label { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.fn-beforeafter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  align-items: end; height: 150px;
}
.fn-ba-col { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; justify-content: flex-end; height: 100%; }
.fn-ba-cap { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.fn-ba-bar { width: 64px; border-radius: 10px 10px 0 0; }
.fn-ba-bar--bad { height: 46px; background: var(--bad-soft); border: 1px solid var(--bad); }
.fn-ba-bar--good { height: 120px; background: linear-gradient(180deg, var(--accent), var(--accent-deep)); }
.fn-ba-val { font-size: 0.82rem; font-weight: 700; }
.fn-ba-val--bad { color: var(--bad); }
.fn-ba-val--good { color: var(--accent-deep); }

/* ── Investor follow cards ───────────────────────────────────────────────── */
.fn-step--investor { align-items: center; text-align: center; }
.fn-investor { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.avatar-wrap.fn-portrait {
  width: 148px; height: 148px;
  font-size: 148px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--surface);
  outline: 1px solid var(--line);
}
.fn-investor-cat {
  margin-top: 0.6rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.fn-investor-name { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.015em; color: var(--fg); margin: 0; }
.fn-investor-ytd { display: flex; align-items: baseline; gap: 0.4rem; justify-content: center; }
.fn-investor-ytd-val { font-size: 1.7rem; font-weight: 800; }
.fn-investor-ytd-val .pct { font-size: inherit; font-weight: inherit; }
.fn-investor-ytd-label { color: var(--muted); font-size: 0.9rem; }
.fn-investor-blurb { color: var(--fg-soft); font-size: 0.98rem; line-height: 1.5; max-width: 38ch; margin: 0.2rem auto 0; }
.fn-step--investor .fn-choices { width: 100%; }

/* Per-investor outperformance chart (trader vs S&P 500). */
.fn-perf { margin: 0.2rem 0 0; width: 100%; }
.fn-perf-svg { display: block; width: 100%; height: auto; max-height: 160px; }
.fn-perf-area { fill: var(--good); opacity: 0.15; }
.fn-perf-spx { stroke: var(--muted); opacity: 0.65; }
.fn-perf-line { stroke: var(--good); }
.fn-perf-dot { fill: var(--good); stroke: var(--surface); stroke-width: 3; }
.fn-perf-dot-spx { fill: var(--muted); stroke: var(--surface); stroke-width: 3; }
.fn-perf-cap { margin-top: 0.3rem; font-size: 0.78rem; color: var(--muted-soft); }

/* ── Reviews ─────────────────────────────────────────────────────────────── */
.fn-reviews { display: flex; flex-direction: column; gap: 0.85rem; }
.fn-review {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.fn-review p { margin: 0.4rem 0 0.6rem; color: var(--fg-soft); line-height: 1.5; font-size: 0.98rem; }
.fn-stars { color: #f5a623; letter-spacing: 0.1em; font-size: 0.95rem; }
.fn-review-by { font-size: 0.85rem; font-weight: 700; color: var(--muted); }

/* ── Email field ─────────────────────────────────────────────────────────── */
.fn-field { display: flex; flex-direction: column; gap: 0.4rem; }
.fn-input {
  width: 100%;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg);
  font-size: 1.05rem; font-family: var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fn-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.fn-field-err { color: var(--bad); font-size: 0.85rem; margin: 0; }

/* Email domain autocomplete (Gmail-style suggestions). */
.fn-input-wrap { position: relative; }
.fn-suggest {
  list-style: none; margin: 0; padding: 0.3rem;
  position: absolute; left: 0; right: 0; top: calc(100% + 0.4rem); z-index: 30;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  text-align: left;
}
.fn-suggest li {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.8rem; border-radius: calc(var(--radius) - 5px);
  font-size: 1rem; color: var(--muted); cursor: pointer;
}
.fn-suggest li svg { flex: none; color: var(--muted-soft); }
.fn-suggest li b { color: var(--fg); font-weight: 700; }
.fn-suggest li:hover, .fn-suggest li.is-active { background: var(--bg-soft); color: var(--fg); }
.fn-suggest li:hover svg, .fn-suggest li.is-active svg { color: var(--fg-soft); }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.fn-step--loading { flex: 1 1 auto; align-items: center; justify-content: center; text-align: center; min-height: 50vh; }
.fn-loader { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.fn-ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 5px solid var(--line);
  border-top-color: var(--accent);
  animation: fnSpin 0.9s linear infinite;
}
@keyframes fnSpin { to { transform: rotate(360deg); } }
.fn-loader-status { color: var(--muted); font-size: 0.98rem; min-height: 1.4em; }

/* ── Plan select ─────────────────────────────────────────────────────────── */
.fn-period {
  display: inline-flex; align-self: center; gap: 0.25rem;
  padding: 0.25rem; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.fn-period-btn {
  border: none; background: transparent; cursor: pointer;
  padding: 0.5rem 1rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: background .15s ease, color .15s ease;
}
.fn-period-btn.is-active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.fn-period-save { font-size: 0.72rem; font-weight: 700; color: var(--accent-deep); }
.fn-plans { display: flex; flex-direction: column; gap: 0.7rem; }
.fn-plan {
  position: relative; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.fn-plan:hover { border-color: var(--line-strong); }
.fn-plan.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.fn-plan-badge {
  position: absolute; top: -10px; right: 14px;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.fn-plan-name { font-size: 1.1rem; font-weight: 800; color: var(--fg); }
.fn-plan-price { font-size: 0.95rem; color: var(--fg-soft); }
.fn-plan-price b { font-size: 1.25rem; font-weight: 800; color: var(--fg); }
.fn-plan-desc { font-size: 0.88rem; color: var(--muted); }

@media (max-width: 560px) {
  .fn-stage { padding: 1.25rem 1rem 2.5rem; }
  .avatar-wrap.fn-portrait { width: 128px; height: 128px; font-size: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  .fn-step.is-active { animation: none; }
  .fn-progress-bar { transition: none; }
  .fn-ring { animation: none; border-top-color: var(--accent); }
}

/* ── Embedded checkout sheet (compact in-funnel paywall) ─────────────────── */
.fn-sheet {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.fn-sheet[hidden] { display: none; }
body.fn-sheet-lock { overflow: hidden; }
.fn-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 12, 20, 0.55);
  backdrop-filter: blur(2px);
  animation: fnSheetFade .18s ease;
}
.fn-sheet-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  max-height: calc(100dvh - 2rem);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(8, 12, 20, 0.35);
  overflow: hidden;
  animation: fnSheetRise .2s cubic-bezier(.2, .8, .25, 1);
}
.fn-sheet-close {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: none; border-radius: 50%; cursor: pointer;
  background: var(--bg-soft); color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.fn-sheet-close:hover { background: var(--line); color: var(--fg); }
.fn-sheet-head {
  padding: 1.15rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.fn-sheet-title { font-size: 1.15rem; font-weight: 800; color: var(--fg); margin: 0; }
.fn-sheet-sub { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0; }
.fn-sheet-body {
  position: relative;
  padding: 0.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#fn-checkout-mount { border-radius: var(--radius); overflow: hidden; min-height: 60px; }
.fn-sheet-spinner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.fn-ring--sm { width: 32px; height: 32px; border-width: 3px; }

@keyframes fnSheetFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fnSheetRise {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fn-sheet-backdrop, .fn-sheet-card { animation: none; }
}

/* ── Blur paywall (PAYWALL_MODE=blur) ────────────────────────────────────────
   The Top Stocks / Top Investors board renders for everyone; non-subscribers
   see the ticker (logo + symbol) and trader (avatar + name) blurred behind an
   unlock CTA. All the numbers stay crisp as a teaser. */

/* Generic full-content lock for every OTHER app page (ticker detail,
   leaderboards, feeds, portfolio, watchlist, etc.). The page renders as a
   teaser but is blurred + non-interactive; the whole area reads as one big
   unlock CTA (click → paywall sheet, wired in app/base.html). The board sets
   `custom_lock` and keeps its refined per-cell blur (.is-locked) instead. */
.app-content--locked {
  filter: blur(6px);
  -webkit-filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.app-content--locked * { pointer-events: none; }

.is-locked .col-handle .handle,
.is-locked .col-picker .mx-picker {
  filter: blur(5px);
  -webkit-filter: blur(5px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
/* The whole row is a CTA in locked mode — make that obvious on hover. */
.is-locked tbody tr.clickable-row { cursor: pointer; }

.ot-unlock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--accent, #2f6bff);
  border-radius: 14px;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--accent, #2f6bff) 12%, transparent),
    color-mix(in srgb, var(--accent, #2f6bff) 4%, transparent)
  );
}
.ot-unlock-copy { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.ot-unlock-title { font-weight: 700; font-size: 0.98rem; color: var(--text, #0b1220); }
.ot-unlock-sub { font-size: 0.85rem; color: var(--muted, #5b6472); }
.ot-unlock-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: var(--accent, #2f6bff);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s ease, transform .15s ease;
}
.ot-unlock-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
@media (max-width: 560px) {
  .ot-unlock-banner { flex-direction: column; align-items: stretch; }
  .ot-unlock-btn { justify-content: center; }
}

/* ── Lock badge (blur paywall) ──────────────────────────────────────────────
   A small brand-green lock badge (icon only, no label) over the blurred
   identity of EVERY clickable row. The bought matrix anchors it on the trader
   (col-picker) cell; the source matrix has no trader column, so it anchors on
   the ticker (col-handle) cell. The whole row is the click target in locked
   mode (capture handler → paywall sheet), so the badge is pointer-events:none
   and purely visual. The green is hardcoded — the app accent is monochrome,
   but this badge leans on the brand mark colour. */
.is-locked .sentiment-matrix tbody tr.clickable-row td.col-picker,
.is-locked .sentiment-matrix tbody tr.clickable-row td.col-handle,
.is-locked .src-matrix tbody tr.clickable-row td.col-handle { position: relative; }
.is-locked .sentiment-matrix tbody tr.clickable-row td.col-picker::after,
.is-locked .sentiment-matrix tbody tr.clickable-row td.col-handle::after,
.is-locked .src-matrix tbody tr.clickable-row td.col-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  /* Centered on the blurred picker cell. (YTD + Win rate now sit between the
     picker and ticker columns, so the two blurred columns are no longer
     adjacent — a single seam lock would land on the unblurred YTD cell.) */
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  /* Black lock on a white badge. */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center / 15px no-repeat,
    #fff;
  box-shadow: 0 1px 4px rgba(8, 11, 18, 0.18);
  pointer-events: none;
  z-index: 3;
}
/* Source matrix has a single blurred column — center the lock on it. */
.is-locked .src-matrix tbody tr.clickable-row td.col-handle::after {
  left: 50%;
  transform: translate(-50%, -50%);
}
/* Locked filter options: a small lock after each chip label. The click handler
   in pickers.html routes any filter-chip click to the paywall, so these are
   purely a visual affordance (the chip is still the click target). */
.is-locked .filter-pop .cat-chip::after {
  content: "";
  width: 11px;
  height: 11px;
  margin-left: 0.35rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.7;
}

/* ── Search dropdown lock (blur paywall) ─────────────────────────────────────
   In blur mode the dropdown still lists results (as a teaser) but nothing is
   actionable: each row shows a lock where the "+ Add" button would be, and a
   click anywhere opens the paywall sheet. */
.search-lock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--muted, #6b7280);
}
.search-lock svg { width: 16px; height: 16px; }
.search-result-row:has(.search-lock) .search-result { cursor: pointer; }

/* ── Blur-mode paywall bottom sheet ──────────────────────────────────────────
   Mirrors the TruePicks "pop up from the bottom": dark sheet that slides up,
   pull grip, logo + headline, muted subtitle, and a full-width brand-green
   (#22F635) pill button with BLACK text. Fired when a locked visitor taps
   anything on the teaser board / search. */
.ot-paywall {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ot-paywall[hidden] { display: none; }
body.ot-paywall-lock { overflow: hidden; }
.ot-paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 18, 0.62);
  backdrop-filter: blur(3px);
  animation: otPwFade .25s ease;
}
.ot-paywall-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 33rem;
  /* Half-screen bottom sheet (Cal AI-style): fixed at ~half the viewport so
     the hero floats with generous whitespace; the embedded checkout scrolls
     within it. */
  height: min(56vh, 640px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e6e9ef);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: 0 -24px 64px rgba(8, 11, 18, 0.28);
  animation: otPwRise .32s cubic-bezier(.2, .8, .25, 1);
}
.ot-paywall-grip {
  display: block;
  width: 2.5rem;
  height: 4px;
  margin: 0 auto 1.1rem;
  border-radius: 999px;
  background: var(--line-strong, #d4d9e2);
}
/* Hero stage — mirrors the Apple Pay trial sheet: small "Try X" line, huge
   "7 days free", price + renewal start date, consent terms, one black button. */
/* Embedded Stripe checkout mounts here — it renders its own white form, so
   the sheet stays light to blend. The sheet is half-screen; the checkout
   iframe is taller than that and scrolls within it. */
.ot-paywall-checkout {
  flex: 1 0 auto;
  border-radius: 12px;
  overflow: hidden;
}
.ot-paywall-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 300px;
  font-size: 0.92rem;
  color: var(--muted, #6b7280);
}
.ot-paywall-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--line, #e6e9ef);
  border-top-color: var(--accent, #0b1220);
  animation: otPwSpin .8s linear infinite;
}
.ot-paywall-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted, #6b7280);
}
.ot-paywall-perks {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.ot-paywall-perks li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--fg-soft, #3b4252);
}
.ot-paywall-perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 20px;
  height: 20px;
  background: #22f635;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
/* Black Apple Pay-style primary button. */
.ot-paywall-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  height: 54px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: var(--accent, #0b1220);
  color: var(--accent-fg, #fff);
  font-family: inherit;
  font-weight: 600;
  font-size: 1.08rem;
  text-decoration: none;
  transition: background .15s ease;
}
.ot-paywall-cta:hover {
  text-decoration: none;
  background: var(--accent-deep, #000);
}
.ot-paywall-note {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted, #6b7280);
}
@keyframes otPwFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes otPwRise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes otPwSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ot-paywall-backdrop, .ot-paywall-sheet { animation: none; }
  .ot-paywall-spinner { animation-duration: 1.6s; }
}

/* ── Floating "Unlock for Free" CTA ──────────────────────────────────────────
   Two pinned green pills — a compact one top-right and a full-width one docked
   above the mobile bottom nav. As the page scrolls (`.is-docked` on the group)
   they CROSS-FADE: the top pill lifts + fades out while the bottom pill rises +
   fades in. Only transform/opacity animate, so the swap is GPU-smooth (no
   left/right/width reflow jank). The docked bottom offset is fed in via
   --ot-tabbar-h by the scroll handler. */
.ot-unlock-fab {
  position: fixed;
  z-index: 1400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: #00e838;
  color: #06140a;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 18px rgba(2, 178, 50, 0.32);
  /* Snappy spring-ish ease-out for the slide; quick fade. */
  transition: transform 0.34s cubic-bezier(0.22, 0.8, 0.32, 1),
              opacity 0.22s ease,
              background 0.16s ease,
              box-shadow 0.16s ease;
  will-change: transform, opacity;
}
.ot-unlock-fab:focus-visible {
  outline: 3px solid rgba(6, 20, 10, 0.6);
  outline-offset: 2px;
}
.ot-unlock-fab .ot-unlock-fab-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
}

/* Top pill — lives IN the topbar flex row so the search bar condenses around
   it (no fixed positioning, no JS measuring, no overlap). Collapses smoothly
   when the page scrolls and the bottom docked pill takes over. */
.ot-unlock-fab--top {
  position: static;             /* override the base position: fixed */
  flex: 0 0 auto;
  align-self: center;
  height: 38px;
  padding: 0 1rem;
  max-width: 240px;
  overflow: hidden;
  transform: none;
  opacity: 1;
  transition: opacity 0.18s ease,
              max-width 0.3s cubic-bezier(0.22, 0.8, 0.32, 1),
              padding 0.3s cubic-bezier(0.22, 0.8, 0.32, 1),
              margin 0.3s cubic-bezier(0.22, 0.8, 0.32, 1),
              background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.ot-unlock-fab--top:hover {
  background: #0bf24a;
  box-shadow: 0 8px 22px rgba(2, 178, 50, 0.42);
  transform: scale(1.02);
}
.ot-unlock-fab--top:active { transform: scale(0.97); }
/* Scrolled: collapse the top pill away so the search reclaims the full row. */
body.ot-cta-docked .ot-unlock-fab--top {
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  opacity: 0;
  pointer-events: none;
}

/* Bottom full-width pill (hidden until scrolled). */
.ot-unlock-fab--bottom {
  left: 14px;
  right: 14px;
  bottom: calc(var(--ot-tabbar-h, 0px) + env(safe-area-inset-bottom, 0px) + 12px);
  height: 52px;
  padding: 0 1.25rem;
  font-size: 0.98rem;
  box-shadow: 0 10px 26px rgba(2, 178, 50, 0.34);
  /* Parked just below its resting spot, faded out + not clickable. */
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}
.ot-unlock-fab--bottom .ot-unlock-fab-ico { width: 19px; height: 19px; }
.ot-unlock-fab--bottom:hover { background: #0bf24a; }
.ot-unlock-fab--bottom:active { transform: translateY(0) scale(0.99); }

/* Scrolled state: the bottom docked pill slides up into view. */
body.ot-cta-docked .ot-unlock-fab--bottom {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .ot-unlock-fab { transition: opacity 0.18s ease, background 0.16s ease; }
  .ot-unlock-fab--bottom { transform: none; }
  body.ot-cta-docked .ot-unlock-fab--bottom { transform: none; }
  .ot-unlock-fab--top:hover,
  .ot-unlock-fab--top:active,
  .ot-unlock-fab--bottom:active { transform: none; }
}

/* ── Top Stocks economics columns (Avg entry / Return / Trades) ──────────────
   Analyst-profile-style per-ticker economics shown on the Most Bought matrix
   + source tabs. Entry is derived from the live price + return so the three
   read as a consistent record. */
/* Same numeric face as .mx-price (the live price odometer) so the whole
   economics block reads as one typographic system. Covers BOTH the Most
   Bought matrix (.sentiment-matrix) and the Latest Trades feed (.trades-feed)
   — these classes only exist on those two surfaces. */
.sentiment-matrix .mx-entry,
.trades-feed .mx-entry { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; color: var(--muted, #5b6472); }
.sentiment-matrix .mx-return,
.trades-feed .mx-return { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }
.sentiment-matrix .mx-trades,
.trades-feed .mx-trades { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; color: var(--muted, #5b6472); }
.sentiment-matrix th.mx-entry-col,
.sentiment-matrix th.mx-return-col,
.sentiment-matrix th.mx-trades-col { white-space: nowrap; }
/* Keep the economics block tight so the source columns still get room. */
.sentiment-matrix .mx-entry-col,
.sentiment-matrix .mx-return-col,
.sentiment-matrix .mx-trades-col { width: 1%; }

/* Center the per-ticker economics columns (header + value) so the numbers sit
   under the middle of each column header instead of hugging the right edge. */
.sentiment-matrix th.mx-ytd-col,
.sentiment-matrix td.mx-ytd-col,
.sentiment-matrix th.mx-winrate-col,
.sentiment-matrix td.mx-winrate-col,
.sentiment-matrix th.mx-entry-col,
.sentiment-matrix td.mx-entry-col,
.sentiment-matrix th.mx-price-col,
.sentiment-matrix td.mx-price-col,
.sentiment-matrix th.mx-return-col,
.sentiment-matrix td.mx-return-col,
.sentiment-matrix th.mx-trades-col,
.sentiment-matrix td.mx-trades-col { text-align: center; }

/* ── Instant-alert filing pages (/instant-alerts/{slug}) ─────────────────── */
.alert-article { max-width: 760px; margin: 0 auto; padding: 1.5rem 0 3rem; }
.alert-breadcrumb { font-size: 0.8rem; color: var(--muted, #6b7280); margin-bottom: 1rem; }
.alert-breadcrumb a { color: var(--accent, #2563eb); text-decoration: none; }
.alert-breadcrumb a:hover { text-decoration: underline; }
.alert-header { margin-bottom: 1.5rem; }
.alert-title { font-size: 2rem; line-height: 1.2; font-weight: 700; margin: 0 0 0.5rem; }
.alert-byline { font-size: 0.85rem; color: var(--muted, #6b7280); margin: 0; }
.alert-keypoints { background: var(--card-bg, #f8fafc); border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.alert-keypoints h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.alert-keypoints ul { margin: 0; padding-left: 1.1rem; }
.alert-keypoints li { margin: 0.35rem 0; line-height: 1.5; }
.alert-lead p { font-size: 1.05rem; line-height: 1.7; margin: 0 0 1.5rem; }
.alert-section { margin: 1.75rem 0; }
.alert-section h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.75rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--border, #e5e7eb); }
.alert-about p { line-height: 1.7; margin: 0 0 1rem; }
.alert-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem 1.25rem; }
.alert-stat { display: flex; justify-content: space-between; gap: 0.5rem;
  padding: 0.4rem 0; border-bottom: 1px dashed var(--border, #eef0f3); font-size: 0.9rem; }
.alert-stat-label { color: var(--muted, #6b7280); }
.alert-stat-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.alert-seealso ul { margin: 0; padding-left: 1.1rem; }
.alert-seealso li { margin: 0.35rem 0; }
.alert-seealso a { color: var(--accent, #2563eb); text-decoration: none; }
.alert-seealso a:hover { text-decoration: underline; }

/* Related filing alerts — cross-page internal linking */
.alert-related-list { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0; }
.alert-related-list li { margin: 0; }
.alert-related-list a { display: flex; align-items: baseline; gap: 0.55rem;
  padding: 0.65rem 0.25rem; border-bottom: 1px solid var(--border, #eef0f3);
  text-decoration: none; color: var(--text, #111827); }
.alert-related-list a:hover { color: var(--accent, #2563eb); }
.alert-related-ticker { flex: none; font-weight: 700; font-size: 0.78rem;
  color: var(--accent, #2563eb); font-variant-numeric: tabular-nums;
  min-width: 3.2rem; }
.alert-related-headline { font-size: 0.9rem; line-height: 1.4; }
.alert-disclosure { font-size: 0.78rem; line-height: 1.5; margin-top: 2rem;
  padding-top: 1rem; border-top: 1px solid var(--border, #e5e7eb); }

/* Instant-alert hub/listing (/instant-alerts) */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.alert-list-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 0.15rem 0.45rem; border-radius: 6px;
  background: var(--card-bg, #f1f5f9); color: var(--muted, #64748b); white-space: nowrap; }
.alert-list-tag--filing { background: #eef2ff; color: #4338ca; }
.alert-list-tag--insider { background: #ecfdf5; color: #047857; }
.alert-list-tag--analyst { background: #fff7ed; color: #c2410c; }
.alert-list-link { font-weight: 600; color: var(--text, #0f172a); text-decoration: none; flex: 1 1 60%; }
.alert-list-link:hover { color: var(--accent, #2563eb); text-decoration: underline; }
.alert-list-meta { font-size: 0.82rem; color: var(--muted, #6b7280); }
.alert-list-meta a { color: var(--accent, #2563eb); text-decoration: none; }

/* LLM-generated instant-alert article body */
.alert-dek { font-size: 1.05rem; line-height: 1.5; color: var(--text, #334155);
  margin: 0 0 0.75rem; font-weight: 500; }
.alert-body { font-size: 1.05rem; line-height: 1.75; color: var(--text, #1f2937); }
.alert-body > :first-child { margin-top: 0; }
.alert-body h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.3;
  margin: 2.25rem 0 0.85rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border, #eceff3); letter-spacing: -0.01em; }
.alert-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.5rem; }
.alert-body h3 { font-size: 1.08rem; font-weight: 600; margin: 1.6rem 0 0.5rem; }
.alert-body p { margin: 0 0 1.15rem; }
.alert-body p:last-child { margin-bottom: 0; }
.alert-body ul { margin: 0 0 1.15rem; padding-left: 1.25rem; }
.alert-body li { margin: 0.35rem 0; line-height: 1.6; }
.alert-body a { color: var(--accent, #2563eb); text-decoration: none; }
.alert-body a:hover { text-decoration: underline; }
.alert-md-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem;
  font-size: 0.92rem; }
.alert-md-table th, .alert-md-table td { text-align: left; padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb); }
.alert-md-table th { font-weight: 600; color: var(--muted, #475569);
  background: var(--card-bg, #f8fafc); }
.alert-md-table td:last-child, .alert-md-table th:last-child { text-align: right;
  font-variant-numeric: tabular-nums; }

/* ── Instant-alert floating chat (ghost-checkout IntercomWidget pattern) ── */
.ot-chat-root { position: relative; z-index: 900; }
.ot-chat-widget {
  position: fixed; bottom: 24px; right: 24px; z-index: 901;
  display: flex; align-items: center; gap: 12px;
}
.ot-chat-typing { animation: otChatSlideIn .3s ease-out; }
.ot-chat-typing-bubble {
  background: var(--fg); border-radius: 20px; border-top-right-radius: 6px;
  padding: 14px 20px; box-shadow: var(--shadow-md, 0 8px 24px rgba(15,23,42,.18));
}
.ot-chat-dots { display: flex; gap: 6px; align-items: center; }
.ot-chat-dots .dot {
  width: 8px; height: 8px; background: rgba(255,255,255,.45); border-radius: 50%;
  animation: otChatDotBounce 1.4s infinite ease-in-out;
}
.ot-chat-dots .dot:nth-child(2) { animation-delay: .2s; }
.ot-chat-dots .dot:nth-child(3) { animation-delay: .4s; }
.ot-chat-launcher {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid var(--fg); background: var(--bg); cursor: pointer;
  box-shadow: var(--shadow-md, 0 8px 24px rgba(15,23,42,.16));
  transition: transform .2s, box-shadow .2s; padding: 0;
}
.ot-chat-launcher:hover { transform: scale(1.05); }
.ot-chat-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, var(--fg) 0%, #1e293b 100%);
  color: #fff; font-weight: 700; font-size: 1.35rem;
}
.ot-chat-badge {
  position: absolute; top: -2px; right: -2px; width: 22px; height: 22px;
  background: var(--bad, #dc2626); color: #fff; font-size: .72rem; font-weight: 700;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.ot-chat-overlay {
  position: fixed; inset: 0; background: rgba(11,18,32,.55);
  backdrop-filter: blur(3px); z-index: 902; pointer-events: none;
}
.ot-chat-panel {
  position: fixed; bottom: 100px; right: 24px; z-index: 903;
  width: 400px; max-width: calc(100vw - 32px);
  animation: otChatSlideUp .3s ease-out;
}
.ot-chat-panel-inner {
  background: var(--bg); border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line-strong); box-shadow: 0 16px 48px rgba(15,23,42,.2);
  display: flex; flex-direction: column; max-height: calc(100vh - 140px);
}
.ot-chat-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.ot-chat-header-left { display: flex; gap: 12px; min-width: 0; }
.ot-chat-header-avatar, .ot-chat-msg-avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--fg) 0%, #1e293b 100%);
  color: #fff; font-weight: 700; font-size: 1.1rem;
  border: 2px solid var(--fg);
}
.ot-chat-msg-avatar { width: 32px; height: 32px; font-size: .85rem; }
.ot-chat-header-meta { min-width: 0; }
.ot-chat-header-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ot-chat-agent-name { font-weight: 700; font-size: 1rem; color: var(--fg); }
.ot-chat-stars { color: #f59e0b; font-size: .78rem; letter-spacing: .04em; }
.ot-chat-credential {
  display: flex; align-items: center; gap: 5px; font-size: .75rem;
  color: var(--muted); line-height: 1.45; margin-top: 2px;
}
.ot-chat-check { color: var(--good, #16a34a); font-weight: 700; }
.ot-chat-close {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ot-chat-close:hover { color: var(--fg); background: var(--bg-soft); }
.ot-chat-body {
  padding: 16px 18px; overflow-y: auto; min-height: 140px; max-height: 280px;
  background: var(--bg);
}
.ot-chat-msg { display: flex; gap: 8px; margin-bottom: 12px; }
.ot-chat-msg.user { justify-content: flex-end; }
.ot-chat-bubble {
  max-width: 82%; padding: 10px 14px; border-radius: 16px;
  font-size: .9rem; line-height: 1.5;
}
.ot-chat-bubble.agent {
  background: var(--bg-soft); color: var(--fg-soft);
  border: 1px solid var(--line); border-top-left-radius: 4px;
}
.ot-chat-bubble.agent.typing { padding: 12px 16px; }
.ot-chat-bubble.user {
  background: var(--fg); color: #fff; border-top-right-radius: 4px;
}
.ot-chat-bubble p { margin: 0; }
.ot-chat-bubble a { color: inherit; text-decoration: underline; }
.ot-chat-footer {
  padding: 14px 18px 16px; border-top: 1px solid var(--line); background: var(--bg);
}
.ot-chat-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ot-chat-quick-btn {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--fg); font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.ot-chat-quick-btn:hover { background: var(--bg-soft); border-color: var(--fg); }
.ot-chat-input-row { display: flex; gap: 8px; margin-bottom: 10px; }
.ot-chat-input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); font-size: .88rem; background: var(--bg);
}
.ot-chat-input:focus { outline: none; border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--accent-glow, rgba(11,18,32,.12)); }
.ot-chat-send {
  padding: 11px 16px; border-radius: 12px; border: 0; background: var(--fg);
  color: #fff; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.ot-chat-send:hover { opacity: .9; }
.ot-chat-online {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .72rem; color: var(--muted);
}
.ot-chat-online-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good, #16a34a);
  animation: otChatPulse 2s infinite;
}
body.ot-chat-open { overflow: hidden; }
@keyframes otChatSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes otChatSlideIn {
  from { transform: translateX(12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes otChatDotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-5px); opacity: 1; }
}
@keyframes otChatPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
@media (max-width: 768px) {
  .ot-chat-widget { bottom: 16px; right: 16px; }
  .ot-chat-panel {
    bottom: 0; right: 0; left: 0; width: auto; max-width: none;
    animation: otChatSlideUp .25s ease-out;
  }
  .ot-chat-panel-inner {
    border-radius: 18px 18px 0 0; max-height: 92vh;
  }
  .ot-chat-body { max-height: none; flex: 1; }
}

/* ── Learn / blog hub (/instant-alerts) ─────────────────────────────────── */
.learn-hub { max-width: 1120px; margin: 0 auto; padding: 0 1rem 4rem; }
.learn-hero { padding: 1.5rem 0 1.75rem; border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 2rem; }
.learn-hero-title { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 0.6rem; color: var(--text, #0f172a); }
.learn-hero-sub { font-size: 1.05rem; line-height: 1.55; color: var(--muted, #64748b);
  margin: 0; max-width: 60ch; }
.learn-cat-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.learn-cat-chip { font-size: 0.85rem; font-weight: 600; text-decoration: none;
  padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--border, #e5e7eb);
  color: var(--text, #334155); background: var(--surface, #fff); white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s; }
.learn-cat-chip:hover { border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); }

.learn-section { margin: 0 0 2.75rem; }
.learn-section-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; }
.learn-section-head h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em;
  margin: 0; color: var(--text, #0f172a); }
.learn-section-blurb { font-size: 0.9rem; color: var(--muted, #64748b); margin: 0.25rem 0 0; }
.learn-seeall { font-size: 0.9rem; font-weight: 600; text-decoration: none;
  color: var(--accent, #2563eb); white-space: nowrap; }
.learn-seeall:hover { text-decoration: underline; }

.learn-grid { display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.learn-card { display: flex; flex-direction: column; gap: 0.6rem; text-decoration: none;
  padding: 1.1rem; border: 1px solid var(--border, #e5e7eb); border-radius: var(--radius, 14px);
  background: var(--surface, #fff); box-shadow: var(--shadow-sm, 0 1px 2px rgba(15,23,42,.04));
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.learn-card:hover { border-color: var(--accent, #2563eb);
  box-shadow: var(--shadow, 0 4px 16px rgba(15,23,42,.08)); transform: translateY(-2px); }
.learn-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.learn-card-head .ticker-logo-wrap, .learn-card-head .ticker-logo {
  width: 30px; height: 30px; border-radius: 8px; }
.learn-card-tag { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 6px;
  background: var(--card-bg, #f1f5f9); color: var(--muted, #64748b); white-space: nowrap; }
.learn-card-tag--filing { background: #eef2ff; color: #4338ca; }
.learn-card-tag--insider { background: #ecfdf5; color: #047857; }
.learn-card-tag--analyst { background: #fff7ed; color: #c2410c; }
.learn-card-tag--politician { background: #faf5ff; color: #7c3aed; }
.learn-card-title { font-size: 1.02rem; font-weight: 650; line-height: 1.35; margin: 0;
  color: var(--text, #0f172a); display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.learn-card:hover .learn-card-title { color: var(--accent, #2563eb); }
.learn-card-excerpt { font-size: 0.88rem; line-height: 1.5; color: var(--muted, #64748b);
  margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; }
.learn-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: auto;
  padding-top: 0.35rem; font-size: 0.8rem; color: var(--muted, #94a3b8); }
.learn-card-ticker { font-weight: 700; color: var(--text, #334155); font-variant-numeric: tabular-nums; }
.learn-card-meta time::before, .learn-card-meta span + time::before { content: "·"; margin-right: 0.5rem; }

.learn-pager { display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  margin-top: 2.5rem; }
.learn-pager-btn { font-size: 0.9rem; font-weight: 600; text-decoration: none;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border, #e5e7eb); color: var(--text, #334155);
  background: var(--surface, #fff); }
.learn-pager-btn:hover { border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); }
.learn-pager-btn.is-disabled { opacity: 0.4; pointer-events: none; }
.learn-pager-pos { font-size: 0.85rem; color: var(--muted, #64748b); }

.learn-cta { margin-top: 1rem; padding: 2rem; text-align: center;
  border: 1px solid var(--border, #e5e7eb); border-radius: var(--radius-lg, 18px);
  background: var(--bg-soft, #f8fafc); }
.learn-cta h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.5rem; color: var(--text, #0f172a); }
.learn-cta p { margin: 0 auto 1.1rem; max-width: 48ch; }

@media (max-width: 640px) {
  .learn-hero-title { font-size: 1.65rem; }
  .learn-section-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}

/* ── Entity track-record card (instant-alert articles) ──────────────────── */
.perf-card { margin: 1.75rem 0; padding: 1.25rem 1.35rem 1.1rem;
  border: 1px solid var(--line, #ececec); border-radius: var(--radius-lg, 14px);
  background: var(--bg-soft, #fafafa); }
.perf-head { margin: 0 0 1rem; }
.perf-kicker { display: block; font-family: var(--font-mono, monospace);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted, #737373); margin-bottom: 0.3rem; }
.perf-title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; margin: 0;
  letter-spacing: -0.01em; color: var(--fg, #0a0a0a); }

.perf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
  margin: 0 0 1.1rem; }
.perf-stat { display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.7rem 0.85rem; border: 1px solid var(--line, #ececec);
  border-radius: var(--radius, 10px); background: var(--surface, #fff); }
.perf-stat-label { font-family: var(--font-mono, monospace); font-size: 0.64rem;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted, #737373); }
.perf-stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--fg, #0a0a0a); }
.perf-stat-value.perf-up { color: var(--good, #15803d); }
.perf-stat-value.perf-down { color: var(--bad, #b91c1c); }
.perf-stat-sub { font-size: 0.74rem; color: var(--muted, #737373);
  font-variant-numeric: tabular-nums; }

.perf-chart-wrap { position: relative; height: 240px; margin: 0 0 0.6rem; }
.perf-caption { font-size: 0.74rem; line-height: 1.5; color: var(--muted, #737373);
  margin: 0; }
.perf-caption a { color: var(--muted, #737373); text-decoration: underline; }

@media (max-width: 560px) {
  .perf-stats { grid-template-columns: 1fr; }
  .perf-stat { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .perf-stat-sub { margin-left: auto; }
  .perf-chart-wrap { height: 210px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
 * "The Future of Investing" landing variant  (templates/home_future.html, /future)
 * MarketBeat (tape + dense ranking) × alinea-invest (bento, serif accent) ×
 * quartr (clean editorial product shots). Token-only; dark mode inherits.
 * All classes scoped `fv-` so nothing collides with the existing home.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Ticker tape ─────────────────────────────────────────────────────────── */
.fv-tape {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.fv-tape-track {
  display: inline-flex; align-items: center; gap: 2rem;
  padding: 0.55rem 0;
  white-space: nowrap;
  animation: fv-tape-scroll 60s linear infinite;
  will-change: transform;
}
.fv-tape:hover .fv-tape-track { animation-play-state: paused; }
.fv-tape-item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem;
}
.fv-tape-item .ticker-logo {
  width: 18px; height: 18px; border-radius: 50%; object-fit: contain;
  background: var(--surface);
}
.fv-tape-sym {
  font-family: var(--font-mono); font-weight: 600;
  letter-spacing: 0.02em; color: var(--fg-soft);
}
.fv-tape-chg { font-variant-numeric: tabular-nums; font-weight: 600; }
.fv-tape-chg--up { color: var(--good); }
.fv-tape-chg--down { color: var(--bad); }
@keyframes fv-tape-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.fv-hero { padding: 4.5rem 0 0; text-align: center; overflow: hidden; }
.fv-hero-inner { display: flex; flex-direction: column; align-items: center; }
.fv-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.8rem; font-weight: 600; color: var(--fg-soft);
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.35rem 0.85rem; border-radius: 999px; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.fv-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft);
}
.fv-hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.0; letter-spacing: -0.03em; font-weight: 800;
  margin: 0 0 1.25rem; max-width: 16ch;
}
.fv-hero-title em {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic; font-weight: 400; letter-spacing: -0.01em;
  /* tasteful mint→fg sweep, alinea-flavored, falls back to fg if unsupported */
  background: linear-gradient(100deg, var(--good) 0%, var(--fg) 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--fg);
  padding-right: 0.06em;
}
.fv-hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.5;
  color: var(--muted); max-width: 46rem; margin: 0 auto 2rem;
}

/* Hero search */
.fv-search {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; max-width: 40rem; margin: 0 auto 1.25rem;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  box-shadow: var(--shadow);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.fv-search:focus-within {
  border-color: var(--accent); box-shadow: var(--shadow-lg);
}
.fv-search-icon { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.fv-search input {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--fg);
  font-size: 1rem; font-family: var(--font); padding: 0.55rem 0.25rem;
}
.fv-search input::placeholder { color: var(--muted-soft); }
.fv-search input:focus { outline: none; }
.fv-search-btn { flex-shrink: 0; border-radius: 999px; }

.fv-hero-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.fv-hero-trust {
  margin: 1.5rem 0 0; font-size: 0.85rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Hero product shot */
.fv-hero-shotwrap { position: relative; margin-top: 3rem; padding-bottom: 1rem; }
.fv-hero-shot {
  max-width: 1040px; margin: 0 auto; position: relative; z-index: 1;
  border-radius: var(--radius-lg);
}
.fv-hero-glow {
  position: absolute; z-index: 0; inset: -8% 10% auto 10%; height: 60%;
  background: radial-gradient(60% 100% at 50% 0%, var(--good-soft), transparent 70%);
  filter: blur(10px); pointer-events: none;
}

/* ── Section scaffolding ─────────────────────────────────────────────────── */
.fv-section { padding: 5rem 0; }
.fv-head { max-width: 42rem; margin: 0 0 2.5rem; }
.fv-head--row {
  max-width: none; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.fv-head--row > div { max-width: 42rem; }
.fv-kicker {
  display: inline-block; font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--good); margin-bottom: 0.75rem;
}
.fv-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem); line-height: 1.1;
  letter-spacing: -0.02em; font-weight: 800; margin: 0;
}
.fv-head p { color: var(--muted); font-size: 1.05rem; margin: 0.6rem 0 0; line-height: 1.5; }
.fv-head a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }

/* ── Coverage logo strip ─────────────────────────────────────────────────── */
.fv-coverage { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.fv-coverage-label {
  text-align: center; font-size: 0.8rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 1.5rem;
}
.fv-coverage-logos {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.75rem 1.75rem;
}
.fv-coverage-logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
  color: var(--muted-soft);
  transition: color 120ms ease, opacity 120ms ease;
}
.fv-coverage-logo:hover { color: var(--fg-soft); }
.fv-coverage-logo .ticker-logo {
  width: 26px; height: 26px; border-radius: 50%; object-fit: contain;
  background: var(--surface);
}

/* ── Bento grid ──────────────────────────────────────────────────────────── */
.fv-bento {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
}
.fv-bento-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem;
  display: flex; flex-direction: column; gap: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.fv-bento-card:hover {
  border-color: var(--line-strong); box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
/* wide = leaderboard hero tile spanning 2 cols, copy left / shot right */
.fv-bento-card--wide { grid-column: span 2; flex-direction: row; align-items: center; }
.fv-bento-card--wide .fv-bento-copy { flex: 0 0 42%; }
.fv-bento-card--wide .fv-bento-shot { flex: 1; align-self: stretch; }
/* tall = ticker drilldown spanning 2 rows */
.fv-bento-card--tall { grid-row: span 2; }
.fv-bento-tag {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.fv-bento-copy h3 {
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em;
  margin: 0.4rem 0 0.5rem;
}
.fv-bento-copy p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0; }
.fv-bento-shot {
  margin-top: auto; border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
  background: var(--bg-soft); line-height: 0;
}
.fv-bento-shot img { display: block; width: 100%; height: auto; }
/* inset shots crop to a clean strip so small tiles stay even */
.fv-bento-shot--inset { max-height: 200px; }
.fv-bento-shot--inset img { object-fit: cover; object-position: top left; }
.fv-bento-card--tall .fv-bento-shot { flex: 1; display: flex; }
.fv-bento-card--tall .fv-bento-shot img { object-fit: cover; object-position: top; }
.fv-bento-card.is-noshot .fv-bento-shot { display: none; }

/* ── Alternating feature ─────────────────────────────────────────────────── */
.fv-feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3.5rem; align-items: center;
}
.fv-feature-copy h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.1;
  letter-spacing: -0.02em; font-weight: 800; margin: 0.4rem 0 0.9rem;
}
.fv-feature-copy > p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 0 0 1.4rem; }
.fv-feature-list { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: 0.65rem; }
.fv-feature-list li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.98rem; color: var(--fg-soft);
}
.fv-tick {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--good-soft); color: var(--good);
  font-size: 0.7rem; font-weight: 700; margin-top: 1px;
}

/* ── Stats band ──────────────────────────────────────────────────────────── */
.fv-stats { background: var(--accent); color: var(--accent-fg); padding: 3.5rem 0; }
.fv-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  text-align: center;
}
.fv-stat { display: flex; flex-direction: column; gap: 0.4rem; }
.fv-stat-num {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums;
}
.fv-stat-label {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em;
  opacity: 0.7; font-weight: 500;
}

/* ── Market movers / ranking ─────────────────────────────────────────────── */
.fv-movers {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.fv-mover {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.85rem 1.1rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
  text-decoration: none; color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.fv-mover:hover {
  border-color: var(--line-strong); box-shadow: var(--shadow);
  transform: translateY(-1px); text-decoration: none;
}
.fv-mover-rank {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--muted-soft); width: 1.5rem; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.fv-mover-avatar {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; background: var(--bg-soft);
}
.fv-mover-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fv-mover-id { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.fv-mover-handle {
  font-weight: 600; font-size: 0.95rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.fv-mover-sub { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fv-mover-ytd { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.fv-mover-ytd strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fv-mover-ytd-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted-soft); font-weight: 600;
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.fv-faq-wrap { max-width: 48rem; }
.fv-faq-wrap .fv-head { margin-left: auto; margin-right: auto; text-align: center; }

/* ── CTA band ────────────────────────────────────────────────────────────── */
.fv-cta { padding: 5.5rem 0; text-align: center; border-top: 1px solid var(--line); }
.fv-cta-inner { display: flex; flex-direction: column; align-items: center; }
.fv-cta h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.05;
  letter-spacing: -0.025em; font-weight: 800; margin: 0 0 0.9rem; max-width: 18ch;
}
.fv-cta > .fv-cta-inner > p { color: var(--muted); font-size: 1.1rem; max-width: 40rem; margin: 0 0 1.75rem; }
.fv-cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.fv-cta-fine { margin: 1.5rem 0 0; font-size: 0.8rem; color: var(--muted-soft); }

/* ── Hero social proof: avatar stack + live data card (OddsJam-style) ───── */
.fv-trustrow { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; }
.fv-avstack { display: inline-flex; }
.fv-avstack-av {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--surface); margin-left: -9px; background: var(--bg-soft); flex: none;
}
.fv-avstack-av:first-child { margin-left: 0; }
.fv-avstack-av img { width: 100%; height: 100%; object-fit: cover; }
.fv-trusttext { font-size: 0.85rem; color: var(--muted); font-weight: 500; }

.fv-livecard {
  margin: 1.85rem auto 0; max-width: 440px; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md, var(--shadow-sm));
  padding: 1.1rem 1.2rem;
}
.fv-livecard-tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.85rem;
}
.fv-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 24%, transparent);
}
.fv-livecard-body { display: flex; align-items: center; gap: 0.75rem; }
.fv-livecard-av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; }
.fv-livecard-av img { width: 100%; height: 100%; object-fit: cover; }
.fv-livecard-id { display: flex; flex-direction: column; min-width: 0; }
.fv-livecard-handle { font-weight: 700; font-size: 1rem; }
.fv-livecard-sub { font-size: 0.8rem; color: var(--muted); }
.fv-livecard-ret { margin-left: auto; text-align: right; line-height: 1.1; }
.fv-livecard-ret strong, .fv-livecard-ret .pct { font-size: 1.4rem; font-weight: 800; }
.fv-livecard-ret-label { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.fv-livecard-foot { margin: 0.85rem 0 0; font-size: 0.72rem; color: var(--muted-soft); }

/* ── Centered section head ─────────────────────────────────────────────── */
.fv-head--center { max-width: 46rem; margin-left: auto; margin-right: auto; text-align: center; }

/* ── Real-grade proof strip (under the hero) ───────────────────────────── */
.fv-grades-wrap { margin-top: 2.25rem; text-align: center; }
.fv-grades-label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
  margin: 0 0 0.9rem;
}
.fv-grades { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.fv-grade-card {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.7rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); text-decoration: none; color: var(--fg);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.fv-grade-card:hover {
  border-color: var(--accent); box-shadow: var(--shadow-md, var(--shadow-sm));
  transform: translateY(-1px);
}
.fv-grade-card .ticker-logo, .fv-grade-card .ticker-logo-wrap { width: 22px; height: 22px; border-radius: 6px; }
.fv-grade-id { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.fv-grade-sym { font-weight: 700; font-size: 0.88rem; }
.fv-grade-surprise { font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Offerings (2-up default, 3-up modifier) ───────────────────────────── */
.fv-offerings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.fv-offerings--three { grid-template-columns: repeat(3, 1fr); }
.fv-offering {
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--fg);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.fv-offering:hover { border-color: var(--accent); box-shadow: var(--shadow-md, var(--shadow-sm)); transform: translateY(-2px); }
.fv-offering h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.01em; }
.fv-offering > p { margin: 0; color: var(--muted); font-size: 0.96rem; line-height: 1.55; }
.fv-offering-tag {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--good);
}
.fv-offering-cta { margin-top: auto; font-weight: 600; font-size: 0.9rem; color: var(--accent); }

/* ── Value grid ────────────────────────────────────────────────────────── */
.fv-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.fv-value {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm);
}
.fv-value h3 { margin: 0 0 0.45rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.fv-value p { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

/* ── Manifesto band ────────────────────────────────────────────────────── */
.fv-manifesto { padding: 5rem 0; background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fv-manifesto-inner { max-width: 48rem; }
.fv-manifesto-inner h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.02em; margin: 0 0 1.25rem; }
.fv-manifesto-inner p { color: var(--fg-soft); font-size: 1.08rem; line-height: 1.7; margin: 0 0 1rem; }

/* ── Bento HTML visuals (real data / mockups, never product screenshots) ── */
.fv-minitable, .fv-signals {
  margin-top: auto; padding: 0.9rem; line-height: normal;
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.fv-bento-card--tall .fv-signals { flex: 1; }
.fv-minirow {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.55rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
}
.fv-minilogo, .fv-minilogo .ticker-logo { width: 20px; height: 20px; border-radius: 6px; }
.fv-minisym { font-weight: 700; font-size: 0.85rem; }
.fv-minisurprise { margin-left: auto; font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fv-minirow .grade-badge { margin-left: 0.4rem; }
.fv-signals { list-style: none; margin: 0; }
.fv-signals li {
  position: relative; padding: 0.42rem 0.4rem 0.42rem 1.4rem;
  font-size: 0.9rem; color: var(--fg-soft); border-bottom: 1px solid var(--line);
}
.fv-signals li:last-child { border-bottom: 0; }
.fv-signals li::before {
  content: ""; position: absolute; left: 0.45rem; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--good);
}

/* Grade anatomy panel (the "how the grade works" visual) */
.fv-anatomy {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.4rem; width: 100%;
}
.fv-anatomy-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.fv-anatomy-cap {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.fv-anatomy-grade { font-size: 1.35rem; padding: 0.3rem 0.7rem; }
.fv-anatomy-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.fv-anatomy-list li { display: grid; grid-template-columns: 1fr 4.5rem 2.2rem; align-items: center; gap: 0.6rem; }
.fv-anatomy-k { font-size: 0.85rem; color: var(--fg-soft); }
.fv-anatomy-bar { height: 7px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.fv-anatomy-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.fv-anatomy-w { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.fv-anatomy-foot { margin: 1.1rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .fv-offerings, .fv-offerings--three { grid-template-columns: 1fr; }
  .fv-values { grid-template-columns: repeat(2, 1fr); }
  .fv-bento { grid-template-columns: repeat(2, 1fr); }
  .fv-bento-card--wide { grid-column: span 2; flex-direction: column; align-items: stretch; }
  .fv-bento-card--wide .fv-bento-copy { flex: none; }
  .fv-bento-card--tall { grid-row: auto; }
  .fv-feature { grid-template-columns: 1fr; gap: 2rem; }
  .fv-feature-shot { order: -1; }
  .fv-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}
@media (max-width: 540px) {
  .fv-hero { padding-top: 3rem; }
  .fv-section { padding: 3.5rem 0; }
  .fv-search { flex-wrap: wrap; border-radius: var(--radius-lg); padding: 0.6rem; }
  .fv-search input { flex: 1 1 100%; order: 2; }
  .fv-search-icon { order: 1; }
  .fv-search-btn { order: 3; width: 100%; }
  .fv-bento { grid-template-columns: 1fr; }
  .fv-bento-card--wide { grid-column: auto; }
  .fv-movers { grid-template-columns: 1fr; }
  .fv-values { grid-template-columns: 1fr; }
  .fv-head--row { flex-direction: column; align-items: flex-start; }
}

/* Honor reduced-motion: stop the tape, kill hover lifts */
@media (prefers-reduced-motion: reduce) {
  .fv-tape-track { animation: none; }
  .fv-bento-card:hover, .fv-mover:hover, .fv-hero-shot { transform: none; }
}

/* Dark theme: soften the serif gradient + glow so they read on dark surfaces */
html[data-theme="dark"] .fv-hero-title em {
  background: linear-gradient(100deg, var(--good) 0%, var(--fg) 80%);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="dark"] .fv-stats { background: var(--bg-tint); color: var(--fg); }

/* ── Earnings calendar (/app/earnings) ─────────────────────────────────────
   Week grid: Mon–Fri columns, each split into before-open / after-close groups
   of company logos. The confidence ring + hover card carry the headline signal
   (icon + word + color; only "confirmed" is affirmative green). */

/* Top bar: week nav + confidence filter */
.earn-calbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin: 0 0 0.9rem;
}
.earn-weeknav { display: inline-flex; align-items: center; gap: 0.5rem; }
.earn-weekbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--fg); background: var(--surface);
}
.earn-weekbtn:hover { border-color: var(--line-strong); background: var(--bg-soft); }
.earn-weekbtn svg { width: 16px; height: 16px; }
.earn-weeklabel {
  font-weight: 600; font-size: 0.95rem; color: var(--fg);
  font-variant-numeric: tabular-nums; min-width: 9.5rem; text-align: center;
}
.earn-today-btn {
  padding: 0.32rem 0.7rem; border-radius: 8px; font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--line); color: var(--fg); text-decoration: none;
}
.earn-today-btn:hover { background: var(--bg-soft); }
.earn-weekcount {
  margin-left: 0.4rem; font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.earn-filters { display: inline-flex; gap: 0.3rem; }
.earn-chip {
  padding: 0.28rem 0.7rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 500; text-decoration: none;
  color: var(--muted); border: 1px solid var(--line);
}
.earn-chip:hover { color: var(--fg); border-color: var(--line-strong); }
.earn-chip.active { color: var(--fg); border-color: var(--fg); font-weight: 600; }

/* Right cluster of the calbar: view toggle + confidence filter */
.earn-calbar-right { display: inline-flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* Week / Month segmented toggle */
.earn-viewtoggle {
  display: inline-flex; padding: 2px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft);
}
.earn-viewbtn {
  padding: 0.26rem 0.8rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 500; text-decoration: none; color: var(--muted);
}
.earn-viewbtn:hover { color: var(--fg); }
.earn-viewbtn.active {
  color: var(--fg); font-weight: 600; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Legend */
.earn-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 1.1rem;
  padding: 0.7rem 0.9rem; margin: 0 0 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); font-size: 0.82rem;
}
.earn-legend-txt { color: var(--muted); margin-right: 0.4rem; }

/* Confidence badge (used in the legend + hover card) */
.conf-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
}
.conf-badge svg { width: 13px; height: 13px; }
.conf-badge--confirmed { background: var(--good-soft); color: var(--good); }
.conf-badge--estimated {
  background: var(--bg-soft); color: var(--fg-soft); border: 1px solid var(--line-strong);
}
.conf-badge--unconfirmed {
  background: transparent; color: var(--muted); border: 1px dashed var(--line-strong);
}

/* The week grid */
.earn-cal {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem;
  align-items: start;
}
.earn-col {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: visible; min-height: 7rem;
}
.earn-col--today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.earn-col--past { background: var(--bg-soft); }
.earn-col-head {
  display: flex; align-items: baseline; gap: 0.4rem;
  padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: inherit; border-radius: var(--radius) var(--radius) 0 0;
}
.earn-col-day {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg);
}
.earn-col--today .earn-col-day { color: var(--accent); }
.earn-col-date { font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.earn-col-count {
  margin-left: auto; font-size: 0.68rem; font-weight: 600; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.05rem 0.4rem;
}
.earn-col-empty {
  padding: 1.1rem 0.75rem; font-size: 0.78rem; color: var(--muted); text-align: center;
}

/* A timing group inside a day */
.earn-slot { padding: 0.55rem 0.7rem; }
.earn-slot + .earn-slot { border-top: 1px dashed var(--line); }
.earn-slot-head {
  display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.5rem;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.earn-slot-head svg { width: 12px; height: 12px; }
.earn-slot--bmo .earn-slot-head { color: var(--mid-fg); }   /* amber = morning */
.earn-slot--amc .earn-slot-head { color: var(--accent); }   /* accent = evening */
.earn-logos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.45rem 0.3rem;
}

/* One company cell */
.earn-cell {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 0.2rem; text-decoration: none; padding: 0.1rem 0;
}
.earn-cell-logo {
  display: inline-flex; border-radius: 50%; padding: 2px;
  background: var(--surface);
}
.earn-cell .ticker-logo-wrap {
  width: 38px; height: 38px; border-width: 0;
}
/* Confidence ring around the logo (supplementary; the card carries the word) */
.earn-cell--confirmed .earn-cell-logo { box-shadow: 0 0 0 2px var(--good); }
.earn-cell--estimated .earn-cell-logo { box-shadow: 0 0 0 2px var(--line-strong); }
.earn-cell--unconfirmed .earn-cell-logo {
  box-shadow: 0 0 0 2px var(--bg-soft); outline: 1px dashed var(--muted); outline-offset: 1px;
}
.earn-cell--reported { opacity: 0.78; }
.earn-cell-tk {
  font-size: 0.66rem; font-weight: 600; color: var(--fg-soft);
  font-variant-numeric: tabular-nums; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.earn-cell:hover .earn-cell-tk, .earn-cell:focus-visible .earn-cell-tk { color: var(--accent); }

/* Hover / focus detail card */
.earn-pop {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 220px; z-index: 60; pointer-events: none;
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 0.65rem 0.7rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0; visibility: hidden; transition: opacity 0.12s ease;
  text-align: left; white-space: normal;
}
.earn-cell:hover .earn-pop, .earn-cell:focus-visible .earn-pop { opacity: 1; visibility: visible; }
.earn-pop::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--surface);
}
.earn-pop-head { display: flex; flex-direction: column; gap: 0.05rem; }
.earn-pop-tk { font-weight: 700; color: var(--fg); }
.earn-pop-name { font-size: 0.74rem; color: var(--muted); }
.earn-pop-badges { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.earn-pop-moved {
  font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--bad);
}
.earn-pop-meta { font-size: 0.74rem; color: var(--fg-soft); }
.earn-pop-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem;
  font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.earn-pop-k {
  font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); align-self: center;
}
.earn-pop-v { color: var(--fg); font-weight: 600; }
.earn-pop-est { font-weight: 400; color: var(--muted); font-size: 0.72rem; }
.earn-pop-surprise { font-weight: 600; }
.earn-pop-surprise.pos { color: var(--good); }
.earn-pop-surprise.neg { color: var(--bad); }

.earn-footnote { margin: 1rem 0 0; font-size: 0.78rem; color: var(--muted); }

/* ── Month grid (Google Calendar-style Mon–Sun) ─────────────────────────── */
.earn-month {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: visible;  /* let hover cards escape */
}
.earn-month-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line); background: var(--bg-soft);
  border-radius: var(--radius) var(--radius) 0 0;
}
.earn-month-dow {
  padding: 0.5rem 0.6rem; text-align: left;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.earn-month-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.earn-month-row + .earn-month-row { border-top: 1px solid var(--line); }
.earn-mcell {
  min-height: 6.5rem; padding: 0.4rem 0.45rem;
  border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.4rem;
}
.earn-mcell:first-child { border-left: 0; }
.earn-mcell--out { background: var(--bg-soft); }
.earn-mcell--out .earn-mcell-num { color: var(--muted); opacity: 0.6; }
.earn-mcell--past:not(.earn-mcell--out) { background: var(--bg-soft); }
.earn-mcell--weekend:not(.earn-mcell--out) { background: color-mix(in srgb, var(--bg-soft) 55%, transparent); }
.earn-mcell--today { box-shadow: inset 0 0 0 2px var(--accent); }
.earn-mcell-head { display: flex; align-items: center; gap: 0.4rem; }
.earn-mcell-num {
  font-size: 0.78rem; font-weight: 600; color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.earn-mcell--today .earn-mcell-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.4rem; height: 1.4rem; border-radius: 999px;
  background: var(--accent); color: #fff;
}
.earn-mcell-count {
  margin-left: auto; font-size: 0.64rem; font-weight: 600; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.02rem 0.36rem;
}
.earn-logos--month { gap: 0.4rem 0.25rem; align-content: start; }
.earn-logos--month .earn-cell .ticker-logo-wrap { width: 30px; height: 30px; }
.earn-logos--month .earn-cell-tk { display: none; }
.earn-mcell-more {
  align-self: center; font-size: 0.66rem; font-weight: 600; color: var(--muted);
}

/* ── Earnings Drift Grades ───────────────────────────────────────────────── */

/* The 13-step grade color scale (A green → F red). One tinted pill per grade. */
.grade-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.6rem; padding: 0.22rem 0.55rem; border-radius: 8px;
  font-weight: 800; font-size: 0.82rem; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.grade-badge--aplus  { background: #064e3b; color: #ecfdf5; }
.grade-badge--a      { background: #047857; color: #ecfdf5; }
.grade-badge--aminus { background: #059669; color: #ecfdf5; }
.grade-badge--bplus  { background: #10b981; color: #052e1f; }
.grade-badge--b      { background: #34d399; color: #052e1f; }
.grade-badge--bminus { background: #6ee7b7; color: #052e1f; }
.grade-badge--cplus  { background: #fde68a; color: #5a3e00; }
.grade-badge--c      { background: #fcd34d; color: #5a3e00; }
.grade-badge--cminus { background: #fbbf24; color: #4a2e00; }
.grade-badge--dplus  { background: #fb923c; color: #4a1d00; }
.grade-badge--d      { background: #f97316; color: #fff4ec; }
.grade-badge--dminus { background: #ef6a2e; color: #fff4ec; }
.grade-badge--f      { background: #dc2626; color: #fff1f1; }

/* Toolbar: stats left, grade filter right */
.grade-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin: 0 0 1.1rem;
}
.grade-filter-menu { flex-shrink: 0; }
.grade-filter-pop { min-width: 300px; max-width: min(420px, calc(100vw - 2rem)); }

/* Filter chips (one per grade + All) */
.grade-scale { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }
.grade-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; text-decoration: none;
  color: var(--fg); border: 1px solid var(--line); background: var(--surface);
}
.grade-chip:hover { border-color: var(--line-strong); }
.grade-chip.active { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.grade-chip.is-empty { opacity: 0.45; }
.grade-chip-n {
  font-size: 0.68rem; font-weight: 600; color: var(--muted);
  background: var(--bg-soft); border-radius: 999px; padding: 0.02rem 0.4rem;
}
/* A faint left swatch of the grade's own color on each grade chip */
.grade-chip[class*="grade-chip--"] { position: relative; padding-left: 0.85rem; }
.grade-chip[class*="grade-chip--"]::before {
  content: ""; position: absolute; left: 0.45rem; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
}
.grade-chip--aplus::before, .grade-chip--a::before, .grade-chip--aminus::before { background: #059669; }
.grade-chip--bplus::before, .grade-chip--b::before, .grade-chip--bminus::before { background: #34d399; }
.grade-chip--cplus::before, .grade-chip--c::before, .grade-chip--cminus::before { background: #fbbf24; }
.grade-chip--dplus::before, .grade-chip--d::before, .grade-chip--dminus::before { background: #fb923c; }
.grade-chip--f::before { background: #dc2626; }

/* Headline stats */
.grade-stats { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; flex: 1; min-width: 0; }
.grade-stat { display: flex; flex-direction: column; gap: 0.1rem; }
.grade-stat-v { font-size: 1.4rem; font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; }
.grade-stat-v--bench { color: var(--muted, #6b7280); }
.grade-stat--hint .grade-stat-k { max-width: 16rem; line-height: 1.35; }
.grade-stat-k {
  font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
}

/* The table */
.grade-table-card { padding: 0; overflow-x: auto; }
.grade-table { width: 100%; border-collapse: collapse; min-width: 920px; }
/* Per-factor 0–100 score chips (guidance / metrics / analyst / quality / setup) */
.grade-col-fac, .grade-table td.grade-col-fac { text-align: center; }
.grade-fac {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; padding: 0.12rem 0.4rem; border-radius: 6px;
  font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.grade-fac--hi { background: var(--good-soft); color: var(--good); }
.grade-fac--mid { background: #fef3c7; color: #92600a; }
.grade-fac--lo { background: #fee2e2; color: #b91c1c; }
.grade-fac--na { color: var(--muted); font-weight: 400; }
.grade-table thead th {
  text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.grade-table thead th a { color: inherit; text-decoration: none; }
.grade-table thead th a:hover { color: var(--fg); }
.grade-col-num, .grade-col-date, .grade-col-conf, .grade-col-grade { white-space: nowrap; }
.grade-row { border-bottom: 1px solid var(--line); cursor: pointer; }
.grade-row:last-child { border-bottom: 0; }
.grade-row:hover { background: var(--bg-soft); }
.grade-table td { padding: 0.6rem 0.9rem; vertical-align: middle; }
.grade-co { display: inline-flex; align-items: center; gap: 0.6rem; }
.grade-co .ticker-logo-wrap { width: 30px; height: 30px; border-width: 0; flex: none; }
.grade-co-txt { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.grade-co-tk { font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.grade-co-name {
  font-size: 0.76rem; color: var(--muted); max-width: 22ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.grade-surp { font-weight: 600; font-variant-numeric: tabular-nums; }
.grade-surp--pos { color: var(--good); }
.grade-surp--neg { color: var(--bad); }
.grade-surp--na { color: var(--muted); }
.grade-col-date { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.grade-conf {
  font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 0.12rem 0.45rem; border-radius: 999px;
}
.grade-conf--high { background: var(--good-soft); color: var(--good); }
.grade-conf--medium { background: var(--bg-soft); color: var(--fg-soft); border: 1px solid var(--line-strong); }
.grade-conf--low { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }

/* Expandable QA detail row */
.grade-caret { display: inline-flex; color: var(--muted); transition: transform 0.15s ease; flex: none; }
.grade-caret svg { width: 13px; height: 13px; }
.grade-row.is-open .grade-caret { transform: rotate(90deg); color: var(--accent); }
.grade-co-link { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.grade-co { gap: 0.45rem; }
.grade-detail-row > td { padding: 0 !important; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.grade-detail {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem;
  padding: 0.9rem 1.1rem 1.1rem;
}
.grade-detail-grade { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--fg); }
.grade-detail-grade span { color: var(--fg-soft); }
.grade-detail-block { margin: 0 0 0.5rem; font-size: 0.86rem; line-height: 1.5; color: var(--fg); }
.grade-detail-block b { color: var(--muted); font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.3rem; }
.grade-detail-pn { margin: 0.25rem 0 0; font-size: 0.82rem; line-height: 1.45; }
.grade-detail-pn--pos b { color: var(--good); } .grade-detail-pn--pos { color: var(--fg-soft); }
.grade-detail-pn--neg b { color: var(--bad); } .grade-detail-pn--neg { color: var(--fg-soft); }
.grade-detail-factors { display: flex; flex-direction: column; gap: 0.4rem; }
.grade-detail-fac { display: grid; grid-template-columns: 4.5rem 2.2rem 1fr; align-items: center; gap: 0.5rem; }
.grade-detail-fac-k { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.grade-detail-fac-note { font-size: 0.8rem; color: var(--fg-soft); }

/* Earnings grades page — tight chrome, full-size chart, legible data table */
.grades-page .grades-page-headline {
  margin: 0 0 0.35rem;
}
.grades-page .grades-perf-wrap { margin-bottom: 0.65rem; }
.grades-page .grades-perf-headline {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.2rem;
}
.grades-page .grades-perf-headline .section-title {
  margin: 0; font-size: 0.95rem; font-weight: 700;
}
/* Chart keeps global .perf-chart height (340px) — do not shrink */
.grades-page .grades-perf-card { padding: 0.85rem 1rem 0.65rem; }
.grades-page .tracker-range-foot { padding: 0.55rem 1rem 0.75rem; }
.grades-page .grade-toolbar { margin: 0 0 0.45rem; gap: 0.75rem; align-items: flex-end; }
.grades-page .grade-stats { gap: 1.35rem; align-items: flex-end; }
.grades-page .grade-stat { display: flex; gap: 0.4rem; }
.grades-page .grade-stat-v { font-size: 1.05rem; font-weight: 800; }
.grades-page .grade-stat-k { font-size: 0.65rem; }
.grades-page .grade-stat--primary {
  flex-direction: column; align-items: flex-start; gap: 0.12rem;
  padding-left: 0.7rem; border-left: 3px solid var(--good);
  margin-right: 0.25rem;
}
.grades-page .grade-stat--primary .grade-stat-v {
  font-family: var(--font-mono); font-size: 1.75rem; font-weight: 800; line-height: 1.05;
}
.grades-page .grade-stat--primary .grade-stat-k { font-size: 0.68rem; }
.grades-page .grade-stat--secondary {
  flex-direction: column; align-items: flex-start; gap: 0.08rem;
}
.grades-page .grade-stat--secondary .grade-stat-v {
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700;
}
.grades-page .grade-stat--secondary .grade-stat-k { font-size: 0.62rem; }
.grades-page .filter-btn { min-height: 2.75rem; padding: 0.45rem 0.75rem; }
.grades-page .grades-footnote {
  margin: 0.55rem 0 0; font-size: 0.72rem; line-height: 1.4;
}
.grades-page .grades-perf-prompt { margin-bottom: 0.65rem; padding: 0.65rem 0.9rem; }

/* Primary surface: enlarged, scannable data table */
.grades-page .grade-table-card {
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.grades-page .grade-table { min-width: 960px; }
.grades-page .grade-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface);
  padding: 0.55rem 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line-strong);
}
.grades-page .grade-table thead th a:hover { color: var(--accent); }
.grades-page .grade-table thead th.grade-col-sortable { padding: 0; }
.grades-page .grade-sort-btn {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.25rem;
  width: 100%; padding: 0.55rem 0.85rem; border: 0; background: transparent;
  color: inherit; font: inherit; font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.grades-page .grade-col-tk .grade-sort-btn { justify-content: flex-start; }
.grades-page .grade-sort-btn:hover { color: var(--accent); }
.grades-page .grade-sort-ind {
  font-size: 0.68rem; opacity: 0.4; font-weight: 700; line-height: 1;
}
.grades-page .grade-col-sortable.is-sorted .grade-sort-btn { color: var(--fg); font-weight: 700; }
.grades-page .grade-col-sortable.is-sorted .grade-sort-ind { opacity: 1; }
.grades-page .grade-table td {
  padding: 0.72rem 0.85rem;
  font-size: 0.94rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.grades-page .grade-row { min-height: 2.75rem; }
.grades-page .grade-row:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.grades-page .grade-row.is-open { background: var(--bg-soft); }
.grades-page .grade-col-num,
.grades-page .grade-table td.grade-col-num,
.grades-page .grade-col-fac,
.grades-page .grade-table td.grade-col-fac,
.grades-page .grade-col-grade,
.grades-page .grade-col-date,
.grades-page .grade-col-conf { text-align: right; }
.grades-page .grade-col-tk,
.grades-page .grade-table td.grade-col-tk { text-align: left; }
.grades-page .grade-co .ticker-logo-wrap { width: 32px; height: 32px; }
.grades-page .grade-co-tk { font-size: 0.95rem; font-weight: 700; }
.grades-page .grade-badge {
  min-width: 2.75rem; padding: 0.28rem 0.6rem; font-size: 0.88rem;
}
/* Numeric columns: one type rhythm (match .pct / Change column). */
.grades-page tr.grade-row .grade-col-num .pct,
.grades-page tr.grade-row .grade-col-num .grade-surp,
.grades-page tr.grade-row .grade-col-num .grade-price,
.grades-page tr.grade-row .grade-col-fac .grade-fac {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.grades-page tr.grade-row .grade-col-num .grade-price { color: var(--fg); }
.grades-page tr.grade-row .grade-col-fac .grade-fac {
  display: inline;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: none;
}
.grades-page tr.grade-row .grade-col-fac .grade-fac--hi { color: var(--good); }
.grades-page tr.grade-row .grade-col-fac .grade-fac--mid { color: #92600a; }
.grades-page tr.grade-row .grade-col-fac .grade-fac--lo { color: var(--bad); }
.grades-page tr.grade-row .grade-col-fac .grade-fac--na { color: var(--muted); font-weight: 700; }
.grades-page .grade-conf {
  min-width: 2.4rem; padding: 0.16rem 0.45rem; font-size: 0.72rem;
  text-align: center;
}
.grades-page .grade-col-date { font-size: 0.88rem; }
.grades-page .grade-caret svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .grades-page .grade-table thead th,
  .grades-page .grade-table td { padding: 0.58rem 0.65rem; font-size: 0.88rem; }
  .grade-co-name { display: none; }
  .grade-toolbar { align-items: flex-start; }
  .grade-stats { gap: 1rem; width: 100%; }
  .grade-filter-menu { margin-left: auto; }
  .grade-table thead th, .grade-table td { padding: 0.5rem 0.55rem; }
  .grade-detail { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* Tablet: 5 columns get tight — let them scroll horizontally as a strip */
@media (max-width: 1024px) {
  .earn-cal {
    grid-auto-flow: column; grid-template-columns: none;
    grid-auto-columns: minmax(180px, 1fr);
    overflow-x: auto; scroll-snap-type: x proximity;
    padding-bottom: 0.5rem;
  }
  .earn-col { scroll-snap-align: start; }
}
/* Tablet: the dense 7-up month grid scrolls horizontally rather than crushing */
@media (max-width: 1024px) {
  .earn-month { overflow-x: auto; }
  .earn-month-head, .earn-month-row { min-width: 760px; }
}
/* Mobile: stack days vertically */
@media (max-width: 640px) {
  .earn-cal {
    grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible;
  }
  .earn-calbar { flex-direction: column; align-items: stretch; }
  .earn-calbar-right { justify-content: space-between; }
  .earn-pop { width: 200px; }
}

/* ── Home earnings feed (article cards) ───────────────────────────────────
   Reverse-chron feed of the latest reported earnings: result + our summary.
   Article rhythm via hairline dividers (no per-card box), a conic-gradient
   surprise ring, and the shared grade-badge. Tokens only → light/dark safe. */
.efeed { display: flex; flex-direction: column; }
.efeed-item { border-top: 1px solid var(--line); padding: 1.75rem 0; }
.efeed-item:first-child { border-top: none; padding-top: 0.5rem; }

.efeed-head { display: flex; align-items: flex-start; gap: 0.8rem; }
.efeed-logo { flex: none; display: inline-flex; text-decoration: none; }
.efeed-logo .ticker-logo-wrap { width: 40px; height: 40px; border-width: 0; }
.efeed-logo .ticker-logo-wrap::before { font-size: 1rem; }
.efeed-head-text { flex: 1 1 auto; min-width: 0; }
.efeed-title { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.efeed-title a { color: var(--fg); text-decoration: none; }
.efeed-title a:hover { text-decoration: underline; text-underline-offset: 2px; }
.efeed-meta {
  margin: 0.35rem 0 0; font-size: 0.78rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
}
.efeed-sym { font-family: var(--font-mono); font-weight: 600; color: var(--fg-soft); }
.efeed-dot { color: var(--line-strong); }
.efeed-grade { flex: none; text-decoration: none; }

.efeed-body { display: flex; gap: 1.2rem; margin-top: 1rem; align-items: flex-start; }
/* Surprise badge: a closed, tinted ring (color = beat/miss) with the signed
   EPS-surprise % centered + a caption below. No partial-arc gauge — the fill
   fraction of a surprise % is meaningless, so a solid token reads cleaner. */
.efeed-surprise {
  flex: none; width: 84px; display: flex; flex-direction: column;
  align-items: center; gap: 0.4rem;
  --rc: var(--line-strong); --rc-soft: var(--bg-soft); --num-c: var(--muted);
}
.efeed-surprise--beat { --rc: var(--good); --rc-soft: var(--good-soft); --num-c: var(--good); }
.efeed-surprise--miss { --rc: var(--bad); --rc-soft: var(--bad-soft); --num-c: var(--bad); }
.efeed-surprise-disc {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2.5px solid var(--rc); background: var(--rc-soft);
  color: var(--num-c); font-weight: 800; font-size: 0.98rem;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}
.efeed-surprise-cap {
  font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-family: var(--font-mono);
}

.efeed-copy { flex: 1 1 auto; min-width: 0; }
.efeed-copy > p { margin: 0 0 0.7rem; font-size: 0.95rem; line-height: 1.6; color: var(--fg-soft); }
.efeed-lead { color: var(--fg); }
.efeed-lead strong { font-variant-numeric: tabular-nums; }
.efeed-takeaway { color: var(--fg); font-weight: 500; }
.efeed-guidance { font-size: 0.9rem; }
.efeed-guidance-k {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-right: 0.4rem;
}
.efeed-more {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.82rem; font-weight: 600; color: var(--accent); text-decoration: none;
}
.efeed-more svg { width: 15px; height: 15px; }
.efeed-more:hover { text-decoration: underline; text-underline-offset: 2px; }

.efeed-sentinel { padding: 1.5rem 0; text-align: center; color: var(--muted); }
.efeed-foot {
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: 0.75rem; color: var(--muted); line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  .efeed-more svg { transition: transform 0.18s ease; }
  .efeed-more:hover svg { transform: translateX(2px); }
}
@media (max-width: 640px) {
  .efeed-body { flex-direction: column; gap: 0.85rem; }
  .efeed-surprise { width: 64px; }
  .efeed-surprise-disc { width: 60px; height: 60px; font-size: 0.86rem; }
  .efeed-title { font-size: 1.12rem; }
}

/* ── Ticker "Trends" synthesis card ───────────────────────────────────────
   One-line directional read blending the Earnings Drift Grade + smart-money
   sentiment. Lean color (good/bad/muted) on the concentric-ring icon + chips.
   Tokens only → light/dark safe. Never says buy/sell (DESIGN.md §2). */
.ttrend { display: flex; gap: 1.25rem; align-items: center; }
.ttrend-icon { flex: none; width: 60px; height: 60px; color: var(--muted); }
.ttrend--bull .ttrend-icon { color: var(--good); }
.ttrend--bear .ttrend-icon { color: var(--bad); }
.ttrend-icon svg { width: 100%; height: 100%; display: block; }
.ttrend-body { min-width: 0; }
.ttrend-title { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.ttrend-text { margin: 0.3rem 0 0; font-size: 1rem; line-height: 1.5; color: var(--fg-soft); }
@media (max-width: 560px) {
  .ttrend { gap: 0.9rem; }
  .ttrend-icon { width: 46px; height: 46px; }
  .ttrend-title { font-size: 1.08rem; }
  .ttrend-text { font-size: 0.95rem; }
}

/* Analyst-ratings table: per-row action / target-change tag (so the grade's
   "N target raises / downgrades" is verifiable line-by-line in the tab). */
.analyst-act {
  display: inline-block; margin-left: 0.4rem; font-size: 0.66rem; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.analyst-act--up { color: var(--good); }
.analyst-act--down { color: var(--bad); }
.analyst-act--flat { color: var(--muted); }
