.faq-home {
  max-width: 1120px;
}

.faq-home-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-bottom: 20px;
}

.faq-home-heading h2 {
  font-family: var(--sans);
  font-size: var(--type-functional-section);
  font-weight: 550;
}

.faq-home-heading a,
.faq-answer a {
  width: fit-content;
}

.faq-page-heading {
  padding-bottom: 1rem;
}

.faq-page-heading h1 {
  font-family: var(--sans);
  font-size: var(--type-page);
  font-weight: 500;
  text-wrap: pretty;
}

.faq-page-heading p {
  max-width: 64ch;
  margin-top: .65rem;
  font-size: var(--type-lead);
  line-height: 1.6;
}

.faq-links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}

.faq-topics {
  margin-top: clamp(1.5rem, 3vw, 2.75rem);
}

.faq-topics > h2 {
  padding-bottom: .95rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  font-weight: 500;
}

.faq-topic {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.6fr);
  align-items: start;
  gap: 6px clamp(20px, 5vw, 56px);
  padding-block: clamp(12px, 2.3vw, 26px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.faq-topic h3 {
  padding-top: .82rem;
  font-family: var(--sans);
  font-size: clamp(1.12rem, 1.65vw, 1.38rem);
  font-weight: 550;
  overflow-wrap: anywhere;
}

.faq-accordion {
  border-top: 1px solid var(--line);
}

.faq-topic .faq-accordion {
  border-top: 0;
}

.faq-accordion details {
  border-bottom: 1px solid var(--line);
}

.faq-topic .faq-accordion details:last-child {
  border-bottom: 0;
}

.faq-accordion summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 14px 6px;
  font-weight: 500;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary:hover {
  color: var(--accent);
}

.faq-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
}

.faq-toggle::before,
.faq-toggle::after {
  content: '';
  position: absolute;
  width: 11px;
  height: 1px;
  background: currentColor;
}

.faq-toggle::after {
  transform: rotate(90deg);
}

.faq-accordion details[open] .faq-toggle::after {
  display: none;
}

.faq-answer {
  padding: 0 30px 16px 6px;
}

.faq-answer p {
  max-width: 70ch;
}

.faq-answer a {
  margin-top: 12px;
}

@media (max-width: 680px) {
  .faq-topic {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-topic h3 { padding-bottom: .25rem; }
  .faq-accordion summary { padding-inline: 0; }
  .faq-answer {
    padding-inline: 0;
  }
}
