/* PEP-MOBILE-PRODUCTION-STABILIZATION-A-01
 * Late production CSS ownership layer for physical mobile handsets.
 */
:root{
  --kbm-mps-a-gutter:10px;
  --kbm-mps-a-touch:48px;
  --kbm-mps-a-radius:18px;
  --kbm-mps-a-safe-bottom:env(safe-area-inset-bottom,0px);
  --kbm-mps-a-header:60px;
  --kbm-mps-a-appbar:76px;
  --kbm-mps-a-navy:#071a33;
  --kbm-mps-a-yellow:#ffc400;
  --kbm-mps-a-line:#dce5ef;
  --kbm-mps-a-bg:#f4f7fb;
}

@media(max-width:767px){
  html.kbm-rpg-html,html.kbm-rsb-html,html.kbm-uml-html{overflow-x:clip!important}
  body.kbm-mps-a-active{
    width:100%!important;max-width:100%!important;min-width:0!important;
    overflow-x:clip!important;background:var(--kbm-mps-a-bg)!important;
    padding-bottom:calc(var(--kbm-mps-a-appbar) + var(--kbm-mps-a-safe-bottom) + 10px)!important;
    -webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;
  }
  body.kbm-mps-a-active.kbm-mps-a-route-auth,
  body.kbm-mps-a-active.kbm-mps-a-route-submit,
  body.kbm-mps-a-active.kbm-mps-a-route-payment{padding-bottom:var(--kbm-mps-a-safe-bottom)!important}

  /* Persian text must stay horizontal. Long tokens may wrap, normal words may not split letter-by-letter. */
  body.kbm-mps-a-active :where(
    h1,h2,h3,h4,h5,h6,p,li,dt,dd,span,strong,b,em,small,a,label,button,
    th,td,summary,figcaption,.kbm-meta,.kbm-muted,.kbm-chip,[class*="title"],[class*="label"]
  ){
    writing-mode:horizontal-tb!important;text-orientation:mixed!important;
    word-break:normal!important;overflow-wrap:break-word!important;
    white-space:normal;min-width:0;
  }
  body.kbm-mps-a-active :where(code,pre,kbd,samp,.kbm-url,.kbm-long-token){overflow-wrap:anywhere!important;word-break:break-word!important}
  body.kbm-mps-a-active :where(.kbm-chip,[class*="chip"],[class*="badge"],[class*="tag"]){max-width:100%;line-height:1.45!important}
  body.kbm-mps-a-active :where(img,picture,video,canvas,iframe,svg){max-width:100%!important}
  body.kbm-mps-a-active :where(main,.site-main,.kbm-shell,.kbm-theme-content,.entry-content,.page-content,.kbm-wrap,.kbm-container,.container){min-width:0!important;max-width:100%!important}
  body.kbm-mps-a-active :where(.kbm-shell,.kbm-mlec-home,.kbm-ads-recode,.kbm-drivers-recode,.kbm-dashboard-recode,.kbm-submit-recode,.kbm-v08-page){width:calc(100% - 20px)!important;margin-inline:auto!important}

  body.kbm-mps-a-active :where(button,.button,[role="button"],input[type="submit"],input[type="button"],a.kbm-btn){min-height:var(--kbm-mps-a-touch)!important;touch-action:manipulation}
  body.kbm-mps-a-active :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){min-height:48px!important;font-size:16px!important;max-width:100%!important}

  /* Home: reduce scroll without collapsing content into unreadable columns. */
  body.kbm-mps-a-route-home .kbm-mlec-home{margin-top:8px!important;margin-bottom:24px!important}
  body.kbm-mps-a-route-home .kbm-mlec-section,
  body.kbm-mps-a-route-home .kbm-b01-steps,
  body.kbm-mps-a-route-home .kbm-b01-trust,
  body.kbm-mps-a-route-home .kbm-b01-cta{margin-top:12px!important;padding:13px!important;border-radius:20px!important}
  body.kbm-mps-a-route-home .kbm-mlec-section__head{margin-bottom:11px!important}
  body.kbm-mps-a-route-home .kbm-mlec-section__head h2{font-size:20px!important;line-height:1.55!important}

  body.kbm-mps-a-route-home .kbm-mlec-categories{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;
  }
  body.kbm-mps-a-route-home .kbm-mlec-categories>a{
    min-width:0!important;min-height:0!important;padding:0!important;border-radius:17px!important;overflow:hidden!important;
  }
  body.kbm-mps-a-route-home .kbm-mlec-categories i{width:100%!important;height:auto!important;aspect-ratio:16/9!important;min-height:0!important}
  body.kbm-mps-a-route-home .kbm-mlec-categories>a>span{padding:9px 10px 4px!important;gap:2px!important}
  body.kbm-mps-a-route-home .kbm-mlec-categories strong{font-size:13px!important;line-height:1.55!important}
  body.kbm-mps-a-route-home .kbm-mlec-categories small{font-size:10.5px!important;line-height:1.6!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important}
  body.kbm-mps-a-route-home .kbm-mlec-categories>a>b{padding:0 10px 10px!important;font-size:10.5px!important}

  body.kbm-mps-a-route-home .kbm-b01-steps>div:last-child{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  body.kbm-mps-a-route-home .kbm-b01-steps article{
    display:grid!important;grid-template-columns:104px minmax(0,1fr)!important;width:100%!important;min-width:0!important;
    border-radius:17px!important;overflow:hidden!important;
  }
  body.kbm-mps-a-route-home .kbm-b01-steps article>.kbm-visual-picture{width:104px!important;height:100%!important;min-height:112px!important;aspect-ratio:auto!important}
  body.kbm-mps-a-route-home .kbm-b01-steps article>div{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;gap:4px 8px!important;padding:10px!important;align-content:center!important}
  body.kbm-mps-a-route-home .kbm-b01-steps article>div>span{width:38px!important;height:38px!important;border-radius:11px!important}
  body.kbm-mps-a-route-home .kbm-b01-steps article b{font-size:14px!important;line-height:1.55!important}
  body.kbm-mps-a-route-home .kbm-b01-steps article p{grid-column:2!important;font-size:11.5px!important;line-height:1.75!important;margin:0!important}

  body.kbm-mps-a-route-home .kbm-b01-trust{grid-template-columns:112px minmax(0,1fr)!important;gap:10px!important;align-items:stretch!important}
  body.kbm-mps-a-route-home .kbm-b01-trust__media{height:100%!important;min-height:128px!important;aspect-ratio:auto!important;border-radius:16px!important}
  body.kbm-mps-a-route-home .kbm-b01-trust__copy h2{font-size:18px!important;line-height:1.6!important;margin:4px 0 6px!important}
  body.kbm-mps-a-route-home .kbm-b01-trust__copy p{font-size:12px!important;line-height:1.8!important;margin:0 0 8px!important;display:-webkit-box!important;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden!important}
  body.kbm-mps-a-route-home .kbm-b01-trust__copy a{min-height:42px!important;padding:8px 10px!important;font-size:11.5px!important}
  body.kbm-mps-a-route-home .kbm-b01-cta{padding:18px 14px!important;gap:10px!important}
  body.kbm-mps-a-route-home .kbm-b01-cta h2{font-size:19px!important;line-height:1.55!important}
  body.kbm-mps-a-route-home .kbm-b01-cta p{font-size:12px!important;line-height:1.8!important}
  body.kbm-mps-a-route-home .kbm-b01-cta__actions{grid-template-columns:1fr 1fr!important;gap:7px!important}
  body.kbm-mps-a-route-home .kbm-b01-cta__actions a{min-height:44px!important;padding:8px!important;font-size:11.5px!important}

  /* Compact mobile cards: enough content width, no vertical price/title. */
  body.kbm-mps-a-active :where(.kbm-ads-recode-grid,.kbm-mlec-home-grid,.kbm-drivers-grid,.kbm-tenders-grid,.kbm-dashboard-grid){grid-template-columns:1fr!important;gap:10px!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card,.kbm-adsv2-card,.kbm-ad-card,.kbm-driver-card,.kbm-p13-driver-card,.kbm-tender-card,.kbm-dashboard-card,.kbm-life-card){
    width:100%!important;min-width:0!important;max-width:100%!important;border-radius:18px!important;overflow:hidden!important;
  }
  body.kbm-mps-a-route-home .kbm-mlec-home-grid>.kbm-ads-recode-card,
  body.kbm-mps-a-route-ads .kbm-ads-recode-card,
  body.kbm-mps-a-route-ads :where(.kbm-adsv2-card,.kbm-ad-card),
  body.kbm-mps-a-route-drivers :where(.kbm-driver-card,.kbm-p13-driver-card),
  body.kbm-mps-a-route-tenders .kbm-tender-card{
    display:grid!important;grid-template-columns:118px minmax(0,1fr)!important;min-height:144px!important;height:auto!important;
  }
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-media,.kbm-adsv2-card__media,.kbm-ad-card-media,.kbm-driver-card__media,.kbm-tender-card__media){
    grid-column:1!important;grid-row:1!important;width:118px!important;height:100%!important;min-height:144px!important;aspect-ratio:auto!important;border-radius:0!important;
  }
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-media img,.kbm-adsv2-card__media img,.kbm-ad-card-media img,.kbm-driver-card__media img,.kbm-tender-card__media img){width:100%!important;height:100%!important;object-fit:cover!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-body,.kbm-adsv2-card__body,.kbm-ad-card-body,.kbm-driver-card__body,.kbm-tender-card__body){
    grid-column:2!important;grid-row:1!important;min-width:0!important;padding:10px!important;gap:6px!important;
  }
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-title,.kbm-adsv2-card h2,.kbm-adsv2-card h3,.kbm-ad-card h2,.kbm-ad-card h3,.kbm-driver-card h2,.kbm-driver-card h3,.kbm-tender-card h2,.kbm-tender-card h3){font-size:13.5px!important;line-height:1.65!important;margin:0!important;min-height:0!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-meta,.kbm-adsv2-card__meta,.kbm-ad-card-meta,.kbm-driver-card__meta,.kbm-tender-card__meta){display:flex!important;flex-wrap:wrap!important;gap:4px!important;max-height:54px!important;overflow:hidden!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-meta>*,.kbm-adsv2-card__meta>*,.kbm-ad-card-meta>*,.kbm-driver-card__meta>*,.kbm-tender-card__meta>*){font-size:10px!important;line-height:1.45!important;padding:3px 6px!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-foot,.kbm-adsv2-card__foot,.kbm-ad-card-foot,.kbm-driver-card__foot,.kbm-tender-card__foot){display:grid!important;grid-template-columns:1fr!important;gap:6px!important;margin-top:auto!important;min-width:0!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-price,.kbm-adsv2-card__price,.kbm-ad-card-price,.kbm-card-price){font-size:11.5px!important;line-height:1.55!important;white-space:normal!important;overflow-wrap:break-word!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-cta,.kbm-adsv2-card__cta,.kbm-ad-card-cta,.kbm-card-cta){min-height:38px!important;padding:6px 8px!important;font-size:11px!important;border-radius:11px!important}

  /* Archive toolbar and canonical filter sheet. */
  body.kbm-mps-a-active :where(.kbm-ads-recode-toolbar,.kbm-adsv2-toolbar,.kbm-drivers-toolbar,.kbm-tenders-toolbar,.kbm-archive-toolbar){
    position:sticky!important;top:calc(var(--kbm-mps-a-header) + env(safe-area-inset-top,0px))!important;z-index:880!important;
    display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important;
    margin:0 0 10px!important;padding:8px!important;border:1px solid var(--kbm-mps-a-line)!important;border-radius:15px!important;background:rgba(255,255,255,.97)!important;backdrop-filter:blur(14px)!important;
  }
  body.kbm-mps-a-active .kbm-mps-a-filter-trigger{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
    flex:1 1 0!important;min-width:0!important;min-height:44px!important;padding:7px 10px!important;border:0!important;border-radius:12px!important;background:var(--kbm-mps-a-yellow)!important;color:var(--kbm-mps-a-navy)!important;font-weight:950!important;
  }
  body.kbm-mps-a-active .kbm-mps-a-filter-trigger svg{width:18px!important;height:18px!important;fill:currentColor!important;flex:0 0 auto!important}
  body.kbm-mps-a-active .kbm-mps-a-filter-trigger__count{display:grid!important;place-items:center!important;min-width:21px!important;height:21px!important;border-radius:999px!important;background:var(--kbm-mps-a-navy)!important;color:#fff!important;font-size:10px!important}
  body.kbm-mps-a-active .kbm-mps-a-hidden-filter-control{display:none!important;visibility:hidden!important;pointer-events:none!important}

  body.kbm-mps-a-active .kbm-mps-a-filter-sheet{
    position:fixed!important;z-index:2147483200!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;
    display:block!important;width:100%!important;max-width:100%!important;max-height:min(86dvh,760px)!important;
    margin:0!important;padding:0 13px calc(13px + var(--kbm-mps-a-safe-bottom))!important;
    overflow:auto!important;overscroll-behavior:contain!important;background:#fff!important;border:0!important;border-radius:24px 24px 0 0!important;
    box-shadow:0 -22px 64px rgba(7,26,51,.26)!important;
    transform:translateY(calc(100% + 28px))!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;
    transition:transform .22s ease,opacity .18s ease,visibility .18s ease!important;
  }
  body.kbm-mps-a-active.kbm-mps-a-filter-open .kbm-mps-a-filter-sheet{transform:translateY(0)!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important}
  body.kbm-mps-a-active .kbm-mps-a-filter-head{
    position:sticky!important;top:0!important;z-index:4!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
    min-height:58px!important;margin:0 -13px 12px!important;padding:8px 13px!important;background:rgba(255,255,255,.98)!important;border-bottom:1px solid var(--kbm-mps-a-line)!important;
  }
  body.kbm-mps-a-active .kbm-mps-a-filter-head strong{font-size:16px!important}
  body.kbm-mps-a-active .kbm-mps-a-filter-close{width:42px!important;height:42px!important;min-height:42px!important;border:1px solid var(--kbm-mps-a-line)!important;border-radius:13px!important;background:#f8fafc!important;color:var(--kbm-mps-a-navy)!important;font-size:22px!important;padding:0!important}
  body.kbm-mps-a-active .kbm-mps-a-filter-actions{
    position:sticky!important;bottom:calc(-13px - var(--kbm-mps-a-safe-bottom))!important;z-index:4!important;display:grid!important;grid-template-columns:.75fr 1.25fr!important;gap:8px!important;
    margin:14px -13px -13px!important;padding:10px 13px calc(10px + var(--kbm-mps-a-safe-bottom))!important;background:rgba(255,255,255,.98)!important;border-top:1px solid var(--kbm-mps-a-line)!important;
  }
  body.kbm-mps-a-active .kbm-mps-a-filter-actions :where(a,button){display:flex!important;align-items:center!important;justify-content:center!important;min-height:48px!important;border-radius:14px!important;text-decoration:none!important;font-weight:950!important}
  body.kbm-mps-a-active .kbm-mps-a-filter-clear{background:#f1f5f9!important;color:#475569!important;border:1px solid var(--kbm-mps-a-line)!important}
  body.kbm-mps-a-active .kbm-mps-a-filter-apply{background:var(--kbm-mps-a-yellow)!important;color:var(--kbm-mps-a-navy)!important;border:0!important}
  body.kbm-mps-a-active .kbm-mps-a-filter-backdrop{position:fixed!important;z-index:2147483100!important;inset:0!important;background:rgba(2,15,28,.56)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:.18s ease!important}
  body.kbm-mps-a-active.kbm-mps-a-filter-open .kbm-mps-a-filter-backdrop{opacity:1!important;visibility:visible!important;pointer-events:auto!important}
  html.kbm-mps-a-filter-lock,html.kbm-mps-a-filter-lock body{overflow:hidden!important;overscroll-behavior:none!important}

  /* Dashboard and forms: never squeeze text/actions into narrow columns. */
  body.kbm-mps-a-route-dashboard :where(.kbm-dashboard-card,.kbm-life-card,.kbm-dash-card){grid-template-columns:104px minmax(0,1fr)!important;gap:0!important;height:auto!important}
  body.kbm-mps-a-route-dashboard :where(.kbm-dashboard-card img,.kbm-life-card img,.kbm-dash-card img){width:104px!important;height:100%!important;min-height:118px!important;object-fit:cover!important}
  body.kbm-mps-a-route-dashboard :where(.kbm-dashboard-card__actions,.kbm-life-card__actions,.kbm-dash-card__actions){grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;padding:8px!important}
  body.kbm-mps-a-route-dashboard :where(.kbm-dashboard-tabs,.kbm-life-tabs,[role="tablist"]){white-space:nowrap!important;scroll-snap-type:x proximity!important}
  body.kbm-mps-a-route-submit :where(.kbm-submit-section,.kbm-submit-step,.kbm-form-section,fieldset){padding:12px!important;border-radius:17px!important}
  body.kbm-mps-a-route-submit :where(.kbm-submit-actions,.kbm-submit-dock,.kbm-final-actions,[data-kbm-final-actions]){bottom:0!important;padding-bottom:calc(10px + var(--kbm-mps-a-safe-bottom))!important}

  /* Single pages: compact facts and stable sticky action clearance. */
  body.kbm-mps-a-active :where(.kbm-facts,.kbm-spec-grid,.kbm-ad-facts,.kbm-driver-facts,.kbm-single-specs){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  body.kbm-mps-a-active :where(.kbm-facts>*,.kbm-spec-grid>*,.kbm-ad-facts>*,.kbm-driver-facts>*,.kbm-single-specs>*){min-width:0!important;padding:9px!important}

  /* Keyboard: hide fixed mobile chrome and release bottom padding. */
  body.kbm-mps-a-active.kbm-mps-a-keyboard-open{padding-bottom:0!important}
  body.kbm-mps-a-active.kbm-mps-a-keyboard-open :where(.kbm-quf-app-bar,.kbm-mobile-bottom-nav){display:none!important}
}

@media(max-width:390px){
  body.kbm-mps-a-route-home .kbm-mlec-categories{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.kbm-mps-a-route-home .kbm-mlec-categories small{display:none!important}
  body.kbm-mps-a-route-home .kbm-mlec-categories>a>b{padding-top:2px!important}
  body.kbm-mps-a-route-home .kbm-b01-steps article{grid-template-columns:92px minmax(0,1fr)!important}
  body.kbm-mps-a-route-home .kbm-b01-steps article>.kbm-visual-picture{width:92px!important;min-height:108px!important}
  body.kbm-mps-a-route-home .kbm-b01-trust{grid-template-columns:92px minmax(0,1fr)!important}
  body.kbm-mps-a-route-home .kbm-b01-trust__copy p{-webkit-line-clamp:2}
  body.kbm-mps-a-route-home .kbm-b01-cta__actions{grid-template-columns:1fr!important}
  body.kbm-mps-a-route-home .kbm-mlec-home-grid>.kbm-ads-recode-card,
  body.kbm-mps-a-route-ads .kbm-ads-recode-card,
  body.kbm-mps-a-route-ads :where(.kbm-adsv2-card,.kbm-ad-card),
  body.kbm-mps-a-route-drivers :where(.kbm-driver-card,.kbm-p13-driver-card),
  body.kbm-mps-a-route-tenders .kbm-tender-card{grid-template-columns:108px minmax(0,1fr)!important}
  body.kbm-mps-a-active :where(.kbm-ads-recode-card-media,.kbm-adsv2-card__media,.kbm-ad-card-media,.kbm-driver-card__media,.kbm-tender-card__media){width:108px!important}
}

@media(orientation:landscape) and (max-height:520px) and (max-width:960px){
  body.kbm-mps-a-active .kbm-mps-a-filter-sheet{max-height:94dvh!important}
}

@media(prefers-reduced-motion:reduce){
  body.kbm-mps-a-active .kbm-mps-a-filter-sheet,
  body.kbm-mps-a-active .kbm-mps-a-filter-backdrop{transition:none!important}
}
