@import 'tailwindcss';

@theme {
  --color-ink: #172033;
  --color-mist: #eef3ea;
  --color-moss: #6f8b6b;
  --color-ember: #d86f45;
}

/*
  The default border color has changed to `currentcolor` in Tailwind CSS v4,
  so we've added these compatibility styles to make sure everything still
  looks the same as it did with Tailwind CSS v3.

  If we ever want to remove these styles, we need to add an explicit border
  color utility to any element that depends on these defaults.
*/
@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentcolor);
  }
}

:root {
  color-scheme: light;
  --page-shell: radial-gradient(circle at top left, rgba(247, 243, 232, 0.95), rgba(238, 245, 241, 0.96) 36%, rgba(248, 250, 252, 1));
  --panel-glass: rgba(255, 255, 255, 0.76);
  --panel-line: rgba(255, 255, 255, 0.72);
}

html {
  background: #eef3ea;
}

body {
  @apply text-ink;
  background: var(--page-shell);
}

::selection {
  background: rgba(111, 139, 107, 0.18);
  color: #172033;
}

@keyframes drift-float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 139, 107, 0.28);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(111, 139, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 139, 107, 0);
  }
}

@keyframes shimmer-sweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(140%);
  }
}

.agent-token {
  animation: drift-float 4.8s ease-in-out infinite;
}

.agent-token:nth-child(2n) {
  animation-duration: 5.6s;
}

.agent-token:nth-child(3n) {
  animation-duration: 4.2s;
}

.latest-beat {
  animation: pulse-ring 2.2s ease-out infinite;
}

.latest-beat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.6) 48%, transparent 100%);
  transform: translateX(-120%);
  animation: shimmer-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

.panel-glass {
  background: var(--panel-glass);
  border-color: var(--panel-line);
  backdrop-filter: blur(18px);
}

.scrollbar-soft {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.08) transparent;
  scrollbar-gutter: stable;
  transition: scrollbar-color 180ms ease;
}

.scrollbar-soft::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-soft::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.scrollbar-soft::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-soft::-webkit-scrollbar-thumb {
  border: 1px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: rgba(148, 163, 184, 0.08);
  min-height: 40px;
  transition: background-color 160ms ease, opacity 160ms ease;
}

.scrollbar-soft::-webkit-scrollbar-thumb:hover {
  background-color: rgba(125, 140, 160, 0.28);
}

.scrollbar-soft:hover::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.2);
}

.scrollbar-soft:hover {
  scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
}

.scrollbar-soft:not(:hover)::-webkit-scrollbar-thumb {
  opacity: 0.18;
}

.scrollbar-soft.scroll-active {
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.scrollbar-soft.scroll-active::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.24);
  opacity: 0.95;
}

.scrollbar-soft::-webkit-scrollbar-corner {
  background: transparent;
}

.scroll-fade-y.has-overflow {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 18px,
    black calc(100% - 18px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 18px,
    black calc(100% - 18px),
    transparent 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
