/* Xagent home, phone layout (19 Oct 2026, Summer). Loaded on the home document (body.m-v2.home).
   EVERY rule sits inside max-width:640px, so tablets and desktop are unchanged.
   Source uses body.m-v2.home (body) and body.m-v2.home main[data-pg="home"] (home main) tokens, expanded by build.py. */
@media (max-width:640px){

  /* ---- type: no grey text, 16px floor ---- */
  body.m-v2.home{--body:#2F2B27;--faint:#4B453E;font-size:16px;}
  body.m-v2.home .wrap{padding:0 20px;}

  /* ---- top bar: one line each, logo unchanged ---- */
  body.m-v2.home nav .navrow{height:64px;gap:12px;justify-content:space-between;}
  body.m-v2.home .logo{flex:none;}
  body.m-v2.home .navcta{gap:14px;flex:none;}
  body.m-v2.home .signin{white-space:nowrap;font-size:15px;}
  body.m-v2.home .navcta .pill{white-space:nowrap;padding:10px 16px;font-size:15px;}

  @media (max-width:350px){body.m-v2.home .navcta{gap:10px;}body.m-v2.home .signin{font-size:14px;}body.m-v2.home .navcta .pill{padding:10px 12px;font-size:14px;}body.m-v2.home nav .navrow{gap:8px;}}

  /* ---- hero: left aligned, full-width buttons ---- */
  body.m-v2.home main[data-pg="home"] .hero{padding:28px 0 0;text-align:left;}
  body.m-v2.home main[data-pg="home"] .hero h1{font-size:38px;line-height:1.06;margin:0 0 16px;}
  body.m-v2.home main[data-pg="home"] .hero .lede{font-size:17px;line-height:1.5;color:var(--body);margin:0 0 24px;max-width:none;}
  body.m-v2.home main[data-pg="home"] .cta-row{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:10px;}
  body.m-v2.home main[data-pg="home"] .cta-row .pill{justify-content:center;height:52px;padding:0 20px;font-size:16px;}
  body.m-v2.home main[data-pg="home"] .cta-row .pill-dark{background:var(--blue);color:#fff;}
  body.m-v2.home main[data-pg="home"] .cta-row .pill-ghost{background:#fff;border:1.5px solid var(--blue);color:var(--blue);}

  /* proof under the buttons: big colour logos on white tiles */
  body.m-v2.home main[data-pg="home"] .hero .logos{padding:28px 0 0;border-top:0;}
  body.m-v2.home main[data-pg="home"] .logos .klabel{text-align:left;font-size:13px;line-height:1.4;color:var(--blue);margin-bottom:12px;}
  body.m-v2.home main[data-pg="home"] .logos .marquee{overflow:visible;-webkit-mask:none;mask:none;}
  body.m-v2.home main[data-pg="home"] .track-logos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:auto;animation:none;transform:none;}
  body.m-v2.home main[data-pg="home"] .track-logos .lg[aria-hidden],
  body.m-v2.home main[data-pg="home"] .track-logos .lg:nth-child(n+9){display:none;}
  body.m-v2.home main[data-pg="home"] .lg{background:#fff;border:1px solid var(--line);border-radius:10px;height:56px;justify-content:center;padding:0 8px;min-width:0;}
  body.m-v2.home main[data-pg="home"] .track-logos .lg:nth-child(8){grid-column:span 2;}
  body.m-v2.home main[data-pg="home"] .lg img{filter:none;opacity:1;max-width:100%;object-fit:contain;}

  /* ---- product demo: replaced by a swipe row of the five team cards (existing lines + DONE) ---- */
  body.m-v2.home main[data-pg="home"] .ticker-zone{display:none;}
  body.m-v2.home main[data-pg="home"] .prodash{margin:28px 0 0;padding:0 20px;}
  body.m-v2.home main[data-pg="home"] .prodash .pd{display:none;}
  body.m-v2.home main[data-pg="home"] .prodash .sctabs{margin:0;}
  body.m-v2.home main[data-pg="home"] .sctabs.m-swipe{margin:0 -20px;padding:0 20px 6px;}
  body.m-v2.home main[data-pg="home"] .sctabs.m-swipe .sctab{flex:0 0 78%;pointer-events:none;background:#fff;border:1px solid var(--line-cool);border-radius:12px;padding:16px 16px 14px;min-width:0;}
  body.m-v2.home main[data-pg="home"] .sctab b{font-size:21px;line-height:1.2;color:var(--blue);margin-bottom:4px;}
  body.m-v2.home main[data-pg="home"] .sctab span{display:block;font-size:16px;line-height:1.4;color:var(--ink);}
  body.m-v2.home main[data-pg="home"] .sctab.on{background:#fff;border-color:var(--line-cool);}
  body.m-v2.home main[data-pg="home"] .sctab::after{content:"\2713  DONE";display:inline-block;margin-top:12px;font:700 12px/1 "Inter",sans-serif;letter-spacing:.1em;color:var(--blue);background:var(--chip);border-radius:999px;padding:6px 10px;}

  /* ---- sections: colour blocks, not hairlines ---- */
  body.m-v2.home main[data-pg="home"]>section{padding:36px 0;border:0;}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(1){background:#fff;}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(2){background:var(--cream);}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(4){background:#fff;}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(5){background:var(--blue);}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(6){background:var(--cream);}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(7){background:#fff;}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(8){background:var(--cream);}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(1) .card,
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(4) .card,
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(7) .card{background:var(--cream);}
  body.m-v2.home main[data-pg="home"] .h2{font-size:30px;line-height:1.1;margin:0 0 12px;text-align:left;}
  body.m-v2.home main[data-pg="home"] .lede{font-size:17px;line-height:1.5;color:var(--body);max-width:none;}
  body.m-v2.home main[data-pg="home"] [data-reveal][style*="text-align:center"]{text-align:left !important;}
  body.m-v2.home main[data-pg="home"] .klabel{color:var(--blue);}

  /* ---- buttons placed between sections ---- */
  body.m-v2.home main[data-pg="home"] .m-cta{display:flex;flex-direction:column;gap:10px;margin-top:28px;}
  body.m-v2.home main[data-pg="home"] .m-cta .pill{justify-content:center;height:50px;padding:0 20px;font-size:16px;}
  body.m-v2.home main[data-pg="home"] .m-cta .pill-dark{background:var(--blue);color:#fff;}
  body.m-v2.home main[data-pg="home"] .m-cta .pill-ghost{background:#fff;border:1.5px solid var(--blue);color:var(--blue);}
  body.m-v2.home main[data-pg="home"] .m-onblue .pill-dark{background:#fff;color:var(--blue);}
  body.m-v2.home main[data-pg="home"] .m-ctawrap{padding-bottom:36px;}
  body.m-v2.home main[data-pg="home"] .m-ctawrap .m-cta{margin-top:24px;}

  /* ---- swipe rows ---- */
  body.m-v2.home main[data-pg="home"] .m-swipe{display:flex !important;flex-wrap:nowrap;justify-content:flex-start;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;
    margin:24px -20px 0;padding:0 20px 6px;scroll-padding:0 20px;scrollbar-width:none;max-width:none;}
  body.m-v2.home main[data-pg="home"] .m-swipe::-webkit-scrollbar{display:none;}
  body.m-v2.home main[data-pg="home"] .m-swipe>*{flex:0 0 82%;scroll-snap-align:start;min-width:0;}
  body.m-v2.home main[data-pg="home"] .m-hint{display:flex;align-items:center;gap:6px;margin-top:14px;font:600 14px/1 "Inter",sans-serif;color:var(--blue);}
  body.m-v2.home main[data-pg="home"] .wrap .m-hint{margin-top:14px;}
  body.m-v2.home main[data-pg="home"] .m-dots{display:flex;gap:6px;margin-right:6px;}
  body.m-v2.home main[data-pg="home"] .m-dots i{width:7px;height:7px;border-radius:50%;background:var(--line-cool);transition:width .2s ease;}
  body.m-v2.home main[data-pg="home"] .m-dots i.on{background:var(--blue);width:18px;border-radius:4px;}

  /* Four reasons: art, title, one sentence */
  body.m-v2.home main[data-pg="home"] .sell{padding:14px 16px 20px;}
  body.m-v2.home main[data-pg="home"] .sell-art{margin:0;height:96px;background:#fff;}
  body.m-v2.home main[data-pg="home"] .sell-art img{height:80px;}
  body.m-v2.home main[data-pg="home"] .sell h3{font-size:21px;margin:16px 0 8px;}
  body.m-v2.home main[data-pg="home"] .sell p{font-size:16px;line-height:1.5;color:var(--body);}
  body.m-v2.home main[data-pg="home"] .sell ul{display:none;}
  body.m-v2.home main[data-pg="home"] .sell.us .tag{font-size:12px;top:12px;right:16px;}

  /* Five specialists */
  body.m-v2.home main[data-pg="home"] .roster.m-swipe{margin:24px 0 0;padding:16px 20px 6px;perspective:none;}
  body.m-v2.home main[data-pg="home"] .roster.m-swipe .emp{flex:0 0 68%;width:auto;opacity:1 !important;transform:none !important;animation:none !important;}
  body.m-v2.home main[data-pg="home"] .roster .face{padding:16px 14px 16px;}
  body.m-v2.home main[data-pg="home"] .emp img.fig{height:112px;}
  body.m-v2.home main[data-pg="home"] .emp .role{font-size:14px;}
  body.m-v2.home main[data-pg="home"] .emp .crew{font-size:15px;color:var(--body);margin-top:4px;}
  body.m-v2.home main[data-pg="home"] .emp .status{font-size:14px;color:var(--body);}
  body.m-v2.home main[data-pg="home"] .emp .bline{font-size:17px;line-height:1.4;}
  body.m-v2.home main[data-pg="home"] .emp .bnote{font-size:14px;color:var(--body);}
  body.m-v2.home main[data-pg="home"] .emp .btools .codechip{font-size:13px;}
  body.m-v2.home main[data-pg="home"] .emp .klabel{font-size:12px;}
  body.m-v2.home main[data-pg="home"] .emp.lead .badge{font-size:12px;}
  body.m-v2.home main[data-pg="home"] .roster-hint{font-size:14px;color:var(--body);text-align:left;padding:0 20px;margin:10px 0 0;}
  body.m-v2.home main[data-pg="home"] .m-wrapcta .m-cta{margin-top:20px;}

  /* How it works: same four steps already sit in the next section, and the console mock is unreadable at 375px */
  body.m-v2.home main[data-pg="home"]>section#how{display:none;}

  /* Not another workflow builder */
  body.m-v2.home main[data-pg="home"] .vs{gap:12px;margin-top:24px;}
  body.m-v2.home main[data-pg="home"] .vs-col{padding:16px 16px;}
  body.m-v2.home main[data-pg="home"] .vs-col ul{gap:8px;}
  body.m-v2.home main[data-pg="home"] .vs-col h3{font-size:19px;margin-bottom:14px;}
  body.m-v2.home main[data-pg="home"] .vs-col li{font-size:16px;line-height:1.5;color:var(--body);}
  body.m-v2.home main[data-pg="home"] .vs-col.them{background:var(--cream);}
  body.m-v2.home main[data-pg="home"] .vs-col.usbox{background:var(--panel);}
  body.m-v2.home main[data-pg="home"] .cross{color:var(--body);}
  body.m-v2.home main[data-pg="home"] .flow-wrap{display:none;}

  /* Powered by Xinference: blue block, white chart card */
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(5) .h2,
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(5) .lede{color:#fff;}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(5) .h2 em{color:#A8C4F0;}
  body.m-v2.home main[data-pg="home"] .stack-grid{gap:24px;margin-top:24px;}
  body.m-v2.home main[data-pg="home"] .numbers{gap:20px;}
  body.m-v2.home main[data-pg="home"] .num{padding-left:0;border-left:0;}
  body.m-v2.home main[data-pg="home"] .num b{font-size:40px;color:#fff;}
  body.m-v2.home main[data-pg="home"] .num>span{font-size:16px;line-height:1.45;color:#fff;max-width:none;}
  body.m-v2.home main[data-pg="home"] .num .src{font-size:13px;color:#DCE8FB;}
  body.m-v2.home main[data-pg="home"] .chart{padding:20px 18px;background:#fff;}
  body.m-v2.home main[data-pg="home"] .chart h3{font-size:18px;}
  body.m-v2.home main[data-pg="home"] .chart .sub{font-size:14px;color:var(--body);margin-bottom:18px;}
  body.m-v2.home main[data-pg="home"] .bar-row .lab{font-size:15px;}
  body.m-v2.home main[data-pg="home"] .bar-row .lab i{font-size:14px;color:var(--body);}
  body.m-v2.home main[data-pg="home"] .chart .save{display:none;}
  body.m-v2.home main[data-pg="home"] .bar-row{margin-bottom:14px;}
  body.m-v2.home main[data-pg="home"] .bar{height:20px;}
  body.m-v2.home main[data-pg="home"] .chart .note{font-size:14px;color:var(--body);}
  body.m-v2.home main[data-pg="home"] .sim{display:none;}

  /* Connect the tools */
  body.m-v2.home main[data-pg="home"] .wall{justify-content:flex-start;gap:8px;margin:24px 0 0;max-width:none;}
  body.m-v2.home main[data-pg="home"] .wall .ticon{width:48px;height:48px;background:#fff;}
  body.m-v2.home main[data-pg="home"] .wall .ticon svg{fill:var(--faint);}
  body.m-v2.home main[data-pg="home"] .wall .more{flex:1 1 100%;width:auto;height:44px;justify-content:center;font-size:14px;color:var(--blue);white-space:nowrap;}

  /* Templates: two-column tiles, title only */
  body.m-v2.home main[data-pg="home"] .tpl-grid{grid-template-columns:1fr 1fr;gap:10px;margin-top:24px;}
  body.m-v2.home main[data-pg="home"] .tpl{padding:12px;gap:10px;min-width:0;}
  body.m-v2.home main[data-pg="home"] .tpl .icochip{width:32px;height:32px;}
  body.m-v2.home main[data-pg="home"] .tpl b{font-size:16px;line-height:1.25;}
  body.m-v2.home main[data-pg="home"]>section:nth-of-type(7)>.wrap>p[style]{display:none;}

  /* Deploy */
  body.m-v2.home main[data-pg="home"] .dep{padding:16px 16px 20px;background:#fff;}
  body.m-v2.home main[data-pg="home"] .dep-art{height:64px;}
  body.m-v2.home main[data-pg="home"] .dep-art img{height:60px;}
  body.m-v2.home main[data-pg="home"] .dep h3{font-size:21px;margin:12px 0 6px;}
  body.m-v2.home main[data-pg="home"] .dep p{font-size:16px;line-height:1.5;color:var(--body);}
  body.m-v2.home main[data-pg="home"] .dep .codechip{font-size:13px;}
  body.m-v2.home main[data-pg="home"] .enterprise-chips{justify-content:flex-start;gap:8px;margin-top:24px;}
  body.m-v2.home main[data-pg="home"] .enterprise-chips span{font-size:13px;padding:7px 12px;letter-spacing:.05em;}

  /* ---- final band + footer ---- */
  body.m-v2.home .cta-band .wrap{flex-direction:column;align-items:stretch;gap:24px;padding-top:48px;padding-bottom:48px;}
  body.m-v2.home .cta-band h2{font-size:30px;}
  body.m-v2.home .cta-band p{display:none;}
  body.m-v2.home .cta-band .pill{justify-content:center;height:52px;font-size:16px;}
  body.m-v2.home footer{padding:40px 0 28px;font-size:16px;}
  body.m-v2.home .foot-grid{grid-template-columns:1fr 1fr;gap:28px 16px;}
  body.m-v2.home .foot-brand{grid-column:1/-1;}
  body.m-v2.home .foot-grid>div:nth-child(2){order:1;}
  body.m-v2.home .foot-grid>div:nth-child(4){order:2;}
  body.m-v2.home .foot-grid>div:nth-child(3){order:3;grid-column:1/-1;}
  body.m-v2.home .foot-grid>div:nth-child(3) ul{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px;}
  body.m-v2.home .foot-brand p{display:none;}
  body.m-v2.home .foot-grid .klabel{font-size:13px;color:var(--blue);margin-bottom:10px;}
  body.m-v2.home .foot-grid ul{gap:4px;}
  body.m-v2.home .foot-grid a{color:var(--ink);font-size:16px;display:inline-block;padding:2px 0;}
  body.m-v2.home .foot-base{font-size:14px;color:var(--body);margin-top:28px;padding-top:20px;}

  /* ---- sticky bottom bar after the hero ---- */
  body.m-v2.home .m-sticky{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:90;gap:10px;
    padding:10px 16px calc(10px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.94);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
    border-top:1px solid var(--line-cool);transform:translateY(110%);transition:transform .25s ease;}
  body.m-v2.home .m-sticky.on{transform:none;}
  body.m-v2.home .m-sticky .pill{flex:1 1 0;justify-content:center;height:48px;padding:0 16px;font-size:16px;background:var(--blue);color:#fff;}
}
