/* Lot 542 — shared workspace design tokens and native controls.
 * Loaded after the Studio/tool styles. No changes to handlers, roles, data,
 * hidden states, custom canvases, file pickers or the lot 541 media grid. */
:is(.studio-page-shell,#workflowStudioRoot,.tool-page){
  --wts-control-bg:#fff;
  --wts-control-ink:#172b44;
  --wts-control-label:#334b65;
  --wts-control-muted:#52657a;
  --wts-control-line:#b8c8d9;
  --wts-control-hover:#819bb7;
  --wts-control-primary:#155bb5;
  --wts-control-primary-hover:#11498f;
  --wts-control-tint:#edf5ff;
  --wts-control-radius:10px;
  --wts-control-ring:0 0 0 3px #176acb24;
  --wts-control-height:42px;
  --wts-control-space:12px;
}
/* Only ordinary text fields and selects; range, color, file and editor widgets
 * retain their native dimensions and behavior. */
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field,.field-grid,.media-studio-field,.pdf-studio-field,.data-studio-field,.image-studio-control-panel,.stack-form) :is(select,input:not([type]),input[type=text],input[type=number],input[type=email],input[type=url],input[type=search],input[type=password],input[type=date],input[type=time],textarea):not([hidden]),
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.tool-input,.tool-textarea):not([hidden]):not([type=file]):not([type=range]):not([type=color]){
  box-sizing:border-box;min-inline-size:0;max-inline-size:100%;min-block-size:var(--wts-control-height);
  border:1px solid var(--wts-control-line);border-radius:var(--wts-control-radius);
  background-color:var(--wts-control-bg);color:var(--wts-control-ink);
  padding:10px 12px;font-size:14px;line-height:1.45;font-weight:450;
  box-shadow:0 1px 2px #172b4409;transition:border-color .15s,box-shadow .15s,background-color .15s;
}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field,.field-grid,.media-studio-field,.pdf-studio-field,.data-studio-field,.image-studio-control-panel,.stack-form) select:not([multiple]):not([size]),
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) select.tool-input:not([multiple]):not([size]){
  /* Keep the browser's real dropdown arrow and keyboard interaction. */
  appearance:auto;padding-inline-end:10px;cursor:pointer;
}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field,.field-grid,.media-studio-field,.pdf-studio-field,.data-studio-field,.image-studio-control-panel,.stack-form) :is(input:not([type]),input[type=text],input[type=number],input[type=email],input[type=url],input[type=search],input[type=password],input[type=date],input[type=time],select,textarea):not(:disabled):not([readonly]):hover,
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.tool-input,.tool-textarea):not(:disabled):not([readonly]):hover{border-color:var(--wts-control-hover)}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field,.field-grid,.media-studio-field,.pdf-studio-field,.data-studio-field,.image-studio-control-panel,.stack-form) :is(input:not([type]),input[type=text],input[type=number],input[type=email],input[type=url],input[type=search],input[type=password],input[type=date],input[type=time],select,textarea):focus,
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.tool-input,.tool-textarea):focus{border-color:var(--wts-control-primary);box-shadow:var(--wts-control-ring)}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field,.field-grid,.media-studio-field,.pdf-studio-field,.data-studio-field,.image-studio-control-panel,.stack-form) :is(input:not([type]),input[type=text],input[type=number],input[type=email],input[type=url],input[type=search],input[type=password],input[type=date],input[type=time],select,textarea):is(:disabled,[readonly]),
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.tool-input,.tool-textarea):is(:disabled,[readonly]){background-color:#f1f5f9;color:#52657a;box-shadow:none}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(input,textarea)::placeholder{color:#64758a;opacity:1}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field,.field-grid,.media-studio-field,.pdf-studio-field,.data-studio-field) :is(input,select,textarea)[aria-invalid=true]{border-color:#b42336}
/* Labels and help text: one hierarchy, consistent spacing. */
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field>span,.field>label,.field-grid>label,.media-studio-field>span,.pdf-studio-field>span,.data-studio-field>span){
  color:var(--wts-control-label);font-size:13px;font-weight:650;line-height:1.45;overflow-wrap:anywhere;
}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field-help,.field>small,.media-studio-field>small,.pdf-studio-field>small,.data-studio-field>small){color:var(--wts-control-muted);font-size:12px;line-height:1.5;font-weight:400}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field-grid,.media-studio-two,.pdf-studio-field,.data-studio-field)>*{min-inline-size:0}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field-grid,.media-studio-two){gap:var(--wts-control-space)}
/* A little breathing room between successive standalone fields. */
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.media-studio-control,.pdf-studio-control-panel,.language-panel,.knowledge-panel) > .field + .field{margin-block-start:10px}
/* Native checkbox and radio affordances; no simulated controls or role changes. */
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--wts-control-primary)}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.check-row,.image-studio-check,.pdf-studio-radio):has(>input:is([type=checkbox],[type=radio])):not(.compact){
  box-sizing:border-box;min-inline-size:0;min-block-size:40px;padding:9px 11px;gap:9px;border:1px solid #d5e0ec;border-radius:var(--wts-control-radius);background:#f8fafc;color:var(--wts-control-label);font-size:13px;font-weight:550;line-height:1.45;cursor:pointer;
}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.check-row,.image-studio-check,.pdf-studio-radio):has(>input:is([type=checkbox],[type=radio]):checked):not(.compact){background:var(--wts-control-tint);border-color:#9ebde4;color:#21476d}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.check-row,.image-studio-check,.pdf-studio-radio)>input:is([type=checkbox],[type=radio]){inline-size:17px;block-size:17px;flex:0 0 17px;margin:0;cursor:inherit}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.check-row,.image-studio-check,.pdf-studio-radio):has(>input:disabled){cursor:not-allowed;opacity:.65}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.check-row,.image-studio-check,.pdf-studio-radio):focus-within{outline:2px solid var(--wts-control-primary);outline-offset:2px}
/* Flat, consistent action hierarchy. Leave dark, danger and specialized icon
 * controls to their existing semantic palettes. */
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button):not(.hidden){
  box-sizing:border-box;max-inline-size:100%;min-block-size:38px;border-radius:var(--wts-control-radius);font-size:13px;font-weight:650;line-height:1.4;white-space:normal;overflow-wrap:anywhere;text-align:center;
  transition:background-color .15s,border-color .15s,box-shadow .15s;
}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button).primary{background:var(--wts-control-primary);border-color:var(--wts-control-primary);color:#fff;box-shadow:0 2px 5px #163c7020}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button).primary:hover:not(:disabled):not([aria-disabled=true]){background:var(--wts-control-primary-hover);border-color:var(--wts-control-primary-hover);color:#fff;box-shadow:0 3px 8px #163c7030}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) .button.secondary,
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) .mini-button:not(.primary):not(.danger):not(.danger-outline):not(.dark):not(.ghost):not(.active):not(.selected):not(.is-active):not([aria-pressed=true]){background:#fff;border-color:var(--wts-control-line);color:#294661;box-shadow:none}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) .button.secondary:hover:not(:disabled),
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) .mini-button:not(.primary):not(.danger):not(.danger-outline):not(.dark):not(.ghost):not(.active):not(.selected):not(.is-active):not([aria-pressed=true]):hover:not(:disabled){background:var(--wts-control-tint);border-color:#83a8d7;color:#164a83;box-shadow:none}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button.secondary,.button.ghost,.mini-button)[aria-pressed=true]{background:var(--wts-control-tint);border-color:#6797ce;color:#154d88;box-shadow:inset 0 0 0 1px #6797ce}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button):hover{transform:none}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button):is(:disabled,[aria-disabled=true]){opacity:.55;cursor:not-allowed;box-shadow:none;transform:none}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button,input,select,textarea):focus-visible{outline:2px solid var(--wts-control-primary);outline-offset:2px}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) .action-row{gap:8px;align-items:center;min-inline-size:0;flex-wrap:wrap}
:is(.studio-page-shell,#workflowStudioRoot,.tool-page) .action-row:not(.compact){margin-block-start:14px}
@media(max-width:480px){
  :is(.studio-page-shell,#workflowStudioRoot,.tool-page) .field-grid:is(.three,.four){grid-template-columns:repeat(2,minmax(0,1fr))}
  :is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.field,.field-grid,.media-studio-field,.pdf-studio-field,.data-studio-field) :is(select,textarea,input[type=text],input[type=number],input[type=email],input[type=url],input[type=search]){font-size:16px!important}
  :is(.studio-page-shell,#workflowStudioRoot,.tool-page) .action-row :is(.button,.mini-button){min-block-size:44px}
}
@media(max-width:360px){:is(.studio-page-shell,#workflowStudioRoot,.tool-page) .field-grid:is(.two,.three,.four){grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button,input,select,textarea){transition:none!important}}
@media(forced-colors:active){:is(.studio-page-shell,#workflowStudioRoot,.tool-page) :is(.button,.mini-button,input,select,textarea):focus-visible{outline-color:Highlight}}
