/*.tree {*/
/*    border: 1px solid gray;*/
/*}*/

/*.tree ul li{*/
/*    border: 1px solid green;*/
/*}*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: darkcyan;
    box-sizing: border-box;
    /*display: flex;*/
    /*justify-content: center;*/
    /*position: relative;*/
    font-family: "Artifakt Element", sans-serif;
    font-size: 1rem;
}

.tree-container {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.tree {
    --spacing: 1.8rem ;
    --radius: 10px;
    line-height: 1.8rem; /* line-height = --spacing */
}

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

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

.tree ul li{
    border-left: 2px dotted darkgray;
}

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

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

.tree summary {
    display: block;
    cursor: pointer;
}

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

.tree summary:focus {
    outline: none;
}

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

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

.tree summary::before {
    z-index: 1;
    background: darkgray url('expand-collapse.svg') -2px -2px; /* #696 */
}

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