/* --- collapsible sections (things.org / loose.org) --- */

/* summary: clickable marker + inline headings */
summary {
  display: list-item;
  align-items: baseline;
  cursor: pointer;
  list-style-position: inside;
  background: linear-gradient(90deg, #eee, #fff);
  padding-right: .8em;
}
summary:hover {
  background: linear-gradient(90deg, #ecc, #fee);
}
summary:has(:target) {
  background: linear-gradient(90deg, #ffc, #fcc);
}
summary h1, summary h2, summary h3, summary h4, summary h5, summary h6 {
  display: inline;
  margin: 0;
}

/* bordered boxes around each heading section */
.outline-container {
  border: 1px solid #ccc;
  border-radius: .3em;
  padding: .6em;
  margin-bottom: .8em;
}
.outline-text {
  margin-left: 1.4em;
}

/* indentation for nested levels */
.outline-3 { margin-left: 1.4em; }
.outline-4 { margin-left: 2.8em; }
.outline-5 { margin-left: 4.2em; }

/* ToC nested lists (things.org) */
#text-table-of-contents li:has(li) {
  list-style: none;
  margin-left: -1em;
}

/* keep a details that targets a heading open on page load */
details:has(summary > :target)::details-content {
  content-visibility: visible;
}

/* bottom spacing */
div:last-of-type { margin-bottom: 1em; }
body { margin-bottom: 50vh; }
