/* Compact phone workspace: reduce whitespace, retain readable form fields and taps. */
body.room-survey-view .task-navigation{color:var(--ink,#244b3e)}
.mobile-workspace-actions[hidden]{display:none!important}
.company-setup-dialog .setup-steps{display:grid;gap:8px;margin:14px 0;padding:0;list-style:none}
.company-setup-dialog .setup-steps li{padding:0;border:0}
.company-setup-dialog .setup-steps li:before{display:none}
.company-setup-dialog .setup-steps button{display:flex;align-items:center;gap:12px;width:100%;padding:12px;text-align:left;white-space:normal;background:var(--panel,#fff);color:inherit;border:1px solid var(--line,#d6e2d9);border-radius:10px}
.setup-step-number{display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;background:#e6f2eb;color:#146c56;font-size:13px;font-weight:700}
.setup-step-copy{flex:1;min-width:0}.setup-step-copy strong,.setup-step-copy small{display:block}.setup-step-copy strong{font-size:15px}.setup-step-copy small{font-size:13px;line-height:1.45;font-weight:400;color:var(--muted,#567064);margin-top:3px}
.company-setup-dialog summary,.company-optional-details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:14px;font-weight:600;gap:8px}
.company-setup-dialog summary:before,.company-optional-details>summary:before{content:'▸';font-size:12px}.company-setup-dialog details[open]>summary:before,.company-optional-details[open]>summary:before{content:'▾'}
.company-optional-details{margin:4px 0 12px;padding:0 12px;border:1px solid var(--line,#d6e2d9);border-radius:9px}.company-optional-details>summary{list-style:none}.company-optional-details>summary::-webkit-details-marker{display:none}
@media(max-width:760px){
 body:not(.marketing-home)>header{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:8px;min-height:60px;height:auto;padding:8px 12px;box-sizing:border-box}
 body:not(.marketing-home)>header .brand{flex:0 1 auto;min-width:0;margin:0;max-width:170px}
 body:not(.marketing-home)>header .brand-logo{display:block;width:150px;max-width:100%;height:auto}
 body:not(.marketing-home)>header #workspace-menu-toggle{flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:0;padding:8px}
 body:not(.signed-out) .field-entry{display:none!important}
 body:not(.marketing-home)>header .header-actions{min-width:0;margin-left:auto;flex:0 1 auto;gap:6px}
 body:not(.marketing-home)>header .header-auth{min-width:0;gap:6px}
 body:not(.marketing-home)>header .header-auth>span{display:none}
 body:not(.marketing-home)>header .header-auth button{min-height:44px;padding:8px 10px;font-size:13px;white-space:nowrap}
 #workspace-menu .mobile-workspace-actions{margin-top:16px;padding:12px 0 0;border-top:1px solid var(--survey-nav-line,#d6e2d9)}
 #workspace-menu .mobile-workspace-actions h2{margin:0 0 10px;padding:0 6px;font-size:12px;font-weight:700;color:var(--survey-nav-muted,#567064)}
 #workspace-menu .mobile-workspace-actions .header-actions,#workspace-menu .mobile-workspace-actions .header-auth,#workspace-menu .mobile-workspace-actions .survey-file-actions{display:grid;grid-template-columns:1fr;gap:8px;margin:0;width:100%;min-width:0}
 #workspace-menu .mobile-workspace-actions .header-auth-state{padding:0 10px;font-size:12px;color:var(--survey-nav-muted,#567064)}
 #workspace-menu .mobile-workspace-actions button{width:100%;min-height:44px;margin:0;font-size:14px;padding:10px 12px;text-align:left;color:var(--survey-nav-text,#244b3e)}
 #workspace-menu .mobile-workspace-actions .landing-header-cta{display:none!important}
 body:not(.marketing-home) .subscription-banner{padding:8px 12px;font-size:12px;gap:8px;min-height:36px}
 body:not(.marketing-home) .subscription-banner a{font-size:12px;white-space:nowrap}
 body:not(.marketing-home) #main{padding:14px 12px 26px}
 body.project-workspace:not(.marketing-home) #main{padding:12px;width:calc(100% - 12px);margin-top:6px}
 body:not(.marketing-home) #main .page-head{padding:0;margin:0 0 14px;gap:8px}
 /* Survey pages draw the heading in a dark box: keep the text off its edges. */
 body.project-workspace:not(.marketing-home):not(.dark) #main .page-head{padding:14px 16px;border-radius:14px}
 body:not(.marketing-home) #main .page-head h1{font-size:24px;line-height:1.2;margin:5px 0}
 body:not(.marketing-home) #main .page-head .eyebrow{font-size:10px;letter-spacing:.12em}
 body:not(.marketing-home) #main .page-head p{font-size:14px;line-height:1.5;margin:6px 0 0}
 body:not(.marketing-home) #main .panel{padding:14px;margin-bottom:12px;border-radius:12px}
 body:not(.marketing-home) #main .panel h2{font-size:19px;line-height:1.3;margin-top:0}
 body:not(.marketing-home) #main .panel p{font-size:14px;line-height:1.5}
 body:not(.marketing-home) #privacy-state .actions{gap:8px;margin:14px 0 10px}
 body:not(.marketing-home) #privacy-state .actions button{min-height:44px;padding:10px 12px;flex:1}
 body:not(.marketing-home) #privacy-state summary{min-height:44px;padding:11px 0;font-size:14px;box-sizing:border-box}
 body:not(.marketing-home) #privacy-state .badge{font-size:10px;padding:5px 8px}
 body:not(.marketing-home) #main :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px;min-height:44px}
 body:not(.marketing-home) .task-navigation{padding:10px;margin-bottom:12px;border-radius:10px}
 .task-context{margin-bottom:8px;gap:6px}.task-context strong{font-size:14px;margin-top:0}.task-customer{font-size:11px}.task-switch{min-height:44px;padding:8px;font-size:12px}
 .task-navigation-row{gap:6px}.task-stages{padding:2px;gap:2px}.task-stages a{min-height:44px;padding:8px 10px;font-size:13px}
 .task-section-picker>summary{min-height:44px;padding:8px 10px;font-size:13px}.task-picker-hint{font-size:0}.task-picker-hint:after{font-size:14px}
 body.company-home .company-dashboard .company-welcome{padding:18px 16px;min-height:0;border-radius:12px;margin-bottom:12px}
 body.company-home .company-welcome h1{font-size:24px;line-height:1.2;margin:8px 0}
 body.company-home .company-welcome p{font-size:14px;line-height:1.5;margin:8px 0 12px}
 body.company-home .company-welcome .actions{gap:8px}.company-welcome .actions button{min-height:44px}
 body:not(.marketing-home) #main .survey-start-tools{padding:10px 12px;gap:8px}
 .survey-start-tools>div:first-child p{display:none}.survey-start-tools>div:first-child strong{font-size:13px}
 .survey-start-tools .actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0}
 .survey-start-tools .actions button{padding:8px 6px;font-size:12px;min-width:0;min-height:44px;white-space:normal}
 .field-dashboard #main{padding:12px}.field-welcome{padding:14px;border-radius:12px}.field-welcome h1{font-size:24px;margin:5px 0}.field-welcome p{font-size:14px;line-height:1.45}
 .field-welcome>.actions{margin-top:12px;gap:8px;align-items:stretch}.field-welcome>.actions>button{min-height:44px;flex:1}.field-welcome .field-options{width:auto;flex:0 0 auto}
 .field-welcome .field-options>summary{padding:10px 8px;font-size:13px;min-height:44px}
 .field-options>div{position:absolute;grid-template-columns:1fr;right:0;min-width:180px}.field-options button{min-height:44px}
 .field-connection{padding:0;margin:10px 0;font-size:12px;line-height:1.5}.field-job-finder{margin-bottom:12px}.field-job-finder>label{font-size:13px;margin-bottom:6px}
 .field-search-row input,.field-search-row button{min-height:44px;padding:10px}.field-filters{margin-top:10px;gap:6px;padding-bottom:6px}.field-filters button{font-size:13px;min-height:44px;padding:8px 10px}
 .field-jobs{gap:10px}.field-job{padding:14px;border-radius:12px}.field-job h2{font-size:19px;margin:10px 0 6px}.field-job p{font-size:14px;line-height:1.45;margin:6px 0}.field-job .actions{margin-top:12px;gap:8px}
 .field-survey-tools{margin-bottom:10px;gap:6px}.field-survey-tools button{min-height:44px;padding:8px 10px;font-size:12px}
 .rs-heading h1{font-size:24px}.rs-heading{gap:8px}.rs-subtitle{margin:5px 0 8px}.rs-status{padding:6px 10px;margin-bottom:10px}.rs-photos{margin:10px 0 12px}.rs-photo img{max-height:190px}
 body.room-survey-view #main .rs-item .rs-item-head{min-height:58px;padding:10px!important}.rs-items{gap:7px}.rs-add{gap:6px;margin-bottom:12px}
 .rs-save{grid-template-columns:1fr;gap:6px}.rs-save-actions{grid-template-columns:1fr 1fr;gap:8px}.rs-save>small,.rs-save>[role=status]{grid-column:1/-1}.rs-save button{min-height:48px;font-size:14px;white-space:nowrap;padding:10px 8px}
 #signin-dialog,.field-login,.survey-upgrade-dialog,.rs-dialog{width:calc(100vw - 20px);max-width:560px;max-height:calc(100dvh - 20px);padding:16px;border-radius:14px;box-sizing:border-box}
 #signin-dialog .section-head,.company-setup-dialog .section-head{position:sticky;top:-16px;z-index:2;padding:8px 0;margin:0 0 10px;background:var(--panel,#fff);align-items:center}
 #signin-dialog h2,.company-setup-dialog h2{font-size:20px;line-height:1.2;margin:0}.company-setup-dialog>p{font-size:14px;margin:0 0 10px}
 #signin-dialog [data-auth-close],.company-setup-dialog [data-close]{min-width:44px;min-height:44px;padding:8px;flex:0 0 44px}
 #signin-dialog label{margin:10px 0;font-size:13px}#signin-dialog :is(input,select){font-size:16px;min-height:44px;padding:10px}#signin-dialog :is(input[type=checkbox],input[type=radio]){min-height:20px;min-width:20px}
 #signin-dialog small{font-size:12px;line-height:1.4}#signin-dialog h3{font-size:16px;margin:18px 0 8px}#signin-dialog .actions{gap:6px;margin:8px 0}#signin-dialog .actions button{font-size:13px;min-height:44px;padding:8px 10px}
 .company-setup-dialog .setup-steps{gap:7px;margin:10px 0}.company-setup-dialog .setup-steps button{padding:10px;gap:10px;min-height:66px}
 .company-setup-dialog details p{font-size:14px;line-height:1.5}.company-setup-dialog .cloud-link{min-height:44px;display:flex;align-items:center}
}
@media print{.mobile-workspace-actions{display:none!important}}

/* One compact phone header and one project menu. Desktop keeps its full navigation. */
.mobile-brand-icon,.mobile-page-title,.mobile-page-help,.mobile-task-menu{display:none}
.mobile-help-dialog{width:min(500px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;border:1px solid #cbdad1;border-radius:14px;padding:20px;background:var(--panel,#fff);color:var(--ink,#244b3e)}
.mobile-help-dialog::backdrop{background:#10251e80}.mobile-help-dialog .section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-help-dialog h2{font-size:19px;line-height:1.3;margin:0}.mobile-help-dialog button{min-height:44px;padding:10px 12px}.mobile-help-dialog p{font-size:15px;line-height:1.55;margin:16px 0}.mobile-help-dialog a{display:inline-flex;align-items:center;min-height:44px;color:#146c56;font-weight:650}
@media(max-width:760px){
 body.mobile-lean>header{gap:8px;padding:6px 12px;min-height:56px;flex-wrap:nowrap}
 body.mobile-lean>header .brand{flex:0 0 32px;width:32px;max-width:32px}
 body.mobile-lean>header .brand-logo{display:none}
 body.mobile-lean>header .mobile-brand-icon{display:block;width:32px;height:32px}
 body.mobile-lean>header .mobile-page-title:not([hidden]){display:block;flex:1;min-width:0;font-size:16px;font-weight:700;line-height:1.25;overflow-wrap:anywhere;color:var(--ink,#244b3e)}
 body.mobile-lean>header .mobile-page-help:not([hidden]){display:block;flex:0 0 auto;min-height:44px;min-width:44px;font-size:12px;padding:8px;background:transparent;color:var(--ink,#244b3e);border:1px solid var(--line,#cbdad1);border-radius:8px}
 body.mobile-lean>header .header-actions{order:3;flex:0 0 auto;margin:0}
 body.mobile-lean>header .mobile-page-help{order:4}
 body.mobile-lean [data-mobile-help],body.mobile-lean #main>[data-survey-help]{display:none!important}
 body.mobile-lean #main>.page-head .eyebrow,body.mobile-lean .company-welcome>.eyebrow,body.mobile-lean .field-welcome .eyebrow{display:none}
 body.mobile-lean.mobile-has-project-menu .rs-heading .eyebrow,body.mobile-lean.mobile-has-project-menu #main>.context{display:none}
 body.mobile-lean.mobile-has-room-save .rs-status{display:none}
 body.mobile-lean.mobile-has-job-back .field-survey-tools>[data-field-home]{display:none}
 body.mobile-lean .field-survey-tools:not(:has(button:not([hidden]))){display:none}
 body.mobile-lean.room-survey-view .field-survey-tools{margin:0}
 body.mobile-lean .task-navigation{border:0;padding:0;margin:0 0 12px;background:transparent}
 body.mobile-lean .task-navigation>.task-context,body.mobile-lean .task-navigation>.task-navigation-row{display:none}
 body.mobile-lean .mobile-task-menu{display:block;border:1px solid var(--line,#cbdad1);border-radius:10px;background:var(--panel,#fff);color:var(--ink,#244b3e)}
 body.mobile-lean .mobile-task-menu>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:56px;padding:8px 12px;cursor:pointer;list-style:none;box-sizing:border-box}
 .mobile-task-menu>summary::-webkit-details-marker{display:none}.mobile-task-menu>summary>span:first-child{min-width:0}
 .mobile-task-site{display:block;font-size:11px;line-height:1.4;overflow-wrap:anywhere;color:var(--muted,#61786e)}
 .mobile-task-menu strong{display:block;font-size:13px;font-weight:650;line-height:1.5}
 .mobile-task-menu>nav{border-top:1px solid var(--line,#cbdad1);padding:8px;max-height:55dvh;overflow-y:auto}
 .mobile-task-group{display:grid;gap:2px}.mobile-task-group>span{font-size:11px;font-weight:700;padding:8px 10px 4px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#61786e)}
 .mobile-task-group>a,.mobile-task-menu>nav>button{display:flex;align-items:center;min-height:44px;box-sizing:border-box;padding:10px;border-radius:7px;font-size:14px;text-decoration:none;color:inherit}
 .mobile-task-group>a[aria-current=page]{background:#e7f2eb;color:#146c56;font-weight:700}.mobile-task-menu>nav>button{margin-top:8px;width:100%}
 body.mobile-lean #main .page-head h1,body.mobile-lean #main .rs-heading h1{font-size:22px;margin:0;line-height:1.25}
 body.mobile-lean #main .page-head{margin-bottom:12px}
 body.mobile-lean .rs-subtitle{margin:3px 0 10px;font-size:12px}
 body.mobile-lean .rs-heading>button{font-size:12px;min-height:44px;max-width:105px;padding:8px 10px}
 body.mobile-lean .rs-no-photo{padding:12px}body.mobile-lean .rs-no-photo>strong{font-size:14px}
 body.mobile-lean .rs-area-actions{margin:8px 0;gap:8px}body.mobile-lean .rs-area-actions>button{min-height:44px;font-size:13px}
 body.mobile-lean .rs-photo-row>button{min-height:44px}
 body.mobile-lean .rs-save{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
 body.mobile-lean.room-survey-view #main{padding-bottom:140px!important}
 body.mobile-lean .field-welcome{display:flex;align-items:center;gap:10px;padding:12px}
 body.mobile-lean .field-welcome h1{font-size:22px;margin:0}
 body.mobile-lean .field-welcome>.actions{margin:0;justify-content:flex-end;flex-wrap:wrap}
 body.mobile-lean .field-welcome .field-options{width:auto}
 body.mobile-lean .field-connection{margin:8px 0;font-size:12px}
 body.mobile-lean .company-welcome h1{font-size:22px;margin:0 0 12px}
 body.mobile-lean .company-welcome{padding:14px!important}
 body.mobile-lean .company-welcome .actions{margin-top:0}
 body.mobile-lean .dashboard-recent .section-head p,body.mobile-lean .dashboard-tools-heading p,body.mobile-lean .company-dashboard>.footer-note,body.mobile-lean .dashboard-workflow{display:none}
 body.mobile-lean .company-page-heading{padding:14px;margin-bottom:14px;gap:12px;flex-wrap:wrap}
 body.mobile-lean .company-page-heading h1{font-size:22px;margin:0}
 body.mobile-lean .company-page-heading p,body.mobile-lean .company-page-heading .eyebrow,body.mobile-lean .company-directory-heading p,body.mobile-lean .company-directory>.section-head p{display:none}
 body.mobile-lean .company-directory-heading{gap:10px;margin-bottom:12px}
 body.mobile-lean .company-directory>.section-head{margin-bottom:12px}
 .mobile-page-help:focus-visible,.mobile-task-menu :is(summary,a,button):focus-visible,.mobile-help-dialog :is(button,a):focus-visible{outline:3px solid #d9aa42;outline-offset:2px}
}
@media print{.mobile-page-title,.mobile-page-help,.mobile-brand-icon,.mobile-task-menu,.mobile-help-dialog{display:none!important}}
@media(max-width:760px){
 body.mobile-lean #main .completion-page-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0!important;border:0;background:transparent;box-shadow:none}
 body.mobile-lean #main .completion-page-heading h1{font-size:20px}
 body.mobile-lean .completion-page-heading .actions{margin:0;flex-shrink:0}
 body.mobile-lean .completion-page-heading button{font-size:12px;min-height:44px;padding:8px 10px}
 body.mobile-lean .completion-navigation>nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 body.mobile-lean .completion-navigation button{display:flex;justify-content:center;text-align:center;min-width:0;min-height:48px;font-size:12px;padding:8px 4px}
 body.mobile-lean .completion-step-number{display:none}
 body.mobile-lean .completion-navigation p{font-size:12px;line-height:1.45;margin-top:7px}
 body.mobile-lean #main .completion-guide{padding:14px!important}
 body.mobile-lean #main .completion-guide h2{font-size:18px;margin:0}
 body.mobile-lean #main .completion-guide .section-head p{font-size:12px;margin:6px 0}
 body.mobile-lean .completion-guide .section-head{margin-bottom:10px}
 body.mobile-lean .completion-guide .actions{gap:7px;margin-top:10px}
 body.mobile-lean .completion-guide [data-completion-current]:empty{display:none}
}
@media(max-width:760px){
 body.mobile-lean #main .completion-page-heading{flex-flow:row nowrap;text-align:left}
 body.mobile-lean #main .completion-page-heading>div:first-child{min-width:0;flex:1}
 body.mobile-lean #main .completion-page-heading h1{color:var(--ink,#244b3e)!important}
 body.mobile-lean #main .completion-page-heading .actions{width:auto;flex:0 0 auto}
 body.mobile-lean.field-dashboard .survey-start-tools{display:none}
}
@media(max-width:760px){
 body.mobile-lean .survey-save-bar #save-state{display:block;font-size:12px;line-height:1.4;flex:1 1 0;min-width:0;white-space:normal;overflow-wrap:anywhere}
 body.mobile-lean .survey-save-bar:has([data-field-save-progress]) #save-state{display:none}
}
/* A section's heading and its buttons share one row on wide screens; on phones the buttons move
   below the heading instead of being squashed beside it ("Add mater…", overlapping room actions). */
@media(max-width:760px){
 body:not(.marketing-home) #main .section-head{flex-wrap:wrap;row-gap:8px}
 body:not(.marketing-home) #main .section-head>:first-child{flex:1 1 180px;min-width:0}
 body:not(.marketing-home) #main .section-head>.actions,body:not(.marketing-home) #main .section-head>div:last-child:not(:first-child){flex:1 1 100%;display:flex;flex-wrap:wrap;gap:8px}
 body:not(.marketing-home) #main .section-head>.actions>*,body:not(.marketing-home) #main .section-head>div:last-child:not(:first-child)>:is(button,a){flex:1 1 auto}
}
