/* THE BLUE PENCIL · How We Work, layout B (board). Loads last, after v2.css and the pack's grain and type layers.
   The six parts are the page's numbered long-form blocks: the section sign and its number stand in the reading column
   in ultramarine Libre Baskerville, hung to the left of the heading, and the heading's words and the running text line up beside
   it. The sign is the page's own numbering, read once by sight: aria-hidden, so a screen reader hears the heading only.
   Proofreading marks hang along the left, outside the red line; they are decoration only. No ruling anywhere.
   Every colour, width and size comes from tokens.css. Every rule is scoped .how-we-work, so no other page changes. */

.how-we-work .hw-ms {
  --hang: 4.5rem; /* the § column: the sign hangs here, the words line up after it */
}

/* styles.css paints every <section> as a desk band with 72px of air; inside the page they are passages, not bands */
.how-we-work .hw-ms section {
  padding: 0;
  background: none;
}

.how-we-work .hw-ms .ms-sec + .ms-sec {
  margin-top: calc(var(--s4) * 3);
}
.how-we-work .hw-ms .hw-cta {
  margin-top: var(--s6);
}

/* ── the § head: sign | words, one rule over both ── */
.how-we-work h2.hw-h {
  display: grid;
  grid-template-columns: var(--hang) minmax(0, 1fr);
  align-items: baseline;
}
.how-we-work .hw-no {
  font-family: var(--fd);
  font-weight: var(--w-display);
  font-size: 0.82em;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ultra);
  white-space: nowrap;
}

/* the running text lines up with the heading's words, not with the sign */
.how-we-work .hw-tx {
  padding-left: var(--hang);
}
.how-we-work .hw-tx p + p {
  margin-top: calc(var(--s3) + var(--s1));
}

/* the phrase the coach rings: the ring stands clear round the words (the sprite symbol keeps its own proportion,
   so the box it fills is given that proportion's air), and the words never move */
.how-we-work .hw-ring {
  padding: 0 0.5em 0 0.78em;
  margin: 0 -0.3em 0 -0.36em;
}
.how-we-work .hw-ring > svg.ring-mk {
  left: 0;
  top: -0.5em;
  width: 100%;
  height: calc(100% + 0.84em);
}

/* the coach's margin notes: two of the page's own lines, set in the hand, beside the words they answer */
.how-we-work .hw-mn {
  padding-top: var(--s1);
}

/* the list: a tick per line, hung in the left gutter outside the red line (the list is indented by the hang) */
.how-we-work .hw-list > li + li {
  margin-top: var(--s3);
}
.how-we-work .hw-list > li > svg.lm {
  left: calc(-88px - var(--hang));
}

/* the close: the button sits a clear step under its words */
.how-we-work .hw-cta .btn {
  margin-top: var(--s1);
}

/* narrow: the margin folds under its words (v2.css); the sign stands above the heading so the words keep the width */
@media (max-width: 859px) {
  .how-we-work .hw-ms {
    --hang: 0px;
  }
  .how-we-work h2.hw-h {
    display: block;
  }
  .how-we-work .hw-no {
    display: block;
    margin-bottom: var(--s2);
    font-size: 0.7em;
  }
  .how-we-work .hw-ms .ms-sec + .ms-sec {
    margin-top: var(--s5);
  }
  .how-we-work .hw-ms .hw-cta {
    margin-top: calc(var(--s5) + var(--s4));
  }
  .how-we-work .hw-mn {
    margin: var(--s3) 0 0;
    padding-top: 0;
  }
  .how-we-work .hw-list > li > svg.lm {
    left: -50px;
  }
  /* the ringed phrase may open a line here: it keeps its own room rather than reaching back past the column */
  .how-we-work .hw-ring {
    padding: 0 0.5em 0 0.86em;
    margin: 0 -0.3em 0 0;
  }
}

/* ── Pass 0: the home page's standard (16 Nov 2026). JC keeps the § numbers on this page. ── */

/* the home page's wider reading column and narrower margin */
.how-we-work .hw-ms { --col: 52rem; --gap: 56px; }
@media (max-width: 1099px) { .how-we-work .hw-ms { --col: 36rem; --gap: 48px; } }

/* each part takes its own rows, so the grey edge can run beside it without pushing anything down */
.how-we-work .hw-blk > h2 { grid-row: 1; }
.how-we-work .hw-blk > .hw-tx { grid-row: 2; }
.how-we-work .hw-blk > .hw-mn { grid-column: 2; grid-row: 2; }

/* the margin note: Caveat at the home page's size, a six-point asterisk before it */
.how-we-work .hw-mn { font-size: 32px; padding-top: 0; }
.how-we-work svg.star-mk {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin: 0 10px 0 0;
  vertical-align: top;
  position: relative;
  top: 0.12em;
}

/* marks on the words themselves: an underline or a ring round one short phrase */
.how-we-work svg.ul-mk {
  position: absolute;
  left: -0.05em;
  bottom: -0.45em;
  width: calc(100% + 0.1em);
  height: 0.5em;
  max-width: none;
  pointer-events: none;
}
.how-we-work .boxed.circd { margin: 0 0.75em 0 0.8em; padding-right: 0.2em; }
.how-we-work svg.circ-mk {
  position: absolute;
  left: -0.8em;
  top: -0.5em;
  width: calc(100% + 1.55em);
  height: calc(100% + 1em);
  max-width: none;
  pointer-events: none;
}
.how-we-work .hw-list > li { line-height: 1.9; }

/* the spaces between the parts, tightened as on the services page */
.how-we-work .hw-ms .ms-sec + .ms-sec { margin-top: 56px; }
.how-we-work .hw-ms .hw-cta { margin-top: 56px; }
.how-we-work .hw-ms { padding-bottom: 64px; }

/* the close spans both columns */
.how-we-work .hw-cta > h2,
.how-we-work .hw-cta > .tx { grid-column: 1 / -1; }

/* the margin's quiet grey edge is drawn per part, so it never crosses a rule that runs across both columns */
@media (min-width: 860px) {
  .how-we-work .hw-ms::after { display: none; }
  .how-we-work .hw-blk::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: start;
    align-self: stretch;
    width: 0;
    margin-left: calc(var(--gap) / -2);
    border-left: var(--w-rule) solid var(--rule);
    pointer-events: none;
  }
}
@media (max-width: 859px) {
  .how-we-work .hw-mn { font-size: 26px; }
  .how-we-work svg.star-mk { width: 20px; height: 20px; }
  .how-we-work .hw-ms .ms-sec + .ms-sec { margin-top: 48px; }
  .how-we-work .hw-ms .hw-cta { margin-top: 48px; }
  .how-we-work .hw-ms { padding-bottom: 48px; }
}

/* a marked phrase hugs the comma or full stop after it */
.how-we-work .hw-list .boxed { padding-right: 0; margin-right: 0; }
.how-we-work .boxed.circd { margin-right: 0.5em; padding-right: 0.1em; }

/* ── JC's notes, 16 Nov 2026 ── */

/* the hero's lead stays on one line wherever the page has room; on narrower screens it flows */
@media (min-width: 1000px) {
  .how-we-work .hero p.lead { max-width: none; white-space: nowrap; }
}

/* no § numbers: the heads are plain words, so the text no longer hangs under a sign column */
.how-we-work .hw-ms { --hang: 0px; }
.how-we-work h2.hw-h { display: block; }

/* the first part has no rule above its head, as on the home page */
.how-we-work .hw-ms > .hw-blk:first-of-type > h2 { border-top: 0; padding-top: 0; }

/* the hand-drawn § in the left gutter, one by each head, centred in the gutter left of the red line */
.how-we-work svg.hw-sec { width: 28px; height: 40px; left: -82px; top: calc(var(--s3) - 8px); }
.how-we-work .hw-ms > .hw-blk:first-of-type > h2 > svg.hw-sec { top: -8px; }
@media (max-width: 859px) {
  .how-we-work svg.hw-sec { width: 20px; height: 28px; left: -45px; top: calc(var(--s3) - 4px); }
  .how-we-work .hw-ms > .hw-blk:first-of-type > h2 > svg.hw-sec { top: -4px; }
}

/* JC: the section sign a little thicker than the other marks */
.how-we-work svg.hw-sec { --pmw: 3.1; }
