:root {
  --demo-sidebar-width: 224px;
  --demo-sidebar-row-height: 32px;
  --demo-outline-row-height: 28px;
  --demo-sidebar-row-radius: 8px;
  --demo-cue-accent: #bbd0f8;
  --demo-cue-surface: rgba(235, 242, 255, 0.06);
  --demo-cue-highlight: rgba(202, 220, 255, 0.15);
}

@media (max-width: 1180px) {
  :root {
    --demo-sidebar-width: 208px;
  }
}

.traffic-lights {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.traffic-lights > span {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

.traffic-lights > span:nth-child(2) {
  background: #febc2e;
}

.traffic-lights > span:nth-child(3) {
  background: #28c840;
}

.demo-intro .demo-cues {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  flex-wrap: nowrap;
}

.demo-intro .demo-cues > :is(button, a) {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(202, 220, 255, 0.24);
  border-radius: var(--demo-sidebar-row-radius);
  background: var(--demo-cue-surface);
  color: #e5edfc;
  font: 650 0.78rem / 1.2 system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transform: none;
}

.demo-intro .demo-cues > :is(button, a):is(:active, .is-active, [aria-pressed="true"], :focus-visible) {
  border-color: var(--demo-cue-accent);
  background: var(--demo-cue-highlight);
  color: #fff;
}

.demo-intro .demo-cues > :is(button, a):focus-visible {
  outline: 2px solid var(--demo-cue-accent);
  outline-offset: 3px;
}

@media (hover: hover) {
  .demo-intro .demo-cues > :is(button, a):hover {
    border-color: var(--demo-cue-accent);
    background: var(--demo-cue-highlight);
    color: #fff;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .demo-intro .demo-cues > :is(button, a) {
    transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-intro .demo-cues > :is(button, a) {
    transition: none !important;
  }
}

@media (min-width: 761px) {
  .demo-shell .demo-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
  }

  .demo-intro > div:first-child {
    min-width: 0;
    flex: 1 1 24rem;
  }

  .demo-intro .demo-cues {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  .demo-intro .demo-cues {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.2rem;
  }

  .demo-intro .demo-cues > :is(button, a) {
    grid-column: span 4;
    min-height: 32px;
    padding: 0.18rem 0.2rem;
  }

  .demo-cues > :first-child:nth-last-child(4) {
    grid-column: 1 / -1;
  }

  .demo-cues:has(> :nth-child(7)) > :is(button, a) {
    grid-column: span 3;
  }

  .demo-cues:has(> :nth-child(7):last-child) > :nth-child(n + 5) {
    grid-column: span 4;
  }

  .demo-cues:has(> :nth-child(5):last-child) > :nth-child(n + 4) {
    grid-column: span 6;
  }
}
