/* Collapsible post listings (index.html) */

.post-group,
.post-subgroup {
    margin: 0;
    padding: 0;
}

.post-group > summary,
.post-subgroup > summary {
    cursor: pointer;
    list-style: none;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.post-group > summary:hover,
.post-subgroup > summary:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 0.2em;
}

.post-group > summary:focus-visible,
.post-subgroup > summary:focus-visible {
    outline: 2px dashed var(--foreground);
    outline-offset: 2px;
}

/* Hide native disclosure triangles (Chrome/Edge/Safari + Firefox). */
.post-group > summary::-webkit-details-marker,
.post-subgroup > summary::-webkit-details-marker {
    display: none;
}

/* Terminal-style open/close marker. */
.post-group > summary::before,
.post-subgroup > summary::before {
    content: "[+] ";
}

.post-group[open] > summary::before,
.post-subgroup[open] > summary::before {
    content: "[-] ";
}

/* Indent nested lists by a whole number of character cells. */
.post-group > ul,
.post-subgroup > ul {
    margin-left: 4ch;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

/* Keep the custom grid cursor visible over clickable summaries.
   Higher specificity than `.post-group > summary { cursor: pointer; }`
   so it wins without needing !important. */
html[data-cursor="custom"] summary {
    cursor: none;
}