/*
 * Vedika Lite: low-cost scroll affordance, static cursor, and opt-in CTA edge.
 * The scroll interaction is an original implementation. No third-party source
 * is bundled; see THIRD-PARTY-scrollbar-note.md.
 */

:root {
  --vk-scroll-ink: rgba(235, 241, 255, 0.86);
  --vk-scroll-muted: rgba(235, 241, 255, 0.22);
  --vk-scroll-accent: #a78bfa;
}

html.vk-scroll-enhanced {
  scrollbar-color: rgba(218, 226, 241, 0.42) rgba(11, 12, 15, 0.18);
  scrollbar-width: thin;
}

html.vk-scroll-enhanced::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

html.vk-scroll-enhanced::-webkit-scrollbar-track {
  background: rgba(11, 12, 15, 0.18);
}

html.vk-scroll-enhanced::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(218, 226, 241, 0.46);
  background-clip: padding-box;
}

html.vk-scroll-enhanced::-webkit-scrollbar-thumb:hover {
  background: rgba(235, 241, 255, 0.7);
  background-clip: padding-box;
}

.vk-scroll-rail {
  --vk-scroll-progress: 0;
  --vk-thumb-y: 0px;
  position: fixed;
  top: max(88px, 11vh);
  right: 13px;
  z-index: 80;
  width: 16px;
  height: min(58vh, 520px);
  min-height: 220px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--vk-scroll-ink);
  cursor: ns-resize;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.vk-scroll-rail.is-ready {
  opacity: 0.72;
  pointer-events: auto;
}

.vk-scroll-rail:hover,
.vk-scroll-rail:focus-visible,
.vk-scroll-rail.is-dragging {
  opacity: 1;
}

.vk-scroll-rail:focus-visible {
  outline: 1px solid var(--vk-scroll-accent);
  outline-offset: 5px;
}

.vk-scroll-rail::before,
.vk-scroll-rail::after,
.vk-scroll-progress,
.vk-scroll-thumb {
  position: absolute;
  pointer-events: none;
}

.vk-scroll-rail::before,
.vk-scroll-progress {
  top: 0;
  bottom: 0;
  left: 6px;
  width: 4px;
  border-radius: 999px;
  background-image: repeating-linear-gradient(
    to bottom,
    currentColor 0 3px,
    transparent 3px 9px
  );
}

.vk-scroll-rail::before {
  content: "";
  color: var(--vk-scroll-muted);
}

.vk-scroll-progress {
  color: var(--vk-scroll-ink);
  transform: scaleY(var(--vk-scroll-progress));
  transform-origin: 50% 0;
  will-change: transform;
}

.vk-scroll-rail::after {
  content: "";
  right: 3px;
  bottom: -16px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: calc(1 - var(--vk-scroll-progress));
  transition: opacity 160ms ease-out;
}

.vk-scroll-thumb {
  top: 0;
  left: 3px;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: #111318;
  box-shadow: 0 0 0 2px rgba(9, 11, 15, 0.72);
  transform: translateY(var(--vk-thumb-y));
  will-change: transform;
}

@media (pointer: fine) and (hover: hover) {
  html.vk-cursor-enhanced,
  html.vk-cursor-enhanced body {
    cursor: url("/lite/assets/ui/vedika-cursor.svg") 3 2, default;
  }

  html.vk-cursor-enhanced :where(a, button, summary, label, select, [role="button"], [role="tab"], [role="link"]) {
    cursor: url("/lite/assets/ui/vedika-pointer.svg") 7 2, pointer;
  }

  html.vk-cursor-enhanced :where(input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, [contenteditable="true"]) {
    cursor: text;
  }

  html.vk-cursor-enhanced :where(.hero-img, #hero-img-ascii-japanese) {
    cursor: default;
  }
}

.vk-pixel-spark {
  --vk-spark-x: 0px;
  --vk-spark-y: 18px;
  position:fixed;
  z-index:2100;
  width:4px;
  height:4px;
  border:1px solid rgba(255,255,255,.78);
  background:#a78bfa;
  box-shadow:5px -3px 0 -1px #d8dde6,-4px 5px 0 -1px #717783;
  pointer-events:none;
  transform:translate3d(-50%,-50%,0) rotate(45deg);
  animation:vk-pixel-spark .42s cubic-bezier(.2,.75,.25,1) forwards;
}

.vk-pixel-spark:nth-of-type(3n) { background:#d8dde6; box-shadow:4px -4px 0 -1px #a78bfa; }

@keyframes vk-pixel-spark {
  0% { opacity:.92; transform:translate3d(-50%,-50%,0) rotate(45deg) scale(1); }
  100% { opacity:0; transform:translate3d(calc(-50% + var(--vk-spark-x)),calc(-50% + var(--vk-spark-y)),0) rotate(135deg) scale(.35); }
}

@property --vk-edge-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.vedika-action-glow {
  position: relative;
  isolation: isolate;
}

.vedika-action-glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--vk-edge-angle),
    transparent 0deg 66deg,
    rgba(255, 132, 38, 0.88) 92deg,
    rgba(76, 132, 255, 0.82) 130deg,
    rgba(64, 225, 236, 0.82) 166deg,
    transparent 194deg 360deg
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.vedika-action-glow:is(:hover, :focus-visible)::after {
  opacity: 1;
  animation: vk-action-edge 1.9s linear infinite;
}

@keyframes vk-action-edge {
  to { --vk-edge-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-vedika-motion="full"]) .vk-scroll-rail,
  html:not([data-vedika-motion="full"]) .vk-scroll-rail::after {
    transition: none;
  }

  html:not([data-vedika-motion="full"]) .vedika-action-glow:is(:hover, :focus-visible)::after {
    animation: none;
  }

  html:not([data-vedika-motion="full"]) .vk-pixel-spark { display:none; }
}

@media (max-width: 767px), (pointer: coarse), (hover: none) {
  .vk-scroll-rail {
    display: none;
  }
}

@media (forced-colors: active) {
  .vk-scroll-rail {
    color: CanvasText;
  }

  .vedika-action-glow::after {
    display: none;
  }

  .vk-pixel-spark { display:none; }
}
