.site-header--enhanced {
  position: relative;
  isolation: isolate;
}

.site-header--enhanced::before {
  content: "";
  position: absolute;
  inset: -20% 18% auto;
  height: 72px;
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, rgba(182, 149, 106, 0.22), rgba(182, 149, 106, 0));
  filter: blur(16px);
  opacity: 0.7;
  z-index: -1;
}

shared-header + a + main[class*="pt-10"] {
  padding-top: 4.5rem;
}

@media (max-width: 767px) {
  shared-header + a + main[class*="pt-10"] {
    padding-top: 4rem;
  }
}

.site-header--enhanced nav {
  position: relative;
}

@media (min-width: 768px) {
  .site-header-desktop-cluster {
    position: relative;
    padding: 0.28rem;
    border-radius: 999px;
    border: 1px solid rgba(12, 10, 8, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(248, 244, 236, 0.72));
    backdrop-filter: blur(16px) saturate(135%);
    box-shadow: 0 14px 30px rgba(12, 10, 8, 0.12);
  }

  .site-nav-rail {
    gap: 0.32rem !important;
    padding: 0.18rem;
    border-radius: 999px;
  }

  .dark .site-header-desktop-cluster {
    border-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.74));
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.42);
  }

  .site-nav-rail > .relative.group > a,
  .site-nav-rail > a {
    border-radius: 999px;
    padding: 0.54rem 0.86rem !important;
    font-size: 0.66rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.16em !important;
    transition: background-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
  }

  .site-nav-rail > .relative.group:hover > a,
  .site-nav-rail > .relative.group > a:focus-visible,
  .site-nav-rail > a:hover,
  .site-nav-rail > a:focus-visible {
    background: linear-gradient(145deg, rgba(182, 149, 106, 0.2), rgba(182, 149, 106, 0.1));
    color: rgba(15, 23, 42, 1) !important;
    box-shadow: inset 0 0 0 1px rgba(182, 149, 106, 0.34), 0 8px 18px rgba(182, 149, 106, 0.16);
    transform: translateY(-1px);
    outline: none;
  }

  .dark .site-nav-rail > .relative.group:hover > a,
  .dark .site-nav-rail > .relative.group > a:focus-visible,
  .dark .site-nav-rail > a:hover,
  .dark .site-nav-rail > a:focus-visible {
    background: rgba(182, 149, 106, 0.22);
    color: rgba(248, 245, 239, 1) !important;
    box-shadow: inset 0 0 0 1px rgba(182, 149, 106, 0.34);
  }

  .site-header-tools {
    border-left-color: rgba(12, 10, 8, 0.12) !important;
    margin-left: 0.2rem;
    padding-left: 0.72rem !important;
  }

  .site-header-tools > button {
    border-radius: 999px;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header-tools > button:hover {
    background: rgba(182, 149, 106, 0.16);
  }
}

.site-header-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(12, 10, 8, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 236, 0.9));
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(12, 10, 8, 0.12);
}

.dark .site-header-mobile-toggle {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(2, 6, 23, 0.88));
  color: #f8f5ef;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35);
}

.site-mobile-menu-surface {
  border-top: 1px solid rgba(12, 10, 8, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 236, 0.92));
}

.dark .site-mobile-menu-surface {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.92));
}

@media (min-width: 1024px) {
  .site-header-mobile-toggle {
    display: none !important;
  }
  .site-header-desktop-cluster {
    display: flex !important;
  }
}

#scroll-to-top.is-over-footer {
  background: transparent;
  box-shadow: none;
  color: #f8f5ef;
}

.toc-link.toc-active {
  color: var(--color-accent, #b6956a);
  font-weight: 600;
  padding-left: 0.6rem;
  position: relative;
}

.toc-link.toc-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.2rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--color-accent, #b6956a);
}

.ad-placeholder {
  min-height: 100px;
}

:where(main, section) :is(.aspect-video, .aspect-\[21\/9\], .aspect-\[16\/10\], .aspect-\[4\/5\], .aspect-\[3\/4\], .aspect-\[9\/16\], .aspect-\[16\/9\]) {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(248, 244, 236, 0.92), rgba(255, 255, 255, 0.84));
}

.dark :where(main, section) :is(.aspect-video, .aspect-\[21\/9\], .aspect-\[16\/10\], .aspect-\[4\/5\], .aspect-\[3\/4\], .aspect-\[9\/16\], .aspect-\[16\/9\]) {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.58));
}

:where(main, section) :is(.aspect-video, .aspect-\[21\/9\], .aspect-\[16\/10\], .aspect-\[4\/5\], .aspect-\[3\/4\], .aspect-\[9\/16\], .aspect-\[16\/9\]) > img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
}
