/* THE BLUE PENCIL · home page, layout B "the marked-up manuscript" (board).
   Loads last, after v2.css and the pack's grain.css and type.css. Every rule is scoped .home.
   The hero, header and footer stay as styles.css gives them; this file only places the manuscript below the hero.
   Every colour is a token. Marks are decoration (aria-hidden); the words and headings carry every meaning. */

/* the manuscript's sections are not styles.css's desk bands: no band padding, no desk fill */
.home .ms .ms-sec {
  padding: 0;
  background: none;
}

/* the sheet starts a little below the hero's desk */
.home .ms { margin-top: var(--s2); }

/* ── "Onesta means honest.": the heading runs, its first sentence is the coach's note beside it ── */
.home .ms-name > h2 { grid-row: 1; }
.home .ms-name > .mn { grid-row: 1; align-self: end; margin-bottom: var(--s4); }
.home .ms-name > .tx { grid-row: 2; }

/* the ring sits round the word, clear of its letters (the sprite's ring is inset in its box, the italic leans right);
   the word never moves, the spaces either side give the ring its room */
.home .ms-name .ringed { margin: 0.22em 0 0.06em 0.9em; } /* the top margin opens the line so the ring clears the line above */
.home .ms-name .ringed svg.ring-mk {
  stroke-width: 4.6px;
  left: -0.95em;
  top: -0.38em;
  width: calc(100% + 1.75em);
  height: 1.8em;
}

/* ── the three reasons: running text, each head a margin note, a mark at the left ── */
.home .ms-reasons > h2 { grid-row: 1; }
.home .ms-reasons > .lead-tx { grid-row: 2; }
.home .ms-reasons > .psg { grid-column: 1 / -1; margin-top: 44px; }
.home .psg > .tx { grid-row: 1; }
.home .psg > .mn { grid-row: 1; margin-top: -0.1em; }

/* ── "More than a paper.": the list runs, the lead is the note beside it ── */
.home .ms-more > h2 { grid-row: 1; }
.home .ms-more > ol { grid-row: 2; }
.home .ms-more > .mn { grid-row: 2; }
.home .ms-more ol.ml > li h3 {
  font-family: var(--fd);
  font-weight: var(--w-head);
  font-size: 1.4rem;
  line-height: 1.25;
}

/* ── the left-gutter marks: each sized to its own shape, all inside the gutter left of the red line ── */
/* the gutter is the 64px between the page's frame and the red line; each mark is centred in it (centre at -68px) */

/* ── the close: the last passage of the page, the button under its words ── */
.home .ms-cta > h2 { grid-row: 1; }
.home .ms-cta > .tx { grid-row: 2; }

/* narrow: one column in the markup's own order; the marks shrink into the narrow gutter */
@media (max-width: 859px) {
  .home .ms-name > .mn { margin: 0 0 var(--s4); }
  .home .ms-more > .mn { margin-bottom: var(--s4); }
  .home .ms-reasons > .psg { margin-top: 36px; }
  .home .psg > .mn { margin-top: 0; }
  .home .ms-more ol.ml > li h3 { font-size: 1.25rem; }

  /* the narrow gutter is the 34px left of the red line; each mark centred in it (centre at -35px) */
}

/* ── JC's notes on the home page, 16 Nov 2026 ── */

/* the lead's second sentence stays whole on one line (it may wrap on a phone, where there is no room) */
.home .hero-page .lead .nb { white-space: nowrap; }
@media (max-width: 640px) { .home .hero-page .lead .nb { white-space: normal; } }

/* with the card's caption gone the page under it needs no rule; the first passage has no rule above its heading */
.home .ms-name > h2 { border-top: 0; padding-top: 0; }

/* the left was too heavy: a wider reading column, a narrower margin, smaller notes */
.home { --col: 52rem; --gap: 56px; }
@media (max-width: 1099px) { .home { --col: 36rem; --gap: 48px; } }
.home p.mn { font-size: 26px; }
.home h3.mn { font-size: 32px; }
@media (max-width: 859px) {
  .home p.mn { font-size: 24px; }
  .home h3.mn { font-size: 28px; }
}

/* the call to action spans both columns */
.home .ms-cta > h2,
.home .ms-cta > .tx { grid-column: 1 / -1; }
.home .ms-cta > .tx { max-width: 80rem; }

/* ── JC's second round of notes, 16 Nov 2026 ── */

/* the lead on one line wherever the hero page has room; on narrower screens it flows (the second sentence stays whole) */
@media (min-width: 1280px) {
  .home .hero-page .lead { max-width: none; white-space: nowrap; }
}

/* the notes in the margin: readable, not small */
.home p.mn { font-size: 32px; }
.home h3.mn { font-size: 32px; }
.home .ms-name > .mn { font-size: 34px; }
@media (max-width: 859px) {
  .home p.mn, .home h3.mn { font-size: 26px; }
  .home .ms-name > .mn { font-size: 28px; }
}

/* "The best in the business…" runs across both columns, so it sits on one line when the page is wide enough */
.home .ms-reasons > h2 { grid-column: 1 / -1; }

/* a mark by each section's head, in the left gutter */
.home svg.lm-h { width: 36px; height: 30px; left: -86px; top: 16px; }
.home .ms-name > svg.lm-h { top: 10px; }
.home .ms-more > svg.lm-h { width: 24px; left: -80px; top: 20px; }

/* marks on the words themselves: a double underline, a ring round a phrase */
.home 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;
}
.home .boxed.circd { margin: 0 0.3em 0 0.8em; }
.home 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;
}
@media (max-width: 859px) {
  .home svg.lm-h { width: 22px; height: 18px; left: -46px; top: 10px; }
  .home .ms-more > svg.lm-h { width: 16px; left: -42px; }
}

/* the margin's quiet grey edge is drawn per section, so it never crosses a rule that runs across both columns:
   it starts below the section's own full-width heading and stops at the section's end */
@media (min-width: 860px) {
  .home .ms::after { display: none; }
  .home .ms-sec:not(.ms-cta)::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / span 20;
    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;
  }
  /* the three passages take their own rows, so the grey edge can run beside all of them without pushing them down */
  .home .ms-reasons > .lead-tx { grid-row: 2; }
  .home .ms-reasons > .psg:nth-of-type(1) { grid-row: 3; }
  .home .ms-reasons > .psg:nth-of-type(2) { grid-row: 4; }
  .home .ms-reasons > .psg:nth-of-type(3) { grid-row: 5; }
  .home .ms-reasons.ms-sec::after { grid-row: 2 / span 4; }
}

/* ── JC's notes, round 3 (16 Nov): a star beside each reason's note; the curvy arrow at the right of each "more" item ── */
.home svg.star-mk {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-left: 14px;
  margin-right: 2px;
  vertical-align: top;
  position: relative;
  top: 0.12em;
  --pmw: var(--p2);
}
.home .ms-more > .mn { padding-left: 64px; }
.home svg.arrow-mk { position: absolute; left: 0; top: 0.1em; width: 48px; height: 38px; max-width: none; }
/* the close sits closer under the last item */
.home .ms-more + .ms-cta { margin-top: 56px; }
@media (max-width: 859px) {
  .home svg.star-mk { width: 20px; height: 20px; margin-left: 10px; vertical-align: top; }
  .home .ms-more > .mn { padding-left: 46px; }
  .home svg.arrow-mk { width: 34px; height: 27px; }
  .home .ms-more + .ms-cta { margin-top: 48px; }
}

/* the hero's desk is the page's own desk: no flat band, so the grain runs on unbroken from the hero down to the sheet */
.home .hero { background: none; }

/* gate fixes, 16 Nov: the ring gets the room the inner pages give it (it crossed the I and the comma), no gap before
   punctuation after a boxed phrase, and a margin note that no longer breaks a word in the mid widths */
.home .boxed.circd { margin: 0 1.05em 0 1em; padding-right: 0.3em; }
.home .boxed.circd svg.circ-mk { left: -1em; width: calc(100% + 2.1em); }
.home .boxed:not(.circd) { padding-right: 0; margin-right: 0; }
@media (min-width: 860px) and (max-width: 1199px) {
  .home p.mn { font-size: 22px; }
}
