/* -------------------------------- 

File#: _2_table-of-contents
Title: Table of Contents
Descr: A navigation with a list of links to the main sections of the page 
Usage: codyhouse.co/license

-------------------------------- */
/* reset */
*, *::after, *::before {
  box-sizing: border-box;
}

* {
  font: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  background-color: hsl(0, 0%, 100%);
  font-family: system-ui, sans-serif;
  color: hsl(230, 7%, 23%);
  font-size: 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: hsl(230, 13%, 9%);
  font-weight: 700;
}

h1 {
  font-size: 2.0736rem;
}

h2 {
  font-size: 1.728rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.2rem;
}

ol, ul, menu {
  list-style: none;
}

button, input, textarea, select {
  background-color: transparent;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}



table {
  border-collapse: collapse;
  border-spacing: 0;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

@media (min-width: 64rem) {
  body {
    font-size: 1.25rem;
  }

  h1 {
    font-size: 3.051rem;
  }

    h2 {
    font-size: 2.44rem;
  }

    h3 {
    font-size: 1.75rem;
  }

    h4 {
    font-size: 1.5625rem;
  }
}

/* variables */
:root {
  /* colors */
  --tb9-color-primary-hsl: 250, 84%, 54%;
  --tb9-color-bg-hsl: 0, 0%, 100%;
  --tb9-color-contrast-high-hsl: 230, 7%, 23%;
  --tb9-color-contrast-higher-hsl: 230, 13%, 9%;
  --tb9-color-contrast-lower-hsl: 240, 4%, 85%;
  --tb9-color-contrast-medium-hsl: 225, 4%, 47%;
  --tb9-color-bg-light-hsl: 0, 0%, 100%;
  --tb9-color-accent-hsl: 342, 89%, 48%;

  /* spacing */
  --tb9-space-4xs: 0.125rem;
  --tb9-space-3xs: 0.25rem;
  --tb9-space-2xs: 0.375rem;
  --tb9-space-xs: 0.5rem;
  --tb9-space-sm: 0.75rem;
  --tb9-space-md: 1.25rem;

  /* typography */
  --tb9-text-sm: 0.833rem;
  --tb9-text-xs: 0.694rem;
  --tb9-text-sm: 0.833rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --tb9-space-4xs: 0.1875rem;
    --tb9-space-3xs: 0.375rem;
    --tb9-space-2xs: 0.5625rem;
    --tb9-space-xs: 0.75rem;
    --tb9-space-sm: 1.125rem;
    --tb9-space-md: 2rem;

    /* typography */
    --tb9-text-sm: 1rem;
    --tb9-text-xs: 0.8rem;
    --tb9-text-sm: 1rem;
  }
}

/* icons */
.tb9-icon {
  height: var(--tb9-size, 1em);
  width: var(--tb9-size, 1em);
  display: inline-block;
  color: inherit;
  fill: currentColor;
  line-height: 1;
  flex-shrink: 0;
  max-width: initial;
}

.tb9-icon--xs {
  --tb9-size: 16px;
}

/* component */
:root {
  --toc-border-width: 1px;
  /* static version only */
}

/* #region (style affecting collapsed + static versions) 👇 */
.toc {
  --space-unit: 1rem;
  transform: translateY(25px);
  /* use rem units for spacing */
}

@media (max-width: 767px) {

.toc {
  transform: translateY(0px);
  /* use rem units for spacing */
}
}

.toc__list {
  position: relative;
}
.toc__list .toc__list .toc__link {
  padding-left: calc(var(--tb9-space-sm) * 2);
  /* offset sub nav */
}

.toc__link,
.toc__label {
  padding: var(--tb9-space-3xs) var(--tb9-space-sm);
}

.toc__link {
  position: relative;
  color: hsl(var(--tb9-color-contrast-medium-hsl));
  text-decoration: none;
}
.toc__link::before {
  /* left mark */
  content: "";
  width: var(--toc-border-width);
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
}
.toc__link:hover {
  color: hsl(var(--tb9-color-contrast-high-hsl));
}

.toc__link--selected {
  color: #163C6B;
}
.toc__link--selected:hover {
  color: #0d2f58;
}

.toc__label {
  /* label style */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--tb9-text-sm);
}

.toc__control {
  /* control button */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toc__control-text {
  /* text inside control button */
  position: relative;
}
.toc__control-text > * {
  display: inline-block;
  transition: opacity 0.4s, -webkit-transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), -webkit-transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.toc__control-text > *:last-child {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  -webkit-transform: translateY(-10px);
          transform: translateY(-10px);
}


.toc__icon-arrow {
  /* arrow icon  */
}
.toc__icon-arrow .icon__group {
  will-change: transform;
  -webkit-transform-origin: 8px 8px;
          transform-origin: 8px 8px;
  transition: -webkit-transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1), -webkit-transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.toc__icon-arrow .icon__group > * {
  -webkit-transform-origin: 8px 8px;
          transform-origin: 8px 8px;
  stroke-dasharray: 17;
  -webkit-transform: translateY(3px);
          transform: translateY(3px);
  transition: stroke-dashoffset 0.3s, -webkit-transform 0.3s;
  transition: transform 0.3s, stroke-dashoffset 0.3s;
  transition: transform 0.3s, stroke-dashoffset 0.3s, -webkit-transform 0.3s;
  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
.toc__icon-arrow .icon__group > *:first-child {
  stroke-dashoffset: 10;
}
.toc__icon-arrow .icon__group > *:last-child {
  stroke-dashoffset: 10;
}

.toc-content__target {
  scroll-margin-top: var(--tb9-space-4xs);
}

/* #endregion */
/* #region (collapsed version only - mobile 👇) */
.toc:not(.toc--static) {
  border-radius: 0.25em;
  background-color: hsl(var(--tb9-color-bg-light-hsl));
  box-shadow: inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.075), 0 0.3px 0.4px rgba(0, 0, 0, 0.025),0 0.9px 1.5px rgba(0, 0, 0, 0.05), 0 3.5px 6px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}
.toc:not(.toc--static):hover {
  box-shadow: inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.075), 0 0.9px 1.5px rgba(0, 0, 0, 0.03),0 3.1px 5.5px rgba(0, 0, 0, 0.08),0 14px 25px rgba(0, 0, 0, 0.12);
}
.toc:not(.toc--static) .toc__nav {
  /* navigation */
  display: none;
  margin: var(--tb9-space-2xs) 0;
}
.toc:not(.toc--static) .toc__list {
  padding-bottom: var(--tb9-space-xs);
}
.toc:not(.toc--static) .toc__label {
  display: none;
}
.toc:not(.toc--static) .toc__link {
  display: flex;
}
.toc:not(.toc--static).toc--expanded .toc__control-text > *:first-child {
  -webkit-transform: translateY(10px);
          transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
}
.toc:not(.toc--static).toc--expanded .toc__control-text > *:last-child {
  opacity: 1;
  pointer-events: auto;
  -webkit-transform: translateY(0);
          transform: translateY(0);
}
.toc:not(.toc--static).toc--expanded .toc__nav {
  display: block;
  -webkit-animation: toc-entry-animation 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
          animation: toc-entry-animation 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.toc:not(.toc--static).toc--expanded .toc__icon-arrow .icon__group {
  /* animate arrow icon */
  -webkit-transform: rotate(-90deg);
          transform: rotate(-90deg);
}
.toc:not(.toc--static).toc--expanded .toc__icon-arrow .icon__group > *:first-child, .toc:not(.toc--static).toc--expanded .toc__icon-arrow .icon__group *:last-child {
  stroke-dashoffset: 0;
  -webkit-transform: translateY(0px);
          transform: translateY(0px);
}

/* #endregion */
/* #region (static version only - desktop 👇) */
.toc--static {
  box-shadow: inset var(--toc-border-width) 0 0 hsl(var(--tb9-color-contrast-lower-hsl));
  /* left border */
}
.toc--static[class*=position-sticky] {
  top: 4rem;
  /* used if position = sticky */
  max-height: calc(100vh - var(--tb9-space-md) * 2);
  /* set max height */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.toc--static .toc__label {
  font-size: var(--tb9-text-xs);
}
.toc--static .toc__link {
  display: inline-flex;
  font-size: var(--text-size-95);
}
.toc--static .toc__link--selected::before {
  background-color: #163C6B;
}
.toc--static .toc__control {
  /* control - static version only */
  display: none;
}

.toc-content--toc-static *:target {
  -webkit-animation: toc-target 2s;
          animation: toc-target 2s;
  /* highlight section on target */
}


@-webkit-keyframes toc-entry-animation {
  from {
    opacity: 0;
    -webkit-transform: translateY(-10px);
            transform: translateY(-10px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0px);
            transform: translateY(0px);
  }
}
@keyframes toc-entry-animation {
  from {
    opacity: 0;
    -webkit-transform: translateY(-10px);
            transform: translateY(-10px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0px);
            transform: translateY(0px);
  }
}
/* used in JS - detect when the TOC needs to switch from a collapsed to a static version */
[class*=toc--static]::before {
  display: none;
  content: "collapsed";
}

@media (min-width: 32rem) {
  .toc--static\@xs::before {
    content: "static";
  }
}
@media (min-width: 48rem) {
  .toc--static\@sm::before {
    content: "static";
  }
}
@media (min-width: 64rem) {
  .toc--static\@md::before {
    content: "static";
  }
}
@media (min-width: 80rem) {
  .toc--static\@lg::before {
    content: "static";
  }
}
@media (min-width: 90rem) {
  .toc--static\@xl::before {
    content: "static";
  }
}

/* utility classes */
.tb9-article {
  --tb9-heading-line-height: 1.22;
  --tb9-body-line-height: 1.66;
  --tb9-space-multiplier: 1.2;
}

.tb9-text-component :where(h1, h2, h3, h4) {
  line-height: var(--tb9-heading-line-height, 1.2);
  margin-top: calc(var(--tb9-space-md) * var(--tb9-space-multiplier, 1));
  margin-bottom: calc(var(--tb9-space-sm) * var(--tb9-space-multiplier, 1));
}

.tb9-text-component :where(p, blockquote, ul li, ol li) {
  line-height: var(--tb9-body-line-height, 1.4);
}

.tb9-text-component :where(ul, ol, p, blockquote, .tb9-text-component__block) {
  margin-bottom: calc(var(--tb9-space-sm) * var(--tb9-space-multiplier, 1));
}

.tb9-text-component :where(ul, ol) {
  padding-left: 1.25em;
}

.tb9-text-component ul :where(ul, ol), .tb9-text-component ol :where(ul, ol) {
  padding-left: 1em;
  margin-bottom: 0;
}

.tb9-text-component ul {
  list-style-type: disc;
}

.tb9-text-component ol {
  list-style-type: decimal;
}

.tb9-text-component img {
  display: block;
  margin: 0 auto;
}

.tb9-text-component figcaption {
  margin-top: calc(var(--tb9-space-xs) * var(--tb9-space-multiplier, 1));
  font-size: var(--tb9-text-sm);
  text-align: center;}

.tb9-text-component em {
  font-style: italic;
}

.tb9-text-component strong {
  font-weight: bold;
}

.tb9-text-component s {
  text-decoration: line-through;
}

.tb9-text-component u {
  text-decoration: underline;
}

.tb9-text-component mark {
  background-color: hsla(var(--tb9-color-accent-hsl), 0.2);
  color: inherit;
}

.tb9-text-component blockquote {
  padding-left: 1em;
  border-left: 4px solid hsl(var(--tb9-color-contrast-lower-hsl));
  font-style: italic;
}

.tb9-text-component hr {
  margin: calc(var(--tb9-space-md) * var(--tb9-space-multiplier, 1)) auto;
  background: hsl(var(--tb9-color-contrast-lower-hsl));
  height: 1px;
}

.tb9-text-component > *:first-child {
  margin-top: 0;
}

.tb9-text-component > *:last-child {
  margin-bottom: 0;
}

.tb9-text-component.tb9-line-height-xs {
  --tb9-heading-line-height: 1;
  --tb9-body-line-height: 1.1;
}

.tb9-text-component.tb9-line-height-sm {
  --tb9-heading-line-height: 1.1;
  --tb9-body-line-height: 1.2;
}

.tb9-text-component.tb9-line-height-md {
  --tb9-heading-line-height: 1.15;
  --tb9-body-line-height: 1.4;
}

.tb9-text-component.tb9-line-height-lg {
  --tb9-heading-line-height: 1.22;
  --tb9-body-line-height: 1.58;
}

.tb9-text-component.tb9-line-height-xl {
  --tb9-heading-line-height: 1.3;
  --tb9-body-line-height: 1.72;
}

.tb9-margin-left-3xs {
  margin-left: var(--tb9-space-3xs);
}

.tb9-sr-only {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.tb9-padding-sm {
  padding: var(--tb9-space-sm);
}

.tb9-gap-md {
  gap: var(--tb9-space-md);
}

.tb9-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.tb9-grid > * {
  min-width: 0;
  grid-column-end: span 12;
}

.tb9-max-width-adaptive-md {
  max-width: 32rem;
}

@media(min-width: 48rem) {
  .tb9-max-width-adaptive-md {
    max-width: 48rem;
  }
}

@media(min-width: 64rem) {
  .tb9-max-width-adaptive-md {
    max-width: 64rem;
  }
}

.tb9-container {
  width: calc(100% - 2*var(--tb9-space-md));
  margin-left: auto;
  margin-right: auto;
}

@media(min-width: 64rem){
  .tb9-position-sticky\@md {
    position: sticky;
  }

  .tb9-order-2\@md {
    order: 2;
  }

  .tb9-flex-row-reverse\@md {
    flex-direction: row-reverse;
  }

  .tb9-col-3\@md {
    grid-column-end: span 3;
  }

  .tb9-col-9\@md {
    grid-column-end: span 9;
  }
}