/* ══════════════════════ OUTLIV — FAQ page (templates/faq.php) ══════════════════════
   Loads after custom.css (enqueue dependency), which already supplies
   .badge/.badge-row and the shared .faq-list/.faq-item* accordion — none of
   that is re-declared here.

   The categories section carries both `.faq-shell` and `.faqs-section` (so
   custom.js drives the accordion). `.faq-shell.faqs-section` below overrides
   the shared section's stone background + padding with this page's own. */

/* ═══════════════════ SECTION 1 — PAGE HEADER ═══════════════════ */
.faq-head {margin: 0 auto; padding: clamp(132px, 17vh, 172px) 0 clamp(20px, 3vh, 32px); text-align: center; }
.faq-head .badge-row { margin-bottom: 20px; }
.faq-head__title {
  font-family: var(--sans); font-weight: 500; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04;
  letter-spacing: -0.03em; color: var(--ink); margin: 0 auto; max-width: 16ch; text-wrap: balance;
}
.faq-head__sub {
  font-family: var(--sans); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; color: var(--ink-soft);
  margin: 16px auto 0; max-width: 52ch; text-wrap: pretty;
}
/* the intro is a WYSIWYG, so it arrives as <p>s — style.css gives every <p>
   ink colour, 16px and a bottom margin; make them follow the wrapper instead */
.faq-head__sub p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
.faq-head__sub p + p { margin-top: 10px; }
.faq-head__sub a { color: var(--accent); }
.faq-head__sub a:hover { color: var(--accent-hover); }

/* reveal — page-local (custom.css's .reveal is scoped to .faqs-section only) */
.faq-head .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.faq-head .reveal.in { opacity: 1; transform: none; }
.faq-head .reveal-d1 { transition-delay: 0.08s; }
.faq-head .reveal-d2 { transition-delay: 0.16s; }

/* ═══════════════════ TWO-COLUMN SHELL ═══════════════════ */
.faq-shell.faqs-section { background: var(--bg); padding: clamp(28px, 4vh, 44px) 0 clamp(80px, 12vh, 150px); }
.faq-shell__inner {
  width: min(1160px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: clamp(220px, 22vw, 268px) 1fr;
  gap: clamp(36px, 5vw, 80px); align-items: start;
}

/* ── sticky sidebar ── */
.faq-shell__aside {
  position: sticky; top: 104px;
  max-height: calc(100vh - 128px);
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin; scrollbar-color: rgba(12,12,13,0.22) transparent;
}
.faq-shell__aside::-webkit-scrollbar { width: 5px; }
.faq-shell__aside::-webkit-scrollbar-thumb { background: rgba(12,12,13,0.18); border-radius: 4px; }

.faq-shell .filter-group__title {
  font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3;
  color: var(--ink); margin: 0 0 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

/* category scroll-spy nav — same class names as What We Test's .cat-nav */
.cat-nav { display: flex; flex-direction: column; gap: 1px; }
.cat-nav__item {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 8px 2px 8px 0; font: inherit;
  font-family: var(--sans); font-size: 14.5px; font-weight: 500; line-height: 1.35; color: var(--ink-faint);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.cat-nav__item:hover { color: var(--ink-soft); }
.cat-nav__tick {
  width: 14px; height: 1.5px; background: currentColor; flex: none;
  opacity: 0; transform: scaleX(0.3); transform-origin: left;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.cat-nav__item.is-active { color: var(--ink); font-weight: 600; }
.cat-nav__item.is-active .cat-nav__tick { opacity: 1; transform: none; color: var(--accent); }
.cat-nav__count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

/* ═══════════════════ MAIN COLUMN — GROUPED CATEGORIES ═══════════════════ */
.faq-shell__main { min-width: 0; }
.faq-group { scroll-margin-top: 116px; padding-top: clamp(20px, 3vh, 36px); }
.faq-group:first-child { padding-top: 0; }
.faq-group + .faq-group { margin-top: clamp(40px, 6vh, 72px); }
.faq-group__head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: clamp(18px, 2.4vh, 26px);
}
/* margin/line-height set here so the heading doesn't depend on the bare h2 rule */
.faq-group__title {
  font-family: var(--sans); font-weight: 600; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.2;
  letter-spacing: -0.015em; color: var(--ink); margin: 0;
}
.faq-group__count {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--ink-faint);
  background: rgba(12,12,13,0.05); border-radius: 999px; padding: 3px 10px;
}

/* ── answers are WYSIWYG output: make <p>/<ul> follow .faq-item__a-inner's
   type instead of style.css's global ink/16px/margins ── */
.faq-shell .faq-item__a-inner p,
.faq-shell .faq-item__a-inner ul,
.faq-shell .faq-item__a-inner ol,
.faq-shell .faq-item__a-inner li { color: inherit; font-size: inherit; line-height: inherit; }
.faq-shell .faq-item__a-inner p { margin: 0; }
.faq-shell .faq-item__a-inner p + p,
.faq-shell .faq-item__a-inner ul + p,
.faq-shell .faq-item__a-inner ol + p { margin-top: 12px; }
.faq-shell .faq-item__a-inner ul,
.faq-shell .faq-item__a-inner ol { margin: 10px 0 0; padding: 0 0 0 20px; }
.faq-shell .faq-item__a-inner li { margin-bottom: 6px; line-height: 1.55; }
.faq-shell .faq-item__a-inner a { color: var(--accent); }
.faq-shell .faq-item__a-inner a:hover { color: var(--accent-hover); }

/* ─────────────────────────── RESPONSIVE ─────────────────────────── */
@media (max-width: 880px) {
  .faq-shell__inner { grid-template-columns: 1fr; gap: clamp(24px, 4vh, 36px); }
  .faq-shell__aside { position: static; top: auto; max-height: none; overflow: visible; padding-right: 0; }
  .cat-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .cat-nav__item {
    width: auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  }
  .cat-nav__tick { display: none; }
  .cat-nav__item.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
  .cat-nav__item.is-active .cat-nav__count { color: rgba(255,255,255,0.8); }
  .cat-nav__count { margin-left: 6px; }
}

/* Lumart, 12 Nov: category pills filter to one group at a time (faq-sections.js) */
.faq-group[hidden] { display: none; }
.faq-group:not([hidden]) { margin-top: 0; padding-top: 0; }
