/* =====================================================================
   DATA — all content, structures, and shared context
===================================================================== */

const NicheCtx = React.createContext({ niche: "fitness", setNiche: () => {} });

const CHAPTERS = [
  { id: "intro",     num: "00", title: "The Formula" },
  { id: "topic",     num: "01", title: "Topic" },
  { id: "hooks",     num: "02", title: "Hooks" },
  { id: "value",     num: "03", title: "Value" },
  { id: "angle",     num: "04", title: "Script Angle" },
  { id: "cta-ch",    num: "05", title: "CTA" },
  { id: "format",    num: "06", title: "Video Format" },
  { id: "editing",   num: "07", title: "Editing Style" },
  { id: "lab",       num: "08", title: "Script Lab" },
  { id: "process",   num: "09", title: "4-Step Process" },
  { id: "checklist", num: "10", title: "Pre-Publish Checklist" },
  { id: "cta-end",   num: "→",  title: "Work With Me" },
];

const NICHES = [
  { id: "fitness",    label: "Fitness & Health",    emoji: "💪" },
  { id: "finance",    label: "Personal Finance",    emoji: "💰" },
  { id: "trading",    label: "Trading & Investing", emoji: "📈" },
  { id: "business",   label: "Business & Startup",  emoji: "🚀" },
  { id: "marketing",  label: "Marketing",           emoji: "🎯" },
  { id: "mindset",    label: "Self-Development",    emoji: "🧠" },
  { id: "realestate", label: "Real Estate",         emoji: "🏠" },
  { id: "other",      label: "My Niche",            emoji: "✨" },
];

const TOPIC_EXAMPLES = {
  fitness:    ["Why most people never lose weight — and it's not calories", "I tested every popular diet for 30 days. Here's what actually worked.", "3 exercises most trainers will never tell you about"],
  finance:    ["The one account most people never open — and they lose thousands", "I saved $10K in 6 months on a regular salary. Here's exactly how.", "Stop putting money in a savings account. Do this instead."],
  trading:    ["Is this trade going up or down? Good, bad, or excellent?", "The setup 90% of traders miss every single morning", "I rated 30 trades in 30 days — here's the pattern that changed everything"],
  business:   ["How I got my first 10 clients without spending a cent on ads", "The business model nobody talks about — low effort, high margin", "3 tools that replaced $3K/month in software for my agency"],
  marketing:  ["The hook formula that got me 1M views in 30 days", "Why your content isn't going viral (and it's a simple fix)", "I studied 100 viral posts — here's the pattern every single one followed"],
  mindset:    ["The 5-minute morning habit that actually changed my life", "Stop reading self-help books. Do this instead.", "The real reason most people never reach their goals (uncomfortable truth)"],
  realestate: ["I toured 50 apartments — here's every red flag to look for", "The hidden costs of buying a home that nobody tells you", "3 neighborhoods to invest in before everyone else does"],
  other:      ["The #1 mistake beginners make that slows everything down", "What I wish someone had told me when I started", "The truth about [common belief] that nobody in your space will say"],
};

const HOOK_DATA = {
  verbal: [
    { label: "Question Hook",   template: "Did you know that {surprising fact}?",          example_fitness: "Did you know that most people lose weight the wrong way and gain it all back in 30 days?",  example_trading: "Did you know that 90% of traders lose money in their first year — and it's not because of bad strategy?" },
    { label: "Shock Opener",    template: "Stop doing {common thing} immediately.",          example_fitness: "Stop counting calories immediately. Here's what actually works.",                           example_trading: "Stop using stop losses the way you've been taught. Here's what the pros actually do." },
    { label: "Pain-Point Hook", template: "If you're struggling with {pain}…",              example_fitness: "If you've been trying to lose weight for months with nothing to show for it…",             example_trading: "If you keep losing trades even when your analysis is correct…" },
    { label: "Number Hook",     template: "{Number} {things} that {benefit}",               example_fitness: "3 exercises that burn twice the calories in half the time",                                  example_trading: "4 trade setups that print money on Monday mornings" },
    { label: "Story Opener",    template: "I {did something bold} — here's what happened.", example_fitness: "I trained every single day for 90 days and here's what nobody told me.",                   example_trading: "I blew my entire trading account. Here's the exact mistake I made." },
    { label: "Curiosity Gap",   template: "The real reason {people} {struggle/succeed}.",   example_fitness: "The real reason fit people never seem to gain weight — and it's not genetics.",             example_trading: "The real reason some traders are consistently profitable and others never are." },
  ],
  written: [
    { label: "Bold Statement",  template: "Most {people} are doing {this} wrong.",           example_fitness: "Most gym-goers are doing cardio completely wrong.",                                          example_trading: "Most traders are reading charts in the worst possible direction." },
    { label: "Number Tease",    template: "{N} things {audience} never tells you",           example_fitness: "5 things your personal trainer will never tell you",                                         example_trading: "3 things prop traders know that retail traders don't" },
    { label: "This or That",    template: "{Option A} vs {Option B}: the truth",             example_fitness: "Morning workout vs evening workout: which actually burns more fat?",                         example_trading: "Technical analysis vs price action: which one actually works?" },
    { label: "Warning",         template: "⚠️ Stop {doing this} if you want {result}",      example_fitness: "⚠️ Stop doing sit-ups if you actually want abs",                                            example_trading: "⚠️ Stop adding indicators if you want to be profitable" },
    { label: "Cliffhanger",     template: "What happens when you {action} for 30 days",     example_fitness: "What happens when you cut sugar for just 30 days",                                           example_trading: "What happens when you only take A+ setups for 30 days" },
  ],
  visual: [
    { label: "Transformation",    template: "Before → After reveal in the first frame",     example_fitness: "Split screen: before/after body transformation — no words needed",                          example_trading: "Account balance before vs after implementing one rule" },
    { label: "Pattern Interrupt", template: "Something unexpected in the frame",            example_fitness: "Working out in a suit, or a completely unexpected location",                                  example_trading: "Trading from an unusual location or with something surprising on screen" },
    { label: "Rating Setup",      template: "Rate this [X] — Good, Bad, or Excellent?",    example_fitness: "Rate this workout form — good, bad, or dangerous?",                                          example_trading: "Rate this trade setup — good, bad, or excellent?" },
    { label: "Bold Text First",   template: "Big text on screen before you start speaking", example_fitness: "'Your trainer is lying to you' on screen before saying a word",                              example_trading: "'This setup prints money' on screen before you show the chart" },
    { label: "Prop Hook",         template: "Hold up a relevant object that creates curiosity", example_fitness: "Hold up a supplement bottle and say 'throw this away'",                              example_trading: "Hold up a notebook with P&L visible before you explain it" },
  ],
};

const ANGLES = [
  {
    id: "howto", title: "How-To / Tutorial", icon: "🔧",
    desc: "Step-by-step instruction. Works for every niche, every platform. The safest angle to start with — and still one of the highest-performing.",
    template: "How to {achieve result} in {timeframe} (even if {common objection})",
    examples: {
      fitness:    "How to lose 10lbs in 8 weeks (even if you've failed every diet before)",
      finance:    "How to save $500/month starting this week (even if you live paycheck to paycheck)",
      trading:    "How to find a high-probability setup in under 2 minutes (even if you're a beginner)",
      business:   "How to land your first client this week (even if you have zero portfolio)",
      marketing:  "How to write a hook that stops the scroll (even if you hate writing)",
      mindset:    "How to build real discipline in 21 days (even if you've tried and failed before)",
      realestate: "How to find undervalued properties before anyone else does",
      other:      "How to get results fast in your niche (even as a complete beginner)",
    }
  },
  {
    id: "myth", title: "Myth Busting", icon: "💥",
    desc: "Challenge a popular belief. Instantly triggers curiosity, arguments, and shares. Best for niches full of outdated or wrong conventional wisdom.",
    template: "The biggest lie about {topic} that everyone still believes",
    examples: {
      fitness:    "The biggest lie about cardio that the fitness industry keeps pushing",
      finance:    "The biggest lie about budgeting that keeps most people broke",
      trading:    "The biggest lie about technical analysis that most traders fall for",
      business:   "The biggest lie about 'finding your passion' that keeps people stuck",
      marketing:  "The biggest lie about posting frequency that tanks most accounts",
      mindset:    "The biggest lie about motivation that stops people from ever changing",
      realestate: "The biggest lie about 'location, location, location' in real estate",
      other:      "The biggest lie in your industry that nobody wants to say out loud",
    }
  },
  {
    id: "story", title: "Storytelling", icon: "📖",
    desc: "Personal story that leads to a lesson. Highest watch time of any angle. Works because people don't feel sold to — they feel invited.",
    template: "I {did something bold or vulnerable}. Here's what I learned.",
    examples: {
      fitness:    "I stopped working out for 3 months. Here's what actually happened to my body.",
      finance:    "I had $0 in my account at 25. Here's exactly how I turned it around.",
      trading:    "I blew my entire trading account in one day. Here's the mistake I'll never repeat.",
      business:   "I quit my 6-figure job to start a business. 90 days later, here's the truth.",
      marketing:  "My reel flopped with 200 followers. Then one small change got me 100K views.",
      mindset:    "I had the worst year of my life. Here's what it actually taught me.",
      realestate: "I lost $20K on my first investment property. Here's exactly what went wrong.",
      other:      "I made the biggest mistake in my niche. Here's the full story — including what fixed it.",
    }
  },
  {
    id: "listicle", title: "Listicle", icon: "📋",
    desc: "Numbered lists. Instantly shareable, easy to consume, endlessly watchable. The safest format to go viral with.",
    template: "{Number} {things} that {benefit/surprise your audience}",
    examples: {
      fitness:    "5 foods that actually make you gain weight (you probably eat #3 every single day)",
      finance:    "7 subscriptions you should cancel right now (most people still pay for all of them)",
      trading:    "4 trade setups that consistently print money every week",
      business:   "3 tools that replaced $2,000/month in software for my agency",
      marketing:  "6 hook formats that consistently hit 500K+ views",
      mindset:    "4 daily habits that changed my life — none involve waking up at 5AM",
      realestate: "5 signs a property is undervalued before you even see the inside",
      other:      "5 things experts in your niche know that beginners never learn",
    }
  },
  {
    id: "opinion", title: "POV / Hot Take", icon: "🔥",
    desc: "Bold opinion that's slightly controversial. The highest comment-bait angle. People can't resist agreeing or disagreeing.",
    template: "Unpopular opinion: {contrarian take on common advice in your niche}",
    examples: {
      fitness:    "Unpopular opinion: going to the gym 6 days a week is slowing your results.",
      finance:    "Unpopular opinion: your 401(k) might be the worst place for your money right now.",
      trading:    "Unpopular opinion: most trading education is designed to keep you losing.",
      business:   "Unpopular opinion: 'building in public' is hurting your business before it starts.",
      marketing:  "Unpopular opinion: posting consistency matters less than most creators think.",
      mindset:    "Unpopular opinion: hustle culture is the reason most people never succeed.",
      realestate: "Unpopular opinion: renting is smarter than buying for most people under 35.",
      other:      "Unpopular opinion: the advice everyone gives in your niche is actually holding people back.",
    }
  },
  {
    id: "casestudy", title: "Case Study / Proof", icon: "📊",
    desc: "Real results with specific numbers. Builds the fastest credibility. Harder to fake, so the audience trusts it more.",
    template: "How {subject} got {specific result} in {specific timeframe}",
    examples: {
      fitness:    "How my client lost 18lbs in 6 weeks without giving up a single carb",
      finance:    "How a 24-year-old paid off $30K in debt in 18 months on a $50K salary",
      trading:    "How I turned $2K into $11K in one trade (full breakdown, no BS)",
      business:   "How my client went from 0 to $10K/month in 60 days",
      marketing:  "How we took a client from 2K to 30K followers in 90 days — exactly what we did",
      mindset:    "How I went from sleeping in until noon to a 5AM wake-up in 30 days",
      realestate: "How my first rental property cash flows $700/month with zero down",
      other:      "How my client achieved their goal in record time — the full honest breakdown",
    }
  },
  {
    id: "reaction", title: "React & Rate", icon: "👀",
    desc: "React to something relevant in your space in real time. Easiest to batch-produce. Gets shared by the audiences of whatever you react to.",
    template: "Rating {things in your niche} — Good, Bad, or Excellent?",
    examples: {
      fitness:    "Rating celebrity workout routines — good, bad, or genuinely dangerous?",
      finance:    "Rating the most viral financial advice from TikTok this week",
      trading:    "Rating these 5 trade setups — good, bad, or excellent?",
      business:   "Rating startup pitches I've seen this month — fundable or not?",
      marketing:  "Rating this week's viral hooks — what made them actually work?",
      mindset:    "Rating famous people's morning routines — worth copying or completely overrated?",
      realestate: "Rating investment properties — strong deal, bad deal, or walk away?",
      other:      "Rating popular advice in your niche — does this actually work or not?",
    }
  },
];

const CTA_OPTIONS = {
  following: {
    label: "Build My Following",
    icon: "👥",
    sub: "Grow audience first",
    phrases: [
      "Follow for more {niche} content exactly like this",
      "Save this — you'll want to come back to it",
      "Share this with someone who needs to see it",
      "Comment '{WORD}' and I'll DM you my full guide on this",
      "What's your biggest struggle with {niche}? Comment below and I'll reply",
    ],
    tip: "Use ManyChat to auto-DM anyone who comments a keyword. This tricks the algorithm into thinking your content drives conversations — which boosts it to more people.",
  },
  leads: {
    label: "Generate Leads",
    icon: "💼",
    sub: "Attract buyers",
    phrases: [
      "Comment '{KEYWORD}' and I'll DM you my free {resource}",
      "Link in bio to book a free strategy call",
      "DM me '{WORD}' if you want help with {specific goal}",
      "Drop your biggest challenge in the comments — I'll reply to every single one",
      "Follow + DM me 'READY' if you want to work together",
    ],
    tip: "The best lead-gen CTAs make people feel like they're getting something exclusive. 'DM me READY' self-selects for motivated buyers — you only hear from people who actually want help.",
  },
};

const VIDEO_FORMATS = [
  { id: "talking",     title: "Talking Head",         icon: "🎤", desc: "You speak directly to camera. Most versatile format and builds personal connection fastest. Works for every niche.", difficulty: "Easy",   virality: 4 },
  { id: "screen",      title: "Screen Record",         icon: "💻", desc: "Screen share with voiceover. Perfect for tutorials, tool demos, trade charts, dashboards, and walkthroughs.",       difficulty: "Easy",   virality: 3 },
  { id: "textbroll",   title: "Text + B-Roll",         icon: "📝", desc: "Bold text overlays on relevant footage. High production feel. Works brilliantly for finance, real estate, and lifestyle.", difficulty: "Medium", virality: 5 },
  { id: "walking",     title: "Walking & Talking",     icon: "🚶", desc: "Casual and authentic. Feels unscripted even when it isn't. Perfect for travel, day-in-life, and outdoor content.", difficulty: "Easy",   virality: 4 },
  { id: "interview",   title: "Interview / Collab",    icon: "🎙️", desc: "Two people on screen. Natural back-and-forth. Borrows the other person's audience and adds instant credibility.",  difficulty: "Medium", virality: 4 },
  { id: "daylife",     title: "Day in the Life",       icon: "📅", desc: "Show your real daily routine. High personal brand value. Creates aspiration and genuine trust simultaneously.",     difficulty: "Medium", virality: 4 },
  { id: "transform",   title: "Transformation",        icon: "✨", desc: "Before → after reveal. Highest emotional impact of any format. Fitness results, business growth, space makeovers.", difficulty: "Hard",   virality: 5 },
  { id: "documentary", title: "Mini-Documentary",      icon: "🎬", desc: "Third-person storytelling with narration. Feels premium. Case studies and brand origin stories are perfect here.", difficulty: "Hard",   virality: 5 },
  { id: "tutorial",    title: "Step-by-Step Tutorial", icon: "📚", desc: "Live walkthrough of a full process. Save-worthy content people bookmark and return to repeatedly.",               difficulty: "Medium", virality: 4 },
  { id: "reaction",    title: "React & Rate",          icon: "👀", desc: "React to something in your niche in real time. Maximum comment bait. Easy to batch-produce once you find the format.", difficulty: "Easy",   virality: 4 },
  { id: "bts",         title: "Behind the Scenes",     icon: "🎥", desc: "Show the process behind your results. Builds massive authenticity. Works for creators, agencies, coaches.",         difficulty: "Easy",   virality: 3 },
];

const EDITING_ELEMENTS = [
  {
    id: "jumpcuts",
    title: "Jump Cuts",
    icon: "✂️",
    what: "Cut every 1–2 seconds during talking segments. Remove every pause, breath, filler word, and dead moment.",
    why: "Completion rate is the metric the algorithm rewards most. Dead air is a skip. Jump cuts keep pace high and every second earns its place.",
    tip: "In CapCut, use 'Auto Captions' to see your transcript visually — pauses show up clearly. Cut around them. Aim for a cut at least every 2 seconds.",
  },
  {
    id: "textover",
    title: "Text Overlays",
    icon: "🔤",
    what: "Big, bold captions that sync with what you say. Key phrases appear on screen a moment before you speak them.",
    why: "60–85% of Reels and TikToks are watched with sound off. Text overlays are your second hook — without them, you're losing more than half your audience.",
    tip: "Use high-contrast colors (white on dark, black on bright). Every 2–3 seconds, something should visually change on screen. Avoid small fonts — if it's hard to read on mobile, it doesn't exist.",
  },
  {
    id: "sfx",
    title: "Sound Effects",
    icon: "🔊",
    what: "Whoosh transitions, dramatic builds, a satisfying 'ding' when you reveal something, trending audio underneath your voice.",
    why: "Sound design signals production quality subconsciously. Higher perceived quality means more trust, more follows, and more DMs.",
    tip: "CapCut has a free SFX library — search 'whoosh', 'ding', 'build'. Trending audio already has a warm audience who will watch to the end just because of the sound.",
  },
];

const SCRIPT_STRUCTURES = {
  easy: [
    {
      id: "ifyou", title: "If You", tag: "Easy",
      best_for: "Segmenting your audience, speaking directly to one type of person. Very high watch-through because viewers feel like you're talking only to them.",
      structure: [
        "IF YOU are [specific description of viewer]…",
        "Then you're probably dealing with [pain/problem]",
        "Here's what you need to know: [your value/insight]",
        "And that's why [CTA or conclusion]",
      ],
      examples: {
        fitness:    ["IF YOU'VE been going to the gym for 6+ months…", "Then you're probably not seeing the results you expected.", "Here's what you need to know: you're almost certainly in a caloric surplus without realizing it.", "Track your food for just 3 days and you'll see exactly why."],
        trading:    ["IF YOU keep losing trades even when you have a strategy…", "Then you're probably letting emotions override your rules.", "Here's what you need to know: 80% of trading success is psychology, not analysis.", "The fix is a pre-trade checklist — comment CHECKLIST and I'll send mine."],
        business:   ["IF YOU'VE been freelancing for a year and still struggling to find clients…", "Then you're probably marketing to everyone and converting no one.", "Here's what you need to know: niching down will double your close rate overnight.", "DM me 'NICHE' and I'll show you exactly how."],
        other:      ["IF YOU are [your ideal viewer description]…", "Then you're probably dealing with [their specific frustration].", "Here's what you need to know: [your core insight or teaching point].", "And here's what to do next: [CTA]."],
      }
    },
    {
      id: "rating", title: "Rating / Scoring", tag: "Easy",
      best_for: "Reaction content. Consistently generates high comment volume — viewers want to agree or disagree with your ratings.",
      structure: [
        "Here are [N] {things} I'm rating today…",
        "Rate each one out loud: Good / Bad / Excellent (or 1–10)",
        "React to each with brief commentary",
        "End with the most surprising or controversial rating",
      ],
      examples: {
        fitness:    ["Here are 5 popular diets I'm rating today…", "Keto: Great for short-term, brutal long-term. 6/10.", "Intermittent fasting: Actually works if you're consistent. 8/10.", "The one I'm giving a 10/10 might completely surprise you."],
        trading:    ["Here are 4 trade setups I saw this week…", "Setup 1: Good entry, terrible stop placement. 5/10 — avoidable loss.", "Setup 2: Perfect execution, perfect size. This is exactly what I look for. 9/10.", "Setup 3 was the one I almost took — and I'm glad I didn't."],
        business:   ["Here are 3 business ideas people pitched me this week…", "Idea 1: Clever concept, terrible timing. 5/10.", "Idea 2: Boring name, incredible market. 8/10.", "Idea 3 was the one I actually asked to invest in."],
        other:      ["Here are [N] [things in your niche] I'm rating today…", "Rate #1 with a number and quick reason", "Rate #2 — agree or disagree in the comments", "The one getting a 10 — you'll never guess which one."],
      }
    },
    {
      id: "visual", title: "Visual Indicator", tag: "Easy",
      best_for: "Physical niches, before/after content, data visualization, chart analysis. Lets the visual do the talking.",
      structure: [
        "Show [object/screen/body/chart] on camera",
        "Point out what most people completely miss",
        "Explain why it matters more than they think",
        "Tell them what to do instead or next",
      ],
      examples: {
        fitness:    ["[Show scale showing same weight after 8 weeks]", "Most people would say 'nothing changed' — look at this photo.", "Same weight. Completely different body composition. The scale is lying to you.", "This is why the scale is the worst way to track your progress."],
        trading:    ["[Show chart with entry and exit points marked]", "Most traders see this setup and do absolutely nothing.", "But look — three signals are lining up at the exact same moment.", "When you see this confluence, that's your green light. Here's how to size it."],
        business:   ["[Show invoice for a service vs a productized offer]", "Same amount of work. Look at the price difference.", "This is why service businesses stay small and productized offers scale.", "Here's how I restructured mine in one afternoon."],
        other:      ["[Show the visual that tells your story — data, chart, before/after]", "Most people in your niche miss exactly this.", "Here's why it matters more than they realize.", "And here's what to do about it."],
      }
    },
    {
      id: "rapidfire", title: "Rapid-Fire", tag: "Easy",
      best_for: "List content, quick tips, debunking myths in rapid succession. High energy, very re-watchable.",
      structure: [
        "[Fast cut] Tip or myth #1 in one sentence",
        "[Fast cut] Tip or myth #2 in one sentence",
        "[Fast cut] Tip or myth #3 in one sentence",
        "…the most important one: [pause for emphasis]",
      ],
      examples: {
        fitness:    ["Cut carbs after 6pm? Myth.", "Train fasted for fat loss? Mostly myth.", "Protein within 30 minutes of training? Less important than total daily protein.", "The one thing that actually matters: your weekly calorie average."],
        trading:    ["Trade every single day? Wrong.", "More indicators equals better analysis? Wrong.", "Bigger account means safer trading? Wrong.", "The one edge that actually compounds over time: patience and selectivity."],
        business:   ["Need a website before your first client? Wrong.", "You need a big following to make sales? Wrong.", "Need a niche before you start? Wrong.", "The one thing you actually need: one conversation with one person who has the problem you solve."],
        other:      ["[Common myth #1 in your niche]? Wrong.", "[Common myth #2]? Wrong.", "[Common myth #3]? Wrong.", "The one truth that changes everything: [your core insight]."],
      }
    },
  ],
  complex: [
    {
      id: "didyouknow", title: "Did You Know", tag: "Complex",
      best_for: "Educational content, surprising facts, reframes. Very high share rate because people feel smart forwarding it.",
      structure: [
        "DID YOU KNOW: [surprising fact or stat]?",
        "Most people assume [the wrong common belief]",
        "But here's what's actually happening: [the real explanation]",
        "And this means you should [actionable implication]",
      ],
      examples: {
        fitness:    ["DID YOU KNOW your body can only build about 2lbs of muscle per month?", "Most people hit the gym daily thinking more sessions equals more muscle.", "But here's what's actually happening: anything beyond your recovery capacity is just damage.", "This means 3 well-structured sessions beat 6 mediocre ones. Every single week."],
        trading:    ["DID YOU KNOW 90% of retail traders lose money in their first year?", "Most people assume it's because they don't know enough strategies or patterns.", "But here's what's actually happening: it's almost always risk management failure, not analysis.", "This means your first job isn't finding good trades — it's protecting your capital until you do."],
        business:   ["DID YOU KNOW most agencies die not from lack of clients, but from too many bad ones?", "Most founders think growth means saying yes to everything.", "But here's what's actually happening: bad clients consume 80% of your time and produce 20% of your revenue.", "This means firing the wrong clients is often more valuable than finding new ones."],
        other:      ["DID YOU KNOW [surprising fact in your niche]?", "Most people assume [the wrong commonly held belief].", "But here's what's actually happening: [the real explanation].", "This means you should [the actionable takeaway]."],
      }
    },
    {
      id: "threelevels", title: "Three Levels", tag: "Complex",
      best_for: "Educational breakdowns, showing progression, creating aspiration. Viewers always identify with one level and want to get to the next.",
      structure: [
        "Level 1 (Beginner): What most people do",
        "Level 2 (Intermediate): What people who've studied think",
        "Level 3 (Advanced): What actually works at the highest level",
        "Which level are you at? [CTA]",
      ],
      examples: {
        fitness:    ["Level 1: 'I need to eat less and move more.' (Wrong, but common.)", "Level 2: 'I need to track macros and lift heavy.' (Better — most stop here.)", "Level 3: 'I need to periodize training, optimize sleep and recovery, not just stack effort.'", "Comment your level below — I'll tell you exactly what to focus on next."],
        trading:    ["Level 1: 'I'll follow signals and copy trades.' (Loses money, every time.)", "Level 2: 'I'll learn technical analysis and stack indicators.' (Better, still loses money.)", "Level 3: 'I'll master one setup, size it correctly, and execute with pure discipline.'", "Most traders are stuck at Level 2. DM me '3' if you're ready to graduate."],
        business:   ["Level 1: 'I'll post more and hope someone sees it.' (Exhausting and ineffective.)", "Level 2: 'I'll optimize my funnel and run ads.' (Expensive until you nail the offer.)", "Level 3: 'I'll get so specific about who I help and what I do that I become unavoidable.'", "Which level describes your business right now? Tell me in the comments."],
        other:      ["Level 1: [What beginners do — common but ineffective]", "Level 2: [What people who've done research think — better but incomplete]", "Level 3: [What actually works at the highest level in your niche]", "Which level are you at? Comment below and I'll tell you exactly what to focus on."],
      }
    },
    {
      id: "isitpossible", title: "Is It Possible", tag: "Complex",
      best_for: "Aspirational content, busting perceived limits, content that challenges what your audience believes is achievable.",
      structure: [
        "IS IT POSSIBLE to [ambitious or controversial goal]?",
        "The conventional answer is [no/yes/complicated]",
        "But I've seen it happen when [specific condition or approach]",
        "Here's exactly how: [the breakdown]",
      ],
      examples: {
        fitness:    ["IS IT POSSIBLE to lose 20lbs in 30 days?", "The conventional answer is 'no — that's unhealthy and impossible.'", "But I've seen it happen — and here's the important nuance: most of it is water, inflammation, and waste.", "The sustainable version takes 90 days and is 10x more permanent. Here's how."],
        trading:    ["IS IT POSSIBLE to turn $1,000 into $10,000 in 90 days?", "The conventional answer is 'technically yes, but extremely risky and unlikely.'", "But I've seen it happen consistently — when someone has a proven edge and sizes up gradually.", "Here's the exact risk/reward ratio you'd need, and why most people miss it."],
        business:   ["IS IT POSSIBLE to go from $0 to $10K/month in 60 days?", "The conventional answer is 'maybe with luck or an audience.'", "But I've watched it happen — when the offer is specific, the audience is right, and outreach is direct.", "Here's the exact playbook. No ads, no funnel, no following required."],
        other:      ["IS IT POSSIBLE to [big ambitious goal in your niche]?", "The conventional answer is [what most people would say].", "But I've seen it happen when [the specific condition that changes everything].", "Here's exactly how: [your breakdown or teaching point]."],
      }
    },
    {
      id: "twopeople", title: "Two People", tag: "Complex",
      best_for: "Contrast content, cautionary tales, creating strong relatability. Viewers always identify with one person and want to become the other.",
      structure: [
        "Person A: [Does the common, less effective thing]",
        "Person B: [Does the smarter, less obvious thing]",
        "1 year later: Person A [result A], Person B [result B]",
        "Which person are you being right now?",
      ],
      examples: {
        fitness:    ["Person A joins a gym in January. Goes hard for 2 weeks. Burns out completely. Quits.", "Person B joins the same gym. Commits to 3 sessions a week. Never misses.", "1 year later: Person A is back where they started. Person B is 30lbs lighter.", "The difference wasn't talent or willpower — it was expectation management."],
        trading:    ["Person A makes $5K on their very first trade. Goes all in. Loses everything.", "Person B makes $500 on their first ten trades. Grows the account slowly and steadily.", "6 months later: Person A quit trading. Person B has a process and a growing balance.", "Slow money is the fastest money in this game."],
        business:   ["Person A launches a business and immediately tries to be everywhere at once.", "Person B picks one platform, one offer, one audience. Stays there for 90 days.", "6 months later: Person A is exhausted with no traction. Person B has consistent leads.", "Focus isn't a strategy. It's the only strategy that actually compounds."],
        other:      ["Person A [does the common thing your audience does].", "Person B [does the smarter, less obvious thing].", "1 year later: [contrast the outcomes clearly and specifically].", "Which one are you being right now?"],
      }
    },
  ],
};

const CHECKLIST_ITEMS = [
  { id: "hook3",    text: "My first 1–3 seconds have all 3 hooks working: verbal, written text on screen, and visual frame" },
  { id: "topic",    text: "This topic is something my audience is actively asking about, searching for, or struggling with" },
  { id: "value",    text: "I share at least one insight or piece of information they can't easily find elsewhere" },
  { id: "angle",    text: "I've chosen a clear script angle (how-to, myth, story, list, opinion, case study, or react)" },
  { id: "pace",     text: "My script runs under 60 seconds when read out loud at a natural pace" },
  { id: "cta",      text: "My CTA is a single, specific action: follow, save, comment a keyword, or DM me" },
  { id: "manychat", text: "If using a comment CTA: ManyChat is configured to auto-reply with the promised content" },
  { id: "caption",  text: "My caption reinforces the hook and includes 3–5 relevant hashtags" },
  { id: "cover",    text: "My thumbnail/cover frame has legible bold text and a clear, compelling subject" },
  { id: "audio",    text: "Audio is clean and clear — background noise is minimal, trending sound is added if relevant" },
];

const PROCESS_STEPS = [
  {
    num: "01", title: "Find the Topic", icon: "🔍",
    desc: "Look for the top-of-mind questions and problems your audience is already searching for. Check competitor comments, YouTube autocomplete, and Reddit. Your topic should make someone stop mid-scroll and think 'that's exactly what I need right now.'",
    action: "Write your topic as a question your audience is already asking. If no one is asking it, find a different topic.",
  },
  {
    num: "02", title: "Build the Hook", icon: "🎣",
    desc: "Write all three hooks before you write anything else. Your verbal hook (what you say), your written hook (text on screen), and your visual hook (what's in frame). All three should align and amplify each other. This is the only part of your script that actually determines whether the video performs.",
    action: "Write one of each. Test your verbal hook by reading it out loud — if you'd stop scrolling, it works.",
  },
  {
    num: "03", title: "Choose a Structure", icon: "🏗️",
    desc: "Pick a script structure that matches your goal and energy. Easy structures (If You, Rating, Rapid-Fire) for fast production and high volume. Complex structures (Did You Know, Three Levels, Two People) for deeper engagement and saves.",
    action: "Fill in the structure template with your topic and niche-specific examples. Don't write — fill in the blanks first.",
  },
  {
    num: "04", title: "End with One CTA", icon: "🎯",
    desc: "Decide exactly what you want them to do. One action only — follow, save, comment, or DM. If you use a comment CTA, set up ManyChat so it triggers an auto-DM. Never end a video without telling people what to do next. Always.",
    action: "Write your CTA as a single sentence. If it takes more than one breath to say, it's too long. Cut it down.",
  },
];

const VALUE_TYPES = [
  {
    icon: "🔬",
    title: "Info Nobody Else Shares",
    desc: "Insights that feel exclusive or counterintuitive. Things your audience would screenshot and send to someone else.",
    example_fitness: "Most people think muscle soreness = a good workout. It doesn't. Here's what you should actually track.",
    example_trading: "Volume precedes price. Not price action, not indicators — volume. Here's what to look for.",
    example_business: "Your best clients already know someone who needs you. Most founders never ask for the referral.",
    example_other: "The one thing your audience is doing wrong that they've never heard questioned before.",
  },
  {
    icon: "📈",
    title: "Case Studies & Proof",
    desc: "Real results with real numbers. The more specific, the more credible. Don't round up.",
    example_fitness: "My client ate 2,100 calories and lost 14lbs in 7 weeks. Here's exactly what she ate.",
    example_trading: "I took 12 trades this month. 9 wins, 3 losses. Net P&L: $2,340. Here's every trade.",
    example_business: "This one email got us 3 new clients in 48 hours. Here's the exact subject line and body.",
    example_other: "Real result with real specifics from your own work or a client's experience.",
  },
  {
    icon: "🔥",
    title: "Strong Opinions",
    desc: "Takes that polarize. People who agree share it. People who disagree comment. Both outcomes help you.",
    example_fitness: "Cardio before weights is one of the biggest myths in fitness. I'll prove it in 60 seconds.",
    example_trading: "Day trading is not a strategy. It's a gambling addiction with better branding.",
    example_business: "Most business coaches have never built anything. They've only built courses about building things.",
    example_other: "The uncomfortable truth about your niche that the experts don't want to say.",
  },
  {
    icon: "🎯",
    title: "Specific & Actionable",
    desc: "Not 'eat better.' Not 'invest wisely.' Exact steps, exact numbers, exact order. People save specific content.",
    example_fitness: "Add 200 calories to your maintenance, 1g of protein per pound of bodyweight, lift 3x per week. That's the entire formula.",
    example_trading: "Risk 1% per trade, look for 3:1 R/R minimum, trade only between 9:30 and 11AM. That's the full system.",
    example_business: "Send 10 DMs per day to people who engaged with competitor content. Offer a free audit. Book a call. That's the entire client acquisition funnel.",
    example_other: "Exact steps, exact numbers, exact sequence. The more specific, the more it gets saved.",
  },
];

Object.assign(window, {
  NicheCtx, CHAPTERS, NICHES,
  TOPIC_EXAMPLES, HOOK_DATA, ANGLES, CTA_OPTIONS,
  VIDEO_FORMATS, EDITING_ELEMENTS, SCRIPT_STRUCTURES,
  CHECKLIST_ITEMS, PROCESS_STEPS, VALUE_TYPES,
});
