/* =====================================================================
   data2.jsx — Freedom Filled Pathway Audit v2
   Reframed around the BUILD / SELL / LEAD business pathway with
   F.R.E.S.H. as the human undercurrent. Focus-first, not score-first.
   ===================================================================== */

const AUDIT2 = {
  name: "The Freedom Filled\u00ae Pathway Audit",
  subhook: "Find where freedom is leaking in your business, and the next move that closes it.",
  promiseQ: "Where should I focus next in my business?",
};

/* ---- Business pathway: 3 stages x 3 areas ---- */
const STAGES = [
  { key: "build", name: "BUILD", blurb: "Your offer, your message, and the model you build around your life.",
    areas: [
      { key: "offer",   area: "Offer",   label: "Clarify your offer" },
      { key: "message", area: "Message", label: "Tighten your message" },
      { key: "model",   area: "Model",   label: "Simplify your business model" },
    ] },
  { key: "sell", name: "SELL", blurb: "How people find you, understand your value, and move toward a confident yes.",
    areas: [
      { key: "attract",  area: "Attract",  label: "Attract the right people" },
      { key: "convert",  area: "Convert",  label: "Create a cleaner sales pathway" },
      { key: "optimise", area: "Optimise", label: "Improve what is already working" },
    ] },
  { key: "lead", name: "LEAD", blurb: "Delivery, client experience, and how the business is being led.",
    areas: [
      { key: "client_experience", area: "Client Experience", label: "Strengthen the client experience" },
      { key: "facilitate",        area: "Facilitate",        label: "Facilitate without overgiving" },
      { key: "leadership",        area: "Leadership",        label: "Lead with clearer boundaries" },
    ] },
];
/* flat lookup by area name */
const AREA_BY_NAME = {};
STAGES.forEach(s => s.areas.forEach((a, i) => { AREA_BY_NAME[a.area] = { ...a, stage: s.name, stageKey: s.key, idx: i }; }));

/* ---- Pathway Readiness Score bands (supporting benchmark, not a grade) ---- */
const READINESS_BANDS = [
  { key: "rebuild_rhythm",     min: 0,  max: 39,  label: "Rebuild the rhythm" },
  { key: "simplify_foundation",min: 40, max: 59,  label: "Simplify the foundation" },
  { key: "focus_pathway",      min: 60, max: 79,  label: "Focus the pathway" },
  { key: "expand_intention",   min: 80, max: 100, label: "Expand with intention" },
];

/* ---- F.R.E.S.H human undercurrent ---- */
const FRESH = [
  { key: "F", letter: "F", name: "Fitness, Nutrition & Health", color: "#ca6b4d" },
  { key: "R", letter: "R", name: "Relationships",              color: "#ddab7d" },
  { key: "E", letter: "E", name: "Environment & Energetics",   color: "#6e8e77" },
  { key: "S", letter: "S", name: "Self",                        color: "#cc9989" },
  { key: "H", letter: "H", name: "Hustle",                      color: "#20314c" },
];

/* ---- Implementation support signals (public title -> FRESH) ---- */
const SUPPORT_SIGNALS = {
  protect_energy_and_rhythm: { publicTitle: "Protect your energy and rhythm", freshAreas: ["Self", "Hustle"] },
  protect_health:            { publicTitle: "Protect your energy and health", freshAreas: ["Fitness, Nutrition & Health"] },
  protect_relationships:     { publicTitle: "Protect the relationships your business is meant to support", freshAreas: ["Relationships"] },
  calmer_environment:        { publicTitle: "Create a calmer working environment", freshAreas: ["Environment & Energetics"] },
  focus_hustle:              { publicTitle: "Focus your hustle", freshAreas: ["Hustle"] },
};

/* =====================================================================
   SAMPLE RESULT (Leah) — per the result data contract
   ===================================================================== */
const RESULT2 = {
  auditName: AUDIT2.name,
  firstName: "Leah",
  completedAt: "8 June 2026",
  pathwayReadiness: {
    score: 68,
    bandKey: "focus_pathway",
    label: "Focus the pathway",
    caption: "This is not a grade. It is a snapshot of how supported your business currently is across your business pathway and the human rhythm needed to implement it.",
  },
  primaryBusinessFocus: {
    key: "tighten_message",
    title: "Tighten your message",
    plainResult: "Your next business focus is tightening your message.",
    stage: "BUILD",
    area: "Message",
    summary: "Right now, your expertise may be stronger than the way it is being explained.",
    reassurance: "This is normal growth. You are not starting again, you are tightening the part that makes the next season easier.",
    whyThisMatters: "When your message is not carrying enough of the weight, your content, sales pages, conversations and launches all have to work harder than they should.",
    likelyCost: "More explaining, softer conversion, inconsistent content, and warm people who like your work but do not move.",
    diagnosis: "You may be spending too much energy explaining what you do, why it matters, and why someone should take the next step now. That can show up as inconsistent content, softer sales conversations, a sales page that needs too much explaining, or warm people who like your work but do not move. This does not mean your business is failing. It means the message needs to do more of the work before you ask your marketing or sales to work harder.",
    firstFix: {
      title: "Write the promise of your offer in one sentence",
      prompt: "I help [person] move from [problem] to [result] without [frustration].",
      whyItHelps: "It forces the message to become clear enough for someone else to repeat. If she cannot repeat it, she probably cannot buy it with confidence yet.",
    },
  },
  secondaryBusinessFocusAreas: [
    { key: "create_cleaner_sales_pathway", title: "Create a cleaner sales pathway", stage: "SELL", area: "Convert", summary: "Warm interest may need a clearer next step." },
    { key: "lead_with_clearer_boundaries", title: "Lead with clearer boundaries", stage: "LEAD", area: "Leadership", summary: "The business may need stronger boundaries as it grows." },
  ],
  implementationSupportSignal: {
    key: "protect_energy_and_rhythm",
    publicTitle: "Protect your energy and rhythm",
    freshAreas: ["Self", "Hustle"],
    summary: "Your answers suggest your next business move will be easier to implement if you protect your energy and work rhythm while you do it.",
    detail: "This does not mean you need to pause the business. It means the next move should be built in a way your actual life can sustain.",
    recommendation: "Make the first fix small enough to repeat three times this week without needing a recovery day.",
  },
  pathwayMap: {
    foundation: "F.R.E.S.H",
    primaryPin: { stage: "BUILD", area: "Message" },
    secondaryPins: [{ stage: "SELL", area: "Convert" }, { stage: "LEAD", area: "Leadership" }],
    freshSignalPin: { areas: ["Self", "Hustle"] },
  },
  ffbBridge: {
    headline: "Your audit result is not the whole map. It is the starting point.",
    copy: "Freedom Filled\u00ae Business gives you the full pathway for implementing this next move and building the rest of the business around it. Inside FFB, you work through the business strategy and the personal operating rhythm that helps you sustain it.",
    cta: { label: "Get your recommended next step", destination: "#" },
  },
};

/* =====================================================================
   QUESTION FLOW — 4 sections, each with a transition before it
   (mocked: every completion routes to RESULT2)
   ===================================================================== */
const SECTIONS = [
  { key: "fresh", eyebrow: "The woman building it",
    title: "Before the business, there is the woman building it.",
    body: "The next few questions look at whether your energy, rhythm, relationships, environment and focus are supporting the business you are trying to grow.",
    relation: "Your human operating layer", stageRef: null,
    image: "assets/images/tracy-portrait-1.jpg", caption: "Peace, profit and presence" },
  { key: "build", eyebrow: "Build",
    title: "A business feels lighter when the foundation is clear.",
    body: "The next few questions look at your offer, your message, and the model you are building around your life.",
    relation: "BUILD stage", stageRef: "build",
    image: "assets/images/tracy-lifestyle-desk.jpg", caption: "Offer, message, model" },
  { key: "sell", eyebrow: "Sell",
    title: "Selling gets easier when the pathway is simple.",
    body: "This section looks at how people find you, understand your value, and move toward a confident yes.",
    relation: "SELL stage", stageRef: "sell",
    image: "assets/images/tracy-lifestyle-podcast.jpg", caption: "Attract, convert, optimise" },
  { key: "lead", eyebrow: "Lead",
    title: "Growth should not make you the bottleneck.",
    body: "This section looks at delivery, client experience, and how your business is being led.",
    relation: "LEAD stage", stageRef: "lead",
    image: "assets/images/tracy-event-1.jpg", caption: "Client experience, facilitate, lead" },
];

const QUESTIONS2 = [
  // FRESH (human layer)
  { id: "energy", section: "fresh", note: "There are no wrong answers here. This is about rhythm, not discipline.",
    text: "How is your energy carrying the business right now?",
    options: [
      { id: "steady", text: "Steady. I work from calm most weeks." },
      { id: "spikes", text: "Okay, with predictable spikes around launches." },
      { id: "wired",  text: "Wired and tired. I'm running on adrenaline." },
      { id: "fried",  text: "Frankly fried. I can't switch off." },
    ] },
  { id: "rhythm", section: "fresh",
    text: "How close is your real week to the week you actually want?",
    options: [
      { id: "close",  text: "Close. I designed it and mostly protect it." },
      { id: "drifts", text: "It drifts, but I can pull it back." },
      { id: "far",    text: "Far. The week runs me." },
      { id: "none",   text: "There's no design at all. I just react." },
    ] },
  { id: "support", section: "fresh",
    text: "Are the relationships and environment around you supporting the work?",
    options: [
      { id: "yes",     text: "Yes. I have support and a space that helps me think." },
      { id: "mostly",  text: "Mostly, with the odd stretch that gets lonely or noisy." },
      { id: "thin",    text: "Support is thin. I carry most of it alone." },
      { id: "drained", text: "My environment and people are draining, not filling." },
    ] },
  // BUILD
  { id: "offer_clarity", section: "build", note: "If you describe your offer three different ways, that's a message signal, not a you signal.",
    text: "When someone lands on your page, how quickly can they tell what you sell?",
    options: [
      { id: "instant", text: "Instantly. One line, one clear transformation." },
      { id: "mostly",  text: "Mostly clear, though I describe it a few ways." },
      { id: "decode",  text: "They'd have to decode it. I explain it differently each time." },
      { id: "unsure",  text: "Honestly, I'm still working out how to say it." },
    ] },
  { id: "message_repeat", section: "build",
    text: "Could a happy client repeat your message back to a friend?",
    options: [
      { id: "easily", text: "Easily. People quote my framing back to me." },
      { id: "roughly",text: "Roughly, in their own words." },
      { id: "no",     text: "Not really. It gets lost in translation." },
      { id: "never",  text: "No. Even I struggle to say it the same way twice." },
    ] },
  { id: "model_fit", section: "build",
    text: "Does your business model fit the life you actually want?",
    options: [
      { id: "yes",    text: "Yes. The model is built around my life." },
      { id: "okay",   text: "Mostly, with a few pieces that drain me." },
      { id: "strain", text: "It strains the life it's meant to fund." },
      { id: "no",     text: "No. The model runs the life, not the reverse." },
    ] },
  // SELL
  { id: "attract", section: "sell",
    text: "Are you attracting the right people, or just more people?",
    options: [
      { id: "right",  text: "The right people. They arrive already warm." },
      { id: "mixed",  text: "A mix. Some fit, some don't." },
      { id: "wrong",  text: "Often the wrong fit, so I over-qualify later." },
      { id: "few",    text: "Honestly, not many of either right now." },
    ] },
  { id: "convert", section: "sell", note: "Warm people who don't move are usually a pathway gap, not a desire gap.",
    text: "When someone is interested, how clear is the next step?",
    options: [
      { id: "clear",  text: "Very clear. The path to yes is obvious." },
      { id: "few",    text: "A few unnecessary steps, but it works." },
      { id: "manual", text: "I assemble the path by hand each time." },
      { id: "unclear",text: "Even keen people aren't sure how to say yes." },
    ] },
  { id: "optimise", section: "sell",
    text: "Do you know which of your efforts are actually working?",
    options: [
      { id: "yes",    text: "Yes. I can trace what converts and do more of it." },
      { id: "some",   text: "Some sense of it, more feel than data." },
      { id: "guess",  text: "I'm mostly guessing what works." },
      { id: "no",     text: "No idea. I just keep producing." },
    ] },
  // LEAD
  { id: "client_exp", section: "lead",
    text: "How consistent is the experience your clients actually receive?",
    options: [
      { id: "systemised", text: "Consistent. Same strong experience every time." },
      { id: "partly",     text: "Partly. The shape is there, the detail's in my head." },
      { id: "varies",     text: "It varies depending on my capacity that week." },
      { id: "winging",    text: "I'm improvising the experience each round." },
    ] },
  { id: "facilitate", section: "lead", note: "Overgiving is generous. It's also the quiet way capacity leaks.",
    text: "Do you tend to overgive in delivery?",
    options: [
      { id: "no",       text: "No. I deliver the promise, fully and bounded." },
      { id: "sometimes",text: "Sometimes, when I want them to be happy." },
      { id: "often",    text: "Often. I throw in extra to feel safe." },
      { id: "always",   text: "Always. The scope quietly keeps expanding." },
    ] },
  { id: "boundaries", section: "lead",
    text: "How clear are the boundaries you lead your business with?",
    options: [
      { id: "clear",   text: "Clear and held. People know what to expect." },
      { id: "mostly",  text: "Mostly, though they slip under pressure." },
      { id: "soft",    text: "Soft. I renegotiate them constantly." },
      { id: "none",    text: "There aren't really firm boundaries yet." },
    ] },
];

window.FFP2 = {
  AUDIT2, STAGES, AREA_BY_NAME, FRESH, SUPPORT_SIGNALS, RESULT2, SECTIONS, QUESTIONS2,
  READINESS_BANDS,
};
