.table-of-contents {
  border: 1px solid #E8E8E8;
  background-color: #FAFAFA;
}

.table-of-contents .toc-container {
  flex: 1 1 auto;
  padding: 24px;
}

.table-of-contents .toc-title {
  font-size: 16px;
  border-bottom: 1px solid #D0D0D0;
  margin: 0;
  padding-bottom: 16px;
}

.table-of-contents .toc-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 0;
  padding: 0;
}

.table-of-contents .toc-item {
  min-width: 200px;
  display: flex;
  position: relative;
  justify-content: space-between;
  background-color: #FFFFFF;
  border: 1px solid #4B4B4B;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  line-height: 1.5;
}

.table-of-contents .toc-item:hover {
  box-shadow: 2px 4px 5px #0000001A;
  border: 1px solid #1473E6;
}

.table-of-contents .toc-item:focus-within {
  border: 1px solid #1473E6;
  background-color: #F5F9FD;
}

.table-of-contents .toc-link-text {
  flex: 1 1 auto;
}

.table-of-contents .toc-link-text p {
  margin: 0 0 6px;
}

.table-of-contents .toc-item a {
  color: var(--text-color);
  outline: none;
}

.table-of-contents .toc-item a:hover {
  text-decoration: none;
}

.table-of-contents .toc-link-text p:last-child {
  margin-bottom: 0;
}

.table-of-contents .section-title {
  font-weight: bold;
}

.table-of-contents .section-description {
  font-size: 14px;
}


.table-of-contents .toc-arrow {
  align-self: center;
  padding-left: 8px;
}

.toc .marquee {
  min-height: unset;
}

.toc .marquee .foreground {
  flex-flow: column-reverse;
  padding-bottom: 0;
}

.toc .marquee .foreground .media {
  width: 100%;
}

@media screen and (min-width: 600px) {
  .table-of-contents .toc-list {
    flex-flow: row wrap;
  }

  .table-of-contents .toc-item {
    flex: 1 1 40%;
  }

  .toc .marquee .foreground .text h2 {
    font-size: var(--type-heading-xxl-size);
  }

  .toc .marquee .foreground .media {
    margin: 0;
  }
}

@media screen and (min-width: 1200px) {
  .section.toc {
    display: flex;
    flex-direction: row;
  }
  
  .section.toc > div {
    flex: 1 1 auto;
  }

  .section.toc .marquee .foreground.container {
    margin-right: 0;
    align-content: space-between;
    flex-flow: row wrap;
  }

  .table-of-contents .toc-container {
    padding: 32px;
    box-sizing: border-box;
  }

  .toc .table-of-contents .toc-container {
    margin-left: 0;
    padding-right: 0;
  }

  .table-of-contents .toc-list {
    flex-wrap: wrap;
  }

  .toc .table-of-contents .toc-item {
    flex: 1 1 100%;
  }

  .toc .marquee .foreground {
    gap: 0;
  }

  .toc .marquee .foreground .text {
    padding-top: var(--spacing-xl);
  }

  .toc .marquee .foreground .media {
    max-width: 100%;
  }
}

@media screen and (min-width: 1440px) {
  .section.toc .marquee .foreground.container {
    width: calc(var(--grid-container-width) - 400px);
  }

  .toc .table-of-contents .toc-container {
    max-width: 400px;
  }

  .toc .marquee .foreground {
    flex-flow: initial;
    padding-bottom: 0;
  }

  .toc .marquee .foreground .text h2 {
    font-size: var(--type-heading-xxl-size);
  }
}
