.agent-orchestration { border-bottom: 1px solid var(--line); }
.agent-orchestration h2 span { color: var(--blue); }
.agent-orchestration .section-intro { align-items: end; }
.agent-orchestration .section-intro > p { max-width: 460px; }
.orchestration-brief { display: flex; gap: 18px; align-items: baseline; padding-block: 22px; border-block: 1px solid var(--line); font-size: 14px; }
.orchestration-brief > span { color: var(--muted); font-size: 12px; }
.orchestration-brief strong { font-weight: 500; }
.orchestration-brief .orchestration-example { margin-left: auto; white-space: nowrap; }
.orchestration-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 26px 8px; }
.orchestration-stage { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.orchestration-stage > span { color: var(--blue); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orchestration-stage strong { font-weight: 500; }
.orchestration-controls { display: flex; gap: 8px; }
.orchestration-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); font-size: 12px; line-height: 1.4; transition: background .2s, border-color .2s; }
.orchestration-controls button:hover { background: var(--pale); border-color: var(--blue); }
.orchestration-controls button:disabled { opacity: .45; cursor: default; }
.orchestration-controls .icon { width: 16px; height: 16px; }
.orchestration-canvas { height: 540px; margin-block: 12px; }
.orchestration-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.orchestration-canvas .react-flow { background: var(--white); }
.orchestration-canvas .react-flow__pane { cursor: default; }
.orchestration-canvas .react-flow__attribution { background: var(--white); font: 10px Inter, sans-serif; }
.orchestration-canvas .react-flow__attribution a { color: var(--muted); }
.orchestration-canvas .react-flow__edge-path { stroke: #9bb6c6; stroke-width: 1.5; }
.orchestration-canvas .agent-edge-active .react-flow__edge-path { stroke: var(--blue); stroke-width: 2; }
.orchestration-canvas .agent-edge-done .react-flow__edge-path { stroke: var(--blue); }
.agent-node { padding: 17px 16px 13px; border: 1px solid #b9cdd8; border-radius: 8px; background: rgb(255 255 255 / 72%); color: var(--ink); transition: border-color .3s, background .3s; }
.agent-node-heading { display: flex; gap: 9px; align-items: center; }
.agent-node-heading strong { font-size: 15px; font-weight: 600; }
.agent-node-heading .icon { width: 19px; height: 19px; color: var(--blue); }
.agent-node-role { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
/* Compact metadata stays at the foot of each agent card. */
.agent-node-footer { display: flex; flex-wrap: nowrap; gap: 5px; align-items: center; justify-content: flex-end; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.agent-pill { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; padding: 3px 6px; border: 1px solid #c6dbe6; border-radius: 999px; background: rgb(237 245 249 / 65%); color: var(--muted); font-size: 10px; line-height: 1.4; white-space: nowrap; }
.agent-model-pill { color: var(--blue); font-weight: 500; }
.agent-node-duration { font-variant-numeric: tabular-nums; }
.agent-node-footer .agent-pill { flex-shrink: 0; }
.agent-node--orchestrator .agent-node-footer { border-color: rgb(255 255 255 / 30%); }
.agent-node--orchestrator .agent-pill { background: rgb(255 255 255 / 10%); border-color: rgb(255 255 255 / 30%); color: var(--white); }
.agent-node p.agent-node-task { margin-top: 18px; color: var(--ink); font-size: 13px; line-height: 1.5; min-height: 20px; }
.agent-node-status { display: flex; gap: 7px; align-items: center; padding-top: 0; margin-top: 15px; color: var(--muted); font-size: 11px; }
.agent-state-mark { width: 12px; height: 12px; border: 1px solid #91a9b7; border-radius: 50%; }
.agent-node--working { border-color: var(--blue); background: rgb(245 250 255 / 72%); }
.agent-node--working .agent-node-status, .agent-node--done .agent-node-status { color: var(--blue); }
.agent-node--working .agent-state-mark { border: 2px solid #a9cbdc; border-top-color: var(--blue); }
.is-playing .agent-node--working .agent-state-mark { animation: agent-working 1.2s linear infinite; }
.agent-node--done .agent-state-mark { border: 0; }
.agent-state-mark .icon { display: block; width: 13px; height: 13px; stroke-width: 2; }
.agent-node--review { border-color: var(--blue); background: rgb(237 245 249 / 72%); }
.agent-node--review .agent-state-mark { border-color: var(--blue); background: var(--blue); }
.agent-node--review .agent-node-status { color: var(--blue); }
.agent-node--orchestrator { background: rgb(0 85 128 / 88%); border-color: var(--blue); color: var(--white); }
.agent-node--orchestrator .agent-node-heading .icon, .agent-node--orchestrator p.agent-node-task, .agent-node--orchestrator .agent-node-status { color: var(--white); }
.agent-node--orchestrator .agent-node-role { color: #d8edf8; }
.agent-node--orchestrator .agent-node-status { border-color: #68a7c8; }
.agent-node--orchestrator .agent-state-mark { border-color: #74b0d0; border-top-color: white; }
.orchestration-canvas .react-flow__handle { background: var(--white); border: 1.5px solid var(--blue); width: 7px; height: 7px; }
.orchestration-narration { min-height: 48px; padding: 18px 0; max-width: 75ch; font-size: 14px; line-height: 1.7; }
.orchestration-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.orchestration-footer p { max-width: 60ch; font-size: 12px; }
.orchestration-footer .text-link { flex-shrink: 0; }
.orchestration-fallback { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin: 0; padding: 36px 0 36px 22px; }
.orchestration-fallback strong { display: block; font-weight: 500; }
.orchestration-fallback span { display: block; color: var(--muted); margin-top: 12px; font-size: 14px; }
@keyframes agent-working { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  .orchestration-footer { flex-direction: column; gap: 14px; }
  .orchestration-brief { flex-wrap: wrap; gap: 6px 16px; }
  .orchestration-brief .orchestration-example { margin-left: 0; }
  .orchestration-fallback { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .agent-orchestration .section-intro { align-items: start; }
  .orchestration-brief strong { flex-basis: 100%; font-size: 15px; }
  .orchestration-toolbar { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 22px; }
  .orchestration-stage { gap: 12px; }
  .orchestration-controls button { padding-inline: 13px; }
  .orchestration-canvas { height: 1040px; margin-top: 16px; }
  .agent-node { padding: 14px 12px 12px; }
  .agent-node-heading { gap: 7px; }
  .agent-node-heading strong { font-size: 14px; }
  .agent-node-heading .icon { width: 16px; height: 16px; }
  .agent-node p.agent-node-task { min-height: 39px; font-size: 13px; margin-top: 14px; }
  .agent-node-role { font-size: 11px; }
  .orchestration-narration { min-height: 108px; }
  .orchestration-fallback { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-orchestration *, .agent-orchestration *::before, .agent-orchestration *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 640px) {
  .orchestration-canvas { height: 1170px; }
}
