/* responsive.css — the site's shared mobile layer.
 *
 * Linked LAST in every page's <head>, after that page's inline <style>, so these
 * rules win on source order without needing !important. Selectors are copied
 * verbatim from the page stylesheets so specificity matches exactly.
 *
 * Generated from a scan of every grid in the site; regenerate rather than
 * hand-patching a single page, so the behaviour cannot drift between pages.
 */

/* ---------- 1. Nothing may exceed the viewport ---------- */
@media (max-width: 860px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  img, svg, video, canvas, iframe { max-width: 100%; height: auto; }
  /* Grid and flex children default to min-width:auto, which refuses to shrink
     below their content and is the usual cause of horizontal overflow. */
  *, *::before, *::after { min-width: 0; }
  /* Long unbroken strings (URLs, emails) must not push the page wide.
     Deliberately `break-word`, not `anywhere`: `anywhere` also shrinks an
     element's min-content width, which collapsed small chips like the "04"
     section numerals and broke them between digits. */
  p, li, h1, h2, h3, h4, h5, td, th, a, span { overflow-wrap: break-word; }
  /* Tables fit rather than scroll — see section 6. `display:block` here would
     disable table-layout:fixed, so tables stay real table boxes. */
  table { max-width: 100%; table-layout: fixed; width: 100%; }
}

/* ---------- 2. Multi-column layouts collapse to one column ---------- */
@media (max-width: 640px) {
.proc__grid,
.center__grid,
.story__grid,
.right__grid,
.connect__inner,
.cform__row,
.footer__top,
.intro__grid,
.proc3__grid,
.why__grid,
.ind__body,
.ind__row,
.ind__foot,
.svc__rows,
.svc__row,
.proc__intro-slide,
.mos,
.mos__grid,
.cad__rr-body,
.dev__grid,
.trk__grid,
.split,
.rep__meta,
.crit,
.crit__field,
.feat--3,
.feat--4,
.seq,
.pak__grid,
.mw__grid,
.mw__scores,
.mwprov,
.feat--3, .feat--4, .coord,
.reg,
.seq__pbody--split,
.src-split,
.recwrap,
.hitl__flow,
.feat--3, .feat--4,
.bento,
.sizing,
.dash-row,
.dash-row--rev,
#targets .sec__inner,
#criteria .crit__field,
#profiles .sec__inner,
.ov__grid,
.stages__inner,
.team__grid,
.focus__grid,
/* .igrid is handled on its own further down — the sector cards are 4:3
   photos, so one column makes each of them half a screen tall. */
.prof__grid,
.contact__inner {
  grid-template-columns: 1fr;
}
}

/* ---------- 3. Dense tile grids stay multi-column, just tighter ---------- */
@media (max-width: 640px) {
.trk__fields,
.tiers,
.prof__meta,
.prof__notes,
.coord,
.mw__stats,
.seq__angrid,
.rec__fields,
.size__grid,
.tgt__stats,
#profiles .prof__meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
}

/* .prof__notes was in the list above, but it is not a tile grid: its cells hold
   four- and five-line prose bullets, not a number and a label. Two columns on a
   375px screen left each bullet about eleven characters wide — "37% gross /
   margins on / recurring / inspection work". It gets one column like any other
   body copy. The ID selector is repeated because #profiles .prof__notes outranks
   the class on its own. */
@media (max-width: 760px) {
.prof__notes,
#profiles .prof__notes {
  grid-template-columns: 1fr;
  gap: 1px;
}
}

/* ---------- 4. Logo walls: smaller logos, more per row, tight spacing ---------- */
@media (max-width: 640px) {
.cl-logos,
.mos__logos,
.logos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.cl-logos > *,
.mos__logos > *,
.logos > * {
  padding: 8px 6px;
  min-height: 0;
  border-radius: 8px;
}
.cl-logos img,
.mos__logos img,
.logos img {
  max-height: 22px;
  width: auto;
}
}
@media (max-width: 380px) {
.cl-logos,
.mos__logos,
.logos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
/* The home page's client wall is now 20 marks, not 8, and they sit straight on
   the cream with no tile behind them. Section 4's generic shrink leaves them
   too small to read, so give the mark a real floor, and hold three columns all
   the way down — at two the wall is ten rows deep on a phone. */
@media (max-width: 640px) {
.cl-logos { gap: 18px 16px; }
.cl-logos > * { padding: 0; min-height: 0; border-radius: 0; }
.cl-logos img { max-height: none; }
}
@media (max-width: 380px) {
.cl-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 5. Hand-authored overrides ----------
 * Everything above was generated from a scan of every grid in the site.
 * The rules below fix specific offenders found by measuring real overflow in
 * the browser at 390px; keep them when the generated part is regenerated.
 */

@media (max-width: 640px) {
  /* .mwtip is keyboard-reachable, so rather than hide it, clamp the width and
     re-anchor to the right edge so it opens inside the viewport. (The client
     logo bubble is handled separately below — it is pointer-only, so on touch
     it is switched off entirely.) */
  .mwtip {
    max-width: calc(100vw - 28px);
    white-space: normal;
    left: auto;
    right: 0;
    transform: none;
  }

  /* Data tables keep their horizontal scroller (the readable pattern for
     tabular data) but must not demand more room than the phone has. The page
     rule sets min-width:640px, which outweighs the global min-width:0 reset. */
  .opps__tbl { min-width: 0; font-size: 11.5px; }
  .opps__tbl th, .opps__tbl td { padding: 8px 9px; white-space: normal; }
}

@media (max-width: 860px) {
  /* Section padding is desktop-scale on several pages and eats the whole
     screen on a phone. */
  .sec, .contact, .legal { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 860px) {
  /* Flex rows built from nowrap + text-overflow:ellipsis children truncate
     mid-word once the row is phone-width. Let them wrap to full width and
     stack instead of clipping. Same bug on both pages, same fix. */
  .merge { flex-direction: column; align-items: stretch; gap: 12px; }
  .merge__stack { width: 100%; }
  .merge__row {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* ============================================================
 * 6. Mobile fixes from the phone walkthrough
 * These come last so they win over the generated rules above.
 * ============================================================ */

/* ---- Scroll sub-header: one line, no wrap, no clipping ---- */
@media (max-width: 860px) {
  .subhead.is-on { max-height: 46px; }
  .subhead__inner { padding: 6px 20px; gap: 10px; }
  .subhead__label { min-width: 0; flex: 1 1 auto; gap: 9px; }
  .subhead__pg {
    font-size: 13.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* The CTA wrapped to three lines and pushed the title out of the bar. It is
     redundant on a phone — the drawer and the page's own form both cover it. */
  .subhead__cta { display: none; }
}

/* ---- How We Find: size-validation signals stay 2-up, but as real boxes ---- */
@media (max-width: 640px) {
  .size__panel { padding: 18px 15px; }
  .size__grid { gap: 10px; }
  /* icon above the text instead of beside it, so the copy gets the full card */
  .sigc { flex-direction: column; gap: 9px; padding: 14px 13px; }
  .sigc__ic { width: 30px; height: 30px; border-radius: 8px; }
  .sigc b { font-size: 13px; margin: 0 0 3px; }
  .sigc span { font-size: 11.5px; line-height: 1.42; }
}

/* ---- How We Engage: benchmark label was running through its own bar ---- */
@media (max-width: 640px) {
  .bench__top { flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 7px; }
  .bench__name { font-size: 15.5px; }
  .bench__val { font-size: 11px; }
  .bench__row { padding: 10px 0; margin: 0; }
  .bench__scale { font-size: 9.5px; }
}

/* ---- Info tooltips are pointer affordances: drop them on phones ---- */
@media (max-width: 640px) {
  .mwq, .mwtip { display: none !important; }
}

/* ---- Numbered card rows (Engage "coordination", Develop "keeping warm") ----
   These were being held at 2-up by the dense-tile rule above; they are content
   cards, so they get the full width and stack. */
@media (max-width: 640px) {
  .coord { grid-template-columns: 1fr; gap: 14px; }
  .coord__card { padding: 22px 20px; }
  .coord__card h4 { font-size: 20px; }
  .tiers { grid-template-columns: 1fr; }
}

/* ---- Data tables fit the screen: no horizontal scrollbar ----
   table-layout:fixed pins the column widths and lets the content wrap, so the
   whole table compresses instead of demanding a swipe. */
@media (max-width: 640px) {
  .opps, .opps__wrap, .mwtests { max-width: 100%; overflow-x: visible; }
  .opps__tbl, .mwtests__tbl {
    display: table; min-width: 0; width: 100%; table-layout: fixed;
  }
  .opps__tbl th, .opps__tbl td,
  .mwtests__tbl th, .mwtests__tbl td {
    white-space: normal; overflow-wrap: anywhere;
  }

  /* Latest spam tests — 4 columns */
  .mwtests { padding: 16px 13px 4px; }
  .mwtests__tbl th { font-size: 8px; letter-spacing: 0.03em; padding: 0 4px 8px; }
  .mwtests__tbl td { padding: 9px 4px; font-size: 10.5px; }
  .mwtests__tbl th:nth-child(1), .mwtests__tbl td:nth-child(1) { width: 41%; }
  .mwtests__tbl th:nth-child(2), .mwtests__tbl td:nth-child(2) { width: 17%; }
  .mwtests__tbl th:nth-child(3), .mwtests__tbl td:nth-child(3) { width: 19%; }
  .mwtests__tbl th:nth-child(4), .mwtests__tbl td:nth-child(4) { width: 23%; }
  .mwtn { font-size: 10.5px; line-height: 1.25; }
  .mwtn small { font-size: 8px; overflow-wrap: anywhere; margin-top: 3px; }
  .mwscore { font-size: 9px; padding: 3px 6px; }
  .mwago  { font-size: 8px; }
  .mwissue { font-size: 8.5px; padding: 3px 6px; gap: 3px; }
  .mwtag  { font-size: 8.5px; padding: 3px 6px; }

  /* Bi-weekly report — 7 columns cannot be legible at 390px even at tiny type
     (names break mid-word, headers stack letter-per-line). Drop the three
     lowest-value columns on phones so the rest stay readable: EBITDA (4),
     Responded (5) and NDA/DD (7). Nothing scrolls; nothing is crushed. */
  .opps__tbl th:nth-child(4), .opps__tbl td:nth-child(4),
  .opps__tbl th:nth-child(5), .opps__tbl td:nth-child(5),
  .opps__tbl th:nth-child(7), .opps__tbl td:nth-child(7) { display: none; }

  .opps__tbl th { font-size: 8px; letter-spacing: 0; padding: 0 4px 8px; }
  .opps__tbl td { padding: 10px 4px; font-size: 10px; line-height: 1.35; }
  .opps__tbl th:nth-child(1), .opps__tbl td:nth-child(1) { width: 29%; }
  .opps__tbl th:nth-child(2), .opps__tbl td:nth-child(2) { width: 27%; }
  .opps__tbl th:nth-child(3), .opps__tbl td:nth-child(3) { width: 19%; }
  .opps__tbl th:nth-child(6), .opps__tbl td:nth-child(6) { width: 25%; }
  /* break on spaces, never inside a word */
  .opps__tbl td, .opps__tbl th { overflow-wrap: normal; word-break: normal; hyphens: none; }
  /* keep money on one line */
  .opps__tbl td:nth-child(3) { white-space: nowrap; font-size: 9.5px; }
  /* The stage pill is nowrap by default, so the longer labels ("Scheduling
     Evercap Call") overflow a 24%-wide column on a phone. Let them wrap. */
  .opps__tbl .stage { white-space: normal; font-size: 8.5px; letter-spacing: 0;
    padding: 4px 7px; gap: 4px; }
  .opps__tbl .stage::before { width: 5px; height: 5px; }

  /* The page scopes this table under #dashboards, so `#dashboards .opps__tbl td`
     (an ID, 0-1-2-0) outranks the plain `.opps__tbl td` rules above no matter
     how late this file loads — the phone typography above never actually took
     effect. Restate it at matching specificity. */
  #dashboards .opps__tbl th { font-size: 8px; letter-spacing: 0; padding: 0 4px 8px; }
  #dashboards .opps__tbl td { padding: 10px 4px; font-size: 10px; line-height: 1.35; }
  #dashboards .opps__tbl td:nth-child(3) { white-space: nowrap; font-size: 9.5px; }
  #dashboards .opps__tbl .stage { white-space: normal; font-size: 8.5px; letter-spacing: 0;
    padding: 4px 7px; gap: 4px; }
  #dashboards .opps__tbl .stage::before { width: 5px; height: 5px; }
  /* "Management call scheduled Jun 26" is the one next-step string long enough
     to overflow its column at this size. */
  .opps__tbl td:nth-child(6) { overflow-wrap: break-word; }
}

/* ---- How We Track: tier stats — drop the grey hairline grid, space them ---- */
@media (max-width: 640px) {
  .tgt__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px; padding: 14px;
    background: transparent; border-bottom: 0;
  }
  .tgt__stat {
    border: 1px solid rgba(20, 61, 46, 0.12);
    border-radius: 12px; padding: 15px 14px;
  }
  .tgt__stat b { font-size: 26px; }
}

/* ---- Home: Find / Engage / Develop / Track pills ----
 * These four are one control: a single pill holding the four stages of the
 * process in order. Wrapping "04 Track" onto a second row broke that reading —
 * it looked like a stray fifth element rather than the last stage. So the row
 * never wraps; the type, padding and gaps scale with the viewport instead, and
 * the four tabs divide the full width between them. Sized in vw with clamp so
 * there is no step between breakpoints. */
@media (max-width: 640px) {
  .proc__tabs {
    display: flex; flex-wrap: nowrap; justify-content: space-between;
    gap: clamp(2px, 0.7vw, 5px); padding: 4px; border-radius: 22px; width: 100%;
  }
  .proc__tab {
    flex: 0 1 auto; min-width: 0; justify-content: center;
    font-size: clamp(12px, 3.3vw, 15px);
    padding: 8px clamp(6px, 2.4vw, 14px);
    gap: clamp(4px, 1.2vw, 8px);   /* numeral was touching the label */
  }
  .proc__tab .n { font-size: clamp(8.5px, 2.3vw, 10px); }
}
/* Under ~360px even that does not fit: the numerals are the first thing to go,
   since the tabs are already in order and the panel below repeats the number. */
@media (max-width: 359px) {
  .proc__tab .n { display: none; }
}

/* ---- Home: outreach cadence timeline ----
   .cad__track is a 940px rail with all thirteen nodes absolutely positioned
   along it, so it can't be restacked in CSS. The home page's own script emits
   the same touchpoints a second time as <ol class="cad__list">; below the width
   where the rail fits we hide the rail and show the list, so nothing scrolls
   sideways. Hidden outside the media query so it never appears on desktop.

   The cut-off is 1199px, not 640px. The rail needs its full 940px, and the
   column it sits in only reaches that at about 1200: measured container widths
   are 651 at 768, 774 at 900, 889 at 1024 and 892 at 1120 — so every tablet
   width was dragging a horizontal scrollbar through a thirteen-point timeline.
   From 1200 up the rail fits whole (957px of room) and stays. */
.cad__list { display: none; }

@media (max-width: 1199px) {
  .cad__scroll { display: none; }
  .cad__list { display: block; list-style: none; margin: 22px 0 0; padding: 0; }

  .cadm__item {
    position: relative;
    display: flex; align-items: center; gap: 14px;
    padding: 9px 0;
  }
  /* Rail segment from this icon's centre down to the next one's. */
  .cadm__item::before {
    content: ""; position: absolute; z-index: 0;
    left: 18px; margin-left: -0.75px; top: 50%; height: 100%; width: 1.5px;
    background: rgba(176, 137, 76, 0.38);
  }
  .cadm__item:last-child::before { display: none; }

  .cadm__ic {
    position: relative; z-index: 1;
    flex: 0 0 auto; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--brass, #B0894C);
    background: var(--pine, #0E2A20);
  }
  .cadm__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .cadm__day {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 9.5px; letter-spacing: 0.08em;
    color: var(--brassDk, #8A6A34);
  }
  .cadm__name {
    font-family: var(--serif, Georgia, serif);
    font-size: 15px; font-weight: 600; line-height: 1.25;
    color: var(--forest, #143D2E);
  }
}

/* ---- Response split bar: label must sit inside its own segment ----
   The "Other replies" segment is only ~35% of a ~300px bar. The label is
   white-space:nowrap at 12px, so it ran past the bar's right edge. Let it wrap
   at a smaller size and give the bar an auto height; overflow:hidden stays on
   as a hard backstop so nothing can spill again. */
@media (max-width: 640px) {
  .rr__splitbar { height: auto; min-height: 44px; overflow: hidden; }
  .rr__seg {
    white-space: normal;
    font-size: 9.5px;
    line-height: 1.25;
    letter-spacing: 0;
    padding: 8px 8px;
    align-items: center;
  }
}

/* ---- Small numeral chips must survive the global min-width:0 reset ----
   Section 1 sets `min-width: 0` on everything so grid/flex children can shrink
   (the usual overflow fix). That also lets the flex algorithm squeeze tiny
   numeral chips below their content, which broke "04" across two lines. */
@media (max-width: 860px) {
  .kicker .n,
  .coord__n,
  .icard__num,
  .proc__tab .n,
  .navdrawer__link .n,
  .navdrawer__sublink .n,
  .stage__n,
  .reason__n,
  .pstep__n {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
  }
}

/* ---- Diligence request tracker: status pills must fit their column ----
   .pill is white-space:nowrap inside a table-layout:fixed column with 22px of
   cell padding, so it outgrew its cell and was clipped by .reg's overflow:hidden
   at the card edge. Give the columns explicit widths, trim the padding and
   shrink the pill so it sits inside its cell. */
@media (max-width: 640px) {
  .reg table { font-size: 12px; }
  .reg th, .reg td { padding: 10px 9px; }
  /* Description holds the only real prose in the table and was the narrowest
     column at 25%, setting two or three words a line, while Status held 34% for
     a pill and a lot of air. The header itself needed 96px in an 82px cell, so
     "Description" and "Status" ran together. Give the prose the widest column
     and let Status keep only what the pill needs. */
  .reg th:nth-child(1), .reg td:nth-child(1) { width: 31%; }
  .reg th:nth-child(2), .reg td:nth-child(2) { width: 42%; }
  .reg th:nth-child(3), .reg td:nth-child(3) { width: 27%; }
  .reg td, .reg th { overflow-wrap: normal; word-break: normal; }
  /* Tracking at 0.88px is what pushed the header past its cell. */
  .reg th { font-size: 9.5px; letter-spacing: 0.4px; }

  .pill { font-size: 9.5px; padding: 3px 8px; gap: 5px; }
  /* "In progress" is the widest label and was still overrunning the Status
     cell by a couple of pixels, where .reg's overflow:hidden clipped it. */
  .reg .pill { font-size: 9px; padding: 3px 7px; gap: 4px; }
  .pill::before { width: 5px; height: 5px; }
  /* the hover nudge would push it back out of the cell */
  .reg tbody tr:hover .pill { transform: none; }
}

/* ---- Nav: scale the bar down before it runs out of room ----------------
   At full size the header needs ~1014px: logo 163 + six links 549 + Contact Us
   142, plus 2x32 gaps and 2x48 padding. The horizontal links only drop out at
   860px, so between roughly 966px and 860px the bar overflowed and clipped the
   Contact Us button mid-word.

   Everything below interpolates from its full desktop value at 1120px down to a
   tight one at 861px, where the bar totals ~800px and fits with room to spare.
   Above 1120px nothing here applies and the design is untouched.

   This lives in responsive.css rather than site-nav.css because the pages define
   `.nav` in their own inline <style>, which comes after site-nav.css — only this
   file is linked late enough to win on source order. */
@media (min-width: 861px) and (max-width: 1120px) {
  /* Horizontal only — the home page's .nav.is-solid changes the VERTICAL
     padding to condense the bar past the fold, and a `padding:` shorthand
     here would win over it and kill that effect. */
  .nav { padding-left: clamp(22px, 10vw - 64px, 48px); padding-right: clamp(22px, 10vw - 64px, 48px);
         gap: clamp(16px, 6.2vw - 37px, 32px); }
  .nav__links { gap: clamp(18px, 6.2vw - 35px, 34px); }
  .nav__links > a, .nav__item > a { font-size: clamp(12.5px, 0.39vw + 9.2px, 13.5px); }
  .nav__cta { padding: 12px clamp(15px, 2.7vw - 8px, 22px); font-size: clamp(11px, 0.39vw + 7.7px, 12px); }
  .subhead__inner { padding-left: clamp(22px, 10vw - 64px, 48px); padding-right: clamp(22px, 10vw - 64px, 48px); }
}

/* The Contact Us button must never be the thing that gives — it has
   white-space: nowrap, so shrinking it clips the label instead of wrapping. */
.nav__cta { flex: 0 0 auto; }

/* ---- Client logo wall: no hover affordance on touch ----
   The profile bar is pointer-only. Below 861px its columns stack and the script
   never swaps it, so the marks should not advertise a hover that does nothing. */
@media (hover: none), (max-width: 860px) {
  .cl-item { cursor: default; }
  .cl-item:hover { transform: none; }
  .cl-item:hover .cl-logo { opacity: 0.8; }
  .cl-item:hover::after { transform: translateX(-50%) scaleX(0); }
  .cl-item.is-active .cl-logo { opacity: 1; }
  .cl-item.is-active::after { transform: translateX(-50%) scaleX(1); }
}

/* ---- Brand lockup ----
   The real Evercap artwork replaced a React-rendered placeholder wordmark.
   Both the nav bar and the footer sit on dark forest, so both take the
   reversed (light-text) file. The lockup is 5.01:1, so height drives width.

   .nav__logo is pinned to the height the old React lockup rendered at, because
   it is the tallest thing in the bar and therefore sets the bar's height — and
   several sticky offsets on the section pages (e.g. `top: 118px`) are written
   against the current bar. Pinning keeps the logo swap from moving them.

   The `height` here must out-specify `img { height: auto }` in section 1, which
   it does: (0,1,1) and (1,0,1) both beat (0,0,1). */
.nav__logo { height: 59px; }
.nav__logo img { display: block; height: 44px; width: auto; }
#footer-logo img { display: block; height: 48px; width: auto; }

/* The lockup is ~68px wider than the wordmark it replaced, which eats into the
   same 861-1120px band where Contact Us was already the first thing to clip.
   Scale it down across that band rather than letting it push the nav. */
@media (min-width: 861px) and (max-width: 1120px) {
  .nav__logo img { height: clamp(34px, 3.85vw + 0.6px, 44px); }
}

@media (max-width: 860px) {
  .nav__logo { height: 48px; }
  .nav__logo img { height: 38px; }
  #footer-logo img { height: 42px; }
}

/* ---- Mosaic lockup ----
   Evercap's sourcing engine has its own mark. The artwork is 3.96:1, so height
   drives width here too. Two placements: the Find panel on the home page (that
   one is sized in the page's own stylesheet, next to the rules it replaced) and
   the badge above "40+ data sources, unified" on How We Find. */
/* The badge takes over the 52px of air .subhd carries above it, and the heading
   tucks in underneath; otherwise the logo sits flush on the card above it with
   the whole gap stranded between logo and heading. Adjacent sibling margins
   collapse, so the pair below reads as 52 above / 14 between. */
.mos-badge { margin: 52px 0 0; }
.mos-badge + .subhd { margin-top: 14px; }
.mos-badge img { display: block; height: 54px; width: auto; }

@media (max-width: 860px) {
  .mos--brand .mos__brand { height: 38px; }
  .mos-badge img { height: 42px; }
}

/* ============================================================
 * 7. The 320px floor
 * Found by measuring at iPhone-SE width. Each one is the same shape of
 * bug: a `white-space: nowrap` pill that fits at 375 but not at 320, and
 * gets clipped by an ancestor's overflow:hidden rather than wrapping.
 *
 * The cap is 374px, not 400px: everything here is a compromise that 375
 * does not need, and at 400 the tighter diligence column started
 * hyphenating "Executed mu-tual NDA" on an iPhone SE 2 and up.
 * ============================================================ */

@media (max-width: 374px) {
  /* Diligence request tracker: "In progress" and "Requested" overran the
     Status cell and were cut off at the card edge. Status needs a little
     more of the row and the cells a little less padding. */
  .reg th, .reg td { padding: 10px 5px; }
  .reg th:nth-child(1), .reg td:nth-child(1) { width: 28%; }
  .reg th:nth-child(2), .reg td:nth-child(2) { width: 40%; }
  .reg th:nth-child(3), .reg td:nth-child(3) { width: 32%; }
  .reg .pill { font-size: 8.5px; padding: 3px 6px; }
  /* "normalizations" is 6px wider than a 77px column, so it reached into the
     gutter. Hyphenate rather than break mid-word or shrink the whole table. */
  .reg td:nth-child(1) { hyphens: auto; }

  /* Home, industries block: "Explore all sectors" is nowrap, so the label
     ran past the content column instead of wrapping. Tighten the tracking
     and the padding rather than let it break across two lines. */
  .ind__cta { padding: 14px 18px; font-size: 11.5px; letter-spacing: 0.1em; gap: 10px; }
  .ind__cta .ln { width: 14px; }

  /* Team member pages: a long address (bchillingworth@evercapadvisors.com
     is 34 characters) made the mail pill wider than the page. Let the pill
     hold the column and the address break inside it. */
  .prof__contact { flex-direction: column; align-items: flex-start; }
  .prof__link { max-width: 100%; overflow-wrap: anywhere; }
}

/* ============================================================
 * 8. Tablet / small-laptop band
 * ============================================================ */

/* ---- Inbox-placement tooltips must not push the page sideways ----
 * .mwtip is a 320px absolutely-positioned bubble anchored `left: 0` on its
 * "?" — it opens rightward. Above about 861px the two mail panels go side by
 * side, and the right-hand panel's "?" sits close enough to the edge that the
 * bubble's right edge landed past the viewport. Because the bubble is only
 * visibility:hidden, not display:none, it still counted toward scroll width,
 * so How We Engage scrolled horizontally at 1024 (document 1085px) without
 * anyone hovering anything. The band ran from ~861px to ~1190px — iPad
 * landscape and small laptops.
 *
 * Centre the bubble on its "?" instead of hanging it off the left. Measured
 * at 641, 768, 860, 900, 1024, 1200, 1440 and 1920: both tips sit inside the
 * page at every one. Below 641 section 6 hides them outright, so this starts
 * where that leaves off. The arrow moves to the middle to follow the bubble. */
@media (min-width: 641px) {
  .mwtip { left: 50%; transform: translateX(-50%) translateY(-5px); }
  .mwq:hover .mwtip,
  .mwq:focus-visible .mwtip { transform: translateX(-50%) translateY(0); }
  .mwtip::before { left: 50%; margin-left: -7px; }
}

/* ---- Home, sector rows: wrap the subsector list rather than truncate it ----
 * .ind__sub is `white-space: nowrap` with `text-overflow: ellipsis`, which is
 * fine at 1280 and up where every line fits. Between about 862px (where the
 * list goes two-column beside the photo) and 1279px it does not: at 960 all
 * seven lines were cut, the worst losing 138px — "Precision components ·
 * automation · engineered products · a…". The ellipsis was hiding content at
 * exactly the widths where people read it, so let the line wrap instead. */
@media (max-width: 1279px) {
  .ind__sub { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* ---- How We Find, record merge: extend the un-truncate up past 860 ----
 * Section 6 already lets .merge__row wrap rather than clip, but stops at
 * 860px because that rule also stacks the whole .merge. The row text stays
 * too tight above that: at 861 all four name variants truncate (worst 30px),
 * and it does not fully clear until 1024. Since the point of that panel is
 * showing "Acme Freight Co. / Acme Freight Company / ACME Freight, LLC"
 * reconciled into one record, a clipped "Acme Freight Compa…" defeats it.
 * Carry just the text rule across the gap; the layout stays side by side. */
@media (min-width: 861px) and (max-width: 1023px) {
  .merge__row { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* ---- How We Find, data-source wall: the "+ more" tile must not grow its row ----
 * Section 4 caps every logo at 22px and drops the tile padding to 8px, so a
 * normal tile lands at 40px. The "+ more" tile stacks a plus over a label, and
 * at that size it needed 63px — grid rows stretch to their tallest cell, so the
 * whole bottom row rendered half again as tall as the seventeen above it.
 * Set the plus and label side by side at this width: one line, 16px tall, well
 * inside the 40px the other tiles settle at. */
@media (max-width: 640px) {
  .logo--more { flex-direction: row; gap: 6px; align-items: center; }
  .logo--more .logo--more__plus { font-size: 16px; }
  .logo--more .logo--more__lbl { font-size: 9.5px; letter-spacing: 0.1em; }
}

/* ---- Industries: two sector cards per row on tablets ----
 * .icard is a 4 / 3.1 photo, so its height follows its width. The page drops
 * .igrid to a single column at 860px, which on an iPad made each card about
 * 712 x 552 — one sector filling the screen, with the next six below the fold.
 * Hold two per row down to 560px and trim the caption to suit the smaller
 * tile; below that a single column is right, because two would be too narrow
 * for "Business & Professional Services" to read. */
@media (min-width: 561px) and (max-width: 940px) {
  .igrid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .icard__body { padding: 16px 16px 14px; }
  .icard__name { font-size: 19px; }
  .icard__sub { font-size: 11.5px; }
}
@media (max-width: 560px) {
  .igrid { grid-template-columns: 1fr; }
}
