
.faq-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
}

.faq-head h2 {
  margin: 0;
}

.faq-sub {
  margin: var(--space-3) 0 0;
  color: var(--ink-secondary);
  max-width: 44ch;
}

.faq-page-head {
  padding: var(--space-section) 0 0;
  text-align: center;
}

.faq-page-head .faq-sub {
  margin: var(--space-3) auto 0;
  max-width: 52ch;
  font-size: 18px;
  line-height: 1.55;
}

.faq-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.faq-pill {
  padding: 8px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--ink-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color var(--ds-duration-fast) var(--ds-ease),
    background-color var(--ds-duration-fast) var(--ds-ease);
}

@media (hover: hover) {
  .faq-pill:hover {
    border-color: var(--ink-brand);
    background: var(--surface-panel);
  }
}

.faq-pill:active {
  transform: scale(0.97);
}

.faq-group {
  scroll-margin-top: 96px;
}

.faq-actions {
  flex: none;
}

.faq-grid {
  display: block;
  margin-top: var(--space-6);
}

.faq-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding-top: var(--space-6);
}

.faq-group + .faq-group {
  margin-top: var(--space-6);
}

@media (min-width: 900px) {
  .faq-group {
    grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
    column-gap: var(--space-8);
  }
}

.faq-group-label {
  margin: 0;
  color: var(--ink-primary);
}

.faq-list {
  min-width: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.faq-item-question {
  margin: 0;
  color: var(--ink-primary);
}

.faq-item-marker {
  flex: none;
  color: var(--ink-secondary);
}

.faq-item-marker .faq-marker-v {
  transform-origin: 50% 50%;
  transition: transform 250ms var(--ds-ease-out), opacity 250ms var(--ds-ease);
}

.faq-item[open] .faq-item-marker .faq-marker-v {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-item-body {
  margin: 0;
  padding: 0 0 var(--space-5);
  color: var(--ink-secondary);
  max-width: 70ch;
}

.faq-item[open] .faq-item-body {
  animation: faq-body-in 260ms var(--ds-ease-out);
}

@keyframes faq-body-in {
  from {
    opacity: 0;
    translate: 0 -4px;
  }
}

@supports (interpolate-size: allow-keywords) {
  details.faq-item {
    interpolate-size: allow-keywords;
  }

  .faq-item::details-content {
    height: 0;
    overflow: clip;
    transition: height 280ms var(--ds-ease-out),
      content-visibility 280ms allow-discrete;
  }

  .faq-item[open]::details-content {
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item[open] .faq-item-body {
    animation: none;
  }

  .faq-item::details-content {
    transition: none;
  }
}
