/* SchemaGuru demo: colours come from mkdocs-material's theme variables, so light and dark
   schemes both work; warning colours are chosen for contrast on both. */
#sg-demo {
  --sg-ok: #1b7f4b;
  --sg-warn: #b3261e;
  --sg-line: var(--md-default-fg-color--light);
  --sg-node: var(--md-default-bg-color);
}
[data-md-color-scheme="slate"] #sg-demo {
  --sg-ok: #5cd38f;
  --sg-warn: #ff8a80;
}
#sg-demo .sg-panel {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.4rem;
  padding: 0.6rem 1rem 1rem;
  margin: 1.2rem 0;
}
#sg-demo h2 { margin-top: 0.4rem; }
#sg-demo h3 { font-size: 0.8rem; margin: 0.6rem 0 0.3rem; }
#sg-demo .sg-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
#sg-demo .sg-form label { font-weight: 600; }
#sg-demo input[type="search"], #sg-demo select {
  font: inherit;
  padding: 0.35rem 0.5rem;
  min-width: 14rem;
  flex: 1 1 14rem;
  color: var(--md-default-fg-color);
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--light);
  border-radius: 0.2rem;
}
#sg-demo select { flex: 0 1 12rem; min-width: 9rem; }
#sg-demo .sg-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
#sg-demo .sg-chip {
  font: inherit;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  cursor: pointer;
  color: var(--md-default-fg-color);
  background: var(--md-default-fg-color--lightest);
  border: 1px solid transparent;
}
#sg-demo .sg-chip:hover, #sg-demo .sg-chip:focus-visible { border-color: var(--md-accent-fg-color); }
#sg-demo .sg-meta { font-size: 0.72rem; color: var(--md-default-fg-color--light); margin: 0.4rem 0; }
#sg-demo pre.sg-view {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.68rem;
  line-height: 1.45;
  max-height: 28rem;
  overflow: auto;
  padding: 0.6rem 0.8rem;
  background: var(--md-code-bg-color);
  color: var(--md-code-fg-color);
  border-radius: 0.2rem;
  margin: 0.3rem 0;
}
#sg-demo pre.sg-path { max-height: 10rem; }
#sg-demo :focus-visible { outline: 2px solid var(--md-accent-fg-color); outline-offset: 2px; }
#sg-demo .sg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 60em) { #sg-demo .sg-cols { grid-template-columns: 1fr; } }
#sg-demo .sg-graphwrap { overflow-x: auto; }
#sg-demo svg.sg-graph { width: 100%; min-width: 34rem; height: auto; display: block; }
#sg-demo .sg-edge { stroke: var(--sg-line); stroke-width: 1.6; }
#sg-demo .sg-edge.sg-attr { stroke-dasharray: 6 4; }
#sg-demo .sg-edge.sg-weak { stroke-dasharray: 2 3; }
#sg-demo .sg-edge.sg-on { stroke: var(--sg-ok); stroke-width: 3.5; }
#sg-demo .sg-edge.sg-blocked { stroke: var(--sg-warn); stroke-width: 3.5; }
#sg-demo .sg-arrowhead { fill: var(--sg-line); }
#sg-demo .sg-node { cursor: pointer; }
#sg-demo .sg-node circle {
  fill: var(--sg-node);
  stroke: var(--md-default-fg-color--light);
  stroke-width: 2;
}
#sg-demo .sg-node text { fill: var(--md-default-fg-color); font-size: 12px; }
#sg-demo .sg-node .sg-hubtag { font-size: 9px; font-weight: 700; }
#sg-demo .sg-node.sg-hub circle { stroke-width: 3.5; }
#sg-demo .sg-node.sg-end circle { stroke: var(--md-accent-fg-color); stroke-width: 4; }
#sg-demo .sg-node.sg-on circle { stroke: var(--sg-ok); stroke-width: 4; }
#sg-demo .sg-node.sg-blocked circle { stroke: var(--sg-warn); stroke-width: 5; }
#sg-demo .sg-node:focus-visible circle { stroke: var(--md-accent-fg-color); stroke-width: 5; }
#sg-demo .sg-node:focus { outline: none; }
