
/* ===== Sticky RIGHT-SIDEBAR TOC (with custom class "on-this-page") ===== */

/* Make the right column behave */
body:not(.editor) .wiki-content .columnLayout .cell.right {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: visible !important;
}

/* Style the TOC with sticky + floating card look */
body:not(.editor) .on-this-page {
  position: sticky !important;
  top: 40px !important;                     /* adjust to your header height */
  max-height: calc(100vh - 50px) !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 8px 10px !important;

  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Add faux header */
body:not(.editor) .on-this-page::before {
  content: "On this page";
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  border-bottom: 1px solid #eef1f6;
  padding-bottom: 4px;
  font-size: 0.9rem;
  color: #333;
}

/* TOC list formatting */
body:not(.editor) .on-this-page ul {
  list-style: none;
  margin: 0;
  padding-left: 12px !important;
}
body:not(.editor) .on-this-page li {
  margin: 3px 0;
  line-height: 1.35;
}
body:not(.editor) .on-this-page a {
  text-decoration: none;
  color: #0052cc;
}
body:not(.editor) .on-this-page a:hover {
  text-decoration: underline;
}

/* Hide on smaller screens */
@media (max-width: 1024px) {
  body:not(.editor) .on-this-page { display: none !important; }
}


