/* The source line shares the hero's type, colors and background in both themes. */
.fz-user-request > .fz-hero-source-trail {
  flex-wrap: wrap;
  gap: 4px 7px;
  line-height: 1.4;
}
.fz-flow-source, .fz-flow-output {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fz-hero-source-mark { flex: none; object-fit: contain; }
#try-workspace .fz-hero-source-mark { filter: none; }
.fz-flow-output { color: #eaeaea; }
.fz-hero-finance-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 6px;
  margin-top: 4px;
  color: inherit;
  font-size: var(--fs-scene-m);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Keep the composer anchored while the work unfolds in the conversation. */
@media (min-width: 651px) {
  #try-workspace { min-block-size: 604px; }
  #try-workspace .fz-chat-body { padding-block: 24px 28px; }
  #try-workspace .fz-ai-reply { margin-block-start: 32px; }
}
@media (min-width: 901px) {
  #try-workspace { min-block-size: clamp(644px, 79svh, 706px); }
  #try-workspace .fz-chat-body { padding-block: 30px; }
  #try-workspace .fz-ai-reply { margin-block-start: 38px; }
}

#try-workspace .fz-work-trace {
  --trace-marker: 28px;
  --trace-gutter: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 640px;
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
}
.fz-work-step {
  position: relative;
  min-width: 0;
  padding-inline-end: var(--trace-gutter);
}
.fz-work-step:last-child { padding-inline-end: 0; }
.fz-work-step:not(:last-child)::before,
.fz-work-step:not(:last-child)::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset-block-start: calc(var(--trace-marker) / 2);
  inset-inline-start: calc(var(--trace-marker) + 7px);
  inset-inline-end: 7px;
  height: 1px;
  background: #38383a;
}
.fz-work-step:not(:last-child)::after {
  background: #919195;
  transform: scaleX(0);
  transform-origin: left;
}
.fz-work-step[data-state=done]::after { transform: scaleX(1); }
.fz-work-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--trace-marker);
  height: var(--trace-marker);
  border-radius: 9px;
  background: #2b2b2d;
  color: #eee;
}
.fz-work-marker img, .fz-work-marker svg { width: 16px; height: 16px; object-fit: contain; }
.fz-work-step[data-state=queued] .fz-work-marker { opacity: .52; }
.fz-work-step[data-state=active] .fz-work-marker { background: #3a3a3d; }
.fz-work-copy { display: grid; gap: 3px; margin-block-start: 8px; overflow-wrap: anywhere; }
.fz-work-label { color: #ededee; font: inherit; font-size: 13px; line-height: 1.4; font-weight: 550; }
.fz-work-value { color: #b7b7bd; font-size: 13px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.fz-work-step[data-state=queued] .fz-work-label { color: #a0a0a5; }
.fz-work-step[data-state=queued] .fz-work-value { visibility: hidden; }
.fz-work-directory {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  min-height: 44px;
  color: #d8d8da;
  font: inherit;
  text-underline-offset: 4px;
}
.fz-work-directory:hover { color: #fff; }
.fz-mobile-task { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .fz-work-step::after { transition: transform .65s var(--ease-enter, ease-out); }
  .fz-work-step:not(:last-child)[data-state=active]::after {
    animation: fz-evidence-connect 1.8s cubic-bezier(.2,.68,.3,1) both;
  }
  .fz-work-step[data-state=active] .fz-work-marker { animation: fz-evidence-pulse 1.7s ease-in-out infinite; }
  .fz-work-step[data-state=active] .fz-work-value { animation: fz-evidence-arrive .45s var(--ease-enter, ease-out) both; }
  .fz-work-trace[data-playing=false] .fz-work-marker,
  .fz-work-trace[data-playing=false] .fz-work-value,
  .fz-work-trace[data-playing=false] .fz-work-step:not(:last-child)[data-state=active]::after { animation-play-state: paused; }
  .fz-chat-body[data-playing] .fz-chat-file { animation: fz-evidence-arrive .45s var(--ease-enter, ease-out) both; }
}
@keyframes fz-evidence-connect { from { transform: scaleX(0); } to { transform: scaleX(.9); } }
@keyframes fz-evidence-connect-down { from { transform: scaleY(0); } to { transform: scaleY(.9); } }
@keyframes fz-evidence-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(222 224 231 / 0); }
  45% { box-shadow: 0 0 0 4px rgb(222 224 231 / .09); }
}
@keyframes fz-evidence-arrive {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (forced-colors: active) {
  .fz-work-step:not(:last-child)::before { background: GrayText; }
  .fz-work-step[data-state=done]::after { background: CanvasText; }
}
@media (max-width: 650px) {
  #try-workspace .fz-product-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  #try-workspace .fz-product-sidebar > button { display: none; }
  #try-workspace .fz-mobile-task {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 54px;
    gap: 12px;
    padding: 7px 13px;
    background: #272728;
    border-radius: var(--r-tile);
    cursor: pointer;
  }
  #try-workspace .fz-mobile-task:focus-within { outline: 2px solid currentColor; outline-offset: 1px; }
  #try-workspace .fz-mobile-task .fz-agent { flex: none; }
  #try-workspace .fz-mobile-task-copy { display: grid; gap: 3px; }
  #try-workspace .fz-mobile-task small { display: block; margin: 0; color: #b0b0b4; line-height: 1; }
  #try-workspace .fz-mobile-task strong { color: #f3f3f4; font-weight: 550; line-height: 1.3; font-size: 14px; }
  .fz-mobile-task-arrow { margin-inline-start: auto; padding-inline: 4px; font-size: 0; }
  .fz-mobile-task-arrow::before {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }
  #try-workspace .fz-mobile-task select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    font: inherit;
    font-size: 16px;
    cursor: pointer;
  }
  .fz-hero-finance-link { min-height: 44px; }
}
@media (max-width: 760px) {
  #try-workspace .fz-work-trace { --trace-marker: 25px; display: grid; grid-template-columns: minmax(0, 1fr); margin: 14px 0 18px; }
  .fz-work-step { display: grid; grid-template-columns: var(--trace-marker) minmax(0, 1fr); gap: 9px; padding: 0 0 10px; }
  .fz-work-step:last-child { padding: 0; }
  .fz-work-step:not(:last-child)::before, .fz-work-step:not(:last-child)::after {
    inset-inline: calc(var(--trace-marker) / 2) auto;
    inset-block: calc(var(--trace-marker) + 4px) 4px;
    height: auto;
    width: 1px;
  }
  .fz-work-step:not(:last-child)::after { transform: scaleY(0); transform-origin: top; }
  .fz-work-step[data-state=done]::after { transform: scaleY(1); }
  .fz-work-step:not(:last-child)[data-state=active]::after { animation-name: fz-evidence-connect-down; }
  .fz-work-copy { gap: 1px; margin-block-start: 0; }
}
