/* Keep native details semantics and keyboard activation, including without JS. */
.question-answer { overflow: hidden; }
@media (forced-colors: none) {
  .question > summary::after,
  .question[open] > summary::after {
    content: "";
    width: .7em;
    height: .7em;
    align-self: center;
    background:
      linear-gradient(currentColor 0 0) center / 100% 2px no-repeat,
      linear-gradient(currentColor 0 0) center / 2px var(--cross-stem, 100%) no-repeat;
  }
  .question[open]:not([data-closing]) > summary::after { --cross-stem: 0%; }
}

@media (prefers-reduced-motion: no-preference) {
  :root:not(.is-lite) .question > summary::after {
    transition: background-size 220ms ease;
  }
  :root:not(.is-lite) .example-folder-chevron {
    transition: transform 300ms cubic-bezier(.22,.7,.22,1);
  }
  @supports selector(details::details-content) {
    :root:not(.is-lite) .example-folder::details-content {
      display: grid;
      grid-template-rows: minmax(0, 0fr);
      overflow: clip;
      opacity: 0;
      transition: grid-template-rows 340ms cubic-bezier(.22,.72,.22,1),
                  opacity 190ms ease, content-visibility 340ms allow-discrete;
    }
    :root:not(.is-lite) .example-folder[open]::details-content {
      grid-template-rows: minmax(0, 1fr);
      opacity: 1;
    }
    :root:not(.is-lite) .example-folder .example-folder-meta > span {
      display: inline;
      transition: opacity 190ms ease;
    }
    :root:not(.is-lite) .example-folder:not([open]) .example-folder-meta > span {
      opacity: 0;
      visibility: hidden;
      transition: opacity 190ms ease, visibility 0s linear 190ms;
    }
  }
}
