/* /en/bathroom/repair + /en/repair/bathroom — Repair × Bathroom L3 intersection */
/* HowTo Quarterly · Repair × Bathroom / Spring 2026 */

const RB_ACCENT = { rust: "#B85A2A", slate: "#6B8AA8" };

/* ===================== HERO ===================== */
const RepairBathroomHero = () => (
  <section className="rb-hero">
    <div className="img" style={{ backgroundImage: "url('https://images.unsplash.com/photo-1552321554-5fefe8c9ef14?w=2400&q=85')" }} />
    <div className="rb-mast">
      <span className="crumb">
        <a href="/">Home</a>  ·  <a href="/en/bathroom/">Bathroom</a>  ·  Repair
      </span>
      <span className="ctr">HowTo Quarterly · Repair × Bathroom</span>
      <span className="right">Spring 2026</span>
    </div>
    <div className="rb-cover">
      <div>
        <div className="eyebrow">Repair · Bathroom · A Field Guide</div>
        <h1>Where water meets electricity, <em>mistakes have receipts.</em></h1>
      </div>
      <div>
        <p className="deck">
          Forty-nine repair guides for the room with the highest consequence per square foot — running toilets, leaky faucets, failing grout, and the GFCI outlet you should test before you touch.
        </p>
        <div className="meta">
          <div><span className="k">Section</span><span className="v">Bathroom / Repair</span></div>
          <div><span className="k">Guides</span><span className="v">49 total</span></div>
          <div><span className="k">Reading time</span><span className="v">12 min</span></div>
          <div><span className="k">Updated</span><span className="v">April 2026</span></div>
        </div>
      </div>
    </div>
  </section>
);

/* ===================== TOP 5 ===================== */
const RB_TOP5 = [
  {
    rank: "01",
    query: "how to fix a running toilet",
    monthly: "246,000",
    diff: "Beginner",
    time: "30 min",
    cost: "$10 — $35",
    blurb:
      "The single most-searched bathroom repair in the country — and the most water-wasted. A running toilet can lose 200 gallons a day. The fix is usually a $7 flapper.",
    link: "Read the running toilet guide",
    href: "/en/bathroom/repair/how-to-fix-a-running-toilet/",
  },
  {
    rank: "02",
    query: "how to replace a toilet flapper",
    monthly: "132,000",
    diff: "Beginner",
    time: "15 min",
    cost: "$5",
    blurb:
      "The fastest plumbing repair in the bathroom. Shut off the supply, drain the tank, unhook the old flapper, hook in the new one. The only decision: universal vs. brand-specific. Check the flush valve seat first.",
    link: "Read the flapper guide",
    href: "/en/bathroom/repair/how-to-replace-a-toilet-flapper/",
  },
  {
    rank: "03",
    query: "how to fix a leaky shower faucet",
    monthly: "98,000",
    diff: "Intermediate",
    time: "60 min",
    cost: "$20 — $80",
    blurb:
      "A dripping shower head wastes 3 gallons a day and that sound at 2 AM has a name: a worn cartridge. Moen, Delta, Kohler all have brand-specific cartridge pulls — buy the right one before you pull anything out.",
    link: "Read the shower faucet guide",
    href: "/en/bathroom/repair/how-to-fix-a-leaky-shower-faucet/",
  },
  {
    rank: "04",
    query: "how to unclog a bathroom drain",
    monthly: "87,000",
    diff: "Beginner",
    time: "30 min",
    cost: "$5 — $15",
    blurb:
      "Hair and soap build-up slow a bathroom drain. Pull the stopper, remove the clog by hand or with a drain snake, flush with hot water. If it's still slow after two passes, you have a venting problem, not a clog.",
    link: "Read the drain guide",
    href: "/en/bathroom/repair/how-to-unclog-a-bathroom-drain/",
  },
  {
    rank: "05",
    query: "how to regrout a tile shower",
    monthly: "74,000",
    diff: "Intermediate",
    time: "4 hr + cure",
    cost: "$30",
    blurb:
      "Cracked or missing grout in a shower isn't cosmetic — it's a waterproofing failure. Grout the shower surround once every 5–7 years and you'll never have a subfloor replacement conversation.",
    link: "Read the regrout guide",
    href: "/en/bathroom/repair/how-to-regrout-a-tile-shower/",
  },
];

const RepairBathroomMenu = () => (
  <section className="rb-top5">
    <div className="rb-top5-wrap">
      <div className="section-folio">
        <span>The Charts · Top 5 Bathroom Repair Searches</span>
        <span className="pg">PG. 02</span>
      </div>
      <div className="rb-top5-head">
        <div>
          <h2>The five repairs people <em>actually search for.</em></h2>
          <p className="deck">
            Pulled from twelve months of search data and our own server logs. The bathroom accounts for more emergency repair calls per square foot than any other room.
          </p>
        </div>
        <div className="legend">
          <span><span className="dot" style={{background: RB_ACCENT.rust}}/> Difficulty</span>
          <span><span className="dot" style={{background: RB_ACCENT.slate}}/> Time</span>
          <span><span className="dot" style={{background: '#8a7a9c'}}/> Materials</span>
        </div>
      </div>
      <div className="rb-top5-list">
        {RB_TOP5.map(t => (
          <article className="rb-top5-row" key={t.rank}>
            <div className="rank">№ {t.rank}</div>
            <div className="query">
              <h3>{t.query}</h3>
              <p>{t.blurb}</p>
              <a href={t.href} className="read">{t.link} →</a>
            </div>
            <div className="stats">
              <div className="stat">
                <span className="k">Monthly searches</span>
                <span className="v">{t.monthly}</span>
              </div>
              <div className="stat">
                <span className="k">Difficulty</span>
                <span className="v">{t.diff}</span>
              </div>
              <div className="stat">
                <span className="k">Time</span>
                <span className="v">{t.time}</span>
              </div>
              <div className="stat">
                <span className="k">Materials</span>
                <span className="v">{t.cost}</span>
              </div>
            </div>
          </article>
        ))}
      </div>
    </div>
  </section>
);

/* ===================== ESSAY ===================== */
const RepairBathroomEssay = () => (
  <section className="rb-essay">
    <div className="rb-essay-wrap">
      <div className="section-folio" style={{ borderColor: 'rgba(107,138,168,0.3)' }}>
        <span>Editor's Note · The Bathroom Repair Brief</span>
        <span className="pg">PG. 08</span>
      </div>
      <div className="rb-essay-grid">
        <aside className="rb-essay-side">
          <h2>The room where <em>every failure compounds.</em></h2>
          <div className="by">By the Editors · 5 min read</div>
          <div className="stat-list">
            <div className="row"><span>Most costly if ignored</span><strong>Wax ring failure</strong></div>
            <div className="row"><span>Cheapest fix, highest ROI</span><strong>Flapper ($7)</strong></div>
            <div className="row"><span>Water saved / repaired toilet</span><strong>200 gal/day</strong></div>
            <div className="row"><span>Most-missed safety step</span><strong>GFCI + breaker</strong></div>
          </div>
        </aside>
        <div className="rb-essay-body">
          <p className="dropcap">
            The bathroom is the smallest room in the house and the most expensive to get wrong. It concentrates everything that makes home repair genuinely dangerous — water, electricity, finished tile — within arm's reach of each other. The plumbing runs behind the walls. The electrical runs above a standing puddle. The grout is the only thing standing between a tile surround and your subfloor.
          </p>
          <p>
            Most bathroom repairs are simple. A running toilet is a seven-dollar flapper. A slow drain is a hand tool and five minutes. A leaky faucet is a worn cartridge you can order same-day. The mistake isn't the difficulty of the work — the mistake is ignoring it until the cost compounds. Water in the wrong place for long enough means mold, rot, and a call to a contractor rather than a trip to the hardware store.
          </p>
          <div className="pull">
            "Where water meets electricity, mistakes have receipts. The repair that costs thirty dollars today costs three thousand dollars next year."
          </div>
          <p>
            Below: the five repairs that send the most people to Google, the six categories that cover every bathroom failure mode, the five mistakes that turn a small job into a large one, and the ten-project sequence that builds real bathroom repair competence. Start with the toilet flapper. Work your way to the cartridge. By the end, water and electricity feel like variables you can manage — not disasters waiting to happen.
          </p>
        </div>
      </div>
    </div>
  </section>
);

/* ===================== PICK (FEATURED LEAF) ===================== */
const RepairBathroomPick = () => (
  <section style={{ padding: '80px 56px', background: '#141519', borderBottom: '1px solid var(--rule)' }}>
    <div style={{ maxWidth: 1200, margin: '0 auto' }}>
      <div className="section-folio">
        <span>Featured Guide · Start Here</span>
        <span className="pg">PG. 11</span>
      </div>
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 80, alignItems: 'center', marginTop: 40 }}>
        <div>
          <div style={{ fontFamily: '"JetBrains Mono", monospace', fontSize: 10, letterSpacing: '0.28em', textTransform: 'uppercase', color: 'var(--rbrust)', marginBottom: 20 }}>
            Most-searched · Best first repair
          </div>
          <h2 style={{ fontFamily: '"Playfair Display", serif', fontWeight: 400, fontSize: 'clamp(40px, 4.4vw, 64px)', lineHeight: 1.0, letterSpacing: '-0.015em', margin: '0 0 24px', color: 'var(--ink)' }}>
            How to fix a <em style={{ fontStyle: 'italic', color: 'var(--rbslate)' }}>running toilet.</em>
          </h2>
          <p style={{ fontFamily: '"DM Sans", sans-serif', fontSize: 16, lineHeight: 1.65, color: 'var(--ink-soft)', margin: '0 0 32px', maxWidth: '50ch' }}>
            A toilet that refills on its own every 5–10 minutes has a leak somewhere between the flapper and the fill valve. Most of the time it's the flapper. Sometimes it's the flush valve seat. Rarely it's the fill valve. The diagnostic takes two minutes; the repair takes fifteen.
          </p>
          <div style={{ display: 'flex', gap: 32, marginBottom: 32, paddingBottom: 24, borderBottom: '1px solid var(--rule)', fontFamily: '"JetBrains Mono", monospace', fontSize: 10, letterSpacing: '0.2em', textTransform: 'uppercase', color: 'var(--ink-mute)' }}>
            <div><span style={{ display: 'block', color: 'var(--rbslate)', fontFamily: '"Playfair Display", serif', fontSize: 22, fontStyle: 'italic', letterSpacing: 0, textTransform: 'none', marginBottom: 4 }}>30 min</span>Time</div>
            <div><span style={{ display: 'block', color: 'var(--rbslate)', fontFamily: '"Playfair Display", serif', fontSize: 22, fontStyle: 'italic', letterSpacing: 0, textTransform: 'none', marginBottom: 4 }}>$10–35</span>Materials</div>
            <div><span style={{ display: 'block', color: 'var(--rbslate)', fontFamily: '"Playfair Display", serif', fontSize: 22, fontStyle: 'italic', letterSpacing: 0, textTransform: 'none', marginBottom: 4 }}>Beginner</span>Difficulty</div>
          </div>
          <a href="/en/bathroom/repair/how-to-fix-a-running-toilet/" style={{ fontFamily: '"JetBrains Mono", monospace', fontSize: 11, letterSpacing: '0.32em', textTransform: 'uppercase', color: 'var(--rbrust)', textDecoration: 'none', border: '1px solid var(--rbrust)', padding: '16px 28px', display: 'inline-block', transition: 'background 0.2s, color 0.2s' }}>
            Read the guide →
          </a>
        </div>
        <div style={{ borderLeft: '1px solid var(--rule)', paddingLeft: 80 }}>
          <div style={{ fontFamily: '"JetBrains Mono", monospace', fontSize: 9, letterSpacing: '0.28em', textTransform: 'uppercase', color: 'var(--ink-mute)', marginBottom: 24, paddingBottom: 14, borderBottom: '1px solid var(--rule)' }}>
            What you'll replace
          </div>
          {[
            { part: "Toilet flapper", note: "The rubber seal over the flush valve drain. Wears out every 3–5 years.", cost: "$5–8" },
            { part: "Fill valve", note: "Controls water refill after flush. Fails slowly — toilet refills twice before stopping.", cost: "$10–20" },
            { part: "Flush valve seat", note: "The seat the flapper seals against. Pitted seats leak even with a new flapper.", cost: "$35–80" },
          ].map(p => (
            <div key={p.part} style={{ padding: '16px 0', borderBottom: '1px dashed var(--rule)', display: 'grid', gridTemplateColumns: '1fr auto', gap: 16, alignItems: 'start' }}>
              <div>
                <div style={{ fontFamily: '"Playfair Display", serif', fontSize: 18, color: 'var(--ink)', marginBottom: 4 }}>{p.part}</div>
                <div style={{ fontFamily: '"DM Sans", sans-serif', fontSize: 13, color: 'var(--ink-mute)', lineHeight: 1.5 }}>{p.note}</div>
              </div>
              <div style={{ fontFamily: '"JetBrains Mono", monospace', fontSize: 12, color: 'var(--rbslate)', whiteSpace: 'nowrap' }}>{p.cost}</div>
            </div>
          ))}
        </div>
      </div>
    </div>
  </section>
);

/* ===================== CATEGORIES ===================== */
const RB_CATS = [
  { label: "Cat 01", count: "12 guides", name: "Toilet repairs",
    p: "Running, rocking, running-and-running, refilling after ghost flushes, handle stuck mid-flush, wax ring weeping — twelve failure modes, twelve specific fixes. The toilet is the most-used mechanical device in the bathroom, and it repays the homeowner who learns its anatomy." },
  { label: "Cat 02", count: "10 guides", name: "Faucet & valve repairs",
    p: "Bathroom sink, shower, and tub faucets all fail at the same place: the cartridge or the ceramic disc valve. Moen uses a cartridge you pull straight up. Delta uses a ball valve. Kohler uses a ceramic disc. Brand matters here — buy the right cartridge before you take anything apart." },
  { label: "Cat 03", count: "8 guides", name: "Drain & venting",
    p: "A slow drain is usually hair and soap, removable by hand or with a drain snake in minutes. A drain that's slow on every fixture simultaneously is a venting problem — the P-trap is siphoning. A drain that smells like sewer is a dry trap, a failed wax ring, or a cracked vent stack, each with a different fix." },
  { label: "Cat 04", count: "9 guides", name: "Shower & tub repairs",
    p: "Shower arms, diverters, cartridges, mixing valves, shower pan cracks, and the caulk line between tub and tile that fails every seven years without exception. The shower is the wettest zone in the bathroom — every failure here is a waterproofing failure first." },
  { label: "Cat 05", count: "5 guides", name: "Tile, grout & caulk repair",
    p: "Cracked grout in a shower surround isn't cosmetic. It's a waterproofing failure that will produce a subfloor replacement if left alone for two years. Regrout every five years, re-caulk every two, and check the corner seams where tile meets tub — that's where silicone fails first." },
  { label: "Cat 06", count: "5 guides", name: "Vent fan & lighting",
    p: "Bath vent fans move air, remove moisture, and prevent the mold that costs four figures to remediate. Fan motors die after 10–15 years; the motor replacement (not the housing) is the fix. Bathroom lighting almost always terminates at a GFCI circuit — confirm that before any bulb-socket work." },
];

const RepairBathroomCategories = () => (
  <section className="rb-categories">
    <div className="rb-categories-wrap">
      <div className="section-folio">
        <span>The Full Menu · 49 Guides by Category</span>
        <span className="pg">PG. 16</span>
      </div>
      <div className="rb-categories-head">
        <h2>The full bathroom-repair menu, <em>by category.</em></h2>
        <p className="deck">Forty-nine guides covering every bathroom failure mode — organized by system so you can find what broke without knowing what it's called.</p>
      </div>
      <div className="rb-categories-grid">
        {RB_CATS.map(c => (
          <div className="rb-category" key={c.label}>
            <div className="cat-head">
              <span className="cat-label">{c.label}</span>
              <span className="cat-count">{c.count}</span>
            </div>
            <h4>{c.name}</h4>
            <p>{c.p}</p>
          </div>
        ))}
      </div>
    </div>
  </section>
);

/* ===================== MISTAKES ===================== */
const RepairBathroomMistakes = () => {
  const items = [
    { h: "Replacing a flapper without checking the flush valve seat",
      p: "A new flapper on a pitted flush valve seat will leak again in a week. Run your finger around the rim of the seat before you install a new flapper. If it's rough or ridged, the seat needs replacing or resurfacing — not just a new rubber seal." },
    { h: "Using channel-locks on chrome supply lines",
      p: "Compression fittings on braided supply lines are hand-tight plus a quarter turn. Channel-lock pliers on chrome fittings crush the nut, score the ferrule, and guarantee the leak you were trying to stop. Use an adjustable wrench and a rag to protect the chrome." },
    { h: "Caulking over old caulk",
      p: "New caulk over old caulk lifts at the seam within 90 days. It looks complete for a month, then peels. Remove the old bead completely — utility knife plus caulk removal tool — clean with rubbing alcohol, dry for 24 hours, then apply fresh silicone. This is the only way it lasts." },
    { h: "Working on a GFCI outlet without confirming the breaker AND the GFCI test",
      p: "The breaker and the GFCI are independent protection systems. A tripped breaker can leave a GFCI outlet energized if the GFCI hasn't also tripped. A tripped GFCI can leave the outlet dead even if the breaker is live. Confirm both with a non-contact voltage tester before touching any terminal." },
    { h: "Threading an ABS DWV trap without primer",
      p: "PVC cement bonds immediately; ABS cement bonds slightly slower but still requires purple primer on every joint in most jurisdictions. A dry-fit ABS trap without primer looks finished and holds pressure for months — then opens slowly and silently into the cabinet below. Always primer, always cement, always in that order." },
  ];
  return (
    <section className="rb-mistakes">
      <div className="rb-mistakes-wrap">
        <div className="section-folio">
          <span>Field Notes · Mistakes Specific to Bathroom Repair</span>
          <span className="pg">PG. 24</span>
        </div>
        <div className="rb-mistakes-head">
          <h2>Five mistakes worth <em>not making.</em></h2>
          <div className="num">№ 01 — 05</div>
        </div>
        <div className="rb-mistakes-grid">
          {items.map((m, i) => (
            <div className="rb-mistake" key={i}>
              <div className="n">{String(i+1).padStart(2,'0')}</div>
              <div>
                <h4>{m.h}</h4>
                <p>{m.p}</p>
              </div>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
};

/* ===================== TOOLS ===================== */
const RB_TOOLS = [
  { n: "01", name: "Toilet auger", note: "Different geometry from a sink auger — the long handle and curved neck reach past the toilet's internal trap. A sink auger will not clear a toilet clog.", req: "Toilet" },
  { n: "02", name: "Compression sleeve cutter", note: "$18 tool that cuts the old sleeve off a supply line fitting without damaging the thread. Without one, you're grinding with a hacksaw or buying a new stop valve.", req: "Supply lines" },
  { n: "03", name: "Caulk-removal tool + razor scraper", note: "The $15 combination that makes re-caulking a tub or shower surround a clean job. The oscillating blade gets under old caulk; the razor scrapes residue. Neither works alone.", req: "Caulk / tile" },
  { n: "04", name: "Inspection mirror with light", note: "$20 extendable mirror that lets you see under the toilet bowl rim, behind the vanity cabinet, and into the back of the tank without contorting. Finds slow leaks before they show up on the ceiling below.", req: "Leak diagnosis" },
  { n: "05", name: "Voltage tester pen", note: "$15 non-contact tester that lights up near any energized wire without touching it. Required for any GFCI outlet work. Test the outlet, the wires behind it, and the circuit once at the panel and once at the device.", req: "GFCI / electrical" },
];

const RepairBathroomTools = () => (
  <section className="rb-tools">
    <div className="rb-tools-wrap">
      <div className="section-folio">
        <span>The Tool Kit · Bathroom Repair Specific</span>
        <span className="pg">PG. 30</span>
      </div>
      <div className="rb-tools-head">
        <h2>Five tools that earn their place <em>in bathroom repair specifically.</em></h2>
        <p className="deck">Beyond the general repair kit, these five show up on bathroom jobs because the bathroom has geometry and safety requirements that generic tools don't address.</p>
      </div>
      <div className="rb-tools-grid">
        {RB_TOOLS.map(t => (
          <div className="rb-tool" key={t.n}>
            <div className="head">
              <span className="n">№ {t.n}</span>
              <span className="req">{t.req}</span>
            </div>
            <h4>{t.name}</h4>
            <p>{t.note}</p>
          </div>
        ))}
      </div>
    </div>
  </section>
);

/* ===================== SEQUENCE ===================== */
const RB_SEQ = [
  { step: 1, text: "Replace toilet flapper", sub: "15 min · $5 · the most frequent bathroom repair in the house." },
  { step: 2, text: "Caulk a tub gap", sub: "45 min · $8 · teaches tape-bead-tool-peel technique that applies everywhere." },
  { step: 3, text: "Tighten loose toilet handle", sub: "10 min · free · the handle nut is reverse-threaded; most people strip it going the wrong direction." },
  { step: 4, text: "Replace shower head", sub: "20 min · $25–80 · PTFE tape on threads, hand-tight plus a quarter turn. Never more." },
  { step: 5, text: "Fix slow drain (snake or BioClean)", sub: "30 min · $10 · hair clog first, venting problem second, grease clog third." },
  { step: 6, text: "Replace toilet fill valve", sub: "30 min · $12 · more involved than a flapper; teaches the tank anatomy completely." },
  { step: 7, text: "Reseat a wobbly toilet (new wax ring)", sub: "90 min · $12 · teaches water shutoff, drain disconnection, and the weight of a toilet." },
  { step: 8, text: "Replace cartridge in single-handle faucet", sub: "60 min · $20–40 · brand-specific; teaches valve body anatomy." },
  { step: 9, text: "Regrout a small tile section", sub: "3 hrs + cure · $20 · teaches grout saw, angle of application, and float technique." },
  { step: 10, text: "Replace bath fan motor", sub: "45 min · $25 · electrical shutoff at breaker + GFCI test; motor slides out on a carriage." },
];

const RepairBathroomSequence = () => (
  <section className="rb-sequence">
    <div className="rb-sequence-wrap">
      <div className="section-folio" style={{ borderColor: 'rgba(107,138,168,0.28)' }}>
        <span>Skill Ladder · 10-Project Starter Sequence</span>
        <span className="pg">PG. 36</span>
      </div>
      <div className="rb-sequence-head">
        <h2>The 10-project bathroom-repair <em>starter sequence.</em></h2>
        <p className="deck">In order of complexity. Each project teaches a technique the next one assumes. By project 10, you've touched every major bathroom system — plumbing, drain, tile, electrical.</p>
      </div>
      <div className="rb-sequence-list">
        {RB_SEQ.map(s => (
          <div className="rb-sequence-item" key={s.step}>
            <div className="n">{String(s.step).padStart(2,'0')}</div>
            <div>
              <div className="text">{s.text}</div>
              <div className="sub">{s.sub}</div>
            </div>
          </div>
        ))}
      </div>
    </div>
  </section>
);

/* ===================== FAQ ===================== */
const RepairBathroomFaq = () => {
  const [open, setOpen] = React.useState(0);
  const faqs = [
    { q: "Why does my toilet refill on its own every few minutes?",
      a: "The toilet is ghost-flushing because water is leaking from the tank into the bowl. The two culprits: a worn flapper that no longer seals against the flush valve seat, or a fill valve that's set too high and overflows the overflow tube. Diagnosis: add a few drops of food coloring to the tank. If color appears in the bowl within 15 minutes without flushing, the flapper is your first fix. If water is running into the overflow tube, lower the fill valve float." },
    { q: "What's the difference between a P-trap and an S-trap?",
      a: "A P-trap has a horizontal outlet — the water seal is maintained by the shape of the pipe. An S-trap has a vertical outlet and is illegal under modern plumbing code in most jurisdictions because the downward pull of draining water can siphon the trap dry, allowing sewer gas into the room. If your bathroom sink or tub drain has an S-trap, it should be replaced with a P-trap and proper venting. This is a plumber job if you're not comfortable with DWV work." },
    { q: "Should I caulk between the tub and the tile?",
      a: "Yes — 100% silicone, not grout. The joint between a tub and the tile above it flexes with temperature and the weight of water. Grout is rigid; it will crack within months. Silicone caulk is flexible and waterproof. Use white, almond, or matching caulk depending on your tile color. Re-caulk every 2–3 years regardless of appearance — silicone fails from the inside before it fails visually." },
    { q: "Can I just paint over moldy caulk?",
      a: "No. Painting over mold traps it, slows the visible sign, and lets the spore colony continue growing underneath. The right fix: cut out the old caulk completely, scrub the substrate with a dilute bleach solution (1 part bleach to 10 parts water), let it dry for 48 hours, confirm there's no more mold, then apply fresh silicone. Anything less is decorative maintenance, not a repair." },
    { q: "Why does my bathroom smell like sewer?",
      a: "Two common causes. First: a dry trap — a fixture that isn't used often (guest bath, floor drain) has had its trap water evaporate, letting sewer gas through. The fix is to run water into the fixture. Second: a failed wax ring — the toilet is rocking, the wax seal has cracked, and sewer gas is escaping around the base. Press on the toilet rim; if it shifts more than 1/8 inch in any direction, the wax ring needs replacing." },
    { q: "How often should I replace a wax ring?",
      a: "Only when you pull the toilet — not preventively. A correctly-installed wax ring on a properly-anchored toilet lasts the life of the toilet (20–30 years or more). The wax ring fails when the toilet rocks, when the floor settles unevenly, or when a previous repair disturbed the connection. If you're pulling the toilet for any reason, always use a new wax ring on reinstallation — they're $5, and you never want to reseat a toilet twice." },
  ];
  return (
    <section className="rb-faq">
      <div className="section-folio">
        <span>Reader Questions · Bathroom Repair, Answered</span>
        <span className="pg">PG. 42</span>
      </div>
      <div className="rb-faq-head">
        <span className="label">FAQ · The Most-Asked</span>
        <h2>What people ask <em>before they repair.</em></h2>
      </div>
      <div className="rb-faq-list">
        {faqs.map((f, i) => (
          <div key={i} className={`rb-faq-item ${open === i ? 'open' : ''}`} onClick={() => setOpen(open === i ? -1 : i)}>
            <div className="rb-faq-q">
              <span>{f.q}</span>
              <span className="toggle">+</span>
            </div>
            <div className="rb-faq-a">{f.a}</div>
          </div>
        ))}
      </div>
    </section>
  );
};

/* ===================== TECHNIQUES ===================== */
const RepairBathroomTechniques = () => {
  const items = [
    { n: "01", h: "The leak-isolation test",
      p: "Turn off the main water supply to the bathroom. Note the position of the water meter (or pressure gauge if you have one). Wait 15 minutes. If the meter has moved or pressure has dropped, you have a leak upstream of the shutoff — meaning the supply line, not the fixture. If it holds, the leak is at the fixture or downstream. This test takes 15 minutes and distinguishes between a toilet repair and a plumber call." },
    { n: "02", h: "The continuity check before any electrical repair",
      p: "Before touching any GFCI outlet or bathroom light: flip the breaker, then use a non-contact voltage tester at the device. If it reads live, the GFCI is on a different circuit or is being back-fed. Test the GFCI using its own TEST button and verify the downstream outlets lose power. Then test at the panel again. The sequence — breaker off, tester, GFCI test, tester again — takes two minutes and eliminates the single most common cause of bathroom electrical accidents." },
    { n: "03", h: "The right way to caulk",
      p: "Apply two strips of painter's tape — one on the tile side, one on the tub side — with a 3/16-inch gap between them. Fill the gap with a single, continuous bead of silicone, angled at 45 degrees. Wet your finger or use a caulk tool and draw it across the bead in a single pass. Remove the tape immediately, while the silicone is still wet. Wait 24 hours before exposing to water. The tape removes the skill ceiling; the single pass determines the result." },
    { n: "04", h: "The material decision: putty vs. silicone vs. Teflon tape",
      p: "Plumber's putty: below sink fixtures (drain bodies, sink-mounted strainers, faucet bases on porcelain) where a flexible waterproof bed is needed. Not for plastic or composites — it stains. Silicone caulk: tub-to-tile seams, shower door frames, any wet surface that flexes. Longer cure, better waterproofing. Teflon tape (PTFE): threaded plumbing connections — supply lines, shower arms, fill valve supply. Three wraps clockwise on the male thread. Using the wrong one for the job is how leaks begin." },
  ];
  return (
    <section className="rb-techniques">
      <div className="rb-techniques-wrap">
        <div className="section-folio">
          <span>Technique · Four Bathroom Repair Skills Worth Owning</span>
          <span className="pg">PG. 48</span>
        </div>
        <div className="rb-techniques-head">
          <h2>The four techniques worth <em>mastering.</em></h2>
          <div className="num">№ 01 — 04</div>
        </div>
        <div className="rb-techniques-grid">
          {items.map(t => (
            <div className="rb-technique" key={t.n}>
              <div className="badge">№ {t.n}</div>
              <h4>{t.h}</h4>
              <p>{t.p}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
};

/* ===================== RELATED ===================== */
const RepairBathroomRelated = () => (
  <section className="rb-related">
    <div className="rb-related-wrap">
      <div className="rb-related-col">
        <div className="section-folio" style={{ marginBottom: 16 }}>
          <span>Other things to do · in the Bathroom</span>
          <span className="pg">A</span>
        </div>
        <h3>You're in the bathroom. <em>Pick a different verb.</em></h3>
        <div className="rb-related-list">
          <a href="/en/bathroom/repair/"    className="row current"><span className="n">01</span><span className="t">Repair the bathroom</span><span className="ct">49 guides — you are here</span></a>
          <a href="/en/bathroom/install/"   className="row"><span className="n">02</span><span className="t">Install in the bathroom</span><span className="ct">51 guides</span></a>
          <a href="/en/bathroom/build/"     className="row"><span className="n">03</span><span className="t">Build for the bathroom</span><span className="ct">9 guides</span></a>
          <a href="/en/bathroom/clean/"     className="row"><span className="n">04</span><span className="t">Clean the bathroom</span><span className="ct">28 guides</span></a>
          <a href="/en/bathroom/organize/"  className="row"><span className="n">05</span><span className="t">Organize the bathroom</span><span className="ct">15 guides</span></a>
          <a href="/en/bathroom/decorate/"  className="row"><span className="n">06</span><span className="t">Decorate the bathroom</span><span className="ct">11 guides</span></a>
        </div>
      </div>
      <div className="rb-related-col">
        <div className="section-folio" style={{ marginBottom: 16 }}>
          <span>Repair something else · Other Rooms</span>
          <span className="pg">B</span>
        </div>
        <h3>Or repair <em>somewhere else.</em></h3>
        <div className="rb-related-list">
          <a href="/en/repair/kitchen/"      className="row"><span className="n">01</span><span className="t">Repair the kitchen</span><span className="ct">58 guides</span></a>
          <a href="/en/repair/bedroom/"      className="row"><span className="n">02</span><span className="t">Repair the bedroom</span><span className="ct">22 guides</span></a>
          <a href="/en/repair/living-room/"  className="row"><span className="n">03</span><span className="t">Repair the living room</span><span className="ct">28 guides</span></a>
          <a href="/en/repair/garage/"       className="row"><span className="n">04</span><span className="t">Repair the garage</span><span className="ct">31 guides</span></a>
          <a href="/en/repair/exterior/"     className="row"><span className="n">05</span><span className="t">Repair the exterior</span><span className="ct">38 guides</span></a>
          <a href="/en/repair/basement/"     className="row"><span className="n">06</span><span className="t">Repair the basement</span><span className="ct">24 guides</span></a>
        </div>
      </div>
    </div>
  </section>
);

/* ===================== COLOPHON ===================== */
const RepairBathroomColophon = () => (
  <section className="rb-colophon">
    <h2>Found the repair <em>you're after?</em></h2>
    <p>Turn the water off first, fix the leak you can see, find the leak you can't, then replace the parts that are still working but old. That's the right order — and it's the one that keeps the repair from compounding into something that costs a contractor call.</p>
    <a href="/en/bathroom/" className="go">Back to Bathroom →</a>
  </section>
);

/* ===================== EXPORTS ===================== */
window.RepairBathroomHero        = RepairBathroomHero;
window.RepairBathroomMenu        = RepairBathroomMenu;
window.RepairBathroomEssay       = RepairBathroomEssay;
window.RepairBathroomPick        = RepairBathroomPick;
window.RepairBathroomCategories  = RepairBathroomCategories;
window.RepairBathroomMistakes    = RepairBathroomMistakes;
window.RepairBathroomTools       = RepairBathroomTools;
window.RepairBathroomSequence    = RepairBathroomSequence;
window.RepairBathroomFaq         = RepairBathroomFaq;
window.RepairBathroomTechniques  = RepairBathroomTechniques;
window.RepairBathroomRelated     = RepairBathroomRelated;
window.RepairBathroomColophon    = RepairBathroomColophon;
