/** * FAQ Tabs module — tabbed FAQ sections, behaviour keyed on attributes * v1.1.0 * * The FAQ section built for the pricing FAQ page (AW-20) is a tab bar over * panels of accordions. Its behaviour used to live in page-level custom code * and in class-keyed CSS, so every copy of the section broke: the tab script * stays behind in the source page's settings, and a pasted copy gets renamed * classes (`section_faq-accordion-arrow-2`) that the arrow rule no longer * matches (AW-109). This module replaces both, keyed on attributes only: * * [js-release-tab] section wrapper (any number per page) * [role="tab"] tab buttons, matched to panels by order * [role="tabpanel"] panels, only the active one is shown * [fs-accordion-element=arrow] accordion arrow: brand colour, flips open * * Grouped sections (v1.1, AW-109): a section built from one component per tab * (label prop + questions slot) has no tabs of its own. Each panel carries its * label, the tablist holds one template tab styled in the Designer, and the * module clones the template once per panel before it wires anything up. Tabs * and panels are then built from the same list, so they cannot drift apart: * * [role="tablist"] * [role="tab"][faq-tab-template] styled placeholder, label in its first child * [role="tabpanel"][faq-tab-label="…"] * * - First tab active on load, so only the first panel's first question shows * open (Haufe's accordion.js opens question 1 of every panel). * - Clicking a tab scrolls to that panel's first question, below the sticky * nav and the sticky tab menu. * - Arrow colour is `var(--brand)`, which the page's product theme sets * (Content Collection red, default purple). * - The accordion itself stays with Haufe's accordion.js (site footer). * * Load once from the SITE footer with