/* ==========================================================================
   FAQ, set as an interview.
   ========================================================================== */

.wl-faqi__wrap {
  max-width: var(--wl-container-wide);
  margin-inline: auto;
  padding-inline: var(--wl-gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wl-space-xl);
}

@media (min-width: 58em) {
  .wl-faqi__wrap {
    grid-template-columns: minmax(0, 0.66fr) minmax(0, 1fr);
    gap: clamp(2.75rem, 6vw, 6.875rem);
    align-items: start;
  }
}

/* ---- the side that stays put -------------------------------------------
 * Built from the site's own parts — the short rule the gallery interludes
 * use, the heading, one line and the way out — rather than an eyebrow and a
 * full-width divider.
 */

.wl-faqi__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (min-width: 58em) {
  .wl-faqi__side {
    position: sticky;
    top: clamp(1.75rem, 9vh, 6rem);
  }
}

.wl-faqi__rule {
  width: 46px;
  height: 2px;
  background: var(--wl-highlight);
}

.wl-faqi__heading {
  margin-top: var(--wl-space-md);
  font-family: var(--wl-font-display);
  font-weight: 400;
  font-size: var(--wl-text-3xl);
  line-height: 0.98;
  letter-spacing: var(--wl-tracking-tight);
  /* On the heading, where `ch` is measured in the font being limited. */
  max-width: 11ch;
}

.wl-faqi__lede {
  margin-top: var(--wl-space-md);
  max-width: 30ch;
  color: var(--wl-ink-soft);
}

.wl-faqi__more {
  display: inline-flex;
  align-items: center;
  gap: var(--wl-space-xs);
  margin-top: var(--wl-space-lg);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--wl-rule);
  font-size: var(--wl-text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wl-ink);
  text-decoration: none;
  transition:
    color var(--wl-duration) var(--wl-ease),
    border-color var(--wl-duration) var(--wl-ease);
}

.wl-faqi__more:hover,
.wl-faqi__more:focus-visible {
  color: var(--wl-highlight);
  border-color: var(--wl-highlight);
}

.wl-faqi__more svg { transition: transform var(--wl-duration) var(--wl-ease); }

.wl-faqi__more:hover svg,
.wl-faqi__more:focus-visible svg { transform: translate(2px, -2px); }

/* ---- the questions ------------------------------------------------------ */

.wl-faqi__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--wl-rule);
}

.wl-faqi__q { border-bottom: 1px solid var(--wl-rule); }

.wl-faqi__summary {
  display: block;
  list-style: none;
  cursor: pointer;
  padding-block: var(--wl-space-lg) var(--wl-space-md);
}

.wl-faqi__summary::-webkit-details-marker { display: none; }

.wl-faqi__summary:focus-visible {
  outline: 3px solid var(--wl-highlight);
  outline-offset: 4px;
}

.wl-faqi__q h3 {
  font-family: var(--wl-font-display);
  font-weight: 400;
  font-size: var(--wl-text-2xl);
  line-height: 1.1;
  letter-spacing: -0.018em;
  max-width: 22ch;
  transition: transform 300ms var(--wl-ease);
}

.wl-faqi__summary:hover h3 { transform: translateX(7px); }

/*
 * The one piece of signalling: a rule that draws itself under the question,
 * then locks to the highlight when the answer is open.
 */
.wl-faqi__mark {
  display: block;
  width: 0;
  height: 2px;
  margin-top: var(--wl-space-sm);
  background: var(--wl-ink-soft);
  transition:
    width 420ms var(--wl-ease),
    background 300ms var(--wl-ease);
}

.wl-faqi__summary:hover .wl-faqi__mark { width: 40px; }

.wl-faqi__q[open] .wl-faqi__mark {
  width: 40px;
  background: var(--wl-highlight);
}

/*
 * Set in from the question, the way a reply is set in from it in print. On a
 * phone it comes back to the margin, where an indent only steals width.
 */
.wl-faqi__answer { padding-bottom: var(--wl-space-xl); }

@media (min-width: 40em) {
  .wl-faqi__answer { padding-left: clamp(2.125rem, 5vw, 4.625rem); }
}

.wl-faqi__answer p {
  max-width: 48ch;
  line-height: 1.66;
}

.wl-faqi__answer p + p { margin-top: var(--wl-space-sm); }

.wl-faqi__draft {
  margin-bottom: var(--wl-space-sm);
  font-size: var(--wl-text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wl-ink-soft);
}

.wl-faqi__draft::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: var(--wl-space-xs);
  background: var(--wl-highlight);
  vertical-align: baseline;
}

@media (prefers-reduced-motion: reduce) {
  .wl-faqi__q h3,
  .wl-faqi__mark,
  .wl-faqi__more,
  .wl-faqi__more svg { transition: none; }
}
