/* Approved mobile layout and motion refinements. Preserve all homepage sections and business content. */
@media(max-width:800px){
 :root{--page-gutter:20px}
 .xb-nav{position:sticky;top:0;z-index:30;min-height:64px}
 .xb-nav__menu-panel{max-height:calc(100dvh - 80px);overflow:auto;overscroll-behavior:contain;max-width:none}
 .xb-nav__menu-links .xb-nav__link{display:flex;align-items:center;min-height:44px}
 .discovery .section,[data-view=home] .discovery .section{padding-block:38px}
 .discovery .section-head{gap:14px;margin-bottom:22px;flex-direction:column;align-items:start}
 .discovery .section-head h2{font-size:clamp(26px,5.5vw,34px);line-height:1.45}
 .discovery .section-head p,.discovery .hero-copy .lead{font-size:16px;line-height:1.85}
 [data-view=home] .hero-inner{min-height:0;padding-block:26px 20px;gap:20px}
 [data-view=home] .hero-copy h1{font-size:clamp(32px,7.8vw,46px);line-height:1.4}
 [data-view=home] .hero-copy .lead{margin-block:16px 20px}
 .discovery .hero-copy .fine{margin-top:12px}
 .discovery .hero-copy .codes{padding-top:16px;gap:12px;font-size:12px}
 .discovery .hero .actions{gap:8px}.discovery .hero .actions .xb-btn{min-height:46px;font-size:15px;padding-inline:12px}
 .hero-studio{width:100%;max-width:520px;justify-self:center}
 .studio-top{padding:10px 0;font-size:12px}
 .studio-canvas{height:320px}
 .hero-studio .studio-canvas>.structural-art{width:100%;height:100%;transform:none;opacity:1}
 .hero-studio .studio-steps{padding-inline:0;gap:3px}
 .studio-steps button{min-height:48px;font-size:13px;padding:8px 3px;gap:2px}
 .studio-controls{padding:6px 0;gap:8px;justify-content:space-between}
 .studio-controls #hero-status{flex-basis:100%;font-size:13px}
 .hero-studio .studio-button{min-width:44px;min-height:44px;font-size:14px}
 .hero-studio[data-manual-stage="true"] *{animation:none!important;stroke-dashoffset:0!important}
 .studio-coordinates{font-size:11px;right:6px;bottom:6px}
 .hero-studio[data-stage="2"] .studio-canvas>.structural-art{transform:translateX(30%) scale(.7);opacity:.12}
 [data-view=home] .hero-studio .section-inset{top:8px;left:50%;width:min(250px,85%);max-width:none;transform:translateX(-50%);padding:0}
 [data-view=home] .hero-studio[data-stage="2"] .section-inset{transform:translateX(-50%)}
 .section-inset .section-graphic{height:250px;max-height:250px}
 .section-inset>span{font-size:13px}
 .hero-studio[data-stage="3"] .studio-canvas>.structural-art{height:155px;transform:translateY(-8px);opacity:.55}
 .hero-studio .result-inset{top:145px;left:0;right:0;width:100%;max-width:none;padding:0 6px;direction:ltr}
 .hero-studio .result-inset strong{font-size:20px}.hero-studio .result-inset p{font-size:13px}
 .hero-studio .result-inset>div:first-child{margin-bottom:10px;gap:8px}
 .hero-studio .result-ratio{margin-block:9px 6px;padding-block:7px;font-size:14px}
 .hero-studio[data-stage="3"] .studio-coordinates{bottom:auto;top:8px}
 .discovery .hero-footer{display:grid;grid-template-columns:1fr;gap:10px;padding-block:16px;font-size:14px}
 .home-motion-control{padding-bottom:0}
 .explorer-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px!important}
 .explorer-tab{min-height:82px;padding:15px 3px 8px;gap:4px;justify-content:end}
 .explorer-tab .xb-feature__glyph{width:32px;height:32px}
 .explorer-tab>bdi{font-size:10px;top:3px;inset-inline-start:5px}
 .explorer-tab>span{font-size:13px;line-height:1.45;overflow-wrap:normal}
 .explorer-panel{gap:12px!important}
 .explorer-visual-head{padding:14px 0 10px;font-size:12px;gap:10px}
 .drawing-controls{gap:5px;padding:4px 0;justify-content:center}
 .drawing-controls button{min-height:44px;font-size:14px}
 .explorer-art{min-height:260px;padding:0}
 .explorer-art .structural-art{height:280px;max-height:280px;width:100%}
 .explorer-art .section-graphic{height:270px}
 .explorer-art .art-callout text{font-size:14px}
 .explorer-visual-foot{padding:10px 0;font-size:12px;gap:10px;flex-wrap:wrap}
 .drawing-legend{font-size:12px;gap:12px;flex-wrap:wrap}
 .explorer-info{padding:16px 0!important}.explorer-info .eyebrow{margin-bottom:8px}
 .explorer-info h3{font-size:28px}.explorer-info .explorer-lead{line-height:1.85}
 .explorer-facts{gap:16px;margin-block:20px}
 .explorer-code-note{padding:16px 0;font-size:13px}.explorer-code-note>div{margin-inline-start:0;font-size:12px;gap:12px}
 .journey-step{padding:18px 0;display:grid;grid-template-columns:minmax(0,1fr) 110px;column-gap:15px;align-items:start}
 .journey-step>.journey-number,.journey-step>strong,.journey-step>.journey-description{grid-column:1}
 .journey-step>.journey-diagram{grid-column:2;grid-row:1/5;width:100%;height:150px;margin:0;align-self:center}
 .journey-step>strong{font-size:18px}.journey-description{font-size:15px;line-height:1.8}
 .engineering-journey{grid-template-columns:1fr}.journey-detail{margin-inline:0}
 .member-inspector{grid-template-columns:1fr}.inspection-data{padding:18px 0!important}
 .inspection-data dl{grid-template-columns:1fr 1fr}.inspection-drawing .section-graphic{height:250px;margin-top:12px}
 .table-wrap{overscroll-behavior-x:contain;scrollbar-width:thin}
 .workbench-table button{min-width:44px;min-height:44px}.workbench-table :is(th,td){padding:11px 9px}
 .workbench-note{padding:16px 0;line-height:1.8}.check-context{flex-wrap:wrap}
 .discovery .closing .container{gap:18px}.discovery .closing .actions{width:100%}
 .discovery .closing .xb-btn{min-height:46px}
 input,select,textarea{font-size:16px!important}
 .site-footer{padding-block:28px}.site-footer a{display:inline-flex;min-height:44px;align-items:center}
 .module-jump a,.module-related a{min-height:44px;display:inline-flex;align-items:center}
 [data-mobile-visible="false"], [data-mobile-visible="false"] *,[data-mobile-visible="false"] *:before,[data-mobile-visible="false"] *:after{animation-play-state:paused!important}
}
@media(max-width:360px){
 :root{--page-gutter:16px}.discovery .hero .actions .xb-btn{flex-basis:100%}
 .explorer-tab>span{font-size:12px}.journey-step{grid-template-columns:minmax(0,1fr) 88px;gap:10px}
 .studio-steps button{font-size:12px}.hero-studio .result-inset strong{font-size:18px}
}

/* Mobile order pass (2026-11-21): existing breakpoints and tokens only; desktop untouched. */
@media(max-width:800px){
 /* Modules page: the explorer is a bordered card, its text must not touch the border */
 [data-view=modules] .explorer-info,[data-view=modules] .explorer-visual-head,[data-view=modules] .explorer-visual-foot,[data-view=modules] .explorer-code-note{padding-inline:16px!important}
 [data-view=modules] .drawing-controls{padding-inline:16px}
 /* Other modules: an even two-column grid instead of ragged centred pills */
 .module-related{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-block:24px 48px}
 .module-related a{justify-content:flex-start;gap:8px}.module-related bdi{margin-inline-end:0}
}
@media(max-width:520px){
 /* Plan comparison: all three plans fit the phone width instead of scrolling out of sight */
 .compare{min-inline-size:0;font-size:13px;line-height:20px}
 .compare th,.compare td{padding:10px 8px}.compare thead th{font-size:14px;line-height:20px}
}
