#knowledge-graph {
  width: 100%;
  height: 420px;
  margin: 1.5rem 0 0.5rem;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

[data-md-color-scheme="slate"] #knowledge-graph {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="default"] #knowledge-graph {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

#knowledge-graph canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Claude Snippet Card ── */
/* .md-typeset prefix needed to override Material theme's div resets */
.md-typeset .claude-snippet {
  position: relative;
  margin: 1.8rem 0;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(135deg, #bb86fc, #03dac6, #ff7597, #ffd740, #82b1ff, #bb86fc) !important;
  background-size: 300% 300% !important;
  animation: snippet-gradient 8s ease infinite;
  overflow: hidden;
}

@keyframes snippet-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.claude-snippet__particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.claude-snippet__inner {
  position: relative;
  z-index: 2;
  border-radius: 12px;
  padding: 1.2rem 1.5rem 1.4rem;
}

[data-md-color-scheme="slate"] .claude-snippet__inner {
  background: #1e1e2e;
}

[data-md-color-scheme="default"] .claude-snippet__inner {
  background: #fafafa;
}

.claude-snippet__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

[data-md-color-scheme="slate"] .claude-snippet__header {
  color: #bb86fc;
}

[data-md-color-scheme="default"] .claude-snippet__header {
  color: #6200ea;
}

.claude-snippet__header svg {
  flex-shrink: 0;
}

.claude-snippet__desc {
  font-size: 0.82rem;
  margin: 0 0 0.8rem;
  opacity: 0.6;
}

.claude-snippet__code {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .claude-snippet__code {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-md-color-scheme="default"] .claude-snippet__code {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.claude-snippet__code pre {
  margin: 0;
  padding: 1rem 1.2rem;
  font-size: 0.78rem;
  line-height: 1.6;
  font-family: var(--md-code-font, "JetBrains Mono"), monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-md-color-scheme="slate"] .claude-snippet__code pre {
  color: rgba(255, 255, 255, 0.75);
}

[data-md-color-scheme="default"] .claude-snippet__code pre {
  color: rgba(0, 0, 0, 0.7);
}

.claude-snippet__copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
  z-index: 3;
}

[data-md-color-scheme="slate"] .claude-snippet__copy {
  background: rgba(187, 134, 252, 0.15);
  color: #bb86fc;
}

[data-md-color-scheme="slate"] .claude-snippet__copy:hover {
  background: rgba(187, 134, 252, 0.3);
}

[data-md-color-scheme="default"] .claude-snippet__copy {
  background: rgba(98, 0, 234, 0.08);
  color: #6200ea;
}

[data-md-color-scheme="default"] .claude-snippet__copy:hover {
  background: rgba(98, 0, 234, 0.16);
}

.claude-snippet__copy.copied {
  background: rgba(3, 218, 198, 0.2) !important;
  color: #03dac6 !important;
}

/* ── Contributors ── */
.ks-contributors {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.ks-contributor {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.3rem;
  border-radius: 12px;
  flex: 1;
  min-width: 240px;
  text-decoration: none !important;
  transition: all 0.25s;
}

[data-md-color-scheme="slate"] .ks-contributor {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-md-color-scheme="default"] .ks-contributor {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ks-contributor:hover {
  border-color: rgba(10, 102, 194, 0.5);
  transform: translateY(-1px);
}

.ks-contributor__icon {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.ks-contributor:hover .ks-contributor__icon {
  transform: scale(1.1);
}

.ks-contributor__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ks-contributor__name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

[data-md-color-scheme="slate"] .ks-contributor__name {
  color: rgba(255, 255, 255, 0.9);
}

[data-md-color-scheme="default"] .ks-contributor__name {
  color: rgba(0, 0, 0, 0.85);
}

.ks-contributor__role {
  font-size: 0.78rem;
  opacity: 0.5;
  font-weight: 400;
  line-height: 1.3;
}

[data-md-color-scheme="slate"] .ks-contributor__role {
  color: rgba(255, 255, 255, 0.6);
}

[data-md-color-scheme="default"] .ks-contributor__role {
  color: rgba(0, 0, 0, 0.5);
}
