.thinking-spark {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  color: color-mix(in oklch, var(--accent) 86%, white);
  transform-origin: 50% 50%;
  animation: agent-thinking-double-turn 2.9s cubic-bezier(0.16, 1, 0.3, 1) infinite both;
}
.thinking-spark svg {
  width: 16px;
  height: 16px;
  overflow: visible;
}
.thinking-copy {
  display: inline-flex;
  white-space: pre-wrap;
}
.thinking-copy__char {
  color: oklch(0.58 0.008 250);
  animation: agent-thinking-letter 2.9s linear infinite both;
  animation-delay: calc(var(--char-index) * 42ms);
}
@keyframes agent-thinking-double-turn {
  0% {
    transform: rotate(0deg) scale(0.98);
  }
  12.4% {
    transform: rotate(90deg) scale(1.035);
  }
  17.4% {
    transform: rotate(90deg) scale(1);
  }
  29.8% {
    transform: rotate(180deg) scale(1.035);
  }
  35.6%,
  100% {
    transform: rotate(180deg) scale(1);
  }
}
@keyframes agent-thinking-letter {
  0%,
  2.5% {
    color: oklch(0.58 0.008 250);
  }
  5.5% {
    color: oklch(0.9 0.016 250);
  }
  8.3%,
  100% {
    color: oklch(0.58 0.008 250);
  }
}

.navigation-progress {
  position: fixed;
  z-index: 100;
  top: 63px;
  left: 0;
  right: 0;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms cubic-bezier(0.22, 1, 0.36, 1);
}
.navigation-progress span {
  width: 100%;
  height: 100%;
  background: color-mix(in oklch, var(--agent) 80%, var(--text-secondary));
  display: block;
  transform: scaleX(0.06);
  transform-origin: left center;
}
.navigation-progress.is-visible {
  opacity: 1;
}
.navigation-progress.is-visible span {
  animation: navigation-progress-grow 5200ms linear forwards;
}
.navigation-progress.is-complete span {
  animation: none;
  transform: scaleX(1);
  transition: transform 160ms cubic-bezier(0.05, 0.7, 0.1, 1);
}
.local-spinner {
  width: 14px;
  height: 14px;
  display: inline-block;
  overflow: visible;
  animation: local-spinner-rotate 1568ms linear infinite;
}
.local-spinner__arc {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 12 88;
  stroke-dashoffset: 0;
  transform-origin: center;
  animation: local-spinner-arc 1333ms cubic-bezier(0.4, 0, 0.2, 1) -400ms infinite;
}
@keyframes local-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes local-spinner-arc {
  0% {
    stroke-dasharray: 12 88;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 75 25;
    stroke-dashoffset: -12.5;
  }
  100% {
    stroke-dasharray: 12 88;
    stroke-dashoffset: -100;
  }
}
@keyframes navigation-progress-grow {
  0% {
    animation-timing-function: cubic-bezier(0.05, 0.7, 0.1, 1);
    transform: scaleX(0.06);
  }
  18% {
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
    transform: scaleX(0.42);
  }
  48% {
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
    transform: scaleX(0.67);
  }
  100% {
    transform: scaleX(0.86);
  }
}

.is-local-pending {
  position: relative;
}
[data-navigation-spinner] {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .thinking-spark,
  .thinking-copy__char,
  .local-spinner,
  .local-spinner__arc,
  .navigation-progress.is-visible span {
    animation: none;
  }
  .navigation-progress.is-visible span {
    transform: scaleX(0.62);
  }
}
