.test-handoff-targets{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:16px 0;margin:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.test-handoff-targets>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;flex:1;min-width:160px}.test-handoff-targets p{flex-basis:100%;margin:0}.test-handoff-panel{padding-top:16px;margin-top:18px;border-top:1px solid var(--line)}
.test-handoff-panel h4{font-size:16px;margin:0 0 12px}.test-handoff-preview{margin:16px 0}.test-handoff-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;padding:14px;background:var(--bg);max-height:360px;overflow:auto}.test-notification-receipts>div{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;padding:12px 0;border-bottom:1px solid var(--line)}.test-notification-receipts p{width:100%;margin:0}.test-handoff-panel form{margin-top:20px}.project-test-handoff{margin:24px 0;padding-top:20px;border-top:1px solid var(--line)}.project-test-handoff h3{margin:0 0 8px}.project-test-handoff .people-search-row{margin:16px 0}.test-project-people{display:flex;flex-wrap:wrap;gap:8px}.test-project-people>span{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:6px;padding:4px 8px}.project-test-handoff small{display:block;overflow-wrap:anywhere}.test-handoff-panel .gate-actions{gap:10px}
@media(max-width:650px){.test-handoff-panel .gate-actions .button{flex:1 1 100%}.test-handoff-targets>button{margin-left:0}.project-test-handoff .people-search-row input{width:0;flex:1}}
.environment-test-panel{margin:20px 0;padding:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);min-width:0}.environment-test-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px}.environment-test-heading h4{margin:0;font-size:16px}.environment-test-heading>span{font-size:13px;color:var(--muted)}.environment-test-panel p{overflow-wrap:anywhere}.environment-test-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-field,16px);margin-top:var(--space-field,16px)}.environment-test-fields>.field{min-width:0;margin:0}.environment-test-secret{display:flex;gap:6px}.environment-test-secret input{min-width:0;flex:1}.environment-test-config{margin-top:16px}.environment-test-config summary{cursor:pointer}.environment-test-config form{margin-top:16px}.environment-test-option{display:flex;align-items:flex-start;gap:10px;margin:14px 0}.environment-test-option input{width:16px;height:16px;flex:none;margin-top:3px}.environment-test-checks{list-style:none;padding:0}.environment-test-checks li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px;border-bottom:1px solid var(--line);padding:12px 0}.environment-test-checks p{width:100%;margin:0}.environment-test-spinner{display:inline-block;width:12px;height:12px;border:2px solid var(--line);border-top-color:currentColor;border-radius:50%;margin-right:8px;animation:environment-test-spin 1s linear infinite}@keyframes environment-test-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.environment-test-spinner{animation:none}}@media(max-width:650px){.environment-test-fields{grid-template-columns:1fr}.environment-test-panel .gate-actions .button{flex:1 1 100%}}
.environment-test-secret>.password-control{width:100%;min-width:0}

.environment-test-panel:focus,.test-handoff-panel:focus{outline:none}
.environment-test-execution{margin:12px 0 0;padding-top:8px;border-top:1px solid var(--line)}
.environment-test-execution summary{min-height:40px;padding:8px 0;cursor:pointer;font-size:13px;color:var(--secondary)}
.environment-test-execution .environment-test-result-body{padding:4px 0 8px;overflow-wrap:anywhere}
.environment-test-execution ol{margin:8px 0 0;padding-left:20px;max-height:240px;overflow:auto;font-size:12px;line-height:1.7;color:var(--secondary)}
.environment-test-execution li+li{margin-top:4px}

/* Keep the saved-deployment action stable while verification is pending. */
.deployment-saved>.gate-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;min-width:0}
.deployment-saved #deployment-pass{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:200px;max-width:100%;white-space:nowrap}
.deployment-saved>.task-action-status{width:100%;min-width:0;margin:16px 0 0;align-items:flex-start;line-height:1.7}
.deployment-saved>.task-action-status>.spinner{margin-top:3px;flex:none}.deployment-saved>.task-action-status>span:last-child{min-width:0;overflow-wrap:anywhere}
#deployment-error{min-width:0;overflow-wrap:anywhere;scroll-margin-top:20px}#deployment-error:focus{outline:none}
.acceptance-checks>#deployment-error{margin:8px 0 10px}
@media(max-width:650px){.deployment-saved #deployment-pass{width:100%;min-width:0}}

.test-notification-editor textarea{display:block;width:100%;box-sizing:border-box;min-height:240px;max-height:60vh;resize:vertical;padding:14px 16px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);color:inherit;font:inherit;line-height:1.7;overflow:auto}.test-notification-editor textarea:focus{outline:2px solid var(--primary,#7056d8);outline-offset:1px}.test-notification-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin-top:8px}.test-notification-editor-footer .field-hint{margin:0}@media(max-width:650px){.test-notification-editor textarea{min-height:220px;padding:12px}.test-notification-editor-footer{align-items:flex-start}}

#detail .deployment-entry-choices { display: grid; gap: 12px; min-width: 0; margin: 18px 0; padding: 16px; border: 1px solid var(--line, #e3e8ef); border-radius: 9px; background: var(--surface, #fff); }
#detail .deployment-entry-choices > h4 { margin: 0; font-size: 14px; line-height: 1.6; font-weight: 600; color: var(--ink); }
#detail .deployment-entry-choices > .gate-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; min-width: 0; }
#detail .deployment-entry-choices > .gate-actions > .button { flex: 0 1 auto; min-width: 0; max-width: 100%; min-height: 38px; padding: 8px 12px; font-size: 13px; line-height: 1.5; text-align: center; justify-content: center; white-space: normal; }
#detail .deployment-entry-choices > .field-hint { margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
#detail .deployment-entry-choices > .deployment-conversation-help { min-width: 0; margin: 0; padding-top: 10px; border-top: 1px solid var(--line, #e3e8ef); }
#detail .deployment-conversation-help > summary { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; min-height: 32px; padding: 4px 0; list-style: none; cursor: pointer; font-size: 13px; line-height: 1.6; color: var(--secondary); }
#detail .deployment-conversation-help > summary::-webkit-details-marker { display: none; }
#detail .deployment-conversation-help > summary::before { content: ''; flex: 0 0 6px; width: 6px; height: 6px; margin: 0 3px 0 1px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
#detail .deployment-conversation-help[open] > summary::before { transform: rotate(45deg); }
#detail .deployment-conversation-help > summary:hover { color: var(--blue); }
#detail .deployment-conversation-help > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
#detail .deployment-conversation-help > p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--secondary); }
#detail .deployment-conversation-help > pre { max-width: 100%; margin: 10px 0 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; line-height: 1.7; background: var(--bg, #f7f9fc); border-radius: 6px; }
.deployment-confirmation { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 12px; border-radius: 8px; background: var(--bg, #f7f9fc); line-height: 1.6; }
.deployment-confirmation input { flex: 0 0 auto; margin-top: 5px; }
.deployment-confirmation[hidden] { display: none; }
@media (max-width: 480px) {
  #detail .deployment-entry-choices { padding: 14px; }
  #detail .deployment-entry-choices > .gate-actions > .button { flex: 1 1 100%; min-height: 40px; }
}

/* Handoff uses one spacing rhythm in both standalone and inline project views. */
#detail .test-handoff-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#detail .test-handoff-panel > * { margin: 0; }
#detail .test-handoff-panel > [hidden] { display: none; }
#detail .test-handoff-intro { display: grid; gap: 4px; min-width: 0; }
#detail .implementation-delivery > .stage-notice > * + .test-handoff-panel { margin-top: 18px; }
#detail .test-handoff-heading { display: grid; gap: 4px; }
#detail .test-handoff-heading h4 { margin: 0; line-height: 1.6; font-size: 16px; }
#detail .test-handoff-heading p { margin: 0; font-size: 12px; line-height: 1.7; }
#detail .test-handoff-panel .test-handoff-compact { margin: 0; padding: 4px 0 8px; gap: 8px 16px; border: 0; border-bottom: 1px solid var(--line); }
#detail .test-handoff-compact > [data-test-people] { min-height: 32px; padding: 4px 8px; line-height: 1.5; }
#detail .test-handoff-compact .test-handoff-people { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; min-width: 0; }
#detail .test-handoff-people > strong { font-size: 13px; flex: none; }
#detail .test-handoff-person-list { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; min-width: 0; }
#detail .test-handoff-person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
#detail .test-handoff-person small { font-size: 12px; color: var(--muted); }
#detail .test-handoff-person small.is-sent { color: var(--green, #27836d); }
#detail .test-handoff-panel .test-handoff-preview { margin: 0; }
#detail .test-handoff-panel .test-handoff-preview > summary,
#detail .test-handoff-panel .test-feedback-later > summary { padding: 6px 0; min-height: 32px; line-height: 1.6; cursor: pointer; font-size: 13px; }
#detail .test-handoff-panel .test-handoff-preview > p { margin: 4px 0 8px; font-size: 12px; }
#detail .test-handoff-panel .test-handoff-preview pre { margin: 8px 0 0; padding: 12px; line-height: 1.7; }
#detail .test-handoff-panel .test-notification-editor textarea { min-height: 190px; padding: 12px; line-height: 1.7; }
#detail .test-handoff-panel .test-notification-editor-footer { margin-top: 6px; gap: 4px 12px; }
#detail .test-handoff-panel .test-notification-editor-footer .field-hint { margin: 0; }
#detail .test-handoff-panel > .gate-actions:empty { display: none; }
#detail .test-handoff-panel .gate-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
#detail .test-handoff-panel [data-test-feedback] { display: grid; gap: 12px; margin: 0; }
#detail .test-handoff-panel [data-test-feedback] .field { margin: 0; }
#detail .test-handoff-panel [data-test-feedback] label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; font-size: 13px; }
#detail .test-handoff-panel [data-test-feedback] label .field-hint { font-size: 12px; font-weight: 400; margin: 0; }
#detail .test-handoff-panel [data-test-feedback] textarea { min-height: 88px; padding: 10px 12px; }
#detail .test-handoff-panel .test-feedback-later[open] > form { margin-top: 8px; }
#detail .test-handoff-panel .test-notification-history { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
#detail .test-handoff-panel .test-notification-issues p { margin: 0; line-height: 1.7; font-size: 13px; }
@media (max-width: 650px) {
  #detail .test-handoff-panel { gap: 10px; }
  #detail .test-handoff-panel .test-handoff-compact { gap: 4px 10px; }
  #detail .test-handoff-compact > [data-test-people] { min-height: 32px; padding: 4px 8px; line-height: 1.5; }
#detail .test-handoff-compact .test-handoff-people { flex: 1 1 180px; gap: 6px 12px; }
  #detail .test-handoff-panel .test-handoff-preview > summary,
  #detail .test-handoff-panel .test-feedback-later > summary { min-height: 40px; padding: 9px 0; }
}

/* A single current step: deployment confirmation, then developer self-test. */
#detail .deployment-flow { min-width: 0; }
#detail .deployment-flow > .implementation-fold { margin-top: 14px; }
#detail .deployment-flow .deployment-step-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
#detail .deployment-step-heading h4 { margin: 0; font-size: 14px; line-height: 1.6; }
#detail .deployment-step-state { color: var(--secondary); background: var(--bg); border-radius: 5px; padding: 3px 8px; font-size: 12px; line-height: 1.6; }
#detail .deployment-flow .deployment-alternatives { border-top: 1px solid var(--line); padding-top: 8px; min-width: 0; }
#detail .deployment-alternatives > summary { width: fit-content; cursor: pointer; font-size: 12px; line-height: 1.7; color: var(--secondary); padding: 4px 0; }
#detail .deployment-alternatives .gate-actions { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
#detail .deployment-alternatives .deployment-conversation-help { margin-top: 10px; }
#detail .deployment-flow #deployment-form { display: grid; gap: 16px; min-width: 0; }
#detail .deployment-flow #deployment-form > * { min-width: 0; margin: 0; }
#detail .deployment-flow #deployment-form [hidden] { display: none; }
#detail .deployment-flow #deployment-form .field { margin: 0; }
#detail .deployment-flow #deployment-form .field > label { display: block; margin: 0 0 8px; font-size: 13px; line-height: 1.6; font-weight: 500; }
#detail .deployment-flow #deployment-form :is(input.input,select,textarea) { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; font-size: 14px; }
#detail .deployment-flow #deployment-form :is(input.input,select) { min-height: 40px; }
#detail .deployment-flow #deployment-form textarea { min-height: 88px; }
#detail .deployment-flow #deployment-form .deployment-confirmation { align-items: flex-start; gap: 10px; padding: 4px 0; background: transparent; border-radius: 0; font-size: 13px; line-height: 1.7; }
#detail .deployment-flow #deployment-form .deployment-confirmation input { width: 16px; height: 16px; margin: 3px 0 0; }
#detail .deployment-flow #deployment-form > .field-hint { font-size: 12px; line-height: 1.7; color: var(--muted); }
#detail .deployment-flow #deployment-form > .gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
#detail .deployment-flow #deployment-form .gate-actions > .button { min-height: 40px; padding: 9px 14px; font-size: 13px; line-height: 1.6; }
#detail .deployment-flow #deployment-form .acceptance-checks { padding: 14px; border: 1px solid var(--line); border-radius: 7px; }
#detail .deployment-flow #deployment-form .acceptance-checks legend { padding: 0 6px; font-size: 13px; }
#detail .deployment-flow #deployment-form .acceptance-checks label { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 8px 0; font-size: 13px; line-height: 1.7; }
#detail .deployment-flow #deployment-form .acceptance-checks input { flex: 0 0 16px; width: 16px; height: 16px; margin: 3px 0 0; }
#detail .deployment-flow #deployment-form .implementation-fold > .disclosure-body { display: grid; gap: 16px; padding: 14px; }
#detail .deployment-flow #deployment-form .deployment-saved { margin: 0; padding: 0; border: 0; }
#detail .deployment-flow .agent-deployment-status { margin: 0; padding: 0; border: 0; background: transparent; }
#detail .deployment-flow .agent-deployment-status h4 { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
#detail .deployment-flow .agent-deployment-status p { margin: 8px 0 0; font-size: 13px; }
#detail .implementation-delivery>.deployment-flow>.agent-deployment-status:not(.deployment-saved) { display: grid; gap: 8px; margin-top: 8px; }
#detail .deployment-flow .agent-deployment-status:not(.deployment-saved)>h4,
#detail .deployment-flow .agent-deployment-status:not(.deployment-saved)>p { margin: 0; }
#detail .deployment-flow .agent-deployment-status:not(.deployment-saved)>p { line-height: 1.65; }
@media(max-width:650px) {
  #detail .deployment-flow #deployment-form { gap: 14px; }
  #detail .deployment-flow .deployment-current-step > .gate-actions > .button { flex: 1 1 100%; }
  #detail .deployment-alternatives .gate-actions > .button { flex: 1 1 100%; }
}

/* Deployment leads into one workspace with parallel testing activities. */
#detail .testing-workspace { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface,#fff); margin-top: 18px; min-width: 0; }
#detail .testing-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: var(--bg); overflow-x: auto; }
#detail .testing-tabs button { appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--secondary); padding: 14px 20px; display: flex; align-items: center; gap: 10px; cursor: pointer; font: inherit; white-space: nowrap; }
#detail .testing-tabs button strong { font-size: 14px; font-weight: 500; }
#detail .testing-tabs button span { font-size: 12px; color: var(--muted); }
#detail .testing-tabs button[aria-selected=true] { color: var(--blue); border-bottom-color: var(--blue); background: var(--surface,#fff); }
#detail .testing-tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; }
#detail .testing-tab-panel { padding: 20px; min-width: 0; }
#detail .testing-tab-panel[hidden], #detail .testing-workspace [hidden] { display: none; }
#detail .testing-tab-panel .environment-test-panel { border: 0; padding: 0; margin: 0; background: transparent; }
#detail .testing-tab-panel .environment-test-config { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
#detail .testing-tab-panel .environment-test-config > summary { cursor: pointer; padding: 4px 0; font-size: 13px; }
#detail .testing-tab-panel [data-env-config] { display: grid; gap: 12px; }
#detail .testing-tab-panel [data-env-config] textarea { width: 100%; min-height: 108px; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.7; padding: 12px; }
#detail .environment-test-preferences > summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 4px 0; }
#detail .testing-qa-empty h4 { font-size: 15px; margin: 0 0 10px; }
#detail .testing-qa-empty p { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.8; }
#detail .testing-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 18px 20px; border-top: 1px solid var(--line); }
#detail .testing-next > div { flex: 1 1 260px; min-width: 0; }
#detail .testing-next strong { font-size: 14px; font-weight: 500; }
#detail .testing-next p { margin: 6px 0 0; font-size: 12px; line-height: 1.7; color: var(--secondary); }
#detail .testing-next > .button { flex: 0 0 auto; min-height: 40px; }
#detail .testing-next .error { flex: 1 1 100%; color: var(--red,#b42318); }
#detail .testing-workspace .test-handoff-panel > .gate-actions { display: none; }
#detail .testing-workspace .test-handoff-panel [data-test-feedback] [data-test-result=passed] { display: none; }
#detail .testing-workspace .test-feedback-later[open] [data-test-result=passed] { display: inline-flex; }
#detail .testing-records { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
#detail .testing-records > summary { cursor: pointer; font-size: 13px; color: var(--secondary); padding: 5px 0; }
#detail .testing-records > div { display: grid; gap: 16px; padding: 16px 0 4px; }
#detail .testing-records .deployment-saved h4 { font-size: 14px; }
@media(max-width:650px) {
  #detail .testing-tabs button { flex: 1 0 auto; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; }
  #detail .testing-tabs button strong { font-size: 13px; }
  #detail .testing-tab-panel { padding: 16px; }
  #detail .testing-next { padding: 16px; gap: 12px; }
  #detail .testing-next > .button { width: 100%; }
}
#detail .testing-workspace #deployment-form { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
#detail .testing-workspace .test-notification-editor textarea { min-height: 150px; }

/* Keep the task-wide approval in the project's current delivery workspace. */
#detail .implementation-release-next { margin-top: 20px; padding: 20px 0 4px; border-top: 1px solid var(--line); min-width: 0; scroll-margin-top: 20px; }
#detail .implementation-release-next:focus { outline: none; }
#detail .implementation-release-next > .release-scope { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
#detail .implementation-release-next .stage-notice { margin: 0; padding: 0; border: 0; background: transparent; }
#detail .implementation-release-next .stage-notice > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; line-height: 1.6; color: var(--text); }
#detail .implementation-release-next .stage-notice > p { margin: 8px 0; color: var(--secondary); font-size: 13px; line-height: 1.7; }
#detail .implementation-release-next .gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 0; }
#detail .implementation-release-next .gate-actions .button { min-height: 42px; flex: 0 0 auto; }
#detail .implementation-test-record { margin-top: 20px; }
#detail .implementation-test-record .environment-test-panel { margin: 0; border: 0; padding: 0; background: transparent; }
@media(max-width:650px){#detail .implementation-release-next .gate-actions .button { width: 100%; white-space: normal; } }
