// Per-industry onboarding data: sub-trades, materials, pricing defaults, lead intake
// questions, AI voice vocab, sample jobs, and integration partners. Categories that aren't
// listed here fall back to the generic default at the bottom.

const ONBOARDING_BY_CAT = {

  roofing: {
    industryLabel: 'Roofing',
    subTrades: [
      'Residential reroof', 'Commercial reroof', 'Repair & patch',
      'Insurance / storm claims', 'Gutter add-on', 'Skylight install',
      'Ridge vent / attic vent', 'Solar-ready prep', 'Inspections',
    ],
    materials: ['GAF Timberline', 'CertainTeed Landmark', 'Owens Corning Duration', 'Atlas Pinnacle', 'Tamko Heritage', 'Standing-seam metal'],
    pricingExample: { rate: 95, markup: 35, margin: 32, deposit: 25 },
    estimateFields: [
      { id:'pitch',    name:'Roof pitch',         kind:'select', opts:['3/12','4/12','6/12','8/12','10/12','12/12'] },
      { id:'sqft',     name:'Square footage',     kind:'number' },
      { id:'material', name:'Shingle line',       kind:'select', opts:['GAF Timberline HDZ','CertainTeed Landmark','Owens Corning Duration','Standing-seam','Other'] },
      { id:'layers',   name:'Tear-off layers',    kind:'number' },
      { id:'decking',  name:'Decking replacement',kind:'toggle' },
      { id:'gutters',  name:'Gutter add-on',      kind:'toggle' },
      { id:'tier',     name:'Tier · good/better/best', kind:'select', opts:['Good','Better','Best'] },
    ],
    leadQs: [
      { id:'cause',     q:'Storm damage or wear?',                       on:true },
      { id:'insurance', q:'Are you filing an insurance claim?',          on:true },
      { id:'carrier',   q:'Which carrier?',                              on:true },
      { id:'leak',      q:'Active leak right now?',                      on:true },
      { id:'pets',      q:'Pets we should know about on the property?',  on:false },
      { id:'access',    q:'Driveway access for a dumpster?',             on:true },
      { id:'timeline',  q:'How soon are you hoping to start?',           on:true },
      { id:'decider',   q:'Anyone else on the title we should loop in?', on:true },
    ],
    voiceVocab: {
      use:    ['tear-off', 'supplement', 'ridge', 'valley', 'underlayment', 'ice & water', 'square', 'tarp'],
      avoid:  ['patch', 'hardware-store', 'cheap', 'temporary fix'],
    },
    partners: ['ABC Supply', 'Beacon', 'SRS Distribution', 'Xactimate', 'CompanyCam', 'AccuLynx', 'JobNimbus'],
    sampleJobs: [
      { addr:'1421 Pine St',  scope:'Full reroof · 24 sq · GAF Timberline HDZ', amt:'$18,142', won:true },
      { addr:'209 Birch Ave', scope:'Storm supplement · State Farm', amt:'$11,840', won:true },
      { addr:'88 Oak Rd',     scope:'Repair · 4 squares · valley', amt:'$2,180',  won:false },
    ],
  },

  hvac: {
    industryLabel: 'HVAC',
    subTrades: [
      'Residential install', 'Residential service', 'Heat pump conversions',
      'Ductwork', 'Mini-splits', 'Commercial RTU', 'Indoor air quality',
      'Maintenance contracts', 'Emergency dispatch',
    ],
    materials: ['Carrier', 'Trane', 'Lennox', 'Rheem', 'Goodman', 'Mitsubishi', 'Daikin', 'York'],
    pricingExample: { rate: 145, markup: 40, margin: 38, deposit: 25 },
    estimateFields: [
      { id:'tonnage', name:'System tonnage',    kind:'select', opts:['1.5','2','2.5','3','3.5','4','5'] },
      { id:'seer',    name:'SEER rating',       kind:'select', opts:['14','15','16','18','20+'] },
      { id:'type',    name:'System type',       kind:'select', opts:['Split A/C + furnace','Heat pump','Mini-split','Package unit'] },
      { id:'duct',    name:'Ductwork mods',     kind:'toggle' },
      { id:'returns', name:'Add returns',       kind:'number' },
      { id:'permit',  name:'Permit required',   kind:'toggle' },
      { id:'finance', name:'Financing offered', kind:'toggle' },
    ],
    leadQs: [
      { id:'age',      q:'How old is the existing system?',          on:true },
      { id:'symptom',  q:"What's it doing wrong (no cool, leak…)?", on:true },
      { id:'replace',  q:'Repair or replace?',                        on:true },
      { id:'fuel',     q:'Gas, electric, or heat pump?',              on:true },
      { id:'finance',  q:'Interested in financing?',                  on:true },
      { id:'budget',   q:'Rough budget?',                             on:false },
      { id:'access',   q:'Where is the air handler (attic, garage)?', on:true },
      { id:'decider',  q:'Anyone else deciding with you?',            on:true },
    ],
    voiceVocab: {
      use:    ['tonnage', 'SEER', 'condenser', 'air handler', 'ductwork', 'refrigerant', 'heat pump'],
      avoid:  ['unit', 'thing', 'fancy', 'cheap fix'],
    },
    partners: ['Ferguson', 'Carrier Connect', 'Wrightsoft Manual J', 'ServiceTitan', 'GoodLeap (financing)', 'CompanyCam'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'3-ton Carrier condenser + air handler', amt:'$8,470', won:true },
      { addr:'504 Elm Ave',  scope:'Heat pump conversion · 4-ton', amt:'$11,840', won:true },
      { addr:'88 Oak Rd',    scope:'Capacitor + thermostat service', amt:'$340', won:false },
    ],
  },

  plumbing: {
    industryLabel: 'Plumbing',
    subTrades: [
      'Service calls', 'Repipes', 'Water heaters · tank',
      'Water heaters · tankless', 'Drain cleaning', 'Sewer line repair',
      'Slab leak', 'Fixture install', 'Backflow / cross-connection',
      'Emergency dispatch',
    ],
    materials: ['Bradford White', 'Rinnai', 'Navien', 'Rheem', 'A.O. Smith', 'Kohler', 'Moen', 'Delta'],
    pricingExample: { rate: 135, markup: 32, margin: 36, deposit: 25 },
    estimateFields: [
      { id:'fixtures', name:'Fixtures',         kind:'number' },
      { id:'material', name:'Pipe material',    kind:'select', opts:['PEX','Copper','CPVC','Cast iron','Mixed'] },
      { id:'access',   name:'Access',           kind:'select', opts:['Slab','Crawl','Basement','Attic'] },
      { id:'wh_type',  name:'Water heater',     kind:'select', opts:['Tank · gas','Tank · electric','Tankless · gas','Tankless · electric','None'] },
      { id:'permit',   name:'Permit required',  kind:'toggle' },
    ],
    leadQs: [
      { id:'active',    q:'Is the leak active right now?',                on:true },
      { id:'shutoff',   q:'Is your main shutoff accessible?',             on:true },
      { id:'location',  q:'Where is the issue (kitchen, bath, basement)?', on:true },
      { id:'damage',    q:'Any visible water damage already?',            on:true },
      { id:'insurance', q:'Filing an insurance claim?',                   on:true },
      { id:'house_age', q:'How old is the house?',                        on:false },
      { id:'pets',      q:'Pets we should know about?',                   on:false },
      { id:'decider',   q:'Anyone else deciding with you?',               on:true },
    ],
    voiceVocab: {
      use:    ['PEX', 'shutoff', 'fixture', 'tankless', 'cleanout', 'P-trap', 'supply line'],
      avoid:  ['handyman fix', 'cheap', 'band-aid'],
    },
    partners: ['Ferguson', 'Home Depot Pro', 'ServiceTitan', 'Housecall Pro', 'CompanyCam'],
    sampleJobs: [
      { addr:'504 Elm Ave',  scope:'Water heater · 50gal + repipe section', amt:'$3,870', won:true },
      { addr:'88 Oak Rd',    scope:'Slab leak detect + repair',            amt:'$2,180', won:true },
      { addr:'1421 Pine St', scope:'Drain camera + cleanout',              amt:'$640',   won:false },
    ],
  },

  electrical: {
    industryLabel: 'Electrical',
    subTrades: [
      'Panel upgrades', 'EV charger install', 'Generator install',
      'Service calls', 'New construction', 'Lighting', 'Smart-home wiring',
      'Solar interconnect', 'Commercial', 'Emergency dispatch',
    ],
    materials: ['Square D', 'Eaton', 'Siemens', 'Generac', 'Kohler', 'Tesla Wall Connector', 'ChargePoint'],
    pricingExample: { rate: 125, markup: 30, margin: 35, deposit: 25 },
    estimateFields: [
      { id:'amps',     name:'Service amperage',  kind:'select', opts:['100A','150A','200A','300A','400A'] },
      { id:'circuits', name:'Circuits added',    kind:'number' },
      { id:'mast',     name:'Service mast',      kind:'toggle' },
      { id:'permit',   name:'Permit required',   kind:'toggle' },
      { id:'ev',       name:'EV charger stub',   kind:'toggle' },
      { id:'gen',      name:'Generator',         kind:'toggle' },
    ],
    leadQs: [
      { id:'symptom',  q:"What's the issue (tripping, no power, upgrade)?", on:true },
      { id:'loads',    q:'Adding any 240v loads (EV, hot tub)?',             on:true },
      { id:'panel',    q:'Current panel age?',                                on:true },
      { id:'kids',     q:'Kids in the home (we lock circuits during work)?', on:false },
      { id:'permit',   q:'Have you pulled a permit before with us?',         on:false },
      { id:'utility',  q:'Which utility serves you?',                        on:true },
      { id:'decider',  q:'Anyone else deciding with you?',                   on:true },
    ],
    voiceVocab: {
      use:    ['panel', 'service drop', 'load calc', '240v', 'breaker', 'GFCI', 'AFCI'],
      avoid:  ['unsafe', 'fire hazard', 'sketchy'],
    },
    partners: ['Graybar', 'Rexel', 'Ferguson Electrical', 'ServiceTitan', 'CompanyCam'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'200A panel upgrade + EV stub', amt:'$4,610', won:true },
      { addr:'504 Elm Ave',  scope:'Whole-home generator · Generac 22kW', amt:'$14,800', won:true },
      { addr:'88 Oak Rd',    scope:'2 GFCI replacements + diagnostic', amt:'$280', won:false },
    ],
  },

  solar: {
    industryLabel: 'Solar',
    subTrades: [
      'Residential solar', 'Battery backup', 'Commercial solar',
      'Solar + roof bundle', 'EV charger add-on', 'Re-roof + reinstall',
      'Off-grid systems', 'Service & monitoring',
    ],
    materials: ['REC', 'QCells', 'Panasonic', 'SunPower', 'Enphase IQ', 'Tesla Powerwall', 'Franklin aPower'],
    pricingExample: { rate: 165, markup: 28, margin: 22, deposit: 25 },
    estimateFields: [
      { id:'panels',  name:'Panel count',    kind:'number' },
      { id:'wattage', name:'Wattage / panel', kind:'select', opts:['350W','400W','420W','440W','550W'] },
      { id:'invtype', name:'Inverter',       kind:'select', opts:['Enphase IQ8','SolarEdge HD','Tesla','Other'] },
      { id:'battery', name:'Battery',        kind:'select', opts:['None','Tesla Powerwall 3','Franklin aPower','Enphase 5P','Other'] },
      { id:'roofage', name:'Roof age',       kind:'select', opts:['<5 yrs','5–10 yrs','10–15 yrs','15+ yrs'] },
      { id:'finance', name:'Financing',      kind:'select', opts:['Cash','Loan','PPA','Lease'] },
    ],
    leadQs: [
      { id:'reason',   q:"What's motivating solar — bills, outages, both?", on:true },
      { id:'bill',     q:"What's your average monthly electric bill?",       on:true },
      { id:'roof',     q:'How old is your roof?',                             on:true },
      { id:'battery',  q:'Want battery backup?',                              on:true },
      { id:'finance',  q:'Cash, loan, or financing?',                         on:true },
      { id:'hoa',      q:'Any HOA restrictions to know about?',               on:true },
      { id:'utility',  q:'Which utility?',                                    on:true },
      { id:'decider',  q:'Anyone else deciding with you?',                    on:true },
    ],
    voiceVocab: {
      use:    ['offset', 'interconnect', 'derate', 'AHJ', 'utility rebate', 'production', 'consumption'],
      avoid:  ['gimmick', 'free solar', 'no-cost'],
    },
    partners: ['Aurora Solar', 'OpenSolar', 'GoodLeap', 'Mosaic', 'Sunlight Financial', 'Enphase Installer Toolkit'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'24 panel + Powerwall 3', amt:'$31,380', won:true },
      { addr:'504 Elm Ave',  scope:'18 panel grid-tie', amt:'$22,400', won:true },
      { addr:'88 Oak Rd',    scope:'Battery retrofit · 1 Powerwall', amt:'$13,200', won:false },
    ],
  },

  pool: {
    industryLabel: 'Pool',
    subTrades: [
      'Weekly service', 'Equipment install', 'Pool builds · gunite',
      'Pool builds · vinyl', 'Liner replacement', 'Heater install',
      'Automation', 'Tile / coping', 'Resurfacing',
    ],
    materials: ['Pentair', 'Hayward', 'Jandy', 'Polaris', 'Raypak', 'A.O. Smith'],
    pricingExample: { rate: 95, markup: 35, margin: 35, deposit: 25 },
    estimateFields: [
      { id:'gallons',  name:'Pool gallons',    kind:'number' },
      { id:'shape',    name:'Shape',           kind:'select', opts:['Rectangle','Kidney','Freeform','L-shape','Lap'] },
      { id:'equip',    name:'Equipment package',kind:'select', opts:['Basic','Energy-saver','Smart automation','Premium VS'] },
      { id:'heater',   name:'Heater',          kind:'select', opts:['Gas','Electric heat pump','Solar','None'] },
      { id:'auto',     name:'Automation',      kind:'toggle' },
    ],
    leadQs: [
      { id:'kind',     q:'Service plan or equipment install?', on:true },
      { id:'size',     q:'Pool size (gallons or LxW)?',         on:true },
      { id:'age',      q:'How old is the existing equipment?',  on:true },
      { id:'rebate',   q:'Interested in energy rebate filing?', on:true },
      { id:'automation', q:'Want pool automation (phone app)?', on:false },
      { id:'access',   q:'Equipment pad access (gate, side yard)?', on:true },
      { id:'decider',  q:'Anyone else deciding with you?',      on:true },
    ],
    voiceVocab: {
      use:    ['gunite', 'plaster', 'coping', 'VS pump', 'SWG', 'cartridge', 'turnover'],
      avoid:  ['hot tub', 'cheap', 'quick fix'],
    },
    partners: ['Pentair', 'Hayward Pro Edge', 'Pool Corp', 'PoolPro Office'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'VS pump + automation', amt:'$3,840', won:true },
      { addr:'504 Elm Ave',  scope:'400k BTU heater + heat pump combo', amt:'$7,280', won:true },
      { addr:'88 Oak Rd',    scope:'Weekly chemistry · 4 mo', amt:'$880',  won:false },
    ],
  },

  tree: {
    industryLabel: 'Tree',
    subTrades: [
      'Removals · medium', 'Removals · large / hazard', 'Tree trimming',
      'Stump grinding', 'Storm cleanup', 'Hazard assessment',
      'Insurance work', 'Crane work',
    ],
    materials: [],
    pricingExample: { rate: 145, markup: 0, margin: 38, deposit: 50 },
    estimateFields: [
      { id:'count',  name:'Tree count',     kind:'number' },
      { id:'height', name:'Tallest · ft',   kind:'number' },
      { id:'access', name:'Crane access',   kind:'select', opts:['Yes · driveway','Yes · backyard gate','No · climb only','Bucket truck only'] },
      { id:'stump',  name:'Stump removal',  kind:'toggle' },
      { id:'haul',   name:'Haul off + chip',kind:'toggle' },
      { id:'wires',  name:'Power lines nearby', kind:'toggle' },
    ],
    leadQs: [
      { id:'urgency',  q:'Active hazard (leaning, dropped limb)?', on:true },
      { id:'lines',    q:'Are there power lines near the tree?',   on:true },
      { id:'access',   q:'Can a crane / bucket truck access?',     on:true },
      { id:'insurance',q:'Insurance claim involved?',              on:true },
      { id:'permit',   q:'Any HOA / city permits needed?',         on:false },
      { id:'cleanup',  q:'Want stump grinding + haul-off?',        on:true },
      { id:'decider',  q:'Anyone else deciding with you?',         on:true },
    ],
    voiceVocab: {
      use:    ['dbh', 'crown', 'crown reduction', 'climbing arborist', 'TRAQ', 'ISA-certified'],
      avoid:  ['topping', 'lion-tailing', 'butchering'],
    },
    partners: ['ArboStar', 'SingleOps', 'CompanyCam', 'Crew2'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'Oak removal · 38" dbh · crane', amt:'$5,540', won:true },
      { addr:'504 Elm Ave',  scope:'Maple trim · 22" crown', amt:'$680', won:true },
      { addr:'88 Oak Rd',    scope:'4 stumps grind', amt:'$840', won:false },
    ],
  },

  landscape: {
    industryLabel: 'Landscaping',
    subTrades: [
      'Weekly mow', 'Bed maintenance', 'Spring / fall cleanup',
      'Fertilization', 'Aeration / overseeding', 'Design + install',
      'Sod install', 'Irrigation install', 'Snow removal',
    ],
    materials: [],
    pricingExample: { rate: 75, markup: 30, margin: 32, deposit: 50 },
    estimateFields: [
      { id:'sqft',  name:'Yard · sq ft',      kind:'number' },
      { id:'mow',   name:'Mow cadence',       kind:'select', opts:['Weekly','Bi-weekly','Monthly'] },
      { id:'beds',  name:'Bed maintenance',   kind:'toggle' },
      { id:'fert',  name:'Fertilization program', kind:'toggle' },
      { id:'tier',  name:'Service tier',      kind:'select', opts:['Basic','Standard','Premium'] },
    ],
    leadQs: [
      { id:'cadence',  q:'One-time or ongoing?',                      on:true },
      { id:'size',     q:'Roughly how big is the yard?',              on:true },
      { id:'pets',     q:'Pets (we close gates, pick up before mow)?',on:true },
      { id:'beds',     q:'Front/back beds need maintenance?',         on:true },
      { id:'fert',     q:'Interested in our fertilization program?',  on:true },
      { id:'irrigation', q:'Existing irrigation system?',             on:false },
      { id:'access',   q:'Gate access for the mower / trailer?',      on:true },
    ],
    voiceVocab: {
      use:    ['pre-emergent', 'overseed', 'aerate', 'mulch refresh', 'bed edging'],
      avoid:  ['cheap', 'just mow it', 'whatever'],
    },
    partners: ['LMN', 'Aspire', 'SingleOps', 'Jobber'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'Weekly mow + bed maintenance · season', amt:'$2,640', won:true },
      { addr:'504 Elm Ave',  scope:'Spring fert program · 4 apps', amt:'$420', won:true },
      { addr:'88 Oak Rd',    scope:'Sod install · 1,200 sf', amt:'$3,800', won:false },
    ],
  },

  cleaning: {
    industryLabel: 'Cleaning',
    subTrades: [
      'Residential · recurring', 'Residential · deep clean',
      'Move-in / move-out', 'Post-construction', 'Window cleaning',
      'Carpet / upholstery', 'Commercial / janitorial', 'Vacation rental turnovers',
    ],
    materials: [],
    pricingExample: { rate: 55, markup: 0, margin: 38, deposit: 0 },
    estimateFields: [
      { id:'sqft',   name:'Sq ft',         kind:'number' },
      { id:'bed',    name:'Bedrooms',      kind:'number' },
      { id:'bath',   name:'Bathrooms',     kind:'number' },
      { id:'tier',   name:"Tier · what's included", kind:'select', opts:['Standard','Deep','Spotless'] },
      { id:'cad',    name:'Cadence',       kind:'select', opts:['One-time','Weekly','Bi-weekly','Monthly'] },
    ],
    leadQs: [
      { id:'cadence',  q:'One-time or recurring?',                  on:true },
      { id:'size',     q:'House size (sq ft, bed/bath)?',           on:true },
      { id:'pets',     q:'Pets (and do they shed)?',                on:true },
      { id:'kids',     q:'Small kids (use eco products)?',          on:true },
      { id:'access',   q:'How do we get in (code, key, on-site)?',  on:true },
      { id:'addons',   q:'Add-ons (windows, oven, fridge interior)?', on:false },
      { id:'sensitivities', q:'Any fragrance / chemical sensitivities?', on:true },
    ],
    voiceVocab: {
      use:    ['deep clean', 'eco-friendly', 'fragrance-free', 'turnover', 'punch list'],
      avoid:  ['cheap', 'just dust it', 'whatever'],
    },
    partners: ['ZenMaid', 'Jobber', 'Booqable', 'Stripe', 'TurnoverBnB'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'Bi-weekly · 2,400 sf', amt:'$220', won:true },
      { addr:'504 Elm Ave',  scope:'Initial deep + 18 windows', amt:'$720', won:true },
      { addr:'88 Oak Rd',    scope:'Move-out · 3 bed', amt:'$540', won:false },
    ],
  },

  restoration: {
    industryLabel: 'Restoration',
    subTrades: [
      'Water mitigation', 'Mold remediation', 'Fire damage',
      'Smoke / soot', 'Biohazard cleanup', 'Storm response',
      'Contents pack-out', 'Reconstruction',
    ],
    materials: [],
    pricingExample: { rate: 165, markup: 20, margin: 38, deposit: 0 },
    estimateFields: [
      { id:'cat',     name:'Water category',  kind:'select', opts:['Cat 1 · clean','Cat 2 · gray','Cat 3 · black','N/A'] },
      { id:'sqft',    name:'Affected sf',     kind:'number' },
      { id:'rooms',   name:'Rooms affected',  kind:'number' },
      { id:'mold',    name:'Mold testing',    kind:'toggle' },
      { id:'contents',name:'Contents pack-out',kind:'toggle' },
      { id:'tier',    name:'Carrier preferred',kind:'select', opts:['State Farm','Allstate','USAA','Liberty Mutual','Farmers','Other'] },
    ],
    leadQs: [
      { id:'safety',   q:'Is anyone in immediate danger right now?', on:true },
      { id:'when',     q:'When did the loss happen?',                on:true },
      { id:'source',   q:'What was the source?',                     on:true },
      { id:'shutoff',  q:'Is the source contained / shutoff?',       on:true },
      { id:'carrier',  q:'Which insurance carrier?',                 on:true },
      { id:'claim',    q:'Is a claim filed already?',                on:true },
      { id:'health',   q:'Anyone in the home with respiratory issues?', on:true },
      { id:'decider',  q:'Are you the homeowner?',                   on:true },
    ],
    voiceVocab: {
      use:    ['mitigation', 'cat 1/2/3', 'IICRC', 'HEPA', 'containment', 'antimicrobial', 'pack-out'],
      avoid:  ["don't worry", 'cheap', 'minor'],
    },
    partners: ['Xactimate', 'Symbility', 'DASH', 'Encircle', 'CoreLogic'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'Cat 3 water mitigation · 480 sf', amt:'$7,680', won:true },
      { addr:'504 Elm Ave',  scope:'Mold remediation · basement',     amt:'$5,420', won:true },
      { addr:'88 Oak Rd',    scope:'Smoke + odor · kitchen fire',     amt:'$2,180', won:false },
    ],
  },

  default: {
    industryLabel: 'General',
    subTrades: [
      'Residential service', 'Commercial service', 'New construction',
      'Maintenance contracts', 'Emergency dispatch',
    ],
    materials: [],
    pricingExample: { rate: 95, markup: 30, margin: 30, deposit: 25 },
    estimateFields: [
      { id:'scope',   name:'Scope',          kind:'select', opts:['Small','Medium','Large','Custom'] },
      { id:'sqft',    name:'Footprint sf',   kind:'number' },
      { id:'matl',    name:'Materials',      kind:'select', opts:['Standard','Premium','Custom'] },
      { id:'permit',  name:'Permit',         kind:'toggle' },
      { id:'tier',    name:'Tier',           kind:'select', opts:['Good','Better','Best'] },
    ],
    leadQs: [
      { id:'scope',    q:'Tell me about the project',           on:true },
      { id:'size',     q:'Rough size / footprint?',             on:true },
      { id:'budget',   q:'Budget range?',                       on:false },
      { id:'timeline', q:'Timeline?',                           on:true },
      { id:'access',   q:'Site access?',                        on:true },
      { id:'decider',  q:'Anyone else deciding with you?',      on:true },
    ],
    voiceVocab: { use:[], avoid:['cheap','sketchy','quick fix'] },
    partners: ['Jobber', 'ServiceTitan', 'CompanyCam', 'Stripe'],
    sampleJobs: [
      { addr:'1421 Pine St', scope:'Standard scope', amt:'$4,200', won:true },
      { addr:'504 Elm Ave',  scope:'Medium scope',   amt:'$8,400', won:true },
      { addr:'88 Oak Rd',    scope:'Small repair',   amt:'$640',   won:false },
    ],
  },
};

const ONBOARDING_STEPS = [
  { id:'welcome',      title:'Welcome',         heading:'Tell us about the business.',  sub:'Five minutes to set the floor. We do the rest.' },
  { id:'services',     title:'Service mix',     heading:'What jobs do you take?',        sub:"Pick everything you'd quote on a normal week. We won't price what you don't sell." },
  { id:'pricing',      title:'Price book',      heading:'Your labor, materials, margins.', sub:'These set the floor. The engine flexes above them based on the world — never below.' },
  { id:'fields',       title:'Estimate form',   heading:'Your fields.',                  sub:"We pre-loaded the defaults your trade actually uses. Drop what you don't need; add anything missing." },
  { id:'history',      title:'Job library',     heading:'Upload your last 50 jobs.',     sub:'This is how the AI learns your style. PDFs, photos, exports from your old tool — anything goes.' },
  { id:'intake',       title:'Lead intake',     heading:'What should we ask leads?',     sub:'Toggle the questions your CSR asks. Reorder them. Add custom ones.' },
  { id:'voice',        title:'AI voice',        heading:'How should the system sound?',  sub:"Real humans, not robots. Set the tone and the words it should — and shouldn't — say." },
  { id:'connect',      title:'Connections',     heading:'Plug in your stack.',           sub:"Calendar, CRM, payments, dispatch, suppliers. Skip whatever's not in your kit." },
  { id:'review',       title:'Review · launch', heading:'Last look before we install.',  sub:'Five-minute review, then a real human reaches out to schedule install.' },
];

function getOnboardingConfig(serviceName) {
  const service = SERVICE_LIST.find(s => s.name === serviceName);
  const cat = service?.cat || 'default';
  const ob = ONBOARDING_BY_CAT[cat] || ONBOARDING_BY_CAT.default;
  return {
    ...ob,
    serviceName: serviceName || 'Your trade',
    cat,
  };
}

Object.assign(window, { ONBOARDING_BY_CAT, ONBOARDING_STEPS, getOnboardingConfig });
