/* ================= mobile corrections =================
   Measured on the live pages at 386px. Scoped to phone breakpoints. */
@media (max-width:940px){
  /* The client portal door belongs inside the menu on a phone. */
  .kst-login-alt{display:none!important}
  nav.main .kst-login{width:100%;justify-content:center;margin-top:14px;padding:.74em 1.05em;font-size:15px;min-height:46px}
}
/* 05 - Why us. The stylesheet collapses .split to one column at 900px, but a
   later rule at max-width:560px puts .wide-art back to two columns
   (.92fr 1.18fr). Below 560px that gave a 133px ribbon of copy beside a
   171px photo column with nothing in it. This puts it back to one column. */
@media (max-width:560px){
  .split,.split.wide-art,.wide-art{grid-template-columns:1fr!important;gap:26px!important;align-items:stretch!important}
  .split.wide-art .sec-head,.wide-art .sec-head{margin-bottom:0}
  .split-art,.split-art .photo{width:100%}
  /* The photo is lazy-loaded and the sheet sets aspect-ratio:attr(width)/attr(height),
     which is not valid CSS and computes to auto - so the column had zero height
     until the image arrived, then jumped. An explicit ratio reserves the space. */
  .split-art .photo img{width:100%;height:auto;aspect-ratio:3/2;max-height:230px;object-fit:cover}
}
@media (max-width:700px){
  .head-in{gap:14px}
  .brand{display:inline-flex;align-items:center;min-height:44px}
  /* Footer: one column on a phone. Two columns squeezed the longer labels into
     169px and left a gap under the shorter group. Dividers use the footer own
     line colour, since the footer sits on navy. */
  .fgrid{grid-template-columns:1fr!important;gap:0!important}
  .fbrand{padding-bottom:24px;border-bottom:1px solid var(--navy-line)}
  .fcol{padding:20px 0;border-bottom:1px solid var(--navy-line)}
  .fcol.fstart{border-bottom:0;padding-bottom:6px}
  .fcol h4{font-size:12px!important;letter-spacing:.14em;margin-bottom:6px}
  .flinks{gap:0}
  .flinks a{display:flex;align-items:center;min-height:42px;line-height:1.3;font-size:14px}
  .fbot{gap:12px;padding-top:18px}
  /* Touch targets. The carousel dots were 5px tall. */
  .parrow{width:44px;height:44px}
  .pdots{gap:10px}
  .pdot{position:relative}
  .pdot::after{content:"";position:absolute;left:-5px;right:-5px;top:50%;transform:translateY(-50%);height:44px}
  .bchip,.btag{min-height:40px;display:inline-flex;align-items:center}
  .badge,.chip,.tl-badge,.idx,.mlabel{font-size:11.5px}
  .tag{font-size:12px}
  .kicker{font-size:12px;letter-spacing:.12em}
}

/* ---------- grids that never collapsed on a phone ----------
   Measured at 390px. Each of these was still running multiple columns, some of
   them 36px or 96px wide, which turned paragraphs into vertical ribbons. */
@media (max-width:700px){
  /* work.html: number / thumbnail / body / meta was a four column row with a
     zero width final column and a 96px body. */
  /* Items inside .wrow carry explicit grid placement, so a one column template
     still produced an implicit second column. Dropping grid altogether on a
     phone lets the number, body and meta simply stack. */
  .wrow{display:block!important}
  .wrow>*{grid-column:auto!important;grid-row:auto!important;width:auto!important}
  .wrow .wn{margin-bottom:6px}
  /* partners.html form rows: two 136px inputs side by side. */
  .fr{grid-template-columns:1fr!important;gap:12px!important}
  /* Side by side comparison panels, 172px each. */
  .pair{grid-template-columns:1fr!important;gap:14px!important}
  /* contact.html: the form and the details column, one of them 92px. */
  .contact-split{grid-template-columns:1fr!important;gap:26px!important}
  /* Two inputs at 144px each are too narrow to type into. */
  .fld-row{grid-template-columns:1fr!important}
  /* partners.html carries its own stylesheet and had no phone rules at all.
     Its tier cards were three 102px columns holding 1,527px of stacked text. */
  .hero-grid,.prob,.mech,.cards,.tiers,.asset,.streams,.calc-b,.method,.proc,.fit,.promise,.apply{
    grid-template-columns:1fr!important;gap:14px!important}
  /* Small tiles stay two up: still readable, and one long column would be worse. */
  .strip-g,.pg,.ig{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .strip-g .stat{min-width:0}
}

/* Same collapse, but up to 900px so small tablets and landscape phones are
   covered too, not only the 700px phone breakpoint. */
@media (max-width:900px){
  .wrow{display:block!important}
  .wrow>*{grid-column:auto!important;grid-row:auto!important;width:auto!important}
  .pair,.contact-split,.fr,.fld-row{grid-template-columns:1fr!important}
  .hero-grid,.prob,.mech,.cards,.tiers,.asset,.streams,.calc-b,.proc{grid-template-columns:1fr!important}
}

/* ---------- photograph bands ----------
   These were rendering at their natural 3:2, which on a 960px column is a 665px
   tall block that dominates the section. Cropped to a strip instead, with cover
   so nothing is squashed. */
.page-photo .photo img{aspect-ratio:26 / 10;max-height:330px;width:100%;object-fit:cover;object-position:center 45%}
.page-photo .photo .plabel{padding:16px 20px}
@media (max-width:900px){
  .page-photo .photo img{aspect-ratio:22 / 10;max-height:250px}
}
@media (max-width:560px){
  .page-photo .photo img{aspect-ratio:16 / 9;max-height:200px}
  .page-photo .photo .plabel{padding:13px 15px;font-size:12.5px}
  .page-photo .photo .plabel b{font-size:14.5px}
}
