/* Common questions.
 *
 * Every answer is open. Accordions look tidier and cost more than they save: a
 * collapsed answer is one a reader has to hunt for, ctrl+F cannot find, and a
 * screen reader has to be told about. With eleven questions the page is not
 * long enough to justify any of that, so the index does the jumping instead.
 */

.faq-head {
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.faq-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  text-wrap: balance;
  margin-bottom: 0.8rem;
}

.faq-head p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 58ch;
}

.faq-head a { color: var(--accent-text); font-weight: 600; }
.faq-head a:hover { text-decoration: underline; }

.faq-body { padding: 3rem 0 4rem; }

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

/* ---- Index ---- */

.faq-index {
  position: sticky;
  top: 90px;
}

.faq-index h2 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  padding-bottom: 0.7rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.faq-index-section {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--accent-text);
  margin: 1.1rem 0 0.4rem;
}

.faq-index-section:first-of-type { margin-top: 0; }

.faq-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.faq-index li a {
  display: block;
  padding: 0.28rem 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.faq-index li a:hover { color: var(--accent-text); }

/* ---- Answers ---- */

.faq-section { margin-bottom: 2.75rem; }

.faq-section > h2 {
  font-size: 1.35rem;
  padding-bottom: 0.7rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.faq-item {
  /* The site header is sticky, so an anchor jump would otherwise land with the
     question hidden underneath it. */
  scroll-margin-top: 90px;
  padding-left: 1.1rem;
  border-left: 2px solid var(--border);
  margin-bottom: 1.75rem;
}

/* The anchor target needs to clear the sticky header, and it needs to be
   obvious which answer the jump landed on. */
.faq-item:target {
  border-left-color: var(--accent);
}

.faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
  text-wrap: balance;
}

.faq-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 68ch;
}

.faq-item a {
  color: var(--accent-text);
  font-weight: 600;
}

.faq-item a:hover { text-decoration: underline; }

/* ---- Closing CTA ---- */

.faq-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 2rem 2.25rem;
}

.faq-cta h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }

.faq-cta p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 60ch;
  margin-bottom: 1.4rem;
}

.faq-cta-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .faq-layout { grid-template-columns: 1fr; gap: 2rem; }
  .faq-index { position: static; }
  .faq-index ul { columns: 2; column-gap: 1.5rem; }
  .faq-index li { break-inside: avoid; }
}

@media (max-width: 600px) {
  .faq-index ul { columns: 1; }
  .faq-cta { padding: 1.5rem 1.35rem; }
  .faq-cta-actions .primary-btn,
  .faq-cta-actions .secondary-btn { flex: 1 1 100%; text-align: center; }
}
