.laplab-toc {
  padding: 1.5rem;
  background: var(--laplab-toc-bg, #eaf8fd);
  border-radius: 1rem;
  color: var(--laplab-toc-color, inherit);
}

.laplab-toc .manual-toc-title {
  margin-bottom: 1rem;
  font-weight: 700;
}

.laplab-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.laplab-toc li {
  margin-bottom: 0.5rem;
}

.laplab-toc a {
  color: var(--laplab-toc-link-color, inherit);
  text-decoration: none;
}

.laplab-toc a:hover {
  text-decoration: underline;
}

.laplab-toc > ol > .toc-h2 {
  margin-bottom: 1rem;
  font-weight: 700;
}

.laplab-toc .toc-h3,
.laplab-toc .toc-h4,
.laplab-toc .toc-h5,
.laplab-toc .toc-h6 {
  margin-top: 0.35rem;
}

.laplab-toc ol ol {
  margin-top: 0.5rem;
}

.laplab-toc a {
  display: inline-block;
}

.laplab-toc [id] {
  scroll-margin-top: var(--laplab-toc-offset, 0px);
}

/* Ensure page headings receive the same scroll offset so fragment links
   land below fixed headers. Targets headings with id attributes. */
h2[id],
h3[id],
h4[id],
h5[id],
h6[id] {
  scroll-margin-top: var(--laplab-toc-offset, 0px);
}
