/* Vitrapep — sitewide accordion pattern
   Flat list with dotted dividers + small triangle indicator on the
   right. Two variants share the same trigger-row treatment:

     BORDERED (default) — outer 1px solid border + radius, dotted
       dividers INSIDE between items. Used when the accordion is a
       standalone module in main content (homepage FAQ, .faq page,
       product page FAQ).

     BARE — no outer border, just dotted lines top / between / bottom
       (full-bracket look). Used when the accordion lives inside an
       existing container that already provides framing (e.g. the
       legal-page sidebar TOC, .lg-toc__part).

   Trigger rows show a small CSS-drawn triangle on the right (▼ when
   closed, rotated 180° to ▲ when open). No SVG, no extra DOM —
   the triangle is a pseudo-element that inherits currentColor. */

/* ============================================================
   .faq3-* — categorized two-column accordion (bordered variant).
   Layout: sticky 260px sidebar of category filter chips on the
   left, bordered list of accordion items on the right.
   JS behaviour in scripts/product-page.js (data-faq-trigger,
   single-open, .open / .hidden class toggles).
   ============================================================ */

.faq3 {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

/* ---------- Sidebar (category chips + help box) ---------- */
.faq3-side { position: sticky; top: 100px; }
.faq3-side-eyebrow {
  font-family: var(--font-meta);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-2);
  margin-bottom: 14px;
}
.faq3-cats {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.faq3-cat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  text-align: left;
  transition: background var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.faq3-cat:hover { background: rgba(37,107,85,0.06); color: var(--ink); }
.faq3-cat.active { background: var(--blurple); color: #fff; }
.faq3-cat-count {
  font-family: var(--font-meta);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.faq3-cat.active .faq3-cat-count { opacity: 0.85; }
.faq3-help {
  background: linear-gradient(180deg, rgba(37,107,85,0.04), rgba(37,107,85,0.0));
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 18px;
}
.faq3-help-h { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.faq3-help p { font-size: 12px; color: var(--slate); line-height: 1.55; margin: 0 0 10px; }
.faq3-help-link {
  font-family: var(--font-meta);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--blurple);
  text-decoration: none;
}
.faq3-cats-select {
  display: none;
  width: 100%;
  padding: 12px 38px 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23638173' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 14px center / 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin-bottom: 4px;
  transition: border-color var(--dur-micro) var(--ease-out);
}
.faq3-cats-select:focus { outline: 0; border-color: var(--blurple); }

/* ---------- List container (bordered variant) ---------- */
.faq3-list {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

/* ---------- Item ---------- */
.faq3-item {
  border-top: 1px dotted var(--hairline-strong);
  transition: background var(--dur-micro) var(--ease-out);
}
.faq3-item:first-child { border-top: 0; }
.faq3-item.hidden { display: none; }

/* ---------- Trigger row (button) ---------- */
.faq3-q {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: color var(--dur-micro) var(--ease-out);
}
.faq3-q:hover { color: var(--blurple); }
.faq3-q:focus-visible {
  outline: 2px solid var(--blurple);
  outline-offset: -2px;
  border-radius: var(--r-sm);
}
.faq3-item.open .faq3-q { color: var(--ink); }

/* Category-tag pill removed from FAQ questions site-wide (kept in markup for
   data attribution / filtering, hidden visually + from the a11y tree). */
.faq3-q-tag {
  display: none;
  font-family: var(--font-meta);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-2);
  padding: 4px 8px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
}
.faq3-item.open .faq3-q-tag {
  color: var(--blurple);
  border-color: rgba(37,107,85,0.3);
  background: rgba(37,107,85,0.06);
}

.faq3-q-text {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Triangle indicator — CSS-drawn ▼ that rotates to ▲ on open.
   The existing SVG inside .faq3-q-icon is hidden; the triangle is
   drawn as an ::after pseudo so no markup change is needed. */
.faq3-q-icon {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink);
  background: none;
  border-radius: 0;
  transition: transform var(--dur-quick) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.faq3-q-icon::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
}
.faq3-q-icon svg { display: none; }
.faq3-item.open .faq3-q-icon { transform: rotate(180deg); }

/* ---------- Answer reveal ---------- */
.faq3-a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}
.faq3-item.open .faq3-a-wrap { grid-template-rows: 1fr; }
.faq3-a {
  overflow: hidden;
  padding: 0 20px;
  font-size: 14px;
  color: var(--slate);
  line-height: 1.65;
}
.faq3-a a {
  color: var(--blurple);
  text-decoration: none;
  border-bottom: 1px solid rgba(37,107,85,0.4);
}
.faq3-a a:hover { color: var(--electric); border-bottom-color: var(--electric); }
.faq3-item.open .faq3-a { padding: 0 20px 20px; }

/* ============================================================
   .lg-toc__part — legal-page sidebar TOC accordion (bare
   variant). Native <details>/<summary>, no JS.
   ============================================================ */

.lg-toc__part {
  margin: 0;
  padding: 0;
  border-top: 1px dotted var(--hairline-strong);
}
.lg-toc__part:first-of-type { border-top: 0; }
.lg-toc__part:last-of-type { border-bottom: 1px dotted var(--hairline-strong); }

.lg-toc__part summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 12px 4px;
  font-family: var(--font-meta);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-2);
  list-style: none;
  user-select: none;
  line-height: 1.3;
  transition: color var(--dur-micro) var(--ease-out);
}
.lg-toc__part summary::-webkit-details-marker { display: none; }
.lg-toc__part summary:hover { color: var(--ink); }
.lg-toc__part summary:focus-visible {
  outline: 2px solid var(--blurple);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Triangle indicator — matches .faq3-q-icon. */
.lg-toc__part summary::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform var(--dur-quick) var(--ease-out);
  flex-shrink: 0;
}
.lg-toc__part[open] summary::after { transform: rotate(180deg); }

/* Nested links inside an open <details>. */
.lg-toc__part > .lg-toc__link {
  margin-top: 2px;
  padding-left: 4px;
}
.lg-toc__part[open] {
  padding-bottom: 8px;
}

/* ============================================================
   Mobile (≤980px) — .faq3 collapses to single column, sidebar
   becomes a category <select>, item padding tightens. The 980px
   breakpoint matches the page-level tablet tier so the FAQ goes
   single-column at the same width as the rest of the page chrome.
   ============================================================ */
@media (max-width: 980px) {
  .faq3 { grid-template-columns: 1fr; gap: 16px; }
  .faq3-side { position: static; }
  .faq3-side-eyebrow { display: none; }
  .faq3-cats { display: none; }
  .faq3-cats-select { display: block; }
  .faq3-help { display: none; }
  .faq3-q {
    padding: 16px 18px;
    gap: 12px;
    grid-template-columns: 1fr auto;
  }
  .faq3-q-tag { display: none; }
  .faq3-q-icon { justify-self: end; }
  .faq3-q-text { font-size: 14.5px; }
  .faq3-a { padding: 0 18px; }
  .faq3-item.open .faq3-a { padding: 0 18px 18px; }
  .pp-section[aria-label="FAQ"] .link-arrow { display: none; }
}

/* ============================================================
   FAQ section padding — ONE canonical vertical rhythm sitewide.
   Every .pp-section[aria-label="FAQ"] matches the homepage template
   (100px desktop / 64px mobile, top + bottom) regardless of each
   page's base .pp-section padding (homepage 100/100, faq.html 56/96,
   product 80/80 + inline padding-top:0). Higher specificity than the
   bare .pp-section rule so it wins everywhere it's loaded. Side
   padding is left to each page's base (already 40px / 20px).
   ============================================================ */
.pp-section[aria-label="FAQ"] { padding-top: 100px; padding-bottom: 100px; }
@media (max-width: 980px) {
  .pp-section[aria-label="FAQ"] { padding-top: 64px; padding-bottom: 64px; }
}
