/* KBM Core 1.9.17 — Mobile Scale & Density Authority 2027
 * Goal: mobile-native readability without browser zoom/transform hacks.
 * Scope: public frontend <= 767px only. Desktop remains unchanged.
 */
@media (max-width:767px){
  html{font-size:16px!important;-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}
  body.kbm-theme-core.kbm-mobile-scale-2027{
    --kbm-mobile-body:15px;
    --kbm-mobile-small:12.5px;
    --kbm-mobile-label:14px;
    --kbm-mobile-control:16px;
    --kbm-mobile-card-title:16px;
    --kbm-mobile-section-title:22px;
    --kbm-mobile-hero-title:29px;
    --kbm-mobile-gutter:14px;
    --kbm-mobile-gap:14px;
    --kbm-mobile-touch:48px;
    font-size:var(--kbm-mobile-body)!important;
    line-height:1.85!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.entry-content,.page-content,.kbm-theme-content,.kbm-theme-container,.kbm-shell,.kbm-page,.kbm-screen-shell){
    font-size:var(--kbm-mobile-body)!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(h1,.kbm-hero h1,.kbm-screen-hero h1,.kbm-submit-vh-copy h1){
    font-size:clamp(26px,7.2vw,var(--kbm-mobile-hero-title))!important;line-height:1.55!important;letter-spacing:-.02em!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(h2,.kbm-section-title,.kbm-ui-title,.kbm-card-section-title){
    font-size:clamp(20px,5.6vw,var(--kbm-mobile-section-title))!important;line-height:1.6!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(h3,.kbm-card-title,.kbm-card165__title,.kbm-card h3,.kbm-card h2){
    font-size:var(--kbm-mobile-card-title)!important;line-height:1.7!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(p,li,dd,dt){font-size:max(14px,1em);}
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(small,.kbm-muted,.kbm-help,.kbm-hint,.kbm-field-help,.kbm-field-note,.description){
    font-size:var(--kbm-mobile-small)!important;line-height:1.75!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(label,.kbm-label,.kbm-field-label,legend){
    font-size:var(--kbm-mobile-label)!important;line-height:1.7!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
    min-height:48px!important;font-size:var(--kbm-mobile-control)!important;line-height:1.55!important;border-radius:13px!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 textarea{min-height:112px!important;}
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(button,.button,.kbm-btn,[role="button"]){
    min-height:44px;font-size:15px;line-height:1.45;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-primary-btn,.kbm-submit-btn,button[type="submit"],input[type="submit"]){
    min-height:50px!important;font-size:15.5px!important;font-weight:900!important;
  }

  /* Normalize frequently tiny marketplace metadata/badges. */
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(
    .kbm-card165__badges>span,.kbm-card165__category,.kbm-card165__expired,.kbm-card165__chip,
    .kbm-card165__rating,.kbm-card165__rating small,.kbm-card165__favorite>b,
    .kbm-sp2002-trustchip,.kbm-sp2002-leadtrust__eyebrow,.kbm-sp2002-leadtrust__fresh small,
    .kbm-sp2002-safe-link,.kbm-sp2002-report__head span,.kbm-sp2002-report__notice,
    .kbm-machine-sale-recode-similar__head span,.kbm-c30-favorite-card__kind,.kbm-c30-favorite-card__meta span,
    .kbm-prod98-card__meta span,.kbm-psu70-type,.kbm-rental-recode-social-flag
  ){
    font-size:12.5px!important;line-height:1.55!important;
  }

  /* Home: reduce desktop-like density and improve section rhythm. */
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-sch21-home,.kbm-home-shell,.kbm-sch27-home,.kbm-home-marketplace){
    --kbm-home-mobile-gap:16px;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-sch21-home,.kbm-home-shell,.kbm-sch27-home,.kbm-home-marketplace) :where(section,.kbm-home-section){
    margin-block:18px!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-home-route-card,.kbm-route-card,.kbm-home-card){
    min-height:68px!important;padding:12px 14px!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-home-route-card strong,.kbm-route-card strong,.kbm-home-card strong){font-size:15px!important;}
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-home-route-card small,.kbm-route-card small,.kbm-home-card small){font-size:12.5px!important;}

  /* Archive/filter readability. */
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-filter-panel,.kbm-filter-pro-sheet,.kbm-filters,.kbm-archive-filters,.kbm-adsv2-filters,.kbm-provider-filters,.kbm-driver-filters,.kbm-tender-filters){
    font-size:14px!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-filter-panel,.kbm-filter-pro-sheet,.kbm-filters,.kbm-archive-filters,.kbm-adsv2-filters,.kbm-provider-filters,.kbm-driver-filters,.kbm-tender-filters) :where(label,strong,b){
    font-size:14px!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-filter-chip,.kbm-active-filter,.kbm-chip){font-size:12.5px!important;min-height:34px!important;}

  /* Submit forms: mobile-native field rhythm. */
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-rental-rebuild,.kbm-sale-form,.kbm-p23r-form,.kbm-submit-form,.kbm-form-shell,.kbm-driver-submit,.kbm-contractor-submit){
    font-size:15px!important;
  }
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-rental-card,.kbm-rental-step,.kbm-sale-field,.kbm-p23r-card,.kbm-form-card,.kbm-submit-section){
    padding:16px!important;
  }

  /* Dashboard and single pages. */
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-dashboard,.kbm-dashboard-wrap,.kbm-life-wrap,.kbm-single-shell,.kbm-single-page){font-size:15px!important;}
  body.kbm-theme-core.kbm-mobile-scale-2027 :where(.kbm-dashboard-tabs a,.kbm-dashboard-tabs button,.kbm-life-tabs a,.kbm-life-tabs button){font-size:13px!important;min-height:44px!important;}

  /* Maintain compactness on very small screens without returning to microcopy. */
  @media (max-width:359px){
    body.kbm-theme-core.kbm-mobile-scale-2027{--kbm-mobile-body:14.5px;--kbm-mobile-label:13.5px;--kbm-mobile-card-title:15px;--kbm-mobile-section-title:20px;--kbm-mobile-hero-title:27px;--kbm-mobile-gutter:12px;}
  }
}
