#5042 Skill: Breakdown a System into Subsystems, Components and Parts and Provide SCAMPER Report #5042

#5042 Skill: Breakdown a System into Subsystems, Components and Parts and Provide SCAMPER Report

#5042 Breakdown a bicycle into subsystems, components within subsystems, and parts of component. Apply SCAMPER to each and provide an HTML page reporting the results

I am going to create the Bicycle Systems Breakdown & SCAMPER Innovation Report as a single, interactive HTML application. It will include all 6 subsystems, 15 components, and 47 parts—with 476 tailored engineering SCAMPER concepts—alongside real-time search, multi-faceted filtering, an interactive tree/detail explorer, a full printable report view, and CSV export.



I have created the Bicycle Systems Breakdown & SCAMPER Innovation Report (bicycle_scamper_report.html).

Summary of What Was Built

  • Complete 3-Tier Engineering Hierarchy: 6 Subsystems, 15 Components, and 47 Parts (68 total items), each populated with all 7 SCAMPER innovation prompts (476 tailored engineering ideas).

  • Interactive Dashboard & Filtering: Live KPI counters, a clickable color-coded SCAMPER legend, real-time search with match highlighting, and filters for Hierarchy Level, Subsystem, and SCAMPER letter.

  • Dual View Modes: Switch seamlessly between the Interactive Tree & Detail View (collapsible hierarchy tree + 7-card SCAMPER analysis panel with breadcrumb and parent/child navigation) and the Full Report Table View (structured for reading and printing).

  • Utilities: Includes Expand All / Collapse All, Export CSV (respecting active filters), and Print Report with dedicated @media print styling.


Create a Skill to perform this activity for any user-specified system

The system-scamper-analyzer skill is saved and active. Whenever you ask to break down a system, product, or machine into subsystems, components, and parts with SCAMPER, it will automatically run the 3-tier decomposition, generate tailored engineering concepts across all 7 SCAMPER lenses, and build the interactive HTML report.

You can test it right away with a prompt like:

"Use system-scamper-analyzer to break down a commercial espresso machine and generate the HTML report."



From <https://gemini.google.com/app/32a71fc521397eb0>  Google Gemini (4 Neon)




<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  <title>Bicycle Systems Breakdown &amp; SCAMPER Innovation Report</title>

  <script src="https://cdn.tailwindcss.com"></script>

  <link rel="preconnect" href="https://fonts.googleapis.com" />

  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />

  <style>

    body {

      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    }

    /* Custom subtle scrollbars for tree and detail panels */

    .custom-scroll::-webkit-scrollbar {

      width: 6px;

      height: 6px;

    }

    .custom-scroll::-webkit-scrollbar-track {

      background: transparent;

    }

    .custom-scroll::-webkit-scrollbar-thumb {

      background: #cbd5e1;

      border-radius: 9999px;

    }

    .custom-scroll::-webkit-scrollbar-thumb:hover {

      background: #94a3b8;

    }

    /* Print stylesheet for clean engineering report output */

    @media print {

      body {

        background: #ffffff !important;

        color: #0f172a !important;

        font-size: 11px !important;

      }

      .no-print {

        display: none !important;

      }

      #tree-view-container {

        display: none !important;

      }

      #table-view-container {

        display: block !important;

      }

      .print-break-avoid {

        break-inside: avoid;

        page-break-inside: avoid;

      }

      .print-shadow-none {

        box-shadow: none !important;

      }

    }

  </style>

</head>

<body class="bg-slate-50 text-slate-800 antialiased min-h-screen flex flex-col">


  <!-- Top Navigation & Report Header -->

  <header class="bg-white border-b border-slate-200 sticky top-0 z-30 no-print">

    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">

      <div class="flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4">

        <div class="flex items-start sm:items-center gap-3">

          <div class="w-10 h-10 rounded-xl bg-slate-900 text-white flex items-center justify-center shrink-0 shadow-sm">

            <svg class="w-6 h-6" fill="none" stroke="currentColor" stroke-width="1.8" viewBox="0 0 24 24">

              <circle cx="5.5" cy="17.5" r="3.5" />

              <circle cx="18.5" cy="17.5" r="3.5" />

              <path stroke-linecap="round" stroke-linejoin="round" d="M15 6a1 1 0 100-2 1 1 0 000 2zm-3 11.5V14l-3-3 4-3 2 3h3" />

            </svg>

          </div>

          <div>

            <div class="flex items-center gap-2 flex-wrap">

              <h1 class="text-lg sm:text-xl font-bold text-slate-900 tracking-tight">

                Bicycle Systems Breakdown &amp; SCAMPER Innovation Report

              </h1>

              <span class="inline-flex items-center px-2 py-0.5 rounded-md text-xs font-semibold bg-slate-100 text-slate-700 border border-slate-200">

                Engineering Spec v2.0

              </span>

            </div>

            <p class="text-xs sm:text-sm text-slate-500 mt-0.5">

              3-Tier Hierarchical Decomposition (Subsystems &rarr; Components &rarr; Parts) with Full 7-Prompt SCAMPER Matrix

            </p>

          </div>

        </div>


        <!-- Utility Actions -->

        <div class="flex flex-wrap items-center gap-2">

          <button id="btn-toggle-expand" type="button"

            class="inline-flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-semibold bg-white text-slate-700 border border-slate-300 hover:bg-slate-50 transition shadow-sm">

            <svg class="w-4 h-4 text-slate-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">

              <path stroke-linecap="round" stroke-linejoin="round" d="M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4" />

            </svg>

            <span id="expand-btn-label">Collapse All</span>

          </button>

          <button id="btn-export-csv" type="button"

            class="inline-flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-semibold bg-white text-slate-700 border border-slate-300 hover:bg-slate-50 transition shadow-sm">

            <svg class="w-4 h-4 text-slate-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">

              <path stroke-linecap="round" stroke-linejoin="round" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />

            </svg>

            Export CSV

          </button>

          <button id="btn-print" type="button"

            class="inline-flex items-center gap-1.5 px-3 py-2 rounded-lg text-xs font-semibold bg-slate-900 text-white hover:bg-slate-800 transition shadow-sm">

            <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">

              <path stroke-linecap="round" stroke-linejoin="round" d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z" />

            </svg>

            Print Report

          </button>

        </div>

      </div>

    </div>

  </header>


  <!-- Print-only Title Banner -->

  <div class="hidden print:block px-6 pt-4 pb-2 border-b-2 border-slate-900 mb-4">

    <h1 class="text-2xl font-bold text-slate-900">Bicycle Systems Breakdown &amp; SCAMPER Innovation Report</h1>

    <p class="text-xs text-slate-600 mt-1">Complete 3-Level Engineering Hierarchy (6 Subsystems, 15 Components, 47 Parts) &bull; 476 SCAMPER Concepts</p>

  </div>


  <!-- Main Content Wrapper -->

  <main class="max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-6 flex-1 flex flex-col gap-5">


    <!-- Summary Dashboard & SCAMPER Legend -->

    <section class="grid grid-cols-1 lg:grid-cols-12 gap-4 no-print">

      <!-- Live KPI Cards -->

      <div class="lg:col-span-5 grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-2 xl:grid-cols-4 gap-3">

        <div class="bg-white rounded-xl border border-slate-200 p-3.5 shadow-sm">

          <div class="text-xs font-medium text-slate-500">Subsystems</div>

          <div class="mt-1 flex items-baseline gap-1.5">

            <span id="stat-subsystems" class="text-2xl font-bold text-slate-900">0</span>

            <span id="stat-subsystems-total" class="text-xs text-slate-400"></span>

          </div>

        </div>

        <div class="bg-white rounded-xl border border-slate-200 p-3.5 shadow-sm">

          <div class="text-xs font-medium text-slate-500">Components</div>

          <div class="mt-1 flex items-baseline gap-1.5">

            <span id="stat-components" class="text-2xl font-bold text-slate-900">0</span>

            <span id="stat-components-total" class="text-xs text-slate-400"></span>

          </div>

        </div>

        <div class="bg-white rounded-xl border border-slate-200 p-3.5 shadow-sm">

          <div class="text-xs font-medium text-slate-500">Parts</div>

          <div class="mt-1 flex items-baseline gap-1.5">

            <span id="stat-parts" class="text-2xl font-bold text-slate-900">0</span>

            <span id="stat-parts-total" class="text-xs text-slate-400"></span>

          </div>

        </div>

        <div class="bg-white rounded-xl border border-slate-200 p-3.5 shadow-sm">

          <div class="text-xs font-medium text-slate-500">SCAMPER Ideas</div>

          <div class="mt-1 flex items-baseline gap-1.5">

            <span id="stat-ideas" class="text-2xl font-bold text-indigo-600">0</span>

            <span id="stat-ideas-total" class="text-xs text-slate-400"></span>

          </div>

        </div>

      </div>


      <!-- Visual SCAMPER Legend (Interactive Quick Filter) -->

      <div class="lg:col-span-7 bg-white rounded-xl border border-slate-200 p-3.5 shadow-sm flex flex-col justify-between">

        <div class="flex items-center justify-between mb-2">

          <span class="text-xs font-semibold uppercase tracking-wider text-slate-500">SCAMPER Innovation Legend (Click to filter)</span>

          <span id="active-scamper-indicator" class="text-xs font-medium text-slate-400">Showing all 7 prompts</span>

        </div>

        <div id="scamper-legend" class="flex flex-wrap gap-2">

          <!-- Populated dynamically by JS -->

        </div>

      </div>

    </section>


    <!-- Filter, Search & View Mode Toolbar -->

    <section class="bg-white rounded-xl border border-slate-200 p-4 shadow-sm no-print">

      <div class="flex flex-col xl:flex-row xl:items-center gap-3">

        <!-- Search Input -->

        <div class="relative flex-1 min-w-[220px]">

          <svg class="w-4 h-4 text-slate-400 absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">

            <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />

          </svg>

          <input id="search-input" type="text" placeholder="Search parts, components, or SCAMPER engineering ideas..."

            class="w-full pl-9 pr-3 py-2 text-sm bg-slate-50 border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:bg-white transition" />

        </div>


        <!-- Dropdown Filters -->

        <div class="grid grid-cols-1 sm:grid-cols-3 gap-2.5">

          <select id="filter-level" aria-label="Filter by Hierarchy Level"

            class="px-3 py-2 text-xs font-medium bg-slate-50 border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">

            <option value="all">Level: All (68 Items)</option>

            <option value="subsystem">Subsystems Only (6)</option>

            <option value="component">Components Only (15)</option>

            <option value="part">Parts Only (47)</option>

          </select>


          <select id="filter-subsystem" aria-label="Filter by Subsystem"

            class="px-3 py-2 text-xs font-medium bg-slate-50 border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">

            <option value="all">Subsystem: All</option>

          </select>


          <select id="filter-scamper" aria-label="Filter by SCAMPER Letter"

            class="px-3 py-2 text-xs font-medium bg-slate-50 border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">

            <option value="all">SCAMPER: All (S-C-A-M-P-E-R)</option>

            <option value="S">S — Substitute</option>

            <option value="C">C — Combine</option>

            <option value="A">A — Adapt</option>

            <option value="M">M — Modify</option>

            <option value="P">P — Put to Another Use</option>

            <option value="E">E — Eliminate</option>

            <option value="R">R — Reverse</option>

          </select>

        </div>


        <!-- Reset & View Mode Switcher -->

        <div class="flex items-center justify-between sm:justify-end gap-2 pt-2 xl:pt-0 border-t xl:border-t-0 border-slate-100">

          <button id="btn-reset-filters" type="button"

            class="hidden px-2.5 py-2 text-xs font-semibold text-rose-600 hover:bg-rose-50 rounded-lg transition">

            Reset

          </button>

          <div class="inline-flex rounded-lg bg-slate-100 p-1 border border-slate-200">

            <button id="view-btn-tree" type="button"

              class="px-3 py-1.5 text-xs font-semibold rounded-md bg-white text-slate-900 shadow-sm transition">

              Tree &amp; Detail

            </button>

            <button id="view-btn-table" type="button"

              class="px-3 py-1.5 text-xs font-semibold rounded-md text-slate-600 hover:text-slate-900 transition">

              Full Report Table

            </button>

          </div>

        </div>

      </div>

    </section>


    <!-- VIEW MODE 1: Interactive Tree & Detail View -->

    <section id="tree-view-container" class="grid grid-cols-1 lg:grid-cols-12 gap-5 items-start">

      <!-- Left Panel: Collapsible Hierarchy Tree -->

      <aside class="lg:col-span-4 bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden flex flex-col lg:sticky lg:top-24 lg:max-h-[calc(100vh-7.5rem)]">

        <div class="px-4 py-3 bg-slate-50 border-b border-slate-200 flex items-center justify-between">

          <h2 class="text-xs font-bold uppercase tracking-wider text-slate-600">System Hierarchy</h2>

          <span id="tree-match-count" class="text-xs font-medium text-slate-500">68 items</span>

        </div>

        <div id="hierarchy-tree" class="p-2 overflow-y-auto custom-scroll flex-1 space-y-1">

          <!-- Populated dynamically -->

        </div>

      </aside>


      <!-- Right Panel: Selected Item 7-Card SCAMPER Analysis -->

      <div id="detail-panel" class="lg:col-span-8 bg-white rounded-xl border border-slate-200 shadow-sm p-5 sm:p-6">

        <!-- Populated dynamically -->

      </div>

    </section>


    <!-- VIEW MODE 2: Full Report Table View -->

    <section id="table-view-container" class="hidden space-y-6">

      <div id="full-report-content" class="space-y-6">

        <!-- Populated dynamically -->

      </div>

    </section>


  </main>


  <!-- Toast Notification (replaces alert) -->

  <div id="toast" class="fixed bottom-5 right-5 z-50 hidden items-center gap-2 bg-slate-900 text-white text-xs font-medium px-4 py-3 rounded-xl shadow-lg no-print">

    <svg class="w-4 h-4 text-emerald-400 shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">

      <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />

    </svg>

    <span id="toast-message">Action completed</span>

  </div>


  <script>

    // =========================================================================

    // SCAMPER METADATA & COLOR TOKENS

    // =========================================================================

    const SCAMPER_META = {

      S: { key: 'S', label: 'Substitute', badge: 'bg-blue-100 text-blue-800 border-blue-200', ring: 'ring-blue-500', accent: 'border-l-blue-500', dot: 'bg-blue-500' },

      C: { key: 'C', label: 'Combine', badge: 'bg-emerald-100 text-emerald-800 border-emerald-200', ring: 'ring-emerald-500', accent: 'border-l-emerald-500', dot: 'bg-emerald-500' },

      A: { key: 'A', label: 'Adapt', badge: 'bg-amber-100 text-amber-800 border-amber-200', ring: 'ring-amber-500', accent: 'border-l-amber-500', dot: 'bg-amber-500' },

      M: { key: 'M', label: 'Modify', badge: 'bg-purple-100 text-purple-800 border-purple-200', ring: 'ring-purple-500', accent: 'border-l-purple-500', dot: 'bg-purple-500' },

      P: { key: 'P', label: 'Put to Another Use', badge: 'bg-cyan-100 text-cyan-800 border-cyan-200', ring: 'ring-cyan-500', accent: 'border-l-cyan-500', dot: 'bg-cyan-500' },

      E: { key: 'E', label: 'Eliminate', badge: 'bg-rose-100 text-rose-800 border-rose-200', ring: 'ring-rose-500', accent: 'border-l-rose-500', dot: 'bg-rose-500' },

      R: { key: 'R', label: 'Reverse', badge: 'bg-indigo-100 text-indigo-800 border-indigo-200', ring: 'ring-indigo-500', accent: 'border-l-indigo-500', dot: 'bg-indigo-500' }

    };

    const SCAMPER_KEYS = ['S', 'C', 'A', 'M', 'P', 'E', 'R'];


    // =========================================================================

    // COMPLETE 3-TIER BICYCLE ENGINEERING DATASET (6 Subsystems, 15 Components, 47 Parts)

    // =========================================================================

    const BICYCLE_DATA = [

      // -----------------------------------------------------------------------

      // 1. FRAME & STRUCTURAL SUBSYSTEM

      // -----------------------------------------------------------------------

      {

        id: 'sub-1',

        name: 'Frame & Structural Subsystem',

        summary: 'Primary load-bearing chassis uniting rider geometry, pedaling torque, and road impact loads.',

        scamper: {

          S: 'Substitute traditional welded aluminum or thermoset carbon with recyclable thermoplastic carbon-fiber composites or 3D-printed titanium-lattice lugs.',

          C: 'Combine the frame structure with integrated conformal battery cells, internal tool storage, and flush-mounted daytime running lights.',

          A: 'Adapt aerospace monocoque honeycomb sandwich cores to achieve high torsional stiffness at ultra-low wall thicknesses.',

          M: 'Modify frame geometry dynamically using flip-chips and eccentric bushings to alter head angle and bottom bracket height for varied terrain.',

          P: 'Put the hollow frame cavities to use as a pressurized air reservoir for tubeless tire inflation or as a passive heat sink for e-bike controllers.',

          E: 'Eliminate separate external cable guides, bottle bosses, and derailleur mounts via smooth, clean-sheet monocoque molding.',

          R: 'Reverse the traditional diamond load path by using a cantilevered beam or split-frame truss that suspends the rider from a single upper spine.'

        },

        components: [

          {

            id: 'comp-1-1',

            name: 'Main Triangle',

            summary: 'Closed forward structural truss resisting torsional pedaling forces and frontal braking loads.',

            scamper: {

              S: 'Substitute cylindrical metallic tubing with anisotropic flax-fiber bio-composites to dampen high-frequency road buzz.',

              C: 'Combine the Main Triangle interior with a snap-in aerodynamic hydration bladder and modular cargo fairing.',

              A: 'Adapt automotive crumple-zone ribs near the front junctions to absorb catastrophic frontal impact energy safely.',

              M: 'Modify tube cross-sections into truncated Kamm-tail airfoils to reduce aerodynamic drag in crosswinds.',

              P: 'Put the Main Triangle opening to use as a quick-release docking bay for solar charging panels on bikepacking rigs.',

              E: 'Eliminate the traditional top tube in step-through urban designs while reinforcing the down tube with a dual-box internal web.',

              R: 'Reverse the stiffness distribution by making the lower spine ultra-rigid while engineering controlled vertical compliance into the upper junction.'

            },

            parts: [

              {

                id: 'part-1-1-1',

                name: 'Top Tube',

                summary: 'Upper horizontal/sloping structural member resisting compressive loads between head tube and seat tube.',

                scamper: {

                  S: 'Substitute round alloy tubing with a flattened carbon leaf-spring profile that flexes vertically over chatter.',

                  C: 'Combine the top tube with a flush-mounted magnetic bento box, GPS telemetry display, and USB-C charging port.',

                  A: 'Adapt suspension-bridge tension-cable concepts by replacing the rigid tube with a pre-tensioned braided Kevlar cable.',

                  M: 'Modify the top tube slope (compact geometry) to increase standover clearance and expose more seatpost for compliance.',

                  P: 'Put the top tube interior to use as a concealed housing for a retractable steel security lock cable.',

                  E: 'Eliminate the top tube entirely in commuter frames to allow effortless mounting with heavy rear cargo.',

                  R: 'Reverse the traditional straight-line profile into a downward-curved arch that lowers the rider center of gravity.'

                }

              },

              {

                id: 'part-1-1-2',

                name: 'Down Tube',

                summary: 'Primary tension and torsion backbone linking the head tube to the bottom bracket shell.',

                scamper: {

                  S: 'Substitute standard round tubing with an oversized octagonal hydroformed profile to maximize torsional resistance.',

                  C: 'Combine the down tube with a hinged weather-sealed glovebox door holding a spare tube, CO2 inflator, and multi-tool.',

                  A: 'Adapt motocross skid-plate armor by co-molding a replaceable Kevlar-reinforced elastomer bash guard along the underside.',

                  M: 'Modify the down tube width to shield standard water bottles from direct airflow, cutting overall aerodynamic drag.',

                  P: 'Put the wide lower face of the down tube to use as a mounting rail for modular clip-on fenders and battery extenders.',

                  E: 'Eliminate traditional riveted water-bottle bosses in favor of flush magnetic fidlock mounts embedded in the layup.',

                  R: 'Reverse the single-tube layout into a twin-spar split down tube that channels airflow cleanly around the front wheel.'

                }

              },

              {

                id: 'part-1-1-3',

                name: 'Seat Tube',

                summary: 'Vertical structural column supporting rider weight and anchoring the seatpost and bottom bracket.',

                scamper: {

                  S: 'Substitute continuous metallic tubing with a segmented carbon mast incorporating an elastomer vibration isolator.',

                  C: 'Combine the seat tube with an integrated rear radar/tail-light housing molded directly into the trailing edge.',

                  A: 'Adapt telescopic camera-tripod collars to allow tool-free, indexed saddle height adjustments without slipping.',

                  M: 'Modify the seat tube into a D-shaped or cutout aerodynamic profile that closely hugs the curvature of the rear tire.',

                  P: 'Put the lower seat tube cavity to use as a hidden compartment for an electronic shifting battery or GPS anti-theft tracker.',

                  E: 'Eliminate the lower section of the seat tube above the bottom bracket (suspended seat mast) to increase vertical flex.',

                  R: 'Reverse the clamping mechanism by placing an internal expanding wedge inside the seat tube instead of an external collar.'

                }

              },

              {

                id: 'part-1-1-4',

                name: 'Head Tube',

                summary: 'Forward cylindrical housing containing the headset bearings and transferring steering and braking forces.',

                scamper: {

                  S: 'Substitute machined alloy bearing cups with molded-in ceramic-lined composite bearing seats.',

                  C: 'Combine the head tube with internal cable-routing channels and an integrated steering-stop bumper to protect the top tube.',

                  A: 'Adapt motorcycle steering-damper cartridges inside the head tube to prevent high-speed shimmy on loaded touring bikes.',

                  M: 'Modify the head tube into an hourglass tapered profile (1-1/8" to 1.5") to reduce frontal area while boosting stiffness.',

                  P: 'Put the front face of the head tube to use as a structural mounting socket for heavy-duty frame-mounted cargo racks.',

                  E: 'Eliminate exposed bearing cups and external spacers by extending the head tube fairing seamlessly into the stem.',

                  R: 'Reverse the bearing stack by placing a larger-diameter bearing at the top to support integrated cockpit cable routing.'

                }

              }

            ]

          },

          {

            id: 'comp-1-2',

            name: 'Rear Triangle',

            summary: 'Aft structural assembly locating the rear wheel, transferring drivetrain torque, and tuning vertical compliance.',

            scamper: {

              S: 'Substitute welded alloy stays with one-piece molded thermoplastic carbon stays engineered with tuned flex zones.',

              C: 'Combine the rear triangle with an integrated kickstand mount, fender bridges, and a concealed rear-wheel cafe lock.',

              A: 'Adapt automotive multi-link independent suspension geometry using short dual-links for anti-squat pedaling efficiency.',

              M: 'Modify chainstay length via sliding dropouts to switch between agile trail handling and stable touring geometry.',

              P: 'Put the rear triangle stays to use as a structural mounting truss for quick-clip pannier rails without needing a separate rack.',

              E: 'Eliminate rear pivot bearings on short-travel mountain bikes by relying on engineered carbon flex-stays.',

              R: 'Reverse the symmetric layout into an asymmetric rear triangle that offsets drivetrain tension and evens wheel spoke dish.'

            },

            parts: [

              {

                id: 'part-1-2-1',

                name: 'Seatstays',

                summary: 'Upper rear struts connecting the rear dropouts to the seat tube to manage vertical road impacts.',

                scamper: {

                  S: 'Substitute rigid aluminum tubes with thin, bowed carbon leaf-springs that deflect vertically under bumps.',

                  C: 'Combine the seatstay bridge with an integrated aero brake fairing or flush-mounted LED brake light.',

                  A: 'Adapt archery-bow laminate layering to store and smoothly damp vertical impact energy without rebound harshness.',

                  M: 'Modify the junction point by dropping the seatstays lower on the seat tube to shrink the frontal aero profile.',

                  P: 'Put the inner face of the seatstays to use as a clean attachment track for snap-on mudguards.',

                  E: 'Eliminate the traditional seatstay bridge to maximize tire clearance for wide gravel and mud-shedding treads.',

                  R: 'Reverse the dual-stay layout into a single-sided monostay that joins the seat tube via a compliant elastomer bushing.'

                }

              },

              {

                id: 'part-1-2-2',

                name: 'Chainstays',

                summary: 'Lower horizontal struts resisting pedaling torque and chain tension between bottom bracket and rear axle.',

                scamper: {

                  S: 'Substitute thin-walled alloy tubing with a forged-alloy yoke bonded to carbon tubes for maximum tire and chainring clearance.',

                  C: 'Combine the drive-side chainstay with a co-molded ribbed silicone chain-slap protector and internal derailleur cable guide.',

                  A: 'Adapt motorcycle swingarm bracing with deep box-section profiles to resist lateral wheel flex during out-of-the-saddle sprints.',

                  M: 'Modify the drive-side chainstay with a dropped (elevated or lowered) bend to clear large chainrings and wide tires simultaneously.',

                  P: 'Put the hollow chainstay interior to use as a protected conduit for rear brake hydraulic hoses and speed sensors.',

                  E: 'Eliminate the need for a chainstay split on belt-drive frames by using an elevated chainstay routed entirely above the belt.',

                  R: 'Reverse the equal-height stay design by elevating the drive-side stay while keeping the non-drive stay low for disc brake bracing.'

                }

              },

              {

                id: 'part-1-2-3',

                name: 'Rear Dropouts & Hanger',

                summary: 'Terminal axle interfaces locating the rear wheel and mounting the rear derailleur.',

                scamper: {

                  S: 'Substitute soft cast-aluminum derailleur hangers with standardized, direct-mount UDH-compatible polymer-overmolded interfaces.',

                  C: 'Combine the non-drive dropout with a flat-mount disc brake caliper bracket in a single CNC-machined or forged piece.',

                  A: 'Adapt breakaway shear-pin mechanisms from industrial machinery so impacts detach the hanger cleanly without bending the frame.',

                  M: 'Modify the dropout into a sliding track with indexed laser-etched markings for exact single-speed or belt tensioning.',

                  P: 'Put the dropout face to use as an integrated anchor point for bicycle trailer hitches and trainer adapters.',

                  E: 'Eliminate the sacrificial derailleur hanger entirely by using a coaxial full-mount derailleur that clamps directly around the axle.',

                  R: 'Reverse the open-slot quick-release dropout into a closed, threaded thru-axle bore for precise disc rotor alignment.'

                }

              }

            ]

          },

          {

            id: 'comp-1-3',

            name: 'Front Fork',

            summary: 'Front wheel support and steering pivot absorbing road impacts and braking torque.',

            scamper: {

              S: 'Substitute heavy coil-sprung steel forks with lightweight one-piece molded carbon forks featuring tuned layup compliance.',

              C: 'Combine the front fork with an internal dynamo hub wiring channel and an integrated crown-mounted headlight.',

              A: 'Adapt aircraft landing-gear trailing-link geometry to isolate braking dive from suspension compression.',

              M: 'Modify fork rake (offset) using reversible dropout chips to fine-tune steering trail for loaded or unloaded riding.',

              P: 'Put the fork blades to use as triple-boss cargo mounts for bikepacking dry-bags and auxiliary water cages.',

              E: 'Eliminate one entire fork leg (single-sided Lefty-style strut) to cut weight and allow tire changes without removing the wheel.',

              R: 'Reverse the suspension telescoping orientation into an inverted (upside-down) fork to reduce unsprung mass and improve lubrication.'

            },

            parts: [

              {

                id: 'part-1-3-1',

                name: 'Steerer Tube',

                summary: 'Central vertical shaft rotating inside the head tube to transmit steering input from stem to fork crown.',

                scamper: {

                  S: 'Substitute aluminum steerer tubes with reinforced carbon-Kevlar hybrid layups resistant to stem-bolt crushing.',

                  C: 'Combine the hollow steerer tube with a drop-in internal multi-tool, chain breaker, and quick-link storage canister.',

                  A: 'Adapt automotive collapsible steering columns with controlled flex zones to damp handlebar vibrations.',

                  M: 'Modify the circular cross-section into a D-shaped steerer to create space for internal hydraulic hoses ahead of the tube.',

                  P: 'Put the steerer tube bore to use as a clean routing channel for a front brake hose (allowing 360-degree barspins).',

                  E: 'Eliminate the traditional compression plug by molding threaded titanium inserts directly into the upper steerer wall.',

                  R: 'Reverse the clamping direction by using an internal expanding stem quill that locks from inside the steerer rather than pinching outside.'

                }

              },

              {

                id: 'part-1-3-2',

                name: 'Fork Crown',

                summary: 'Structural bridge joining the steerer tube to the fork blades and absorbing frontal braking torque.',

                scamper: {

                  S: 'Substitute solid forged alloy crowns with hollow, generative-designed 3D-printed titanium lattice crowns.',

                  C: 'Combine the fork crown with a molded-in crown race and a flush aerodynamic shroud that blends into the down tube.',

                  A: 'Adapt bridge-arch truss geometry to distribute asymmetric disc-braking loads evenly across both blades.',

                  M: 'Modify crown height and width to accept 50mm+ gravel tires and full-coverage fenders without toe overlap.',

                  P: 'Put the threaded crown hole to use as a structural anchor for a front mini-rack, fender, or GoPro camera mount.',

                  E: 'Eliminate the separate metal crown race by precision-molding a 45-degree carbon bearing seat directly onto the crown.',

                  R: 'Reverse the crown placement on suspension forks by moving the structural arch to the rear of the lowers to shield mud.'

                }

              },

              {

                id: 'part-1-3-3',

                name: 'Fork Blades/Stanchions',

                summary: 'Twin legs supporting the front axle and housing suspension springs/dampers or aero profiles.',

                scamper: {

                  S: 'Substitute standard anodized aluminum stanchions with ultra-low-friction Kashima or DLC-coated carbon-composite tubes.',

                  C: 'Combine the fork blades with flush internal brake-hose routing and aerodynamic dropout fairings that shroud the thru-axle.',

                  A: 'Adapt whale-fin tubercles or airfoil cross-sections to reduce turbulent wake behind the spinning front wheel.',

                  M: 'Modify blade stance into a wide-stance profile that keeps turbulent wheel air from interfering with the fork legs.',

                  P: 'Put the exterior blade surfaces to use as high-visibility reflective safety panels or modular cargo-cage mounting rails.',

                  E: 'Eliminate traditional external fender eyelets in favor of hidden magnetic quick-mount fender studs.',

                  R: 'Reverse the standard forward-curved blade rake into a straight blade with offset dropouts to sharpen steering feedback.'

                }

              }

            ]

          }

        ]

      },


      // -----------------------------------------------------------------------

      // 2. DRIVETRAIN & PROPULSION SUBSYSTEM

      // -----------------------------------------------------------------------

      {

        id: 'sub-2',

        name: 'Drivetrain & Propulsion Subsystem',

        summary: 'Mechanical transmission converting human muscular input into rotational torque at the rear wheel.',

        scamper: {

          S: 'Substitute oil-lubricated roller chains with carbon-reinforced synchronous belt drives or sealed ceramic-bearing shaft drives.',

          C: 'Combine the drivetrain with an integrated mid-drive torque-sensing electric assist motor and dual-sided power meter.',

          A: 'Adapt automotive continuously variable transmissions (CVTs) using planetary traction spheres for stepless gear ratios.',

          M: 'Modify gear progression to a 1x13 wide-range architecture that balances steep climbing ratios with tight cruising steps.',

          P: 'Put drivetrain rotational inertia to use by coupling a regenerative micro-generator during descents to charge electronic accessories.',

          E: 'Eliminate the front derailleur, front shifter, and extra chainring to simplify ergonomics and reduce dropped chains.',

          R: 'Reverse the rear-wheel-drive paradigm with a front-hub electric assist creating an all-wheel-drive traction system on loose terrain.'

        },

        components: [

          {

            id: 'comp-2-1',

            name: 'Crankset & Pedals',

            summary: 'Primary rider-to-drivetrain lever assembly capturing foot force and converting it into rotational torque.',

            scamper: {

              S: 'Substitute solid forged alloy cranks with hollow-bonded carbon fiber arms and titanium pedal spindles.',

              C: 'Combine the crankset spider with a strain-gauge power meter, cadence sensor, and ovalized chainring.',

              A: 'Adapt orthopedic biomechanics to offer modular Q-factor (stance width) spacers tailored to individual hip anatomy.',

              M: 'Modify crank arm length via reversible threaded pedal-insert chips (e.g., 165mm to 172.5mm) without replacing the crankset.',

              P: 'Put the hollow crank spindle to use as a waterproof storage tube for tire plugs, spare chain links, and hex keys.',

              E: 'Eliminate the separate 4-bolt spider by direct-mounting the chainring onto a splined interface on the crank arm.',

              R: 'Reverse the traditional pedal-to-crank thread interface by integrating the pedal axle directly into the crank arm end.'

            },

            parts: [

              {

                id: 'part-2-1-1',

                name: 'Crank Arms',

                summary: 'Twin rotational levers transferring downward and tangential pedal forces to the bottom bracket spindle.',

                scamper: {

                  S: 'Substitute machined aluminum with 3D-printed hollow titanium lattice arms tuned for maximum stiffness-to-weight.',

                  C: 'Combine the crank arm with an embedded strain-gauge power meter and wireless ANT+/BLE transmitter.',

                  A: 'Adapt I-beam structural engineering to remove neutral-axis material while resisting twisting loads.',

                  M: 'Modify crank arm length downward (160–165mm) to open rider hip angles and reduce ground strikes on technical trails.',

                  P: 'Put the inner face of the crank arm to use as a clean mounting surface for a cadence magnet or protective rock boot.',

                  E: 'Eliminate pinch-bolt clamping on the non-drive arm in favor of a self-extracting, splined single-bolt preload system.',

                  R: 'Reverse the traditional 180-degree fixed phase by using a decoupled freewheeling crankset that lets riders coast with level feet.'

                }

              },

              {

                id: 'part-2-1-2',

                name: 'Chainrings',

                summary: 'Toothed front sprockets engaging the drive chain to set the primary gear ratio.',

                scamper: {

                  S: 'Substitute stamped steel rings with CNC-machined 7075-T6 aluminum or wear-resistant titanium-tooth composite rings.',

                  C: 'Combine the chainring with an integrated bash guard and mud-clearing channels milled into the tooth valleys.',

                  A: 'Adapt non-circular (oval) gear geometry to maximize effective lever arm during the power stroke and speed through dead spots.',

                  M: 'Modify tooth profiles into alternating narrow-wide shapes that grip inner and outer chain links to prevent chain drop.',

                  P: 'Put the solid aero chainring disc to use as a smooth airflow fairing that reduces turbulence around the bottom bracket.',

                  E: 'Eliminate chainring bolts entirely by using a single lockring direct-mount spline interface.',

                  R: 'Reverse the fixed-ring mounting by integrating a 2-speed planetary gearset inside the chainring carrier.'

                }

              },

              {

                id: 'part-2-1-3',

                name: 'Bottom Bracket',

                summary: 'Bearing assembly housing the crank spindle inside the frame shell for low-friction rotation.',

                scamper: {

                  S: 'Substitute standard steel ball bearings with silicon-nitride ceramic balls running in coated hardened-steel races.',

                  C: 'Combine the left and right cups into a single thread-together sleeve that guarantees perfect coaxial bearing alignment.',

                  A: 'Adapt marine-grade labyrinth lip seals to keep pressure-washer water and grit out without adding seal drag.',

                  M: 'Modify the shell standard to T47 (oversized threaded) to combine press-fit stiffness with creak-free threaded serviceability.',

                  P: 'Put the bottom bracket shell cavity to use as a secure junction box for internal electronic shifting wires.',

                  E: 'Eliminate press-fit tolerances and plastic spacers by machining self-aligning angular-contact bearing cups.',

                  R: 'Reverse the bearing placement by moving bearings outboard of the frame shell to widen support stance and allow 30mm spindles.'

                }

              },

              {

                id: 'part-2-1-4',

                name: 'Pedals',

                summary: 'Foot-contact platforms transmitting rider power and providing stability or clipless retention.',

                scamper: {

                  S: 'Substitute heavy die-cast aluminum bodies with glass-filled nylon composites or forged carbon bodies.',

                  C: 'Combine flat-pedal grip pins on one side with an SPD clipless retention mechanism on the opposite face.',

                  A: 'Adapt ski-binding multi-directional release mechanics so feet unclip automatically during sudden crashes.',

                  M: 'Modify the pedal platform into a concave profile that cradles the sole and lowers stack height over the spindle.',

                  P: 'Put the pedal edges to use as motion-activated LED safety markers that create a recognizable biological-motion light signature.',

                  E: 'Eliminate external protruding pedal spindles by using a thin-profile bearing cartridge housed directly inside the pedal body.',

                  R: 'Reverse the clipless retention design by placing the spring mechanism inside the shoe cleat and keeping the pedal a simple lightweight loop.'

                }

              }

            ]

          },

          {

            id: 'comp-2-2',

            name: 'Power Transmission',

            summary: 'Torque-carrying loop and rear gear cluster transferring crank rotation to the rear wheel hub.',

            scamper: {

              S: 'Substitute traditional wet-lubed steel chains with hot-melt PTFE/tungsten-disulfide waxed chains for near-zero friction.',

              C: 'Combine the rear cassette and freehub into a unified one-piece machined cluster that cuts weight and eliminates spline gouging.',

              A: 'Adapt industrial silent-chain (inverted tooth) geometry to reduce chordal action and drivetrain noise.',

              M: 'Modify gear-tooth chamfers and shift ramps to allow smooth upshifting and downshifting even under full standing sprint loads.',

              P: 'Put the rear cassette lockring to use as a mounting interface for a wheel-speed sensor magnet.',

              E: 'Eliminate exposed external gears entirely by enclosing a sealed planetary gearbox inside the rear hub or bottom bracket.',

              R: 'Reverse the drive side by moving the chain and cassette to the left side for specialized tandem or cargo-bike packaging.'

            },

            parts: [

              {

                id: 'part-2-2-1',

                name: 'Drive Chain',

                summary: 'Articulated roller-link loop transmitting tensile force from the front chainring to the rear cassette.',

                scamper: {

                  S: 'Substitute standard nickel-plated steel pins with DLC (Diamond-Like Carbon) coated hollow pins to extend wear life.',

                  C: 'Combine a master quick-link with a color-coded wear indicator laser-etched onto the outer plate.',

                  A: 'Adapt motorcycle O-ring sealed-link technology in a micro-scale format to trap factory grease inside the roller bushings.',

                  M: 'Modify the outer link profile into a flattop geometry that adds tensile strength while narrowing the chain for 12/13-speed cassettes.',

                  P: 'Put worn-out bicycle chains to use as upcycled security-lock sleeves or workshop chain-whip tools.',

                  E: 'Eliminate the traditional chain altogether by substituting a carbon-cord toothed belt that never needs lubrication.',

                  R: 'Reverse the solid-plate construction by slotting inner and outer plates to shed mud and cut rotating mass.'

                }

              },

              {

                id: 'part-2-2-2',

                name: 'Rear Cassette',

                summary: 'Stacked cluster of rear sprockets providing selectable mechanical advantage for varying gradients.',

                scamper: {

                  S: 'Substitute heavy steel large cogs with CNC-machined 7075 aluminum or titanium upper clusters.',

                  C: 'Combine the smallest 10 cogs into a single hollowed-out steel dome machined from one billet to save weight and boost stiffness.',

                  A: 'Adapt computer-optimized helical shift ramps so the chain stays engaged on two cogs simultaneously during transitions.',

                  M: 'Modify the smallest cog down to 9 or 10 teeth to expand total gear range without requiring oversized front chainrings.',

                  P: 'Put the open spider behind the largest cog to use as an integrated spoke-protector disc that prevents derailleur overshifts.',

                  E: 'Eliminate individual loose cogs and plastic spacers that dig into aluminum freehub bodies.',

                  R: 'Reverse the traditional stepped cluster by arranging cogs in a compact internal-gear planetary stack.'

                }

              },

              {

                id: 'part-2-2-3',

                name: 'Freehub Body',

                summary: 'One-way ratcheting clutch mechanism allowing the rear wheel to coast while the pedals remain stationary.',

                scamper: {

                  S: 'Substitute traditional spring-loaded pawls with opposing star-ratchet face-gears or a silent sprag-clutch mechanism.',

                  C: 'Combine the freehub seal with a magnetic contactless engagement system that eliminates drag while coasting.',

                  A: 'Adapt industrial one-way roller clutches to achieve instantaneous 0-degree engagement with zero dead-stroke.',

                  M: 'Modify ratchet tooth count from 18T to 90T+ for rapid technical-climb engagement.',

                  P: 'Put the freehub pawl acoustics to use as a tunable trail bell—loud when alerting pedestrians, silenced via a lever when desired.',

                  E: 'Eliminate delicate leaf springs by using opposing rare-earth magnets to push the ratchet rings together.',

                  R: 'Reverse the ratchet orientation by mounting the drive ring inside the hub shell and the floating clutch inside the cassette.'

                }

              }

            ]

          },

          {

            id: 'comp-2-3',

            name: 'Shifting System',

            summary: 'Control and actuation assembly moving the chain across gear ratios on rider command.',

            scamper: {

              S: 'Substitute mechanical steel shift cables with encrypted wireless 2.4GHz electronic actuation.',

              C: 'Combine front and rear shifting logic into a single "sequential sync" mode where the rider only presses Up or Down.',

              A: 'Adapt automotive paddle-shift ergonomics and automatic cadence-based shifting algorithms for commuter e-bikes.',

              M: 'Modify shift-lever reach and paddle throw via micro-adjust screws to fit small or gloved hands.',

              P: 'Put wireless shift buttons to use as remote controllers for cycling computer pages, dropper posts, or smart headlights.',

              E: 'Eliminate external shift housing, barrel adjusters, and cable stretch maintenance via direct wireless servo actuators.',

              R: 'Reverse the traditional spring-loaded high-normal derailleur action into a low-normal (rapid-rise) return for easier climbing shifts.'

            },

            parts: [

              {

                id: 'part-2-3-1',

                name: 'Shift Levers',

                summary: 'Rider-operated cockpit triggers or paddles initiating gear changes.',

                scamper: {

                  S: 'Substitute mechanical ratcheting levers with solid-state capacitive haptic touchpads or micro-switch blips.',

                  C: 'Combine the shift lever, brake lever, and dropper-post remote into a single ergonomic cockpit pod.',

                  A: 'Adapt gaming-controller thumb-paddle geometry for multi-angle actuation from both the hoods and drops.',

                  M: 'Modify the shift paddle with textured grip tape or knurled alloy surfaces for slip-free operation in rain and mud.',

                  P: 'Put auxiliary satellite shift buttons to use as horn triggers or turn-signal switches on urban commuter bikes.',

                  E: 'Eliminate the left-hand shifter completely on 1x drivetrains to declutter the cockpit.',

                  R: 'Reverse the two-lever push/pull motion into a single rocker paddle that shifts up with a thumb push and down with a pull.'

                }

              },

              {

                id: 'part-2-3-2',

                name: 'Rear Derailleur',

                summary: 'Pantograph mechanism guiding the chain across cassette cogs while maintaining chain tension.',

                scamper: {

                  S: 'Substitute stamped alloy cages with forged carbon cages and ceramic-bearing oversized pulley wheels.',

                  C: 'Combine the derailleur pivot with an adjustable roller-bearing clutch that damps cage bounce and eliminates chain slap.',

                  A: 'Adapt robotic servo overload clutches that automatically disengage on rock strikes and return to gear afterward.',

                  M: 'Modify the parallelogram slant angle to maintain a constant chain gap across massive 10–52T cassettes.',

                  P: 'Put the derailleur battery pack to use as a standardized, hot-swappable power module shared with the dropper post.',

                  E: 'Eliminate manual B-tension and limit-screw tuning via self-calibrating optical position sensors.',

                  R: 'Reverse the vulnerable outboard mounting by tucking a low-profile "shadow" derailleur body inboard beneath the cassette.'

                }

              },

              {

                id: 'part-2-3-3',

                name: 'Cables & Housing',

                summary: 'Flexible mechanical Bowden conduits transmitting lever pull to the derailleur.',

                scamper: {

                  S: 'Substitute galvanized steel inner wires with die-drawn, PTFE-coated stainless steel or braided Dyneema fiber cords.',

                  C: 'Combine shift housing and brake hose into a single flat, aerodynamic dual-channel umbilical sheath.',

                  A: 'Adapt compressionless Kevlar-wrapped linear-strand housing from aerospace controls to eliminate spongy shifting.',

                  M: 'Modify housing end-ferrules with extended O-ring sealed noses to block mud and water ingress.',

                  P: 'Put internal frame cable routing foam sleeves to use as acoustic dampers that silence frame rattle.',

                  E: 'Eliminate mechanical cables and housings altogether by transitioning to wireless electronic shifting.',

                  R: 'Reverse the traditional full-length exposed cable run into a completely internal, sealed continuous-liner system.'

                }

              }

            ]

          }

        ]

      },


      // -----------------------------------------------------------------------

      // 3. WHEEL & TIRE SUBSYSTEM

      // -----------------------------------------------------------------------

      {

        id: 'sub-3',

        name: 'Wheel & Tire Subsystem',

        summary: 'Rolling assemblies supporting total system weight, providing traction, and governing rotational inertia.',

        scamper: {

          S: 'Substitute wire-spoked metallic wheels with one-piece molded carbon-composite monocoque or 3-spoke wheels.',

          C: 'Combine the wheel hub, tire pressure sensor, and rotational dynamo generator into a single smart rolling unit.',

          A: 'Adapt automotive run-flat foam tire inserts to allow controlled riding even after a catastrophic sidewall puncture.',

          M: 'Modify wheel diameters into a "mullet" setup (29" front for rollover, 27.5" rear for agility and cornering clearance).',

          P: 'Put the spinning wheel rim to use as a persistence-of-vision (POV) LED safety display for 360-degree night visibility.',

          E: 'Eliminate pneumatic air chambers entirely using cellular elastomer airless tires for zero-maintenance bike-share fleets.',

          R: 'Reverse the traditional center-hub layout into a hubless orbital wheel driven by perimeter ring bearings.'

        },

        components: [

          {

            id: 'comp-3-1',

            name: 'Wheel Assembly',

            summary: 'Tensioned structural hoop, spokes, hub, and axle transmitting loads between tire and frame.',

            scamper: {

              S: 'Substitute brass nipples and steel spokes with bonded carbon-fiber spokes that double lateral stiffness.',

              C: 'Combine the hub flanges and spoke heads into a straight-pull interlocking interface that eliminates J-bend fatigue.',

              A: 'Adapt suspension-bridge pre-tensioned geometry with asymmetric rim spoke drilling to equalize left/right spoke tension.',

              M: 'Modify rim profile depth differentially (shallower front for crosswind stability, deeper rear for aero gains).',

              P: 'Put the hollow rim cavity to use as a balanced mounting point for wheel-speed magnets without external zip-ties.',

              E: 'Eliminate rim tape completely by molding a solid, undrilled outer rim bed (using magnetic nipple installation).',

              R: 'Reverse the traditional tension-spoke wheel into a compression-spoke molded composite structure.'

            },

            parts: [

              {

                id: 'part-3-1-1',

                name: 'Wheel Rim',

                summary: 'Outer structural hoop anchoring the tire bead and resisting radial spoke tension and impact loads.',

                scamper: {

                  S: 'Substitute pinned aluminum extrusions with hookless thermoplastic carbon rims that resist pinch-flat impacts.',

                  C: 'Combine the rim profile with dimpled golf-ball surface texturing to delay airflow separation in crosswinds.',

                  A: 'Adapt undulating whale-fin depth profiles (variable-depth rims) to stabilize steering torque in gusty winds.',

                  M: 'Modify internal rim width wider (25–30mm) to support modern high-volume tires with a rounder, more stable profile.',

                  P: 'Put the rim sidewall to use as a high-contrast reflective safety ring integrated under the clearcoat.',

                  E: 'Eliminate traditional rim-brake tracks on disc-specific rims to save rotational weight at the outermost perimeter.',

                  R: 'Reverse the symmetric V-shape into an asymmetric offset cross-section that balances spoke bracing angles.'

                }

              },

              {

                id: 'part-3-1-2',

                name: 'Spokes & Nipples',

                summary: 'High-tensile filaments and threaded tensioners suspending the hub within the rim.',

                scamper: {

                  S: 'Substitute stainless steel wire spokes with ultra-light braided Dyneema polymer textile spokes that damp vibrations.',

                  C: 'Combine the spoke nipple with an internal nylon thread-locking insert to prevent tension loss over rough cobbles.',

                  A: 'Adapt aerodynamic bladed airfoil cross-sections to slice cleanly through rotational air turbulence.',

                  M: 'Modify spoke thickness via triple-butting (thicker at ends, thinner in the middle) to reduce weight and add elasticity.',

                  P: 'Put the spokes to use as snap-on mounting points for lightweight retro-reflective safety tubes.',

                  E: 'Eliminate exposed external nipples by hiding internal inverted nipples inside the aero rim cavity.',

                  R: 'Reverse the nipple location by placing the tensioning adjuster at the hub flange instead of the rim to cut rotational inertia.'

                }

              },

              {

                id: 'part-3-1-3',

                name: 'Hub Shell & Bearings',

                summary: 'Central rotating housing containing precision bearings and anchoring the spokes and brake rotor.',

                scamper: {

                  S: 'Substitute standard stainless bearings with full-complement angular-contact ceramic bearings.',

                  C: 'Combine the front hub shell with a brushless internal dynamo generator powering lights and USB devices.',

                  A: 'Adapt aerospace labyrinth seals that block water and mud without rubbing directly against the rotating axle.',

                  M: 'Modify hub flange spacing (Boost 110/148mm) to widen spoke bracing angles and boost lateral wheel stiffness.',

                  P: 'Put the hub shell to use as a mounting body for a wheel-integrated GPS tracker or speed telemetry sensor.',

                  E: 'Eliminate manual bearing preload cones by using precision-machined, self-preloading cartridge bearing seats.',

                  R: 'Reverse the traditional spoke-flange placement by using a center-flange hub that narrows frontal aerodynamic area.'

                }

              },

              {

                id: 'part-3-1-4',

                name: 'Thru-Axle',

                summary: 'Rigid threaded shaft clamping the wheel hub securely into the frame and fork dropouts.',

                scamper: {

                  S: 'Substitute solid steel axles with hollow, thin-walled 7075-T6 aluminum or titanium shafts.',

                  C: 'Combine the thru-axle lever with a removable magnetic 4/5/6mm hex multi-tool tucked inside the hollow shaft.',

                  A: 'Adapt quick-release cam ergonomics into a tool-free, indexable ratcheting thru-axle handle.',

                  M: 'Modify the thread pitch into a rapid multi-lead thread (e.g., Speed Release) that cuts wheel-change time in half.',

                  P: 'Put the thru-axle end-cap to use as a direct mounting stud for indoor direct-drive trainers or cargo trailers.',

                  E: 'Eliminate the protruding external handle entirely for a flush, aero hex-key-only axle that cannot snag trail brush.',

                  R: 'Reverse the traditional open-dropout insertion by using a captured floating nut that self-aligns during wheel installation.'

                }

              }

            ]

          },

          {

            id: 'comp-3-2',

            name: 'Tire Assembly',

            summary: 'Pneumatic elastomer interface governing rolling resistance, grip, and primary suspension compliance.',

            scamper: {

              S: 'Substitute petroleum-based butyl rubber with bio-sourced dandelion rubber and graphene-enhanced silica compounds.',

              C: 'Combine the tire casing with an embedded RFID/NFC chip and real-time Bluetooth pressure/temperature sensor.',

              A: 'Adapt winter automotive sipes and dual-durometer tread compounds (firm center for speed, tacky shoulders for cornering).',

              M: 'Modify tire volume upward while lowering operating pressures to reduce hysteresis losses on rough asphalt.',

              P: 'Put worn-out tire casings to use as upcycled puncture-resistant belts, mudflaps, or chainstay protectors.',

              E: 'Eliminate inner tubes entirely via airtight tubeless-ready casings and self-sealing latex-based liquid sealants.',

              R: 'Reverse the traditional tread-on-casing bond by offering a zip-on replaceable tread cap over a permanent carcass.'

            },

            parts: [

              {

                id: 'part-3-2-1',

                name: 'Tire Casing & Tread',

                summary: 'Woven textile carcass and vulcanized rubber contact patch providing grip and puncture defense.',

                scamper: {

                  S: 'Substitute nylon casing plies with supple 320 TPI cotton or high-strength Vectran liquid-crystal polymer breaker belts.',

                  C: 'Combine the sidewall with a continuous micro-prismatic reflective strip vulcanized directly into the rubber.',

                  A: 'Adapt directional herringbone and micro-file tread patterns from rally-car tires for mixed-surface gravel traction.',

                  M: 'Modify the bead material from rigid steel wire to foldable aramid (Kevlar) cords to cut weight and allow compact packing.',

                  P: 'Put subtle wear-indicator dimples molded into the center tread to use as an instant visual replacement gauge.',

                  E: 'Eliminate heavy, slow-rolling rubber tread blocks on road tires in favor of an ultra-thin slick silica layer.',

                  R: 'Reverse the tread orientation (front vs. rear mounting arrows) to optimize braking grip up front and climbing traction out back.'

                }

              },

              {

                id: 'part-3-2-2',

                name: 'Inner Tube / Tubeless System',

                summary: 'Pressurized air-retention medium maintaining tire shape and impact resistance.',

                scamper: {

                  S: 'Substitute heavy butyl inner tubes with ultra-light thermoplastic polyurethane (TPU) tubes or eco-friendly latex sealant.',

                  C: 'Combine tubeless sealant with a closed-cell EVA foam rim-protection insert that prevents pinch flats and allows run-flat riding.',

                  A: 'Adapt self-healing polymer microcapsules that instantly vulcanize on contact with air to plug larger sidewall slashes.',

                  M: 'Modify sealant viscosity with biodegradable cellulose fibers to seal punctures up to 6mm at high road pressures.',

                  P: 'Put a deflated spare TPU tube to use as an emergency ultra-compact frame strap or rim-tape backup.',

                  E: 'Eliminate liquid sealant maintenance by using a dry, self-sealing gel liner pre-applied to the inside of the tire.',

                  R: 'Reverse the single-chamber design into a dual-chamber system (high-pressure inner core locking the bead, low-pressure outer chamber for grip).'

                }

              },

              {

                id: 'part-3-2-3',

                name: 'Valve Stem',

                summary: 'One-way check valve allowing inflation, deflation, and pressure measurement.',

                scamper: {

                  S: 'Substitute fragile threaded brass Presta cores with high-flow, clog-free anodized aluminum ball-valve stems.',

                  C: 'Combine the valve cap with an integrated valve-core removal wrench and a pressure-bleed micro-button.',

                  A: 'Adapt automotive TPMS (Tire Pressure Monitoring System) micro-transmitters directly into the valve stem base.',

                  M: 'Modify the internal bore diameter to increase airflow by 300%, allowing tubeless beads to seat with a standard floor pump.',

                  P: 'Put the valve stem nut to use as a built-in O-ring seal that prevents rattling against deep carbon rims.',

                  E: 'Eliminate delicate bending Presta pins entirely by adopting a push-to-lock, coreless high-flow valve standard.',

                  R: 'Reverse the base geometry into a side-ported T-slot exit so foam tire inserts cannot block airflow during inflation.'

                }

              }

            ]

          }

        ]

      },


      // -----------------------------------------------------------------------

      // 4. BRAKING SUBSYSTEM

      // -----------------------------------------------------------------------

      {

        id: 'sub-4',

        name: 'Braking Subsystem',

        summary: 'Energy-dissipation system converting kinetic energy into thermal energy for controlled deceleration.',

        scamper: {

          S: 'Substitute mechanical rim brakes with closed-system hydraulic disc brakes using biodegradable mineral oil.',

          C: 'Combine front and rear braking with an electronic Anti-Lock Braking System (ABS) that modulates pressure to prevent endo flips.',

          A: 'Adapt electric-vehicle regenerative braking on e-bikes to recapture downhill kinetic energy into the battery while saving pads.',

          M: 'Modify hydraulic leverage ratios progressively so initial lever pull moves pads quickly while deeper pull maximizes clamping force.',

          P: 'Put brake actuation switches to use as triggers for automatic high-intensity rear brake lights.',

          E: 'Eliminate hydraulic fluid bleeding and hoses by using sealed, wireless electromechanical brake-by-wire calipers.',

          R: 'Reverse the separate left/right lever control into a linked proportional braking system that balances front/rear stopping force from one lever.'

        },

        components: [

          {

            id: 'comp-4-1',

            name: 'Brake Controls',

            summary: 'Cockpit lever and hydraulic/mechanical actuation assembly translating finger force into line pressure.',

            scamper: {

              S: 'Substitute heavy cast-alloy lever blades with thermal-insulating carbon fiber blades that stay warm in winter.',

              C: 'Combine the brake lever clamp with an integrated shifter and dropper-remote mounting rail (MatchMaker/I-Spec).',

              A: 'Adapt motorcycle radial master-cylinder geometry for more linear modulation and compact cockpit packaging.',

              M: 'Modify lever pivot location and blade curve for effortless one-finger braking without pinching adjacent fingers.',

              P: 'Put the brake hood top surface to use as an ergonomic resting platform with embedded shift/computer control buttons.',

              E: 'Eliminate tool-required reach adjustments by integrating a knurled thumb-dial for on-the-fly lever positioning.',

              R: 'Reverse the traditional outward-pointing hose exit into a parallel-to-bar routing that tucks cleanly under bar tape.'

            },

            parts: [

              {

                id: 'part-4-1-1',

                name: 'Brake Levers',

                summary: 'Ergonomic hand levers providing mechanical advantage to actuate the braking system.',

                scamper: {

                  S: 'Substitute aluminum levers with hollow-molded carbon fiber blades to reduce weight and vibration transfer.',

                  C: 'Combine the brake lever with a built-in bell striker or magnetic parking-brake lock for loaded cargo bikes.',

                  A: 'Adapt motocross breakaway folding pivots so the lever flips forward in a crash rather than snapping.',

                  M: 'Modify the lever tip with a subtle outward hook and micro-dimpled texture to keep a single finger locked in place.',

                  P: 'Put the lever return spring cavity to use as a housing for a reed switch that activates a rear brake light.',

                  E: 'Eliminate excess free-stroke deadband via a tool-free contact-point adjustment dial.',

                  R: 'Reverse the traditional bar-end pull direction into an aero reverse-pull TT lever that routes cables internally through the bar.'

                }

              },

              {

                id: 'part-4-1-2',

                name: 'Hydraulic Hose / Cable',

                summary: 'High-pressure conduit transmitting hydraulic fluid pressure or cable tension to the caliper.',

                scamper: {

                  S: 'Substitute standard resin-lined hoses with Kevlar- or stainless-steel-braided hoses that resist thermal expansion.',

                  C: 'Combine the hydraulic hose with a quick-disconnect dry-break coupling for effortless internal routing and travel packing.',

                  A: 'Adapt motorsport banjo-bolt swivel fittings at the caliper to allow clean hose angles on any frame geometry.',

                  M: 'Modify hose outer diameter slightly smaller (4.5mm) to ease internal routing through crowded headset spacers.',

                  P: 'Put external hose clips to use as dual-purpose guides that also secure dynamo lighting wires.',

                  E: 'Eliminate exposed hoses completely by routing fluid channels internally through the handlebar, stem, and steerer.',

                  R: 'Reverse the single-use olive/barb compression fitting into a reusable threaded collet connector.'

                }

              },

              {

                id: 'part-4-1-3',

                name: 'Master Cylinder',

                summary: 'Lever-integrated hydraulic piston and fluid reservoir generating system line pressure.',

                scamper: {

                  S: 'Substitute corrosive DOT fluid with high-boiling-point, non-toxic biodegradable mineral oil.',

                  C: 'Combine the master cylinder reservoir with a transparent sight-glass window to inspect fluid level and clarity instantly.',

                  A: 'Adapt progressive cam-link (Servo Wave) actuators that accelerate pad travel initially and increase force at contact.',

                  M: 'Modify the reservoir bladder orientation to allow vertical bike storage without trapping air bubbles in the line.',

                  P: 'Put the bleed port to use as a clean, drip-free quick-connect socket for syringe maintenance.',

                  E: 'Eliminate trapped micro-bubbles by redesigning the internal cylinder geometry with an upward self-bleeding taper.',

                  R: 'Reverse the traditional push-piston layout into a pull-piston design that aligns the cylinder cleanly along the handlebar.'

                }

              }

            ]

          },

          {

            id: 'comp-4-2',

            name: 'Brake Calipers',

            summary: 'Wheel-mounted hydraulic clamping units converting line pressure into friction against the rotor.',

            scamper: {

              S: 'Substitute two-piece bolted alloy calipers with one-piece monoblock CNC-machined billet calipers for zero flex.',

              C: 'Combine the caliper body with external cooling fins and an integrated mud-guard shroud.',

              A: 'Adapt automotive differential-bore 4-piston calipers (smaller leading piston, larger trailing piston) for even pad wear.',

              M: 'Modify the mounting footprint to low-profile Flat Mount standards that tuck neatly inside the rear triangle.',

              P: 'Put the caliper body mass to use as a heat-sink bridge coupled to the frame dropout.',

              E: 'Eliminate manual caliper centering frustration via self-aligning spherical washer mounts.',

              R: 'Reverse the traditional side-by-side opposing piston layout into a single-sided floating caliper for ultra-narrow aero profiles.'

            },

            parts: [

              {

                id: 'part-4-2-1',

                name: 'Caliper Body',

                summary: 'Rigid structural housing containing hydraulic passages, piston bores, and pad-retention hardware.',

                scamper: {

                  S: 'Substitute cast aluminum with 3D-printed titanium or forged magnesium to slash unsprung weight and boost stiffness.',

                  C: 'Combine the caliper body with a built-in optical pad-wear indicator slot visible from above.',

                  A: 'Adapt F1-style internal cooling ducts that channel airflow directly across the piston backs.',

                  M: 'Modify the bridge profile with an open top-loading window so pads can be swapped without removing the wheel.',

                  P: 'Put the caliper bleed nipple to use as a standardized quick-release port for one-way bleed funnels.',

                  E: 'Eliminate external crossover bridge tubes by gun-drilling internal hydraulic transfer passages.',

                  R: 'Reverse the rear caliper mounting position from the outside of the seatstay to the protected inside of the chainstay.'

                }

              },

              {

                id: 'part-4-2-2',

                name: 'Hydraulic Pistons',

                summary: 'Precision cylindrical rams pushed outward by hydraulic fluid to press pads against the rotor.',

                scamper: {

                  S: 'Substitute aluminum pistons with low-thermal-conductivity phenolic resin or zirconium-ceramic pistons to stop fluid boil.',

                  C: 'Combine the piston face with a magnetic pad-retention puck that eliminates noisy metal pad-spreader springs.',

                  A: 'Adapt precision square-cut elastomer quad-rings that automatically retract pistons by a calibrated 0.2mm to prevent rub.',

                  M: 'Modify piston diameter asymmetrically in 4-piston calipers to smooth initial bite and eliminate pad taper.',

                  P: 'Put hollow piston cavities to use as insulating air-gaps that further block heat transfer into the hydraulic fluid.',

                  E: 'Eliminate sticky piston drag by coating piston walls with ultra-low-friction DLC or anodized PTFE.',

                  R: 'Reverse the passive hydraulic retraction by adding micro-wave springs for guaranteed zero-drag clearance in mud.'

                }

              },

              {

                id: 'part-4-2-3',

                name: 'Brake Pads',

                summary: 'Sacrificial friction-material plates bonded to backing plates that clamp the disc rotor.',

                scamper: {

                  S: 'Substitute copper-heavy metallic pads with eco-friendly ceramic-kevlar organic compounds that run silent in wet weather.',

                  C: 'Combine the steel backing plate with extended aluminum radiator cooling fins to drop operating temperatures by 50°C.',

                  A: 'Adapt automotive acoustic wear-indicator tabs that emit a subtle chime when friction material reaches 0.5mm.',

                  M: 'Modify the friction surface with angled diagonal grooves to evacuate water film and grit instantly.',

                  P: 'Put the backing plate thermal barrier to use as an insulator protecting the caliper pistons from heat soak.',

                  E: 'Eliminate rattling pad-retention cotter pins in favor of a threaded, O-ring-damped titanium retaining bolt.',

                  R: 'Reverse the rigid one-piece pad into a segmented dual-pad backing that conforms evenly to slightly warped rotors.'

                }

              }

            ]

          },

          {

            id: 'comp-4-3',

            name: 'Friction Surface',

            summary: 'Rotating metallic disc and mounting hardware dissipating braking heat into the surrounding air.',

            scamper: {

              S: 'Substitute solid stainless-steel rotors with 3-layer clad rotors (stainless outer skins bonded to an aluminum heat-conducting core).',

              C: 'Combine the rotor spider with an integrated wheel-speed sensor magnet for e-bike motors and cycling computers.',

              A: 'Adapt motorcycle floating-rotor bobbins that allow the outer friction ring to expand thermally without warping.',

              M: 'Modify rotor thickness from 1.8mm to 2.0–2.3mm to increase thermal mass and resist resonant squealing.',

              P: 'Put the inner aluminum carrier arms to use as curved turbine vanes that actively pump cooling air across the caliper.',

              E: 'Eliminate sharp outer rotor edges by chamfering the perimeter to prevent skin lacerations in peloton crashes.',

              R: 'Reverse the hub-mounted rotor layout into a perimeter-mounted rim-edge disc rotor that cuts hub and spoke braking torque.'

            },

            parts: [

              {

                id: 'part-4-3-1',

                name: 'Disc Rotor',

                summary: 'Precision-ground circular steel friction ring bolted to the wheel hub.',

                scamper: {

                  S: 'Substitute heavy all-steel discs with carbon-ceramic composite rotors for ultra-low rotational mass.',

                  C: 'Combine the rotor with integrated inward-facing radiator fins painted in high-emissivity matte black.',

                  A: 'Adapt variable-pitch cooling slot patterns that break up harmonic vibrations and prevent wet-weather brake howl.',

                  M: 'Modify rotor diameter (140mm rear / 180–203mm front) to match heat-dissipation capacity to dynamic weight transfer.',

                  P: 'Put laser-etched wear-limit indicators on the braking track to use as an instant caliper-free safety check.',

                  E: 'Eliminate heavy solid braking tracks by optimizing wave-edge cutouts that clean pad glaze while shedding mud.',

                  R: 'Reverse the traditional flat-stamped disc into a slightly dished spider design that clears wide suspension fork lowers.'

                }

              },

              {

                id: 'part-4-3-2',

                name: 'Rotor Mounting Bolts',

                summary: 'Fasteners securing the disc rotor concentrically to the wheel hub flange.',

                scamper: {

                  S: 'Substitute standard steel T25 bolts with Grade-5 titanium bolts featuring pre-applied micro-encapsulated threadlocker.',

                  C: 'Combine all 6 individual bolts into a single CenterLock splined lockring for 5-second rotor swaps.',

                  A: 'Adapt aerospace safety-wire lock-plates that physically prevent bolts from backing out under thermal cycling.',

                  M: 'Modify bolt heads into low-profile dome profiles to increase clearance against tight fork dropouts.',

                  P: 'Put the CenterLock lockring splines to use as a dual-purpose tool interface matching the bottom bracket wrench.',

                  E: 'Eliminate all 6 bolts and thread-stripping risks via a tool-free bayonet-lock rotor interface.',

                  R: 'Reverse the external-spline lockring into an internal-spline lockring to fit cleanly around oversized 15/20mm thru-axles.'

                }

              }

            ]

          }

        ]

      },


      // -----------------------------------------------------------------------

      // 5. STEERING & COCKPIT SUBSYSTEM

      // -----------------------------------------------------------------------

      {

        id: 'sub-5',

        name: 'Steering & Cockpit Subsystem',

        summary: 'Rider control interface governing directional stability, aerodynamic posture, and upper-body comfort.',

        scamper: {

          S: 'Substitute separate alloy bars and stems with a one-piece molded carbon-fiber integrated bar-stem cockpit.',

          C: 'Combine the cockpit with a flush-mounted cycling computer, integrated headlight, and hidden internal cable routing.',

          A: 'Adapt ergonomic wrist-neutral sweep angles and viscoelastic vibration damping from industrial power-tool handles.',

          M: 'Modify cockpit reach and stack dynamically using modular aero spacers and interchangeable stem-angle shims.',

          P: 'Put the forward cockpit area to use as an aerodynamic fairing that smooths airflow before it hits the rider torso.',

          E: 'Eliminate every exposed cable, housing, and zip-tie from the wind stream for a clean, drag-free front end.',

          R: 'Reverse the traditional forward-reaching stem into a zero-offset direct-mount bar clamped directly behind the steerer axis.'

        },

        components: [

          {

            id: 'comp-5-1',

            name: 'Handlebar & Stem',

            summary: 'Primary steering lever and extension connecting the rider hands to the fork steerer tube.',

            scamper: {

              S: 'Substitute rigid 6061 aluminum with compliance-tuned carbon-fiber layups or bamboo-composite vibration-damping bars.',

              C: 'Combine the stem faceplate with a direct-mount out-front bracket for GPS computers, action cameras, and headlights.',

              A: 'Adapt elastomer-suspended parallelogram stems (e.g., Redshift) to isolate hands from washboard gravel chatter.',

              M: 'Modify drop-bar geometry with flared drops (12–24 degrees) to widen leverage on technical off-road descents.',

              P: 'Put the hollow bar ends to use as concealed storage compartments for tubeless bacon-strip plug tools and chain breakers.',

              E: 'Eliminate the stem faceplate and 4 clamping bolts entirely via a monocoque one-piece bar-stem structure.',

              R: 'Reverse the stem rise angle (flip-flop +/-7°) to instantly switch between an aggressive aero tuck and upright comfort.'

            },

            parts: [

              {

                id: 'part-5-1-1',

                name: 'Handlebar',

                summary: 'Transverse steering bar providing multiple hand positions and leverage over the front wheel.',

                scamper: {

                  S: 'Substitute round-section alloy tubing with flattened, ergonomic aero-wing carbon tops that cradle the palms.',

                  C: 'Combine the handlebar with integrated internal LED turn-signal indicators embedded in the bar-end plugs.',

                  A: 'Adapt bi-plane double-decker gravel bar concepts to create a floating upper hand-rest with built-in leaf-spring flex.',

                  M: 'Modify handlebar width narrower at the hoods (36–38cm) for road aerodynamics while flaring wider in the drops for control.',

                  P: 'Put laser-etched alignment grids on the bar center and hoods to use as precision setup guides for symmetric lever mounting.',

                  E: 'Eliminate external cable grooves by molding smooth internal ports that guide hoses directly into the stem.',

                  R: 'Reverse the traditional forward drop-bar sweep into a backswept "alt-bar" or moustache profile for upright touring ergonomics.'

                }

              },

              {

                id: 'part-5-1-2',

                name: 'Stem & Faceplate',

                summary: 'Structural bridge clamping the handlebar to the steerer tube and setting cockpit reach.',

                scamper: {

                  S: 'Substitute forged aluminum with 3D-printed hollow titanium or forged carbon composite bodies.',

                  C: 'Combine the stem body with an internal elastomer suspension pivot that offers 20mm of damped vertical travel.',

                  A: 'Adapt motorcycle four-bolt zero-gap upper faceplates that eliminate uneven torque distribution on carbon bars.',

                  M: 'Modify the stem underside with a snap-in magnetic channel cover that hides hydraulic hoses cleanly.',

                  P: 'Put the top surface of the stem to use as a flush-mounted magnetic phone or cycling computer dock.',

                  E: 'Eliminate visible steel clamping bolts by hiding rear-entry titanium bolts inside the aerodynamic stem body.',

                  R: 'Reverse the faceplate opening to a rear-facing hinge clamp that presents a smooth, uninterrupted aero nose to the wind.'

                }

              },

              {

                id: 'part-5-1-3',

                name: 'Grips / Bar Tape',

                summary: 'High-friction cushioned interface between the rider hands and the handlebar.',

                scamper: {

                  S: 'Substitute EVA foam tape with silicone-gel-backed polyurethane or 100% recycled cork-rubber bio-compounds.',

                  C: 'Combine bar tape with integrated thin-film heated elements powered by an e-bike battery for winter commuting.',

                  A: 'Adapt tennis-racket overgrip tackiness and micro-perforated drainage channels for secure bare-hand grip in pouring rain.',

                  M: 'Modify grip cross-section into an ergonomic winged palm platform that distributes pressure off the ulnar nerve.',

                  P: 'Put the expanding bar-end plugs to use as hidden storage capsules for emergency cash, tubeless plugs, or a mini bell.',

                  E: 'Eliminate messy adhesive backing strips in favor of reusable, washable silicone-backing tape that can be re-wrapped cleanly.',

                  R: 'Reverse the traditional wrap-from-ends technique by using slip-on molded modular grip sleeves that install in seconds.'

                }

              }

            ]

          },

          {

            id: 'comp-5-2',

            name: 'Headset Assembly',

            summary: 'Precision bearing interface allowing frictionless fork rotation inside the frame head tube.',

            scamper: {

              S: 'Substitute standard steel angular-contact bearings with corrosion-proof stainless-steel or solid-lubricated polymer-matrix bearings.',

              C: 'Combine the upper headset cover with an integrated internal cable-routing guide and steering-angle limiter.',

              A: 'Adapt automotive self-centering steering geometry using a gentle magnetic or spring-assisted return-to-center cam.',

              M: 'Modify headset cups into angled-offset inserts (+/- 1.5°) to slacken or steepen the bike head-tube angle.',

              P: 'Put the headset spacers to use as aerodynamic split-ring fairings that can be removed without disconnecting hydraulic hoses.',

              E: 'Eliminate external pressed metal cups by seating precision cartridge bearings directly into molded carbon head-tube races.',

              R: 'Reverse the traditional top-down preload stack by integrating an internal locking collar below the stem.'

            },

            parts: [

              {

                id: 'part-5-2-1',

                name: 'Headset Bearings',

                summary: 'Upper and lower annular bearings supporting axial and radial steering loads.',

                scamper: {

                  S: 'Substitute grease-packed steel balls with self-lubricating solid-polymer-filled bearings that never wash out in rain.',

                  C: 'Combine the bearing cartridge with a dual-lip vulcanized rubber wiper seal bonded directly to the outer race.',

                  A: 'Adapt industrial tapered roller bearings for the lower headset race to handle heavy braking loads on cargo bikes.',

                  M: 'Modify the upper bearing to an oversized 52mm diameter to create internal routing space around the steerer tube.',

                  P: 'Put color-coded anodized bearing seals to use as instant visual size/angle identifiers (36° vs 45°) during service.',

                  E: 'Eliminate loose caged ball bearings entirely in favor of drop-in sealed angular-contact cartridges.',

                  R: 'Reverse the uniform top/bottom bearing sizing by pairing a massive load-bearing lower cartridge with a compact upper bearing.'

                }

              },

              {

                id: 'part-5-2-2',

                name: 'Crown Race',

                summary: 'Precision angled seat at the base of the steerer tube interfacing with the lower headset bearing.',

                scamper: {

                  S: 'Substitute heavy press-fit steel races with split, anodized 7075 aluminum races that install by hand without tools.',

                  C: 'Combine the crown race with an integrated rubber mud-lip seal that shields the lower bearing from front-wheel spray.',

                  A: 'Adapt sacrificial wear-ring sleeves so high-mileage grit wear can be refreshed cheaply without damaging the fork.',

                  M: 'Modify the crown race height (+3mm to +10mm) to subtly slacken head angle and raise front-end stack.',

                  P: 'Put the crown race flange to use as a mechanical steering-stop tab that prevents fork crowns from hitting the down tube.',

                  E: 'Eliminate the separate metal crown race entirely by molding a precision 45° carbon seat directly onto the fork crown.',

                  R: 'Reverse the interference-fit press installation into a tapered split-collet ring that self-centers under preload.'

                }

              },

              {

                id: 'part-5-2-3',

                name: 'Top Cap & Star Nut',

                summary: 'Preload tensioning assembly removing axial play from the headset bearings before stem clamping.',

                scamper: {

                  S: 'Substitute destructive hammered-in steel star nuts with reusable, carbon-safe expanding compression plugs.',

                  C: 'Combine the top cap with an integrated flush-mount GPS computer mount, compass, or analog clock.',

                  A: 'Adapt torque-limiting clutch caps that click audibly at exact bearing preload to prevent over-tightening.',

                  M: 'Modify the top cap into a hollow, threaded-lid cap that provides instant access to an internal steerer multi-tool.',

                  P: 'Put the top cap surface to use as a personalized laser-engraved medical-ID or emergency-contact badge.',

                  E: 'Eliminate the traditional top cap and star nut altogether by using a threaded-collar preload ring below the stem.',

                  R: 'Reverse the top-down tension bolt into a full-length through-bolt that ties the top cap directly to the fork crown.'

                }

              }

            ]

          }

        ]

      },


      // -----------------------------------------------------------------------

      // 6. SEATING & ERGONOMICS SUBSYSTEM

      // -----------------------------------------------------------------------

      {

        id: 'sub-6',

        name: 'Seating & Ergonomics Subsystem',

        summary: 'Rider pelvic support and vertical positioning assembly governing pedaling biomechanics and comfort.',

        scamper: {

          S: 'Substitute conventional foam-on-plastic saddles with 3D-printed elastomeric lattice structures tuned by pressure-mapping.',

          C: 'Combine the saddle and seatpost into a single one-piece molded carbon monocoque unit that cuts weight by 40%.',

          A: 'Adapt active suspension seatposts and wireless dropper posts for gravel and commuter bikes to ease mounting and descents.',

          M: 'Modify saddle fore/aft and tilt geometry automatically via a smart e-bike dropper that tilts nose-down on steep climbs.',

          P: 'Put the underside of the seating assembly to use as an integrated mounting dock for rear radar, tail lights, and saddlebags.',

          E: 'Eliminate traditional bolted clamping rails by bonding the saddle shell directly onto a compliant carbon leaf-spring post.',

          R: 'Reverse the upright diamond-frame saddle into a recumbent lumbar-support mesh seat for long-distance aerodynamic efficiency.'

        },

        components: [

          {

            id: 'comp-6-1',

            name: 'Saddle Assembly',

            summary: 'Contoured pelvic interface supporting the sit bones while relieving soft-tissue pressure.',

            scamper: {

              S: 'Substitute heavy steel rails and vinyl covers with ovalized carbon rails and breathable 3D-printed TPU lattice padding.',

              C: 'Combine the saddle rear edge with a flush-mounted rechargeable LED brake light and anti-theft GPS beacon.',

              A: 'Adapt pressure-mapping medical prosthetics to custom-print saddles matched to an individual rider sit-bone scan.',

              M: 'Modify saddle length into a short-nose, wide-cutout profile that lets riders rotate their pelvis forward without numbness.',

              P: 'Put the saddle rear lip to use as an ergonomic grab handle for lifting heavy e-bikes up stairs.',

              E: 'Eliminate foam padding and glued covers entirely by engineering a tensioned leather or suspended elastomer hammock shell.',

              R: 'Reverse the traditional rigid-nose design into a split, dual-independent-wing saddle that moves naturally with each pedal stroke.'

            },

            parts: [

              {

                id: 'part-6-1-1',

                name: 'Saddle Shell',

                summary: 'Structural baseplate flexing subtly under rider weight while anchoring the padding and rails.',

                scamper: {

                  S: 'Substitute rigid injection-molded nylon with a tuned carbon-fiber/flax composite shell with engineered flex zones.',

                  C: 'Combine the shell underside with threaded direct-mount bosses for fender clips, CO2 cartridges, and radar lights.',

                  A: 'Adapt suspension-bridge cutouts and living-hinge wing edges that flex downward as the inner thighs stroke.',

                  M: 'Modify the central channel into a full-length anatomical relief cutout that also vents heat and drains rainwater.',

                  P: 'Put the hollow underside of the shell to use as a snap-in storage bay for a flat-packed emergency rain poncho or tool.',

                  E: 'Eliminate staples and glue along the shell perimeter by co-molding the cover directly into the composite edge.',

                  R: 'Reverse the rigid shell-over-rails layout by suspending a flexible hammock shell from perimeter tension points.'

                }

              },

              {

                id: 'part-6-1-2',

                name: 'Padding & Cover',

                summary: 'Cushioning layer and outer skin managing sit-bone pressure, friction, and weather resistance.',

                scamper: {

                  S: 'Substitute closed-cell EVA foam with zonal 3D-printed elastomeric lattice pads offering variable spring rates.',

                  C: 'Combine the outer cover with hydrophobic, abrasion-resistant Kevlar side-scuff panels that resist leaning against walls.',

                  A: 'Adapt athletic-shoe knit textiles to create a seamless, breathable, waterproof membrane over the cushioning layer.',

                  M: 'Modify surface friction zonally—high-grip micro-texture at the rear for climbing stability, slick nose for easy fore/aft shifts.',

                  P: 'Put open 3D-printed lattice channels to use as passive airflow cooling vents on hot summer rides.',

                  E: 'Eliminate separate outer covers completely by using a UV-stabilized, washable open-cell 3D-printed polymer top.',

                  R: 'Reverse permanent glued padding into modular, snap-in density pads that riders can swap as their fitness or discipline changes.'

                }

              },

              {

                id: 'part-6-1-3',

                name: 'Saddle Rails',

                summary: 'Twin parallel structural rods connecting the saddle shell to the seatpost clamp.',

                scamper: {

                  S: 'Substitute solid chromoly steel rods with hollow titanium tubes or 7x9mm ovalized braided carbon-fiber rails.',

                  C: 'Combine the rails with elastomer-isolated mounting sockets in the saddle shell to filter high-frequency road buzz.',

                  A: 'Adapt leaf-spring geometry by extending the rear rail arc to increase vertical compliance under seated impacts.',

                  M: 'Modify rail length with an extended fore/aft adjustment range and laser-etched millimeter markings for repeatable bike fits.',

                  P: 'Put the rear rail loop to use as a standardized quick-clip anchor for saddlebags and bottle-cage triathlon launchers.',

                  E: 'Eliminate twin rails altogether in favor of a single central I-beam rail or direct-bonded monocoque seatpost.',

                  R: 'Reverse the rail attachment by anchoring rails only at the rear and floating the nose on a tuned elastomer bumper.'

                }

              }

            ]

          },

          {

            id: 'comp-6-2',

            name: 'Seatpost Assembly',

            summary: 'Telescoping or rigid vertical pillar connecting the saddle to the frame seat tube.',

            scamper: {

              S: 'Substitute rigid aluminum tubes with split-leaf carbon flex posts (e.g., VCLS) that offer 20mm of maintenance-free compliance.',

              C: 'Combine a wireless electronic dropper post with a tuned air-spring suspension mode for gravel and commuter comfort.',

              A: 'Adapt office-chair pneumatic gas-spring cartridges into infinitely adjustable, handlebar-actuated dropper posts.',

              M: 'Modify the circular post profile into a D-shaped aero post that prevents saddle twisting and enhances rearward flex.',

              P: 'Put the hollow seatpost interior to use as a waterproof battery bay for Di2/electronic shifting or an emergency mini-pump.',

              E: 'Eliminate the telescoping seatpost completely via an Integrated Seat Mast (ISM) cut to the rider exact leg length.',

              R: 'Reverse the traditional round post-in-tube slide by using an external aero mast topper that slides over the frame.'

            },

            parts: [

              {

                id: 'part-6-2-1',

                name: 'Seatpost Shaft',

                summary: 'Primary vertical column transferring rider weight into the frame seat tube.',

                scamper: {

                  S: 'Substitute constant-wall aluminum tubing with anisotropic carbon fiber laid up stiff laterally and compliant fore-to-aft.',

                  C: 'Combine the shaft with a laser-etched height scale and a flush-mounted rear LED light strip facing backward.',

                  A: 'Adapt parallel-linkage suspension mechanisms at the top of the shaft so the saddle moves back-and-down smoothly over bumps.',

                  M: 'Modify shaft setback (0mm to 25mm) using a reversible head insert to fine-tune knee-over-pedal-spindle alignment.',

                  P: 'Put the lower shaft bore to use as a concealed stash tube for a rolled emergency wind vest or spare inner tube.',

                  E: 'Eliminate metal-on-carbon galvanic seizure by coating the shaft exterior with a micro-textured friction-grip finish.',

                  R: 'Reverse the single-tube shaft into a dual-blade split leaf-spring post that visibly flexes over cobbles.'

                }

              },

              {

                id: 'part-6-2-2',

                name: 'Saddle Clamp',

                summary: 'Adjustable head mechanism securing the saddle rails and setting saddle tilt and fore/aft position.',

                scamper: {

                  S: 'Substitute heavy cast-alloy clamps with CNC-machined 7075 aluminum yokes and Grade-5 titanium hardware.',

                  C: 'Combine the clamp with an integrated micro-level bubble or laser-etched degree markings for exact tilt repeatability.',

                  A: 'Adapt rotary-clutch side-bolt clamps that allow independent tilt and fore/aft adjustment without slipping.',

                  M: 'Modify clamp ears with interchangeable cradles that accept both 7mm round alloy rails and 7x9mm oval carbon rails.',

                  P: 'Put the rear clamp bolt to use as a secure mounting stud for a sleek, wobble-free under-saddle tail light.',

                  E: 'Eliminate frustrating single-bolt serrated clamps that slip in favor of a zero-slip twin-bolt opposing micro-adjust head.',

                  R: 'Reverse the vertical bolt orientation into a single horizontal side-access bolt for effortless tool clearance.'

                }

              },

              {

                id: 'part-6-2-3',

                name: 'Seatpost Collar',

                summary: 'Clamping ring or wedge securing the seatpost shaft at the desired height inside the seat tube.',

                scamper: {

                  S: 'Substitute stamped alloy quick-release collars with CNC-machined titanium rings featuring spherical self-aligning washers.',

                  C: 'Combine the collar with an integrated rubber dust-wiper lip that seals the seat-tube slot against muddy rear-wheel spray.',

                  A: 'Adapt anti-theft security-keyed pentagon bolts to prevent opportunistic saddle and seatpost theft on city bikes.',

                  M: 'Modify the clamping slot to face forward or offset 180 degrees from the frame slot to distribute clamping force evenly on carbon posts.',

                  P: 'Put the collar bolt boss to use as a structural attachment point for a rear cargo rack or clip-on fender.',

                  E: 'Eliminate the external collar entirely by integrating a sleek, hidden internal expanding wedge inside the frame junction.',

                  R: 'Reverse the single-bolt pinch collar into a dual-clamp collar (one ring gripping the frame, one gripping the post) to double holding force.'

                }

              }

            ]

          }

        ]

      }

    ];


    // =========================================================================

    // FLATTEN INDEX FOR FAST SEARCH, FILTERING & NAVIGATION

    // =========================================================================

    const ITEMS_MAP = new Map();

    const ALL_ITEMS = [];


    BICYCLE_DATA.forEach((sub, sIdx) => {

      const subItem = {

        id: sub.id,

        level: 'subsystem',

        name: sub.name,

        summary: sub.summary,

        scamper: sub.scamper,

        subsystemId: sub.id,

        subsystemName: sub.name,

        componentId: null,

        componentName: null,

        parentId: null,

        childrenIds: sub.components.map(c => c.id),

        code: `${sIdx + 1}`

      };

      ITEMS_MAP.set(subItem.id, subItem);

      ALL_ITEMS.push(subItem);


      sub.components.forEach((comp, cIdx) => {

        const compItem = {

          id: comp.id,

          level: 'component',

          name: comp.name,

          summary: comp.summary,

          scamper: comp.scamper,

          subsystemId: sub.id,

          subsystemName: sub.name,

          componentId: comp.id,

          componentName: comp.name,

          parentId: sub.id,

          childrenIds: comp.parts.map(p => p.id),

          code: `${sIdx + 1}.${cIdx + 1}`

        };

        ITEMS_MAP.set(compItem.id, compItem);

        ALL_ITEMS.push(compItem);


        comp.parts.forEach((part, pIdx) => {

          const partItem = {

            id: part.id,

            level: 'part',

            name: part.name,

            summary: part.summary,

            scamper: part.scamper,

            subsystemId: sub.id,

            subsystemName: sub.name,

            componentId: comp.id,

            componentName: comp.name,

            parentId: comp.id,

            childrenIds: [],

            code: `${sIdx + 1}.${cIdx + 1}.${pIdx + 1}`

          };

          ITEMS_MAP.set(partItem.id, partItem);

          ALL_ITEMS.push(partItem);

        });

      });

    });


    // =========================================================================

    // APPLICATION STATE

    // =========================================================================

    const state = {

      viewMode: 'tree', // 'tree' | 'table'

      selectedId: BICYCLE_DATA[0].id,

      search: '',

      levelFilter: 'all',

      subsystemFilter: 'all',

      scamperFilter: 'all',

      expandedNodes: new Set(ALL_ITEMS.filter(i => i.level !== 'part').map(i => i.id)),

      allExpanded: true

    };


    // =========================================================================

    // DOM REFERENCES

    // =========================================================================

    const elSearch = document.getElementById('search-input');

    const elLevel = document.getElementById('filter-level');

    const elSubsystem = document.getElementById('filter-subsystem');

    const elScamper = document.getElementById('filter-scamper');

    const elResetBtn = document.getElementById('btn-reset-filters');

    const elLegend = document.getElementById('scamper-legend');

    const elActiveScamperIndicator = document.getElementById('active-scamper-indicator');

    const elTreeContainer = document.getElementById('tree-view-container');

    const elTableContainer = document.getElementById('table-view-container');

    const elTree = document.getElementById('hierarchy-tree');

    const elTreeMatchCount = document.getElementById('tree-match-count');

    const elDetailPanel = document.getElementById('detail-panel');

    const elFullReport = document.getElementById('full-report-content');

    const elViewBtnTree = document.getElementById('view-btn-tree');

    const elViewBtnTable = document.getElementById('view-btn-table');

    const elToggleExpandBtn = document.getElementById('btn-toggle-expand');

    const elExpandLabel = document.getElementById('expand-btn-label');


    // =========================================================================

    // HELPER FUNCTIONS

    // =========================================================================

    function escapeHtml(str) {

      return String(str)

        .replace(/&/g, '&amp;')

        .replace(/</g, '&lt;')

        .replace(/>/g, '&gt;')

        .replace(/"/g, '&quot;');

    }


    function showToast(msg) {

      const toast = document.getElementById('toast');

      document.getElementById('toast-message').textContent = msg;

      toast.classList.remove('hidden');

      toast.classList.add('flex');

      clearTimeout(window._toastTimer);

      window._toastTimer = setTimeout(() => {

        toast.classList.add('hidden');

        toast.classList.remove('flex');

      }, 2800);

    }


    function itemMatchesFilters(item) {

      if (state.levelFilter !== 'all' && item.level !== state.levelFilter) return false;

      if (state.subsystemFilter !== 'all' && item.subsystemId !== state.subsystemFilter) return false;


      const q = state.search.trim().toLowerCase();

      if (!q) return true;


      if (item.name.toLowerCase().includes(q) || item.summary.toLowerCase().includes(q)) {

        return true;

      }


      const keysToCheck = state.scamperFilter === 'all' ? SCAMPER_KEYS : [state.scamperFilter];

      return keysToCheck.some(k => item.scamper[k].toLowerCase().includes(q));

    }


    function getFilteredItems() {

      return ALL_ITEMS.filter(itemMatchesFilters);

    }


    function highlightText(text) {

      const safe = escapeHtml(text);

      const q = state.search.trim();

      if (!q) return safe;

      try {

        const escapedQ = q.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');

        return safe.replace(new RegExp(`(${escapedQ})`, 'gi'), '<mark class="bg-amber-200 text-slate-900 rounded px-0.5">$1</mark>');

      } catch (e) {

        return safe;

      }

    }


    function levelBadgeHtml(level) {

      if (level === 'subsystem') {

        return '<span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-slate-900 text-white">Subsystem</span>';

      }

      if (level === 'component') {

        return '<span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-indigo-100 text-indigo-800 border border-indigo-200">Component</span>';

      }

      return '<span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-slate-100 text-slate-700 border border-slate-200">Part</span>';

    }


    // =========================================================================

    // INITIALIZE STATIC CONTROLS

    // =========================================================================

    function initControls() {

      // Populate Subsystem Filter dropdown

      BICYCLE_DATA.forEach((sub, idx) => {

        const opt = document.createElement('option');

        opt.value = sub.id;

        opt.textContent = `${idx + 1}. ${sub.name}`;

        elSubsystem.appendChild(opt);

      });


      // Render interactive SCAMPER legend

      renderScamperLegend();

    }


    function renderScamperLegend() {

      elLegend.innerHTML = SCAMPER_KEYS.map(k => {

        const m = SCAMPER_META[k];

        const isActive = state.scamperFilter === k;

        const activeClasses = isActive ? `ring-2 ${m.ring} shadow-sm scale-[1.02]` : 'opacity-90 hover:opacity-100';

        return `

          <button type="button" data-scamper-key="${k}"

            class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-semibold border transition cursor-pointer ${m.badge} ${activeClasses}">

            <span class="w-4 h-4 rounded flex items-center justify-center text-[10px] font-extrabold text-white ${m.dot}">${k}</span>

            <span>${m.label}</span>

          </button>

        `;

      }).join('');


      elLegend.querySelectorAll('button[data-scamper-key]').forEach(btn => {

        btn.addEventListener('click', () => {

          const key = btn.getAttribute('data-scamper-key');

          state.scamperFilter = state.scamperFilter === key ? 'all' : key;

          elScamper.value = state.scamperFilter;

          renderAll();

        });

      });


      elActiveScamperIndicator.textContent = state.scamperFilter === 'all'

        ? 'Showing all 7 prompts'

        : `Filtered: ${state.scamperFilter} — ${SCAMPER_META[state.scamperFilter].label}`;

    }


    // =========================================================================

    // RENDER STATS DASHBOARD

    // =========================================================================

    function renderStats(filteredItems) {

      const totalSubs = ALL_ITEMS.filter(i => i.level === 'subsystem').length;

      const totalComps = ALL_ITEMS.filter(i => i.level === 'component').length;

      const totalParts = ALL_ITEMS.filter(i => i.level === 'part').length;

      const totalIdeas = ALL_ITEMS.length * 7;


      const fSubs = filteredItems.filter(i => i.level === 'subsystem').length;

      const fComps = filteredItems.filter(i => i.level === 'component').length;

      const fParts = filteredItems.filter(i => i.level === 'part').length;

      const promptMultiplier = state.scamperFilter === 'all' ? 7 : 1;

      const fIdeas = filteredItems.length * promptMultiplier;


      const isFiltered = state.search.trim() !== '' || state.levelFilter !== 'all' || state.subsystemFilter !== 'all' || state.scamperFilter !== 'all';


      document.getElementById('stat-subsystems').textContent = fSubs;

      document.getElementById('stat-subsystems-total').textContent = isFiltered ? `/ ${totalSubs}` : '';

      document.getElementById('stat-components').textContent = fComps;

      document.getElementById('stat-components-total').textContent = isFiltered ? `/ ${totalComps}` : '';

      document.getElementById('stat-parts').textContent = fParts;

      document.getElementById('stat-parts-total').textContent = isFiltered ? `/ ${totalParts}` : '';

      document.getElementById('stat-ideas').textContent = fIdeas;

      document.getElementById('stat-ideas-total').textContent = isFiltered ? `/ ${totalIdeas}` : '';


      elResetBtn.classList.toggle('hidden', !isFiltered);

    }


    // =========================================================================

    // RENDER INTERACTIVE TREE VIEW

    // =========================================================================

    function renderTree(filteredItems) {

      const matchedIds = new Set(filteredItems.map(i => i.id));

      const isFiltering = state.search.trim() !== '' || state.levelFilter !== 'all' || state.subsystemFilter !== 'all';


      // Determine visible nodes (a node is visible if it matches OR any descendant matches)

      const visibleIds = new Set();

      filteredItems.forEach(item => {

        visibleIds.add(item.id);

        let pId = item.parentId;

        while (pId) {

          visibleIds.add(pId);

          pId = ITEMS_MAP.get(pId)?.parentId;

        }

      });


      elTreeMatchCount.textContent = `${filteredItems.length} ${filteredItems.length === 1 ? 'match' : 'matches'}`;


      if (filteredItems.length === 0) {

        elTree.innerHTML = `

          <div class="p-6 text-center text-sm text-slate-500">

            No bicycle items match your current filters.

          </div>`;

        return;

      }


      // Ensure selectedId is valid among matched items if current selection isn't visible

      if (!visibleIds.has(state.selectedId)) {

        state.selectedId = filteredItems[0].id;

      }


      const htmlParts = [];


      BICYCLE_DATA.forEach(sub => {

        if (!visibleIds.has(sub.id)) return;

        const subItem = ITEMS_MAP.get(sub.id);

        const subExpanded = isFiltering || state.expandedNodes.has(sub.id);

        const subSelected = state.selectedId === sub.id;

        const subMatched = matchedIds.has(sub.id);


        htmlParts.push(`

          <div class="select-none">

            <div class="flex items-center gap-1 rounded-lg px-2 py-1.5 transition cursor-pointer ${subSelected ? 'bg-slate-900 text-white shadow-sm' : 'hover:bg-slate-100 text-slate-800'} ${!subMatched ? 'opacity-65' : ''}"

                 data-select-id="${sub.id}">

              <button type="button" data-toggle-id="${sub.id}" aria-label="Toggle ${escapeHtml(sub.name)}"

                class="p-0.5 rounded hover:bg-black/10 shrink-0">

                <svg class="w-3.5 h-3.5 transition-transform ${subExpanded ? 'rotate-90' : ''}" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24">

                  <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />

                </svg>

              </button>

              <span class="text-[11px] font-bold opacity-60 mr-0.5">${subItem.code}</span>

              <span class="text-xs font-bold truncate flex-1">${highlightText(sub.name)}</span>

              <span class="text-[10px] font-semibold px-1.5 py-0.5 rounded ${subSelected ? 'bg-white/20 text-white' : 'bg-slate-200 text-slate-600'}">S</span>

            </div>

        `);


        if (subExpanded) {

          htmlParts.push('<div class="ml-3.5 pl-2.5 border-l border-slate-200 mt-1 space-y-1">');

          sub.components.forEach(comp => {

            if (!visibleIds.has(comp.id)) return;

            const compItem = ITEMS_MAP.get(comp.id);

            const compExpanded = isFiltering || state.expandedNodes.has(comp.id);

            const compSelected = state.selectedId === comp.id;

            const compMatched = matchedIds.has(comp.id);


            htmlParts.push(`

              <div>

                <div class="flex items-center gap-1 rounded-lg px-2 py-1.5 transition cursor-pointer ${compSelected ? 'bg-indigo-600 text-white shadow-sm' : 'hover:bg-slate-100 text-slate-700'} ${!compMatched ? 'opacity-65' : ''}"

                     data-select-id="${comp.id}">

                  <button type="button" data-toggle-id="${comp.id}" aria-label="Toggle ${escapeHtml(comp.name)}"

                    class="p-0.5 rounded hover:bg-black/10 shrink-0">

                    <svg class="w-3 h-3 transition-transform ${compExpanded ? 'rotate-90' : ''}" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24">

                      <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />

                    </svg>

                  </button>

                  <span class="text-[10px] font-semibold opacity-60">${compItem.code}</span>

                  <span class="text-xs font-semibold truncate flex-1">${highlightText(comp.name)}</span>

                  <span class="text-[10px] font-semibold px-1.5 py-0.5 rounded ${compSelected ? 'bg-white/20 text-white' : 'bg-indigo-50 text-indigo-700'}">C</span>

                </div>

            `);


            if (compExpanded) {

              htmlParts.push('<div class="ml-3.5 pl-2.5 border-l border-slate-200 mt-1 space-y-0.5">');

              comp.parts.forEach(part => {

                if (!visibleIds.has(part.id)) return;

                const partItem = ITEMS_MAP.get(part.id);

                const partSelected = state.selectedId === part.id;


                htmlParts.push(`

                  <div class="flex items-center gap-1.5 rounded-lg px-2 py-1.5 transition cursor-pointer ${partSelected ? 'bg-indigo-50 text-indigo-900 ring-1 ring-indigo-300 font-semibold' : 'hover:bg-slate-100 text-slate-600'}"

                       data-select-id="${part.id}">

                    <span class="w-1.5 h-1.5 rounded-full shrink-0 ${partSelected ? 'bg-indigo-600' : 'bg-slate-300'}"></span>

                    <span class="text-[10px] opacity-60">${partItem.code}</span>

                    <span class="text-xs truncate flex-1">${highlightText(part.name)}</span>

                  </div>

                `);

              });

              htmlParts.push('</div>');

            }

            htmlParts.push('</div>');

          });

          htmlParts.push('</div>');

        }

        htmlParts.push('</div>');

      });


      elTree.innerHTML = htmlParts.join('');


      // Attach Tree click handlers

      elTree.querySelectorAll('[data-toggle-id]').forEach(btn => {

        btn.addEventListener('click', (e) => {

          e.stopPropagation();

          const id = btn.getAttribute('data-toggle-id');

          if (state.expandedNodes.has(id)) {

            state.expandedNodes.delete(id);

          } else {

            state.expandedNodes.add(id);

          }

          renderTree(getFilteredItems());

        });

      });


      elTree.querySelectorAll('[data-select-id]').forEach(row => {

        row.addEventListener('click', () => {

          const id = row.getAttribute('data-select-id');

          state.selectedId = id;

          renderTree(getFilteredItems());

          renderDetailPanel();

        });

      });

    }


    // =========================================================================

    // RENDER RIGHT DETAIL PANEL (7-CARD SCAMPER ANALYSIS)

    // =========================================================================

    function renderDetailPanel() {

      const item = ITEMS_MAP.get(state.selectedId);

      if (!item) {

        elDetailPanel.innerHTML = '<p class="text-sm text-slate-500">Select an item from the hierarchy tree to inspect its SCAMPER analysis.</p>';

        return;

      }


      // Build Breadcrumbs

      const crumbs = [];

      if (item.level === 'subsystem') {

        crumbs.push({ id: item.id, name: item.name, active: true });

      } else if (item.level === 'component') {

        crumbs.push({ id: item.subsystemId, name: item.subsystemName, active: false });

        crumbs.push({ id: item.id, name: item.name, active: true });

      } else {

        crumbs.push({ id: item.subsystemId, name: item.subsystemName, active: false });

        crumbs.push({ id: item.componentId, name: item.componentName, active: false });

        crumbs.push({ id: item.id, name: item.name, active: true });

      }


      const breadcrumbHtml = crumbs.map((c, idx) => `

        ${idx > 0 ? '<span class="text-slate-300 mx-1">/</span>' : ''}

        ${c.active

          ? `<span class="font-semibold text-slate-800">${escapeHtml(c.name)}</span>`

          : `<button type="button" data-nav-id="${c.id}" class="text-slate-500 hover:text-indigo-600 hover:underline transition">${escapeHtml(c.name)}</button>`}

      `).join('');


      // Parent / Child quick navigation chips

      let navChipsHtml = '';

      if (item.childrenIds.length > 0) {

        const childLabel = item.level === 'subsystem' ? 'Components in this Subsystem' : 'Parts in this Component';

        navChipsHtml = `

          <div class="mt-4 pt-4 border-t border-slate-100">

            <div class="text-[11px] font-semibold uppercase tracking-wider text-slate-400 mb-2">${childLabel}</div>

            <div class="flex flex-wrap gap-2">

              ${item.childrenIds.map(cid => {

                const cItem = ITEMS_MAP.get(cid);

                return `

                  <button type="button" data-nav-id="${cid}"

                    class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium bg-slate-50 text-slate-700 border border-slate-200 hover:bg-indigo-50 hover:text-indigo-700 hover:border-indigo-200 transition">

                    <span class="text-[10px] text-slate-400">${cItem.code}</span>

                    <span>${escapeHtml(cItem.name)}</span>

                    <svg class="w-3 h-3 opacity-50" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">

                      <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />

                    </svg>

                  </button>

                `;

              }).join('')}

            </div>

          </div>

        `;

      } else if (item.parentId) {

        const parentItem = ITEMS_MAP.get(item.parentId);

        navChipsHtml = `

          <div class="mt-4 pt-4 border-t border-slate-100 flex items-center gap-2">

            <span class="text-[11px] font-semibold uppercase tracking-wider text-slate-400">Parent Component:</span>

            <button type="button" data-nav-id="${parentItem.id}"

              class="inline-flex items-center gap-1 px-2.5 py-1 rounded-lg text-xs font-medium bg-slate-50 text-slate-700 border border-slate-200 hover:bg-indigo-50 hover:text-indigo-700 hover:border-indigo-200 transition">

              &larr; ${escapeHtml(parentItem.name)}

            </button>

          </div>

        `;

      }


      // SCAMPER Cards

      const keysToRender = state.scamperFilter === 'all' ? SCAMPER_KEYS : [state.scamperFilter];

      const cardsHtml = keysToRender.map(k => {

        const m = SCAMPER_META[k];

        return `

          <article class="rounded-xl border border-slate-200 border-l-4 ${m.accent} bg-slate-50/50 p-4 hover:bg-white hover:shadow-sm transition">

            <div class="flex items-center gap-2 mb-2">

              <span class="w-6 h-6 rounded-md flex items-center justify-center text-xs font-extrabold text-white ${m.dot} shadow-sm">${k}</span>

              <h3 class="text-sm font-bold text-slate-900">${m.label}</h3>

            </div>

            <p class="text-sm text-slate-700 leading-relaxed">${highlightText(item.scamper[k])}</p>

          </article>

        `;

      }).join('');


      elDetailPanel.innerHTML = `

        <div>

          <nav class="text-xs flex items-center flex-wrap mb-3">${breadcrumbHtml}</nav>

          <div class="flex flex-wrap items-center gap-2.5">

            ${levelBadgeHtml(item.level)}

            <span class="text-xs font-mono font-semibold text-slate-400">#${item.code}</span>

          </div>

          <h2 class="text-xl sm:text-2xl font-extrabold text-slate-900 tracking-tight mt-1.5">${highlightText(item.name)}</h2>

          <p class="text-sm text-slate-600 mt-1">${highlightText(item.summary)}</p>

          ${navChipsHtml}

        </div>


        <div class="mt-6">

          <div class="flex items-center justify-between mb-3">

            <h3 class="text-xs font-bold uppercase tracking-wider text-slate-500">SCAMPER Engineering Innovation Matrix</h3>

            <span class="text-xs text-slate-400">${keysToRender.length} of 7 prompts shown</span>

          </div>

          <div class="grid grid-cols-1 md:grid-cols-2 gap-3.5">

            ${cardsHtml}

          </div>

        </div>

      `;


      // Attach breadcrumb & chip navigation

      elDetailPanel.querySelectorAll('[data-nav-id]').forEach(btn => {

        btn.addEventListener('click', () => {

          const targetId = btn.getAttribute('data-nav-id');

          state.selectedId = targetId;

          // Ensure parent nodes are expanded

          let pId = ITEMS_MAP.get(targetId)?.parentId;

          while (pId) {

            state.expandedNodes.add(pId);

            pId = ITEMS_MAP.get(pId)?.parentId;

          }

          renderTree(getFilteredItems());

          renderDetailPanel();

        });

      });

    }


    // =========================================================================

    // RENDER VIEW MODE 2: FULL REPORT TABLE VIEW (PRINTABLE)

    // =========================================================================

    function renderFullReport(filteredItems) {

      if (filteredItems.length === 0) {

        elFullReport.innerHTML = `

          <div class="bg-white rounded-xl border border-slate-200 p-10 text-center text-sm text-slate-500">

            No items match your current search or filter criteria.

          </div>`;

        return;

      }


      const keysToRender = state.scamperFilter === 'all' ? SCAMPER_KEYS : [state.scamperFilter];

      const matchedSet = new Set(filteredItems.map(i => i.id));


      const sections = [];


      BICYCLE_DATA.forEach(sub => {

        const subItems = filteredItems.filter(i => i.subsystemId === sub.id);

        if (subItems.length === 0) return;


        const rowsHtml = subItems.map(item => {

          const indentClass = item.level === 'subsystem'

            ? 'bg-slate-900 text-white'

            : item.level === 'component'

              ? 'bg-indigo-50/70 text-slate-900 border-t border-slate-200'

              : 'bg-white text-slate-800 border-t border-slate-200';


          const scamperCells = keysToRender.map(k => {

            const m = SCAMPER_META[k];

            return `

              <div class="p-3 rounded-lg border border-slate-200 bg-white">

                <div class="flex items-center gap-1.5 mb-1">

                  <span class="w-4 h-4 rounded flex items-center justify-center text-[10px] font-extrabold text-white ${m.dot}">${k}</span>

                  <span class="text-[11px] font-bold uppercase tracking-wide text-slate-700">${m.label}</span>

                </div>

                <p class="text-xs text-slate-600 leading-relaxed">${highlightText(item.scamper[k])}</p>

              </div>

            `;

          }).join('');


          return `

            <div class="print-break-avoid border border-slate-200 rounded-xl overflow-hidden shadow-sm print-shadow-none">

              <div class="px-4 py-3 flex flex-wrap items-center justify-between gap-2 ${indentClass}">

                <div class="flex items-center gap-2 flex-wrap">

                  <span class="text-xs font-mono opacity-75">${item.code}</span>

                  ${item.level !== 'subsystem' ? levelBadgeHtml(item.level) : '<span class="px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-white/20 text-white">Subsystem</span>'}

                  <h4 class="text-sm font-bold">${highlightText(item.name)}</h4>

                </div>

                <span class="text-xs opacity-80">${highlightText(item.summary)}</span>

              </div>

              <div class="p-3 bg-slate-50/60 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-2.5">

                ${scamperCells}

              </div>

            </div>

          `;

        }).join('');


        sections.push(`

          <div class="space-y-3">

            <div class="flex items-center justify-between border-b-2 border-slate-300 pb-1.5">

              <h3 class="text-base font-extrabold text-slate-900">${escapeHtml(sub.name)}</h3>

              <span class="text-xs font-semibold text-slate-500">${subItems.length} items</span>

            </div>

            <div class="space-y-3">

              ${rowsHtml}

            </div>

          </div>

        `);

      });


      elFullReport.innerHTML = sections.join('');

    }


    // =========================================================================

    // MASTER RENDER LOOP

    // =========================================================================

    function renderAll() {

      const filteredItems = getFilteredItems();

      renderStats(filteredItems);

      renderScamperLegend();

      renderTree(filteredItems);

      renderDetailPanel();

      renderFullReport(filteredItems);

    }


    // =========================================================================

    // CSV EXPORT

    // =========================================================================

    function exportToCsv() {

      const items = getFilteredItems();

      const headers = [

        'Code', 'Level', 'Subsystem', 'Component', 'Item Name', 'Engineering Summary',

        'S - Substitute', 'C - Combine', 'A - Adapt', 'M - Modify',

        'P - Put to Another Use', 'E - Eliminate', 'R - Reverse'

      ];


      const csvEscape = (val) => `"${String(val || '').replace(/"/g, '""')}"`;


      const rows = items.map(item => [

        item.code,

        item.level.toUpperCase(),

        item.subsystemName,

        item.componentName || '-',

        item.name,

        item.summary,

        item.scamper.S,

        item.scamper.C,

        item.scamper.A,

        item.scamper.M,

        item.scamper.P,

        item.scamper.E,

        item.scamper.R

      ].map(csvEscape).join(','));


      const csvContent = [headers.map(csvEscape).join(','), ...rows].join('\r\n');

      const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });

      const url = URL.createObjectURL(blob);

      const a = document.createElement('a');

      a.href = url;

      a.download = 'bicycle_scamper_innovation_report.csv';

      document.body.appendChild(a);

      a.click();

      document.body.removeChild(a);

      URL.revokeObjectURL(url);

      showToast(`Exported ${items.length} items (${items.length * 7} SCAMPER ideas) to CSV.`);

    }


    // =========================================================================

    // EVENT LISTENERS

    // =========================================================================

    elSearch.addEventListener('input', (e) => {

      state.search = e.target.value;

      renderAll();

    });


    elLevel.addEventListener('change', (e) => {

      state.levelFilter = e.target.value;

      renderAll();

    });


    elSubsystem.addEventListener('change', (e) => {

      state.subsystemFilter = e.target.value;

      renderAll();

    });


    elScamper.addEventListener('change', (e) => {

      state.scamperFilter = e.target.value;

      renderAll();

    });


    elResetBtn.addEventListener('click', () => {

      state.search = '';

      state.levelFilter = 'all';

      state.subsystemFilter = 'all';

      state.scamperFilter = 'all';

      elSearch.value = '';

      elLevel.value = 'all';

      elSubsystem.value = 'all';

      elScamper.value = 'all';

      renderAll();

      showToast('Filters reset.');

    });


    // View Mode Toggle

    function setViewMode(mode) {

      state.viewMode = mode;

      const isTree = mode === 'tree';

      elTreeContainer.classList.toggle('hidden', !isTree);

      elTableContainer.classList.toggle('hidden', isTree);

      elToggleExpandBtn.classList.toggle('hidden', !isTree);


      if (isTree) {

        elViewBtnTree.classList.add('bg-white', 'text-slate-900', 'shadow-sm');

        elViewBtnTree.classList.remove('text-slate-600');

        elViewBtnTable.classList.remove('bg-white', 'text-slate-900', 'shadow-sm');

        elViewBtnTable.classList.add('text-slate-600');

      } else {

        elViewBtnTable.classList.add('bg-white', 'text-slate-900', 'shadow-sm');

        elViewBtnTable.classList.remove('text-slate-600');

        elViewBtnTree.classList.remove('bg-white', 'text-slate-900', 'shadow-sm');

        elViewBtnTree.classList.add('text-slate-600');

      }

    }


    elViewBtnTree.addEventListener('click', () => setViewMode('tree'));

    elViewBtnTable.addEventListener('click', () => setViewMode('table'));


    // Expand / Collapse All

    elToggleExpandBtn.addEventListener('click', () => {

      if (state.allExpanded) {

        state.expandedNodes.clear();

        state.allExpanded = false;

        elExpandLabel.textContent = 'Expand All';

      } else {

        ALL_ITEMS.filter(i => i.level !== 'part').forEach(i => state.expandedNodes.add(i.id));

        state.allExpanded = true;

        elExpandLabel.textContent = 'Collapse All';

      }

      renderTree(getFilteredItems());

    });


    // Export & Print

    document.getElementById('btn-export-csv').addEventListener('click', exportToCsv);

    document.getElementById('btn-print').addEventListener('click', () => window.print());


    // Boot Application

    initControls();

    renderAll();

  </script>

</body>

</html>

Comments

Popular posts from this blog

#4297 ISS Astronaut Unable to Speak

#3356 PHP and JavaScript to Retrieve and Set an API_Key

#761 New Ways to Access Online Content, particularly Virtual Reality Content