/* ═══════════════════════════════════════════════════
   SECTION: audit FAQ. Source: audit.html #sp-faq

   Native <details>/<summary>, so most of what the source's stylesheet did is
   the browser's job now. What is left is removing the default marker, dressing
   the row, and turning the plus into a cross when the answer is open.

   Two things from the source did not survive the port:

   - .sp-faq-q carried `background-color:#333`, a hard-coded grey lighter than
     the --bg-3 on the item beneath it. Nothing else on the page uses #333 and
     no token resolves to it; it reads as a debugging value left in. The row is
     transparent here and the item's own surface shows through.
   - `cursor:none` belongs to the source's custom cursor, which this theme does
     not have. Left as it was, the pointer would vanish over every question.
═══════════════════════════════════════════════════ */

#sp-faq {
  background: var(--c-bg-2);
  padding: var(--sp-section) 0;
  border-bottom: 1px solid var(--c-border);
}

.sp-faq-list {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.sp-faq-item {
  background: var(--c-bg-3);
  border-bottom: 1px solid var(--c-border);
}
.sp-faq-item:last-child { border-bottom: none }

/* ── Question ──
   summary is a list-item by default and draws a triangle. Both the standard
   property and the WebKit pseudo-element are needed: Safari ignores
   list-style on summary and keeps the marker until ::-webkit-details-marker
   is hidden. */
.sp-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--sp-8);
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-family: var(--f-display);
  font-size: var(--fs-400);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.02em;
  line-height: 1.4;
  color: var(--c-text-1);
  transition: color var(--dur-base), background var(--dur-base);
}
.sp-faq-q::-webkit-details-marker { display: none }

.sp-faq-q:hover {
  background: var(--c-bg-4);
  color: var(--c-accent);
}

/* The focus ring has to be inset: the row is clipped by the list's overflow
   and an outline drawn outside it would be cut off on the first and last
   questions. */
.sp-faq-q:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--c-focus-ring);
}

.sp-faq-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(var(--c-accent-rgb), .08);
  border: 1px solid rgba(var(--c-accent-rgb), .18);
  color: var(--c-accent);
  font-size: var(--fs-500);
  line-height: 1;
  transition: transform .25s var(--ease-out), background var(--dur-base);
}

.sp-faq-item[open] .sp-faq-q { color: var(--c-accent) }
.sp-faq-item[open] .sp-faq-icon {
  transform: rotate(45deg);
  background: rgba(var(--c-accent-rgb), .15);
}

/* ── Answer ── */
.sp-faq-a {
  padding: var(--sp-7, 28px) var(--sp-8);
  font-size: var(--fs-300);
  color: var(--c-text-3);
  line-height: 1.75;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .sp-faq-q { padding: var(--sp-5) var(--sp-6); font-size: var(--fs-300) }
  .sp-faq-a { padding: var(--sp-6) }
}

/* Rotating the icon is decoration; the open state is carried by the element
   itself and by the answer appearing. */
@media (prefers-reduced-motion: reduce) {
  .sp-faq-icon { transition: none }
}
