/* Original LangSpan team-story component. Its complete source is the default frame. */
.team-story {
  --team-paper: var(--paper, #f4f3ef);
  --team-ink: var(--ink, #151513);
  --team-slate: var(--slate, #3f3e44);
  --team-rule: #d8d7d0;
  --team-accent: var(--coral, #d87859);
  --team-accent-dark: var(--coral-dark, #a94b31);
  --team-accent-wash: var(--coral-wash, #f7e8e1);
  --motion-fast: 160ms;
  --motion-step: 480ms;
  --motion-hold: 1200ms;
  --motion-total: 4800ms;
  margin-block: 0;
  color: var(--team-ink);
  font: 1rem/1.5 var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}
.team-story *, .team-story *::before, .team-story *::after { box-sizing: border-box; }
.team-story p, .team-story h2, .team-story h3, .team-story ol { margin: 0; }
.team-story code {
  font: .875rem/1.5 var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", monospace);
  overflow-wrap: anywhere;
}
.team-story__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.team-story .team-story__eyebrow {
  margin-bottom: 8px;
  color: var(--team-slate);
  font-size: .875rem;
}
.team-story .team-story__heading h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -.025em;
  font-weight: 600;
}
.team-story__project { color: var(--team-slate); font-size: .875rem; text-align: right; }
.team-story__board {
  display: grid;
  grid-template-columns: minmax(0, .9fr) 88px minmax(0, 1.1fr);
  align-items: start;
}
.team-story__agent {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--team-rule);
  border-radius: 8px;
  background: #fffefa;
}
.team-story__actor {
  display: flex;
  align-items: start;
  gap: 12px;
  min-height: 72px;
  margin-bottom: 16px;
}
.team-story__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #c3c2bc;
  border-radius: 6px;
  color: var(--team-ink);
  background: #eeede7;
  font-size: .9375rem;
  font-weight: 600;
}
.team-story__actor-info { display: grid; gap: 4px; min-width: 0; }
.team-story .team-story__actor h3 { font-size: 1.125rem; line-height: 24px; font-weight: 600; letter-spacing: -.02em; }
.team-story__actor-info p { font-size: .875rem; line-height: 20px; color: var(--team-slate); }
.team-story__actor-info code { line-height: 20px; }
.team-story__event {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid #cecdc5;
  border-radius: 6px;
  background: var(--team-paper);
}
.team-story__event p { font-size: .875rem; color: var(--team-slate); }
.team-story .team-story__event-label { display: flex; align-items: center; gap: 8px; color: var(--team-ink); font-weight: 600; }
.team-story__check { font-size: 1rem; }
.team-story .team-story__continuation { margin-top: 16px; color: var(--team-slate); font-size: .875rem; }
.team-story__connection { min-width: 0; padding-top: 132px; }
.team-story__connection-label {
  display: block;
  margin-bottom: 8px;
  color: var(--team-slate);
  background: var(--team-paper);
  font-size: .875rem;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}
.team-story__wire { display: block; width: 100%; height: 24px; overflow: visible; }
.team-story__wire path { fill: none; stroke: #6c6b64; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.team-story__wire-line { stroke-dasharray: 4 4; }
.team-story__wire--narrow { display: none; }
.team-story__notice {
  display: grid;
  gap: 4px;
  min-height: 128px;
  padding: 12px 16px;
  border: 1px solid var(--team-accent);
  border-left-width: 4px;
  border-radius: 6px;
  background: var(--team-accent-wash);
}
.team-story .team-story__notice-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--team-ink); font-size: .875rem; }
.team-story__notice-heading img { display: block; flex: 0 0 20px; width: 20px; height: 20px; }
.team-story__notice-heading strong { font-weight: 600; }
.team-story__delivery { color: var(--team-slate); font-size: .875rem; }
.team-story__task-line { font-size: .875rem; }
.team-story .team-story__response-label { margin: 16px 0 8px; color: var(--team-slate); font-size: .875rem; }
.team-story__actions { display: grid; gap: 8px; padding: 0; list-style: none; }
.team-story__actions li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 8px 12px;
  border: 1px solid var(--team-rule);
  border-radius: 4px;
  background: var(--team-paper);
}
.team-story__action-verb { font-size: .875rem; font-weight: 600; }
.team-story__player {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--team-rule);
}
.team-story [data-motion-controls][hidden] { display: none !important; }
.team-story__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.team-story__buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #c7c6bd;
  border-radius: 6px;
  background: #fffefa;
  color: var(--team-ink);
  font: 600 .875rem/1.3 var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  cursor: pointer;
}
.team-story__buttons button:hover:not(:disabled) { background: #eeede7; border-color: #8c8b83; }
.team-story__buttons button:focus-visible { outline: 3px solid var(--team-accent-dark); outline-offset: 4px; }
.team-story__buttons button:disabled { opacity: .45; cursor: default; }
.team-story__buttons .team-story__play { min-width: 96px; background: var(--team-ink); border-color: var(--team-ink); color: #fffefa; }
.team-story__buttons .team-story__play:hover { background: #343431; border-color: #343431; }
.team-story__buttons .team-story__step-button { padding: 8px; }
.team-story__buttons svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.team-story__buttons .team-story__play svg { fill: currentColor; stroke: none; }
.team-story__pause-symbol { display: none; }
.team-story[data-motion-state="playing"] .team-story__pause-symbol { display: block; }
.team-story[data-motion-state="playing"] .team-story__play-symbol { display: none; }
.team-story__progress { color: var(--team-slate); font-size: .875rem; }
.team-story .team-story__keys { margin-left: auto; color: var(--team-slate); font-size: .875rem; }
.team-story .team-story__disclosure { margin-top: 16px; color: var(--team-slate); font-size: .875rem; }
.team-story__status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Only an explicitly started story can conceal later events. Actors and their task paths stay visible. */
.team-story.motion-ready [data-motion-item] {
  transition: opacity var(--motion-step) ease, transform var(--motion-step) ease, visibility var(--motion-step);
}
.team-story.motion-ready[data-frame="step"] [data-motion-item]:not(.is-visible) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
}
.team-story.motion-ready[data-frame="step"] [data-motion-item].is-visible,
.team-story[data-frame="end"] [data-motion-item],
.team-story[data-frame="static"] [data-motion-item] { opacity: 1; visibility: visible; transform: none; }
.team-story.motion-ready[data-frame="step"] .team-story__connection { transform: none; }
.team-story.motion-ready[data-frame="step"] .team-story__actions li.is-current { outline: 1px solid #7b7a72; outline-offset: 2px; }
.team-story[data-motion-state="paused"] [data-motion-item] { transition: none; }

@media (max-width: 840px) {
  .team-story__heading { align-items: start; gap: 16px; }
  .team-story__project { max-width: 136px; }
  .team-story__board { grid-template-columns: minmax(0, 1fr); }
  .team-story__connection { position: relative; height: 72px; padding: 0; }
  .team-story__connection-label { position: absolute; top: 24px; left: calc(50% + 20px); margin: 0; }
  .team-story__wire--wide { display: none; }
  .team-story__wire--narrow { display: block; position: absolute; left: calc(50% - 12px); top: 0; width: 24px; height: 72px; }
  .team-story__event { min-height: 112px; }
  .team-story__notice { min-height: 0; }
  .team-story .team-story__keys { width: 100%; margin-left: 0; }
}
@media (max-width: 480px) {
  .team-story__heading { display: block; margin-bottom: 20px; }
  .team-story .team-story__project { max-width: none; margin-top: 8px; text-align: left; }
  .team-story__agent { padding: 16px; }
  .team-story__actor { gap: 8px; }
  .team-story__avatar { flex-basis: 32px; width: 32px; height: 32px; }
  .team-story__event, .team-story__notice { padding: 12px; }
  .team-story__actions li { grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 8px; }
  .team-story__player { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .team-story *, .team-story *::before, .team-story *::after { animation: none !important; transition: none !important; }
  .team-story [data-motion-item] { opacity: 1 !important; visibility: visible !important; transform: none !important; }
  .team-story [data-motion-controls] { display: none !important; }
}
@media print {
  .team-story [data-motion-item] { opacity: 1 !important; visibility: visible !important; transform: none !important; transition: none !important; }
  .team-story [data-motion-controls] { display: none !important; }
  .team-story__agent { break-inside: avoid; }
}


/* A framed work surface makes the authored exchange legible before playback. */
.team-story {
  padding: 26px 28px 22px;
  border: 1px solid #d6d6cf;
  border-radius: 12px;
  background: var(--white, #fffefa);
  box-shadow: 0 2px 3px #15151304, 0 14px 34px #15151305;
}
.team-story__heading { padding-bottom: 22px; border-bottom: 1px solid #e5e4dd; margin-bottom: 24px; }
.team-story .team-story__eyebrow { color: var(--team-accent-dark); font-weight: 600; }
.team-story .team-story__heading h2 { font-size: clamp(1.375rem, 2.2vw, 1.625rem); letter-spacing: -.035em; }
.team-story__project { max-width: 190px; }
.team-story__agent { border-color: #dcdcd5; background: #fbfaf6; }
.team-story__avatar { border-color: #d2d1ca; background: #eae9e2; border-radius: 8px; }
.team-story__event { border-color: #d7d6ce; background: var(--white, #fffefa); }
.team-story__connection-label { background: var(--white, #fffefa); }
.team-story__notice { border-color: #d49a82; border-left-color: var(--team-accent); box-shadow: 0 2px 6px #a94b3107; }
.team-story__actions li { background: var(--white, #fffefa); border-color: #deded6; border-radius: 5px; }
.team-story__player { margin-top: 24px; padding-top: 18px; gap: 16px 22px; }
.team-story__buttons { gap: 6px; }
.team-story__buttons button { border-color: #d4d3cc; }
.team-story__buttons .team-story__play { border-color: var(--team-ink); min-width: 102px; }
.team-story__progress-group { display: flex; align-items: center; gap: 12px; }
.team-story__progress { min-width: 102px; font-variant-numeric: tabular-nums; }
.team-story__progress-bars { display: inline-flex; gap: 4px; align-items: center; }
.team-story__progress-bars i { display: block; width: 15px; height: 4px; border-radius: 1px; background: #dcdcd5; }
.team-story[data-frame="static"] .team-story__progress-bars i,
.team-story[data-frame="end"] .team-story__progress-bars i,
.team-story[data-team-story-current-step="1"] .team-story__progress-bars i:nth-child(-n+1),
.team-story[data-team-story-current-step="2"] .team-story__progress-bars i:nth-child(-n+2),
.team-story[data-team-story-current-step="3"] .team-story__progress-bars i:nth-child(-n+3),
.team-story[data-team-story-current-step="4"] .team-story__progress-bars i { background: var(--team-accent-dark); }
.team-story .team-story__disclosure { margin-top: 18px; padding-top: 0; }
.motion-enabled .team-story.motion-ready [data-motion-item] { transition: none; }
@media (max-width: 1000px) {
  .team-story { padding: 24px; }
  .team-story .team-story__keys { width: 100%; margin-left: 0; }
}
@media (max-width: 840px) {
  .team-story__project { max-width: 160px; }
}
@media (max-width: 480px) {
  .team-story { padding: 19px 15px 18px; border-radius: 9px; }
  .team-story__heading { padding-bottom: 18px; margin-bottom: 20px; }
  .team-story .team-story__heading h2 { font-size: 1.375rem; }
  .team-story__player { gap: 14px; }
  .team-story__progress-group { width: 100%; justify-content: space-between; }
  .team-story__progress-bars i { width: 21px; }
}
