/* Main navigation uses the full width above the workspace. */
body .app-shell,
body.ai-radar-active .app-shell {
  padding: 0 0 24px;
}
body .app-header.app-sidebar {
  position: sticky;
  inset: 0 0 auto;
  z-index: 110;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand controls" "navigation navigation";
  width: 100%;
  min-height: 0;
  padding: 10px 24px 0;
  gap: 8px 20px;
  align-items: center;
  border-right: 0;
  border-bottom: 1px solid rgba(214, 224, 236, .9);
  box-shadow: 0 6px 24px rgba(31, 56, 87, .06);
  overflow: visible;
}
body .sidebar-brand { grid-area: brand; width: max-content; padding: 0; }
body .sidebar-nav {
  grid-area: navigation;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
body .sidebar-nav-group:not([hidden]) { display: flex; flex: 0 0 auto; gap: 4px; }
body .sidebar-nav-label { display: none; }
body .sidebar-nav-item {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  min-height: 42px;
  padding: 0 12px;
  gap: 8px;
  white-space: nowrap;
}
body .sidebar-nav-icon { flex: 0 0 24px; }
body .sidebar-nav-badge--scope { display: none; }
body .sidebar-footer {
  grid-area: controls;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
body .sidebar-footer-utility-row { grid-template-columns: auto 34px 34px; }
body .sidebar-footer .ep-auth-entry { width: auto; min-width: 100px; margin: 0; padding: 0 12px; }
body .research-flow-backdrop,
body .research-profile-backdrop,
body .research-feed-backdrop { padding: 24px; }
@media (max-width: 900px) {
  body .app-header.app-sidebar { width: 100%; padding: 8px 12px 0; }
  body .sidebar-nav-item { padding: 0 10px; }
}
@media (max-width: 767px) {
  body { min-width: 0; }
  body .app-header.app-sidebar { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  body .sidebar-footer { gap: 5px; }
  body .sidebar-footer .ep-auth-entry { min-width: 0; padding: 0 8px; }
  body .sidebar-nav { max-width: 100%; }
}

/* Text-only navigation with a restrained current-page marker. */
body .app-header.app-sidebar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand navigation controls";
  gap: 20px;
  padding: 8px 24px;
}
body .sidebar-nav { gap: 3px; }
body .sidebar-nav-group:not([hidden]) { gap: 2px; }
body .sidebar-nav-item .sidebar-nav-icon { display: none !important; }
body .sidebar-nav-item .header-utility-icon { display: none !important; }
body .sidebar-nav-item,
body .sidebar-nav-item:hover,
body .sidebar-nav-item.is-active,
body .sidebar-nav-item.is-scholar-task-active,
body .sidebar-nav-item.is-active:hover,
body .sidebar-nav-item.is-scholar-task-active:hover {
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #344257;
  box-shadow: none;
}
body .sidebar-nav-item.is-scholar-task-active::before { display: none; }
body .sidebar-nav-item.is-active .sidebar-nav-title,
body .sidebar-nav-item.is-scholar-task-active .sidebar-nav-title,
body .sidebar-nav-item:hover .sidebar-nav-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  text-decoration-color: #667386;
}
body.theme-dark .sidebar-nav-item,
body.theme-dark .sidebar-nav-item:hover,
body.theme-dark .sidebar-nav-item.is-active,
body.theme-dark .sidebar-nav-item.is-scholar-task-active { color: #e3e8f1; }
body .ai-radar-v2 .topbar .nav button,
body .ai-radar-v2 .topbar .nav button.active,
body .ai-radar-v2 .topbar .nav button:hover {
  border-radius: 0;
  background: transparent;
  color: #59657c;
  box-shadow: none;
}
body .ai-radar-v2 .topbar .nav button.active,
body .ai-radar-v2 .topbar .nav button:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  text-decoration-color: #7a8698;
}
@media (max-width: 1200px) {
  body .app-header.app-sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand controls" "navigation navigation";
    gap: 6px 16px;
    padding: 8px 16px 0;
  }
}

/* A soft highlight identifies the current section without restoring icons. */
body .sidebar-nav-item.is-active,
body .sidebar-nav-item.is-scholar-task-active,
body .sidebar-nav-item.is-active:hover,
body .sidebar-nav-item.is-scholar-task-active:hover,
body.site-intro-active:not(.site-intro-about):not(.site-intro-phd):not(.site-intro-conference) #site-home-link,
body.site-intro-active.site-intro-about #site-about-link {
  border-radius: 9px;
  background: #eef0ff;
  color: #5156b9;
}
body .sidebar-nav-item.is-active .sidebar-nav-title,
body .sidebar-nav-item.is-scholar-task-active .sidebar-nav-title { text-decoration: none; }
body.site-intro-active #sidebar-search-home,
body.i4-conference-open .sidebar-nav-item.is-active:not(#sidebar-conference-center) {
  background: transparent;
  color: #344257;
}
body.theme-dark .sidebar-nav-item.is-active,
body.theme-dark .sidebar-nav-item.is-scholar-task-active,
body.theme-dark.site-intro-active:not(.site-intro-about):not(.site-intro-phd):not(.site-intro-conference) #site-home-link,
body.theme-dark.site-intro-active.site-intro-about #site-about-link {
  background: #343a59;
  color: #e1e4ff;
}
body.theme-dark.site-intro-active #sidebar-search-home,
body.theme-dark.i4-conference-open .sidebar-nav-item.is-active:not(#sidebar-conference-center) {
  background: transparent;
  color: #e3e8f1;
}
.search-surface > .search-welcome { display: none !important; }
