.ls-demo {
  display: grid;
  grid-template-columns: minmax(15rem,.75fr) minmax(0,1.25fr);
  gap: clamp(2rem,6vw,6rem);
  align-items: center;
  padding-block: clamp(4rem,8vw,7rem);
  color: var(--ink);
}

.ls-demo-intro {
  max-width: 30rem;
}

.ls-demo .ls-demo-overline,.ls-demo .ls-demo-source {
  color: #16747a;
  font: 650 .76rem/1.4 ui-monospace,monospace;
  letter-spacing: .08em;
}

.ls-demo .ls-demo-intro h2 {
  font: inherit;
  font-size: clamp(2rem,3.7vw,3.6rem);
  font-weight: 620;
  line-height: 1.045;
  letter-spacing: -.045em;
  margin: 1.1rem 0;
}

.ls-demo .ls-demo-intro p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.ls-demo-options {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.7rem;
}

.ls-demo-options button,.ls-demo-play {
  border: 1px solid #aabcbc;
  font: inherit;
  cursor: pointer;
  line-height: 1.3;
}

.ls-demo-options button {
  min-height: 44px;
  padding: .6rem .92rem;
  border-radius: 4rem;
  background: transparent;
  color: #1c3d49;
  font-size: .92rem;
  font-weight: 600;
}

.ls-demo-options button[aria-pressed="true"] {
  background: var(--nav);
  border-color: var(--nav);
  color: white;
}

.ls-demo-options button:hover:not([aria-pressed="true"]) {
  background: #e5eeee;
}

.ls-demo button:focus-visible {
  outline: 3px solid #d7a553;
  outline-offset: 3px;
}

.ls-demo .ls-demo-panel {
  padding: clamp(1.15rem,3vw,2.5rem);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: #f1f7f6;
  background: var(--nav);
  border-radius: 1rem;
}

.ls-demo-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.ls-demo .ls-demo-source {
  color: #add3cf;
  font-size: .78rem;
}

.ls-demo .ls-demo-panel h3 {
  margin: .4rem 0 0;
  color: #fff;
  letter-spacing: -.028em;
  font-size: clamp(1.4rem,2.3vw,2rem);
  font-weight: 600;
  line-height: 1.18;
}

.ls-demo-play {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: .48rem;
  padding: .5rem .72rem;
  min-height: 44px;
  border-radius: 1.5rem;
  color: #f0f9f8;
  border-color: #69818b;
  background: transparent;
  font-size: .875rem;
}

.ls-demo-play:hover {
  background: #26444f;
}

.ls-demo-play-glyph {
  display: block;
  width: .7rem;
  height: .8rem;
  background: linear-gradient(to right,#e1f5f0 33%,transparent 33%,transparent 67%,#e1f5f0 67%);
}

.ls-demo-play[data-state="play"] .ls-demo-play-glyph {
  background: #e1f5f0;
  clip-path: polygon(0 0,100% 50%,0 100%);
}

.ls-demo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  margin: 1.3rem 0 1.45rem;
  color: #ebf6f5;
  font-size: .88rem;
}

.ls-demo-legend span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.ls-demo-legend b {
  font-weight: 500;
}

.ls-demo-legend i {
  width: 1.25rem;
  border-top: 3px solid #64d8ce;
}

.ls-demo-legend span+span i {
  border-top: 3px dashed #efc176;
}

.ls-demo-axis-unit,.ls-demo-scale,.ls-demo-time {
  color: #b5cbd2;
  font: 500 .8rem/1.25 ui-monospace,monospace;
}

.ls-demo-plot {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  margin-top: .85rem;
}

.ls-demo-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: -.45rem .45rem 1.25rem 0;
  text-align: right;
}

.ls-demo-traces {
  min-width: 0;
}

.ls-demo svg {
  display: block;
  width: 100%;
  height: clamp(8.5rem,13vw,12rem);
  overflow: visible;
}

.ls-demo-grid,.ls-demo-line {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.ls-demo-grid {
  stroke: #36515c;
  stroke-width: 1;
}

.ls-demo-line {
  stroke-width: 2.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.ls-demo-line-one {
  stroke: #64d8ce;
}

.ls-demo-line-two {
  stroke: #efc176;
  stroke-dasharray: 5 5;
}

.ls-demo-time {
  display: flex;
  justify-content: space-between;
  margin-top: .65rem;
}

.ls-demo .ls-demo-panel figcaption {
  margin: 1.4rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid #3a5360;
  color: #cbdbdf;
  line-height: 1.55;
  font-size: .98rem;
}

.ls-demo .ls-demo-panel figcaption strong {
  display: block;
  color: #f2f6f5;
  font-size: 1.04rem;
  margin-bottom: .25rem;
}

.ls-demo [hidden] {
  display: none!important;
}

@media (max-width:780px) {
  .ls-demo {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .ls-demo-intro {
    max-width: 37rem;
  }
  .ls-demo-options {
    margin-top: 1rem;
  }
}

@media (max-width:350px) {
  .ls-demo-panel-top {
    align-items: flex-start;
    flex-direction: column;
  }
}
