.witness-demo .witness-panel-header,
.witness-demo .witness-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.witness-demo .witness-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.witness-demo .witness-animation-header {
  justify-content: space-between;
  margin-bottom: 8px;
}

.witness-demo .witness-animation-case {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.witness-demo .witness-cycle {
  margin: 0 0 4px;
  font-size: 13px;
}

.witness-demo :is(button, select) {
  min-height: 36px;
  padding: 4px 9px;
  border: 1px solid #8e98a8;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
}

.witness-demo button:not(:disabled) {
  cursor: pointer;
}

.witness-demo :is(button, select):disabled {
  opacity: 0.55;
}

.witness-demo .witness-step {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.witness-demo .witness-case-guide {
  margin-top: 8px;
  font-size: 14px;
}

.witness-demo .witness-case-guide summary {
  cursor: pointer;
}

.witness-demo .witness-case-guide p {
  margin: 6px 0;
}

.witness-demo .witness-pattern {
  display: flex;
  align-items: center;
  gap: 4px;
}

.witness-demo .witness-proof-text {
  block-size: 2.9em;
  margin: 4px 0 0;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.45;
}

.witness-demo .witness-equality-key {
  margin: 4px 0 0;
  font-size: 13px;
}

.witness-demo .witness-swatch {
  display: inline-block;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
}

.witness-demo .color-a { background: #34a853; }
.witness-demo .color-b { background: #4285f4; }
.witness-demo .color-c { background: #fbbc05; }

.witness-demo .witness-diagonal {
  stroke: #6b7280;
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.witness-demo svg {
  display: block;
  width: 100%;
  max-width: 100%;
}

.witness-demo .witness-node {
  transition: fill 160ms ease, stroke 160ms ease;
}

.witness-demo .witness-vertex-label {
  fill: #111111;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
}

.witness-demo .witness-equality-badge {
  pointer-events: none;
}

.witness-demo .witness-equality-badge circle {
  fill: #374151;
  stroke: #fff;
  stroke-width: 0.8;
}

.witness-demo .witness-equality-tag {
  fill: #fff;
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
}

.witness-demo .witness-error {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.witness-demo .witness-error:empty {
  display: none;
}

.witness-demo figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.witness-demo[data-phase="error"] svg {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .witness-demo .witness-node {
    transition: none;
  }
}
