/* Iteration 8: interactive BotOps evidence demo and restrained micro-interactions. */
.botops-visual {
  cursor: default;
}

.botops-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 48%, rgba(97, 215, 255, 0.06), transparent 36%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.botops-visual.is-running::after {
  opacity: 1;
}

.botops-visual > :not(.sr-only) {
  position: relative;
  z-index: 1;
}

.botops-visual > .sr-only {
  position: absolute;
}

.botops-stage {
  margin-block: 38px 18px;
}

.botops-rail span {
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.botops-rail span.is-complete {
  color: var(--lime);
  border-color: rgba(200, 255, 77, 0.18);
}

.botops-rail span.is-active {
  transform: translateY(-2px);
}

.botops-status-grid p {
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.botops-status-grid p::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms cubic-bezier(.2,.8,.2,1);
}

.botops-status-grid p[data-state="active"] {
  background: rgba(97, 215, 255, 0.075);
  border-color: rgba(97, 215, 255, 0.34);
  transform: translateY(-3px);
}

.botops-status-grid p[data-state="active"]::after,
.botops-status-grid p[data-state="complete"]::after {
  transform: scaleX(1);
}

.botops-status-grid p[data-state="active"] strong {
  color: var(--cyan);
}

.botops-status-grid p[data-state="complete"] {
  border-color: rgba(200, 255, 77, 0.25);
}

.botops-status-grid p[data-state="complete"] strong {
  color: var(--lime);
}

.botops-status-grid strong {
  transition: color 180ms ease;
}

.botops-flow span {
  padding: 4px 0;
  transition: color 180ms ease, transform 180ms ease;
}

.botops-flow span.is-active {
  color: var(--cyan);
  transform: translateY(-2px);
}

.botops-flow span.is-complete {
  color: var(--lime);
}

.botops-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.botops-actions > span {
  color: rgba(255, 255, 255, 0.58);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.botops-run {
  display: inline-flex;
  gap: 34px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 15px;
  color: #071114;
  background: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 2px;
  cursor: pointer;
  font: 800 0.7rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.botops-run:hover:not(:disabled),
.botops-run:focus-visible:not(:disabled) {
  background: #d8ff7b;
  border-color: #d8ff7b;
  transform: translateY(-2px);
}

.botops-run:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.botops-run:disabled {
  cursor: wait;
  opacity: 0.72;
}

.botops-run span {
  font-size: 1rem;
  transition: transform 180ms ease;
}

.botops-run:hover:not(:disabled) span,
.botops-run:focus-visible:not(:disabled) span {
  transform: translateX(3px);
}

.botops-visual.is-running .botops-topline i {
  animation: botops-pulse 900ms ease-in-out infinite alternate;
}

.botops-visual.is-complete .botops-topline strong {
  color: var(--lime);
}

@keyframes botops-pulse {
  to { box-shadow: 0 0 0 9px rgba(97, 215, 255, 0.03); transform: scale(0.8); }
}

@media (hover: hover) and (pointer: fine) {
  .project-card::before {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--cyan), var(--lime));
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 320ms cubic-bezier(.2,.8,.2,1);
  }

  .project-card:hover::before,
  .project-card:focus-within::before {
    transform: scaleX(1);
  }

  .project-number,
  .tag-list li,
  .kpi-value,
  .experience-item,
  .credential-list article,
  .credential-list h3,
  .button span {
    transition: color 200ms ease, background 200ms ease, border-color 200ms ease, transform 200ms ease;
  }

  .project-card:hover .project-number,
  .project-card:focus-within .project-number {
    color: var(--cyan);
    transform: translateY(-3px);
  }

  .project-card:hover .tag-list li,
  .project-card:focus-within .tag-list li {
    border-color: rgba(200, 255, 77, 0.3);
  }

  .project-card:hover .tag-list li:nth-child(2),
  .project-card:focus-within .tag-list li:nth-child(2) {
    transform: translateY(-2px);
  }

  .project-card:hover .tag-list li:nth-child(3),
  .project-card:focus-within .tag-list li:nth-child(3) {
    transform: translateY(-4px);
  }

  .kpi-card:hover .kpi-value {
    transform: translateY(-5px);
  }

  .experience-item:hover {
    background: linear-gradient(90deg, color-mix(in srgb, var(--cyan) 7%, transparent), transparent 62%);
    transform: translateX(6px);
  }

  .credential-list article:hover {
    background: color-mix(in srgb, var(--cyan) 6%, transparent);
  }

  .credential-list article:hover h3 {
    transform: translateY(-4px);
  }

  .button:hover span,
  .button:focus-visible span {
    transform: translate(3px, -2px);
  }
}

@media (max-width: 700px) {
  .botops-visual {
    min-height: 476px;
  }

  .botops-stage {
    margin-block: 30px 18px;
  }

  .botops-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .botops-run {
    width: 100%;
  }

  .botops-actions > span {
    text-align: center;
  }
}

@media (max-width: 390px) {
  .botops-visual {
    min-height: 490px;
    padding-inline: 14px;
  }

  .botops-console {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .botops-visual.is-running .botops-topline i {
    animation: none;
  }

  .botops-status-grid p[data-state="active"],
  .botops-rail span.is-active,
  .botops-flow span.is-active {
    transform: none;
  }
}

@media (forced-colors: active) {
  .botops-run,
  .botops-status-grid p[data-state="active"],
  .botops-status-grid p[data-state="complete"] {
    border: 2px solid ButtonText;
  }
}
