#project-search {
    --st-ink: #1d2733;
    --st-mut: #6b7785;
    --st-line: #e1e6ec;
    --st-bg: #f6f8fa;
    --st-acc: #0b6bcb;
    --st-accbg: #e8f1fb;
    color: var(--st-ink);
    padding-bottom: 20px;
}
#project-search [hidden] { display: none !important; }
#project-search button, #project-search input { font: inherit; }
#project-search :focus-visible { outline: 2px solid var(--st-acc) !important; outline-offset: 2px; }
#project-search button { cursor: pointer; }
.ps-content { min-width: 0; }
.ps-search, .ps-toolbar, .ps-views, .ps-detail-header, .ps-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 9px;
    align-items: center;
}
.ps-search input { width: min(100%, 380px); }
.ps-toolbar { margin: 10px 0; }
.ps-toolbar button, .ps-search button, .ps-close, .ps-more, .ps-scope {
    padding: 4px 9px;
    border: 1px solid var(--st-line);
    border-radius: 6px;
    background: #fff;
    color: var(--st-acc);
}
.ps-toolbar button[aria-pressed="true"], .ps-search button:hover { background: var(--st-accbg); border-color: var(--st-acc); }
.ps-chips button { border: 0; }
.ps-facet-results { min-height: 25px; }
.ps-body { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.ps-body.ps-full, .ps-body.ps-availability { grid-template-columns: minmax(0, 1fr); }
.ps-results { min-width: 0; }
.ps-result, .ps-detail, .ps-study {
    padding: 10px 12px;
    border: 1px solid var(--st-line);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}
.ps-result.ps-selected { border-color: var(--st-acc); box-shadow: inset 3px 0 var(--st-acc); }
.ps-result h3, .ps-study h3 { margin: 0 0 5px; color: var(--st-ink); font-size: 15px; }
.ps-result-title { padding: 0; border: 0; color: var(--st-acc); background: transparent; font-weight: 600; text-align: left; }
.ps-subst-icon { width: 24px; height: 24px; object-fit: contain; margin-right: 6px; vertical-align: middle; }
.ps-meta, .ps-count { color: var(--st-mut); margin: 3px 0; }
.ps-count { font-size: 12px; }
.ps-detail-header { justify-content: space-between; }
.ps-detail h2 { font-size: 18px; margin: 0; }
.ps-detail-content { margin-top: 8px; }
.ps-detail .ps-assay { margin: 12px 0 6px; font-size: 14px; }
.ps-assay > summary { margin-bottom: 5px; color: var(--st-acc); font-weight: 600; cursor: pointer; }
.ps-more, .ps-scope { margin: 4px 0 8px; }
.ps-matrix { overflow: auto; max-height: 68vh; border: 1px solid var(--st-line); border-radius: 6px; }
.ps-matrix table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.ps-matrix thead { position: sticky; top: 0; z-index: 2; }
.ps-matrix th, .ps-matrix td { border-bottom: 1px solid var(--st-line); border-right: 1px solid var(--st-line); padding: 6px; }
.ps-matrix td { text-align: center; min-width: 48px; }
.ps-matrix th { background: var(--st-bg); min-width: 110px; text-align: left; }
.ps-matrix .ps-row-title { position: sticky; left: 0; z-index: 1; min-width: 175px; max-width: 240px; }
.ps-matrix .ps-material-title { padding-left: 20px; background: #fff; }
.ps-matrix .ps-matrix-toggle { border: 0; padding: 0; color: var(--st-acc); background: transparent; text-align: left; font-weight: 600; }
.ps-matrix-toggle::before { content: '▸'; margin-right: 4px; }
.ps-matrix-toggle[aria-expanded="true"]::before { content: '▾'; }
.ps-matrix .ps-cell { width: 100%; min-height: 28px; border: 1px solid transparent; border-radius: 4px; background: var(--st-accbg); color: #194d80; }
.ps-matrix .ps-cell[aria-expanded="true"] { border-color: var(--st-acc); }
@media (max-width: 950px) {
    .ps-body { grid-template-columns: minmax(0, 1fr); }
}
