.chat-panel {
  grid-template-rows: auto auto 1fr auto;
}

.trip-progress {
  position: sticky;
  top: 64px;
  z-index: 8;
  display: grid;
  grid-template-columns: max-content minmax(12px, 1fr) max-content minmax(12px, 1fr) max-content minmax(12px, 1fr) max-content minmax(12px, 1fr) max-content;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.trip-progress-step {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.trip-progress-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trip-progress-copy strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.trip-progress-status {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.trip-progress-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cbd4d0;
  border-radius: 50%;
  background: #fff;
  color: #7a8580;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.trip-progress-connector {
  height: 1px;
  background: #dfe5e2;
}

.trip-progress-connector.is-complete {
  background: #83b79f;
}

.trip-progress-step.is-running .trip-progress-icon {
  border-color: var(--teal);
  background: var(--soft-teal);
  color: var(--teal);
  font-size: 18px;
  animation: progressPulse 1.2s infinite ease-in-out;
}

.trip-progress-step.is-complete .trip-progress-icon {
  border-color: #287a57;
  background: #287a57;
  color: #fff;
  font-size: 12px;
}

.trip-progress-step.is-complete .trip-progress-copy strong,
.trip-progress-step.is-complete .trip-progress-status {
  color: #287a57;
}

.trip-progress-step.is-ready .trip-progress-icon {
  border-color: #90bfa7;
  background: #f3faf6;
  color: #287a57;
  font-size: 13px;
}

.trip-progress-step.is-ready .trip-progress-copy strong,
.trip-progress-step.is-ready .trip-progress-status {
  color: #287a57;
}

.trip-progress-step.is-error .trip-progress-icon {
  border-color: #c77272;
  background: #fff5f5;
  color: var(--danger);
  font-size: 12px;
}

.trip-progress-step.is-error .trip-progress-copy strong,
.trip-progress-step.is-error .trip-progress-status {
  color: var(--danger);
}

.trip-progress-step.is-current .trip-progress-copy strong {
  font-weight: 820;
}

/* Progress is represented by the sticky tracker, not by large cards in chat. */
#conversation .tool-progress {
  display: none !important;
}

@keyframes progressPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 980px) {
  .trip-progress {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 9px 14px;
  }

  .trip-progress-connector {
    display: none;
  }

  .trip-progress-step {
    gap: 6px;
  }

  .trip-progress-copy strong,
  .trip-progress-status {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 600px) {
  .trip-progress-copy strong { font-size: 9px; }
  .trip-progress-status { font-size: 8px; }
  .trip-progress-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }
}
