/* Size each link to its text. The strip is the only horizontally scrollable area. */
.utility-bar nav.profile-navigation {
  font-size: .75rem;
  padding-block: .25rem;
}

.profile-navigation .nav-track {
  display: flex;
  align-items: center;
  min-width: 0;
}

.profile-navigation .nav-track .section-links {
  display: flex;
  flex: 1 1 auto;
  flex-flow: row nowrap;
  align-items: center;
  gap: clamp(.875rem, 2vw, 1.75rem);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 3px;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 3px;
}

.utility-bar .nav-track .section-links a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  text-wrap: nowrap;
}

.profile-navigation .nav-track a:focus-visible {
  outline-offset: -2px;
}

.profile-navigation .nav-step {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 44px;
  padding: .25em;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.profile-navigation .nav-step::before {
  content: "";
  height: .55em;
  width: .55em;
  border-inline-end: 2px solid currentColor;
  border-block-start: 2px solid currentColor;
  transform: rotate(45deg);
}

.profile-navigation .nav-step[data-nav-step="-1"]::before {
  transform: rotate(-135deg);
}

.profile-navigation .nav-step:disabled {
  opacity: .4;
  cursor: default;
}

@media screen and (max-width: 62.5rem) {
  .utility-bar nav.profile-navigation { font-size: .6875rem; }
}

@media screen and (max-width: 30rem),
       screen and (horizontal-viewport-segments: 2),
       screen and (vertical-viewport-segments: 2) {
  .utility-bar nav.profile-navigation { padding-inline: .75rem; }
  .profile-navigation .nav-track .section-links { gap: .375rem; }
}

/* On touch Safari follow the iOS text category and keep the site's typeface. */
@supports (font: -apple-system-caption2) {
  @media (pointer: coarse) {
    .utility-bar nav.profile-navigation {
      font: -apple-system-caption2;
      font-family: var(--sans);
      font-weight: 600;
      line-height: 1.5;
    }
  }
}

/* Give the text the full row when side controls would crop an individual link. */
.profile-navigation .nav-track[data-controls-below] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
}

.nav-track[data-controls-below] .section-links {
  grid-column: 1 / -1;
  grid-row: 1;
}

.nav-track[data-controls-below] [data-nav-step="-1"] {
  grid-column: 2;
  grid-row: 2;
}

.nav-track[data-controls-below] [data-nav-step="1"] {
  grid-column: 3;
  grid-row: 2;
}
