.page {
  margin-bottom: 7px;
  color: var(--light-body-color);
  display: block;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.pageLevel1 {
  font-size: 0.9em;
}

.pageChildrenLevel1,
.pageChildrenLevel2,
.pageChildrenLevel3 {
  border-left: 1px solid var(--border-color);
  padding-left: 15px;
  margin-left: 10px;
  margin-bottom: 15px;
}

.activePage {
  color: var(--accent-color);
}

.backHome {
  font-size: 15px;
  text-decoration: none;
  color: var(--light-body-color);
  margin-bottom: 20px;
  display: flex;

  svg {
    fill: var(--light-body-color);
    margin-right: 0.5em;
  }
}

.subgroupName {
  color: var(--light-body-color);
  text-transform: uppercase;
  font-size: 0.8em;
  font-weight: bold;
  margin-bottom: 10px;
  margin-top: 30px;
}

.groupName {
  font-weight: bold;
  font-size: 20px;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.title {
  font-size: rfs(50px);
  margin-bottom: rfs(40px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-family: var(--font-sans);
  font-weight: bold;
}

.body {
  font-size: rfs(18px);
  font-family: var(--font-serif);
  line-height: 1.6;
  letter-spacing: -0.02em;
  padding-bottom: rfs(80px);

  a {
    color: inherit;

    &:hover {
      color: var(--accent-color);
    }
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: 130%;
    line-height: 1.25;
    margin: rfs(70px) 0 rfs(23px);
    font-weight: bold;
    font-family: var(--font-sans);
    letter-spacing: -0.03em;
  }

  h4 {
    margin: rfs(50px) 0 rfs(23px);
  }

  h5 {
    margin: rfs(30px) 0 rfs(10px);
  }

  h6 {
    margin: rfs(30px) 0 rfs(10px);
  }

  h2 {
    font-size: 170%;
  }

  h3 {
    font-size: 160%;
  }

  hr {
    margin: rfs(60px) 0;
    width: 90%;
    height: 1px;
    background: var(--border-color);
    border: 0;
  }

  iframe {
    border: 0;
    width: 100%;
    margin: 2.5em 0;
    min-height: 400px;
  }

  details {
    margin-bottom: 1em;

    > *:last-child {
      margin-bottom: 4em;
    }
  }

  summary {
    line-height: 1.25;
    margin-bottom: 1em;
    cursor: pointer;

    &:hover {
      text-decoration: underline;
    }
  }

  p,
  ul,
  ol {
    margin: 0 0 1em;
  }

  li {
    margin: 0 0 5px;

    p:last-child {
      margin-bottom: 0;
    }
  }

  figure {
    text-align: center;
    margin: 2.5em 0;
  }

  iframe {
    margin: 0;
  }

  figcaption {
    color: var(--light-body-color);
    font-size: 0.9em;
    margin-top: 15px;
  }

  code {
    background-color: rgba(0, 0, 0, 0.05);
    margin: 0 0.1em;
    padding: 0 0.1em;
    font-family: var(--font-mono);
    border-radius: 0.25em;
    font-size: 0.9em;
    overflow-wrap: break-word;
  }

  pre,
  .responsiveImage,
  .videoWrapper,
  iframe,
  img,
  video {
    border-radius: 5px;
    overflow: hidden;
    display: inline-block;
    box-shadow: var(--box-shadow);
    width: 100%;
    box-sizing: border-box;
  }

  .videoWrapper {
    overflow: hidden;
    video,
    mux-player {
      display: block;
    }
  }

  pre {
    padding: 30px;
    font-family: var(--font-mono);
    font-size: 0.8em;
    margin: 2.5em 0;
    tab-size: 2;
    width: 100%;
    overflow: auto;
    line-height: 1.3;
    display: block;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .responsiveImage {
    margin: 0;
  }

  .tableWrapper {
    overflow: auto;
  }

  table {
    width: 100%;
    margin: 1em 0;
    font-size: 0.9em;
    font-family: var(--font-sans);
    line-height: 1.1;

    &:first-child {
      margin-top: 0;
    }
    &:last-child {
      margin-top: 0;
    }
  }

  th {
    font-weight: normal;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 15px;
    text-align: left;
    font-size: 0.8em;
    color: var(--light-body-color);
  }

  td {
    font-weight: normal;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 15px;
    text-align: left;
  }

  th,
  td {
    &:first-child {
      padding-left: 0;
    }

    &:last-child {
      padding-right: 0;
    }
  }
}

.text,
.qa {
  max-width: 680px;
}

.article {
  padding-top: rfs(50px);
}

@media (width >= 1300px) {
  .articleContainer {
    display: flex;
    flex-direction: row-reverse;
  }

  .article {
    min-width: 538px;
    flex: 1;
  }

  .sidebar {
    padding-top: 58px;
    padding-left: 64px;
    width: 330px;
  }

  .toc {
    display: block;
    position: sticky;
    top: 48px;
    height: calc(100vh - 48px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .tocInner {
    padding-bottom: 40px;
  }
}

@media (width > 1600px) {
  .emptySidebar {
    padding-top: 58px;
    padding-left: 64px;
    width: 330px;
  }
}

@media (width < 1300px) {
  .article {
    padding-left: var(--page-margin);
    padding-right: var(--page-margin);
    border-bottom: 1px solid var(--border-color);
  }

  .toc {
    padding: 30px var(--page-margin);
    border-bottom: 1px solid var(--border-color);
  }

  .toc {
    padding-bottom: 50px;
  }
}

.tocTitle {
  color: var(--light-body-color);
  text-transform: uppercase;
  font-size: 0.8em;
  font-weight: bold;
  margin-bottom: 20px;
}

.tocEntry a {
  display: block;
  color: var(--light-body-color);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 0.9em;

  code {
    font-size: 0.85em;
    font-family: var(--font-mono);
  }

  &:hover {
    text-decoration: underline;
    color: var(--base-body-color);
  }
}

.pluginBoxes {
  display: flex;
  overflow-x: auto;
  padding: 40px 0 40px var(--page-margin);
  max-width: var(--page-width-with-margin);
  margin-left: calc(var(--page-margin) * -1);
  margin-right: calc(var(--page-margin) * -1);
  align-items: stretch;
  font-family: var(--font-sans);
}

.pluginBoxContainer {
  padding-right: 30px;
  display: flex;
  align-items: stretch;
  width: 330px;
  flex-shrink: 0;

  &:last-child {
    padding-right: var(--page-margin);
  }

  > a {
    display: flex;
    align-items: stretch;
    width: 100%;
  }
}

.pluginBoxImage {
  display: block !important;
  img {
    border-radius: 0 !important;
  }
}

.techLogo {
  box-shadow: none !important;
  height: 40px;
  display: inline !important;
  margin: 0 !important;
  width: auto !important;
}

.demo {
  display: grid;
  max-width: 860px;
  grid-gap: rfs(60px);
  align-items: center;
  font-family: var(--font-sans);
  margin: rfs(80px) auto;
  font-size: rfs(18px);
  text-align: center;
  line-height: 1.3;

  @media (width > 800px) {
    grid-template-columns: 350px 1fr;
    text-align: left;
  }
}

.demoPreview {
  max-width: 350px;
  margin: 0 auto;
}

.techLogo {
  height: 25px !important;
  margin-top: 20px;
  box-shadow: none !important;
  height: 40px !important;
  display: block !important;
  margin: 20px auto 0 !important;

  @media (width > 800px) {
    margin: 20px 0 0 !important;
  }
}

.demoDesc {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-bottom: 15px;
  font-size: 0.9em;
}

.demoTitle {
  font-size: rfs(30px);
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1;
}

.demoDescBody {
  flex: 1;
}

.demoImage {
  display: block !important;

  img {
    border-radius: 0;
  }
}

.kicker {
  font-size: rfs(16px);
  font-weight: bold;
  color: var(--extra-light-body-color);
  text-transform: uppercase;
  margin: 0 0 16px 0;
}

.docCallout {
  padding: rfs(30px);
  border-radius: 5px;
  font-size: 0.9em;
  font-family: var(--font-sans);
  line-height: 1.4;
  margin: 2em 0;

  > *:last-child {
    margin-bottom: 0;
  }

  pre code {
    background-color: unset;
  }
}

.docCallout--neutral,
.docCallout--protip {
  background: #f4f5ff;

  .docCalloutTitle {
    color: #1e64f0;

    svg {
      fill: #1e64f0;
    }
  }
}

.docCallout--positive {
  background: #cbffea;

  .docCalloutTitle {
    color: #00664c;

    svg {
      fill: #00664c;
    }
  }
}

.docCallout--warning {
  background: #fffbd1;

  .docCalloutTitle {
    color: #b3701b;

    svg {
      fill: #b3701b;
    }
  }
}

.docCalloutTitle {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  line-height: 1.1;

  span {
    flex: 1;
    margin-left: 10px;
  }
}

.videoCardTitle {
  font-family: var(--font-sans);
  border-top: 1px solid var(--border-color);
  padding: 25px 15px;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.3;
}

img.framelessResponsiveImage {
  box-shadow: none;
}
