/* Native <details>, so the accordion works with no JavaScript, is
   findable with find-in-page and opens on its own if a visitor lands
   on a deep link. The shared name attribute makes them exclusive.

   The marker is two background gradients. On open the vertical one is
   pulled in to nothing, so a plus becomes a minus. */

@layer components {
  .faq__title {
    margin-block-start: var(--space-xs);
    margin-block-end: var(--space-xl);
    font-size: var(--step-3);
    font-weight: 700;
  }

  .faq__item {
    border-block-end: 1px solid var(--color-line);
  }

  .faq__item:first-of-type {
    border-block-start: 1px solid var(--color-line);
  }

  .faq__q {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-m);
    padding-block: var(--space-m);
    font-family: var(--font-display);
    font-size: var(--step-1);
    font-weight: 600;
    line-height: var(--leading-heading);
    cursor: pointer;
    list-style: none;
    transition: color var(--motion);
  }

  .faq__q::-webkit-details-marker {
    display: none;
  }

  .faq__q:hover {
    color: var(--color-accent);
  }

  .faq__q::after {
    content: '';
    flex: none;
    inline-size: 1rem;
    block-size: 1rem;
    align-self: center;
    background:
      linear-gradient(var(--color-accent) 0 0) center / 100% 2px no-repeat,
      linear-gradient(var(--color-accent) 0 0) center / 2px 100% no-repeat;
    transition: background-size var(--motion);
  }

  .faq__item[open] .faq__q::after {
    background-size: 100% 2px, 2px 0;
  }

  .faq__a {
    padding-block-end: var(--space-m);
  }

  .faq__a p {
    color: var(--color-muted);
  }
}
