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

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

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

/* #region (style affecting collapsed + static versions) 👇 */
.toc__list {
  position: relative;
}
.toc__list .toc__list .toc__link {
  padding-left: calc(var(--space-sm) * 2); /* offset sub nav */
}

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

.toc__link {
  position: relative;
  color: var(--color-contrast-medium);
  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: var(--color-contrast-high);
}

.toc__link--selected {
  color: var(--color-primary);
}
.toc__link--selected:hover {
  color: var(--color-primary);
}

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

.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, transform 0.4s var(--ease-out);
}
.toc__control-text > *:last-child {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.toc__icon-arrow { /* arrow icon  */ }
.toc__icon-arrow .icon__group {
  will-change: transform;
  transform-origin: 8px 8px;
  transition: transform 0.3s var(--ease-out);
}
.toc__icon-arrow .icon__group > * {
  transform-origin: 8px 8px;
  stroke-dasharray: 17;
  transform: translateY(3px);
  transition: transform 0.3s, stroke-dashoffset 0.3s;
  transition-timing-function: var(--ease-out);
}
.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(--space-4xs);
}

/* #endregion */
/* #region (collapsed version only - mobile 👇) */
.toc:not(.toc--static) {
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-dark);
  box-shadow: var(--inner-glow), var(--shadow-sm);
  transition: 0.3s;
}
.toc:not(.toc--static):hover {
  box-shadow: var(--inner-glow), var(--shadow-md);
}
.toc:not(.toc--static) .toc__nav { /* navigation */
  display: none;
  margin: var(--space-2xs) 0;
}
.toc:not(.toc--static) .toc__list {
  padding-bottom: var(--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 {
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
}
.toc:not(.toc--static).toc--expanded .toc__control-text > *:last-child {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.toc:not(.toc--static).toc--expanded .toc__nav {
  display: block;
  animation: toc-entry-animation 0.4s var(--ease-out);
}
.toc:not(.toc--static).toc--expanded .toc__icon-arrow .icon__group { /* animate arrow icon */
  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;
  transform: translateY(0px);
}

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

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

/* #endregion */
@keyframes toc-target {
  0%, 50% {
	 outline: 2px solid hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5);
  }
  100% {
	 outline: 2px solid hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0);
  }
}
@keyframes toc-entry-animation {
  from {
	 opacity: 0;
	 transform: translateY(-10px);
  }
  to {
	 opacity: 1;
	 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";
  }
}


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

File#: _1_tabbed-navigation
Title: Tabbed Navigation
Descr: Tabbed secondary navigation
Usage: codyhouse.co/license

-------------------------------- */
:root {
  --s-tabs-border-bottom-width: 2px;
  --s-tabs-selected-item-border-bottom-width: 2px;
}

.s-tabs {
  position: relative;
}
.s-tabs::after { /* gradient - truncate text */
  content: "";
  position: absolute;
  right: -1px;
  top: 0;
  height: calc(100% - var(--s-tabs-border-bottom-width));
  width: 2em;
  background: linear-gradient(90deg, hsla(var(--color-bg-h), var(--color-bg-s), var(--color-bg-l), 0), var(--color-bg));
  pointer-events: none;
  z-index: 1;
}

.s-tabs__list {
  display: flex;
  overflow: auto;
  -webkit-overflow-scrolling: auto;
}
.s-tabs__list::after { /* border bottom */
  content: "";
  position: absolute;
  width: 100%;
  height: var(--s-tabs-border-bottom-width);
  left: 0;
  bottom: 0;
  background-color: var(--color-contrast-lower);
}

.s-tabs__link {
  color: var(--color-contrast-medium);
  text-decoration: none;
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  white-space: nowrap;
  border-bottom: var(--s-tabs-selected-item-border-bottom-width) solid transparent;
  z-index: 1;
  transition: 0.2s;
}
.s-tabs__link:hover:not(.s-tabs__link--current) {
  color: var(--color-contrast-high);
}

.s-tabs__link--current {
  position: relative;
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.reset-btn:hover {
  animation: shakeX; /* referring directly to the animation's @keyframe declaration */
  animation-duration: 2s; /* don't forget to set a duration! */
  cursor: pointer
}
