:root{--accent:#86a8ff;--accent-2:#3559b8;--window:#eef1f8;--window-2:#dfe7f7}
.bookmarks-layout{align-items:start}
.bookmarks-main{order:1}
.bookmarks-sidebar{order:2;position:sticky;top:14px;align-self:start}
.bookmark-stats .cell strong{font-family:var(--font-ui);font-size:.78rem;text-transform:uppercase;letter-spacing:.05em}
.bookmark-window{scroll-margin-top:20px}
.bookmark-toc,.bookmark-list{list-style:none;padding:0;margin:0}
.bookmark-toc li,.bookmark-list > li{border-top:1px solid rgba(0,0,0,.16);padding:10px 0}
.bookmark-toc li:first-child,.bookmark-list > li:first-child{border-top:none;padding-top:0}
.bookmark-toc a,.bookmark-list a{text-decoration:none}
.bookmark-toc a:hover,.bookmark-list a:hover{background:color-mix(in srgb, var(--accent) 18%, white)}
.bookmark-toc span{display:block;color:var(--muted);font-size:.85rem;margin-top:2px}
.bookmark-list strong{font-family:var(--font-ui)}

/* collapsible folders */
.bookmark-folder{margin:0}
.bookmark-folder > summary{list-style:none;cursor:pointer}
.bookmark-folder > summary::-webkit-details-marker{display:none}
.bookmark-folder__label{
  display:flex;
  align-items:center;
  gap:8px;
  width:fit-content;
  max-width:100%;
  margin:0 0 4px 0;
  padding:2px 8px 2px 6px;
  border:1px solid var(--accent-2);
  background:linear-gradient(180deg, #f8fbff 0%, #dfe9ff 100%);
  box-shadow:2px 2px 0 rgba(53,89,184,.18);
  text-transform:lowercase;
  user-select:none;
}
.bookmark-folder__label::before{
  content:"+";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.05rem;
  height:1.05rem;
  border:1px solid currentColor;
  background:#fff;
  font-size:.9rem;
  line-height:1;
  font-weight:700;
  flex:0 0 auto;
}
.bookmark-folder[open] > .bookmark-folder__label::before{content:"−"}
.bookmark-folder__label:hover,
.bookmark-folder > summary:focus-visible{
  background:linear-gradient(180deg, #ffffff 0%, #cfe0ff 100%);
  outline:none;
}
.bookmark-list > li > .bookmark-folder > .bookmark-folder__label{
  border-width:1px;
  box-shadow:none;
}
.bookmark-list > li > .bookmark-folder > .bookmark-folder__label .bookmark-folder__text{
  font-family:var(--font-ui);
  font-weight:700;
}

/* nested folder hierarchy */
.bookmark-list--nested{
  list-style:none;
  margin:10px 0 0 0;
  padding:10px 0 0 18px;
  border-left:2px solid var(--accent-2);
  background:linear-gradient(to right, color-mix(in srgb, var(--accent) 8%, white), transparent 28%);
}
.bookmark-list--nested > li{
  position:relative;
  padding:8px 0 0 10px;
}
.bookmark-list--nested > li::before{
  content:"";
  position:absolute;
  left:-2px;
  top:18px;
  width:8px;
  height:1px;
  background:var(--accent-2);
}
.bookmark-list--nested > li > a{
  display:inline-block;
  padding:1px 3px;
}
.bookmark-list--nested > li:has(> ul),
.bookmark-list--nested > li:has(> details){
  margin-bottom:6px;
}
.bookmark-list > li > strong{
  display:inline-block;
  padding:1px 4px;
  border-bottom:2px solid var(--accent-2);
}

@media (max-width: 900px){
  .bookmarks-main,.bookmarks-sidebar{order:initial}
  .bookmarks-sidebar{position:static}
}
