/* =========================================================
   list.css
   文書中の列挙と折りたたみ。
   ul / ol / li / details / summary / .list-pop
   パンくず・TOC・.section-list は別ファイル。
   ========================================================= */

/* ---------------------------------------------------------
   本文リスト
   左位置の最終調整は基準線が決まってから。
   --------------------------------------------------------- */
main ul,
main ol,
.content ul,
.content ol,
article ul,
article ol {
  margin: 0 0 1em 1.2rem;
  padding-left: 1.5rem;
}

main li,
.content li,
article li {
  margin: 0 0 0.35em;
  line-height: 1.7;
}

main ul ul,
main ol ol,
main ul ol,
main ol ul,
.content ul ul,
article ul ul {
  margin: 0.35em 0 0.5em;
}

/* ---------------------------------------------------------
   details
   素の折りたたみ。マーカーは残す。
   --------------------------------------------------------- */
details {
  margin: 0.8rem 0 1.2rem;
}

details > summary {
  cursor: pointer;
  font-weight: 650;
  line-height: 1.6;
}

details > *:not(summary) {
  margin-top: 0.6rem;
}

/* ---------------------------------------------------------
   .list-pop
   文中リンク風の details。
   summary を押すと下に一覧パネルが出る。
   --------------------------------------------------------- */
.list-pop {
  display: inline;
  margin: 10px 0;
  font-size: 0.9rem;
}

.list-pop > summary {
  display: inline;
  cursor: pointer;
  list-style: none;
}

.list-pop > summary::-webkit-details-marker,
.list-pop > summary::marker {
  display: none;
  content: "";
}

.list-pop > summary span {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.list-pop__panel {
  margin-top: 0.75rem;
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  border: 1px solid currentColor;
}

.list-pop__panel ul,
.list-pop__panel ol {
  list-style: none;        
  margin: 0;
  padding-left: 1.25rem;
}
