.ml-knowledge-graph {
  margin: 2rem auto 1.5rem;
  max-width: 1100px;
  padding: 0 1rem;
}
.ml-knowledge-graph__panel {
  background: linear-gradient(155deg, #1a1a2e 0%, #1e1b4b 45%, #312e81 100%);
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(80, 140, 255, 0.08),
    0 20px 50px rgba(124, 58, 237, 0.22);
}
.ml-knowledge-graph__head {
  padding: 1.15rem 1.35rem 0.85rem;
  border-bottom: 1px solid rgba(192, 132, 252, 0.15);
}
.ml-knowledge-graph__head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  background: linear-gradient(90deg, #508cff, #c084fc, #fde047);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ml-knowledge-graph__head p {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.5;
}
.ml-knowledge-graph__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.ml-knowledge-graph__legend span {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}
.ml-knowledge-graph__legend .leg-hub { background: #7c3aed; }
.ml-knowledge-graph__legend .leg-game { background: #508cff; }
.ml-knowledge-graph__legend .leg-decision { background: #f59e0b; color: #1f2937; }
.ml-knowledge-graph__legend .leg-features { background: #14b8a6; }
.ml-knowledge-graph__legend .leg-ml { background: #a855f7; }
.ml-knowledge-graph__legend .leg-rl { background: #f43f5e; }
.ml-knowledge-graph__legend .leg-future { background: #06b6d4; }
.ml-knowledge-graph__legend .leg-legacy { background: #64748b; }
.ml-knowledge-graph__frame {
  position: relative;
  width: 100%;
  height: min(72vh, 620px);
  min-height: 440px;
  background: #1a1a2e;
}
.ml-knowledge-graph__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 640px) {
  .ml-knowledge-graph { padding: 0 0.75rem; }
  .ml-knowledge-graph__frame {
    height: min(65vh, 500px);
    min-height: 380px;
  }
}
