// TapScan Accountability page (accountability.html): the execution and verification side of TapScan. It explains how
// QR codes and NFC tags on displays, signage, assets and products become a live, verified record of what is happening in
// the field (photo proof, location and time), what a team can verify, where it applies (retail displays and signage,
// dealerships, on-premise, seasonal campaigns), how it reaches past retail into supply chain traceability and service workflows,
// and what the reporting looks like (an example dashboard built from made-up numbers). Colours are the brand light
// blue (#6976E7) with the main blue (#2F3886) as the accent; the brand orange belongs to the Experience side.
//
// Facts come from copy already on the site (homepage Accountability section, the homepage FAQ, the four Accountability
// case studies). ACCOUNTABILITY_UPDATED is shown to tools/seo.js (sitemap date); ACCOUNTABILITY_FAQ is rendered at the
// bottom and tools/seo.js turns the same array into FAQPage markup, so the markup always matches what visitors can read.
// Answer blocks: { p: "paragraph" }, { ul: [ "item" | ["Bold label", "text"] ] } or { link: ["Label", "page path"] }.

const ACCOUNTABILITY_UPDATED = "November 17, 2026";

const ACCOUNTABILITY_FAQ = [
  {
    q: "What is TapScan Accountability?",
    a: [
      { p: "TapScan Accountability is a retail execution and field verification solution that turns QR codes and NFC tags into a live, verified record of what is happening in the real world. Placed on displays, signage, packaging, assets and products, a TapScan code lets installers, store teams, distributors and field reps confirm that work was done, with photo proof, location and time." },
      { p: "Every submission feeds a real-time dashboard, so brand, sales and marketing teams can see where programs are live, find gaps while there is still time to fix them and connect execution to results. TapScan Accountability is one of TapScan’s connected systems, alongside TapScan Experience, which handles what customers see when they scan." },
      { link: ["See how brands use it in our Accountability case studies", "case-studies.html?tab=accountability"] },
    ],
  },
  {
    q: "What results have brands achieved with TapScan Accountability?",
    a: [
      { p: "Brands use TapScan Accountability to replace scattered emails, photos and manual check-ins with one live view of execution. Across our Accountability case studies, the outcomes include:" },
      { ul: [
        ["Beverage alcohol:", "real-time visibility into display participation, quality and speed of rollout across major chains and independent retailers, plus cross-brand reporting that supports joint investment decisions and performance-based incentive programs."],
        ["Snacks and confectionery:", "live confirmation that semi-permanent displays were installed as intended across participating supermarkets, backed by step-by-step installation guidance and photo documentation."],
        ["Sports and athletics:", "one centralized view of every retail installation, quicker responses to placement and fit concerns, and a framework that can tie execution to sales by location."],
        ["Automotive dealerships:", "geo-verified installation photos in a single dashboard, faster corrections while the campaign was still running, and more consistent execution across locations."],
      ] },
      { link: ["Read the Accountability case studies", "case-studies.html?tab=accountability"] },
    ],
  },
  {
    q: "How does TapScan verify that a display or asset was installed correctly?",
    a: [
      { p: "A TapScan QR code or NFC tag is placed on the display kit, asset or package. When an installer or store team member arrives, they scan it and TapScan opens a short, guided workflow on their phone. It can show step-by-step placement and assembly instructions, then ask for a photo and any notes to confirm the setup." },
      { p: "Each submission is time-stamped and tied to the correct brand, location and campaign, and location data and geo-verified photos can confirm that the work happened at the right site. Together they create a reliable proof-of-execution record. Teams review photos and completion data on the dashboard instead of chasing emails, spreadsheets and scattered images." },
    ],
  },
  {
    q: "What can TapScan Accountability track and report?",
    a: [
      { p: "TapScan Accountability gives you a live view of execution across stores, retail chains, distributors and regions. Typical reporting includes:" },
      { ul: [
        ["Asset activations,", "showing which displays, signage and materials were actually installed, by store and retail chain."],
        ["Photo-verified execution,", "with photo proof, location and time for every installation."],
        ["Damage and issue reports,", "including the type of damage and the assets affected."],
        ["Takedown and close-out,", "confirming that materials were removed or replaced when a campaign ended."],
        ["Compliance over time,", "by program, asset type, region and store."],
        ["Field team performance,", "with leaderboards by distributor, sales rep, chain and store."],
      ] },
      { p: "Because every record is tied to a brand, a location and a campaign, you can compare programs and see which assets, stores and regions are driving results." },
    ],
  },
  {
    q: "How is TapScan Accountability different from manual reporting, spreadsheets and email check-ins?",
    a: [
      { p: "Manual reporting depends on people sending photos and updates after the fact, so the picture is always late, incomplete and hard to compare. TapScan captures verification at the moment the work happens, directly from the field and in one consistent format." },
      { p: "The result is one centralized dashboard instead of scattered emails, a time-stamped, location-aware record instead of assumptions, and the chance to correct problems while a program is still in market. It also lightens the load on field teams, who simply scan and confirm." },
    ],
  },
  {
    q: "Do field teams need an app or special hardware?",
    a: [
      { p: "No. Installers, store teams, distributors and reps scan a TapScan QR code with their phone’s built-in camera, or tap an NFC tag with an NFC-enabled phone, and the workflow opens in their mobile browser. TapScan works without apps, scanners or other hardware, and without changes to how teams already work, which makes it practical to roll out across large networks of stores, dealerships and partners." },
    ],
  },
  {
    q: "What types of assets and programs can TapScan Accountability be used for?",
    a: [
      { p: "TapScan Accountability works for any physical asset or workflow that needs proof it happened. Common uses include:" },
      { ul: [
        ["Merchandising displays,", "such as floor displays, endcaps, racks, bins and case stackers, whether disposable or semi-permanent."],
        ["Signage and point-of-sale materials,", "including shelf talkers, wobblers, header boards and window clings."],
        ["Dealership and showroom materials,", "such as standees, brochures, tent cards and window stickers."],
        ["On-premise programs,", "including menus, table tents and bar kits."],
        ["Seasonal and regional campaigns,", "to make sure the right materials are in the right place at the right time."],
        ["Store kits and install packages,", "with a code on each package so installers scan on arrival and see what that location needs."],
        ["Supply chain and traceability,", "with batch and lot records and handoff checkpoints."],
        ["Service and support workflows,", "such as returns, warranty claims and issue reporting."],
      ] },
      { p: "If a physical item can carry a QR code or NFC tag, TapScan can turn it into a trackable, verifiable record." },
    ],
  },
  {
    q: "Can TapScan Accountability support supply chain traceability and FSMA 204?",
    a: [
      { p: "Yes. TapScan can record batch, lot and production-run identifiers, validate handoffs between facilities, distributors and retailers, and add quality assurance checkpoints. Together they create a digital view of product movement from supplier to distributor to retail, with traceability records aligned with FSMA 204." },
      { p: "A code on its own does not create traceability. Its value depends on the quality of the connected product data and systems behind it, so TapScan connects to your supply chain and traceability databases. The same records can support authenticity, origin, provenance and sustainability stories. Many organizations use TapScan alongside RFID and other logistics tools, because anyone with a smartphone can scan a code, with no extra hardware." },
    ],
  },
  {
    q: "Does TapScan Accountability integrate with the systems we already use?",
    a: [
      { p: "Yes. TapScan is a lightweight, API-ready layer that integrates with CRM systems such as Salesforce and HubSpot, distributor data feeds, retailer data portals, ERP and inventory systems, loyalty and membership platforms, and supply chain and traceability databases." },
      { p: "You can also export raw data or connect TapScan to BI tools such as Power BI, Tableau and Looker for deeper analysis. Integration can be as simple or as advanced as your team prefers." },
    ],
  },
  {
    q: "How quickly can we launch TapScan Accountability?",
    a: [
      { p: "Most organizations can launch TapScan within two to four weeks, depending on the number of programs, the complexity of the partner network, whether custom workflows or APIs are needed and how many distributors, vendors and field teams need onboarding. Pilot programs can be activated in days." },
      { p: "Programs are configured with a TapScan representative so the workflow, reporting and validation rules match your goals. Rollouts can be phased regionally, nationally or globally." },
    ],
  },
];

// Icons added for this page (the shared set below is reused from the Experience page).
const AC_EXTRA_ICONS = {
  camera: <React.Fragment><path d="M4 8h3l1.5-2.5h7L17 8h3v11H4V8z" /><circle cx="12" cy="13.5" r="3.3" /></React.Fragment>,
  check: <React.Fragment><circle cx="12" cy="12" r="9" /><polyline points="7.8 12.3 10.8 15.2 16.4 9.2" /></React.Fragment>,
  alert: <React.Fragment><path d="M12 3.5L21.5 20h-19L12 3.5z" /><line x1="12" y1="10" x2="12" y2="14.5" /><line x1="12" y1="17.3" x2="12" y2="17.4" /></React.Fragment>,
  shield: <React.Fragment><path d="M12 3l7.5 3v5.5c0 4.7-3.2 8.2-7.5 9.5-4.3-1.3-7.5-4.8-7.5-9.5V6L12 3z" /><polyline points="8.6 12 11 14.4 15.6 9.6" /></React.Fragment>,
  takedown: <React.Fragment><path d="M4 8h16v12H4V8z" /><path d="M4 8l2-4h12l2 4" /><line x1="12" y1="11" x2="12" y2="17" /><polyline points="9.5 14.5 12 17 14.5 14.5" /></React.Fragment>,
  eye: <React.Fragment><path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z" /><circle cx="12" cy="12" r="2.8" /></React.Fragment>,
  truck: <React.Fragment><rect x="2.5" y="6.5" width="11" height="9" rx="1" /><path d="M13.5 9.5h4l3 3.2v2.8h-7" /><circle cx="7" cy="17.5" r="1.9" /><circle cx="17" cy="17.5" r="1.9" /></React.Fragment>,
  headset: <React.Fragment><path d="M4.5 13v-1.5a7.5 7.5 0 0 1 15 0V13" /><rect x="3.5" y="13" width="3.5" height="5.5" rx="1.2" /><rect x="17" y="13" width="3.5" height="5.5" rx="1.2" /><path d="M19 18.5c0 1.5-2 2.5-5 2.5" /></React.Fragment>,
  plug: <React.Fragment><path d="M9.5 14.5l5-5" /><path d="M11 6.8l1.1-1.1a3.8 3.8 0 0 1 5.4 5.4L16.4 12" /><path d="M13 17.2l-1.1 1.1a3.8 3.8 0 0 1-5.4-5.4L7.6 12" /></React.Fragment>,
  minus: <line x1="6" y1="12" x2="18" y2="12" />,
  clipboard: <React.Fragment><rect x="5" y="4.5" width="14" height="16.5" rx="2" /><path d="M9 4.5V3h6v1.5" /><polyline points="8.8 12.4 10.8 14.4 15.2 9.8" /></React.Fragment>,
};

const AC_BENEFITS = [
  { icon: "eye", title: "See every activation live", text: "Know where campaigns, displays, signage and assets are active across every location, without waiting for reports, spreadsheets or field updates." },
  { icon: "shield", title: "Verify execution with proof", text: "Photo validation, location data, timestamps and completion records confirm that every activation happened as intended." },
  { icon: "alert", title: "Spot gaps before they cost you", text: "Uncover missing assets, execution failures and rollout inconsistencies while there is still time to fix them." },
  { icon: "chart", title: "Turn execution into ROI intelligence", text: "Act while programs are in market, reduce waste and understand which assets, stores, regions and campaigns drive results." },
];

// Where TapScan Accountability is used in the field. Wording follows the touchpoint list on the homepage FAQ and the
// four Accountability case studies (displays, window clings, dealership materials, store kits, seasonal campaigns) and the homepage FAQ.
const AC_APPLIES = [
  { icon: "shelf", title: "Merchandising displays", text: "Confirm that floor displays, endcaps, racks and bins were set up correctly, in the right stores and on time, whether they are disposable or semi-permanent." },
  { icon: "sign", title: "Signage and POS materials", text: "Verify that shelf talkers, wobblers, header boards and window clings were installed to spec, with photo proof from the aisle." },
  { icon: "package", title: "Store kits and install packages", text: "Put a code on each store package, so installers scan on arrival and see which assets, sizes and placements that location needs." },
  { icon: "shop", title: "Dealership and showroom materials", text: "Check that standees, brochures, tent cards and window stickers are displayed as intended in every location, with geo-verified photos." },
  { icon: "print", title: "On-premise programs", text: "Confirm that menus, table tents, bar kits and point-of-sale materials are in place at bars and restaurants, with a quick scan." },
  { icon: "clock", title: "Seasonal and regional campaigns", text: "Make sure the right materials are in the right place at the right time for seasonal pushes and regional or event-driven campaigns." },
];

const AC_CAPS = [
  { icon: "camera", title: "Photo proof", text: "Installers and store teams upload photos from the aisle, so every activation has visual evidence instead of a simple checkbox.", eg: "A photo of the finished endcap appears on the dashboard." },
  { icon: "pin", title: "Location verification", text: "Location data and geo-verified photos can confirm that the work happened at the right store or dealership, not somewhere else.", eg: "An install is logged against the correct store, with its location data." },
  { icon: "clock", title: "Time-stamped records", text: "Every submission is time-stamped and tied to the right brand, location and campaign, giving you a dependable record of when work was done.", eg: "A display confirmed on launch day is recorded with that day’s date." },
  { icon: "clipboard", title: "Guided workflows", text: "A scan opens step-by-step placement and assembly instructions, so every site follows the same standard.", eg: "A crew scans the display kit and sees exactly how to assemble and place it." },
  { icon: "alert", title: "Damage and issue reporting", text: "Teams flag a damaged, missing or wrongly sized asset on the spot, with a photo and notes, instead of chasing emails and phone calls.", eg: "An installer reports a torn header board and the brand team sees it right away." },
  { icon: "takedown", title: "Takedown and close-out", text: "Confirm that materials were removed or replaced when a campaign ends, so nothing outdated stays on the floor.", eg: "A crew confirms that a window cling was removed on the end date." },
];

const AC_SCENARIOS = [
  { icon: "tools", who: "An installer at a store", where: "Scans the code on the display kit", what: "Step-by-step guidance, then a photo that confirms the display is set up correctly." },
  { icon: "alert", who: "An installer on site", where: "Scans the code and flags a wrong-size or damaged asset", what: "A report with a photo and notes goes straight to the campaign dashboard, so the brand can respond quickly." },
  { icon: "users", who: "A distributor rep", where: "Scans the code after setting up a floor display", what: "The activation is verified and time-stamped, and credited to the rep on the leaderboard." },
  { icon: "takedown", who: "A crew at campaign end", where: "Scans the code as a display comes down", what: "The takedown is confirmed, so the dashboard shows that store as closed out." },
];

// Example dashboards shown in section 05, one per stage of a program. Every number is invented for illustration (same
// approach as the example dashboards on the case study pages and on the Experience page) and must never be presented as
// real client data. Within each dashboard the numbers are kept consistent: each count chart adds up to that dashboard's
// headline total, and the insights are worked out from the chart values. Keep the figures looking like real counts.
const AC_DASHBOARDS = [
  {
    id: "execution", icon: "shield", tab: "Asset execution",
    desc: "Displays and signage confirmed in store, with photo proof, location and time.",
    kpis: [
      { to: 5862, suf: "", dec: 0, l: "Verified activations" },
      { to: 92, suf: "%", dec: 0, l: "Verification rate" },
      { to: 214, suf: "", dec: 0, l: "Retail locations covered" },
      { to: 2.8, suf: " days", dec: 1, l: "Average time to activate" },
    ],
    charts: [
      { kind: "line", title: "Verified Activations Per Week.", data: [
        { label: "W1", value: 412 }, { label: "W2", value: 598 }, { label: "W3", value: 731 }, { label: "W4", value: 804 },
        { label: "W5", value: 846 }, { label: "W6", value: 903 }, { label: "W7", value: 868 }, { label: "W8", value: 700 },
      ] },
      { kind: "donut", title: "Activations by Asset Type.", data: [
        { label: "Floor displays", value: 2141 }, { label: "Endcaps", value: 1718 },
        { label: "Case stackers", value: 1162 }, { label: "Shelf talkers", value: 841 },
      ] },
      { kind: "hbar", title: "Activations by Retail Chain.", data: [
        { label: "Chain A", value: 1874 }, { label: "Chain B", value: 1521 }, { label: "Chain C", value: 1263 },
        { label: "Chain D", value: 784 }, { label: "Independents", value: 420 },
      ] },
      { kind: "vbar", title: "Activations by Region.", data: [
        { label: "Northeast", value: 1436 }, { label: "Midwest", value: 1189 }, { label: "Southeast", value: 1057 },
        { label: "Southwest", value: 903 }, { label: "West", value: 1277 },
      ] },
    ],
    insights: [
      "Floor displays and endcaps made up about 66% of verified activations.",
      "Chain A and Chain B together accounted for about 58% of activations.",
      "Weekly verifications climbed from 412 in week 1 to a peak of 903 in week 6, as the rollout reached more stores.",
    ],
  },
  {
    id: "damage", icon: "alert", tab: "Damage reporting",
    desc: "Damaged or missing assets reported from the aisle, with photos and notes.",
    kpis: [
      { to: 387, suf: "", dec: 0, l: "Damage reports filed" },
      { to: 81, suf: "%", dec: 0, l: "Resolved within 48 hours" },
      { to: 96, suf: "", dec: 0, l: "Locations reporting" },
      { to: 1.6, suf: " days", dec: 1, l: "Average time to resolve" },
    ],
    charts: [
      { kind: "line", title: "Damage Reports Per Week.", data: [
        { label: "W1", value: 21 }, { label: "W2", value: 33 }, { label: "W3", value: 41 }, { label: "W4", value: 52 },
        { label: "W5", value: 58 }, { label: "W6", value: 64 }, { label: "W7", value: 61 }, { label: "W8", value: 57 },
      ] },
      { kind: "donut", title: "Reports by Damage Type.", data: [
        { label: "Torn or bent", value: 142 }, { label: "Missing parts", value: 103 },
        { label: "Water damage", value: 74 }, { label: "Faded or defaced", value: 68 },
      ] },
      { kind: "hbar", title: "Reports by Asset Type.", data: [
        { label: "Floor displays", value: 124 }, { label: "Endcaps", value: 92 }, { label: "Shelf talkers", value: 71 },
        { label: "Window clings", value: 56 }, { label: "Header boards", value: 44 },
      ] },
      { kind: "vbar", title: "Reports by Region.", data: [
        { label: "Northeast", value: 96 }, { label: "Midwest", value: 71 }, { label: "Southeast", value: 88 },
        { label: "Southwest", value: 54 }, { label: "West", value: 78 },
      ] },
    ],
    insights: [
      "Floor displays and endcaps accounted for about 56% of all damage reports.",
      "Torn or bent assets were the most common issue, at about 37% of reports.",
      "Reports peaked at 64 in week 6, which gave the team time to send replacements while the campaign was still running.",
    ],
  },
  {
    id: "takedown", icon: "takedown", tab: "Asset takedown",
    desc: "Materials confirmed removed or replaced when a campaign ends.",
    kpis: [
      { to: 4926, suf: "", dec: 0, l: "Takedowns confirmed" },
      { to: 94, suf: "%", dec: 0, l: "Completed on schedule" },
      { to: 173, suf: "", dec: 0, l: "Locations closed out" },
      { to: 1.9, suf: " days", dec: 1, l: "Average time after campaign end" },
    ],
    charts: [
      { kind: "line", title: "Takedowns Confirmed Per Week.", data: [
        { label: "W1", value: 188 }, { label: "W2", value: 312 }, { label: "W3", value: 487 }, { label: "W4", value: 701 },
        { label: "W5", value: 912 }, { label: "W6", value: 1038 }, { label: "W7", value: 806 }, { label: "W8", value: 482 },
      ] },
      { kind: "donut", title: "Takedowns by Asset Type.", data: [
        { label: "Floor displays", value: 1821 }, { label: "Endcaps", value: 1413 },
        { label: "Case stackers", value: 947 }, { label: "Window clings", value: 745 },
      ] },
      { kind: "hbar", title: "Takedowns by Retail Chain.", data: [
        { label: "Chain A", value: 1462 }, { label: "Chain B", value: 1208 }, { label: "Chain C", value: 1087 },
        { label: "Chain D", value: 643 }, { label: "Independents", value: 526 },
      ] },
      { kind: "vbar", title: "Takedowns by Region.", data: [
        { label: "Northeast", value: 1124 }, { label: "Midwest", value: 968 }, { label: "Southeast", value: 947 },
        { label: "Southwest", value: 802 }, { label: "West", value: 1085 },
      ] },
    ],
    insights: [
      "Floor displays and endcaps made up about 66% of takedowns.",
      "Confirmations peaked at 1,038 in week 6, then tapered off as stores finished closing out.",
      "Chain A and Chain B together accounted for about 54% of takedowns.",
    ],
  },
  {
    id: "teams", icon: "users", tab: "Field team performance",
    desc: "Activations by distributor, field team and day, with a view of who is delivering.",
    kpis: [
      { to: 3418, suf: "", dec: 0, l: "Verified activations" },
      { to: 88, suf: "%", dec: 0, l: "Compliance rate" },
      { to: 4, suf: "", dec: 0, l: "Distributors reporting" },
      { to: 37, suf: "", dec: 0, l: "Field reps active" },
    ],
    charts: [
      { kind: "line", title: "Verified Activations Per Week.", data: [
        { label: "W1", value: 291 }, { label: "W2", value: 366 }, { label: "W3", value: 402 }, { label: "W4", value: 449 },
        { label: "W5", value: 471 }, { label: "W6", value: 483 }, { label: "W7", value: 492 }, { label: "W8", value: 464 },
      ] },
      { kind: "donut", title: "Activations by Distributor.", data: [
        { label: "Distributor A", value: 1126 }, { label: "Distributor B", value: 934 },
        { label: "Distributor C", value: 718 }, { label: "Distributor D", value: 640 },
      ] },
      { kind: "hbar", title: "Activations by Field Team.", data: [
        { label: "Team 1", value: 893 }, { label: "Team 2", value: 812 }, { label: "Team 3", value: 701 },
        { label: "Team 4", value: 604 }, { label: "Team 5", value: 408 },
      ] },
      { kind: "vbar", title: "Activations by Day of Week.", data: [
        { label: "Mon", value: 702 }, { label: "Tue", value: 689 }, { label: "Wed", value: 644 }, { label: "Thu", value: 566 },
        { label: "Fri", value: 417 }, { label: "Sat", value: 263 }, { label: "Sun", value: 137 },
      ] },
    ],
    insights: [
      "Distributor A and Distributor B delivered about 60% of all activations.",
      "Team 1 and Team 2 together completed about half of the verified activations.",
      "Monday and Tuesday were the busiest days, with about 41% of activations.",
    ],
  },
];

const AC_COMPARE = [
  { topic: "Visibility", before: "Updates arrive late, by email and spreadsheet.", after: "A live dashboard shows every location as it happens." },
  { topic: "Proof", before: "Scattered photos, with no way to check where or when they were taken.", after: "Photo proof with a time stamp and location data for every activation." },
  { topic: "Problems", before: "Gaps are found after the campaign has ended.", after: "Gaps and damage are flagged while the program is still in market." },
  { topic: "Field effort", before: "Calls, emails and manual reports from the field.", after: "One scan and a photo from the person on site." },
  { topic: "Reporting", before: "Hard to compare stores, chains and distributors.", after: "One consistent record to compare programs, assets and regions." },
];

const AC_STEPS = [
  { n: "01", title: "Scan", text: "An installer, store team member or field rep scans the QR code or taps the NFC tag on a display, asset or product." },
  { n: "02", title: "Verify", text: "TapScan records photo proof, location and time, tied to the right brand, store and campaign." },
  { n: "03", title: "Act", text: "Watch results on a live dashboard, fix gaps while the program is in market and use the data to prove ROI." },
];

// "On this page" navigator in the hero. Labels follow each section's eyebrow, in page order.
const AC_TOC = [
  ["why", "Why it matters"],
  ["how-it-works", "How it works"],
  ["capabilities", "What you can verify"],
  ["applies", "Where it applies"],
  ["results", "Example dashboard"],
  ["beyond", "Beyond retail"],
  ["compare", "The difference"],
  ["faq", "FAQ"],
];


function acRenderBlocks(blocks) {
  return blocks.map((b, i) => b.ul ? (
    <ul key={i}>
      {b.ul.map((li, j) => (
        <li key={j}>{Array.isArray(li) ? <React.Fragment><strong>{li[0]}</strong>{" "}{li[1]}</React.Fragment> : li}</li>
      ))}
    </ul>
  ) : b.link ? (
    <p key={i}><a href={b.link[1]}>{b.link[0]}</a></p>
  ) : <p key={i}>{b.p}</p>);
}

// One collapsible question. The answer height is measured so it expands fully, and the answer stays in the page HTML
// while collapsed (data-prerender-keep keeps it in the saved crawler copy), so search engines and AI crawlers can read it.
function AcFaqItem({ q, a, i, isOpen, onToggle }) {
  const bodyRef = React.useRef(null);
  const [maxH, setMaxH] = React.useState(0);
  React.useEffect(() => {
    const el = bodyRef.current;
    if (!el) return;
    const measure = () => setMaxH(el.scrollHeight);
    measure();
    window.addEventListener("resize", measure);
    let ro;
    if ("ResizeObserver" in window) { ro = new ResizeObserver(measure); ro.observe(el); }
    return () => { window.removeEventListener("resize", measure); if (ro) ro.disconnect(); };
  }, [isOpen]);
  const handleClick = (e) => {
    if (e.target.closest && e.target.closest("a")) return;
    const sel = window.getSelection ? String(window.getSelection()) : "";
    if (sel.length > 0 && e.target.closest && e.target.closest(".ts-ac-acc-a")) return;
    onToggle();
  };
  return (
    <div className={"ts-ac-acc-item" + (isOpen ? " is-open" : "")} onClick={handleClick}>
      <h3 className="ts-ac-acc-h">
        <button type="button" className="ts-ac-acc-q" id={"ac-faq-q-" + i} aria-expanded={isOpen} aria-controls={"ac-faq-a-" + i}>
          <span className="ts-ac-acc-q-text">{q}</span>
          <span className="ts-ac-acc-icon" aria-hidden="true">+</span>
        </button>
      </h3>
      <div id={"ac-faq-a-" + i} role="region" aria-labelledby={"ac-faq-q-" + i} aria-hidden={!isOpen} data-prerender-keep className="ts-ac-acc-a" style={{
        maxHeight: isOpen ? maxH : 0, visibility: isOpen ? "visible" : "hidden",
        transition: "max-height 360ms cubic-bezier(0.2,0.8,0.2,1), visibility 0s linear " + (isOpen ? "0s" : "360ms"),
      }}>
        <div ref={bodyRef} className="ts-ac-acc-a-in">{acRenderBlocks(a)}</div>
      </div>
    </div>
  );
}

// Simple outline icons (24 x 24, drawn with the current text colour).
const AC_ICONS = {
  store: <React.Fragment><path d="M6 8h12l-1 12H7L6 8z" /><path d="M9 8a3 3 0 0 1 6 0" /></React.Fragment>,
  home: <path d="M4 11l8-7 8 7v9a1 1 0 0 1-1 1h-4v-6H9v6H5a1 1 0 0 1-1-1v-9z" />,
  phone: <React.Fragment><rect x="7" y="2.5" width="10" height="19" rx="2.2" /><line x1="11" y1="18.5" x2="13" y2="18.5" /></React.Fragment>,
  zap: <path d="M13 2.5L4.5 14H11l-1 7.5L19.5 10H13l0-7.5z" />,
  chart: <React.Fragment><line x1="5" y1="20" x2="5" y2="13" /><line x1="12" y1="20" x2="12" y2="5" /><line x1="19" y1="20" x2="19" y2="10" /></React.Fragment>,
  refresh: <React.Fragment><path d="M20 11a8 8 0 0 0-14-4.5L4 9" /><polyline points="4 4 4 9 9 9" /><path d="M4 13a8 8 0 0 0 14 4.5L20 15" /><polyline points="20 20 20 15 15 15" /></React.Fragment>,
  globe: <React.Fragment><circle cx="12" cy="12" r="9" /><path d="M3 12h18" /><path d="M12 3c3 3.4 3 14.6 0 18" /><path d="M12 3c-3 3.4-3 14.6 0 18" /></React.Fragment>,
  pin: <React.Fragment><path d="M12 21s-7-6.1-7-11a7 7 0 0 1 14 0c0 4.9-7 11-7 11z" /><circle cx="12" cy="10" r="2.5" /></React.Fragment>,
  shop: <React.Fragment><path d="M4 9l1.6-5h12.8L20 9" /><path d="M4 9v11h16V9" /><path d="M4 9a2.7 2.7 0 0 0 5.3 0 2.7 2.7 0 0 0 5.4 0A2.7 2.7 0 0 0 20 9" /><path d="M9.5 20v-5.5h5V20" /></React.Fragment>,
  clock: <React.Fragment><circle cx="12" cy="12" r="9" /><polyline points="12 7 12 12 15.5 14" /></React.Fragment>,
  tag: <React.Fragment><path d="M3.5 12.5V4.5h8l9 9-8 8-9-9z" /><circle cx="8" cy="9" r="1.3" /></React.Fragment>,
  layers: <React.Fragment><path d="M12 3.5l8.5 4.5L12 12.5 3.5 8 12 3.5z" /><path d="M3.5 12.5L12 17l8.5-4.5" /><path d="M3.5 16.5L12 21l8.5-4.5" /></React.Fragment>,
  spark: <path d="M12 3l1.9 5.4L19.5 10l-5.6 1.7L12 17.5l-1.9-5.8L4.5 10l5.6-1.6L12 3z" />,
  qr: <React.Fragment><rect x="3.5" y="3.5" width="7" height="7" rx="1" /><rect x="13.5" y="3.5" width="7" height="7" rx="1" /><rect x="3.5" y="13.5" width="7" height="7" rx="1" /><path d="M14 14h2.5v2.5H14z M18 14h2.5 M14 18h2.5 M18 18v2.5 M20.5 17v0" /></React.Fragment>,
  nfc: <React.Fragment><path d="M8 8.5a5.5 5.5 0 0 1 0 7" /><path d="M11.5 6a9.5 9.5 0 0 1 0 12" /><path d="M15 3.5a13.5 13.5 0 0 1 0 17" /></React.Fragment>,
  package: <React.Fragment><path d="M3.5 7.5L12 3l8.5 4.5v9L12 21l-8.5-4.5v-9z" /><path d="M3.5 7.5L12 12l8.5-4.5" /><line x1="12" y1="12" x2="12" y2="21" /></React.Fragment>,
  shelf: <React.Fragment><line x1="3" y1="20.5" x2="21" y2="20.5" /><rect x="5" y="10" width="5" height="10.5" rx="0.8" /><rect x="14" y="5" width="5" height="15.5" rx="0.8" /></React.Fragment>,
  sign: <React.Fragment><line x1="12" y1="3" x2="12" y2="21" /><rect x="5" y="5" width="14" height="8" rx="1.5" /><line x1="8" y1="21" x2="16" y2="21" /></React.Fragment>,
  print: <React.Fragment><rect x="5.5" y="3" width="13" height="18" rx="1.5" /><line x1="9" y1="8" x2="15" y2="8" /><line x1="9" y1="12" x2="15" y2="12" /><line x1="9" y1="16" x2="12.5" y2="16" /></React.Fragment>,
  billboard: <React.Fragment><rect x="3" y="4" width="18" height="10" rx="1.5" /><line x1="8" y1="14" x2="8" y2="20.5" /><line x1="16" y1="14" x2="16" y2="20.5" /><line x1="6.5" y1="20.5" x2="17.5" y2="20.5" /></React.Fragment>,
  tv: <React.Fragment><rect x="3" y="5" width="18" height="12" rx="2" /><line x1="8" y1="21" x2="16" y2="21" /><line x1="12" y1="17" x2="12" y2="21" /></React.Fragment>,
  ads: <React.Fragment><rect x="3" y="4" width="18" height="16" rx="2" /><line x1="3" y1="9" x2="21" y2="9" /><circle cx="6.5" cy="6.5" r="0.6" /><rect x="7" y="12" width="10" height="5" rx="1" /></React.Fragment>,
  users: <React.Fragment><circle cx="9" cy="8" r="3" /><path d="M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6" /><circle cx="17" cy="9" r="2.5" /><path d="M16.2 14.1c2.8.2 4.8 2.5 4.8 5.9" /></React.Fragment>,
  tools: <path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" />,
  pause: <React.Fragment><line x1="9" y1="5" x2="9" y2="19" /><line x1="15" y1="5" x2="15" y2="19" /></React.Fragment>,
  play: <polygon points="7 4 20 12 7 20 7 4" />,
  arrowL: <React.Fragment><line x1="21" y1="12" x2="4" y2="12" /><polyline points="10 6 4 12 10 18" /></React.Fragment>,
  arrowR: <React.Fragment><line x1="3" y1="12" x2="20" y2="12" /><polyline points="14 6 20 12 14 18" /></React.Fragment>,
};
function AcIcon({ name, size = 26, stroke = 2 }) {
  return <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">{AC_ICONS[name]}</svg>;
}

Object.assign(AC_ICONS, AC_EXTRA_ICONS);

// Button tracking. Every button and link on this page records an outbound hit against the visit's campaign hit
// (components/campaign-hit.js), labelled "TapScan Accountability: <where on the page>: <what was clicked>". The label is
// what a dashboard chart matches on, so keep the wording stable. A visit with no campaign hit yet queues it.
function acTrack(label) {
  try { if (window.tsRecordOutboundHit) window.tsRecordOutboundHit("TapScan Accountability: " + label); } catch (err) {}
}

// Eased scroll to a page position (used by the "On this page" links). Longer trips take a little longer but never
// more than about a second. Any scroll input from the visitor cancels it. With reduced motion it jumps straight there.
let acScrollRaf = 0;
function acSmoothScrollTo(top) {
  if (acScrollRaf) cancelAnimationFrame(acScrollRaf);
  const from = window.pageYOffset, dist = top - from;
  const reduce = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
  if (reduce || Math.abs(dist) < 2) { window.scrollTo(0, top); return; }
  const duration = Math.min(1000, Math.max(500, 350 + Math.abs(dist) * 0.18));
  const t0 = performance.now();
  const events = ["wheel", "touchstart", "keydown", "mousedown"];
  const cleanup = () => events.forEach((ev) => window.removeEventListener(ev, stop));
  const stop = () => { if (acScrollRaf) cancelAnimationFrame(acScrollRaf); acScrollRaf = 0; cleanup(); };
  events.forEach((ev) => window.addEventListener(ev, stop, { passive: true }));
  const tick = (now) => {
    const p = Math.min(1, (now - t0) / duration);
    const eased = p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2; // easeInOutCubic
    window.scrollTo(0, from + dist * eased);
    if (p < 1) acScrollRaf = requestAnimationFrame(tick); else { acScrollRaf = 0; cleanup(); }
  };
  acScrollRaf = requestAnimationFrame(tick);
}

// Counts up from 0 to `to` the first time it scrolls into view (same easing and speed as the 79% on the GS1 guide). The
// final figure is laid out invisibly underneath so the layout never shifts while counting. With reduced motion (or no
// IntersectionObserver) it just shows the final figure. The animated copy is aria-hidden; the real figure is also in the
// page as visually hidden text, so screen readers and crawlers read the final number, never a half-counted one.
const acFmt = (v, dec) => (dec ? v.toFixed(dec) : Math.round(v).toLocaleString("en-US"));
function AcCountUp({ to, pre = "", suf = "", dec = 0, duration = 1600 }) {
  const ref = React.useRef(null);
  const [val, setVal] = React.useState(0);
  React.useEffect(() => {
    const el = ref.current;
    if (!el) return;
    const reduce = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
    if (reduce || !("IntersectionObserver" in window)) { setVal(to); return; }
    const k = Math.pow(10, dec);
    let raf = 0, started = false;
    const run = () => {
      const t0 = performance.now();
      const tick = (now) => {
        const p = Math.min(1, (now - t0) / duration);
        setVal(Math.round(to * k * (1 - Math.pow(1 - p, 3))) / k);
        if (p < 1) raf = requestAnimationFrame(tick);
      };
      raf = requestAnimationFrame(tick);
    };
    const io = new IntersectionObserver((entries) => {
      if (!started && entries.some((e) => e.isIntersecting)) { started = true; io.disconnect(); run(); }
    }, { threshold: 0.6 });
    io.observe(el);
    return () => { io.disconnect(); if (raf) cancelAnimationFrame(raf); };
  }, [to, dec, duration]);
  return (
    <span ref={ref} className="ts-ac-count" aria-hidden="true">
      <span style={{ visibility: "hidden" }}>{pre}{acFmt(to, dec)}{suf}</span>
      <span style={{ position: "absolute", left: 0, top: 0 }}>{pre}{acFmt(val, dec)}{suf}</span>
    </span>
  );
}

// Example dashboard with one tab per touchpoint. All four panels stay in the page (the inactive ones are hidden), so
// search engines and AI crawlers can read them; the charts are the same interactive ones used on the case study pages.
function AcDashTabs() {
  const [active, setActive] = React.useState(0);
  const tabRefs = React.useRef([]);
  // Phones: the charts scale down with the card, so give them a shorter card (no big gaps above and below).
  const [compact, setCompact] = React.useState(false);
  React.useEffect(() => {
    if (!window.matchMedia) return;
    const mq = window.matchMedia("(max-width: 900px)");
    const on = () => setCompact(mq.matches);
    on();
    if (mq.addEventListener) mq.addEventListener("change", on); else mq.addListener(on);
    return () => { if (mq.removeEventListener) mq.removeEventListener("change", on); else mq.removeListener(on); };
  }, []);
  const pick = (i, focus) => {
    setActive(i);
    acTrack("Example dashboard: " + AC_DASHBOARDS[i].tab);
    if (focus && tabRefs.current[i]) tabRefs.current[i].focus();
  };
  const onKey = (e, i) => {
    const n = AC_DASHBOARDS.length;
    let next = -1;
    if (e.key === "ArrowRight" || e.key === "ArrowDown") next = (i + 1) % n;
    else if (e.key === "ArrowLeft" || e.key === "ArrowUp") next = (i - 1 + n) % n;
    else if (e.key === "Home") next = 0;
    else if (e.key === "End") next = n - 1;
    if (next >= 0) { e.preventDefault(); pick(next, true); }
  };
  return (
    <div className="ts-ac-dash">
      <p className="ts-ac-dash-label ts-ac-dash-choose">Choose a dashboard</p>
      <div className="ts-ac-dtabs" role="tablist" aria-label="Example dashboards by program stage">
        {AC_DASHBOARDS.map((d, i) => (
          <button key={d.id} type="button" role="tab" id={"ac-dtab-" + i} aria-controls={"ac-dpanel-" + i} aria-selected={i === active} tabIndex={i === active ? 0 : -1}
            className={"ts-ac-dtab" + (i === active ? " is-on" : "")} ref={(el) => { tabRefs.current[i] = el; }}
            onClick={() => pick(i, false)} onKeyDown={(e) => onKey(e, i)}>
            <AcIcon name={d.icon} size={20} stroke={2} /><span>{d.tab}</span>
          </button>
        ))}
      </div>
      <p className="ts-ac-dash-note">The visualized data shown here is for illustrative purposes only and does not reflect actual client performance metrics or proprietary information.</p>
      <hr className="ts-ac-dtabs-rule" />
      {AC_DASHBOARDS.map((d, i) => (
        <div key={d.id} role="tabpanel" id={"ac-dpanel-" + i} aria-labelledby={"ac-dtab-" + i} hidden={i !== active} className="ts-ac-dpanel">
          <p className="ts-ac-dash-label">Headline metrics</p>
          <div className="ts-ac-kpis">
            {d.kpis.map((k) => (
              <div className="ts-ac-kpi" key={k.l}>
                <div className="ts-ac-kpi-v"><span className="ts-ac-sr">{k.to.toLocaleString("en-US", { minimumFractionDigits: k.dec })}{k.suf}</span><AcCountUp to={k.to} suf={k.suf} dec={k.dec} /></div>
                <div className="ts-ac-kpi-l">{k.l}</div>
              </div>
            ))}
          </div>
          <p className="ts-ac-dash-label">Performance breakdown</p>
          <div className="ts-ac-charts">
            {window.TSChartCard && window.TSChart ? d.charts.map((c) => (
              <window.TSChartCard key={c.title} title={c.title} height={compact ? 205 : 320}>
                <window.TSChart kind={c.kind} type="accountability" data={c.data} />
              </window.TSChartCard>
            )) : null}
          </div>
          <p className="ts-ac-dash-label">Report insights (example)</p>
          <div className="ts-ac-insights">
            <ul>
              {d.insights.map((line, n) => (
                <li key={n}><span className="ts-ac-insight-n">{n + 1}</span><span>{line}</span></li>
              ))}
            </ul>
          </div>
        </div>
      ))}
    </div>
  );
}

function AcHeading({ id, eyebrow, children, center, noDot }) {
  const isQuestion = noDot || (typeof children === "string" && /\?$/.test(children));
  return (
    <React.Fragment>
      {eyebrow ? <p className={"ts-ac-eyebrow" + (center ? " is-center" : "")}>{eyebrow}</p> : null}
      <h2 id={id} className={"ts-ac-h2" + (center ? " is-center" : "")}>{children}{isQuestion ? null : <span style={{ color: "#6976E7" }}>.</span>}</h2>
    </React.Fragment>
  );
}

// A row of cards that shows three at a time (two on tablets, one on phones) and slides one card per step. It is a plain
// scrollable row with scroll snapping, so every card stays in the page HTML for search engines and AI crawlers, swiping
// works on touch screens, and the arrow buttons, dots and left/right keys just move the scroll position.
function AcCarousel({ items, label, autoplay = true }) {
  const trackRef = React.useRef(null);
  const [pos, setPos] = React.useState({ index: 0, last: 0 });
  const stepOf = (el) => {
    const cards = el.children;
    return cards.length > 1 ? cards[1].offsetLeft - cards[0].offsetLeft : (cards[0] ? cards[0].offsetWidth : 1);
  };
  const measure = React.useCallback(() => {
    const el = trackRef.current;
    if (!el) return;
    const step = stepOf(el) || 1;
    const maxLeft = Math.max(0, el.scrollWidth - el.clientWidth);
    const last = Math.max(0, Math.round(maxLeft / step));
    const index = Math.min(last, Math.max(0, Math.round(el.scrollLeft / step)));
    setPos((p) => (p.index === index && p.last === last ? p : { index, last }));
  }, []);
  React.useEffect(() => {
    const el = trackRef.current;
    if (!el) return;
    let raf = 0;
    const onScroll = () => { if (raf) cancelAnimationFrame(raf); raf = requestAnimationFrame(measure); };
    measure();
    el.addEventListener("scroll", onScroll, { passive: true });
    window.addEventListener("resize", measure);
    return () => { el.removeEventListener("scroll", onScroll); window.removeEventListener("resize", measure); if (raf) cancelAnimationFrame(raf); };
  }, [measure]);
  const goTo = (i) => {
    const el = trackRef.current;
    if (!el) return;
    const reduce = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
    el.scrollTo({ left: Math.max(0, i) * stepOf(el), behavior: reduce ? "auto" : "smooth" });
  };
  // The arrows never stop: Next on the last card goes back to the first, and Previous on the first goes to the last.
  const wrapIndex = (dir) => (dir > 0 ? (pos.index >= pos.last ? 0 : pos.index + 1) : (pos.index <= 0 ? pos.last : pos.index - 1));
  const move = (dir, how) => { acTrack(label + ": " + how); goTo(wrapIndex(dir)); };

  // Automatic sliding: one card every few seconds, looping back to the start after the last one. It stops while the
  // visitor hovers, uses the keyboard, touches or scrolls the row (and for a few seconds afterwards), while the row is
  // off screen or the tab is hidden. It never starts for people who prefer reduced motion.
  const reducedMotion = typeof window !== "undefined" && window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
  const playing = autoplay && !reducedMotion;
  const rootRef = React.useRef(null);
  const posRef = React.useRef(pos);
  const goRef = React.useRef(goTo);
  const hold = React.useRef({ hover: false, focus: false, visible: true, until: 0 });
  posRef.current = pos;
  goRef.current = goTo;
  React.useEffect(() => {
    const root = rootRef.current;
    if (!root || !("IntersectionObserver" in window)) return;
    const io = new IntersectionObserver((entries) => { hold.current.visible = entries.some((e) => e.isIntersecting); }, { threshold: 0.35 });
    io.observe(root);
    return () => io.disconnect();
  }, []);
  React.useEffect(() => {
    if (!playing) return;
    const id = setInterval(() => {
      const h = hold.current;
      if (h.hover || h.focus || !h.visible || document.hidden || Date.now() < h.until) return;
      const p = posRef.current;
      goRef.current(p.index >= p.last ? 0 : p.index + 1);
    }, 5500);
    return () => clearInterval(id);
  }, [playing]);
  const touched = () => { hold.current.until = Date.now() + 9000; };

  const onKey = (e) => {
    touched();
    if (e.key === "ArrowRight") { e.preventDefault(); goTo(wrapIndex(1)); }
    else if (e.key === "ArrowLeft") { e.preventDefault(); goTo(wrapIndex(-1)); }
  };
  return (
    <div className="ts-ac-car" role="region" aria-roledescription="carousel" aria-label={label} ref={rootRef}
      onMouseEnter={() => { hold.current.hover = true; }} onMouseLeave={() => { hold.current.hover = false; }}
      onPointerDown={touched} onTouchStart={touched} onWheel={touched}
      onFocus={(e) => { let kb = true; try { kb = e.target.matches(":focus-visible"); } catch (err) {} hold.current.focus = kb; }}
      onBlur={() => { hold.current.focus = false; }}>
      <div className="ts-ac-car-track" ref={trackRef} tabIndex={0} onKeyDown={onKey} aria-live={playing ? "off" : "polite"} aria-label={label + " (use the left and right arrow keys to move)"}>
        {items.map((t) => (
          <div className={"ts-ac-card ts-ac-tp" + (t.eg ? " ts-ac-capcard" : "")} key={t.title}>
            {t.eg ? <div className="ts-ac-big"><AcIcon name={t.icon} size={34} /></div> : <div className="ts-ac-icon"><AcIcon name={t.icon} /></div>}
            <h3>{t.title}</h3>
            <p>{t.text}</p>
            {t.eg ? <div className="ts-ac-eg2"><b>For example</b>{t.eg}</div> : null}
          </div>
        ))}
      </div>
      <div className="ts-ac-car-ctrl">
        <button type="button" className="ts-ac-car-btn" aria-label="Previous" onClick={() => move(-1, "Previous")}><AcIcon name="arrowL" size={20} stroke={2.6} /></button>
        <div className="ts-ac-car-dots">
          {Array.from({ length: pos.last + 1 }).map((_, i) => (
            <button type="button" key={i} className={"ts-ac-car-dot" + (i === pos.index ? " is-on" : "")} aria-label={"Show card " + (i + 1)} aria-current={i === pos.index ? "true" : undefined} onClick={() => goTo(i)} />
          ))}
        </div>
        <button type="button" className="ts-ac-car-btn" aria-label="Next" onClick={() => move(1, "Next")}><AcIcon name="arrowR" size={20} stroke={2.6} /></button>
      </div>
    </div>
  );
}

// "What TapScan can adapt": a list of options on the left and the chosen one explained on the right. All the panels stay
// in the page HTML (only the chosen one is shown), so the text is still there for search engines and AI crawlers.
function AcCapExplorer({ items }) {
  const query = "(max-width: 720px)";
  const [phone, setPhone] = React.useState(() => typeof window !== "undefined" && !!window.matchMedia && window.matchMedia(query).matches);
  React.useEffect(() => {
    if (!window.matchMedia) return;
    const mq = window.matchMedia(query);
    const on = () => setPhone(mq.matches);
    on();
    if (mq.addEventListener) mq.addEventListener("change", on); else mq.addListener(on);
    return () => { if (mq.removeEventListener) mq.removeEventListener("change", on); else mq.removeListener(on); };
  }, []);
  return phone ? <AcCarousel items={items} label="Capabilities" autoplay={false} /> : <AcCapTabs items={items} />;
}

function AcCapTabs({ items }) {
  const [active, setActive] = React.useState(0);
  const tabsRef = React.useRef([]);
  const choose = (i, focus) => {
    if (i !== active) acTrack("Capabilities: " + items[i].title);
    setActive(i);
    if (focus && tabsRef.current[i]) tabsRef.current[i].focus();
  };
  const onKey = (e) => {
    const n = items.length;
    if (e.key === "ArrowDown" || e.key === "ArrowRight") { e.preventDefault(); choose((active + 1) % n, true); }
    else if (e.key === "ArrowUp" || e.key === "ArrowLeft") { e.preventDefault(); choose((active + n - 1) % n, true); }
    else if (e.key === "Home") { e.preventDefault(); choose(0, true); }
    else if (e.key === "End") { e.preventDefault(); choose(n - 1, true); }
  };
  return (
    <div className="ts-ac-explorer">
      <div className="ts-ac-tablist" role="tablist" aria-label="What TapScan can verify" aria-orientation="vertical" onKeyDown={onKey}>
        {items.map((c, i) => (
          <button type="button" key={c.title} role="tab" id={"ac-tab-" + i} aria-selected={i === active} aria-controls={"ac-panel-" + i}
            tabIndex={i === active ? 0 : -1} ref={(el) => { tabsRef.current[i] = el; }}
            className={"ts-ac-tab" + (i === active ? " is-on" : "")} onClick={() => choose(i, false)}>
            <span className="ts-ac-icon"><AcIcon name={c.icon} size={22} /></span>
            <span>{c.title}</span>
          </button>
        ))}
      </div>
      <div className="ts-ac-panels">
        {items.map((c, i) => (
          <div key={c.title} role="tabpanel" id={"ac-panel-" + i} aria-labelledby={"ac-tab-" + i} className={"ts-ac-tabpanel" + (i === active ? " is-on" : "")}>
            <div className="ts-ac-big"><AcIcon name={c.icon} size={40} /></div>
            <h3>{c.title}</h3>
            <p className="ts-ac-lead2">{c.text}</p>
            <div className="ts-ac-eg2"><b>For example</b>{c.eg}</div>
          </div>
        ))}
      </div>
    </div>
  );
}

const AC_CAL = <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><rect x="3" y="4.5" width="18" height="16" rx="2" /><line x1="3" y1="9.5" x2="21" y2="9.5" /><line x1="8" y1="2.5" x2="8" y2="6.5" /><line x1="16" y1="2.5" x2="16" y2="6.5" /></svg>;
const AC_ARROW = <span className="ts-cta-arrow" aria-hidden="true" style={{ display: "inline-flex" }}><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.6" strokeLinecap="round" strokeLinejoin="round"><line x1="4" y1="12" x2="20" y2="12" /><polyline points="14 6 20 12 14 18" /></svg></span>;

function AccountabilityPage() {
  const [openFaq, setOpenFaq] = React.useState(-1);
  const onDemo = () => window.open("https://calendly.com/katie-aotc/20min", "_blank", "noopener");
  const onLogin = () => window.open("https://tapscan-platform.vercel.app/", "_blank", "noopener");
  const onContact = () => { window.location.href = "contact.html"; };
  const onLegal = (label) => {
    const slug = { "Privacy": "privacy", "Terms & Conditions": "terms", "Acceptable Use": "acceptable-use" }[label];
    window.location.href = "legal/" + slug + ".html";
  };

  // Header and footer (shared components): one listener records any button or link clicked in them, labelled by its own
  // text. It listens in the capture phase so the hit is sent before a click that leaves the page does its work.
  React.useEffect(() => {
    const onClick = (e) => {
      const el = e.target && e.target.closest ? e.target.closest("a, button") : null;
      if (!el) return;
      const zone = el.closest(".ts-nav") ? "Header" : el.closest("footer") ? "Footer" : null;
      if (!zone) return;
      const text = (el.textContent || "").replace(/\s+/g, " ").trim() || el.getAttribute("aria-label") || "Logo";
      acTrack(zone + ": " + text);
    };
    document.addEventListener("click", onClick, true);
    return () => document.removeEventListener("click", onClick, true);
  }, []);

  // "On this page" links: glide to the section (heading just below the fixed nav) instead of jumping.
  const goToSection = (e, id) => {
    const el = document.getElementById(id);
    if (!el) return;
    e.preventDefault();
    const nav = document.querySelector(".ts-nav");
    const navH = nav ? nav.getBoundingClientRect().height : 72;
    const anchor = el.querySelector(".ts-ac-wrap") || el;
    acSmoothScrollTo(Math.max(0, Math.round(anchor.getBoundingClientRect().top + window.pageYOffset - navH - 28)));
    try { history.replaceState(null, "", "#" + id); } catch (err) {}
  };

  // Scroll reveal. Each element below gets data-rv="0" (hidden) and flips to "1" the first time it scrolls into view,
  // which plays the rise-and-fade in the CSS. Items in a group (cards, steps, rows, questions) are staggered. Skipped
  // for reduced motion or if IntersectionObserver is missing, so content is never left hidden.
  React.useLayoutEffect(() => {
    const root = document.querySelector(".ts-ac");
    const reduce = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
    if (!root || reduce || !("IntersectionObserver" in window)) return;
    const els = Array.from(root.querySelectorAll([
      ".ts-ac-hero .ts-ac-hero-logo", ".ts-ac-hero .ts-ac-h1", ".ts-ac-hero .ts-ac-sub", ".ts-ac-hero .ts-ac-actions",
      "main .ts-ac-wrap > .ts-ac-car", "main .ts-ac-rows > *", "main .ts-ac-beyond > *", "main .ts-ac-tl-row", "main .ts-ac-wrap > .ts-ac-explorer", "main .ts-ac-scenarios > *",
      "main .ts-ac-steps > *", "main .ts-ac-acc > .ts-ac-acc-item", "main .ts-ac-wrap > .ts-ac-cmp", "main .ts-ac-wrap > .ts-ac-notebox", "main .ts-ac-wrap > .ts-ac-dash",
    ].join(",")));
    const groupSel = ".ts-ac-rows > *, .ts-ac-beyond > *, .ts-ac-tl-row, .ts-ac-scenarios > *, .ts-ac-steps > *, .ts-ac-acc-item";
    const counts = new Map();
    els.forEach((el) => {
      let d = 0;
      if (el.matches(".ts-ac-hero *")) {
        d = el.matches(".ts-ac-hero-logo") ? 0 : el.matches(".ts-ac-h1") ? 90 : el.matches(".ts-ac-sub") ? 180 : 270;
      } else if (el.matches(groupSel)) {
        const n = counts.get(el.parentElement) || 0;
        counts.set(el.parentElement, n + 1);
        d = Math.min(n, 6) * 100;
      } else if (el.matches(".ts-ac-h2")) d = 70;
      else if (el.matches("p") && el.previousElementSibling && el.previousElementSibling.matches(".ts-ac-h2")) d = 140;
      el.style.setProperty("--rv-d", d + "ms");
      el.setAttribute("data-rv", "0");
    });
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => { if (e.isIntersecting) { e.target.setAttribute("data-rv", "1"); io.unobserve(e.target); } });
    }, { threshold: 0.12, rootMargin: "0px 0px -6% 0px" });
    els.forEach((el) => io.observe(el));
    return () => io.disconnect();
  }, []);

  return (
    <div className="ts-ac" style={{ fontFamily: "Montserrat", background: "#fff", color: "#212331" }}>
      <style>{`
        .ts-ac { overflow-x: hidden; overflow-x: clip; }
        .ts-ac a { color: #2F3886; }
        .ts-ac a:hover { color: #1C2250; }
        .ts-ac-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; text-align: center; padding: 236px 24px 140px; background: linear-gradient(180deg, #2F3886 0%, #4552C4 42%, #6976E7 100%); }
        .ts-ac-hero::before, .ts-ac-hero::after { content: ""; position: absolute; inset: -20%; z-index: 0; pointer-events: none; }
        .ts-ac-hero::before { background: radial-gradient(closest-side at 28% 32%, rgba(214,220,255,0.30) 0%, rgba(214,220,255,0) 60%), radial-gradient(closest-side at 72% 82%, rgba(186,193,255,0.42) 0%, rgba(186,193,255,0) 65%); background-size: 140% 140%, 140% 140%; background-repeat: no-repeat; animation: tsAcDriftA 28s ease-in-out infinite alternate; }
        .ts-ac-hero::after { background: radial-gradient(closest-side at 80% 25%, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 65%), radial-gradient(closest-side at 20% 78%, rgba(28,34,80,0.40) 0%, rgba(28,34,80,0) 65%); background-size: 160% 160%, 160% 160%; background-repeat: no-repeat; animation: tsAcDriftB 36s ease-in-out infinite alternate; mix-blend-mode: soft-light; }
        .ts-ac-hero > * { position: relative; z-index: 1; }
        @keyframes tsAcDriftA { 0% { background-position: 0% 0%, 100% 100%; } 50% { background-position: 40% 20%, 60% 80%; } 100% { background-position: 100% 100%, 0% 0%; } }
        @keyframes tsAcDriftB { 0% { background-position: 100% 0%, 0% 100%; } 50% { background-position: 60% 40%, 40% 60%; } 100% { background-position: 0% 100%, 100% 0%; } }
        @media (prefers-reduced-motion: reduce) { .ts-ac-hero::before, .ts-ac-hero::after { animation: none; } }
        .ts-ac-hero-main { display: flex; align-items: center; gap: 56px; max-width: 1160px; margin: 0 auto; text-align: left; }
        .ts-ac-hero-logo { flex: 0 0 340px; }
        .ts-ac-hero-logo img { display: block; width: 100%; height: auto; }
        .ts-ac-hero-vr { align-self: stretch; width: 1.5px; flex: none; background: rgba(255,255,255,0.42); }
        .ts-ac-hero-copy { flex: 1 1 0; min-width: 0; }
        .ts-ac-h1 { font-weight: 900; line-height: 1.12; margin: 0; letter-spacing: -0.02em; color: #fff; font-size: clamp(28px, 3.1vw, 40px); text-wrap: balance; text-shadow: 3px 3px 4px rgba(0,0,0,0.25), -3px -3px 4px rgba(0,0,0,0.25); }
        .ts-ac-sub { font-weight: 500; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; margin: 20px 0 0; max-width: 620px; text-wrap: pretty; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
        .ts-ac-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; justify-content: center; }
        .ts-ac-actions.is-left { justify-content: flex-start; }
        .ts-ac-hero .ts-ac-actions { margin-top: 30px; }
        .ts-ac-subhero { background: #F5F6FF; border-bottom: 1px solid #DADEF7; padding: 26px 24px; }
        .ts-ac-subhero-in { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 32px; }
        .ts-ac-toc-head { flex: none; }
        .ts-ac-toc-title { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.3; color: #212331; }
        .ts-ac-toc-hint { display: block; margin-top: 3px; font-weight: 500; font-size: 12.5px; line-height: 1.3; color: #6B6F8A; }
        .ts-ac-subhero ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
        .ts-ac-subhero a { display: inline-block; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid #D6DAF5; font-weight: 600; font-size: 13.5px; line-height: 1.2; text-decoration: none; color: #2F3886; transition: background 160ms, border-color 160ms, color 160ms, transform 160ms; }
        .ts-ac-subhero a:hover { background: #6976E7; border-color: #2F3886; color: #212331; text-decoration: none; transform: translateY(-2px); }
        .ts-ac-subhero a:focus-visible { outline: 3px solid #212331; outline-offset: 3px; }

        .ts-ac .ts-ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 15px 28px; font-family: Montserrat, sans-serif; font-weight: 700; font-size: 15px; line-height: 1.3; border-radius: 10px; cursor: pointer; text-decoration: none !important; }
        .ts-ac .ts-ac-btn:hover, .ts-ac .ts-ac-btn:focus { text-decoration: none !important; }
        .ts-ac .ts-ac-btn svg, .ts-ac .ts-ac-btn .ts-cta-arrow { flex: none; }
        .ts-ac .ts-ac-btn span:not(.ts-cta-arrow) { text-wrap: balance; }
        .ts-ac .ts-ac-btn:focus-visible { outline: 3px solid #212331; outline-offset: 3px; }
        .ts-ac .ts-ac-btn.ts-cta-btn-primary { background: #6976E7; color: #1C2250; border: 2px solid #6976E7; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
        .ts-ac .ts-ac-btn.ts-cta-btn-primary:hover { background: #2F3886 !important; border-color: #2F3886 !important; color: #1C2250 !important; box-shadow: 0 18px 38px rgba(105,118,231,0.38); }
        .ts-ac .ts-ac-btn.ts-cta-btn-secondary { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.85); }
        .ts-ac .ts-ac-btn.ts-cta-btn-secondary:hover { background: rgba(255,255,255,0.18) !important; border-color: #fff !important; color: #fff !important; box-shadow: 0 18px 38px rgba(0,0,0,0.25); }
        .ts-ac .ts-ac-btn.is-light { background: #fff; color: #212331; border: 2px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
        .ts-ac .ts-ac-btn.is-light:hover { background: #E1E5FF !important; border-color: #E1E5FF !important; color: #212331 !important; box-shadow: 0 18px 38px rgba(0,0,0,0.25); }
        .ts-ac .ts-ac-btn.is-outline { background: transparent; color: #2F3886; border: 2px solid #2F3886; box-shadow: none; }
        .ts-ac .ts-ac-btn.is-outline:hover { background: #E1E5FF !important; border-color: #2F3886 !important; color: #2F3886 !important; box-shadow: 0 14px 30px rgba(105,118,231,0.22); }
        .ts-ac .ts-ac-btn.is-dark { background: #212331; color: #fff; border: 2px solid #212331; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
        .ts-ac .ts-ac-btn.is-dark:hover { background: #3A3D52 !important; border-color: #3A3D52 !important; color: #fff !important; box-shadow: 0 18px 38px rgba(0,0,0,0.28); }

        .ts-ac-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
        .ts-ac-sec { padding: 96px 0; background: #fff; }
        .ts-ac-sec.is-tint { background: #F5F6FF; }
        .ts-ac-sec + .ts-ac-sec { border-top: 1px solid #DADEF7; }
        .ts-ac section#faq.ts-ac-sec { padding-left: 0 !important; padding-right: 0 !important; }
        .ts-ac-eyebrow { display: inline-block; margin: 0 0 20px !important; font-weight: 700 !important; font-size: 13.5px !important; line-height: 1 !important; letter-spacing: 0.01em; color: #2F3886; background: #E1E5FF; border: 1px solid #CBD1FF; border-radius: 999px; padding: 8px 16px; }
        .ts-ac-sec.is-tint .ts-ac-eyebrow { background: #fff; border-color: #CBD1FF; }
        .ts-ac-eyebrow.is-center { display: block; width: fit-content; margin-left: auto !important; margin-right: auto !important; }
        .ts-ac-h2 { position: relative; font-weight: 900; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 28px; padding-bottom: 22px; color: #212331; }
        .ts-ac-h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #6976E7, #2F3886); }
        .ts-ac-h2.is-center { text-align: center; }
        .ts-ac-h2.is-center::after { left: 50%; transform: translateX(-50%); }
        .ts-ac-wrap > p { margin: 0 0 18px; font-weight: 500; font-size: 17px; line-height: 1.75; color: #212331; }
        .ts-ac-wrap > h2 + p { font-size: 19px; font-weight: 600; line-height: 1.7; max-width: 820px; }
        .ts-ac-wrap > h2.is-center + p { margin-left: auto; margin-right: auto; text-align: center; }

        .ts-ac-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: #E1E5FF; color: #2F3886; border: 1px solid #CBD1FF; flex: none; }

        .ts-ac-card { background: #fff; border: 1px solid #D6DAF5; border-top: 4px solid #6976E7; border-radius: 16px; padding: 28px 24px 30px; box-shadow: 0 6px 20px rgba(47,56,134,0.06); }
        .ts-ac-sec.is-tint .ts-ac-card { border-color: #DADEF7; border-top-color: #6976E7; }
        .ts-ac-card .ts-ac-icon { margin-bottom: 20px; }
        .ts-ac-card h3 { margin: 0 0 10px; font-weight: 800; font-size: 18px; line-height: 1.3; color: #212331; }
        .ts-ac-card p { margin: 0; font-weight: 500; font-size: 15.5px; line-height: 1.65; color: #3A3C4A; }

        .ts-ac-wrap > p.ts-ac-note { margin: 48px auto 0; max-width: 780px; text-align: center; font-weight: 500; font-size: 16px; line-height: 1.7; color: #3A3C4A; }
        .ts-ac-wrap > p.ts-ac-note + p.ts-ac-note { margin-top: 14px; }
        .ts-ac-notebox { display: flex; align-items: center; gap: 32px; padding: 30px 36px; border-radius: 18px; background: #E1E5FF; border: 1px solid #CBD1FF; }
        .ts-ac-notebox-ico { flex: none; display: grid; place-items: center; color: #1C2250; }
        .ts-ac-notebox-ico svg { display: block; }
        .ts-ac-notebox-vr { align-self: stretch; width: 1.5px; flex: none; background: rgba(47,56,134,0.28); }
        .ts-ac-notebox-text { flex: 1 1 0; min-width: 0; }
        .ts-ac-notebox-text p { margin: 0; font-weight: 500; font-size: 16.5px; line-height: 1.7; color: #212331; }
        .ts-ac-notebox-text p + p { margin-top: 12px; }

        .ts-ac-car { margin-top: 36px; }
        .ts-ac-car-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 6px 4px 30px; margin: 0 -4px; }
        .ts-ac-car-track::-webkit-scrollbar { display: none; }
        .ts-ac-car-track:focus-visible { outline: 3px solid #212331; outline-offset: -3px; border-radius: 16px; }
        .ts-ac-car-track > .ts-ac-card { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; }
        .ts-ac-tp { padding: 26px 24px 28px; }
        .ts-ac-tp h3 { font-size: 18px; }
        .ts-ac-tp p { font-size: 15.5px; }
        .ts-ac-car-ctrl { display: flex; align-items: center; justify-content: center; gap: 16px; }
        .ts-ac-car-btn { flex: none; }
        @media (max-width: 380px) { .ts-ac-car-ctrl { gap: 8px; } .ts-ac-car-dot { width: 20px; } }
        .ts-ac-car-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: #fff; color: #2F3886; border: 2px solid #2F3886; cursor: pointer; transition: background 180ms ease, color 180ms ease, transform 180ms ease, opacity 180ms ease; }
        .ts-ac-car-btn:hover:not(:disabled) { background: #6976E7; color: #212331; transform: scale(1.06); }
        .ts-ac-car-btn:focus-visible { outline: 3px solid #212331; outline-offset: 3px; }
        .ts-ac-car-btn:disabled { opacity: 0.35; cursor: default; }
        .ts-ac .ts-ac-car .ts-ac-car-track > .ts-ac-card:nth-child(even) { background: #F5F6FF; border-color: #DADEF7; border-top-color: #6976E7; }
        .ts-ac .ts-ac-car .ts-ac-car-track > .ts-ac-card:nth-child(even) .ts-ac-icon { background: #fff; border-color: #DADEF7; }
        .ts-ac-car-dots { display: flex; align-items: center; gap: 2px; }
        .ts-ac-car-dot { position: relative; width: 24px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
        .ts-ac-car-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 999px; background: #C9CFF2; transform: translate(-50%, -50%); transition: width 220ms cubic-bezier(0.2,0.8,0.2,1), background 220ms ease; }
        .ts-ac-car-dot.is-on::after { width: 24px; background: #2F3886; }
        .ts-ac-car-dot:focus-visible { outline: 3px solid #212331; outline-offset: -2px; border-radius: 8px; }
        .ts-ac-more { margin-top: 40px; display: flex; align-items: center; gap: 18px; padding: 22px 26px; border-radius: 16px; background: linear-gradient(120deg, #E1E5FF 0%, #F5F6FF 100%); border: 1px solid #CBD1FF; }
        .ts-ac-more p { margin: 0 !important; font-weight: 600 !important; font-size: 16px !important; line-height: 1.6 !important; color: #3A3C4A; }
        .ts-ac-more strong { color: #212331; }

        .ts-ac-explorer + .ts-ac-more { margin-top: 88px; }
        .ts-ac-sub-h { margin: 64px 0 8px; padding-top: 64px; border-top: 1px solid #D6DAF5; font-weight: 800; font-size: 22px; line-height: 1.25; color: #212331; text-align: center; }
        .ts-ac-wrap > p.ts-ac-sub-p { margin: 0 auto 30px; max-width: 640px; text-align: center; font-weight: 500; font-size: 15.5px; line-height: 1.6; color: #55587A; }

        .ts-ac-count { position: relative; display: inline-block; font-variant-numeric: tabular-nums; }
        .ts-ac-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
        .ts-ac-proof-cta { margin-top: 40px; }
        .ts-ac-dash { margin-top: 36px; padding: 40px; border-radius: 22px; background: #F5F6FF; border: 1px solid #DADEF7; color: #1C2250; }
        .ts-ac-dash .ts-ac-dash-note { margin: 0 0 22px; max-width: 760px; font-style: italic; font-weight: 500; font-size: 13px; line-height: 1.55; color: rgba(28,34,80,0.62); }
        .ts-ac-dash .ts-ac-dash-label { margin: 0 0 12px; font-weight: 700; font-size: 14px; line-height: 1.4; color: rgba(28,34,80,0.7); }
        .ts-ac-dtabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
        .ts-ac-dtabs-rule { border: 0; border-top: 1.5px solid #C9CFF2; margin: 0 0 26px; }
        .ts-ac-dtab { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px; border: 1px solid #D6DAF5; background: #fff; color: #2F3886; font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1.2; cursor: pointer; transition: background 160ms, border-color 160ms, box-shadow 160ms; }
        @media (hover: hover) { .ts-ac-dtab:hover { border-color: #9AA4EE; } }
        .ts-ac-dtab:focus-visible { outline: 3px solid #212331; outline-offset: 2px; }
        .ts-ac-dtab.is-on { background: #6976E7; border-color: #2F3886; color: #212331; box-shadow: 0 6px 16px rgba(105,118,231,0.28); }
        .ts-ac-dtab svg { flex: none; }
        .ts-ac-dpanel[hidden] { display: none; }
        .ts-ac-dpanel { animation: tsAcFade 300ms ease; }
        .ts-ac-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
        .ts-ac-kpi { background: #fff; border-radius: 12px; padding: 20px; }
        .ts-ac-kpi-v { font-weight: 900; font-size: 32px; line-height: 1.05; letter-spacing: -0.01em; color: #1C2250; }
        .ts-ac-kpi-l { margin-top: 6px; font-weight: 600; font-size: 12px; color: #7A7D8F; }
        .ts-ac-charts > div > div[style*="overflow"] { overflow: visible !important; }
        .ts-ac-charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px; }
        .ts-ac-insights { background: rgba(47,56,134,0.05); border: 1px solid rgba(47,56,134,0.14); border-radius: 12px; padding: 22px 26px; }
        .ts-ac-insights ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
        .ts-ac-insights li { display: flex; align-items: flex-start; gap: 14px; font-weight: 500; font-size: 14px; line-height: 1.55; color: #1C2250; }
        .ts-ac-insights li::before { display: none; }
        .ts-ac-insight-n { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 999px; display: grid; place-items: center; background: #6976E7; color: #1C2250; font-weight: 900; font-size: 12px; }


        @media (min-width: 1000px) { .ts-ac-h2-l { display: block; } }

        .ts-ac-acc { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
        .ts-ac-acc-item { background: #fff; border: 1.465px solid #D6DAF5; border-radius: 11.723px; padding: 18px 22px; cursor: pointer; transition: background 180ms cubic-bezier(0.2,0.8,0.2,1), border-color 180ms, box-shadow 180ms; }
        .ts-ac-acc-item.is-open { border-color: #AEB7F2; box-shadow: 0 6px 18px rgba(105,118,231,0.16); }
        .ts-ac-acc-h { margin: 0; font: inherit; }
        .ts-ac-acc-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: #212331; text-align: left; cursor: pointer; border-radius: 6px; }
        .ts-ac-acc-q:focus-visible { outline: 3px solid #212331; outline-offset: 6px; }
        .ts-ac-acc-q-text { font-weight: 700; font-size: 17px; line-height: 1.4; color: #212331; }
        .ts-ac-acc-icon { width: 28px; height: 28px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; font-weight: 900; font-size: 16px; line-height: 1; background: #6976E7; color: #212331; transition: transform 180ms cubic-bezier(0.2,0.8,0.2,1), background 180ms, color 180ms; }
        .ts-ac-acc-a { overflow: hidden; }
        .ts-ac-acc-a-in { padding-top: 6px; }
        .ts-ac-acc-a-in p { margin: 14px 0 0; font-weight: 500; font-size: 15.5px; line-height: 1.7; color: #212331; }
        .ts-ac-acc-a-in ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
        .ts-ac-acc-a-in li { position: relative; padding-left: 22px; font-weight: 500; font-size: 15.5px; line-height: 1.65; }
        .ts-ac-acc-a-in li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 7px; height: 7px; border-radius: 999px; background: #6976E7; }
        .ts-ac-acc-item.is-open .ts-ac-acc-icon { background: #212331; color: #fff; transform: rotate(45deg); }
        @media (hover: hover) {
          .ts-ac-acc-item:hover { border-color: #9AA4EE; }
          .ts-ac-acc-item.is-open:hover { border-color: #AEB7F2; }
        }
        @media (prefers-reduced-motion: reduce) { .ts-ac-acc-item, .ts-ac-acc-icon, .ts-ac-acc-a { transition: none !important; } }

        .ts-ac-rows { display: flex; flex-direction: column; gap: 28px; margin-top: 40px; }
        .ts-ac-row { display: grid; grid-template-columns: 54px minmax(190px, 270px) 1fr; column-gap: 26px; align-items: center; background: #fff; border: 1px solid #D6DAF5; border-left: 5px solid #6976E7; border-radius: 14px; padding: 22px 28px; box-shadow: 0 6px 20px rgba(47,56,134,0.06); transition: transform 250ms cubic-bezier(0.2,0.8,0.2,1), box-shadow 250ms ease; }
        .ts-ac-row:nth-child(even) { border-left-color: #2F3886; }
        @media (hover: hover) { .ts-ac-row:hover { transform: translateX(4px); box-shadow: 0 10px 26px rgba(47,56,134,0.12); } }
        .ts-ac-row h3 { margin: 0; font-weight: 800; font-size: 19px; line-height: 1.3; color: #212331; }
        .ts-ac-row p { margin: 0; font-weight: 500; font-size: 16px; line-height: 1.65; color: #3A3C4A; }

        .ts-ac-explorer { display: grid; grid-template-columns: 340px 1fr; gap: 28px; margin-top: 40px; align-items: stretch; }
        .ts-ac-tablist { display: flex; flex-direction: column; gap: 10px; }
        .ts-ac-tab { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 16px; border: 1.5px solid #D6DAF5; border-radius: 14px; background: #fff; font-family: Montserrat, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.3; color: #212331; cursor: pointer; transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
        .ts-ac-tab .ts-ac-icon { width: 42px; height: 42px; border-radius: 12px; }
        @media (hover: hover) { .ts-ac-tab:hover { border-color: #9AA4EE; } }
        .ts-ac-tab:focus-visible { outline: 3px solid #212331; outline-offset: 2px; }
        .ts-ac-tab.is-on { background: #E1E5FF; border-color: #2F3886; box-shadow: 0 8px 20px rgba(105,118,231,0.2); }
        .ts-ac-tab.is-on .ts-ac-icon { background: #6976E7; color: #212331; border-color: #2F3886; }
        .ts-ac-panels { display: flex; }
        .ts-ac-tabpanel { display: none; flex: 1; flex-direction: column; justify-content: flex-start; background: linear-gradient(135deg, #F5F6FF 0%, #E1E5FF 100%); border: 1px solid #DADEF7; border-radius: 20px; padding: 44px; }
        .ts-ac-tabpanel.is-on { display: flex; animation: tsAcFade 380ms ease; }
        .ts-ac-big { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 26px; color: #212331; background: linear-gradient(145deg, #BAC1FF 0%, #6976E7 60%, #2F3886 100%); box-shadow: 0 10px 24px rgba(105,118,231,0.35); }
        .ts-ac-capcard { display: flex; flex-direction: column; }
        .ts-ac-capcard .ts-ac-big { width: 64px; height: 64px; margin-bottom: 18px; flex: none; }
        .ts-ac-capcard h3 { margin: 0 0 10px; font-size: 22px; }
        .ts-ac-capcard p { flex: 0 0 auto; margin: 0 0 22px; font-size: 16px; line-height: 1.65; }
        .ts-ac-capcard .ts-ac-eg2 { margin-top: auto; max-width: none; background: #EEF0FF; }
        .ts-ac .ts-ac-car .ts-ac-car-track > .ts-ac-capcard:nth-child(even) .ts-ac-eg2 { background: #fff; }
        .ts-ac-tabpanel h3 { margin: 0 0 14px; font-weight: 900; font-size: 34px; line-height: 1.15; letter-spacing: -0.01em; color: #212331; }
        .ts-ac-tabpanel p.ts-ac-lead2 { margin: 0; max-width: 620px; margin-bottom: 32px; font-weight: 500; font-size: 20px; line-height: 1.7; color: #3A3C4A; }
        .ts-ac-eg2 { margin-top: auto; max-width: 620px; padding: 18px 22px; background: #fff; border-radius: 12px; border-left: 5px solid #2F3886; font-weight: 600; font-size: 18px; line-height: 1.55; color: #212331; }
        .ts-ac-eg2 b { display: block; margin-bottom: 4px; font-weight: 800; font-size: 14px; color: #2F3886; }
        @keyframes tsAcFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
        @media (prefers-reduced-motion: reduce) { .ts-ac-dpanel { animation: none; } .ts-ac-steps::after { animation: none; background: none; } .ts-ac-step::after { animation: none !important; background: none !important; } .ts-ac-tabpanel.is-on { animation: none; } .ts-ac-row, .ts-ac-tab { transition: none; } }

        .ts-ac-scenarios { display: flex; flex-direction: column; border: 1px solid #D6DAF5; border-radius: 16px; overflow: hidden; background: #fff; }
        .ts-ac-scn { display: grid; grid-template-columns: minmax(0, 360px) 46px minmax(0, 1fr); column-gap: 40px; align-items: center; padding: 34px 32px; background: #fff; border-top: 1px solid #DADEF7; }
        .ts-ac-scn:first-child { border-top: 0; }
        .ts-ac-scn:nth-child(odd) { background: #FAFAFF; }
        .ts-ac-scn-who { display: flex; align-items: center; gap: 18px; }
        .ts-ac-scn-ico { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #E1E5FF; color: #2F3886; }
        .ts-ac-scn:nth-child(1) .ts-ac-scn-ico { background: #EEF0FF; }
        .ts-ac-scn:nth-child(2) .ts-ac-scn-ico { background: #E1E5FF; }
        .ts-ac-scn:nth-child(3) .ts-ac-scn-ico { background: #CBD1FF; }
        .ts-ac-scn:nth-child(4) .ts-ac-scn-ico { background: #A4AEF8; }
        .ts-ac-scn .ts-ac-who { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.3; color: #212331; }
        .ts-ac-scn .ts-ac-where { margin: 4px 0 0; font-weight: 600; font-size: 14px; line-height: 1.4; color: #2F3886; }
        .ts-ac-scn .ts-ac-arrow { display: grid; place-items: center; justify-self: center; color: #2F3886; }
        .ts-ac-scn .ts-ac-what { margin: 0; font-weight: 500; font-size: 16px; line-height: 1.6; color: #212331; }


        .ts-ac-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 52px; position: relative; }
        .ts-ac-steps::before, .ts-ac-steps::after { content: ""; position: absolute; top: 30px; left: calc(100% / 6); right: calc(100% / 6); height: 4px; border-radius: 4px; }
        .ts-ac-steps::before { background: linear-gradient(90deg, #6976E7, #2F3886); }
        .ts-ac-steps::after { background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0) 100%); filter: drop-shadow(0 0 6px rgba(105,118,231,0.9)); background-size: 24% 100%; background-repeat: no-repeat; background-position: -30% 0; animation: tsAcBurst 5s ease-in-out infinite; }
        @keyframes tsAcBurst { 0% { background-position: -30% 0; } 30%, 100% { background-position: 130% 0; } }
        @keyframes tsAcBurstSeg1 { 0% { background-position: 0 -45%; } 15%, 100% { background-position: 0 145%; } }
        @keyframes tsAcBurstSeg2 { 0%, 15% { background-position: 0 -45%; } 30%, 100% { background-position: 0 145%; } }
        @keyframes tsAcBurstV { 0% { background-position: 0 -30%; } 30%, 100% { background-position: 0 130%; } }
        .ts-ac-step { position: relative; text-align: center; padding: 0 8px; }
        .ts-ac-step .ts-ac-n { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 26px; font-weight: 900; font-size: 22px; color: #212331; background: linear-gradient(145deg, #BAC1FF, #6976E7); box-shadow: 0 0 0 7px #F5F6FF, 0 8px 18px rgba(105,118,231,0.3); }
        .ts-ac-step h3 { margin: 0 0 10px; font-weight: 900; font-size: 22px; color: #212331; }
        .ts-ac-step p { margin: 0 auto; max-width: 320px; font-weight: 500; font-size: 15.5px; line-height: 1.65; color: #3A3C4A; }

        [data-rv="0"] { opacity: 0; }
        [data-rv="1"] { animation: tsAcRise 800ms cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: var(--rv-d, 0ms); }
        .ts-ac-h2[data-rv="0"]::after { width: 0; }
        .ts-ac-h2[data-rv="1"]::after { animation: tsAcBar 900ms cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--rv-d, 0ms) + 280ms); }
        @keyframes tsAcRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
        @keyframes tsAcBar { from { width: 0; } to { width: 56px; } }
        @media print { [data-rv] { opacity: 1 !important; animation: none !important; } }


        /* Accountability colours: light blue (#6976E7) with the main blue (#2F3886) as the accent */
        .ts-ac a:hover { color: #1C2250; }
        .ts-ac-hero-logo { flex: 0 0 390px; }
        .ts-ac-subhero a:hover { background: #2F3886; border-color: #2F3886; color: #fff; }
        .ts-ac .ts-ac-btn.ts-cta-btn-primary { background: #2F3886; color: #fff; border: 2px solid #2F3886; box-shadow: 0 6px 18px rgba(47,56,134,0.28); }
        .ts-ac .ts-ac-btn.ts-cta-btn-primary:hover { background: #1C2250 !important; border-color: #1C2250 !important; color: #fff !important; box-shadow: 0 18px 38px rgba(28,34,80,0.34); }
        .ts-ac .ts-ac-btn.is-light:hover { background: #E1E5FF !important; border-color: #E1E5FF !important; color: #212331 !important; }
        .ts-ac .ts-ac-btn.is-outline { color: #2F3886; border-color: #6976E7; }
        .ts-ac .ts-ac-btn.is-outline:hover { background: #E1E5FF !important; border-color: #2F3886 !important; color: #1C2250 !important; box-shadow: 0 14px 30px rgba(47,56,134,0.18); }
        .ts-ac-car-btn:hover:not(:disabled) { background: #2F3886; color: #fff; }
        .ts-ac-car-btn { border-color: #6976E7; }
        .ts-ac-dtab.is-on { background: #2F3886; border-color: #2F3886; color: #fff; box-shadow: 0 6px 16px rgba(47,56,134,0.28); }
        .ts-ac-tab.is-on .ts-ac-icon { background: #2F3886; color: #fff; border-color: #2F3886; }
        .ts-ac-big { color: #fff; background: linear-gradient(145deg, #8E99F0 0%, #6976E7 55%, #4B58C8 100%); box-shadow: 0 10px 24px rgba(105,118,231,0.38); }
        .ts-ac-step .ts-ac-n { color: #fff; background: linear-gradient(145deg, #8E99F0, #6976E7); box-shadow: 0 0 0 7px #F5F6FF, 0 8px 18px rgba(105,118,231,0.34); }
        .ts-ac-insight-n { background: #2F3886; color: #fff; }
        .ts-ac-acc-icon { background: #E1E5FF; color: #2F3886; }
        .ts-ac-acc-item.is-open .ts-ac-acc-icon { background: #2F3886; color: #fff; }
        .ts-ac-tabpanel { background: linear-gradient(135deg, #F5F6FF 0%, #E1E5FF 100%); }


        /* 06 Beyond retail: two capability blocks beside one product's connected record */
        .ts-ac-beyond { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; margin-top: 44px; }
        .ts-ac-bey-block + .ts-ac-bey-block { margin-top: 36px; padding-top: 36px; border-top: 1.5px solid #C9CFF2; }
        .ts-ac-bey-head { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; }
        .ts-ac-bey-head h3 { margin: 0; font-weight: 900; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; color: #212331; }
        .ts-ac-bey-block > p { margin: 0 0 14px; font-weight: 600; font-size: 17px; line-height: 1.55; color: #2F3886; }
        .ts-ac ul.ts-ac-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
        .ts-ac ul.ts-ac-list li { position: relative; padding-left: 24px; font-weight: 500; font-size: 16px; line-height: 1.6; color: #212331; }
        .ts-ac ul.ts-ac-list li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 8px; height: 8px; border-radius: 999px; background: #6976E7; }
        .ts-ac-tl { background: #fff; border: 1px solid #DADEF7; border-top: 5px solid #6976E7; border-radius: 20px; padding: 32px 34px 34px; box-shadow: 0 8px 26px rgba(47,56,134,0.08); }
        .ts-ac-tl-tag { display: inline-block; margin: 0 0 14px; font-weight: 700; font-size: 13px; line-height: 1; padding: 7px 14px; border-radius: 999px; background: #E1E5FF; color: #2F3886; border: 1px solid #CBD1FF; }
        .ts-ac-tl h3 { margin: 0 0 6px; font-weight: 900; font-size: 22px; line-height: 1.25; color: #212331; }
        .ts-ac-tl-sub { margin: 0 0 26px; font-weight: 500; font-size: 14px; line-height: 1.5; font-style: italic; color: #55587A; }
        .ts-ac-tl ol { margin: 0; padding: 0; list-style: none; }
        .ts-ac-tl-row { position: relative; display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; padding-bottom: 24px; }
        .ts-ac-tl-row:last-child { padding-bottom: 0; }
        .ts-ac-tl-row:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #6976E7, #2F3886); opacity: 0.55; }
        .ts-ac-tl-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #E1E5FF; color: #2F3886; border: 1px solid #CBD1FF; }
        .ts-ac-tl-row:last-child .ts-ac-tl-dot { background: #2F3886; color: #fff; border-color: #2F3886; }
        .ts-ac-tl-row h4 { margin: 2px 0 3px; font-weight: 800; font-size: 16.5px; line-height: 1.3; color: #212331; }
        .ts-ac-tl-row p { margin: 0; font-weight: 500; font-size: 15px; line-height: 1.55; color: #3A3C4A; }

        /* 07 The difference: before and after table */
        .ts-ac-cmp { margin-top: 40px; border: 1px solid #DADEF7; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 8px 26px rgba(47,56,134,0.07); }
        .ts-ac-cmp table { width: 100%; border-collapse: collapse; table-layout: fixed; }
        .ts-ac-cmp th, .ts-ac-cmp td { text-align: left; vertical-align: top; padding: 20px 26px; font-size: 16px; line-height: 1.55; }
        .ts-ac-cmp thead th { font-weight: 800; font-size: 15px; padding-top: 22px; padding-bottom: 22px; color: #55587A; background: #F5F6FF; }
        .ts-ac-cmp thead th.is-with { color: #fff; background: #2F3886; }
        .ts-ac-cmp thead th:first-child { width: 190px; }
        .ts-ac-cmp tbody th { width: 190px; font-weight: 800; font-size: 16px; color: #212331; }
        .ts-ac-cmp tbody tr + tr > * { border-top: 1px solid #E4E7F8; }
        .ts-ac-cmp td { font-weight: 500; color: #3A3C4A; }
        .ts-ac-cmp td.is-with { font-weight: 600; color: #1C2250; background: #F5F6FF; }
        .ts-ac-cmp td span { display: flex; gap: 12px; align-items: flex-start; }
        .ts-ac-cmp td svg { flex: none; margin-top: 3px; }
        .ts-ac-cmp td:not(.is-with) svg { color: #9AA0C4; }
        .ts-ac-cmp td.is-with svg { color: #2F3886; }
        .ts-ac-cmp-note { margin-top: 36px; }
        .ts-ac-notebox-text .ts-ac-actions { margin-top: 20px; }
        @media (max-width: 900px) {
          .ts-ac-beyond { grid-template-columns: 1fr; gap: 40px; }
        }
        @media (max-width: 720px) {
          .ts-ac-tl { padding: 26px 20px 28px; }
          .ts-ac-bey-head h3 { font-size: 22px; }
          .ts-ac-cmp thead { display: none; }
          .ts-ac-cmp table, .ts-ac-cmp tbody, .ts-ac-cmp tr, .ts-ac-cmp th, .ts-ac-cmp td { display: block; width: 100% !important; }
          .ts-ac-cmp tbody tr + tr { border-top: 1px solid #DADEF7; }
          .ts-ac-cmp tbody tr + tr > * { border-top: 0; }
          .ts-ac-cmp tbody th { padding: 20px 20px 4px; font-size: 17px; }
          .ts-ac-cmp td { padding: 8px 20px; }
          .ts-ac-cmp td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-weight: 800; font-size: 12.5px; color: #55587A; }
          .ts-ac-cmp td.is-with { margin-top: 6px; padding-bottom: 20px; padding-top: 14px; }
          .ts-ac-cmp td.is-with::before { color: #2F3886; }
        }

        @media (max-width: 1000px) {
          .ts-ac-car-track > .ts-ac-card { flex-basis: calc((100% - 20px) / 2); }
        }
        @media (max-width: 900px) {
          .ts-ac-wrap > h2 + p { font-size: 18px; line-height: 1.65; }
          .ts-ac-h1 { font-size: clamp(30px, 4.6vw, 38px); }
          .ts-ac-sub { font-size: 17px; }
          .ts-ac-hero-main { flex-direction: column; align-items: flex-start; gap: 26px; }
          .ts-ac-hero-logo { flex: none; width: 300px; }
          .ts-ac-hero-vr { align-self: auto; width: 100%; height: 1.5px; }
          .ts-ac-hero-copy { width: 100%; }
          .ts-ac-kpis { grid-template-columns: repeat(2, 1fr); }
          .ts-ac-charts > div { padding: 14px 12px 12px !important; }
          .ts-ac-charts div[style*="italic"] { font-size: 11.5px !important; }
          .ts-ac-charts svg text[font-size="9"], .ts-ac-charts svg text[font-size="10"] { font-size: 11.5px; }
        }
        @media (max-width: 720px) {
          .ts-ac-hero { padding: 116px 20px 44px; text-align: center; }
          .ts-ac-scn .ts-ac-arrow { display: none; }
          .ts-ac-scn { row-gap: 14px; }
          .ts-ac-hero-main { align-items: center; gap: 26px; }
          .ts-ac-hero-logo { width: min(320px, 82vw); }
          .ts-ac-hero-copy { text-align: center; }
          .ts-ac-sub { margin: 18px auto 0; font-size: 16.5px; line-height: 1.6; }
          .ts-ac-hero .ts-ac-actions { margin-top: 26px; gap: 12px; }
          .ts-ac-charts { grid-template-columns: 1fr; }
          .ts-ac-wrap > h2 + p { font-size: 17px; }
          .ts-ac-h1 { font-size: clamp(25px, 7.3vw, 32px); line-height: 1.14; }
          .ts-ac-kpi-l { font-size: 13px; }
          .ts-ac-dash .ts-ac-dash-note { font-size: 13px; }
          .ts-ac-subhero { padding: 22px 20px; }
          .ts-ac-subhero-in { flex-direction: column; align-items: flex-start; gap: 14px; }
          .ts-ac-subhero a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; font-size: 13px; }
              .ts-ac-wrap { padding: 0 20px; }
          .ts-ac-sec { padding: 64px 0; }
          .ts-ac-car-track > .ts-ac-card { flex-basis: 100%; }
          .ts-ac-dash { padding: 20px 12px; }
          .ts-ac-dtabs { display: flex; flex-direction: column; gap: 8px; }
          .ts-ac-dtab { width: 100%; justify-content: flex-start; padding: 12px 18px; font-size: 14.5px; min-height: 48px; text-align: left; }
            .ts-ac-kpi { padding: 16px; }
          .ts-ac-kpi-v { font-size: 26px; }
          .ts-ac-insights { padding: 18px; }
          .ts-ac-notebox { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 22px; }
          .ts-ac-notebox-vr { align-self: auto; width: 100%; height: 1.5px; }
          .ts-ac-acc-item { padding: 16px 18px; }
          .ts-ac-acc-q-text { font-size: 16px; }
          .ts-ac-more { flex-direction: column; align-items: flex-start; }
          .ts-ac-actions { flex-direction: column; align-items: stretch; }
          .ts-ac .ts-ac-btn { width: 100%; text-align: center; }
          .ts-ac-sub-h { margin-top: 44px; padding-top: 44px; }
          .ts-ac-explorer + .ts-ac-more { margin-top: 64px; }
        }
        @media (max-width: 1000px) {
        }
        @media (max-width: 900px) {
          .ts-ac-row { grid-template-columns: 54px 1fr; row-gap: 12px; padding: 20px 20px; }
          .ts-ac-row p { grid-column: 1 / -1; }
          .ts-ac-explorer { grid-template-columns: 1fr; gap: 18px; }
          .ts-ac-tablist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
          .ts-ac-tab { gap: 10px; padding: 10px 12px; font-size: 14.5px; }
          .ts-ac-tab .ts-ac-icon { width: 36px; height: 36px; border-radius: 10px; flex: none; }
          .ts-ac-tabpanel { padding: 30px 26px; }
          .ts-ac-tabpanel h3 { font-size: 24px; }
          .ts-ac-tabpanel p.ts-ac-lead2 { font-size: 17px; }
          .ts-ac-scn { grid-template-columns: 1fr; row-gap: 10px; padding: 26px 20px; }
          .ts-ac-scn .ts-ac-arrow { justify-self: start; }
          .ts-ac-scn .ts-ac-arrow svg { width: 24px; height: 24px; transform: rotate(90deg); }
          .ts-ac-steps { grid-template-columns: 1fr; gap: 30px; margin-top: 40px; }
          .ts-ac-steps::before, .ts-ac-steps::after { display: none; }
          .ts-ac-step:not(:last-child)::before, .ts-ac-step:not(:last-child)::after { content: ""; position: absolute; left: 30px; top: 32px; width: 4px; height: calc(100% + 30px); border-radius: 4px; }
          .ts-ac-step:not(:last-child)::before { background: linear-gradient(180deg, #6976E7, #2F3886); }
          .ts-ac-step:not(:last-child)::after { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0) 100%); filter: drop-shadow(0 0 6px rgba(105,118,231,0.9)); background-size: 100% 45%; background-repeat: no-repeat; background-position: 0 -45%; }
          .ts-ac-step:nth-child(1)::after { animation: tsAcBurstSeg1 5s ease-in-out infinite; }
          .ts-ac-step:nth-child(2)::after { animation: tsAcBurstSeg2 5s ease-in-out infinite; }
          .ts-ac-step { text-align: left; padding: 0 0 0 88px; }
          .ts-ac-step .ts-ac-n { position: absolute; left: 0; top: 0; margin: 0; }
          .ts-ac-step p { margin: 0; max-width: none; }
        }
        @media (max-width: 720px) {
          }
        @media (max-width: 480px) { .ts-ac-tablist { grid-template-columns: 1fr; } }
        @media (hover: none) { .ts-ac-acc-q { min-height: 44px; } .ts-ac-tab { min-height: 44px; } .ts-ac-dtab { min-height: 44px; } }
        @media (hover: none), (max-width: 1024px) { .ts-ac-car-dot { height: 44px; } }
        @media (max-width: 1024px) { .ts-ac-subhero a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; } }
      `}</style>

      <window.TSHeader variant="onPhoto"
        onNav={(id) => { if (id === "top") window.location.href = "index.html"; else window.location.href = "index.html#" + id; }}
        onContact={onContact}
        onLogin={onLogin}
        onDemo={onDemo} />

      {/* HERO */}
      <section className="ts-ac-hero">
        <div className="ts-ac-hero-main">
        <div className="ts-ac-hero-logo"><img src="assets/tapscan-accountability-white.svg" alt="TapScan Accountability" width="358" height="63" /></div>
        <div className="ts-ac-hero-vr" aria-hidden="true" />
        <div className="ts-ac-hero-copy">
        <h1 className="ts-ac-h1">Know what’s really happening in the field, and act while there’s still time.</h1>
        <p className="ts-ac-sub">TapScan Accountability turns QR codes and NFC tags on your displays, signage, assets and products into a live, verified record of execution, with photo proof, location and time, so you can catch gaps early and protect your ROI.</p>
        <div className="ts-ac-actions is-left">
          <a className="ts-ac-btn ts-cta-btn is-light" href="https://calendly.com/katie-aotc/20min" target="_blank" rel="noopener noreferrer" onClick={() => acTrack("Hero: Book a Demo")}>
            {AC_CAL}<span>Book a Demo</span>{AC_ARROW}
          </a>
          <a className="ts-ac-btn ts-cta-btn ts-cta-btn-secondary" href="case-studies.html?tab=accountability" onClick={() => acTrack("Hero: View Accountability Case Studies")}>
            <span>View Accountability Case Studies</span>{AC_ARROW}
          </a>
        </div>
        </div>
        </div>
      </section>

      {/* SUB-HERO: on this page */}
      <nav className="ts-ac-subhero" aria-label="On this page">
        <div className="ts-ac-subhero-in">
          <div className="ts-ac-toc-head">
            <p className="ts-ac-toc-title">On this page</p>
            <span className="ts-ac-toc-hint" aria-hidden="true"><span className="ts-hint-hover">Click to jump to section</span><span className="ts-hint-tap">Tap to jump to section</span></span>
          </div>
          <ol>
            {AC_TOC.map(([id, label]) => <li key={id}><a href={"#" + id} onClick={(e) => { acTrack("On This Page: " + label); goToSection(e, id); }}>{label}</a></li>)}
          </ol>
        </div>
      </nav>

      <main>
        {/* 01 WHY IT MATTERS */}
        <section className="ts-ac-sec" id="why">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="01 · Why it matters">Execution you can see, verify and act on</AcHeading>
            <p>Campaigns, displays and signage only pay off when they are in place, on time and as intended. Without a live record, teams rely on emails, scattered photos and assumptions. TapScan replaces that guesswork with a digital record of real-world activity, so you always know where things stand.</p>
            <div className="ts-ac-rows">
              {AC_BENEFITS.map((b) => (
                <div className="ts-ac-row" key={b.title}>
                  <div className="ts-ac-icon"><AcIcon name={b.icon} /></div>
                  <h3>{b.title}</h3>
                  <p>{b.text}</p>
                </div>
              ))}
            </div>
          </div>
        </section>

        {/* 02 HOW IT WORKS */}
        <section className="ts-ac-sec is-tint" id="how-it-works">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="02 · How it works">Scan, verify, act</AcHeading>
            <p>Accountability starts with a simple scan. Behind it, TapScan turns real-world activity into a live, verified record that your team can act on.</p>
            <div className="ts-ac-steps">
              {AC_STEPS.map((s) => (
                <div className="ts-ac-step" key={s.n}>
                  <span className="ts-ac-n">{s.n}</span>
                  <h3>{s.title}</h3>
                  <p>{s.text}</p>
                </div>
              ))}
            </div>
          </div>
        </section>

        {/* 03 WHAT YOU CAN VERIFY */}
        <section className="ts-ac-sec" id="capabilities">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="03 · What you can verify">Proof for every step of the program</AcHeading>
            <p>Each scan opens a short, guided workflow on the person’s phone. Depending on the program, TapScan can capture any of the following, all tied to the right brand, location and campaign.</p>
            <AcCapExplorer items={AC_CAPS} />
            <div className="ts-ac-more">
              <div className="ts-ac-icon"><AcIcon name="spark" /></div>
              <p><strong>And more.</strong> TapScan can also collect notes, short surveys and feedback from the field, support cross-brand reporting and performance-based incentive programs, and connect execution to sales by location, so you can see how what happens in store affects results.</p>
            </div>

            <h3 className="ts-ac-sub-h">Four scans, four verified outcomes</h3>
            <p className="ts-ac-sub-p">Illustrative examples of how TapScan records what happens in the field.</p>
            <div className="ts-ac-scenarios">
              {AC_SCENARIOS.map((sc) => (
                <div className="ts-ac-scn" key={sc.who}>
                  <div className="ts-ac-scn-who">
                    <span className="ts-ac-scn-ico"><AcIcon name={sc.icon} size={30} stroke={1.9} /></span>
                    <div>
                      <p className="ts-ac-who">{sc.who}</p>
                      <p className="ts-ac-where">{sc.where}</p>
                    </div>
                  </div>
                  <span className="ts-ac-arrow"><AcIcon name="arrowR" size={30} stroke={2.4} /></span>
                  <p className="ts-ac-what">{sc.what}</p>
                </div>
              ))}
            </div>
          </div>
        </section>

        {/* 04 WHERE IT APPLIES */}
        <section className="ts-ac-sec is-tint" id="applies">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="04 · Where it applies">One approach for every asset in the field</AcHeading>
            <p>Anything physical that can carry a QR code or NFC tag can become a verified record. Here is where brands put TapScan Accountability to work.</p>
            <AcCarousel label="Where it applies" items={AC_APPLIES} />
            <div className="ts-ac-more">
              <div className="ts-ac-icon"><AcIcon name="spark" /></div>
              <p><strong>And anywhere else.</strong> Wherever a physical item needs proof that it was installed, serviced or delivered, a TapScan code can turn it into a live, verifiable record.</p>
            </div>
          </div>
        </section>

        {/* 05 EXAMPLE DASHBOARD (illustrative numbers only) */}
        <section className="ts-ac-sec" id="results">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="05 · Example dashboard">What your accountability dashboard could look like</AcHeading>
            <p>Every submission feeds a live execution dashboard. These illustrative examples show what you could see for four parts of a program. They are built from made-up numbers and are not real client data.</p>
            <AcDashTabs />
            <div className="ts-ac-actions is-left ts-ac-proof-cta">
              <a className="ts-ac-btn ts-cta-btn ts-cta-btn-primary" href="case-studies.html?tab=accountability" onClick={() => acTrack("Results: View Accountability Case Studies")}>
                <span>View Accountability Case Studies</span>{AC_ARROW}
              </a>
            </div>
          </div>
        </section>

        {/* 06 BEYOND RETAIL: SUPPLY CHAIN AND SERVICE WORKFLOWS */}
        <section className="ts-ac-sec is-tint" id="beyond">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="06 · Beyond retail">Accountability that goes beyond the shelf</AcHeading>
            <p>The same scan-and-verify approach works wherever a handoff, a checkpoint or a customer issue needs a reliable record. TapScan connects product movement and service workflows to the same live view.</p>
            <div className="ts-ac-beyond">
              <div className="ts-ac-bey-copy">
                <div className="ts-ac-bey-block">
                  <div className="ts-ac-bey-head"><div className="ts-ac-icon"><AcIcon name="truck" /></div><h3>Supply chain and traceability</h3></div>
                  <p>Know where product has been, and that it got there properly.</p>
                  <ul className="ts-ac-list">
                    <li>Record batch, lot and production-run identifiers.</li>
                    <li>Validate handoffs between facilities, distributors and retailers.</li>
                    <li>Add quality assurance checkpoints along the way.</li>
                    <li>Keep traceability records aligned with FSMA 204, when connected to your product data and systems.</li>
                  </ul>
                </div>
                <div className="ts-ac-bey-block">
                  <div className="ts-ac-bey-head"><div className="ts-ac-icon"><AcIcon name="headset" /></div><h3>Service and support</h3></div>
                  <p>Make every issue easy to report, and easy to resolve.</p>
                  <ul className="ts-ac-list">
                    <li>Link packaging or inserts to support journeys and ticket intake forms.</li>
                    <li>Handle returns, credits and issue reporting in one flow.</li>
                    <li>Run warranty registration and claim journeys.</li>
                    <li>Route escalations to field reps, distributor teams or key accounts.</li>
                  </ul>
                </div>
              </div>
              <div className="ts-ac-tl">
                <span className="ts-ac-tl-tag">One connected record</span>
                <h3>A product’s journey, scan by scan</h3>
                <p className="ts-ac-tl-sub">Illustrative example. Each step is one scan, and every scan adds to the same live record.</p>
                <ol>
                  <li className="ts-ac-tl-row"><span className="ts-ac-tl-dot"><AcIcon name="package" size={22} /></span><div><h4>At the facility</h4><p>The batch and lot are recorded as the product is packed.</p></div></li>
                  <li className="ts-ac-tl-row"><span className="ts-ac-tl-dot"><AcIcon name="check" size={22} /></span><div><h4>At a quality checkpoint</h4><p>The inspection is scanned and logged as passed.</p></div></li>
                  <li className="ts-ac-tl-row"><span className="ts-ac-tl-dot"><AcIcon name="truck" size={22} /></span><div><h4>At the distributor</h4><p>The handoff is validated with a time and a location.</p></div></li>
                  <li className="ts-ac-tl-row"><span className="ts-ac-tl-dot"><AcIcon name="shop" size={22} /></span><div><h4>In store</h4><p>The display is installed and confirmed with photo proof.</p></div></li>
                  <li className="ts-ac-tl-row"><span className="ts-ac-tl-dot"><AcIcon name="headset" size={22} /></span><div><h4>After the sale</h4><p>A customer issue is reported and routed to the right team.</p></div></li>
                </ol>
              </div>
            </div>
          </div>
        </section>

        {/* 07 THE DIFFERENCE: BEFORE AND AFTER */}
        <section className="ts-ac-sec" id="compare">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="07 · The difference">From scattered updates to one live record</AcHeading>
            <p>Here is what changes when execution is verified at the moment it happens, instead of reported after the fact.</p>
            <div className="ts-ac-cmp">
              <table>
                <thead>
                  <tr><th scope="col"><span className="ts-ac-sr">Topic</span></th><th scope="col">Manual reporting</th><th scope="col" className="is-with">With TapScan Accountability</th></tr>
                </thead>
                <tbody>
                  {AC_COMPARE.map((r) => (
                    <tr key={r.topic}>
                      <th scope="row">{r.topic}</th>
                      <td data-label="Manual reporting"><span><AcIcon name="minus" size={18} stroke={2.4} /><span>{r.before}</span></span></td>
                      <td className="is-with" data-label="With TapScan Accountability"><span><AcIcon name="check" size={18} stroke={2.4} /><span>{r.after}</span></span></td>
                    </tr>
                  ))}
                </tbody>
              </table>
            </div>
            <div className="ts-ac-notebox ts-ac-cmp-note">
              <div className="ts-ac-notebox-ico" aria-hidden="true"><svg viewBox="122 122 234 234" width="58" height="58" fill="currentColor" aria-hidden="true" focusable="false"><path d="M314.162 123H173.404C145.589 123 123 145.86 123 174.009V313.677C123 336.268 141.071 354.556 163.394 354.556H304.152C331.967 354.556 354.556 331.696 354.556 303.547V163.879C354.556 141.288 336.485 123 314.162 123ZM344.457 305.878C344.457 322.104 331.524 335.192 315.491 335.192H171.366C155.864 335.192 143.374 322.552 143.374 306.864V163.52C143.374 147.294 156.307 134.206 172.341 134.206H315.845C331.701 134.206 344.457 147.204 344.457 163.161V305.967V305.878Z" /><path d="M224.427 166.664H184.695C178.115 166.664 172.769 172.01 172.769 178.589V218.321C172.769 224.901 178.115 230.247 184.695 230.247H224.427C231.007 230.247 236.353 224.901 236.353 218.321V178.589C236.353 172.01 231.007 166.664 224.427 166.664ZM220.452 210.371C220.452 212.565 218.67 214.347 216.476 214.347H192.645C190.452 214.347 188.67 212.565 188.67 210.371V186.54C188.67 184.347 190.452 182.565 192.645 182.565H216.476C218.67 182.565 220.452 184.347 220.452 186.54V210.371Z" /><path d="M224.427 241.081H184.695C178.115 241.081 172.769 246.427 172.769 253.006V292.739C172.769 299.319 178.115 304.665 184.695 304.665H224.427C231.007 304.665 236.353 299.319 236.353 292.739V253.006C236.353 246.427 231.007 241.081 224.427 241.081ZM220.452 284.789C220.452 286.982 218.67 288.764 216.476 288.764H192.645C190.452 288.764 188.67 286.982 188.67 284.789V260.957C188.67 258.764 190.452 256.982 192.645 256.982H216.476C218.67 256.982 220.452 258.764 220.452 260.957V284.789Z" /><path d="M301.482 166.659H261.75C255.17 166.659 249.824 172.005 249.824 178.585V218.317C249.824 224.897 255.17 230.243 261.75 230.243H301.482C308.062 230.243 313.408 224.897 313.408 218.317V178.585C313.408 172.005 308.062 166.659 301.482 166.659ZM297.507 210.367C297.507 212.56 295.725 214.342 293.532 214.342H269.7C267.507 214.342 265.725 212.56 265.725 210.367V186.535C265.725 184.342 267.507 182.56 269.7 182.56H293.532C295.725 182.56 297.507 184.342 297.507 186.535V210.367Z" /><path d="M304.985 264.979C309.098 264.979 312.427 268.308 312.427 272.42C312.427 276.533 309.098 279.862 304.985 279.862C295.723 279.862 288.242 287.362 288.223 296.625C288.223 300.736 284.894 304.065 280.782 304.065C276.67 304.065 273.341 300.736 273.341 296.625C273.341 279.137 287.499 264.979 304.985 264.979ZM304.985 240.482C309.098 240.482 312.427 243.811 312.427 247.923C312.427 252.035 309.098 255.364 304.985 255.364C293.569 255.364 283.308 259.966 275.808 267.446C268.327 274.947 263.726 285.208 263.726 296.625C263.726 300.736 260.397 304.065 256.285 304.065C252.173 304.065 248.843 300.736 248.843 296.625C248.843 265.625 273.967 240.482 304.985 240.482ZM304.692 288.615C308.961 288.615 312.427 292.081 312.427 296.35C312.427 300.619 308.961 304.085 304.692 304.085C300.423 304.085 296.957 300.619 296.957 296.35C296.957 292.081 300.423 288.615 304.692 288.615Z" /></svg></div>
              <div className="ts-ac-notebox-vr" aria-hidden="true" />
              <div className="ts-ac-notebox-text">
                <p>There is no app to install, no hardware to buy and no change to how your teams work. Most organizations launch within two to four weeks, pilot programs can be live in days, and TapScan connects to your CRM, ERP and BI tools.</p>
                <div className="ts-ac-actions is-left">
                  <a className="ts-ac-btn ts-cta-btn ts-cta-btn-primary" href="https://calendly.com/katie-aotc/20min" target="_blank" rel="noopener noreferrer" onClick={() => acTrack("The difference: Book a Demo")}>
                    {AC_CAL}<span>Book a Demo</span>{AC_ARROW}
                  </a>
                </div>
              </div>
            </div>
          </div>
        </section>

        {/* 08 FAQ */}
        <section className="ts-ac-sec is-tint" id="faq">
          <div className="ts-ac-wrap">
            <AcHeading eyebrow="08 · Questions answered">TapScan Accountability: frequently asked questions</AcHeading>
            <div className="ts-ac-acc">
              {ACCOUNTABILITY_FAQ.map((it, i) => (
                <AcFaqItem key={i} i={i} q={it.q} a={it.a} isOpen={openFaq === i} onToggle={() => { if (openFaq !== i) acTrack("FAQ: " + it.q); setOpenFaq(openFaq === i ? -1 : i); }} />
              ))}
            </div>
          </div>
        </section>
      </main>

      <window.TSFooter showContact={true} onDemo={onDemo} onContact={onContact} onLogin={onLogin} onLegal={onLegal} />
    </div>
  );
}

window.AccountabilityPage = AccountabilityPage;
