.work-folder .compound-active .project-heading {
  position: sticky;
  z-index: 3;
  top: 0;
  background: var(--folder-surface);
  margin-top: -14px;
  padding: 14px 0 11px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--folder-edge);
}
.compound-active .project-heading h1 { color: var(--folder-ink); overflow-wrap: anywhere; }
.compound-work, .compound-import { max-width: 840px; }
.compound-import, .compound-brief { color: var(--folder-ink); }
.compound-import { margin-top: 24px; }
.compound-import > summary, .compound-brief > summary, .compound-job-result > summary { cursor: pointer; font-size: 13px; }
.compound-import form { margin-top: 12px; }
.compound-brief { margin-bottom: 17px; }
.compound-brief form { margin-top: 8px; }
.compound-brief textarea { width: 100%; margin-bottom: 8px; }
#compound-steps { padding: 0; margin: 0 0 16px; list-style: none; display: grid; gap: 8px; }
#compound-steps:empty { margin: 0; }
.compound-row { padding: 7px 10px; border: 1px solid var(--folder-edge); border-radius: 8px; background: #fffaf1; min-width: 0; }
.compound-row-top { display: flex; align-items: center; gap: 10px; min-height: 35px; }
.compound-step-title { flex: 1; min-width: 0; overflow-wrap: anywhere; text-align: left; font-weight: 650; color: var(--folder-ink); }
button.compound-step-title { background: transparent; border: 0; padding: 5px 0; }
button.compound-step-title:hover { text-decoration: underline; }
.compound-handle { border: 0; border-radius: 5px; cursor: grab; padding: 5px 8px; color: var(--folder-ink); background: #efe4cd; font-size: 15px; }
.compound-handle:active { cursor: grabbing; }
.compound-row.compound-dragging { opacity: .5; }
.compound-row.compound-drop { outline: 2px solid var(--folder-ink); }
.compound-state { padding: 4px 8px; border-radius: 5px; font-size: 12px; white-space: nowrap; color: #504129; background: #f0e7d2; }
.compound-state[data-state="complete"],.compound-state[data-state="running"] { color:#244637; background:#e0ede0; }
.compound-state[data-state="blocked"] { color:#672334; background:#f4dce1; }
.compound-state[data-state="editing"] { color:#5a4932; background:#f5e9ce; }
.compound-job-result { margin: 3px 0 4px; }
.compound-job-result p { white-space: pre-wrap; overflow-wrap: anywhere; }
.compound-job-result .text-button { margin-top: 6px; }
.compound-blocked-actions { margin: 6px 0 1px; }
.compound-composer { margin: 0; }
.compound-composer textarea { width: 100%; }
.compound-compose-actions { justify-content: flex-end; }
.compound-remove { margin-right: auto; }
.compound-tip { margin: 8px 0 0; color: var(--folder-ink); }
.compound-row .compound-composer { margin: 8px 0 3px; }
@media(max-width: 580px) {
  .work-folder .compound-active .project-heading { gap: 5px; padding-top: 10px; }
  .compound-state { white-space: normal; text-align: right; min-width: 46px; }
}

.compound-farm {
  margin: 6px 0 9px;
  padding: 12px;
  border: 1px solid #d3c29d;
  border-radius: 8px;
  background: #f6eedb;
  color: var(--folder-ink);
}
.compound-farm h3 { margin: 0 0 9px; font-size: 14px; }
.compound-farm-route {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.compound-farm-stage { position: relative; min-height: 63px; background: #fffaf1; border-color: #d3c29d; }
.compound-farm-stage + .compound-farm-stage::before {
  content: "";
  position: absolute;
  width: 18px;
  border-top: 1px solid #a68d62;
  top: 50%;
  right: 100%;
}
.compound-farm-stage[data-stage="current"] { border-color: #416a55; background: #e6efe3; }
.compound-farm-stage[data-stage="done"] { background: #f4f5eb; border-color: #bdc8b8; }
.compound-farm-worker { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: #244737; }
.compound-farm-dot { width: 8px; height: 8px; border-radius: 50%; background: #416a55; flex: 0 0 8px; }
@media (prefers-reduced-motion: no-preference) {
  .compound-farm-dot { animation: farm-pulse 2.1s ease-in-out infinite; }
  @keyframes farm-pulse {
    50% { box-shadow: 0 0 0 4px #416a5526; }
  }
}
.compound-farm-latest { margin: 8px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.compound-farm-mini { width: fit-content; background: #fffaf1; border-color: #c3af89; margin-top: 8px; }
.compound-farm-mini[data-state="working"] { border-color: #416a55; background: #e6efe3; }
.compound-farm-mini[data-state="failed"] { border-color: #a45461; background: #fbefef; }
.compound-farm-activity { margin: 7px 0 0; padding-left: 1.15rem; color: #5a513f; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 580px) {
  .compound-farm-route { gap: 7px; }
  .compound-farm-stage { padding: 7px; }
  .compound-farm-stage + .compound-farm-stage::before { width: 7px; }
}
