/* ──────────────────────────────────────────────────────────────────────────
 * insider-v2.css — editorial design system for the StockAlerts Insider
 * Trading platform. Layered on top of style.css + insider.css, this file
 * introduces the magazine-style hero, premium card components, sentiment
 * panels, intelligence badges, ownership-change visuals, market reaction
 * blocks, timeline charts, filter bars, and educational components used by:
 *   - /insider-trades                       (dashboard)
 *   - /insider-trades/:ticker               (company page)
 *   - /insider-trades/:ticker/insiders/:id  (insider profile)
 *   - /insider-trades/:ticker/:slug         (article — SSR + client)
 *   - /insider-trades/leaderboard/*         (leaderboards)
 *   - /insider-trades/sector/*              (sector aggregate)
 * ──────────────────────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════
 * TOKENS
 * ════════════════════════════════════════════════════════════════════════ */
:root {
  --iv2-bg-elev-1: rgba(255,255,255,0.02);
  --iv2-bg-elev-2: rgba(255,255,255,0.04);
  --iv2-bg-card: var(--bg-card, rgba(255,255,255,0.03));
  --iv2-border: rgba(148,163,184,0.14);
  --iv2-border-strong: rgba(148,163,184,0.28);
  --iv2-buy: #10b981;
  --iv2-buy-soft: rgba(16,185,129,0.12);
  --iv2-buy-strong: rgba(16,185,129,0.22);
  --iv2-sell: #ef4444;
  --iv2-sell-soft: rgba(239,68,68,0.12);
  --iv2-sell-strong: rgba(239,68,68,0.22);
  --iv2-info: #3b82f6;
  --iv2-info-soft: rgba(59,130,246,0.12);
  --iv2-warn: #f59e0b;
  --iv2-warn-soft: rgba(245,158,11,0.12);
  --iv2-neutral: #94a3b8;
  --iv2-neutral-soft: rgba(148,163,184,0.12);
  --iv2-shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --iv2-shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --iv2-shadow-lg: 0 10px 32px rgba(0,0,0,0.12);
  --iv2-radius: 14px;
  --iv2-radius-sm: 10px;
  --iv2-radius-lg: 20px;
  --iv2-serif: 'Charter','Iowan Old Style','Source Serif Pro','Georgia',serif;
}

[data-theme="dark"] {
  --iv2-bg-elev-1: rgba(255,255,255,0.025);
  --iv2-bg-elev-2: rgba(255,255,255,0.045);
}

/* ════════════════════════════════════════════════════════════════════════
 * ARTICLE PAGE
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-article {
  padding: 80px 0 80px;
  max-width: 1180px;
}

.iv2-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.iv2-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.iv2-breadcrumb a:hover { color: var(--text); }
.iv2-breadcrumb span { margin: 0 6px; opacity: .5; }
.iv2-breadcrumb__current { color: var(--text); }

/* ── HERO ─────────────────────────────────────────────────────────────── */
.iv2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
  padding: 8px 0 32px;
  border-bottom: 1px solid var(--iv2-border);
  margin-bottom: 36px;
}
@media (max-width: 900px) {
  .iv2-hero { grid-template-columns: 1fr; gap: 24px; }
}

.iv2-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--iv2-info);
  text-transform: uppercase;
  padding: 4px 0;
  margin-bottom: 14px;
}

.iv2-hero__headline {
  font-family: var(--iv2-serif);
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 18px;
  color: var(--text);
}

.iv2-hero__summary {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 22px;
  max-width: 64ch;
}

.iv2-hero__aggregate {
  display: inline-block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: rgba(241, 196, 15, 0.10);
  border: 1px solid rgba(241, 196, 15, 0.35);
  border-radius: 8px;
  padding: 6px 12px;
  margin: -6px 0 16px;
  max-width: 64ch;
}
.iv2-hero__aggregate strong { color: #f1c40f; font-weight: 700; }

.iv2-mr__lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 16px;
  font-weight: 500;
}

.disclaimer-bar--inline {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Contextual facts list (Batch 2 — Item #8) ─────────────────────────── */
.iv2-ctx-facts {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--iv2-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iv2-ctx-facts__item {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted, #aaa);
  padding-left: 20px;
  position: relative;
}
.iv2-ctx-facts__item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--iv2-accent, #4e8ef7);
  font-size: 12px;
}

/* ── Ownership trend badge (Batch 2 — Item #13) ─────────────────────────── */
.iv2-ownership__trend {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
.iv2-ownership__trend--up    { background: rgba(39,174,96,.15);  color: #27ae60; }
.iv2-ownership__trend--down  { background: rgba(231,76,60,.12);  color: #e74c3c; }
.iv2-ownership__trend--mixed { background: rgba(127,140,141,.15); color: #7f8c8d; }

/* ── Estimated value after transaction (Batch 2 — Item #13) ─────────────── */
.iv2-ownership__value-after {
  font-size: 13px;
  color: var(--text-muted, #aaa);
  margin: 10px 0 0;
  line-height: 1.5;
}
.iv2-ownership__value-after strong {
  color: var(--text);
  font-weight: 600;
}

.iv2-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.iv2-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
}
.iv2-chip:hover { border-color: var(--iv2-border-strong); transform: translateY(-1px); }
.iv2-chip strong { font-weight: 700; }
.iv2-chip__sub { color: var(--text-muted); font-weight: 400; }
.iv2-chip--primary {
  background: var(--iv2-info-soft);
  border-color: rgba(59,130,246,0.3);
}
.iv2-chip--ghost { background: transparent; color: var(--text-muted); }
.iv2-chip--cta {
  background: var(--primary, #00b894);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.iv2-chip--cta:hover { background: var(--primary-dark, #00a383); transform: translateY(-1px); }

/* Stock card on right */
.iv2-hero__stockcard {
  background: linear-gradient(180deg, var(--iv2-bg-elev-2) 0%, var(--iv2-bg-elev-1) 100%);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius-lg);
  padding: 24px;
  box-shadow: var(--iv2-shadow-md);
  position: sticky;
  top: 88px;
}
.iv2-stockcard__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.iv2-stockcard__ticker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--iv2-info);
}
.iv2-stockcard__name { font-size: 13px; color: var(--text-muted); }
.iv2-stockcard__price {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 12px;
}
.iv2-stockcard__change {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.iv2-stockcard__change--up { background: var(--iv2-buy-soft); color: var(--iv2-buy); }
.iv2-stockcard__change--down { background: var(--iv2-sell-soft); color: var(--iv2-sell); }
.iv2-stockcard__since {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.iv2-stockcard__since--up { color: var(--iv2-buy); font-weight: 600; }
.iv2-stockcard__since--down { color: var(--iv2-sell); font-weight: 600; }
.iv2-stockcard__sparkline {
  width: 100%; height: 70px;
  margin: 14px 0 12px;
}
.iv2-stockcard__quickstats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--iv2-border);
  font-size: 12px;
}
.iv2-stockcard__quickstats > div { display: flex; flex-direction: column; gap: 2px; }
.iv2-stockcard__quickstats .label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.iv2-stockcard__quickstats .val { color: var(--text); font-weight: 600; }

/* ── BADGES ───────────────────────────────────────────────────────────── */
.iv2-badges {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 4px 0 12px;
}
.iv2-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  border: 1px solid transparent;
}
.iv2-badge--buy { background: var(--iv2-buy-soft); color: var(--iv2-buy); border-color: var(--iv2-buy-strong); }
.iv2-badge--sell { background: var(--iv2-sell-soft); color: var(--iv2-sell); border-color: var(--iv2-sell-strong); }
.iv2-badge--info { background: var(--iv2-info-soft); color: var(--iv2-info); border-color: rgba(59,130,246,0.3); }
.iv2-badge--warn { background: var(--iv2-warn-soft); color: var(--iv2-warn); border-color: rgba(245,158,11,0.3); }
.iv2-badge--neutral { background: var(--iv2-neutral-soft); color: var(--iv2-neutral); border-color: rgba(148,163,184,0.2); }

/* ── SECTIONS ─────────────────────────────────────────────────────────── */
.iv2-section { margin: 36px 0; }
.iv2-section__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -.2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--iv2-border);
}
/* Section header with inline see-all link */
.iv2-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--iv2-border);
}
.iv2-section__head .iv2-section__title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.iv2-section__see-all {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--iv2-info);
  text-decoration: none;
  opacity: .85;
  transition: opacity .15s;
}
.iv2-section__see-all:hover { opacity: 1; text-decoration: underline; }

/* ── SENTIMENT PILL ───────────────────────────────────────────────────── */
.iv2-sentiment {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  border-radius: var(--iv2-radius);
  border: 1px solid var(--iv2-border);
  background: var(--iv2-bg-card);
}
.iv2-sentiment--buy { border-left: 4px solid var(--iv2-buy); background: linear-gradient(90deg, var(--iv2-buy-soft) 0%, var(--iv2-bg-card) 50%); }
.iv2-sentiment--sell { border-left: 4px solid var(--iv2-sell); background: linear-gradient(90deg, var(--iv2-sell-soft) 0%, var(--iv2-bg-card) 50%); }
.iv2-sentiment--mixed { border-left: 4px solid var(--iv2-warn); }
.iv2-sentiment--neutral { border-left: 4px solid var(--iv2-neutral); }
.iv2-sentiment__pill {
  font-weight: 800; font-size: 14px;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text);
}
.iv2-sentiment__copy { color: var(--text-muted); font-size: 14px; }

/* ── WHY THIS MATTERS ─────────────────────────────────────────────────── */
.iv2-why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.iv2-why__card {
  padding: 18px 20px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
}
.iv2-why__heading {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--iv2-info);
  margin: 0 0 10px;
}
.iv2-why__body { font-size: 14.5px; line-height: 1.65; color: var(--text); margin: 0; }

/* ── OWNERSHIP CHANGE ─────────────────────────────────────────────────── */
.iv2-ownership__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 20px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
}
@media (max-width: 700px) {
  .iv2-ownership__grid { grid-template-columns: 1fr; gap: 14px; }
}
.iv2-ownership__col { text-align: center; }
.iv2-ownership__label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.iv2-ownership__value { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.iv2-ownership__sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.iv2-ownership__arrow {
  font-size: 15px; font-weight: 700;
  padding: 10px 16px; border-radius: 999px;
  white-space: nowrap;
}
.iv2-ownership__arrow--up { background: var(--iv2-buy-soft); color: var(--iv2-buy); }
.iv2-ownership__arrow--down { background: var(--iv2-sell-soft); color: var(--iv2-sell); }
.iv2-ownership__arrow small { font-size: 12px; opacity: .85; }
.iv2-ownership__caption { font-size: 14px; line-height: 1.6; margin: 14px 0 0; }

/* ── MARKET REACTION ──────────────────────────────────────────────────── */
.iv2-mr__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.iv2-mr__item {
  padding: 16px 18px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
}
.iv2-mr__label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.iv2-mr__delta { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.iv2-mr__delta--up { color: var(--iv2-buy); }
.iv2-mr__delta--down { color: var(--iv2-sell); }
.iv2-mr__sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.iv2-mr__caption { margin: 14px 0 0; font-size: 12.5px; }

/* ── KEY FIGURES GRID ─────────────────────────────────────────────────── */
.iv2-keygrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.iv2-stat {
  padding: 18px 18px 16px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
}
.iv2-stat__label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.iv2-stat__value {
  font-size: 24px; font-weight: 800; color: var(--text);
  letter-spacing: -.4px; line-height: 1.1;
}
.iv2-stat__sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.iv2-stat--buy { background: linear-gradient(180deg, var(--iv2-buy-soft) 0%, var(--iv2-bg-card) 100%); }
.iv2-stat--sell { background: linear-gradient(180deg, var(--iv2-sell-soft) 0%, var(--iv2-bg-card) 100%); }
.iv2-stat--neutral {}

/* ── TABLE ────────────────────────────────────────────────────────────── */
.iv2-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  background: var(--iv2-bg-card);
}
.iv2-table { width: 100%; border-collapse: collapse; }
.iv2-table thead th {
  position: sticky; top: 0;
  background: var(--iv2-bg-elev-2);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted);
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--iv2-border-strong);
}
.iv2-table tbody td {
  padding: 13px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--iv2-border);
  color: var(--text);
}
.iv2-table tbody tr:last-child td { border-bottom: 0; }
.iv2-table tbody tr:hover { background: var(--iv2-bg-elev-2); }
.iv2-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.iv2-table__divider td {
  background: var(--iv2-bg-elev-2);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ── FOOTNOTES / FILING META ──────────────────────────────────────────── */
.iv2-footnotes { padding-left: 20px; line-height: 1.7; font-size: 14px; color: var(--text); }
.iv2-footnotes li { margin-bottom: 8px; }
/* Count badge next to section title */
.iv2-fn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--iv2-neutral-soft);
  color: var(--iv2-neutral);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 8px;
}
/* Show all / Show less toggle button */
.iv2-fn-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 13px;
  background: var(--iv2-neutral-soft);
  border: 1px solid var(--iv2-border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.iv2-fn-toggle:hover {
  background: var(--iv2-bg-elev-2);
  border-color: var(--iv2-neutral);
}
.iv2-filing-meta { padding-left: 0; list-style: none; line-height: 1.9; font-size: 14px; }
.iv2-filing-meta li { padding: 8px 0; border-bottom: 1px solid var(--iv2-border); }
.iv2-filing-meta li:last-child { border-bottom: 0; }

/* ── RELATED LIST ─────────────────────────────────────────────────────── */
.iv2-related-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.iv2-related-item {}
.iv2-related-link {
  display: block;
  padding: 14px 16px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-left: 3px solid var(--iv2-border-strong);
  border-radius: var(--iv2-radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
}
.iv2-related-link:hover {
  border-color: var(--iv2-border-strong);
  border-left-color: inherit;
  transform: translateY(-1px);
  box-shadow: var(--iv2-shadow-sm);
}
.iv2-related-link--buy  { border-left-color: var(--iv2-buy); }
.iv2-related-link--sell { border-left-color: var(--iv2-sell); }

.iv2-related-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.iv2-related-name { font-size: 13px; font-weight: 600; color: var(--text); }
.iv2-badge--sm { padding: 3px 8px; font-size: 11px; }

.iv2-related-mid {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
}
.iv2-related-ticker-chip {
  display: inline-flex; align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--iv2-info-soft);
  color: var(--iv2-info);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}
.iv2-related-shares { color: var(--text); }
.iv2-related-val    { font-weight: 700; color: var(--text); }

.iv2-related-bot { font-size: 11px; color: var(--text-muted); }

/* Empty state for related sections */
.iv2-related-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  border-radius: var(--iv2-radius-sm);
  border: 1px dashed var(--iv2-border-strong);
  text-align: center;
  color: var(--text-muted);
}
.iv2-related-empty__icon {
  width: 28px; height: 28px;
  margin-bottom: 10px;
  opacity: .4;
}
.iv2-related-empty__msg { font-size: 14px; margin: 0; }

/* ════════════════════════════════════════════════════════════════════════
 * COMPANY PAGE
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-company-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--iv2-border);
  margin-bottom: 30px;
}
@media (max-width: 900px) { .iv2-company-hero { grid-template-columns: 1fr; } }

.iv2-company-hero__left { display: flex; flex-direction: column; gap: 14px; }
.iv2-company-hero__head {
  display: flex; align-items: center; gap: 16px;
}
.iv2-company-hero__logo {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: #fff;
  padding: 4px;
  border: 1px solid var(--iv2-border);
  box-shadow: var(--iv2-shadow-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.iv2-company-hero__logo img { width: 100%; height: 100%; object-fit: contain; }
.iv2-company-hero__logo-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff;
  border-radius: 12px;
}
.iv2-company-hero__title h1 {
  margin: 0; font-size: clamp(22px, 3vw, 32px); font-weight: 800;
  letter-spacing: -.4px; color: var(--text);
}
.iv2-company-hero__title .ticker {
  display: inline-block;
  background: var(--iv2-info-soft); color: var(--iv2-info);
  padding: 2px 10px; border-radius: 6px;
  font-size: 13px; font-weight: 800; letter-spacing: .5px;
  margin-right: 8px;
}
.iv2-company-hero__sub { color: var(--text-muted); font-size: 14px; }

.iv2-company-hero__sentiment {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: var(--iv2-radius);
  border: 1px solid var(--iv2-border);
  background: var(--iv2-bg-card);
  font-size: 13px; font-weight: 700;
  align-self: flex-start;
}
.iv2-company-hero__sentiment--buy { border-left: 3px solid var(--iv2-buy); color: var(--iv2-buy); }
.iv2-company-hero__sentiment--sell { border-left: 3px solid var(--iv2-sell); color: var(--iv2-sell); }
.iv2-company-hero__sentiment--mixed { border-left: 3px solid var(--iv2-warn); color: var(--iv2-warn); }
.iv2-company-hero__sentiment--neutral { border-left: 3px solid var(--iv2-neutral); color: var(--iv2-neutral); }

.iv2-company-hero__right {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  align-content: start;
}

/* Filter / period bar */
.iv2-filterbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  margin-bottom: 22px;
}
.iv2-filterbar__group { display: flex; align-items: center; gap: 8px; }
.iv2-filterbar__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted);
}
.iv2-filterbar__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.iv2-filterbar__chip {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--iv2-border);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.iv2-filterbar__chip:hover { border-color: var(--iv2-border-strong); }
.iv2-filterbar__chip.is-active {
  background: var(--iv2-info-soft);
  border-color: var(--iv2-info);
  color: var(--iv2-info);
}
.iv2-filterbar__search input {
  padding: 7px 12px;
  background: var(--iv2-bg-elev-1);
  border: 1px solid var(--iv2-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  min-width: 180px;
}
.iv2-filterbar__search input:focus { outline: none; border-color: var(--iv2-info); }

/* Featured trades carousel */
.iv2-featured {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.iv2-featured__card {
  padding: 18px 18px 16px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: inherit;
  transition: all .15s;
}
.iv2-featured__card:hover { border-color: var(--iv2-border-strong); transform: translateY(-2px); box-shadow: var(--iv2-shadow-md); }
.iv2-featured__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.iv2-featured__filer { font-weight: 700; font-size: 14px; color: var(--text); line-height: 1.3; }
.iv2-featured__role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.iv2-featured__value { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.iv2-featured__value--buy { color: var(--iv2-buy); }
.iv2-featured__value--sell { color: var(--iv2-sell); }
.iv2-featured__meta { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; }

/* Timeline chart */
.iv2-timeline {
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  padding: 16px 18px;
}
.iv2-timeline__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.iv2-timeline__title { font-size: 15px; font-weight: 700; color: var(--text); }
.iv2-timeline__legend { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.iv2-timeline__legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.iv2-timeline svg { width: 100%; height: 220px; }

/* Trades feed (used on company + insider profile + dashboard) */
.iv2-feed { display: flex; flex-direction: column; gap: 10px; }
.iv2-feed__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 100px auto;
  gap: 14px; align-items: center;
  padding: 14px 16px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  text-decoration: none; color: inherit;
  transition: all .15s;
}
.iv2-feed__row:hover { border-color: var(--iv2-border-strong); transform: translateY(-1px); box-shadow: var(--iv2-shadow-sm); }
.iv2-feed__row--buy { border-left: 4px solid var(--iv2-buy); }
.iv2-feed__row--sell { border-left: 4px solid var(--iv2-sell); }
.iv2-feed__row--other { border-left: 4px solid var(--iv2-neutral); }
.iv2-feed__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--iv2-bg-elev-2); display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--text); font-size: 14px;
}
.iv2-feed__filer { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iv2-feed__filer strong { font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv2-feed__filer .role { font-size: 12px; color: var(--text-muted); }
.iv2-feed__code { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.iv2-feed__shares { font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.iv2-feed__shares .sub { font-size: 11.5px; color: var(--text-muted); display: block; }
.iv2-feed__value { font-size: 16px; font-weight: 800; letter-spacing: -.3px; text-align: right; }
.iv2-feed__value--buy { color: var(--iv2-buy); }
.iv2-feed__value--sell { color: var(--iv2-sell); }
.iv2-feed__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.iv2-feed__meta strong { color: var(--text); font-size: 12.5px; }
@media (max-width: 780px) {
  .iv2-feed__row { grid-template-columns: 36px 1fr auto; gap: 10px; }
  .iv2-feed__avatar { width: 36px; height: 36px; font-size: 12px; }
  .iv2-feed__code, .iv2-feed__shares, .iv2-feed__meta { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════
 * DASHBOARD
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-dash-hero {
  padding: 32px 0 24px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--iv2-border);
}
.iv2-dash-hero__eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 1.6px;
  color: var(--iv2-info); text-transform: uppercase;
  margin-bottom: 12px;
}
.iv2-dash-hero h1 {
  font-family: var(--iv2-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; letter-spacing: -.5px; line-height: 1.1;
  margin: 0 0 14px;
}
.iv2-dash-hero p { font-size: 17px; line-height: 1.6; color: var(--text-muted); max-width: 64ch; margin: 0; }

.iv2-dash-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}
.iv2-dash-summary__stat {
  padding: 16px 18px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
}
.iv2-dash-summary__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted); margin-bottom: 8px;
}
.iv2-dash-summary__value { font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--text); }
.iv2-dash-summary__sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Cross-links between intelligence sections */
.iv2-crosslinks {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 30px;
}
.iv2-crosslink {
  padding: 14px 16px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  text-decoration: none; color: inherit;
  transition: all .15s;
}
.iv2-crosslink:hover { border-color: var(--iv2-info); transform: translateY(-2px); box-shadow: var(--iv2-shadow-sm); }
.iv2-crosslink__label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.iv2-crosslink__sub { font-size: 12px; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════════════
 * EMPTY STATES
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-empty {
  padding: 40px 24px;
  text-align: center;
  background: var(--iv2-bg-card);
  border: 1px dashed var(--iv2-border-strong);
  border-radius: var(--iv2-radius);
  color: var(--text-muted);
}
.iv2-empty__title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.iv2-empty__body { font-size: 14px; max-width: 50ch; margin: 0 auto; }

/* ════════════════════════════════════════════════════════════════════════
 * INSIDER PROFILE
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-profile-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px;
  padding: 28px 0; border-bottom: 1px solid var(--iv2-border);
  margin-bottom: 28px;
}
.iv2-profile-hero__avatar {
  width: 96px; height: 96px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.iv2-profile-hero__name {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800; letter-spacing: -.4px; margin: 0 0 6px;
}
.iv2-profile-hero__role { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.iv2-profile-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ════════════════════════════════════════════════════════════════════════
 * LEADERBOARD / SECTOR
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-board-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.iv2-board-card {
  padding: 18px 18px 14px;
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 8px;
  transition: all .15s;
}
.iv2-board-card:hover { border-color: var(--iv2-border-strong); transform: translateY(-2px); box-shadow: var(--iv2-shadow-md); }
.iv2-board-card__rank {
  font-size: 11px; font-weight: 800; color: var(--iv2-info);
  text-transform: uppercase; letter-spacing: 1px;
}
.iv2-board-card__ticker {
  font-size: 22px; font-weight: 800; letter-spacing: -.3px;
}
.iv2-board-card__name { font-size: 13px; color: var(--text-muted); }
.iv2-board-card__value { font-size: 18px; font-weight: 800; margin-top: 4px; }
.iv2-board-card__value--buy { color: var(--iv2-buy); }
.iv2-board-card__value--sell { color: var(--iv2-sell); }
.iv2-board-card__sub { font-size: 12px; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════════════
 * EDUCATIONAL CALLOUT
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-edu {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  background: var(--iv2-info-soft);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--iv2-radius);
  font-size: 13.5px; line-height: 1.6;
  color: var(--text);
  margin: 20px 0;
}
.iv2-edu__icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--iv2-info);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.iv2-edu strong { color: var(--text); font-weight: 700; }

/* ════════════════════════════════════════════════════════════════════════
 * UTILITIES
 * ════════════════════════════════════════════════════════════════════════ */
.iv2-clickable { cursor: pointer; }
.iv2-mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.iv2-hidden { display: none !important; }
.iv2-up { color: var(--iv2-buy); }
.iv2-down { color: var(--iv2-sell); }

/* ════════════════════════════════════════════════════════════════════════
 * BATCH 3 — HEADLINE (#5) + LAYOUT / NAV / RAIL (#11) + A11Y (#12)
 * ════════════════════════════════════════════════════════════════════════ */

/* ── #5: Headline visual balance ──────────────────────────────────────── */
.iv2-hero__headline {
  text-wrap: balance;
}

/* ── #11: Page layout — article + right rail ─────────────────────────── */
.iv2-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 36px;
  align-items: start;
}
.iv2-page-main { min-width: 0; }
@media (max-width: 1120px) {
  .iv2-page-layout { grid-template-columns: 1fr; }
  .iv2-article-rail { display: none; }
}

/* ── #11: Article right rail ─────────────────────────────────────────── */
.iv2-article-rail {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.iv2-rail__card {
  background: var(--iv2-bg-card);
  border: 1px solid var(--iv2-border);
  border-radius: var(--iv2-radius);
  padding: 16px 18px;
}
.iv2-rail__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.iv2-rail__price {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.iv2-rail__score {
  font-size: 24px;
  font-weight: 800;
  color: var(--iv2-info);
  line-height: 1.1;
}
.iv2-rail__since {
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}
.iv2-rail__since--up { color: var(--iv2-buy); }
.iv2-rail__since--down { color: var(--iv2-sell); }
.iv2-rail__filing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--iv2-border);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}
.iv2-rail__filing:last-child { border-bottom: 0; }
.iv2-rail__filing:hover { color: var(--iv2-info); }
.iv2-rail__filing-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iv2-rail__filing-code { flex-shrink: 0; }

/* ── #11: Section navigation pill bar ────────────────────────────────── */
.iv2-section-nav {
  position: sticky;
  top: 58px;
  z-index: 20;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg, #0a0f1a);
  border-bottom: 1px solid var(--iv2-border);
  margin: 0 0 28px;
  -webkit-overflow-scrolling: touch;
}
.iv2-section-nav::-webkit-scrollbar { display: none; }
.iv2-section-nav:empty { display: none; }
.iv2-section-nav__item {
  padding: 10px 15px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.iv2-section-nav__item:hover,
.iv2-section-nav__item.active {
  color: var(--text, #f1f5f9);
  border-bottom-color: var(--iv2-info, #3b82f6);
}

/* ── #12: Accessibility — contrast, spacing, readability ─────────────── */

/* Ensure .dim text meets minimum contrast */
.dim,
.iv2-stat__sub,
.iv2-chip__sub,
.iv2-section-nav__item {
  color: var(--text-muted, #94a3b8);
}

/* Table row minimum touch target */
.iv2-table tbody td {
  padding: 14px 16px;
  line-height: 1.45;
}
.iv2-table thead th {
  padding: 12px 16px;
  z-index: 2; /* above sticky table cells in mobile scroll */
}

/* Sticky table header background fix when page-level sticky nav is present */
.iv2-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* FAQ / content sections line-height */
.faq-item__body p,
.iv2-section p,
.iv2-footnotes {
  line-height: 1.65;
}

/* Mobile font-size floors */
@media (max-width: 640px) {
  .iv2-hero__headline {
    font-size: clamp(24px, 7vw, 36px);
  }
  .iv2-hero__summary {
    font-size: 15px;
  }
  .iv2-table tbody td,
  .iv2-table thead th {
    padding: 11px 12px;
    font-size: 13px;
  }
  .iv2-rail__price { font-size: 22px; }
}

/* ── #6: Chart upgrades — legend, HTML tooltips, net flow ──────────── */
.iv2-chart-container { position: relative; }
.iv2-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.iv2-chart-legend__item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}
.iv2-chart-legend__item::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.iv2-chart-legend__item--buy::before { background: var(--iv2-buy); }
.iv2-chart-legend__item--sell::before { background: var(--iv2-sell); }
.iv2-chart-legend__item--other::before { background: var(--iv2-neutral, #64748b); }
.iv2-chart-legend__item--netflow::before { background: linear-gradient(to right, var(--iv2-buy), var(--iv2-sell)); }
.iv2-chart-legend__sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--iv2-border);
}
.iv2-chart-tip {
  position: absolute;
  z-index: 40;
  background: var(--iv2-bg-card, rgba(15,23,42,0.97));
  border: 1px solid var(--iv2-border-strong, rgba(148,163,184,0.28));
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  min-width: 140px;
}
.iv2-chart-tip__month {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 6px;
}
.iv2-chart-tip__row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.7;
}
.iv2-chart-tip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.iv2-chart-tip__dot--buy { background: var(--iv2-buy); }
.iv2-chart-tip__dot--sell { background: var(--iv2-sell); }
.iv2-chart-tip__dot--other { background: var(--iv2-neutral, #64748b); }
.iv2-chart-group:hover > rect.iv2-chart-hover { fill: rgba(255,255,255,0.04); }

/* ── #15: Latest insider headlines feed ────────────────────────────── */
.iv2-headlines {
  margin: 18px 0 24px;
}
.iv2-headlines__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.iv2-headlines__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted, #94a3b8);
}
.iv2-headlines__see-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--iv2-info, #3b82f6);
  text-decoration: none;
}
.iv2-headlines__see-all:hover { text-decoration: underline; }
.iv2-headlines-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.iv2-headline-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--iv2-border);
  text-decoration: none;
  color: var(--text, #f1f5f9);
  transition: background .12s, border-color .12s, transform .12s;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}
.iv2-headline-card:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--iv2-border-strong);
  transform: translateY(-1px);
}
.iv2-headline-card__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.iv2-headline-card__brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.iv2-headline-card__ticker {
  font-size: 11px;
  font-weight: 700;
  background: var(--iv2-bg-elev-2);
  border: 1px solid var(--iv2-border);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.5px;
  align-self: flex-start;
  width: fit-content;
}
.iv2-headline-card__company {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.iv2-headline-card__body { flex: 1; min-width: 0; }
.iv2-headline-card__hl {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}
.iv2-headline-card__meta {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.iv2-headline-card__code-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
}
.iv2-headline-card__code-pill--P { background: var(--iv2-buy-soft); color: var(--iv2-buy); }
.iv2-headline-card__code-pill--S { background: var(--iv2-sell-soft); color: var(--iv2-sell); }
.iv2-headline-card__code-pill--default { background: var(--iv2-bg-elev-2); color: var(--text-muted); }

@media (max-width: 900px) {
  .iv2-headlines-feed {
    grid-template-columns: 1fr;
  }
  .iv2-headline-card {
    grid-template-columns: 1fr;
  }
}
