@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (pointer:fine),(min-width:1024px) and (pointer:none){
 .td-toolbar,.td-unit>h3{display:flex;align-items:center;justify-content:space-between;gap:16px}.td-toolbar{margin-bottom:18px;justify-content:flex-end}.td-toolbar h2{margin:0;font-size:20px;font-weight:400}.td-unit{margin:0 0 26px}.td-unit>h3{justify-content:flex-start;font-size:18px;font-weight:400;margin:0 0 12px}.td-unit>h3 .muted{font-size:14px}
 .td-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:stretch}.td-grid>.empty{grid-column:1/-1}
 .td-person{position:relative;display:flex;align-items:flex-start;gap:12px;min-width:0;width:100%;min-height:132px;padding:16px 12px;border:1px solid var(--line,#465264);border-radius:14px;background:var(--panel,#282e37);text-align:left;box-shadow:0 3px 10px #0002;color:inherit}.td-person:hover{border-color:#91a9dc}.td-person:focus-visible{outline:2px solid #91a9dc;outline-offset:2px}.td-avatar{width:52px;height:52px;min-width:52px;flex:none;border-radius:50%;overflow:hidden;display:grid;place-items:center;font-size:18px}.td-avatar img{width:100%;height:100%;object-fit:cover}.td-identity{display:grid;gap:6px;min-width:0;flex:1;padding-right:8px;overflow-wrap:anywhere}.td-name{font-size:16px;font-weight:400;line-height:1.3}.td-position{font-size:13px;color:var(--muted,#b0b9c7);line-height:1.4}.td-parent{font-size:12px;color:var(--muted,#b0b9c7);line-height:1.3}.td-chevron{position:absolute;right:9px;top:16px;color:var(--muted,#b0b9c7);font-size:20px}
 html.app-sheets #sheet .cp-team{max-width:none;width:100%}.app-sheets #sheet .cp-team-people{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.app-sheets #sheet .cp-team-employee{display:flex;flex-direction:column;gap:12px;align-items:stretch;padding:14px;min-width:0;border:1px solid var(--line,#465264);border-radius:14px;background:var(--panel,#282e37)}.app-sheets #sheet .cp-employee-heading{min-width:0}.app-sheets #sheet .cp-employee-heading>b{font-weight:400;font-size:16px;white-space:normal}.app-sheets #sheet .cp-employee-heading>small{white-space:normal;line-height:1.4}.app-sheets #sheet .cp-employee-controls{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin-top:auto;min-width:0}.app-sheets #sheet .cp-employee-shift{display:flex;width:100%}.app-sheets #sheet .cp-employee-shift button{flex:1}.app-sheets #sheet .cp-employee-places{width:100%;min-width:0;white-space:normal}
}
@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (pointer:fine),(min-width:1024px) and (pointer:none){
 .app-sheets #sheet .cp-employee-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:6px;margin:0}.app-sheets #sheet .cp-employee-heading>small{grid-column:1/-1;margin:0;text-align:left;max-width:none;font-size:13px}.app-sheets #sheet .cp-employee-heading>.cp-employee-count{grid-column:2;grid-row:1}
}
/* The same unit list serves Team and employee management, including small screens. */
.td-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-bottom:16px}.td-unit{border:0;margin:0 0 12px;padding:0}.td-unit>summary{list-style:none;display:flex;align-items:center;gap:14px;padding:16px 12px;border-radius:12px;background:var(--panel,#282e37);border:1px solid var(--line,#465264);cursor:pointer;min-height:56px}.td-unit>summary::-webkit-details-marker,.td-account>summary::-webkit-details-marker{display:none}.td-unit-title{flex:1;min-width:0;overflow-wrap:anywhere;font-size:18px;font-weight:400}.td-unit .ws-staff-line{flex:none;font-size:14px;white-space:nowrap;gap:5px}.td-unit .ws-staff-line strong{font-weight:400}.td-unit-chevron{flex:none;font-size:24px;line-height:1;transition:transform .18s}.td-unit[open]>summary .td-unit-chevron{transform:rotate(90deg)}.td-unit>.td-grid{margin-top:12px}.td-account{min-width:0;border:1px solid var(--line,#465264);border-radius:14px;background:var(--panel,#282e37);box-shadow:0 3px 10px #0002;align-self:start}.td-account>summary{position:relative;display:flex;align-items:flex-start;gap:12px;list-style:none;padding:16px 12px;min-height:132px;box-sizing:border-box;cursor:pointer}.td-account[open]>summary .td-chevron{transform:rotate(90deg)}.td-account-actions{padding:0 12px 12px}.td-account-actions .actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}.td-account-actions .actions button{width:100%;margin:0;white-space:normal}.td-account-actions details{margin-top:10px}.td-account summary:focus-visible,.td-unit>summary:focus-visible{outline:2px solid #91a9dc;outline-offset:2px}.td-invitations{margin-top:22px}.td-invitations>summary{min-height:44px;padding:10px;cursor:pointer}
@media (max-width:1023px),(pointer:coarse) and (orientation:portrait){.td-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.td-person,.td-account>summary{position:relative;display:flex;align-items:flex-start;gap:10px;min-width:0;width:100%;padding:14px 12px;text-align:left;color:inherit}.td-avatar{width:44px;height:44px;min-width:44px;flex:none}.td-identity{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.td-name{font-size:16px;font-weight:400}.td-position,.td-parent{font-size:13px;color:var(--muted,#b0b9c7)}.td-chevron{margin-left:auto}.td-person{background:var(--panel,#282e37);border:1px solid var(--line,#465264);border-radius:14px}.td-unit-title{font-size:16px}}
@media (max-width:600px){.td-grid{grid-template-columns:minmax(0,1fr)}.td-unit>summary{gap:8px;padding:12px 10px}.td-unit .ws-staff-line{font-size:12px;gap:3px}.td-unit .ws-staff-line>span:first-child{display:none}}
@media (prefers-reduced-motion:reduce){.td-unit-chevron{transition:none}}
.td-toolbar:empty{display:none}.td-central-unit{margin:0 0 18px}.td-central-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}.td-central-heading h2{font-size:16px;font-weight:400;margin:0}.td-central-heading .link{min-height:44px}.td-person-management{margin:12px 0}.td-person-management>summary{cursor:pointer;min-height:44px;padding:10px 0;box-sizing:border-box}
.td-person,.td-account>summary{min-height:88px;padding:12px;box-sizing:border-box}.td-identity{gap:4px}.td-unit>summary{min-height:44px;padding:8px 12px;box-sizing:border-box}.td-unit-title{font-size:16px}.td-unit>.td-grid{margin-top:10px}
/* Short position labels allow denser employee rows without shrinking names. */
.td-person,.td-account>summary{min-height:72px;padding:10px 12px;align-items:center}.td-avatar{width:44px;height:44px;min-width:44px;font-size:16px}.td-identity{gap:3px}.td-name{font-size:16px;line-height:1.25}.td-position{line-height:1.25}.td-chevron{top:50%;transform:translateY(-50%)}.td-grid{gap:10px}.td-central-heading{margin-bottom:8px}
@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (pointer:fine),(min-width:1024px) and (pointer:none){.app-sheets #sheet .cp-team-employee{padding:10px;gap:8px}.td-account[open]>summary .td-chevron{transform:translateY(-50%) rotate(90deg)}}
@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (pointer:fine),(min-width:1024px) and (pointer:none){
 .td-person,.td-account>summary{height:56px;min-height:56px;padding:6px 10px;gap:10px}
 .td-avatar{width:36px;height:36px;min-width:36px;font-size:14px}
 .td-identity{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;flex:1;padding-right:12px;gap:2px;overflow:visible}
 .td-name,.td-position{display:block;width:100%;white-space:nowrap;overflow:visible;text-overflow:clip;overflow-wrap:normal;line-height:1.2}
 .td-name{font-size:16px}.td-position{font-size:13px}
}

/* Unit names form a plain directory, rather than another level of cards. */
.td-unit-list>summary{background:transparent;border:0;border-radius:0;padding:10px 0;min-height:44px;box-shadow:none;border-bottom:1px solid var(--line,#465264)}
.td-unit-list{margin-bottom:4px}.td-unit-list>.td-grid{margin-bottom:12px}.td-unit-list .td-unit-chevron{margin-left:auto}
.ds-person-content{width:100%;max-width:860px;margin:0 auto;box-sizing:border-box}
.ds-person-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.ds-person-top .ds-person-heading{margin:0;min-width:0}.ds-person-top>.primary{width:auto;flex:none;margin:0;min-height:40px;padding:8px 16px}
.ds-person-heading>div{min-width:0}.ds-person-heading b,.ds-person-heading p,.ds-person-heading small{overflow-wrap:anywhere}
.ds-person-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.ds-person-stats>button{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;min-width:0;min-height:44px;padding:10px 12px;font-weight:400;font-size:14px;text-align:left}
.ds-person-stats>button>span:last-child{font-size:22px;flex:none}.ds-person-stats>button[aria-pressed=true]{box-shadow:inset 0 -2px #799cff}
.ds-person-content>h3{font-size:16px;font-weight:400;margin:16px 0 8px}
.td-person-management>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.td-person-management>.actions>button{margin:0;width:100%;min-width:0;white-space:normal}.td-person-management>details{margin:8px 0}.td-roster-action{margin-top:12px}
@media (max-width:650px){.ds-person-top{align-items:stretch;flex-direction:column}.ds-person-top>.primary{align-self:flex-start}.ds-person-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.td-person-management>.actions{grid-template-columns:minmax(0,1fr)}}

#sheet .ds-person-stats>button{height:44px;min-height:44px;padding:6px 12px;border-radius:10px}

/* On a wide central pane the employee controls share the navigation heading. */
@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (pointer:fine),(min-width:1024px) and (pointer:none){
 html.desktop-shell #sheet .sheethead.td-person-inline{gap:10px;min-height:76px;align-items:center;justify-content:flex-start}
 #sheet .td-person-inline>h2{display:none!important}
 #sheet .td-person-inline>.ds-person-heading{flex:1;min-width:220px;max-width:380px;gap:10px;margin:0}
 #sheet .td-person-inline .ds-person-avatar{width:44px;height:44px;min-width:44px;font-size:18px}
 #sheet .td-person-inline .ds-person-heading b{font-size:15px;font-weight:400}
 #sheet .td-person-inline .ds-person-heading p{font-size:13px;margin:2px 0;line-height:1.2}
 #sheet .td-person-inline .ds-person-heading small{font-size:12px;line-height:1.2}
 #sheet .td-person-inline>.ds-person-stats{display:flex;flex:none;gap:6px;margin:0}
 #sheet .td-person-inline .ds-person-stats>button{width:auto;min-width:0;white-space:nowrap;background:none;box-shadow:none;border:0;padding:6px 4px;font-size:13px;gap:6px}
 #sheet .td-person-inline .ds-person-stats>button[aria-pressed=true]{box-shadow:inset 0 -2px #799cff}
 #sheet .td-person-inline .ds-person-stats>button>span:last-child{font-size:19px}
 #sheet .td-person-inline>.primary{width:auto;flex:none;min-height:38px;margin:0;padding:6px 10px;font-size:13px;white-space:nowrap}
 #sheet .td-person-inline>.td-person-settings{display:grid;place-items:center;flex:none;width:38px;min-width:38px;height:42px;min-height:42px;padding:6px;margin:0;background:none;border:0;box-shadow:none}
 #sheet .td-person-inline>.td-person-settings svg{width:24px;height:24px}
 #sheet .td-person-inline-body>.ds-person-top{display:none}
 #sheet .td-person-inline-body>.td-person-management{margin:0 0 12px}
 #sheet .td-person-inline-body>.td-person-management:not([open]){display:none}
 #sheet .td-person-inline-body>.td-person-management>summary{display:none}
}

@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (pointer:fine),(min-width:1024px) and (pointer:none){
 html.desktop-shell #sheet .sheethead.td-person-inline>.ds-person-heading+:is(.primary,.td-person-settings,[data-sheet-home]),
 html.desktop-shell #sheet .sheethead.td-person-inline>.ds-person-stats+:is(.primary,.td-person-settings,[data-sheet-home]){margin-left:auto!important}
}

.td-person-access-info{margin:0;display:grid;gap:8px}.td-person-access-info>div{display:grid;grid-template-columns:minmax(90px,140px) minmax(0,1fr);gap:12px;padding:8px 0}.td-person-access-info dt{color:var(--muted,#b0b9c7)}.td-person-access-info dd{margin:0;overflow-wrap:anywhere}

@media (min-width:1024px) and (orientation:landscape),(min-width:1024px) and (pointer:fine),(min-width:1024px) and (pointer:none){
 html.desktop-shell #sheet{container-name:employee-pane;container-type:inline-size}
 #sheet .td-person-inline>.ds-person-heading{min-width:180px}
 #sheet .td-person-inline>.ds-person-stats{flex:0 1 auto;min-width:0}
 #sheet .td-person-inline .ds-person-stats>button{flex:1 1 auto;white-space:normal}
 #sheet .td-person-inline .ds-person-stats>button>span:first-child{min-width:0;overflow-wrap:anywhere}
}
@container employee-pane (max-width:1100px){
 #sheet .sheethead.td-person-inline{gap:6px}
 #sheet .td-person-inline>.ds-person-heading{min-width:150px;max-width:220px;gap:8px}
 #sheet .td-person-inline .ds-person-avatar{width:36px;height:36px;min-width:36px;font-size:15px}
 #sheet .td-person-inline .ds-person-heading b{font-size:14px}
 #sheet .td-person-inline .ds-person-heading p{font-size:12px}
 #sheet .td-person-inline .ds-person-heading small{font-size:11px}
 #sheet .td-person-inline>.ds-person-stats{gap:2px;flex:1 1 auto}
 #sheet .td-person-inline .ds-person-stats>button{flex:1 1 0;padding:4px 2px;gap:3px;font-size:12px}
 #sheet .td-person-inline .ds-person-stats>button>span:last-child{font-size:16px}
 #sheet .td-person-inline>.primary{font-size:12px;padding:6px 8px}
 #sheet .td-person-inline>.td-person-settings{width:34px;min-width:34px;padding:5px}
 html.desktop-shell #sheet .sheethead.td-person-inline>[data-sheet-home],html.desktop-shell #sheet .sheethead.td-person-inline>[data-close]{width:34px;min-width:34px;padding:5px}
}

.td-composition{margin-top:20px}.td-composition>summary{cursor:pointer;min-height:44px;padding:10px 0;box-sizing:border-box}.td-composition>.td-toolbar{justify-content:flex-start;margin:10px 0}.td-directory>.td-toolbar:empty{display:none}
.td-directory{min-width:0}.td-unit>summary{width:100%;min-width:0}.td-unit-chevron{display:grid;place-items:center;width:24px;height:24px;box-sizing:border-box}.td-unit-title{overflow-wrap:anywhere}

/* Status numbers share the row; they never cover the employee name or avatar. */
.td-task-count{flex:none;font-size:16px;font-weight:400;line-height:1.2;min-width:1.4em;text-align:center;font-variant-numeric:tabular-nums}
.td-person>.td-chevron,.td-account>summary>.td-chevron{position:static;flex:none;transform:none;margin-left:0;align-self:center}
.td-person>.td-identity,.td-account>summary>.td-identity{padding-right:0}
.td-account[open]>summary>.td-chevron{transform:rotate(90deg)}
