/* Shared navigation geometry for the approved home and every inner route. */

.site-header .site-header__inner.header-inner {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.site-header .wordmark {
  grid-column: 1;
  justify-self: start;
}

.site-header .desktop-nav {
  grid-column: 2;
  min-width: 0;
}

.site-header .header-actions {
  grid-column: 3;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0;
}

@media (max-width: 1120px) {
  .site-header {
    /* A transformed ancestor becomes the containing block for fixed children.
       Keep the mobile menu anchored to the viewport, not to the 68px header. */
    transform: none;
  }

  .site-header .site-header__inner.header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .site-header .desktop-nav {
    display: none;
  }

  .site-header .header-actions {
    grid-column: 3;
    min-width: 52px;
  }

  .site-header .menu-toggle {
    grid-column: 3;
    width: 52px;
    min-width: 52px;
    min-height: 44px;
    display: grid;
    align-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .site-header .menu-toggle:focus-visible {
    outline-offset: 4px;
  }

  .site-header .mobile-menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
  }

  /* Mobile navigation is a persistent spatial anchor. */
  .site-header.is-hidden,
  .site-header:focus-within {
    transform: none;
  }
}
