.kb-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.kb-eyebrow {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7b6230;
}

.kb-hero-badge {
  display: grid;
  place-items: center;
  flex: 0 0 108px;
  width: 108px;
  height: 108px;
  border-radius: 28px;
  background: linear-gradient(145deg, #1db9d2 0%, #6d3ac6 100%);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 18px 32px rgba(67, 49, 12, 0.16);
}

.kb-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 16px;
}

.kb-sidebar-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.kb-article-list {
  display: grid;
  gap: 12px;
}

.kb-article-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.kb-article-card {
  display: block;
  position: relative;
  width: 100%;
  border: 1px solid #ecd98a;
  border-radius: 18px;
  background: #fffdf4;
  padding: 16px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.kb-article-card:hover,
.kb-article-card:focus-visible {
  transform: translateY(-1px);
  border-color: #d5b332;
  box-shadow: 0 14px 24px rgba(67, 49, 12, 0.12);
  outline: none;
}

.kb-article-card.is-active {
  border-color: #6d3ac6;
  background: #faf5ff;
  box-shadow: 0 0 0 3px rgba(109, 58, 198, 0.12);
}

.kb-article-card h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.3;
}

.kb-article-summary {
  margin: 10px 0 0;
  color: #4f5570;
  line-height: 1.5;
}

.kb-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.kb-document-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin: 14px 0 0;
  color: #6e6287;
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: right;
}

.kb-document-hint-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3ecff;
  color: #6a4aa1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kb-document-hint-value {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 760px) {
  .kb-article-card {
    padding-bottom: 52px;
  }

  .kb-document-hint {
    position: absolute;
    right: 16px;
    bottom: 14px;
    margin: 0;
  }
}

.kb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff3bf;
  color: #554005;
  font-size: 0.86rem;
  font-weight: 700;
}

.kb-chip-subtle {
  background: #f5f7fb;
  color: #6b7286;
  font-size: 0.78rem;
  font-weight: 600;
}

.kb-detail {
  min-width: 0;
  padding: 4px 0 2px;
}

.kb-empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  border: 1px dashed #e4cf79;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffef8 0%, #fff8da 100%);
  text-align: center;
  padding: 28px;
}

.kb-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.kb-detail-category {
  margin: 0 0 8px;
  color: #7b6230;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kb-detail-summary {
  margin: 16px 0 0;
  max-width: 56ch;
  padding: 14px 16px;
  border-left: 4px solid #e7c44a;
  border-radius: 0 16px 16px 0;
  background: #fff8df;
  color: #4a557a;
  line-height: 1.6;
  font-size: 1.02rem;
}

.kb-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: #1e1f24;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.kb-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin: 20px 0 10px;
}

.kb-article-shell {
  max-width: 100%;
}

.kb-article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 0;
}

.kb-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f7f1d7;
  color: #6f5a28;
  text-decoration: none;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(227, 192, 66, 0.45);
}

.kb-back-link:hover,
.kb-back-link:focus-visible {
  background: #f2e6b5;
  outline: none;
}

.kb-sharepoint-link {
  background: #f6f7fa;
  color: #6f7890;
  box-shadow: inset 0 0 0 1px rgba(180, 188, 207, 0.55);
}

.kb-sharepoint-link:hover,
.kb-sharepoint-link:focus-visible {
  background: #eceff5;
}

.kb-resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin: 28px 0 28px;
}

.kb-document-card {
  display: block;
  flex: 0 1 320px;
  min-width: 0;
  margin: 0;
  padding: 18px 20px 22px;
  border: 1px solid #eee2ae;
  border-radius: 22px;
  background: #fffdf3;
}

.kb-document-card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.kb-document-card-link:hover,
.kb-document-card-link:focus-visible {
  transform: translateY(-1px);
  border-color: #e4cb68;
  box-shadow: 0 10px 20px rgba(67, 49, 12, 0.08);
  outline: none;
}

.kb-document-label {
  margin: 0 0 10px;
  color: #8a6a28;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kb-document-copy h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kb-document-copy .muted {
  margin: 8px 0 0;
  color: #6e7390;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kb-document-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  margin-top: 18px;
  padding: 0 20px;
  border-radius: 999px;
  background: #ede6ff;
  color: #5d34a8;
  box-shadow: inset 0 0 0 1px rgba(109, 58, 198, 0.16);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.kb-document-button:hover,
.kb-document-button:focus-visible {
  background: #e5dbff;
  color: #4f2f98;
  outline: none;
}

.manager-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.manager-preview-toggle input {
  width: 18px;
  height: 18px;
}

.kb-rich-content {
  margin-top: 18px;
  color: #22263a;
  line-height: 1.7;
}

.kb-rich-content > :first-child {
  margin-top: 0;
}

.kb-rich-content a {
  color: #572ca3;
}

.kb-rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.kb-rich-content th,
.kb-rich-content td {
  padding: 10px 12px;
  border: 1px solid #e3d6a1;
  text-align: left;
  vertical-align: top;
}

.kb-rich-content th {
  background: #fff5ca;
}

@media (max-width: 900px) {
  .kb-filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .kb-hero,
  .kb-detail-header,
  .kb-sidebar-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .kb-hero-badge {
    width: 84px;
    height: 84px;
    flex-basis: 84px;
  }

  .kb-open-link {
    width: 100%;
  }

  .kb-resource-grid {
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
  }

  .kb-meta-row {
    justify-content: flex-start;
  }

  .kb-article-toolbar {
    justify-content: flex-start;
  }

  .kb-document-card {
    width: 100%;
    flex: none;
    padding: 16px 16px 18px;
  }

  .kb-document-copy h3 {
    font-size: 0.98rem;
  }

  .kb-document-copy .muted {
    font-size: 0.82rem;
  }

  .kb-document-button {
    width: 100%;
    justify-content: center;
    min-height: 56px;
    margin-top: 16px;
  }
}
