/* ---------- CapFive grid ----------
   phone    up to 767px   8 columns,  8px gutter, 24px margin
   iPad     768-1023px    8 columns, 20px gutter, 4vw margin
   desktop  1024-2199px  16 columns, 24px gutter, 4vw margin; public content on columns 3-14,
                          the header on all 16, the footer on 3-14 like the content
   ultrawide 2200px up   the board's ultrawide grid (16 columns, 24px gutter, 20% margin) between 18% grey bands;
                          every section's content starts at its column 3 and ends at its column 14 (0.45 of the
                          width less 6px, centred); the header and footer sit on that column

   --grid-start / --grid-end are the content edges from the screen's sides. A block placed with
   --from (columns skipped after the content start) and --span (columns covered) lands on column lines. */

:root {
  --grid-cols: 8;
  --grid-gap: 8px;
  --grid-margin: 24px;
  --grid-lead: 0;
  --grid-vw: calc(100vw - var(--scrollbar, 0px));
  --grid-col: calc((var(--grid-vw) - 2 * var(--grid-margin) - (var(--grid-cols) - 1) * var(--grid-gap)) / var(--grid-cols));
  --grid-step: calc(var(--grid-col) + var(--grid-gap));
  --grid-start: calc(var(--grid-margin) + var(--grid-lead) * var(--grid-step));
  --grid-end: var(--grid-margin);
  --grid-card-span: 8;
  --grid-cards: 1;
  --grid-chrome: var(--grid-margin);
}

@media (min-width: 768px) {
  :root {
    --grid-gap: 20px;
    --grid-margin: calc(var(--grid-vw) * 0.04);
    --grid-card-span: 4;
    --grid-cards: 2;
  }
}

@media (min-width: 1024px) {
  :root {
    --grid-cols: 16;
    --grid-gap: 24px;
    --grid-lead: 2;
    --grid-end: calc(var(--grid-margin) + 2 * var(--grid-step));
    --grid-card-span: 4;
    --grid-cards: 3;
  }
}

@media (min-width: 1280px) {
  :root {
    --grid-card-span: 3;
    --grid-cards: 4;
  }
}

@media (min-width: 2200px) {
  :root {
    --grid-content: calc(var(--grid-vw) * 0.45 - 6px);
    --grid-margin: calc((var(--grid-vw) - 16 * (var(--grid-content) - 11 * var(--grid-gap)) / 12 - 15 * var(--grid-gap)) / 2);
    --grid-chrome: var(--grid-start);
  }
}

/* Connect has its own grid (captain, 2026-11-23):
   desktop 1024+   the navy sidebar sits outside the grid; the column beside it: 12 columns, 16px gutter, 64px margin
   iPad 761-1023   the sidebar folds into the phone's top bar; 8 columns, 20px gutter, 56px margin
   phone to 760    4 columns, 16px gutter, 24px margin (board, notes 40)
   Card rows run 3 per row on desktop (4 columns each), 2 on iPad, 1 on phone. The dashboard's own
   six-column tokens (body:has(#dash-title)) are overruled here, so it shares the grid. */
html body.connect-shell,
html body.connect-shell:has(#dash-title) {
  --grid-cols: 4;
  --grid-gap: 16px;
  --grid-margin: 24px;
  --grid-lead: 0;
  --grid-vw: calc(100vw - var(--scrollbar, 0px));
  --grid-col: calc((var(--grid-vw) - 2 * var(--grid-margin) - (var(--grid-cols) - 1) * var(--grid-gap)) / var(--grid-cols));
  --grid-step: calc(var(--grid-col) + var(--grid-gap));
  --grid-start: var(--grid-margin);
  --grid-end: var(--grid-margin);
  --grid-chrome: var(--grid-margin);
  --grid-card-span: 4;
  --grid-cards: 1;
  --container: calc(var(--grid-vw) - 2 * (var(--grid-margin) - clamp(22px, 4vw, 80px)));
  --gutter: calc(var(--grid-margin) - clamp(22px, 4vw, 80px));
  --gut: var(--grid-margin);
  --side: var(--grid-margin);
  --rail-inset: var(--grid-margin);
  --dash-gut: var(--grid-margin);
  --dash-gap: var(--grid-gap);
}

@media (min-width: 761px) {
  html body.connect-shell,
  html body.connect-shell:has(#dash-title) {
    --connect-side: 0px;
    --grid-cols: 8;
    --grid-gap: 20px;
    --grid-margin: 56px;
    --grid-cards: 2;
  }
}

@media (min-width: 1024px) {
  html body.connect-shell,
  html body.connect-shell:has(#dash-title) {
    --connect-side: 232px;
    --grid-vw: calc(100vw - var(--scrollbar, 0px) - var(--connect-side));
    --grid-cols: 12;
    --grid-gap: 16px;
    --grid-margin: 64px;
    --grid-cards: 3;
  }
  html.connect-rail body.connect-shell,
  html.connect-rail body.connect-shell:has(#dash-title) {
    --connect-side: 72px;
  }
}

/* Connect people, firm and deal cards: four to a row from 1280px (3 columns each), three below it and two on iPad (4 each); on phone
   people run two to a row (2 columns each), firms and deals one */
html body.connect-shell main .member-roster { --grid-cards: 2; --grid-card-span: 2; }
html body.connect-shell main :is(.firm-roster, .deals-grid) { --grid-cards: 1; --grid-card-span: 4; }
@media (min-width: 761px) {
  html body.connect-shell main :is(.member-roster, .firm-roster, .deals-grid) { --grid-cards: 2; --grid-card-span: 4; }
}
@media (min-width: 1024px) {
  html body.connect-shell main :is(.member-roster, .firm-roster, .deals-grid) { --grid-cards: 3; --grid-card-span: 4; }
}
@media (min-width: 1280px) {
  html body.connect-shell main :is(.member-roster, .firm-roster, .deals-grid) { --grid-cards: 4; --grid-card-span: 3; }
}

/* ultrawide Connect, the board's ultrawide Connect grid (captain, notes 159-160): 16 columns, 16px gutter, an 18%
   margin either side and no inset. The sidebar fills columns 1-2 and the content columns 3-16, so the whole panel
   is centred between equal grey margins. Inside the content Connect runs 14 columns (the board's columns 3-16):
   the body is padded to the margins, the sidebar is two columns and a gutter wide, and the main column keeps one
   gutter either side. The desktop's 12-column spans are restated on 14 below; card rows run four to a row, three columns each, as on desktop. */
@media (min-width: 2200px) {
  html body.connect-shell,
  html body.connect-shell:has(#dash-title) {
    --connect-side: calc((100vw - var(--scrollbar, 0px)) * 0.08 - 14px);
    --grid-vw: calc((100vw - var(--scrollbar, 0px)) * 0.64 + 16px - var(--connect-side));
    --grid-cols: 14;
    --grid-gap: 16px;
    --grid-margin: 16px;
  }
  html body.connect-shell main :is(.member-roster, .firm-roster, .deals-grid, .card-grid) { --grid-cards: 4; --grid-card-span: 3; }
}

/* The legacy page frame (a centred --container with a clamp(22px, 4vw, 80px) inset, and the phone
   --gut) is redefined so every rule still written against it lands on the grid margin. */
@media all {
  :root {
    --container: calc(var(--grid-vw) - 2 * (var(--grid-margin) - clamp(22px, 4vw, 80px)));
    --gutter: calc(var(--grid-margin) - clamp(22px, 4vw, 80px));
    --rail-inset: var(--grid-start);
    --side: var(--grid-margin);
    --gut: var(--grid-margin);
  }
}

/* Placements sit in a cascade layer and are !important: an important declaration in a layer outranks
   every unlayered one whatever its specificity (and an inline style set by a script), so the grid
   stays the last word over style.css's `html body #main#main ... !important` overrides without
   adding to them. */
@layer grid {
  .grid-inset {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: var(--grid-start) !important;
    padding-right: var(--grid-end) !important;
  }

  .grid-cards {
    display: grid !important;
    grid-template-columns: repeat(var(--grid-cards), calc(var(--grid-card-span) * var(--grid-col) + (var(--grid-card-span) - 1) * var(--grid-gap))) !important;
    column-gap: var(--grid-gap) !important;
    justify-content: start !important;
  }

  .grid-place {
    box-sizing: border-box !important;
    flex: none !important;
    max-width: none !important;
    margin-left: calc(var(--grid-start) + var(--from, 0) * var(--grid-step)) !important;
    margin-right: 0 !important;
    width: calc(var(--span) * var(--grid-col) + (var(--span) - 1) * var(--grid-gap)) !important;
  }

  @media all {
    body .site-header.dock-header {
      padding-left: var(--grid-chrome) !important;
      padding-right: var(--grid-chrome) !important;
    }

    body .site-footer.site-footer--v2 {
      box-sizing: border-box !important;
      width: auto !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: var(--grid-start) !important;
      padding-right: var(--grid-end) !important;
    }
    body main :is(
      .page-block > .block-inner,
      .about-manifesto > .block-inner,
      .how-route-inner,
      :is(.sector-stage, .sector-edit, .sector-list) > .sector-block,
      .sectors-hero > .sectors-hero-inner,
      .sectors-hero > .sectors-hero-base,
      .head-white > .page-head,
      .head-white > .page-section,
      main > section.page-section,
      .member-band-inner,
      .events-inner,
      .deals-years-in,
      .sector-transactions-inner
    ) {
      box-sizing: border-box !important;
      width: auto !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: var(--grid-start) !important;
      padding-right: var(--grid-end) !important;
    }
    body main .page-block .page-block > .block-inner {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
  }

  /* The CapFive symbol's file has 19.16% empty space on its left: the box starts on the text edge and
     that space is cropped off, so the box and the drawn mark both sit on the column line. */
  body main .hero-logo {
    margin-left: 0 !important;
    width: calc(var(--w) * 0.8084) !important;
  }
  body main .hero-logo img {
    width: 100% !important;
    max-width: none !important;
    height: calc(var(--w) * 984 / 981) !important;
    margin-left: 0 !important;
    transform: none !important;
    object-fit: cover !important;
    object-position: 100% 50% !important;
  }

  @media all {
    body main .hero > .hero-logo.is-corner {
      left: var(--grid-start) !important;
    }
  }
  @media (max-width: 760px) {
    body main .hero-logo:not(.is-corner):not(.is-under-date) {
      left: var(--grid-start) !important;
    }
  }

  /* Connect */
  /* iPad: the sidebar folds into the phone's top bar, the page takes the full width under it */
  @media (min-width: 761px) and (max-width: 1023px) {
    html body.connect-shell {
      display: block !important;
    }
    html body.connect-shell > .connect-bar {
      position: sticky !important;
      top: 0 !important;
      z-index: 60 !important;
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      gap: 16px !important;
      height: 72px !important;
      padding: 0 var(--grid-margin) !important;
      overflow: visible !important;
      box-shadow: none !important;
    }
    html body.connect-shell.menu-open > .connect-bar {
      z-index: 200 !important;
    }
    html body.connect-shell > .connect-bar > .connect-bar-head {
      margin: 0 !important;
      padding: 0 !important;
      width: auto !important;
    }
    html body.connect-shell > .connect-bar > .connect-bar-head img {
      width: 36px !important;
      height: 36px !important;
    }
    html body.connect-shell > .connect-bar :is(.connect-bar-toggle, .connect-bar-nav, .connect-bar-tools) {
      display: none !important;
    }
    html body.connect-shell > .connect-bar > .menu-toggle {
      display: flex !important;
      margin-left: auto !important;
    }
    html body.connect-shell > .connect-bar > .account-menu {
      margin: 0 !important;
      padding: 0 !important;
      border: 0 !important;
    }
    html body.connect-shell > .connect-bar .account-menu-chevron {
      display: none !important;
    }
    html body.connect-shell > .connect-bar .account-menu-panel {
      top: calc(100% + 12px) !important;
      bottom: auto !important;
      left: auto !important;
      right: 0 !important;
    }
    html body.connect-shell > :is(#main, .site-footer) {
      grid-column: auto !important;
    }
  }

  /* the dashboard and every directory page sit between the content edges */
  html body.connect-shell main .dash {
    box-sizing: border-box !important;
    width: auto !important;
    max-width: none !important;
    margin-left: var(--grid-start) !important;
    margin-right: var(--grid-end) !important;
  }
  html body.connect-shell > footer.site-footer.site-footer {
    padding-left: var(--grid-start) !important;
    padding-right: var(--grid-end) !important;
  }

  /* the admin overview's section cards: two to a row on iPad (4 columns each), four on desktop (3 each), six from 3000px (2 each) */
  @media (min-width: 761px) {
    html body.connect-shell main .connect-admin__index {
      --admin-cards: 2;
      --admin-span: 4;
      grid-template-columns: repeat(var(--admin-cards), calc(var(--admin-span) * var(--grid-col) + (var(--admin-span) - 1) * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
      justify-content: start !important;
    }
  }
  @media (min-width: 1024px) {
    html body.connect-shell main .connect-admin__index { --admin-cards: 4; --admin-span: 3; }
  }
  @media (min-width: 2200px) {
    html body.connect-shell main .connect-admin__index { --admin-cards: 4; --admin-span: 3; }
  }

  /* the dashboard's desktop design on the board's 6-column dashboard grid (32px gutter, same 64px margin; notes 67, 68):
     the main column on columns 1-4, the side column (notices, events, people, articles) on 5-6, and the five
     figures one to a column with Members over the side column, their dividers on the column lines; from 1181px,
     where the five figures run in one row */
  @media (min-width: 1181px) and (max-width: 2199px) {
    html body.connect-shell main .dash:has(#dash-title) {
      --dash6-gap: 32px;
      --dash6-col: calc((var(--grid-vw) - 2 * var(--grid-margin) - 5 * var(--dash6-gap)) / 6);
      --dash6-step: calc(var(--dash6-col) + var(--dash6-gap));
    }
    html body.connect-shell main .dash:has(#dash-title) .dash-grid {
      grid-template-columns: calc(4 * var(--dash6-col) + 3 * var(--dash6-gap)) minmax(0, 1fr) !important;
      column-gap: var(--dash6-gap) !important;
    }
    html body.connect-shell main .dash:has(#dash-title) .dash-strip {
      grid-template-columns: repeat(4, var(--dash6-step)) minmax(0, 1fr) !important;
    }
  }
  /* desktop: the notice cards fill the side column, two grid columns wide (note 75); no padding around them */
  @media (min-width: 1024px) {
    html body.connect-shell main .dash:has(#dash-title) #dashboard-notice {
      padding: 0 !important;
    }
  }

  /* 1024-1100: the dashboard stacks its sections (connect-shell.css unwraps the two columns), so its grid is one
     column; the desktop two-column template had dropped every other card into a 200px track */
  @media (min-width: 1024px) and (max-width: 1100px) {
    html body.connect-shell main .dash:has(#dash-title) .dash-grid {
      grid-template-columns: minmax(0, 1fr) !important;
    }
  }

  /* ultrawide Connect on 14 columns: the desktop's 12-column spans restated */
  @media (min-width: 2200px) {
    html body.connect-shell main :is(.dash-grid, .kh-top:not(.kh-top--single), .deal-record-layout) {
      grid-template-columns: calc(10 * var(--grid-col) + 9 * var(--grid-gap)) minmax(0, 1fr) !important;
    }
    html body.connect-shell main .kh-foot:not(.kh-foot--single) {
      grid-template-columns: calc(8 * var(--grid-col) + 7 * var(--grid-gap)) minmax(0, 1fr) !important;
    }
    html body.connect-shell main .kh-reports-grid {
      grid-template-columns: repeat(7, calc(2 * var(--grid-col) + var(--grid-gap))) !important;
    }
    html body.connect-shell main .deal-draft-note {
      width: calc(10 * var(--grid-col) + 9 * var(--grid-gap)) !important;
    }
    html body.connect-shell main .profile-editor-layout {
      grid-template-columns: calc(4 * var(--grid-col) + 3 * var(--grid-gap)) minmax(0, 1fr) !important;
    }
    html body.connect-shell main .kh-lead-title {
      max-width: calc(8 * var(--grid-col) + 7 * var(--grid-gap)) !important;
    }
    html body.connect-shell main .connect-admin__firm {
      grid-template-columns: calc(7 * var(--grid-col) + 6 * var(--grid-gap)) calc(4 * var(--grid-col) + 3 * var(--grid-gap)) minmax(0, 1fr) !important;
    }
    html body.connect-shell main :is(.email-copy__panel, .broadcast__form) {
      width: calc(10 * var(--grid-col) + 9 * var(--grid-gap)) !important;
    }
    html body.connect-shell main .broadcast__modes {
      grid-template-columns: repeat(2, calc(5 * var(--grid-col) + 4 * var(--grid-gap))) !important;
    }
    html body.connect-shell main .connect-admin__firm--picker .deal-team-picker {
      grid-template-columns: repeat(7, calc(2 * var(--grid-col) + var(--grid-gap))) !important;
    }
  }

  /* ultrawide: the page sits between the grid's 18% margins (the main column keeps one gutter past the right one) */
  @media (min-width: 2200px) {
    html body.connect-shell {
      padding-left: calc((100vw - var(--scrollbar, 0px)) * 0.18) !important;
      padding-right: calc((100vw - var(--scrollbar, 0px)) * 0.18 - 16px) !important;
    }
  }

  /* the public ultrawide page frame's grey side bands stay off Connect, whose sidebar runs to the screen edge */
  html body.connect-shell::before,
  html body.connect-shell::after {
    content: none !important;
    display: none !important;
  }
  /* ultrawide public pages: the frame's grey bands take the same 18% and grey as Connect's, so the two match (captain) */
  @media (min-width: 2200px) {
    html body:not(.connect-shell)::before,
    html body:not(.connect-shell)::after {
      width: calc((100vw - var(--scrollbar, 0px)) * 0.18) !important;
      background: #e4e6ea !important;
    }
  }

  /* ultrawide: equal grey bands over the grid's 18% margins, a shade darker than the public frame's, so the app
     reads as a centred panel (captain) */
  @media (min-width: 2200px) {
    html body.connect-shell::before,
    html body.connect-shell::after {
      content: "" !important;
      display: block !important;
      position: fixed !important;
      top: 0 !important;
      bottom: 0 !important;
      z-index: 9999 !important;
      width: calc((100vw - var(--scrollbar, 0px)) * 0.18) !important;
      background: #e4e6ea !important;
      pointer-events: none !important;
    }
    html body.connect-shell::before {
      left: 0 !important;
      right: auto !important;
    }
    html body.connect-shell::after {
      left: auto !important;
      right: 0 !important;
    }
  }

  /* card rows */
  html body.connect-shell main :is(.roster, .conference-posters .posters, .deals-grid, .card-grid, .kh-cards, .kh-quotes) {
    display: grid !important;
    grid-template-columns: repeat(var(--grid-cards), calc(var(--grid-card-span) * var(--grid-col) + (var(--grid-card-span) - 1) * var(--grid-gap))) !important;
    column-gap: var(--grid-gap) !important;
    justify-content: start !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* phone: a white panel inset inside the 4 columns left every heading, field and button 22px off the
     column lines, so panels run edge to edge and their contents sit on the 24px margins */
  @media (max-width: 760px) {
    html body.connect-shell main :is(.dash, .connect-admin) {
      --dash-pad: var(--grid-margin) !important;
    }
    /* the dashboard's own overflow clip sat on the margins and cut the full-width panels back to them, so
       their text ran flush to the cut edge; #main already stops any sideways scroll */
    html body.connect-shell main .dash {
      overflow: visible !important;
    }
    /* every Connect page's heading the same distance under the top bar as Events' and the dashboard's (24px of
       section plus the heading's 32px), not the 112px a fixed header once needed (notes 48-52) */
    html body.connect-shell #main:not(:has(.dash, .kh-page)) {
      padding-top: 56px !important;
    }
    /* People: the search field above the headline, as Network activity has it (note 53); the region and country
       filters stay under the headline */
    html body.page-people.connect-shell #main .connect-directory > .block-inner {
      position: relative !important;
    }
    html body.page-people.connect-shell #main .connect-directory :is(.add-top, .connect-directory-finder, .deal-filters) {
      position: static !important;
    }
    html body.page-people.connect-shell #main .connect-directory .deal-filters-search {
      position: absolute !important;
      top: 0 !important;
      left: var(--grid-start) !important;
      right: var(--grid-end) !important;
      width: auto !important;
      margin: 0 !important;
    }
    html body.page-people.connect-shell #main .connect-directory .people-head {
      padding-top: calc(var(--people-search-h, 52px) + 32px) !important;
    }
    html body.page-people.connect-shell #main:not(:has(.dash, .kh-page)) {
      padding-top: 24px !important;
    }
    /* the top bar's logo and account button on the same margins as the page */
    html body.connect-shell > .connect-bar {
      padding-left: var(--grid-margin) !important;
      padding-right: var(--grid-margin) !important;
    }
    html body.connect-shell main :is(.dash-strip, .dash-card, .connect-admin__section, .kh-write) {
      box-sizing: border-box !important;
      width: auto !important;
      max-width: none !important;
      margin-left: calc(-1 * var(--grid-margin)) !important;
      margin-right: calc(-1 * var(--grid-margin)) !important;
      padding-left: var(--grid-margin) !important;
      padding-right: var(--grid-margin) !important;
      border-radius: 0 !important;
    }
    /* an event's date fills the first column and its words start on the second */
    html body.connect-shell main .dash-events a {
      gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .dash-event-date {
      width: var(--grid-col) !important;
    }
    html body.connect-shell main .event-row {
      grid-template-columns: var(--grid-col) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    /* phone buttons keep their one size, three columns wide so both edges sit on column lines */
    html body.connect-shell main .button {
      min-width: calc(3 * var(--grid-col) + 2 * var(--grid-gap)) !important;
    }
    /* the latest close's tombstone centred in its panel (note 74) */
    html body.connect-shell main .dash-tombs {
      justify-content: center !important;
    }
    html body.connect-shell main :is(.dash-tomb, .dash-sectors-year select) {
      width: calc(3 * var(--grid-col) + 2 * var(--grid-gap)) !important;
    }
    /* deals by sector: the sector and its count on one line, the bar under them across all 4 columns */
    html body.connect-shell main .dash .activity-chart-row {
      grid-template-columns: minmax(0, 1fr) auto !important;
      gap: 8px var(--grid-gap) !important;
    }
    html body.connect-shell main .dash .activity-chart-label {
      grid-column: 1 !important;
      grid-row: 1 !important;
    }
    html body.connect-shell main .dash .activity-chart-value {
      grid-column: 2 !important;
      grid-row: 1 !important;
    }
    html body.connect-shell main .dash .activity-chart-track {
      grid-column: 1 / -1 !important;
      grid-row: 2 !important;
    }
    html body.connect-shell main .sector-admin__blockhead {
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 24px !important;
    }
  }

  /* phone: halves of the 4 columns where the 8-column phone grid used halves of 8 */
  @media (max-width: 760px) {
    html body.connect-shell :is(.dir-filters, .site-footer--v2 .footer-groups, .site-footer--v2 .footer-group--explore ul, .hero-stats) {
      grid-template-columns: repeat(2, calc(2 * var(--grid-col) + var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .kh-reports-grid {
      grid-template-columns: repeat(2, calc(2 * var(--grid-col) + var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .card-grid > .deal-card {
      zoom: 1 !important;
    }
  }

  /* iPad */
  @media (min-width: 761px) and (max-width: 1023px) {
    html body.connect-shell main :is(.dash-grid, .kh-top:not(.kh-top--single), .kh-foot:not(.kh-foot--single), .deal-record-layout) {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    html body.connect-shell main .kh-reports-grid {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .profile-editor-layout {
      grid-template-columns: calc(2 * var(--grid-col) + var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
  }

  /* desktop and ultrawide: the dashboard, Knowledge Hub, deal record and profile editor on the 12 columns */
  @media (min-width: 1024px) {
    html body.connect-shell main :is(.dash-grid, .kh-top:not(.kh-top--single), .deal-record-layout) {
      grid-template-columns: calc(8 * var(--grid-col) + 7 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .kh-foot:not(.kh-foot--single) {
      grid-template-columns: calc(7 * var(--grid-col) + 6 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .kh-reports-grid {
      grid-template-columns: repeat(4, calc(3 * var(--grid-col) + 2 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .deal-draft-note {
      box-sizing: border-box !important;
      width: calc(8 * var(--grid-col) + 7 * var(--grid-gap)) !important;
      max-width: none !important;
    }
    html body.connect-shell main .profile-editor-layout {
      grid-template-columns: calc(3 * var(--grid-col) + 2 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: calc(var(--grid-col) + 2 * var(--grid-gap)) !important;
    }
    html body.connect-shell main .dash-sectors {
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
  }
  @media (min-width: 761px) and (max-width: 1023px) {
    html body.connect-shell main .profile-editor-layout .profile-photo {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    html body.connect-shell main .profile-editor-layout .profile-photo-portrait {
      width: 100% !important;
      height: auto !important;
      aspect-ratio: 1 !important;
    }
  }
  /* 1024-1179: the photo fills its three columns in the desktop's 3:4 */
  @media (min-width: 1024px) and (max-width: 1179px) {
    html body.connect-shell main .profile-editor-layout .profile-photo {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    html body.connect-shell main .profile-editor-layout .profile-photo-portrait {
      width: 100% !important;
      height: auto !important;
      aspect-ratio: 3 / 4 !important;
    }
  }
  /* Connect admin, iPad and desktop: each white panel reaches one gutter into the margin so its contents start on
     the first column line, and the rows inside run on the columns */
  @media (min-width: 761px) {
    html body.connect-shell main .connect-admin__section {
      padding-left: var(--grid-gap) !important;
      padding-right: var(--grid-gap) !important;
      margin-left: calc(-1 * var(--grid-gap)) !important;
      margin-right: calc(-1 * var(--grid-gap)) !important;
    }
    html body.connect-shell main .connect-admin__section.sector-admin {
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding: 0 !important;
      background: none !important;
      box-shadow: none !important;
    }
    html body.connect-shell main :is(.connect-admin__log, .connect-admin__firms, .sector-admin__form) {
      width: auto !important;
      max-width: none !important;
    }
    html body.connect-shell main .connect-admin__log li {
      grid-template-columns: calc(2 * var(--grid-col) + 1 * var(--grid-gap)) minmax(0, 1fr) calc(1 * var(--grid-col) + 0 * var(--grid-gap)) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main #email-log .connect-admin__log li {
      grid-template-columns: calc(2 * var(--grid-col) + 1 * var(--grid-gap)) minmax(0, 1fr) calc(3 * var(--grid-col) + 2 * var(--grid-gap)) !important;
    }
    html body.connect-shell main .connect-admin__log li > a:last-child {
      justify-self: start !important;
    }
    html body.connect-shell main .connect-admin__firm {
      grid-template-columns: calc(3 * var(--grid-col) + 2 * var(--grid-gap)) calc(3 * var(--grid-col) + 2 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    html body.connect-shell main .connect-admin__firm select {
      width: 100% !important;
    }
    html body.connect-shell main .connect-admin__firm > .button {
      justify-self: start !important;
    }
    html body.connect-shell main :is(.email-copy__panel, .broadcast__form) {
      max-width: none !important;
    }
    html body.connect-shell main .broadcast__audience {
      padding-left: 0 !important;
      padding-right: 0 !important;
      border-width: 1px 0 !important;
      border-radius: 0 !important;
    }
    html body.connect-shell main .broadcast__audience > .broadcast__legend {
      padding-left: 0 !important;
    }
    html body.connect-shell main .broadcast__modes {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
  }
  @media (min-width: 1024px) {
    html body.connect-shell main .connect-admin__firm {
      grid-template-columns: calc(6 * var(--grid-col) + 5 * var(--grid-gap)) calc(4 * var(--grid-col) + 3 * var(--grid-gap)) minmax(0, 1fr) !important;
    }
    html body.connect-shell main :is(.email-copy__panel, .broadcast__form) {
      width: calc(8 * var(--grid-col) + 7 * var(--grid-gap)) !important;
    }
    html body.connect-shell main .broadcast__modes {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
    }
  }

  /* a firm's designated members: the name and Save share the first row, the member checklist runs the full width under them */
  @media all {
    html body.connect-shell main .connect-admin__firm.connect-admin__firm--picker {
      grid-template-columns: minmax(0, 1fr) auto !important;
      align-items: start !important;
      row-gap: 12px !important;
      padding: 16px 0 !important;
    }
    html body.connect-shell main .connect-admin__firm--picker > .designated-picker {
      grid-column: 1 / -1 !important;
      grid-row: 2 !important;
    }
    html body.connect-shell main .connect-admin__firm--picker > .button {
      grid-column: 2 !important;
      grid-row: 1 !important;
      justify-self: end !important;
    }
  }

  /* the member ticks run on the columns: two to a row on iPad (4 columns each), four on desktop (3 each) */
  @media (min-width: 761px) {
    html body.connect-shell main .connect-admin__firm--picker .deal-team-picker {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
  }
  @media (min-width: 1024px) {
    html body.connect-shell main .connect-admin__firm--picker .deal-team-picker {
      grid-template-columns: repeat(4, calc(3 * var(--grid-col) + 2 * var(--grid-gap))) !important;
    }
  }

  @media (max-width: 760px) {
    html body.connect-shell main .connect-admin__firm.connect-admin__firm--picker {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    html body.connect-shell main .connect-admin__firm--picker > .button {
      grid-column: 1 !important;
      grid-row: 3 !important;
      justify-self: start !important;
    }
  }

  /* Connect deal cards on iPad: two to a row stay wide, so the card is shorter and its type smaller (captain pin 27) */
  @media (min-width: 761px) and (max-width: 1023px) {
    html body.connect-shell main .deals-grid > .deal-card {
      aspect-ratio: 1 / 1.18 !important;
    }
    html body.connect-shell main .deals-grid > .deal-card .deal-card-line {
      top: 19cqw !important;
      font-size: 6.4cqw !important;
    }
    html body.connect-shell main .deals-grid > .deal-card:has(.deal-card-stage) .deal-card-line {
      top: 25cqw !important;
    }
    html body.connect-shell main .deals-grid > .deal-card :is(.deal-card-pill, .deal-card-stage) {
      font-size: 2.9cqw !important;
    }
    html body.connect-shell main .deals-grid > .deal-card .deal-card-pill {
      top: 8cqw !important;
    }
    html body.connect-shell main .deals-grid > .deal-card .deal-card-stage {
      top: 15cqw !important;
      padding: 1.6cqw 2.9cqw !important;
    }
    html body.connect-shell main .deals-grid > .deal-card .deal-card-rows {
      bottom: 6cqw !important;
    }
    html body.connect-shell main .deals-grid > .deal-card .deal-card-row {
      padding: 1.8cqw 0 !important;
      font-size: 3.4cqw !important;
    }
  }

  /* Knowledge Hub, Most read: the number fills the first column, the title and its divider start on the second */
  @media (min-width: 761px) {
    html body.connect-shell main .kh-most-list li a {
      position: relative !important;
      grid-template-columns: var(--grid-col) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
      border-bottom: 0 !important;
    }
    html body.connect-shell main .kh-most-list li a::after {
      content: "";
      position: absolute;
      left: var(--grid-step);
      right: 0;
      bottom: 0;
      height: 1px;
      background: var(--kh-line);
    }
  }
  /* Knowledge Hub, the lead article's title: seven columns, one in from the image beside it */
  @media (min-width: 1024px) {
    html body.connect-shell main .kh-lead-title {
      max-width: calc(7 * var(--grid-col) + 6 * var(--grid-gap)) !important;
    }
  }

  /* a deal's comments: the avatar fills the first column, the words start on the second */
  @media (min-width: 761px) {
    html body.connect-shell main .connect-comment {
      grid-template-columns: var(--grid-col) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
  }
  /* phone: the portrait two and a half of the four columns wide, centred, its button centred under it (note 58) */
  @media (max-width: 760px) {
    html body.connect-shell main .profile-editor-layout .profile-photo {
      grid-template-columns: minmax(0, 1fr) !important;
    }
    html body.connect-shell main .profile-editor-layout .profile-photo-portrait {
      width: calc(2.5 * var(--grid-col) + 2 * var(--grid-gap)) !important;
      justify-self: center !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }
    html body.connect-shell main .profile-editor-layout .profile-photo .access-actions {
      margin-top: 32px !important;
      justify-items: center !important;
    }
    html body.connect-shell main .profile-editor-layout .profile-photo .access-help {
      text-align: center !important;
    }
    html body.connect-shell main .profile-editor-layout .profile-photo .access-actions > .button {
      justify-self: center !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }
  }

  /* phone: Services' Our network and Join's What could CapFive do open on a full-screen photo, the
     words on the grid margin */
  @media (max-width: 760px) {
    body.page-services main .local-editorial > .block-inner,
    body.page-join main #benefits > .block-inner,
    body main :is(.sector-stage, .sector-edit, .sector-list) > .sector-block {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
    body.page-services main .sector-block .service-deals > :is(.service-deals-title, .section-more) {
      padding-left: 0 !important;
    }
    body.page-services main .local-editorial .local-editorial-body > * {
      margin-left: var(--grid-margin) !important;
      margin-right: var(--grid-margin) !important;
    }
  }

  /* phone and iPad: a sector band runs edge to edge, its words on the grid margin */
  @media (max-width: 1023px) {
    body main :is(.page-section, .sector-stage, .sector-edit, .sector-list):has(> .sector-block),
    body main .page-section:has(> .sector-edit > .sector-block) {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
  }

  /* phone */
  @media (max-width: 767px) {
    body:not(.connect-shell) main .events-grid .posters {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body .site-footer--v2 :is(.footer-groups, .footer-group--explore ul) {
      display: grid !important;
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .hero-stats {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
    body main .hero-stats > div {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
    body.home main .sectors-section {
      padding-left: var(--grid-margin) !important;
      padding-right: var(--grid-margin) !important;
    }
    body.home main .sectors-section .sc-carousel {
      padding-left: 0 !important;
      scroll-padding-left: 0 !important;
    }
    body main .dir-filters {
      display: grid !important;
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      gap: var(--grid-gap) !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
    body .adviser-section {
      padding-left: var(--grid-margin) !important;
      padding-right: var(--grid-margin) !important;
    }
    body .adviser-section > .adviser-inner {
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
      width: auto !important;
      max-width: none !important;
    }
  }

  /* iPad and desktop */
  @media (min-width: 768px) {
    body main .page-block.has-split .split-copy {
      padding-left: var(--grid-start) !important;
      justify-content: flex-start !important;
    }
    body main .page-block.has-split .split-copy-inner {
      margin-left: 0 !important;
      padding-left: 0 !important;
    }

    body main :is(.hero > .hero-inner, .deals-section > .section-heading, .sectors-section > .section-heading, .mna-section > .mna-lab) {
      box-sizing: border-box !important;
      width: auto !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: var(--grid-start) !important;
      padding-right: var(--grid-end) !important;
    }
    body main .hero > .hero-inner {
      grid-template-columns: calc(4 * var(--grid-col) + 3 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .hero .hero-copy-col {
      translate: none !important;
      margin-left: 0 !important;
      padding-left: 0 !important;
      max-width: none !important;
    }
    body main .hero > .hero-stats {
      padding-left: var(--grid-start) !important;
    }
    body main .mna-section .mna-lab-copy {
      margin-left: 0 !important;
    }
    /* Home 1024-1100: the tablet layout lifted the stats 160px into the copy column; they sit below it */
    @media (min-width: 1024px) and (max-width: 1100px) {
      body.home main .hero > .hero-stats {
        transform: none !important;
        margin-top: 104px !important;
      }
      body.home main .hero .hero-actions .button {
        width: auto !important;
        white-space: nowrap !important;
      }
    }

    body main .hero-stats {
      display: grid !important;
      grid-template-columns: repeat(4, calc(2 * var(--grid-col) + var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
      justify-content: start !important;
      width: auto !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-right: 0 !important;
    }
    body main .hero-stats:not(.hero > .hero-stats) {
      padding-left: 0 !important;
    }
    body main .hero-stats > div {
      margin-left: calc(var(--grid-gap) / -2) !important;
      padding-left: calc(var(--grid-gap) / 2 - 1px) !important;
      padding-right: 0 !important;
    }

    body main :is(.roster, .conference-posters .posters, .deals-grid, .card-grid) {
      display: grid !important;
      grid-template-columns: repeat(var(--grid-cards), calc(var(--grid-card-span) * var(--grid-col) + (var(--grid-card-span) - 1) * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
      justify-content: start !important;
      width: auto !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
    body main .card-grid > .deal-card {
      zoom: 1 !important;
      max-width: none !important;
    }
    body main .sector-stage .sector-block {
      --card-h: calc((var(--grid-card-span) * var(--grid-col) + (var(--grid-card-span) - 1) * var(--grid-gap)) * 1.4142) !important;
    }

    body main .deals-section,
    body main .sectors-section {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
    body main .deals-section > .deal-grid {
      margin-left: 0 !important;
      margin-right: 0 !important;
      width: auto !important;
      padding-left: var(--grid-start) !important;
      padding-right: var(--grid-end) !important;
      scroll-padding-left: var(--grid-start) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .deals-section > .deal-grid > .deal-card {
      flex: 0 0 calc((3 * var(--grid-col) + 2 * var(--grid-gap)) / 0.85) !important;
      width: calc((3 * var(--grid-col) + 2 * var(--grid-gap)) / 0.85) !important;
      zoom: 0.85 !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
    body main .sectors-section .sc-rail {
      --sc-inset: var(--grid-start) !important;
    }

    body main :is(section.why-feature, .services-section > .c-halfimg),
    body .adviser-section {
      padding-left: 0 !important;
      padding-right: 0 !important;
      justify-content: flex-start !important;
    }
    body main :is(section.why-feature > .why-feature-body, .services-section > .c-halfimg > .c-halfimg-body),
    body .adviser-section > .adviser-inner {
      box-sizing: border-box !important;
      flex: none !important;
      max-width: none !important;
      margin-left: calc(var(--grid-start) + var(--from) * var(--grid-step)) !important;
      margin-right: 0 !important;
      width: calc(var(--span) * var(--grid-col) + (var(--span) - 1) * var(--grid-gap)) !important;
      left: auto !important;
      right: auto !important;
      align-self: flex-start !important;
    }

    body main section.precision-section {
      padding-left: var(--grid-start) !important;
      padding-right: var(--grid-end) !important;
    }
    body main section.precision-section > * {
      margin-left: 0 !important;
      max-width: none !important;
    }

    body main :is(#membership, #enquiry) :is(.prose, .join-form) {
      margin-left: 0 !important;
      margin-right: 0 !important;
      width: calc(8 * var(--grid-col) + 7 * var(--grid-gap)) !important;
      max-width: none !important;
    }
    body main :is(#membership, #enquiry) .join-form {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }

    body main .page-block > .block-inner > :is(.deal-finder, .deals-pager),
    body main .world-map {
      margin-left: 0 !important;
      margin-right: 0 !important;
      width: auto !important;
      max-width: none !important;
    }

    body main .meta-list {
      grid-template-columns: repeat(var(--meta-cols, 2), calc(var(--meta-span, 4) * var(--grid-col) + (var(--meta-span, 4) - 1) * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .meta-list > div {
      padding-right: 0 !important;
    }
  }

  /* iPad */
  @media (min-width: 768px) and (max-width: 1023px) {
    body main .page-block.has-split {
      grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr) !important;
    }
    body main .about-manifesto > .block-inner {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .about-manifesto .manifesto-points {
      margin-left: 0 !important;
      width: auto !important;
    }
    body main .access-layout > .access-panel {
      justify-self: stretch !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      width: auto !important;
      max-width: none !important;
    }

    body main :is(section.why-feature, .services-section > .c-halfimg) > * {
      --from: 1;
      --span: 6;
    }
    body main :is(section.why-feature.about-does, section.why-feature.network-pro-b) > * {
      --from: 2;
      --span: 6;
    }
    body .adviser-section > .adviser-inner {
      --from: 0;
      --span: 8;
    }

    body .site-footer--v2 .footer-groups {
      grid-template-columns: repeat(2, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body .site-footer--v2 .footer-group--explore {
      grid-column: 1 !important;
      grid-row: 1 / span 2 !important;
    }
    body .site-footer--v2 .footer-group--explore ul {
      display: grid !important;
      grid-template-columns: repeat(2, calc(2 * var(--grid-col) + var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body .site-footer--v2 .footer-group:not(.footer-group--explore) {
      grid-column: 2 !important;
    }
  }

  @media (min-width: 768px) and (max-width: 900px), (min-width: 768px) and (max-width: 960px) and (max-height: 1099px) {
    body main .page-block.has-split {
      grid-template-columns: minmax(0, 1fr) !important;
    }
  }

  /* desktop and ultrawide */
  @media (min-width: 1024px) {
    body main .page-block.has-split {
      grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr) !important;
    }

    body main section.why-feature > *,
    body main .services-section > .c-halfimg > * {
      --from: 4;
      --span: 8;
    }
    body main section.why-feature.about-does > * {
      --from: 3;
      --span: 9;
    }
    body .adviser-section > .adviser-inner {
      --from: 1;
      --span: 10;
    }

    body main .hero > .hero-inner {
      grid-template-columns: calc(6 * var(--grid-col) + 5 * var(--grid-gap)) minmax(0, 1fr) !important;
    }
    body main .hero-stats {
      grid-template-columns: repeat(4, calc(3 * var(--grid-col) + 2 * var(--grid-gap))) !important;
    }

    body main .about-manifesto .manifesto-points {
      display: grid !important;
      grid-template-columns: repeat(3, calc(4 * var(--grid-col) + 3 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
      justify-content: start !important;
      width: auto !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }

    body main .how-route-stops {
      display: grid !important;
      grid-template-columns: repeat(4, calc(3 * var(--grid-col) + 2 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
      justify-content: start !important;
    }

    body main section.movement-section {
      box-sizing: border-box !important;
      width: auto !important;
      max-width: none !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding-left: var(--grid-start) !important;
      padding-right: var(--grid-end) !important;
      grid-template-columns: calc(6 * var(--grid-col) + 5 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main section.movement-section > .movement-copy {
      translate: none !important;
      margin-left: 0 !important;
      max-width: none !important;
    }

    body main section.precision-section {
      grid-template-columns: calc(5 * var(--grid-col) + 4 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .precision-grid > article {
      grid-template-columns: calc(3 * var(--grid-col) + 2 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .precision-grid > article > * {
      margin-left: 0 !important;
    }

    body main :is(.local-editorial > .block-inner, .page-block .split, .access-layout) {
      grid-template-columns: calc(6 * var(--grid-col) + 5 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main :is(.local-editorial-photo, .local-editorial-body, .page-block .split > *) {
      margin-left: 0 !important;
      margin-right: 0 !important;
      max-width: none !important;
      width: auto !important;
    }
    body main .local-editorial-stats {
      display: grid !important;
      grid-template-columns: repeat(2, calc(3 * var(--grid-col) + 2 * var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .local-editorial-stats > div {
      margin: 0 !important;
    }
    body main .access-layout > .access-panel {
      grid-column: 2 !important;
      justify-self: end !important;
      margin: 0 !important;
      width: calc(6 * var(--grid-col) + 5 * var(--grid-gap)) !important;
      max-width: none !important;
    }

    body main .meta-list {
      --meta-cols: 4;
      --meta-span: 3;
    }
    body.single-firm main .meta-list {
      --meta-cols: 3;
      --meta-span: 4;
    }

    body.page-services main .sector-stage .sector-block .service-deals {
      left: var(--grid-start) !important;
      right: auto !important;
    }

    body .site-footer--v2 .footer-groups {
      grid-template-columns: repeat(12, var(--grid-col)) !important;
      column-gap: var(--grid-gap) !important;
    }
    body .site-footer--v2 .footer-group--explore {
      grid-column: 1 / span 5 !important;
    }
    body .site-footer--v2 .footer-group--explore ul {
      display: grid !important;
      grid-template-columns: repeat(2, calc(2 * var(--grid-col) + var(--grid-gap))) !important;
      column-gap: var(--grid-gap) !important;
    }
    body .site-footer--v2 .footer-group:not(.footer-group--explore):not(.footer-visit) {
      grid-column: 6 / span 3 !important;
    }
    body .site-footer--v2 .footer-visit {
      grid-column: 9 / span 4 !important;
    }
  }

  /* ultrawide photo openings (note 38): the words sit where desktop puts them, their top at 36% of the screen,
     instead of centred, which read high */
  @media (min-width: 2200px) {
    body #main > section.page-block.has-split:first-child > .split-copy {
      align-items: flex-start !important;
      padding-top: 36vh !important;
    }
  }

  /* ultrawide closing call to action (note 36): the box spans the content, columns 3-14, like every other section.
     style.css zooms it up for the large screen, and a zoom scales its own margin and width as well, so both are
     divided by the same zoom to land on the column lines */
  @media (min-width: 2200px) {
    body .adviser-section > .adviser-inner {
      --from: 0;
      --span: 12;
      --adviser-zoom: 1.1;
      margin-left: calc((var(--grid-start) + var(--from) * var(--grid-step)) / var(--adviser-zoom)) !important;
      width: calc((var(--span) * var(--grid-col) + (var(--span) - 1) * var(--grid-gap)) / var(--adviser-zoom)) !important;
    }
  }
  @media (min-width: 2400px) { body .adviser-section > .adviser-inner { --adviser-zoom: 1.25; } }
  @media (min-width: 3200px) { body .adviser-section > .adviser-inner { --adviser-zoom: 1.45; } }
  @media (min-width: 4400px) { body .adviser-section > .adviser-inner { --adviser-zoom: 1.7; } }

  @media (min-width: 2200px) {
    body main .page-block.has-split .split-copy-inner {
      width: auto !important;
      max-width: none !important;
    }
    /* the stats follow the copy in the flow (they sat absolutely at the hero's foot and ran into a long lede on a short screen) */
    body main .page-block.has-split .split-copy-inner > .hero-stats {
      position: relative !important;
      top: auto !important;
      bottom: auto !important;
      left: auto !important;
      right: auto !important;
      width: calc(var(--grid-vw) - var(--grid-start) - var(--grid-end)) !important;
      margin-top: 72px !important;
    }
    body main .page-block.has-split .hero-stats {
      left: var(--grid-start) !important;
    }
    body main .sector-stage .sector-edit-txt,
    body main .sector-stage .sector-edit-row {
      width: auto !important;
      max-width: none !important;
    }
    body main .sector-stage .sector-block > .sector-edit-row {
      flex: 1 1 auto !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
    }
    /* a sector's deal strip spans the content columns exactly, its heading and All Deals inside them */
    body:is(.page-services, .page-sectors) main .sector-stage .sector-block > .service-deals {
      box-sizing: border-box !important;
      width: calc(var(--grid-vw) - var(--grid-start) - var(--grid-end)) !important;
      max-width: none !important;
      flex: none !important;
      left: 0 !important;
      right: auto !important;
    }

    body main .sectors-section .sc-rail {
      margin-left: var(--grid-start) !important;
    }
    /* the sector rail runs on past the screen's right edge; the section clips it so the page never widens */
    body main .sectors-section {
      overflow-x: clip !important;
    }
  }

  @media (min-width: 1024px) and (max-width: 1279px) {
    body .adviser-section > .adviser-inner {
      --from: 0;
      --span: 12;
    }
    /* About, Why CapFive: the heading and copy on columns 3-7, the three cards stacked on 8-14 */
    body main .about-manifesto > .block-inner {
      grid-template-columns: calc(5 * var(--grid-col) + 4 * var(--grid-gap)) calc(7 * var(--grid-col) + 6 * var(--grid-gap)) !important;
      column-gap: var(--grid-gap) !important;
    }
    body main .about-manifesto .manifesto-points {
      grid-template-columns: calc(7 * var(--grid-col) + 6 * var(--grid-gap)) !important;
      row-gap: var(--grid-gap) !important;
    }
    body main .about-manifesto .manifesto-points > div {
      grid-template-columns: minmax(0, 1fr) !important;
    }
  }

  /* Join, What could CapFive do for your firm: one even step between the heading, each benefit and
     the fit paragraph, no dividers; on desktop the photograph starts a column early (columns 2-7)
     and the text takes columns 9-14, both from the same top line. */
  @media (min-width: 761px) {
    body.page-join main #benefits {
      --join-step: 32px;
    }
    body.page-join main #benefits .split-body > .photo-title > h2 {
      margin: 0 0 var(--join-step) !important;
    }
    body.page-join main #benefits .split-body > ol.join-benefits {
      display: grid !important;
      row-gap: var(--join-step) !important;
      margin: 0 !important;
      border: 0 !important;
    }
    body.page-join main #benefits .split-body > ol.join-benefits > li {
      padding: 0 !important;
      border: 0 !important;
      line-height: 1.6 !important;
    }
    body.page-join main #benefits .join-benefit-title {
      display: block;
      margin-bottom: 8px;
      font-weight: 700;
      color: var(--navy);
    }
    body.page-join main #benefits .split-body > .join-who-heading {
      margin: var(--join-step) 0 12px !important;
    }
  }
  @media (max-width: 760px) {
    body.page-join main #benefits .join-benefit-title {
      display: block;
      margin-bottom: 6px;
      font-weight: 700;
    }
  }
  @media (min-width: 1024px) {
    body.page-join main #benefits {
      height: auto !important;
      min-height: 0 !important;
      padding-top: 144px !important;
      padding-bottom: 144px !important;
    }
    body.page-join main #benefits .block-inner > .split {
      display: grid !important;
      grid-template-columns: calc(6 * var(--grid-col) + 5 * var(--grid-gap)) minmax(0, 1fr) !important;
      column-gap: calc(var(--grid-col) + 2 * var(--grid-gap)) !important;
      align-items: start !important;
      height: auto !important;
      min-height: 0 !important;
      margin-left: calc(-1 * var(--grid-step)) !important;
    }
    body.page-join main #benefits .split-media {
      align-self: start !important;
      height: auto !important;
      margin: 0 !important;
    }
    body.page-join main #benefits .split-media img {
      position: static !important;
      width: 100% !important;
      height: auto !important;
      max-height: none !important;
      aspect-ratio: 4 / 5 !important;
      object-fit: cover !important;
    }
    body.page-join main #benefits .split-body {
      align-self: start !important;
      margin: 0 !important;
      padding: 0 !important;
    }
  }
}
