/* 经验库页（2026-09-21）：规矩 + 案例。卡片、标签、原话块沿用日报页 report.css 的样式 */
#pb-search { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff; min-width: 220px; font: inherit; font-size: 13px; }
.pb-check { font-size: 12px; color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; }
#pb-scenes { margin: 0 0 12px; }
.pb-list { display: grid; gap: 10px; }
.pb-rule { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; scroll-margin-top: 16px; }
.pb-rule.hit { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.pb-rule.archived { opacity: .6; }
.pb-rule > header { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.pb-rule > header b { font-size: 15px; }
.pb-rule > header .pb-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.pb-rule > p { margin: 5px 0 0; font-size: 14px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; }
.pb-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pb-cases { margin-top: 9px; padding-top: 7px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.pb-cases > small { font-size: 11px; color: var(--muted); }
.pb-case { background: var(--canvas); border-radius: 8px; padding: 6px 10px; }
.pb-case-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pb-case p { margin: 3px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.pb-admin { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 9px; font-size: 12px; color: var(--ink-2); }
.pb-admin label { display: inline-flex; gap: 4px; align-items: center; }
.pb-edit { display: grid; gap: 7px; margin-top: 8px; }
.pb-edit input, .pb-edit textarea, .pb-edit select { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 13px; }
.pb-empty { background: #fff; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.8; }

/* 待采纳的候选规矩：比正式规矩浅一档，强调「还没进库」 */
.pb-cand { border-style: dashed; }
.pb-cand-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pb-cand-cases:not([hidden]) { margin-top: 10px; display: grid; gap: 8px; }   /* display:grid 会盖掉 hidden，要加这个 :not */
.pb-cand-edit { margin-top: 10px; }
.pb-cand-edit[hidden], .pb-cand-cases[hidden] { display: none; }   /* .pb-edit 的 display 会盖掉 hidden 属性 */
.pb-cand-tracks { margin: 0 0 14px; }

/* 分类筛选（2026-09-21）：四根轴叠着筛，按钮上的数字是「点下去会剩几条」，在前端按当前筛选实时算 */
.pb-facets { display: grid; gap: 6px; margin: 0 0 12px; }
.pb-facet { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.pb-facet-name { font-size: 11px; color: var(--muted); min-width: 30px; flex: 0 0 auto; }
.pb-facet button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px;
  font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; line-height: 1.6; }
.pb-facet button:hover { border-color: var(--line-strong); }
.pb-facet button.active { background: var(--green); border-color: var(--green); color: #fff; }
.pb-facet-main button { font-size: 13px; padding: 4px 12px; }
.pb-facet-foot { border-top: 1px dashed var(--line); padding-top: 7px; margin-top: 2px; }

/* 规矩 / 候选卡片上的小标签：只是给眼睛看的，点筛选还是用上面那排 */
.pb-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.pb-tag { font-size: 11px; color: var(--muted); background: var(--canvas); border-radius: 5px; padding: 1px 7px; }
.pb-tag.move { color: var(--green); background: rgba(22, 120, 80, .08); }
.pb-tag.prod { color: var(--ink-2); }
.pb-tag.cost { color: var(--danger-fg); background: var(--danger-bg); }   /* 2026-09-21 换成 token：tests/test_ui_standard.py 不许裸色值 */

/* 具体三栏（2026-09-28）：工厂特点 / 产品知识 / 踩过的坑，app/playbook_specific.py */
[hidden] { display: none !important; }
.pb-ai { line-height: 1.7; }
.pb-ai .tag { margin-right: 4px; }
.pb-stories { margin-top: 8px; }
.pb-sp-name { font-size: 13px; color: var(--ink-2); }
.pb-sp-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pb-sp-list li { border-top: 1px solid var(--line); padding-top: 6px; }
.pb-sp-list li:first-child { border-top: 0; padding-top: 0; }
.pb-sp-line { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.pb-sp-line .d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pb-sp-line .rpt-actions { margin-left: auto; }
.pb-sp-case { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin: 2px 0 0 22px; }
.pb-dot { display: inline-block; width: 16px; text-align: center; color: var(--muted); }
.pb-sp-more { font: inherit; font-size: 12px; background: none; border: 0; color: var(--green); cursor: pointer; padding: 6px 0 0; }
.pb-pit-steps { display: grid; grid-template-columns: 4.5em 1fr; gap: 3px 8px; margin: 8px 0 0; font-size: 14px; line-height: 1.6; }
.pb-pit-steps dt { color: var(--muted); font-size: 12px; padding-top: 2px; }
.pb-pit-steps dd { margin: 0; color: var(--ink-2); }
.pb-pit-steps dd.do { color: var(--ink); font-weight: 600; }
/* 2026-10-10 工厂和产品合在一张卡：工厂这边 / 这家的产品（按型号一块） */
.pb-sp-sub { font-size: 12px; color: var(--text-muted); margin: 8px 0 2px; }
.pb-sp-prod { border-left: 2px solid var(--border-subtle); padding-left: 10px; margin: 6px 0; }
.pb-sp-ph { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pb-sp-guide { margin-left: auto; font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.pb-sp-guide:hover { text-decoration: underline; }
/* 2026-10-11 工厂和产品看图就懂（老板：「搭配一些图……不要让大家去理解这些文字」）：
   顶上产品小图 + 红绿条；工厂这边分 要当心 / 做得好 / 要知道 三块，每条只露一句、点开看经过；产品配主图 */
.pb-fc header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pb-fc-name { font-size: 17px; }
.pb-fc-thumbs { display: inline-flex; gap: 4px; }
.pb-fc-thumbs img { width: 34px; height: 34px; object-fit: contain; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
.pb-fc-bar { display: inline-flex; width: 120px; height: 8px; border-radius: var(--radius-full); overflow: hidden; background: var(--surface-sunken); gap: 2px; }
.pb-fc-bar i { display: block; min-width: 6px; }
.pb-fc-bar i.b { background: var(--r-600); }
.pb-fc-bar i.g { background: var(--g-500); }
.pb-fc-n { display: inline-flex; gap: 8px; font-size: 13px; white-space: nowrap; }
.pb-fc-n em { font-style: normal; font-weight: 600; }
.pb-fc-n em.b { color: var(--danger-fg); }
.pb-fc-n em.g { color: var(--success-fg); }
.pb-fc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.pb-fc-col { border-radius: var(--radius-md); padding: 8px 10px 6px; border: 1px solid var(--border-subtle); }
.pb-fc-col.bad { background: var(--danger-bg); border-color: var(--danger-border); }
.pb-fc-col.good { background: var(--success-bg); border-color: var(--success-border); }
.pb-fc-col.note { background: var(--warning-bg); border-color: var(--warning-border); }
.pb-fc-col h4 { margin: 0 0 4px; font-size: 13px; white-space: nowrap; }
.pb-fc-col h4 span { font-weight: 400; color: var(--text-muted); margin-left: 2px; }
.pb-fc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pb-fc-t { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: flex-start; gap: 6px; padding: 5px 4px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; line-height: 1.45; }
.pb-fc-t:hover { background: var(--surface-hover); }
.pb-fc-t .t { flex: 1; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pb-fc-it.open .pb-fc-t .t { display: block; }
.pb-fc-t .d { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.pb-fc-k { flex: none; width: 20px; text-align: center; }
.pb-fc-more { margin: 0 4px 6px 30px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.pb-fc-more p { margin: 0 0 4px; }
.pb-fc-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pb-fc-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pb-fc-prod { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 8px; background: var(--surface); }
.pb-fc-ph { display: flex; align-items: center; gap: 8px; }
.pb-fc-ph > div { flex: 1; min-width: 0; }
.pb-fc-ph b { display: block; font-size: 14px; }
.pb-fc-ph small { display: block; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-fc-ph img, .pb-fc-ph .ph { flex: none; width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-sunken); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.pb-fc-prod .pb-fc-t { font-size: 13px; }
.pb-fc-prod .pb-fc-t .t { font-weight: 400; }
@media (max-width: 640px) { .pb-fc-bar { width: 80px; } .pb-fc-thumbs { display: none; } }
