{
  "schema": 2,
  "id": "L2_esophagus",
  "name": "Esophagus",
  "tagline": "Ride the swallow",
  "seed": 20260716,
  "par": { "time": 180, "score": 9000, "samples": 3 },
  "next": "L3_stomach",
  "design": {
    "owner": "Lane C",
    "identity": "The speed level. Level 2 is the vertical slice and the purest tube in the body: one biome, no arenas, everything readable at 14-20 u/s.",
    "anatomy": "Real esophagus, real order: upper esophageal sphincter -> cervical -> the broncho-aortic constriction -> thoracic -> diaphragmatic hiatus -> abdominal esophagus -> cardiac sphincter (LES) into the stomach. The three narrowings are the three real anatomical constrictions and they are this level's three setpieces.",
    "scale": "Cross-sections are ANATOMICALLY TRUE (radius 10-12 units = ~2cm lumen at 1 unit : 1 mm). Lengths are DILATED ~14x (real esophagus is 25cm; this level is 3600 units). The canal is proportioned, not measured. See LANE_C_NOTES.md.",
    "curve": "breather -> pressure -> SPIKE -> breather -> pressure -> SPIKE -> lethal finale. Pressure indices measured in LANE_C_NOTES.md §L2 pacing.",
    "par_rationale": "180s (3:00), retuned in round 2 for the CREST 1.6 surf ruling. Measured: a perfect crest ride is 2:26, throttle-mashing is 2:47, par-pace throttle (1.15x) is 3:19, timid is 4:22. So par 3:00 sits BELOW throttle-only competent play and ABOVE a surf run: you cannot reach it by holding the stick forward, and you can reach it comfortably by learning to surf. That is deliberate - L2's signature mechanic is riding peristalsis crests, and the time medal is the thing that teaches it. Par is a medal threshold, not a pass condition: missing it costs a medal, not the level.",
    "teach_then_test": "flow (b1) / bolus (b1 solo -> b3 in the pinch) / candida (b2 solo, clear sightline -> b3 in the squeeze) / eosinophil (b2 open stretch -> b6 in the hiatus) / ring_gate (b5 open 2.4s -> b6 open 1.2s) / reflux (b4 non-lethal burp -> b7 lethal finale)."
  },
  "segments": [
    {
      "biome": "esophagus",
      "name": "Upper Esophageal Sphincter",
      "length": 400,
      "radius": { "base": 11, "wobble": 0.12 },
      "curviness": 0.15,
      "flow": 12,
      "note": "BEAT 1 - breather. You drop through the cricopharyngeus behind the swallow. Slowest flow in the level, straightest tube, one lazy bolus chunk: this stretch exists to teach that the current carries you and you steer within it."
    },
    {
      "biome": "esophagus",
      "name": "Cervical Esophagus",
      "length": 700,
      "radius": { "base": 12, "wobble": 0.18 },
      "curviness": 0.35,
      "flow": 14,
      "note": "BEAT 2 - first pressure. Widest, most forgiving tube in the level, which is exactly why every enemy type gets introduced here, alone and survivable, before the pinch."
    },
    {
      "biome": "esophagus",
      "name": "Aortic Constriction",
      "length": 400,
      "radius": { "base": 9, "wobble": 0.15 },
      "curviness": 0.5,
      "flow": 16,
      "note": "BEAT 3 - SPIKE. The aortic arch presses on the esophagus (real: the broncho-aortic constriction narrows the lumen to ~75%, which is exactly 12 -> 9). The tube also pulses with the heartbeat, from ONE SIDE - the aorta crosses on the left. Everything you were taught in beat 2, now in 75% of the room with a wall that breathes at you."
    },
    {
      "biome": "esophagus",
      "name": "Thoracic Esophagus",
      "length": 500,
      "radius": { "base": 12, "wobble": 0.2 },
      "curviness": 0.4,
      "flow": 14,
      "note": "BEAT 4 - breather + the tutorial for the finale. Opens back out, mucin and orbs to recover, and one non-lethal 'burp' surge that teaches the reflux chase 1300 units before the real one tries to kill you."
    },
    {
      "biome": "esophagus",
      "name": "Bronchial Narrowing",
      "length": 600,
      "radius": { "base": 10, "wobble": 0.25 },
      "curviness": 0.6,
      "flow": 16,
      "note": "BEAT 5 - the ramp. Highest curviness in the level: the tube writhes, so wall-mounted candida stay hidden until you round each bend. Sightline pressure rather than raw density."
    },
    {
      "biome": "esophagus",
      "name": "Diaphragmatic Hiatus",
      "length": 400,
      "radius": { "base": 6.5, "wobble": 0.15 },
      "curviness": 0.3,
      "flow": 18,
      "wave": { "amp": 0.6 },
      "note": "BEAT 6 - SPIKE, and the level's precision test. The tightest hole in the game: the esophagus threads the diaphragm. TIGHT AND CALM is the whole design - schema v2's wave override (amp 0.6 vs the esophagus's 1.4) exists for this segment. Anatomically the hiatus is a fixed muscular ring held by the diaphragm crura and does NOT have big peristaltic waves; mechanically, a big wave in the smallest gap turned a precision setpiece into a lottery you cannot stop to time. Calm waves let the tube go back to base 6.5 (it was widened to 6.8 in round 1 purely to survive the biome-wide amp) and still leave 3.3 units of steady clearance. Steady-tight is a skill; pulsing-tight is a toll. Straightened out (curviness 0.3) for the same reason: the challenge is the ring gate's timing, and a writhing tube would make that unreadable."
    },
    {
      "biome": "esophagus",
      "name": "Abdominal Esophagus",
      "length": 600,
      "radius": { "base": 9, "wobble": 0.2 },
      "curviness": 0.45,
      "flow": 20,
      "note": "BEAT 7 - FINALE. Fastest flow in the level. The stomach refluxes and an acid wall chases you to the cardiac sphincter. Bolus chunks drift slower than the current, so here they read as traffic you overtake at speed."
    }
  ],
  "arenas": [],
  "events": [
    { "s": 20, "type": "checkpoint", "name": "Upper Esophageal Sphincter" },
    { "s": 120, "type": "pickup", "kind": "nutrient_orb", "count": 3, "spread": 40, "note": "Orb lines teach the racing line before they score anything." },
    { "s": 180, "type": "spawn", "enemy": "lacto_drifter", "count": 4, "spread": 90, "rho": 0.7, "note": "MICROBE PASS (round 2) - the first FRIEND, taught first, in the calmest stretch. A Lactobacillus reef drifting off the racing line (cyan = friendly, ART_BIBLE). Brush it and it sheds mucus coat; SHOOT it and you have harmed the biome (flora:harmed) - the seed of the BIOME STANDING loop. Teaches 'don't shoot cyan' before any level charges for it." },
    { "s": 210, "type": "spawn", "enemy": "akkermansia", "count": 2, "spread": 30, "rho": 0.5, "note": "MICROBE PASS (round 2) - the CHOICE node, taught right after flora so the contrast lands: same cyan family, opposite trade. Brushing Akkermansia nibbles a little coat but fills BIOME STANDING fast (gain 12) - spend coat to summon a phage ally sooner. Near the racing line so the choice is unavoidable." },
    { "s": 240, "type": "spawn", "enemy": "bolus_chunk", "count": 1, "note": "TEACH bolus: one chunk, slow, unmissable, harmless if you simply steer." },
    { "s": 300, "type": "spawn", "enemy": "yeast_pod", "count": 1, "rho": 0.6, "note": "MICROBE PASS (round 2) - the spore_pod foe's teach beat: one drifting Candida cluster, off-line, harmless if you steer. A distinct blobby silhouette (Trellis-skinned), not the food-debris floater." },
    { "s": 340, "type": "pickup", "kind": "nutrient_orb", "count": 3, "spread": 40 },

    { "s": 420, "type": "checkpoint", "name": "Cervical Narrowing" },
    { "s": 520, "type": "spawn", "enemy": "bolus_chunk", "count": 4, "spread": 120, "note": "TEST bolus (mild): a field, but in the widest tube in the level." },
    { "s": 620, "type": "spawn", "enemy": "eosinophil_swarm", "count": 3, "spread": 40, "note": "TEACH eosinophil: three of them, open water, nothing else happening." },
    { "s": 700, "type": "pickup", "kind": "biopsy_sample", "count": 1, "theta": 3.1416, "rho": 0.92, "note": "SAMPLE 1/3. Cost = proximity: pinned to the far wall in the tail of the bolus field, so collecting it means wall-hugging (graze damage) while chunks tumble past. Visible from the racing line the whole way in." },
    { "s": 760, "type": "spawn", "enemy": "candida_bloom", "count": 1, "theta": 0, "note": "TEACH candida: one bloom, on the straightest wall, with a clear 200-unit sightline." },
    { "s": 860, "type": "checkpoint", "name": "Thoracic Inlet" },
    { "s": 900, "type": "spawn", "enemy": "bolus_chunk", "count": 5, "spread": 160 },
    { "s": 980, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [1.05, 4.19], "note": "TEST candida: two blooms covering opposite arcs, so there is no free side - and debris in the lane." },
    { "s": 1060, "type": "pickup", "kind": "mucin_glob", "count": 1, "note": "Coat top-up immediately before the spike. Pickup economy law: the game pays you right before it charges you." },

    { "s": 1080, "type": "checkpoint", "name": "Aortic Narrowing", "note": "Checkpoint sits BEFORE the hazard zone opens at 1100 - never respawn a player inside a squeeze." },
    { "s": 1100, "type": "hazard", "kind": "aortic_squeeze", "span": 400, "period": 2.4, "amplitude": 0.45, "theta": 0, "warn": 2.5, "note": "SPIKE hazard, and a POSITIONING verb rather than a timing one - that distinction is deliberate. You cannot stop in a flow-locked tube, so a zone that sealed on a beat would just tax you 10 times with no counterplay. Instead the aorta presses from ONE side (theta=0, anatomically the left): the wall bulges 45% inward there on a 2.4s beat and the safe lane is the opposite arc. The player's answer is 'be on the far side when it beats', which is playable at 16 u/s. Real heart rate is a 0.83s beat - dramatised to 2.4s to be readable. Non-lethal: contact is graze damage, so the zone's first pulses teach it inside itself." },
    { "s": 1180, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [0.5, 3.8], "note": "The squeeze pushes you toward the walls; the walls are where the blooms are. That interaction is the whole point of the beat." },
    { "s": 1260, "type": "spawn", "enemy": "bolus_chunk", "count": 3, "spread": 80, "note": "TEST bolus: same chunks as beat 1, now in a 7-unit tube that is periodically 45% narrower." },
    { "s": 1300, "type": "pickup", "kind": "biopsy_sample", "count": 1, "theta": 1.5708, "rho": 0.9, "note": "SAMPLE 2/3. Cost = timing: it sits against the wall inside the squeeze zone, so you must take the pinch on the wall side and eat a pulse, or thread it between beats." },
    { "s": 1380, "type": "spawn", "enemy": "eosinophil_swarm", "count": 4, "spread": 60, "note": "TEST eosinophil: they were free room in beat 2; here there is no room." },

    { "s": 1520, "type": "checkpoint", "name": "Thoracic Esophagus" },
    { "s": 1560, "type": "pickup", "kind": "mucin_glob", "count": 2, "spread": 30 },
    { "s": 1580, "type": "spawn", "enemy": "faecali_beacon", "count": 1, "rho": 0.6, "note": "MICROBE PASS (round 2) - the REWARD commensal, previewed in the recovery breather where a health beacon belongs. Faecalibacterium: heals AND gives the biggest BIOME STANDING (25) with no coat cost. The bright cyan gem completes the commensal family (flora rod / akkermansia blob / beacon gem). Belongs to L5; here to be seen." },
    { "s": 1600, "type": "pickup", "kind": "nutrient_orb", "count": 4, "spread": 60 },
    { "s": 1680, "type": "checkpoint", "name": "Thoracic Run" },
    { "s": 1700, "type": "hazard", "kind": "reflux_surge", "speed": 16, "from": -60, "span": 260, "warn": 3.0, "lethal": false, "neutralizable": true, "note": "TEACH reflux - the most important event in the level. A burp: 16 u/s against a 14 u/s current, so even a timid player at throttle 1.15 (16.1 u/s) escapes it. Touching it hurts and does not kill. When the real surge arrives at s=3000 the player already knows the verb." },
    { "s": 1900, "type": "spawn", "enemy": "bolus_chunk", "count": 3, "spread": 100 },
    { "s": 1940, "type": "spawn", "enemy": "giardia_latch", "count": 1, "note": "MICROBE PASS (round 2) preview - Giardia belongs to L4 (villi maze) but its grab works in a flow tube, so one rides here to teach the new verb: it clamps to your hull and drains coat until you BOOST it off. Boost is now a dodge. Placed on the open thoracic run where you have room and a charged boost; C relocates it to L4 when that level lands." },

    { "s": 2000, "type": "checkpoint", "name": "Bronchial Narrowing" },
    { "s": 2060, "type": "spawn", "enemy": "candida_bloom", "count": 3, "theta": [0.2, 2.4, 4.6], "note": "Three arcs covered in the level's twistiest tube: each is a surprise on a blind bend. This is the beat that makes curviness a mechanic." },
    { "s": 2100, "type": "hazard", "kind": "ring_gate", "period": 3.6, "open": 2.4, "warn": 2.5, "note": "TEACH ring gate: open 2.4s of every 3.6s (67% open). At 16 u/s you clear it without thinking - which is the point. You will meet its evil twin at s=2800." },
    { "s": 2200, "type": "spawn", "enemy": "eosinophil_swarm", "count": 6, "spread": 80, "note": "Biggest swarm in the level." },
    { "s": 2240, "type": "spawn", "enemy": "hpylori_driller", "count": 1, "note": "MICROBE PASS (round 2) preview - H. pylori, the tanky corkscrewer. Chases in a helix (hard to pin) and does NOT dissolve on contact - it grinds you and keeps coming, so you must commit real fire. Belongs to L3 (stomach); one previewed here on the ramp to teach the 'out-damage it' read." },
    { "s": 2280, "type": "checkpoint", "name": "Subcarinal" },
    { "s": 2300, "type": "pickup", "kind": "antacid_ammo", "count": 2, "spread": 20, "note": "Arms the player 700 units before the reflux finale. Antacid neutralises an acid zone (GDD) - fired BACKWARD it stalls the surge. The level hands you the tool, never explains it, and rewards you for noticing." },
    { "s": 2380, "type": "spawn", "enemy": "bolus_chunk", "count": 6, "spread": 140 },
    { "s": 2420, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [1.8, 5.1], "note": "Blooms + debris simultaneously: the level's densest sustained stretch." },
    { "s": 2540, "type": "pickup", "kind": "mucin_glob", "count": 1 },

    { "s": 2580, "type": "checkpoint", "name": "Diaphragmatic Hiatus" },
    { "s": 2700, "type": "spawn", "enemy": "bolus_chunk", "count": 4, "spread": 60, "note": "Debris jammed into the tightest tube in the level - spread 60 makes it a wall of traffic, not a sprinkle." },
    { "s": 2800, "type": "hazard", "kind": "ring_gate", "period": 3.0, "open": 1.2, "warn": 2.5, "note": "TEST ring gate: open 1.2s of every 3.0s (40% open), in a 6.5-unit tube. Same verb as s=2100, half the window. This is the level's skill check." },
    { "s": 2880, "type": "spawn", "enemy": "eosinophil_swarm", "count": 5, "spread": 60, "note": "They chase you THROUGH the gate: the gate closing behind you culls them - a free kill the observant player earns." },
    { "s": 2960, "type": "pickup", "kind": "mucin_glob", "count": 2, "spread": 20, "note": "Last top-up in the level. Take it or regret it for 600 units." },

    { "s": 2980, "type": "checkpoint", "name": "Cardia Approach", "note": "The finale's checkpoint. Sits 20 units before the surge trigger: a death in the chase costs you the chase, not the hiatus." },
    { "s": 3000, "type": "hazard", "kind": "reflux_surge", "speed": 24, "from": -40, "span": 600, "warn": 2.0, "lethal": true, "neutralizable": true, "note": "THE FINALE. Acid wall, 24 u/s, spawning 40 units behind you and chasing for 600 units. Retuned in round 2 for the CREST 1.6 surf ruling: at the old 21 u/s, throttle-max (28) escaped by 7 u/s and surfing (32) was merely a bigger cushion, so the level's signature mechanic was decoration in its own finale. At 24 against flow 20 the required throttle is 1.20x - so the finale reads: dawdling at 12 u/s dies, pushing hard (28) escapes by a white-knuckle ~4.5s, and SURFING (32) escapes clean by ~6s. Surf is now the stylish answer and the level's last exam is its signature verb. Hard mode (surgeSpeed x1.1 = 26.4) needs throttle 1.32+ or a crest; easy (x0.92 = 22.1) forgives at 1.11+. Antacid fired backward still buys ~10s - now the safety net for players who cannot surf rather than the clever trick, which is a better job for it." },
    { "s": 3080, "type": "pickup", "kind": "antacid_ammo", "count": 1, "note": "On the racing line, mid-chase: the one pickup in the level you get for free at speed." },
    { "s": 3120, "type": "spawn", "enemy": "bolus_chunk", "count": 5, "spread": 200, "note": "Traffic, not enemies. They drift 3.5 u/s slower than the current, so at chase pace you close on them fast." },
    { "s": 3200, "type": "pickup", "kind": "biopsy_sample", "count": 1, "theta": 4.7124, "rho": 0.85, "note": "SAMPLE 3/3. Cost = the chase itself. Off the racing line by ~1.5s with an acid wall 5s behind you. The cruellest of the three and the only one that is a real decision at full speed." },
    { "s": 3320, "type": "spawn", "enemy": "eosinophil_swarm", "count": 4, "spread": 100 },
    { "s": 3440, "type": "spawn", "enemy": "candida_bloom", "count": 2, "theta": [2.0, 5.3], "note": "Last gauntlet, at maximum speed, with 160 units to react. Telegraph 0.7s = ~18 units of warning at 26 u/s: fair, barely." },
    { "s": 3580, "type": "gate", "id": "cardiac_sphincter", "to": "L3_stomach", "note": "The lower esophageal sphincter. You go through it; the acid does not." }
  ]
}
