/* Insiders — one row on desktop (user 2026-10-30, as Government Contracts / Congress: "all the settings on the right,
   always one single row"). On the left one view dropdown, as "All models ⌄" on /models (user 2026-10-31, replacing the
   tabs and the "signals in Filter" step). The markup is server-rendered in
   insiders/index.html (user 2026-10-31: no flash of the old layout on load) and every rule here is gated on
   html.aiq-desk (= not the phone layout, set in _phone.html before paint), so the first paint is already one row; JS
   moves nothing. Phones use the same controls in their old layout. Own file: aiq-table-attio.css is shared. */
html.at-shell.at-done.aiq-desk .ins-bar.ins-one:not(#_) { height: 48px; padding-top: 0 !important; padding-bottom: 0 !important; gap: 2px !important; flex-wrap: nowrap !important; container-type: inline-size; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > :is(#ins-sortbtn, #ins-chips, #ins-sum, #ih-back) { display: none !important; }
/* no top/bottom padding (user 2026-10-31): the tabs fill the row, so the open tab's bar sits on the table's top edge */
/* order (user 2026-11-04): tabs · gap · search · Export · View settings · Filter (blue) ·
   + Add companies (My companies only). The period is inside View settings (phones keep #ins-days). No Sort
   button: a number column's heading sorts, a second click flips it; Sort stays for phones. */
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ins-days { display: none !important; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > .ins-vtabs { order: 0; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ins-vbtn { display: none !important; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > .ins-sp { order: 2; flex: 1; min-width: 0; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ins-filt { order: 7; margin-left: 6px; }   /* user 2026-11-04: Filter (blue) far right, Export's old place */
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ins-sortbtn { order: 3; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > .ins-search { order: 3; }   /* user 2026-11-04: "search should be to the left of export" */
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ins-cwrap { order: 5; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ins-csv { order: 4; }   /* user 2026-11-04: Export (outlined), after search */
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ih-add { order: 9; }   /* after My companies' search (#ih-q, 8) */

/* phones: "Sorted by …", no Filter count in words */
html:not(.aiq-desk) :is(.ins-ss, .ins-fn) { display: none !important; }
/* desktop words: "Filter N" */
html.aiq-desk .ins-one :is(.ins-sl, #ins-fcnt, #ins-fbtn svg) { display: none !important; }

/* the view dropdown: the outlined Attio picker (icon · open view · ⌄), as /models. Its label is the server's open view;
   "My companies" (and its star tile) show by CSS while the dashboard does (html.ins-onhome, set before paint), so the
   first paint already names the right view */
.ins-vlbl-mine { display: none; }
html.ins-onhome .ins-vlbl-mine { display: inline; }
html.ins-onhome #ins-vlbl { display: none; }
html.at-shell.at-done.aiq-desk .ins-bar.ins-one > #ins-vbtn { flex: none; }
html.at-done.aiq-desk.ins-home.ins-onhome #ins-vbtn > svg:first-child { display: none; }
html.at-done.aiq-desk.ins-home.ins-onhome #ins-vbtn::before { content: '\2605'; width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,170,40,.16); color: #B7700C; font-size: 12px; line-height: 1; }
html[data-theme="dark"].at-done.aiq-desk.ins-home.ins-onhome #ins-vbtn::before { color: #F2B45A; }
/* the Signal is in the Filter panel again (user 2026-11-04: tabs are All purchases · Significant; Large / Cluster /
   Both are Filter's Signal setting and add to its count) */

/* right side: plain words, no borders (Period keeps its ⌄) */
html.at-shell.at-done.aiq-desk main .ins-one :is(#ins-days, #ins-sortbtn, #ins-cbtn):not(#_):not(#_) { height: 28px !important; padding: 0 9px !important; border: 0 !important;
  border-radius: 8px !important; box-shadow: none !important; background-color: transparent !important; color: var(--a-ink) !important;
  font: 500 14px/20px Inter, system-ui, sans-serif !important; white-space: nowrap; flex: none; gap: 6px; }
html.at-shell.at-done.aiq-desk main .ins-one #ins-days:not(#_):not(#_) { field-sizing: content; width: auto !important; padding-right: 20px !important; background-position: right 4px center !important; }
html.at-shell.at-done.aiq-desk main .ins-one :is(#ins-days, #ins-sortbtn, #ins-cbtn):hover:not(#_):not(#_) { background-color: var(--a-fill) !important; }
/* Filter is the page's one blue button (user 2026-11-04: "make the filter button blue and swap places with the export
   button and make export white"): far right, funnel + "Filter", white text; with filters on it adds the count. Insiders'
   exception to the header button kinds (tests/test_header_button_kinds.py allows it here only). */
html.at-shell.at-done.aiq-desk main .ins-one #ins-fbtn:not(#_):not(#_) { height: 28px !important; padding: 0 10px 0 8px !important; gap: 6px; border: 0 !important;
  border-radius: 8px !important; background-color: var(--a-blue, #266DF0) !important; box-shadow: var(--a-btn-pri, none) !important; color: #fff !important;
  font: 500 14px/20px Inter, system-ui, sans-serif !important; white-space: nowrap; flex: none; }
html.at-shell.at-done.aiq-desk main .ins-one #ins-fbtn:hover:not(#_):not(#_) { background-color: var(--a-blue-h, #215BC4) !important; }
html.aiq-desk .ins-one #ins-fbtn .ins-fic { font-size: 15px; color: #fff; }
html:not(.aiq-desk) .ins-fic { display: none; }
html.at-shell.at-done.aiq-desk main .ins-one #ins-fbtn.set:not(#_):not(#_) { color: #fff !important; }
html.at-shell.at-done.aiq-desk .ins-one :is(#ins-sortbtn svg, #ins-sortk, #ins-cbtn svg) { display: none; }
html.at-shell.at-done.aiq-desk .ins-one #ins-sortbtn span { color: inherit !important; }
html.at-shell.at-done.aiq-desk .ins-one #ins-cbtn.is-on:not(#_):not(#_) { color: var(--a-blue) !important; }
/* Export is an outlined make/send button again (user 2026-11-04: "make export white"), in Filter's old place before
   search. On My companies Export and Filter are hidden and + Add companies is the one blue button. */
html.at-shell.at-done.aiq-desk main .ins .ins-one #ins-csv:not(#_):not(#__) { height: 28px !important; padding: 0 10px 0 8px !important; gap: 6px; margin: 0 6px 0 0; flex: none;
  border: 0 !important; border-radius: 8px !important; background-color: var(--a-bg) !important; color: var(--a-ink) !important; box-shadow: var(--a-btn) !important;
  font: 500 14px/20px Inter, system-ui, sans-serif !important; white-space: nowrap; }
html.at-shell.at-done.aiq-desk main .ins .ins-one #ins-csv:not(#_):not(#__):hover { background-color: var(--a-hover) !important; }
html.at-shell.at-done.aiq-desk .ins-one #ins-csv svg:not(#_):not(#__) { display: inline-block; width: 15px; height: 15px; color: var(--a-mute) !important; }
/* + Add companies only on the My companies tab (user 2026-10-31: "only on the My companies page"); html.ins-onhome is set
   before paint and dropped when a tab switches to All purchases */
html.at-shell.at-done.aiq-desk.ins-home:not(.ins-onhome) .ins-bar.ins-one > #ih-add:not(#_):not(#_) { display: none !important; }
html.at-shell.at-done.aiq-desk.ins-home.ins-onhome .ins-bar.ins-one > #ih-add:not(#_) { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px;
  border-radius: 8px; margin-left: 8px; flex: none; }
/* the Filter panel opens under Filter, leftwards (Filter sits on the right) */
html.at-shell.at-done.aiq-desk .ins-one #ins-pop:not(#_):not(#_) { left: auto !important; right: 0 !important; }   /* Filter sits right (2026-11-04): open leftwards */
/* View settings: the period first, a "· 90 days" note on the button when it isn't the default 30 */
.ins-cper { margin-bottom: 10px; }   /* Quiet pop-up kit: no rules inside */
.ins-cper-o { all: unset; box-sizing: border-box; display: flex; align-items: center; width: 100%; height: 30px; padding: 0 14px; cursor: pointer;
  font: 500 13px/18px Inter, system-ui, sans-serif; color: var(--pop-ink, var(--a-ink)); }
.ins-cper-o:hover { background: var(--a-fill); }
.ins-cper-o.on::after { content: ''; width: 9px; height: 5px; margin-left: auto; border: solid var(--a-blue, #455DDC); border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
html:not(.aiq-desk) .ins-cper, html:not(.aiq-desk) .ins-cper-n { display: none !important; }
.ins-cper-n { color: var(--a-mute); font-weight: 500; margin-left: -2px; }
/* search: an icon that opens into a field, stays open while it holds a query */
html.at-shell.at-done.aiq-desk main .ins-one .ins-search:not(#_):not(#_) { position: relative; flex: none; display: inline-flex; align-items: center; width: auto; height: 28px;
  margin: 0; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search svg { position: absolute; left: 8px; color: var(--a-mute); pointer-events: none; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ins-q:not(#_):not(#_) { width: 30px !important; height: 28px; padding: 0 0 0 28px !important; border: 0 !important; border-radius: 8px;
  background: transparent !important; box-shadow: none !important; cursor: pointer; font: 500 14px/20px Inter, system-ui, sans-serif !important; color: var(--a-ink) !important; transition: width .16s ease; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ins-q:not(#_):not(#_)::placeholder { color: transparent; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search:hover #ins-q:not(#_):not(#_) { background: var(--a-fill) !important; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ins-q:is(:focus, :not(:placeholder-shown)):not(#_):not(#_) { width: 180px !important; cursor: text; background: var(--a-fill) !important; outline: 0; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ins-q:focus:not(#_):not(#_)::placeholder { color: var(--a-mute); }
/* My companies' own search (#ih-q, ins-home.js): the same icon that opens into a field */
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ih-q:not(#_):not(#_) { width: 30px !important; height: 28px; padding: 0 0 0 28px !important; border: 0 !important; border-radius: 8px;
  background: transparent !important; box-shadow: none !important; cursor: pointer; font: 500 14px/20px Inter, system-ui, sans-serif !important; color: var(--a-ink) !important; transition: width .16s ease; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ih-q:not(#_):not(#_)::placeholder { color: transparent; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search:hover #ih-q:not(#_):not(#_) { background: var(--a-fill) !important; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ih-q:is(:focus, :not(:placeholder-shown)):not(#_):not(#_) { width: 180px !important; cursor: text; background: var(--a-fill) !important; outline: 0; }
html.at-shell.at-done.aiq-desk .ins-one .ins-search #ih-q:focus:not(#_):not(#_)::placeholder { color: var(--a-mute); }

/* laptop widths: still one row, sized to the row, not the window (sidebar open or not). With the period inside View
   settings the words need ~450px, so they stay at 1024 and 925 with the sidebar open; only under a 560px row do View
   settings and Export become icons (their titles say what they are, so never two bare icons) and Add companies too. */
html.at-shell.at-done.aiq-desk .ins-one #ins-cbtn :is(.at-bic, .at-car) { display: none; }
@container (max-width: 560px) {
  html.at-shell.at-done.aiq-desk main .ins-one #ins-cbtn:not(#_):not(#_) { padding: 0 7px !important; }
  html.at-shell.at-done.aiq-desk .ins-one :is(#ins-cbtn .lb, #ins-cbtn .ins-cper-n, #ins-csv .pro-tag) { display: none; }
  html.at-shell.at-done.aiq-desk .ins-one #ins-cbtn .at-bic { display: inline-block; font-size: 15px; color: var(--a-ink); }
  html.at-shell.at-done.aiq-desk main .ins .ins-one #ins-csv:not(#_):not(#__) { font-size: 0 !important; width: 28px; padding: 0 !important; justify-content: center; }
  html.at-shell.at-done.aiq-desk .ins-one #ih-add span { display: none; }
  html.at-shell.at-done.aiq-desk.ins-home .ins-bar.ins-one > #ih-add:not(#_) { width: 28px; padding: 0; justify-content: center; }
}

/* the view tabs (user 2026-11-04: "turn the dropdown into a tab bar like Superinvestors"; the look is the house tab bar since
   2026-11-04, css/ins-tabbar.css). Phones keep the dropdown. My companies only with the draft on. */
html:not(.aiq-desk) .ins-vtabs { display: none !important; }
html:not(.ins-home) .ins-vtab-mine { display: none !important; }
/* no count → no slot: the empty count took a 6px gap and pushed "Filter" off centre (spacing pass 2026-11-07) */
#ins-fbtn .ins-fn:empty { display: none; }
