/* Sam's article — August AC Prep: Filters, Coils, and the $8 Fix
 * Shortest, tightest shape in the batch: Crumbs, Hero, Lede, Jobs (3), NotYours, Affiliate, Signoff.
 * No WhatYouNeed, no HotTakes. Seasonal / urgent register.
 * Affiliate: /go/sam-ac-filters, rel=sponsored nofollow, disclosure directly below.
 * Exactly one affiliate anchor on the page, in the Affiliate card only.
 */

const SamSays = ({ children }) => (
  <div className="sa-step-says">
    <span className="who">- Sam</span>
    <p>{children}</p>
  </div>
);

const heroImage = "cover.jpg";
const imgCondensate = "sam-fig-condensate.jpg";

const Crumbs = () => (
  <nav className="sa-crumbs" aria-label="Breadcrumb">
    <div className="l">
      <a href="/">Home</a>
      <span>/</span>
      <a href="/en/contributors/sam/">Sam</a>
      <span>/</span>
      <span>Repair</span>
      <span>/</span>
      <span style={{ color: "#EFE5CF" }}>August AC prep</span>
    </div>
    <div className="r">
      <span>Issue 08 | Summer '26</span>
      <span className="by">written by Sam</span>
    </div>
  </nav>
);

const STATS = [
  { stat: "3", note: "jobs, all of them yours — none involve refrigerant or wiring" },
  { stat: "~$8", note: "vinegar and a funnel, which is the one that saves a ceiling" },
  { stat: "2 ft", note: "of clear air the outdoor unit needs on every side" }
];

const Hero = () => (
  <section className="sa-hero">
    <div className="img" style={{ backgroundImage: `url('${heroImage}')` }} />
    <div className="sa-hero-wrap">
      <div>
        <div className="sa-hero-kicker">
          <span>Sam</span>
          <span className="dot">*</span>
          <span>Seasonal + Repair</span>
          <span className="dot">*</span>
          <span className="sig">written by Sam</span>
        </div>
        <h1>
          Your AC doesn't break in August. <em>It gives up.</em>
        </h1>
        <p className="standfirst">
          three jobs, one afternoon, and the one that saves a ceiling costs about eight dollars.
        </p>
      </div>
      <div className="sa-hero-side">
        {STATS.map((s) => (
          <div className="row" key={s.stat} style={{ gap: 18, alignItems: "baseline" }}>
            <span style={{ textTransform: "none", letterSpacing: "0.03em", lineHeight: 1.45, maxWidth: "26ch" }}>{s.note}</span>
            <span className="v" style={{ flexShrink: 0, whiteSpace: "nowrap" }}>{s.stat}</span>
          </div>
        ))}
        <div className="row">
          <span>Updated</span>
          <span className="v">Aug '26</span>
        </div>
      </div>
    </div>
    <div className="sa-hero-scribble" style={{ top: "18%", bottom: "auto", right: "5%" }}>
      it ran out of <u>margin</u>, not luck.
      <svg viewBox="0 0 60 30" fill="none">
        <path d="M2 22 C 12 8, 28 4, 56 12" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
        <path d="M48 6 L 56 12 L 50 20" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" fill="none" />
      </svg>
    </div>
  </section>
);

const Lede = () => (
  <section className="sa-lede">
    <div className="sa-lede-wrap">
      <aside className="sa-lede-side">
        <div className="marker">Three jobs</div>
        <ul>
          <li>The filter</li>
          <li>The outdoor coil</li>
          <li>The $8 fix</li>
          <li>What isn't yours</li>
        </ul>
      </aside>

      <div className="sa-lede-body">
        <p className="dropcap">
          nothing about an air conditioner fails suddenly in august. what happens is that it's been working slightly harder every week since may — through a filter that went in around march, past an outdoor coil wearing a coat of seed fluff, with a drain line quietly silting up — and then one afternoon it's ninety-five degrees and the system runs out of margin all at once.
        </p>
        <div className="sa-pullquote">
          <p>
            it didn't break. it spent four months using up the room it had.
          </p>
        </div>
        <p>
          the good news: the three things carrying most of that load are all yours, they take an afternoon, and none of them involve refrigerant, wiring or a capacitor. those three belong to somebody with a license, and i'm not going to pretend otherwise.
        </p>
      </div>

      <aside className="sa-margin">
        <span className="lab">Sam's note</span>
        <h4>Write the size down</h4>
        <p>
          read the filter size off the old cardboard frame before you bin it. it's the difference between buying one and guessing in an aisle.
        </p>
      </aside>
    </div>
  </section>
);

const JOBS = [
  {
    n: "01",
    phase: "Job one | the filter",
    title: "The filter, fitted the right way round.",
    wide: true,
    body: (
      <>
        <p>
          before you throw the old one out, read the size printed on the cardboard frame and put it in your phone. that's the single most reliable way to avoid standing in a store holding a tape measure and guessing.
        </p>
        <p>
          then the bit that trips everybody: the new filter has a small arrow printed on its frame, and that arrow points the way the air travels — away from the room, toward the ducting and the blower. in backwards, and the filter's structure works against the airflow instead of with it. two-second detail, all-summer consequence.
        </p>
        <p>
          on ratings, honestly: higher is not automatically better. a denser filter catches more and also <em>resists</em> more, and a system designed around a modest filter can end up starved behind a very fine one. if the manual or the old filter tells you what belongs there, follow that instead of the biggest number on the shelf.
        </p>
      </>
    ),
    tip: { lab: "monthly, in peak season", text: "not because it's due — because a filter that's grey and furred is a filter making the whole system pull against a blanket." }
  },
  {
    n: "02",
    phase: "Job two | the coil",
    title: "The outdoor unit is probably wearing a coat.",
    wide: true,
    body: (
      <>
        <p>
          the outdoor unit sheds heat through a fin pack, and that fin pack has spent all summer working as a very effective net for grass clippings, cottonwood, dandelion fluff and one particular leaf that will be there forever.
        </p>
        <p>
          pull the debris out by hand, brush the fins with something soft, and cut back anything growing into it so there's roughly two feet of clear air on every side. a shrub that looks charming against the condenser is quietly reducing how much heat your house can get rid of.
        </p>
        <p>
          rinse with a garden hose on a gentle spray, working from the inside of the fins outward so the debris goes back the way it came instead of deeper in. <strong>not a pressure washer.</strong> those fins are thin aluminium and a pressure washer folds them flat — which turns a dirty coil into a permanently restricted one, and a fifteen-minute job into a repair.
        </p>
      </>
    ),
    warn: { lab: "Power off, both places", text: "the disconnect box on the wall beside the unit AND the breaker inside. do both, every time, before your hands go anywhere near it. this is not a step to be clever about." }
  },
  {
    n: "03",
    phase: "Job three | the $8 fix",
    title: "The drain line decides whether this becomes a ceiling.",
    flip: false,
    body: (
      <>
        <p>
          your air conditioner doesn't only cool the air, it pulls water out of it — and all of that water has to leave the house through a plastic pipe.
        </p>
        <p>
          that pipe grows a biofilm over the season. slime, essentially, building up in a warm dark wet tube exactly the way you'd expect. when it finally blocks, one of two things happens: with a float switch, the system shuts itself off, which is annoying and is the <em>good</em> outcome. without one, the water backs up and arrives somewhere it wasn't invited — a pan, a closet floor, a ceiling.
        </p>
        <p>
          the fix is boring. find the T-shaped vent near the indoor air handler and pull its cap. at the open end of the line, draw the standing water and gunk out with a wet/dry vacuum. then pour a cup of plain white vinegar into the vent to break down whatever's regrowing, and put the cap back. a jug of vinegar and a funnel. every couple of months through the season, and the pipe never gets its chance.
        </p>
      </>
    ),
    warn: { lab: "Stop and call somebody if", text: "there's water pooling around the indoor unit, a stain spreading on a ceiling, or the system shutting itself off repeatedly. that's past maintenance and into a leak, and the cost of guessing there is a ceiling." },
    fig: { img: imgCondensate, tag: "Fig 01 | The drain line", cap: "cap off, vacuum at the open end, a cup of vinegar down the vent. eight dollars, twice a season." },
    says: "the cheapest job on this page is the one that prevents the expensive one."
  }
];

const Job = ({ data }) => (
  <article
    className={`sa-step ${data.flip ? "flip" : ""}`}
    style={data.wide ? { gridTemplateColumns: "1fr", maxWidth: 880 } : undefined}
  >
    <div className="sa-step-text">
      <div className="sa-step-meta">
        <span className="sa-step-num">{data.n}</span>
        <span className="sa-step-phase">{data.phase}</span>
      </div>
      <h3>{data.title}</h3>
      <div className="sa-step-body">{data.body}</div>
      {data.tip && (
        <div className="sa-step-tip">
          <span className="lab">{data.tip.lab}</span>
          <p>{data.tip.text}</p>
        </div>
      )}
      {data.warn && (
        <div className="sa-step-warn">
          <span className="lab">{data.warn.lab}</span>
          <p>{data.warn.text}</p>
        </div>
      )}
    </div>
    {data.fig && (
      <figure className="sa-step-fig">
        <div className="frame">
          <span className="tag">{data.fig.tag}</span>
          <img src={data.fig.img} alt="" loading="lazy" />
        </div>
        <figcaption>{data.fig.cap}</figcaption>
        {data.says && <SamSays>{data.says}</SamSays>}
      </figure>
    )}
  </article>
);

const Jobs = () => (
  <section className="sa-steps">
    <div className="sa-steps-wrap">
      <header className="sa-steps-head">
        <h2>
          One afternoon. <em>Three jobs.</em>
        </h2>
        <span className="count">03 JOBS | FILTER, COIL, DRAIN LINE</span>
      </header>
      {JOBS.map((j) => (
        <Job key={j.n} data={j} />
      ))}
    </div>
  </section>
);

const NotYours = () => (
  <section className="sa-redo">
    <div className="sa-redo-wrap">
      <div className="sa-redo-side">
        not yours
        <svg viewBox="0 0 80 60" fill="none">
          <path d="M6 42 C 22 16, 48 10, 74 24" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" />
        </svg>
      </div>
      <div>
        <h2>
          Three things that <em>belong to somebody licensed</em>
        </h2>
        <p>
          <strong>Refrigerant.</strong> it's a closed system. if it's low, there's a leak — and topping it up without finding the leak is paying twice for the same afternoon.
        </p>
        <p>
          <strong>The capacitor.</strong> it holds a charge after the power is off. that sentence is the whole reason not to touch it.
        </p>
        <p>
          <strong>Anything at the panel.</strong> the disconnect and the breaker are switches you're allowed to use. the wiring behind them is not a saturday project.
        </p>
      </div>
    </div>
  </section>
);

const Affiliate = () => (
  <section
    style={{
      background: "var(--sa-bg-soft)",
      borderTop: "1px solid var(--sa-rule)",
      borderBottom: "1px solid var(--sa-rule)",
      padding: "56px 24px"
    }}
  >
    <div
      style={{
        maxWidth: 780,
        margin: "0 auto",
        background: "var(--sa-bg-card)",
        border: "1px solid var(--sa-rule)",
        borderLeft: "3px solid var(--sa-marker)",
        borderRadius: 4,
        padding: "32px 34px"
      }}
    >
      <span
        style={{
          fontFamily: "'JetBrains Mono', monospace",
          fontSize: 10,
          letterSpacing: "0.3em",
          textTransform: "uppercase",
          color: "var(--sa-marker)"
        }}
      >
        Buy the size, not the number
      </span>
      <p
        style={{
          fontFamily: "'Playfair Display', serif",
          fontSize: 23,
          lineHeight: 1.35,
          color: "var(--sa-cream)",
          margin: "14px 0 18px"
        }}
      >
        read the size off the old cardboard frame first, then buy a multi-pack in that exact size so the next three changes are already in the closet. this link opens on one of the common sizes — change it to yours. and the rating that belongs in your system is the one the manual asks for, not the highest one on the shelf.
</p>
      <a
        href="/go/sam-ac-filters"
        rel="sponsored nofollow"
        style={{
          display: "inline-block",
          background: "var(--sa-marker)",
          color: "#100E0B",
          fontFamily: "'DM Sans', sans-serif",
          fontWeight: 700,
          fontSize: 14,
          letterSpacing: "0.02em",
          textDecoration: "none",
          padding: "12px 26px",
          borderRadius: 999
        }}
      >
        pleated furnace and AC filters →
      </a>
      <p
        style={{
          fontFamily: "'DM Sans', sans-serif",
          fontSize: 12,
          lineHeight: 1.5,
          color: "var(--sa-mute)",
          margin: "18px 0 0"
        }}
      >
        some links on this page are affiliate links — if you buy through one, we earn a commission at no extra cost to you.
      </p>
    </div>
  </section>
);

const Signoff = () => (
  <section className="sa-signoff">
    <div className="sa-signoff-wrap">
      <div>
        <h2>
          Filter, coil, drain line. <em>Then it has margin again.</em>
        </h2>
        <p>
          one afternoon in august, and the system spends the rest of the summer with room to spare instead of running on the last of it.
        </p>
        <div className="sig">— sam</div>
        <div className="ctas" style={{ marginTop: 28 }}>
          <a href="/en/contributors/sam/" className="btn primary">
            More from Sam
          </a>
          <a href="/contact/" className="btn ghost">
            Ask Sam a question
          </a>
        </div>
      </div>
      <div className="sa-readnext">
        <span className="lab">Read next</span>
        <a href="/en/contributors/sam/the-first-hour-of-water-damage/">
          <span>The first hour of water damage</span>
          <span className="m">SAM</span>
        </a>
        <a href="/en/contributors/sam/garage-corner-gym/">
          <span>A real home gym in a garage corner</span>
          <span className="m">SAM</span>
        </a>
        <a href="/en/contributors/sam/first-home-insurance/">
          <span>Insure your first home without overpaying</span>
          <span className="m">SAM</span>
        </a>
        <a href="/en/contributors/sam/">
          <span>All of Sam's guides</span>
          <span className="m">PROFILE</span>
        </a>
      </div>
    </div>
  </section>
);

const Article = () => (
  <div className="sa">
    <Crumbs />
    <Hero />
    <Lede />
    <Jobs />
    <NotYours />
    <Affiliate />
    <Signoff />
  </div>
);

ReactDOM.createRoot(document.getElementById("root")).render(<Article />);
