/* FAQ page: topics at the top, then questions that open on a click. One readable column. */

.faq-page {
  max-width: calc(820px + 2 * var(--gutter));
}

.faq-head h1 {
  font-size: 2rem;
  line-height: 1.2;
}

.faq-lead {
  max-width: 640px;
  margin: 10px 0 20px;
  color: var(--ash);
  line-height: 1.55;
  text-wrap: pretty;
}

.faq-lead a,
.faq-answer a {
  color: var(--ember-light);
  text-underline-offset: 3px;
}

/* Topic chips: jump to a group */
.faq-groups ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-groups a {
  display: block;
  padding: 7px 14px;
  background: var(--iron);
  border: var(--border);
  border-radius: var(--radius);
  color: var(--white-hot);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.faq-groups a:hover {
  border-color: var(--ember);
}

.faq-group {
  margin-top: 40px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.faq-group h2 {
  margin: 0 0 12px;
  color: var(--ash);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* One question: a card that opens */
.faq-item {
  margin-bottom: 8px;
  background: var(--iron);
  border: var(--border);
  border-radius: var(--radius);
  scroll-margin-top: calc(var(--header-height) + 20px);
  transition: border-color 0.2s;
}

.faq-item[open],
.faq-item:target {
  border-color: color-mix(in srgb, var(--ember) 55%, var(--iron-lighter));
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  color: var(--white-hot);
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

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

/* A plus that turns into a cross when the answer is open */
.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: var(--border);
  border-radius: 50%;
  color: var(--ember-light);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.25s var(--ease-out, ease-out);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  color: #fff;
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.faq-answer {
  padding: 0 18px 6px;
  color: var(--white-hot);
  font-size: var(--text-md);
  line-height: 1.65;
}

.faq-answer p {
  margin: 0 0 12px;
  text-wrap: pretty;
}

.faq-answer strong {
  color: #fff;
}

.faq-item[open] .faq-answer {
  animation: faq-open 0.25s var(--ease-out, ease-out);
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .faq-head h1 {
    font-size: 1.6rem;
  }
}
