/* ==========================================================================
   Congressional Trading Intelligence — design system
   Concept: official disclosure record meets trading terminal.
   Signature element: the "filing stamp" score badge (.stamp) — a circular,
   slightly rotated mark used everywhere an Interest Score appears, echoing
   an official document stamp.
   ========================================================================== */

:root {
  --bg: #0e1420;
  --panel: #161d2e;
  --panel-raised: #1c2438;
  --border: #2a3348;
  --border-soft: #202940;
  --text: #e8eaf0;
  --text-muted: #8a93ab;
  --text-faint: #828ca6;
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.14);
  --buy: #34d399;
  --buy-soft: rgba(52, 211, 153, 0.12);
  --sell: #f87171;
  --sell-soft: rgba(248, 113, 113, 0.12);
  /* Value-intensity ramp (darkest = lowest, brightest = highest), used for
     amount and score columns so the reader can gauge magnitude by color
     at a glance without reading every number — see .value-tier-N below. */
  --tier-0: hsl(43, 28%, 34%);
  --tier-1: hsl(43, 42%, 42%);
  --tier-2: hsl(43, 58%, 50%);
  --tier-3: hsl(43, 72%, 58%);
  --tier-4: hsl(44, 88%, 65%);
  --tier-5: hsl(48, 96%, 72%);
  --radius: 10px;
  --serif: "IBM Plex Serif", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(201, 162, 39, 0.06), transparent),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(52, 211, 153, 0.04), transparent);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

::selection { background: var(--gold-soft); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Masthead ---- */

.masthead {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(22, 29, 46, 0.6), transparent);
}

.masthead-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  gap: 12px;
}

.masthead-title-link {
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.masthead-title-link:hover .masthead-brand { color: var(--gold); }

/* Logo mark next to the brand name. */
.masthead-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  transition: transform 0.15s;
}
.masthead-title-link:hover .masthead-logo { transform: scale(1.05); }

/* Brand name + tagline stacked to the right of the logo. */
.masthead-brand-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Brand name — large, memorable. */
.masthead-brand {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--text);
  transition: color 0.15s;
  line-height: 1.1;
}
.masthead-brand .dot { color: var(--gold); }

/* Descriptive tagline — smaller, under the brand. */
.masthead-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin: 2px 0 0;
  color: var(--text-muted);
}
@media (max-width: 560px) {
  .masthead-logo { width: 32px; height: 32px; }
  .masthead-brand { font-size: 21px; }
}

.masthead-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 4px;
}

.masthead-nav {
  display: flex;
  align-items: center;   /* vertically centre all items incl. the Premium button */
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  padding-right: 70px;   /* room for the absolutely-positioned account icon */
}

.masthead-nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.masthead-nav a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
/* Selected (active) item is white — except the Premium group, which keeps its
   gold accent (styled separately below). */
.masthead-nav a.active {
  color: #FFFFFF;
  border-bottom-color: #FFFFFF;
}

/* Grouped navigation: top-level items that open a dropdown of related pages.
   Pure CSS — opens on hover (desktop) and on focus-within (keyboard/touch),
   so it needs no JavaScript and stays accessible. */
.nav-group {
  position: relative;
  display: inline-block;
}
.nav-group-label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 3px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.nav-group-label:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
/* Active dropdown group is white — except Premium, which stays gold. */
.nav-group.active > .nav-group-label {
  color: #FFFFFF;
  border-bottom-color: #FFFFFF;
}
.nav-group-premium.active > .nav-group-label,
.nav-group-premium > .nav-group-label {
  color: var(--gold);
}
.nav-caret { font-size: 9px; opacity: 0.7; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 150px;
  background: var(--panel-raised, #1c2438);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s, transform 0.12s, visibility 0.12s;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
/* A small invisible bridge so the dropdown doesn't close in the gap between
   the label and the menu. */
.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -8px; left: 0; right: 0; height: 8px;
}
.nav-group:hover > .nav-dropdown,
.nav-group:focus-within > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  padding: 6px 10px;
  border-radius: 5px;
  border-bottom: none;
  white-space: nowrap;
  color: var(--text-muted);
}
.nav-dropdown a:hover, .nav-dropdown a.active {
  color: var(--gold);
  background: var(--gold-soft);
  border-bottom: none;
}
@media (max-width: 720px) {
  /* On narrow screens, let dropdowns sit inline rather than float, so the
     whole menu stays reachable without hover. */
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: 4px;
    background: transparent;
    border: none;
    padding: 2px 0 2px 12px;
  }
  .nav-caret { display: none; }
}

.filing-stamp-mark {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ---- Layout ---- */

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px 80px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0 40px;
}

.stat-cell {
  background: var(--panel);
  padding: 18px 20px;
}

.stat-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-value.gold { color: var(--gold); }
.stat-value.buy { color: var(--buy); }

.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-top: 4px;
}

h2.section-title {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 48px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 11px;
}

.section-title .eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

p.section-desc {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0 0 20px;
  max-width: 640px;
}

/* ---- Filing stamp (signature element) ---- */

.stamp {
  --stamp-color: var(--gold);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--stamp-color);
  color: var(--stamp-color);
  font-family: var(--mono);
  transform: rotate(-4deg);
  flex-shrink: 0;
  position: relative;
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--stamp-color);
  border-radius: 50%;
  opacity: 0.5;
}

.stamp .stamp-num { font-size: 16px; font-weight: 700; line-height: 1; }
.stamp .stamp-lbl { font-size: 6.5px; letter-spacing: 0.06em; margin-top: 1px; opacity: 0.85; }

.stamp.sm { width: 36px; height: 36px; }
.stamp.sm .stamp-num { font-size: 12px; }
.stamp.sm .stamp-lbl { font-size: 5.5px; }

/* ---- Trade rank list ---- */

/* Most Interesting Trades: the list blends into the page background — no grey
   panel. Items are separated only by a hairline, with a soft hover lift. */
.rank-list { display: flex; flex-direction: column; gap: 0; background: transparent; border: none; border-radius: 0; overflow: visible; }

.rank-row {
  background: transparent;
  padding: 15px 14px;
  display: grid;
  grid-template-columns: 34px 52px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  border-radius: 10px;
  transition: background 0.12s;
}

.rank-row:hover { background: var(--panel); }

.rank-idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}

.rank-main .pol-name { font-weight: 600; font-size: 14px; }
.rank-main .trade-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.rank-main .ai-note {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid var(--gold-soft);
  line-height: 1.5;
  max-width: 520px;
}

.ticker-badge {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12.5px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
}

.type-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 5px;
}
.type-tag.buy { color: var(--buy); background: var(--buy-soft); }
.type-tag.sell { color: var(--sell); background: var(--sell-soft); }
.type-tag.other { color: var(--text-muted); background: var(--panel-raised); }

/* Disclosure-lag badge: days between trade and its public disclosure,
   colored by speed. Green = prompt, red = long delay (past the STOCK
   Act's 45-day deadline). See disclosure_lag_tier() in generate_dashboard. */
.lag-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.lag-badge.lag-fast      { color: #34d399; background: rgba(52,211,153,0.12); }
.lag-badge.lag-moderate  { color: #d4b45a; background: rgba(212,180,90,0.12); }
.lag-badge.lag-slow      { color: #e6835a; background: rgba(230,131,90,0.12); }
.lag-badge.lag-very-slow { color: #f87171; background: rgba(248,113,113,0.14); }
.lag-badge.lag-unknown   { color: var(--text-muted); background: var(--panel-raised); }
/* Price move during the non-public window, shown next to the lag badge. */
.lag-price {
  font-family: var(--mono);
  font-size: 10.5px;
  margin-left: 6px;
  color: var(--text-muted);
}
.lag-price.up   { color: var(--buy); }
.lag-price.down { color: var(--sell); }

.amount-range { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }

@media (max-width: 720px) {
  .rank-row { grid-template-columns: 24px 40px 1fr; }
  .rank-row .amount-range, .rank-row .type-tag { display: none; }
}

/* ---- Filter toolbar ---- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  align-items: center;
}

.toolbar label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  display: block;
  margin-bottom: 4px;
}

.toolbar select, .toolbar input {
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 6px;
  min-width: 130px;
}

.toolbar input[type="search"] { min-width: 200px; }

.toolbar select:focus, .toolbar input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.clear-filters-btn, .export-csv-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--panel-raised);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  align-self: flex-end;
}
.clear-filters-btn:hover { background: var(--sell-soft); color: var(--sell); border-color: rgba(248,113,113,0.3); }
.export-csv-btn:hover { background: var(--gold-soft); color: var(--gold); border-color: rgba(201,162,39,0.3); }
.export-csv-btn::before { content: "\2193 "; }

@keyframes loadingDots {
  0%, 20% { content: "Loading data"; }
  40% { content: "Loading data."; }
  60% { content: "Loading data.."; }
  80%, 100% { content: "Loading data..."; }
}
.loading-dots { display: inline-block; }

.result-count {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 10px 2px 14px;
}

/* ---- Data table ---- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
table.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--sans);
}
table.data-table td.mono { font-family: var(--mono); }
table.data-table tr:hover td { background: var(--panel-raised); }
table.data-table a.row-link { text-decoration: none; color: var(--text); font-weight: 600; }
table.data-table a.row-link:hover { color: var(--gold); }

/* ---- Cards / profile header ---- */

.profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.profile-title { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 0 0 6px; }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.party-d { color: #7dabf8; border-color: rgba(125,171,248,0.3); }
.pill.party-r { color: #f89494; border-color: rgba(248,148,148,0.3); }

/* Performance tracker page */
.perf-disclaimer {
  background: var(--panel-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px 0 8px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}
.perf-subhead {
  font-family: var(--serif);
  font-size: 18px;
  margin: 32px 0 12px;
  color: var(--text);
}

/* ===== Data Quality page ===== */
/* Hero: the honest headline number + the breakdown of where it comes from. */
.dq-hero {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--gold-soft), rgba(201,162,39,0.02));
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
}
.dq-hero-figure {
  text-align: center;
  flex-shrink: 0;
  padding-right: 28px;
  border-right: 1px solid rgba(201,162,39,0.2);
}
.dq-hero-pct {
  font-family: var(--mono);
  font-size: 58px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.dq-hero-unit { font-size: 30px; opacity: 0.7; }
.dq-hero-caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}
.dq-hero-body { flex: 1; min-width: 280px; }
.dq-hero-body > p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 14px;
}
.dq-flow {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
}
.dq-flow-step {
  flex: 1;
  min-width: 96px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.dq-flow-step.dim { opacity: 0.65; }
.dq-flow-step.ok { border-color: rgba(52,211,153,0.45); background: rgba(52,211,153,0.07); }
.dq-flow-num {
  display: block;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.dq-flow-step.ok .dq-flow-num { color: var(--buy); }
.dq-flow-lbl {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.dq-flow-op {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--text-faint);
}
.dq-fineprint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 12px 0 0;
}

/* Subsection headers */
.dq-subhead {
  font-family: var(--serif);
  font-size: 17px;
  margin: 30px 0 12px;
  color: var(--text);
}

/* Pipeline health: status rows with a green/amber dot. */
.dq-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.dq-status {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.dq-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dq-status.ok .dq-status-dot { background: var(--buy); box-shadow: 0 0 0 3px rgba(52,211,153,0.15); }
.dq-status.warn .dq-status-dot { background: #e6a23a; box-shadow: 0 0 0 3px rgba(230,162,58,0.15); }
.dq-status-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.dq-status-detail {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Corpus metrics: compact stat tiles. */
.dq-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.dq-metric {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.dq-metric-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}
.dq-metric-num.dq-metric-date { font-size: 15px; }
.dq-metric-lbl {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
@media (max-width: 720px) {
  .dq-flow { flex-direction: column; }
  .dq-flow-op { justify-content: center; padding: 2px 0; }
  .dq-hero-figure { border-right: none; padding-right: 0; }
}
.cmp-estimate {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  color: var(--text-muted);
  margin-left: 8px;
}
/* Fixed-height wrapper around each comparison chart. Chart.js with
   maintainAspectRatio:false fills its parent's height — so the parent MUST
   have a definite height, or the canvas and the page layout push each
   other back and forth on load (a resize loop that reads as "jitter").
   The wrapper gives Chart.js a stable box to draw into; the canvas fills
   it exactly and settles immediately. */
.cmp-chart-wrap {
  position: relative;
  height: 240px;
  width: 100%;
}
.cmp-chart-wrap canvas {
  display: block;
}

/* Valuation multiples — per-stock cards and screener cell shading. */
.valuation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 8px 0 16px;
}
.valuation-card { padding: 16px 18px; }
.valuation-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.valuation-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0;
}
.valuation-compare {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.valuation-compare.cheaper { color: var(--buy); }
.valuation-compare.pricier { color: var(--sell); }

/* Expandable calculation breakdown inside each valuation card. Uses the
   native <details>/<summary> so it works without JS and stays accessible.
   Collapsed by default: the card stays clean; click to reveal the math. */
.valuation-formula {
  margin-top: 10px;
  border-top: 1px solid var(--border-soft);
  padding-top: 8px;
}
.valuation-formula > summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  list-style: none;
  user-select: none;
}
.valuation-formula > summary::-webkit-details-marker { display: none; }
.valuation-formula > summary::before {
  content: "▸ ";
  color: var(--text-faint);
}
.valuation-formula[open] > summary::before { content: "▾ "; }
.valuation-formula > summary:hover { color: var(--text); }
.valuation-formula-body {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
}
.valuation-formula-expr { color: var(--text-muted); }
.valuation-formula-numbers { color: var(--text); margin-top: 2px; }
.valuation-formula-numbers strong { color: var(--gold); }
.valuation-formula-note {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-faint);
  line-height: 1.5;
}
/* Screener cell shading: green cheaper vs sector, red pricier. */
.val-cheaper { color: var(--buy); }
.val-pricier { color: var(--sell); }

/* Congressional Index summary tiles */
.index-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 4px;
}
.index-summary-item {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 160px;
}
.index-summary-item.is-congress {
  border-color: rgba(201,162,39,0.4);
  background: var(--gold-soft);
}
.index-summary-name {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.index-summary-level {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}
.index-summary-level.pos { color: var(--buy); }
.index-summary-level.neg { color: var(--sell); }
.index-summary-change {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.party-perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.party-perf-card { padding: 18px 20px; }
.party-perf-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.party-perf-name.party-d { color: #7dabf8; }
.party-perf-name.party-r { color: #f89494; }
.party-perf-value {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
}
.party-perf-value.pos { color: var(--buy); }
.party-perf-value.neg { color: var(--sell); }
.party-perf-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.perf-rank { color: var(--text-muted); width: 2em; }
.perf-excess { font-weight: 700; }
.pos { color: var(--buy); }
.neg { color: var(--sell); }
.party-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--text-muted);
  vertical-align: middle;
}
.party-dot.party-d { background: #7dabf8; }
.party-dot.party-r { background: #f89494; }
.pill.committee-pill { color: var(--gold); border-color: rgba(201,162,39,0.25); background: var(--gold-soft); }

/* Conflict-of-interest signal: a trade in a sector overseen by one of the
   politician's committees. Framed as a flag to look at, never an
   accusation — amber, not alarm-red. */
.conflict-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(230,131,90,0.08);
  border: 1px solid rgba(230,131,90,0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 20px 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.conflict-banner strong { color: #e6835a; }
.conflict-banner-icon {
  color: #e6835a;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.conflict-flag {
  color: #e6835a;
  cursor: help;
}
.conflict-flag-inline { color: #e6835a; }
.conflict-row { background: rgba(230,131,90,0.05); }
.conflict-row:hover { background: rgba(230,131,90,0.09); }

/* Conflicts overview page: one group per politician. */
.conflict-group { margin: 28px 0; }
.conflict-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.conflict-group-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}
.conflict-committee-cell {
  font-size: 12px;
  color: var(--text-muted);
}

/* Favorite sectors: horizontal bars, longest = most-traded. */
.sector-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 16px;
}
.sector-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 90px;
  align-items: center;
  gap: 12px;
}
.sector-bar-label {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sector-bar-track {
  background: var(--panel-raised);
  border-radius: 4px;
  height: 18px;
  overflow: hidden;
}
.sector-bar-fill {
  background: var(--gold);
  height: 100%;
  border-radius: 4px;
  min-width: 2px;
}
.sector-bar-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}
.sector-bar-pct { color: var(--text-muted); }
@media (max-width: 620px) {
  .sector-bar-row { grid-template-columns: 100px 1fr 70px; gap: 8px; }
  .sector-bar-label { font-size: 12px; }
}
.co-investor-tickers {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 340px;
  white-space: normal;
}

.consensus-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}
.consensus-badge.VERY_BULLISH, .consensus-badge.BULLISH { color: var(--buy); background: var(--buy-soft); border: 1px solid rgba(52,211,153,0.3); }
.consensus-badge.VERY_BEARISH, .consensus-badge.BEARISH { color: var(--sell); background: var(--sell-soft); border: 1px solid rgba(248,113,113,0.3); }
.consensus-badge.NEUTRAL, .consensus-badge.INSUFFICIENT_DATA { color: var(--text-muted); background: var(--panel-raised); border: 1px solid var(--border-soft); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 34px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.card canvas { max-width: 100%; }
/* The price chart uses maintainAspectRatio:false, so it needs a definite
   height to draw into — without this it can collapse to zero (and vanish) on
   a browser-zoom/resize. A fixed box keeps it stable at any zoom level. */
#priceChart { height: 300px !important; max-height: 300px; }
@media (max-width: 560px) { #priceChart { height: 220px !important; } }

.chart-card { grid-column: span 2; }
@media (max-width: 720px) { .chart-card { grid-column: span 1; } }
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-legend { display: flex; gap: 14px; }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}
.legend-dot.buy { background: var(--buy); }
.legend-dot.sell { background: var(--sell); }

/* Per-politician trade filter checkboxes */
.trade-filter {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.trade-filter-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-bottom: 10px;
}
.trade-filter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 18px;
}
.trade-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  padding: 3px 0;
}
.trade-filter-item input,
.trade-filter-all input {
  cursor: pointer;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.trade-filter-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.trade-filter-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trade-filter-counts {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  gap: 8px;
}
.trade-filter-counts .cnt {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.trade-filter-counts .cnt.buy { color: var(--buy); }
.trade-filter-counts .cnt.sell { color: var(--sell); }

/* ---- Footer / disclaimer ---- */

.disclaimer {
  margin-top: 56px;
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
}

.disclaimer strong { color: var(--text-muted); }

/* ---- Multi-column site footer, in the site's own dark/gold theme ---- */
footer.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  font-family: var(--mono);
  color: var(--text-muted);
}
.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 28px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 36px;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.footer-brand span { color: var(--gold); }
.footer-tagline {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 14px;
  max-width: 320px;
}
.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-faint);
}
.footer-status strong { color: var(--text-muted); font-weight: 600; }
.footer-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--buy);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: update-pulse 2.8s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .footer-status-dot { animation: none; box-shadow: 0 0 0 3px rgba(52,211,153,0.15); }
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 7px; }
.footer-links a {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--gold); }
.footer-legal {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.footer-legal strong { color: var(--text-muted); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
  padding: 14px 28px;
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto;
  font-size: 11px;
  color: var(--text-faint);
}
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}
.footer-bottom-note { color: var(--text-faint); }
.footer-bottom-legal { display: inline-flex; gap: 16px; }
.footer-bottom-legal a { color: var(--text-muted); text-decoration: none; }
.footer-bottom-legal a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- Animation: gentle rise-in for the stat strip only (signature restraint) ---- */

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-strip .stat-cell { animation: rise 0.4s ease both; }
.stat-strip .stat-cell:nth-child(1) { animation-delay: 0.02s; }
.stat-strip .stat-cell:nth-child(2) { animation-delay: 0.06s; }
.stat-strip .stat-cell:nth-child(3) { animation-delay: 0.10s; }
.stat-strip .stat-cell:nth-child(4) { animation-delay: 0.14s; }
.stat-strip .stat-cell:nth-child(5) { animation-delay: 0.18s; }

/* ---- Pagination ---- */

.pagination { display: flex; gap: 6px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pagination button {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--panel);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.pagination button:hover:not(:disabled) { background: var(--panel-raised); color: var(--text); }
.pagination button.active { background: var(--gold-soft); color: var(--gold); border-color: rgba(201,162,39,0.4); font-weight: 600; }
.pagination button:disabled { opacity: 0.35; cursor: default; }

/* ---- Sortable table headers ---- */

table.data-table th[data-sort] { cursor: pointer; user-select: none; }
table.data-table th[data-sort]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
table.data-table th[data-sort]:hover { color: var(--text-muted); }
table.data-table th.sorted-asc::after { content: " \25B2"; font-size: 9px; color: var(--gold); }
table.data-table th.sorted-desc::after { content: " \25BC"; font-size: 9px; color: var(--gold); }

/* ---- Alerts ---- */

.alert-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.alert-row {
  background: var(--panel);
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: start;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.alert-row:hover { background: var(--panel-raised); }

.alert-severity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; }
.severity-high .alert-severity-dot { background: var(--sell); }
.severity-medium .alert-severity-dot { background: var(--gold); }
.severity-low .alert-severity-dot { background: var(--text-faint); }

.alert-title { font-weight: 600; font-size: 13.5px; display: block; }
.alert-desc { font-size: 12.5px; color: var(--text-muted); display: block; margin-top: 2px; }

.alert-type-tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 2px;
}

@media (max-width: 720px) {
  .alert-row { grid-template-columns: 10px 1fr; }
  .alert-type-tag { display: none; }
}

/* ---- Accessibility: skip link ---- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--gold);
  color: var(--bg);
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  border-radius: 0 0 6px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

.value-tier-0 { color: var(--tier-0); }
.value-tier-1 { color: var(--tier-1); }
.value-tier-2 { color: var(--tier-2); }
.value-tier-3 { color: var(--tier-3); }
.value-tier-4 { color: var(--tier-4); font-weight: 600; }
.value-tier-5 { color: var(--tier-5); font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 13px;
}

/* ===== Signals highlights page ===== */
.signals-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.signals-col-head {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 4px;
}
.signals-col-head.bullish { color: var(--buy); }
.signals-col-head.bearish { color: var(--sell); }
.signals-col-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}
.signal-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.signal-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.signal-rank {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-faint);
  width: 22px;
  flex-shrink: 0;
}
.signal-id { flex: 1; min-width: 0; }
.signal-ticker { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.signal-company {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.signal-sector {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.signal-score {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}
.signal-score.bullish { color: var(--buy); }
.signal-score.bearish { color: var(--sell); }
.signal-reasons { margin-top: 10px; border-top: 1px solid var(--border-soft); padding-top: 8px; }
.signal-reasons > summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  list-style: none;
  user-select: none;
}
.signal-reasons > summary::-webkit-details-marker { display: none; }
.signal-reasons > summary::before { content: "▸ "; color: var(--text-faint); }
.signal-reasons[open] > summary::before { content: "▾ "; }
.signal-reasons > summary:hover { color: var(--text); }
.signal-reasons ul { list-style: none; margin: 8px 0 0; padding: 0; }
.signal-reasons li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.signal-reasons li:last-child { border-bottom: none; }
.signal-reason-label { color: var(--text); font-weight: 600; flex-shrink: 0; }
.signal-reason-detail { color: var(--text-muted); flex: 1; font-family: var(--mono); font-size: 11px; }
.signal-reason-pts { font-family: var(--mono); font-size: 11px; color: var(--gold); flex-shrink: 0; }

/* 3-column signal dashboard: Political anomaly | Company fundamentals | Macro.
   auto-fit so it wraps 3→2→1 as the (already two-up) card column narrows. */
.signal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 10px; }
.signal-col { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; background: var(--panel-raised); min-width: 0; }
.signal-col-head { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin-bottom: 8px; border-bottom: 1px solid var(--border-soft); padding-bottom: 6px; }
.signal-col-empty { color: var(--text-muted); font-size: 12px; font-style: italic; margin: 4px 0; }
.signal-col-note { color: var(--text-faint); font-size: 10.5px; line-height: 1.5; margin: 8px 0 0; }
.signal-reason-list, .signal-fund-list { list-style: none; margin: 0; padding: 0; }
.signal-reason-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; padding: 4px 0; font-size: 12px; border-bottom: 1px solid var(--border-soft); }
.signal-reason-list li:last-child { border-bottom: none; }
.signal-fund-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; padding: 4px 0; font-size: 12px; border-bottom: 1px solid var(--border-soft); }
.signal-fund-list li:last-child { border-bottom: none; }
.signal-fund-label { color: var(--text-muted); flex-shrink: 0; min-width: 84px; }
.signal-fund-value { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: 12px; }
.signal-fund-value.pos { color: var(--buy); }
.signal-fund-value.neg { color: var(--sell); }
.signal-fund-value.muted { color: var(--text-faint); font-weight: 500; }
.signal-fund-tag { font-family: var(--mono); font-size: 10px; color: var(--text-faint); }
.signal-fund-tag.cheaper { color: var(--buy); }
.signal-fund-tag.pricier { color: var(--sell); }
.signal-fund-tag.in-line { color: var(--text-muted); }
.signals-empty { color: var(--text-muted); font-size: 13px; font-style: italic; }
@media (max-width: 720px) {
  .signals-columns { grid-template-columns: 1fr; }
}

/* ===== Sector money-flow heatmap ===== */
.heatmap-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.heatmap-legend-item { display: flex; align-items: center; gap: 6px; }
.heatmap-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.heatmap-swatch.in { background: rgba(52,211,153,0.7); }
.heatmap-swatch.out { background: rgba(248,113,113,0.7); }
.heatmap-swatch.flat { background: var(--panel); border: 1px solid var(--border-soft); }
.heatmap-scroll { overflow-x: auto; }
.heatmap-table {
  border-collapse: separate;
  border-spacing: 3px;
  width: 100%;
  min-width: 640px;
}
.heatmap-sector-head, .heatmap-month-head, .heatmap-total-head {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  padding: 4px 6px;
  text-align: center;
}
.heatmap-sector-head { text-align: left; }
.heatmap-month-head { min-width: 78px; }
.heatmap-sector {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  padding: 4px 10px 4px 4px;
  text-align: left;
}
.heatmap-cell {
  border-radius: 5px;
  text-align: center;
  padding: 8px 4px;
  min-width: 78px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  transition: transform 0.08s ease;
}
.heatmap-cell:hover { transform: scale(1.04); cursor: default; }
.heatmap-net {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.heatmap-n {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.heatmap-total {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  padding: 4px 6px;
  color: var(--text-muted);
}
.heatmap-total.pos { color: var(--buy); }
.heatmap-total.neg { color: var(--sell); }
.heatmap-filling { color: var(--gold); }

/* ===== Legislation feed ===== */
.leg-policy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.leg-action { font-size: 12px; color: var(--text-muted); }
.leg-date { color: var(--text-faint); font-size: 11px; }
.leg-nosector { color: var(--text-faint); }

/* ===== Methodology page ===== */
.method-principle {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--gold-soft);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 8px 0 24px;
}
.method-principle-mark {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--buy);
  flex-shrink: 0;
  line-height: 1.2;
}
.method-principle-title {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}
.method-principle p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}
.method-components {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 16px;
}
.method-comp {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.method-comp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.method-comp-name {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--text);
}
.method-comp-weight {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}
.method-comp-bar {
  height: 5px;
  background: var(--border-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.method-comp-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
}
.method-comp-summary {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 3px;
}
.method-comp-detail {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}
.method-caveats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 8px;
}
.method-caveat {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.method-caveat strong { color: var(--text); }

/* ===== Calibration / does-it-work page ===== */
.calib-baseline {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 8px 0 8px;
}
.calib-baseline-figure {
  text-align: center;
  flex-shrink: 0;
  padding-right: 24px;
  border-right: 1px solid var(--border-soft);
}
.calib-baseline-num {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.calib-baseline-num.pos { color: var(--buy); }
.calib-baseline-num.neg { color: var(--sell); }
.calib-baseline-lbl {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}
.calib-baseline-body { flex: 1; min-width: 280px; }
.calib-baseline-body p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}
.calib-baseline-body strong { color: var(--text); }
@media (max-width: 720px) {
  .calib-baseline-figure { border-right: none; padding-right: 0; }
}

/* ===== Bipartisan / cross-chamber clusters ===== */
.bp-cluster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 8px 0 28px;
}
.bp-cluster {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.bp-cluster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.bp-cluster-ticker { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.bp-cluster-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.bp-tag-bipartisan {
  background: linear-gradient(90deg, rgba(90,169,230,0.18), rgba(248,113,113,0.18));
  color: var(--text);
  border: 1px solid rgba(138,147,171,0.3);
}
.bp-tag-chamber {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(201,162,39,0.3);
}
.bp-cluster-company {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}
.bp-cluster-stats {
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Signal Card (per high-scoring trade on the homepage) ===== */
.rank-item {
  border-bottom: 1px solid var(--border-soft);
}
.rank-item:last-child { border-bottom: none; }
.rank-item .rank-row { border-bottom: none; }
.signal-card {
  padding: 0 18px 12px 18px;
}
/* One continuous gold rail down the left of the whole explanation block —
   the "Why it ranks" line(s) and the Score card share it and the same indent. */
.why-block {
  margin: 0 18px 15px 18px;
  padding: 3px 0 3px 13px;
  border-left: 2px solid rgba(201, 162, 39, 0.30);
}
.why-block > :last-child { margin-bottom: 0; }
.why-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 10px 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}
.why-badge {
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  white-space: nowrap;
  opacity: 0.8;
}
.why-line .why-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.why-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
@media (max-width: 560px) {
  .why-line { flex-direction: column; gap: 6px; }
}
.signal-card > summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
  list-style: none;
  padding: 4px 0 4px 40px;
  user-select: none;
  letter-spacing: 0.03em;
}
.signal-card > summary::-webkit-details-marker { display: none; }
.signal-card > summary::before { content: "▸ "; color: var(--text-faint); }
.signal-card[open] > summary::before { content: "▾ "; }
.signal-card > summary:hover { color: var(--gold); }
.signal-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px 18px;
  padding: 6px 0 4px 40px;
}
.signal-dim {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.signal-dim-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  align-self: center;
  background: var(--text-faint);
}
.signal-strong .signal-dim-dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,0.15); }
.signal-moderate .signal-dim-dot { background: var(--buy); }
.signal-weak .signal-dim-dot { background: var(--text-muted); }
.signal-none .signal-dim-dot { background: var(--border); }
.signal-dim-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 128px;
}
.signal-strong .signal-dim-label { color: var(--gold); }
.signal-dim-note { color: var(--text-muted); line-height: 1.4; }
.signal-none .signal-dim-label,
.signal-none .signal-dim-note { opacity: 0.55; }

/* Homepage score card inside the why-block: no panel fill (blends with the
   page background) and no extra left indent, so it lines up with the "Why it
   ranks" text and the gold rail continues straight through it. */
.why-block .signal-card {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
}
.why-block .signal-card > summary { padding: 4px 0; }
.why-block .signal-card-body { padding: 6px 0 2px 0; }

/* ===== Daily Signals Digest ===== */
.digest-summary {
  background: var(--gold-soft);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 8px 0 20px;
}
.digest-lede {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}
.digest-lede strong { color: var(--gold); }
.digest-sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.digest-sector-pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 4px 12px;
}
.digest-sector-n { color: var(--gold); font-weight: 700; }
.digest-clusters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.digest-cluster {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 16px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.digest-cluster:hover { border-color: var(--gold); }
.digest-cluster-ticker {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.digest-cluster:hover .digest-cluster-ticker { color: var(--gold); }
.digest-cluster-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Date-integrity warning marker on trade rows */
.date-warn {
  color: #e6a23a;
  font-size: 11px;
  cursor: help;
}

/* ===== About / trust page ===== */
.about-block {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 18px;
  margin-bottom: 22px;
}
.about-block.about-block-plain { border-left-color: var(--border); }
.about-block h3 {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text);
  margin: 0 0 8px;
}
.about-block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}
.about-block strong { color: var(--text); }
.about-not { list-style: none; margin: 0; padding: 0; }
.about-not li {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  padding: 4px 0;
}

/* Mobile: reduce the generous side padding so content gets more width on
   narrow screens (28px each side eats 56px of a 375px phone). */
@media (max-width: 560px) {
  .wrap { padding: 0 14px 60px; }
  .section-title { font-size: 20px; }
  /* Tables stay scrollable; make their cells a touch tighter on mobile. */
  .data-table th, .data-table td { padding: 8px 8px; font-size: 12px; }
}

/* ===== Signal performance scorecard ===== */
.sigperf-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0 12px;
}
.sigperf-stat {
  flex: 1;
  min-width: 160px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
}
.sigperf-num {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.sigperf-num.pos { color: var(--buy); }
.sigperf-num.neg { color: var(--sell); }
.sigperf-lbl {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}
.sigperf-hit { color: var(--buy); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.sigperf-miss { color: var(--sell); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.sigperf-empty {
  background: var(--panel);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.sigperf-empty p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0; }

/* ===== "Why we're different" strip on the homepage ===== */
.why-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 4px 0 36px;
  padding: 20px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.why-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(150deg, rgba(201,162,39,0.07), rgba(201,162,39,0.01));
  border: 1px solid rgba(201,162,39,0.16);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s;
}
.why-item:hover { border-color: rgba(201,162,39,0.35); }
.why-head {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}
.why-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}
.why-text strong { color: var(--text); font-weight: 600; }
.why-text em { color: var(--text-muted); font-style: italic; }
@media (max-width: 720px) {
  .why-strip { grid-template-columns: 1fr; gap: 14px; padding: 16px 0; }
}

/* ===== Contact form ===== */
.contact-form {
  max-width: 620px;
  margin: 8px 0 0;
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-field { margin-bottom: 16px; display: flex; flex-direction: column; }
.contact-field label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.contact-field input,
.contact-field select,
.contact-field textarea {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus { border-color: var(--gold); }
.contact-field textarea { resize: vertical; min-height: 120px; }
.contact-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}
.contact-btn {
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.contact-btn-cancel {
  background: transparent;
  color: var(--text-muted);
}
.contact-btn-cancel:hover { color: var(--text); border-color: var(--text-muted); }
.contact-btn-send {
  background: var(--gold);
  color: #1a1400;
  border-color: var(--gold);
  font-weight: 700;
}
.contact-btn-send:hover { background: var(--gold-bright, #d4af37); }
.contact-btn-send:disabled { opacity: 0.6; cursor: default; }
.contact-status {
  font-size: 13px;
  margin: 8px 0;
  min-height: 20px;
  line-height: 1.5;
}
.contact-status.ok { color: var(--buy); }
.contact-status.err { color: var(--sell); }
@media (max-width: 560px) {
  .contact-row { grid-template-columns: 1fr; gap: 0; }
}

/* RSS follow link in the footer */
.footer-rss {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-rss:hover { color: var(--gold); }
.footer-rss-icon {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: -1px;
}

/* ===== Premium Digest / Weekly Briefing ===== */
.premium-header { display: flex; flex-direction: column; margin-top: 36px; }
.premium-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1400;
  background: var(--gold);
  padding: 3px 10px;
  border-radius: 3px;
}
.nav-premium-dot { color: var(--gold); font-size: 7px; vertical-align: super; margin-left: 3px; }
.premium-exec {
  background: linear-gradient(135deg, var(--gold-soft), transparent);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 8px 0 24px;
}
.premium-exec-label {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 8px;
}
.premium-exec-body { font-size: 15px; line-height: 1.7; color: var(--text); margin: 0; }
.premium-exec-body strong { color: var(--gold); }
.premium-featured { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.premium-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.premium-card-head { display: flex; align-items: baseline; gap: 12px; }
.premium-card-rank {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--gold); flex-shrink: 0;
}
.premium-card-title { flex: 1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.premium-card-title a { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.premium-card-company { font-size: 12px; color: var(--text-muted); }
.premium-card-score { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--gold); }
.premium-card-score-lbl { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.premium-card-narrative {
  font-size: 14px; line-height: 1.6; color: var(--text); margin: 10px 0 6px;
}
.premium-signal-card { padding: 0; }
.premium-signal-card > summary { padding-left: 0; }
.premium-signal-card .signal-card-body { padding-left: 0; }
.premium-momentum { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.premium-flow {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid var(--border-soft); background: var(--panel);
}
.premium-flow-sector { font-size: 12px; color: var(--text-muted); }
.premium-flow-val { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.premium-flow.inflow .premium-flow-val { color: var(--buy); }
.premium-flow.outflow .premium-flow-val { color: var(--sell); }

/* Legislation marker legend on the stock chart */
.legend-leg {
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(138,147,171,0.9);
  margin-right: 4px;
}

/* Empty price-move cell */
.lag-price-none { color: var(--text-faint); }

/* Multi-line table headers stay top-aligned and tight */
.data-table thead th { vertical-align: bottom; line-height: 1.25; }

/* Briefing edition line (number + week) */
.premium-edition {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin: 4px 0 0;
}
.premium-edition strong { color: var(--gold); }

/* Account / login icon — pinned to the top-right, out of the flex flow so it
   never wraps to a second line on narrower screens (margin-left:auto + wrap
   made it jump down). The masthead-inner is the positioning context. */
.nav-account {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text);          /* logged out: white (site text color) */
  padding: 2px 4px !important;
  border-bottom: none !important;
  transition: color 0.15s, opacity 0.15s;
}
/* Logged out: hover just dims slightly, stays white (gold is reserved for the
   logged-in state, so hover must NOT turn it gold). */
.nav-account:hover { color: var(--text) !important; opacity: 0.7; border-bottom: none !important; }
/* Logged in: gold, at rest and on hover. */
.nav-account.logged-in { color: var(--gold) !important; }
.nav-account.logged-in:hover { color: var(--gold) !important; opacity: 0.8; }
.nav-account svg { display: block; }
.nav-account-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .nav-account { top: 22px; right: 14px; transform: none; }
}

/* Premium dropdown in the nav — a subtle gold accent so it stands out as the
   paid section, and the premium dot sits neatly before the caret. */
.nav-group-premium .nav-group-label { color: var(--gold); }
.nav-group-premium .nav-premium-dot { font-size: 7px; vertical-align: middle; margin: 0 3px 0 1px; }

/* "Page back" icon (used on the privacy/legal page) */
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.page-back:hover { color: var(--gold); }
.page-back svg { display: block; }

/* Legal-page bullet lists */
.legal-list {
  margin: 10px 0 12px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-list li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.legal-list strong { color: var(--text); }

/* API documentation code blocks */
.api-code {
  background: var(--panel-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  margin: 12px 0;
}

/* "Updated" indicator dot in the masthead — a subtle live-status feel.
   Honest: the site is rebuilt on a schedule (daily), not a live feed, so the
   label says "Updated <date>", and the dot is a gentle status cue, not a
   claim of real-time streaming. */
.update-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--buy);
  margin-right: 7px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: update-pulse 2.8s ease-out infinite;
}
@keyframes update-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .update-dot { animation: none; }
}

/* Mission banner — the positioning statement at the top of the homepage.
   States plainly: this is an accountability tool, not an investment tool. */
.mission-banner {
  text-align: center;
  max-width: 720px;
  margin: 8px auto 32px;
  padding: 0 20px;
}
.mission-line {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--text);
}
.mission-line strong { color: var(--gold); font-weight: 700; }
.mission-sub {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 600px) {
  .mission-line { font-size: 21px; }
}

/* Government contracts section (stock pages) */
.contracts-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.contracts-stat {
  background: linear-gradient(150deg, rgba(52,211,153,0.06), var(--panel));
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 16px 18px;
}
.contracts-stat-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--buy);
}
.contracts-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
@media (max-width: 560px) { .contracts-summary { grid-template-columns: 1fr; } }

/* Conflict Score badge (conflicts page) — color-coded by level. Red is not
   "guilt", it's "deserves the most scrutiny". */
.conflict-score {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: help;
}
.conflict-score.conflict-high     { background: rgba(248,113,113,0.18); color: #f89494; border: 1px solid rgba(248,113,113,0.4); }
.conflict-score.conflict-moderate { background: rgba(201,162,39,0.18);  color: var(--gold); border: 1px solid rgba(201,162,39,0.4); }
.conflict-score.conflict-low      { background: var(--panel-soft); color: var(--text-muted); border: 1px solid var(--border-soft); }
.conflict-score.conflict-none     { background: transparent; color: var(--text-faint); border: 1px solid var(--border-soft); }

/* Accountability timeline (stock pages) — congressional trades and federal
   contracts interleaved on one axis. */
.timeline {
  position: relative;
  margin: 8px 0 20px;
  padding-left: 8px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 90px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-soft);
}
.tl-event {
  display: grid;
  grid-template-columns: 78px 20px 1fr;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  position: relative;
}
.tl-date {
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: right;
}
.tl-marker {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin: 3px auto 0;
  z-index: 1;
  border: 2px solid var(--bg);
}
.tl-marker-d { background: #7dabf8; }
.tl-marker-r { background: #f89494; }
.tl-marker-contract { background: var(--buy); width: 13px; height: 13px; }
.tl-body { font-size: 13.5px; line-height: 1.5; }
.tl-detail { color: var(--text-muted); font-size: 12.5px; }
/* Contract rows stand out slightly — they're the accountability anchor. */
.tl-contract .tl-body { background: rgba(52,211,153,0.06); border-radius: 5px; padding: 2px 8px; margin-left: -4px; }
.tl-contract-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--buy);
  margin-right: 8px;
}
.tl-contract-amount { color: var(--buy); font-weight: 700; margin-right: 8px; }
@media (max-width: 560px) {
  .timeline::before { left: 70px; }
  .tl-event { grid-template-columns: 60px 18px 1fr; }
}

/* Contract marker in the chart legend + clickable legend toggles */
.legend-contract { color: var(--buy); font-size: 10px; margin-right: 4px; }
.legend-toggle { cursor: pointer; user-select: none; }
.legend-toggle input { margin-right: 5px; vertical-align: middle; accent-color: var(--gold); }

/* Source links — the "verify it yourself" links to original filings. Central
   to the accountability promise: every claim is one click from its source. */
.source-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.source-link:hover { color: var(--gold); text-decoration: underline; }
.source-none { color: var(--text-faint); font-size: 11px; }

/* Contrast strip — the honesty positioning made visible. "Them" muted,
   "us" in gold. The brand face of Pillar 3. */
.contrast-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 auto 34px;
  max-width: 820px;
}
.contrast-col {
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
}
.contrast-them { background: var(--panel); opacity: 0.75; }
.contrast-us {
  background: linear-gradient(150deg, rgba(201,162,39,0.10), var(--panel));
  border-color: rgba(201,162,39,0.30);
}
.contrast-head {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.contrast-us .contrast-head { color: var(--gold); }
.contrast-col ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.contrast-col li { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.contrast-us li { color: var(--text); }
.contrast-them li { text-decoration: line-through; text-decoration-color: rgba(168,176,196,0.4); }
@media (max-width: 640px) { .contrast-strip { grid-template-columns: 1fr; } }

/* Asset-type badges — surface the FACT-layer instrument type so a PUT is never
   shown as if it were a plain stock trade. A key data-honesty fix. */
.asset-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  border: 1px solid var(--border-soft);
}
.asset-put    { color: #f89494; border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.10); }
.asset-call   { color: var(--buy); border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.10); }
.asset-option { color: var(--gold); border-color: rgba(201,162,39,0.4); background: rgba(201,162,39,0.10); }
.asset-crypto { color: #e0a458; border-color: rgba(224,164,88,0.4); background: rgba(224,164,88,0.10); }
.asset-bond   { color: var(--text-muted); }
.asset-etf    { color: var(--text-muted); }
.asset-other  { color: var(--text-muted); }

/* Chart time-range selector — segmented buttons (1W / 1M / 3M / 6M / 1Y / All).
   The standard control for financial charts: one click, all options visible. */
.chart-range {
  display: flex;
  gap: 2px;
  margin: 2px 0 10px;
  flex-wrap: wrap;
}
.range-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 4px 11px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.range-btn:hover { color: var(--text); border-color: var(--text-faint); }
.range-btn.active {
  color: #1a1400;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
}

/* Chart time-pan: shift a fixed-width window through history */
.chart-pan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 10px;
}
.pan-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, opacity 0.12s;
}
.pan-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text-faint); }
.pan-btn:disabled { opacity: 0.35; cursor: default; }
.pan-window {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* Calibration: statistical significance badges + look-ahead explainer */
.sig-badge { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 2px 7px; border-radius: 3px; }
.sig-badge.sig-yes { color: var(--buy); background: rgba(52,211,153,0.14); border: 1px solid rgba(52,211,153,0.4); }
.sig-badge.sig-no { color: var(--text-muted); background: var(--panel-soft); border: 1px solid var(--border-soft); }
.sig-badge.sig-na { color: var(--text-faint); }
.calib-lookahead-note {
  background: var(--panel-soft);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin: 16px 0 26px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.calib-lookahead-note strong { color: var(--text); }

/* Inline filing viewer overlay (app.js) */
.filing-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(2px);
  align-items: center; justify-content: center;
  padding: 3vh 3vw;
}
.filing-overlay.open { display: flex; }
.filing-modal {
  width: 100%; max-width: 980px; height: 94vh;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.filing-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border-soft);
  background: var(--panel-soft); gap: 12px;
}
.filing-title { font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filing-actions { display: flex; gap: 8px; flex-shrink: 0; }
.filing-btn {
  font-family: var(--mono); font-size: 11px; padding: 5px 11px; border-radius: 5px;
  text-decoration: none; cursor: pointer; border: 1px solid var(--border-soft);
  background: var(--panel); color: var(--text); transition: all 0.12s;
}
.filing-btn:hover { border-color: var(--text-faint); color: var(--text); }
.filing-save { background: var(--gold); color: #1a1400; border-color: var(--gold); font-weight: 700; }
.filing-save:hover { background: #d9b53a; color: #1a1400; }
.filing-close { color: var(--text-muted); }
.filing-frame { flex: 1; width: 100%; border: none; background: #fff; }
@media (max-width: 560px) {
  .filing-modal { height: 96vh; max-width: none; }
  .filing-actions { gap: 5px; }
  .filing-btn { padding: 5px 8px; font-size: 10px; }
}

/* --- Mega-menu for Analysis (descriptions per item) --- */
.nav-group-mega { position: relative; }
.nav-mega {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 8px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.42);
  grid-template-columns: 1fr 1fr;
  gap: 2px; width: 540px; z-index: 200;
}
.nav-group-mega:hover .nav-mega,
.nav-group-mega:focus-within .nav-mega { display: grid; }
.nav-mega-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px; border-radius: 7px; text-decoration: none;
  transition: background 0.12s;
}
.nav-mega-item:hover { background: var(--panel-soft); }
.nav-mega-item.active { background: var(--gold-soft); }
.nav-mega-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.nav-mega-item:hover .nav-mega-title { color: var(--gold); }
.nav-mega-desc { font-size: 11px; color: var(--text-muted); line-height: 1.35; }

/* --- Premium as a clean CTA button (not a dropdown) --- */
/* Scoped to .masthead-nav a so these win over the generic `.masthead-nav a`
   rule (which otherwise forces a 3px bottom padding + transparent bottom
   border, making the button sit low with an uneven box). */
.masthead-nav a.nav-premium-cta {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--gold) !important; font-weight: 600;
  background: linear-gradient(135deg, rgba(201,162,39,0.22), rgba(201,162,39,0.06));
  border: 1px solid var(--gold); border-radius: 6px;
  padding: 5px 12px;              /* symmetric top/bottom */
  transition: all 0.14s;
}
.masthead-nav a.nav-premium-cta:hover {
  background: var(--gold); color: #1a1400 !important; border-color: var(--gold);
}
.nav-premium-cta .nav-premium-dot { font-size: 7px; }
@media (max-width: 920px) {
  .nav-mega { width: 420px; grid-template-columns: 1fr; }
}

/* ---- Mobile navigation (hamburger) ------------------------------------
   Desktop: the toggle is hidden and the nav is a normal inline row. Below
   820px the nav collapses behind the hamburger and, when opened, drops as a
   full-width panel with every group expanded inline (reachable by tap, no
   hover needed). JS in app.js toggles the `open` class. */
.nav-toggle { display: none; }
.nav-toggle {
  position: absolute;
  top: 18px;
  right: 60px;              /* sits just left of the account icon (right:14px) */
  z-index: 60;
  align-items: center;
  gap: 8px;
  background: var(--panel, #1c2438);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 11px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color .15s, border-color .15s;
}
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
.nav-toggle-bars span {
  display: block; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .18s, opacity .18s;
}
.nav-toggle[aria-expanded="true"] { color: var(--gold); border-color: var(--gold); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .masthead-nav {
    display: none;
    flex-basis: 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 4px;
    margin-top: 10px;
    border-top: 1px solid var(--border);
  }
  .masthead-nav.open { display: flex; }
  .masthead-nav > a { width: 100%; display: block; padding: 11px 4px; border-bottom: 1px solid var(--border-soft); }
  .nav-group { width: 100%; display: block; }
  .nav-group-label {
    width: 100%; text-align: left; font-size: 13px;
    padding: 11px 4px; border-bottom: 1px solid var(--border-soft);
  }
  .nav-caret { display: none; }
  /* All sub-menus render inline and open when the panel is open. */
  .nav-dropdown,
  .nav-mega {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 0 8px 14px !important;
    margin: 0 !important;
  }
  .nav-dropdown a, .nav-mega-item { padding: 9px 6px; }
  .masthead-nav a.nav-premium-cta { margin: 10px 4px 4px; align-self: flex-start; }
  .nav-account { top: 20px; right: 14px; transform: none; }
}

/* ---- Homepage: "see all" link + full-database CTA ---------------------- */
.section-more { margin: -4px 0 26px; font-size: 13px; }
.db-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; margin: 32px 0 8px;
  padding: 22px 24px;
  border: 1px solid var(--border-soft); border-radius: 12px;
  background: linear-gradient(150deg, var(--panel-soft, rgba(255,255,255,0.025)), var(--panel));
}
.db-cta-main { min-width: 0; flex: 1 1 320px; }
.db-cta-btn {
  white-space: nowrap; text-decoration: none; flex-shrink: 0;
  background: var(--gold); color: #17130a; font-weight: 700;
  padding: 12px 22px; border-radius: 8px; transition: background .14s;
}
.db-cta-btn:hover { background: #d9b53a; }
@media (max-width: 560px) {
  .db-cta { flex-direction: column; align-items: stretch; }
  .db-cta-btn { text-align: center; }
}

/* --- Premium landing page --- */
.premium-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0;
}
.premium-feature {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px; border: 1px solid var(--border-soft); border-radius: 10px;
  background: var(--panel); text-decoration: none; transition: all 0.14s;
}
.premium-feature:hover { border-color: rgba(201,162,39,0.4); background: linear-gradient(150deg, var(--gold-soft), var(--panel)); }
.premium-feature-title { font-size: 15px; font-weight: 600; color: var(--text); }
.premium-feature:hover .premium-feature-title { color: var(--gold); }
.premium-feature-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.premium-cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 26px; margin-top: 26px;
  background: linear-gradient(150deg, rgba(201,162,39,0.12), var(--panel));
  border: 1px solid rgba(201,162,39,0.3); border-radius: 12px;
}
.premium-cta-head { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); }
.premium-cta-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.premium-cta-btn {
  background: var(--gold); color: #1a1400; font-weight: 700; text-decoration: none;
  padding: 11px 24px; border-radius: 8px; white-space: nowrap; transition: background 0.14s;
}
.premium-cta-btn:hover { background: #d9b53a; }
@media (max-width: 640px) {
  .premium-grid { grid-template-columns: 1fr; }
  .premium-cta-band { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Pricing tiers */
.pricing-tiers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 8px;
}
.tier-card { display: flex; flex-direction: column; padding: 22px 20px; position: relative; }
.tier-card-featured { border-color: rgba(201,162,39,0.5); background: linear-gradient(160deg, var(--gold-soft), var(--panel)); }
.tier-badge {
  position: absolute; top: -10px; left: 20px; background: var(--gold); color: #1a1400;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 9px; border-radius: 4px;
}
.tier-name { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); }
/* Tier name colours: Free darker green, Plus & Pro lighter green. */
.tier-name-free { color: #2e8b50; }
.tier-name-plus { color: #5bc47e; }
.tier-name-pro  { color: #5bc47e; }
.tier-price { margin: 8px 0 2px; }
.tier-amount { font-size: 30px; font-weight: 700; color: var(--text); }
.tier-per { font-size: 13px; color: var(--text-muted); margin-left: 4px; }
.tier-tag { font-size: 12px; color: var(--text); margin-bottom: 14px; min-height: 2.6em; }
.tier-list { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.tier-list li { font-size: 13px; color: var(--text-muted); line-height: 1.5; padding: 4px 0 4px 18px; position: relative; }
.tier-list li::before { content: "·"; position: absolute; left: 4px; color: var(--gold); font-weight: 700; }
.tier-btn {
  display: block; text-align: center; text-decoration: none; padding: 10px 16px; border-radius: 8px;
  background: var(--gold); color: #1a1400; font-weight: 700; transition: background 0.14s;
}
.tier-btn:hover { background: #d9b53a; }
.tier-btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-soft); }
.tier-btn-ghost:hover { border-color: var(--gold); color: var(--gold); background: transparent; }

/* --- 404 page ----------------------------------------------------------- */
.notfound {
  max-width: 560px;
  margin: 48px auto 72px;
  text-align: center;
  padding: 0 16px;
}
.notfound-img { max-width: 320px; width: 70%; height: auto; margin: 0 auto 8px; display: block; }
.notfound-code {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 56px; font-weight: 700; line-height: 1;
  color: var(--gold); letter-spacing: 1px; margin-bottom: 6px;
}
.notfound-title { font-size: 22px; margin: 0 0 10px; }
.notfound-desc { color: var(--text-muted); margin: 0 auto 24px; max-width: 420px; }
.notfound-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 20px;
}
.notfound-actions .tier-btn { display: inline-block; min-width: 170px; }
.notfound-links { font-size: 13px; color: var(--text-muted); }
@media (max-width: 440px) {
  .notfound-actions .tier-btn { min-width: 0; width: 100%; }
}

/* --- Track record (anti-hype scorecard) --------------------------------- */
.tr-pos { color: var(--buy); }
.tr-neg { color: var(--sell); }
.tr-amber { color: var(--gold); }
.tr-neutral { color: var(--text); }
.tr-muted { color: var(--text-faint); }

.tr-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 20px 0 10px;
}
.tr-tile {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 14px 16px;
}
.tr-tile-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; min-height: 28px; }
.tr-tile-value { font-size: 26px; font-weight: 700; line-height: 1.05; }
.tr-tile-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }

.tr-table { width: 100%; border-collapse: collapse; margin: 14px 0 6px; font-size: 13.5px; }
.tr-table th { text-align: left; font-weight: 600; color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; padding: 6px 10px; border-bottom: 1px solid var(--border-soft); }
.tr-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
.tr-table tr:last-child td { border-bottom: none; }
.tr-table .tr-ci { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.tr-baseline td { color: var(--text-muted); font-style: italic; border-top: 1px solid var(--border-soft); }
.tr-flag { font-size: 10px; color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 4px; padding: 0 4px; }
.tr-note { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; }
.tr-updating { font-size: 13px; color: var(--text-muted); }

.tr-rolling { display: flex; gap: 28px; margin: 14px 0 4px; flex-wrap: wrap; }
.tr-rolling-stat { display: flex; align-items: baseline; gap: 10px; }
.tr-rolling-num { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tr-rolling-cap { font-size: 12px; color: var(--text-muted); line-height: 1.3; }
.tr-rolling-cap span { color: var(--text-faint); }

.tr-trend { margin: 16px 0 6px; }
.tr-trend-title { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.tr-trend-row { display: grid; grid-template-columns: 38px 1fr 64px 52px; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.tr-trend-label { color: var(--text-muted); }
.tr-trend-bar-wrap { position: relative; height: 10px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.tr-trend-bar { position: absolute; left: 0; top: 0; height: 100%; border-radius: 3px; min-width: 2px; }
.tr-bar-pos { background: var(--buy); }
.tr-bar-neg { background: var(--sell); }
.tr-trend-val { text-align: right; font-variant-numeric: tabular-nums; }
.tr-trend-n { text-align: right; color: var(--text-faint); font-size: 11.5px; }

@media (max-width: 720px) {
  .tr-tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .tr-tiles { grid-template-columns: 1fr; }
  .tr-tile-label { min-height: 0; }
}

/* --- Leakage Index ------------------------------------------------------ */
.lk-explain {
  margin: 14px 0 18px;
  padding: 13px 16px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.lk-explain strong { color: var(--text); }
.lk-baseline { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 6px 0 18px; }
.lk-baseline-stat { display: flex; align-items: baseline; gap: 12px; }
.lk-baseline-num { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lk-baseline-cap { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.lk-baseline-cap span { color: var(--text-faint); }
.lk-baseline-note { font-size: 12.5px; color: var(--text-muted); max-width: 440px; margin: 0; }
.lk-rank { color: var(--text-faint); font-variant-numeric: tabular-nums; width: 28px; }
.lk-member { text-decoration: none; color: var(--text); font-weight: 600; }
.lk-member:hover { color: var(--gold); }
.lk-chamber { color: var(--text-faint); font-size: 11.5px; margin-left: 6px; }
.lk-hot { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.lk-flag {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--sell); background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3); border-radius: 4px; padding: 1px 5px; margin-left: 6px;
}
@media (max-width: 560px) {
  .lk-baseline-note { max-width: none; }
}

/* --- Trading network (D3) ----------------------------------------------- */
.net-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 14px 0 12px; }
.net-stat { display: flex; flex-direction: column; }
.net-stat-num { font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.net-stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 5px; }
.net-stat-gold .net-stat-num { color: var(--gold); }
.net-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 4px 0 12px; font-size: 12px; color: var(--text-muted); }
.net-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.net-legend-note { color: var(--text-faint); }
.net-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.net-dot.net-d { background: #5b8def; }
.net-dot.net-r { background: #e5564e; }
.net-dot.net-i { background: #c9a227; }
.net-rule { width: 20px; height: 0; border-top: 2px solid #39425f; display: inline-block; }
.net-rule-gold { border-top-color: var(--gold); border-top-width: 2.5px; }
#net-wrap { position: relative; border: 1px solid var(--border-soft); border-radius: 14px; overflow: hidden; }
#net-svg { display: block; width: 100%; }
.net-reset {
  position: absolute; top: 12px; right: 12px; z-index: 6;
  background: rgba(20,27,43,.85); border: 1px solid var(--border-soft);
  color: var(--text-muted); font-size: 11.5px; padding: 5px 10px; border-radius: 7px;
  cursor: pointer; backdrop-filter: blur(3px);
}
.net-reset:hover { color: var(--gold); border-color: var(--gold); }
.net-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--panel-raised); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 8px 11px; font-size: 12px; color: var(--text);
  max-width: 270px; line-height: 1.45; box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.net-tip-hint { display: block; margin-top: 4px; color: var(--text-faint); font-size: 10.5px; }
.net-tip-x { color: var(--gold); font-weight: 700; font-size: 10.5px; }
.net-toplist { margin: 8px 0 0; padding-left: 22px; }
.net-toplist li { margin-bottom: 6px; font-size: 13.5px; }
.net-toplink { text-decoration: none; color: var(--text); font-weight: 600; }
.net-toplink:hover { color: var(--gold); }
.net-topmeta { color: var(--text-faint); font-size: 12px; margin-left: 8px; }

/* --- Interest Score changelog ------------------------------------------ */
.changelog { margin: 18px 0; }
.changelog-entry {
  border-left: 2px solid var(--border-soft);
  padding: 2px 0 14px 18px; margin-left: 4px; position: relative;
}
.changelog-entry::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--bg);
}
.changelog-head { display: flex; align-items: baseline; gap: 12px; }
.changelog-ver { font-weight: 700; font-size: 16px; }
.changelog-current { font-size: 10px; color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 4px; padding: 1px 5px; vertical-align: middle; text-transform: uppercase; letter-spacing: .04em; }
.changelog-date { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.changelog-summary { margin: 6px 0 8px; color: var(--text); font-weight: 600; font-size: 14px; }
.changelog-list { margin: 0; padding-left: 18px; }
.changelog-list li { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; margin-bottom: 5px; }

/* --- Homepage integrity strip ------------------------------------------ */
.home-trust {
  margin: 8px 0 28px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
  padding: 16px 18px 18px;
}
.home-trust-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.home-trust-tag { font-size: 12.5px; color: var(--text-muted); }
.home-trust-link { margin-left: auto; font-size: 13px; color: var(--gold); text-decoration: none; white-space: nowrap; }
.home-trust-link:hover { text-decoration: underline; }
.home-trust-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ht-tile {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg); border: 1px solid var(--border-soft);
  border-radius: 9px; padding: 12px 14px; transition: border-color .14s;
}
.ht-tile:hover { border-color: var(--gold); }
.ht-val { font-size: 23px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ht-sub { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.ht-lab { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
@media (max-width: 720px) {
  .home-trust-tiles { grid-template-columns: 1fr 1fr; }
  .home-trust-link { margin-left: 0; }
}
@media (max-width: 440px) {
  .home-trust-tiles { grid-template-columns: 1fr 1fr; }
}

/* Pricing comparison matrix */
.pricing-matrix-wrap { overflow-x: auto; }
.pricing-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.pricing-matrix th, .pricing-matrix td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); text-align: center; }
.pricing-matrix th:first-child, .pricing-matrix td:first-child { text-align: left; color: var(--text-muted); }
.pricing-matrix thead th { color: var(--text); font-weight: 700; border-bottom: 2px solid var(--text-faint); }
.pricing-matrix tbody td { color: var(--text); }
.pricing-matrix tbody td:not(:first-child) { font-weight: 600; }
/* Comparison marks: ✓ lighter green, — darker green (matches the tier names). */
.pricing-matrix .mx-yes { color: #5bc47e; font-weight: 700; }
.pricing-matrix .mx-no  { color: #2e8b50; }

@media (max-width: 640px) {
  .pricing-tiers { grid-template-columns: 1fr; }
}

/* Senate filing links open the Senate portal (can't be embedded) — a subtle cue. */
.source-link-senate::after { content: " ↗"; font-size: 0.85em; opacity: 0.7; }

/* --- Null-model / permutation test page --- */
.nm-headline {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 20px 24px; border-radius: 12px; margin: 20px 0;
  border: 1px solid var(--border-soft);
}
.nm-headline.nm-yes { background: linear-gradient(150deg, rgba(52,211,153,0.12), var(--panel)); border-color: rgba(52,211,153,0.35); }
.nm-headline.nm-no  { background: var(--panel-soft); }
.nm-verdict { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--text); }
.nm-yes .nm-verdict { color: var(--buy); }
.nm-pvalue { font-family: var(--mono); font-size: 18px; color: var(--text); }
.nm-pnote { font-size: 11px; color: var(--text-muted); display: block; text-align: right; }
.nm-figures { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 28px 0; flex-wrap: wrap; }
.nm-fig { text-align: center; }
.nm-fig-num { font-family: var(--serif); font-size: 42px; font-weight: 700; color: var(--gold); line-height: 1; }
.nm-fig-lbl { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.4; }
.nm-fig-vs { font-family: var(--mono); font-size: 13px; color: var(--text-faint); }
.nm-steps { margin: 12px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.nm-steps li { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.nm-steps strong { color: var(--text); }

/* ---- Mobile form controls ---------------------------------------------
   iOS Safari zooms the page when focusing a control whose font-size is
   below 16px; bump to 16px on small screens. Also let the filter toolbar
   stack to full-width controls so each is an easy tap target. */
@media (max-width: 640px) {
  .toolbar > div { flex: 1 1 100%; }
  .toolbar select, .toolbar input,
  .toolbar input[type="search"] { width: 100%; min-width: 0; font-size: 16px; }
  .contact-field input, .contact-field select, .contact-field textarea { font-size: 16px; }
  .clear-filters-btn, .export-csv-btn { flex: 1 1 auto; align-self: stretch; text-align: center; font-size: 13px; }
}

/* ---- All-trades access gate (free 250 vs members' full database) ------- */
.data-gate {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin: 4px 0 18px; padding: 16px 20px;
  border: 1px solid rgba(201,162,39,0.35); border-radius: 12px;
  background: var(--gold-soft, rgba(201,162,39,0.08));
}
.data-gate-main { min-width: 0; flex: 1 1 320px; }
.data-gate-title { font-size: 15px; font-weight: 700; color: var(--text); }
.data-gate-sub { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-top: 3px; }
.data-gate-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.data-gate-btn {
  white-space: nowrap; text-decoration: none;
  background: var(--gold); color: #17130a; font-weight: 700;
  padding: 10px 18px; border-radius: 8px; transition: background .14s;
}
.data-gate-btn:hover { background: #d9b53a; }
.data-gate-link { white-space: nowrap; text-decoration: none; color: var(--text-muted); font-size: 13px; }
.data-gate-link:hover { color: var(--gold); }
@media (max-width: 560px) {
  .data-gate { flex-direction: column; align-items: stretch; }
  .data-gate-actions { justify-content: space-between; }
}

/* ===== Homepage: hero + landing polish ================================== */

/* Shared action buttons (hero + CTAs) */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; text-decoration: none;
  background: var(--gold); color: #17130a; font-weight: 700;
  font-size: 14px; letter-spacing: 0.01em;
  padding: 12px 22px; border-radius: 8px; border: 1px solid var(--gold);
  transition: background .14s, box-shadow .14s;
}
.btn-primary:hover { background: #d9b53a; box-shadow: 0 6px 20px rgba(201,162,39,0.25); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; text-decoration: none;
  color: var(--text); font-weight: 600; font-size: 14px;
  padding: 12px 20px; border-radius: 8px; border: 1px solid var(--border);
  transition: border-color .14s, color .14s, background .14s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px;
  margin: 18px 0 44px;
}
.hero-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 18px;
}
.hero-head {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 600; line-height: 1.04; letter-spacing: -0.015em;
  margin: 0 0 18px; color: var(--text);
}
.hero-accent { color: var(--gold); }
.hero-sub {
  font-size: 16px; line-height: 1.6; color: var(--text-muted);
  max-width: 46ch; margin: 0 0 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero live card — the product shown as a disclosure-record readout */
.hero-card {
  display: block; text-decoration: none;
  background: linear-gradient(180deg, rgba(201,162,39,0.06), transparent 42%), var(--panel);
  border: 1px solid var(--border); border-top: 2px solid var(--gold);
  border-radius: 12px; padding: 16px 18px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  transition: transform .16s, box-shadow .16s;
}
.hero-card:hover { transform: translateY(-3px); box-shadow: 0 24px 54px rgba(0,0,0,0.36); }
.hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-card-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint);
}
.hero-card-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--buy);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--buy);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.hero-card-body { display: flex; align-items: center; gap: 16px; }
.hero-card-main { min-width: 0; }
.hero-card-pol { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--text); line-height: 1.2; }
.hero-card-meta {
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  margin: 3px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-card-tags { display: flex; align-items: center; gap: 10px; }
.hero-card-amt { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }
.hero-card-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft);
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
}
.hero-card-cta { color: var(--text-muted); }
.hero-card:hover .hero-card-cta { color: var(--gold); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 26px; margin-top: 8px; }
  .hero-sub { max-width: none; }
}
@media (max-width: 440px) {
  .hero-actions .btn-primary, .hero-actions .btn-ghost { flex: 1 1 auto; }
}

/* Home mid-page CTA (promoted from inline styles) */
.home-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; margin: 34px 0; padding: 22px 24px;
  border: 1px solid rgba(201,162,39,0.30); border-radius: 12px;
  background: linear-gradient(150deg, var(--gold-soft), transparent);
}
.home-cta-main { max-width: 44em; min-width: 0; }
.home-cta-title { font-size: 18px; font-weight: 700; color: var(--text); }
.home-cta-sub { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-top: 4px; }
@media (max-width: 560px) { .home-cta { flex-direction: column; align-items: stretch; } }

@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Footer: social follow links — gold so they stand out */
.footer-social {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; margin-right: 8px; text-decoration: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--gold);
  border: 1px solid var(--gold); border-radius: 7px;
  box-sizing: border-box; min-width: 118px; height: 34px; padding: 0 14px;
  vertical-align: middle;
  transition: color .14s, border-color .14s, background .14s;
}
.footer-social:hover { color: #111; border-color: var(--gold); background: var(--gold); }
/* One fixed icon slot so every logo occupies the same width and the labels
   line up across all three buttons, whatever each glyph's own aspect ratio. */
.footer-social svg { flex-shrink: 0; width: 16px; height: 15px; }

/* ===== Guides (evergreen explainers) =================================== */
/* Hub */
.guides-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin: 22px 0 10px;
}
.guide-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  padding: 22px 22px 20px; border: 1px solid var(--border-soft); border-radius: 12px;
  background: var(--panel); transition: border-color .15s, transform .15s, background .15s;
}
.guide-card:hover { border-color: rgba(201,162,39,0.4); transform: translateY(-2px);
  background: linear-gradient(160deg, var(--gold-soft), var(--panel)); }
.guide-card-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint); }
.guide-card-title { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.2; }
.guide-card:hover .guide-card-title { color: var(--gold); }
.guide-card-desc { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); flex: 1; }
.guide-card-cta { font-family: var(--mono); font-size: 12px; color: var(--gold); margin-top: 2px; }

/* Article */
.guide { max-width: 720px; margin: 6px 0 0; }
.guide-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.guide-title { font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); font-weight: 600;
  line-height: 1.1; letter-spacing: -0.01em; color: var(--text); margin: 0 0 16px; }
.guide-lede { font-size: 18px; line-height: 1.6; color: var(--text); margin: 0 0 12px; }
.guide-meta { font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.03em; margin: 0 0 8px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.guide-body { font-size: 16px; line-height: 1.7; color: #c6cddd; }
.guide-body h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em; margin: 34px 0 10px; }
.guide-body h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--text); margin: 24px 0 6px; }
.guide-body p { margin: 0 0 16px; }
.guide-body ul { margin: 0 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.guide-body li { line-height: 1.6; }
.guide-body li::marker { color: var(--gold); }
.guide-body strong { color: var(--text); font-weight: 600; }
.guide-body em { color: var(--text-muted); }
.guide-body a.row-link { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(201,162,39,0.35); }
.guide-body a.row-link:hover { border-bottom-color: var(--gold); }
.guide-disclaimer { font-size: 13px; color: var(--text-faint); border-left: 2px solid var(--border);
  padding-left: 14px; margin-top: 22px; }

/* FAQ */
.guide-faq { margin-top: 40px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.guide-faq h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--text); margin: 18px 0 10px; }
.guide-faq-item { border-bottom: 1px solid var(--border-soft); padding: 4px 0; }
.guide-faq-item summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 12px 0;
  list-style: none; font-size: 15.5px; }
.guide-faq-item summary::-webkit-details-marker { display: none; }
.guide-faq-item summary::before { content: "+"; color: var(--gold); font-family: var(--mono); margin-right: 10px; }
.guide-faq-item[open] summary::before { content: "–"; }
.guide-faq-item p { margin: 0 0 14px; color: var(--text-muted); line-height: 1.6; font-size: 14.5px; }

/* Related */
.guide-related { margin-top: 40px; }
.guide-related h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.guide-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guide-related-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  padding: 16px 18px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--panel);
  transition: border-color .15s, background .15s; }
.guide-related-card:hover { border-color: rgba(201,162,39,0.4); background: var(--gold-soft); }
.guide-related-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint); }
.guide-related-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.3; }
.guide-related-card:hover .guide-related-title { color: var(--gold); }
@media (max-width: 560px) { .guide-related-grid { grid-template-columns: 1fr; } }

/* ===== Site search (overlay typeahead) ================================= */
.nav-search {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--text-muted); background: var(--panel-raised, #1c2438);
  border: 1px solid var(--border-soft); border-radius: 7px;
  padding: 6px 12px; cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}
.nav-search:hover { color: var(--text); border-color: var(--gold); }
.nav-search svg { flex-shrink: 0; }

.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 12, 20, 0.66);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 16px 16px;
}
.search-overlay[hidden] { display: none; }
body.search-open { overflow: hidden; }

.search-panel {
  width: 100%; max-width: 560px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  overflow: hidden; display: flex; flex-direction: column;
  max-height: 72vh;
}
.search-inputwrap {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft);
}
.search-input-icon { color: var(--text-faint); flex-shrink: 0; }
#search-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--sans); font-size: 17px;
}
#search-input::placeholder { color: var(--text-faint); }
.search-close {
  flex-shrink: 0; font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-faint);
  background: var(--panel-raised, #1c2438); border: 1px solid var(--border-soft);
  border-radius: 5px; padding: 4px 7px; cursor: pointer; transition: color .14s, border-color .14s;
}
.search-close:hover { color: var(--text); border-color: var(--gold); }

.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.search-result.active, .search-result:hover { background: var(--gold-soft); }
.sr-kind {
  flex-shrink: 0; width: 70px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint);
}
.sr-politician { color: #8fb3f7; }
.sr-ticker { color: var(--gold); }
.sr-label { font-weight: 600; color: var(--text); white-space: nowrap; }
.search-result.active .sr-label { color: var(--gold); }
.sr-sub {
  color: var(--text-muted); font-size: 12.5px; margin-left: auto; text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%;
}
.search-empty { padding: 18px 14px; color: var(--text-muted); font-size: 14px; }
.search-hint {
  padding: 11px 16px; border-top: 1px solid var(--border-soft);
  font-size: 12px; color: var(--text-faint);
}
.search-hint b { color: var(--text-muted); font-weight: 600; }
.search-hint-keys { float: right; font-family: var(--mono); font-size: 11px; }

@media (max-width: 820px) {
  .masthead-nav > .nav-search {
    width: 100%; justify-content: flex-start; font-size: 13px;
    padding: 11px 12px; margin-bottom: 4px; border-radius: 8px;
  }
}
@media (max-width: 560px) {
  .search-overlay { padding: 6vh 10px 10px; }
  .sr-sub { display: none; }
  .search-hint-keys { display: none; }
}

/* ===== Senate filing interstitial ====================================== */
.senate-note-overlay {
  position: fixed; inset: 0; z-index: 240;
  background: rgba(8, 12, 20, 0.66); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.senate-note-overlay.open { display: flex; }
.senate-note {
  width: 100%; max-width: 460px; background: var(--panel);
  border: 1px solid var(--border); border-top: 2px solid var(--gold);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  padding: 22px 24px 20px;
}
.senate-note-h { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--text); margin-bottom: 10px; line-height: 1.25; }
.senate-note p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0 0 10px; }
.senate-note p strong { color: var(--text); }
.senate-note-sub { font-size: 13px !important; color: var(--text-faint) !important; }
.senate-note-dismiss {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 16px;
  font-size: 12.5px; color: var(--text-muted); cursor: pointer; user-select: none;
}
.senate-note-dismiss input { accent-color: var(--gold); }
.senate-note-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.senate-note-cancel {
  background: none; border: 1px solid var(--border-soft); color: var(--text-muted);
  border-radius: 8px; padding: 10px 16px; cursor: pointer; font-size: 13px;
  transition: color .14s, border-color .14s;
}
.senate-note-cancel:hover { color: var(--text); border-color: var(--border); }
.senate-note-go {
  text-decoration: none; background: var(--gold); color: #17130a; font-weight: 700;
  border-radius: 8px; padding: 10px 18px; font-size: 13px; white-space: nowrap;
  transition: background .14s;
}
.senate-note-go:hover { background: #d9b53a; }

/* ===== Trending this week ============================================== */
.trending-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 10px;
}
.trending-col {
  border: 1px solid var(--border-soft); border-radius: 12px;
  background: var(--panel); overflow: hidden;
}
.trending-head {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-faint);
  padding: 13px 16px; border-bottom: 1px solid var(--border-soft);
  background: var(--panel-raised, #1c2438);
}
.trending-list { display: flex; flex-direction: column; }
.trending-row {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 11px 16px; border-bottom: 1px solid var(--border-soft);
  transition: background .12s;
}
.trending-row:last-child { border-bottom: none; }
.trending-row:hover { background: var(--gold-soft); }
.trending-rank {
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
  flex-shrink: 0; width: 20px;
}
.trending-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.trending-name {
  font-weight: 600; color: var(--text); font-size: 14.5px;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trending-row:hover .trending-name { color: var(--gold); }
.trending-sub {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trending-metric {
  flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  text-align: right;
}
.trending-metric strong { color: var(--gold); font-weight: 600; }
@media (max-width: 640px) { .trending-grid { grid-template-columns: 1fr; } }

/* --- Premium page: logged-in member tools panel ------------------------- */
.member-tools {
  margin: 18px 0 26px; padding: 18px;
  border: 1px solid var(--gold-soft); border-radius: 14px;
  background: linear-gradient(180deg, var(--gold-soft) 0%, transparent 70%);
}
.member-tools-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.member-tools-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.member-tools-title { margin: 4px 0 0; font-size: 20px; }
.member-tools-title span { color: var(--gold); }
.mt-lead { margin: 8px 0 0; font-size: 13px; color: var(--text-muted); max-width: 640px; line-height: 1.5; }
.member-tools-manage { color: var(--gold); text-decoration: none; font-size: 13px; white-space: nowrap; }
.member-tools-manage:hover { text-decoration: underline; }
.member-tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mt-card { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 10px; padding: 13px 14px; transition: border-color .14s; }
.mt-card:hover { border-color: var(--gold); }
.mt-card-t { display: block; font-weight: 700; color: var(--text); font-size: 14px; }
.mt-card-d { display: block; color: var(--text-muted); font-size: 12px; margin-top: 5px; line-height: 1.4; }
.mt-pro { font-size: 9.5px; color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 4px; padding: 0 4px; vertical-align: middle; }
.mt-locked { opacity: .68; }
.mt-lock { font-size: 9.5px; color: var(--text-faint); border: 1px solid var(--border-soft); border-radius: 4px; padding: 0 4px; }
@media (max-width: 860px) { .member-tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .member-tools-grid { grid-template-columns: 1fr; } .member-tools-manage { margin-left: 0; } }

/* --- Newsroom ------------------------------------------------------------ */
.news-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.news-row { background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.news-row:hover { border-color: var(--border); transform: translateY(-1px); }
.news-row-link { display: block; padding: 14px 16px; text-decoration: none; color: inherit; }
.news-row-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.news-kind { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--panel-raised); color: var(--text-muted); border: 1px solid var(--border-soft); }
.news-kind-trade { color: var(--buy); border-color: rgba(52,211,153,.3); }
.news-kind-conflict { color: #e0a84c; border-color: rgba(224,168,76,.3); }
.news-kind-near_entry { color: var(--gold); border-color: rgba(201,162,39,.35); }
.news-kind-roundup { color: #7dabf8; border-color: rgba(125,171,248,.3); }
.news-row-date { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.news-row-title { font-size: 17px; line-height: 1.3; margin: 0 0 4px; color: var(--text); }
.news-row-head { font-size: 13.5px; line-height: 1.5; color: var(--text-muted); margin: 0; }
.news-article { max-width: 720px; }
.news-article-back { margin: 24px 0 14px; font-size: 13px; }
.news-article-title { font-size: 28px; line-height: 1.22; margin: 8px 0 10px; color: var(--text); }
.news-article-head { font-size: 16px; line-height: 1.5; color: var(--text-muted); margin: 0 0 20px; font-weight: 500; }
.news-article-body p { font-size: 15px; line-height: 1.72; color: var(--text); margin: 0 0 14px; }
.news-article-related { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.news-related-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.news-related-link { font-size: 13px; color: var(--gold); text-decoration: none; padding: 3px 10px; border: 1px solid var(--gold-soft); border-radius: 6px; }
.news-related-link:hover { background: var(--gold-soft); }
@media (max-width: 480px) { .news-article-title { font-size: 23px; } }
.news-kind-external { color: #b89bd9; border-color: rgba(184,155,217,.3); }
.news-source { font-size: 11.5px; color: var(--text-faint); font-style: italic; }

/* --- Newsroom: follow + Pro analysis ------------------------------------ */
.news-follow { margin: 18px 0 0; font-size: 13px; color: var(--text-muted); }
.news-follow a { color: var(--gold); text-decoration: none; }
.news-follow a:hover { text-decoration: underline; }
.news-follow-tier { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 3px; padding: 1px 5px; margin-left: 4px; }
.news-pro { margin: 22px 0 0; padding: 16px 18px; border: 1px solid rgba(201,162,39,.3); border-radius: 10px; background: linear-gradient(160deg, rgba(201,162,39,.07), var(--panel)); }
.news-pro-head { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.news-pro-badge { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #1a1400; background: var(--gold); border-radius: 3px; padding: 2px 7px; }
.news-pro-teaser { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); margin: 0 0 12px; }
.news-pro-actions { margin: 0; display: flex; gap: 12px; align-items: center; }
.news-pro-cta { font-size: 13px; font-weight: 600; color: #1a1400; background: var(--gold); padding: 6px 14px; border-radius: 6px; text-decoration: none; }
.news-pro-login { font-size: 13px; color: var(--gold); text-decoration: none; }
.npa-head { font-size: 13px; font-weight: 600; color: var(--gold); margin-bottom: 12px; }
.npa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.npa-stat { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 8px; padding: 12px 14px; }
.npa-v { display: block; font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--text); }
.npa-l { display: block; font-size: 11.5px; color: var(--text-faint); margin-top: 4px; line-height: 1.35; }
.npa p { font-size: 14px; line-height: 1.65; color: var(--text); margin: 0 0 12px; }
.npa-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.npa-links a { font-size: 13px; color: var(--gold); text-decoration: none; }

/* --- Newsroom: category filter ------------------------------------------ */
.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.news-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--text-muted); background: var(--panel); border: 1px solid var(--border-soft); border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.news-chip:hover { border-color: var(--border); color: var(--text); }
.news-chip.active { color: var(--text); border-color: var(--gold); background: var(--gold-soft); }
.news-chip-n { font-family: var(--mono); font-size: 11px; color: var(--text-faint); background: var(--bg); border-radius: 999px; padding: 1px 7px; }
.news-chip.active .news-chip-n { color: var(--gold); }
.news-empty { font-size: 14px; color: var(--text-muted); padding: 22px 0; text-align: center; }
@media (max-width: 480px) { .news-filter { gap: 6px; } .news-chip { padding: 5px 11px; font-size: 12.5px; } }

/* --- Follow chip (stock/politician headers) ----------------------------- */
.follow-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(201,162,39,.35); border-radius: 999px; padding: 3px 12px; text-decoration: none; transition: background .14s, color .14s; }
.follow-chip:hover { background: var(--gold); color: #1a1400; }

/* --- Follow chip: toggle states ----------------------------------------- */
.follow-chip.following { background: var(--gold); color: #1a1400; border-color: var(--gold); }
.follow-chip.following:hover { background: #d9b63a; }
.follow-chip.busy { opacity: .55; pointer-events: none; }
.news-follow-hint { color: var(--text-muted); }

/* ★ marker next to a ticker/politician the member already follows (added by
   the watchlist-markers script in base.html; premium-only). */
.follow-star { color: var(--gold); margin-left: 5px; font-size: .82em; line-height: 1; vertical-align: baseline; cursor: default; }

/* --- OCR (unverified) badge --------------------------------------------- */
.ocr-badge { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 3px; white-space: nowrap; background: rgba(224,168,76,.16); color: #e0a84c; border: 1px solid rgba(224,168,76,.35); }

/* --- Relative Conviction (net-worth context) ------------------------------ */
.rci-badge{display:inline-block;font-family:var(--mono);font-size:9.5px;letter-spacing:.02em;
  padding:1px 6px;border-radius:3px;margin-top:3px;white-space:nowrap;
  border:1px solid var(--border-soft);color:var(--text-muted);}
.rci-moderate{color:var(--text-muted);}
.rci-immaterial{color:var(--text-faint);opacity:.85;}
.rci-high{color:var(--gold);border-color:rgba(201,162,39,.45);background:rgba(201,162,39,.10);}
.rci-extreme{color:#1a1400;background:var(--gold);border-color:var(--gold);font-weight:700;}
.nw-panel{border:1px solid var(--border-soft);border-left:3px solid var(--gold);
  border-radius:var(--radius,8px);background:var(--panel);padding:14px 16px;margin:14px 0 4px;}
.nw-panel-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;}
.nw-panel-label{font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);}
.nw-panel-src{font-family:var(--mono);font-size:11px;color:var(--text-faint);}
.nw-panel-value{font-family:var(--mono);font-size:clamp(18px,3vw,24px);font-weight:700;color:var(--text);margin:4px 0 6px;}
.nw-panel-value-na{font-size:clamp(15px,2.4vw,18px);color:var(--text-muted);font-weight:600;}
.nw-panel-note{font-size:12.5px;color:var(--text-muted);line-height:1.6;}
