/* ==========================================================================
   Nexlymate — mobile.css
   Android-app style mobile layer. Load it LAST (after styles.css and any
   page stylesheet). Everything below is scoped to phones / small tablets
   (max-width: 900px); desktop is not touched.

   Pairs with mobile.js, which builds the app bar, the left navigation drawer
   and the bottom navigation bar.
   ========================================================================== */

:root {
  --m-accent: #ef233c;            /* brand red, same as 'Start free trial' */
  --m-accent-ink: #c41230;        /* darker red for text on light tints */
  --m-accent-soft: rgba(239, 35, 60, .10);
  --m-ink: #111111;               /* black */
  --m-muted: #5f6368;
  --m-line: #e4e9ef;
  --m-surface: #ffffff;
  --m-tint: #f3f6f8;
  --m-bar-h: 56px;
  --m-nav-h: 64px;
  --m-safe-t: env(safe-area-inset-top, 0px);
  --m-safe-b: env(safe-area-inset-bottom, 0px);
  --m-r-lg: 20px;
  --m-r-md: 14px;
  --m-ease: cubic-bezier(.2, .8, .2, 1);
  --m-shadow-1: 0 1px 2px rgba(15, 23, 42, .06), 0 3px 12px rgba(15, 23, 42, .06);
  --m-shadow-2: 0 2px 6px rgba(15, 23, 42, .08), 0 10px 28px rgba(15, 23, 42, .12);
}

/* The app chrome does not exist on desktop. */
.m-appbar,
.m-scrim,
.m-drawer,
.m-bottomnav {
  display: none;
}

@media (max-width: 900px) {

  /* ------------------------------------------------------------------
     0. Overflow safety: nothing may be wider than the screen, otherwise
        Android browsers zoom the page out and leave a blank strip.
     ------------------------------------------------------------------ */
  html {
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    width: 100%;
    max-width: 100%;
    position: relative;
  }

  main,
  section,
  footer {
    max-width: 100%;
  }

  @supports (overflow: clip) {
    main,
    section,
    footer {
      overflow-x: clip;
    }
  }

  /* Grid / flex children may shrink below their content width */
  .hero-inner > *,
  .hero-copy > *,
  .pro-spotlight > *,
  .feature-block-inner > *,
  .value-grid > *,
  .belief-grid > *,
  .catalog-grid > *,
  .feature-grid > *,
  .features-trio-grid > *,
  .guides-grid > *,
  .pipeline-step-grid > *,
  .payment-channels-grid > *,
  .sme-faq-grid > *,
  .couriers-showcase-grid > *,
  .growth-steps-strip > *,
  .contact-grid > *,
  .contact-aside-grid > *,
  .stats-row > *,
  .footer-top > *,
  .cta-band-inner > * {
    min-width: 0;
  }

  .hero-copy,
  .hero-visual,
  .spotlight-copy,
  .spotlight-visual-wrapper,
  .feature-block-copy,
  .feature-block-visual {
    min-width: 0;
    max-width: 100%;
  }

  img,
  video,
  canvas,
  iframe {
    max-width: 100%;
  }

  h1, h2, h3, h4, p, li, a, span, td, th {
    overflow-wrap: break-word;
  }

  .site-footer {
    overflow-wrap: anywhere;
  }

  /* Applied by mobile.js to any element it finds sticking out */
  .m-fit {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .m-clip {
    overflow-x: clip !important;
  }

  /* ------------------------------------------------------------------
     1. Page frame
     ------------------------------------------------------------------ */
  :root {
    --m-safe-b: env(safe-area-inset-bottom, 0px);
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--m-bar-h) + var(--m-safe-t) + 12px);
  }

  html.m-lock,
  html.m-lock body {
    overflow: hidden;
  }

  body {
    overflow-x: hidden;
    overflow-x: clip;
    padding-top: calc(var(--m-bar-h) + var(--m-safe-t));
    padding-bottom: calc(var(--m-nav-h) + var(--m-safe-b));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    font-size: 16px;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
  }

  /* The desktop header is replaced by the app bar + drawer. */
  .site-header {
    display: none !important;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  a,
  button,
  summary,
  label,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  /* Containers: one consistent 16px gutter */
  .container,
  .wrap,
  .wrap-wide,
  .wrap-narrow,
  .narrow-col {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }

  .section,
  .pro-section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .section-head {
    margin-bottom: 24px;
  }

  /* ------------------------------------------------------------------
     2. Type scale
     ------------------------------------------------------------------ */
  h1 {
    font-size: clamp(28px, 8.2vw, 36px);
    line-height: 1.15;
    letter-spacing: -.02em;
  }

  h2 {
    font-size: clamp(22px, 6.4vw, 28px);
    line-height: 1.2;
    letter-spacing: -.015em;
  }

  h3 {
    font-size: 19px;
    line-height: 1.3;
  }

  h4 {
    font-size: 16px;
    line-height: 1.35;
  }

  .lead-desc,
  .lead-para,
  .lead,
  .page-hero-sub,
  .section-sub,
  .section-head p {
    font-size: 16px;
    line-height: 1.6;
  }

  .eyebrow {
    font-size: 12px;
  }

  .page-hero {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  p code,
  li code,
  td code {
    overflow-wrap: anywhere;
  }

  /* ------------------------------------------------------------------
     3. Buttons (48px touch targets, pill shape, ripple-ready)
     ------------------------------------------------------------------ */
  .btn,
  .price-cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding-left: 22px;
    padding-right: 22px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    -webkit-user-select: none;
    user-select: none;
  }

  .btn-lg {
    min-height: 52px;
  }

  /* Primary buttons on light sections: black (red 'btn-teal' stays red).
     Dark bands (cta-band, final-cta, footer) are left as designed. */
  .section .btn-primary,
  .pro-section .btn-primary,
  .page-hero .btn-primary {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
  }

  .hero-cta,
  .cta-band-actions,
  .cta-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hero-cta .btn,
  .cta-band-actions .btn,
  .cta-actions .btn,
  .price-cta {
    width: 100%;
  }

  .btn:active,
  .price-cta:active {
    transform: scale(.98);
  }

  /* ------------------------------------------------------------------
     4. Cards: rounded surfaces with soft elevation
     ------------------------------------------------------------------ */
  .feature-card,
  .feature-trio-card,
  .guide-card,
  .catalog-card,
  .pipeline-card,
  .price-card,
  .faq-box-card,
  .contact-card-rich,
  .testimonial-card,
  .courier-partner-box,
  .payhere-trust-card,
  .growth-step-card,
  .api-doc-card,
  .volume-calc-card,
  .milestone-card,
  .value-item,
  .belief-item,
  .suite-panel,
  .channel-box,
  .doc-snip-panel {
    border-radius: var(--m-r-lg);
    box-shadow: var(--m-shadow-1);
    min-width: 0;
  }

  .pipeline-card,
  .feature-card,
  .feature-trio-card,
  .faq-box-card,
  .contact-card-rich,
  .testimonial-card,
  .milestone-card,
  .value-item,
  .belief-item,
  .growth-step-card {
    padding: 20px;
  }

  .guide-card,
  .catalog-card,
  .feature-card,
  .pipeline-card {
    transition: transform .15s var(--m-ease), box-shadow .15s var(--m-ease);
  }

  .guide-card:active,
  .catalog-card:active,
  .feature-card:active {
    transform: scale(.985);
    box-shadow: var(--m-shadow-1);
  }

  /* ------------------------------------------------------------------
     5. Layout: every multi-column grid becomes a single column
     ------------------------------------------------------------------ */
  .value-grid,
  .belief-grid,
  .catalog-grid,
  .feature-grid,
  .features-trio-grid,
  .guides-grid,
  .pipeline-step-grid,
  .payment-channels-grid,
  .sme-faq-grid,
  .couriers-showcase-grid,
  .growth-steps-strip,
  .contact-grid,
  .contact-aside-grid,
  .feature-block-inner,
  .pro-spotlight,
  .stats-row,
  .form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
  }

  .pro-spotlight,
  .feature-block-inner {
    gap: 22px;
    direction: ltr;
  }

  /* Text first, visual second, even on "reversed" blocks */
  .spotlight-copy,
  .feature-block-copy {
    order: 1;
  }

  .spotlight-visual-wrapper,
  .feature-block-visual {
    order: 2;
    min-width: 0;
  }

  .milestones-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .milestone-card {
    padding: 16px;
  }

  .milestone-number {
    font-size: 24px;
  }

  .mini-metric-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* ------------------------------------------------------------------
     6. Home hero
     ------------------------------------------------------------------ */
  .hero {
    padding-top: 24px;
    padding-bottom: 36px;
  }

  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .hero-copy p {
    font-size: 16px;
  }

  /* Headline: black, not the site's navy */
  .hero h1,
  .hero h1 em {
    color: #111111;
  }

  .hero-microtrust {
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
  }

  /* Hero: photo with floating, gently bobbing stat cards (same idea as
     desktop, scaled so every card stays inside the screen) */
  .hero-visual {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 26px 0 30px;
    box-sizing: border-box;
  }

  .hero-visual .hero-visual-glow {
    display: block;
    position: absolute;
    inset: 0;
  }

  .hero-visual .hero-photo {
    display: block;
    position: relative;
    z-index: 1;
    width: 86%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
    border-radius: 22px;
  }

  .hero-visual .hero-float,
  .hero-visual .hero-chip {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    max-width: 60%;
    margin: 0;
    padding: 7px 10px;
    border-radius: 12px;
    background: #fff;
    color: var(--m-ink);
    border: 1px solid var(--m-line);
    box-shadow: var(--m-shadow-2);
    box-sizing: border-box;
    animation: mFloat 4.6s ease-in-out infinite;
    will-change: transform;
  }

  .hero-visual .hero-float-icon,
  .hero-visual .hero-chip-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .hero-visual .hero-float-icon svg,
  .hero-visual .hero-chip-icon svg {
    width: 15px;
    height: 15px;
  }

  .hero-visual .hero-float > div b,
  .hero-visual .hero-chip > div b {
    display: block;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .hero-visual .hero-float > div span,
  .hero-visual .hero-chip > div span {
    display: block;
    font-size: 10.5px;
    line-height: 1.3;
    color: var(--m-muted);
    white-space: normal;      /* "Koombiyo · Domex · Royal Express" wraps instead of overflowing */
  }

  /* Card positions (all inside the box, nothing hangs off the screen edge) */
  .hero-visual .hero-chip-delivered { top: 2%;  left: 8%;  right: auto; bottom: auto; animation-delay: -3.4s; }
  .hero-visual .hero-float-orders   { top: 15%; right: 0;  left: auto;  bottom: auto; animation-delay: 0s; }
  .hero-visual .hero-chip-packed    { top: 45%; left: 0;   right: auto; bottom: auto; animation-delay: -1s; }
  .hero-visual .hero-float-status   { bottom: 12%; left: 2%; top: auto; right: auto; max-width: 62%; animation-delay: -2.2s; }
  .hero-visual .hero-chip-neworders { bottom: 0;  right: 3%; top: auto; left: auto; animation-delay: -.6s; }

  /* ------------------------------------------------------------------
     7. Horizontally swipeable chip / logo rows
     ------------------------------------------------------------------ */
  .hero-badges,
  .partner-logo-container,
  .courier-partners-strip,
  .security-badges-strip,
  .channel-pills,
  .payhere-feature-strip-pills,
  .api-chips-row,
  .code-tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .hero-badges::-webkit-scrollbar,
  .partner-logo-container::-webkit-scrollbar,
  .courier-partners-strip::-webkit-scrollbar,
  .security-badges-strip::-webkit-scrollbar,
  .channel-pills::-webkit-scrollbar,
  .payhere-feature-strip-pills::-webkit-scrollbar,
  .api-chips-row::-webkit-scrollbar,
  .code-tabs-nav::-webkit-scrollbar,
  .pricing-grid::-webkit-scrollbar {
    display: none;
  }

  .hero-badges > *,
  .partner-logo-container > *,
  .courier-partners-strip > *,
  .security-badges-strip > *,
  .channel-pills > *,
  .payhere-feature-strip-pills > *,
  .api-chips-row > *,
  .code-tabs-nav > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .partner-badge-card img {
    max-height: 32px;
    width: auto;
  }

  .trust-header-info {
    text-align: left;
  }

  /* ------------------------------------------------------------------
     8. Pricing: swipeable plan cards
     ------------------------------------------------------------------ */
  .pricing-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
    margin-left: -16px;
    margin-right: -16px;
    padding: 6px 16px 20px;
  }

  .pricing-grid > .price-card {
    flex: 0 0 min(82vw, 340px);
    scroll-snap-align: center;
  }

  /* ------------------------------------------------------------------
     9. Tables and code: scroll inside their own box, never the page
     ------------------------------------------------------------------ */
  .comparison-table-wrap,
  .schema-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--m-r-md);
    max-width: 100%;
  }

  .comparison-table {
    min-width: 720px;
  }

  .schema-table {
    min-width: 560px;
  }

  .comparison-table th,
  .comparison-table td,
  .schema-table th,
  .schema-table td {
    padding: 12px 14px;
    font-size: 13.5px;
  }

  .api-doc-layout {
    display: block;
  }

  .api-doc-layout > * {
    min-width: 0;
  }

  .api-doc-card {
    max-width: 100%;
    overflow: hidden;
  }

  .api-route-tag {
    font-size: 12.5px;
    overflow-wrap: anywhere;
  }

  .code-viewer {
    max-width: 100%;
    border-radius: var(--m-r-md);
  }

  .code-content,
  pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 12.5px;
    line-height: 1.6;
  }

  /* ------------------------------------------------------------------
     10. Forms (16px text stops the zoom-on-focus jump on phones)
     ------------------------------------------------------------------ */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  select,
  textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: var(--m-r-md);
    font-size: 16px !important;
  }

  textarea {
    min-height: 120px;
  }

  input[type="range"] {
    width: 100%;
    min-height: 32px;
  }

  .form-field {
    margin-bottom: 14px;
  }

  .form-field label {
    font-size: 14px;
    font-weight: 600;
  }

  .faq-item summary,
  .faq-item button {
    min-height: 52px;
  }

  /* ------------------------------------------------------------------
     11. Call-to-action bands, stats, footer
     ------------------------------------------------------------------ */
  .cta-band-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .cta-panel {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .stats-band {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .testimonial-section .wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .site-footer {
    padding-top: 36px;
  }

  .footer-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px 16px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col a {
    display: inline-block;
    padding: 6px 0;
    font-size: 15px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }

  /* Existing WhatsApp widget (home + about): compact round button
     that floats above the bottom bar. */
  .floating-whatsapp-widget {
    position: fixed !important;
    left: auto !important;
    right: 14px !important;
    bottom: calc(var(--m-nav-h) + var(--m-safe-b) + 14px) !important;
    z-index: 880 !important;
    width: 54px !important;
    height: 54px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center;
    box-shadow: var(--m-shadow-2);
  }

  .floating-whatsapp-widget .fwa-text-group {
    display: none !important;
  }

  .floating-whatsapp-widget .fwa-icon-container {
    margin: 0 !important;
  }

  /* ------------------------------------------------------------------
     12. App bar (top)
     ------------------------------------------------------------------ */
  .m-appbar {
    display: flex;
    align-items: center;
    gap: 4px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    height: calc(var(--m-bar-h) + var(--m-safe-t));
    padding: var(--m-safe-t) 12px 0 4px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: transform .28s var(--m-ease), box-shadow .2s, border-color .2s;
  }

  .m-appbar.is-elevated {
    border-bottom-color: var(--m-line);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
  }

  .m-appbar.is-hidden {
    transform: translateY(-100%);
  }

  .m-iconbtn {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--m-ink);
    cursor: pointer;
  }

  .m-iconbtn:active {
    background: var(--m-accent-soft);
  }

  .m-ico {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
  }

  .m-appbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
    margin-right: auto;
    padding: 0 4px;
  }

  .m-appbar-brand img {
    display: block;
    height: 26px;
    width: auto;
  }

  .m-appbar-cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--m-accent);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }

  /* ------------------------------------------------------------------
     13. Navigation drawer (left)
     ------------------------------------------------------------------ */
  .m-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 990;
    background: rgba(10, 20, 35, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility 0s .25s;
  }

  .m-scrim.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .25s;
  }

  .m-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    width: min(84vw, 330px);
    padding-top: var(--m-safe-t);
    padding-bottom: var(--m-safe-b);
    box-sizing: border-box;
    background: var(--m-surface);
    border-radius: 0 28px 28px 0;
    box-shadow: var(--m-shadow-2);
    overflow: hidden;
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform .3s var(--m-ease), visibility 0s .3s;
    outline: none;
  }

  .m-drawer.is-open {
    transform: none;
    visibility: visible;
    transition: transform .3s var(--m-ease);
  }

  .m-drawer.is-dragging {
    transition: none;
  }

  .m-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 18px 8px 16px 20px;
    background: #fff1ee;
  }

  .m-drawer-head img {
    display: block;
    height: 28px;
    width: auto;
  }

  .m-drawer-tag {
    margin: 8px 0 0;
    max-width: 210px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--m-muted);
  }

  .m-drawer-nav {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }

  .m-drawer-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 52px;
    margin-bottom: 2px;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--m-ink);
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
  }

  .m-drawer-item.is-active {
    background: var(--m-accent-soft);
    color: var(--m-accent-ink);
  }

  .m-drawer-item:active {
    background: var(--m-tint);
  }

  .m-drawer-foot {
    display: grid;
    gap: 10px;
    padding: 14px 16px 18px;
    border-top: 1px solid var(--m-line);
  }

  .m-drawer-btn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
  }

  .m-drawer-btn.is-primary {
    background: var(--m-accent);
    color: #fff;
  }

  .m-drawer-btn.is-outline {
    border: 1.5px solid var(--m-line);
    color: var(--m-ink);
  }

  .m-drawer-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    color: #128c4a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
  }

  /* ------------------------------------------------------------------
     14. Bottom navigation bar
     ------------------------------------------------------------------ */
  .m-bottomnav {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    height: calc(var(--m-nav-h) + var(--m-safe-b));
    padding: 6px 6px var(--m-safe-b);
    box-sizing: border-box;
    background: var(--m-surface);
    border-top: 1px solid var(--m-line);
    transition: transform .25s var(--m-ease);
  }

  html.m-kb .m-bottomnav {
    transform: translateY(110%);
  }

  .m-bn-item {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 2px 0 4px;
    border-radius: 16px;
    color: var(--m-muted);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
  }

  .m-bn-pill {
    display: grid;
    place-items: center;
    width: 60px;
    height: 28px;
    border-radius: 14px;
    transition: background .2s, color .2s;
  }

  .m-bn-item.is-active {
    color: var(--m-accent-ink);
  }

  .m-bn-item.is-active .m-bn-pill {
    background: rgba(239, 35, 60, .14);
  }

  .m-bn-label {
    max-width: 100%;
    padding-bottom: 1px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ------------------------------------------------------------------
     15. Ripple (touch feedback) and focus
     ------------------------------------------------------------------ */
  .m-wave {
    position: absolute;
    border-radius: 50%;
    background: currentColor;
    opacity: .18;
    pointer-events: none;
    transform: scale(0);
    animation: m-wave .55s var(--m-ease) forwards;
  }

  @keyframes m-wave {
    to {
      transform: scale(1);
      opacity: 0;
    }
  }

  .m-iconbtn:focus-visible,
  .m-drawer-item:focus-visible,
  .m-drawer-btn:focus-visible,
  .m-bn-item:focus-visible,
  .m-appbar-cta:focus-visible,
  .m-appbar-brand:focus-visible {
    outline: 2px solid var(--m-accent);
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    .m-appbar,
    .m-drawer,
    .m-scrim,
    .m-bottomnav,
    .m-bn-pill {
      transition: none;
    }

    .m-wave {
      display: none;
    }
  }
}

/* Very small phones (≤ 360px) */
@media (max-width: 360px) {
  .m-bn-pill {
    width: 52px;
  }

  .m-bn-item {
    font-size: 10.5px;
  }

  .milestones-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* ==========================================================================
   v5 — COMPACT PHONE TYPE & DENSITY LAYER
   Goal: phone shows the same content as desktop, but with smaller, readable
   type and tighter spacing so far more fits on each screen.
   Written with class-level selectors (prefixed with `body`) so it beats the
   desktop rules in styles.css / pro-enhancements.css / per-page <style> blocks.
   Desktop (> 900px) is untouched.
   ========================================================================== */
@media (max-width: 900px) {

  /* ---- type scale tokens ---- */
  :root {
    --t-body: 14.5px;
    --t-small: 13px;
    --t-xs: 11.5px;
    --t-h1: clamp(24px, 7vw, 29px);
    --t-h2: clamp(20px, 5.6vw, 23px);
    --t-h3: 16px;
    --t-h4: 14.5px;
    --m-gutter: 16px;
  }

  html body { font-size: var(--t-body); line-height: 1.55; }

  /* ---- headings ---- */
  body h1,
  body .hero-copy h1,
  body .hero h1,
  body .page-hero-inner h1,
  body .api-page-header h1 {
    font-size: var(--t-h1);
    line-height: 1.18;
    letter-spacing: -.02em;
  }
  body .hero-copy h1,
  body .hero h1 { font-size: clamp(26px, 7.6vw, 32px); }

  body h2,
  body .section-head h2,
  body .stats-band h2,
  body .testimonial-aside h2,
  body .cta-panel h2,
  body .feature-block-copy h2,
  body .catalog-intro h2,
  body .cta-band-inner h2,
  body .coming-soon-card h2,
  body .api-section h2,
  body .api-doc-card h2 {
    font-size: var(--t-h2);
    line-height: 1.22;
    letter-spacing: -.01em;
  }

  body h3,
  body .suite-feature h3,
  body .feature-card h3,
  body .price-card-head h3,
  body .value-item h3,
  body .belief-item h3,
  body .guide-card h3,
  body .category-head h3,
  body .api-doc-card h3,
  body .contact-card h3 {
    font-size: var(--t-h3);
    line-height: 1.3;
  }

  body h4,
  body .suite-item h4,
  body .catalog-card h4,
  body .contact-card-rich h4 {
    font-size: var(--t-h4);
    line-height: 1.35;
  }

  /* ---- body copy ---- */
  body p,
  body li { line-height: 1.55; }

  body .lead-desc,
  body .lead-para,
  body .lead,
  body .page-hero-sub,
  body .section-sub,
  body .section-head p,
  body .hero-copy p,
  body .stats-band .lead,
  body .catalog-intro p,
  body .cta-panel p,
  body .testimonial-aside p,
  body .feature-block-copy > p,
  body .api-page-header p,
  body .coming-soon-card p,
  body .legal-content p {
    font-size: 14.5px;
    line-height: 1.55;
  }

  body .feature-card p,
  body .suite-feature p,
  body .suite-item p,
  body .value-item p,
  body .belief-item p,
  body .guide-card p,
  body .catalog-card p,
  body .category-head p,
  body .contact-card p,
  body .contact-card-rich p,
  body .price-card-head p,
  body .price-card-head .plan-subtitle,
  body .faq-item p,
  body .cta-band-inner p,
  body .api-section p,
  body .api-doc-card p,
  body .feature-list li,
  body .price-features li,
  body .footer-brand p {
    font-size: var(--t-small);
    line-height: 1.5;
  }

  body .legal-content h2 { font-size: 17px; margin-top: 22px; }
  body .legal-content li { font-size: 14px; }

  /* ---- small / meta text ---- */
  body .eyebrow,
  body .value-track,
  body .guide-tag,
  body .price-badge,
  body .coming-soon-badge,
  body .tag-soon,
  body .suite-feature .tag,
  body .price-card-head .plan-tier,
  body .trust-label,
  body .footer-col h5 { font-size: 11px; letter-spacing: .06em; }

  body .hero-microtrust,
  body .badge-chip,
  body .stat-label,
  body .milestone-desc,
  body .mini-metric span,
  body .person-role,
  body .guide-read-time,
  body .price-period,
  body .price-overage,
  body .price-disclaimer,
  body .cta-fineprint,
  body .form-note,
  body .footer-credit,
  body .footer-bottom p,
  body .footer-legal a,
  body .doc-callout { font-size: 12px; }

  /* ---- numbers ---- */
  body .stat-num { font-size: clamp(22px, 6.4vw, 26px); }
  body .milestone-number { font-size: 21px; }
  body .milestone-label { font-size: 12.5px; }
  body .price-figure { font-size: 28px; }
  body .price-currency { font-size: 14px; }
  body .mini-metric b { font-size: 18px; }
  body .testimonial-card blockquote { font-size: 16px; line-height: 1.5; }
  body .person-name { font-size: 13.5px; }

  /* ---- buttons, links, nav ---- */
  body .btn,
  body .price-cta { min-height: 44px; font-size: 14px; padding-left: 18px; padding-right: 18px; }
  body .btn-lg { min-height: 46px; font-size: 14.5px; padding-left: 20px; padding-right: 20px; }
  body .feature-learn-more,
  body .suite-more .fc-link { font-size: 13.5px; }
  body .footer-col a { font-size: 13.5px; padding: 5px 0; }
  body .category-nav a,
  body .feature-jumplist a { font-size: 12.5px; }

  .m-appbar-cta { font-size: 13px; height: 34px; padding: 0 14px; }
  .m-drawer-item { font-size: 14.5px; min-height: 48px; }
  .m-drawer-tag { font-size: 12px; }
  .m-bn-item { font-size: 11px; }

  /* ---- spacing: tighter so more fits on one screen ---- */
  body .container,
  body .wrap,
  body .wrap-wide,
  body .wrap-narrow,
  body .narrow-col { padding-left: var(--m-gutter); padding-right: var(--m-gutter); }

  body .section,
  body .pro-section { padding-top: 32px; padding-bottom: 32px; }
  body .section-head { margin-bottom: 18px; }
  body .page-hero { padding-top: 20px; padding-bottom: 20px; }
  body .hero { padding-top: 18px; padding-bottom: 26px; }
  body .stats-band { padding-top: 30px; padding-bottom: 30px; }
  body .site-footer { padding-top: 28px; }
  body .cta-panel { padding: 22px 16px; }

  body .pipeline-card,
  body .feature-card,
  body .feature-trio-card,
  body .faq-box-card,
  body .contact-card-rich,
  body .testimonial-card,
  body .value-item,
  body .belief-item,
  body .growth-step-card,
  body .guide-card,
  body .catalog-card,
  body .price-card { padding: 16px; }

  body .value-grid,
  body .belief-grid,
  body .catalog-grid,
  body .feature-grid,
  body .features-trio-grid,
  body .guides-grid,
  body .pipeline-step-grid,
  body .payment-channels-grid,
  body .sme-faq-grid,
  body .couriers-showcase-grid,
  body .growth-steps-strip,
  body .contact-grid,
  body .contact-aside-grid,
  body .stats-row,
  body .form-row { gap: 10px; }

  body .hero-cta,
  body .cta-band-actions,
  body .cta-actions { gap: 10px; }

  /* ---- tables & code ---- */
  body .comparison-table th,
  body .comparison-table td,
  body .schema-table th,
  body .schema-table td,
  body .param-table { font-size: 12.5px; padding: 10px 12px; }
  body .comparison-table { min-width: 640px; }
  body .schema-table { min-width: 500px; }
  body .comparison-category-row td { font-size: 11.5px; }
  body .code-content,
  body pre,
  body .code-pre { font-size: 11.5px; line-height: 1.55; }
  body .code-tab-btn,
  body .api-nav-menu a,
  body .api-nav-list a { font-size: 12.5px; }
  body .api-route-tag,
  body .api-endpoint { font-size: 12.5px; }
  body .method-badge,
  body .badge-method,
  body .req-tag,
  body .opt-tag { font-size: 10px; }

  /* ---- forms (16px stays on inputs: Android zooms the page on focus below that) ---- */
  body .form-field label { font-size: 13px; }
  body .form-field { margin-bottom: 12px; }
  body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  body select,
  body textarea { min-height: 44px; padding: 10px 12px; }
  body .faq-item summary { font-size: 14.5px; min-height: 48px; }
}

/* Small phones (<= 380px): one more step down */
@media (max-width: 380px) {
  :root { --t-body: 14px; --t-small: 12.5px; --m-gutter: 14px; }
  body h1,
  body .page-hero-inner h1 { font-size: 24px; }
  body .hero-copy h1,
  body .hero h1 { font-size: 26px; }
  body h2,
  body .section-head h2 { font-size: 20px; }
}


/* ==========================================================================
   v6 — hero float animation, logo marquee, scroll reveal
   ========================================================================== */
@keyframes mFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (max-width: 900px) {

  /* Partner logos: slow right-to-left drift (driven by mobile.js) that the
     user can still swipe by hand. Edges fade out so logos glide in and out. */
  .partner-logo-container.is-marquee {
    scroll-snap-type: none;
    scroll-behavior: auto;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    gap: 10px;
    padding-left: 0;
    padding-right: 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  }

  .partner-logo-container.is-marquee > * {
    scroll-snap-align: none;
  }

  /* Scroll reveal: a little more travel so it reads on a small screen */
  .reveal {
    transform: translateY(22px);
    transition: opacity .6s var(--m-ease), transform .6s var(--m-ease);
  }

  .reveal.is-visible {
    transform: translateY(0);
  }
}

/* v7: hero float + logo drift are small, gentle motions, so they keep running
   even when Android's "remove animations" / battery saver is on. */


/* ==========================================================================
   v7 — REAL-PHONE FIXES (hero floating cards + logo marquee)
   High specificity + !important on purpose: a stylesheet loaded before this
   one (pro-enhancements.css / inline page CSS) was turning the floating cards
   into a plain static grid on real phones. Desktop (> 900px) is untouched.
   ========================================================================== */
@keyframes mFloat2 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -7px, 0); }
}

@media (max-width: 900px) {

  /* ---- Hero: photo in the middle, stat cards floating around it ---- */
  html body .hero .hero-visual {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 34px 0 40px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  html body .hero .hero-visual .hero-visual-glow {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
  }

  html body .hero .hero-visual .hero-photo {
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    width: 82% !important;
    max-width: 380px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  html body .hero .hero-visual .hero-float,
  html body .hero .hero-visual .hero-chip {
    position: absolute !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    width: max-content !important;
    max-width: 52% !important;
    margin: 0 !important;
    padding: 6px 9px !important;
    border-radius: 12px !important;
    background: #fff !important;
    border: 1px solid var(--m-line) !important;
    box-shadow: var(--m-shadow-2) !important;
    box-sizing: border-box !important;
    animation: mFloat2 4.6s ease-in-out infinite !important;
    will-change: transform;
  }

  html body .hero .hero-visual .hero-float-icon,
  html body .hero .hero-visual .hero-chip-icon {
    width: 26px !important;
    height: 26px !important;
    flex: 0 0 26px !important;
  }

  html body .hero .hero-visual .hero-float-icon svg,
  html body .hero .hero-visual .hero-chip-icon svg {
    width: 14px !important;
    height: 14px !important;
  }

  html body .hero .hero-visual .hero-float > div,
  html body .hero .hero-visual .hero-chip > div {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  html body .hero .hero-visual .hero-float b,
  html body .hero .hero-visual .hero-chip b {
    font-size: 12.5px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }

  html body .hero .hero-visual .hero-float span,
  html body .hero .hero-visual .hero-chip span {
    font-size: 10px !important;
    line-height: 1.25 !important;
    white-space: normal !important;   /* long courier names wrap instead of running off-screen */
  }

  /* Positions: every card stays fully inside the screen */
  html body .hero .hero-visual .hero-chip-delivered { top: 2% !important;     left: 6% !important;  right: auto !important; bottom: auto !important; animation-delay: -3.4s !important; }
  html body .hero .hero-visual .hero-float-orders   { top: 14% !important;    right: 1% !important; left: auto !important;  bottom: auto !important; animation-delay: 0s !important; }
  html body .hero .hero-visual .hero-chip-packed    { top: 44% !important;    left: 1% !important;  right: auto !important; bottom: auto !important; animation-delay: -1s !important; }
  html body .hero .hero-visual .hero-float-status   { bottom: 11% !important; left: 3% !important;  top: auto !important;   right: auto !important;  max-width: 56% !important; animation-delay: -2.2s !important; }
  html body .hero .hero-visual .hero-chip-neworders { bottom: 1% !important;  right: 4% !important; top: auto !important;   left: auto !important;   animation-delay: -.6s !important; }

  /* ---- Partner logos: always a single swipeable row (JS makes it drift) ---- */
  html body .trust-bar-modern .partner-logo-container,
  html body .partner-logo-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    box-sizing: border-box;
  }

  html body .partner-logo-container::-webkit-scrollbar { display: none; }

  html body .partner-logo-container > .partner-badge-card {
    flex: 0 0 auto !important;
    scroll-snap-align: none !important;
  }

  html body .partner-logo-container .partner-badge-card img {
    display: block;
    height: 32px;
    width: auto;
    max-width: none;
  }
}
