/* Loaded only at viewport widths <= 900px; desktop rules remain untouched. */
body{font-size:16px;line-height:1.5;-webkit-text-size-adjust:100%}
.shell{display:flex;flex-direction:column;min-height:calc(100dvh - 34px)}
.shell>.sidebar{position:sticky;top:0;z-index:20;padding:10px 16px;gap:10px;border-right:0;border-bottom:1px solid var(--t-line)}
.sidebar>.sidebar-brand,.sidebar>.identity{display:none}
.mobile-workspace-bar{display:flex;justify-content:space-between;align-items:center;gap:12px}
.mobile-workspace-bar button{min-height:44px;min-width:92px;font-size:16px;padding:10px 16px}
.sidebar .nav{display:none;max-height:min(60dvh,480px);overflow-y:auto;overscroll-behavior:contain;gap:6px}
.sidebar.mobile-nav-open .nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:4px 0}
.sidebar .nav:before{display:none}
.sidebar .nav button{font-size:15px;min-height:48px;white-space:normal;overflow-wrap:anywhere;padding:11px 12px;line-height:1.4}
.main{width:100%;min-width:0;padding:0 16px 28px;max-width:100%}
.header{min-height:0;padding:18px 0;gap:12px;flex-wrap:wrap}
.header>div{min-width:0}
.header select{font-size:16px;min-width:0;width:100%;max-width:100%;min-height:46px}
.header .label,.eyebrow,.label{font-size:12px;line-height:1.5}
.header .subtle,.intro,.subtle,.card p,.company-card p,.long-description{font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.page-title{font-size:28px;line-height:1.25;margin:24px 0 12px;overflow-wrap:anywhere}
h2,.card h2{font-size:20px;line-height:1.35}
h3{font-size:18px;line-height:1.4}
.card{padding:18px;margin:18px 0;min-width:0}
.card-head{align-items:flex-start;flex-wrap:wrap;gap:10px}
button,input,select,textarea,.form input,.form select,.form textarea,.header select,.pac-composer input,.pac-composer select,.pac-composer textarea{font-size:16px;line-height:1.4}
button,input:not([type=checkbox]),select{min-height:44px}
input,select,textarea{max-width:100%;min-width:0}
.form label,.permission,.pac-composer label,.pac-composer legend,legend{font-size:14px;line-height:1.5}
.form label,.split>*{min-width:0}
.form{gap:18px}
.permission{max-width:100%;min-width:0}
input[type=checkbox]{width:20px;height:20px;min-height:20px}
small,.card small,.badge,.note,.stat .subtle,.company-card p,.pac-composer small,.address-status,.repeat-preview{font-size:14px;line-height:1.5}
.actions{flex-wrap:wrap;gap:10px}
.actions>button{white-space:normal;overflow-wrap:anywhere}
.scope{gap:12px;flex-wrap:wrap;margin:18px 0;padding:14px 16px}
.scope strong{font-size:16px;overflow-wrap:anywhere}
.stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{padding:16px;min-width:0}
.stat .label{font-size:13px;letter-spacing:0;line-height:1.4}
.stat .label:after{display:none}
.stat .value{font-size:30px}
.stat .subtle{font-size:13px}
.companies{grid-template-columns:1fr;gap:14px}
.company-card{padding:22px}
.company-card h2{font-size:23px}
.demo{font-size:12px;padding:9px 16px;line-height:1.4;flex-wrap:wrap}
.demo>span:last-child{display:none}
.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.table-wrap table{min-width:580px}
.card:has(>table){overflow-x:auto}
table{font-size:15px}
th{font-size:12px;padding:12px}
td{font-size:15px;padding:14px 12px}
td small{font-size:13px}
.contract-row{flex-wrap:wrap;gap:12px;min-width:0}
.contract-row>div{min-width:0;overflow-wrap:anywhere}
.contract-row strong{font-size:16px}
.contract-row small{font-size:14px}
.pac-toolbar{padding:16px;gap:14px}
.pac-toolbar strong{font-size:18px}
.pac-tools{width:100%;margin-left:0;gap:10px}
.pac-tools input{width:100%;height:auto;min-height:44px;font-size:16px}
.pac-segment{max-width:100%}
.pac-segment span{font-size:14px;white-space:normal}
.pac-calendar button{font-size:15px;min-height:44px;padding:10px 12px}
.pac-calendar .pac-day .calendar-add{width:44px;height:44px;min-height:44px;opacity:1;transform:none;flex-shrink:0}
.pac-calendar .cal-event{font-size:14px;line-height:1.45;min-height:44px;padding:10px 8px;white-space:normal!important;overflow-wrap:anywhere;text-overflow:clip}
.pac-month{min-width:910px}
.pac-week{min-width:1010px;grid-template-columns:100px 1fr}
.pac-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.pac-weekdays span,.pac-day-head{font-size:14px}
.pac-day{min-height:130px;padding:8px}
.pac-hover-hint{display:none}
.pac-calendar-footer{font-size:14px}
dialog{max-width:calc(100vw - 16px);max-height:92dvh;overflow:auto}
dialog.event-dialog[open]{width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:min(820px,92dvh);margin:auto}
dialog.event-dialog .dialog-header{padding:16px;gap:12px;min-height:68px}
dialog.event-dialog .dialog-header h2{font-size:21px}
dialog.event-dialog .dialog-header button{min-width:44px;min-height:44px;font-size:22px}
dialog.event-dialog .event-scroll{padding:18px 16px}
dialog.event-dialog .split,.split{grid-template-columns:1fr}
dialog.event-dialog input:not([type=checkbox]):not([type=file]),dialog.event-dialog select,dialog.event-dialog textarea{font-size:16px;min-height:46px;line-height:1.5}
dialog.event-dialog textarea{min-height:140px}
dialog.event-dialog .composer-footer{gap:10px;flex-wrap:wrap}
dialog.event-dialog .composer-footer button{font-size:16px;min-height:46px;flex:1 1 130px;padding:11px 12px}
.performer-picker label{min-height:44px;gap:12px}
.pdf-preview-body{padding:12px}
.pdf-preview-body p{font-size:15px;line-height:1.6}
.chat-layout,.support-layout{grid-template-columns:1fr;gap:16px}
.chat-people,.support-sidebar{max-height:280px}
.chat-people h2,.support-sidebar h2{font-size:19px}
.chat-people>p,.chat-person small,.support-sidebar .contract-row strong,.support-new summary,.chat-panel-header p,.chat-sender,.chat-time,.chat-footnote{font-size:14px;line-height:1.5}
.chat-people h3{font-size:13px}
.chat-people .chat-person,.support-sidebar [data-open-ticket],.support-sidebar #refresh-support{font-size:16px;min-height:44px}
.chat-panel{height:70dvh;min-height:400px;max-height:850px}
.chat-panel-header{padding:16px;gap:12px}
.chat-panel-header h2{font-size:20px}
.chat-panel .chat-history{padding:18px 14px}
.chat-bubble{font-size:16px;line-height:1.6;padding:12px 14px}
.chat-message-content{max-width:85%}
.chat-compose textarea{font-size:16px;min-height:44px}
.chat-compose .chat-send{min-width:44px;min-height:44px}
.chat-status,.chat-status select{font-size:15px}
.invoice-line{grid-template-columns:1fr 1fr}
.invoice-line label:first-child{grid-column:1/-1}
.invoice-parties,.invoice-meta{grid-template-columns:1fr}
.invoice-band{gap:12px;flex-wrap:wrap}
.invoice-band>div:last-child{text-align:left}
.invoice-paper{max-width:100%;overflow-x:auto}
.invoice-paper table{min-width:520px;font-size:14px}
.welcome{padding:24px 18px 36px}
.welcome-layout{grid-template-columns:1fr;gap:28px;padding:32px 0}
.welcome-header{flex-wrap:wrap;gap:14px}
.welcome-header .eyebrow{display:none}
.welcome h1{font-size:40px;line-height:1.15}
.welcome p,.welcome .subtle{font-size:16px;line-height:1.6}
.account-box{padding:22px;min-width:0}
#toast{max-width:calc(100vw - 24px);font-size:16px;line-height:1.5}
@media(max-width:380px){.main{padding-inline:12px}.sidebar.mobile-nav-open .nav{grid-template-columns:1fr}.stats{grid-template-columns:1fr}.stat .value{font-size:28px}.card{padding:16px}}
