.category-sidebar,
.category-sidebar ul {
  list-style: none;
}

.category-sidebar li > :first-child + ul {
  position: relative;
  margin-inline-start: 0.75rem;
  padding-inline-start: 0.75rem;
  background-image: linear-gradient(90deg, #e5e7eb 1px, transparent 0);
  background-position: 0 6px;
  background-repeat: no-repeat;
  background-size: 1px calc(100% - 12px);
}

.category-sidebar li {
  overflow-wrap: break-word;
}

.category-sidebar li a,
.category-sidebar span {
  display: block;
  width: 100%;
  margin-block-start: 0.25rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  color: rgb(107, 114, 128);
  font-size: 0.875rem;
  text-align: left;
  text-decoration: none;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.category-sidebar li a:hover,
.category-sidebar span:hover {
  background-color: rgb(243 244 246);
  color: rgb(17 24 39);
}

.category-sidebar li.current > a {
  background-color: hsl(var(--hue-primary) var(--sat-primary, 100%) 97%);
  color: hsl(var(--hue-primary) var(--sat-primary, 100%) 50%);
  font-weight: 700;
}

.category-sidebar .category > span {
  position: relative;
}

.category-sidebar .category > span::after {
  content: "\f054";
  position: absolute;
  inset: 0;
  width: fit-content;
  height: fit-content;
  margin-block: auto;
  margin-inline-start: auto;
  margin-inline-end: 0.5rem;
  font-family: "Font Awesome 6 Pro";
  font-weight: 600;
  rotate: 90deg;
  transition: rotate 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.category-sidebar .category:not([data-expanded="true"]) > span::after {
  rotate: 0deg;
}

.category-sidebar .category:focus-within > span::after {
  rotate: 90deg;
}

.category-sidebar .category > span + ul {
  max-height: 1000px;
  transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.category-sidebar .category:not([data-expanded="true"]) > span + ul {
  max-height: 0;
}

.category-sidebar .category:focus-within > span + ul {
  max-height: 1000px;
}
