/* ===== PATCH: Right rail / "On this Page" panel ===== */

/* Container background + border */
:where(.vp-right-rail, .vp-on-this-page, .vp-article__toc, .vp-toc,
       aside[aria-label="On this Page"], nav[aria-label="On this Page"],
       nav[aria-label="Table of contents"], [role="complementary"]) {
  background-color: #FFF4EA !important;
  border: 1px solid #E5D8CC !important;
  box-shadow: none !important;
  color: #101113 !important;
}

/* Force all text inside to be dark */
:where(.vp-right-rail, .vp-on-this-page, .vp-article__toc, .vp-toc,
       aside[aria-label="On this Page"], nav[aria-label="On this Page"],
       nav[aria-label="Table of contents"], [role="complementary"]) * {
  color: #101113 !important;
}

/* Title */
:where(.vp-toc__title, aside[aria-label="On this Page"] h2,
       nav[aria-label="On this Page"] h2) {
  color: #101113 !important;
  font-weight: 600;
}

/* Links */
:where(.vp-toc a, .vp-toc__link,
       aside[aria-label="On this Page"] a,
       nav[aria-label="On this Page"] a) {
  color: #0C2F66 !important;
  text-decoration: none !important;
}
:where(.vp-toc a:hover, .vp-toc__link:hover,
       aside[aria-label="On this Page"] a:hover) {
  text-decoration: underline !important;
}

/* Active/selected item */
:where(.vp-toc__link--active, .is-active, .active) {
  color: #101113 !important;
  border-left: 3px solid #E1CDBE !important;
  background: transparent !important;
}

/* Cards that sometimes wrap TOC in some themes */
.vp-right-rail .vp-card,
.vp-on-this-page .vp-card {
  background-color: #FFF4EA !important;
  border: 1px solid #E5D8CC !important;
  box-shadow: none !important;
  color: #101113 !important;
}
