/* ==========================================================================
   FAQ ACCORDION  —  shared component

   Lives here rather than on a page sheet because two pages ask the same
   question of it: the pricing page's short list, and the FAQ page's three
   categorised lists. Both load this; assets/js/faq.js drives either.

   The panel is closed by height, not by display:none, so it can be animated
   and so its contents stay findable by the browser's own page search. The
   closed state is gated on .js: with no script the answers are simply there.
   ========================================================================== */
.faq__list {
  display: grid;
  gap: var(--faq-gap);
  margin-block-start: var(--space-8);
}

.faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--faq-radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.faq__item:hover { border-color: var(--color-border-strong); }

.faq__item.is-open {
  border-color: var(--color-border-accent);
  box-shadow: var(--shadow-md);
}

.faq__q { margin: 0; font-size: inherit; font-weight: inherit; }

.faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--faq-pad);
  border: 0;
  border-radius: inherit;
  background: none;
  color: var(--color-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.faq__btn:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }

.faq__text {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}

.faq__sign {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  transition: transform var(--duration-base) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.faq__sign .icon { width: 0.95rem; height: 0.95rem; }

.faq__btn[aria-expanded="true"] .faq__sign {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-on-accent);
  transform: rotate(180deg);
}

.faq__panel { overflow: hidden; }

.js .faq__panel {
  height: 0;
  visibility: hidden;
  transition: height var(--duration-base) var(--ease-out),
              visibility 0s linear var(--duration-base);
}

.js .faq__item.is-open .faq__panel {
  visibility: visible;
  transition: height var(--duration-base) var(--ease-out),
              visibility 0s;
}

.faq__body {
  padding: 0 var(--faq-pad) var(--faq-pad);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.faq__body p { margin: 0 0 var(--space-3); }
.faq__body p:last-child { margin-block-end: 0; }

.faq__body a {
  color: var(--color-accent-text);
  font-weight: var(--weight-medium);
}

.faq__body a:hover { text-decoration: underline; }

.faq__more {
  margin: var(--space-6) 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-base);
  text-align: center;
}

.faq__more a { color: var(--color-accent-text); font-weight: var(--weight-medium); }
.faq__more a:hover { text-decoration: underline; }


/* --------------------------------------------------------------------------
   NARROW SCREENS
   -------------------------------------------------------------------------- */
@media (max-width: 30rem) {
  .faq__btn { gap: var(--space-3); }
  .faq__text { font-size: var(--text-base); }
}


/* --------------------------------------------------------------------------
   REDUCED MOTION
   The accordion still opens; it just stops sliding.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .js .faq__panel,
  .js .faq__item.is-open .faq__panel,
  .faq__sign {
    transition: none;
  }
}
