.slop-lint-demo {
  margin: 1.5rem 0;
  scroll-margin-top: 5rem;
  padding: clamp(0.75rem, 3vw, 1.25rem);
  border: 1px solid #475569;
  border-radius: 1rem;
  background: #101827;
  color: #eef2ff;
  font-size: 0.9375rem;
}

.slop-lint-demo figcaption {
  margin: 0 0 1rem;
  color: #cbd5e1;
  text-align: start;
}

.slop-lint-demo .slop-lint-demo__steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.slop-lint-demo__steps > li {
  --signal: #93c5fd;
  min-width: 0;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #475569;
  border-radius: 0.65rem;
  background: #182235;
}

.slop-lint-demo__steps > li:nth-child(2) {
  --signal: #fda4af;
}

.slop-lint-demo__steps > li:nth-child(3) {
  --signal: #86efac;
}

.slop-lint-demo__steps > li::marker {
  color: var(--signal);
}

.slop-lint-demo .slop-lint-demo__steps strong,
.slop-lint-demo .slop-lint-demo__steps code {
  color: #eef2ff;
}

.slop-lint-demo .slop-lint-demo__steps code {
  display: block;
  padding: 0.25rem 0;
  background: transparent;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.slop-lint-demo .slop-lint-demo__steps code span,
.slop-lint-demo__file {
  color: #bbc8db;
}

.slop-lint-demo .slop-lint-demo__steps code span {
  margin-inline-end: 0.5rem;
}

.slop-lint-demo__file {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.slop-lint-demo__error,
.slop-lint-demo__steps > li:first-child code b {
  color: #fda4af;
}

.slop-lint-demo__success,
.slop-lint-demo__steps > li:last-child code b {
  color: #86efac;
}

.slop-lint-demo button {
  min-height: 2.75rem;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #94a3b8;
  border-radius: 0.5rem;
  background: #202e45;
  color: #eef2ff;
  font: inherit;
  cursor: pointer;
}

.slop-lint-demo button:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.slop-notes-demo__window {
  overflow: hidden;
  margin-top: 0.5rem;
  border: 1px solid #64748b;
  border-radius: 0.5rem;
  background: #101827;
}

.slop-notes-demo__bar {
  padding: 0.35rem 0.65rem;
  background: #26354e;
}

.slop-notes-demo__outside {
  position: relative;
}

.slop-notes-demo__bar span {
  margin-inline-start: 0.5rem;
  color: #bfdbfe;
  font-size: 0.8125rem;
}

.slop-notes-demo__editor {
  margin: 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #64748b;
  border-radius: 0.3rem;
}

.slop-notes-demo li:first-child .slop-notes-demo__editor,
.slop-notes-demo__field {
  border-color: #93c5fd;
}

.slop-notes-demo__caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-inline-start: 2px;
  vertical-align: -0.12em;
  background: #bfdbfe;
}

.slop-notes-demo__caret--leaving {
  opacity: 0;
}

.slop-notes-demo__slash {
  display: inline-block;
}

.slop-notes-demo kbd {
  padding: 0.1em 0.35em;
  border: 1px solid #94a3b8;
  border-radius: 0.25em;
  background: #202e45;
  color: #eef2ff;
}

.slop-notes-demo__search {
  margin: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #64748b;
  border-radius: 0.4rem;
  background: #202e45;
}

.slop-notes-demo__field {
  margin-top: 0.25rem;
  padding: 0.25rem;
  border-width: 1px;
  border-style: solid;
  border-radius: 0.25rem;
  background: #101827;
}

@media (prefers-reduced-motion: no-preference) {
  #lint-demo.is-playing li:first-child code {
    animation: slop-lint-line 1.5s 0.25s backwards;
  }

  #lint-demo.is-playing li:nth-child(2) {
    animation: slop-lint-demo-highlight 1.3s 0.95s ease-out;
  }

  #lint-demo.is-playing .slop-lint-demo__error {
    animation: slop-demo-arrive 0.35s 0.95s backwards;
  }

  #lint-demo.is-playing li:last-child code b {
    animation: slop-demo-arrive 0.4s 2s backwards;
  }

  #lint-demo.is-playing li:last-child {
    animation: slop-lint-demo-highlight 1.35s 2.65s ease-out;
  }

  #lint-demo.is-playing .slop-lint-demo__success {
    animation: slop-demo-arrive 0.35s 2.65s backwards;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__slash {
    animation: slop-notes-demo-insert 0.6s step-end;
  }

  .slop-notes-demo.is-playing kbd {
    animation: slop-notes-demo-key 0.3s 0.6s;
  }

  .slop-notes-demo.is-playing li:nth-child(2) kbd {
    animation-delay: 2.25s;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__outside {
    animation: slop-notes-demo-focus 0.7s 1.45s;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__outside::after {
    position: absolute;
    top: 50%;
    left: 1.35rem;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #bfdbfe;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    content: "";
    animation: slop-notes-demo-click 0.55s 1.45s;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__editor--leaving {
    animation: slop-notes-demo-blur 0.2s 1.45s backwards;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__caret--leaving {
    animation: slop-notes-demo-caret-out 0.2s 1.45s backwards;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__search {
    animation: slop-demo-arrive 0.4s 2.25s backwards;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__field {
    animation: slop-notes-demo-field-focus 0.35s 2.65s backwards;
  }

  .slop-notes-demo.is-playing .slop-notes-demo__field .slop-notes-demo__caret {
    animation: slop-demo-arrive 0.2s 2.72s backwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slop-lint-demo button {
    display: none;
  }
}

@keyframes slop-lint-demo-highlight {
  0%, 72% {
    border-color: var(--signal);
    box-shadow: inset 0.25rem 0 var(--signal);
  }

  100% {
    border-color: #475569;
    box-shadow: inset 0 0 transparent;
  }
}

@keyframes slop-lint-line {
  0% { background-size: 0 100%; }
  38%, 76% { background-size: 100% 100%; }
  100% { background-size: 0 100%; }
}

#lint-demo li:first-child code {
  border-radius: 0.25rem;
  background-image: linear-gradient(#682e42, #682e42);
  background-repeat: no-repeat;
  background-size: 0 100%;
}

@keyframes slop-demo-arrive {
  from {
    opacity: 0;
    transform: translateY(0.25rem);
  }
}

@keyframes slop-notes-demo-insert {
  from {
    width: 0;
    visibility: hidden;
  }
}

@keyframes slop-notes-demo-key {
  0%, 65% {
    background: #bfdbfe;
    color: #101827;
  }
}

@keyframes slop-notes-demo-focus {
  0% { background: #26354e; }
  20%, 80% { background: #354f79; }
  100% { background: #26354e; }
}

@keyframes slop-notes-demo-click {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

@keyframes slop-notes-demo-blur {
  from { border-color: #93c5fd; }
}

@keyframes slop-notes-demo-caret-out {
  from { opacity: 1; }
}

@keyframes slop-notes-demo-field-focus {
  from { border-color: #64748b; }
}
