/* DB-V04-TOOLBAR-TYPOGRAPHY-25: measured to match the project toolbar 12px reading level. */
:root {
  --db-toolbar-title: #263044;
  --db-toolbar-muted: #7c8498;
  --db-toolbar-arrow: #98a3b3;
  --db-toolbar-selected: #536074;
}
.library-section #workDomainFilter .filter-popover-trigger,
.library-section #workTypeFilter .filter-popover-trigger {
  font-size: 12px !important;
  line-height: 1.3 !important;
  color: var(--db-toolbar-muted) !important;
}
.library-section #workDomainFilter .filter-name,
.library-section #workTypeFilter .filter-name,
.library-section #assetColorSearchTrigger .filter-name {
  color: var(--db-toolbar-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
}
.library-section #workDomainFilter .filter-sep,
.library-section #workTypeFilter .filter-sep {
  color: #a3adbb !important;
  font-size: 12px !important;
}
.library-section #workDomainFilter .filter-value,
.library-section #workTypeFilter .filter-value {
  color: var(--db-toolbar-selected) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}
.library-section #assetColorSearchTrigger > .filter-name {
  color: var(--db-toolbar-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
}
.library-section #workDomainFilter .filter-popover-trigger i,
.library-section #workTypeFilter .filter-popover-trigger i,
.library-section #assetColorSearchTrigger b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 14px;
  margin-left: 2px;
  color: var(--db-toolbar-arrow) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  font-style: normal;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  vertical-align: middle;
  transform: translateY(1px);
}
.library-section #workDomainFilter .filter-popover-trigger:hover i,
.library-section #workTypeFilter .filter-popover-trigger:hover i,
.library-section #assetColorSearchTrigger:hover b,
.library-section #assetColorSearchTrigger[aria-expanded="true"] b {
  color: #7467c9 !important;
}
.library-section #workDomainFilter .filter-popover-trigger:focus-visible,
.library-section #workTypeFilter .filter-popover-trigger:focus-visible,
.library-section #assetColorSearchTrigger:focus-visible {
  outline: 2px solid #8f82e8 !important;
  outline-offset: 2px;
}

/* Project group/sort controls: values use the 项目 title's dark gray-blue. */
.project-archive-figma .paf-select {
  position: relative;
  color: var(--db-toolbar-muted, #7c8498) !important;
}
.project-archive-figma .paf-select > span {
  color: var(--db-toolbar-muted, #7c8498) !important;
  font-size: 11px !important;
  white-space: nowrap !important;
  font-weight: 400 !important;
  line-height: normal !important;
  letter-spacing: 0 !important;
}
.project-archive-figma .paf-select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 14px;
  color: var(--db-toolbar-title, #263044) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: normal !important;
  letter-spacing: 0 !important;
  background: transparent !important;
}
.project-archive-figma .paf-select::after {
  content: "⌄";
  position: absolute;
  right: 0;
  top: 50%;
  display: block;
  color: var(--db-toolbar-arrow, #98a3b3);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  transform: translateY(-50%);
}
.project-archive-figma .paf-select:hover::after,
.project-archive-figma .paf-select:focus-within::after { color: #7467c9; }
.project-archive-figma .paf-select:focus-within select { color: #263044 !important; }
.project-archive-figma .paf-select select:focus-visible { outline: 2px solid #8f82e8; outline-offset: 2px; }

/* P0-1: all asset-library top controls share the 视觉领域 reading level. */
.library-section .resource-type-tabs button {
  color: #7c8498 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
}
.library-section .resource-type-tabs button small {
  color: #9aa5b4 !important;
  font-size: 10px !important;
  font-weight: 400 !important;
}
.library-section .resource-type-tabs button.active {
  color: #4f478f !important;
  font-weight: 600 !important;
}
.library-section .resource-type-tabs button.active small { color: #756bb5 !important; }
.library-section #assetColorSearchTrigger,
.library-section #assetColorSearchTrigger .filter-name {
  font-size: 12px !important;
  line-height: 1.3 !important;
}
.library-section .library-search-suggestions-standalone {
  margin-top: 0 !important;
  padding-top: 4px !important;
}

/* P0-3: at phone widths let the three recommended tags wrap inside the
   library tools column. Type size, weight, button height, radius and the
   1440/1024/768 layouts stay unchanged. */
@media (max-width: 480px) {
  .library-section .library-search-suggestions-standalone {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    gap: 6px 7px !important;
    overflow: visible !important;
  }
}

/* FIX-45 P1-1: move the recommended-tag row up about one tag line height by
   tightening the library header/tools spacing. No negative margins. */
.library-section .topbar {
  min-height: 56px !important;
  padding-top: 8px !important;
  padding-bottom: 4px !important;
}
.library-section .library-search-suggestions-standalone {
  padding-top: 0 !important;
}
@media (max-width: 900px) {
  .library-section .topbar {
    min-height: 62px !important;
    padding-block: 2px !important;
  }
}
