/* Brandbook: Sidebar navigation TOC */

.brandbook__nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-gray-lightest);
}

.brandbook__nav-group {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--color-gray-lightest);
}

.brandbook__nav-group > a {
  display: inline-flex;
  justify-content: space-between;
  text-decoration: none;
  padding: 0.8rem 0 0.6rem 0;
  flex-grow: 1;
  width: 100%;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: var(--color-gray-lighter);
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* Sub-nav (section child items) */
.brandbook__subnav {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-left: 1.2rem;
  overflow: hidden;
  height: 0;
  transition: height 0.2s ease;
}

.brandbook__subnav a {
  display: block;
  text-decoration: none;
  padding: 0.8rem 0 0.6rem 0;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--color-gray-lighter);
  margin-top: 0.4rem;
  transition: color 0.2s ease;
}

/* Active states */
.brandbook__nav-group > a.is-active,
.brandbook__subnav a.is-active {
  color: var(--color-blue);
}

/* Hover */
@media (hover: hover) {
  .brandbook__nav-group > a:hover,
  .brandbook__subnav a:hover {
    color: var(--color-blue);
  }
}
