Create a single-file HTML benchmark called `Phosphor Glassworks` for the canonical `/factory/` route in a one-shot catalog.

Direction:
- Build a phosphor glassworks automation line with smoky amber lighting, teal diagnostics, frosted-glass panels, and clear logistics overlays.
- Keep the artifact self-contained in one `index.html` file with inline HTML, CSS, and JavaScript only.

Core simulation brief:
- The player operates a compact factory that turns three raw resources into finished phosphor glass panels for shipment.
- Raw resources: silica sand, copper frit, and rare-earth salts.
- Finished chain: silica sand + copper frit -> glass melt; glass melt + rare-earth salts -> phosphor pane; phosphor pane -> tempered panel; tempered panel -> packed shipment.
- Include at least four machine types and make them matter to the chain. Preferred set: intake filter, fusion melter, dopant mixer, tempering kiln, laser cutter, packer, plus an optional buffer module.
- The player must place machines onto clearly marked pads in the line. Placement has to affect throughput, stalls, heat, and shipment output.
- Conveyors must visibly carry materials between stations. Motion should indicate where flow is healthy and where it is blocked.

Required states and feedback:
- Start state with a short briefing before the line is running.
- Play state with active throughput, animated flow, and live diagnostics.
- Pause state that freezes the sim without losing layout.
- Failure state caused by real factory pressure, not a random timer. Use thermal overload or runaway backlog tied to the machine layout.
- Optimisation review state with bottleneck summaries, suggestions, and score breakdown.

Scoring model:
- Primary score is shipped phosphor glass panels per minute.
- Secondary metrics: uptime, average conveyor saturation, stall count by cause, heat load, and waste recovery.
- Show a visible production graph over time.

Interaction rules:
- Support desktop and touch input.
- Make placement easy on small screens with tap-to-select machine types and tap-to-place pads.
- Allow replacing or clearing a machine from a pad during setup or while paused.
- Surface the exact reason each stalled station is blocked, for example missing silica, rare-earth starvation, downstream jam, or thermal cap reached.

Visual and UX rules:
- Use a high-contrast industrial display with readable typography and large touch targets.
- Keep the factory map, control bar, metric cards, and stall inspector visible without modal clutter.
- Use motion to explain the line, not as decoration.
- Keep all text sans-serif and avoid any literal `\n` or HTML break tags in visible UI text.

Deliverable:
- Write `index.html` as the complete interactive artifact.
- The route should feel like a short, replayable optimisation benchmark rather than a static illustration.
