/* A software team of agents (lesson 8.2). Colours: blue = the agents (each a model with its own prompt and tools),
   amber = the requirement and the task board, gray = the person and the flow, rose = work sent back and the shipped
   result. Lit agents glow; parts not yet in play fade; nothing changes hue. */
.at-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 12px;
  background-color: var(--soft); background-image: radial-gradient(#dfe3e8 1px, transparent 1px); background-size: 16px 16px;
}
.at-team { display: grid; justify-items: stretch; }
.at-title { font: 600 11px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.at-req {
  padding: 8px 12px; border: 1.5px solid var(--data-line); border-radius: 10px; background: var(--data-tint);
  transition: box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.at-req .at-title { color: var(--data-ink); }
.at-req p { margin: 2px 0 0; font: 500 12.5px/1.45 var(--font-mono); color: var(--data-ink); }
.at-req.is-hot { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--data-line); }
.at-row { display: grid; gap: 8px; }
.at-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.at-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.at-agent {
  position: relative; display: flex; gap: 6px; align-items: center; justify-content: center; min-width: 0; padding: 8px 6px;
  border: 1.5px solid var(--model-line); border-radius: 10px; background: #fff; color: var(--model-ink); text-align: center;
  transition: box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.at-agent .icon { width: 15px; height: 15px; }
.at-row--3 .at-agent .icon { display: none; }
.at-agent b { font: 600 12.5px/1.3 var(--font-sans); }
.at-agent--person { border-color: var(--line-strong); color: var(--ink-2); }
.at-agent.is-hot { box-shadow: 0 0 0 4px var(--model-tint), 0 0 0 5px var(--model-line); }
.at-agent--person.is-hot { box-shadow: 0 0 0 4px var(--sunk), 0 0 0 5px var(--line-strong); }
.at-team .is-off { opacity: .35; }
.at-flag {
  position: absolute; top: -10px; right: -4px; padding: 0 6px; border: 1px solid var(--out-line); border-radius: 999px;
  background: var(--out-tint); font: 600 10px/1.6 var(--font-sans); white-space: nowrap; color: var(--out-ink);
}
.at-down { position: relative; justify-self: center; width: 2px; height: 16px; margin: 3px 0 5px; background: var(--faint); }
.at-down::after {
  content: ""; position: absolute; left: -4px; bottom: -1px;
  border: 5px solid transparent; border-top: 7px solid var(--faint); border-bottom: 0;
}

.at-side { display: grid; gap: 12px; }
.at-board { padding: 10px 12px; border: 1.5px solid var(--data-line); border-radius: 10px; background: #fff; }
.at-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.at-head .at-title { color: var(--data-ink); }
.at-note { font: 500 12px var(--font-mono); color: var(--data-ink); }
.at-tasks { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.at-task {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, max-content); align-items: center; gap: 8px; padding: 6px 8px;
  border: 1.5px solid var(--data-line); border-radius: 8px; background: var(--data-tint);
  transition: box-shadow var(--dur) var(--ease);
}
.at-task.is-changed { box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--data-line); }
.at-id { font: 600 12px var(--font-mono); color: var(--data-ink); }
.at-name { min-width: 0; font: 600 12.5px/1.35 var(--font-sans); color: var(--ink); }
.at-name small { display: block; font: 500 11px var(--font-sans); color: var(--muted); }
.at-status {
  justify-self: end; max-width: 15em; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
  font: 600 10.5px/1.6 var(--font-sans); text-align: right; color: var(--ink-2);
}
.at-status[data-kind="bad"] { border-color: var(--out-line); background: var(--out-tint); color: var(--out-ink); }
.at-empty { font-size: 13px; color: var(--muted); }
.at-ship {
  padding: 8px 12px; border: 1.5px solid var(--out-line); border-radius: 10px; background: var(--out-tint);
  transition: opacity var(--dur) var(--ease);
}
.at-ship .at-title { color: var(--out-ink); }
.at-ship p { margin: 2px 0 0; font: 600 13px var(--font-sans); color: var(--out-ink); }
.at-ship.is-empty { opacity: .5; }

@media (prefers-reduced-motion: reduce) {
  .at-req, .at-agent, .at-task, .at-ship { transition: none; }
}
@media (max-width: 680px) {
  .at-stage { grid-template-columns: 1fr; }
  .at-task { grid-template-columns: 26px minmax(0, 1fr); row-gap: 4px; }
  .at-status { grid-column: 2; justify-self: start; text-align: left; }
}
