/* =========================
   FAQ (no borders unless open + smooth 300ms)
   Requires: .faq-panel wrapper in HTML
   ========================= */

.faq-box {
  margin-top: 28px;
  overflow: hidden;
}

/* Keep non-summary visible even when <details> is closed (so we can animate) */
.faq-item > :not(summary) {
  display: block;
}

.faq-item {
  margin: 0;
  border: 0;
  background: transparent;

  box-shadow: inset 0 0 0 2px transparent;
  border-radius: 20px;
  transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question row */
.faq-q {
  font-family: var(--font-brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  width: 100%;
  padding: 16px 18px;

  cursor: pointer;
  user-select: none;

  font-weight: 850;
  font-size: 16px;
  line-height: 1.35;
  color: #111827;

  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove default marker */
.faq-item > summary {
  list-style: none;
}
.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-q:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent);
}

/* Chevron */
.faq-q::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;

  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;

  opacity: 0.65;
  transform: rotate(45deg);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-panel {
  height: 0;
  overflow: hidden;
  transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: height;
}

.faq-a {
  padding: 0 18px 16px 18px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.faq-a p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 600;
}

.faq-link {
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* OPEN state: ONLY when .is-open */
.faq-item.is-open {
  box-shadow: inset 0 0 0 1px var(--brand);
}

.faq-item.is-open .faq-q::after {
  opacity: 0.95;
  transform: rotate(-135deg);
}

.faq-item.is-open .faq-a {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-q,
  .faq-q::after,
  .faq-panel,
  .faq-a {
    transition: none;
  }
}

@media (max-width: 640px) {
  .faq-q {
    padding: 14px 14px;
    font-size: 14px;
  }
  .faq-a {
    padding: 0 14px 14px 14px;
  }
  .faq-a p {
    font-size: 12.5px;
  }
}
