/* Adaptive layouts and accessible touch controls. Desktop composition is preserved. */
@media(max-width:1024px){
 *,*::before,*::after{box-sizing:border-box}
 img,video,canvas,iframe{max-width:100%}
 input,select,textarea{min-width:0;font-size:16px!important}
 button,a,input,select,textarea{touch-action:manipulation}
 h1,h2,h3,p{overflow-wrap:break-word}
}
@media(pointer:coarse){button,[role=button],input,select{min-height:44px}}

@media(max-width:920px){
 .web-cabinet-layout{grid-template-columns:minmax(0,1fr)!important}
 .web-cabinet-sidebar{display:flex!important;flex-wrap:wrap;gap:8px;width:100%!important}
 .web-cabinet-content,.demo-content,.demo-aside{min-width:0;max-width:100%}
 .landing-site-nav,.web-cabinet-topbar,.demo-toolbar{flex-wrap:wrap!important;gap:12px!important}
 .contact-window{max-height:calc(100dvh - 24px)!important;overflow:auto!important;width:calc(100% - 24px)!important}
}
@media(max-width:600px){
 .case-header-inner{padding:16px!important;gap:8px!important;flex-wrap:wrap}
 .case-hero-title{font-size:clamp(38px,10vw,54px)!important;overflow-wrap:anywhere}
 .case-hero,.demo-toolbar,.demo-content{padding-inline:16px!important}
 .landing-site-content,.web-cabinet-content{padding:16px!important}
 .landing-hero-grid,.landing-install-grid{grid-template-columns:minmax(0,1fr)!important}
 .demo-phone{width:100%!important;max-width:380px!important;min-width:0!important;margin-inline:auto}
 .contact-form{grid-template-columns:minmax(0,1fr)!important}
 .contact-window{padding:40px 20px 24px!important}
 .contact-form input,.contact-form textarea{width:100%}
}
@media(max-width:600px){
 main>section[style*="grid-template-columns"],main>section>div[style*="grid-template-columns"],main>section>div>div[style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important;gap:24px!important}
 main>section>div,main>section>div>div{min-width:0}
 main>section h2{font-size:clamp(26px,8vw,38px)!important}
}
@media(max-width:920px){.demo-content{justify-content:flex-start!important;min-height:0}.demo-phone{flex-shrink:0!important}}
/* Explicit nested dashboard layouts: charts must keep their legends visible. */
.dashboard-charts{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.dashboard-charts>div{min-width:0}
.chart-layout{grid-template-columns:140px minmax(0,1fr)!important}
.chart-layout>div{min-width:0}.chart-layout>div:last-child{font-size:14px}
.data-flow-grid>div{min-width:0}.data-flow-grid b,.data-flow-grid small{overflow-wrap:normal;word-break:normal}
@media(max-width:1100px){.dashboard-charts{grid-template-columns:minmax(0,1fr)!important}.data-flow-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:600px){.data-flow-grid{grid-template-columns:minmax(0,1fr)!important}.data-flow-grid>div{padding:18px!important}.data-flow-grid b{font-size:16px!important}.data-flow-grid small{font-size:14px!important}.chart-layout{grid-template-columns:minmax(0,1fr)!important;justify-items:center}.chart-layout>div:last-child{width:100%;max-width:320px}.chart-layout>div:last-child>div{font-size:14px!important}.dashboard-charts>div>b,.dashboard-charts>div>div>b{font-size:16px!important}.web-cabinet-content [style*="repeat(4, minmax(0,1fr))"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

.mobile-back-top{display:none}
@media(max-width:600px){.mobile-back-top:not([hidden]){position:fixed;right:16px;bottom:calc(18px + env(safe-area-inset-bottom));z-index:45;display:flex;flex-direction:column;align-items:center;justify-content:center;width:60px;height:60px;border:0;border-radius:50%;background:#ff8a1f;color:#fff;box-shadow:0 4px 18px #0002;font:800 10px/1.2 Arial,sans-serif;gap:2px;cursor:pointer}}

@media(max-width:600px){.hero-phone-shell>div{display:flex;flex-direction:column;height:100%;min-height:0}.hero-phone-shell>div>div:nth-child(3){min-height:0;overflow:auto}.hero-phone-shell>div>div:last-child{flex-shrink:0}}
@media(max-width:600px){.hero-phone-stage{display:flex;flex-direction:column;gap:16px}.hero-phone-stage>div[style*="position: absolute"]:not([style*="radial-gradient"]){position:static!important;max-width:100%!important;width:100%;animation:none!important;box-sizing:border-box}.hero-phone-shell{margin-bottom:0!important}}

/* Let the preview content define its frame, including the complete bottom bezel. */
.hero-phone-shell,.showcase-phone{aspect-ratio:auto!important;display:flex;flex-direction:column}
.hero-phone-shell>div,.showcase-phone>div{height:auto!important;min-height:0;flex:1}
.hero-phone-shell>div>div:nth-child(3){overflow:visible}
.phone-pair{align-items:stretch!important}
@media(max-width:600px){.hero-phone-shell{animation:none!important}.hero-phone-shell>div>div:nth-child(3){overflow:visible}.case-hero-visual{transform:none!important}}

/* Give account summaries enough room for full addresses and balances. */
.web-kpis>div{min-width:0}.web-kpis b{overflow-wrap:normal;word-break:normal}
@media(max-width:900px){.web-cabinet-content .web-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.web-kpis>div{padding:16px!important}.web-kpis small{font-size:12px!important;line-height:1.45}.web-kpis b{font-size:18px!important;line-height:1.3}}
