.tree-vertical{
  --spacing : 1.5rem;
  --radius  : 7px;
  --bottom  : 20px;
  text-align: left;
}

.tree-vertical li{
  display      : block;
  position     : relative;
  padding-left : calc(2 * var(--spacing) - var(--radius) - 2px);
}

.tree-vertical ul{
  margin-left  : calc(var(--radius) - var(--spacing));
  padding-left : 0;
}

.tree-vertical ul li{
  border-left : 2px solid #ddd;
  padding-bottom : var(--bottom);
}

.tree-vertical ul li:last-child{
  border-color : transparent;
}

.tree-vertical ul li::before{
  content      : '';
  display      : block;
  position     : absolute;
  top          : calc(var(--spacing) / -2);
  left         : -2px;
  width        : calc(var(--spacing) + 2px);
  height       : calc(var(--spacing) + 1px);
  border       : solid #ddd;
  border-width : 0 0 2px 2px;
}

.tree-vertical summary{
  display : block;
  cursor  : pointer;
  padding-bottom : var(--bottom);
}

.tree-vertical summary::marker,
.tree-vertical summary::-webkit-details-marker{
  display : none;
}

.tree-vertical summary:focus{
  outline : none;
}

.tree-vertical summary:focus-visible{
  outline : 1px dotted #000;
}

.tree-vertical li::after,
.tree-vertical summary::before{
  content       : '';
  display       : block;
  position      : absolute;
  top           : calc(var(--spacing) / 2 - var(--radius) + 1px);
  left          : calc(var(--spacing) - var(--radius) - 1px);
  width         : calc(2 * var(--radius));
  height        : calc(2 * var(--radius));
  border-radius : 50%;
  background    : #ddd;
}

.tree-vertical summary::before{
  z-index    : 1;
  background-color : #696;
}

.tree-vertical details[open] > summary::before{
  background-position : calc(-2 * var(--radius)) 0;
}
