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

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

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

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

.tree {
    --spacing: 2.2rem ;
    --radius: 10px;
    line-height: 1.6rem; /* 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;
}

/* plus/minus box for expandable nodes */
.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));
    background: #5a0909 url('expand-collapse.svg') -2px -2px;
}

/* Leaf lists = ULs whose direct LIs do NOT contain <details> */
.tree ul:not(:has(> li > details)) > li::after {
    content: '';
    display: block;
    position: absolute;

    /* vertically center the hollow square in the row */
    top: calc(var(--spacing) / 2 - var(--radius) + 1px);

    /* align square’s LEFT edge with the END of the pink bar
       (bar right edge is -1.5px + var(--spacing)) */
    left: calc(var(--spacing) - 1.5px);

    width: calc(1.2 * var(--radius));
    height: calc(1.2 * var(--radius));

    background: transparent;
    border: 2px solid #afb5ba;  /* hollow outline */
}

/* optional hover highlight for leaf nodes */
.tree ul:not(:has(> li > details)) > li:hover::after {
    border-color: #ffffff;
}


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

/* 1st-level headings like "The Road Map" */
.tree > li > details > ul > li > details > summary {
    margin: 0.25rem 0;      /* ⬅ no left/right margin */
    padding: 0.2rem 0.8rem;      /* horizontal only, no vertical padding */
    border-radius: 10px;
    background-color: #07052e;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 0.98rem;
    width: fit-content;
    transition:
        background-color 0.15s ease-out,
        box-shadow 0.15s ease-out;
}

/* 2nd-level headings like "Level 1", "Level 2", etc. */
.tree > li > details > ul > li > details > ul > li > details > summary {
    display: inline-block;
    margin: 0.25rem 0;      /* ⬅ no left/right margin */
    padding: 0.2rem 0.7rem;      /* horizontal only */
    border-radius: 8px;
    background-color: #0c1158;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 0.93rem;
    width: fit-content;
    transition:
        background-color 0.15s ease-out,
        box-shadow 0.15s ease-out;
}

.tree ul:has(> li.done > a):not(:has(> li > details)) {
  /* margin: 0.5rem 0; */
  line-height: 2rem;
}

/* Leaf links (new-style) on dark background #0e3959 */
.tree li.done > a {
  color: #afb5ba;           /* normal */
  text-decoration: none;
  font-weight: 500;         /* optional: makes them feel like real actions */
}

.tree li.done > a:hover,
.tree li.done > a:focus-visible {
  color: #ffffff;           /* brighter on hover/focus */
  text-decoration: underline;
}

.tree li.done > a:visited {
  color: #a9c7ff;           /* softer blue for visited links */
}

.tree li.done > a:active {
  color: #d2e6ff;           /* tiny dim on click */
}

/* Extra space under "The Road Map" */
.tree > li > details > summary h3 {
    margin-bottom: 1.2rem;
}

/* Hover and open effects for 1st-level headings */
.tree > li > details > ul > li > details > summary:hover,
.tree > li > details > ul > li > details[open] > summary {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.tree > li > details > ul > li > details > ul > li > details > summary:hover,
.tree > li > details > ul > li > details > ul > li > details[open] > summary {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* Extra top spacing before the FIRST leaf item in each leaf UL */
.tree ul:not(:has(> li > details)) > li:first-child {
  margin-top: 0.4rem;  /* tweak this value to taste */
}

/* Extra bottom spacing before the LAST leaf item in each leaf UL */
.tree ul:not(:has(> li > details)) > li:last-child {
  margin-bottom: 0.4rem;  /* tweak this value to taste */
}

/* Add spacing before the FIRST item inside each 2nd-level group */
.tree > li > details > ul > li > details > ul > li:first-child {
  margin-top: 0.4rem;   /* adjust to taste */
}



