const ATTIC_L3_PAGES = {
  "repair": {
    "active": "Repair",
    "count": 11,
    "title": "Attic Repair Guides - Ventilation, Hatch Seals, Rafters, Ducts and Moisture",
    "desc": "11 attic repair guides for blocked soffit vents, ridge vent problems, rafter damage, leaking hatch seals, bath fan ducts, moisture damage, and attic ladder issues.",
    "headline": "Repair what the ceiling is trying to tell you.",
    "deck": "Attic repair is where small hidden failures become expensive: blocked soffit vents, damaged rafters, leaking hatch seals, bath fan ducts dumped indoors, moisture stains, loose ladder hardware, and ventilation paths that stopped working years ago.",
    "rule": "Moisture first",
    "topLabel": "Top 5 Attic Repair Searches",
    "essayTitle": "The attic fails quietly before the ceiling shows it.",
    "essay": [
      "Attic repair starts with evidence: stains on roof sheathing, compressed insulation, stale air, rusted nails, disconnected ducts, and a hatch that leaks heat every winter.",
      "The repair sequence matters. Fix water, then ventilation, then air leakage, then damaged access or structure. Anything else hides the problem under nicer material.",
      "A good attic repair makes the room above the ceiling safer, drier, and easier to inspect next season."
    ],
    "top": [
      [
        "01",
        "how to fix attic ventilation",
        "74,000",
        "Intermediate",
        "4 hrs",
        "$50-$200",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "Attic ventilation repair means reading intake and exhaust together: soffits, baffles, ridge, gable, and fan conflicts.",
        "Read the ventilation guide",
        "/en/attic/repair/how-to-fix-attic-ventilation/"
      ],
      [
        "02",
        "how to repair a leaking attic hatch",
        "49,500",
        "Beginner",
        "2 hrs",
        "$25-$90",
        "https://images.unsplash.com/photo-1581578731548-c64695cc6952?w=1500&q=84",
        "A leaking hatch is a thermal hole. Weatherstrip the frame, insulate the cover, and stop warm air from escaping into the attic.",
        "Read the hatch guide",
        "/en/attic/repair/how-to-repair-a-leaking-attic-hatch/"
      ],
      [
        "03",
        "how to repair damaged rafter",
        "33,100",
        "Advanced",
        "1 day",
        "$80-$300",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "Rafter damage needs cause first: roof leak, condensation, split lumber, or pest damage. Structural repairs may need a pro.",
        "Read the rafter guide",
        "/en/attic/repair/how-to-repair-damaged-rafter/"
      ],
      [
        "04",
        "how to fix bath fan duct in attic",
        "27,100",
        "Intermediate",
        "2-3 hrs",
        "$30-$160",
        "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1500&q=84",
        "A bath fan duct must terminate outdoors, slope correctly, and avoid sags where condensation collects.",
        "Read the bath fan duct guide",
        "/en/attic/repair/how-to-fix-bath-fan-duct-in-attic/"
      ],
      [
        "05",
        "how to fix a wobbly pull-down attic ladder",
        "22,200",
        "Beginner",
        "1 hr",
        "$10-$60",
        "https://images.unsplash.com/photo-1565538810643-b5bdb714032a?w=1500&q=84",
        "A ladder repair is hinge, frame, spring, fastener, and ceiling-opening work. Wobble is not just annoyance.",
        "Read the ladder repair guide",
        "/en/attic/repair/how-to-fix-a-wobbly-pull-down-attic-ladder/"
      ]
    ],
    "tools": [
      "Respirator",
      "Trouble light",
      "Knee boards",
      "Moisture meter",
      "Staple gun",
      "Foam gun",
      "Inspection mirror",
      "Nut driver"
    ],
    "matrix": [
      "Ventilation",
      "Hatch seal",
      "Damaged rafter",
      "Bath fan duct",
      "Pull-down ladder",
      "Blocked soffit",
      "Moisture stain",
      "Ridge vent",
      "Gable vent",
      "Air leak"
    ],
    "mistakes": [
      "Insulating before fixing ventilation",
      "Ignoring bath fans that dump into the attic",
      "Walking between joists",
      "Sealing moisture inside",
      "Calling rafter damage cosmetic",
      "Skipping respirator and lighting"
    ]
  },
  "install": {
    "active": "Install",
    "count": 14,
    "title": "Attic Install Guides - Insulation, Pull-Down Stairs, Fans, Baffles and Vents",
    "desc": "14 attic install guides for attic insulation, pull-down stairs, attic fans, soffit baffles, whole-house fans, gable vents, ridge vents, hatch covers, and air sealing.",
    "headline": "Install the upgrade that pays back every month.",
    "deck": "Attic install is the highest-return lane in the house: insulation, air sealing, pull-down stairs, attic fans, baffles, hatch covers, gable vents, whole-house fans, and the pieces that stop the attic from stealing comfort.",
    "rule": "Air seal first",
    "topLabel": "Top 5 Attic Install Searches",
    "essayTitle": "Insulation works only after the air path is controlled.",
    "essay": [
      "Attic installation is not just adding fluffy material. The order is air-seal, protect ventilation, then insulate to the right depth for the climate.",
      "The best attic installs disappear after the hatch closes. Utility bills drop, rooms hold temperature longer, and the roof deck stays dry because the ventilation path still works.",
      "Install work in the attic is uncomfortable, dusty, and worth doing carefully because the payback is real."
    ],
    "top": [
      [
        "01",
        "how to install attic insulation",
        "165,000",
        "Intermediate",
        "half day",
        "$200-$600",
        "https://images.unsplash.com/photo-1581578731548-c64695cc6952?w=1500&q=84",
        "Air-seal first, add baffles, then insulate. Skipping the first two steps is the classic attic mistake.",
        "Read the insulation guide",
        "/en/attic/install/how-to-install-attic-insulation/"
      ],
      [
        "02",
        "how to install a pull-down attic ladder",
        "90,500",
        "Intermediate",
        "3 hrs",
        "$150-$350",
        "https://images.unsplash.com/photo-1565538810643-b5bdb714032a?w=1500&q=84",
        "A pull-down stair needs framing, two-person handling, level casing, spring tension, and a sealed cover after installation.",
        "Read the ladder install guide",
        "/en/attic/install/how-to-install-a-pull-down-attic-ladder/"
      ],
      [
        "03",
        "how to install an attic fan",
        "74,000",
        "Intermediate",
        "4 hrs",
        "$200-$500",
        "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1500&q=84",
        "Attic fans work only with intake air. Size the fan, check soffits, and avoid fighting passive ventilation.",
        "Read the attic fan guide",
        "/en/attic/install/how-to-install-an-attic-fan/"
      ],
      [
        "04",
        "how to install rafter baffles",
        "60,500",
        "Beginner",
        "3 hrs",
        "$30-$120",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "Baffles keep the soffit-to-ridge air channel open before insulation goes in. They are small plastic pieces with big consequences.",
        "Read the baffle guide",
        "/en/attic/install/how-to-install-rafter-baffles/"
      ],
      [
        "05",
        "how to install an attic hatch cover",
        "40,500",
        "Beginner",
        "45 min",
        "$40-$120",
        "https://images.unsplash.com/photo-1556910103-1c02745aae4d?w=1500&q=84",
        "A hatch cover stops stack-effect heat loss at the largest hole in many ceilings. Seal the perimeter as well as the lid.",
        "Read the hatch cover guide",
        "/en/attic/install/how-to-install-an-attic-hatch-cover/"
      ]
    ],
    "tools": [
      "Respirator",
      "Blower rental",
      "Utility knife",
      "Staple gun",
      "Foam gun",
      "Depth ruler",
      "Work light",
      "Knee boards"
    ],
    "matrix": [
      "Insulation",
      "Pull-down ladder",
      "Attic fan",
      "Rafter baffles",
      "Hatch cover",
      "Air sealing",
      "Gable vent",
      "Whole-house fan",
      "Soffit vent",
      "Ridge vent"
    ],
    "mistakes": [
      "Adding insulation before air sealing",
      "Blocking soffits with batts",
      "Undersizing ventilation intake",
      "Installing ladders without help",
      "Covering non-IC lights",
      "Forgetting hatch weatherstripping"
    ]
  },
  "build": {
    "active": "Build",
    "count": 5,
    "title": "Attic Build Guides - Raised Platforms, Knee Walls, Walkways and Access Frames",
    "desc": "5 attic build guides for raised storage platforms, knee wall framing, attic walkways, hatch framing, and access doors that protect insulation and joists.",
    "headline": "Build above the joists without crushing the insulation.",
    "deck": "Attic build is small but serious: raised storage platforms, knee walls, safe walkways, access hatch frames, and the structural pieces that make storage possible without destroying R-value or stepping through drywall.",
    "rule": "Protect the R-value",
    "topLabel": "Top 5 Attic Build Searches",
    "essayTitle": "Attic builds are mostly about not breaking the attic.",
    "essay": [
      "A build in the attic has to respect the room below. The joists carry load, the drywall does not, and the insulation has to stay lofted if it is going to work.",
      "Raised platforms and walkways are not glamour projects. They are access, safety, storage, and thermal performance projects disguised as carpentry.",
      "Less guide count is not less care. Attic build work is one of the clearest places where the right five guides beat fifty shallow ones."
    ],
    "top": [
      [
        "01",
        "how to add attic flooring above joists",
        "74,000",
        "Intermediate",
        "1 day",
        "$250-$500",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "Attic flooring should sit above insulation on a raised platform, not directly compress batts or blown-in material.",
        "Read the attic flooring guide",
        "/en/attic/build/how-to-add-attic-flooring/"
      ],
      [
        "02",
        "how to build a raised attic storage deck",
        "49,500",
        "Intermediate",
        "1 weekend",
        "$300-$800",
        "https://images.unsplash.com/photo-1565538810643-b5bdb714032a?w=1500&q=84",
        "A raised storage deck needs sleepers, load limits, access clearance, and enough height for the insulation below.",
        "Read the storage deck guide",
        "/en/attic/build/how-to-build-a-raised-attic-storage-deck/"
      ],
      [
        "03",
        "how to frame an attic knee wall",
        "33,100",
        "Intermediate",
        "1 weekend",
        "$150-$600",
        "https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1500&q=84",
        "Knee walls define finished space and hidden storage. Framing, air sealing, insulation, and access doors all matter.",
        "Read the knee wall guide",
        "/en/attic/build/how-to-frame-an-attic-knee-wall/"
      ],
      [
        "04",
        "how to build an attic walkway",
        "22,200",
        "Beginner",
        "3 hrs",
        "$60-$180",
        "https://images.unsplash.com/photo-1581578731548-c64695cc6952?w=1500&q=84",
        "An attic walkway gives safe access without compressing insulation or asking anyone to balance on joists.",
        "Read the walkway guide",
        "/en/attic/build/how-to-build-an-attic-walkway/"
      ],
      [
        "05",
        "how to frame an attic access opening",
        "18,100",
        "Intermediate",
        "half day",
        "$50-$220",
        "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1500&q=84",
        "Access framing needs square layout, ceiling support, trim planning, and a lid that can be sealed after the carpentry is done.",
        "Read the access frame guide",
        "/en/attic/build/how-to-frame-an-attic-access-opening/"
      ]
    ],
    "tools": [
      "Circular saw",
      "Knee boards",
      "Framing square",
      "Impact driver",
      "Joist tape",
      "Level",
      "Clamps",
      "Construction screws"
    ],
    "matrix": [
      "Attic flooring",
      "Raised storage deck",
      "Knee wall",
      "Walkway",
      "Access opening",
      "Knee wall door",
      "Storage curb",
      "Joist blocking",
      "Service platform",
      "Subfloor patch"
    ],
    "mistakes": [
      "Laying plywood directly on insulation",
      "Overloading ceiling joists",
      "Forgetting access clearance",
      "Blocking ventilation paths",
      "Building without knee boards",
      "Skipping air seal after framing"
    ]
  },
  "clean": {
    "active": "Clean",
    "count": 6,
    "title": "Attic Cleaning Guides - Old Insulation, Dust, Pest Debris, Fans and Vent Paths",
    "desc": "6 attic cleaning guides for old insulation, blown-in debris, pest contamination, fan blades, vent paths, dust buildup, and safe attic cleanup before new work.",
    "headline": "Clean before you bury the evidence.",
    "deck": "Attic cleaning is the lane nobody wants and every good project needs: old blown-in debris, pest contamination, fan dust, blocked vent paths, questionable insulation, and the cleanup that happens before air sealing or new R-value.",
    "rule": "Identify first",
    "topLabel": "Top 5 Attic Clean Searches",
    "essayTitle": "Attic cleaning is inspection with a respirator on.",
    "essay": [
      "Cleaning an attic is not housekeeping. It is evidence gathering before you cover the floor with new insulation or close up a finished space.",
      "Old insulation, pest debris, dust, bath fan discharge, and blocked vents all tell you what failed. Remove the wrong thing casually and you can create a health problem.",
      "Clean attic work starts with identification, containment, lighting, and deciding what belongs to a certified pro."
    ],
    "top": [
      [
        "01",
        "how to remove old blown-in insulation",
        "60,500",
        "Intermediate",
        "half day",
        "$80-$300",
        "https://images.unsplash.com/photo-1556910103-1c02745aae4d?w=1500&q=84",
        "Old blown-in removal needs containment, bags, respirator, lighting, and a reason to remove instead of topping up.",
        "Read the old insulation guide",
        "/en/attic/clean/how-to-remove-old-blown-in-insulation/"
      ],
      [
        "02",
        "how to identify vermiculite insulation",
        "49,500",
        "Beginner",
        "15 min",
        "$0-$120",
        "https://images.unsplash.com/photo-1581578731548-c64695cc6952?w=1500&q=84",
        "Vermiculite looks like small gray pebbles and may contain asbestos. Identify it, then stop disturbing it.",
        "Read the vermiculite guide",
        "/en/attic/clean/how-to-identify-vermiculite-insulation/"
      ],
      [
        "03",
        "how to clean attic after rodents",
        "40,500",
        "Advanced",
        "1 day",
        "$80-$400",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "Rodent cleanup can involve droppings, urine, nesting, chewed ducts, and contaminated insulation. Safety comes first.",
        "Read the rodent cleanup guide",
        "/en/attic/clean/how-to-clean-attic-after-rodents/"
      ],
      [
        "04",
        "how to clean an attic fan",
        "27,100",
        "Beginner",
        "1 hr",
        "$0-$20",
        "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1500&q=84",
        "Fan blades, shutters, thermostat housings, and screens collect dust that reduces airflow.",
        "Read the attic fan cleaning guide",
        "/en/attic/clean/how-to-clean-an-attic-fan/"
      ],
      [
        "05",
        "how to clear blocked soffit vents",
        "22,200",
        "Beginner",
        "2 hrs",
        "$10-$60",
        "https://images.unsplash.com/photo-1565538810643-b5bdb714032a?w=1500&q=84",
        "Soffit cleanup restores intake air before insulation traps the mistake in place.",
        "Read the soffit cleaning guide",
        "/en/attic/clean/how-to-clear-blocked-soffit-vents/"
      ]
    ],
    "tools": [
      "P100 respirator",
      "Contractor bags",
      "HEPA vacuum",
      "Trouble light",
      "Knee boards",
      "Disposable suit",
      "Sprayer",
      "Inspection mirror"
    ],
    "matrix": [
      "Old insulation",
      "Vermiculite check",
      "Rodent cleanup",
      "Attic fan",
      "Soffit vents",
      "Dust buildup",
      "Bath fan debris",
      "Mold check",
      "Nesting material",
      "Loose debris"
    ],
    "mistakes": [
      "Disturbing vermiculite casually",
      "Vacuuming contamination without HEPA",
      "Cleaning without lighting",
      "Adding insulation over pest debris",
      "Ignoring bath fan discharge",
      "Working without a respirator"
    ]
  },
  "organize": {
    "active": "Organize",
    "count": 9,
    "title": "Attic Organization Guides - Storage Bins, Raised Shelves, Seasonal Rotation and Inventory",
    "desc": "9 attic organization guides for raised storage, labeled bins, seasonal rotation, weight distribution, attic inventory, lighting layout, and storage without compressing insulation.",
    "headline": "Organize storage without punishing the house.",
    "deck": "Attic organization is storage with rules: raised bins, seasonal labels, weight distribution, joist maps, walkway access, lighting, inventory, and keeping storage useful without compressing insulation or overloading structure.",
    "rule": "Store above, not on",
    "topLabel": "Top 5 Attic Organization Searches",
    "essayTitle": "The attic is not a dumping ground if the insulation matters.",
    "essay": [
      "Attic organization works only when it respects the building. Storage cannot crush insulation, block airflow, or make someone step between joists to reach a holiday bin.",
      "The best attic system is boring: raised platform, labeled bins, annual purge, clear path, weight map, and light where the hatch opens.",
      "Organization in the attic is smaller than a closet system and more consequential because bad storage can damage the house."
    ],
    "top": [
      [
        "01",
        "how to organize attic storage bins",
        "74,000",
        "Beginner",
        "2 hrs",
        "$40-$180",
        "https://images.unsplash.com/photo-1565538810643-b5bdb714032a?w=1500&q=84",
        "Bins need labels, zones, and a platform that keeps them above insulation instead of crushing it.",
        "Read the bin system guide",
        "/en/attic/organize/how-to-organize-attic-storage-bins/"
      ],
      [
        "02",
        "how to store seasonal decorations in attic",
        "60,500",
        "Beginner",
        "1 hr",
        "$30-$160",
        "https://images.unsplash.com/photo-1556910103-1c02745aae4d?w=1500&q=84",
        "Seasonal storage needs heat-safe materials, sealed bins, and a rotation plan so nothing disappears for three years.",
        "Read the seasonal storage guide",
        "/en/attic/organize/how-to-store-seasonal-decorations-in-attic/"
      ],
      [
        "03",
        "how to map attic joist storage weight",
        "33,100",
        "Intermediate",
        "1 hr",
        "$0-$20",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "A joist weight map keeps heavy bins near bearing points and prevents random load on ceiling structure.",
        "Read the joist map guide",
        "/en/attic/organize/how-to-map-attic-joist-storage-weight/"
      ],
      [
        "04",
        "how to light attic storage safely",
        "27,100",
        "Beginner",
        "1 hr",
        "$30-$120",
        "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1500&q=84",
        "Storage lighting needs safe fixtures, switch access, cord control, and no bulbs buried near insulation.",
        "Read the attic lighting guide",
        "/en/attic/organize/how-to-light-attic-storage-safely/"
      ],
      [
        "05",
        "how to create an attic inventory",
        "22,200",
        "Beginner",
        "45 min",
        "$0-$20",
        "https://images.unsplash.com/photo-1581578731548-c64695cc6952?w=1500&q=84",
        "Inventory is what stops the attic from becoming a memory hole. Label zones, photograph bins, and keep a simple list.",
        "Read the inventory guide",
        "/en/attic/organize/how-to-create-an-attic-inventory/"
      ]
    ],
    "tools": [
      "Clear bins",
      "Weather labels",
      "Platform tape",
      "Headlamp",
      "Inventory sheet",
      "Shelf brackets",
      "Weight tags",
      "Path markers"
    ],
    "matrix": [
      "Storage bins",
      "Seasonal decor",
      "Joist weight map",
      "Storage lighting",
      "Inventory",
      "Raised shelves",
      "Walkway zones",
      "Purge day",
      "Heat-safe storage",
      "Hatch zone"
    ],
    "mistakes": [
      "Stacking bins on insulation",
      "Storing candles and photos in summer heat",
      "Putting heavy boxes between joists",
      "Leaving no clear path",
      "Using cardboard in humid attics",
      "Skipping labels because it is temporary"
    ]
  },
  "decorate": {
    "active": "Decorate",
    "count": 5,
    "title": "Attic Decorating Guides - Bonus Rooms, Knee Walls, Dormer Trim, Flooring and Sloped Ceilings",
    "desc": "5 attic decorating guides for finished bonus rooms, knee wall drywall, dormer trim, sloped ceiling paint, flooring, skylight styling, and conditioned attic comfort.",
    "headline": "Decorate the attic only after it can breathe.",
    "deck": "Attic decorating is the smallest lane because most attics should not become rooms. For finished bonus spaces, it covers knee walls, subfloor choices, sloped ceilings, dormer trim, skylight styling, flooring, light, and comfort after insulation and permits are handled.",
    "rule": "Performance before paint",
    "topLabel": "Top 5 Attic Decorating Searches",
    "essayTitle": "A finished attic is a building-science project before it is a pretty room.",
    "essay": [
      "Decorating an attic bonus room comes last. The space has to be insulated, ventilated, conditioned, permitted when required, and safe to use before paint color matters.",
      "The aesthetic challenge is real: low ceilings, knee walls, dormers, heat, light, and weird corners. The solution is restraint, storage, and materials that tolerate temperature swings.",
      "The best attic decorating makes the room feel intentional without pretending it is a normal second-floor bedroom."
    ],
    "top": [
      [
        "01",
        "how to finish attic knee walls",
        "49,500",
        "Intermediate",
        "1 weekend",
        "$250-$900",
        "https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1500&q=84",
        "Knee walls need insulation, air sealing, access panels, drywall, and trim that makes the slope feel intentional.",
        "Read the knee wall finish guide",
        "/en/attic/decorate/how-to-finish-attic-knee-walls/"
      ],
      [
        "02",
        "how to choose flooring for attic room",
        "40,500",
        "Intermediate",
        "2 hrs",
        "$300-$2,000",
        "https://images.unsplash.com/photo-1565538810643-b5bdb714032a?w=1500&q=84",
        "Flooring needs subfloor, load, expansion, temperature swing, and enough softness for a room with odd acoustics.",
        "Read the attic flooring guide",
        "/en/attic/decorate/how-to-choose-flooring-for-attic-room/"
      ],
      [
        "03",
        "how to paint sloped attic ceiling",
        "33,100",
        "Beginner",
        "1 day",
        "$60-$180",
        "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1500&q=84",
        "Sloped ceilings need color that handles shadow, angles, and low headroom without making the room feel compressed.",
        "Read the sloped ceiling guide",
        "/en/attic/decorate/how-to-paint-sloped-attic-ceiling/"
      ],
      [
        "04",
        "how to trim an attic dormer",
        "22,200",
        "Intermediate",
        "1 day",
        "$80-$300",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "Dormer trim is small carpentry with huge visibility. Square reveals make the odd roofline look deliberate.",
        "Read the dormer trim guide",
        "/en/attic/decorate/how-to-trim-an-attic-dormer/"
      ],
      [
        "05",
        "how to style a finished attic bonus room",
        "18,100",
        "Beginner",
        "2 hrs",
        "$0-$300",
        "https://images.unsplash.com/photo-1556910103-1c02745aae4d?w=1500&q=84",
        "A bonus room needs low furniture, clear paths, built-in storage, controlled light, and no clutter against knee walls.",
        "Read the bonus room guide",
        "/en/attic/decorate/how-to-style-a-finished-attic-bonus-room/"
      ]
    ],
    "tools": [
      "Paint pole",
      "Angled brush",
      "Trim gauge",
      "Moisture meter",
      "Low-profile bins",
      "Light meter",
      "Floor samples",
      "Access panel kit"
    ],
    "matrix": [
      "Knee walls",
      "Flooring",
      "Sloped ceiling",
      "Dormer trim",
      "Bonus room",
      "Skylight style",
      "Low furniture",
      "Built-in storage",
      "Access doors",
      "Light control"
    ],
    "mistakes": [
      "Decorating before solving heat",
      "Ignoring permits for habitable space",
      "Closing access panels permanently",
      "Using bulky furniture under slopes",
      "Painting everything dark",
      "Forgetting ventilation behind knee walls"
    ]
  }
};
const ATTIC_L3_ORDER = ["repair","install","build","clean","organize","decorate"];
const ATTIC_L3_COUNTS = {"repair":11,"install":14,"build":5,"clean":6,"organize":9,"decorate":5};
const atlBg = (url) => ({ backgroundImage: 'url("' + url + '")' });

const AtticL3Hero = ({ page }) => (
  <section className="atl-hero">
    <div className="img" style={atlBg(page.top[0][6].replace('w=1500', 'w=2400'))} />
    <div className="atl-mast">
      <span className="crumb"><a href="/">Home</a> / <a href="/en/attic/">Attic</a> / {page.active}</span>
      <span className="ctr">The Attic {page.active} Edition</span>
      <span className="right">No. 12 / Spring 2026</span>
    </div>
    <div className="atl-cover">
      <div>
        <div className="eyebrow">{page.active} / Attic / Field Guide</div>
        <h1>{page.headline}</h1>
      </div>
      <div>
        <p className="deck">{page.deck}</p>
        <div className="meta">
          <div><span className="k">Section</span><span className="v">Attic / {page.active}</span></div>
          <div><span className="k">Guides</span><span className="v">{page.count} total</span></div>
          <div><span className="k">First rule</span><span className="v">{page.rule}</span></div>
          <div><span className="k">Updated</span><span className="v">May 2026</span></div>
        </div>
      </div>
    </div>
  </section>
);

const AtticL3Top5 = ({ page }) => (
  <section className="atl-top5">
    <div className="atl-wrap">
      <div className="section-folio"><span>The Charts / {page.topLabel}</span><span className="pg">PG. 02</span></div>
      <div className="atl-head">
        <div>
          <h2>The five projects that decide the room above everything.</h2>
          <p className="deck">Attic work sorts itself by moisture, airflow, R-value, access, safe footing, and the sequence nobody should skip.</p>
        </div>
        <div className="legend">
          <span><i style={{ background: 'var(--atlcopper)' }} /> Difficulty</span>
          <span><i style={{ background: 'var(--atlblue)' }} /> Time</span>
          <span><i style={{ background: 'var(--atlmoss)' }} /> Materials</span>
        </div>
      </div>
      <div className="atl-top-list">
        {page.top.map((t) => (
          <article className="atl-top-row" key={t[0]}>
            <div className="rank">No. {t[0]}</div>
            <a className="atl-top-photo" href={t[9]} style={atlBg(t[6])} aria-label={t[1]}></a>
            <div className="query">
              <h3>{t[1]}</h3>
              <p>{t[7]}</p>
              <a href={t[9]} className="read">{t[8]}</a>
            </div>
            <div className="stats">
              <div className="stat"><span className="k">Monthly searches</span><span className="v">{t[2]}</span></div>
              <div className="stat"><span className="k">Difficulty</span><span className="v">{t[3]}</span></div>
              <div className="stat"><span className="k">Time</span><span className="v">{t[4]}</span></div>
              <div className="stat"><span className="k">Materials</span><span className="v">{t[5]}</span></div>
            </div>
          </article>
        ))}
      </div>
    </div>
  </section>
);

const AtticL3PhotoSpread = ({ page }) => (
  <section className="atl-photo-spread">
    <div className="atl-wrap">
      <div className="section-folio"><span>Photo Spread / Attic Work Notes</span><span className="pg">PG. 07</span></div>
      <div className="atl-photo-grid">
        {page.top.slice(0, 4).map((item, i) => (
          <article className={'atl-photo-card c' + (i + 1)} key={item[0]}>
            <a className="photo" href={item[9]} style={atlBg(item[6].replace('w=1500', 'w=1900'))} aria-label={item[1]}></a>
            <div className="copy">
              <span>{item[1]}</span>
              <h3>{item[8]}</h3>
              <p>{item[7]}</p>
            </div>
          </article>
        ))}
      </div>
    </div>
  </section>
);

const AtticL3Essay = ({ page }) => (
  <section className="atl-essay">
    <div className="atl-essay-wrap">
      <div className="section-folio"><span>Editor's Note / Attic, {page.active}</span><span className="pg">PG. 08</span></div>
      <div className="atl-essay-grid">
        <aside className="atl-essay-side">
          <h2>{page.essayTitle}</h2>
          <div className="by">By the Editors / 5 min read</div>
          <div className="stat-list">
            <div className="row"><span>Guides</span><strong>{page.count}</strong></div>
            <div className="row"><span>Most searched</span><strong>{page.top[0][1].replace('how to ', '')}</strong></div>
            <div className="row"><span>First rule</span><strong>{page.rule}</strong></div>
            <div className="row"><span>Room</span><strong>Above</strong></div>
          </div>
        </aside>
        <div className="atl-essay-body">
          <p className="dropcap">{page.essay[0]}</p>
          <p>{page.essay[1]}</p>
          <div className="pull">The attic is the room where sequence matters more than polish.</div>
          <p>{page.essay[2]}</p>
        </div>
      </div>
    </div>
  </section>
);

const AtticL3Tools = ({ page }) => (
  <section className="atl-tools">
    <div className="atl-wrap">
      <div className="section-folio"><span>The Kit / What earns hatch space</span><span className="pg">PG. 10</span></div>
      <div className="atl-tools-head">
        <h2>Eight tools that make attic {page.active.toLowerCase()} work safer and cleaner.</h2>
        <p>Attic work fails when visibility, respiratory protection, safe footing, airflow, or sequencing gets treated as optional.</p>
      </div>
      <div className="atl-tools-grid">
        {page.tools.map((tool, i) => (
          <div className="atl-tool" key={tool}>
            <span>{String(i + 1).padStart(2, '0')}</span>
            <h3>{tool}</h3>
            <p>Useful because attic work depends on safe access, clean air, ventilation paths, insulation depth, and a surface you can trust underfoot.</p>
          </div>
        ))}
      </div>
    </div>
  </section>
);

const AtticL3Matrix = ({ page }) => (
  <section className="atl-matrix">
    <div className="atl-wrap">
      <div className="section-folio"><span>The Menu / Ranked by payoff</span><span className="pg">PG. 12</span></div>
      <div className="atl-matrix-head">
        <h2>Ten attic {page.active.toLowerCase()} projects, ranked.</h2>
        <p>The first jobs protect moisture control, ventilation, safe access, and R-value. The later jobs add storage, comfort, and finish.</p>
      </div>
      <div className="atl-matrix-table">
        <div className="atl-matrix-row head"><span>Project</span><span>Risk</span><span>Time</span><span>Payoff</span><span></span></div>
        {page.matrix.map((project, i) => (
          <div className="atl-matrix-row" key={project}>
            <span className="proj"><b>{String(i + 1).padStart(2, '0')}</b>{project}</span>
            <span>{i < 3 ? 'High' : i < 7 ? 'Medium' : 'Low'}</span>
            <span>{i < 3 ? 'Today' : i < 7 ? 'Weekend' : 'Later'}</span>
            <span className="dots"><i></i><i></i><i></i><i className={i > 4 ? '' : 'off'}></i><i className={i > 7 ? '' : 'off'}></i></span>
            <span><a href={'/en/attic/' + page.active.toLowerCase() + '/'}>Open</a></span>
          </div>
        ))}
      </div>
    </div>
  </section>
);

const AtticL3Mistakes = ({ page }) => (
  <section className="atl-mistakes">
    <div className="atl-wrap">
      <div className="section-folio"><span>Do Not Skip / Above-ceiling failure points</span><span className="pg">PG. 14</span></div>
      <div className="atl-mistakes-head">
        <h2>The mistakes that make attic work cost more later.</h2>
        <span>{page.mistakes.length}</span>
      </div>
      <div className="atl-mistakes-grid">
        {page.mistakes.map((m, i) => (
          <article className="atl-mistake" key={m}>
            <div className="n">{String(i + 1).padStart(2, '0')}</div>
            <h3>{m}</h3>
            <p>If moisture, airflow, safe footing, insulation depth, or contamination is ignored, the attic quietly sends the bill downstairs.</p>
          </article>
        ))}
      </div>
    </div>
  </section>
);

const AtticL3Related = ({ page, lane }) => (
  <section className="atl-related">
    <div className="atl-related-wrap">
      <div className="atl-related-col">
        <h3>Other things to do in the attic.</h3>
        <div className="atl-related-list">
          {ATTIC_L3_ORDER.map((key, i) => (
            <a href={'/en/attic/' + key + '/'} className={'row ' + (key === lane ? 'current' : '')} key={key}><span className="n">{String(i + 1).padStart(2, '0')}</span><span className="t">{key} attic</span><span className="ct">{ATTIC_L3_COUNTS[key]} guides</span></a>
          ))}
        </div>
      </div>
      <div className="atl-related-col">
        <h3>{page.active} in other rooms.</h3>
        <div className="atl-related-list">
          {['basement', 'garage', 'exterior', 'bedroom', 'living-room', 'bathroom', 'kitchen'].map((room, i) => (
            <a href={'/en/' + lane + '/' + room + '/'} className="row" key={room}><span className="n">{String(i + 1).padStart(2, '0')}</span><span className="t">{room.replace('-', ' ')}</span><span className="ct">room lane</span></a>
          ))}
        </div>
      </div>
    </div>
  </section>
);

const AtticL3Colophon = ({ page }) => (
  <section className="atl-colophon">
    <span>HowTo: Home Edition / Attic</span>
    <h2>{page.count} ways to {page.active.toLowerCase()} the room above every other room.</h2>
    <p>Built as a static editorial L3 page with a full crawler body, visible photography, and a real attic menu.</p>
    <a href="/en/attic/" className="go">Back to Attic</a>
  </section>
);

const AtticL3 = ({ lane }) => {
  const page = ATTIC_L3_PAGES[lane] || ATTIC_L3_PAGES.install;
  return (
    <>
      <AtticL3Hero page={page} />
      <AtticL3Top5 page={page} />
      <AtticL3PhotoSpread page={page} />
      <AtticL3Essay page={page} />
      <AtticL3Tools page={page} />
      <AtticL3Matrix page={page} />
      <AtticL3Mistakes page={page} />
      <AtticL3Related page={page} lane={lane} />
      <AtticL3Colophon page={page} />
    </>
  );
};

window.AtticL3 = AtticL3;
