
/* ========== the chevron runs anchored to an edge (chevanchor.py) ====== */
/* Matt's rule, 2 November: "needs to anchor to top or bottom of a
   horizontal edge, where it is and slides left / right axis can be
   varied." So the vertical anchor is the constraint and the horizontal
   position is free, which is why nothing here touches left or right.

   MEASURED FIRST, and the markup was already right: the run's top sits
   at exactly the top of the block below it, 2222px against 2222px on
   about.html. It was anchored and it still read as floating, because
   oneground.py made every block the same colour on 20 October, so that
   box edge is invisible, and the block then opens with 100 to 124px of
   padding before any ink. The chevron was sitting on a real edge that
   nobody can see, a hundred pixels above anything it could belong to.

   So the block's own content comes up to meet it. The run stays where
   it is, on the edge, and the eyebrow underneath starts 34px below it
   instead of 100, which makes the chevron read as the top of that
   block rather than as a mark adrift between two. */
html body .chev-band + section,
html body .chev-band + div{padding-top:34px !important;}
@media (max-width:760px){
  html body .chev-band + section,
  html body .chev-band + div{padding-top:26px !important;}
}


/* ===== the phone layout fixes (mobilefix.py) ===== */
/* EVERY SELECTOR HERE IS PREFIXED html, AND THAT IS THE WHOLE TRICK.
   The first cut was written without it and half of it lost silently.
   .dg-flow already carries "@media (max-width:680px){.dg-flow{
   grid-template-columns:1fr 1fr}}" and .dk-note already carries a
   base font-size: same specificity as mine, declared later in the
   cascade, so they won and the build reported success. Measured
   after: the touch targets had moved and the grid and the type had
   not.

   One element name in front of the class takes these to (0,1,1)
   against the site's (0,1,0), so they win on specificity and the
   source order of 105 stylesheets stops mattering. It is the same
   lesson as the footer padding on 10 November, one rung up: there the
   selector matched nothing, here it matched and lost. Both look
   exactly like working if you only check that the rule is present. */
@media (max-width:700px){

  /* 1. THE APPROVALS CAPTION FITS ITS BOX. It is nowrap, and "AS 9100D
     & ISO 9001:2015" is 203px in a 156px box, so 47px of it hung out
     over the navy and the line read "...ISO 9001:201". Letting it wrap
     is the whole fix: the box is tall enough for two lines already. */
  html .certs-box .cb-q,html .certs-grid .cb-q{white-space:normal;}

  /* 2. THE SIX STEP BAND GOES TO ONE COLUMN. Its tracks come to
     186+196+14 = 396px inside a 311px container with overflow visible
     and no scroller, so on a 375px screen the even cards sat at
     232..428 and their right hand edge was unreachable. */
  html .dg-flow{grid-template-columns:1fr;}

  /* 3. A THUMB CAN HIT THE LINKS. 44px is Apple's guideline; these
     were 26 to 32. min-height on an inline-flex box grows the hit
     area without moving the text, so nothing shifts on the page. */
  html .gocta,html .link-aqua,html .pr-go{min-height:44px;}
  /* the inline standard links were 11 to 16px tall. inline-block so
     the padding counts, and 7px either side takes them to about 34,
     which is as far as they go without opening up the line spacing of
     the sentence they sit inside. */
  html a.stdl{display:inline-block;padding:7px 0;}

  /* 4. NOTHING SETS BODY TYPE BELOW 13px. The smallest was 11. */
  html .dk-note{font-size:13px;}
  html .bx-c-note{font-size:13px;}
}


/* ===== the LinkedIn pill in the bar (navli.py) ===== */
/* NOT .btn: see the module. Secondary, so a white wash rather than the
   aqua, and no border anywhere in it. */
/* THE SAME HEIGHT AS THE AQUA BUTTON. Matt, 9 November. It was 36 to
   the button's 42, which on one centre line read as the pill having
   been dropped in rather than belonging. Set as a height rather than
   as padding that happens to come to 42, so the two cannot drift when
   the button's type or padding changes. */
.nav-li{display:inline-flex;align-items:center;justify-content:center;
  gap:8px;height:42px;flex:0 0 auto;padding:0 17px 0 15px;
  border-radius:999px;
  background:rgba(255,255,255,.08);color:rgba(255,255,255,.88);
  font-family:'Inter',Arial,sans-serif;font-weight:600;font-size:13px;
  letter-spacing:.2px;line-height:1;text-decoration:none;white-space:nowrap;
  /* the bar's own gap is 6px, which is too tight between a pill and
     a button of different heights: measured at 1600 and doubled */
  margin-right:6px;
  transition:background .2s ease,color .2s ease,transform .2s ease;}
.nav-li svg{width:16px;height:16px;flex:0 0 auto;display:block;}
.nav-li:hover,.nav-li:focus-visible{background:rgba(0,238,204,.16);
  color:#fff;transform:translateY(-1px);}
/* the word goes first, then the pill */
@media (max-width:1280px){
  .nav-li span{display:none;}
  /* square it off so the mark sits in a circle rather than an oval */
  .nav-li{width:42px;padding:0;gap:0;}
}
@media (max-width:980px){.nav-li{display:none;}}


/* ===== Christmas: the hours and the holly (xmas.py) ===== */
/* ---- the hours, in the row the phone number already sits in ----- */
html body .xm-hours{display:none;}
/* LINED UP WITH THE START OF THE NAV, which Matt asked for twice:
   first against Industries, then, with the title back in, against
   Manufacturing. The script finds the first top level item rather
   than naming one, so it is the start of the bar that is being
   matched and renaming a menu cannot break it.
   NO FIXED NUMBER CAN DO IT. The nav row is centred inside a wrap
   that stops growing at 1332px, so that left edge sits 437px in at
   1680 and at 1440, 321 at 1280, 180 at 1100 and nowhere at all
   below that where the bar becomes a burger. A margin written once
   would be right at two widths and wrong at the rest.
   So it is measured. The script below reads that link's left edge
   against the row's and writes it as --xm-ind, once on load and
   once per resize behind a rAF, which is the same pattern
   chevslide.py and the map already use. The fallback is 0, which
   is the page gutter: if the script never runs, or the bar has
   collapsed to a burger and there is nothing to measure, the hours
   sit at the gutter and nothing looks broken. */
html.xmas body .xm-hours{display:inline-flex;align-items:center;gap:9px;
  flex:0 0 auto;margin-right:auto;margin-left:var(--xm-ind,0px);
  color:rgba(255,255,255,.72);white-space:nowrap;
  font-weight:600;letter-spacing:.2px;}
html.xmas body .xm-hours b{font-weight:600;color:var(--aqua,#00eecc);}
html.xmas body .xm-hours i{display:block;width:13px;height:13px;
  flex:none;line-height:0;}
html.xmas body .xm-hours i svg{width:100%;height:100%;display:block;}
/* margin-right:auto on the hours is what pushes the phone and the
   email back to the right hand edge, so .topbar keeps its own
   justify-content and nothing else in the header is touched. */

/* ---- and the row comes back on a phone, hours only -------------- */
/* _src hides .topbar below 900 because the number and the email are
   repeated in the menu pane. The hours are not repeated anywhere. */
/* AND THE ROW IT ADDS IS PAID FOR, which is the part that caught me
   out. subnav.py pins the capabilities rail at a hard top, 138 on a
   desk and 84 on a phone, and every hero's padding is calculated off
   the same two tokens. Below 900 the contact row is display:none, so
   bringing it back adds 30px of fixed header that nothing above
   knows about: measured at 390px the rail sat at 84 and printed
   straight across the logo. The two tokens move by exactly the
   height of the row, and because the row is a known height that
   arithmetic is exact rather than hopeful.
   ONE LINE, AND THE BUILD REFUSES A SECOND. A wrapped row is a row
   of unknown height, and an unknown height cannot be added to a
   fixed offset. The copy is held to 56 characters in xmas.py,
   which is what fits at 11px in the narrowest phone this site is
   built for, and the check runs on every build. */
@media (max-width:900px){
  html.xmas{--snav-top:calc(84px + 30px);--hero-top:calc(168px + 30px);}
  html.xmas body .navwrap .topbar{display:flex;height:30px;
    justify-content:flex-start;overflow:hidden;}
  html.xmas body .navwrap .topbar > a,
  html.xmas body .navwrap .topbar > .tb-dot{display:none;}
  /* and no nav offset on a phone: the bar is a burger, there is no
     Industries to line up with, and the hours take the gutter */
  html.xmas body .xm-hours{font-size:11px;white-space:nowrap;
    line-height:1.2;gap:7px;margin-left:0;}
}
@media (max-width:420px){
  html.xmas body .xm-hours i{display:none;}
  html.xmas body .xm-hours{font-size:10.5px;}
  /* mobmint raises small labels to 12px. Keep this measured exception:
     12px makes the text 362px wide inside the 350px phone row. */
  html.xmas body .xm-hours b{font-size:10.5px !important;}
}
@media (max-width:350px){
  /* Keep the dates readable on a 320px phone by dropping only the label. */
  html.xmas body .xm-hours .xm-label{display:none;}
}

/* ---- the holly on the logo -------------------------------------- */
/* THE ANCHOR IS STATIC IN THE SHIPPED CSS, so it is made the
   containing block here rather than the sprig hanging off whatever
   ancestor happens to be positioned. */
/* inline-block so the link is the width of the image and not the
   width of the header row, which is what "the end of the logo"
   has to measure against */
html body .nav-logo{position:relative;display:inline-block;}
html body .xm-holly{display:none;}
/* ON THE END OF THE WORD, NOT ON THE MARK. Matt: "Holly goes on
   the end of the logo not the moon." The first draft tucked it
   behind the shoulder of the roundel, which put a decoration on the
   brand mark itself. On the end of CORNELIUS it is a sprig resting
   on the logo rather than something done to the symbol, and the
   mark is left alone.
   HE IS DRAWING A PROPER HOLLY ICON NEXT, so this is placed and
   sized for a replacement: one span, one SVG, the geometry in this
   rule and nothing about the artwork anywhere else. */
/* WIDTH ONLY. The height attribute on the tag is the file's own,
   so the box is reserved before the picture loads and nothing
   jumps; height:auto here then keeps the shape whatever the width
   becomes. Matt: "no rotating or stretching." */
html.xmas body .xm-holly{display:block;position:absolute;
  left:155.8px;bottom:27.4px;right:auto;top:auto;
  width:28.8px;height:auto;
  pointer-events:none;z-index:3;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.5));}
/* the image keeps its own stacking context; the sprig sits past
   its right edge now rather than behind it, so nothing overlaps */
html body .nav-logo img{position:relative;z-index:2;}

/* ---- and the same on the footer logo ---------------------------- */
/* THE WRAPPER IS WHAT MAKES "THE END OF THE LOGO" MEAN ANYTHING
   DOWN HERE. The footer mark is a bare img in a column of text with
   nothing positioned around it, so the span added in apply() is the
   containing block. inline-block, so it is the width of the
   picture and not the width of the column.
   AND THE img'S OWN MARGIN HAS TO MOVE TO THE SPAN, or the gap
   under the logo collapses: the stylesheet puts margin-bottom on
   img.fl, and once that img is inside an inline-block its margin
   stops pushing the strapline down. */
/* AND IT HAS TO SHRINK TO THE PICTURE. .f-brand is a flex column,
   so an inline-block child is still stretched to the column's full
   width: measured, the wrapper came out 423px against a 185px logo
   and the sprig floated 254px clear of it, out in the middle of the
   footer. align-self and max-content together make the box the
   picture's own size, which is what the sprig is positioned
   against. _src already does the same thing to img.fl itself. */
html body .xm-flogo{position:relative;display:inline-block;
  width:max-content;max-width:100%;align-self:flex-start;
  margin-bottom:var(--f-logo-gap);}
html body .xm-flogo img.fl{margin-bottom:0;}
html body .xm-holly-f{display:none;}
html.xmas body .xm-holly-f{display:block;position:absolute;
  left:172.4px;bottom:29.5px;right:auto;top:auto;
  width:36px;height:auto;
  pointer-events:none;z-index:3;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.5));}
@media (max-width:900px){
  html.xmas body .xm-holly{left:146.5px;bottom:29.6px;
    width:24px;}
  html.xmas body .xm-holly-f{left:173.4px;bottom:33.5px;
    width:30px;}
}
