
/* All Compare surfaces inherit the active theme, including sticky table cells. */
body.light-mode #comparePage{--card:var(--panel,#ffffff)}
#comparePage .compare-search-wrap{margin-left:0;flex:1;width:auto}
#comparePage .compare-search-wrap input{width:100%;box-sizing:border-box}
#comparePage .search-suggestions{background:var(--card)}
#comparePage .search-name,#comparePage .search-symbol{color:var(--text)}
#comparePage .search-item:hover,#comparePage .search-item.active{background:var(--line)}
:is(#comparePage,#etfXraySuggestions) .peer-chip.added{color:#fff}
body.light-mode :is(#comparePage,#etfXraySuggestions) .peer-chip.added{color:#172033}
#comparePage .compare-matrix{table-layout:fixed}
#comparePage .compare-metric-col{width:28%}
#comparePage .compare-matrix th,#comparePage .compare-matrix td{white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
#comparePage .compare-matrix th:not(:first-child),#comparePage .compare-matrix td:not(:first-child){text-align:center}
#comparePage .compare-matrix .group td{position:static}
#comparePage .compare-matrix .compare-group-title{display:block;position:sticky;left:8px;width:max-content;max-width:calc(100vw - 96px);white-space:normal}
@media(max-width:700px){
  #comparePage .compare-matrix{width:var(--compare-mobile-width);min-width:0;max-width:none}
  #comparePage .compare-metric-col{width:110px}
  #comparePage .compare-matrix th:first-child,
  #comparePage .compare-matrix td:first-child{padding-left:8px;padding-right:8px;font-size:12px}
}
@supports(width:1cqw){
  @media(max-width:700px){
    #comparePage .tool-table-wrap{container-type:inline-size}
    #comparePage .compare-matrix{width:calc(28cqw + 36cqw * var(--compare-company-count,2))}
    #comparePage .compare-metric-col{width:28cqw}
    #comparePage .compare-matrix th,#comparePage .compare-matrix td{padding:9px 4px;font-size:12px}
    #comparePage .compare-matrix th:first-child,#comparePage .compare-matrix td:first-child{font-size:11px}
  }
}

.compare-builder{border:1px solid var(--line);border-radius:14px;padding:14px;margin:14px 0}.compare-seed label,.peer-title{font-size:12px;font-weight:800;color:var(--muted)}.peer-box{padding:10px 0 2px}.peer-chips{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.peer-chip{border:1px solid var(--line);background:transparent;color:var(--text);border-radius:999px;padding:7px 10px;font-weight:800;cursor:pointer}.peer-chip:hover{border-color:#5680ff}.peer-chip.added{background:#4f74d8;color:#fff}.peer-note{font-size:11px;color:var(--muted)}.compare-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:10px;margin:12px 0 16px}.compare-card{border:1px solid var(--line);border-radius:12px;padding:12px}.compare-card strong{font-size:18px}.compare-card .sector{font-size:11px;color:var(--muted);min-height:30px;margin:4px 0 8px}.compare-card .mini{font-size:12px;display:flex;justify-content:space-between;gap:8px;margin-top:5px}.compare-matrix th:first-child,.compare-matrix td:first-child{position:sticky;left:0;z-index:1;background:var(--card);text-align:left!important}.compare-matrix .group td{font-size:10px;letter-spacing:.08em;font-weight:900;color:var(--muted);background:rgba(86,128,255,.07);text-align:left!important}.metric-info{cursor:help;border-bottom:1px dotted var(--muted)}

.screen-topbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:14px 0}.screen-topbar input,.screen-topbar select,.screen-filter-menu select,.screen-universe input{background:#0e1628;color:var(--text);border:1px solid var(--line);border-radius:9px;padding:9px 10px}.screen-topbar button,.screen-universe button{border:1px solid var(--accent);background:var(--accent);color:#fff;border-radius:9px;padding:9px 12px;font-weight:750;cursor:pointer}#addScreenFilter{background:#4f74d8;border-color:#4f74d8}.screen-topbar button.secondary{background:transparent;color:var(--muted);border-color:var(--line)}.screen-filter-menu{display:none;border:1px solid var(--line);border-radius:12px;padding:12px;margin:8px 0;background:#0e1628;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:9px}.screen-filter-menu.open{display:grid}.screen-filter-item label{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}.screen-filter-item select{width:100%}.screen-active{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}.screen-chip{border:1px solid var(--line);border-radius:999px;padding:6px 9px;color:var(--muted);font-size:12px;background:#0e1628}.screen-chip button{border:0;background:transparent;color:inherit;cursor:pointer}.screen-universe{margin:10px 0;color:var(--muted)}.screen-universe summary{cursor:pointer}.screen-universe input{margin-top:8px;min-width:320px}.screen-meta{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin:10px 0}.screen-table{min-width:1100px!important}.screen-table th{cursor:pointer;user-select:none;white-space:nowrap}.screen-table th:hover{color:var(--accent)}.screen-table td:nth-child(1),.screen-table td:nth-child(2),.screen-table td:nth-child(3){text-align:left}.screen-table th:nth-child(1),.screen-table th:nth-child(2),.screen-table th:nth-child(3){text-align:left}.screen-note{color:var(--muted);font-size:11px;margin-top:10px}

#screenerPage .screen-topbar input,#screenerPage .screen-topbar select,#screenerPage .screen-filter-menu,#screenerPage .screen-filter-menu select,#screenerPage .screen-universe input,#screenerPage .screen-chip{background:var(--card);color:var(--text)}
#screenerPage .screen-topbar button:not(.secondary),#screenerPage .screen-pagination button{background:#4f74d8;border:1px solid #4f74d8;color:#fff;border-radius:9px;padding:9px 12px;font-weight:750;cursor:pointer}
body.light-mode #screenerPage{--card:var(--panel,#fff)}
body.light-mode #screenerPage .screen-topbar button:not(.secondary),body.light-mode #screenerPage .screen-pagination button{color:#172033}
#screenerPage button:disabled{opacity:.55;cursor:default}
#screenerPage .tool-table-wrap{height:auto;max-height:none;overflow-x:auto;overflow-y:hidden;position:relative;isolation:isolate}
#screenerPage .screen-table{border-collapse:separate;border-spacing:0}
#screenerPage .screen-table th{position:sticky;top:0;z-index:2;background:var(--card);transform:translateY(var(--screen-header-offset,0px))}
#screenerPage .screen-table th:first-child,#screenerPage .screen-table td:first-child{position:sticky;left:0;z-index:1;background:var(--card);border-right:1px solid var(--line);min-width:90px}
#screenerPage .screen-table th:first-child{z-index:3}
#screenerPage .screen-pagination{display:flex;justify-content:center;align-items:center;gap:16px;margin-top:16px;color:var(--muted)}
#screenerPage .screen-pagination[hidden]{display:none}
#screenerPage .screen-note-ref{font-size:10px;white-space:nowrap;color:var(--accent);text-decoration:none;vertical-align:super}
#screenerPage .screen-cell-notes{font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
#screenerPage .screen-cell-notes li{scroll-margin-top:130px}
#screenerPage .screen-workspace{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0}
#screenerPage .screen-workspace label,#screenerPage #screenPresetStatus{color:var(--muted);font-size:12px}
#screenerPage .screen-workspace input,#screenerPage .screen-workspace select{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:9px;padding:9px 10px;max-width:100%}
#screenerPage .screen-workspace button{background:#4f74d8;color:#fff;border:1px solid #4f74d8;border-radius:9px;padding:9px 12px;font-weight:750;cursor:pointer}
body.light-mode #screenerPage .screen-workspace button{color:#172033}
#screenerPage .screen-workspace button.secondary{background:transparent;border-color:var(--line);color:var(--text)}
#screenerPage #screenPresetStatus{flex-basis:100%}
#screenerPage .screen-table :is(th,td):is(:nth-child(2),:nth-child(3)){width:160px;min-width:160px;max-width:160px}
#screenerPage .screen-column-label{display:block;width:136px;max-width:136px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}

