/* ==========================================================================
  RRM TOC – Table of Contents Styles
  ========================================================================== */

.rrm-toc {
  margin: 28px 0;
  display: inline-block;
  min-width: 260px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Title
  ========================================================================== */

.rrm-toc__title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a1a1a;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

/* Lists
  ========================================================================== */

.rrm-toc__list {
  list-style: none;
  margin: 0;
  padding: 0 !important;
}

.rrm-toc__list li::marker {
  content: none;
  display: none;
}

/* Nested lists get left indent */
.rrm-toc__list .rrm-toc__list {
  margin-top: 4px;
  margin-left: 18px;
  padding-left: 0;
}

/* Items
  ========================================================================== */

.rrm-toc__item {
  margin: 0;
  padding: 0 0 7px;
  line-height: 1.5;
  border-bottom: 1px solid #ddd;
}

.rrm-toc__item:last-child {
  padding-bottom: 0;
  border-bottom: 0 none;
}

.rrm-toc__item + .rrm-toc__item {
  margin-top: 6px;
}

.rrm-toc__list .rrm-toc__list .rrm-toc__item {
  font-size: 0.9em;
}

/* Links
  ========================================================================== */

.rrm-toc__link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: #63666A;
  transition: color 0.15s ease;
}

.rrm-toc__link:hover,
.rrm-toc__link:focus {
  color: #1a3d6b;
  text-decoration: underline;
}

/* Number badge
  ========================================================================== */

.rrm-toc__number {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.85em;
  color: #666;
  min-width: 10px;
}

.rrm-toc__link:hover .rrm-toc__number {
  color: #1a3d6b;
}

/* Text
  ========================================================================== */

.rrm-toc__text {
  flex: 1;
}

/* Responsive
  ========================================================================== */

@media (max-width: 640px) {
  .rrm-toc {
      display: block;
      padding: 16px;
  }
}
