/* All adaptive overrides are scoped to compact viewports. Desktop is unchanged. */
.mobile-quick-details>summary{cursor:pointer}
.mobile-applicant-assessor{display:none}
@media screen and (max-width:700px){
 html:not(.full-desktop-view) .mobile-applicant-assessor{display:block;font-size:13px;font-weight:400;margin-top:6px}
 html:not(.full-desktop-view) .dashboard-record-tools>.mobile-fold{margin:0;min-width:0}
 html:not(.full-desktop-view) .dashboard-record-tools>.mobile-fold>summary{min-height:44px;box-sizing:border-box;padding:12px}
 html:not(.full-desktop-view) .dashboard-record-tools>.mobile-fold>label{display:block;padding:12px}
 html:not(.full-desktop-view) .dashboard-record-tools>.mobile-fold>.dashboard-record-sorting{padding:12px;gap:12px}
 html:not(.full-desktop-view) .mobile-quick-details{margin:12px 0;border:1px solid #ddd;border-radius:10px;background:#fff;min-width:0}
 html:not(.full-desktop-view) .mobile-quick-details>summary{padding:12px;min-height:44px;box-sizing:border-box;font-weight:600}
 html:not(.full-desktop-view) .mobile-quick-details>.panel{margin:0;border:0}
 html:not(.full-desktop-view) .mobile-quick-details>.profiling-timeline{padding:0 12px 12px}
 html:not(.full-desktop-view) .mobile-review-actions .profiling-workflow-actions{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 12px;padding:0;background:transparent;border:0}
 html:not(.full-desktop-view) .mobile-review-actions button{flex:1 1 180px;min-height:44px;margin:0}
 html:not(.full-desktop-view) .mobile-record-task{display:flex;gap:12px;margin:12px 0}
 html:not(.full-desktop-view) .mobile-record-task>button{width:100%;min-height:44px;margin:0}
 html:not(.full-desktop-view) .mobile-quick-record .lead-status-grid{gap:12px}
 html:not(.full-desktop-view) .mobile-quick-record .lead-status-grid :is(dt,dd){margin:0;line-height:1.45}
 html:not(.full-desktop-view) .mobile-quick-record .lead-status-grid dt{font-size:13px}
 html:not(.full-desktop-view) .mobile-quick-record .lead-status-grid dd{font-size:16px;margin-top:4px;overflow-wrap:anywhere}
 html:not(.full-desktop-view) .compact-work-task{gap:12px!important;padding:12px!important}
 html:not(.full-desktop-view) .compact-work-task :is(.task-summary,.manual-task-meta){margin:6px 0}
 html:not(.full-desktop-view) .compact-work-task .actions{margin:0;padding:0;background:transparent}
 html:not(.full-desktop-view) .compact-work-task .crm-candidate-avatar{width:32px;height:32px;min-width:32px}
}
body .mobile-record-list>.mobile-list-sort{display:none}
.mobile-cell-value{display:contents}

/* Payments use compact selectors and separate, padded records on phones. */
@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .office-section-tabs:has(~ .payment-parity-sheet){display:none}
 html:not(.full-desktop-view) .payment-parity-tabs{display:block;border:0;padding:0;margin:0 0 12px;background:transparent}
 html:not(.full-desktop-view) .payment-parity-tabs>button{display:none}
 html:not(.full-desktop-view) .payment-parity-tabs>.mobile-section-picker{margin:0;display:block;font-size:13px}
 html:not(.full-desktop-view) .payment-parity-tabs select{display:block;width:100%;margin-top:6px}
 html:not(.full-desktop-view) .payment-parity-sheet{padding:12px;border:1px solid #d8d9dd;border-radius:12px;min-width:0}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-list{padding:12px;margin:0;box-sizing:border-box}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table{display:block;width:100%;min-width:0}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table tbody{display:grid;gap:12px}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table tbody tr{display:block;padding:16px;border:1px solid #d8d9dd;border-radius:10px;background:#fff;min-width:0}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table tbody td{padding:6px 0;margin:0;border:0;min-width:0;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table tbody td:first-child{padding-top:0;padding-bottom:12px;margin-bottom:6px;border-bottom:1px solid #eee}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table tbody td:first-child:before{display:none}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table td:first-child .link{font-size:16px;font-weight:700;text-align:left}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table td .actions{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-top:12px}
 html:not(.full-desktop-view) .payment-parity-sheet .dashboard-detail-table td .actions>button{width:100%;min-height:44px;white-space:normal;margin:0}
 html:not(.full-desktop-view) .payment-parity-sheet .qb-table-status{padding:12px;gap:12px;font-size:13px;flex-wrap:wrap}
}

/* CRM phone layouts: readable records without squeezing desktop columns. */
@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) :is(.heading,.panelhead){margin-bottom:12px;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .panelhead{margin-bottom:0;padding:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .panelbody{padding:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .heading h1{font-size:24px;line-height:1.25}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .metrics{gap:12px;margin-bottom:16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .metric{padding:12px;min-width:0;overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .metric .value{font-size:clamp(18px,5vw,24px);line-height:1.2;margin:8px 0;font-variant-numeric:tabular-nums}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .metric .label{font-size:13px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .filters{display:grid;grid-template-columns:minmax(0,1fr);align-items:end;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .filters>label{min-width:0;width:100%;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .filters :is(input:not([type=checkbox]),select){width:100%;min-width:0;max-width:100%;margin:0;min-height:44px;height:auto}
 html:not(.full-desktop-view) body:not(.portfolio-mode) :is(.task-panel-body,.taskmain,.record-tab-panel,.lead-record-layout>*,.communication-workspace-layout>*){min-width:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .task{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px;padding:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .taskmain{flex:1 1 180px;overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .task .actions{width:100%;justify-content:flex-start;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .task .actions>button{flex:1 1 120px;white-space:normal;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .task .badge{display:inline-block;white-space:normal}
 html:not(.full-desktop-view) body:not(.portfolio-mode) :is(.lead-status-grid,.lead-record-layout){grid-template-columns:minmax(0,1fr);gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) :is(.lead-finance-focus,.lead-followup-section){padding:12px;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) :is(.lead-task-actions,.lead-save-actions,.profile-actions){display:flex;flex-wrap:wrap;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) :is(.lead-task-actions,.lead-save-actions,.profile-actions)>button{flex:1 1 130px;white-space:normal;margin:0}
 html:not(.full-desktop-view) :is(dialog,.profile-dialog){padding:16px;box-sizing:border-box}
 html:not(.full-desktop-view) dialog :is(form,label,.formgrid>*){min-width:0;max-width:100%}
 html:not(.full-desktop-view) dialog :is(button,a){overflow-wrap:anywhere;white-space:normal}
 html:not(.full-desktop-view) .mobile-record-list{overflow:visible;min-width:0;width:100%}
 html:not(.full-desktop-view) .mobile-record-list>table{display:block;min-width:0!important;width:100%;table-layout:auto}
 html:not(.full-desktop-view) .mobile-record-list thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 html:not(.full-desktop-view) .mobile-record-list thead button{visibility:hidden}
 html:not(.full-desktop-view) .mobile-record-list tbody{display:grid;gap:12px}
 html:not(.full-desktop-view) .mobile-record-list tbody>tr{display:block;min-width:0;padding:8px 12px;border:1px solid #ddd;border-radius:8px;background:#fff}
 html:not(.full-desktop-view) .mobile-record-list td{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:12px;width:auto!important;min-width:0!important;padding:8px 0;border:0;border-bottom:1px solid #eee;white-space:normal;overflow-wrap:anywhere;font-size:14px;text-align:left}
 html:not(.full-desktop-view) .mobile-record-list td:before{content:attr(data-label);font-size:12px;font-weight:600;line-height:1.5;color:#606167}
 html:not(.full-desktop-view) .mobile-record-list td:first-child{font-weight:600}
 html:not(.full-desktop-view) .mobile-record-list td:last-child{border-bottom:0}
 html:not(.full-desktop-view) .mobile-record-list td:is([data-label=""],[colspan]){display:block}
 html:not(.full-desktop-view) .mobile-record-list td:is([data-label=""],[colspan]):before{display:none}
 html:not(.full-desktop-view) .mobile-cell-value{display:block;min-width:0;max-width:100%;overflow-wrap:anywhere}
 html:not(.full-desktop-view) .mobile-cell-value :is(button,a,small,.badge){max-width:100%;white-space:normal;overflow-wrap:anywhere}
 html:not(.full-desktop-view) .mobile-cell-value .actions{display:flex;flex-direction:column;align-items:stretch;gap:12px}
 html:not(.full-desktop-view) .mobile-cell-value button{margin:0}
 html:not(.full-desktop-view) body .mobile-record-list>.mobile-list-sort{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:0 0 12px;padding:12px;box-sizing:border-box;font-size:13px}
 html:not(.full-desktop-view) .mobile-list-sort select{flex:none;width:100%;min-width:0;max-width:100%;min-height:44px;box-sizing:border-box;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-command-bar{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-navigation{display:flex;flex-wrap:wrap;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-navigation h2{flex:1 0 100%;font-size:17px;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-controls select{width:100%;min-width:0;max-width:100%}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-controls>button{grid-column:1/-1}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-agenda{padding:12px;min-height:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-agenda .calendar-tile{width:100%;padding:12px;white-space:normal;overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-agenda .calendar-tile :is(strong,small){white-space:normal;font-size:14px}
 html:not(.full-desktop-view) :is(.calendar-time-scroll,.calendar-month-grid){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .calendar-footer{display:flex;flex-wrap:wrap;gap:12px;padding:12px}
 html:not(.full-desktop-view) :is(.communication-email-body,.communication-email-metadata,.chat-bubble){overflow-wrap:anywhere}
 html:not(.full-desktop-view) #toast{bottom:calc(80px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);z-index:110}
}

.mobile-bottom-nav,.mobile-menu-button,.mobile-section-picker,.mobile-return-button{display:none}
.full-desktop-view .mobile-return-button:not([hidden]){display:block;position:fixed;bottom:16px;right:16px;z-index:1000;background:#fff;border:2px solid var(--red,#bd1e2d);padding:16px;font-size:18px}
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) .shell{display:block;min-width:0}
 html:not(.full-desktop-view) .sidebar{display:none!important}
 html:not(.full-desktop-view) .sidebar-calendar{display:none!important}
 html:not(.full-desktop-view) .content{width:100%;max-width:none;padding:20px 24px 104px;box-sizing:border-box}
 html:not(.full-desktop-view) .shell>div,html:not(.full-desktop-view) #content{min-width:0;max-width:100%}
 html:not(.full-desktop-view) .topbar{position:relative;display:flex;flex-wrap:wrap;gap:12px;padding:16px 24px;height:auto;min-height:64px}
 html:not(.full-desktop-view) .mobile-menu-button{display:block;margin-left:auto;min-height:44px}
 html:not(.full-desktop-view) .mobile-bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:100;background:white;border-top:1px solid #ddd;padding:8px 12px calc(8px + env(safe-area-inset-bottom));gap:12px;box-shadow:0 -3px 16px #00000008}
 .mobile-bottom-nav button{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:52px;border:0;background:white;color:#555;font-size:12px;padding:5px}
 .mobile-bottom-nav button[aria-current=page]{color:var(--red,#bd1e2d);background:#fff3f4;font-weight:700}
 .mobile-bottom-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 html:not(.full-desktop-view) .mobile-section-picker{display:flex;align-items:center;gap:12px;margin:16px 0;font-weight:600}
 .mobile-section-picker select{flex:1;min-width:0;margin:0;min-height:48px;font-size:16px;background:#fff;border:1px solid #ccc;border-radius:8px;padding:10px}
 html:not(.full-desktop-view) .portal-tabs,html:not(.full-desktop-view) .record-tabs{display:block!important;padding:0;background:transparent;border:0;overflow:visible}
 html:not(.full-desktop-view) :is(.portal-tabs,.record-tabs)>button{display:none!important}
 html:not(.full-desktop-view) :is(.actions,.record-quick-actions,.portfolio-overview-actions){gap:12px!important;flex-wrap:wrap}
 html:not(.full-desktop-view) :is(button,input,select){min-height:44px}
 html:not(.full-desktop-view) :is(input,select,textarea){font-size:16px;max-width:100%;box-sizing:border-box}
 html:not(.full-desktop-view) :is(.portal-profile,.portal-panel,.panel,.panelbody,.panelhead){min-width:0;box-sizing:border-box}
 html:not(.full-desktop-view) :is(.tablewrap,.table-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
 html:not(.full-desktop-view) :is(video,iframe,img){max-width:100%}
 .mobile-navigation-dialog{width:min(440px,calc(100vw - 32px));max-height:80dvh;padding:24px;box-sizing:border-box;background:white;color:#333}
 .mobile-navigation-dialog::backdrop{background:#25252599}
 .mobile-menu-links{display:grid;gap:12px;margin:20px 0}
 .mobile-menu-links button{text-align:left;min-height:48px}
 .mobile-menu-links button{display:flex;align-items:center;gap:12px}
 .mobile-menu-links button>svg{width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 html:not(.full-desktop-view) .assessor-daily-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 html:not(.full-desktop-view) dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px)}
}

@media screen and (max-width:700px){
 html:not(.full-desktop-view) .content{padding:16px 12px 104px}
 html:not(.full-desktop-view) .topbar{padding:12px;gap:12px}
 html:not(.full-desktop-view) #crm-search{order:10;flex:1 0 100%;width:100%;max-width:none}
 html:not(.full-desktop-view) #greeting{font-size:15px}
 html:not(.full-desktop-view) .portal-header-brand{min-width:0;flex:1}
 html:not(.full-desktop-view) .portal-header-brand img{max-width:100px}
 html:not(.full-desktop-view) .portal-header-brand strong{display:none}
 html:not(.full-desktop-view) .portal-profile{display:flex;flex-wrap:wrap;gap:12px;padding:16px;margin:0 0 16px}
 html:not(.full-desktop-view) .portal-profile-info{flex:1;min-width:180px}
 html:not(.full-desktop-view) .portal-profile-photo{width:56px;height:56px}
 html:not(.full-desktop-view) .portal-profile h2{font-size:20px;line-height:1.3}
 html:not(.full-desktop-view) .portal-progress{flex:1 0 100%;width:100%;margin:0}
 html:not(.full-desktop-view) :is(.portal-overview-pair,.portfolio-overview-grid,.candidate-detail-grid,.evidence-review-layout,.evidence-file-grid,.portal-contact-grid,.portal-doc-grid,.witness-assessor-layout,.witness-form-grid,.iqa-sample-grid,.iqa-final-signoff-grid,.assessor-daily-columns,.formgrid,.grid){display:grid;grid-template-columns:minmax(0,1fr)!important;gap:16px}
 html:not(.full-desktop-view) :is(.assessor-vitals,.metrics,.statline){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 html:not(.full-desktop-view) :is(.portal-panel,.panelbody,.panelhead){padding:16px}
 html:not(.full-desktop-view) :is(.heading,.panelhead,.portfolio-task){flex-wrap:wrap;gap:12px}
 html:not(.full-desktop-view) .portfolio-task>button{width:100%;margin:0}
 html:not(.full-desktop-view) :is(.portal-journey-tools,.filters){flex-wrap:wrap;gap:12px}
 html:not(.full-desktop-view) :is(.heading h1,.panelhead h2){min-width:0;overflow-wrap:anywhere}
 html:not(.full-desktop-view) .communication-workspace-layout{grid-template-columns:minmax(0,1fr)}
 html:not(.full-desktop-view) textarea{min-height:96px}
 html:not(.full-desktop-view) .candidate-daily-fact{font-size:13px}
}
@media print{.mobile-bottom-nav,.mobile-menu-button,.mobile-section-picker,.mobile-return-button{display:none!important}}


/* Keep acting-user warnings visible without covering the portfolio. */
.mobile-mode-details{display:none!important}
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) #preview.preview-banner{
  position:static!important;inset:auto!important;transform:none!important;z-index:auto;
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;
  width:auto;max-width:100%;padding:12px;margin:0 0 12px;
  background:#f5f5f5;color:#303236;border:1px solid #d4d4d4;border-left:4px solid #b82429;border-radius:8px;box-shadow:none;
 }
 html:not(.full-desktop-view) #preview #preview-label{grid-column:1;grid-row:1;font-size:14px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
 html:not(.full-desktop-view) #preview #exit-preview{grid-column:2;grid-row:1;font-size:13px;min-height:44px;padding:8px 12px;margin:0;white-space:normal;max-width:112px}
 html:not(.full-desktop-view) #preview .mobile-mode-details{display:block!important;grid-column:1/-1;grid-row:2;justify-self:start;min-height:44px;margin:0;padding:8px 12px;font-size:13px}
 html:not(.full-desktop-view) #preview p{grid-column:1/-1;grid-row:auto;margin:0;font-size:13px;line-height:1.5}
 html:not(.full-desktop-view) #preview:has(.mobile-mode-details):not(.mobile-mode-expanded) p{display:none}
 html:not(.full-desktop-view) #preview #start-test-as{grid-column:1/-1;grid-row:auto;white-space:normal;justify-self:start;margin:0}
}
/* Mobile workspaces: compact summaries and contextual section navigation. */
.mobile-brand,.mobile-search-button,.mobile-back-button,.mobile-profile-toggle,.mobile-chat-link,.mobile-task-arrow{display:none}
.mobile-fold{display:contents}
.mobile-fold>summary{display:none}
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar{display:flex;align-items:center;flex-wrap:wrap;padding:8px 12px;min-height:60px;gap:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar>:not(.mobile-brand):not(.mobile-menu-button):not(.mobile-search-button):not(.mobile-back-button):not(#crm-search):not(.workspace-search):not(.workspace-viewing-mobile):not(#header-new){display:none!important}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar .mobile-brand{display:block;width:142px;max-width:40vw;height:auto;margin-right:auto}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar :is(.mobile-menu-button,.mobile-search-button,.mobile-back-button){display:block;min-height:44px;margin:0;padding:8px 10px;font-size:14px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar .mobile-back-button:not([hidden])~.mobile-brand{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar #crm-search{display:none!important}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar.mobile-search-open #crm-search{display:block!important;flex:1 0 100%;order:10;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .staging-notice{margin:0 0 8px!important;padding:4px 8px!important;font-size:11px;background:#eee!important;color:#555!important;border-radius:4px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview.preview-banner{grid-template-columns:minmax(0,1fr) auto auto;gap:12px;padding:6px 8px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview #preview-label{font-size:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview #exit-preview{grid-column:3;font-size:12px;padding:6px;max-width:75px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview .mobile-mode-details{grid-column:2;grid-row:1;font-size:12px;padding:6px;max-width:60px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px 12px;padding:12px;margin:0 0 12px;align-items:start;background:#fff;border:1px solid #ddd;border-radius:8px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile .portal-photo-section{width:64px;margin:0;min-width:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile .portal-profile-photo{width:64px;height:64px;margin:0;min-width:0;flex-basis:64px;font-size:22px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile .profile-photo-button{padding:0;min-height:44px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile-info{min-width:0;position:relative}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile h2{font-size:18px;line-height:1.3;margin:0 0 4px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile-info>p{font-size:13px;line-height:1.4;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile:not(.mobile-profile-expanded) .portal-profile-info>:is(small,.candidate-daily-fact){display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile.mobile-profile-expanded .portal-profile-info>p{display:block}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-profile-toggle{display:block;min-height:44px;font-size:12px;padding:6px 0;margin:0;border:0;background:none;text-decoration:underline}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile .portal-progress{grid-column:1/-1;width:100%;padding:0;border:0;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .assessment-progress-summary{display:grid;grid-template-columns:auto 1fr;gap:4px 8px;align-items:center}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .assessment-progress-summary strong{font-size:18px;line-height:1.2;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .assessment-progress-summary span{font-size:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .assessment-progress-summary progress{grid-column:1/-1;width:100%;height:5px;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .assessment-progress-summary small{grid-column:1/-1;font-size:11px;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-journey-tools{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-tabs.portal-tabs{display:none!important}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-content-sheet{padding:12px;min-height:0;border:0;background:transparent}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-content-sheet>.heading{margin:0 0 12px;gap:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-content-sheet>.heading h1{font-size:20px;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-fold{display:block;border:1px solid #ddd;background:#fff;border-radius:8px;margin:0 0 12px;overflow:hidden}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-fold>summary{display:flex;min-height:44px;box-sizing:border-box;padding:12px;font-size:14px;font-weight:600;background:#fff;cursor:pointer}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-fold>summary:after{content:'+';margin-left:auto}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-fold[open]>summary:after{content:'−'}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-fold>.portfolio-progress{margin:0;border:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-progress>header{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-journey-strip{display:grid;grid-template-columns:1fr!important;padding:0 12px;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-journey-strip li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:0 12px;align-items:center;padding:8px 0;border-top:1px solid #eee}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .journey-progress-circle{width:26px;height:26px;font-size:13px;grid-row:1/3}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .journey-link{min-height:44px;text-align:left;font-size:14px;padding:4px 0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-journey-strip small{grid-column:2;text-align:left;font-size:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-overview-pair{display:block}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-overview-card{margin:0 0 12px;border:1px solid #ddd}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-overview-card .panelhead{padding:12px;background:#f7f7f7}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-overview-card .panelhead h2{font-size:16px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-overview-card .panelbody{padding:0 12px 12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-task{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:12px;align-items:center;padding:12px 0;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-task h4{font-size:14px;margin:0 0 4px;line-height:1.4}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-task p{font-size:13px;line-height:1.45;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-task>button{width:44px;min-height:44px;padding:6px;margin:0;background:#f5f5f5;color:#333;border:1px solid #ddd}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-task-label{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-task-arrow{display:inline;font-size:24px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-task-group-title{font-size:13px;margin:12px 0 0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-waiting-tasks{padding:0 12px;border:0;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-waiting-tasks>h3{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-overview-messages{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-chat-link{display:block;width:100%;min-height:44px;margin:0 0 12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav{gap:12px;padding:6px 8px calc(6px + env(safe-area-inset-bottom));align-items:center}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav button{font-size:11px;min-height:48px;padding:4px;min-width:0;border:0;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav.mobile-portfolio-nav{display:grid;grid-template-columns:minmax(0,1fr) 72px;gap:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-section-rail{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x proximity;overscroll-behavior-inline:contain;padding-right:24px;scrollbar-width:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-section-rail button{flex:0 0 82px;scroll-snap-align:start;white-space:nowrap;font-size:13px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-portfolio-nav>button{border-left:1px solid #ddd;border-radius:0;font-size:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .message-input-row{display:flex;gap:12px;align-items:end}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .message-input-row textarea{min-height:44px!important;max-height:140px;margin:0;min-width:0;font-size:16px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-full-messages .portal-message-compose{position:sticky;bottom:76px;background:#fff;padding:8px 0;z-index:5}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-workspace-layout{display:block}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-conversations{max-height:220px;overflow:auto}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .content{padding:12px 12px 100px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #status:empty{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-overview-actions{margin:12px 0 0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portfolio-overview-actions button{font-size:13px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-overview-sheet{display:flex;flex-direction:column;padding:0}
 html:not(.full-desktop-view) .mobile-overview-sheet> *{order:2}
 html:not(.full-desktop-view) .mobile-overview-sheet>.heading{order:0}
 html:not(.full-desktop-view) .mobile-overview-sheet>.portal-overview-pair{order:1}
 html:not(.full-desktop-view) #preview .mobile-mode-details{white-space:normal;overflow-wrap:anywhere}
 html:not(.full-desktop-view) #preview #support-enable{grid-column:1/-1;grid-row:auto;white-space:normal;justify-self:start}
 html:not(.full-desktop-view) .mobile-bottom-nav button{position:relative}
 html:not(.full-desktop-view) .mobile-unread-badge{position:absolute;right:2px;top:0;border-radius:9px;padding:1px 4px;background:#bd1e2d;color:white;font-size:10px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .candidate-overview-card .panelhead{min-height:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-profile-info>p:not(.candidate-daily-fact){margin:0}
}
@media print{.mobile-brand,.mobile-search-button,.mobile-back-button,.mobile-profile-toggle,.mobile-chat-link,.mobile-task-arrow{display:none!important}}
/* The CRM uses the same swipe gesture as portfolio sections. */
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav.mobile-crm-nav{display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-crm-rail{min-width:0;touch-action:pan-x; -webkit-overflow-scrolling:touch;scrollbar-width:thin}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-crm-rail button{flex:0 0 86px;min-height:52px;white-space:normal;font-size:12px;line-height:1.25}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-crm-nav>button{border-left:1px solid #ddd;border-radius:0;font-size:12px}
}
/* Opaque edge-to-edge footer, shared by CRM and portfolio navigation. */
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav{
  left:0;right:0;bottom:0;width:auto;
  padding:6px 12px calc(6px + env(safe-area-inset-bottom));gap:12px;
  border:0;border-top:1px solid #e1e1e1;border-radius:0;
  background:#fff;box-shadow:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;
 }
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav:is(.mobile-crm-nav,.mobile-portfolio-nav){grid-template-columns:minmax(0,1fr) 58px;gap:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav button{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  height:52px;min-height:52px;min-width:44px;padding:5px 6px;margin:0;
  border:0;border-radius:27px;background:transparent;color:#37383b;font-size:11px;font-weight:500;line-height:1.2;
 }
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-section-rail{
  min-width:0;gap:12px;padding:0 16px 0 0;scrollbar-width:none;
  touch-action:pan-x;-webkit-overflow-scrolling:touch;
 }
 html:not(.full-desktop-view) .mobile-section-rail::-webkit-scrollbar{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-section-rail button{flex:0 0 72px;white-space:normal}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav button[aria-current=page]{background:#e8e8e8;color:#b82429;font-weight:700}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav button:focus-visible{outline:2px solid #b82429;outline-offset:-3px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav svg{width:21px;height:21px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-nav-label{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:14px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav>button{border:0;border-radius:27px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .content{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-unread-badge{right:4px;top:2px;min-width:15px;line-height:13px}
}










/* Column layout must not turn the desktop text flex basis into row height. */
@media screen and (max-width:700px){
 html:not(.full-desktop-view) .portfolio-mode .portal-evidence-used .portal-guidance-unit{align-items:flex-start;box-sizing:border-box;margin:0;gap:4px}
 html:not(.full-desktop-view) .portfolio-mode .portal-evidence-used .portal-guidance-unit>strong,
 html:not(.full-desktop-view) .portfolio-mode .portal-evidence-used .portal-guidance-unit>span{flex:0 1 auto;min-width:0}
 html:not(.full-desktop-view) .portfolio-mode .portal-evidence-used>ul{padding:4px 14px 14px}
}

/* Compact portfolio headings, candidate controls and conversations. */
@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .candidate-export-actions>button:nth-child(n+2){display:none}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .candidate-toolbar-top{flex-wrap:wrap;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .company-group-toggle{min-height:44px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .company-group-toggle input[role=switch]{min-height:22px;height:22px;width:38px;min-width:38px;flex:0 0 38px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .chat-history{padding:12px;gap:12px;min-height:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .chat-row{max-width:100%;gap:8px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .chat-bubble{min-width:0;max-width:100%;box-sizing:border-box;padding:10px 12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .communication-email-body{margin:8px 0;line-height:1.5}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .communication-day{margin:12px 0 4px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .portal-message-compose,
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .portal-full-messages .portal-message-compose{position:static;bottom:auto;padding:12px;z-index:auto;border-radius:0 0 12px 12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .message-input-row{align-items:center;gap:12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .message-input-row>textarea{height:44px;min-height:44px!important;flex:1;min-width:0;width:0;box-sizing:border-box}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .message-input-row>button{flex-shrink:0;min-height:44px;margin:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .communication-timeline .message-compose-actions{margin-top:8px;font-size:11px;line-height:1.4}
}
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) .mobile-contact-link{color:inherit;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
}

.mobile-candidate-cards{display:none}
@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload>.heading{margin:0 0 12px;gap:8px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload>.heading h1{font-size:24px;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .candidate-live-total{font-size:13px;border:0;padding:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload>.candidate-view-tabs{display:none}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .candidate-toolbar{margin:0 0 12px;border:1px solid #ddd;border-radius:8px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .candidate-toolbar-top{padding:10px 12px;border:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .company-group-toggle{display:none}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .candidate-toolbar>.mobile-fold{border:0;border-top:1px solid #eee;border-radius:0;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .candidate-toolbar-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px;align-items:end}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .candidate-toolbar-filters>label{min-width:0;margin:0;gap:6px;font-size:13px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .assessor-caseload .candidate-toolbar-filters select{width:100%;height:44px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .candidate-list-results>:not(.mobile-candidate-cards){display:none}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-cards{display:grid;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-card{padding:12px;border:1px solid #ddd;border-radius:10px;background:#fff;min-width:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-open{display:flex;align-items:center;gap:12px;width:100%;min-width:0;padding:0;margin:0;border:0;background:none;box-shadow:none;color:#303238;text-align:left;white-space:normal}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-open>:first-child{flex:0 0 56px;width:56px;height:56px;min-width:56px;border-radius:50%;object-fit:cover}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-copy{display:grid;gap:4px;min-width:0;font-weight:400;line-height:1.4}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-copy>strong{font-size:16px;overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-copy>span{font-size:13px;color:#61646b;overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-progress{margin:10px 0 0 68px;min-width:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-progress .overall-assessment{width:100%;min-width:0;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-progress .overall-assessment-label{display:none}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-progress .overall-assessment-meter{display:flex;align-items:center;gap:8px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-progress progress{width:100%;min-width:0;flex:1;height:7px;accent-color:#393a3e}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-candidate-progress strong{font-size:12px;min-width:30px}
}



.mobile-overview-title{display:none}
@media screen and (max-width:700px){
 html:not(.full-desktop-view) .mobile-overview-sheet>.heading>h1>.mobile-overview-desktop-title{display:none}
 html:not(.full-desktop-view) .mobile-overview-sheet>.heading>h1>.mobile-overview-title{display:inline}
}

/* Evidence matrices retain one shared column layout while scrolling on phones. */
@media screen and (max-width:700px){
 html:not(.full-desktop-view) .portal-matrix-wrap{min-width:0;max-width:100%;width:100%;box-sizing:border-box;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
}

.message-recipient-label{display:block;font-size:14px;font-weight:600;line-height:1.4;margin:0 0 10px;color:#37383b}
@media screen and (max-width:700px){
 html:not(.full-desktop-view) .portal-app .observation-status-overview{padding:14px;gap:12px}
 html:not(.full-desktop-view) .portal-app .observation-status-overview .observation-status-summary>p{font-size:14px;line-height:1.5;margin:8px 0}
 html:not(.full-desktop-view) .portal-app .observation-status-overview .observation-status-signature{padding:12px 0 0;min-height:0;text-align:left}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.witness-banner-signatures,.induction-signatures>div){display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.witness-banner-signature,.induction-signatures figure,.observation-status-signature:has(>.observation-signer)){display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:6px 12px;align-items:center;text-align:left;min-width:0;margin:0}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.witness-banner-signature,.induction-signatures figure)>:is(h3,h4){grid-column:1;margin:0;font-size:13px}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.witness-banner-identity,.induction-signer,.observation-status-signature>.observation-signer){grid-column:1;margin:0;padding:0;width:100%;justify-content:flex-start;text-align:left}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.observation-signer,.induction-signer){display:flex;justify-content:flex-start;gap:8px;text-align:left}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.observation-signer,.induction-signer)>div{display:grid;gap:3px;min-width:0;flex:1}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.observation-signer-avatar,.induction-signer-avatar){width:32px;height:32px;flex:0 0 32px;font-size:12px}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.observation-signer,.induction-signer) strong{font-size:14px;line-height:1.4}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.observation-signer,.induction-signer) span:not([class$="-avatar"]){font-size:12px;line-height:1.4}
 html:not(.full-desktop-view) .portal-app .observation-status-overview .saved-declaration-signature{width:90px;max-width:90px;height:48px;margin:0;object-fit:contain;padding:0}
 html:not(.full-desktop-view) .portal-app .observation-status-overview :is(.witness-banner-signature,.induction-signatures figure)>.saved-declaration-signature,
 html:not(.full-desktop-view) .portal-app .observation-status-overview .induction-signatures figure>[data-saved-signature],
 html:not(.full-desktop-view) .portal-app .observation-status-signature:has(>.observation-signer)>.saved-declaration-signature,
 html:not(.full-desktop-view) .portal-app .observation-status-signature:has(>.observation-signer)>div:not(.observation-signer){grid-column:2;grid-row:1/3;justify-self:end}
 html:not(.full-desktop-view) .portal-app .observation-status-signature:has(>.observation-signer)>h3{grid-column:1;margin:0;font-size:13px}
 html:not(.full-desktop-view) .message-recipient-label{font-size:14px;margin:0 0 8px}
}

/* Director mobile Home: scoped so desktop dashboards retain their layout. */
@media(max-width:1100px){
html:not(.full-desktop-view) .director-home{display:grid;gap:12px;min-width:0}
html:not(.full-desktop-view) .director-home .panel{margin:0;min-width:0}
html:not(.full-desktop-view) .director-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html:not(.full-desktop-view) .director-metrics .metric{min-width:0;text-align:left;white-space:normal}
html:not(.full-desktop-view) .director-metrics .value{font-size:clamp(20px,5vw,28px);overflow-wrap:anywhere}
html:not(.full-desktop-view) .director-metrics small{display:block;font-size:12px;line-height:1.5}
html:not(.full-desktop-view) .director-money{grid-column:1/-1}
html:not(.full-desktop-view) .director-status-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:10px 0;border-bottom:1px solid #eee;font-size:13px}
html:not(.full-desktop-view) .director-status-row strong{text-align:right;overflow-wrap:anywhere}
html:not(.full-desktop-view) .director-home .muted{font-size:12px;line-height:1.5}
html:not(.full-desktop-view) .director-home .office-action-row{gap:12px;width:100%;white-space:normal;text-align:left}
}

@media(max-width:1100px){
html:not(.full-desktop-view) .director-proformas{grid-column:1/-1}
html:not(.full-desktop-view) .director-home .office-action-row strong{font-size:17px;flex-shrink:0;white-space:nowrap}
html:not(.full-desktop-view) .director-home .office-task-preview>div{min-width:0;flex:1}
html:not(.full-desktop-view) .director-home .office-task-preview>button{flex-shrink:0;white-space:nowrap;min-width:64px}
html:not(.full-desktop-view) .director-home summary{padding:12px 0;cursor:pointer;font-size:13px}
}

/* Quiet email expansion control; keep the full desktop presentation. */
.email-expand-mobile{display:none}
@media(max-width:1100px){
 html:not(.full-desktop-view) .communication-email-actions button.email-expand-toggle{
  background:transparent!important;border:0!important;box-shadow:none!important;
  padding:6px 0!important;min-height:44px;min-width:44px;width:auto;
  color:#62646b;font-size:13px;font-weight:400;text-decoration:none!important;
  display:inline-flex;align-items:center;gap:7px;border-radius:3px;
 }
 html:not(.full-desktop-view) .email-expand-toggle .email-expand-desktop{display:none}
 html:not(.full-desktop-view) .email-expand-toggle .email-expand-mobile{display:inline}
 html:not(.full-desktop-view) .email-expand-toggle::after{
  content:'';width:6px;height:6px;border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-top:-3px;
 }
 html:not(.full-desktop-view) .email-expand-toggle[aria-expanded="true"]::after{transform:rotate(225deg);margin-top:3px}
 html:not(.full-desktop-view) .email-expand-toggle:focus-visible{outline:2px solid #a52c2c;outline-offset:3px}
}

@media screen and (max-width:1100px){html:not(.full-desktop-view) :is(body.portfolio-mode,body) .topbar .mobile-back-button:not([hidden]){display:inline-flex;align-items:center;gap:8px}}

/* Compact acting identity: expand for mode details and optional actions. */
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview.preview-banner{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:4px 8px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview #preview-label{display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview .mobile-mode-details{grid-column:1;grid-row:1;display:block!important;min-width:0;max-width:none;width:100%;min-height:44px;margin:0;padding:6px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview #exit-preview{grid-column:2;grid-row:1;min-height:44px;max-width:none;margin:0;padding:6px 12px;font-size:0}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview #exit-preview::after{content:'Exit';font-size:13px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview:not(.mobile-mode-expanded) :is(#support-enable,#start-test-as){display:none}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) #preview.mobile-mode-expanded :is(p,#support-enable,#start-test-as){grid-column:1/-1;grid-row:auto}
}



/* Stats keeps compact controls readable without changing desktop reports. */
@media screen and (max-width:1024px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel>.panelhead{flex-wrap:nowrap!important;align-items:center;gap:12px;padding:16px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel>.panelhead h2{flex:1 1 0;min-width:0;width:auto!important;margin:0;line-height:1.35;overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel>.panelhead>.compact-action-menu{flex:0 0 44px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel>.panelbody{padding:16px!important}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vitals{gap:12px;margin-bottom:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vital{min-width:0;padding:14px;gap:10px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vital :is(span,small){max-width:100%;overflow-wrap:anywhere;line-height:1.4}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-count{min-width:44px!important;min-height:44px!important;line-height:1.25;touch-action:manipulation}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .barlabel{align-items:center;gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .performance-bars[aria-label="Current caseload by qualification"] .barlabel{display:grid;grid-template-columns:minmax(0,1fr) 44px 48px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .performance-bars[aria-label="Current caseload by qualification"] .barlabel>span{text-align:right}
 html:not(.full-desktop-view) .stats-record-dialog :is(input:not([type=checkbox]),select,button){min-height:44px}
}
@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-comparison{grid-column:1/-1}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .panelhead h2{font-size:16px}
}
@media screen and (max-width:380px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vitals{grid-template-columns:minmax(0,1fr)}
}

/* Stats: compact reports share the CRM's 12px/16px spacing rhythm. */
@media screen and (max-width:1024px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-body{display:grid;gap:16px;min-width:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-body>.stats-panel{margin:0;min-width:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-body>p{margin:0;line-height:1.6}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end;margin:0 0 16px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-filters>label{min-width:0;width:100%;margin:0;gap:6px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-filters>label:has([name="myStatsReport"]){grid-column:1/-1}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-filters:has(>label:nth-child(4))>label:has([name="myStatsReport"]){grid-column:auto}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-filters select{width:100%;max-width:100%;min-width:0;min-height:44px;height:auto;margin:0;font-size:16px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .compact-action-trigger{min-width:44px;min-height:44px}
}
@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vitals{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vital{padding:12px;gap:8px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vital>span{font-size:13px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .assessor-vital>strong>.stats-count{font-size:30px!important}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-monthly-list:not(.stats-history-list){max-height:none!important;overflow:visible!important;padding:0!important}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .performance-row{margin:0 0 12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .performance-row:last-child{margin-bottom:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .barlabel{margin-bottom:4px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-averages-list{overflow:visible}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list>table{display:table;width:100%;min-width:0!important;table-layout:fixed}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list thead{display:table-header-group;position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list tbody{display:table-row-group}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list :is(thead,tbody)>tr{display:table-row;padding:0;border:0;background:transparent}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list :is(th,td){display:table-cell;width:auto!important;min-width:0!important;padding:10px 6px;vertical-align:middle;border-bottom:1px solid #e3e5e9;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:normal}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list :is(th,td):first-child{width:34%!important;padding-left:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list :is(th,td):last-child{text-align:right;padding-right:0;width:30%!important}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list td:before{display:none}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list tbody>tr:last-child>td{border-bottom:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list td:first-child .mobile-cell-value{overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-averages-list .stats-count{text-align:center}
}

@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-monthly-list .performance-row{display:grid;grid-template-columns:minmax(90px,1.15fr) minmax(0,1fr) 44px;align-items:center;gap:8px;margin-bottom:8px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-monthly-list .barlabel{display:contents}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-monthly-list .barlabel>span{grid-column:1;grid-row:1;line-height:1.4;font-size:13px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-monthly-list .stats-count{grid-column:3;grid-row:1;text-align:center}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .stats-panel .stats-monthly-list .track{grid-column:2;grid-row:1;width:100%}
}


/* Compact CRM identity headers and a single row of mobile navigation controls. */
@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:12px;margin-bottom:12px;min-height:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading > :is(.candidate-person-identity,div:not(.actions):not(.compact-action-menu)){flex:1 1 100%;min-width:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading > .actions{display:flex;flex:1 1 100%;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:12px;margin:0;width:100%}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .company-page-heading.mobile-compact-record-heading{padding:0;flex-wrap:nowrap}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .company-page-heading.mobile-compact-record-heading h1{flex:1;min-width:0;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading :is(button,.compact-action-trigger){min-height:44px;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading > button{white-space:nowrap;padding:8px 12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading .candidate-profile-eyebrow{display:none}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .candidate-person-heading .staff-initials-avatar{width:52px;height:52px;min-width:52px;font-size:20px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .candidate-person-heading .candidate-person-identity{gap:12px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading :is(h1,p){margin:0;overflow-wrap:anywhere}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading p{margin-top:4px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .application-assessor-summary{padding:0 12px;margin:0 0 16px;border:0;background:none;min-height:0;font-size:14px}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .mobile-compact-record-heading [hidden]{display:none!important}
}

@media screen and (max-width:700px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) .lead-note-composer > .actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:stretch;width:100%}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .lead-note-composer > .actions > label{display:block;min-width:0;width:100%;margin:0}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .lead-note-composer > .actions input[type=date]{box-sizing:border-box;min-width:0;width:100%;max-width:100%}
 html:not(.full-desktop-view) body:not(.portfolio-mode) .lead-note-composer > .actions > button{position:static;transform:none;width:100%;min-height:44px;margin:0}
}

@media screen and (max-width:700px){
 html:not(.full-desktop-view) .mobile-candidate-admin-action{display:none!important}
 html:not(.full-desktop-view) .mobile-candidate-list-layout > .mobile-fold{margin:0 0 12px;border:1px solid #d8d9dd;border-radius:12px;background:#fff;overflow:hidden}
 html:not(.full-desktop-view) .mobile-candidate-list-layout > .mobile-fold > .candidate-toolbar-filters{padding:12px;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 html:not(.full-desktop-view) .mobile-candidate-list-layout > .mobile-fold > .candidate-toolbar-filters > label{min-width:0;width:100%;margin:0}
 html:not(.full-desktop-view) .mobile-candidate-list-layout > .mobile-fold :is(input:not([type=checkbox]),select){box-sizing:border-box;min-width:0;width:100%;max-width:100%}
 html:not(.full-desktop-view) .mobile-candidate-list-layout .candidate-toolbar > .record-tabs{margin:0;padding:12px;border:0;border-top:1px solid #e0e1e4;background:transparent}
 html:not(.full-desktop-view) .mobile-candidate-list-layout .candidate-toolbar .mobile-section-picker{margin:0;min-width:0}
}



/* A single scrolling rail: every destination, including More, shares alignment. */
@media screen and (max-width:1100px){
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-bottom-nav:is(.mobile-crm-nav,.mobile-portfolio-nav){grid-template-columns:minmax(0,1fr)}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-section-rail button{flex:0 0 auto;min-width:72px;padding:5px 12px}
 html:not(.full-desktop-view) :is(body.portfolio-mode,body) .mobile-nav-label{white-space:nowrap;overflow:visible;text-overflow:clip}
}

#content .task-section-tabs > .mobile-section-picker{display:none!important}
#content .iqa-work-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}
#content .iqa-work-filters > button{margin:0;min-width:0;min-height:52px;white-space:normal}
#content .iqa-work-filters > button[aria-pressed="true"]{border-color:currentColor;font-weight:700}
@media screen and (max-width:700px){
 html:not(.full-desktop-view) #content .task-section-tabs > .mobile-section-picker{display:flex!important}
 html:not(.full-desktop-view) #content .task-section-tabs:has(> .mobile-section-picker) > button{display:none!important}
 #content .iqa-work-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Give the IQA workspace room between controls and full-width sections. */
#content .iqa-work-filters + .actions{gap:12px;margin:0 0 20px}
#content .iqa-work-filters + .actions + div > div > .panel + .panel{margin-top:20px}
#content .iqa-work-filters + .actions + div :is([data-dashboard-widget="iqa.coverage"],[data-dashboard-widget="iqa.register"]){height:auto;min-height:0}
#content .iqa-work-filters + .actions + div [data-dashboard-widget="iqa.coverage"] > .panelbody{min-height:0}
@media screen and (max-width:700px){
 #content .iqa-work-filters + .actions{margin-bottom:16px}
 #content .iqa-work-filters + .actions + div > div > .panel + .panel{margin-top:16px}
}

@media(min-width:1101px){
 body:not(.portfolio-mode) #content .compact-work-task:has(>.task-deadline>.manual-task-meta){
  grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(145px,.65fr) 200px;
  column-gap:28px;
  row-gap:0;
  align-items:start;
  padding:22px 24px;
 }
 #content .compact-work-task:has(>.task-deadline>.manual-task-meta)>.taskmain{grid-area:1/1/3/2;overflow-wrap:anywhere}
 #content .compact-work-task:has(>.task-deadline>.manual-task-meta)>.task-deadline{display:contents}
 #content .compact-work-task>.task-deadline>.manual-task-meta{grid-area:1/3/3/4}
 #content .compact-work-task:has(>.task-deadline>.manual-task-meta)>.task-deadline>.activitytext{grid-area:1/2;margin:0;overflow-wrap:anywhere}
 #content .compact-work-task:has(>.task-deadline>.manual-task-meta)>.task-last-update{grid-area:2/2}
 #content .compact-work-task:has(>.task-deadline>.activitytext)>.task-last-update:not([aria-hidden="true"]){margin-top:16px;padding-top:12px;border-top:1px solid #e4e4e7}
 #content .compact-work-task:has(>.task-deadline>.manual-task-meta)>.actions{grid-area:1/4/3/5}
 #content .compact-work-task:has(>.task-deadline>.manual-task-meta)>.actions>button{max-width:100%;white-space:normal}
 #content .compact-work-task>.task-last-update[aria-hidden="true"]{display:none}
}
#content .task-last-update{min-width:0;overflow-wrap:anywhere}
#content .task-last-update>.manual-task-meta{display:block;color:#29292e;font-size:13px;font-weight:700;line-height:1.4}
#content .task-last-update>.task-update-attribution{display:block;margin-top:6px}
#content .task-last-update .activitytext{margin:5px 0 0;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#content .compact-work-task>.taskmain>.task-summary{margin-block:10px 8px}
#content .task-record-status{font-weight:600;margin-top:4px}
@media(max-width:900px){
 html:not(.full-desktop-view) body:not(.portfolio-mode) #content .compact-work-task.task-with-update{display:flex;flex-direction:column;align-items:stretch}
 #content .task-last-update[aria-hidden="true"]{display:none}
}

/* Group desktop header actions at the end while keeping search at the start. */
@media(min-width:1101px){
 body:not(.portfolio-mode) .topbar{justify-content:flex-end;gap:12px;flex-wrap:wrap}
 body:not(.portfolio-mode) .topbar > :is(.workspace-search,#crm-search):not([hidden]){margin-inline-end:auto;min-width:0}
 body:not(.portfolio-mode) .topbar #header-messages{margin-inline-start:0}
}
