/* global React */

const CS_IMG = {
  cover:   "https://images.unsplash.com/photo-1494578379344-d6c710782a3d?w=1400&q=80", // sun-baked light, warm tones
  bleed:   "https://images.unsplash.com/photo-1508739773434-c26b3d09e071?w=2000&q=80", // mediterranean afternoon street
  pair1:   "https://images.unsplash.com/photo-1521336575822-6da63fb45455?w=1100&q=80",  // tailored cotton, cream
  pair2:   "https://images.unsplash.com/photo-1485518882345-15568b007407?w=1100&q=80",  // worn-in linen / lived-in
  next1:   "https://images.unsplash.com/photo-1469334031218-e382a71b716b?w=1200&q=80",  // dress on hanger / linen
  next2:   "https://images.unsplash.com/photo-1490481651871-ab68de25d43d?w=1200&q=80",  // bag/accessory
  next3:   "https://images.unsplash.com/photo-1550639525-c97d455acf70?w=1200&q=80",   // shoe / sandal
};

function CSTopper() {
  return (
    <div className="cs-topper">
      <div className="crumb">
        <a href="/">How To: Fashion</a>
        <span className="sep">/</span>
        <a href="/en/contributors/nelly/">Nelly</a>
        <span className="sep">/</span>
        <span>Dispatch</span>
        <span className="sep">/</span>
        <span className="here">Cotton suiting in deep heat</span>
      </div>
      <div className="stamp">
        <span className="dot" />
        Dispatch · Vol. 04 · No. 11
      </div>
    </div>
  );
}

function CSCover() {
  return (
    <section className="cs-cover" data-screen-label="01 Cover">
      <div className="frame">
        <div className="lhs">
          <div className="issue">A Dispatch · Summer Volume</div>
          <h1>
            Cotton suiting
            <span className="it">in deep heat.</span>
          </h1>
          <p className="deck">
            Notes from a hundred-degree afternoon, on the only suit a woman should
            consider in July, and what wearing one teaches you about everything else.
          </p>
          <div className="byline">
            <span>By <span className="name"><a href="/en/contributors/nelly/">Nelly</a></span></span>
            <span className="div" />
            <span>Filed from Lisbon</span>
            <span className="div" />
            <span>July 14, 2026</span>
            <span className="div" />
            <span>14 min read</span>
          </div>
        </div>
        <div className="rhs">
          <div
            className="plate"
            style={{ backgroundImage: `url(${CS_IMG.cover})` }}
          >
            <span className="stamp">Plate I · Cream cotton, mid-afternoon</span>
            <span className="credit">Largo do Carmo · 102°F</span>
          </div>
          <div className="plate-cap">
            <span>Plate I — The reference garment, in situ.</span>
            <span className="accent">Roll 11 · Frame 02</span>
          </div>
        </div>
      </div>
    </section>
  );
}

function CSDateline() {
  return (
    <section className="cs-dateline" data-screen-label="02 Dateline">
      <div className="cell">
        <div className="l">Filed from</div>
        <div className="v">Lisbon, Portugal</div>
      </div>
      <div className="cell">
        <div className="l">Conditions</div>
        <div className="v"><span className="it">39°C · still air</span></div>
      </div>
      <div className="cell">
        <div className="l">Garment</div>
        <div className="v">One cotton suit</div>
      </div>
      <div className="cell">
        <div className="l">Worn</div>
        <div className="v"><span className="it">Six days running</span></div>
      </div>
      <div className="cell">
        <div className="l">Photographed</div>
        <div className="v">Daily, on film</div>
      </div>
    </section>
  );
}

function CSBody1() {
  return (
    <section className="cs-section" data-screen-label="03 Open">
      <div className="cs-prose">
        <aside className="cs-margin cs-margin-l">
          <span className="m-num">i.</span>
          <span className="m-label">On Lisbon</span>
          <span className="m-body">
            The city is a long argument between stone and shade. In July, the stone wins.
          </span>
          <hr />
          <span>Notebook · 14 July, 14:20</span>
        </aside>
        <div className="cs-col">
          <p className="lede">
            The first thing the heat does is dismantle your assumptions about clothes.
            On a normal day in May you can wear almost anything and call it a uniform —
            a wool trouser, a knit, a jacket if the room is cold. By the second hour of a
            real heatwave none of that holds. The wool is a pelt. The knit is a punishment.
            The jacket has become an argument with your own body. What is left, when the
            sun has burned off your wardrobe, is the question of what to do <em>now</em>.
          </p>
          <p>
            I am writing this in a small room above a tiled courtyard in the Bairro Alto,
            with the shutters half-closed and a glass of warm water on the table, and the
            answer I keep coming back to is the same answer I have come back to for ten
            summers: <strong>one good cotton suit</strong>. Not linen — we will get to linen.
            Not seersucker, not silk, not the technical-fabric "summer-weight" wool that the
            menswear blogs swear by. A cotton suit. Cut for a woman, in a fabric that has
            been beaten on a stone in some other century, and wears like it.
          </p>
          <p>
            The Italians and the Portuguese figured this out a long time ago. The English
            never did, which is why English summer dressing is, with a few honourable
            exceptions, a sad performance. The Americans built air conditioning instead,
            which is a kind of answer but not the right one. The right answer is cloth that
            knows what to do when the body underneath it begins to fail.
          </p>
        </div>
        <aside className="cs-margin cs-margin-r">
          <span className="m-label">Note</span>
          <span className="m-body">
            "Summer-weight" wool is wool. In a heatwave, this matters more than the brochure suggests.
          </span>
        </aside>
      </div>
    </section>
  );
}

function CSPull1() {
  return (
    <section className="cs-pull">
      <div className="frame">
        <div className="mark">"</div>
        <blockquote>
          Cloth that knows what to do <span className="em">when the body underneath it begins to fail.</span>
        </blockquote>
        <cite>— N · Lisbon · July</cite>
      </div>
    </section>
  );
}

function CSBody2() {
  return (
    <section className="cs-section" data-screen-label="04 Why cotton">
      <div className="cs-prose">
        <aside className="cs-margin cs-margin-l">
          <span className="m-num">ii.</span>
          <span className="m-label">Field test</span>
          <span className="m-body">
            Six days. Two cleanings. The trouser still has the shape of my knee in it.
          </span>
        </aside>
        <div className="cs-col">
          <h2>
            <span className="num">Part One</span>
            Why cotton, <span className="it">and not the other things.</span>
          </h2>
          <p>
            The case for cotton is structural. Cotton is the only common suiting fabric that
            absorbs moisture without holding it; the fibres pull sweat off the skin, the
            weave breathes, and a half-decent cut hangs away from the body the way a
            curtain hangs from a window — letting air do the work. Linen does the same in
            theory and crumples on contact in practice; you spend the day either ironing or
            apologising. Silk-blends are a compromise that compromises the wrong way. And
            wool, even the lightest tropical wool, traps heat against the body the second
            you stop moving — which, in a heatwave, is most of what you do.
          </p>
          <p>
            What you want is a cotton suiting <em>woven for the heat</em>. The Italians
            call it <em>cotone leggero</em>, a thirty-percent canvas, eight or nine ounces,
            with enough body to take a crease but enough give to stop holding one. Look for
            a slightly slubby surface; perfectly smooth cotton suiting is almost always
            mercerised, which destroys the very thing you came for. The fabric should feel
            faintly papery in your fingers. It should rumple when you sit and recover when
            you stand. It should, after a day, smell faintly of itself.
          </p>
          <h2>
            <span className="num">Part Two</span>
            What a <span className="it">good cotton suit looks like.</span>
          </h2>
          <p>
            Begin with the jacket and end with the trouser. The jacket should be unstructured
            — no canvas, no pads, only fabric and lining and a little intelligence at the
            shoulder. Half-lined at most; an unlined back is better still. The lapel should be
            a notch, the buttons should be horn or covered, and the body should be cut to fall
            an inch away from the waist when you stand still. If it grips you when you stand,
            it will strangle you when you walk.
          </p>
          <p>
            The trouser is the harder of the two. A wide leg is unflattering on a hot day in
            a way it is not on a cool one — the fabric has to fall, and falling fabric in
            humidity reads as draped, which reads as tired. A clean tapered leg with a
            slight break, taken in by half an inch at the calf, photographs and walks
            better than any trouser I own. Pleats are optional. Cuffs are not — a cuff
            holds the shape of the trouser the way the right shoe holds the shape of a foot.
          </p>
        </div>
        <aside className="cs-margin cs-margin-r">
          <span className="m-num">iii.</span>
          <span className="m-label">Mercerised</span>
          <span className="m-body">
            A finishing process that gives cotton a synthetic sheen — and undoes most of what cotton was for.
          </span>
          <hr />
          <span>See footnote 02</span>
        </aside>
      </div>
    </section>
  );
}

function CSBleed() {
  return (
    <React.Fragment>
      <div className="cs-bleed" data-screen-label="05 Bleed" style={{ backgroundImage: `url(${CS_IMG.bleed})` }}>
        <span className="stamp">Plate II · Largo do Carmo, 15:40</span>
        <span className="credit">Roll 11 · Frame 18</span>
      </div>
      <div className="cs-bleed-cap">
        <span>Plate II — The square at the hottest hour. The shadows are doing the work the clothes can't.</span>
        <span className="accent">39°C · still air</span>
      </div>
    </React.Fragment>
  );
}

function CSPaired() {
  return (
    <section className="cs-paired" data-screen-label="06 Paired">
      <div className="head">
        <div className="num">No. 03</div>
        <h3>
          The suit, <span className="it">clean and lived-in.</span>
        </h3>
        <div className="meta">
          Day one and day six<br />— same garment, different argument
        </div>
      </div>
      <div className="pair">
        <div>
          <div className="plate" style={{ backgroundImage: `url(${CS_IMG.pair1})` }}>
            <span className="stamp">Plate III · Day one</span>
          </div>
          <div className="plate-body">
            <p className="h">
              <span className="accent">Pressed.</span> The cuff sharp, the lapel
              sitting flat, the trouser falling clean from the hip. This is the
              suit at its most flattering and least useful — it has not yet
              proved anything.
            </p>
            <p>
              A pressed cotton suit is a promise. A worn one is a record.
            </p>
          </div>
        </div>
        <div>
          <div className="plate" style={{ backgroundImage: `url(${CS_IMG.pair2})` }}>
            <span className="stamp">Plate IV · Day six</span>
          </div>
          <div className="plate-body">
            <p className="h">
              <span className="accent">Lived-in.</span> The trouser remembers
              the knee. The jacket has loosened across the back. The cuff has a
              soft mark where the watch sits. Nothing has been ironed in four days.
            </p>
            <p>
              This is the suit doing the thing it was bought for. The day-one
              version is a costume; the day-six version is a wardrobe.
            </p>
          </div>
        </div>
      </div>
    </section>
  );
}

function CSPull2() {
  return (
    <section className="cs-pull">
      <div className="frame">
        <blockquote>
          A pressed cotton suit is a promise.<br />
          A worn one <span className="em">is a record.</span>
        </blockquote>
        <cite>— Field notes, day six</cite>
      </div>
    </section>
  );
}

function CSField() {
  const notes = [
    {
      n: "01",
      t: "On colour",
      h: "Cream first, then everything else.",
      p: "A cream cotton suit reads cool from across a room and warm up close, which is the right way around in summer. Navy is the second answer. Grey is a winter argument that has wandered into the wrong season."
    },
    {
      n: "02",
      t: "On the shirt underneath",
      h: "A man's shirt, oversized.",
      p: "Worn open over a sleeveless cotton shell, never tucked. The shirt does the second half of the work the suit started — keeping the cloth off the skin without adding a layer."
    },
    {
      n: "03",
      t: "On the bag",
      h: "Leather, on purpose.",
      p: "Canvas in heat reads as beach. Straw reads as costume. A small worn leather bag — one that has seen enough summers to know the rules — does the job. Brown over black. Patina over polish."
    },
    {
      n: "04",
      t: "On shoes",
      h: "The suit decides this.",
      p: "An unstructured cream cotton suit demands a sandal — flat, leather, ankle-strapped if you are walking. Anything closed reads heavy on a hot day, no matter how light it actually is."
    },
    {
      n: "05",
      t: "On the jewellery",
      h: "One thing, in gold.",
      p: "Silver oxidises in heat, on the skin, in interesting ways — but the wrong ways. Gold sits cool against a damp wrist. Pearls are a separate category and welcome on any occasion."
    },
    {
      n: "06",
      t: "On laundering",
      h: "Cold water, no dryer, line.",
      p: "A real cotton suit is washable; this is half its argument. Cold water, mild detergent, no spin. Hang it damp on a wide wooden hanger and let the weight of the water pull the wrinkles out. Press only if you must."
    },
  ];
  return (
    <section className="cs-field" data-screen-label="07 Field notes">
      <div className="head">
        <div className="lhs">
          <div className="label">Field notes · No. 04</div>
          <h3>
            Six small <span className="it">observations.</span>
          </h3>
        </div>
        <div className="rhs">
          What you wear with the suit is, in the end, more important than the suit. The
          suit is the table. These are the things you set on it.
        </div>
      </div>
      <div className="grid">
        {notes.map((n, i) => (
          <article className="cs-note" key={i}>
            <div className="row">
              <span className="n">{n.n}</span>
              <span className="t">{n.t}</span>
            </div>
            <h4>{n.h}</h4>
            <p>{n.p}</p>
          </article>
        ))}
      </div>
    </section>
  );
}

function CSWardrobe() {
  const items = [
    {
      n: "01",
      nm: ["The Atelier ", { it: "cream." }],
      sub: "Margaret Howell · cotton-canvas suit · cream",
      why: "The reference garment. Half-lined, horn buttons, a cuff sharp enough to take notes against. The first one to consider; the last one you'll replace.",
      where: ["Margaret Howell", "London / online"]
    },
    {
      n: "02",
      nm: ["The honest ", { it: "navy." }],
      sub: "Studio Nicholson · cotton-twill blazer + Daria trouser",
      why: "Cooler in tone, easier with sandals, more forgiving on the day you didn't sleep. A mid-summer workhorse with a cleaner line than the cream version.",
      where: ["Studio Nicholson", "Online · NYC · LDN"]
    },
    {
      n: "03",
      nm: ["The Italian ", { it: "ghost." }],
      sub: "Aspesi · cotone leggero · stone",
      why: "Unstructured to the point of disappearing — almost a shirt, almost a trouser. The one you pack for a city you don't yet know the temperature of.",
      where: ["Aspesi", "Milan · select stockists"]
    },
    {
      n: "04",
      nm: ["The vintage ", { it: "argument." }],
      sub: "1970s Yves Saint Laurent · le smoking, in cotton",
      why: "Worth the hunt. The shoulders are wrong by a decade, which is exactly what makes the rest of the silhouette work in 2026. A jacket that is interesting before you've put it on.",
      where: ["Resee · Marie-Hélène", "Paris · Tokyo · online"]
    },
    {
      n: "05",
      nm: ["The local ", { it: "answer." }],
      sub: "Toogood · The Photographer, in cotton drill",
      why: "British, oddly cut, the closest thing on this list to wearing a building. Counts because it solves the heat problem with a structural argument rather than a fabric one.",
      where: ["Toogood", "London · Dover Street Market"]
    },
  ];
  return (
    <section className="cs-wardrobe" data-screen-label="08 Wardrobe">
      <div className="head">
        <div>
          <div className="label">No. 05 — A short index</div>
          <h3>
            Five cotton suits <span className="it">worth knowing.</span>
          </h3>
        </div>
        <div className="rhs">
          Not "the best." Not even the prettiest. The five I have either bought, borrowed,
          or argued with closely enough to recommend in the heat.
        </div>
      </div>
      <ul className="list">
        {items.map((it, i) => (
          <li className="cs-w-row" key={i}>
            <div className="n">0{i + 1}</div>
            <div className="nm">
              {it.nm.map((p, j) => typeof p === "string"
                ? <React.Fragment key={j}>{p}</React.Fragment>
                : <span key={j} className="it">{p.it}</span>
              )}
              <small>{it.sub}</small>
            </div>
            <div className="why">{it.why}</div>
            <div className="where">
              <span className="b">{it.where[0]}</span>
              <span>{it.where[1]}</span>
            </div>
          </li>
        ))}
      </ul>
    </section>
  );
}

function CSDispatch() {
  return (
    <section className="cs-dispatch">
      <div className="frame">
        <div className="label">In closing</div>
        <p>
          The cotton suit is the answer to a question I keep asking the closet, which is:
          <span className="em"> what do I wear when there is no good answer?</span> A heatwave
          asks the question every day for a week. The suit answers the same way every time —
          quietly, and slightly differently, and a little better than yesterday. By Friday the
          wrinkles have arranged themselves into something like a signature. By Saturday I am
          sad to wash it.
        </p>
        <p>
          Buy one good one. Wear it for the rest of your life. Send a postcard from somewhere
          warm.
        </p>
        <div className="sig">N.</div>
        <div className="sig-l">Nelly · Lisbon · July, 2026</div>
      </div>
    </section>
  );
}

function CSFootnotes() {
  return (
    <section className="cs-fn" data-screen-label="09 Footnotes">
      <div className="label">Footnotes</div>
      <ol>
        <li>
          The figure of "thirty-percent canvas" is a rough one — Italian mill terminology varies, and what you are
          really looking for is a cotton with a small percentage of stiffer fibre (often a hard-twisted yarn in the
          warp) that gives the cloth body without weight. A good tailor will be able to point at it.
        </li>
        <li>
          Mercerisation is not always a bad thing — for shirting, it can be a fine choice. For suiting, in heat,
          it kills the breathability you came for and adds a sheen the eye reads as synthetic. Avoid.
        </li>
        <li>
          Yes, I know about <em>fresco</em>. Fresco is wool, however lightly woven, and the rule about wool in
          a heatwave still applies.
        </li>
        <li>
          The Lisbon photographs throughout this piece were taken on a Contax T2 between 14:00 and 16:30 on the
          fourth day of a six-day heatwave that broke local records. The film stock is Portra 400, slightly overexposed
          to flatter the cream.
        </li>
        <li>
          On the question of whether a cotton suit can be worn to a wedding: it depends on the wedding. If the
          wedding is the kind of wedding at which someone is wearing morning dress, no. Otherwise, yes — and you
          will be the most comfortable person in the room.
        </li>
        <li>
          A note on price. A good cotton suit, off the rack, sits between $1,200 and $2,400. A great one,
          made-to-measure, will run twice that. A vintage one, found patiently, can be had for less than half.
          The made-to-measure version is — for any woman who plans to wear a suit at all — the one I would point at first.
        </li>
      </ol>
    </section>
  );
}

function CSAuthor() {
  return (
    <section className="cs-author">
      <div className="frame">
        <div className="av" style={{ backgroundImage: "url(/assets/nelly.png)" }} />
        <div className="body">
          <div className="label">Filed by — Lane Editor, Women</div>
          <h4>
            Nelly, <span className="it">on assignment in Lisbon.</span>
          </h4>
          <p>
            Twelve years as a stylist and fitter, mostly in Paris. Writes the Dispatch column,
            keeps the Substitution Index, and makes outfits the way an engineer makes
            buildings — from the joints out. This is her eleventh dispatch of the year.
          </p>
          <a className="more" href="/en/contributors/nelly/">More from Nelly →</a>
        </div>
      </div>
    </section>
  );
}

function CSNext() {
  const cards = [
    {
      img: CS_IMG.next1,
      n: "Build · No. 014",
      t: "8 min",
      h: ["The white shirt, ", { it: "engineered for August." }],
      p: "An oversized man's shirt, three sizes up, rolled to the elbow. The piece that does the second half of the suit's job."
    },
    {
      img: CS_IMG.next2,
      n: "Dispatch · No. 09",
      t: "11 min",
      h: ["Notes on bags ", { it: "for hot weather." }],
      p: "What to carry when the body is already carrying enough. A small case for one good leather bag, ten years in."
    },
    {
      img: CS_IMG.next3,
      n: "Substitutions · 03",
      t: "5 min",
      h: ["If you can't find a sandal, ", { it: "find a slipper." }],
      p: "An old Italian rule, applied. Why the right indoor shoe, worn outdoors, is sometimes the only summer shoe that works."
    },
  ];
  return (
    <section className="cs-next" data-screen-label="10 Next">
      <div className="head">
        <div className="num">No. 06</div>
        <h3>Read <span className="it">next.</span></h3>
        <div className="meta">From Nelly's column<br />— and the archive</div>
      </div>
      <div className="grid">
        {cards.map((c, i) => (
          <article className="cs-next-card" key={i}>
            <div className="img" style={{ backgroundImage: `url(${c.img})` }} />
            <div className="meta">
              <span className="n">{c.n}</span>
              <span>{c.t}</span>
            </div>
            <h4>
              {c.h.map((p, j) => typeof p === "string"
                ? <React.Fragment key={j}>{p}</React.Fragment>
                : <span key={j} className="it">{p.it}</span>
              )}
            </h4>
            <p>{c.p}</p>
          </article>
        ))}
      </div>
    </section>
  );
}

window.CSTopper = CSTopper;
window.CSCover = CSCover;
window.CSDateline = CSDateline;
window.CSBody1 = CSBody1;
window.CSPull1 = CSPull1;
window.CSBody2 = CSBody2;
window.CSBleed = CSBleed;
window.CSPaired = CSPaired;
window.CSPull2 = CSPull2;
window.CSField = CSField;
window.CSWardrobe = CSWardrobe;
window.CSDispatch = CSDispatch;
window.CSFootnotes = CSFootnotes;
window.CSAuthor = CSAuthor;
window.CSNext = CSNext;
