/* THE BLUE PENCIL · the contact page in layout B (board). Loads last, after v2.css and the pack's grain and type layers.
   One unlined page: the form runs in the reading column, the coach's "what to include" note sits in the margin,
   and the three direct lines carry JC's marks (envelope, clock, new paragraph) in the left gutter, outside the red line.
   The form block is never edited: every look here hangs on classes outside it or on form.css's own classes.
   Tokens only: no colour literal, no request. */

/* the shared section band (styles.css: desk ground, 72px padding) must not paint inside the page */
.ms section.ms-sec {
  padding: 0;
  background: none;
}

.ms-contact {
  margin-top: var(--s2);
}

/* the hero page lines up with the manuscript under it: same width, same red line, and the desk's grain runs on behind both */
.hero {
  --hp-pad: 46px 56px 44px 100px;
  --hp-mline: 64px;
  padding: 56px 0 48px;
  background: none;
}
.hero > .wrap {
  width: min(1400px, calc(100% - 56px));
  max-width: none;
}

/* ── the form passage ── */
.ms-send > .lead-tx {
  margin-bottom: var(--s4);
  color: var(--ink-soft);
}
.ms-send .lead-form {
  max-width: 100%;
  margin-top: var(--s1);
}
/* long names and addresses stay inside the field */
.ms-send .lead-form input,
.ms-send .lead-form select,
.ms-send .lead-form textarea {
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
}
.ms-send .banner-success,
.ms-send .banner-error {
  overflow-wrap: anywhere;
}

/* the coach's note sits beside the form, from the lead line down */
.ms-send > .ms-include {
  grid-row: 2 / span 3;
  padding-top: var(--s2);
}
.ms-include h3.mn {
  margin: 0 0 var(--s2);
}
.ms-include p,
.ms-include li {
  font-size: 26px;
  line-height: 1.2;
}
.ms-include p { margin: 0 0 var(--s3); }
.ms-include ul {
  margin: 0;
  padding-left: 1.1em;
  list-style: none;
}
.ms-include li {
  position: relative;
}
.ms-include li + li { margin-top: var(--s2); }
/* a pencil dash before each line, drawn in CSS, decoration only */
.ms-include li::before {
  content: "";
  position: absolute;
  left: -1.05em;
  top: 0.62em;
  width: 0.6em;
  height: var(--w-field);
  background-color: var(--ultra);
}

/* ── the direct lines: one passage, a head rule over it, a mark in the gutter beside each ── */
.ms-direct > .ml {
  padding-top: var(--s4);
  border-top: var(--w-head-rule) solid var(--ink);
}
.ms-direct .ml > li h3 {
  margin: 0 0 var(--s1);
  font-size: 1.4rem;
}
.ms-direct .ml > li h4 {
  margin: var(--s1) 0 0;
  color: var(--ink-soft);
  font: var(--w-caps) 12px/1.3 var(--fb);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}
.ms-direct .ml > li p {
  font-size: 19px;
  font-weight: var(--w-label);
  line-height: var(--tap);
}

/* the marks: each drawn at its own proportions, its top on the head's first line */
.ms-direct svg.lm { top: 0; }
svg.lm.lm-env { width: 52px; height: 40px; left: -92px; }
svg.lm.lm-clock { width: 40px; height: 40px; left: -86px; }
svg.lm.lm-para { width: 36px; height: 40px; left: -84px; }

/* a mail link: real, a 44px tall target, the pencil's underline that thickens on hover, the shared focus ring */
a.ms-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: 19px;
  font-weight: var(--w-label);
  color: var(--ultra);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness var(--t-hover) var(--ease-out);
}
a.ms-link:hover {
  text-decoration-thickness: 2px;
}
a.ms-link:focus-visible {
  outline: var(--ring-w) solid var(--ultra);
  outline-offset: var(--ring-gap);
}

/* ── the close ── */
.ms-cta .tx p { color: var(--ink); }

/* narrow: the note folds under the form, the marks tuck into the narrow gutter */
@media (max-width: 859px) {
  .hero {
    --hp-pad: 30px 20px 32px 52px;
    --hp-mline: 34px;
    padding: 36px 0 40px;
  }
  .hero > .wrap { width: calc(100% - 2 * var(--gutter, 24px)); }
  .ms-send > .ms-include {
    margin-top: var(--s5);
    padding-top: 0;
  }
  .ms-include p,
  .ms-include li { font-size: 22px; }
  svg.lm.lm-env { width: 28px; height: 22px; left: -48px; top: 0.15em; }
  svg.lm.lm-clock { width: 24px; height: 24px; left: -46px; top: 0.1em; }
  svg.lm.lm-para { width: 22px; height: 24px; left: -45px; top: 0.1em; }
  .ms-direct .ml > li p,
  a.ms-link { font-size: 17px; }
}

@media (forced-colors: active) {
  .ms-include li::before { background-color: CanvasText; }
  a.ms-link { color: LinkText; }
}

/* ── Pass 0: the home page's standard (16 Nov 2026) ── */

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

/* the margin note: Caveat at the home page's size, a six-point asterisk before it */
.ms-include h3.mn { font-size: 32px; }
.ms-include p,
.ms-include li { font-size: 32px; }
svg.star-mk {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin: 0 10px 0 0;
  vertical-align: top;
  position: relative;
  top: 0.12em;
}
@media (max-width: 859px) {
  .ms-include h3.mn,
  .ms-include p,
  .ms-include li { font-size: 26px; }
  svg.star-mk { width: 20px; height: 20px; }
}

/* a mark by each head, in the left gutter */
svg.lm-h { width: 36px; height: 30px; left: -86px; top: 16px; }
@media (max-width: 859px) {
  svg.lm-h { width: 22px; height: 18px; left: -46px; top: 10px; }
}

/* a phrase underlined in the text */
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;
}

/* the close spans both columns and sits closer under the last passage */
.ms-cta > h2,
.ms-cta > .tx { grid-column: 1 / -1; }
.ms-cta > .tx { max-width: 80rem; }
.ms-send + .ms-direct { margin-top: 72px; }
.ms-direct + .ms-cta { margin-top: 56px; }

/* the margin's quiet grey edge is drawn per passage, so it never runs through the gaps between them */
@media (min-width: 860px) {
  .ms.ms-contact::after { display: none; }
  .ms-send::after,
  .ms-direct::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 underlined phrase hugs the full stop that follows it */
.lead-tx .boxed { padding-right: 0; margin-right: 0; }

/* JC, 16 Nov: the direct lines' marks sit to the right of the red line, in the page, with the words beside them */
.ms-direct .ml > li { padding-left: 76px; }
.ms-direct svg.lm { left: 0; }
svg.lm.lm-env { left: 0; }
svg.lm.lm-clock { left: 6px; }
svg.lm.lm-para { left: 8px; }
@media (max-width: 859px) {
  .ms-direct .ml > li { padding-left: 44px; }
  svg.lm.lm-env { left: 0; }
  svg.lm.lm-clock { left: 2px; }
  svg.lm.lm-para { left: 3px; }
}

/* JC, 16 Nov: "Response time" (its clock and its words) sits in the margin, level with the email line */
@media (min-width: 860px) {
  .ms-direct > .ml {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr);
    column-gap: var(--gap);
    align-items: start;
    padding-top: 0;
    border-top: 0;
  }
  /* the head rule keeps the reading column's width */
  .ms-direct > .ml::before {
    content: "";
    grid-column: 1;
    grid-row: 1;
    margin-bottom: var(--s4);
    border-top: var(--w-head-rule) solid var(--ink);
  }
  .ms-direct .ml > li { grid-row: 2; }
  .ms-direct .ml > li + li { margin-top: 0; }
  .ms-direct .ml > li:nth-child(1) { grid-column: 1; }
  .ms-direct .ml > li:nth-child(2) { grid-column: 2; }
  .ms-direct .ml > li:nth-child(3) { grid-column: 1; grid-row: 3; margin-top: var(--s4); }
}

@media (min-width: 860px) {
  .ms-direct > .ml { grid-row: 1; } /* explicit, so the grey edge beside it still has its row */
}
