/* t687: site-wide phone pass (iPhone 375–430). Loaded last on every page. Layout and tap sizes only; same look.
   Rules: no sideways page scroll, ≥44px tap targets, 16px inputs (no iOS zoom), wide tables scroll inside their card
   with an edge fade, bottom bars clear the home indicator. */

/* Bottom bars and toasts sit above the iPhone home indicator / Safari toolbar (0 when there is no inset). */
/* Same offsets as style-b.css / common.css, plus the inset. */
.B .gobar{padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))}
.B .repfloat{bottom:calc(20px + env(safe-area-inset-bottom,0px));right:calc(20px + env(safe-area-inset-right,0px))}
.toast{bottom:calc(20px + env(safe-area-inset-bottom,0px))}
body.B.has-gobar .toast{bottom:calc(112px + env(safe-area-inset-bottom,0px))}
@media (max-width:640px){.B .gobar{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}}
@media (max-width:600px){.B .repfloat{bottom:calc(12px + env(safe-area-inset-bottom,0px));right:calc(12px + env(safe-area-inset-right,0px))}}

/* Number inputs never show spinner arrows (every page, every browser). */
input[type=number]{-moz-appearance:textfield;appearance:textfield}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}

/* Wide tables: swipe inside the card, momentum scroll, and fade the edge that has more columns (mobile.js sets mx-l/mx-r). */
.twrap,.la-scroll,.vc-wrap,.lhsr-wrap,.ew-tw,.mx-scroll,.tw{-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
@media (max-width:760px){
.mx-r{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),rgba(0,0,0,.35));mask-image:linear-gradient(to right,#000 calc(100% - 28px),rgba(0,0,0,.35))}
.mx-l{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - 28px),rgba(0,0,0,.35));mask-image:linear-gradient(to left,#000 calc(100% - 28px),rgba(0,0,0,.35))}
.mx-l.mx-r{-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,.35),#000 28px,#000 calc(100% - 28px),rgba(0,0,0,.35));mask-image:linear-gradient(to right,rgba(0,0,0,.35),#000 28px,#000 calc(100% - 28px),rgba(0,0,0,.35))}
}

@media (max-width:760px){
  @supports (overflow:clip){html,body{overflow-x:clip}}  /* clip, not hidden: keeps sticky headers working in Safari */
  input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{font-size:16px!important}

  /* Method & sources adjustment grid had no scroll box and pushed past the card */
  .ms-m .ew-grid{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

  /* Comparable farms rows are tap targets (they open the sale) */
  .B .cf-table tbody tr.cf-row{height:44px}

  /* Expandable "Details" rows */
  .B .xp>summary{min-height:44px;align-items:center}

  /* Header account pill / login */
  .acct-l,.B .acct-l{min-height:44px}
  .am .acct-b,.acct-b,.B .acct-b{min-height:44px;min-width:44px;justify-content:center}

  /* Source chips (yield, corn price, cash rent) and small pills */
  .B .src-chip{min-height:44px;justify-content:center}
  .assume-btn{height:auto;min-height:44px}
  .B .g-adj-btn{min-height:44px}
  .cp5-picks button{min-height:44px}
  .pwx-go{min-height:48px}

  /* Compact controls keep their look; the tap area grows around them */
  .tgt-gear,.cmap .legend .near-tog,.B .scatter-leg .near-tog{position:relative}
  .tgt-gear::after{content:"";position:absolute;left:-4px;right:-4px;top:-9px;bottom:-9px}
  .cmap .legend .near-tog::after,.B .scatter-leg .near-tog::after{content:"";position:absolute;left:-6px;right:-6px;top:-15px;bottom:-15px}

  /* Footer / legal links: one per tap */
  .lg-links a,.disc-links a,.foot a,.ftr a,footer a{display:inline-flex;align-items:center;min-height:44px}
  .px-tog button,.px-step button,.px-card .btn{min-height:44px}

  /* Terms / Privacy table of contents */
  .lg-toc a,.toc a,nav.toc a,.legal nav a{display:inline-flex;align-items:center;min-height:44px}

  /* My evaluations */
  .eh-rt{min-height:44px}
  .eh-item .btn,.eh-item button,.eh-item a[data-reopen]{min-height:44px}

  /* Value change calculator: quick ranges and date fields */
  .chg-quick button{min-height:44px;min-width:44px}
  input[data-chg]{min-height:44px}

  /* Method & sources: (i) buttons and method links keep their size; the tap area grows */
  .ew .ew-i{position:relative}
  .ew .ew-i::after{content:"";position:absolute;inset:-13px}
  .ew [data-ewgo]{position:relative}
  .ew [data-ewgo]::after{content:"";position:absolute;left:0;right:0;top:-14px;bottom:-14px}

  /* Use-this-sale checkboxes: the whole 44px box toggles */
  .cpick{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}

  /* Paywall / gate */
  .pwx-jn a{display:inline-flex;align-items:center;min-height:44px}
  .gc-alt .lnk{display:inline-flex;align-items:center;min-height:44px}

  /* Home: header logo and the data-source logos */
  .lh-logo{display:flex;align-items:center;min-height:44px}
  .st .st-lg{height:44px}

  /* Admin side nav (pills on phones) */
  #sidebar-nav .nav-item{min-height:44px}
}

/* Picker map: the MapLibre attribution starts folded on phones so it doesn't cover the map */
@media (max-width:760px){
  .maplibregl-ctrl-attrib.maplibregl-compact{min-height:24px}
  /* the app-wide 44px summary rule stretched MapLibre's (i) toggle and its icon tiled twice */
  .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button{min-height:24px;height:24px;background-repeat:no-repeat;background-position:center}
}
