////
/// @group components
////

/// In page nav
.in-page-nav {

  // The 'on this page' title
  &__title {
    @include font-size(h2);
  }

  // Lists (both root level and sub level)
  &__list {
    margin-left: em($spacing-medium);

    [aria-hidden='true'] {
      display: none;
    }
  }

  a {
    &:visited {
      color: $colour-link;
    }

    &:focus {
      background: none;
    }
  }

  @include mq($from: md) {
    // Docked to the top of the screen
    &--fixed {
      position: fixed;
      top: 0;
    }

    &__title {
      @include font-size(h4);
      margin-top: 0;
    }

    a {
      &[aria-selected='true'] {
        font-weight: bold;
      }
    }
  }
}
