/* 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;
  --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.7rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

header.topnav h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

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;
}

.topnav-sub {
  font-size: 0.78rem;
  color: var(--nav-muted);
  flex: 1 1 100%;
}
.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: 720px) {
  .topnav-sub {
    flex: 0 1 auto;
    margin-left: auto;
  }
}

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;
}

.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 {
  color: var(--gray);
}
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;
}

.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;
}

/* 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 {
  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);
}

.popular-grid .popular-card .popular-card-footer a {
  color: var(--gold-bright);
  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;
}
.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) */
.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.5rem;
  padding: 0.65rem 1rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}
.stats-banner strong { color: var(--text-secondary); font-weight: 600; }

.search-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.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: 640px) {
  .spotlight-cards { grid-template-columns: 1fr; }
  .search-hero h2 { font-size: var(--text-xl); }
  .search-hero input[type="search"] { font-size: var(--text-base); }
  main { padding: 0.75rem 1rem 2rem; }
  .market-ts-legend-meta {
    margin-left: 0;
    width: 100%;
  }
}
