/* ==========================================================================
   faq.css — /faq and the reusable _FaqSection partial.
   Feature layer only. Colour and type come from tokens.css; the primitives
   (.panel .btn .eyebrow .note .figure …) come from dea.css. No hex here.
   ========================================================================== */

/* ---------------------------------------------------------------- layout */
/* Same proportions as the legal set in pages.css, so /faq, /terms and
   /refunds read as one family rather than three different websites. */
.faq-layout {
  display: grid; align-items: start;
  gap: clamp(var(--space-5), 4vw, var(--space-7));
  grid-template-columns: minmax(0, 1fr);
  padding-block: clamp(2.5rem, 6vw, var(--space-8));
}
@media (min-width: 62rem) {
  .faq-layout { grid-template-columns: 15rem minmax(0, 1fr); }
  .faq-toc { position: sticky; top: calc(var(--masthead-h, 4.25rem) + 1.25rem); }
}

.faq-body { display: flex; flex-direction: column; gap: var(--space-8); max-width: 46rem; }

/* ------------------------------------------------------------------- toc */
.faq-toc { display: flex; flex-direction: column; gap: var(--space-3); font-size: .86rem; }
.faq-toc__head {
  font-family: var(--font-mono); font-size: .64rem; font-weight: var(--weight-mono-medium);
  letter-spacing: var(--tracking-mono-label); text-transform: uppercase;
  color: var(--color-sun-ink);
}
.faq-toc__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .1rem;
  counter-reset: faqtoc;
}
.faq-toc__list li {
  counter-increment: faqtoc;
  display: grid; grid-template-columns: 1.6rem 1fr auto; align-items: baseline; gap: .3rem;
  padding-block: .35rem;
  border-bottom: 1px solid var(--color-haze);
}
.faq-toc__list li:last-child { border-bottom: none; }
.faq-toc__list li::before {
  content: counter(faqtoc);
  font-family: var(--font-mono); font-size: .7rem; color: var(--color-sun-ink);
}
.faq-toc__list a { color: var(--color-ink); text-decoration: none; line-height: 1.35; }
.faq-toc__list a:hover { color: var(--color-bolt); }
.faq-toc__n { font-size: .68rem; color: var(--color-dusk); }
.faq-toc__hint {
  font-size: .78rem; line-height: 1.5; color: var(--color-dusk);
  padding-top: var(--space-3); border-top: 1px solid var(--color-haze);
  max-width: 34ch;
}
.faq-toc__hint kbd {
  font-family: var(--font-mono); font-size: .92em; color: var(--color-ink);
  border: 1px solid var(--color-haze); border-radius: var(--radius-sm);
  padding: .05em .3em; white-space: nowrap;
}

/* ----------------------------------------------------------------- group */
.faq-group { display: flex; flex-direction: column; gap: var(--space-4); }
.faq-group__head { display: flex; flex-direction: column; gap: var(--space-2); }
.faq-group__head h2 { font-size: var(--scale-step-3); }
.faq-group__blurb { color: var(--color-dusk); font-size: .95rem; max-width: 52ch; }

/* ------------------------------------------------------- the disclosures */
/* Real <details>/<summary>. No script, keyboard-operable by construction, and
   the answer is never removed from the document — that is what lets
   find-in-page reach a collapsed answer and a crawler read it. There is
   deliberately no `display: none` (and no `visibility: hidden`, and no
   zero-height clip) anywhere on .faq-item__a: any one of them would take the
   answer out of the find-in-page index and undo the whole arrangement. */
.faq-list { border-top: 1px solid var(--color-haze); }

.faq-item { border-bottom: 1px solid var(--color-haze); }

.faq-item__summary {
  cursor: pointer;
  list-style: none;                       /* removes the disclosure triangle */
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);          /* keeps the tap target well over 44px */
}
.faq-item__summary::-webkit-details-marker { display: none; }
.faq-item__summary:hover .faq-item__q { color: var(--color-bolt); }
.faq-item__summary:focus-visible {
  outline: 2px solid var(--color-bolt); outline-offset: 2px; border-radius: var(--radius-sm);
}

/* Heading content inside a summary, so the page still has an outline a screen
   reader can jump through. The display face is a Didone whose hairlines vanish
   below about 20px, so a question set at 17px uses the body face instead —
   the same trade dea.css already makes for h4. */
.faq-item__q {
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: var(--weight-body-bold);
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--color-ink);
  transition: color .15s ease;
}

.faq-item__mark {
  flex: 0 0 auto; position: relative;
  width: .8rem; height: .8rem; align-self: center;
  color: var(--color-bolt);
}
.faq-item__mark::before,
.faq-item__mark::after {
  content: ""; position: absolute; inset: 50% 0 auto 0;
  height: 1.5px; background: currentColor; translate: 0 -50%;
  transition: rotate .18s ease, opacity .18s ease;
}
.faq-item__mark::after { rotate: 90deg; }
.faq-item[open] .faq-item__mark::after { rotate: 0deg; opacity: 0; }
.faq-item[open] .faq-item__q { color: var(--color-bolt); }

.faq-item__a {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding-bottom: var(--space-5);
  max-width: 58ch;
}
.faq-item__a p { margin: 0; color: var(--color-ink); font-size: .95rem; }
.faq-item__a ul, .faq-item__a ol {
  margin: 0; padding-left: 1.15rem;
  display: flex; flex-direction: column; gap: .45rem;
  font-size: .95rem;
}
.faq-item__a li::marker { color: var(--color-sun-ink); }
.faq-item__a strong { color: var(--color-ink); font-weight: var(--weight-body-bold); }

/* --------------------------------------------------------- closing panel */
.faq-more { gap: var(--space-3); }
.faq-more h2 { font-size: var(--scale-step-2); }
.faq-more__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.faq-more__small { font-size: .84rem; color: var(--color-dusk); }

/* --------------------------------------------- the inline partial's frame */
/* _FaqSection.cshtml, dropped onto a sales page. It brings its own heading
   block and its own top rule; the placing page supplies the surrounding
   .wrap and .section rhythm. */
.faq-section { display: flex; flex-direction: column; gap: var(--space-4); }
.faq-section__head { display: flex; flex-direction: column; gap: var(--space-2); }
.faq-section__head h2 { font-size: var(--scale-step-3); }
.faq-section__intro { color: var(--color-dusk); font-size: .95rem; max-width: 52ch; }
.faq-section__more { font-size: .9rem; }
.faq-section__more a { text-decoration: none; }
.faq-section__more a:hover { text-decoration: underline; }

/* Printing collapses the interaction: the marker is meaningless on paper, and
   a closed answer is the browser's business, not ours. */
@media print {
  .faq-toc, .faq-more__actions { display: none; }
  .faq-item__mark { display: none; }
  .faq-layout { display: block; }
}
