.knowledge-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.knowledge-page-heading h3 {
  margin: 0 0 5px;
  font-size: 22px;
}

.knowledge-page-heading p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.knowledge-source-link {
  flex: 0 0 auto;
}

.knowledge-source-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.knowledge-source-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.knowledge-source-card.ready:hover,
.knowledge-source-card.ready:focus-visible,
.knowledge-source-card.active {
  border-color: var(--teal);
  box-shadow: 0 6px 18px rgba(0, 116, 105, .09);
}

.knowledge-source-card.pending {
  opacity: .62;
}

.knowledge-source-card > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.knowledge-source-card strong {
  font-size: 12px;
}

.knowledge-source-card small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.knowledge-source-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #e1f3ef;
  color: var(--teal);
  font-weight: 900;
}

.knowledge-source-state {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e9f4ef;
  color: #2b6a58;
  font-size: 9px;
  font-weight: 850;
}

.knowledge-search-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #bcded7;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(19, 151, 137, .11), transparent 32%),
    linear-gradient(135deg, #f9fdfc 0%, #f1f9f7 100%);
}

.knowledge-search-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 12px;
}

.knowledge-search-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.knowledge-search-heading h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.knowledge-search-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.knowledge-search-form {
  display: grid;
  grid-template-columns: minmax(190px, .55fr) minmax(330px, 1.45fr) auto;
  gap: 9px;
}

.knowledge-search-form select,
.knowledge-search-form input {
  min-width: 0;
  height: 41px;
}

.knowledge-quick-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.knowledge-quick-searches button {
  padding: 5px 9px;
  border: 1px solid #c9ddd8;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  color: #35635f;
  font-size: 10px;
  font-weight: 750;
}

.knowledge-quick-searches button:hover,
.knowledge-quick-searches button:focus-visible {
  border-color: var(--teal);
  background: white;
  color: var(--teal-dark);
}

.knowledge-privacy {
  margin: 9px 0 0;
  color: #687f7b;
  font-size: 10px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.knowledge-browse-panel {
  padding: 16px;
}

.knowledge-browse-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.knowledge-browse-heading h3 {
  margin: 0;
  font-size: 15px;
}

.knowledge-browse-heading > span {
  color: var(--muted);
  font-size: 10px;
}

.knowledge-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 9px;
}

.knowledge-section-card {
  display: grid;
  gap: 6px;
  min-height: 128px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdfc;
  color: var(--ink);
  text-align: left;
}

.knowledge-section-card:hover,
.knowledge-section-card:focus-visible {
  border-color: var(--teal);
  background: white;
}

.knowledge-section-card strong {
  font-size: 11px;
}

.knowledge-section-card span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.knowledge-section-card small {
  align-self: end;
  color: var(--teal);
  font-size: 9px;
  font-weight: 850;
}

.knowledge-empty {
  display: grid;
  gap: 5px;
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.knowledge-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.knowledge-answer {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #c9ded9;
  border-radius: 14px;
  background: white;
}

.knowledge-answer.loading {
  color: var(--muted);
  font-size: 11px;
}

.knowledge-answer-title,
.knowledge-answer-title > div,
.knowledge-answer footer {
  display: flex;
  align-items: center;
}

.knowledge-answer-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.knowledge-answer-title > div {
  gap: 8px;
}

.knowledge-answer-title strong {
  font-size: 12px;
}

.knowledge-answer-title small {
  color: var(--muted);
  font-size: 9px;
}

.knowledge-result-state {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e5f4ef;
  color: #17675e;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.knowledge-result-state.state-not_found,
.knowledge-result-state.state-unavailable,
.knowledge-result-state.state-out_of_scope {
  background: #fff1dc;
  color: #8a570b;
}

.knowledge-result-message {
  margin: 0 0 9px;
  color: #365754;
  font-size: 11px;
}

.knowledge-answer-section {
  margin-top: 8px;
  padding: 11px 12px;
  border-left: 3px solid var(--teal);
  border-radius: 0 9px 9px 0;
  background: #f5faf8;
}

.knowledge-answer-section header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.knowledge-answer-section header span {
  color: var(--teal);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.knowledge-answer-section h4 {
  margin: 0;
  font-size: 11px;
}

.knowledge-answer-section p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.58;
}

.knowledge-answer footer {
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.knowledge-answer footer div {
  display: grid;
  gap: 2px;
}

.knowledge-answer footer strong {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.knowledge-answer footer span {
  font-size: 10px;
}

@media (max-width: 900px) {
  .knowledge-page-heading,
  .knowledge-answer-title,
  .knowledge-answer footer {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-search-form {
    grid-template-columns: 1fr;
  }
}
