/* Shared Crosswalk palette. Layout and workflow styling remain local to each workspace. */
html[data-cw-theme]{--cw-canvas:#f4f5f3;--cw-surface:#ffffff;--cw-ink:#202822;--cw-muted:#68716b;--cw-border:#dce0dc;--cw-tint:#e8eeea;--cw-accent:#43624c;--cw-button:#253c32;--cw-on-button:#ffffff;--cw-gold:#7b693b;--cw-danger:#8a493f;--cw-warning:#806333;--cw-warning-bg:#f6efe1;--cw-blue:#586c81}
html[data-cw-theme=dark]{--cw-canvas:#171c19;--cw-surface:#212923;--cw-ink:#edf1ed;--cw-muted:#aab7ae;--cw-border:#39473e;--cw-tint:#2d3c32;--cw-accent:#b5ceb9;--cw-button:#c1d6c4;--cw-on-button:#1c2c22;--cw-gold:#d1bc82;--cw-danger:#eeaaa1;--cw-warning:#dcc18e;--cw-warning-bg:#3b3323;--cw-blue:#acbdd0}
html[data-cw-theme],html[data-cw-theme] body{background:var(--cw-canvas);color:var(--cw-ink);--paper:var(--cw-canvas);--surface:var(--cw-surface);--canvas:var(--cw-canvas);--ink:var(--cw-ink);--soft:var(--cw-muted);--muted:var(--cw-muted);--line:var(--cw-border);--line-strong:var(--cw-border);--green:var(--cw-accent);--gold:var(--cw-gold);--danger:var(--cw-danger);--red:var(--cw-danger);--mint:var(--cw-tint);--gold-soft:var(--cw-warning-bg)}
html[data-cw-theme] :is(h1,h2,h3,h4){color:var(--cw-ink)}
html[data-cw-theme] :is(.cw-home-root,.cw-public-header,.cw-home-header,.site-header,.cw-portal-header,.main-panel,.side,.mobile-top,.cw-finance,.quiet-loading,.cw-navigation-error,#cw-loading-screen){background:var(--cw-canvas);color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme] :is(.cw-public-brand,.cw-home-brand,.cw-portal-brand,.site-header .brand){color:var(--cw-ink)}
html[data-cw-theme] :is(.cw-public-brand span,.cw-home-brand span,.cw-portal-brand span,.site-header .brand small){color:var(--cw-muted);border-color:var(--cw-border)}
html[data-cw-theme] :is(.cw-resource-link,.cw-entry,.cw-dashboard-card,.cw-staff-tile,.cw-admin-card,.cw-access-form,.cw-archive-list a,.unlocked,.cw-pin-dialog,.login-card,.panel,.status-card,.staff-picker,.loading-card,.auth-card,.request-card){background:var(--cw-surface);color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme] :is(.cw-public-intro,.cw-public-footer,.cw-entry-copy p,.cw-resource-link small,.cw-dashboard-card p,.cw-dashboard-card small,.cw-pin-help p,.cw-pin-eyebrow,.cw-pin-dialog label,.login-public .auth-form label,.login-public .login-links .text-button,.cw-finance p,.cw-finance-heading span){color:var(--cw-muted)}
html[data-cw-theme] :is(input,select,textarea){background-color:var(--cw-surface);color:var(--cw-ink);border-color:var(--cw-border);accent-color:var(--cw-accent)}
html[data-cw-theme] :is(.primary-button,.cw-unlock-dialog button[type=submit],.cw-access-form button,.cw-archive-more,.download){background:var(--cw-button);border-color:var(--cw-button);color:var(--cw-on-button)}
html[data-cw-theme] :is(.cw-entry-staff,.cw-resource-link:hover,.cw-resource-link:focus-visible,.cw-dashboard-card:hover,.cw-staff-tile:hover,.cw-admin-card:hover){background:#253c32;border-color:#597762;color:#fff}
html[data-cw-theme] :is(.cw-entry-staff,.cw-resource-link:hover,.cw-resource-link:focus-visible,.cw-dashboard-card:hover,.cw-staff-tile:hover,.cw-admin-card:hover) :is(h1,h2,strong,p,small,svg,.cw-entry-action){color:#e1eae2}
html[data-cw-theme] :is(.side nav button.active,.side nav button.active:hover){background:var(--cw-tint);color:var(--cw-accent)}
html[data-cw-theme] :is(.side nav button:hover,.cw-admin-exit:hover){background:var(--cw-tint);color:var(--cw-ink)}
html[data-cw-theme] :is(.cw-finance-status,.progress){background:var(--cw-tint);color:var(--cw-muted)}
html[data-cw-theme] :is(.cw-finance-heading a,.cw-entry-action,.cw-resource-mark,.cw-overview-open){color:var(--cw-accent)}
html[data-cw-theme] :is(.cw-dashboard-action,.cw-tile-action,.cw-dashboard-icon){color:var(--cw-accent)}
html[data-cw-theme] :is(.cw-dashboard-audience,.cw-dashboard-heading p,.cw-dashboard-card p,.cw-dashboard-account){color:var(--cw-muted)}
html[data-cw-theme] :is(.cw-pin-dialog [data-close],.cw-pin-eyebrow svg){color:var(--cw-muted)}
html[data-cw-theme] .cw-pin-dialog [data-close]{background:transparent}
html[data-cw-theme] .cw-pin-dialog [data-close]:hover{background:var(--cw-tint)}
html[data-cw-theme] :is(.cw-pin-help,.login-links){border-color:var(--cw-border)}
html[data-cw-theme] .cw-pin-status{color:var(--cw-danger)}
html[data-cw-theme] .cw-finance iframe{background:var(--cw-canvas)}
html[data-cw-theme] :is(.cw-pin-dialog,.login-public) input:focus-visible{outline-color:var(--cw-accent)}
.cw-appearance-control{grid-column:3;grid-row:1;justify-self:end;display:inline-flex;gap:2px;padding:3px;border:1px solid var(--cw-border);border-radius:6px;background:var(--cw-canvas);white-space:nowrap;align-items:center}
html[data-cw-theme] .cw-appearance-control button{font:500 11px/1.3 "Helvetica Neue",Arial,sans-serif;letter-spacing:0;text-transform:none;min-height:28px;padding:5px 8px;width:auto;border:0;border-radius:3px;background:transparent;color:var(--cw-muted);cursor:pointer}
html[data-cw-theme] .cw-appearance-control button[aria-pressed=true]{background:var(--cw-surface);color:var(--cw-ink);box-shadow:0 1px 3px #00000014}
.cw-appearance-control button:focus-visible{outline:2px solid var(--cw-accent);outline-offset:2px}
html[data-cw-theme] .cw-portal-header>.cw-appearance-control{margin-right:24px}
html[data-cw-theme] .site-header:has(.cw-appearance-control)>#signOutButton:not(.is-hidden){margin-right:108px}
@media(max-width:640px){
  html[data-cw-theme] :is(.cw-portal-header,.site-header):has(.cw-appearance-control){height:120px;min-height:120px;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-rows:72px 48px;padding:0}
  html[data-cw-theme] .cw-appearance-control{grid-column:2;grid-row:2;align-self:start;justify-self:center}
  html[data-cw-theme] .cw-portal-header>.cw-appearance-control{margin-right:0}
  html[data-cw-theme] .cw-appearance-control button{min-height:32px}
  html[data-cw-theme] body.cw-shared-brand:has(.cw-appearance-control){--portal-header-height:120px;padding-top:120px}
  html[data-cw-theme] body:is(.cw-dashboard-home,.cw-finance-mode,.cw-update-mode):has(.cw-appearance-control){--portal-header-height:120px!important;padding-top:120px!important}
  html[data-cw-theme] body:not(.cw-finance-mode):not(.cw-dashboard-home) .cw-portal-header:has(.cw-mobile-sections){height:160px;grid-template-rows:72px 48px 40px}
  html[data-cw-theme] .cw-portal-header :is(.cw-mobile-sections,.cw-mobile-signout){grid-row:3}
  html[data-cw-theme] body.cw-shared-brand:has(.cw-portal-header .cw-mobile-sections):not(.cw-finance-mode):not(.cw-dashboard-home){--portal-header-height:160px;padding-top:160px}
  html[data-cw-theme] .cw-finance-mode:has(.cw-appearance-control) #crosswalk-finance-placeholder{height:calc(100dvh - 120px)}
  html[data-cw-theme] .site-header:has(#signOutButton:not(.is-hidden)){height:160px;grid-template-rows:72px 48px 40px}
  html[data-cw-theme] .site-header>#signOutButton:not(.is-hidden){grid-column:2;grid-row:3;margin:0}
}
/* Existing transaction widgets keep their layout, with Crosswalk tokens in both modes. */
html[data-cw-theme] body#cw-finance-design{color-scheme:inherit;--cw-bg:var(--cw-canvas);--cw-panel:var(--cw-surface);--cw-text:var(--cw-ink);--cw-sub:var(--cw-muted);--cw-line:var(--cw-border);--cw-purple:var(--cw-accent);--cw-active:var(--cw-tint);--cw-fill:var(--cw-button);--cw-on:var(--cw-on-button);--cw-green:var(--cw-accent);--cw-greenbg:var(--cw-tint);--cw-amber:var(--cw-warning);--cw-amberbg:var(--cw-warning-bg);--cw-red:var(--cw-danger);background:var(--cw-canvas);color:var(--cw-ink)}
html.cw-portal-embedded[data-cw-theme] #cw-finance-design .cw-appearance{display:none}
html[data-cw-theme=dark] :is(.cw-task,.cw-task-group,.cw-next-step,.cw-role-details,.cw-admin-content .staff-picker,.cw-admin-content button:not(.cw-admin-card),.cw-people-editor,.cw-people-list button,.cw-dashboard-card[aria-disabled=true]){background:var(--cw-surface);color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme=dark] :is(.step-card,.step-card.complete,.detail-panel,.candidate-step,.candidate-header,.candidate-progress,.checklist,.doc-card,.upload-row,.packet-status-card){background:var(--cw-surface);color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme=dark] :is(.doc-card,.candidate-step,.step-card) :is(strong,h2,h3){color:var(--cw-ink)}
html[data-cw-theme] :is(.packet-file,.submission-card,.upload-card,.view-switch,.download-list .action){background:var(--cw-surface);border-color:var(--cw-border);color:var(--cw-ink)}
html[data-cw-theme] :is(.step-number,.step-card.complete:not(.active),.upload-card.uploaded){background:var(--cw-tint);border-color:var(--cw-border);color:var(--cw-accent)}
html[data-cw-theme] :is(.action.primary,.view-switch button.active,.step-card.active){background:var(--cw-button);border-color:var(--cw-button);color:var(--cw-on-button)}
html[data-cw-theme] .step-card.active :is(strong,em,p,span){color:var(--cw-on-button)}
html[data-cw-theme] .upload-input::file-selector-button{background:var(--cw-surface);color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme] :is(.public-shell.login-public .login-card,.portal-grid .access-card,.content-card,.detail-card,.new-request-card,.quiet-button,.overview-stat,.filter-dialog,.dialog-close,.side nav button[data-dashboard-home]){background:var(--cw-surface);color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme] :is(.portal-grid input,.cw-people-dialog input,.cw-people-dialog select,.cw-people-dialog textarea,.history-search input,.admin-directory-select select){background:var(--cw-surface);color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme] :is(.cw-personal-action,.cw-onboarding-filters button[aria-pressed=true],.cw-people-entry button,.portal-grid .primary-button){background:var(--cw-button);color:var(--cw-on-button);border-color:var(--cw-button)}
html[data-cw-theme] :is(.cw-personal-action:hover,.cw-task summary:hover,.cw-onboarding-filters button:hover:not([aria-pressed=true]),.overview-stat:hover,.overview-stat.is-selected,.cw-people-dialog [data-people] button:hover){background:var(--cw-tint);color:var(--cw-ink)}
html[data-cw-theme] :is(.cw-task-icon,.is-complete .cw-task-icon,.detail-hero,.status-pill,.admin-identity-directory,.admin-summary-stat,.admin-merge-candidate.is-base){background:var(--cw-tint);color:var(--cw-accent);border-color:var(--cw-border)}
html[data-cw-theme] .cw-personal-progress>progress,html[data-cw-theme] .cw-personal-progress>progress::-webkit-progress-bar{background:var(--cw-tint)}
html[data-cw-theme] .cw-people-dialog [data-people] button{color:var(--cw-ink);border-color:var(--cw-border)}
html[data-cw-theme] :is(.portal-grid label,.portal-grid .eyebrow){color:var(--cw-muted)}
html[data-cw-theme] .cw-task-group{background:transparent}
html[data-cw-theme] .cw-entry{--entry-accent:var(--cw-gold)}
html[data-cw-theme] .cw-entry-vendor{--entry-accent:var(--cw-blue)}
html[data-cw-theme] .cw-resource-link[href*="crosswalk-request-portal"] .cw-resource-mark{color:var(--cw-blue)}
html[data-cw-theme] #cw-loading-screen :is(button,.cw-loading-help){color:var(--cw-muted);border-color:var(--cw-border)}
html[data-cw-theme] #cw-loading-screen .cw-loading-spinner{border-color:var(--cw-border);border-top-color:var(--cw-accent)}
html[data-cw-theme] :is(.cw-people-dialog .cw-people-note,.cw-people-dialog [data-people] span,.cw-people-dialog [data-people] small){color:var(--cw-muted)}
html[data-cw-theme] :is(.needs-info-card,.status-pill.needsInfo,.status-pill.readyForPayment,.admin-name-review,.admin-filter-chip[data-filter=possible]){background:var(--cw-warning-bg);color:var(--cw-warning);border-color:var(--cw-border)}
html[data-cw-theme=dark] :is(.filter-dialog header,.filter-dialog .dialog-actions,.admin-suggestion-badge,.admin-identity-row:hover){background:var(--cw-surface);color:var(--cw-ink)}
html[data-cw-theme=dark] :is(.status-pill.cancelled,.status-pill.declined){background:#402b28;color:var(--cw-danger)}
@media print{html[data-cw-theme]{--cw-canvas:white;--cw-surface:white;--cw-ink:#202822;--cw-muted:#58645c;--cw-border:#dce0dc;--cw-accent:#43624c;--cw-tint:#e8eeea}.cw-appearance-control{display:none!important}}
