/* Analyst inventory uses the Research Library's compact, logo-led tiles. */
#tab-analyst-question-database :is(.analyst-db-company-grid,.analyst-db-bank-directory,.analyst-db-analyst-grid) {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(145px,1fr)); gap: 12px; align-items: stretch;
}
#tab-analyst-question-database .analyst-db-logo-tile {
  position: relative; display: grid; grid-template-columns: minmax(0,1fr); justify-items: center;
  align-content: center; gap: 7px; min-width: 0; min-height: 180px; padding: 16px 10px;
  border: 1px solid #2b4059; border-radius: 12px; background: #101c2d;
  text-align: center; color: var(--text); cursor: pointer; font: inherit; overflow-wrap: anywhere;
}
#tab-analyst-question-database .analyst-db-logo-tile:hover { background: #14273e; border-color: var(--accent); transform: none; }
#tab-analyst-question-database .analyst-db-logo-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#tab-analyst-question-database .analyst-db-company-logo,
#tab-analyst-question-database .analyst-db-company-logo .cr-library-logo {
  display: grid; place-items: center; width: 76px; height: 76px; border: 0; border-radius: 0; background: transparent;
}
#tab-analyst-question-database .analyst-db-company-logo img { width: 72px; height: 72px; object-fit: contain; }
#tab-analyst-question-database .analyst-db-bank-logo { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border: 0; border-radius: 8px; background: transparent; font-size: 1.25rem; }
#tab-analyst-question-database .analyst-db-bank-logo img { width: 56px; height: 56px; object-fit: contain; border-radius: 4px; }
#tab-analyst-question-database :is(.cr-library-logo,.analyst-db-bank-logo) :is(img,span)[hidden] { display: none !important; }
#tab-analyst-question-database .analyst-db-logo-tile > strong,
#tab-analyst-question-database .analyst-db-bank-card-identity strong { color: var(--text); font-size: .84rem; line-height: 1.35; white-space: normal; overflow: visible; }
#tab-analyst-question-database .analyst-db-logo-tile > small,
#tab-analyst-question-database .analyst-db-company-metrics,
#tab-analyst-question-database .analyst-db-bank-card-identity small { color: var(--text-muted); font-size: .73rem; line-height: 1.4; }
#tab-analyst-question-database .analyst-db-company-metrics { display: block; }
#tab-analyst-question-database .analyst-db-logo-tile > small:first-of-type { color: var(--accent); }
#tab-analyst-question-database .analyst-db-analyst-name { font-size: .8rem; line-height: 1.4; }
#tab-analyst-question-database .analyst-db-bank-label { color: var(--text-muted); font-size: .65rem; }
#tab-analyst-question-database .analyst-db-bank-card-identity { display: grid; grid-template-columns: minmax(0,1fr); justify-items: center; width: 100%; gap: 8px; }
#tab-analyst-question-database .analyst-db-bank-card-identity > div { gap: 6px; }
#tab-analyst-question-database :is(.analyst-db-card-arrow,.analyst-db-bank-card-arrow) { position: absolute; top: 10px; right: 12px; color: var(--accent); }
#tab-analyst-question-database .analyst-db-logo-tile.is-unknown { order: 999; border-style: dashed; }
@media (max-width: 820px) {
  #tab-analyst-question-database :is(.analyst-db-company-grid,.analyst-db-bank-directory,.analyst-db-analyst-grid) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  #tab-analyst-question-database .analyst-db-logo-tile { min-height: 152px; padding: 14px 8px; gap: 6px; }
  #tab-analyst-question-database .analyst-db-company-logo,
  #tab-analyst-question-database .analyst-db-company-logo .cr-library-logo { width: 60px; height: 60px; }
  #tab-analyst-question-database .analyst-db-company-logo img { width: 56px; height: 56px; }
  #tab-analyst-question-database .analyst-db-logo-tile > strong,
  #tab-analyst-question-database .analyst-db-bank-card-identity strong { font-size: .8rem; }
}

/* Keep navigation and reset together; the reader clears the sticky phone header. */
#tab-analyst-question-database .analyst-library-toolbar-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
#tab-analyst-question-database .analyst-library-reset { min-height:44px; padding:8px 12px; border:1px solid var(--border); border-radius:10px; background:transparent; color:var(--text-muted); font:inherit; font-size:.8rem; cursor:pointer; }
#tab-analyst-question-database .analyst-library-reset:hover { color:var(--text); border-color:var(--accent); }
#tab-analyst-question-database .analyst-library-reset:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
#tab-analyst-question-database .analyst-db-question-pane { scroll-margin-top:20px; }
@media(max-width:820px) { #tab-analyst-question-database .analyst-db-question-pane { scroll-margin-top:84px; } }
