.html-forms-graph-demo,
.categorka-schema {
  --graph-node-height: 36px;
  width: 100%;
  overflow-x: auto;
  padding: 12px 0;
}

.html-forms-graph-demo__stage {
  position: relative;
  width: 100%;
  min-width: 1040px;
  height: 1000px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
}

.html-forms-graph-demo__svg {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.html-forms-graph-demo__line {
  stroke: #171717;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.html-forms-graph-demo__node {
  position: absolute;
  z-index: 1;
  display: flex;
  width: max-content;
  min-width: 54px;
  max-width: 190px;
  min-height: var(--graph-node-height);
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  transform: translate(-50%, -50%);
  border: 3px solid #171717;
  color: #171717;
  font: 700 18px/1.15 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.html-forms-graph-demo__node--green {
  min-height: 48px;
  background: #b8edb5;
  font-size: 17px;
}

.html-forms-graph-demo__node--answer {
  padding: 1px 10px;
}

.html-forms-graph-demo__node--answer form {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 2px !important;
  max-width: 100%;
}

.html-forms-graph-demo__node--answer .html-form-answer,
.html-forms-graph-demo__node--answer .new-html-form-answer,
.html-forms-graph-demo__node--answer .html-form-answer--solved,
.html-forms-graph-demo__node--answer .new-html-form-answer--solved {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.html-forms-graph-demo__node--answer .new-taskcard__answer {
  display: block !important;
}

.html-forms-graph-demo__node--answer .html-form-answer__form,
.html-forms-graph-demo__node--answer .new-html-form-answer__form {
  min-width: 0;
}

.html-forms-graph-demo__node--answer input {
  box-sizing: border-box;
  width: auto;
  min-width: 7ch;
  max-width: 100%;
  height: 30px;
  padding: 3px 5px;
  border: 1px solid #65736a;
  border-radius: 3px;
  background: #fff;
  color: #171717;
  font: 15px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 10%);
}

.html-forms-graph-demo__node--answer input:focus {
  outline: 2px solid #3977bd;
  outline-offset: 1px;
}

.html-forms-graph-demo__node--answer input::placeholder {
  color: #858c94;
  font-size: 13px;
  letter-spacing: -.04em;
  opacity: 1;
}

.html-forms-graph-demo__node--answer button.new-replacements-check-btn {
  flex: 0 0 auto;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--border, #c9cdd2);
  border-radius: var(--control-radius, 5px);
  background: var(--surface, #fff);
  color: var(--accent, #4d7e58);
  font-size: 18px;
  line-height: 1;
}

.html-forms-graph-demo__node--answer button.new-replacements-check-btn:hover {
  border-color: color-mix(in srgb, var(--accent, #4d7e58) 45%, var(--border, #c9cdd2));
  background: color-mix(in srgb, var(--accent, #4d7e58) 12%, var(--surface, #fff));
  color: var(--accent-hover, #315b3b);
}

.html-forms-graph-demo__node--answer .new-attempt-msg {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  width: max-content;
  min-width: 0 !important;
  transform: translateX(-50%);
  color: #8b2626;
  font: 12px/1.2 system-ui, sans-serif;
}

.html-forms-graph-demo__node--yellow {
  width: max-content;
  min-width: 54px;
  max-width: 170px;
  min-height: 40px;
  padding-inline: 10px;
  background: #fff0a6;
  font-size: 13.5px;
}

.html-forms-graph-demo__blank {
  color: #9299a1;
  font: 700 .8em/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 700px) {
  .html-forms-graph-demo__stage {
    margin-left: 0;
  }
}
