/* Infonomy sec_edgar 13F — Refined Dark palette */
:root {
  /* Refined palette */
  --bg-page: #0D1117;
  --bg-surface: #161B22;
  --bg-card: #1C2128;
  --bg-elevated: #252C35;
  --bg-hover: #2D3640;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #E6EDF3;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --accent: #D4A017;
  --accent-hover: #E8B84B;
  --accent-subtle: rgba(212, 160, 23, 0.12);
  --accent-glow: rgba(212, 160, 23, 0.25);

  --danger: #F87171;
  --danger-subtle: rgba(248, 113, 113, 0.12);
  --positive: #4ADE80;
  --positive-subtle: rgba(74, 222, 128, 0.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;

  /* Type scale */
  --text-xs: 0.72rem;
  --text-sm: 0.82rem;
  --text-base: 0.92rem;
  --text-lg: 1.08rem;
  --text-xl: 1.32rem;
  --text-2xl: 1.72rem;

  /* Legacy aliases (so existing JS references still work) */
  --brown: #3d2b1f;
  --steel: #71797e;
  --gray: #9CA3AF;
  --placeholder: rgba(156, 163, 175, 0.38);
  --dark-gray: #252C35;
  --charcoal: #1C2128;
  --silver: #E6EDF3;
  --gold: #D4A017;
  --gold-bright: #E8B84B;
  --blue-black: #0D1117;

  --bg: var(--bg-page);
  --surface: var(--bg-surface);
  --surface-muted: var(--bg-elevated);
  --border: var(--border-default);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --accent-hover: var(--accent-hover);
  --thead: var(--bg-surface);
  --nav-bg: var(--bg-page);
  --nav-fg: var(--text-primary);
  --nav-muted: var(--text-muted);
  --table-row: var(--bg-card);
  --table-stripe: var(--bg-surface);
  --card: var(--bg-card);
  --code-bg: var(--bg-page);

  --table-p1-bg: var(--bg-card);
  --table-p1-stripe: var(--bg-surface);
  --table-p1-thead: var(--bg-surface);
  --table-p1-text: var(--accent);
  --table-p1-body: var(--text-primary);
  --table-p1-muted: var(--text-secondary);
  --table-p1-border: var(--border-default);
  --table-p1-link: var(--accent);
  --table-p1-link-hover: var(--accent-hover);

  --btn-p2-bg: #B28900;
  --btn-p2-bg-hover: #C59A10;
  --btn-p2-fg: #000000;
}

html {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

header.topnav {
  background: var(--nav-bg);
  color: var(--nav-fg);
  border-bottom: 1px solid var(--border-default);
  padding: 0.65rem 1.35rem;
}

.topnav-inner {
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.topnav-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  flex: 0 0 auto;
  min-width: 0;
}

header.topnav h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1;
  display: flex;
  align-items: center;
}

header.topnav .brand {
  text-decoration: none;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

header.topnav .brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1;
}

header.topnav .brand-lockup .brand-icon {
  display: block;
  flex-shrink: 0;
  border-radius: 6px;
}

header.topnav .brand-lockup .brand-text {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

header.topnav .brand-lockup .brand-tld {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

header.topnav .brand:hover,
header.topnav .brand-lockup:hover .brand-text {
  color: var(--gold-bright);
  text-decoration: none;
}

header.topnav .brand-lockup:hover .brand-tld {
  color: var(--text-secondary);
}

.topnav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.topnav-links a {
  margin-right: 0;
  padding: 0.2rem 0.9rem;
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  border-right: 1px solid var(--border-default);
  transition: color var(--transition-fast);
}
.topnav-links a:last-child {
  border-right: none;
  padding-right: 0;
}
.topnav-links a:first-child {
  padding-left: 0;
}
.topnav-links a:hover {
  color: var(--gold);
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
  border-right: 1px solid var(--border-default);
}
.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.2rem 0.9rem;
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--silver);
  user-select: none;
}
.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}
.nav-dropdown > summary::after {
  content: " ▾";
  font-size: 0.72em;
  opacity: 0.75;
}
.nav-dropdown[open] > summary {
  color: var(--gold);
}
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  min-width: 220px;
  padding: 0.35rem 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--card-bg, #0f1419);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.nav-dropdown-panel a {
  display: block;
  padding: 0.45rem 0.9rem;
  border-right: none;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.88rem;
  white-space: nowrap;
}
.nav-dropdown-panel a:hover {
  background: rgba(255, 255, 255, 0.04);
}
.topnav-links > a.nav-signin {
  color: var(--gold);
  font-weight: 600;
}
.topnav-links > a.nav-signin.nav-signed-in {
  color: var(--silver);
  font-weight: 500;
}
.topnav-links > a.nav-signin.nav-signed-in:hover {
  color: var(--gold);
}

.search-hero-lead {
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.button-link {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--silver);
  text-decoration: none;
  font-size: 0.88rem;
  margin-right: 0.5rem;
}
.button-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  text-decoration: none;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.pricing-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pricing-card.featured {
  border-color: var(--gold, #c9a227);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.25);
}
.pricing-card h3 {
  margin: 0;
  font-size: 1.1rem;
}
.pricing-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.25rem 0;
}
.pricing-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1 1 auto;
}
.pricing-card .pricing-cta {
  margin-top: auto;
  padding-top: 0.75rem;
  width: 100%;
}
.pricing-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}
.pricing-cta-note {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted, #8b949e);
  line-height: 1.35;
}
.pricing-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.62rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  text-transform: none;
  background: transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.pricing-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.pricing-btn--primary {
  background: var(--btn-p2-bg);
  color: var(--btn-p2-fg);
  border-color: var(--btn-p2-bg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pricing-btn--primary:hover {
  background: var(--btn-p2-bg-hover);
  color: var(--btn-p2-fg);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.pricing-btn--annual {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(16, 185, 129, 0.14));
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.55);
}
.pricing-btn--annual:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.34), rgba(16, 185, 129, 0.22));
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}
.pricing-btn--outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--silver);
  border-color: var(--border-default);
}
.pricing-btn--outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--steel);
}
.account-upgrade-panel {
  margin: 1.25rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-default);
}
.account-upgrade-lead {
  margin-bottom: 0.75rem;
}
.account-upgrade-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}
.account-actions-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
}
.account-actions-row .pricing-btn {
  width: auto;
  flex: 1 1 180px;
}
.guide-prose {
  max-width: 52rem;
  line-height: 1.6;
}
.guide-prose h3 {
  margin-top: 1.5rem;
}
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}
.guide-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}
.guide-card .action-btn {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.guide-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.help-details {
  margin: 0.5rem 0 0.75rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}
.help-details summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--link);
  font-weight: 500;
}
.help-details-body {
  margin-top: 0.5rem;
}
.ownership-quick-links,
.action-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin: 0.85rem 0 0.25rem;
}
.action-nav--inline {
  margin: 0.5rem 0 0;
}
.action-nav--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}
.ownership-quick-links a {
  color: var(--link);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1.25;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}
.action-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.action-btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
.action-btn--alert {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}
.action-btn--alert:hover {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}
.action-btn--tool {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}
.action-btn--tool:hover {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}
.action-btn--browse {
  color: var(--gold-bright);
  background: rgba(212, 160, 23, 0.14);
  border-color: rgba(212, 160, 23, 0.5);
}
.action-btn--browse:hover {
  background: rgba(212, 160, 23, 0.24);
  color: #fde68a;
}
.action-btn--guide {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}
.action-btn--guide:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}
.action-btn--nav {
  color: var(--silver);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-default);
  font-weight: 500;
}
.action-btn--nav:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--steel);
}
.action-btn--upgrade {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
}
.action-btn--upgrade:hover {
  background: rgba(139, 92, 246, 0.22);
  color: #ddd6fe;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin: 0 0 0.75rem;
}
.page-actions .sub,
.sub.page-actions {
  margin: 0;
}
.co-investors-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.02);
}
.co-investors-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-right: 0.25rem;
}
a.co-investor-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  font-size: 0.85rem;
  color: var(--link);
  text-decoration: none;
}
a.co-investor-chip:hover {
  background: rgba(255, 255, 255, 0.06);
}
.browse-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1rem 0 0.35rem;
}

.topnav-sub {
  font-size: 0.78rem;
  color: var(--nav-muted);
  line-height: 1.3;
  margin: 0;
  max-width: 16rem;
}
.topnav-sub code {
  color: var(--gray);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.12rem 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
}

@media (min-width: 769px) {
  header.topnav {
    padding: 0.7rem 1.35rem;
  }
  .topnav-inner {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) auto minmax(10rem, 1fr);
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.35rem;
  }
  .topnav-brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .nav-toggle {
    display: none;
  }
  .topnav-links {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }
  .topnav-sub {
    max-width: 14rem;
  }
}

@media (min-width: 1100px) {
  .topnav-sub {
    max-width: 18rem;
  }
}

header:not(.topnav) {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
}

.sub {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 52rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 1.35rem 3rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
  overflow-x: hidden;
}

.home-sankey-hero.card,
.home-panel-quarter.card,
.home-panel-filings.card,
.home-panel-trending.card {
  overflow: visible !important;
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--silver);
  letter-spacing: 0.02em;
}

label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0.28rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="search"],
input[type="text"],
input[type="number"],
select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  max-width: 100%;
  background: var(--blue-black);
  color: var(--silver);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
  font-weight: 400;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: var(--placeholder);
  opacity: 1;
}
input::-moz-placeholder,
textarea::-moz-placeholder {
  color: var(--placeholder);
  opacity: 1;
}
input:focus,
select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

button,
.btn,
input[type="submit"],
input[type="button"] {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--btn-p2-bg);
  color: var(--btn-p2-fg);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: var(--btn-p2-bg-hover);
  color: var(--btn-p2-fg);
  text-decoration: none;
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
button.secondary {
  background: var(--btn-p2-bg);
  color: var(--btn-p2-fg);
}
button.secondary:hover {
  background: var(--btn-p2-bg-hover);
  color: var(--btn-p2-fg);
}

button:focus-visible,
.btn:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

button.mini {
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}
.row .grow {
  flex: 1;
  min-width: 12rem;
}

.row.row-search-tools {
  align-items: center;
}
.row.row-search-tools .search-managers-az {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.err {
  color: var(--danger);
  font-size: 0.9rem;
}

.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.95rem;
  min-height: calc(100vh - 220px);
  width: 100%;
}

.spinner {
  width: 4.25rem;
  height: 4.25rem;
  border: 5px solid var(--dark-gray);
  border-top-color: var(--gold);
  border-right-color: var(--steel);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(212, 160, 23, 0.12);
  animation: spin 0.9s linear infinite;
}

.loading-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--silver);
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  border: 1px solid var(--border-subtle);
  text-align: left;
}

td {
  padding: 0.5rem 0.75rem;
  line-height: 1.35;
}

th {
  padding: 0.55rem 0.75rem;
  background: var(--table-p1-thead);
  color: var(--table-p1-text);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.15;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border-bottom-color: var(--border-strong);
}

thead th a {
  color: var(--table-p1-text);
}
thead th a:hover {
  color: var(--table-p1-link-hover);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:nth-child(odd) td {
  background: var(--table-p1-bg);
  color: var(--table-p1-body);
}
tbody tr:nth-child(even) td {
  background: var(--table-p1-stripe);
  color: var(--table-p1-body);
}

tbody tr:hover td {
  background: var(--bg-hover) !important;
}

table tbody a {
  color: var(--table-p1-body);
  text-decoration: none;
}
table tbody a:hover {
  color: #ffffff;
  text-decoration: underline;
}

table code {
  color: var(--table-p1-body);
  background: rgba(0, 0, 0, 0.35);
}

table tbody td.pct-pos {
  color: var(--positive);
}
table tbody td.pct-neg {
  color: var(--danger);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.alpha a {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  background: var(--surface);
  color: var(--silver);
  font-size: 0.85rem;
}
.alpha a:hover {
  background: var(--brown);
  border-color: var(--gold);
  color: var(--gold);
}

footer {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 1rem 1.25rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stats {
  font-size: 0.88rem;
  margin: 0.5rem 0;
  color: var(--muted);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.42rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--silver);
  text-transform: none;
}

.page-subtitle {
  margin: 0 0 1rem;
  font-size: var(--text-base);
  color: var(--muted);
  font-weight: 400;
}

.page-title-managers-popular {
  font-size: 2.13rem;
}

/* CUSIP investment hero + FINRA strip */
.cusip-hero-title {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--table-p1-text);
}

#hq-card.card-hero {
  padding: 0.9rem 1.15rem 1rem;
}

#hq-card .cusip-quarter-holders-title,
#hq-card .cusip-quarter-holders-period {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0;
}

#hq-card .cusip-quarter-holders-title {
  color: var(--table-p1-text);
  margin-bottom: 0.25rem;
}

#hq-card .cusip-quarter-holders-period {
  color: var(--gold);
  margin: 0;
  white-space: nowrap;
}

#hq-card .cusip-quarter-period-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 0.35rem;
}

#hq-card .cusip-quarter-tools.tools-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(9rem, 0.9fr) minmax(11rem, 1.25fr);
  gap: 0.45rem 0.65rem;
  align-items: end;
  justify-items: stretch;
  margin: 0;
}

#hq-card .cusip-quarter-tools label {
  display: block;
  font-size: 0.62rem;
  line-height: 1.2;
  margin: 0 0 0.12rem;
  letter-spacing: 0.04em;
}

#hq-card .cusip-quarter-tools select,
#hq-card .cusip-quarter-tools input[type="search"] {
  width: 100%;
  min-height: 1.85rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
}

#hq-card .cusip-quarter-tools .grow {
  flex: none;
  min-width: 0;
  max-width: none;
}

#hq-card .cusip-quarter-qoq-note {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

#hq-card .cusip-quarter-stats-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.25rem 0.55rem;
  align-items: start;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0;
  margin: 0 0 0.65rem;
}

#hq-card .cusip-quarter-stats-row > div {
  min-width: 0;
}

#hq-card .cusip-quarter-stats-row dt {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hq-card .cusip-quarter-stats-row dd {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  line-height: 1.25;
  color: var(--silver);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1080px) {
  #hq-card .cusip-quarter-period-tools {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #hq-card .cusip-quarter-tools.tools-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #hq-card .cusip-quarter-stats-row {
    grid-template-columns: repeat(6, minmax(6.25rem, 1fr));
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }
}

.holders-table-wrap .table-footnote {
  padding: 0.65rem 0.5rem 0.35rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--gray);
  border-top: 1px solid var(--border-default);
}
.muted {
  font-size: 0.85em;
  opacity: 0.78;
  font-weight: 400;
}
.manager-books-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: 1.25rem;
  margin: 0 0 1.25rem;
}
.manager-book-card {
  padding: 0;
  overflow: hidden;
}
.manager-book-head {
  background: #0a0a0a;
  color: #f5f5f5;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-default);
}
.manager-book-head h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.manager-book-head .sub {
  margin: 0;
  color: #b8b8b8;
}
.manager-book-body {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.85rem 1.1rem;
  padding: 0.85rem 1rem;
  align-items: flex-start;
}
.manager-book-chart {
  flex: 0 0 200px;
}
.manager-book-legend {
  flex: 1 1 0;
  min-width: 0;
  max-height: 220px;
  overflow-x: auto;
  overflow-y: auto;
}
@media (max-width: 640px) {
  .manager-book-body {
    flex-wrap: wrap;
  }
  .manager-book-legend {
    flex: 1 1 100%;
    min-width: 14rem;
  }
}
.manager-book-legend.table-wrap,
.manager-books-row .manager-book-legend {
  overflow-x: hidden;
}
.manager-donut-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.78rem;
}
.manager-donut-table th,
.manager-donut-table td {
  padding: 0.2rem 0.35rem;
  vertical-align: middle;
}
.manager-donut-table .donut-col-sym {
  width: 3.6rem;
  white-space: nowrap;
}
.manager-donut-table .donut-col-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 7rem;
}
.manager-donut-table .donut-col-pct {
  width: 3rem;
  white-space: nowrap;
}
.manager-donut-table .donut-col-val {
  width: 5rem;
  white-space: nowrap;
}
.donut-chart-host {
  position: relative;
  flex: 0 0 auto;
}
.donut-chart-svg {
  display: block;
}
.donut-slice {
  cursor: pointer;
  transition: opacity 0.12s ease;
}
.donut-slice:hover,
.donut-slice:focus {
  opacity: 0.88;
}
.donut-chart-tooltip {
  position: absolute;
  z-index: 4;
  max-width: 16rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #f0f0f0;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.donut-center-title {
  fill: var(--gold-bright);
  font-size: 11px;
  font-weight: 700;
}
.donut-center-sub {
  fill: var(--gray);
  font-size: 8px;
  letter-spacing: 0.04em;
}
.donut-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  vertical-align: middle;
}
.options-notional-summary {
  margin: 0;
  padding: 0.65rem 1rem 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.sector-flow-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.sector-flow-row {
  display: grid;
  grid-template-columns: 10rem 1fr 6rem;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.35rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.sector-flow-row:hover,
.sector-bucket-selected {
  border-color: var(--gold);
  background: rgba(212, 160, 23, 0.08);
}
.sector-flow-label {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sector-flow-bar-wrap {
  height: 0.55rem;
  background: #2a2a2a;
  border-radius: 3px;
  overflow: hidden;
}
.sector-flow-bar-wrap.sector-flow-bar-diverging {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  align-items: stretch;
  gap: 0;
  background: transparent;
  overflow: visible;
  height: 0.65rem;
}
.sector-flow-bar-center {
  width: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
}
.sector-flow-bar-half {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 0.65rem;
  background: #2a2a2a;
  overflow: hidden;
}
.sector-flow-bar-half-neg {
  justify-content: flex-end;
  border-radius: 3px 0 0 3px;
}
.sector-flow-bar-half-pos {
  justify-content: flex-start;
  border-radius: 0 3px 3px 0;
}
.sector-flow-bar-half .sector-flow-bar {
  min-width: 2px;
}
.sector-flow-bar {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.flow-bar-pos {
  background: #6bcb77;
}
.flow-bar-neg {
  background: #e07a5f;
}
.sector-flow-val {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sector-sankey-wrap {
  min-height: 0;
  width: 100%;
  overflow: visible;
}

.home-sankey-chart.sector-sankey-wrap {
  min-height: 0;
}

.sankey-tier-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  overflow: visible;
}

.sector-sankey-plot,
.sector-sankey-plot .plot-container,
.sector-sankey-plot .svg-container {
  width: 100% !important;
  max-width: 100%;
  overflow: visible !important;
}

.home-sankey-hero {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem 0.5rem;
}

.home-sankey-title,
.home-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--silver);
  letter-spacing: 0.02em;
  text-transform: none;
}

.home-spotlight .spotlight-section-lead {
  margin: 0 0 0.75rem;
  max-width: none;
  line-height: 1.45;
}

.home-sankey-lead {
  margin: 0 0 0.35rem;
}

.home-sankey-chart {
  min-height: 0;
  margin-top: 0.35rem;
}

.home-panel-quarter,
.home-panel-filings,
.home-panel-trending {
  padding: 1rem 1.15rem 1.1rem;
}

.home-panel-trending .spotlight-section {
  margin: 0;
}

.home-panel-quarter .spotlight-section,
.home-panel-filings .spotlight-section,
.home-filings-combined,
.home-quarter-combined {
  margin: 0;
}

.home-dual-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-top: 0.75rem;
}

.home-dual-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.home-filing-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.home-filing-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 4.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

a.home-filing-tile:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
}

.home-filing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.home-filing-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.search-association-lead {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}

.search-association-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.search-association-card {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.search-association-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.search-association-person {
  color: var(--accent);
}

.search-association-manager {
  color: var(--gold);
}

.search-association-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-association-meta {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ownership-pilot-panel {
  margin: 1rem 0 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #2a3344);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.ownership-meta-list,
.ownership-footnote-list {
  margin: 0.35rem 0 0.85rem 1.1rem;
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.ownership-footnote-block {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted, #a8b3c7);
  max-width: 48rem;
}

.ownership-footnote-inline summary {
  cursor: pointer;
  color: var(--accent, #7eb8ff);
}

.ownership-address-inline {
  color: var(--text-muted, #a8b3c7);
}

a.search-association-person:hover,
a.search-association-manager:hover {
  text-decoration: underline;
}

a.home-filing-tile:hover .home-filing-body {
  color: var(--text-primary);
}

.home-filings-combined .activity-item {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0;
  background: transparent;
  border: none;
}

.home-filings-combined .activity-item.home-filing-tile {
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-default);
}

.home-filings-combined .activity-time {
  min-width: 0;
  padding-top: 0;
}

.home-quarter-combined .popular-change-row + .popular-change-row {
  margin-top: 0.15rem;
}

.home-dual-sep {
  width: 1px;
  background: var(--border-subtle);
  margin: 0 1.1rem;
  align-self: stretch;
  min-height: 8rem;
}

.home-dual-tag {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-dual-tag.tag-value {
  background: rgba(34, 197, 94, 0.12);
  color: var(--positive);
}

.home-dual-tag.tag-mgr {
  background: rgba(129, 140, 248, 0.14);
  color: #a5b4fc;
}

.home-dual-tag.tag-live {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
}

.home-dual-tag.tag-warehouse {
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent);
}

.home-mover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.spotlight-card-compact {
  padding: 0.85rem 0.95rem;
}

.spotlight-card-compact .spotlight-delta {
  font-size: 1.15rem;
}

.popular-change-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.home-quarter-combined .popular-change-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.home-quarter-combined .popular-change-label {
  min-width: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-panel-empty {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.home-panel-foot {
  margin: 0.45rem 0 0;
}

.home-filing-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

@media (max-width: 900px) {
  .home-dual-panel {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .home-dual-sep {
    display: none;
  }

  .home-mover-grid {
    grid-template-columns: 1fr;
  }
}

.sector-sankey-plot-compact:not(.sector-sankey-noise) {
  min-height: 360px !important;
}

.sector-sankey-noise.sector-sankey-plot-compact {
  min-height: 0 !important;
}

.home-sankey-hero {
  overflow: visible !important;
  max-height: none;
}

.home-sankey-hero .sector-sankey-wrap,
.home-sankey-hero .sankey-tier-stack,
.home-sankey-hero .plot-container,
.home-sankey-hero .svg-container {
  overflow: visible !important;
  max-height: none !important;
}

.sector-sankey-plot {
  width: 100%;
  min-height: 720px;
}

.home-sankey-hero .sector-sankey-plot {
  min-height: 0;
}

.sector-sankey-plot svg text {
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  font-family: system-ui, Segoe UI, Roboto, sans-serif;
}

.sector-sankey-plot .sankey .node-label text,
.sector-sankey-plot .sankey .node-label textPath {
  font-weight: 600;
  font-size: 11px;
}

@media (max-width: 639px) {
  .sector-sankey-plot .sankey .node-label text,
  .sector-sankey-plot .sankey .node-label textPath {
    font-size: 7.5px !important;
  }

  .sector-sankey-plot svg text {
    font-size: 8px;
  }

  .home-sankey-hero {
    padding: 0.75rem 0.5rem 0.35rem;
  }

  .sankey-noise-sep {
    font-size: 0.68rem;
    letter-spacing: 0.01em;
  }
}

@media (max-width: 959px) {
  .sector-sankey-plot .sankey .node-label text,
  .sector-sankey-plot .sankey .node-label textPath {
    font-size: 8.5px !important;
  }
}

.sector-sankey-plot .sankey-node rect,
.sector-sankey-plot .sankey .node rect {
  shape-rendering: geometricPrecision;
}

.sector-sankey-plot .sankey-link path,
.sector-sankey-plot .sankey .link path {
  shape-rendering: geometricPrecision;
}

.sankey-tier-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  overflow: visible;
}

.sankey-noise-sep {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.65rem 0 0.15rem;
  color: var(--muted, #94a3b8);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sankey-noise-sep::before,
.sankey-noise-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.28);
}

.sector-sankey-noise {
  min-height: 180px !important;
  opacity: 0.92;
}

.sector-sankey-noise .sankey-noise-quarter-ann {
  font-size: 0.72rem;
}

.live-home-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

a.live-home-item.home-filing-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 4.75rem;
}

a.live-home-item.home-filing-tile .live-news-headline {
  margin: 0;
  flex: 1;
}

.live-home-sym {
  font-size: 0.72rem;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.03);
}

.sector-sankey-plot .main-svg {
  overflow: visible;
}

.sector-sankey-plot {
  position: relative;
}

.sankey-row-hit-layer {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  pointer-events: none;
}

.sankey-row-hit-band {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: auto;
  cursor: crosshair;
  background: transparent;
}

.sector-sankey-plot.sankey-hover-active .sankey-row-hit-band:hover {
  background: rgba(255, 255, 255, 0.02);
}

.sankey-flow-tooltip {
  position: fixed;
  z-index: 10050;
  pointer-events: none;
  max-width: min(320px, calc(100vw - 24px));
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-size: 0.82rem;
  line-height: 1.35;
  color: #e2e8f0;
}

.sankey-tip-head {
  margin-bottom: 0.45rem;
  padding-left: 0.45rem;
  font-size: 0.92rem;
}

.sankey-tip-quarters {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sankey-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
}

.sankey-tip-q {
  color: #cbd5e1;
}

.sankey-tip-usd {
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.sankey-tip-flow {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-left: 0.55rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.sankey-tip-flow.sankey-tip-lit {
  color: #fde68a;
  font-weight: 600;
}

.sankey-tip-held {
  color: #a5f3fc;
}

.sankey-tip-more {
  margin-left: 0.55rem;
  font-size: 0.72rem;
  color: #64748b;
  font-style: italic;
}

.sankey-tip-delta {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.78rem;
  color: #94a3b8;
}

.sector-sankey-plot.sankey-hover-active .sankey-link path,
.sector-sankey-plot.sankey-hover-active .sankey .link path {
  transition: opacity 0.12s ease, filter 0.12s ease;
}

/* Custom band tooltip replaces Plotly's hover box on Sankey charts. */
.sector-sankey-plot .hoverlayer {
  display: none !important;
}

.sector-momentum-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.sector-momentum-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sector-momentum-name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-profile-panel {
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  width: 100%;
  box-sizing: border-box;
}
.company-profile-desc {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--silver);
  width: 100%;
  max-width: none;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  overflow-wrap: break-word;
}
.company-profile-desc-source {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.company-profile-meta {
  margin: 0;
  padding: 0.5rem 0 0;
  border-top: 1px solid var(--border);
  border-bottom: none;
}
.cusip-profile-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cusip-strip-item {
  min-width: 6.5rem;
}
.cusip-strip-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  margin-bottom: 0.15rem;
}
.finra-metrics-box {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  background: rgba(212, 160, 23, 0.08);
  box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.22);
}
.finra-metric {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 6.75rem;
}
.finra-metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-bright);
}
.finra-metric-value {
  font-size: 0.95rem;
  color: var(--table-p1-body);
  font-variant-numeric: tabular-nums;
}
.cusip-strip-latest {
  flex: 1 1 12rem;
}

.cusip-quarter-action {
  white-space: normal;
  vertical-align: middle;
}
button.btn-cusip-analyze-q {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--btn-p2-fg);
  background: linear-gradient(180deg, var(--btn-p2-bg-hover), var(--btn-p2-bg));
  border: 1px solid #8a6a00;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
button.btn-cusip-analyze-q:hover {
  background: var(--btn-p2-bg-hover);
  color: var(--btn-p2-fg);
}
button.btn-cusip-analyze-q:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.popular-browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 1rem;
}
.popular-browse-toolbar label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

.card-hero {
  padding: 1.35rem 1.6rem;
  border-color: var(--border-default);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.65rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.meta-grid.compact {
  padding: 0.5rem 0;
}
.meta-grid dt {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray);
  margin: 0;
}
.meta-grid dd {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--silver);
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
  width: 100%;
}
.chart-row.quarter-chart-row {
  align-items: stretch;
}
#cusip-charts {
  width: 100%;
}
@media (max-width: 800px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
}

.chart-box {
  background: var(--dark-gray);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.7rem 0.35rem;
}
.chart-box.quarter-chart {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.quarter-chart-canvas {
  flex: 1 1 auto;
  width: 100%;
  min-height: 232px;
}
.quarter-chart-canvas svg.chart-svg-quarter-bars {
  display: block;
  height: 232px;
  max-width: none;
}
.quarter-chart-canvas:not(.scroll-x) svg.chart-svg-quarter-bars {
  width: 100%;
}
.quarter-chart-canvas.scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.quarter-chart-canvas.scroll-x svg.chart-svg-quarter-bars {
  width: auto;
  min-width: 100%;
}

.chart-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--silver);
  letter-spacing: 0.03em;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.ownership-flow-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.ownership-flow-summary strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}
.ownership-flow-summary .flow-stat {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 600;
}
.ownership-flow-summary .flow-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.ownership-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.ownership-flow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.ownership-flow-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.ownership-flow-legend i.up { background: #BBDDB6; }
.ownership-flow-legend i.down { background: #F2C5C1; }
.ownership-flow-legend i.flat { background: #D8D8D8; }

/* Legacy quarter scroll host (prefer .quarter-chart-canvas). */
.chart-scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.25rem;
}
.chart-scroll-x .chart-svg-quarter-bars {
  width: auto;
  max-width: none;
  height: 232px;
}

.table-section-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--silver);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0;
}

table.zebra tbody tr:nth-child(odd) td {
  background: var(--table-row);
}
table.zebra tbody tr:nth-child(even) td {
  background: var(--table-stripe);
}

.compare-summary table {
  max-width: 42rem;
}

.search-section {
  margin-top: 1rem;
}
.search-section-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.result-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.result-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.result-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.result-card-wide .result-card-line {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.result-card-title {
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--gold);
}
.result-card-title:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

.result-card-title-text {
  font-weight: 600;
  font-size: 1rem;
  color: var(--silver);
}

.result-card-hint {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.callout {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem 0.75rem;
  border-left: 4px solid var(--gold);
  background: rgba(212, 160, 23, 0.08);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--silver);
}
.callout p {
  margin: 0.35rem 0 0;
}
.callout p:first-child {
  margin-top: 0;
}
.callout-list {
  margin: 0.4rem 0 0 1.1rem;
  padding: 0;
}
.callout-list li {
  margin: 0.25rem 0;
}
.callout-sub {
  font-size: var(--text-sm);
  color: var(--muted);
}

.result-card-meta {
  margin: 0.2rem 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}
.result-card-links {
  margin: 0.35rem 0 0;
  font-size: var(--text-sm);
}
.result-card-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.cusip-tag,
.stock-tag {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  color: var(--silver);
}

.result-card-line .ext {
  font-size: 0.8rem;
  margin-left: auto;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin-top: 0.45rem;
}

.pill {
  display: inline-block;
  border: 1px solid var(--steel);
  border-radius: var(--radius-full);
  padding: 0.12rem 0.5rem;
  font-size: 0.74rem;
  line-height: 1.4;
  white-space: nowrap;
}

.kind-stock {
  background: rgba(61, 43, 31, 0.65);
  color: var(--silver);
  border-color: var(--brown);
}
.kind-put {
  background: rgba(85, 85, 85, 0.9);
  color: #e8c4c4;
  border-color: var(--gray);
}
.kind-call {
  background: rgba(113, 121, 126, 0.45);
  color: var(--silver);
  border-color: var(--steel);
}
.kind-debt {
  background: var(--brown);
  color: var(--gold-bright);
  border-color: var(--gold);
}
.kind-other {
  background: var(--charcoal);
  color: var(--gray);
  border-color: var(--dark-gray);
}

.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin: 0.75rem 0;
}
.tools-row .grow {
  flex: 1;
  min-width: 12rem;
}

/* Market data admin — Operations dashboard panels */
.ops-dashboard-head {
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}
.ops-dashboard-head .page-title {
  margin-top: 0;
}

.admin-ops-panel {
  margin-top: 1.25rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.admin-ops-panel h3 {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--silver);
  letter-spacing: 0.03em;
}
.admin-ops-panel-lead.sub {
  margin: 0 0 0.85rem;
  max-width: 52rem;
}
.admin-ops-primary-row {
  margin-top: 0;
  margin-bottom: 0.65rem;
}
.admin-ops-log-toolbar {
  align-items: center;
  margin-top: 0.35rem;
  margin-bottom: 0;
}
.admin-ops-log-toolbar + .admin-ops-log {
  margin-top: 0.55rem;
}
pre.admin-ops-log {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--code-bg);
  color: var(--silver);
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.78rem;
  line-height: 1.45;
  max-height: 260px;
}
pre.admin-ops-log.admin-ops-log--sm {
  max-height: 220px;
}

.admin-ops-group {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-default);
}
.admin-ops-group-intro h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.admin-ops-group-intro .sub {
  margin: 0 0 1rem;
  max-width: 52rem;
}
.admin-ops-group-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-ops-group-panels .admin-ops-panel {
  margin-top: 0;
}

details.admin-ops-advanced {
  margin-top: 1.35rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(13, 17, 23, 0.35);
}
details.admin-ops-advanced > summary {
  cursor: pointer;
  font-size: var(--text-base);
  color: var(--silver);
  padding: 0.15rem 0;
}
details.admin-ops-advanced .admin-ops-advanced-gap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dark-gray);
}
details.admin-ops-advanced .admin-ops-advanced-gap:first-of-type {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: none;
}

.admin-ops-routine {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-default);
}
.admin-ops-routine > .row.tools-row:first-of-type {
  margin-top: 0;
}

.api-snippets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.api-snippets h4 {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
}

pre.api-response,
.api-snippets pre {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--code-bg);
  color: var(--silver);
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.45;
}

.card-lite {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--dark-gray);
  padding: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
}

/* Home — Most popular: same panel fill as other `.card` blocks */
.popular-home-card {
  background: var(--card);
  border-color: var(--border);
  /* Fixed preview geometry: all four "Most popular" tables + FINRA card use the same row/header heights */
  --popular-home-thead-h: 38px;
  --popular-home-tbody-h: 34px;
  --popular-home-preview-rows: 20;
  --popular-home-cardhead-h: 54px;
  /* Collapsed 1px borders between thead/body and body rows sit outside cell height math — reserve space so row 20 is not clipped */
  --popular-home-table-border-extra-y: 22px;
}
.popular-home-card h2 {
  margin: 0;
  color: var(--silver);
  letter-spacing: 0.05em;
}

.popular-home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.popular-quarter-ctrl {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.popular-quarter-ctrl label {
  margin: 0;
  white-space: nowrap;
}

.popular-quarter-ctrl select {
  min-width: 8.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--dark-gray);
  color: var(--silver);
  font-size: 0.88rem;
}

.popular-basis {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--muted);
}
.popular-basis strong {
  color: var(--silver);
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
  align-items: stretch;
}
@media (max-width: 1000px) {
  .popular-grid {
    grid-template-columns: 1fr;
  }
}

/* Inner tiles match the surrounding card */
.popular-grid .popular-card {
  background: var(--card);
}

.popular-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 0.4rem 0.65rem 0.55rem;
  display: grid;
  /* Compact title band; same height on all three cards so tables stay aligned */
  grid-template-rows: 2.95rem minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  align-content: stretch;
}

/* Home only: fixed title band + identical table block height per card (side-by-side alignment) */
.popular-home-card .popular-grid .popular-card {
  grid-template-rows: var(--popular-home-cardhead-h) minmax(0, 1fr) auto;
}

/* FINRA card: head + one body root (basis + table + footer live inside the root) */
.popular-home-card .popular-card-shorted.popular-card {
  grid-template-rows: var(--popular-home-cardhead-h) minmax(0, 1fr);
}

.popular-card-head {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.08rem 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

.popular-home-card .popular-card-head {
  height: var(--popular-home-cardhead-h);
  max-height: var(--popular-home-cardhead-h);
  min-height: var(--popular-home-cardhead-h);
  overflow: hidden;
}

.popular-card-head .popular-card-title {
  margin: 0;
  width: 100%;
  font-size: 0.86rem;
  line-height: 1.18;
  font-weight: 600;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.popular-home-card .popular-card-head .popular-card-title {
  margin: 0;
}

/* Home preview: table wrap baseline (fixed dimensions set under `.popular-home-card`) */
.popular-preview-wrap {
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.popular-home-card .popular-preview-wrap {
  margin: 0;
  height: calc(
    var(--popular-home-thead-h) + var(--popular-home-preview-rows) * var(--popular-home-tbody-h) +
      var(--popular-home-table-border-extra-y)
  );
  min-height: calc(
    var(--popular-home-thead-h) + var(--popular-home-preview-rows) * var(--popular-home-tbody-h) +
      var(--popular-home-table-border-extra-y)
  );
  max-height: calc(
    var(--popular-home-thead-h) + var(--popular-home-preview-rows) * var(--popular-home-tbody-h) +
      var(--popular-home-table-border-extra-y)
  );
}

.popular-preview-table {
  table-layout: fixed;
  width: 100%;
}

/* Preview: issuer + metrics (no CUSIP column); Managers column wide enough for header */
.popular-preview-table col.popular-col-inv-symbol {
  width: 14%;
}
.popular-preview-table col.popular-col-inv-issuer {
  width: 34%;
}
.popular-preview-table col.popular-col-inv-mgr {
  width: 22%;
}
.popular-preview-table col.popular-col-inv-val {
  width: 30%;
}

.popular-preview-table col.popular-col-mgr-name {
  width: 56%;
}
.popular-preview-table col.popular-col-mgr-ncusip {
  width: 18%;
}
.popular-preview-table col.popular-col-mgr-val {
  width: 26%;
}

.popular-preview-table col.popular-col-rep-name {
  width: 30%;
}
.popular-preview-table col.popular-col-rep-subject {
  width: 14%;
}
.popular-preview-table col.popular-col-rep-type {
  width: 20%;
}
.popular-preview-table col.popular-col-rep-total {
  width: 12%;
}
.popular-preview-table col.popular-col-rep-date {
  width: 26%;
}

.popular-preview-table col.popular-col-act-name {
  width: 50%;
}
.popular-preview-table col.popular-col-act-filings {
  width: 14%;
}
.popular-preview-table col.popular-col-act-issuers {
  width: 14%;
}
.popular-preview-table col.popular-col-act-date {
  width: 22%;
}

.popular-preview-table col.popular-col-short-symbol {
  width: 10%;
}
.popular-preview-table col.popular-col-short-name {
  width: 46%;
}
.popular-preview-table col.popular-col-short-pct {
  width: 14%;
}
.popular-preview-table col.popular-col-short-vol {
  width: 16%;
}

.popular-preview-table thead tr {
  height: auto;
}

.popular-preview-table tbody tr {
  height: auto;
}

.popular-preview-table tbody td,
.popular-preview-table thead th {
  vertical-align: middle;
  overflow: hidden;
}

/* Home: lock header + body row heights (overrides global th/td padding so rows do not grow with content) */
.popular-home-card .popular-preview-table thead th {
  box-sizing: border-box;
  height: var(--popular-home-thead-h);
  max-height: var(--popular-home-thead-h);
  min-height: var(--popular-home-thead-h);
  padding: 0 0.35rem;
  line-height: var(--popular-home-thead-h);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.popular-home-card .popular-preview-table tbody td {
  box-sizing: border-box;
  height: var(--popular-home-tbody-h);
  max-height: var(--popular-home-tbody-h);
  min-height: var(--popular-home-tbody-h);
  padding: 0 0.35rem;
  line-height: var(--popular-home-tbody-h);
  font-size: var(--text-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.popular-home-card .popular-preview-table tbody td a,
.popular-home-card .popular-preview-table tbody td code,
.popular-home-card .popular-preview-table tbody td span {
  max-width: 100%;
  vertical-align: middle;
}

.popular-home-card .popular-preview-table tbody td a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-height: var(--popular-home-tbody-h);
  line-height: var(--popular-home-tbody-h);
}

.popular-home-card .popular-preview-table tbody td code.popular-sym {
  display: inline-block;
  line-height: inherit;
  padding-block: 0;
  vertical-align: baseline;
}

.popular-preview-table td.popular-ellipsis {
  max-width: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.popular-preview-table td.popular-ellipsis a,
.popular-preview-table td.popular-ellipsis span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.popular-sym {
  display: inline-block;
  min-width: 2.6em;
  padding-inline: 0.2em;
  text-align: center;
}

/* popular-preview-table: force normal weight on all cells.
   !important is needed to override the global th font-weight: 600 and
   any cascade from parent card typography that would otherwise apply. */
.popular-preview-table th,
.popular-preview-table thead th,
.popular-preview-table td,
.popular-preview-table td a,
.popular-preview-table td code,
.popular-preview-table td span {
  font-weight: 400 !important;
}
.popular-preview-table tbody td:first-child,
.popular-preview-table tbody td:first-child a,
.popular-preview-table tbody td:first-child code,
.popular-preview-table tbody td:first-child span {
  font-weight: 400 !important;
}

/* ownership-top-persons-table: normal weight + readable headers (avoid clipped long titles).
   !important overrides global th font-weight for consistency with the data-dense layout. */
.ownership-top-persons-table {
  table-layout: fixed;
  width: 100%;
}

.ownership-top-persons-table thead th {
  white-space: normal;
  line-height: 1.25;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  vertical-align: bottom;
}

.ownership-top-persons-table th,
.ownership-top-persons-table thead th,
.ownership-top-persons-table td,
.ownership-top-persons-table td a,
.ownership-top-persons-table td code,
.ownership-top-persons-table td span {
  font-weight: 400 !important;
}

.ownership-top-persons-table tbody td:first-child,
.ownership-top-persons-table tbody td:first-child a {
  font-weight: 400 !important;
}

.popular-row-empty td {
  opacity: 0.2;
  pointer-events: none;
}

.popular-grid .popular-card .popular-card-title {
  color: var(--gold);
  font-weight: 600;
}

.popular-grid .popular-card .popular-card-footer {
  color: var(--muted);
  padding-top: 0.5rem;
}

.popular-grid .popular-card .popular-card-footer .action-btn {
  font-weight: 600;
}

.popular-card-title {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.popular-card-sub {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
}

.popular-table-wrap {
  max-height: 22rem;
  overflow: auto;
  border-radius: 6px;
}
.popular-table-wrap.popular-preview-wrap {
  max-height: none;
  overflow: hidden;
}
.popular-table {
  font-size: var(--text-sm);
}

.popular-table th,
.popular-table td {
  padding: 0.2rem 0.35rem;
}

.popular-card-footer {
  padding-top: 0.5rem;
  margin: 0;
  font-size: 0.85rem;
}

.holder-pill-fund {
  background: rgba(212, 160, 23, 0.15);
  color: var(--gold-bright);
  border-color: var(--gold);
  font-size: var(--text-xs);
}
.holder-pill-inst {
  background: rgba(113, 121, 126, 0.35);
  color: var(--silver);
  border-color: var(--steel);
  font-size: var(--text-xs);
}

.dense-holders {
  font-size: var(--text-sm);
}
.dense-holders th,
.dense-holders td {
  padding: 0.2rem 0.35rem;
  vertical-align: middle;
}
.dense-holders td.num {
  white-space: nowrap;
}
.holders-table-wrap {
  overflow-x: auto;
}

.two-col-flows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
  margin-top: 0.5rem;
}

.two-col-flows .flow-panel {
  min-width: 0;
  padding: 0 0.85rem;
}

.two-col-flows .flow-panel-buys {
  padding-left: 0;
  padding-right: 1rem;
  border-right: 1px solid var(--border-default);
}

.two-col-flows .flow-panel-sells {
  padding-right: 0;
  padding-left: 1rem;
}

.two-col-flows h4 {
  margin: 0 0 0.45rem;
  font-size: var(--text-base);
  color: var(--gold);
}

.two-col-flows .flow-table td,
.two-col-flows .flow-table th {
  white-space: nowrap;
  padding: 0.35rem 0.5rem;
}

.two-col-flows .flow-table th:last-child,
.two-col-flows .flow-table td:last-child {
  min-width: 4.5rem;
}

.two-col-flows .flow-table td:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.two-col-flows .flow-table td.sec-type {
  font-size: 0.78rem;
  color: var(--text-muted, #aaa);
  letter-spacing: 0.01em;
}

.symbol-map-debt {
  color: var(--gray);
  cursor: help;
  border-bottom: 1px dotted var(--gold);
}

@media (max-width: 900px) {
  .two-col-flows {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .two-col-flows .flow-panel-buys {
    border-right: none;
    border-bottom: 1px solid var(--border-default);
    padding: 0 0 1rem;
  }

  .two-col-flows .flow-panel-sells {
    padding: 0;
  }
}

/* Manager holdings value bar chart */
.mgr-chart-wrap {
  margin: 0.75rem 0;
  overflow-x: auto;
}
.mgr-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  min-width: max-content;
  padding: 0.5rem 0;
}
.mgr-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 38px;
  height: 100%;
}
.mgr-chart-bar {
  width: 100%;
  min-height: 2px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  transition: background var(--transition-fast);
}
.mgr-chart-col:hover .mgr-chart-bar {
  background: var(--gold);
}
.mgr-chart-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

/* Manager dual-axis sector allocation Sankey */
.mgr-sankey-hero {
  margin-top: 0.5rem;
}
.mgr-sankey-toolbar--locked select {
  opacity: 0.55;
  cursor: not-allowed;
}
.mgr-sector-sankey-host {
  min-height: 220px;
  margin-top: 0.5rem;
}
.mgr-dual-sankey {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.35rem 0.5rem;
  align-items: stretch;
}
.mgr-dual-sankey-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.62rem;
  color: var(--text-muted);
  padding: 2.75rem 0 0.5rem;
  text-align: right;
}
.mgr-dual-sankey-body {
  display: grid;
  grid-template-columns: 1fr 4.5rem;
  gap: 0.35rem;
  min-width: 0;
}
.mgr-dual-sankey-main {
  min-width: 0;
}
.mgr-dual-sankey-perf-axis {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 120px;
}
.mgr-perf-axis-label {
  font-size: 0.58rem;
  color: #d4a853;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  align-self: center;
  margin-bottom: 0.35rem;
}
.mgr-dual-sankey-perf {
  flex: 1;
  min-height: 100px;
}
.mgr-perf-empty {
  font-size: 0.75rem;
  text-align: center;
  padding-top: 2rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .mgr-dual-sankey {
    grid-template-columns: 1.75rem 1fr;
  }
  .mgr-dual-sankey-body {
    grid-template-columns: 1fr 3.25rem;
  }
}
.mgr-perf-badge {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
}
.mgr-perf-badge.positive {
  background: rgba(34, 197, 94, 0.12);
  color: var(--positive);
}
.mgr-perf-badge.negative {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}
.mgr-quarters-table {
  font-size: var(--text-sm);
}
.mgr-quarters-table td,
.mgr-quarters-table th {
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}

code {
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  color: var(--silver);
}

/* Spotlight feed (home page) */
.home-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.home-search-err {
  text-align: center;
  margin: 0.25rem 0 0;
}

.home-search-results {
  min-width: 0;
}

.home-spotlight {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.home-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: start;
  margin: 0.35rem 0 0;
}

.home-value-change-chips {
  margin-top: 0.15rem;
}

.home-trending-section {
  margin: 0 !important;
}

.home-trending-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.home-trending-chip code {
  font-size: inherit;
  margin-right: 0.1rem;
}

@media (min-width: 960px) {
  .home-page {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  .home-panel-trending {
    margin-top: 0.15rem;
  }

  .home-content-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 360px);
    gap: 1.35rem 2rem;
  }

  .home-col-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .home-col-main .spotlight-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .home-col-main .live-home-strip {
    margin: 0;
  }

  .home-col-side .spotlight-section:first-child {
    margin-top: 0;
  }
}

@media (min-width: 1200px) {
  .home-page {
    max-width: 1360px;
  }

  .home-content-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    gap: 1.5rem 2.25rem;
  }
}

.home-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-col-side {
  padding: 0.85rem 1rem 0.5rem;
  background: rgba(28, 33, 40, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.home-page .spotlight-section {
  margin: 0 0 1.35rem;
}

.home-page .spotlight-section:last-child {
  margin-bottom: 0;
}

.home-col-side .spotlight-section {
  margin-bottom: 1.15rem;
}

.home-col-main .spotlight-cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.home-col-side .popular-change-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.home-col-side .popular-change-label {
  min-width: 0;
}

.home-browse {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin-top: 1.25rem;
  padding: 1.1rem 0 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.home-browse-group {
  min-width: 0;
}

.home-browse-group .browse-section-title {
  margin-top: 0;
}

.home-browse-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.home-browse-links .action-btn {
  width: 100%;
  justify-content: flex-start;
}

.search-hero-form {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.search-hero-form input[type="search"] {
  flex: 1;
  min-width: 0;
}

.home-sankey-hero {
  margin-bottom: 0;
  padding: 1.1rem 1rem 0.65rem;
}

.home-sankey-header {
  margin-bottom: 0.35rem;
}

.home-sankey-link {
  margin: 0.25rem 0 0;
}

.home-sankey-lead {
  max-width: none;
  margin: 0 0 0.35rem;
  line-height: 1.45;
}

.home-page .live-home-strip {
  margin: 0.75rem 0 0;
}

.spotlight-section { margin: 1.5rem 0; }
.spotlight-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.spotlight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.spotlight-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(28, 33, 40, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.spotlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-subtle);
  color: inherit;
  text-decoration: none;
}

.spotlight-delta {
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.25rem;
}
.spotlight-delta.positive { color: var(--positive); }
.spotlight-delta.negative { color: var(--danger); }

.spotlight-entity { font-size: var(--text-base); color: var(--text-primary); font-weight: 600; }
.spotlight-security { font-size: var(--text-sm); color: var(--text-secondary); }
.spotlight-section-lead {
  margin: -0.25rem 0 0.75rem;
  max-width: 42rem;
}
.spotlight-mover-investment {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}
.spotlight-mover-holders {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}
.spotlight-mover-holder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.35rem 0.65rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.spotlight-mover-holder-name {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.35;
  word-break: break-word;
}
button.spotlight-mover-holder-name:hover,
button.spotlight-mover-holder-name:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
  outline: none;
}
.spotlight-mover-holder-delta {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.spotlight-mover-holder-delta.positive { color: var(--positive); }
.spotlight-mover-holder-delta.negative { color: var(--danger); }
.spotlight-meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 0.5rem; }

.activity-feed { display: flex; flex-direction: column; gap: 0.5rem; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.activity-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-default);
  text-decoration: none;
  color: inherit;
}

.activity-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 5rem;
  padding-top: 0.15rem;
}

.activity-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}
.activity-badge-13f { background: var(--accent-subtle); color: var(--accent); }
.activity-badge-form4 { background: rgba(99, 102, 241, 0.15); color: #818CF8; }
.activity-badge-13d { background: rgba(244, 114, 182, 0.15); color: #F472B6; }

.activity-body { flex: 1; font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.45; }
.activity-body strong { color: var(--text-primary); font-weight: 600; }

.popular-changes { display: flex; flex-direction: column; gap: 0.75rem; }

.popular-change-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: var(--text-sm);
}
.popular-change-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 8rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.chip:hover {
  background: var(--bg-hover);
  border-color: var(--border-default);
  text-decoration: none;
  color: var(--text-primary);
}
.chip .chip-delta { font-variant-numeric: tabular-nums; }
.chip .chip-delta.positive { color: var(--positive); }
.chip .chip-delta.negative { color: var(--danger); }

.stats-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  padding: 0.65rem 0.75rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 0 0.5rem;
}
.stats-banner strong { color: var(--text-secondary); font-weight: 600; }

.search-hero {
  text-align: center;
  padding: 1.5rem 0.5rem 1.15rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.search-hero-lead {
  margin-left: auto;
  margin-right: auto;
}
.search-hero h2 {
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--text-primary);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}
.search-hero input[type="search"] {
  width: 100%;
  max-width: 640px;
  padding: 0.75rem 1rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}
.search-hero input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-md);
}

.browse-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  padding: 1rem 0;
  font-size: var(--text-sm);
  border-top: 1px solid var(--border-subtle);
  margin-top: 1.5rem;
}

#spotlight-home .browse-links {
  margin-top: 0;
  border-top: none;
  padding: 0.35rem 0 0.85rem;
}

/* Unified search results */
.search-type-section { margin-top: 1.25rem; }
.search-type-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.search-type-count {
  background: var(--bg-elevated);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Market time series (FINRA short % + EOD close) */
.market-ts-host {
  margin: 1.25rem 0 0.5rem;
}
.market-ts-panel,
.whale-cost-panel {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.market-ts-asof {
  margin: 0 0 0.75rem;
}
.market-ts-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: var(--text-sm);
}
.market-ts-legend-item::before {
  content: "";
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.market-ts-legend-short::before {
  background: var(--danger);
}
.market-ts-legend-close::before {
  background: var(--accent);
}
.market-ts-legend-meta {
  color: var(--text-muted);
  margin-left: auto;
}
.market-ts-svg,
.market-ts-bars-svg {
  min-height: 220px;
}
.market-ts-bar-chart {
  margin-bottom: 1rem;
}
.market-ts-line-chart {
  margin-bottom: 0.75rem;
}
.market-ts-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 0.45rem;
  font-size: var(--text-sm);
}
.market-ts-legend-vol::before {
  background: #4ade80;
}
.market-ts-legend-ratio::before {
  background: #60a5fa;
}
.market-ts-legend-si::before {
  background: #a78bfa;
}
.market-ts-legend-dtc::before {
  background: #38bdf8;
}
.market-ts-si-chart {
  margin-bottom: 0.75rem;
}
.market-ts-si-note {
  margin: 0 0 0.5rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
}
.market-ts-chart-fill {
  width: 100%;
  overflow: hidden;
}
.market-ts-chart-fill .chart-svg {
  display: block;
  width: 100%;
  height: auto;
}
.market-ts-bars-svg,
.market-ts-svg {
  min-height: 240px;
}
.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}
.chart-axis-baseline {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}
.chart-axis-label {
  font-size: 10px;
  fill: #9ca3af;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.chart-axis-right {
  fill: #f87171;
}
.finra-market-footnote {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  font-size: var(--text-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.finra-market-footnote-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.finra-market-code-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.market-ts-details {
  margin-top: 0.85rem;
}
.market-ts-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
}
.finra-disclaimer-panel {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-subtle);
  border-radius: var(--radius-sm);
  line-height: 1.45;
}
.market-ts-loading {
  padding: 0.5rem 0;
}
.whale-cost-panel .positive {
  color: var(--positive);
}
.whale-cost-panel .negative {
  color: var(--danger);
}

@media (max-width: 900px) {
  .home-content-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .home-col-side {
    padding: 0.75rem 0.85rem;
    order: 2;
  }

  .home-col-main {
    order: 1;
  }

  .home-browse {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-top: 0.85rem;
  }

  .home-browse-links {
    flex-flow: row wrap;
    gap: 0.35rem 1rem;
  }
}

@media (max-width: 640px) {
  .spotlight-cards { grid-template-columns: 1fr; }
  .home-col-main .spotlight-cards { grid-template-columns: 1fr; }
  .search-hero { padding: 1.15rem 0 0.85rem; }
  .search-hero h2 { font-size: var(--text-xl); }
  .search-hero input[type="search"] { font-size: var(--text-base); }
  main { padding: 0.65rem 0.75rem 2rem; }
  .home-sankey-hero { padding: 0.75rem 0.5rem 0.35rem; }
  .home-sankey-title { font-size: 1.05rem; }
  .home-page .spotlight-section { margin-bottom: 1.1rem; }
  .stats-banner {
    gap: 0.25rem 0.85rem;
    font-size: var(--text-xs);
    padding: 0.5rem 0.35rem;
  }
  .home-col-side {
    padding: 0.65rem 0.7rem;
    border-radius: var(--radius-md);
  }
  .market-ts-legend-meta {
    margin-left: 0;
    width: 100%;
  }
}

.analytics-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.25rem;
}
.analytics-stat-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--card-bg, rgba(255, 255, 255, 0.02));
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.analytics-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.analytics-stat-value {
  font-size: 1.45rem;
  line-height: 1.2;
}
.analytics-stat-sub {
  font-size: 0.8rem;
  color: var(--muted);
}
.analytics-daily-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 140px;
  padding: 0.5rem 0 0;
  overflow-x: auto;
}
.analytics-daily-bar {
  flex: 1 0 18px;
  max-width: 28px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}
.analytics-daily-bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent, #3b82f6), rgba(59, 130, 246, 0.45));
}
.analytics-daily-bar-label {
  font-size: 0.62rem;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 3.5rem;
  overflow: hidden;
}

/* --- Responsive tables (S2) --- */
.table-wrap--sticky-col th:first-child,
.table-wrap--sticky-col td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--card-bg, #0f1419);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.15);
}
.holder-mobile-cards {
  display: none;
  gap: 0.65rem;
}
.holder-mobile-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
}
.holder-mobile-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.holder-mobile-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.82rem;
}
.holder-mobile-card dt {
  color: var(--muted);
}
@media (max-width: 768px) {
  .holders-table-wrap table.zebra {
    display: none;
  }
  .holder-mobile-cards {
    display: flex;
    flex-direction: column;
  }
  .activity-item {
    flex-wrap: wrap;
  }
  .activity-time {
    white-space: normal;
    min-width: auto;
    width: 100%;
    margin-bottom: 0.15rem;
  }
}

/* --- Live feed --- */
.live-feed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
}
.live-feed-filters button {
  font-size: 0.76rem;
  padding: 0.3rem 0.6rem;
  line-height: 1.25;
  max-width: 100%;
  text-align: left;
}
.live-feed-filters button.active {
  border-color: var(--gold);
  color: var(--gold);
}
.live-news-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.live-news-item {
  display: block;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
}
.live-news-item:hover {
  border-color: var(--gold);
}
.live-news-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.live-form-link {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
}
.live-symbol-link {
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
.live-symbol-link code {
  font-size: 0.72rem;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.03);
}
.live-symbol-link:hover {
  color: var(--gold);
}
.live-symbol-link:hover code {
  border-color: rgba(212, 175, 55, 0.45);
}

/* Clickable ticker chips in ownership / insider tables */
.ticker-chip-link {
  text-decoration: none;
  display: inline-block;
  vertical-align: middle;
}
.ticker-chip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(212, 175, 55, 0.65);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0.1) 100%);
  color: #f0d060;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.ticker-chip-link:hover .ticker-chip,
.ticker-chip-link:focus-visible .ticker-chip {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.42) 0%, rgba(212, 175, 55, 0.22) 100%);
  border-color: var(--gold, #d4af37);
  color: #fff3b0;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}
.ownership-top-persons-table td:nth-child(2) {
  min-width: 11rem;
}

.person-chip-link {
  text-decoration: none;
  display: inline-block;
  vertical-align: middle;
}
.person-chip {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  border: 1px solid rgba(147, 197, 253, 0.55);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.1) 100%);
  color: #bfdbfe;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.person-chip-link:hover .person-chip,
.person-chip-link:focus-visible .person-chip {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.38) 0%, rgba(59, 130, 246, 0.2) 100%);
  border-color: #93c5fd;
  color: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.contact-page .contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 28rem;
  margin-top: 1rem;
}
.contact-page .contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.contact-page .contact-form input,
.contact-page .contact-form textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-page);
  color: var(--text-primary);
  font: inherit;
}
.contact-form-submit {
  align-self: flex-start;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 160, 23, 0.55);
  background: rgba(212, 160, 23, 0.18);
  color: var(--gold-bright);
  font-weight: 600;
  cursor: pointer;
}
.contact-form-submit:hover {
  background: rgba(212, 160, 23, 0.3);
}
.contact-form-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.contact-info-block {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  max-width: 28rem;
}
.contact-info-block p {
  margin: 0.25rem 0;
}
.contact-form-foot {
  margin-top: 0.75rem;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.turnstile-host {
  min-height: 0;
}
span.ok {
  color: var(--positive);
}

.live-form-link:hover {
  text-decoration: underline;
  color: var(--gold);
}
.live-form-badge {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-default);
  line-height: 1.25;
  white-space: normal;
}
.activity-badge-prospectus {
  background: rgba(120, 140, 180, 0.18);
  color: #a8b8d8;
}
.live-activity-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}
.live-activity-item .live-news-meta {
  margin-bottom: 0;
}
.live-activity-item .activity-body {
  line-height: 1.35;
}
.live-news-summary {
  margin: 0.35rem 0 0;
}
.live-news-headline {
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0.15rem 0 0.35rem;
}
.live-news-open {
  font-size: 0.75rem;
  color: var(--gold);
  text-decoration: none;
}
.live-news-open:hover {
  text-decoration: underline;
}
.live-news-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.live-news-person {
  color: var(--accent);
}
.live-reporter-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.live-reporter-link:hover {
  text-decoration: underline;
}
.live-news-person-inline a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.72rem;
}
.live-news-person-inline a:hover {
  text-decoration: underline;
}
.live-home-strip {
  margin: 0.5rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}
.live-home-strip h3 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* --- Ask panel --- */
.site-footer {
  padding: 1.5rem 1rem 4.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border-default);
  text-align: center;
}
.site-footer-inner {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.site-footer p {
  margin: 0;
}
.site-footer-disclaimer {
  line-height: 1.5;
  max-width: 36rem;
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
}
.site-footer-links a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.site-footer-links a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}
.site-footer-links--accent a {
  font-weight: 600;
}
.site-footer-links .sep,
.site-footer-links > span:not(:empty)::before {
  color: var(--text-muted);
}
.site-footer-links > a + a::before,
.site-footer-links > span + a::before,
.site-footer-links > a + span::before {
  content: "·";
  margin: 0 0.45rem 0 0.1rem;
  color: var(--text-muted);
  font-weight: 400;
  pointer-events: none;
}
.site-footer-tm {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.92;
}
.site-footer-tm .tm,
sup.tm,
.home-sankey-title .tm,
.page-title .tm,
h3 .tm {
  font-size: 0.55em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.12em;
  opacity: 0.85;
}
.site-footer-copy {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.site-footer-copy a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer-copy a:hover {
  color: var(--gold, #c9a227);
  text-decoration: underline;
}
.ask-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  border: 1px solid var(--gold);
  background: var(--card-bg, #0f1419);
  color: var(--gold);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.ask-panel {
  position: fixed;
  right: 1rem;
  bottom: 4rem;
  z-index: 51;
  width: min(420px, calc(100vw - 2rem));
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--card-bg, #0f1419);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
.ask-panel[hidden] {
  display: none !important;
}
.ask-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-default);
}
.ask-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.ask-msg {
  margin-bottom: 0.65rem;
}
.ask-msg-user {
  color: var(--silver);
}
.ask-msg-bot {
  color: var(--muted);
}
.ask-msg-bot .ask-line {
  margin: 0 0 0.4rem;
}
.ask-msg-bot .ask-line-num {
  padding-left: 0.15rem;
}
.ask-msg-bot .ask-line a {
  color: var(--gold, #e8c547);
  word-break: break-word;
}
.ask-msg-bot .ask-line a:hover {
  text-decoration: underline;
}
.ask-blank {
  display: block;
  content: "";
  margin: 0.25rem 0;
}
.ask-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--border-default);
}
.ask-form input {
  flex: 1;
  min-width: 0;
}
.ask-disclaimer {
  padding: 0 0.85rem 0.55rem;
  margin: 0;
  font-size: 0.68rem;
}
@media (max-width: 640px) {
  .ask-panel {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 3.5rem;
  }
}

.auth-card {
  max-width: 32rem;
}

.account-cancel-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(210, 153, 34, 0.45);
  background: rgba(210, 153, 34, 0.08);
}
.account-cancel-panel {
  margin: 0.5rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-default);
  border-radius: 0.5rem;
}
.account-cancel-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.account-cancel-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.account-cancel-submit {
  align-self: flex-start;
  color: var(--text-muted, #8b949e);
  border-color: var(--border-default);
}
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.auth-tabs a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  text-decoration: none;
  font-size: 0.88rem;
}
.auth-tabs a.active {
  background: var(--accent-muted, rgba(56, 139, 253, 0.15));
  border-color: var(--accent, #388bfd);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-form label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}
.auth-form input {
  width: 100%;
}
.auth-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.auth-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, #8b949e);
}
.api-key-reveal {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-subtle, rgba(255, 255, 255, 0.03));
}
.api-key-reveal.hidden {
  display: none;
}

.upgrade-gate {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--border-default, #30363d);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(56, 139, 253, 0.06), transparent);
  text-align: center;
}
.upgrade-gate--top {
  margin: 0.65rem 0 1.15rem;
}
.upgrade-gate__teaser {
  margin: 0 0 0.65rem;
  color: var(--text-secondary, #c9d1d9);
  font-size: 0.95rem;
  line-height: 1.5;
}
.managers-dir-summary {
  margin: 0.35rem 0 1rem;
  color: var(--text-secondary, #c9d1d9);
  font-size: 0.95rem;
  line-height: 1.5;
}
.upgrade-gate__title {
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.upgrade-gate__sub {
  margin: 0 0 0.75rem;
  color: var(--text-muted, #8b949e);
  font-size: 0.92rem;
}
.upgrade-gate__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.tier-preview-banner {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 139, 253, 0.25);
  background: rgba(56, 139, 253, 0.06);
  font-size: 0.92rem;
  color: var(--text-muted, #8b949e);
  line-height: 1.45;
}
.tier-preview-banner__label {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-blue, #58a6ff);
  background: rgba(56, 139, 253, 0.12);
  vertical-align: middle;
}
.tier-preview-banner__cta {
  font-weight: 600;
  white-space: nowrap;
}

body:not(.tier-show-ads) .ad-slot {
  display: none !important;
}
.ad-slot {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-default, #30363d);
  border-radius: 8px;
  text-align: center;
  background: var(--bg-subtle, rgba(255, 255, 255, 0.02));
}
.ad-slot__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #8b949e);
  margin: 0 0 0.35rem;
}
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated, #161b22);
  border-top: 1px solid var(--border-default, #30363d);
  font-size: 0.9rem;
}
.cookie-banner p {
  margin: 0;
  flex: 1 1 16rem;
}
.cookie-banner__body {
  flex: 1 1 20rem;
}
.cookie-banner__list {
  margin: 0.35rem 0 0.5rem 1.1rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted, #8b949e);
}
.cookie-banner__list code {
  font-size: 0.82rem;
}
.cookie-banner__fine {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #8b949e);
}
.auth-success-banner {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(46, 160, 67, 0.45);
  background: rgba(46, 160, 67, 0.1);
}
.auth-success-lead {
  margin: 0.35rem 0 0;
}
.auth-success-note {
  margin: 0 0 1rem;
  color: var(--text-secondary, #c9d1d9);
}
.pricing-faq dt {
  font-weight: 600;
  margin-top: 0.75rem;
}
.pricing-faq dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted, #8b949e);
}
.pricing-annual-note {
  font-size: 0.85rem;
  margin-top: -0.25rem;
}
.pricing-launch-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(56, 139, 253, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 0.92rem;
  line-height: 1.45;
}
.pricing-launch-badge {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}
.pricing-price-was {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted, #8b949e);
  text-decoration: line-through;
  margin-top: 0.15rem;
}
.pricing-price-was-inline {
  text-decoration: line-through;
  color: var(--text-muted, #8b949e);
  font-size: 0.9em;
}
.pricing-compare-lead {
  max-width: 52rem;
  margin-bottom: 0.75rem;
}
.pricing-compare-note {
  margin-top: 0.5rem;
  font-size: 0.82rem;
}
.pricing-compare-table td:first-child {
  font-weight: 500;
}
.pricing-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 1.25rem;
}
.pricing-value-card {
  border: 1px solid var(--border-default, #30363d);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: var(--bg-subtle, rgba(255, 255, 255, 0.02));
}
.pricing-value-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.api-grace-banner {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin: 0 0 1rem;
}
.api-grace-banner.hidden {
  display: none;
}
.newsletter-footer {
  margin-top: 0.5rem;
}
.newsletter-footer input[type="email"] {
  max-width: 14rem;
  margin-right: 0.35rem;
}

.api-tier {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.api-tier--public {
  color: var(--text-secondary);
  border-color: var(--border-default);
  background: rgba(255, 255, 255, 0.04);
}
.api-tier--free {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.1);
}
.api-tier--premium {
  color: #fde68a;
  border-color: rgba(212, 160, 23, 0.45);
  background: rgba(212, 160, 23, 0.12);
}
.api-tier--pro {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
}
.api-group-row td {
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 0.85rem;
}
.api-path-cell a.api-try-link {
  color: var(--text-primary);
  text-decoration: none;
}
.api-path-cell a.api-try-link:hover {
  color: var(--gold);
  text-decoration: underline;
}
span.ok {
  color: var(--positive);
}

.legal-page h3 {
  margin-top: 1.25rem;
}

/* === Mobile / handheld layout === */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle-bars {
  display: inline-block;
  width: 1.05rem;
  height: 0.72rem;
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 2px no-repeat;
}

@media (max-width: 768px) {
  header.topnav {
    padding: 0.65rem 0.85rem;
  }
  .topnav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    align-items: center;
    gap: 0.35rem 0.75rem;
  }
  .topnav-brand {
    grid-area: brand;
  }
  .nav-toggle {
    grid-area: toggle;
    display: inline-flex;
    flex-shrink: 0;
    justify-self: end;
  }
  .topnav-sub {
    display: none;
  }
  header.topnav h1 {
    font-size: 1.15rem;
    margin: 0;
  }
  .topnav-links {
    grid-area: nav;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 0.15rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border-default);
  }
  header.topnav.nav-open .topnav-links {
    display: flex;
  }
  .topnav-links a,
  .nav-dropdown {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-dropdown > summary {
    padding: 0.65rem 0.25rem;
    width: 100%;
  }
  .nav-dropdown-panel {
    position: static;
    min-width: 0;
    width: 100%;
    margin: 0 0 0.35rem;
    padding: 0.15rem 0 0.35rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .nav-dropdown-panel a {
    padding: 0.55rem 0.65rem 0.55rem 1rem;
    white-space: normal;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
  }
  .topnav-links > a.nav-signin {
    padding: 0.65rem 0.25rem;
    text-align: left;
  }

  main {
    padding: 0.85rem 0.75rem 2.5rem;
  }
  .card {
    padding: 0.95rem 0.85rem;
    border-radius: var(--radius-md);
  }
  .page-title {
    font-size: 1.35rem;
    line-height: 1.25;
  }
  .page-subtitle {
    font-size: 0.88rem;
  }
  .action-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .action-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 0.55rem 0.85rem;
  }
  .page-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }
  .page-actions .action-btn {
    width: 100%;
  }
  .row,
  .tools-row {
    flex-direction: column;
    align-items: stretch;
  }
  .row .grow,
  .tools-row .grow {
    min-width: 0;
    width: 100%;
  }
  .row button,
  .tools-row button,
  .row input[type="search"],
  .row select {
    width: 100%;
  }
  .stats {
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .account-upgrade-actions {
    grid-template-columns: 1fr;
  }
  .account-actions-row .pricing-btn {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  .table-wrap.table-wrap--mobile-cards {
    overflow-x: visible;
    margin: 0.65rem 0;
  }
  .table-wrap.table-wrap--mobile-cards::before {
    content: none;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra {
    display: block;
    width: 100%;
    border: none;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra thead {
    display: none;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra tbody {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra tbody tr {
    display: block;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.7rem;
    background: var(--bg-card);
  }
  .table-wrap.table-wrap--mobile-cards table.zebra tbody tr:nth-child(odd) td,
  .table-wrap.table-wrap--mobile-cards table.zebra tbody tr:nth-child(even) td {
    background: transparent;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.38rem 0;
    border: none;
    font-size: 0.88rem;
    text-align: right;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra tbody td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    max-width: 9rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 0.12rem;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra tbody td:first-child {
    display: block;
    padding-top: 0;
    padding-bottom: 0.45rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
  }
  .table-wrap.table-wrap--mobile-cards table.zebra tbody td:first-child::before {
    content: none;
  }
  .table-wrap.table-wrap--mobile-cards .ticker-chip {
    font-size: 0.72rem;
  }
  .ownership-top-persons-table tbody td:nth-child(2) {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .popular-grid {
    grid-template-columns: 1fr;
  }
  .home-browse {
    flex-direction: column;
  }
  .home-browse-group {
    width: 100%;
  }
}

/* Fallback: wide tables scroll horizontally with hint */
@media (max-width: 640px) {
  .table-wrap:not(.table-wrap--mobile-cards) {
    position: relative;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding-bottom: 0.15rem;
  }
  .table-wrap:not(.table-wrap--mobile-cards)::after {
    content: "Scroll →";
    position: sticky;
    left: 0;
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem 0.15rem;
    pointer-events: none;
  }
  .table-wrap:not(.table-wrap--mobile-cards) table {
    font-size: 0.8rem;
  }
  .table-wrap:not(.table-wrap--mobile-cards) th,
  .table-wrap:not(.table-wrap--mobile-cards) td {
    padding: 0.4rem 0.55rem;
  }
}
