/* 导航菜单图标 —— 包含匹配，不含任何通知相关规则 */
:root {
  --ico-issues: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='2.6' fill='%23475569' stroke='none'/%3E%3C/svg%3E");
  --ico-pulls: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='18' r='3'/%3E%3Cpath d='M6 9v6'/%3E%3Cpath d='M18 15V8'/%3E%3Cpath d='M18 8h-5a4 4 0 0 0-4 4'/%3E%3C/svg%3E");
  --ico-milestones: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4'/%3E%3Cpath d='M5 4h13l-2.5 4L18 12H5'/%3E%3C/svg%3E");
  --ico-explore: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolygon points='16 8 10.5 10.5 8 16 13.5 13.5 16 8'/%3E%3C/svg%3E");
  --ico-repos: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
  --ico-orgs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

/* 只给菜单链接注入图标；跳过自定义菜单(自带SVG)，避免双图标 */
#navbar a.item:not(.wyh-nav-item)[href*="issues"]::before,
#navbar a.item:not(.wyh-nav-item)[href*="pulls"]::before,
#navbar a.item:not(.wyh-nav-item)[href*="milestones"]::before,
#navbar a.item:not(.wyh-nav-item)[href*="repos"]::before,
#navbar a.item:not(.wyh-nav-item)[href*="organizations"]::before,
#navbar a.item:not(.wyh-nav-item)[href*="explore"]::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-right: 6px;
  opacity: .78;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

#navbar a.item:not(.wyh-nav-item)[href*="issues"],
#navbar a.item:not(.wyh-nav-item)[href*="pulls"],
#navbar a.item:not(.wyh-nav-item)[href*="milestones"],
#navbar a.item:not(.wyh-nav-item)[href*="repos"],
#navbar a.item:not(.wyh-nav-item)[href*="organizations"],
#navbar a.item:not(.wyh-nav-item)[href*="explore"] {
  display: inline-flex !important;
  align-items: center;
}

/* 顺序：具体路径在前，explore 兜底在后 */
#navbar a.item:not(.wyh-nav-item)[href*="issues"]::before        { background-image: var(--ico-issues); }
#navbar a.item:not(.wyh-nav-item)[href*="pulls"]::before         { background-image: var(--ico-pulls); }
#navbar a.item:not(.wyh-nav-item)[href*="milestones"]::before    { background-image: var(--ico-milestones); }
#navbar a.item:not(.wyh-nav-item)[href*="repos"]::before         { background-image: var(--ico-repos); }
#navbar a.item:not(.wyh-nav-item)[href*="organizations"]::before { background-image: var(--ico-orgs); }
#navbar a.item:not(.wyh-nav-item)[href*="explore"]::before       { background-image: var(--ico-explore); }

/* 自定义菜单（模板内联 SVG）对齐 */
.wyh-nav-item { display: inline-flex !important; align-items: center; gap: 6px; }
.wyh-nav-ico { width: 15px; height: 15px; flex: 0 0 15px; opacity: .78; }
#navbar a.item:hover .wyh-nav-ico { opacity: 1; }
