.knowledge-graph-section {
  margin: 2rem auto;
  width: min(100%, 1120px);
}

.knowledge-graph-section[hidden] {
  display: none;
}

.kg-shell {
  border: 1px solid rgba(20, 33, 47, 0.14);
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 12px 30px rgba(20, 33, 47, 0.06);
  padding: clamp(1rem, 2vw, 1.35rem);
}

.kg-header {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.kg-eyebrow {
  margin: 0;
  color: #0f766e;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kg-header h2,
.kg-group h3 {
  margin: 0;
  color: #14212f;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0;
}

.kg-header h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.kg-groups {
  display: grid;
  gap: 1rem;
}

.kg-group {
  display: grid;
  gap: 0.65rem;
}

.kg-group h3 {
  font-size: 0.92rem;
  line-height: 1.25;
}

.kg-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kg-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.kg-item {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  border: 1px solid rgba(20, 33, 47, 0.12);
  border-radius: 10px;
  background: rgba(246, 241, 232, 0.55);
  color: #14212f;
  padding: 0.68rem 0.78rem;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.35;
  text-decoration: none;
}

.kg-item:hover,
.kg-item:focus-visible {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(237, 250, 245, 0.88);
  outline: none;
}

.kg-item-static {
  color: #536171;
}

.kg-item-label {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 750;
}

.kg-item-meta {
  overflow-wrap: anywhere;
  color: #627181;
  font-size: 0.76rem;
  font-weight: 650;
}

.kg-list-compact .kg-item {
  display: inline-flex;
  max-width: 100%;
  gap: 0.45rem;
  padding: 0.48rem 0.62rem;
}

.kg-list-compact .kg-item-meta {
  display: none;
}

@media (max-width: 760px) {
  .knowledge-graph-section {
    margin: 1.5rem auto;
  }

  .kg-shell {
    border-radius: 12px;
  }

  .kg-list-grid {
    grid-template-columns: 1fr;
  }
}
