html {
  scroll-padding-top: 76px;
  --ml-header-bg: #0b6b78;
  --ml-accent: #0b6b78;
  --ml-accent-hover: #084f5a;
  --ml-title: #17343b;
  --ml-heading: #0b5d69;
  --ml-menu-hover-bg: rgba(11, 107, 120, 0.14);
  --ml-focus-ring: rgba(11, 107, 120, 0.28);
}

html[data-bs-theme="light"],
html[data-bs-theme="auto"] {
  --ml-header-bg: #0b6b78;
  --ml-accent: #0b6b78;
  --ml-accent-hover: #084f5a;
  --ml-title: #17343b;
  --ml-heading: #0b5d69;
  --ml-menu-hover-bg: rgba(11, 107, 120, 0.14);
  --ml-focus-ring: rgba(11, 107, 120, 0.28);
}

html[data-bs-theme="dark"] {
  --ml-header-bg: #0f6b3a;
  --ml-accent: #6ee7a2;
  --ml-accent-hover: #9af0bd;
  --ml-title: #f3f7f4;
  --ml-heading: #8ee6b1;
  --ml-menu-hover-bg: rgba(110, 231, 162, 0.18);
  --ml-focus-ring: rgba(110, 231, 162, 0.28);
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] {
    --ml-header-bg: #0f6b3a;
    --ml-accent: #6ee7a2;
    --ml-accent-hover: #9af0bd;
    --ml-title: #f3f7f4;
    --ml-heading: #8ee6b1;
    --ml-menu-hover-bg: rgba(110, 231, 162, 0.18);
    --ml-focus-ring: rgba(110, 231, 162, 0.28);
  }
}

body {
  font-size: 15px;
  line-height: 1.58;
}

a,
.bs-sidebar .nav > li > a,
.headerlink {
  color: var(--ml-accent);
}

a:hover,
a:focus,
.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus,
.headerlink:hover,
.headerlink:focus {
  color: var(--ml-accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ml-focus-ring);
  outline-offset: 2px;
}

.navbar {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.navbar.bg-primary {
  background-color: var(--ml-header-bg) !important;
  background-image: none !important;
}

.navbar .nav-link,
.navbar .navbar-brand {
  color: rgba(255, 255, 255, 0.92);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active,
.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus {
  color: #fff;
}

.navbar-brand {
  font-weight: 650;
}

[role="main"] {
  max-width: 980px;
  padding-bottom: 2rem;
}

[role="main"] h1 {
  margin: 0.4rem 0 0.9rem;
  color: var(--ml-title);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: 0;
}

[role="main"] h2 {
  margin: 2rem 0 0.65rem;
  padding-top: 0.25rem;
  color: var(--ml-heading);
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: 0;
}

[role="main"] h3 {
  margin: 1.35rem 0 0.45rem;
  color: var(--ml-heading);
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.dropdown-item.active,
.dropdown-item:active {
  color: #fff !important;
  background-color: var(--ml-header-bg) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--ml-accent-hover) !important;
  background-color: var(--ml-menu-hover-bg) !important;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  color: #fff !important;
  background-color: var(--ml-header-bg) !important;
}

[role="main"] p,
[role="main"] ul,
[role="main"] ol {
  margin-bottom: 0.85rem;
}

[role="main"] li {
  margin-bottom: 0.18rem;
}

[role="main"] li:last-child {
  margin-bottom: 0;
}

[role="main"] pre {
  margin: 0.9rem 0 1.1rem;
  border-radius: 6px;
}

[role="main"] code {
  font-size: 0.92em;
}

.bs-sidebar {
  font-size: 0.92rem;
}

.bs-sidebar .nav > li > a {
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
}

.admonition {
  margin: 1rem 0;
}

.theme-shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.05rem 0 1.35rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  cursor: zoom-in;
}

img.theme-shot-light {
  display: block !important;
}

img.theme-shot-dark {
  display: none !important;
}

html[data-bs-theme="light"] img.theme-shot-light {
  display: block !important;
}

html[data-bs-theme="light"] img.theme-shot-dark {
  display: none !important;
}

html[data-bs-theme="dark"] img.theme-shot-light {
  display: none !important;
}

html[data-bs-theme="dark"] img.theme-shot-dark {
  display: block !important;
}

@media (prefers-color-scheme: dark) {
  html[data-bs-theme="auto"] img.theme-shot-light {
    display: none !important;
  }

  html[data-bs-theme="auto"] img.theme-shot-dark {
    display: block !important;
  }
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.78);
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox img {
  max-width: min(100%, 1600px);
  max-height: 100%;
  border-radius: 8px;
  background: var(--bs-body-bg);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}

.image-lightbox__close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.image-lightbox__close::before,
.image-lightbox__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  content: "";
  transform-origin: center;
}

.image-lightbox__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.image-lightbox__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.image-lightbox__close:hover,
.image-lightbox__close:focus {
  background: var(--ml-header-bg);
  border-color: rgba(255, 255, 255, 0.42);
  transform: scale(1.04);
}

@media (max-width: 767.98px) {
  body {
    font-size: 14.5px;
  }

  [role="main"] h1 {
    font-size: 2rem;
  }

  [role="main"] h2 {
    margin-top: 1.6rem;
    font-size: 1.32rem;
  }

  .image-lightbox {
    padding: 12px;
  }
}
