/* Home navigation: full labels, two rows of links at desktop widths. */
body[data-ags-chat-page="home"] #site-header .nav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  min-width: 0;
}

body[data-ags-chat-page="home"] #site-header .nav-brand {
  grid-column: 1;
  min-width: 0;
}

body[data-ags-chat-page="home"] #site-header .ags-clock {
  grid-column: 2;
  justify-self: end;
}

body[data-ags-chat-page="home"] #site-header .home-nav-menu {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

/* The dynamic links and three fixed actions share the same two-row grid. */
body[data-ags-chat-page="home"] #site-header #shell-nav,
body[data-ags-chat-page="home"] #site-header .nav-actions {
  display: contents !important;
}

body[data-ags-chat-page="home"] #site-header #shell-nav .ags-nav-link,
body[data-ags-chat-page="home"] #site-header #shell-nav > a,
body[data-ags-chat-page="home"] #site-header .nav-actions .btn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 56px;
  padding: 8px 10px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 12px;
  text-align: center;
  line-height: 1.15;
  white-space: normal !important;
  overflow-wrap: break-word;
}

body[data-ags-chat-page="home"] #site-header #shell-nav .ags-nav-label {
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
  white-space: normal !important;
  overflow-wrap: break-word;
}

body[data-ags-chat-page="home"] #site-header #shell-nav .ags-nav-thumb {
  flex: 0 0 30px;
}

body[data-ags-chat-page="home"] #site-header .nav-actions .btn {
  font-size: 12px;
  font-weight: 800;
}

body[data-ags-chat-page="home"] #site-header .home-nav-menu a:focus-visible {
  outline: 2px solid #ffb46f;
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  body[data-ags-chat-page="home"] #site-header .home-nav-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-ags-chat-page="home"] #site-header .nav-brand span {
    display: inline;
  }

  body[data-ags-chat-page="home"] #site-header .home-nav-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body[data-ags-chat-page="home"] #site-header .nav-inner {
    padding: 10px;
  }

  body[data-ags-chat-page="home"] #site-header .home-nav-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body[data-ags-chat-page="home"] #site-header #shell-nav .ags-nav-link,
  body[data-ags-chat-page="home"] #site-header #shell-nav > a,
  body[data-ags-chat-page="home"] #site-header .nav-actions .btn {
    min-height: 52px;
    padding: 6px !important;
  }

  body[data-ags-chat-page="home"] #site-header #shell-nav .ags-nav-label {
    font-size: 11px;
  }
}
