/* ── FAQ ──────────────────────────────────────────────────────── */

.faq-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.faq-header { margin-bottom: 24px; }

.faq-title {
  font-family: var(--font-display, inherit);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.faq-sub {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}
.faq-sub a { color: var(--accent); text-decoration: none; }
.faq-sub a:hover { text-decoration: underline; }

/* ── Search ───────────────────────────────────────────────────── */
.faq-searchbar {
  position: relative;
  margin-bottom: 20px;
}

.faq-search {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 11px 40px 11px 38px;
  transition: border-color 0.15s, background 0.15s;
}
.faq-search::placeholder { color: var(--text-3); }
.faq-search:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-3, var(--bg-2));
}
/* Kill the native search cancel button so the custom one is the only control */
.faq-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.faq-search-icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-3);
  pointer-events: none;
}

.faq-search-clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text-3);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.faq-search-clear:hover { color: var(--text); background: var(--bg-3, var(--bg-2)); }

.faq-result-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 12px;
}

/* ── Category chips ───────────────────────────────────────────── */
.faq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 28px;
}

.faq-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.faq-chip:hover { color: var(--text); border-color: var(--border-2, var(--border)); }
.faq-chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.faq-chip-count {
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 6px;
}
.faq-chip.active .faq-chip-count { color: var(--accent); background: transparent; }

/* ── Sections ─────────────────────────────────────────────────── */
.faq-section { margin-bottom: 32px; }

.faq-cat-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.faq-cat-desc {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
}

/* ── Accordion item ───────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }

.faq-q-wrap { margin: 0; font-size: inherit; font-weight: inherit; }

.faq-q {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  padding: 15px 2px;
  cursor: pointer;
  transition: color 0.12s;
}
.faq-q:hover { color: var(--accent); }
.faq-q-text { flex: 1; }
.faq-q-text mark {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

.faq-q-meta {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.faq-chevron {
  flex-shrink: 0;
  width: 16px; height: 16px;
  color: var(--text-3);
  transition: transform 0.2s ease, color 0.12s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }

/* ── Answer ───────────────────────────────────────────────────── */
.faq-a { overflow: hidden; }

.faq-a-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2);
  padding: 0 2px 4px;
}
.faq-a-body > :first-child { margin-top: 0; }
.faq-a-body > :last-child { margin-bottom: 0; }
.faq-a-body p { margin: 0 0 10px; }
.faq-a-body a { color: var(--accent); text-decoration: none; }
.faq-a-body a:hover { text-decoration: underline; }
.faq-a-body strong { color: var(--text); font-weight: 600; }
.faq-a-body ul,
.faq-a-body ol { margin: 0 0 10px; padding-left: 20px; }
.faq-a-body li { margin-bottom: 4px; }
.faq-a-body code {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
  padding: 1px 5px;
}
.faq-a-body pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  overflow-x: auto;
  margin: 0 0 10px;
}
.faq-a-body pre code { background: none; border: none; padding: 0; }
.faq-a-body blockquote {
  border-left: 2px solid var(--accent);
  margin: 0 0 10px;
  padding: 2px 0 2px 12px;
  color: var(--text-3);
}
.faq-a-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin: 0 0 10px;
  display: block;
  overflow-x: auto;
}
.faq-a-body th,
.faq-a-body td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; }
.faq-a-body th { background: var(--bg-2); font-weight: 600; color: var(--text); }

.faq-a-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 4px 2px 16px;
}

.faq-link-btn,
.faq-vote {
  background: none;
  border: none;
  color: var(--text-3);
  font-family: inherit;
  font-size: 11.5px;
  padding: 0;
  cursor: pointer;
  transition: color 0.12s;
}
.faq-link-btn:hover { color: var(--accent); text-decoration: underline; }

.faq-helpful {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
}

.faq-vote {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 11px;
  min-width: 42px;
}
.faq-vote:hover { color: var(--accent); border-color: var(--accent); }

.faq-thanks {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--success, var(--accent));
}

/* ── Footer CTA ───────────────────────────────────────────────── */
.faq-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-top: 36px;
}
.faq-cta strong { font-size: 14px; }
.faq-cta p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); }
.faq-cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .faq-wrap { padding: 24px 16px 44px; }
  .faq-title { font-size: 24px; }
  .faq-q { font-size: 14px; gap: 10px; }
  /* The category label crowds the question on a narrow screen */
  .faq-q-meta { display: none; }
  .faq-a-foot { gap: 10px; }
  .faq-helpful, .faq-thanks { margin-left: 0; }
  .faq-cta { flex-direction: column; align-items: flex-start; }
}
