/* Shared Basement L3 pages generated from the approved Basement Repair pattern. */
const BSM3_PAGES = {
  "install": {
    "active": "Install",
    "count": 22,
    "title": "Basement Install Guides - Sump Pumps, Dehumidifiers, Egress Windows and Subfloors",
    "desc": "22 basement install guides for sump pumps, dehumidifiers, egress windows, vapor barriers, subfloor panels, recessed lights, exhaust fans, and below-grade systems.",
    "headline": "Install what keeps the basement alive.",
    "deck": "Sump pumps, dehumidifiers, egress windows, vapor barriers, subfloor panels, exhaust fans, lighting, and the systems that have to happen before a basement can become a room.",
    "rule": "Dry systems first",
    "topLabel": "Top 5 Basement Install Searches",
    "photoLabel": "Photo Spread / Below-Grade Install Notes",
    "essayTitle": "The install order is the basement order.",
    "essay": [
      "Basement install is sequencing. The pump comes before the floor, the vapor control before the wall, the egress before the bedroom, the dehumidifier before the furniture. Installing out of order is how basements get finished twice.",
      "The best install work below grade is not flashy. It is the equipment and layers that keep the room dry, breathable, legal, and serviceable after the walls close.",
      "If repair answers what failed, install answers what prevents it from failing again. That is why this lane sits directly after repair in the basement rebuild."
    ],
    "top": [
      [
        "01",
        "how to install a sump pump",
        "201,000",
        "Intermediate",
        "4 hrs",
        "$180-$500",
        "https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1500&q=84",
        "The most important below-grade install. Primary pump, check valve, discharge path, backup plan, and a pit that can actually move water.",
        "Read the sump pump guide",
        "/en/basement/install/how-to-install-a-sump-pump/"
      ],
      [
        "02",
        "how to install a basement dehumidifier",
        "90,500",
        "Beginner",
        "30 min",
        "$200-$350",
        "https://images.unsplash.com/photo-1513694203232-719a280e022f?w=1500&q=84",
        "Humidity control is a basement system, not a plug-in afterthought. Drain routing and target humidity decide whether it works.",
        "Read the dehumidifier guide",
        "/en/basement/install/how-to-install-a-basement-dehumidifier/"
      ],
      [
        "03",
        "how to install an egress window",
        "74,000",
        "Advanced",
        "2 days",
        "$1,500-$4,000",
        "https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=1500&q=84",
        "Any sleeping room below grade needs a legal exit. The window unit is easy; cutting and draining the well is the real job.",
        "Read the egress guide",
        "/en/basement/install/how-to-install-an-egress-window/"
      ],
      [
        "04",
        "how to install basement subfloor panels",
        "60,500",
        "Intermediate",
        "1 weekend",
        "$700-$1,800",
        "https://images.unsplash.com/photo-1513694203232-719a280e022f?w=1500&q=84",
        "Subfloor panels give finished flooring a capillary break from concrete. The room gets warmer, drier, and less basement-like.",
        "Read the subfloor guide",
        "/en/basement/install/how-to-install-basement-subfloor-panels/"
      ],
      [
        "05",
        "how to install a basement vapor barrier",
        "49,500",
        "Intermediate",
        "1 day",
        "$80-$240",
        "https://images.unsplash.com/photo-1527515545081-5db817172677?w=1500&q=84",
        "A vapor barrier can help or trap moisture depending on the wall. The install has to match the basement, not the product label.",
        "Read the vapor barrier guide",
        "/en/basement/install/how-to-install-a-basement-vapor-barrier/"
      ]
    ],
    "tools": [
      "Rotary hammer",
      "Voltage tester",
      "PVC cutter",
      "Masonry bit set",
      "Laser level",
      "Drain hose",
      "Foam gun",
      "Respirator"
    ],
    "matrix": [
      "Sump pump",
      "Dehumidifier",
      "Egress window",
      "Subfloor panels",
      "Vapor barrier",
      "Exhaust fan",
      "Recessed lights",
      "Dedicated circuit",
      "Battery backup",
      "Drain tile"
    ],
    "mistakes": [
      "Installing flooring before proving the slab is dry",
      "Buying a dehumidifier without planning the drain",
      "Treating egress as a window swap instead of an excavation",
      "Running discharge water back toward the foundation",
      "Trapping moisture behind the wrong wall layer",
      "Burying equipment where it cannot be serviced"
    ]
  },
  "build": {
    "active": "Build",
    "count": 25,
    "title": "Basement Build Guides - Framing, Shelving, Workbenches, Bars and Finished Rooms",
    "desc": "25 basement build guides for framing walls, utility shelving, workbenches, closets, bars, stair rails, soffits, and finished rooms built from concrete up.",
    "headline": "Build from concrete up.",
    "deck": "Basement builds create rooms out of raw square footage: framed walls, utility shelves, workbenches, closets, bars, soffits, railings, and the storage that finally stops living on the slab.",
    "rule": "Structure before finish",
    "topLabel": "Top 5 Basement Build Searches",
    "photoLabel": "Photo Spread / Basement Build Notes",
    "essayTitle": "The basement build is a floor plan decision.",
    "essay": [
      "Build work in a basement is not furniture first. It is perimeter, moisture, mechanical access, walls, ceiling, storage, then finish. The room has to stay serviceable after it becomes nicer.",
      "A basement rewards custom building because the constraints are real: low ceilings, posts, ducts, panels, uneven slabs, and utility equipment nobody wants to see but everyone needs to reach.",
      "The best build makes an awkward lower level feel intentional without pretending the mechanical room disappeared."
    ],
    "top": [
      [
        "01",
        "how to frame a basement wall",
        "165,000",
        "Intermediate",
        "1 day",
        "$80-$220",
        "https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=1500&q=84",
        "The first structural step in finishing. Bottom plate, air gap, pressure-treated lumber, and a wall that respects concrete moisture.",
        "Read the framing guide",
        "/en/basement/build/how-to-frame-a-basement-wall/"
      ],
      [
        "02",
        "how to build basement utility shelves",
        "90,500",
        "Beginner",
        "1 day",
        "$120-$350",
        "https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=1500&q=84",
        "The fastest way to make the basement usable. Strong shelves, clear floor, labeled zones, and nothing cardboard touching concrete.",
        "Read the shelving guide",
        "/en/basement/build/how-to-build-basement-utility-shelves/"
      ],
      [
        "03",
        "how to build a basement workbench",
        "74,000",
        "Intermediate",
        "1 weekend",
        "$150-$500",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "A workbench on an uneven slab needs leveling feet, mass, and a top that can take abuse without wobbling across the room.",
        "Read the workbench guide",
        "/en/basement/build/how-to-build-a-basement-workbench/"
      ],
      [
        "04",
        "how to build a basement bar",
        "60,500",
        "Intermediate",
        "2 weekends",
        "$600-$2,400",
        "https://images.unsplash.com/photo-1513694203232-719a280e022f?w=1500&q=84",
        "The basement bar is cabinetry plus lighting plus moisture-aware finishes. It should feel built in, not dropped against drywall.",
        "Read the bar guide",
        "/en/basement/build/how-to-build-a-basement-bar/"
      ],
      [
        "05",
        "how to build a basement closet",
        "49,500",
        "Beginner",
        "1 weekend",
        "$160-$550",
        "https://images.unsplash.com/photo-1560440021-33f9b867899d?w=1500&q=84",
        "A basement closet has to handle humidity and weird ceiling lines. Ventilation and access matter as much as hanging space.",
        "Read the closet guide",
        "/en/basement/build/how-to-build-a-basement-closet/"
      ]
    ],
    "tools": [
      "Framing nailer",
      "Circular saw",
      "Laser level",
      "Hammer drill",
      "Concrete anchors",
      "Speed square",
      "Clamps",
      "Caulk gun"
    ],
    "matrix": [
      "Frame a wall",
      "Utility shelves",
      "Workbench",
      "Basement bar",
      "Closet build",
      "Soffit frame",
      "Stair rail",
      "Storage bench",
      "Pipe chase",
      "Media wall"
    ],
    "mistakes": [
      "Building flush to concrete",
      "Blocking panel or shutoff access",
      "Ignoring duct and pipe service space",
      "Using untreated lumber on the slab",
      "Framing before moisture is solved",
      "Making the room nicer but less maintainable"
    ]
  },
  "clean": {
    "active": "Clean",
    "count": 12,
    "title": "Basement Cleaning Guides - Mold, Musty Odor, Sump Pits, Drains and Concrete",
    "desc": "12 basement cleaning guides for mold spots, musty smells, sump pits, floor drains, efflorescence, utility sinks, concrete floors, dryer vents, and below-grade dust.",
    "headline": "Clean what concrete holds.",
    "deck": "Basement cleaning is moisture management in work clothes: musty odor, sump pits, floor drains, concrete dust, utility sinks, efflorescence, mold spots, and the air that tells you something is off.",
    "rule": "Dry before clean",
    "topLabel": "Top 5 Basement Clean Searches",
    "photoLabel": "Photo Spread / Basement Clean Notes",
    "essayTitle": "A clean basement should smell like nothing.",
    "essay": [
      "Cleaning the basement is different from cleaning upstairs because the dirt often has a cause. Musty air, mineral bloom, and mold spots are clues about water movement, ventilation, or trapped humidity.",
      "The order matters: remove dry debris, identify moisture, clean the surface, dry the air, and watch the area after rain. If the smell comes back, the clean was only a symptom pass.",
      "This lane is smaller, but it cannot be thin. The basement is where a single missed cause brings the whole smell back."
    ],
    "top": [
      [
        "01",
        "how to get rid of basement musty smell",
        "110,000",
        "Beginner",
        "2 hrs",
        "$20-$250",
        "https://images.unsplash.com/photo-1584622781867-1c5fe959b541?w=1500&q=84",
        "Musty smell is usually humidity, mildew, or a dry drain. The fix starts with identifying which one you actually have.",
        "Read the musty smell guide",
        "/en/basement/clean/how-to-get-rid-of-basement-musty-smell/"
      ],
      [
        "02",
        "how to clean mold on basement walls",
        "90,500",
        "Intermediate",
        "2-4 hrs",
        "$20-$90",
        "https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1500&q=84",
        "Surface mold can be cleaned, but only after moisture is stopped. Protective gear and containment matter even on small spots.",
        "Read the mold guide",
        "/en/basement/clean/how-to-clean-mold-on-basement-walls/"
      ],
      [
        "03",
        "how to clean a sump pit",
        "60,500",
        "Beginner",
        "1 hr",
        "$0-$30",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "A dirty sump pit can smell, jam floats, and shorten pump life. Unplug, vacuum, rinse, test, and restore the pump correctly.",
        "Read the sump pit guide",
        "/en/basement/clean/how-to-clean-a-sump-pit/"
      ],
      [
        "04",
        "how to clean basement efflorescence",
        "49,500",
        "Beginner",
        "1-2 hrs",
        "$15-$60",
        "https://images.unsplash.com/photo-1527515545081-5db817172677?w=1500&q=84",
        "The white powder is easy to brush away. The important part is reading it as a water trail before it comes back.",
        "Read the efflorescence guide",
        "/en/basement/clean/how-to-clean-basement-efflorescence/"
      ],
      [
        "05",
        "how to clean a basement floor drain",
        "40,500",
        "Beginner",
        "30 min",
        "$0-$25",
        "https://images.unsplash.com/photo-1513694203232-719a280e022f?w=1500&q=84",
        "A dry or dirty floor drain can make the room smell like a sewer. The trap needs cleaning and water before panic.",
        "Read the floor drain guide",
        "/en/basement/clean/how-to-clean-a-basement-floor-drain/"
      ]
    ],
    "tools": [
      "HEPA vacuum",
      "N95 mask",
      "Sump brush",
      "Masonry brush",
      "Fan",
      "Humidity gauge",
      "Rubber gloves",
      "Floor squeegee"
    ],
    "matrix": [
      "Musty odor",
      "Wall mold",
      "Sump pit",
      "Efflorescence",
      "Floor drain",
      "Utility sink",
      "Concrete floor",
      "Dryer vent",
      "Ceiling dust",
      "Storage bins"
    ],
    "mistakes": [
      "Spraying fragrance over moisture",
      "Cleaning mold without drying the cause",
      "Vacuuming dust without HEPA filtration",
      "Forgetting the floor drain trap",
      "Leaving wet concrete with no airflow",
      "Storing cleaned boxes back on the slab"
    ]
  },
  "organize": {
    "active": "Organize",
    "count": 18,
    "title": "Basement Organization Guides - Storage Shelves, Utility Zones, Freezers and Seasonal Bins",
    "desc": "18 basement organization guides for seasonal storage, utility shelves, freezer zones, sports gear, tool walls, holiday bins, labels, and storage that stays off the slab.",
    "headline": "Get everything off the floor.",
    "deck": "Basement organization is not cute-bin theater. It is shelves, labels, utility access, waterproof thinking, seasonal zones, freezer logic, and keeping the stuff you care about away from the first place water goes.",
    "rule": "Nothing on slab",
    "topLabel": "Top 5 Basement Organization Searches",
    "photoLabel": "Photo Spread / Basement Organization Notes",
    "essayTitle": "Organization below grade starts six inches up.",
    "essay": [
      "The basement is where storage goes when nobody knows where else to put it. That is why the first organizing rule is physical, not emotional: get it off the slab.",
      "Good basement organization protects access. Electrical panels, shutoffs, sump pits, drains, cleanouts, and mechanical equipment need clear lanes. Storage that blocks service is not storage; it is future panic.",
      "This lane is about durable categories, visible labels, and enough restraint that someone can find the holiday bin without moving a treadmill."
    ],
    "top": [
      [
        "01",
        "how to organize basement storage shelves",
        "90,500",
        "Beginner",
        "3 hrs",
        "$120-$450",
        "https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=1500&q=84",
        "Shelves are the basement's operating system. Strong, labeled, off the floor, and arranged by season and access frequency.",
        "Read the storage shelf guide",
        "/en/basement/organize/how-to-organize-basement-storage-shelves/"
      ],
      [
        "02",
        "how to organize seasonal storage bins",
        "74,000",
        "Beginner",
        "2 hrs",
        "$40-$160",
        "https://images.unsplash.com/photo-1513694203232-719a280e022f?w=1500&q=84",
        "Seasonal bins work when categories are broad enough to maintain and labels are visible without unstacking everything.",
        "Read the seasonal bin guide",
        "/en/basement/organize/how-to-organize-seasonal-storage-bins/"
      ],
      [
        "03",
        "how to organize a basement utility room",
        "60,500",
        "Intermediate",
        "1 day",
        "$80-$300",
        "https://images.unsplash.com/photo-1527515545081-5db817172677?w=1500&q=84",
        "The utility room needs clear access more than it needs beauty. Panels, shutoffs, filters, and pumps must stay reachable.",
        "Read the utility room guide",
        "/en/basement/organize/how-to-organize-a-basement-utility-room/"
      ],
      [
        "04",
        "how to organize a chest freezer",
        "49,500",
        "Beginner",
        "1 hr",
        "$20-$70",
        "https://images.unsplash.com/photo-1584622781867-1c5fe959b541?w=1500&q=84",
        "A chest freezer becomes a frozen archive without bins and an inventory. Zones stop the dig-and-forget cycle.",
        "Read the freezer guide",
        "/en/basement/organize/how-to-organize-a-chest-freezer/"
      ],
      [
        "05",
        "how to organize sports gear in a basement",
        "33,100",
        "Beginner",
        "2 hrs",
        "$50-$220",
        "https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1500&q=84",
        "Basement sports storage needs wall space, air flow, and fast returns. If gear has to be stacked, it will stay on the floor.",
        "Read the sports gear guide",
        "/en/basement/organize/how-to-organize-sports-gear-in-a-basement/"
      ]
    ],
    "tools": [
      "Steel shelves",
      "Clear bins",
      "Thermal labels",
      "Wall hooks",
      "Peg rail",
      "Bin clips",
      "Shelf anchors",
      "Water sensor"
    ],
    "matrix": [
      "Storage shelves",
      "Seasonal bins",
      "Utility room",
      "Chest freezer",
      "Sports gear",
      "Tool wall",
      "Holiday storage",
      "Deep pantry",
      "Laundry overflow",
      "Donation zone"
    ],
    "mistakes": [
      "Stacking cardboard on concrete",
      "Blocking the electrical panel",
      "Labeling lids instead of visible faces",
      "Buying bins before measuring shelves",
      "Making categories too narrow",
      "Forgetting a clear path to the sump pit"
    ]
  },
  "decorate": {
    "active": "Decorate",
    "count": 8,
    "title": "Basement Decorating Guides - Concrete Floors, Lighting, Paneling, Rugs and Bar Walls",
    "desc": "8 basement decorating guides for concrete floor paint, dark ceilings, paneling, lighting temperature, area rugs, bar walls, art, and finished lower-level rooms.",
    "headline": "Decorate so it gets used.",
    "deck": "Basement decorating is the last layer: concrete floor paint, warm bulbs, paneling, rugs, art, a bar wall, a media zone, and enough atmosphere that the finished space stops feeling temporary.",
    "rule": "Finish last",
    "topLabel": "Top 5 Basement Decorate Searches",
    "photoLabel": "Photo Spread / Basement Decorating Notes",
    "essayTitle": "The basement has to earn warmth.",
    "essay": [
      "Decorating a basement only works after the room is dry, lit, and built. If you decorate first, the basement keeps feeling like a cover-up.",
      "The strongest basement decorating moves are atmospheric: warmer bulbs, a painted ceiling, a rug large enough to make a zone, paneling that handles proportion, and art that makes the lower level feel intentional.",
      "This lane is short because basement decorating should be restrained. Less content is fine. Worse content is not."
    ],
    "top": [
      [
        "01",
        "how to paint a basement concrete floor",
        "90,500",
        "Beginner",
        "2 days",
        "$120-$280",
        "https://images.unsplash.com/photo-1513694203232-719a280e022f?w=1500&q=84",
        "The lowest-cost transformation in a basement. Cleaning, etching, moisture testing, and cure time decide whether paint lasts.",
        "Read the concrete floor guide",
        "/en/basement/decorate/how-to-paint-a-basement-concrete-floor/"
      ],
      [
        "02",
        "how to decorate a finished basement",
        "74,000",
        "Beginner",
        "1 weekend",
        "$250-$1,500",
        "https://images.unsplash.com/photo-1560440021-33f9b867899d?w=1500&q=84",
        "A finished basement needs zones, not more furniture. Lighting, rugs, and wall scale make it feel like a room.",
        "Read the finished basement guide",
        "/en/basement/decorate/how-to-decorate-a-finished-basement/"
      ],
      [
        "03",
        "how to choose basement lighting temperature",
        "60,500",
        "Beginner",
        "30 min",
        "$30-$180",
        "https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1500&q=84",
        "Cold bulbs make basements feel like utility space. Warm, layered light is the fastest mood correction.",
        "Read the lighting guide",
        "/en/basement/decorate/how-to-choose-basement-lighting-temperature/"
      ],
      [
        "04",
        "how to style a basement bar wall",
        "40,500",
        "Beginner",
        "1 day",
        "$80-$600",
        "https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=1500&q=84",
        "The bar wall needs one material story, one lighting story, and enough restraint that it does not become themed storage.",
        "Read the bar wall guide",
        "/en/basement/decorate/how-to-style-a-basement-bar-wall/"
      ],
      [
        "05",
        "how to use rugs in a basement",
        "33,100",
        "Beginner",
        "1 hr",
        "$150-$900",
        "https://images.unsplash.com/photo-1584622781867-1c5fe959b541?w=1500&q=84",
        "A rug defines the basement zone, but only after moisture is solved. Fiber and pad choice matter below grade.",
        "Read the rug guide",
        "/en/basement/decorate/how-to-use-rugs-in-a-basement/"
      ]
    ],
    "tools": [
      "Paint samples",
      "Moisture test kit",
      "Warm bulbs",
      "Rug pad",
      "Picture rail",
      "Painter tape",
      "Floor roller",
      "Dimmer switch"
    ],
    "matrix": [
      "Concrete floor paint",
      "Finished basement zones",
      "Warm lighting",
      "Bar wall",
      "Area rug",
      "Dark ceiling",
      "Paneling",
      "Art hang",
      "Media wall",
      "Window treatment"
    ],
    "mistakes": [
      "Decorating before moisture is solved",
      "Using cold bulbs in a low-ceiling room",
      "Buying a rug before moisture testing",
      "Making the basement theme too literal",
      "Ignoring ceiling height",
      "Filling every wall because the room feels empty"
    ]
  }
};
const BSM3_ORDER = ["repair","install","build","clean","organize","decorate"];
const bsrBg = (url) => ({ backgroundImage: 'url("' + url + '")' });

const BasementL3Hero = ({ page }) => (
  <section className="bsr-hero">
    <div className="img" style={bsrBg(page.top[0][6].replace('w=1500', 'w=2400'))} />
    <div className="bsr-mast">
      <span className="crumb"><a href="/">Home</a> / <a href="/en/basement/">Basement</a> / {page.active}</span>
      <span className="ctr">The Basement {page.active} Edition</span>
      <span className="right">No. 07 / Spring 2026</span>
    </div>
    <div className="bsr-cover">
      <div>
        <div className="eyebrow">{page.active} / Basement / 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">Basement / {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 BasementL3Top5 = ({ page }) => (
  <section className="bsr-top5">
    <div className="bsr-wrap">
      <div className="section-folio"><span>The Charts / {page.topLabel}</span><span className="pg">PG. 02</span></div>
      <div className="bsr-head">
        <div>
          <h2>The five projects that decide the basement.</h2>
          <p className="deck">Below grade, every project has consequences. These are the searches that carry the most intent in this lane.</p>
        </div>
        <div className="legend">
          <span><i style={{ background: 'var(--bsrcopper)' }} /> Difficulty</span>
          <span><i style={{ background: 'var(--bsrblue)' }} /> Time</span>
          <span><i style={{ background: 'var(--bsrmoss)' }} /> Materials</span>
        </div>
      </div>
      <div className="bsr-top-list">
        {page.top.map((t) => (
          <article className="bsr-top-row" key={t[0]}>
            <div className="rank">No. {t[0]}</div>
            <a className="bsr-top-photo" href={t[9]} style={bsrBg(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 BasementL3PhotoSpread = ({ page }) => (
  <section className="bsr-photo-spread">
    <div className="bsr-wrap">
      <div className="section-folio"><span>{page.photoLabel}</span><span className="pg">PG. 07</span></div>
      <div className="bsr-photo-grid">
        {page.top.slice(0, 4).map((item, i) => (
          <article className={'bsr-photo-card c' + (i + 1)} key={item[0]}>
            <a className="photo" href={item[9]} style={bsrBg(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 BasementL3Essay = ({ page }) => (
  <section className="bsr-essay">
    <div className="bsr-essay-wrap">
      <div className="section-folio"><span>Editor's Note / Basement, {page.active}</span><span className="pg">PG. 08</span></div>
      <div className="bsr-essay-grid">
        <aside className="bsr-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>Below grade</strong></div>
          </div>
        </aside>
        <div className="bsr-essay-body">
          <p className="dropcap">{page.essay[0]}</p>
          <p>{page.essay[1]}</p>
          <div className="pull">A basement has to stay dry, accessible, and useful after the page is done being pretty.</div>
          <p>{page.essay[2]}</p>
        </div>
      </div>
    </div>
  </section>
);

const BasementL3Tools = ({ page }) => (
  <section className="bsr-tools">
    <div className="bsr-wrap">
      <div className="section-folio"><span>The Kit / What earns shelf space</span><span className="pg">PG. 10</span></div>
      <div className="bsr-tools-head">
        <h2>Eight tools that make basement {page.active.toLowerCase()} work less like guessing.</h2>
        <p>Basement work is moisture-sensitive, access-dependent, and usually happening around concrete or mechanical systems.</p>
      </div>
      <div className="bsr-tools-grid">
        {page.tools.map((tool, i) => (
          <div className="bsr-tool" key={tool}>
            <span>{String(i + 1).padStart(2, '0')}</span>
            <h3>{tool}</h3>
            <p>Useful because below-grade work fails when the finish hides moisture, access, or maintenance.</p>
          </div>
        ))}
      </div>
    </div>
  </section>
);

const BasementL3Matrix = ({ page }) => (
  <section className="bsr-matrix">
    <div className="bsr-wrap">
      <div className="section-folio"><span>The Menu / Ranked by payoff</span><span className="pg">PG. 12</span></div>
      <div className="bsr-matrix-head">
        <h2>Ten basement {page.active.toLowerCase()} projects, ranked.</h2>
        <p>The first jobs change whether the room can work. The later jobs make the lower level easier to live with.</p>
      </div>
      <div className="bsr-matrix-table">
        <div className="bsr-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="bsr-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/basement/' + page.active.toLowerCase() + '/'}>Open</a></span>
          </div>
        ))}
      </div>
    </div>
  </section>
);

const BasementL3Mistakes = ({ page }) => (
  <section className="bsr-mistakes">
    <div className="bsr-wrap">
      <div className="section-folio"><span>Do Not Skip / Below-grade failures</span><span className="pg">PG. 14</span></div>
      <div className="bsr-mistakes-head">
        <h2>The mistakes that make the basement fail later.</h2>
        <span>{page.mistakes.length}</span>
      </div>
      <div className="bsr-mistakes-grid">
        {page.mistakes.map((m, i) => (
          <article className="bsr-mistake" key={m}>
            <div className="n">{String(i + 1).padStart(2, '0')}</div>
            <h3>{m}</h3>
            <p>If the cause is still active, the project is decoration. Below grade, decoration does not hold.</p>
          </article>
        ))}
      </div>
    </div>
  </section>
);

const BasementL3Related = ({ page, lane }) => (
  <section className="bsr-related">
    <div className="bsr-related-wrap">
      <div className="bsr-related-col">
        <h3>Other things to do in the basement.</h3>
        <div className="bsr-related-list">
          {BSM3_ORDER.map((key, i) => {
            const item = BSM3_PAGES[key] || { active: 'Repair', count: 24 };
            return <a href={'/en/basement/' + key + '/'} className={'row ' + (key === lane ? 'current' : '')} key={key}><span className="n">{String(i + 1).padStart(2, '0')}</span><span className="t">{item.active} in the basement</span><span className="ct">{item.count} guides</span></a>;
          })}
        </div>
      </div>
      <div className="bsr-related-col">
        <h3>{page.active} in other rooms.</h3>
        <div className="bsr-related-list">
          {['kitchen', 'bathroom', 'bedroom', 'living-room', 'garage'].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 BasementL3Colophon = ({ page }) => (
  <section className="bsr-colophon">
    <span>HowTo: Home Edition / Basement</span>
    <h2>{page.count} ways to {page.active.toLowerCase()} the room below everything.</h2>
    <p>Built as a static editorial L3 page with a full crawler body, visible photography, and a real below-grade menu.</p>
    <a href="/en/basement/" className="go">Back to Basement</a>
  </section>
);

const BasementL3 = ({ lane }) => {
  const page = BSM3_PAGES[lane] || BSM3_PAGES.install;
  return (
    <>
      <BasementL3Hero page={page} />
      <BasementL3Top5 page={page} />
      <BasementL3PhotoSpread page={page} />
      <BasementL3Essay page={page} />
      <BasementL3Tools page={page} />
      <BasementL3Matrix page={page} />
      <BasementL3Mistakes page={page} />
      <BasementL3Related page={page} lane={lane} />
      <BasementL3Colophon page={page} />
    </>
  );
};

window.BasementL3 = BasementL3;
