{"version":3,"names":["initCRI","window","location","pathname","el","document","getElementById","style","display","mainOutlet","discourseUser","preloaded","parsed","JSON","parse","dataset","e","container","Discourse","__container__","currentUser","lookup","username","get","name","firstName","split","innerHTML","PILLARS","id","blurb","CHOICES","QUESTIONS","p","q","sub","opts","pillarTier","score","desc","TIERS","key","subtitle","range","working","exposed","help","cta","overallProfile","total","i","length","PRIORITY_COPY","state","answers","Array","fill","idx","$","show","forEach","s","classList","toggle","scrollTo","top","behavior","renderQuestion","pillar","filter","textContent","wrap","txt","selected","label","createElement","className","addEventListener","disabled","appendChild","pct","Math","round","width","computeResults","pillarScores","Object","values","reduce","a","b","lowest","renderResults","r","setProperty","profile","tierIndex","indexOf","pwrap","tier","pctP","row","items","it","li","ctaLabels","console","log","user","submittedAt","Date","toISOString","print","_lastPath","checkPath","setTimeout","readyState","setInterval"],"sources":["theme-1-inline-common-body_tag.js"],"sourcesContent":["\n(function() {\n  // Only run on the /readiness-index path\n  function initCRI() {\n    if (window.location.pathname !== '/readiness-index') {\n      var el = document.getElementById('cri-app');\n      if (el) el.style.display = 'none';\n      return;\n    }\n    var el = document.getElementById('cri-app');\n    if (el) el.style.display = '';\n\n    // Hide Discourse's main outlet so the quiz has the full page\n    var mainOutlet = document.getElementById('main-outlet');\n    if (mainOutlet) mainOutlet.style.display = 'none';\n\n    // Detect logged-in Discourse user\n    var discourseUser = null;\n    try {\n      var preloaded = document.getElementById('data-preloaded');\n      if (preloaded) {\n        var parsed = JSON.parse(preloaded.dataset.preloaded);\n        if (parsed && parsed['current_user']) {\n          discourseUser = JSON.parse(parsed['current_user']);\n        }\n      }\n    } catch(e) {}\n    // Fallback: check Discourse.__container__\n    if (!discourseUser) {\n      try {\n        var container = Discourse.__container__;\n        var currentUser = container.lookup('service:current-user');\n        if (currentUser) {\n          discourseUser = {\n            username: currentUser.get('username'),\n            name: currentUser.get('name') || currentUser.get('username')\n          };\n        }\n      } catch(e) {}\n    }\n\n    if (discourseUser && document.getElementById('cri-greeting')) {\n      var firstName = (discourseUser.name || discourseUser.username || '').split(' ')[0];\n      document.getElementById('cri-greeting').innerHTML =\n        'Logged in as <strong>' + firstName + '</strong> — your results will be saved to your profile.';\n      document.getElementById('cri-greeting').style.display = '';\n    }\n\n    // ─── DATA ───\n    var PILLARS = [\n      { id:1, name:\"Financial Sovereignty\", blurb:\"Wealth, liquidity, and structures beyond institutional reach.\" },\n      { id:2, name:\"Physical Preparedness\", blurb:\"Supply, capability, and household continuity under stress.\" },\n      { id:3, name:\"Legal & Documentation\", blurb:\"Counsel, paperwork, and rights fluency under pressure.\" },\n      { id:4, name:\"Peer Network\",          blurb:\"The trusted, capable humans you can actually call.\" },\n    ];\n    var CHOICES = [\"A\",\"B\",\"C\",\"D\"];\n\n    var QUESTIONS = [\n      { p:1, q:\"What percentage of your liquid savings currently exists outside the Canadian banking system?\",\n        sub:\"e.g., Bitcoin in self-custody, physical gold/silver, offshore accounts, physical cash.\",\n        opts:[\"None. Everything I have is in Canadian bank accounts.\",\"Under 10%. I've started thinking about it but haven't committed.\",\"10–30%. I have a meaningful allocation outside the system.\",\"Over 30%. A significant portion of my wealth is beyond institutional reach.\"]},\n      { p:1, q:\"If Canadian banks froze access to your accounts tomorrow, how long could your household sustain normal operations?\",\n        opts:[\"Less than two weeks. I'd be in serious trouble quickly.\",\"Two to four weeks. I have some cash on hand but not much runway.\",\"One to three months. I have accessible assets to weather a freeze.\",\"Three months or more. I've planned for this scenario specifically.\"]},\n      { p:1, q:\"Do you have a documented wealth protection structure in place?\",\n        sub:\"e.g., holding company, family trust, offshore account, will with power of attorney.\",\n        opts:[\"No. My finances are standard with no special structures.\",\"Partially. I have a basic will but nothing more deliberate than that.\",\"Yes. I have one or two protective structures in place.\",\"Yes. I have a multi-layer structure with current legal review.\"]},\n      { p:1, q:\"How would you characterize your working knowledge of alternative monetary assets — Bitcoin, gold, foreign currency — and their role in wealth protection?\",\n        opts:[\"Low. I'm aware they exist but haven't studied them seriously.\",\"Basic. I know the thesis but haven't acted on it meaningfully.\",\"Solid. I understand the mechanics and have made deliberate allocations.\",\"Advanced. I actively manage a sovereign asset stack with self-custody.\"]},\n\n      { p:2, q:\"Does your household have a minimum 30-day supply of food and water that could sustain you without resupply?\",\n        opts:[\"No. We'd be dependent on stores within a few days.\",\"About a week. I've thought about it but it hasn't become a priority.\",\"Two to four weeks. A decent buffer — but I know it needs to go deeper.\",\"Thirty days or more. This is an established part of how I run my household.\"]},\n      { p:2, q:\"How prepared is your household for a home defense scenario within Canada's legal framework?\",\n        opts:[\"Not at all. I don't own any defensive tools and haven't thought through this.\",\"Minimally. I've thought about it but haven't taken concrete action.\",\"Moderately. I have legal defensive tools and a basic plan.\",\"Well-prepared. Legal defensive tools, trained with them, documented household plan.\"]},\n      { p:2, q:\"How would you honestly rate your personal physical capability in a high-stress, sustained survival scenario?\",\n        opts:[\"Low. My health or fitness level would be a significant liability.\",\"Moderate. I'm functional but not conditioned for sustained physical stress.\",\"Good. I maintain a consistent fitness baseline and can handle physical demands.\",\"High. I train with resilience and functional capacity as explicit goals.\"]},\n      { p:2, q:\"Does your household have a documented emergency plan that you could execute without internet, phone service, or outside assistance?\",\n        opts:[\"No. We haven't formalized any plan.\",\"Informal. We've talked about it, but nothing is written down or drilled.\",\"Partial. We have some basics covered, but meaningful gaps remain.\",\"Yes. We have a written plan that we've reviewed and can execute.\"]},\n\n      { p:3, q:\"Do you have access to a lawyer — ideally with civil liberties experience — you could call in an emergency situation?\",\n        opts:[\"No. I'd be starting from scratch in a crisis.\",\"Not specifically. I know a lawyer, but not one suited for this type of situation.\",\"Yes. I have a professional relationship with a lawyer I trust for this.\",\"Yes. Pre-established legal relationships, including civil liberties and constitutional expertise.\"]},\n      { p:3, q:\"Are your essential personal documents — passport, property titles, will, power of attorney, digital asset access — organized, current, and accessible?\",\n        opts:[\"Partially organized, likely outdated, with no clear access plan.\",\"Mostly organized but not current or protected in any systematic way.\",\"Organized and current, but not backed up or stored with deliberate protection.\",\"Fully organized, current, backed up offsite, with documented access instructions for trusted parties.\"]},\n      { p:3, q:\"Do you understand your legal rights in Canada in the following scenarios: police entry to your home, use of force in self-defense, financial account freeze or seizure?\",\n        opts:[\"No. I'd be improvising under pressure.\",\"Vaguely. I have a general sense, but I couldn't act with confidence.\",\"Moderately. I know the basics and have looked into this specifically.\",\"Well. I've researched these scenarios in depth and know what to do.\"]},\n      { p:3, q:\"Have you reviewed your estate and business structure with the current legal and political environment in Canada in mind — within the last 12–24 months?\",\n        opts:[\"No. Standard setup. Nothing is structured for resilience.\",\"Basic review only — a will and standard accounts, nothing strategic.\",\"Moderate. I've addressed some vulnerabilities with intent.\",\"Yes — reviewed recently, with resilience as an explicit goal.\"]},\n\n      { p:4, q:\"How many people in your immediate geographic area share your worldview AND have meaningful capability across any of the other three pillars?\",\n        opts:[\"None that I'm aware of.\",\"One or two. My network here is thin.\",\"A small trusted circle of three to five. Meaningful but not deep.\",\"Six or more. I have a genuine local network I could coordinate with tomorrow.\"]},\n      { p:4, q:\"If you needed emergency legal, financial, or physical assistance from a trusted peer tomorrow — not family, not general contacts — what would happen?\",\n        opts:[\"I'd have no one to call. I'm largely operating alone.\",\"I'd reach out to general contacts and hope someone could help.\",\"I have one or two people I could call who would actually be useful.\",\"I have an established peer group with clear, known capabilities. I know exactly who to call for what.\"]},\n      { p:4, q:\"How actively are you engaging with communities or networks of sovereignty-minded, high-agency individuals?\",\n        opts:[\"Not at all. I consume some content but have no real community relationships.\",\"Passively. I follow relevant accounts and read the right newsletters, but no real engagement.\",\"Moderately. I'm part of one or two communities, but engagement is surface-level.\",\"Actively. I contribute to and genuinely draw value from a network of like-minded operators.\"]},\n      { p:4, q:\"Do you have trusted peers in other cities or jurisdictions you could coordinate with or rely on if your local situation became untenable?\",\n        opts:[\"No. My network is hyper-local or nonexistent.\",\"Vaguely. Some online connections, but nothing reliable under real pressure.\",\"Yes. A few trusted contacts in other locations with genuine relationships.\",\"Yes. A deliberate geographic spread of trusted, capable relationships.\"]},\n    ];\n\n    function pillarTier(score) {\n      if (score<=3) return {name:\"Exposed\",  desc:\"Significant vulnerability in this pillar. Priority action required.\"};\n      if (score<=6) return {name:\"Aware\",    desc:\"You understand the need. You haven't acted at scale.\"};\n      if (score<=9) return {name:\"Building\", desc:\"Meaningful progress. Real gaps remain. Moving in the right direction.\"};\n      return                {name:\"Fortified\",desc:\"Well-positioned. The work here is maintenance, depth, and redundancy.\"};\n    }\n\n    var TIERS = [\n      { key:\"unprotected\", name:\"Unprotected\", subtitle:\"The foundation isn't built.\", range:[0,9],\n        desc:\"A single bank freeze, supply disruption, or legal incident would put your household in immediate crisis. The good news: you took the quiz honestly — that's where every operator starts.\",\n        working:[\"You've faced the question most Canadians avoid — your current position is clear to you.\",\"The willingness to look at your exposure is itself the first move.\"],\n        exposed:[\"You have no liquidity outside the Canadian banking perimeter.\",\"Your household could not sustain a short-term supply or infrastructure disruption.\",\"You have no pre-established legal counsel and no one outside your family you could call in a crisis.\"],\n        help:[\"<b>Onboarding Station match.</b> Ready CA places you inside a capability-matched peer group on day one — so you're not rebuilding from zero, alone.\",\"<b>First-90-Days Protocol.</b> A weekly action sequence across all four pillars, so awareness converts into tangible capability fast.\",\"<b>Vetted specialists.</b> Direct introductions to trusted counsel, custody coaches, and preparedness mentors inside the network.\"],\n        cta:\"You don't have to solve this alone. Start inside a community that's already doing the work.\"\n      },\n      { key:\"awake\", name:\"Awake\", subtitle:\"You see the problem. You haven't solved it.\", range:[10,19],\n        desc:\"You understand what's happening in Canada and why it matters. The risk now is the gap between awareness and action — and consuming more content won't close it.\",\n        working:[\"You've moved past denial. You understand the systems and why they're fragile.\",\"You've begun diversifying at least one pillar — small but deliberate moves.\"],\n        exposed:[\"The gap between what you know and what you've executed is widening.\",\"You're largely operating alone — consuming feeds rather than engaging peers.\",\"Your structures — legal, financial, physical — are incomplete and undocumented.\"],\n        help:[\"<b>Member Story archive.</b> Read how members who started exactly where you are bridged the gap — the order of operations, the mistakes, the wins.\",\"<b>Pillar working groups.</b> Small, active cohorts turning awareness into weekly execution — with accountability, not just information.\",\"<b>Station placement.</b> You get matched with peers on the same curve, so momentum compounds instead of decaying.\"],\n        cta:\"Convert awareness into capability — inside a network that has already done it.\"\n      },\n      { key:\"in-motion\", name:\"In Motion\", subtitle:\"Real work is underway.\", range:[20,28],\n        desc:\"You've made concrete moves across multiple pillars. You're ahead of most Canadians — but individual progress hits a ceiling without peers of comparable capability around you.\",\n        working:[\"You've made real allocations outside the banking system and have meaningful supply and capability at home.\",\"You have at least one trusted professional relationship and a working grasp of your rights.\",\"You're beginning to see that coordination, not just accumulation, is the next layer.\"],\n        exposed:[\"Redundancy is thin — single points of failure remain across pillars.\",\"Your network lacks geographic spread and capability density.\",\"You're still the lone node doing the work for your household.\"],\n        help:[\"<b>Peer coordination.</b> Ready CA's Stations place you alongside operators of comparable depth — local-first, with cross-regional reach.\",\"<b>Quarterly convenings.</b> In-person working sessions on each pillar, where plans get stress-tested against real operators.\",\"<b>Knowledge transfer.</b> You pull from members further along and contribute to those a step behind — the flywheel individuals can't build alone.\"],\n        cta:\"Individual work has a ceiling. Ready CA is where the next layer of readiness lives.\"\n      },\n      { key:\"fortified\", name:\"Fortified\", subtitle:\"You're ahead of 95% of Canadians. The network is the missing piece.\", range:[29,38],\n        desc:\"You've done the individual work — across structures, supply, rights, and relationships. The remaining exposure isn't in what you own; it's in the density of the network around you.\",\n        working:[\"Multi-layer protective structures, meaningful allocations, and documented plans are in place.\",\"You have established legal and professional relationships you can activate under pressure.\",\"You understand the systems and you've acted on that understanding.\"],\n        exposed:[\"Your coordination with peers of equivalent capability is still informal.\",\"Knowledge you've built privately doesn't transfer — so it doesn't compound.\",\"Geographic redundancy of trusted peers remains a soft edge.\"],\n        help:[\"<b>Operator-tier placement.</b> You're matched with a Station of peers at comparable depth — the conversations are different here.\",\"<b>Cross-regional coordination.</b> Trusted contacts in other jurisdictions, vetted through the network rather than assembled ad hoc.\",\"<b>Working group leadership.</b> Shape the protocols newer members follow — your experience becomes leverage, not just insurance.\"],\n        cta:\"Join the operator tier — where the work is network density, not catch-up.\"\n      },\n      { key:\"sovereign-operator\", name:\"Sovereign Operator\", subtitle:\"You are who this community is built around.\", range:[39,48],\n        desc:\"You've done the work across all four pillars with depth and deliberation. What remains isn't personal — it's civic. The Canadian sovereignty landscape needs operators of your caliber visible, coordinated, and transferring knowledge.\",\n        working:[\"Depth and redundancy across every pillar — structures reviewed, assets protected, capabilities maintained.\",\"Mature professional relationships and geographic spread already in motion.\",\"You already think in terms of systems, peer capability, and long time horizons.\"],\n        exposed:[\"Knowledge that isn't transferred dies with you.\",\"Individual sovereignty without a peer network is brittle under sustained pressure.\",\"The country has few visible operators at your level — that's a civic exposure, not just a personal one.\"],\n        help:[\"<b>Protagonist track.</b> Contribute to Ready CA's public work and shape the national readiness standard.\",\"<b>Private convenings.</b> Closed-door sessions with operators at comparable depth — the conversations that don't happen anywhere else.\",\"<b>CRI research influence.</b> Direct input on the benchmarks, findings, and methodology used in the annual Canadian Readiness Index.\"],\n        cta:\"Lead from the front. Ready CA is where operators like you convene and compound.\"\n      }\n    ];\n\n    function overallProfile(total) {\n      for (var i = 0; i < TIERS.length; i++) {\n        if (total >= TIERS[i].range[0] && total <= TIERS[i].range[1]) return TIERS[i];\n      }\n      return TIERS[TIERS.length - 1];\n    }\n\n    var PRIORITY_COPY = {\n      1:\"Your weakest pillar is Financial Sovereignty. Start here: a written plan to move a meaningful percentage of liquid savings outside the Canadian banking perimeter — and the structures to protect it.\",\n      2:\"Your weakest pillar is Physical Preparedness. Start here: 30 days of supply, a written household plan your family can execute offline, and a baseline of functional fitness.\",\n      3:\"Your weakest pillar is Legal & Documentation. Start here: a relationship with counsel who handles civil liberties work, and a current, backed-up document vault with access instructions.\",\n      4:\"Your weakest pillar is Peer Network. Start here: identify five sovereignty-minded, high-capability people within 50km you can actually call — and engage a real community, not a feed.\",\n    };\n\n    // ─── STATE ───\n    var state = { answers: new Array(QUESTIONS.length).fill(null), idx: 0 };\n\n    var $ = function(id) { return document.getElementById(id); };\n\n    function show(id) {\n      [\"cri-screen-intro\",\"cri-screen-quiz\",\"cri-screen-results\"].forEach(function(s) {\n        $(s).classList.toggle(\"cri-hidden\", s !== id);\n      });\n      window.scrollTo({ top: 0, behavior: \"smooth\" });\n    }\n\n    function renderQuestion() {\n      var q = QUESTIONS[state.idx];\n      var pillar = PILLARS.filter(function(p) { return p.id === q.p; })[0];\n      $(\"cri-pillar-chip\").dataset.p = q.p;\n      $(\"cri-pillar-name\").textContent = \"Pillar \" + q.p + \" — \" + pillar.name;\n      $(\"cri-q-text\").textContent = \"Q\" + (state.idx+1) + \". \" + q.q;\n      $(\"cri-q-sub\").textContent = q.sub || \"\";\n      $(\"cri-q-sub\").style.display = q.sub ? \"block\" : \"none\";\n\n      var wrap = $(\"cri-choices\"); wrap.innerHTML = \"\";\n      q.opts.forEach(function(txt, i) {\n        var id = \"cri-opt-\" + state.idx + \"-\" + i;\n        var selected = state.answers[state.idx] === i;\n        var label = document.createElement(\"label\");\n        label.className = \"cri-choice\" + (selected ? \" selected\" : \"\");\n        label.innerHTML =\n          '<input type=\"radio\" name=\"criq' + state.idx + '\" id=\"' + id + '\" value=\"' + i + '\"' + (selected ? ' checked' : '') + '/>' +\n          '<span class=\"cri-letter\">' + CHOICES[i] + '</span>' +\n          '<span class=\"cri-text\">' + txt + '</span>';\n        label.addEventListener(\"click\", function() {\n          state.answers[state.idx] = i;\n          renderQuestion();\n          $(\"cri-btn-next\").disabled = false;\n        });\n        wrap.appendChild(label);\n      });\n\n      var pct = Math.round((state.idx / QUESTIONS.length) * 100);\n      $(\"cri-progress-text\").textContent = \"Question \" + (state.idx+1) + \" of \" + QUESTIONS.length;\n      $(\"cri-progress-fill\").style.width = pct + \"%\";\n\n      $(\"cri-btn-back\").disabled = state.idx === 0;\n      $(\"cri-btn-next\").disabled = state.answers[state.idx] === null;\n      $(\"cri-btn-next\").textContent = state.idx === QUESTIONS.length-1 ? \"See my results →\" : \"Next →\";\n    }\n\n    function computeResults() {\n      var pillarScores = {1:0, 2:0, 3:0, 4:0};\n      QUESTIONS.forEach(function(q, i) { pillarScores[q.p] += state.answers[i] || 0; });\n      var total = Object.values(pillarScores).reduce(function(a,b) { return a+b; }, 0);\n      var lowest = 1;\n      for (var p = 1; p <= 4; p++) {\n        if (pillarScores[p] < pillarScores[lowest]) lowest = p;\n      }\n      return { pillarScores: pillarScores, total: total, lowest: lowest };\n    }\n\n    function renderResults() {\n      var r = computeResults();\n      var pct = Math.round((r.total / 48) * 100);\n      $(\"cri-score-total\").textContent = r.total;\n      $(\"cri-score-percent\").textContent = pct + \"% overall\";\n      $(\"cri-score-ring\").style.setProperty(\"--pct\", pct + \"%\");\n\n      var profile = overallProfile(r.total);\n      var tierIndex = TIERS.indexOf(profile) + 1;\n      $(\"cri-tier-badge\").textContent = \"Tier \" + tierIndex + \" of \" + TIERS.length + \" — \" + profile.name;\n      $(\"cri-profile-name\").textContent = profile.name;\n      $(\"cri-profile-subtitle\").textContent = profile.subtitle;\n      $(\"cri-profile-desc\").textContent = profile.desc;\n\n      // Pillar breakdown\n      var pwrap = $(\"cri-pillars\"); pwrap.innerHTML = \"\";\n      PILLARS.forEach(function(p) {\n        var s = r.pillarScores[p.id];\n        var tier = pillarTier(s);\n        var pctP = Math.round((s / 12) * 100);\n        var row = document.createElement(\"div\");\n        row.className = \"cri-pbar\";\n        row.innerHTML =\n          '<div class=\"cri-pbar-top\">' +\n            '<div class=\"cri-pbar-title\">Pillar ' + p.id + ' — ' + p.name + '</div>' +\n            '<span class=\"cri-tier ' + tier.name + '\">' + tier.name + '</span>' +\n          '</div>' +\n          '<div class=\"cri-track\"><span style=\"width:' + pctP + '%\"></span></div>' +\n          '<div class=\"cri-pbar-meta\"><span>' + s + ' / 12</span><span>' + tier.desc + '</span></div>';\n        pwrap.appendChild(row);\n      });\n\n      // Good / Exposed\n      var fill = function(el, items) {\n        el.innerHTML = \"\";\n        items.forEach(function(it) {\n          var li = document.createElement(\"li\");\n          li.innerHTML = it;\n          el.appendChild(li);\n        });\n      };\n      fill($(\"cri-good-list\"), profile.working);\n      fill($(\"cri-bad-list\"), profile.exposed);\n\n      // How Ready CA helps\n      $(\"cri-help-lede\").textContent =\n        \"Based on your Tier \" + tierIndex + \" profile and a priority gap in \" +\n        PILLARS.filter(function(p) { return p.id === r.lowest; })[0].name +\n        \", these are the specific community mechanisms built for you:\";\n      fill($(\"cri-help-list\"), profile.help);\n\n      // Priority gap + CTA\n      $(\"cri-priority-text\").textContent = PRIORITY_COPY[r.lowest];\n      $(\"cri-cta-text\").textContent = profile.cta;\n\n      var ctaLabels = {\n        \"unprotected\":       \"Start inside the community →\",\n        \"awake\":             \"Turn awareness into action →\",\n        \"in-motion\":         \"Plug into the peer network →\",\n        \"fortified\":         \"Join the operator tier →\",\n        \"sovereign-operator\":\"Apply to the Protagonist track →\"\n      };\n      $(\"cri-cta-primary\").textContent = ctaLabels[profile.key] || \"Join the Ready CA Community →\";\n\n      // ─── POST results to webhook (optional) ───\n      // Uncomment and set your endpoint to save results externally:\n      /*\n      var payload = {\n        user: discourseUser ? discourseUser.username : 'anonymous',\n        answers: state.answers,\n        pillarScores: r.pillarScores,\n        total: r.total,\n        tier: profile.key,\n        lowest: r.lowest,\n        submittedAt: new Date().toISOString()\n      };\n      fetch('https://your-webhook-endpoint.com/cri-results', {\n        method: 'POST',\n        headers: { 'Content-Type': 'application/json' },\n        body: JSON.stringify(payload)\n      }).catch(function(e) { console.warn('CRI webhook failed', e); });\n      */\n\n      // Console log for debugging\n      try {\n        console.log(\"CRI submission\", {\n          user: discourseUser ? discourseUser.username : 'anonymous',\n          answers: state.answers,\n          pillarScores: r.pillarScores,\n          total: r.total,\n          tier: profile.key,\n          submittedAt: new Date().toISOString()\n        });\n      } catch(e) {}\n    }\n\n    // ─── WIRING ───\n    $(\"cri-btn-start\").addEventListener(\"click\", function() {\n      state.idx = 0;\n      renderQuestion();\n      show(\"cri-screen-quiz\");\n    });\n\n    $(\"cri-btn-next\").addEventListener(\"click\", function() {\n      if (state.answers[state.idx] === null) return;\n      if (state.idx < QUESTIONS.length - 1) {\n        state.idx++;\n        renderQuestion();\n      } else {\n        // Skip lead capture — go straight to results\n        renderResults();\n        show(\"cri-screen-results\");\n      }\n    });\n\n    $(\"cri-btn-back\").addEventListener(\"click\", function() {\n      if (state.idx > 0) { state.idx--; renderQuestion(); }\n    });\n\n    $(\"cri-btn-retake\").addEventListener(\"click\", function() {\n      state.answers = new Array(QUESTIONS.length).fill(null);\n      state.idx = 0;\n      show(\"cri-screen-intro\");\n    });\n\n    $(\"cri-btn-print\").addEventListener(\"click\", function() { window.print(); });\n    $(\"cri-progress-fill\").style.width = \"0%\";\n  }\n\n  // Discourse uses Ember routing — re-init on page transitions\n  var _lastPath = null;\n  function checkPath() {\n    if (window.location.pathname !== _lastPath) {\n      _lastPath = window.location.pathname;\n      // Restore main outlet on non-CRI pages\n      if (_lastPath !== '/readiness-index') {\n        var mainOutlet = document.getElementById('main-outlet');\n        if (mainOutlet) mainOutlet.style.display = '';\n      }\n      setTimeout(initCRI, 100);\n    }\n  }\n  // Run on initial load and watch for Ember transitions\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', function() { setTimeout(initCRI, 200); });\n  } else {\n    setTimeout(initCRI, 200);\n  }\n  setInterval(checkPath, 500);\n})();\n"],"mappings":"AACA,CAAC,YAAW;EACV;EACA,SAASA,OAAOA,CAAA,EAAG;IACjB,IAAIC,MAAM,CAACC,QAAQ,CAACC,QAAQ,KAAK,kBAAkB,EAAE;MACnD,IAAIC,EAAE,GAAGC,QAAQ,CAACC,cAAc,CAAC,SAAS,CAAC;MAC3C,IAAIF,EAAE,EAAEA,EAAE,CAACG,KAAK,CAACC,OAAO,GAAG,MAAM;MACjC;IACF;IACA,IAAIJ,EAAE,GAAGC,QAAQ,CAACC,cAAc,CAAC,SAAS,CAAC;IAC3C,IAAIF,EAAE,EAAEA,EAAE,CAACG,KAAK,CAACC,OAAO,GAAG,EAAE;;IAE7B;IACA,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