header > [data-dashboard-slot]:empty { display: none; }
header > [data-dashboard-slot] { margin-inline-start: auto; flex: 0 0 auto; }
header > [data-dashboard-slot] > .dashboard-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #693aa0;
  color: white;
  font-weight: 700;
  white-space: nowrap;
}
header > [data-dashboard-slot] > .dashboard-nav-link:hover { background: #542b87; }
header > [data-dashboard-slot] > .dashboard-nav-link:focus-visible { outline: 3px solid #008790; outline-offset: 3px; }
@media(max-width:700px) {
  header > [data-dashboard-slot] { align-self: flex-end; }
}

/* Keep the public navigation available while readers move through a section. */
header:has(> nav[aria-label="Main navigation"]),
.simple-home header:has(> nav[aria-label="Main navigation"]),
.study-app header:has(> nav[aria-label="Main navigation"]) {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  box-shadow: 0 2px 10px #18314a0d;
}
header.site-admin-header { min-height: 64px; padding-block: 8px; }
@media(min-width:901px) {
  body:has(.site-admin-header) .admin-shell .sidebar { top: 64px; height: calc(100dvh - 64px); overflow-y: auto; }
}
