/* Questions as hairline rows under an ink rule, like every other list on the site */
@layer components {
  .accordion {
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--color-text);
  }

  .accordion__item {
    border-bottom: 1px solid var(--color-border);
  }

  .accordion__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    min-height: 2.75rem;
    padding: var(--space-4) 0;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    list-style: none;
    cursor: pointer;

    &::after {
      content: "+";
      flex-shrink: 0;
      font-size: var(--text-xl);
      font-weight: var(--font-normal);
      line-height: 1;
      color: var(--color-text);
    }

    &::-webkit-details-marker {
      display: none;
    }

    &:hover {
      text-decoration: underline;
      text-underline-offset: 0.2em;
    }

    &:focus-visible {
      outline: 3px solid var(--color-focus);
      outline-offset: 2px;
    }
  }

  .accordion__item[open] .accordion__question::after {
    content: "\2212";
  }

  .accordion__answer {
    max-width: 65ch;
    margin: 0;
    padding: 0 0 var(--space-5);
    line-height: 1.7;
    color: var(--color-text-muted);
  }
}
