/* Shared navigation geometry; theme palettes and section content remain local. */
html body.vf-navigation-consistent {
  --vf-nav-ink: var(--vf-personal-text, #24344d);
  --vf-nav-muted: var(--vf-personal-muted, #66758c);
  --vf-nav-surface: var(--vf-personal-card, #fff);
  --vf-nav-line: var(--vf-personal-border, #dce4ef);
  --vf-nav-accent: var(--vf-personal-accent, var(--vf-preset-accent, #216cdb));
}
html body.vf-navigation-consistent.night-mode {
  --vf-nav-ink: var(--vf-dark-text, #edf4ff);
  --vf-nav-muted: var(--vf-dark-muted, #a9bbd2);
  --vf-nav-surface: var(--vf-dark-surface, #111b28);
  --vf-nav-line: var(--vf-dark-line, #35445a);
}
html body.vf-navigation-consistent .main-header .navbar-wrapper > ul {
  align-items: center;
  gap: 8px;
}
html body.vf-navigation-consistent .main-header .navbar-wrapper > ul > li {
  flex: 0 0 auto;
  margin-block: 0;
}
html body.vf-navigation-consistent .main-header .navbar-wrapper > ul > li > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  line-height: 1;
}
html body.vf-navigation-consistent .main-header .navbar-wrapper .user-menu > img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
}
/* Admin uses the same global header as the member-facing product.  The legacy
   admin layout constrained its header to the content container, which made its
   logo, search and utility controls visibly misalign with every other page. */
html body.vf-navigation-consistent.vf-page-admin .main-wrapper .main-header {
  height: 78px !important;
  min-height: 78px !important;
}
html body.vf-navigation-consistent.vf-page-admin .main-wrapper .main-header > .container,
html body.vf-navigation-consistent.vf-page-admin .main-wrapper .main-header > .container-fluid {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  padding-right: clamp(16px, 2vw, 32px) !important;
  padding-left: clamp(16px, 2vw, 32px) !important;
}
html body.vf-navigation-consistent :is(.vf-account-menu, .vf-neighborhood-context-menu) {
  background: var(--vf-nav-surface) !important;
  color: var(--vf-nav-ink) !important;
  border: 1px solid var(--vf-nav-line) !important;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 30, 54, .16);
}
html body.vf-navigation-consistent .vf-account-menu .dropdown-item,
html body.vf-navigation-consistent .vf-neighborhood-context-menu a {
  min-height: 42px;
  color: var(--vf-nav-ink) !important;
  border-radius: 9px;
}
html body.vf-navigation-consistent .vf-account-menu-section,
html body.vf-navigation-consistent .vf-neighborhood-context-menu-title {
  color: var(--vf-nav-muted) !important;
}
html body.vf-navigation-consistent :is(.vf-account-menu .dropdown-item, .vf-neighborhood-context-menu a):is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--vf-nav-accent) 12%, var(--vf-nav-surface)) !important;
}
html body.vf-navigation-consistent :is(.navbar-wrapper a, .vf-neighborhood-flat-link, .vf-neighborhood-context-menu a, .footer-bottom-bar a, .admin-sidebar a):focus-visible {
  outline: 2px solid var(--vf-nav-accent) !important;
  outline-offset: 3px;
}
html body.vf-navigation-consistent .vf-rail-all-nav[hidden] { display: none !important; }
/* The rail is organized by purpose before individual destinations.  Flyout
   behavior remains attached to each destination, rather than to the labels. */
html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-group {
  display: grid;
  gap: 3px;
  padding: 0 0 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--vf-nav-line) 78%, transparent);
}
html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-group + .vf-neighborhood-group {
  padding-top: 10px;
}
html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-utility {
  padding-bottom: 0;
  border-bottom: 0;
}
html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-events {
  padding: 10px 0;
}
html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-group-label {
  margin: 0 8px 4px;
  color: var(--vf-nav-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  /* Outrank Neighborhood's old theme/page-specific rule hiding other nav trees. */
  html body.vf-navigation-consistent.vf-theme-neighborhood:not(.night-mode) .vf-directory-shell .vf-rail > .card-body > nav.vf-neighborhood-flat-nav,
  html body.vf-navigation-consistent #vf-main-content .vf-rail > .card-body > nav.vf-neighborhood-flat-nav {
    display: grid !important;
    gap: 5px !important;
    padding: 12px 8px !important;
  }
  html body.vf-navigation-consistent #vf-main-content .vf-rail .vf-neighborhood-flat-link {
    min-height: 46px !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    color: var(--vf-nav-ink) !important;
    border-radius: 11px !important;
  }
  html body.vf-navigation-consistent #vf-main-content .vf-rail .vf-neighborhood-flat-link > i {
    color: inherit !important;
  }
  html body.vf-navigation-consistent #vf-main-content .vf-rail .vf-neighborhood-flat-link:is(.is-active, :hover, :focus-visible) {
    background: color-mix(in srgb, var(--vf-nav-accent) 14%, var(--vf-nav-surface)) !important;
    color: var(--vf-nav-ink) !important;
  }
  html body.vf-navigation-consistent #vf-main-content .vf-rail .vf-neighborhood-flat-nav {
    gap: 0 !important;
  }
}
html body.vf-navigation-consistent .admin-sidebar .side-nav > li > a {
  min-height: 42px;
  line-height: 1.4;
  padding-block: 11px;
}
html body.vf-navigation-consistent .admin-sidebar .card {
  border-radius: 14px;
  overflow: hidden;
}
html body.vf-navigation-consistent .admin-sidebar .card-header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 750;
}
html body.vf-navigation-consistent.night-mode .admin-sidebar .card,
html body.vf-navigation-consistent.night-mode .admin-sidebar .side-nav {
  background: var(--vf-nav-surface) !important;
  color: var(--vf-nav-ink) !important;
  border-color: var(--vf-nav-line) !important;
}
html body.vf-navigation-consistent.night-mode .admin-sidebar .side-nav a {
  color: var(--vf-nav-ink) !important;
}
@media (max-width: 767.98px) {
  html body.vf-navigation-consistent .main-header .navbar-wrapper > ul { gap: 3px; }
  html body.vf-navigation-consistent .main-header .navbar-wrapper > ul > li > a {
    width: 36px; height: 36px; min-width: 36px;
  }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-group,
  html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-group + .vf-neighborhood-group {
    display: contents;
  }
  html body.vf-navigation-consistent .vf-neighborhood-flat-nav .vf-neighborhood-group-label { display: none; }
}
@media (min-width: 1200px) {
  html body.vf-navigation-consistent.vf-modern-rail-collapsed .vf-neighborhood-flat-nav .vf-neighborhood-group,
  html body.vf-navigation-consistent.vf-modern-rail-collapsed .vf-neighborhood-flat-nav .vf-neighborhood-group + .vf-neighborhood-group {
    display: contents;
  }
  html body.vf-navigation-consistent.vf-modern-rail-collapsed .vf-neighborhood-flat-nav .vf-neighborhood-group-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vf-neighborhood-flat-link, .vf-account-menu .dropdown-item { transition: none !important; }
}
html body.vf-navigation-consistent.vf-theme-neighborhood:not(.night-mode) .main-wrapper .main-header .logo {
  color: var(--vf-nav-ink) !important;
}
@media (min-width: 768px) {
  html body.vf-navigation-consistent.vf-theme-neighborhood:not(.night-mode) .vf-directory-shell .vf-rail-create {
    display: block !important;
    margin-bottom: 14px !important;
  }
}

/* Keep text-logo fallbacks on one line on narrow screens. */
body.vf-navigation-consistent .main-header .logo { white-space: nowrap; }
@media (max-width: 767.98px) {
  body.vf-navigation-consistent .main-header .logo { font-size: 21px; }
}
body.vf-navigation-consistent.night-mode .card > :is(h1,h2,h3,h4,h5,h6),
body.vf-navigation-consistent.night-mode .card-body > :is(h1,h2,h3,h4,h5,h6) { color: var(--vf-nav-ink, #edf3ff); }
.vf-mobile-appearance { margin: 16px 0; padding: 16px; border: 1px solid var(--vf-nav-line); border-radius: 16px; background: var(--vf-nav-surface); }

html body.vf-navigation-consistent .footer-pwa-more-item > :is(img,.svg-container) { width:25px!important; height:25px!important; min-width:25px!important; flex:0 0 25px!important; margin:0!important; object-fit:cover; }
html body.vf-navigation-consistent .footer-pwa-more-item > span:last-child { font-size: .86rem!important; color:inherit!important; white-space:normal!important; }
html body.vf-navigation-consistent .vf-mobile-appearance :is(select,input) { color:var(--vf-nav-ink)!important; background-color:var(--vf-nav-surface)!important; border:1px solid var(--vf-nav-line)!important; border-radius:10px; width:100%; padding:10px; }

/* A transform, even translateX(0), makes the feed shell the containing block
   for its fixed rail. Keep the desktop rail anchored to the viewport. */
@media (min-width: 1200px) {
  html body.vf-navigation-consistent .main-wrapper .vf-newsfeed-shell:has(> .vf-modern-rail-row) {
    transform: none !important;
  }
}

/* Use the feed's shared rail composition on every Modern page. The header
   already provides Create, and pinned destinations remain in Your Space. */
@media (min-width: 1200px) {
  html body.vf-navigation-consistent:not(.vf-page-admin):not(.vf-page-profile) #vf-main-content .vf-rail .vf-rail-create,
  html body.vf-navigation-consistent:not(.vf-page-admin):not(.vf-page-profile) #vf-main-content .vf-rail section:has(> .vf-rail-pinned-heading) {
    display: none !important;
  }
  html body.vf-navigation-consistent:not(.vf-page-admin):not(.vf-page-profile):not(.vf-modern-rail-collapsed) #vf-main-content .vf-rail > .card-body > nav.vf-neighborhood-flat-nav {
    position: relative !important;
    left: -15px !important;
    gap: 5px !important;
    padding: 12px 8px !important;
  }
  html body.vf-navigation-consistent.vf-modern-rail-collapsed #vf-main-content .vf-rail nav.vf-neighborhood-flat-nav .vf-neighborhood-flat-link.is-active {
    background: #075fc2 !important;
    border-color: #075fc2 !important;
    color: #fff !important;
  }
  html body.vf-navigation-consistent.vf-modern-rail-collapsed #vf-main-content .vf-rail nav.vf-neighborhood-flat-nav .vf-neighborhood-flat-link.is-active > i {
    background: transparent !important;
    color: #fff !important;
  }
}
