/* IP 档案页（侧边栏核心页）：左档案列表 + 右编辑器 */
.ip-page { display: flex; flex-direction: column; }
.ip-page-head { margin-bottom: 18px; }
.ip-title { margin: 0 0 4px; font-size: 24px; color: var(--text); }
.ip-layout { display: flex; gap: 20px; align-items: flex-start; }
.ip-layout-single > .ip-side { display: none; }
.ip-layout-single > .ip-main { width: 100%; }
.ip-side {
  width: 264px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 26px;
}
.ip-card {
  border: 1px solid var(--line);
  background: var(--glass-2);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  font-family: inherit;
}
.ip-card:hover { border-color: var(--a1); color: var(--text); }
.ip-card.active { border-color: var(--a1); background: var(--a1-0); }
.ip-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
}
.ip-card.active .ip-card-name { color: var(--primary-deep); }
.ip-card-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-new-btn { width: 100%; margin-top: 2px; }
.ip-main { flex: 1; min-width: 0; }
.ip-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-soft);
  background: var(--glass-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.ip-editor-head .ip-editor-status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ip-editor-head.on { border-color: var(--teal-soft); background: var(--teal-soft); }
.ip-editor-head.on .ip-editor-status { color: var(--teal); font-weight: 600; }
.ip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); }
.ip-editor-head.on .ip-dot { background: var(--teal); }
.ip-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ip-more { position: relative; }
.ip-more > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.ip-more > summary::-webkit-details-marker { display: none; }
.ip-more-menu { position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; display: grid; min-width: 150px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-opaque); box-shadow: 0 12px 30px color-mix(in srgb,var(--theme-overlay) 28%,transparent); }
.ip-more-menu .btn { justify-content: flex-start; }
.ip-form-section { margin: 6px 0 12px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ip-form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.ip-form-section h4 { margin: 0; font-size: 14px; font-weight: 650; color: var(--text); }
.ip-form-section p { margin: 3px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.55; }
.ip-form .field textarea { min-height: 88px; line-height: 1.65; }
.ip-savebar { position: sticky; z-index: 25; bottom: 0; align-items: center; gap: 10px; margin: 18px -2px -4px; padding: 12px 2px 14px; border-top: 1px solid var(--line); background: var(--bg-page); }
.ip-savebar-hint { color: var(--text-2); font-size: 12px; line-height: 1.5; }
.ip-savebar .btn { min-height: 38px; }
@media (max-width: 700px) {
  .ip-savebar { flex-wrap: wrap; }
  .ip-savebar-hint { flex: 1 1 100%; }
  .ip-savebar .spacer { display: none; }
}
.ip-asset-chip { display: inline-flex; align-items: center; gap: 6px; }
.ip-asset-remove { cursor: pointer; font-size: 12px; opacity: .55; }
.ip-asset-remove:hover { opacity: 1; color: var(--danger, var(--theme-accent)); }
.ip-asset-picker { margin-top: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px; background: var(--glass-1, color-mix(in srgb,var(--theme-ink) 2%,transparent)); }
.ip-asset-picker .dock-search { margin-bottom: 8px; }
.ip-asset-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--text-2);
}
.ip-asset-row:hover { background: var(--glass-2); color: var(--text); }
.ip-asset-row .ip-asset-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-asset-row .wb-muted { flex-shrink: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-asset-list { max-height: 260px; overflow-y: auto; }
@media (max-width: 980px) {
  .ip-layout { flex-direction: column; }
  .ip-side { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .ip-card { flex: 1 1 180px; }
  .ip-new-btn { width: auto; }
}

/* 档案页标题沿用全局主题的显示字体。 */
html[data-theme="light"] .ip-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .045em;
}

.ip-page-head { margin-bottom: 40px; }
@media (max-width: 980px) {
  .ip-page-head { margin-bottom: 24px; }
}

/* 关键词词库 */
.kw-block { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 4px; background: var(--glass-2); }
.kw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kw-head span { font-size: 12px; color: var(--text-3); }
.kw-group { display: flex; gap: 8px; margin-bottom: 6px; align-items: flex-start; }
.kw-label { font-size: 11px; color: var(--text-3); padding-top: 4px; flex-shrink: 0; width: 34px; }
.kw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip {
  font-size: 11px;
  background: var(--a1-0);
  color: var(--primary-deep);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.kw-hint { font-size: 11px; color: var(--text-3); line-height: 1.6; }

