/* A single match-context row; the original controls keep their owners and listeners. */
body[data-module=profile]>main>.topbar.profile-contextbar{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  height:44px!important;min-height:44px!important;padding:0 22px!important;gap:14px;
  background:#f8fbffed;border-bottom:1px solid #e4ecf6;z-index:40;overflow:visible;
}
body[data-module=profile] .profile-contextbar>.experience-tabs{grid-column:1;grid-row:1;gap:0;min-width:0;overflow-x:auto;scrollbar-width:none;align-self:stretch}
body[data-module=profile] .profile-contextbar>.experience-tabs::-webkit-scrollbar{display:none}
body[data-module=profile] .profile-contextbar>.experience-tabs button{height:40px;min-height:40px;padding:6px 9px;font-size:16px;line-height:22px;flex:none;border-radius:6px}
body[data-module=profile] .profile-match-heading{grid-column:2;grid-row:1;min-width:0;max-width:min(28vw,360px);text-align:center}
body[data-module=profile] .profile-contextbar #matchTitle{font-size:21px!important;line-height:27px!important;max-width:100%;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-module=profile] .profile-match-heading .breadcrumb{display:none}
body[data-module=profile] .profile-contextbar>.topbar-actions{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap;flex-wrap:nowrap}
body[data-module=profile] .profile-contextbar>.topbar-actions>.button{min-height:28px!important;height:30px!important;padding:4px 10px!important;font-size:15px;line-height:20px;border-radius:7px}
body[data-module=profile] .profile-contextbar [hidden]{display:none!important}
body[data-module=profile] #workspaceHeading.profile-heading-anchor{position:absolute!important;width:1px;height:1px;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden;clip-path:inset(50%);pointer-events:none}
body[data-module=profile] .profile-contextbar #pipelineProgress{display:block;position:relative;grid-column:auto;grid-row:auto;flex:0 0 28px;width:28px;min-width:28px;max-width:28px;height:28px;margin:0;border:1px solid #d9e5ef;border-radius:8px;background:#edf3f8;color:#8196a9;box-shadow:none}
body[data-module=profile] .profile-contextbar #pipelineProgress>summary{display:grid;place-items:center;width:26px;height:26px;min-height:0;padding:0;border-radius:7px;list-style:none;cursor:pointer}
body[data-module=profile] .profile-contextbar #pipelineProgress>summary::after{content:'•';font:600 17px/1 system-ui}
body[data-module=profile] .profile-contextbar #pipelineProgress .pipeline-progress-line{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body[data-module=profile] .profile-contextbar #pipelineProgress .pipeline-meter{display:none}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-state=complete]{background:#e4f6ee;color:#209565;border-color:#bfe8d5}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-state=complete]>summary::after{content:'✓'}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-state=running]{background:#e5efff;color:#3479dd;border-color:#c4d9fb}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-state=running]>summary::after{content:'…'}
body[data-module=profile] .profile-contextbar #pipelineProgress:is([data-state=pending],[data-state=ready]){background:#fff3dd;color:#ac751b;border-color:#f0dbad}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-state=pending]>summary::after{content:'!'}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-state=error]{background:#fff0f0;color:#cf4d5a;border-color:#f0c8cc}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-state=error]>summary::after{content:'!'}
body[data-module=profile] .profile-contextbar #pipelineProgress[open],body[data-module=profile] .profile-contextbar #pipelineProgress:hover{box-shadow:0 0 0 3px #479dce12}
body[data-module=profile] .profile-contextbar #pipelineProgress>summary:focus-visible{outline:2px solid #337ddd;outline-offset:3px}
body[data-module=profile] .profile-contextbar .pipeline-popover{left:auto;right:0;top:calc(100% + 9px);width:310px;max-width:calc(100vw - 36px);padding:16px;white-space:normal;color:#23405e;z-index:65}
body[data-module=profile] .profile-contextbar .pipeline-popover .yqzx-analysis-status{display:flex;align-items:center;justify-content:flex-end;gap:10px;border-top:1px solid #e5edf6;margin-top:10px;padding-top:10px;min-height:0}
body[data-module=profile] .profile-contextbar #profileAnalysisMessage{font-size:14px;line-height:1.5;color:#8c6f3e;flex:1}
body[data-module=profile] .profile-contextbar #profileRecompute{flex:none;margin:0!important}
body[data-module=profile] .profile-contextbar .pipeline-popover .yqzx-analysis-status{align-items:flex-start;flex-direction:column;gap:10px}
body[data-module=profile] .profile-contextbar .pipeline-popover #profileRecompute{width:100%;min-height:34px;font-size:14px;line-height:22px}
body[data-module=profile] .profile-contextbar .yqzx-analysis-status[data-error=true] #profileAnalysisMessage{color:#b44142}

@media(max-width:1100px){
  body[data-module=profile]>main>.topbar.profile-contextbar{grid-template-columns:minmax(0,1fr) minmax(130px,220px) auto;gap:10px}
  body[data-module=profile] .profile-contextbar>.experience-tabs button{padding:6px 8px}
}
@media(max-width:760px){
  body[data-module=profile]>main>.topbar.profile-contextbar{grid-template-columns:minmax(70px,1fr) minmax(80px,160px) auto;height:42px!important;min-height:42px!important;padding:0 12px!important;gap:7px}
  body[data-module=profile] .profile-match-heading{max-width:100%}
  body[data-module=profile] .profile-contextbar #matchTitle{font-size:14px!important;line-height:20px!important}
  body[data-module=profile] .profile-contextbar>.experience-tabs button{padding:6px 8px;font-size:12px}
  body[data-module=profile] .profile-contextbar>.topbar-actions{gap:4px}
  body[data-module=profile] .profile-contextbar>.topbar-actions>.button{padding:3px 6px!important;font-size:12px}
}

/* Direction review appears only where evidence needs an operator. */
#tacticalInsights .ti-confirm-directions:not([hidden]){color:#8a5511;background:#fff6df;border-color:#ead3a5}
.direction-resolution-summary{white-space:pre-line;font-size:15px;line-height:1.65;padding:10px 12px;background:#eef5ff;border-radius:10px;color:#24547b}
.direction-auto-option{display:flex;align-items:center;gap:8px;margin:10px 0}
.direction-auto-option input{width:auto!important}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-direction-review=true]{background:#fff3d7;color:#92621c;border-color:#ead3a5}
body[data-module=profile] .profile-contextbar #pipelineProgress[data-direction-review=true]>summary::after{content:'!'}

/* Match the active state of the tactical identity overlay. */
body[data-module=profile] #toggleIdentityLabels[aria-pressed=true]{background:#e8f2ff!important;border-color:#b1cfff!important;color:#165dcb!important}
