/* ─── pages/faq.css ─ FAQ page only. The accordion itself lives in site.css. ── */

.faqpage { display: grid; grid-template-columns: .78fr 1.22fr; gap: 72px; align-items: start; padding: 64px 0 8px; }
.faq-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }

/* ── Search + category chips (shown only with JS) ──────────────────────────── */
.faq-tools { display: none; flex-direction: column; gap: 20px; }
.js .faq-tools { display: flex; }
.faq-search { position: relative; display: flex; align-items: center; background: var(--bg-elevated); border: 1px solid var(--brand); }
.faq-search i {
  display: block; flex-shrink: 0; width: 14px; height: 14px; margin-left: 12px; background: var(--brand);
  -webkit-mask: url('/assets/icons/search.svg') center/contain no-repeat;
  mask: url('/assets/icons/search.svg') center/contain no-repeat;
}
.faq-search input {
  flex: 1; min-width: 0; padding: 12px; background: none; border: none; outline: none;
  font: 400 13px/1 var(--font-mono); color: var(--fg-primary);
}
.faq-search input::placeholder { color: var(--fg-muted); }
.faq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 12px; cursor: pointer; background: none; border: 1px dashed var(--brand-line-strong);
  font: 700 11px/1 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--fg-secondary);
}
.chip:hover { color: var(--brand); }
.chip.on { background: var(--brand); border: 1px solid var(--brand); color: var(--ink); }
.faq-count { margin: 0; font: 400 12px/1 var(--font-mono); color: var(--fg-muted); }

/* ── Category headers + filtering ──────────────────────────────────────────── */
.faq-cat { margin: 0; padding: 40px 0 16px; font: 700 12px/1 var(--font-mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--hint); }
.faq-cat:first-child { padding-top: 20px; }
.faq-cat.hide, .faq-row.hide { display: none; }
.faq-empty { display: none; margin: 0; padding: 28px 2px; border-top: 1px dashed var(--brand-line); font: 400 13px/22px var(--font-mono); color: var(--fg-muted); }
.faq-empty.on { display: block; }

/* ── Rich answers: lists, tables, inline code ──────────────────────────────── */
.faq-a p { padding-bottom: 14px; }
.faq-a p:last-child { padding-bottom: 22px; }
.faq-a ol, .faq-a ul {
  display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; padding: 0 2px 0 66px; list-style: none;
  font: 400 13px/22px var(--font-mono); color: var(--fg-muted);
}
.faq-row { scroll-margin-top: 88px; }   /* deep-linked rows clear the sticky header */
.faq-a ul { list-style: square; }   /* bulleted lists carry no number in the text, unlike the ol items */
.faq-a ul li::marker { color: var(--brand); }
.faq-a code { font: inherit; color: var(--fg-secondary); }
.faq-a img { display: block; max-width: calc(100% - 48px); height: auto; margin: 0 2px 18px 46px; border: 1px dashed var(--brand-line); }
.faq-t { width: calc(100% - 48px); margin: 0 2px 18px 46px; border-collapse: collapse; border-top: 1px dashed var(--brand-line); font: 400 12px/1.3 var(--font-mono); }
.faq-t th, .faq-t td { padding: 9px 10px; border-bottom: 1px dashed var(--brand-line); text-align: left; vertical-align: top; color: var(--fg-muted); }
.faq-t th { font-weight: 700; letter-spacing: .6px; color: var(--fg-secondary); }
.faq-t tr:last-child td { border-bottom: none; }

@media (max-width:1040px) {
  .faqpage { grid-template-columns: 1fr; gap: 32px; padding: 44px 0 0; }
  .faq-side { position: static; }
}
@media (max-width:640px) {
  .faq-a p, .faq-a ol { padding-left: 2px; }
  .faq-a ul { padding-left: 20px; }   /* room for the bullet */
  .faq-a img { max-width: 100%; margin-left: 0; }
  .faq-t { width: 100%; margin-left: 0; display: block; overflow-x: auto; }
}
