/* Standalone execution components. Palette falls back outside the app shell. */
dd-stack-panel { display:block; }
dd-stack-panel.hidden, dd-stack-panel[hidden] { display:none !important; }
dd-execution-task-row .hidden { display:none !important; }
dd-execution-task-row { color:var(--text,#e6e6e6); font:14px/1.5 ui-monospace,Consolas,monospace; }
dd-execution-task-row dd-button { display:contents; }
dd-execution-task-row .check-button { flex:0 0 24px; width:24px; min-height:24px; padding:0; color:inherit; background:transparent; border:1px solid var(--border,#2a3035); cursor:pointer; }
dd-execution-task-row:focus-visible, dd-execution-task-row :focus-visible { outline:2px solid var(--focus-ring,#b7ffb0); outline-offset:2px; }
dd-execution-task-row.execution-stack-card .row-controls { flex:1 1 100%; }
dd-execution-task-row.execution-stack-card .row-primary { flex-wrap:wrap; }
dd-execution-task-row.execution-stack-card .row-actions { max-width:100%; flex-wrap:wrap; }
dd-execution-task-row .row-button svg { display:block; }
.execution-stack { box-sizing: border-box; min-width: 0; padding: 10px; margin: 0 0 12px; border: 1px solid var(--border, #2a3035); background: var(--canvas, #0b0d0e); color: var(--text, #e6e6e6); font: 14px/1.5 ui-monospace, Consolas, monospace; }
.execution-stack .hidden { display: none !important; }
.execution-stack summary { position: relative; cursor: pointer; padding: 10px 12px; overflow-wrap: anywhere; font-weight: 700; background: #10272b; border-left: 3px solid #64d8e5; color: #a5e8ef; }
.execution-stack .stack-name-input { box-sizing: border-box; width: min(32ch, 100%); min-width: 0; font: inherit; padding: 2px 5px; color: #c3f1f5; background: #0c1e21; border: 1px solid #64d8e5; }
.execution-stack-progress { display: inline-block; margin-left: 8px; color: #9ec8ce; font-size: 12px; font-weight: 400; }
.execution-stack-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.execution-stack-toolbar[hidden], .execution-stack-toolbar.hidden { display: none; }
.execution-stack-toolbar .row-button { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; width: 28px; height: 30px; padding: 5px; color: inherit; background: var(--surface, #101315); border: 1px solid var(--border, #2a3035); border-radius: 2px; cursor: pointer; }
.execution-stack-toolbar .row-button svg { width: 16px; height: 16px; }
.execution-stack .ghost-button { font: inherit; font-size: 12px; cursor: pointer; padding: 5px 8px; border: 1px solid var(--border, #2a3035); border-radius: 2px; color: inherit; background: var(--surface, #101315); }
.execution-stack button:disabled { opacity: .45; cursor: default; }
.execution-stack-cards { display: grid; gap: 6px; list-style: none; padding: 0; margin: 8px 0; }
.execution-stack-card { position: relative; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; min-height: 52px; padding: 9px; border: 1px solid var(--border, #2a3035); border-left-width: 3px; border-radius: 0; background: var(--surface, #101315); color: inherit; overflow-wrap: anywhere; }
.execution-stack-card .row-primary { display: flex; align-items: flex-start; gap: 8px; min-width: 0; flex: 1 1 220px; }
.execution-stack-card .todo-text { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.execution-stack-card .row-controls { position: relative; display: flex; flex-wrap: wrap; align-items: center; min-height: 28px; min-width: min(100%, 260px); margin-left: auto; gap: 6px; }
.execution-stack-card .metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-muted, #8a9299); font-size: 12px; }
.execution-stack-card .row-actions { position: static; display: flex; flex-wrap: nowrap; gap: 4px; margin-left: auto; padding: 0; border: 0; background: transparent; transform: none; transition: none; }
.execution-stack-card .row-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-width: 28px; height: 28px; padding: 5px; cursor: pointer; background: transparent; color: inherit; border: 1px solid var(--border, #2a3035); border-radius: 2px; }
.execution-stack-card .row-button svg { width: 16px; height: 16px; }
.execution-stack-state { font-size: 10px; font-weight: 700; line-height: 16px; white-space: nowrap; padding: 1px 4px; border: 1px solid currentColor; color: var(--text-muted, #8a9299); }
.execution-stack-card[data-status="Completed"] { border-left-color: #7cff6b; background: #102314; }
.execution-stack-card[data-status="Completed"] .execution-stack-state { color: #7cff6b; }
.execution-stack-card[data-status="Active Task"], .execution-stack-card[data-status="Next task"] { border-left-color: #64d8e5; background: #10272b; }
.execution-stack-card[data-status="Active Task"] .execution-stack-state, .execution-stack-card[data-status="Next task"] .execution-stack-state { color: #64d8e5; }
.execution-stack-card[data-status="Unavailable"] { border-style: dashed; color: var(--text-muted, #8a9299); }
.execution-stack-card.is-grabbed { border-color: #f3ad55; background: #332414; box-shadow: inset 3px 0 0 #f3ad55; }
.execution-stack-card.is-grabbed .execution-stack-state { color: #f3ad55; }
.execution-stack-card.pending-remove { border-color: #ff6b6b; background: #32191b; }
.execution-stack-card .execution-stack-remove-warning { position: absolute; inset: 0; transform: none; max-width: none; display: none; align-items: center; padding: 0; background: #32191b; color: #ffb7b7; font-size: 11px; line-height: 14px; font-weight: 700; pointer-events: none; }
.execution-stack-card.pending-remove .execution-stack-remove-warning { display: flex; }
.execution-stack-card.pending-remove .row-controls > :not(.execution-stack-remove-warning) { visibility: hidden; pointer-events: none; }
.execution-stack-card.pending-remove .execution-stack-children { pointer-events: none; }
.stack-header-warning:empty { display: none; }
.stack-header-warning { position: absolute; inset: 0; background: #32191b; color: #ffb7b7; padding: 6px 12px; display: flex; align-items: center; font-size: 11px; }
.execution-stack-children { display: grid; flex: 1 0 100%; gap: 8px; list-style: none; padding: 8px 0 0 18px; margin: 0; border-top: 1px solid var(--border, #2a3035); }
.execution-stack-check { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.execution-stack-check span { overflow-wrap: anywhere; }
.execution-stack-hint { font-size: 12px; color: var(--text-muted, #8a9299); margin: 4px 0; }
.execution-stack-hint:empty { display: none; }
.execution-stack :focus-visible, .execution-stack .execution-stack-card:focus { outline: 2px solid var(--focus-ring, #b7ffb0); outline-offset: 2px; }
.execution-stack .execution-stack-card.is-grabbed:not(.pending-remove):focus { outline-color: #f3ad55; }
.execution-stack-card.is-rest {
  border-style: dashed;
  --completion-row-flash-border: #71777d;
  --completion-row-flash-background: #17191b;
  --completion-row-flash-shadow: inset 3px 0 0 #71777d, 0 0 0 1px rgb(113 119 125 / 20%);
  --completion-row-final-border: #4b5055;
  --completion-row-final-background: #17191b;
}
.execution-stack .execution-stack-card.is-rest.task-two-line { min-height: 47px; padding: 1px 8px; row-gap: 0; justify-content: center; }
.execution-stack .execution-stack-card.is-rest.task-two-line > .row-controls { min-height: 0; }
.execution-stack .execution-stack-card.is-rest.task-two-line.pending-remove > .row-controls { min-height: 28px; }
.execution-stack-card.is-rest:not(.is-grabbed):not(.pending-remove) { border-color: #4b5055; border-left-color: #71777d; background: #17191b; color: #b5b9bd; }
.execution-stack-card.is-rest:not(.is-grabbed):not(.pending-remove) .execution-stack-state { color: #94999e; }
.execution-stack-card.is-rest .row-primary { flex-wrap: wrap; }
.execution-stack-card.is-rest .todo-text { flex: 1 1 120px; }
.execution-rest-kind { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; max-width: 18ch; padding: 0 5px; overflow: hidden; color: #adb2b7; border: 1px solid #50565c; font-size: 10px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; text-overflow: ellipsis; }
.execution-rest-duration { flex: 0 0 auto; color: #adb2b7; font-size: 12px; white-space: nowrap; }
.execution-stack-card.is-rest .metadata { color: #94999e; line-height: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.execution-stack-card.is-rest.is-grabbed .execution-rest-kind { color: #f3ad55; border-color: #f3ad55; }
.execution-stack-card.is-rest.pending-remove .execution-rest-kind { color: #ffb7b7; }
.execution-stack .execution-stack-card.has-focus-timer.task-two-line > .row-controls { display: flex; align-items: center; gap: 8px; }
.execution-stack-card.has-focus-timer > .row-controls > .metadata { flex: 1 1 auto; min-width: 0; }
.execution-stack-card .execution-focus-time { flex: 0 0 auto; align-self: center; margin-left: auto; color: var(--text-muted, #8a9299); font-size: 18px; font-weight: 600; line-height: 24px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.execution-stack-card .execution-task-eta { flex: 0 1 auto; color: var(--text-muted, #8a9299); font-size: 12px; line-height: 18px; }
.execution-stack-card .execution-task-eta[hidden] { display: none; }
.execution-stack-card .metadata:empty ~ .execution-focus-time { font-size: 20px; line-height: 26px; }
.execution-stack-card.is-working .execution-focus-time { color: var(--accent, #7cff6b); }
.execution-stack-card.task-two-line > .row-primary > .row-actions > dd-button > .execution-focus-button { flex: 0 0 28px; width: 28px; min-width: 28px; padding: 5px; }
.execution-stack-card .execution-focus-button svg { fill: currentColor; stroke: none; }
.execution-stack-card .execution-focus-button svg[data-focus-icon="reset"] { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.execution-stack-card.is-working:not(.is-grabbed):not(.pending-remove) { border-color: #60875e; box-shadow: 0 0 5px rgb(124 255 107 / 18%), inset 0 0 0 1px rgb(124 255 107 / 8%); }
@media (max-width: 720px) {
  .execution-stack-card .row-primary { flex-wrap: wrap; }
  .execution-stack-card .todo-text { flex: 1 1 100px; }
  .execution-stack-card .row-actions { flex-wrap: wrap; }
  .execution-stack { padding: 8px; }
  .execution-stack-card .row-primary { flex-basis: 100%; }
  .execution-stack-card .row-controls { margin-left: 32px; flex: 1 1 auto; min-width: 0; }
  .execution-stack-progress { display: block; margin-left: 0; }
}
