/* GENERATED by @vysual/tokens — edit src/tokens.ts, never this file. */

:root,
[data-theme="light"] {
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --sidebar: #fafafa;
  --sidebar-foreground: #09090b;
  --code-bg: #fafafa;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #52525b;
  --brand: #18181b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --destructive: #dc2626;
  --destructive-foreground: #fafafa;
  --status-running: #16a34a;
  --status-completed: #2563eb;
  --status-waiting: #d97706;
  --status-failed: #dc2626;
  --status-queued: #a1a1aa;
  --goal-running: var(--status-completed);
  --goal-met: var(--status-running);
  --diff-add-bg: #f0fdf4;
  --diff-add-fg: #15803d;
  --diff-del-bg: #fef2f2;
  --diff-del-fg: #b91c1c;
  --radius: 10px;
}

[data-theme="dark"] {
  --background: #000000;
  --foreground: #fafafa;
  --card: #101012;
  --card-foreground: #fafafa;
  --popover: #131316;
  --popover-foreground: #fafafa;
  --muted: #1c1c1f;
  --muted-foreground: #a1a1aa;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --accent: #27272a;
  --accent-foreground: #fafafa;
  --sidebar: #000000;
  --sidebar-foreground: #fafafa;
  --code-bg: #131316;
  --border: #26262a;
  --input: #26262a;
  --ring: #a1a1aa;
  --brand: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --destructive: #ef4444;
  --destructive-foreground: #fafafa;
  --status-running: #22c55e;
  --status-completed: #3b82f6;
  --status-waiting: #f59e0b;
  --status-failed: #ef4444;
  --status-queued: #71717a;
  --goal-running: var(--status-completed);
  --goal-met: var(--status-running);
  --diff-add-bg: rgba(34, 197, 94, 0.1);
  --diff-add-fg: #4ade80;
  --diff-del-bg: rgba(239, 68, 68, 0.1);
  --diff-del-fg: #f87171;
}

/* Theme-invariant scales. Spacing, size, type, elevation and motion do not change with theme —
   only colour does. */
:root {
  /* space — 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* size — control heights and the widths the shell is built from */
  --control-h-sm: 28px;
  --control-h: 32px;
  --control-h-lg: 36px;
  --rail-w: 56px;
  --list-w: 320px;
  --column-w: 720px;
  --content-w: 880px;

  /* type */
  --text-page-title: 30px;
  --text-section: 20px;
  --text-card-title: 16px;
  --text-resource-title: 15px;
  --text-body: 14.5px;
  --text-chat: 14px;
  --text-ui: 13.5px;
  --text-ui-sm: 13px;
  --text-meta: 12.5px;
  --text-micro: 11.5px;
  --text-nano: 10.5px;

  --leading-body: 1.65;
  --leading-chat: 1.6;
  --leading-ui: 1.5;
  --leading-tight: 1.4;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --tracking-title: -0.02em;
  --tracking-tight: -0.01em;
  --tracking-overline: 0.08em;
  --tracking-caps: 0.06em;

  /* elevation — separation is a hairline; a shadow means "this floats" */
  --border-width: 1px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-tab: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-raised: 0 1px 2px rgba(0,0,0,0.10);
  --shadow-composer: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-popover: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-panel: -8px 0 24px rgba(0,0,0,0.08);
  --shadow-dialog: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-menu: 0 12px 32px rgba(0,0,0,0.14);
  --shadow-panel-mobile: -12px 0 32px rgba(0,0,0,0.28);

  /* motion */
  --duration-micro: 120ms;
  --duration-default: 180ms;
  --duration-panel: 240ms;
}

/* Expose the tokens to Tailwind utilities (bg-background, text-muted-foreground, …) */
@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-code-bg: var(--code-bg);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-brand: var(--brand);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-status-running: var(--status-running);
  --color-status-completed: var(--status-completed);
  --color-status-waiting: var(--status-waiting);
  --color-status-failed: var(--status-failed);
  --color-status-queued: var(--status-queued);

  --font-sans: "Geist Variable", "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, monospace;

  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-card: 12px;
  --radius-xl: 14px;
  --radius-2xl: 16px;
  --radius-full: 999px;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

@keyframes vg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes vg-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes vg-shimmer {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}
@keyframes vg-spin {
  to { transform: rotate(360deg); }
}
@keyframes vg-ping {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.45); opacity: 0; }
}
@keyframes vg-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(330%); }
}
@keyframes vg-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-3px); opacity: 1; }
}
@keyframes vg-shine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* One focus ring, for everything.
 *
 * Leaving this to each component meant the ones that forgot it fell through to the BROWSER's
 * ring — which on macOS is the system accent colour, so an achromatic menu grew an orange box
 * that looked different on every machine. A design system cannot leave its most accessibility-
 * critical affordance to be remembered 169 times.
 *
 * It sits in @layer base so any component that needs its own treatment — an inset ring inside a
 * menu, a ring on a wrapper rather than the control — still wins with a utility. */
@layer base {
  :focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
  }
}

/* Everything collapses for anyone who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* A continuous drag crosses editable and interactive descendants. Keep those descendants from
   overriding the active resize/pan cursor until the shared drag lifecycle releases it. */
html[data-vysual-pointer-drag],
html[data-vysual-pointer-drag] * {
  cursor: var(--vysual-pointer-drag-cursor) !important;
}

/* A gradient sweep clipped to text — the "working" label. */
.vg-shine {
  background: linear-gradient(
    90deg,
    var(--muted-foreground) 0%,
    var(--foreground) 25%,
    var(--muted-foreground) 50%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: vg-shine 2.2s linear infinite;
}

/* The same sweep painted on a surface instead of clipped to text, so a pending list reads as
   "arriving" rather than empty. */
.vg-skeleton {
  background-color: var(--muted);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in oklab, var(--foreground) 10%, transparent) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: vg-shine 1.6s linear infinite;
}

/* Themed scrollbars — subtle, matching the neutral surfaces. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
  background-clip: padding-box;
}

/* Tokens that tokens.css declares only inside @theme inline — a Tailwind
   directive plain-CSS browsers skip entirely — re-declared here in plain
   :root so a no-Tailwind consumer (the shell) resolves them. Values are
   tokens.ts's, verbatim: the font stacks, the radius scale, and the one
   easing curve. Without this, border-radius and transition-timing fell
   back to their initial values (sharp corners, the browser's default
   ease) while the color tokens — declared in plain blocks — worked. */
:root {
  --font-sans: "Geist Variable", "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, monospace;

  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-card: 12px;
  --radius-xl: 14px;
  --radius-2xl: 16px;
  --radius-full: 999px;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

/* The base layer, from the design system's site stylesheet: the page consumes
   the tokens, color-scheme follows the theme attribute, and a link is
   distinguished by its underline (the palette holds no accent hue), present
   by default and thickened on hover. */
@layer base {
  html {
    background: var(--background);
    color-scheme: light;
  }
  html[data-theme="dark"] {
    color-scheme: dark;
  }
  body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis-weight: none;
  }
  a {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
  }
  a:hover {
    text-decoration-color: currentColor;
  }
}
