/* Studiora — responsive layer for every screen: phone · tablet · laptop · desktop · large monitor · TV.
   Loaded last on every page (CRM panel, platform console, client portal, public website).

   Breakpoints
     ≤ 480  small phone      ≤ 760  phone / small tablet portrait     ≤ 900  tablet (sidebar becomes a drawer)
     901–1180 tablet landscape / small laptop (sidebar collapses to icons unless the user chose otherwise)
     ≥ 1800 large monitor    ≥ 2200 QHD / 2K TV    ≥ 2800 4K TV    ≥ 3600 big 4K/8K TV
   Big screens scale the whole UI with `zoom`; --z keeps full-height layouts (100vh) correct. */

/* ------------------------------------------------------------------ everywhere */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,svg,video,canvas,iframe{max-width:100%}
img{height:auto}
.content,.main,.pub-wrap{min-width:0}
.page-head h1{overflow-wrap:anywhere}
.btn{max-width:100%}
table{max-width:none}

/* ------------------------------------------------------------------ large screens & TV */
@media (min-width:1800px){:root{--z:1.12;zoom:1.12}}
@media (min-width:2200px){:root{--z:1.35;zoom:1.35}}
@media (min-width:2800px){:root{--z:1.7;zoom:1.7}}
@media (min-width:3600px){:root{--z:2.1;zoom:2.1}}
/* very wide but short screens (TV in landscape at low height) — keep text readable */
@media (min-width:1800px) and (max-height:700px){:root{--z:1;zoom:1}}

/* ------------------------------------------------------------------ tablet landscape / small laptop */
@media (min-width:901px) and (max-width:1180px){
  .content{padding:18px 18px 40px}
  .g-side{grid-template-columns:minmax(0,1fr)}
  .side-stack{position:static}
  .kpis{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
  .search{max-width:300px}
}

/* ------------------------------------------------------------------ tablet portrait & phone */
@media (max-width:900px){
  .top{gap:6px}
  .search{min-width:0}
  .g-side,.tk-grid,.help-hero{grid-template-columns:minmax(0,1fr)}
  .side-stack{position:static}
  .fbar select,.fbar input[type=date]{min-width:0;max-width:100%;flex:1 1 140px}
  .fbar label.dl{flex:1 1 140px}
  .fbar .search{flex:1 1 100%}
  .fbar select{flex:1 1 calc(50% - 8px)}
  .page-head .fbar,.page-head form{flex:1 1 100%;min-width:0}
  .card-h{flex-wrap:wrap;gap:8px}
  .sticky-actions{flex-wrap:wrap}
  dialog.dlg,dialog.dlg.wide{width:calc(100vw - 24px);max-height:calc(100vh / var(--z,1) - 24px);overflow:auto}
  /* calendar (FullCalendar) toolbar */
  .fc .fc-header-toolbar{flex-wrap:wrap;gap:8px}
  .fc .fc-toolbar-title{font-size:16px}
  /* quotation / BOQ step trackers */
  .flow{flex-wrap:wrap;gap:10px 6px}
  .flow .ln{min-width:10px;margin:0 4px}
}

@media (max-width:760px){
  /* bigger touch targets, no iOS zoom-on-focus */
  input,select,textarea{font-size:16px}
  .btn{min-height:40px}
  .btn.sm{min-height:34px}
  .nav-i{padding:10px 10px}
  .icon-btn{width:40px;height:40px}
  /* top bar: keep menu, search, New, bell — theme & avatar live in the side menu */
  .top .avatar.sm,.top .icon-btn[onclick*="toggleTheme"]{display:none}
  .qa-menu{right:-50px}
  .page-head{align-items:flex-start}
  .page-head h1{font-size:19px;flex-basis:100%}
  .page-head h1 .sub{display:block;margin-top:2px}
  .page-head>.btn,.page-head>a.btn{flex:1 1 auto;justify-content:center}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kpi .v{font-size:18px}
  .chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .chips::-webkit-scrollbar{display:none}
  .chip{flex:none}
  .sect{overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  .sect::-webkit-scrollbar{display:none}
  .tw,.card{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tw table{min-width:560px}
  .flow .f small{display:none}
  .flow .ln{display:none}
  .stars label{font-size:28px}
  .reply .bar>*{flex:1 1 100%}
  .reply .bar .btn{justify-content:center}
  .uc-menu{left:6px;right:6px}
}

@media (max-width:480px){
  .content{padding:12px 10px 36px}
  .top{padding:0 8px}
  .search{padding:0 6px 0 9px}
  .search input::placeholder{color:transparent}
  .kpis{gap:8px}
  .kpi{padding:9px 11px}
  .fgrid.c3{grid-template-columns:minmax(0,1fr)}
  .tw table{min-width:520px}
  .demo{grid-template-columns:minmax(0,1fr)}
}

/* ------------------------------------------------------------------ printable documents on small screens */
@media screen and (max-width:900px){
  .doc,.page{max-width:100%}
  .doc table,.page table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .bar{flex-wrap:wrap;gap:8px}
}

/* ------------------------------------------------------------------ public website */
@media (max-width:1180px){
  .site .wrap,.nav-in,.site .pub-wrap{padding-left:22px;padding-right:22px}
  .nav-links>a{padding:8px 10px}
}
@media (min-width:861px) and (max-width:1060px){
  .nav-links{margin-left:8px;gap:0}
  .nav-links>a,.nav-dd>button{padding:8px 8px;font-size:14px}
  .nav-cta .btn.ghost{display:none}
}
@media (max-width:860px){
  .nav-links{max-height:calc(100vh / var(--z,1) - 70px);overflow-y:auto}
  .nav-links>a{padding:12px 13px;font-size:16px}
  .plans,.site .plans{grid-template-columns:minmax(0,1fr)}
  .site .pl{padding:22px}
  .foot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .foot-brand{grid-column:1/-1}
  .cmp{min-width:0;width:100%;font-size:13px}
  .cmp th,.cmp td{padding:9px 6px}
  .cmp th:first-child,.cmp td:first-child{padding-left:12px}
  .cmp thead th{font-size:13px}
  .faq summary{font-size:15px}
}
@media (max-width:480px){
  .site .wrap,.nav-in,.site .pub-wrap{padding-left:16px;padding-right:16px}
  .foot-grid{grid-template-columns:minmax(0,1fr)}
  .pill{font-size:12px;flex-wrap:wrap}
  .sec-h h2{font-size:26px}
  .stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .stat b{font-size:26px}
  .pain{grid-template-columns:minmax(0,1fr);gap:4px}
  .pain .ar{display:none}
  .v-boq .ln{grid-template-columns:22px minmax(0,1fr) 70px;gap:6px;font-size:11.5px}
  .vtop .vurl{display:none}
  .auth-form{padding:20px 14px}
}
/* ------------------------------------------------------------------ phones: list tables → stacked cards */
@media (max-width:640px){
  table.stack,.tw table.stack{min-width:0;width:100%;border:0}
  table.stack thead{display:none}
  table.stack tbody,table.stack tr,table.stack td{display:block;width:100%}
  table.stack tr{position:relative;margin:0 0 10px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:var(--shadow)}
  table.stack tbody tr:last-child{margin-bottom:0}
  table.stack td{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:5px 0;border:0;text-align:right;min-height:0}
  table.stack td::before{content:attr(data-label);flex:none;max-width:45%;text-align:left;font-size:11.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.03em;padding-top:2px}
  table.stack td[data-label=""]::before,table.stack td:empty{display:none}
  table.stack td:empty{display:none}
  /* first real column is the card's title */
  table.stack td:first-child:not(:has(input[type=checkbox])),table.stack td:has(input[type=checkbox])+td{display:block;text-align:left;font-size:15px;padding:2px 34px 6px 0;border-bottom:1px solid var(--border);margin-bottom:4px}
  table.stack td:first-child:not(:has(input[type=checkbox]))::before,table.stack td:has(input[type=checkbox])+td::before{display:none}
  table.stack td:has(>input[type=checkbox]){position:absolute;right:10px;top:10px;width:auto;padding:0}
  table.stack td:has(>input[type=checkbox])::before{display:none}
  table.stack td .cell-sub{display:block}
  table.stack td>.cv{display:block;min-width:0;text-align:right}
  table.stack td:first-child>.cv,table.stack td:has(input[type=checkbox])+td>.cv{text-align:left}
  table.stack td.num{font-variant-numeric:tabular-nums}
  table.stack tfoot{display:block}
  table.stack tfoot tr{display:flex;justify-content:space-between;flex-wrap:wrap;background:var(--soft)}
  table.stack tfoot td{display:inline-block;width:auto;padding:2px 6px}
  .card.tw:has(table.stack),.tw:has(table.stack){overflow:visible;background:none;border:0;box-shadow:none;padding:0}
}

/* ------------------------------------------------------------------ website polish: phones */
.v-kanban{grid-template-columns:repeat(3,minmax(0,1fr))}
.lc b,.lc span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
@media (max-width:640px){
  .site .btn.lg{width:100%;justify-content:center}
  .hero-cta{flex-direction:column;align-items:stretch}
  .cta .acts{flex-direction:column}
  .sec{padding:52px 0}.sec.tight{padding:36px 0}
  .sec-h{margin-bottom:26px}.sec-h p{font-size:15.5px}
  /* audience switcher: three equal segments */
  .aud-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:22px}
  .aud-tabs [role=tab]{flex-direction:column;gap:4px;padding:10px 6px;font-size:12.5px;line-height:1.2;text-align:center;border-radius:12px}
  .aud-tabs [role=tab] .e{font-size:24px}
  .aud-pane h3{font-size:24px}
  .aud-pane .btn{width:100%;justify-content:center}
  /* stats */
  .stat{padding:16px}.stat span{font-size:13px;line-height:1.4;display:block}
  /* modules & solution cards: compact rows */
  .mods,.sol-grid{gap:10px}
  .mod,.sol-card{display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:14px;padding:16px;border-radius:16px}
  .mod .ic,.sol-card .ic{width:44px;height:44px;margin:0;grid-row:span 3}
  .mod h3,.sol-card h3{font-size:16px;margin:0 0 3px}.mod p,.sol-card p{font-size:13.5px}
  .mod ul{grid-column:2}
  .value{padding:18px}.values{gap:10px}
  .step{padding:16px}.steps{gap:10px}
  /* closing banner */
  .cta{padding:30px 22px;border-radius:22px}.cta::after{display:none}.cta::before{width:220px;height:220px;right:-90px;bottom:-130px}
  .cta h2{font-size:24px}
  .ba-col{padding:22px}
  .split h2{font-size:26px}.split+.split{margin-top:56px}
  .sp-art{padding:18px;border-radius:20px}
  .story-art{aspect-ratio:1.3}
  .page-hero{padding:44px 0 34px}.page-hero p{font-size:16px}
  .sol-hero{padding:30px 0 20px}
  .faq details{padding:0 16px}
  .form-card{padding:20px}
  .map{height:280px}
  .way{padding:16px}
  .hero3d{padding:34px 0 20px}
  .hero3d .wrap{gap:14px}
}
@media (max-width:480px){
  .foot-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 18px}
  .foot-brand,.foot-contact{grid-column:1/-1}
  .foot{padding-top:44px}
  .foot-bot{margin-top:30px;flex-direction:column;gap:4px}
}

/* ------------------------------------------------------------------ website polish: tablets */
@media (min-width:641px) and (max-width:1060px){
  .mods,.sol-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .values{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .stat b{font-size:28px}.stat{padding:18px}
  .plans{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .site .pl{padding:20px}
  .hero3d .wrap,.sol-hero .wrap{text-align:center}
  .hero3d p.lead,.sol-hero p.lead{margin-left:auto;margin-right:auto}
  .hero-cta,.ticks{justify-content:center}
  .scene3d{max-width:760px;margin:0 auto;width:100%}
  .split{grid-template-columns:minmax(0,1fr);gap:30px}.split.rev .sp-art{order:0}
  .story{grid-template-columns:minmax(0,1fr)}
  .ct{grid-template-columns:minmax(0,1fr)}
  .foot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .foot-brand{grid-column:1/-1}
  .step:last-child:nth-child(odd),.mod:last-child:nth-child(odd),.sol-card:last-child:nth-child(odd),.value:last-child:nth-child(odd){grid-column:1/-1}
}
@media (min-width:700px) and (max-width:1060px){
  .plans,.site .plans{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .site .pl{padding:18px}.site .pl .pr{font-size:26px}.site .pl ul{font-size:12.5px}
}
@media (min-width:641px) and (max-width:699px){
  .plans,.site .plans{grid-template-columns:minmax(0,1fr);max-width:520px}
}
@media (min-width:641px) and (max-width:860px){
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cta{grid-template-columns:minmax(0,1fr);text-align:center}.cta .acts{justify-content:center}.cta p{margin:0 auto}
}

/* the public website keeps a comfortable reading width on very large screens */
@media (min-width:1800px){
  .site .wrap,.nav-in,.site .pub-wrap{max-width:1280px}
}

/* ------------------------------------------------------------------ website: fit every screen
   The first screen (hero + trades strip) fills the viewport on laptops, desktops and wide monitors;
   type, buttons and the 3D scene scale with the screen's width AND height so nothing is cut or lost in space. */
@media (min-width:1300px){
  .site .wrap,.nav-in,.site .pub-wrap{max-width:min(1520px,88vw)}
}
.s3d-ov.done .s3d-stage b{color:#fff}
@media (min-width:1061px){
  .hero3d{min-height:calc(100vh - 128px);min-height:calc(100svh - 128px);display:flex;align-items:center;padding:clamp(24px,4vh,64px) 0}
  .hero3d>.wrap{width:100%;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:clamp(24px,3vw,64px)}
  .hero3d h1{font-size:clamp(40px,min(4.3vw,8.2vh),88px);margin:clamp(12px,2vh,22px) 0 clamp(10px,1.8vh,20px)}
  .hero3d p.lead{font-size:clamp(16px,min(1.2vw,2.3vh),22px);max-width:34em;margin-bottom:clamp(18px,3vh,32px)}
  .hero3d .pill{font-size:clamp(12.5px,min(.85vw,1.6vh),15px)}
  .hero3d .btn.lg{font-size:clamp(15px,min(1vw,1.9vh),18px);padding:clamp(12px,1.6vh,17px) clamp(22px,1.7vw,32px)}
  .hero3d .ticks{font-size:clamp(13px,min(.85vw,1.6vh),15.5px);margin-top:clamp(16px,2.6vh,28px)}
  .hero3d .scene3d{height:clamp(380px,calc(100vh - 220px),820px);height:clamp(380px,calc(100svh - 220px),820px)}
  .hero3d .hb{font-size:clamp(12px,.75vw,14px);padding:clamp(9px,.7vw,13px) clamp(12px,.9vw,16px)}
  .hero3d .hb b{font-size:clamp(13px,.82vw,15.5px)}
  .hero3d .hb .ic{width:clamp(30px,2vw,38px);height:clamp(30px,2vw,38px)}
  .hero3d .s3d-stage{font-size:clamp(13px,.8vw,15px)}
}
/* tablets: stacked, scene sized from the screen height */
@media (min-width:641px) and (max-width:1060px){
  .hero3d h1{font-size:clamp(40px,6vw,56px)}
  .hero3d .scene3d{height:clamp(340px,48svh,520px)}
}
/* phones: heading and scene follow the screen width */
@media (max-width:640px){
  .hero3d h1{font-size:clamp(30px,9.4vw,40px)}
  .hero3d p.lead{font-size:clamp(15px,4.1vw,17px)}
  .hero3d .scene3d{height:clamp(280px,82vw,380px)}
  .hero3d .pill{font-size:12px;line-height:1.35;text-align:left}
}
/* very short landscape windows: let the hero size to its content */
@media (min-width:1061px) and (max-height:620px){
  .hero3d{min-height:0}.hero3d .scene3d{height:420px}
}
