/* BQ - Congress Trades 2.0.0. The pages are bq-ownership's .bq-fd system: funds.css, the stock
   skin, institutions.css and the bq-dropdown field do the furniture (crumbs, headbar, cards,
   KPIs, .bq-fd-seg, sortable headers, ticker pills, suggest list, FAQ, related cards, gates).
   Only what congress adds is here. Direction colours stay what they are: green bought, red sold. */

.bq-cg {
    --cg-dem: #217ab4;
    --cg-rep: #b5485d;
    --cg-ind: #8a95a1;
    --cg-s0: #0f6e6e;      /* the member / all members */
    --cg-s1: #217ab4;      /* Democrats */
    --cg-s2: #b5485d;      /* Republicans */
    --cg-spy: #98a1ab;     /* the benchmark, quiet */
    --cg-price: #a84a72;   /* a stock's price (the skin's plum) */
}

/* WP Rocket's lazy render puts content-visibility: auto on below-the-fold blocks with no
   intrinsic size, so a table sits at 0px until scrolled to and the page jumps */
.bq-cg [data-wpr-lazyrender] { content-visibility: visible; }

/* --- window panes: one per period, the Period buttons show one --------- */
.bq-cg .bq-cg-pane[hidden] { display: none !important; }

/* --- the finder (type-ahead over members and stocks) ------------------- */
.bq-cg .bq-cg-finder { position: relative; flex: none; max-width: 560px; margin: 2px 0 16px; }
.bq-cg .bq-cg-finder input { height: 38px; font-size: 13.5px; }
.bq-cg .bq-cg-finder .bq-inst-suggest { z-index: 40; }

/* --- party tag: a quiet chip with a dot, never the direction colours ----- */
.bq-cg .bq-cg-party {
    display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 1px 7px 1px 6px;
    border: 1px solid var(--fd-line-mid, #dfe6ed); border-radius: 999px; background: #fff;
    font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--fd-muted, #6b7a89);
    vertical-align: 1px; white-space: nowrap;
}
.bq-cg .bq-cg-party::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cg-ind); }
.bq-cg .bq-cg-party.is-dem::before { background: var(--cg-dem); }
.bq-cg .bq-cg-party.is-rep::before { background: var(--cg-rep); }
.bq-cg .bq-cg-former { margin-left: 6px; font-size: 11px; color: var(--fd-faint, #97a4b2); }

.bq-cg .bq-cg-name { font-weight: 600; color: var(--fd-ink, #0b1f2e); text-decoration: none; }
.bq-cg a.bq-cg-name:hover { color: var(--fd-accent); text-decoration: underline; }

/* a ticker that is not a link (the stock's own page) wears the same pill */
.bq-fd .bq-fd-table span.bq-inst-tk {
    display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 4px;
    background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 11px; font-weight: 800; letter-spacing: .02em;
}

/* --- the trade table --------------------------------------------------- */
.bq-cg .bq-cg-table { min-width: 1100px; }
.bq-cg .bq-cg-table td { white-space: nowrap; }
.bq-cg .bq-cg-table td.bq-cg-c-asset { white-space: nowrap; }
.bq-cg .bq-cg-table .bq-cg-asset {
    display: inline-block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-weight: 500;
}
.bq-cg .bq-cg-table .bq-fd-chip--class { margin-left: 6px; }
.bq-cg .bq-cg-late {
    margin-left: 4px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.bq-cg .bq-cg-flag {
    display: inline-block; width: 15px; height: 15px; line-height: 15px; border-radius: 50%;
    background: var(--fd-line-mid, #dfe6ed); font-size: 10px; font-weight: 700; text-align: center; cursor: help;
}
.bq-cg .bq-cg-pdf {
    display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
    color: var(--fd-accent); text-decoration: none;
}
.bq-cg .bq-cg-pdf svg { width: 13px; height: 13px; }
.bq-cg .bq-cg-pdf:hover { text-decoration: underline; }
/* frozen first column on the wide tables (the institutions directory's rule) */
.bq-cg .bq-cg-table thead th:first-child, .bq-cg .bq-cg-table tbody td:first-child,
.bq-cg .bq-cg-postable thead th:first-child, .bq-cg .bq-cg-postable tbody td:first-child {
    position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--fd-line-mid, #dfe6ed);
}
.bq-cg .bq-cg-table thead th:first-child, .bq-cg .bq-cg-postable thead th:first-child { z-index: 3; background: #f5f8fa; }
.bq-cg .bq-cg-table tbody tr:hover td:first-child, .bq-cg .bq-cg-postable tbody tr:hover td:first-child { background: var(--fd-tint, #f7fafc); }
.bq-cg .bq-cg-tradewrap { transition: opacity .15s ease; }
.bq-cg .bq-cg-tradewrap.is-loading { opacity: .45; pointer-events: none; }
.bq-cg .js-cg-gate[hidden] { display: none; }
.bq-cg .bq-cg-toolbar { flex-wrap: wrap; gap: 10px; }
.bq-cg .bq-cg-toolbar .bq-fd-search { flex: 1 1 260px; max-width: 360px; }
.bq-cg .bq-fd-tablefoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* --- the pager: the SEC filings / fund distributions square buttons ------ */
.bq-cg .bq-fd-pager { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.bq-cg .bq-fd-pager:empty { display: none; }
.bq-cg .bq-fd-pager-btn {
    appearance: none; min-width: 30px; height: 30px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #d4d4d4; background: #fff; color: #404040; font-family: inherit; font-size: 12.5px; font-weight: 600;
    font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.bq-cg .bq-fd-pager-btn:hover:not(:disabled) { background: #fafafa; border-color: #a3a3a3; }
.bq-cg .bq-fd-pager-btn.is-current { border-color: #a3a3a3; color: #171717; font-weight: 700; cursor: default; }
.bq-cg .bq-fd-pager-btn:disabled { opacity: .4; cursor: default; }
.bq-cg .bq-fd-pager-btn.is-gated { color: #8d98a4; }
.bq-cg .bq-fd-pager-btn.is-gated:hover { border-color: rgba(176, 118, 26, .45); background: rgba(176, 118, 26, .06); color: #8a5a10; }
.bq-cg .bq-fd-pager-dots { padding: 0 4px; color: #a3a3a3; align-self: center; }

/* --- chart keys and swatches ------------------------------------------- */
.bq-cg .bq-cg-key--s0 i { background: var(--cg-s0); }
.bq-cg .bq-cg-key--s1 i { background: var(--cg-s1); }
.bq-cg .bq-cg-key--s2 i { background: var(--cg-s2); }
.bq-cg .bq-cg-key--spy i { background: var(--cg-spy); }
.bq-cg .bq-fd-key--price i { background: var(--cg-price); }
.bq-cg .bq-cg-key--buy i, .bq-cg .bq-cg-key--sell i { width: 0; height: 0; background: none; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.bq-cg .bq-cg-key--buy i { border-bottom: 8px solid #15803d; }
.bq-cg .bq-cg-key--sell i { border-top: 8px solid #c5331f; }
.bq-cg .bq-cg-swatch i { display: inline-block; width: 12px; height: 3px; margin-right: 8px; border-radius: 2px; vertical-align: middle; }
.bq-cg .bq-cg-perfwrap { margin-top: 14px; }
.bq-cg .bq-cg-perftable[hidden] { display: none; }
.bq-cg .bq-cg-perftable { min-width: 760px; }

/* --- leaderboards and breakdowns: small tables two to a row ------------- */
.bq-cg .bq-cg-boards .bq-inst-row { margin-bottom: 18px; }
.bq-cg .bq-cg-boards .bq-inst-row:last-child { margin-bottom: 0; }
.bq-cg .bq-cg-board { min-width: 0; }
.bq-cg .bq-cg-board-title {
    margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--fd-ink, #0b1f2e);
}
.bq-cg .bq-cg-board-empty { margin: 0; padding: 18px 0; font-size: 12.5px; color: var(--fd-muted, #6b7a89); }
/* one line a row: the name cell takes what the number leaves and ends in an ellipsis */
.bq-cg .bq-cg-board td.bq-fd-c-name { width: 100%; max-width: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bq-cg .bq-cg-board td.bq-fd-c-name .bq-inst-issuer { margin-left: 6px; font-weight: 500; color: var(--fd-muted, #6b7a89); }
.bq-cg .bq-cg-board td:last-child { white-space: nowrap; }
.bq-cg .bq-cg-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.bq-cg .bq-cg-bd { min-width: 0; }

/* --- the member's committees ------------------------------------------- */
.bq-cg .bq-cg-committees { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fd-line, #eaeff4); }
.bq-cg .bq-cg-committees .bq-fd-fact-label { margin-right: 6px; }

/* --- the directory's toolbar -------------------------------------------- */
.bq-cg .bq-cg-dirform { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bq-cg .bq-cg-dirform .bq-fd-search { flex: 1 1 260px; max-width: 380px; }

@media (max-width: 1100px) {
    .bq-cg .bq-cg-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .bq-cg .bq-cg-breakdown { grid-template-columns: minmax(0, 1fr); }
    .bq-cg .bq-cg-table .bq-cg-asset { max-width: 180px; }
    .bq-cg .bq-fd-head { flex-wrap: wrap; gap: 10px; }
    .bq-cg .bq-fd-head-side { flex-wrap: wrap; gap: 8px; }
}
@media (pointer: coarse) {
    .bq-cg .bq-fd-search input { font-size: 16px; }
}

/* the toolbars keep their controls together on the left (funds.css spreads a .bq-fd-toolbar) */
.bq-cg .bq-cg-toolbar, .bq-cg .bq-cg-dirform { justify-content: flex-start; }

/* funds.css pads every tile from the 4th down as a second row (its 3-up rule); in the 4-up grid the
   4th is still first-row */
.bq-cg .bq-fd-kpis--4 .bq-fd-kpi:nth-child(4) { padding-top: 4px; }
@media (max-width: 960px) {
    .bq-cg .bq-fd-kpis--4 .bq-fd-kpi:nth-child(n + 3) { padding-top: 18px; }
}
