/* Oakmont CRM · 0.1.29-phone (+ 0.1.31-phone2 re-run fixes) · phone-only fixes (CRM Critic phone round, Brent's picks 9:23 AM CT).
   Everything that changes a screen lives inside @media (max-width:760px); the few rules outside it only HIDE the
   new phone-only bits on desktop, so desktop looks exactly as before. Loaded after shell.css on every page. */

/* desktop: phone-only markup stays hidden */
.q .call .ci,.q .cue2,.q .mc2,.q .jamt,.sh-done,.sh-grab,.sh-scrim,.gtitle,.cret{display:none}

@media (max-width:760px){
  /* ---------- 1 · Today rows: name alone on line 1 (up to 2 lines), cue + next step on line 2, Call = 44×44 phone icon ---------- */
  .q{grid-template-columns:28px minmax(0,1fr) 44px 44px;gap:0 8px;align-items:center}
  .q .l1{display:block}
  .q .l1 .cue,.q .l1 .mchip,.q .l1 .pf{display:none}
  .q .l1 .jamt{display:inline;margin-left:6px;font-weight:650;font-variant-numeric:tabular-nums;color:var(--text-1);white-space:nowrap}
  .q .nm{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;line-height:1.25;overflow-wrap:anywhere}
  .q .l2{display:flex;align-items:center;gap:6px;min-width:0;margin-top:3px}
  .q .l2 .cue2{display:inline-flex;flex:none;align-items:center;gap:5px;font-size:12px}
  .q .l2 .mc2{display:inline-flex;flex:none} .q .l2 .mc2:empty{display:none}
  .q .l2 .nx{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* 0.1.31: the next step flows after the cue chip and wraps to a 2nd line (was cut at about 15 characters) */
  .q{padding-top:8px;padding-bottom:8px}
  .q .l2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:18px;overflow-wrap:anywhere}
  .q .l2 .cue2,.q .l2 .mc2{display:inline-flex;vertical-align:1px;margin-right:6px}
  .q .l2 .nx{display:inline;white-space:normal;overflow:visible}
  .q .call{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border-radius:var(--r-btn);display:inline-flex;align-items:center;justify-content:center}
  .q .call .ct{display:none}
  .q .call .ci{display:block;width:20px;height:20px}
  .q .call.ghost{width:auto;border-radius:var(--r-btn);padding:0 10px} .q .call.ghost .ct{display:inline}
  .q .call.practice{width:auto;min-width:78px;padding:0 8px}
  .q .call.practice .ct{display:inline;font-size:12px;font-weight:700}
  .q .call.practice .ci{display:none}
  .logtop{position:sticky;top:0;z-index:2;background:var(--glass-solid,var(--bg-1))}
  .sp .logtop{top:44px}
  .q .more{width:44px;height:44px}

  /* ---------- 2 · the row sheet is a real bottom sheet: handle, swipe down, scrim, medium detent, Done at the bottom ---------- */
  .sp{inset:auto 0 0 0;top:auto;height:var(--sh-h,74dvh);max-height:100dvh;border-radius:var(--r-sheet) var(--r-sheet) 0 0;
    padding:0 16px 0;overscroll-behavior:contain;box-shadow:0 -12px 40px -10px rgba(0,0,0,.55);transition:height .24s var(--ease-out),transform .24s var(--ease-out);
    bottom:calc(66px + env(safe-area-inset-bottom))}
  .sp.sh-full{--sh-h:calc(100dvh - 66px - env(safe-area-inset-bottom) - max(10px,env(safe-area-inset-top)))}
  .sp.sh-drag{transition:none}
  .sp .sh-grab{display:flex;position:sticky;top:0;z-index:3;margin:0 -16px;height:44px;align-items:center;justify-content:center;background:var(--glass-solid);touch-action:none;cursor:grab}
  .sp .sh-grab::before{content:"";width:40px;height:5px;border-radius:var(--r-pill);background:var(--border-input)}
  .sp .top1{padding-top:0}
  .sp .top1 .x{display:none} /* close is Done (bottom), the scrim, a swipe down or Escape */
  .sh-scrim{display:block;position:fixed;inset:0;z-index:54;background:var(--backdrop);animation:shfade .2s var(--ease-out)}
  @keyframes shfade{from{opacity:0}}
  .sp .foot{padding:10px 16px calc(12px + env(safe-area-inset-bottom))}
  .sp .foot .sh-done{display:flex;align-items:center;justify-content:center;min-width:72px;min-height:46px;padding:0 14px;border-radius:var(--r-md);border:1px solid var(--border-input);background:var(--bg-2);color:var(--text-1);font:inherit;font-weight:650;cursor:pointer}
  .sp .cret{display:block;margin:8px 0 2px;padding:10px 12px;border-radius:var(--r-md);border:1px solid var(--accent-line);background:var(--accent-tint)}
  .sp .cret b{display:block;font-size:15px;color:var(--text-1)} .sp .cret span{font-size:12.5px;color:var(--text-2)}
  .sp .offl{margin-top:8px}
  /* 0.1.32: a shorter "Mark Lost?" card (question on one line, the two buttons under it) */
  .sp .lostp{gap:6px 8px;padding:8px 10px;margin-top:8px}
  .sp .lostp div{flex-basis:100%}
  .sp .lostp div span{display:none}
  .sp .lostp .sbtn{flex:1}
  .sp .picked.inl-u{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;min-height:0;margin-top:8px;padding:0 4px 0 10px;border-radius:var(--r-md);background:var(--bg-2);border:1px solid var(--border-2);font-size:13.5px;color:var(--text-1)}
  .sp .picked.inl-u > span{flex:1;min-width:0}
  .sp .picked.inl-u .lnk{flex:none;min-height:44px;min-width:44px;justify-content:center;padding:0 6px;display:inline-flex;align-items:center;margin-left:auto;font-weight:650}

  /* ---------- 4 · keyboard: the field + its Save stay above the keyboard; the Call bar, toast and tab bar step aside ---------- */
  html.kb-open .sp .foot,html.kb-open .toast,html.kb-open .tabbar{display:none!important}
  html.kb-open .sp{--sh-h:var(--vvh,100dvh);bottom:var(--kb,0px);border-radius:0}
  html.kb-open .sp .sh-grab{display:none}
  .lsh-card{max-height:min(92dvh,var(--vvh,100dvh))}
  html.kb-open .lsheet{top:auto;height:var(--vvh,100dvh);bottom:var(--kb,0px)}
  .lsh-card .shbtns{position:sticky;bottom:-22px;z-index:2;margin:0 -16px -22px;padding:10px 16px calc(14px + env(safe-area-inset-bottom));background:var(--glass-solid);border-top:1px solid var(--border-2)}
  .sp .nadd .nrow{position:sticky;bottom:0;z-index:2;background:var(--glass-solid);padding:6px 0}
  .dlg{max-height:100dvh}

  /* ---------- 5 · no iPhone zoom: every text field is 16px ---------- */
  input[type=text],input[type=email],input[type=tel],input[type=search],input[type=number],input[type=date],input[type=time],input:not([type]),textarea,select,
  .amt input,.au-f input,.lsh-card textarea,.nadd textarea,.cmp textarea{font-size:16px}

  /* ---------- 6 · lighter glass: solid surfaces on phone, only the tab bar keeps its blur ---------- */
  .gnav,.sp,.sp .foot,.toast,.omenu,.umenu,.sres,.dlg,.dlg-f,.lsh-card,.bch,.bghost{background:var(--glass-solid);-webkit-backdrop-filter:none;backdrop-filter:none}

  /* ---------- 7 · smaller Today header: title collapses into the top bar on scroll, one chip row, Practice copy = a dot ---------- */
  .gnav{padding-top:env(safe-area-inset-top);height:calc(56px + env(safe-area-inset-top))}
  .gtitle{display:block;position:absolute;left:64px;right:112px;bottom:0;height:56px;line-height:56px;text-align:center;font-weight:680;font-size:16px;letter-spacing:-.01em;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transform:translateY(6px);transition:opacity .18s var(--ease-out),transform .18s var(--ease-out);pointer-events:none}
  html.hd-min .gtitle{opacity:1;transform:none}
  .today-pg .page{padding-top:2px}
  .today-pg .phead{flex-direction:row;align-items:baseline;gap:8px;flex-wrap:nowrap}
  .today-pg .phead > div:first-child{display:flex;align-items:baseline;gap:8px;min-width:0;flex-wrap:nowrap}
  .today-pg .phead h1{font-size:22px;line-height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .today-pg .phead h1 .ctx{font-size:13px}
  .today-pg .ds{flex:none;margin:0;font-size:0;gap:0}
  .today-pg .ds > :not(.dsw){display:none}
  .today-pg .ds .dsw{font-size:0;padding:0;border:0;background:none;width:12px;height:12px;display:inline-flex;align-items:center;justify-content:center}
  .today-pg .ds .dsw i{margin:0}
  .today-pg .ds .dse,.today-pg .ds .dse ~ .lnk{font-size:12px;width:auto;height:auto;padding:1px 8px;border:1px solid var(--danger);background:var(--danger-tint)}
  .today-pg .ds .dse ~ .lnk{display:inline-flex;border:0;background:none}
  .chiprow{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:6px -14px 0;padding:0 14px 2px;scroll-snap-type:x proximity}
  .chiprow::-webkit-scrollbar{display:none}
  .chiprow .seg,.chiprow .vt{display:flex;flex:none;gap:6px;width:auto;margin:0;padding:0;background:none;border:0;box-shadow:none}
  .chiprow .seg button,.chiprow .vt button{flex:none;min-height:44px;padding:0 13px;border-radius:var(--r-pill);border:1px solid var(--border-2);background:var(--bg-1);color:var(--text-2);font-size:14px;font-weight:650;white-space:nowrap;scroll-snap-align:start}
  .chiprow .seg button::after,.chiprow .vt button::after{content:none!important}
  .chiprow .seg button[aria-selected="true"],.chiprow .vt button[aria-selected="true"]{color:var(--text-1);border-color:var(--accent-line);background:var(--accent-tint)}
  .chiprow .sep-dot{flex:none;align-self:center;width:1px;height:22px;background:var(--border-2)}
  .today-pg .qsec{margin-top:8px}
  .today-pg .qsec:first-of-type{margin-top:4px}
  .today-pg .qsec-h{margin:0 2px 4px;min-height:0;line-height:18px}

  /* ---------- extras: safe areas, tab bar everywhere, text floor ---------- */
  .tabbar{height:calc(66px + env(safe-area-inset-bottom));padding-bottom:calc(6px + env(safe-area-inset-bottom))}
  .toast{bottom:calc(78px + env(safe-area-inset-bottom))}
  .omenu,.umenu{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  .has-tabbar main{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .tabbar .nbp{font-size:11px}
  .qsec-h h2{font-size:13px}
  .umenu .h,.umenu button:disabled small,.q .cue,.pf,.pcue,.sp .k,.atc button small,.note small,.svs,.logc button small,.chip small,.soonb,.tl li small,.omenu .mcap,
  .leadpg .k,.fact span,.tab .soon,.kv span,.dup .cap,.atag,.lsh-card .shk,.hnote .hk,.hnote small,.handed .hcue,.hgrp summary,.ptag,.tlcap,.mchip,.daydiv,.newdiv,
  .msg .mact button,.mr3,.bod,.umenu a small,.bch h2,.bch small,.bwip,.bfold span,.bcard .cue,.bcard .b3 .mxt,.bcard .b3 small,.bcard.handed .hcue,
  .ptile span,.ptile em,.ttag,.tnote,.tb .tbl,.au-role{font-size:12px}
  body .ac-tag,body .ac-sec h2,body .au-role,body .au-out small{font-size:12px} /* 0.1.31: Accounts had 10.5–11.5 px (auth.css loads after this file) */
  .tabbar .tb,.tabbar button.tb{font-size:11px;font-weight:600;line-height:normal} /* tab labels: 11px under 21px icons (buttons used to inherit 14px) */
}
@media (max-width:760px) and (prefers-reduced-motion:reduce){ .sp,.gtitle{transition:none} .sh-scrim{animation:none} }

/* 0.1.43.2-mobile · 360–430px. Jobs and Boards are separate tabs. No sideways page scroll.
   Neon stays loud (colored edges, gold buttons) but the multi-layer tube glow and backdrop blur
   come off on a phone so a list can scroll. Body copy stays flat. Calm and reduced motion are untouched. */
@media (max-width:760px){
  html,body{overflow-x:clip;max-width:100%}
  .page,.mpage,main,.gnav,.phead,.su-grid,.su-preview,.sales-box{max-width:100%;min-width:0}
  .tabbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;max-width:100%;overflow:hidden;
    -webkit-backdrop-filter:none;backdrop-filter:none;background:var(--glass-solid,var(--bg-1))}
  .tabbar .tb,.tabbar button.tb{min-width:0;min-height:44px;max-width:100%;padding:2px 1px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tabbar .tnew .pl{width:36px;height:28px}
  .seg a,.jhead-r .sbtn,.fchips .chip,.sales-box input,.sales-box select,.sales-box .sbtn,.su-invite input,.su-invite select,
  .su-edit input,.su-edit select,.su-wf input,.su-wf select,.su-wf .su-acts button,.su-sales input,.ostep-add input,.su-check{min-height:44px}
  .jhead-r{flex-wrap:wrap}
  .jhead-r .sbtn{white-space:normal}
  .fchips,.bctabs,.chiprow{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .fchips::-webkit-scrollbar,.bctabs::-webkit-scrollbar{display:none}
  .cta{flex-wrap:wrap}
  .call.big{min-width:0;flex:1 1 140px;overflow-wrap:anywhere}
  .split.has-panel,.bsplit.has-panel,.lgrid,.lgrid.mview,.mpage{grid-template-columns:minmax(0,1fr)}
  .bcol,[data-theme="neon"] .bcol{flex:0 0 100%;width:100%;max-width:100%}
  .board{max-width:100%}
  .su-grid,.su-row,.su-wf li,.su-sales form{grid-template-columns:1fr}
  .su-sales form .su-note{grid-column:auto}
  .setup-h,.su-grid,.su-preview{padding-left:14px;padding-right:14px}
  .su-invite input,.su-edit input,.su-edit select,.su-wf input,.su-sales input,.sales-box input,.sales-box select{width:100%;max-width:100%;box-sizing:border-box}
  .seg{overflow-x:auto;max-width:100%;min-width:0;flex:1 1 auto;-webkit-overflow-scrolling:touch}
  .seg button{flex:0 0 auto;min-height:44px}
  .su-add-wf,.su-wf > label{width:100%;max-width:100%}
  .su-add-wf input,.su-add-wf select,.su-wf select,.su-wf-head .sbtn{width:100%;min-height:44px;box-sizing:border-box}
  .pv,.leadpg .pv,.sp .pv,.state p,.setup-h p,.ac-sub,.su-note,.tile span,.sales-box .sl,.sales-ok,.bempty,.pnote{font-size:14px;line-height:1.4}
  [data-theme="neon"]{--glass-backdrop:none;--glass-backdrop-dense:none;
    --tube-card:inset 0 0 0 1px rgb(255 255 255 / .7),0 0 0 1px #2fe3ff;
    --tube-card-hover:0 0 0 1px #bff9ff;
    --tube-col:0 0 0 1px #ffcc55;
    --tube-nav:inset 0 -2px 0 #ffcc55;
    --tube-tab:inset 0 2px 0 #2fe3ff;
    --tube-panel:0 0 0 1px #2fe3ff;
    --tube-btn:0 0 0 1px #fff6cc,0 0 8px rgb(255 197 61 / .75);
    --tube-btn-hover:0 0 0 1px #fff,0 0 10px rgb(255 197 61 / .85);
    --tube-ghost:0 0 0 1px #7ae7ff;
    --tube-ghost-hover:0 0 0 1px #e8fbff}
  [data-theme="neon"] :is(.gnav,.tabbar,.su-card,.su-preview,.sales-box,.ctx-note,.cln-bar,.bch){
    -webkit-backdrop-filter:none;backdrop-filter:none}
  [data-theme="neon"] :is(.gnav,.tabbar){background:var(--glass-solid)}
  [data-theme="neon"] :is(p,.pv,.b2,.l2,.meta,.bcard .nm,.msg .bub,h1 .ctx,.state p,.setup-h p,.su-note,.ac-sub){text-shadow:none}
  .su-tabs{padding-left:14px;padding-right:14px}
  .su-tabs .seg.su-seg{flex-wrap:wrap;overflow:visible;width:100%}
  .su-tabs .seg.su-seg button{flex:1 1 30%;padding:0 8px}
  .su-boards .su-hop{grid-template-columns:1fr}
  .su-add-sub{flex-direction:column;align-items:stretch}
  .su-add-sub .sbtn,.su-boards .su-add-sub .sbtn{width:100%}
  .su-path{max-width:100%}
}
