[data-product-library] {
  overflow-wrap: anywhere;
}
.kb-summary {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  overflow: hidden;
}
.kb-summary .kb-brand,
.kb-stat {
  min-width: 0;
  padding: 15px 20px;
}
.kb-summary .kb-brand {
  margin: 0;
  background: var(--blue-soft);
}
.kb-brand select {
  min-width: 0;
  width: 100%;
}
.kb-stat {
  display: grid;
  gap: 3px;
  border-inline-start: 1px solid var(--line);
  color: var(--muted);
}
.kb-stat strong {
  color: var(--ink);
  font-size: clamp(20px, 2.4vw, 29px);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.kb-stat small {
  font-size: 12px;
  font-weight: 550;
}
.kb-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 2fr);
  align-items: start;
  gap: 16px;
  margin-top: 18px;
}
.kb-catalog,
.kb-detail {
  border: 1px solid var(--line);
  min-width: 0;
}
.kb-catalog-head {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.kb-catalog-head .field {
  margin: 8px 0 0;
}
.kb-catalog-head input {
  width: 100%;
}
.kb-items {
  padding: 6px;
  max-height: 510px;
  overflow-y: auto;
}
.kb-item {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: start;
  padding: 10px 12px;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
}
.kb-item span,
.kb-identity,
.kb-hint,
.kb-counter {
  color: var(--muted);
  font-size: 12px;
}
.kb-item:hover {
  background-color: var(--bg);
}
.kb-item[aria-pressed=true] {
  border-color: var(--line);
  background: var(--blue-soft);
  color: var(--blue);
}
.kb-detail-head {
  padding: 17px 20px 0;
}
.kb-line,
.kb-detail-foot,
.kb-actions,
.kb-result,
.kb-identity,
.kb-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.kb-line,
.kb-detail-foot {
  justify-content: space-between;
}
.kb-detail-head h2 {
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
}
.kb-identity {
  margin-top: 5px;
}
.kb-tabs {
  margin-top: 10px;
  column-gap: 14px;
}
.kb-tabs button {
  min-height: 42px;
  padding: 4px 2px 5px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}
.kb-tabs button[aria-pressed=true] {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 650;
}
.kb-panel {
  padding: 16px 20px;
  min-height: 200px;
  border-top: 1px solid var(--line);
}
.kb-panel .muted {
  margin-top: 5px;
}
.kb-profile,
.kb-image-editor {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: start;
  gap: 17px;
}
.kb-picture {
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: white;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
}
button.kb-picture:hover {
  border-color: var(--blue);
}
.kb-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.kb-fields {
  margin: 0;
}
.kb-fields > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 7px;
  padding-block: 5px;
}
.kb-fields dt {
  color: var(--muted);
}
.kb-fields dd {
  margin: 0;
  white-space: pre-wrap;
}
.kb-knowledge {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.kb-detail-foot {
  border-top: 1px solid var(--line);
  padding: 8px 20px;
  background: var(--bg);
}
.kb-result {
  border-radius: 8px;
  background: var(--blue-soft);
  padding: 10px 12px;
  color: var(--ink);
}
.kb-result > span {
  color: var(--muted);
}
.kb-scroll {
  margin-top: 10px;
}
.kb-scroll td,
.kb-scroll th {
  padding: 9px;
  vertical-align: top;
}
.kb-scroll td .button {
  margin-right: 6px;
}
.kb-pill {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
}
.kb-pill.success {
  background: #e7f3ec;
  color: #17664b;
}
.kb-pill.warning {
  background: #fff2da;
  color: #815010;
}
.kb-evidence {
  margin-top: 6px;
}
.kb-evidence summary,
.kb-form-details summary {
  color: var(--blue);
  cursor: pointer;
}
.kb-evidence ul {
  margin: 5px 0 0;
  padding-inline-start: 17px;
  font-size: 12px;
}
.kb-empty,
.kb-error {
  padding: 15px 17px;
  color: var(--muted);
}
.kb-error {
  margin-bottom: 10px;
}
.kb-error p {
  margin-bottom: 8px;
}
.kb-panel .kb-empty {
  padding-inline: 0;
}
.kb-hint {
  margin-top: 8px;
}
.kb-form-body {
  display: grid;
  gap: 12px;
}
.kb-form-body .field {
  min-width: 0;
  margin: 0;
}
.kb-form-body .field :is(input, select, textarea) {
  width: 100%;
}
.kb-form-body textarea {
  resize: vertical;
}
.kb-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kb-image-editor {
  grid-template-columns: 96px minmax(0, 1fr);
}
.kb-counter {
  margin-top: -10px;
  text-align: end;
}
.kb-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 13px;
  margin: 0;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.kb-checks legend {
  padding: 0 4px;
}
.kb-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.kb-form-details .field {
  margin-top: 9px;
}
@media (max-width: 1000px) {
  .kb-summary {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .kb-summary :nth-child(3),
  .kb-summary :nth-child(4) {
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 900px) {
  .kb-layout {
    grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1.7fr);
  }
  .kb-profile {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 9px;
  }
}
@media (max-width: 690px) {
  .kb-layout {
    grid-template-columns: 1fr;
  }
  .kb-items {
    max-height: 175px;
  }
  .kb-summary .kb-brand,
  .kb-stat,
  .kb-detail-head,
  .kb-panel,
  .kb-detail-foot {
    padding-inline: 12px;
  }
  .kb-scroll .data-table {
    min-width: 410px;
  }
  .kb-fields > div {
    grid-template-columns: 1fr;
    gap: 1px;
  }
  .kb-actions .button {
    min-height: 36px;
  }
}
