/* ── FAQ ACCORDION ─────────────────────────────────────
   Shared by /community-card and /spotlight.
   Uses the design tokens each page defines in :root.
   Native <details>/<summary>: works without JavaScript.
   The shared name="" attribute keeps one item open at a time. */

.faq-section {
  background: var(--white);
  padding: 80px 0;
  scroll-margin-top: 69px; /* keep /#faq clear of the sticky header */
}

.faq-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}
.faq-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 10px;
}
.faq-header p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
}
.faq-header a,
.faq-answer a {
  color: var(--pine);
  font-weight: 700;
  text-decoration: underline;
}
.faq-header a:hover,
.faq-answer a:hover { color: var(--amber); }

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

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

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 16px 4px;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color .14s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }
.faq-item summary:hover,
.faq-item[open] summary { color: var(--pine); }
.faq-item summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Plus icon: the vertical bar turns flat to make a minus when open */
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream);
  transition: background .2s;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--pine);
  transition: transform .25s ease, background .2s;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--pine); }
.faq-item[open] .faq-icon::before,
.faq-item[open] .faq-icon::after { background: var(--white); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }

.faq-answer {
  padding: 0 48px 20px 4px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.78;
}

/* Smooth open/close in browsers that support it; others open instantly */
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq-item::details-content {
    height: 0;
    overflow: clip;
    transition: height .3s ease, content-visibility .3s allow-discrete;
  }
  .faq-item[open]::details-content { height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-icon::before,
  .faq-icon::after,
  .faq-item::details-content { transition: none; }
}

@media (max-width: 768px) {
  .faq-section { padding: 56px 0; }
  .faq-item summary { font-size: 1rem; }
  .faq-answer { padding-right: 4px; }
}
