/* Loaded after page styles. Existing layout and state hooks remain authoritative. */
body { background:var(--ui-canvas); color:var(--ui-ink); font-family:var(--ui-font-body); font-size:16px; line-height:1.5; }
.commerce-workspace { --commerce-ink:var(--ui-ink); --commerce-action:var(--ui-brand); --commerce-border:var(--ui-line); }
.pilot-theme { --pilot-sidebar-text:#eef3f8; --pilot-sidebar-muted:#b9c9d9; --pilot-sidebar-selected:var(--ui-navy-raised); }
.pilot-theme .operator-shell { min-width:0; width:100%; max-width:100%; }
.pilot-theme .operator-shell .page-shell { min-width:0; max-width:100%; }
.pilot-theme .workspace-sidebar { background:var(--ui-navy); }
.pilot-theme .account-switcher-panel,.pilot-theme .user-menu-panel { background:var(--ui-navy-raised); }
.pilot-theme .user-menu-panel { max-height:min(50vh,360px); overflow-y:auto; overscroll-behavior-y:contain; }
.pilot-theme .workspace-brand { font-family:var(--ui-font-heading); font-size:18px; line-height:1.35; }
.pilot-theme .workspace-brand small,.pilot-theme .account-switcher-copy small,.pilot-theme .user-menu-label small { font-size:12px; line-height:1.4; }
.pilot-theme .account-switcher-copy strong { white-space:normal; overflow-wrap:anywhere; font-size:14px; }
.pilot-theme .nav-group .nav-order-item > a,.pilot-theme .workspace-admin a,.pilot-theme .user-menu-label { font-size:14px; line-height:1.4; }
/* Shared navigation states: match the desktop rail cascade in every state. */
.pilot-theme:is(.pilot-sidebar-collapsed,:not(.pilot-sidebar-collapsed)):is(.pilot-sidebar-peek,:not(.pilot-sidebar-peek)) :is(.nav-group .nav-order-item > a,.workspace-admin a) { border-radius:22px; }
.pilot-theme:is(.pilot-sidebar-collapsed,:not(.pilot-sidebar-collapsed)):is(.pilot-sidebar-peek,:not(.pilot-sidebar-peek)) :is(.nav-group .nav-order-item > a,.workspace-admin a):hover { background:rgb(255 255 255 / 14%); }
.pilot-theme:is(.pilot-sidebar-collapsed,:not(.pilot-sidebar-collapsed)):is(.pilot-sidebar-peek,:not(.pilot-sidebar-peek)) :is(.nav-group .nav-order-item > a,.workspace-admin a)[aria-current="page"] { background:rgb(255 255 255 / 22%); box-shadow:inset 3px 0 #90b3ea; }
.pilot-theme .user-menu-panel a,.pilot-theme .user-menu-panel button,.pilot-theme .account-switcher-panel a { min-height:44px; font-size:14px; }
.pilot-theme .workspace-navigation { scrollbar-width:thin; scrollbar-color:#526b83 #17283d; -ms-overflow-style:auto; }
.pilot-theme .workspace-navigation::-webkit-scrollbar { display:block; width:6px; }
.pilot-theme .workspace-navigation::-webkit-scrollbar-track { background:#17283d; }
.pilot-theme .workspace-navigation::-webkit-scrollbar-thumb { background:#526b83; border-radius:8px; }
.operator-shell .page-shell,.commerce-workspace .page-shell { font-size:16px; line-height:1.5; color:var(--ui-ink); }
.operator-shell :is(h1,h2,h3),.postal-pilot :is(h1,h2,h3) { font-family:var(--ui-font-heading); letter-spacing:-.02em; white-space:normal; overflow-wrap:anywhere; }
.operator-shell h1,.postal-pilot h1 { font-size:30px; line-height:1.2; }
.operator-shell h2,.postal-pilot h2 { font-size:22px; line-height:1.3; }
.operator-shell h3,.postal-pilot h3 { font-size:18px; line-height:1.4; }
.operator-shell :is(label,legend) { font-size:14px; white-space:normal; overflow-wrap:anywhere; }
.operator-shell :is(.workspace-context,.workspace-intro,.card-meta,.card-facts,.source-note,.cell-muted,.detail-grid dt,.eyebrow) { font-size:14px; }
.operator-shell :is(.card-actions,.card-head,.bundle-strip,.bundle-item,.desk-tabs,.desk-stats) { flex-wrap:wrap; }
.operator-shell :is(.bundle-item,.desk-stats > div,.cabinet-metrics .metric span,.queue-status) { white-space:normal; }
.operator-shell :is(.panel,.detail-panel,.queue-card,.work-card,.postal-panel,.morning-focus,.onboarding-card) { border-color:var(--ui-line); border-radius:var(--ui-radius); background:var(--ui-surface); box-shadow:none; }
.operator-shell .work-results { background:var(--ui-brand-soft); border-color:var(--ui-brand-line); }
.operator-shell .focus-clear { background:var(--ui-success-soft); border-color:#b8d7c1; }
.operator-shell :is(button,.button,.button-secondary,.button-danger,.work-action,.button-quiet) { min-height:var(--ui-control-height); font-size:16px; line-height:1.4; white-space:normal; overflow-wrap:anywhere; border-radius:7px; }
.operator-shell :is(button,.button,.work-action) { border-color:var(--ui-brand); background:var(--ui-brand); color:#fff; }
.operator-shell :is(button,.button,.work-action):hover { border-color:var(--ui-brand-hover); background:var(--ui-brand-hover); color:#fff; }
.operator-shell :is(button,.button,.work-action).button-secondary,.operator-shell .button-secondary,.operator-shell .button-quiet { border:1px solid var(--ui-line); background:#fff; color:var(--ui-ink); }
.operator-shell :is(button,.button,.work-action).button-secondary:hover,.operator-shell .button-secondary:hover,.operator-shell .button-quiet:hover { border-color:#aabac9; background:#eef3f7; color:var(--ui-ink); }
.operator-shell :is(button,.button,.work-action).button-danger { border:1px solid var(--ui-danger); background:var(--ui-danger-soft); color:var(--ui-danger); }
.operator-shell :is(button,.button,.work-action).button-danger:hover { background:var(--ui-danger); color:#fff; }
.operator-shell :is(button,.button,.work-action):disabled { background:#e6ebef; border-color:#cdd6df; color:#5c6c79; cursor:not-allowed; }
/* Native checks/radios keep their own size; inline action forms keep their layout. */
.operator-shell :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea) { min-height:var(--ui-control-height); max-width:100%; font:inherit; font-size:16px; line-height:1.4; border:1px solid #aabac9; border-radius:7px; background:#fff; color:var(--ui-ink); padding:9px 11px; }
.operator-shell :is(input[type=checkbox],input[type=radio]) { min-height:0; width:18px; height:18px; accent-color:var(--ui-brand); }
.operator-shell input[type=file]::file-selector-button { font:inherit; min-height:32px; margin-right:12px; padding:4px 10px; border:1px solid var(--ui-line); border-radius:4px; background:#edf2f6; color:var(--ui-ink); cursor:pointer; }
/* Opt-in field flow: never turn every form (or a table formset) into a grid. */
.ui-form > p,.ui-form fieldset > p { margin:0 0 16px; }
.ui-form p > label { display:block; margin-bottom:6px; }
.ui-form p > :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea) { width:min(100%,48rem); }
.ui-form :is(.helptext,.help-text) { display:block; max-width:70ch; color:var(--ui-muted); font-size:14px; margin-top:5px; }
.ui-form fieldset { min-inline-size:0; }
.operator-shell :is(.table-scroll,.work-table,.postal-table-scroll) { width:100%; max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; border:1px solid var(--ui-line); border-radius:8px; background:#fff; }
.operator-shell table { font-size:14px; font-variant-numeric:tabular-nums; line-height:1.45; }
.operator-shell table :is(th,td) { font-size:14px; padding:12px; white-space:normal; overflow-wrap:anywhere; word-break:normal; }
.operator-shell table thead th { background:#edf2f6; color:var(--ui-muted); font-size:14px; font-weight:650; letter-spacing:0; }
.operator-shell table :is(.tabular,.money),.operator-shell .tabular { white-space:nowrap; overflow-wrap:normal; font-variant-numeric:tabular-nums; }
.operator-shell table summary { white-space:normal; font-size:14px; }
.operator-shell .table-scroll table { min-width:640px; }
.operator-shell .cell-text { white-space:normal; overflow-wrap:anywhere; text-overflow:clip; }
.operator-shell .status-pill { font-size:14px; white-space:normal; }
.operator-shell details > summary { font-size:16px; }
.operator-shell .desk-tabs a { min-height:44px; display:inline-flex; align-items:center; white-space:normal; }
.operator-shell .detail-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); }
.operator-shell .review-form { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
.postal-pilot { color:var(--ui-ink); padding:0; }
.postal-pilot .postal-intro { font-size:16px; }
.postal-pilot .postal-upload { border-top-color:var(--ui-brand); }
.postal-pilot .postal-table :is(th,td) { vertical-align:top; }
/* D01's page selectors are deliberately matched, including the compact sidebar. */
.pilot-theme .operator-shell .d01-desk { --pilot-control-border:#aabac9; --pilot-control-radius:7px; --pilot-radius:var(--ui-radius); --pilot-success:var(--ui-success); --pilot-success-bg:var(--ui-success-soft); --pilot-row-height:44px; }
.pilot-theme .operator-shell .d01-desk .pilot-page-heading h1 { font-size:30px; line-height:1.2; }
.pilot-theme .operator-shell .d01-desk .pilot-section-head h2 { font-size:22px; line-height:1.3; }
.pilot-theme .operator-shell .d01-desk :is(.pilot-page-context,.pilot-page-heading p,.pilot-section-head p,.pilot-count,.pilot-alert,.pilot-empty p,.pilot-status,.pilot-tabs a,.d01-filters label,.d01-report-filters label,.d01-report-filter-note,.d01-report-percent-note,.d01-report-result span,.d01-report-source-metrics span) { font-size:14px; white-space:normal; }
.pilot-theme .operator-shell .d01-desk .pilot-button { min-height:44px; font-family:var(--ui-font-body); font-size:16px; line-height:1.4; background:#fff; color:var(--ui-ink); }
.pilot-theme .operator-shell .d01-desk .pilot-button--primary { background:var(--ui-brand); border-color:var(--ui-brand); color:#fff; }
.pilot-theme .operator-shell .d01-desk .pilot-button--primary:hover { background:var(--ui-brand-hover); border-color:var(--ui-brand-hover); color:#fff; }
.pilot-theme .operator-shell .d01-desk :is(.d01-filters,.d01-report-filters,.d01-binding-cell) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,button) { min-height:44px; height:auto; font-size:16px; line-height:1.4; }
.pilot-theme .operator-shell .d01-desk .pilot-table :is(th,td),.pilot-theme.pilot-sidebar-collapsed .operator-shell .d01-desk .d01-table :is(th,td) { font-size:14px; line-height:1.45; }
.pilot-theme .operator-shell .d01-desk .pilot-table th { white-space:normal; }
.pilot-theme .operator-shell .d01-desk .pilot-table td small,.pilot-theme.pilot-sidebar-collapsed .operator-shell .d01-desk .d01-table td small { font-size:14px; line-height:1.4; }
.pilot-theme .operator-shell .d01-desk .pilot-page-heading,.pilot-theme .operator-shell .d01-desk .pilot-section-head { flex-wrap:wrap; }
.pilot-theme .operator-shell .d01-desk .d01-copy-posting { opacity:1; }
/* Password screens share tokens without inheriting the desktop shell's layout. */
.auth-page { --auth-ink:var(--ui-ink); --auth-muted:var(--ui-muted); --auth-line:var(--ui-line); --auth-blue:var(--ui-brand); --auth-teal:#17a0a6; background:var(--ui-canvas); }
.auth-page .auth-card { border-color:var(--ui-line); border-radius:var(--ui-radius); background:#fff; box-shadow:var(--shadow); }
.auth-page .auth-intro h1 { font-family:var(--ui-font-heading); font-size:30px; letter-spacing:-.02em; }
.auth-page .auth-card h2 { font-family:var(--ui-font-heading); font-size:22px; }
.auth-page :is(.auth-description,.auth-card-description,.auth-submit,.auth-field input) { font-size:16px; }
.auth-page :is(.auth-field label,.auth-assistance,.auth-field-help,.auth-note,.auth-field-errors,.auth-error-summary,.auth-back) { font-size:14px; }
.auth-page .auth-submit { min-height:44px; border-color:var(--ui-brand); background:var(--ui-brand); }
.auth-page .auth-submit:hover { background:var(--ui-brand-hover); }
.auth-page .auth-password-toggle { min-height:44px; top:2px; font-size:14px; }
.auth-page .auth-input-wrap--password:has(button:not([hidden])) input { padding-right:110px; }
.auth-page .auth-brand { white-space:normal; }
.auth-page .auth-success-mark { color:var(--ui-success); background:var(--ui-success-soft); }
.auth-page :is(.auth-field-errors,.auth-error-summary) { color:var(--ui-danger); }
.auth-page .auth-field--error input { border-color:var(--ui-danger); }
/* Visible, consistent keyboard focus, including scrollable data regions. */
.pilot-theme .operator-shell :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible,.auth-page :is(a,button,input,summary,[tabindex]):focus-visible { outline:3px solid var(--ui-focus); outline-offset:3px; }
.pilot-theme .workspace-sidebar :is(a,button,summary):focus-visible { outline-color:#a9d6ed; }
/* Keep keyboard rings inside the navigation and table scrollports. */
.pilot-theme .operator-shell .workspace-navigation :is(a,button,summary):focus-visible,
.pilot-theme .operator-shell :is(.account-switcher-panel,.user-menu-panel) :is(a,button):focus-visible,
.pilot-theme .operator-shell :is(.table-scroll,.work-table,.postal-table-scroll) :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline-offset:-3px; }
@media (min-width:1000px) {
  .commerce-workspace .negotiation-form label { font-size:14px; }
}
@media (max-width:760px) {
  .operator-shell .page-shell { padding:16px; }
  .operator-shell .cabinet-metrics { flex-wrap:wrap; }
  .operator-shell .carrier-short { flex-direction:column; align-items:stretch; }
  .postal-editor { grid-template-columns:minmax(0,1fr); }
  .pilot-theme .operator-shell .d01-desk .d01-report-filters { grid-template-columns:minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
/* Match the remaining page-specific font rules, rather than reducing their scope. */
.commerce-workspace .fbo-accounts :is(p,a) { font-size:16px; line-height:1.4; }
.pilot-theme .operator-shell .d01-desk .pilot-table thead th { font-size:14px; line-height:1.45; }
.pilot-theme .operator-shell .d01-desk .d01-binding-cell .pilot-button { min-height:44px; font-size:16px; line-height:1.4; }
.pilot-theme .operator-shell .d01-desk .pilot-pagination { font-size:14px; }
.pilot-theme .operator-shell .d01-desk .pilot-pagination a { min-height:44px; }
.pilot-theme .operator-shell .d01-desk :is(.d01-bucket span,.d01-refresh-state,.d01-observation-status,.d01-finance-link,.d01-candidate-details summary,.d01-candidate-details p,.d01-detail-grid dt,.d01-timeline li,.pilot-file-upload small,.pilot-file-upload output) { font-size:14px; line-height:1.45; }
.pilot-theme .operator-shell .d01-desk :is(.d01-section-body,.d01-detail-grid dd,.d01-candidate-list article) { font-size:16px; line-height:1.5; }
/* Navigation controls stay quiet against the navy rail. */
.pilot-theme .workspace-sidebar button { border-color:#526b83; background:transparent; color:var(--pilot-sidebar-text); }
.pilot-theme .workspace-sidebar button:hover { background:var(--ui-navy-raised); border-color:#839bb2; color:#fff; }
.pilot-theme .workspace-sidebar .pilot-sidebar-close { font-size:24px; }
/* Retain the meaning of deadline colours after the common card theme. */
.operator-shell .work-card.fbo-urgent { border-color:var(--ui-danger); background:var(--ui-danger-soft); }
/* Success remains green; normal-size status text uses the shared dark ink. */
.operator-shell .status-pill:is(.accounted,.received,.approved),
.pilot-theme .operator-shell .d01-desk .pilot-status--success { color:var(--ui-ink); box-shadow:inset 3px 0 var(--ui-success); }

/* Round action controls without changing their minimum touch size. */
.operator-shell :is(button,.button,.button-secondary,.button-danger,.work-action,.button-quiet) { border-radius:10px; }
