/* DSJM Advisory: phone layout (loaded last on every page).
   Goal: a shorter scroll. Long stacks become swipeable rows, spacing tightens, the footer compacts. */
@media (max-width:699px){
  :root{--sec:56px}

  /* ---------- Swipe rows (peek of the next card signals more) ---------- */
  .qx-life,.qx-indgrid,.qx-markets,.qx-cards{
    display:grid;grid-auto-flow:column;grid-auto-columns:84%;grid-template-columns:none;gap:12px;
    overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;
    margin-right:calc(var(--pad) * -1);padding-right:var(--pad);border-top:0
  }
  .qx-life::-webkit-scrollbar,.qx-indgrid::-webkit-scrollbar,.qx-markets::-webkit-scrollbar,.qx-cards::-webkit-scrollbar{display:none}
  .qx-life>*,.qx-indgrid>*,.qx-markets>*,.qx-cards>*{scroll-snap-align:start}

  /* Cards become boxed tiles inside a row */
  .qx-cards{margin-top:28px}
  .qx-card{padding:22px 20px;border:1px solid var(--line);background:#fff}
  .qx-cream .qx-card{background:#fffdf9}
  .qx-navy .qx-card{background:transparent;border-color:rgba(255,255,255,.16)}
  .qx-card h3{font-size:18px;margin-bottom:8px}
  .qx-card p{font-size:15px;line-height:1.55}

  /* Homepage lifecycle stages */
  .qx-life{margin-top:32px}
  .qx-stage,.qx-stage:nth-child(n){padding:22px 20px;border:1px solid var(--line)}
  .qx-stage h3{font-size:22px}
  .qx-stage p{font-size:15px;margin-bottom:14px}
  .qx-stage ul{margin-bottom:16px}
  .qx-stage li{padding:7px 0;font-size:14px}

  /* Industry tiles */
  .qx-indgrid{margin-top:32px}
  .qx-ind,.qx-ind:nth-child(n){padding:0 0 20px;text-align:left;border:1px solid rgba(255,255,255,.14)}
  .qx-ind-img{max-width:none;margin:0 0 16px}
  .qx-ind h3{margin:0 18px 8px;font-size:21px}
  .qx-ind p{margin:0 18px;max-width:none;font-size:14px}

  /* Coverage: markets row */
  .qx-markets{margin-top:36px;padding-top:28px;border-top:1px solid rgba(255,255,255,.12)}
  .qx-markets>div{padding:20px;border:1px solid rgba(255,255,255,.14)}
  .qx-mapgrid{gap:24px;margin-top:20px}
  /* the interactive map is too small to use on a phone; the state/province counts carry the point */
  .qx-map,.qx-tabs{display:none}
  .qx-bigstats{gap:20px}
  .qx-big strong{font-size:52px}
  .qx-big span{font-size:14px;margin-top:10px}

  /* ---------- Homepage blocks ---------- */
  .qx-intro-top{gap:24px;padding-bottom:40px}
  .qx-intro-copy p{font-size:16px}
  .qx-intro-copy .qx-facts-h{margin-top:22px}
  /* Four practice photos: 2 x 2 instead of four full-width bands */
  .qx-cols{display:grid;grid-template-columns:1fr 1fr}
  .qx-col{height:150px;border-top:1px solid rgba(255,255,255,.08)}
  .qx-col:nth-child(even){border-left:1px solid rgba(255,255,255,.08)}
  .qx-col h3{left:14px;top:14px;right:14px;font-size:20px;line-height:1.05}
  .qx-col p{left:14px;right:14px;bottom:12px;font-size:12.5px;line-height:1.35}
  .qx-col .qx-circ{display:none}
  .qx-col:last-child:nth-child(odd){grid-column:1/-1;border-left:0}

  .qx-pstep{padding:18px 0 18px 40px}
  .qx-pstep>span{top:22px}
  .qx-pstep h3{font-size:19px;margin-bottom:6px}
  .qx-pstep p{font-size:15px;line-height:1.55}

  .qx-tombs{margin-top:32px}
  .qx-tomb h3{margin-top:24px;font-size:22px}

  .qx-checks{margin:20px 0 24px}
  .qx-checks li{padding:10px 0 10px 26px;font-size:14px}
  .qx-checks li::before{top:16px}

  .qx-person{gap:20px}
  .qx-person-media{max-width:150px}
  .qx-person-txt .qx-light{margin-bottom:16px}
  .qx-person-txt p{font-size:16px}

  .qx-std{gap:20px}
  .qx-stdlist li{padding:14px 0;font-size:15px}
  .qx-stdlist b{font-size:16px}

  .qx-faqgrid{gap:16px}
  .qx-faq summary{padding:15px 32px 15px 0;font-size:16.5px}
  .qx-faq summary::after{top:21px;width:8px;height:8px}
  .qx-faq details[open] summary::after{top:25px}
  .qx-faq .a{padding-bottom:18px}
  .qx-faq .a p{font-size:15px}

  .qx-cta p{font-size:16px;margin-top:16px}

  /* ---------- Inner pages ---------- */
  .qx-phero{min-height:min(62vh,500px);padding:112px 0 36px}
  .qx-phero--plain{min-height:0;padding:112px 0 40px}
  .qx-phero h1{font-size:clamp(32px,9vw,40px)}
  .qx-phero .qx-plede{margin-top:16px;font-size:16px;line-height:1.55}
  .qx-phero .qx-actions{margin-top:22px}
  .qx-answer{gap:12px;padding:36px 0}
  .qx-answer p{font-size:18px;line-height:1.5}
  .qx-split{gap:14px}
  .qx-split .qx-body>p{font-size:16px;line-height:1.6;margin-bottom:12px}
  .qx-steps{margin-top:24px}
  .qx-steps li{padding:16px 0;gap:4px}
  .qx-steps h3{font-size:17px}
  .qx-steps p{font-size:15px;line-height:1.55}
  .qx-related{margin-top:24px}
  .qx-related a{padding:14px 0;font-size:16px}
  .qx-posts{margin-top:24px}
  .qx-post{padding:18px 0;gap:6px}
  .qx-post h3{font-size:19px}
  .qx-post p{font-size:15px}
  .qx-prose ul.qx-check li{margin-bottom:6px}

  /* ---------- Footer ---------- */
  .qx-footer{padding:44px 0 24px;font-size:14px}
  .qx-fgrid{grid-template-columns:1fr 1fr;gap:28px 20px;padding-bottom:28px}
  .qx-fbrand{grid-column:1/-1}
  .qx-fbrand p{margin:0 0 10px}
  .qx-fgrid nav{gap:8px}
  .qx-fgrid nav:last-of-type{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px 20px}
  .qx-fgrid nav:last-of-type .qx-fh{grid-column:1/-1}
  .qx-legal{padding:20px 0;font-size:11.5px;line-height:1.55}
  .qx-legal p{margin-bottom:8px}
}
