body {
  margin: 0;
  background: var(--surface-light);
}

.faq-page {
  color: var(--text-on-light);
  font-family: Raleway, sans-serif;
}

.faq-width {
  box-sizing: border-box;
  width: 100%;
  max-width: 88rem;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.faq-page #section-hero {
  background: var(--surface-dark);
  border-bottom: 3px solid var(--brand-accent);
}

.faq-page #section-hero .section-inner {
  padding-block: clamp(34px, 6vw, 64px);
}

.faq-page #section-hero h1 {
  margin: 0;
}

.faq-back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--text-on-dark);
  font-size: 15px;
  text-underline-offset: 0.2em;
}

.faq-back:hover {
  color: var(--link-hover-on-dark);
}

.faq-answers {
  width: 100%;
  max-width: 72rem;
  padding-block: 12px clamp(40px, 7vw, 76px);
  margin-inline: auto;
}

.faq-answers > p {
  white-space: pre-line;
}

.faq-content {
  display: block;
}

.faq-page--with-navigation .faq-content {
  display: grid;
  grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
}

.faq-page--with-navigation .faq-nav {
  --faq-nav-top: 82px;
  position: sticky;
  top: var(--faq-nav-top);
  align-self: start;
  max-height: calc(100vh - var(--faq-nav-top) - 24px);
  overflow-y: auto;
  margin-top: 12px;
  padding: 20px 22px;
  border-left: 4px solid var(--brand-accent);
  background: #f5f5f5;
}

@media (min-width: 769px) and (max-width: 822px) {
  .faq-page--with-navigation .faq-nav {
    --faq-nav-top: 102px;
  }
}

html:has(.bf-band:not([hidden])) .faq-page--with-navigation .faq-nav {
  --faq-nav-top: 202px;
}

html:not(:has(.bf-band:not([hidden]))):has(.faq-page--with-navigation) {
  scroll-padding-top: 82px;
}

@media (min-width: 769px) and (max-width: 822px) {
  html:not(:has(.bf-band:not([hidden]))):has(.faq-page--with-navigation) {
    scroll-padding-top: 102px;
  }
}

.faq-nav-title {
  margin: 0 0 12px;
  color: var(--heading-on-light);
  font-size: 15px;
  font-weight: 700;
}

.faq-nav ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-nav a {
  color: var(--selected-item);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  text-underline-offset: 0.15em;
}

.faq-nav a:hover {
  color: var(--selected-item);
  text-decoration: underline;
}

.faq-page--with-navigation .faq-answers > h2 {
  scroll-margin-top: 0;
  margin: 0 0 4px;
  padding-top: 26px;
  border-top: 1px solid var(--border-on-light);
  color: var(--heading-on-light);
  font-size: clamp(26px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.3;
}

.faq-page--with-navigation .faq-answers > h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.faq-page--with-navigation .faq-answers > p + h2 {
  margin-top: 30px;
}

.faq-page--with-navigation .faq-answers > h3 {
  margin: 0;
  padding-top: 21px;
  color: var(--heading-on-light);
  font-size: clamp(19px, 2.3vw, 23px);
  font-weight: 700;
  line-height: 1.3;
}

.faq-page--with-navigation .faq-answers > p {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.65;
}

.faq-page--with-navigation .faq-answers > p:has(+ h2),
.faq-page--with-navigation .faq-answers > p:has(+ h3),
.faq-page--with-navigation .faq-answers > p:last-child {
  padding-bottom: 21px;
  border-bottom: 1px solid var(--border-on-light);
}

.faq-page:not(.faq-page--with-navigation) .faq-answers > h2 {
  margin: 0;
  padding-top: clamp(23px, 4vw, 32px);
  color: var(--heading-on-light);
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.3;
}

.faq-page:not(.faq-page--with-navigation) .faq-answers > p {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.65;
}

.faq-page:not(.faq-page--with-navigation) .faq-answers > p:has(+ h2),
.faq-page:not(.faq-page--with-navigation) .faq-answers > p:last-child {
  padding-bottom: clamp(23px, 4vw, 32px);
  border-bottom: 1px solid var(--border-on-light);
}

.faq-answers > #can-i-try-a-lesson-first {
  --question-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m10 9 5 3-5 3z'/%3E%3C/svg%3E");
}

.faq-answers > #can-i-fit-a-course-around-work {
  --question-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.faq-answers > #can-my-company-buy-access-for-the-team {
  --question-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20v-1a6 6 0 0 1 12 0v1m2-15a3 3 0 0 1 0 6m4 9v-1a5 5 0 0 0-4-5'/%3E%3C/svg%3E");
}

.faq-answers > #what-will-i-build {
  --question-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 8h18m-11 3-3 3 3 3m4-6 3 3-3 3'/%3E%3C/svg%3E");
}

.faq-answers > :is(
  #can-i-try-a-lesson-first,
  #can-i-fit-a-course-around-work,
  #can-my-company-buy-access-for-the-team,
  #what-will-i-build
) {
  &::after {
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-inline-start: 0.4em;
    vertical-align: -0.05em;
    background-color: var(--link-on-light);
    mask: var(--question-icon) center / contain no-repeat;
  }
}

.faq-answers a {
  color: var(--link-on-light);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.faq-answers a:hover {
  color: var(--selected-item);
}

@media (max-width: 768px) {
  html:has(.bf-band:not([hidden])):has(.faq-page--with-navigation),
  html:not(:has(.bf-band:not([hidden]))):has(.faq-page--with-navigation) {
    scroll-padding-top: 120px;
  }

  .faq-page--with-navigation .faq-content {
    display: block;
  }

  .faq-page--with-navigation .faq-nav {
    position: static;
    max-height: none;
    margin: 8px 0 20px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .faq-page--with-navigation .faq-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
  }

  .faq-page--with-navigation .faq-nav a {
    display: inline-block;
    padding: 8px 11px;
    border: 1px solid var(--border-on-light);
    border-radius: 3px;
    background: var(--surface-light);
  }

  .faq-page--with-navigation .faq-answers {
    max-width: none;
  }

  .faq-width {
    padding-inline: 20px;
  }

  .faq-page--with-navigation .faq-answers > h2 {
    padding-top: 22px;
    font-size: 22px;
  }

  .faq-page--with-navigation .faq-answers > h2:first-child {
    padding-top: 0;
  }

  .faq-page--with-navigation .faq-answers > p + h2 {
    margin-top: 20px;
  }

  .faq-page--with-navigation .faq-answers > h3 {
    padding-top: 18px;
  }

  .faq-page--with-navigation .faq-answers > p:has(+ h2),
  .faq-page--with-navigation .faq-answers > p:has(+ h3),
  .faq-page--with-navigation .faq-answers > p:last-child {
    padding-bottom: 18px;
  }

  .faq-page--with-navigation .faq-answers > p,
  .faq-page:not(.faq-page--with-navigation) .faq-answers > p {
    font-size: 16px;
  }
}
