/* ============================================================
   Synup — mobile responsiveness fixes
   Loaded LAST in <head> (after page/Webflow styles) so scoped
   overrides win by source order at equal specificity.

   Rules:
   - Every block is SCOPED (class / #id). Nothing here is a bare
     global element selector, so it cannot cascade unexpectedly.
   - Desktop is preserved: layout changes live inside @media
     (max-width: …) blocks only.
   - Organised by audit phase for reviewability.
   ============================================================ */

/* ------------------------------------------------------------
   Phase 1a — how-to / learn article copy: wrap long URLs/tokens
   ------------------------------------------------------------
   Root cause: markdown body renders raw URLs as link text with no
   wrap, pushing the page far wider than the viewport (worst case
   /how-to/how-to-create-and-share-a-google-my-business-review-link/
   measured 2957px at 390px). Scoped to .cms-article content only.
   Applies at all widths — wrapping a long URL never hurts desktop. */
.cms-article,
.cms-article p,
.cms-article li,
.cms-article a,
.cms-article h1,
.cms-article h2,
.cms-article h3,
.cms-article h4,
.cms-article td,
.cms-article th,
.cms-article blockquote,
.cms-article code {
  overflow-wrap: anywhere;
}
/* Long code/pre blocks scroll internally instead of widening the page. */
.cms-article pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------
   Phase 1c — top nav fits small phones (≤366px viewports)
   ------------------------------------------------------------
   Site-wide. At mobile the burger shows but .mn-right still carries
   the "Start free trial" button + burger, and .mn-bar keeps 1.75rem
   padding, so the row is a fixed ~367px and overflows any screen
   ≤366px (iPhone SE, small Androids).

   !important is required on purpose: the .mn-* nav CSS is an inline
   <style> that renders AFTER this external sheet in source order
   (true for both Base.astro pages and the 28 self-contained
   case-studies/competitors raw pages, which also link this file),
   so a normal rule would lose. !important wins regardless of order
   and also beats the logo's inline style="height:32px" attribute.
   Scoped to ≤480px — tablet/desktop untouched. */
@media (max-width: 480px) {
  .mn-bar { padding: 1rem .875rem !important; gap: .5rem .75rem !important; flex-wrap: wrap !important; }
  .mn-right { gap: .5rem !important; margin-left: auto !important; }
  .mn-btn-primary { padding: .5rem .75rem !important; font-size: .875rem !important; }
  /* 26px logo (was 28px) reclaims the ~8px the 44px burger touch target added,
     so English + most locales keep a single-row bar at 320px. */
  .mn-logo img { height: 26px !important; }
  /* Longer CTA text in some languages (es/fr) still can't fit one row at 320px.
     flex-wrap lets .mn-right drop to its own full-width row only when it
     doesn't fit — English (which fits) stays single-row. */
}

/* ------------------------------------------------------------
   Phase 2 — scale-to-fit wide product-page mockups (<=560px)
   ------------------------------------------------------------
   Complex dashboard/UI mockups can't legibly reflow to a phone.
   Each is tagged .m-fit; the fitMockups() helper in Base.astro
   wraps its content in .m-fit-in and scales it with transform so
   the whole mockup stays visible without overflowing the page.
   This rule just prevents a pre-JS overflow flash by clipping the
   box until the script sizes it. Desktop (>560px) is untouched. */
@media (max-width: 560px) {
  .m-fit { min-width: 0; overflow: hidden; }
}

/* ------------------------------------------------------------
   Phase 2 — stack cramped product-page CONTENT grids on phones
   ------------------------------------------------------------
   Recurring feature-card / bullet / stat grids across the product
   pages stay multi-column on mobile, squeezing text into 90px
   columns. Stack them. These are content (not mockup) grids, so
   stacking is correct; mockup-internal grids are handled by .m-fit
   scale-to-fit instead. !important guards against per-page specifics. */
@media (max-width: 560px) {
  .bt-grid   { grid-template-columns: 1fr !important; }         /* feature cards */
  .bullets   { grid-template-columns: 1fr !important; }         /* bullet lists shown as rows */
  .net-stats { grid-template-columns: repeat(2, 1fr) !important; } /* stat tiles */
}

/* ------------------------------------------------------------
   Phase 2 — per-page live-overflow fixes (<=560px)
   ------------------------------------------------------------
   Grid/flex items that refuse to shrink (min-width:auto blowout)
   or a space-between bar whose contents exceed the width. Stack /
   allow-shrink / wrap so the page stops scrolling sideways. */
@media (max-width: 560px) {
  /* mcp: 2-col feature tiles blow out — stack and let tiles shrink */
  #mc-page .mc-tiles { grid-template-columns: 1fr !important; }
  #mc-page .mc-tile  { min-width: 0; }
  /* aeo: share/copy split — the .shr-pop mockup's wide URL inflates the
     shared 1fr track (min-content floor), widening the text column too.
     minmax(0,1fr) lets the text column shrink; .shr-pop is scaled via .m-fit. */
  #ae-page .shr,
  #ae-page .ae-hero-split { grid-template-columns: minmax(0, 1fr) !important; }
  #ae-page .shr-copy { min-width: 0; }
  /* mcp: code/schema blocks (white-space:pre) scroll instead of widening page */
  #mc-page .mc-pre, #mc-page pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* social: ideas bar — wrap so the "regenerate" button can't overflow */
  .so-ideas-bar      { flex-wrap: wrap; }
  .so-ideas-bar-l b  { white-space: normal !important; }
}

/* ------------------------------------------------------------
   Phase 2 — /freetrial/ hero stacks on mobile
   ------------------------------------------------------------
   That page sets <body class="body">, and the shared .body{display:flex}
   forces the testimonial column and the sign-up form side-by-side; on a
   phone they squeeze to ~106px each (text wraps one word per line, form
   off-screen). Stack them. bodyClass 'body' is unique to freetrial. */
@media (max-width: 768px) {
  body.body { flex-direction: column; height: auto; }
  body.body .div-block-309,
  body.body .div-block-312 { width: 100%; max-width: 100%; flex: none; }
}

/* ------------------------------------------------------------
   Phase 2 — remaining legacy-page overflow nits (<=560px)
   ------------------------------------------------------------ */
@media (max-width: 560px) {
  /* privacy-policy: stack the legacy 2-col Webflow content grid. :has scopes
     the rule to only grids that contain these blocks (not every w-layout-grid). */
  :has(> .grid-content-block) { grid-template-columns: 1fr !important; }
  /* whats-new: the wide markdown table scrolls instead of widening the page */
  .mk-tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  /* whats-new head: let the flex/grid child + subscribe form shrink to fit */
  .wn-head-in > div { min-width: 0; }
  .wn-sub { flex-wrap: wrap; }
  .wn-sub input { min-width: 0; }
  /* compare index + client-portal: let nowrap category/label chips wrap */
  .cm-cmp-cat, .snd { white-space: normal !important; }
  /* legacy Webflow grid children (competitor pages) can shrink below content */
  [id^="w-node"] { min-width: 0; }
  /* tiny fixed-width cards/steps can shrink */
  .cp-step, article.card { min-width: 0; }
  /* compare index: the cm-comp grid uses a fixed 304px column */
  .cm-comp { grid-template-columns: minmax(0, 1fr) !important; }
  /* competitor pages: wrap + shrink the legacy flex comparison rows */
  .comparision-wrapper { flex-wrap: wrap; }
  .comparision-wrapper > * { min-width: 0; }
  .cms_content.w-richtext { overflow-wrap: anywhere; }
}

/* ------------------------------------------------------------
   Phone fixes for #ac-page hero shot + home "explore all 9" rail
   ------------------------------------------------------------ */
@media (max-width: 560px) {
  /* Agent/command hero shot: the image has min-width:80rem inside a fixed-
     height frame, so only a cropped corner shows. Let the whole shot scale
     to fit the viewport (matches the product-page heroes). */
  #ac-page .hero-shot,
  #ac-page .hero.is-stacked .hero-shot { height: auto !important; margin-right: 0 !important; }
  #ac-page .hero-shot img,
  #ac-page .hero.is-stacked .hero-shot img { min-width: 0 !important; width: 100% !important; height: auto !important; }
}
/* Footer sitemap: keep two columns on phones (was collapsing to one column). */
@media (max-width: 640px) {
  .sf-doormat { grid-template-columns: repeat(2, 1fr) !important; }
}
/* Agent secondary nav: .subnav-inner uses justify-content:center, so once the
   tabs overflow the row they get centered and the first tabs (incl. the active
   one, e.g. Memory) are pushed off the left edge and cut off. Left-align on
   phones/tablets so the active tab is visible and the row scrolls normally. */
@media (max-width: 1024px) {
  .subnav-inner { justify-content: flex-start !important; }
}
@media (max-width: 1024px) {
  /* Home "everything you need…" rail: the full-bleed negative-margin calc
     [(100vw - container)/2] goes negative below the container width and
     pushes the cards off-screen (rail looks empty). Reset to normal edge
     padding so cards start on-screen and swipe horizontally. */
  #ag-section .rail {
    padding-left: 1.5rem !important; padding-right: 1.5rem !important;
    margin-left: 0 !important; margin-right: 0 !important;
  }
}

/* ------------------------------------------------------------
   iOS Safari focus-zoom: a focused text field under 16px makes iOS
   zoom the whole page. Force a 16px minimum on text-entry controls.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]),
  select,
  textarea { font-size: 16px !important; }
}

/* ------------------------------------------------------------
   Phase 2 — locale-specific overflow (longer translated text) (<=560px)
   ------------------------------------------------------------ */
@media (max-width: 560px) {
  /* ebooks: the 2-col webinar/ebook row wraps on phones */
  .webinar-inner { flex-wrap: wrap; }
  .webinar-inner > * { min-width: 0; }
  /* fixed-px grid columns (agent metrics, client-portal steps) -> fluid */
  .metrics, .cp-step { grid-template-columns: minmax(0, 1fr) !important; }
  /* long localized links / labels / buttons wrap instead of overflowing */
  .review-para-link, .fk-label { overflow-wrap: anywhere; }
  .button-blue-light-copy { white-space: normal; }
  /* .fk "fan" mockup rows shrink; their labels/links wrap */
  .fk, .fk-row { min-width: 0; max-width: 100%; }
  .fk-label, .fk-link, .fk-chip { overflow-wrap: anywhere; min-width: 0; }
  /* client-portal / AI-report mockups: clip off-canvas decorative bits */
  .cp-in, .sp_container-1440 { overflow-x: clip; }
}

/* ------------------------------------------------------------
   Aug 2026 — mobile fixes for the marketing template REWORKS that
   landed after our layout PR (#22 compare playbook, #25 how-to,
   #26 learn). Those new templates dropped the hooks our earlier
   fixes relied on (.cms-article) and introduced new classes
   (.ht-prose, .ln-prose, .ln-toc, .tbl). This overlay restores
   mobile behavior with NO template edits. Verified via 320px sweep.
   ------------------------------------------------------------ */

/* how-to redesigned article body (.ht-prose): long URLs and unbreakable
   text tokens overflowed the page (worst: a raw URL pushed it 2846px wide).
   overflow-wrap is safe at all widths — it only breaks a word when it
   would otherwise overflow. */
/* overflow-wrap is inherited, so scoping it to the article root covers BOTH the
   header (long-token titles/breadcrumbs, e.g. "discoverourtown") and the body. */
.ht-article { overflow-wrap: anywhere; }
.ht-prose pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* learn redesigned article: the two-col grid collapses to one column at
   <=980px, but long TOC heading-links and prose content still forced the
   column ~509px wide. Let it shrink and let the text wrap. */
.ln-grid { min-width: 0; }
.ln-toc, .ln-prose { min-width: 0; overflow-wrap: anywhere; }
.ln-toc a, .ln-prose a, .ln-prose p, .ln-prose li, .ln-prose h2, .ln-prose h3, .ln-prose code { overflow-wrap: anywhere; }
.ln-prose pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* compare pages: the reworked comparison table (.tbl, ~360px wide with
   fixed columns) and any legacy .cm-table have no mobile treatment. On
   phones, let the table scroll horizontally inside its own box instead of
   widening the whole page. Scoped to <=768px so tablet/desktop are untouched. */
@media (max-width: 768px) {
  .tbl, .cm-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
}

/* Residual rework fixes (round 2, from the re-sweep): */
/* inline content SVGs in redesigned articles (imgs were already width:100%) */
.ht-prose svg, .ln-prose svg { max-width: 100%; height: auto; }
/* compare "vs" comparison cards (.card.us / .card.them) shrink to the viewport */
.card.us, .card.them { min-width: 0; max-width: 100%; }
/* compare index "approaches" header: wrap the long name + chip instead of overflowing */
.cm-appr-top { flex-wrap: wrap; }
.cm-appr-chip { white-space: normal; }
/* how-to hub category pills: wrap on phones (longer localized labels e.g. de overflowed) */
@media (max-width: 768px) {
  .hh-rail { flex-wrap: wrap; min-width: 0; }
  .hh-cat { max-width: 100%; }
}
/* footer wordmark: the decorative wordmark SVG renders ~320px wide and could
   spill past a 320px viewport; cap it so it never widens the page. */
.sf-wordmark { max-width: 100%; overflow: hidden; }
.sf-wordmark svg { max-width: 100%; height: auto; }

/* ------------------------------------------------------------
   Round: residuals found on the #36-compare-rework state
   ------------------------------------------------------------ */
/* Agent secondary nav: the tab strip pushed the page +104px on longer
   localized labels (es). Let it scroll within the viewport on phones. */
@media (max-width: 768px) {
  .subnav, .subnav-inner { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .subnav-inner { min-width: 0; }
}
/* Compare "vs" pages: a long unbreakable token inside an <em> overflowed.
   overflow-wrap on the compare wrapper is safe (only breaks when needed). */
#cm-page { overflow-wrap: anywhere; }
/* Compare hub hero grid: doesn't collapse on mobile in locales (longer fr/es/de
   text forced it ~348px). Stack to one column + backstop clip. */
@media (max-width: 768px) {
  .cm-hero-grid { grid-template-columns: 1fr !important; }
  .cm-hero-grid > *, .cm-hero { min-width: 0; }
  .cm-hero { overflow-x: clip; }
}
/* products/seo: long localized heading/token; wrap it + keep the right-bleed
   decorative card within the viewport. */
#seo-page { overflow-wrap: anywhere; }
#seo-page .pc-bleed-r { max-width: 100%; }
/* how-to hub: let the grid content shrink so localized labels (de) don't nudge
   the page (+4px). */
@media (max-width: 768px) {
  .hh-grid-wrap, .hh-grid, .hh-utility { min-width: 0; max-width: 100%; }
  .hh-utility { flex-wrap: wrap; gap: 4px 12px; }   /* long localized "Sort/Showing" labels wrap */
  .hh-main { overflow-x: clip; }                     /* backstop so the rail/grid can't widen the page */
}

/* ------------------------------------------------------------
   Cross-browser (WebKit / iOS Safari)
   ------------------------------------------------------------
   WebKit does NOT force-break a long URL that has no soft-wrap opportunities,
   even with overflow-wrap:anywhere (Chromium does). A raw Google review-link
   URL as link text overflowed +702px in Safari. word-break:break-all on
   article/content links forces the break in every engine. Scoped to links
   (where raw URLs live) to avoid breaking normal prose mid-word. */
.ht-prose a, .ln-prose a, .cms-article a, #cm-page a, .ht-article a { word-break: break-all; }
/* Long words with no soft-wrap opportunity (German compound words like
   "Kleinunternehmens-Influencer") also don't break in WebKit with overflow-wrap
   alone. hyphens:auto hyphenates them properly (the pages carry lang= so Safari
   has a dictionary). -webkit- prefix required for Safari. */
.ht-prose, .ln-prose, .cms-article, #cm-page, .ht-article {
  -webkit-hyphens: auto; hyphens: auto;
}
/* Photo-credit captions can carry a long plain-text token; break those
   aggressively (a broken credit line is fine; body prose is not). */
.ht-prose figcaption, .ln-prose figcaption, .cms-article figcaption { word-break: break-all; }

/* ============================================================
   World-class touch targets (>= 44px) — Apple/Google minimum
   ------------------------------------------------------------
   Genuine interactive controls that measured 26-42px on mobile.
   NOT targeting mockup-internal decorations (pills/labels inside
   scaled dashboard mockups are not tappable). Scoped to <=1024px
   so desktop layout is untouched. Each control already centers its
   content, so min-height just enlarges the tap area cleanly.
   ============================================================ */
@media (max-width: 1024px) {
  .mn-logo { min-height: 44px; }                    /* nav home link (was 26-32px) */
  .uc-tab { min-height: 44px; }                     /* home use-case tabs (37px) */
  .subnav-link { min-height: 44px; display: inline-flex; align-items: center; } /* agent subnav (34px) */
  .hh-cat { min-height: 44px; }                     /* how-to hub filters (38px) */
  .faq-toggle { min-height: 44px; }                 /* FAQ expander (37px) */
  .btn { min-height: 44px; }                        /* generic CTAs (42px) */
  .pr-tool { min-height: 44px; }                    /* pricing tool rows — the label is the tap target */
  .hh-search input, .lh-search input, input[type="search"] { min-height: 44px; } /* hub search (22px) */
}
/* Tap feedback on touch (subtle, non-layout-shifting) */
.uc-tab:active, .subnav-link:active, .hh-cat:active, .faq-toggle:active, .pr-tool:active { opacity: .82; }

/* Agent metrics section: on the es locale a decorative element leaks ~104px
   past the viewport (elusive text-node/JS overflow). Let the tiles shrink and
   clip the section's horizontal overflow so it can't widen the page. */
@media (max-width: 768px) {
  .metrics, .metric { min-width: 0; }
  .metric > * { min-width: 0; overflow-wrap: anywhere; }
  .ac-container { min-width: 0; overflow-x: clip; }
}

/* ------------------------------------------------------------
   Touch targets (real interactive controls, not mockup illustrations)
   ------------------------------------------------------------
   Site-wide primary controls are ~44px already (nav, hub filters, forms).
   The real pricing calculator toggles render ~36px — bump to 44 on phones.
   Deliberately NOT a blanket rule: most sub-44px elements are decorative
   dashboard tiles inside scaled product mockups (.an-kpi/.an-pill), which
   must NOT be inflated. */
@media (max-width: 768px) {
  .pr-bill, .pr-preset { min-height: 44px; }
}

/* ============================================================
   Footer + homepage-logo touch targets (>= 44px)
   ------------------------------------------------------------
   The world-class pass covered nav/hub/form controls but not the
   footer, which carries ~60 genuine links on every page (sitemap
   19px, lower links 30px, legal 20px, social/chips 36px, language
   switcher 37px). All are real tappable links, not mockup decor.
   Growth is absorbed by collapsing the list gap into the tap area
   (19px link + ~17px gap -> one 44px target), so the footer grows
   only ~8px per row instead of stacking 44px on top of the gap.
   Scoped to <=1024px so desktop is untouched.
   ============================================================ */
@media (max-width: 1024px) {
  /* sitemap columns: absorb most of the row gap into the target. A small
     residual gap + padding keeps MULTI-LINE links visually separated —
     min-height alone does nothing for a link that already wraps to 2 lines,
     so the row gap (not internal padding) has to carry the separation —
     otherwise "Review Monitoring"/"Review Generation" read as one 4-line
     block. Keeping the original ~12px gap preserves that rhythm; single-line
     links get their 44px from min-height. */
  footer ul { row-gap: 12px !important; }
  footer li > a { display: flex; align-items: center; min-height: 44px; }

  /* block-flow link rows (parents are flex/blocks — keep them stacking) */
  footer .sf-lower-links a,
  footer .sf-legal a { display: flex; align-items: center; min-height: 44px; }

  /* inline chips/icons inside flex rows */
  footer .sf-social a,
  footer .sf-askai-chips a,
  footer .lsw-menu a,
  footer .sf-more,
  footer .sf-footer-logo a { display: inline-flex; align-items: center; min-height: 44px; }

  /* homepage/locale logo: #hp .mn-logo sets min-height:32px and its ID
     specificity beat the plain .mn-logo rule, so the home nav logo stayed
     a 32px target. body#hp out-specifies it; the wordmark is a centered
     background so it still renders at 32px — only the hit area grows. */
  body#hp .mn-logo { min-height: 44px; }
}
/* Tap feedback, consistent with the existing controls above */
footer li > a:active, footer .sf-lower-links a:active, footer .sf-legal a:active,
footer .sf-social a:active, footer .sf-askai-chips a:active,
footer .lsw-menu a:active, footer .sf-more:active { opacity: .82; }

/* Remaining genuine sub-44px controls found in the 390px template audit.
   Verified tappable (real hrefs / real toggles), unlike the sub-44 elements
   inside .pc-wrap / .m-fit-in / .se-map / .ab2-map, which are decorative
   parts of scaled product mockups and must NOT be inflated.
   inline-flex keeps them shrink-to-fit horizontally; only height grows. */
@media (max-width: 1024px) {
  .fcard-link,                 /* homepage feature cards "Learn more" (26px) */
  .story-link,                 /* customer-story "Read Story" (24px) */
  .cm-link,                    /* compare hub comparison links (38px) */
  .lsw > summary,              /* language switcher toggle (38px) */
  .lsw-footer > summary { display: inline-flex; align-items: center; min-height: 44px; }
}
.fcard-link:active, .story-link:active, .cm-link:active { opacity: .82; }

/* ============================================================
   Mobile issue sweep (reported on iPhone Chrome) — 2026-08-18
   ============================================================ */

/* ---- #1  Consistent section spacing on mobile ----------------
   There is no shared spacing scale: each section hard-codes its own
   top/bottom padding and most are never reduced for mobile, so the
   rhythm is uneven page-to-page.
   IMPORTANT (learned the hard way): the gap a reader sees between two
   sections is the previous section's padding-BOTTOM plus the next
   one's padding-TOP. An earlier pass normalised every section to
   3.5rem and verified that number in isolation — but 56+56 still left
   ~112px between sections, which measured as the median across the
   whole site, so nothing looked different. 2rem gives a ~64px gap.
   The class list below was produced by measuring every section-like
   wrapper with >=40px of mobile padding across 21 pages, not guessed.
   Desktop (>=769px) is untouched. */
@media (max-width: 768px) {
  .pc-sec,                                                         /* all product pages */
  .ab2-proof, .ab2-tl, .ab2-cust, .ab2-geo, .ab2-hire, .ab2-cta, .ab2-stats,
  .pr-head, .pr-cmp-sec, .pr-inc, .pr-cred, .pr-faq, .pr-cta,     /* pricing */
  .sp-section, .sp-switch, .sp-open,                              /* solutions */
  .ft-proof, .ft-timeline, .ft-faq, .ft-final-cta, .ft-paths,     /* free trial */
  .lh-main, .lp-wrap, .stories, .fq-faq, .agency, .sh-trust,
  #cm-page .pp-section, #cm-page .cta,
  #ac-page .section, #ac-page .metrics,
  #sol-page .sp-section, #sol-page .sp-switch, #sol-page .sp-open {
    padding-top: var(--section-pad-y-mobile, 2rem) !important;
    padding-bottom: var(--section-pad-y-mobile, 2rem) !important;
  }
  body#hp #uc-gallery,
  body#hp #ag-section .agency,
  body#hp #cs-section .stories,
  body#hp #fq-section .fq-faq,
  body#hp #tc-section .cta-section {
    padding-top: var(--section-pad-y-mobile, 2rem) !important;
    padding-bottom: var(--section-pad-y-mobile, 2rem) !important;
  }
  /* heroes keep a little more room under the nav */
  .sh-hero, .ab2-hero, .ft-hero, .hero { padding-top: 2.5rem !important; }
  .ab2-hero, .ft-hero { padding-bottom: var(--section-pad-y-mobile, 2rem) !important; }
  /* agent hero grid carried a 72px bottom pad that stacked on the next section */
  #ac-page .hero-grid { padding-bottom: var(--section-pad-y-mobile, 2rem) !important; }
}

/* ---- #5 / #8  Mobile mega-menu — SUPERSEDED by the round-2 rules
   at the end of this file. The absolute-sheet approach fixed the
   scroll trap only partially: it stacked the panel on top of the link
   list (so the main menu peeked out below it) and its hardcoded
   `100dvh - 4rem` cap assumed a 64px bar when the real bar is 76px
   (128px in de), leaving the panel's bottom past the viewport edge.
   See "R2-#4 + R2-#5" below for the replacement. */

/* ---- #3  White overscroll below the footer — SUPERSEDED below.
   `overscroll-behavior` is ignored by WebKit on the ROOT scroller, so
   this rule does nothing on iOS (where the bug was reported). Kept
   because it still helps on Android/desktop Chrome; the actual fix is
   the canvas background colour in the round-2 block. */
html { overscroll-behavior-y: none; }

/* ---- #9  Compare summary table: balance the columns -------------
   The Yext-style .tbl hard-codes the first "Capability" column to 160px
   (on td.attr), which on mobile starves the Synup/Yext columns to ~55px
   and forces one-syllable-per-line hyphenation. The generic block rule
   above (.tbl{display:block;overflow-x:auto}) doesn't engage (max-width
   shrinks it instead of scrolling). Use a fixed layout with a narrow
   first column so all three columns get sensible width; turn off the
   hyphenation that #cm-page{hyphens:auto} was applying to the cells. */
@media (max-width: 768px) {
  #cm-page .tbl { display: table; width: 100%; table-layout: fixed; overflow: hidden; }
  #cm-page .tbl td.attr, #cm-page .tbl th:first-child { width: 30%; }
  /* the 1rem cell padding ate ~96px across three columns at 320px; trim it and
     the font so whole words fit instead of hyphenating one syllable per line. */
  #cm-page .tbl th, #cm-page .tbl td { padding: .55rem .5rem; overflow-wrap: break-word; -webkit-hyphens: none; hyphens: none; }
  #cm-page .tbl td { font-size: .8125rem; line-height: 1.4; }
  #cm-page .tbl th { font-size: .875rem; padding: .7rem .5rem; }
}

/* ============================================================
   Mobile round 2 — issues reported on real iPhone Chrome
   Verified in WebKit (the engine Chrome-on-iOS uses) at the
   device's real visible viewport (414x707), not full-height
   headless Chromium. All scoped to mobile; desktop untouched.
   ============================================================ */

/* ---- R2-#6  Overscroll past the footer showed WHITE --------------
   The document ends exactly at the footer (measured on every page),
   so the white is iOS rubber-band overscroll revealing the canvas.
   `overscroll-behavior` is ignored by WebKit on the ROOT scroller,
   so the earlier fix was a no-op on iOS. Instead paint the canvas
   the footer's colour: html supplies the canvas background, body
   keeps painting the real page background over its own box, so the
   page looks identical and only the overscroll area changes. */
html { background-color: #1C1917; }
body { background-color: var(--bg, #fff); }

/* ---- R2-#1  Footer language switcher opened off-screen ----------
   `.lsw-menu` is anchored `right:0`, so it grows LEFTWARD from a
   button that sits near the left edge -> the options were cut off.
   Anchor it to the button's left edge instead and clamp its width. */
@media (max-width: 640px) {
  /* Scoped to phones on purpose: below 640 the footer baseline stacks, so the
     switcher sits at the LEFT edge and a right-anchored menu runs off screen.
     At tablet widths the baseline is a row and the switcher sits at the RIGHT,
     where the original right:0 is correct - left-anchoring there pushed the
     menu off the opposite edge instead. */
  .lsw-footer .lsw-menu, .lsw .lsw-menu {
    right: auto; left: 0;
    max-width: calc(100vw - 3rem);
  }
}

/* ---- R2-#4 + R2-#5  Mobile mega-menu ----------------------------
   Was: the open panel was absolutely positioned at the same anchor
   as the link list, so it (a) stacked ON TOP of the list, leaving
   the main menu peeking out below it, and (b) was capped with a
   hardcoded `100dvh - 4rem` while the bar is 76px (128px in de),
   so its bottom fell past the viewport and the last card was
   unreachable.
   Now: the whole drawer is ONE scroll container and everything is
   in normal flow, so the order is bar -> menu list -> open panel,
   and the drawer ends exactly at the viewport edge at any bar
   height or locale. Uses svh (the *small* viewport) so the iOS
   toolbars can never cover the end of the list. */
@media (max-width: 1024px) {
  .mn-nav.is-open .mn-panel-host {
    max-height: 100vh; max-height: 100svh;
    overflow-y: auto !important; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .mn-nav.is-open .mn-bar { flex-wrap: wrap; }
  .mn-nav.is-open .mn-links {
    position: static !important; order: 3; flex: 0 0 100%; width: 100%;
    max-height: none !important; overflow: visible !important;
    box-shadow: none !important; border-bottom: 0 !important;
    padding: .25rem 0 0 !important; background: transparent !important;
    align-items: stretch;
  }
  .mn-nav.is-open .mn-panel.is-open {
    position: static !important; top: auto !important;
    max-height: none !important; overflow: visible !important;
    box-shadow: none !important;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom)) !important;
  }
}

/* ---- Found while fixing: nav "About"/"Pricing" rendered BLUE -----
   They are the only <a> items in the bar (the rest are <button>),
   and `.mn-nav a { color: inherit }` (0,1,1) outranks
   `.mn-link { color: var(--mn-navy) }` (0,1,0), so on pages whose
   legacy CSS sets a blue link colour they inherited it. Affects
   desktop too, so this rule is intentionally NOT inside a media
   query. */
.mn-nav .mn-link { color: var(--mn-navy); }

/* ---- R2-#2  Homepage hero video was edge-to-edge ----------------
   The frame has 10px rounded corners and a glow, both of which were
   clipped against the viewport. A small gutter (not the full 24px
   page gutter) restores them without shrinking the mockup's tiny UI
   text more than necessary. */
@media (max-width: 640px) {
  .sh-video-wrap { padding-left: 12px; padding-right: 12px; }
}

/* ---- R2-#3  Section spacing (the real fix) ----------------------
   Round 1 normalised each section's OWN padding to 3.5rem and
   verified that number in isolation. But the gap a reader sees is
   the previous section's padding-bottom PLUS the next one's
   padding-top, so 56+56 still left ~112px between sections - the
   measured median across the site, i.e. no visible improvement.
   Halving it to 2rem gives a ~64px gap, and the class list below
   comes from measuring every section-like wrapper with >=40px of
   mobile padding across 21 pages rather than being hand-guessed. */
@media (max-width: 768px) {
  #uc-gallery, .agency, .stories, .fq-faq, .sh-trust,
  .ab2-proof, .ab2-tl, .ab2-cust, .ab2-geo, .ab2-hire, .ab2-cta, .ab2-stats,
  .pr-head, .pr-cmp-sec, .pr-inc, .pr-cred, .pr-faq, .pr-cta,
  .pc-sec, .sp-section, .sp-switch, .sp-open, .pp-section,
  #ac-page .section, #ac-page .metrics,
  .ft-proof, .ft-timeline, .ft-faq, .ft-final-cta, .ft-paths,
  .lh-main, .lp-wrap, #cm-page .cta {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  /* homepage values are set with !important inside Polish.astro, which
     renders after this file - body#hp out-specifies it */
  body#hp #uc-gallery,
  body#hp #ag-section .agency,
  body#hp #cs-section .stories,
  body#hp #fq-section .fq-faq {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  /* heroes: keep a little more breathing room under the nav, and never
     add a bottom gap above the element that follows them */
  .sh-hero, .ab2-hero, .ft-hero, .hero { padding-top: 2.5rem !important; }
  .ft-hero, .ab2-hero { padding-bottom: 2rem !important; }
}

/* ---- Found during the round-2 audit (not reported, fixed anyway) ----
   1. The agent pages' "Contact sales" ghost button rendered only 26px
      tall — a real CTA below the 44px touch minimum.
   2. The About page's publication labels were set at 9px, which is
      below a comfortable reading size on a phone. */
@media (max-width: 1024px) {
  .btn-ghost-lg { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 768px) {
  #ab-page .ab2-pub { font-size: 11px !important; }
}

/* ---- Tablet band (641-1024px) --------------------------------
   Found by a device matrix (iPad Mini / gen 7 / Pro 11, portrait):
   this range gets the mobile nav but a desktop-width layout, and it
   was never swept before - phones (<=640) and desktop (>=1025) both
   were. The homepage trust-logo strip only had flex-wrap below
   640px, so on iPad portrait the last logo pushed the page 58-91px
   wide. Let it wrap across the whole tablet band. */
@media (max-width: 1024px) {
  /* !important: Hero.astro's inline <style> renders after this sheet and sets
     flex-wrap:nowrap at equal specificity, so a plain rule loses. */
  .sh-trust-logos { flex-wrap: wrap !important; justify-content: center; row-gap: 1.25rem; }
  .sh-trust-logo { max-width: 100%; }
}
