/* ==========================================================================
   AcmaCorp Mobile Density
   --------------------------------------------------------------------------
   Load order: last.

   Measured problem: pages ran 8–10 screens tall on a 390×844 phone, and mobile
   was up to 1.85× the desktop height because every card grid collapsed to a
   single stacked column.

   On /professional-services/staff-augmentation/ (the template behind 53 pages)
   two sections alone accounted for 4,193px of 8,665:
       .help-section            2,256px  — 8 cards stacked
       .related-insights-section 1,937px  — 3 cards stacked

   Fix: horizontal scroll-snap carousels on mobile. CSS-only — native momentum
   scrolling, no JS, no library, and the cards stay in the DOM in order so
   keyboard and screen-reader users are unaffected.
   ========================================================================== */

@media (max-width: 767px) {

  /* ---- the carousel primitive ---------------------------------------- */
  .content-cards-list,
  .insights-listing-wrapper > ul,
  .articles-listing-wrapper > ul,
  .icon-text-cards-block{
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: var(--ds-space-4, 16px);

    /* Bleed to the screen edges so the next card peeks — the affordance that
       tells people it scrolls.
       The bleed must match the container's REAL gutter. Every template's
       .wrapper is padded 15px at mobile, not the design system's nominal
       16px, so bleeding by --ds-container-pad overshot by 1px each side and
       pushed the page 1px wide (measured on /insights/ at 375px). */
    margin-inline: calc(var(--ds-carousel-bleed, 15px) * -1);
    padding-inline: var(--ds-carousel-bleed, 15px);
    scroll-padding-inline: var(--ds-carousel-bleed, 15px);
    padding-bottom: var(--ds-space-2, 8px);

    scrollbar-width: none;
  }
  .content-cards-list::-webkit-scrollbar,
  .icon-text-cards-block::-webkit-scrollbar,
  .insights-listing-wrapper > ul::-webkit-scrollbar,
  .articles-listing-wrapper > ul::-webkit-scrollbar{ display: none; }

  /* ---- the slides ------------------------------------------------------ */
  .content-cards-list > *,
  .icon-text-cards-block > *,
  .insights-listing-wrapper > ul > li,
  .articles-listing-wrapper > ul > li {
    flex: 0 0 84%;
    max-width: 84%;
    scroll-snap-align: start;
    margin: 0;
  }

  /* ---- scroll affordance ----------------------------------------------- */
  .content-cards-block,
  .insights-listing-wrapper,
  .articles-listing-wrapper { position: relative; }

  .content-cards-list::after,
  .insights-listing-wrapper > ul::after,
  .articles-listing-wrapper > ul::after {
    content: "";
    flex: 0 0 var(--ds-space-1, 4px);
  }

  .content-card { padding: var(--ds-space-4, 16px); }
  .content-card p:last-child { margin-bottom: 0; }

  /* The internal banner stacked image + copy with generous desktop spacing. */
  .internal-banner-content { padding-block: var(--ds-space-4, 16px); }

  /* Accordion/tab drawers: tighten the touch rows without going under 48px. */
  .tab-drawer-heading { min-height: 48px; padding-block: var(--ds-space-3, 12px); }

  /* Event / CTA blocks */
  .event-card-section-content { padding: var(--ds-space-5, 24px); }
}


/* ==========================================================================
   REDUCED MOTION
   scroll-snap is fine, but stop smooth-scroll chaining for those who opt out.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .content-cards-list,
  .insights-listing-wrapper > ul,
  .articles-listing-wrapper > ul { scroll-behavior: auto; }
}

/* PAGE TITLE FALLBACK -- retired.
   /global-location/ shipped with no <h1>, and this rule dressed the stand-in
   the page grew instead. It set --ds-display-3, a section heading's size, on
   a page heading, so the title was 8px smaller than the h1 on every other
   inner page. The page has a real banner now and the class is gone with it. */

/* ==========================================================================
   PHASE 1 — SW-1: FOOTER HEIGHT
   The footer measured 1,145px at 375px on every page: 1.4 screens of chrome
   before a visitor reaches anything page-specific. On /thank-you/ it was 69%
   of the document, on /global-location/ 48%, on /our-work/ 47%.

   The link columns already collapse to accordions, which is right. The height
   was going elsewhere: a full-bleed word-mark repeating the sticky header's
   logo, 76px accordion rows, and desktop padding carried down unchanged.

   Nothing here deletes copy — the "Join our team" sentence is the value
   proposition for the button beside it, so it stays and the spacing tightens
   around it instead.
   ========================================================================== */
@media (max-width: 767px) {

  /* The word-mark was rendering full-bleed at 345x78. The header is sticky and
     carries the logo permanently, so this is a sign-off, not identification:
     scale it to a mark rather than a banner. */
  .site-footer .footer_logo_bottom {
    max-width: 148px;
    padding-top: var(--ds-space-3, 12px);
  }

  /* 40px of desktop rhythm below the last footer block. */
  .site-footer .footer-top { padding-bottom: var(--ds-space-5, 24px); }

  /* The accordion group carried 36px of lead-in from the tablet breakpoint,
     plus a 15px margin from the nav element itself. */
  .site-footer .footer-top .footer-links .footer-menu-1 {
    padding-top: var(--ds-space-3, 12px);
    margin-top: 0;
  }

  /* Rows were 76px each (24px uppercase on a 41px line, plus 35px of padding),
     then 19px here -- a size that sat on no scale step, set only for this
     breakpoint. The column headings now carry the shared footer subhead role
     at every width, so only the row height is a mobile concern: the padding
     keeps the accordion row clear of the 44px touch minimum. */
  .site-footer .footer-top .footer-links .footer-menu-1 .ft-links-col h2 {
    padding: 15px 0 16px 0;
  }

  /* Join Our Team: the headline and its sentence were spaced for a desktop
     column. The sentence stays -- it is the value proposition for the button
     beside it -- but the rhythm around it closes up. */
  .site-footer .footer-top .join-team .join-team-left { padding-bottom: var(--ds-space-3, 12px); }
  .site-footer .footer-top .join-team .join-team-left h2 {
    line-height: var(--ds-leading-snug);
    margin-bottom: var(--ds-space-2, 8px);
  }
  .site-footer .footer-top .join-team .join-team-left p { margin-bottom: var(--ds-space-4, 16px); }
  .site-footer .footer-top .join-team .viewmore_list { margin-top: var(--ds-space-5, 24px); }

  /* Stay Connected: a 24px heading on a 41px line with 10px of padding either
     side came to 61px for one word. */
  .site-footer .footer-top .social-media { padding-top: var(--ds-space-4, 16px); }
  .site-footer .footer-top .social-media .social-media-top h2 {
    line-height: var(--ds-leading-snug);
    padding-top: 0;
    padding-bottom: 0;
  }

  /* The copyright's two lines were carrying block margins on top of a
     line-height of 1. */
  .site-footer .footer-bottom .footer-copy-nav .copy-right p { margin: 0 0 6px; }
  .site-footer .footer-bottom .footer-copy-nav .copy-right p:last-child { margin-bottom: 0; }

  /* Bottom bar: 24px of padding and 19px under each stacked block. */
  .site-footer .footer-bottom {
    padding-top: var(--ds-space-4, 16px);
    padding-bottom: var(--ds-space-4, 16px);
  }
  .site-footer .footer-bottom .footer-copy-nav .copy-right,
  .site-footer .footer-bottom .footer-copy-nav .lang-switcher {
    padding-bottom: var(--ds-space-3, 12px);
  }

  /* ---- what the first pass left behind ------------------------------------
     Two things, both measured after the pass above landed the footer at 976px.

     112px of empty black above "JOIN OUR TEAM" -- desktop's approach distance
     carried down untouched, and on a phone it is a full screen-eighth of
     nothing between the last section and the first word of the footer. The
     section above already ends on its own padding, so 48 is the whole
     separation this needs. */
  .site-footer { padding-top: var(--ds-space-8, 48px); }

  /* The legal row wraps to two 44px lines and stays that way: SW-9 reserves
     68px on its right so "Sitemap" clears the chat launcher, and the four
     labels cannot fit one row inside what is left. The 15px the row carried
     from the tablet breakpoint on top of that is not doing anything. */
  .footer-bottom .footer-nav { margin-top: var(--ds-space-2, 8px); }

  /* ---- the bottom bar never lined up with the footer above it -------------
     Measured at 390: every row in .footer-top starts at x=16 -- the heading,
     the sentence, the button, the accordion rows, the social icons, the
     locations link. Every row in .footer-bottom starts at x=36, because the
     bar is padded twice, 20px on itself and 16 again on the .wrapper inside
     it. And within the bar the copyright and the locale are centred while the
     legal links are left-aligned, so the three rows do not agree with each
     other either.

     One edge for the whole footer: 16px, left, the same as everything above. */
  .site-footer .footer-bottom { padding-left: var(--ds-space-4, 16px); padding-right: var(--ds-space-4, 16px); }
  .site-footer .footer-bottom > .wrapper { padding-left: 0; padding-right: 0; }
  .site-footer .footer-bottom .footer-copy-nav .copy-right,
  .site-footer .footer-bottom .footer-copy-nav .copy-right p,
  .site-footer .footer-bottom .footer-copy-nav .lang-switcher { text-align: left; }
  .site-footer .footer-bottom .footer-copy-nav .copy-right { justify-content: flex-start; }
  .site-footer .footer-bottom .footer-copy-nav .lang-switcher a { justify-content: flex-start; }
  /* style.css spreads the legal links with `space-between`, which was reading
     as alignment while the rows above were centred. Left-aligned, it stops
     being spacing and starts being a ragged gap: "Terms of Use" to "Legal
     Notice" stretched across 282px with "Sitemap" alone underneath. A plain
     gap groups them as the one list they are. */
  .site-footer .footer-bottom .footer-copy-nav .footer-nav .menu ul {
    justify-content: flex-start;
    column-gap: var(--ds-space-5, 24px);
  }

  /* The rule that used to sit here pulled the "More links" glyph to the left
     margin, for a design where the plus was a bare mark aligned with the
     accordion rows below it. The control is a centred disc now, so that pull
     put the plus 11px off the centre of its own circle -- on mobile only,
     which is why it read as a wonky icon rather than a layout rule. */
}

/* ==========================================================================
   PHASE 1 — SW-5: 44px TOUCH TARGETS
   16 links per page measured under 44px tall, and 66 on /sitemap/. They clear
   the WCAG 2.5.8 AA floor of 24x24, so this is not a compliance failure -- but
   they sit well under the 44px both Apple and Google publish, and they are the
   links a visitor reaches for one-handed at the end of a long page.

   The pattern throughout is a 44px hit area with the ink sitting inside it, so
   nothing grows visually.
   ========================================================================== */
@media (max-width: 1023px) {

  /* Footer legal row: Terms of Use / Privacy / Legal Notice / Sitemap, 24px. */
  .site-footer .footer-bottom .footer-nav .menu ul li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* Footer link columns and the More Links panel: 30px rows. */
  .site-footer .footer-top .footer-links .footer-menu-1 .ft-links-col ul li a,
  .site-footer .footer_pages .footer_pages_list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* Language switcher in the bottom bar. */
  .site-footer .footer-bottom .lang-switcher .language_ces {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
} is declared twice in
   style.css (:18646 inside max-width 1599px, :19820 inside max-width 479px),
   so it applies at every mobile width. On a 375px screen that is a quarter of
   a screen of empty space between the partner logos and whatever follows.
   The desktop value is deliberate and is left alone.
   ========================================================================== */
/* ==========================================================================
   PHASE 1 — P-05: JOB / SOLUTION ACCORDION ROWS
   Two problems measured at 375px. The panel's open state came from a jQuery
   inline display, so ui-enhancements.js can clear it but cannot reliably keep
   it clear -- driving display from .active instead makes the class the single
   source of truth. And closed rows sat at opacity 0.4, which on the dark
   ground read as disabled rather than tappable.
   ========================================================================== */
@media (max-width: 767px) {

  /* .active decides, not an inline style. */
  .accordion-section .custom-accordion .custom-accordion-left .accordion-list > li > .custom-accordion-panel {
    display: none;
  }
  .accordion-section .custom-accordion .custom-accordion-left .accordion-list > li.active > .custom-accordion-panel {
    display: block;
  }

  /* Closed rows are links, not disabled text. */
  .accordion-section .custom-accordion .custom-accordion-left .accordion-list > li h3 { opacity: 0.78; }

  /* A chevron so the row reads as expandable. Drawn from a border rather than
     an image so it inherits the heading colour in both states. */
  .accordion-section .custom-accordion .custom-accordion-left .accordion-list > li > h3 {
    position: relative;
    padding-right: 34px;
  }
  .accordion-section .custom-accordion .custom-accordion-left .accordion-list > li > h3::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
  }
  .accordion-section .custom-accordion .custom-accordion-left .accordion-list > li.active > h3::after {
    transform: rotate(-135deg);
    margin-top: -2px;
  }

  /* The row is the control, so give it a comfortable target. */
  .accordion-section .custom-accordion .custom-accordion-left .accordion-list > li > h3 { min-height: 44px; }
}

/* ==========================================================================
   SERVICE CARDS — retired.

   This block gave .content-card a second, phone-only appearance: a flat white
   box with a 1px border, a 16px radius and a 3px orange bar across its top
   edge. It described a card that had "no background, no border and no radius"
   on mobile, which stopped being true when the card became the bezelled plate.

   None of it rendered. Measured at 390px, .content-card resolves to the same
   plate as desktop -- rgba(255,255,255,.55), 26px radius, 6px tray, the three
   stacked navy shadows -- because `main :is(section, .section) .content-card`
   in sections.css outranks a bare `.content-card` here. The top accent never
   painted either: sections.css sets `.content-card::before { content: none }`
   at (0,4,1) against this rule's (0,1,1), so the pseudo-element generated no
   box at all.

   So this was a third card treatment that could not apply, and the plate is
   the card on both widths. The spacing rules below it are real and stay.
   ========================================================================== */
@media (max-width: 767px) {

  .content-card .icon-svg { margin-bottom: var(--ds-space-4, 16px); }
  .content-card h4 { margin-bottom: var(--ds-space-2, 8px); }
  .content-card p:last-child { margin-bottom: 0; }

  /* The template prints two empty .field_call_to_action divs inside every tab
     panel; the wrapper reserved 30px for nothing. */
  .tab-content .cta-group:empty,
  .tab-content .cta-group:has(> .field_call_to_action:empty:only-child),
  .tab-content .cta-group > .field_call_to_action:empty { display: none; }
}

/* ==========================================================================
   PHASE 2 — THE CLAMP PRIMITIVE
   Long CMS prose inside a panel or a slide is the substance of the page, so
   it is never truncated -- it is folded behind a control the reader can open.
   ui-enhancements.js adds .acma-clamp and the button only when the block is
   actually taller than the budget, so short copy is left alone entirely.

   Runs to 1023px, matching ui-enhancements.js: the blocks it folds are all
   taller at 768 than at 375 or 1440, because their two-column layout starts
   before the column is wide enough for the copy.
   ========================================================================== */
@media (max-width: 1023px) {
  .acma-clamp {
    position: relative;
    overflow: hidden;
    max-height: var(--acma-clamp-max, 260px);
  }
  .acma-clamp::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--acma-clamp-fade, #FFFFFF) 92%);
  }
  .acma-clamp.is-open {
    max-height: none;
  }
  .acma-clamp.is-open::after { content: none; }

  .acma-clamp-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2, 8px);
    min-height: 44px;
    margin-top: var(--ds-space-2, 8px);
    padding: 0;
    border: 0;
    background: none;
    /* `font: 600 1rem/1.4 inherit` is invalid -- inherit is not a family --
       so the whole shorthand was dropped and the button fell back to the UA
       default of 13.33px. Set the parts instead. */
    font-family: inherit;
    font-size: var(--ds-text-sm, 1rem);
    /* The scale has no 600; 500 plus the rust colour carries the emphasis. */
    font-weight: var(--ds-weight-medium, 500);
    line-height: var(--ds-button-leading);
    color: var(--ds-primary, #B65002);
    cursor: pointer;
  }
  .acma-clamp-toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
  }
  .acma-clamp-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
  .acma-clamp-toggle:focus-visible { outline: 2px solid var(--ds-primary, #B65002); outline-offset: 3px; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .acma-clamp-toggle::after { transition: none; }
}

/* ==========================================================================
   PHASE 2 — P-06: THE PANEL REPEATS ITS OWN DRAWER HEADING
   page-service1.php renders content_2_listing_heading twice: once as the
   <h3 class="tab-drawer-heading"> the reader taps, and again as an <h4> at the
   top of the panel it opens. On desktop the drawer headings are hidden and the
   tab strip is used instead, so the h4 is the panel's only label -- but on
   mobile the two sit directly on top of each other, costing ~60px of pure
   repetition on all 53 service pages.

   Hidden visually only. The drawer heading above it is a real <h3>, so the
   panel keeps a heading in the accessibility tree either way.

   Not on the homepage. .acma-tabs is excluded because there the drawer heading
   is the product name ("AcmaTel CCS") and the h4 is the panel's proposition
   ("Run the whole contact centre from one console") -- two different lines, so
   hiding one is losing copy rather than removing a repeat.
   ========================================================================== */
@media (max-width: 767px) {
  .tab-content-section:not(.acma-tabs) .tab-content .tab-content-left > h4,
  .tab-content-section:not(.acma-tabs) .tab-content .tab-content-left > .tab-panel-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* ==========================================================================
   PHASE 2 — P-04: INDUSTRY STORY SLIDES WERE TWO SCREENS EACH
   Measured on /industry_served/healthcare/ at 375px: each slide was 1,488px
   -- image 297px plus 1,191px of content, of which the challenge/solution/
   results block alone was 1,064px. A swipe carousel whose slide is taller than
   the viewport is the worst of both patterns: the reader cannot see a slide,
   and the vertical reading fights the horizontal gesture.

   The copy is folded behind the clamp primitive rather than cut, and the
   slide image is capped so the headline and the first line of the story share
   the first screen.
   ========================================================================== */
@media (max-width: 767px) {
  .content-slider-section .slider .slider-image img {
    height: 190px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--ds-radius-md, 12px);
  }
  .content-slider-section .slider .slider-content { padding-top: var(--ds-space-4, 16px); }

}

/* ==========================================================================
   PHASE 2 — P-03: "WHO IS IT FOR?" WAS UNREADABLE ON THE ORANGE HALF
   .accordion-section paints linear-gradient(90deg, #000 0%, #FF7F1F 50%) --
   a background composed for a wide viewport, where the dark half sits behind
   the copy and the orange half is empty space. Squeezed into 375px the copy
   crosses both halves, so white headings ran at roughly 2:1 over the orange.

   #FF7F1F cannot carry white text anywhere (2.53:1). The brand's own darker
   rust can: white on #B65002 measures about 6:1, which passes AA for body
   text and comfortably for the 28px headings used here. So mobile gets a flat
   rust ground rather than losing the section's orange identity, and the
   headings go back to full opacity.

   Scoped away from .job-list, which uses the same accordion on a light ground.
   Desktop keeps the gradient.
   ========================================================================== */
/* ==========================================================================
   PHASE 2 — P-07: THE CONTACT FORM'S LABELS AND TEXTAREA
   style.css sets `form .form-control-wrap label { position: absolute; top:
   -20px; background: surface; margin: 0 10px; padding: 5px 15px 0 5px }`,
   with a second rule moving it to -25px at one breakpoint. The result is an
   opaque chip sitting half over the field's top border, landing differently
   on the fields whose wrapper is nested one level deeper -- which is why
   "Phone Number" and "Region of Interest" looked unlike "First Name".

   conversion.css already asks for a plain block label but loses on
   specificity: `.form-control-wrap > label` is (0,1,1) against (0,1,2). This
   matches (0,1,2) from a later stylesheet, so it wins the tie.

   Mobile only -- the desktop form is unchanged.
   ========================================================================== */
@media (max-width: 767px) {
  form .form-control-wrap label {
    position: static;
    background: none;
    margin: 0 0 var(--ds-space-1, 4px);
    padding: 0;
    border-radius: 0;
    font-size: var(--ds-text-xs, .875rem);
    font-weight: var(--ds-weight-medium, 500);
    line-height: var(--ds-leading-snug);
    cursor: pointer;
  }
  /* The markup is <input> then <label>, and the chip's absolute positioning
     was what put the label on top. conversion.css already asks for a column
     flex wrap with order:-1 on the label, but `.form-control-wrap` is (0,1,0)
     and loses the display to a stronger rule, which left the labels sitting
     underneath their fields. This reaches (0,2,1). */
  form .form-item .form-control-wrap {
    display: flex;
    flex-direction: column;
  }
  form .form-item .form-control-wrap > label { order: -1; }

  /* The wrapper reserved room for the chip that used to hang above it. */
  form .form-item { margin-top: 0; }

  /* rows="10" gave a 205px message box that pushed submit off the second
     screen on every one of the four lead forms. Four rows is enough to start
     typing in; the field still grows if the browser allows it. */
  form .form-control-wrap textarea{
    height: 112px;
    min-height: 112px;
  }
}

/* ==========================================================================
   PHASE 2 — P-07: THE OFFICE DIRECTORY
   Styling only applies once ui-enhancements.js has built the controls, so a
   page without JS still shows every address in full.
   ========================================================================== */
@media (max-width: 767px) {
  .acma-offices-ready .contact-right .contact-info {
    border-bottom: 1px solid var(--ds-border, #DDE3EC);
  }

  .acma-offices-ready .contact-right .contact-info h3 { margin: 0; }

  .acma-office-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-3, 12px);
    width: 100%;
    min-height: 52px;
    padding: var(--ds-space-3, 12px) 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .acma-office-toggle::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
    opacity: .7;
  }
  .acma-office-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
  .acma-office-toggle:focus-visible { outline: 2px solid var(--ds-primary, #B65002); outline-offset: 2px; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .acma-office-toggle::after { transition: none; }
}

/* Collapsed office rows came to 109px each: a 24px heading on a generous line
   plus the block spacing that made sense when every address was visible. As a
   list of eight tappable rows they want the proportions of a list. */
@media (max-width: 767px) {
  .acma-offices-ready .acma-office-toggle {
    min-height: 56px;
    padding-block: var(--ds-space-3, 12px);
  }
}

/* The phone row's label lived inside .phone-container (a flex row holding the
   country-code select and the number field), not inside .form-control-wrap, so
   the column rule above never reached it and "Phone Number" sat wrapping in a
   third column to the right of the two inputs.

   The label is inside its own .acma-phone-field now -- it had to be, because
   absolutely positioned against the outer wrap it was drawn 181px to the left
   of the number, over the select -- so `> label` no longer matches. The wrap
   rule stays; the label rule moved to sections.css beside the rest of the
   form-label work. */
@media (max-width: 767px) {
  form .phone-container { flex-wrap: wrap; }
}

/* A collapsed office row measured 103px: 30px of wrapper padding and a 15px
   heading margin sized for a block that always showed a full address, plus a
   4px dark-to-orange gradient rule between rows. As a list of eight tappable
   rows it wants list proportions and a hairline, and the border-bottom added
   above already provides the divider. */
/* ==========================================================================
   PHASE 3 — SW-3: ONE SIZE FOR SECTION HEADINGS

   Correcting the audit. It reported h1 spanning 28-48px and body copy at 14px
   on six templates. Re-measured against the cascade, neither holds:

     h1   is already one rule everywhere -- clamp(1.875rem, 1.1rem + 2.4vw,
          4rem) on the banner templates and 32px on the article templates.
          That is 30 or 32px at 375px: a scale, not a spread.
     body copy measures 16-20px on every template. The 14px figure came from
          sampling the first paragraph over 120 characters, which on the form
          and utility pages is a chrome element rather than page copy -- those
          pages carry no long prose in <main> at all.

   What is real is the h2. Three sizes are in play at 375px for one job:

     24px  main :is(section, .section) h2            (the design system rule)
     32px  .internal-banner-title, and .section-heading h2 in several variants
     40px  .contactus-content .contact-right h2 -- "CONTACT INFORMATION",
           which wrapped to two lines on a phone

   Card titles are left alone: .article-teaser-title is an h2 in the markup
   but a card heading on the page, and 20px is right for it.
   ========================================================================== */
@media (max-width: 767px) {
  .internal-banner .internal-banner-content .internal-banner-title{
    font-size: var(--ds-display-3);
    line-height: var(--ds-leading-snug, 1.25);
  }
}

/* ==========================================================================
   PHASE 3 — SW-4: THE SUB-14px TEXT THAT IS ACTUALLY OURS

   Correcting the audit again. It counted 16 instances per page. Attributed:

     ~13 per page   the AI chat widget (#aw5-* pills, labels, captions).
                    Third-party markup, not ours to restyle.
       4 per page   spans inside .tab-link -- the desktop tab strip, whose
                    container is zero-height on mobile. Nothing is visible, so
                    these were a false positive in the original scan.
      14 on one page  .field-role on /our-leadership/. Real, and the worst of
                    them: 12px uppercase is the hardest combination to read on
                    a phone.
   ========================================================================== */
/* ==========================================================================
   PHASE 3 — SW-7: THE CHAT WIDGET SAT ON THE FOOTER AND THE CTA BAR
   conversion.css already tries to lift the launcher clear of the sticky CTA
   bar, but it guesses at the selectors -- [class*="aw5-"][class*="launch"],
   #aw5-launcher, .aw5-fab -- and none of them match anything. The plugin
   ships a bare-id launcher (#aw5-fab, 52x52 at bottom 16 / right 16) and a
   greeting nudge (#aw5-ndg, 240x63 at bottom 72), so both stayed put: over
   the CTA bar, over the footer legal row, and over the copyright.

   These are the ids the plugin actually renders. !important is unavoidable --
   the widget writes its own position inline.
   ========================================================================== */
body.acma-cta-bar-on #aw5-fab { bottom: 88px !important; }
body.acma-cta-bar-on #aw5-ndg { bottom: 144px !important; }

@media (max-width: 1023px) {
  /* Scrolled to the bottom, the launcher covers x 307-359, and "Sitemap" --
     the last legal link -- sat at 304-355, so tapping it opened the chat.
     Measured: the four links cannot fit clear of the launcher on a 375px
     screen even with the gaps closed up, so the row wraps to two 44px lines.
     That costs 44px on every page, which Phase 1's -206px more than covers. */
  .site-footer .footer-bottom .footer-copy-nav:last-child .footer-nav {
    padding-right: 68px;
  }
}

/* ==========================================================================
   PHASE 3 — SW-8: ANCHORED HEADINGS LANDED UNDER THE STICKY HEADER
   The header is sticky and 78px tall, so in-page links -- the article table
   of contents, and the legal jump lists when they arrive -- dropped their
   target flush against its underside, clipping the heading on arrival.
   ========================================================================== */
:is(h1, h2, h3, h4, h5, h6, [id]) {
  scroll-margin-top: 96px;
}

/* ==========================================================================
   PHASE 3 — P-09: THE LEADERSHIP CARD
   Correcting the audit: it claimed the portrait bled outside the card frame.
   Measured, it does not -- portrait and article share a left edge at x=25.
   What actually happens is that the article carries no surface at all, and
   the only bordered box is .info-card-data beside the photo, so that box
   reads as "the card" and the portrait reads as floating next to it.

   The overlap is real: .info-box-toggle is absolutely positioned at right:10
   bottom:10 and lands on the role text, which runs to within 20px of it. It
   was also 30x30, under the touch minimum.
   ========================================================================== */
/* ==========================================================================
   PHASE 3 — P-13: THE WORLD MAP ON /global-location/
   A 1,552px SVG rendered into 345px, where the location pins are about 4px
   across and cannot be tapped. It spent a ~190px band saying "we operate
   internationally", which the list beneath it says better.
   The rule now lives with the rest of the map's styling, on the class the
   rebuilt template emits: see .acma-locations-map__plate in sections.css. */

/* ==========================================================================
   PHASE 3 — P-16 AND P-14: LEFT AS-IS, DELIBERATELY

   P-16 (/about-us/ stacked blocks). The audit proposed capping the block
   images at 180px. Measured, .two-column-img was already about 116px on
   mobile, so the cap was an increase -- it took each block from 410px to
   474px and the section from 1,364px to 1,555px. The section is already as
   tight as its content allows.

   P-14 (the /insights/ index as a list rather than a carousel). Implemented
   and measured, this is not a change to make unilaterally:
     - .articles-list-section is shared by /our-work/, /industry/ and both
       listing templates, so the rule leaked onto pages where the carousel is
       doing its job (/industry/ went from 2,185px to 4,811px);
     - scoped tightly to the index it stops leaking, but the index still goes
       from 2,298px to roughly 3,700px, and the brief for this work asks
       specifically to reduce height and to turn long vertical sections into
       carousels.
   It trades about 1,400px against a scanning affordance, which is a product
   call rather than a responsiveness fix.
   ========================================================================== */

/* ==========================================================================
   PHASE 4 — P-18: THE SITEMAP IS A DESKTOP TREE DIAGRAM ON A PHONE
   The desktop treatment is unchanged at 375px: connector rails drawn from
   li::before / li::after, and every link an outlined pill with a 2px #FF7F1F
   border. Measured, that is 5,347px, five column groups of about 740px each,
   and 66 of the site's remaining sub-44px tap targets in one place.

   The rails carry no information a phone reader can use -- the hierarchy is
   already expressed by indentation and by the group headings. Below 768px the
   page becomes what it is: grouped lists of 48px rows.
   ========================================================================== */
/* ==========================================================================
   PHASE 4 — SW-2: ONE PLUS CONTROL IN THE FOOTER
   "More links" used a white filled circle with a dark +. Directly below it,
   "Quick links", "Useful links" and "What we do" used a thin orange + with no
   container. The same gesture in two visual languages, inside one screen.

   The thin orange + wins -- it reads better on the ink ground and there are
   three of it against one of the other.
   ========================================================================== */
@media (max-width: 1199px) {
  .site-footer .viewmore_list .plusbtninner {
    background: none;
    border: 0;
    width: auto;
    height: auto;
    box-shadow: none;
  }
  .site-footer .viewmore_list .plusbtninner .svg-tag svg {
    /* #FF7F1F measures 7.36:1 on the footer's ink ground. It must never be
       used on a light one -- there it is 2.53:1. */
    fill: #FF7F1F;
    width: 19px;
    height: 19px;
  }
  /* The row is the control; give it the same target height as the accordion
     rows it sits above. */
  .site-footer .viewmore_list > a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ==========================================================================
   PHASE 4 — SW-9: CMS BODY LINKS FELL BACK TO BROWSER DEFAULTS
   Inside CMS-authored content the link colour is unset, so it renders as the
   user agent's: default blue on blog posts, black underlined on the legal
   pages and the case study. None of them are the brand rust, and on a phone
   the blue is the only non-brand colour on the page.

   Not scoped to mobile -- this is wrong at every width.
   ========================================================================== */
.insights-details .post-large-content a:not([class]),
.general-cms-block .general-cms-wrapper a:not([class]) {
  color: var(--ds-primary, #B65002);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.insights-details .post-large-content a:not([class]):hover,
.general-cms-block .general-cms-wrapper a:not([class]):hover {
  color: var(--ds-primary-hover, #974302);
}

/* ==========================================================================
   PHASE 4 — P-01: BACK TO CONTENTS ON LONG ARTICLES
   Built by ui-enhancements.js only on .insights-details documents taller than
   four viewports, so it never appears on a short post. It sits opposite the
   chat launcher rather than stacking with it, and above the sticky CTA bar
   when that is present.
   ========================================================================== */
.acma-to-top {
  position: fixed;
  left: var(--ds-space-4, 16px);
  bottom: var(--ds-space-4, 16px);
  z-index: 997;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ds-border, #DDE3EC);
  border-radius: 50%;
  background: var(--ds-white, #FFFFFF);
  box-shadow: 0 2px 10px rgba(0, 20, 39, .16);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.acma-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
/* Chevron drawn from a border so it needs no asset and inherits the colour. */
.acma-to-top > span {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-top: 2px solid var(--ds-ink, #001427);
  border-left: 2px solid var(--ds-ink, #001427);
  transform: translateY(2px) rotate(45deg);
}
.acma-to-top:hover { border-color: var(--ds-primary, #B65002); }
.acma-to-top:hover > span { border-color: var(--ds-primary, #B65002); }
.acma-to-top:focus-visible { outline: 2px solid var(--ds-primary, #B65002); outline-offset: 3px; }

/* Clear the sticky CTA bar when it is showing. */
body.acma-cta-bar-on .acma-to-top { bottom: 88px; }

@media (prefers-reduced-motion: reduce) {
  .acma-to-top { transition: none; }
}

/* The clamp primitive assumes a block of prose. A tile grid needs the fade to
   sit over the grid's own ground and the control to clear the last row. */
@media (max-width: 1023px) {
  .acma-tile-row .acma-tile-grid.acma-clamp::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--acma-clamp-fade, #FFFFFF) 92%);
  }
  .acma-section--surface .acma-tile-row .acma-tile-grid.acma-clamp::after,
  .acma-tile-row.acma-section--surface .acma-tile-grid.acma-clamp::after {
    --acma-clamp-fade: var(--ds-surface, #F1F4F9);
  }
  .acma-tile-row .acma-clamp-toggle { margin-top: var(--ds-space-4, 16px); }
}

/* ==========================================================================
   PHASE 4 — WHAT THE MOBILE AUDIT FOUND AFTER PHASES 1-3
   Measured on a 390x844 phone, against the pages named in each note.
   ========================================================================== */
@media (max-width: 767px) {

  /* ---- M6: the lead forms' field rhythm -----------------------------------
     A field measured 102px: a 24px label, 4px to a 48px input, then 26px of
     air. The 48px input is the touch target and does not move; the 26px is
     desktop's separation carried down, and at four to eleven fields it is the
     difference between a form that fits a thumb-scroll and one that does not.
     Twelve still reads as a break between fields at this size.
       contact 8 fields, media room 9, request a demo 7, career form 11. */
  form .form-item > .form-control-wrap { margin-bottom: var(--ds-space-3, 12px); }
  /* The error message takes over the wrap's spacing when .has-error closes it,
     so it follows the same number or the rhythm changes on failure. */
  form .acma-field-error { margin-bottom: var(--ds-space-3, 12px); }

  /* M7, the event card's photograph, is in sections.css: its rules answer
     two there at equal specificity, and sections.css loads after this file. */

  /* ---- M8: the intro band's trailing space --------------------------------
     40px below the image inside the band, then the section's own 41px under
     that: 81px of stacked separation at the foot of a band that already ends
     on a picture. /careers/ carries two of these, /job-openings/ one, and the
     53-page service template one. */
  .content-video-section .internal-banner { padding-bottom: var(--ds-space-4, 16px); }
}


/* ==========================================================================
   MOBILE DENSITY PASS 2 — THE HERO AND THE FOOTER
   --------------------------------------------------------------------------
   Measured at 390x844 across all 99 routes. The first pass turned the card
   grids into swipe rows, which worked: 91 of 99 routes now carry at least one.
   What it did not touch is the chrome at either end of every page.

     footer   900px on every route — 1.07 screens of it, before any content.
              On /thank-you/ that is 55% of the whole document; on the six
              location pages, 37%.
     hero     857px on the homepage, against an 844px viewport. The proof band
              — 18+ years, 9K+ deployments, the strongest evidence the company
              has — began below the fold on arrival, and the only section
              starting inside the first screen was the hero itself.

   Both are density, not responsiveness: they already fit the width.
   ========================================================================== */
@media (max-width: 767px) {

  /* ---- hero: 857 -> ~640 ------------------------------------------------
     `padding-block: clamp(4rem, 3rem + 6vw, 8rem)` resolved to 71.4px top and
     bottom on a 390px screen — 143px of padding inside a section that already
     carries 32px of its own. It is also a bespoke ramp; --ds-section-y is the
     one the rest of the site uses and reads 41px here. */
  /* Scoped to .acma-hero deliberately. This file is documented as loading
     last but header.php loads it 7th, before sections.css, so a bare
     `.acma-hero__body` ties with the rule it means to replace and loses.
     Every selector in this block is written to outrank its counterpart. */
  .acma-hero .acma-hero__body { padding-block: var(--ds-section-y); }

  /* The deck was pinned to --ds-text-lg, so it set 20px on a phone and ran to
     seven lines / 224px. --ds-lede-size is the fluid lede the rest of the site
     uses: 16px here, 20px on desktop, and the supporting line stops competing
     with the 18px body it sits above. */
  .acma-hero .acma-hero__deck {
    font-size: var(--ds-lede-size, 1rem);
    margin-bottom: var(--ds-space-5, 24px);
  }
  .acma-hero .acma-hero__title { margin-bottom: var(--ds-space-4, 16px); }

  /* ---- footer: 900 -> ~660 ---------------------------------------------
     The word-mark repeat is a sign-off, not identification: the header is
     sticky and carries the logo permanently, so on a phone this is 51px of
     the brand telling you its name a second time. Decorative repetition is
     the first thing to go when a screen is 390px wide. */
  .site-footer .footer_logo_bottom { display: none; }

  /* "More Links" sat 24px below the Explore Careers button for a separation
     the eye already gets from the button's own edge. */
  .site-footer .footer-top .join-team .viewmore_list { margin-top: var(--ds-space-3, 12px); }

  /* The bottom bar stacked copyright (57px), language (56px) and the legal
     row (88px) as three full-width blocks. Copyright and the language control
     are both short; they share a row, which returns a whole 56px block. */
  .site-footer .footer-bottom .footer-copy-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--ds-space-4, 16px);
  }
  .site-footer .footer-bottom .footer-copy-nav .copy-right { flex: 1 1 auto; padding-bottom: 0; }
  .site-footer .footer-bottom .footer-copy-nav .lang-switcher { flex: 0 0 auto; padding-bottom: 0; }
  .site-footer .footer-bottom .footer-copy-nav .footer-nav { flex: 1 0 100%; }

  /* ---- touch targets that were still short of 44px ---------------------
     The first pass raised the footer's links. These are the page-level
     controls it did not reach. Both grow only their hit area. */
  .cookie-sec .content .buttons .cookie-btn { min-height: 44px; }
  .site-footer .viewmore_list .viewmore-toggle { min-height: 44px; min-width: 44px; }
}
