Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

41.9 KB
Raw Blame
@import 'tailwindcss';
@import 'tw-animate-css';
@import 'allotment/dist/style.css';

/* Streamdown's built-in renderers carry Tailwind classes from its dist (pnpm hoists it). */
@source '../../../../node_modules/streamdown/dist/*.js';

@custom-variant dark (&:is(.dark *));
@custom-variant dark-black (&:is(.dark-black *));
@custom-variant emlight (&:is(.emlight *));
@custom-variant emdark (&:is(.emdark *));

@theme inline {
  --font-sans:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans',
    'Droid Sans', 'Helvetica Neue', sans-serif;
  --font-mono: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --text-code: 13px;
  --text-code--line-height: 1.2;
  --text-tiny: 11px;
  --text-tiny--line-height: 1.3;
  --text-micro: 10px;
  --text-micro--line-height: 1.2;

  --color-background: var(--background);
  --color-background-1: var(--background-1);
  --color-background-2: var(--background-2);
  --color-background-3: var(--background-3);

  --color-foreground: var(--foreground);
  --color-foreground-inverse: var(--foreground-inverse);
  --color-foreground-muted: var(--foreground-muted);
  --color-foreground-passive: var(--foreground-passive);

  --color-background-secondary: var(--background-secondary);
  --color-background-secondary-1: var(--background-secondary-1);
  --color-background-secondary-2: var(--background-secondary-2);
  --color-background-secondary-3: var(--background-secondary-3);

  --color-foreground-secondary: var(--foreground-secondary);
  --color-foreground-secondary-muted: var(--foreground-secondary-muted);
  --color-foreground-secondary-passive: var(--foreground-secondary-passive);

  --color-background-tertiary: var(--background-tertiary);
  --color-background-tertiary-1: var(--background-tertiary-1);
  --color-background-tertiary-2: var(--background-tertiary-2);
  --color-background-tertiary-3: var(--background-tertiary-3);

  --color-foreground-tertiary: var(--foreground-tertiary);
  --color-foreground-tertiary-muted: var(--foreground-tertiary-muted);
  --color-foreground-tertiary-passive: var(--foreground-tertiary-passive);

  --color-background-destructive: var(--background-destructive);
  --color-foreground-destructive: var(--foreground-destructive);
  /* The bare `destructive` utilities — text-destructive, border-destructive,
     bg-destructive/10, aria-invalid:ring-destructive/20 — are used throughout
     the app and need a colour of their own to resolve against. */
  --color-destructive: var(--foreground-destructive);

  --color-background-quaternary: var(--background-quaternary);
  --color-background-quaternary-1: var(--background-quaternary-1);
  --color-background-quaternary-2: var(--background-quaternary-2);

  --color-background-neutral: var(--background-neutral);
  --color-foreground-neutral: var(--foreground-neutral);

  --color-primary-button-background: var(--primary-button-background);
  --color-primary-button-background-hover: var(--primary-button-background-hover);
  --color-primary-button-foreground: var(--primary-button-foreground);
  --color-primary-button-border: var(--primary-button-border);

  --color-foreground-diff-added: var(--foreground-diff-added);
  --color-foreground-diff-modified: var(--foreground-diff-modified);
  --color-foreground-diff-deleted: var(--foreground-diff-deleted);

  --color-selection-foreground: var(--selection-foreground);
  --color-selection-background: var(--selection-background);

  --color-border: var(--border);
  --color-border-1: var(--border-1);
  --color-border-2: var(--border-2);
  --color-border-destructive: var(--border-destructive);
  --color-border-primary: var(--border-primary);

  --color-status-in-progress: var(--status-in-progress);
  --color-status-in-review: var(--status-in-review);
  --color-status-done: var(--status-done);
  --color-status-todo: var(--status-todo);
  --color-status-cancelled: var(--status-cancelled);

  --color-foreground-success: var(--foreground-success);
  --color-background-success: var(--background-success);
  --color-background-success-hover: var(--background-success-hover);
  --color-border-success: var(--border-success);

  --color-foreground-error: var(--foreground-error);
  --color-background-error: var(--background-error);
  --color-background-error-hover: var(--background-error-hover);

  --color-foreground-warning: var(--foreground-warning);
  --color-background-warning: var(--background-warning);
  --color-background-warning-hover: var(--background-warning-hover);
  --color-border-warning: var(--border-warning);

  --color-foreground-info: var(--foreground-info);
  --color-background-info: var(--background-info);
  --color-background-info-hover: var(--background-info-hover);
  --color-border-info: var(--border-info);

  --color-foreground-conflict: var(--foreground-conflict);
  --color-foreground-merged: var(--foreground-merged);

  --radius-lg: var(--radius);
  --radius-md: calc(var(--radius) - 2px);
  --radius-sm: calc(var(--radius) - 4px);
  /* Dialogs, popovers and bordered cards sit one step above the 8px of
     buttons and rows. Without this `rounded-xl` falls back to Tailwind's
     12px, which reads as the panel's radius rather than an elevated one. */
  --radius-xl: var(--radius-elevated);

  --animate-accordion-down: accordion-down 0.2s ease-out;
  --animate-accordion-up: accordion-up 0.2s ease-out;
  --animate-panel-blur-in: panel-blur-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
  --animate-panel-blur-out: panel-blur-out 140ms ease-in;

  @keyframes accordion-down {
    from {
      height: 0;
    }
    to {
      height: var(--accordion-panel-height);
    }
  }

  @keyframes accordion-up {
    from {
      height: var(--accordion-panel-height);
    }
    to {
      height: 0;
    }
  }

  @keyframes panel-blur-in {
    from {
      opacity: 0;
      filter: blur(12px);
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      filter: blur(0);
      transform: translateY(0);
    }
  }

  @keyframes panel-blur-out {
    from {
      opacity: 1;
      filter: blur(0);
      transform: translateY(0);
    }
    to {
      opacity: 0;
      filter: blur(8px);
      transform: translateY(6px);
    }
  }
}

::selection {
  background: var(--selection);
  color: var(--selection-foreground);
}

@layer base {
  /* `:root` carries the light values as well as `.emlight` so the tokens
     resolve before ThemeProvider's layout effect puts a theme class on
     <html>. Without it `cssVar()` returns '' during that first paint, and a
     terminal created in it comes up with an empty theme. `.emdark` matches the
     same element at equal specificity and is declared later, so it still wins
     in dark mode. */
  :root,
  .emlight {
    /* ── Color palette (Radix P3) ──────────────────────────────── */

    /* Neutral */
    --neutral-1: color(display-p3 0.988 0.988 0.988);
    --neutral-2: color(display-p3 0.975 0.975 0.975);
    --neutral-3: color(display-p3 0.939 0.939 0.939);
    --neutral-4: color(display-p3 0.908 0.908 0.908);
    --neutral-5: color(display-p3 0.88 0.88 0.88);
    --neutral-6: color(display-p3 0.849 0.849 0.849);
    --neutral-7: color(display-p3 0.807 0.807 0.807);
    --neutral-8: color(display-p3 0.732 0.732 0.732);
    --neutral-9: color(display-p3 0.553 0.553 0.553);
    --neutral-10: color(display-p3 0.512 0.512 0.512);
    --neutral-11: color(display-p3 0.392 0.392 0.392);
    --neutral-12: color(display-p3 0.125 0.125 0.125);

    /* Red */
    --red-1: color(display-p3 0.998 0.989 0.988);
    --red-2: color(display-p3 0.995 0.971 0.971);
    --red-3: color(display-p3 0.985 0.925 0.925);
    --red-4: color(display-p3 0.999 0.866 0.866);
    --red-5: color(display-p3 0.984 0.812 0.811);
    --red-6: color(display-p3 0.955 0.751 0.749);
    --red-7: color(display-p3 0.915 0.675 0.672);
    --red-8: color(display-p3 0.872 0.575 0.572);
    --red-9: color(display-p3 0.83 0.329 0.324);
    --red-10: color(display-p3 0.798 0.294 0.285);
    --red-11: color(display-p3 0.744 0.234 0.222);
    --red-12: color(display-p3 0.36 0.115 0.143);

    /* Green (Radix grass) */
    --green-1: color(display-p3 0.986 0.996 0.985);
    --green-2: color(display-p3 0.966 0.983 0.964);
    --green-3: color(display-p3 0.923 0.965 0.917);
    --green-4: color(display-p3 0.872 0.94 0.865);
    --green-5: color(display-p3 0.811 0.908 0.802);
    --green-6: color(display-p3 0.733 0.864 0.724);
    --green-7: color(display-p3 0.628 0.803 0.622);
    --green-8: color(display-p3 0.477 0.72 0.482);
    --green-9: color(display-p3 0.38 0.647 0.378);
    --green-10: color(display-p3 0.344 0.598 0.342);
    --green-11: color(display-p3 0.263 0.488 0.261);
    --green-12: color(display-p3 0.151 0.233 0.153);

    /* Blue */
    --blue-1: color(display-p3 0.986 0.992 0.999);
    --blue-2: color(display-p3 0.96 0.979 0.998);
    --blue-3: color(display-p3 0.912 0.956 0.991);
    --blue-4: color(display-p3 0.853 0.932 1);
    --blue-5: color(display-p3 0.788 0.894 0.998);
    --blue-6: color(display-p3 0.709 0.843 0.976);
    --blue-7: color(display-p3 0.606 0.777 0.947);
    --blue-8: color(display-p3 0.451 0.688 0.917);
    --blue-9: color(display-p3 0.247 0.556 0.969);
    --blue-10: color(display-p3 0.234 0.523 0.912);
    --blue-11: color(display-p3 0.15 0.44 0.84);
    --blue-12: color(display-p3 0.102 0.193 0.379);

    /* Yellow */
    --yellow-1: color(display-p3 0.992 0.992 0.978);
    --yellow-2: color(display-p3 0.995 0.99 0.922);
    --yellow-3: color(display-p3 0.997 0.982 0.749);
    --yellow-4: color(display-p3 0.992 0.953 0.627);
    --yellow-5: color(display-p3 0.984 0.91 0.51);
    --yellow-6: color(display-p3 0.934 0.847 0.474);
    --yellow-7: color(display-p3 0.876 0.785 0.46);
    --yellow-8: color(display-p3 0.811 0.689 0.313);
    --yellow-9: color(display-p3 1 0.92 0.22);
    --yellow-10: color(display-p3 0.977 0.868 0.291);
    --yellow-11: color(display-p3 0.6 0.44 0);
    --yellow-12: color(display-p3 0.271 0.233 0.137);

    /* Purple */
    --purple-1: color(display-p3 0.995 0.988 0.996);
    --purple-2: color(display-p3 0.983 0.971 0.993);
    --purple-3: color(display-p3 0.963 0.931 0.989);
    --purple-4: color(display-p3 0.937 0.888 0.981);
    --purple-5: color(display-p3 0.904 0.837 0.966);
    --purple-6: color(display-p3 0.86 0.774 0.942);
    --purple-7: color(display-p3 0.799 0.69 0.91);
    --purple-8: color(display-p3 0.719 0.583 0.874);
    --purple-9: color(display-p3 0.523 0.318 0.751);
    --purple-10: color(display-p3 0.483 0.289 0.7);
    --purple-11: color(display-p3 0.473 0.281 0.687);
    --purple-12: color(display-p3 0.234 0.132 0.363);

    /* Orange */
    --orange-1: color(display-p3 0.995 0.988 0.985);
    --orange-2: color(display-p3 0.994 0.968 0.934);
    --orange-3: color(display-p3 0.989 0.938 0.85);
    --orange-4: color(display-p3 1 0.874 0.687);
    --orange-5: color(display-p3 1 0.821 0.583);
    --orange-6: color(display-p3 0.975 0.767 0.545);
    --orange-7: color(display-p3 0.919 0.693 0.486);
    --orange-8: color(display-p3 0.877 0.597 0.379);
    --orange-9: color(display-p3 0.9 0.45 0.2);
    --orange-10: color(display-p3 0.87 0.409 0.164);
    --orange-11: color(display-p3 0.76 0.34 0);
    --orange-12: color(display-p3 0.323 0.185 0.127);

    /* Cyan */
    --cyan-1: color(display-p3 0.982 0.992 0.996);
    --cyan-2: color(display-p3 0.955 0.981 0.984);
    --cyan-3: color(display-p3 0.888 0.965 0.975);
    --cyan-4: color(display-p3 0.821 0.941 0.959);
    --cyan-5: color(display-p3 0.751 0.907 0.935);
    --cyan-6: color(display-p3 0.671 0.862 0.9);
    --cyan-7: color(display-p3 0.564 0.8 0.854);
    --cyan-8: color(display-p3 0.388 0.715 0.798);
    --cyan-9: color(display-p3 0.282 0.627 0.765);
    --cyan-10: color(display-p3 0.264 0.583 0.71);
    --cyan-11: color(display-p3 0.08 0.48 0.63);
    --cyan-12: color(display-p3 0.108 0.232 0.277);

    /* Amber */
    --amber-1: color(display-p3 0.995 0.992 0.985);
    --amber-2: color(display-p3 0.994 0.986 0.921);
    --amber-3: color(display-p3 0.994 0.969 0.782);
    --amber-4: color(display-p3 0.989 0.937 0.65);
    --amber-5: color(display-p3 0.97 0.902 0.527);
    --amber-6: color(display-p3 0.936 0.844 0.506);
    --amber-7: color(display-p3 0.89 0.762 0.443);
    --amber-8: color(display-p3 0.85 0.65 0.3);
    --amber-9: color(display-p3 1 0.77 0.26);
    --amber-10: color(display-p3 0.959 0.741 0.274);
    --amber-11: color(display-p3 0.64 0.4 0);
    --amber-12: color(display-p3 0.294 0.208 0.145);

    /* Violet */
    --violet-1: color(display-p3 0.991 0.988 0.995);
    --violet-2: color(display-p3 0.978 0.974 0.998);
    --violet-3: color(display-p3 0.953 0.943 0.993);
    --violet-4: color(display-p3 0.916 0.897 1);
    --violet-5: color(display-p3 0.876 0.851 1);
    --violet-6: color(display-p3 0.825 0.793 0.981);
    --violet-7: color(display-p3 0.752 0.712 0.943);
    --violet-8: color(display-p3 0.654 0.602 0.902);
    --violet-9: color(display-p3 0.417 0.341 0.784);
    --violet-10: color(display-p3 0.381 0.306 0.741);
    --violet-11: color(display-p3 0.383 0.317 0.702);
    --violet-12: color(display-p3 0.179 0.15 0.359);

    /* Jade */
    --jade-1: color(display-p3 0.986 0.996 0.992);
    --jade-2: color(display-p3 0.962 0.983 0.969);
    --jade-3: color(display-p3 0.912 0.965 0.932);
    --jade-4: color(display-p3 0.858 0.941 0.893);
    --jade-5: color(display-p3 0.795 0.909 0.847);
    --jade-6: color(display-p3 0.715 0.864 0.791);
    --jade-7: color(display-p3 0.603 0.802 0.718);
    --jade-8: color(display-p3 0.44 0.72 0.629);
    --jade-9: color(display-p3 0.319 0.63 0.521);
    --jade-10: color(display-p3 0.299 0.592 0.488);
    --jade-11: color(display-p3 0.15 0.5 0.37);
    --jade-12: color(display-p3 0.142 0.229 0.194);

    /* ── Semantic tokens ─────────────────────────────────────── */
    --background: white;
    --background-1: var(--neutral-2);
    --background-2: var(--neutral-3);
    --background-3: var(--neutral-4);

    --foreground: var(--neutral-12);
    --foreground-inverse: white;
    --foreground-muted: var(--neutral-11);
    --foreground-passive: var(--neutral-8);

    --background-secondary: var(--background-1);
    --background-secondary-1: var(--background);
    --background-secondary-2: var(--background-3);
    --background-secondary-3: var(--neutral-6);

    --foreground-secondary: var(--neutral-12);
    --foreground-secondary-muted: var(--neutral-11);
    --foreground-secondary-passive: var(--neutral-8);

    --background-tertiary: var(--neutral-3);
    --background-tertiary-1: var(--neutral-4);
    --background-tertiary-2: var(--neutral-5);
    --background-tertiary-3: var(--neutral-6);

    --foreground-tertiary: var(--neutral-12);
    --foreground-tertiary-muted: var(--neutral-11);
    --foreground-tertiary-passive: var(--neutral-8);

    --background-quaternary: var(--background);
    --background-quaternary-1: var(--background-1);
    --background-quaternary-2: var(--background-2);

    --background-destructive: var(--red-2);
    --foreground-destructive: var(--red-11);

    --background-neutral: var(--neutral-12);
    --foreground-neutral: var(--neutral-1);

    --primary-button-background: var(--jade-12);
    --primary-button-background-hover: var(--jade-11);
    --primary-button-foreground: var(--jade-2);
    --primary-button-border: transparent;

    --border: var(--neutral-5);
    --border-1: var(--neutral-8);
    --border-2: var(--neutral-9);
    --border-destructive: var(--red-8);
    --border-primary: var(--neutral-9);

    --ring: hsl(0 0% 3.9%);
    --radius: 0.5rem;

    /* The window is one material surface. The sidebar has no fill of its own —
       it is this showing through — and the content panel is an inset card of
       `--surface` on top of it, so the gap and the radius separate the two
       rather than a divider. `--material` is the vibrancy colour flattened:
       until the window itself is translucent there is nothing behind it to
       blur, and the translucent form composites against whatever desktop
       happens to be there. */
    --material: #f7f6f2;
    --material-vibrant: rgb(247 246 242 / 0.78);
    --surface: #ffffff;
    --surface-2: #f9f9f9;

    --hair: rgb(0 0 0 / 0.14);
    --hair-strong: rgb(0 0 0 / 0.18);
    --hair-soft: rgb(0 0 0 / 0.06);

    /* Row selection and hover. Distinct from `--selection`, which is the
       browser's text-selection colour and unrelated. Both are translucent so
       they tint the material rather than punching an opaque patch through the
       vibrancy. */
    --sel: rgb(36 58 49 / 0.12);
    --sel-soft: rgb(36 58 49 / 0.1);

    --fill: #f0f0f0;
    --fill-2: #e8e8e8;
    --fill-3: #d4d4d4;
    --btn-1: #ffffff;
    --accent-solid: #243a31;

    /* The existing `--foreground-passive` is the design's *faint* step, which
       is too weak for a label that has to be readable without hovering. This
       is the design's passive step, one stop darker. */
    --fg-passive: #8d8d8d;

    /* An elevated menu over the sidebar (the workspace switcher): a surface a
       step off the material, with a soft shadow, so it lifts rather than
       reading as more sidebar. Text steps down from the names it lists, so
       those are what the eye lands on. */
    --menu-surface: #ffffff;
    --menu-field: #f6f6f5;
    --menu-shadow: 0 20px 44px rgb(0 0 0 / 0.12);
    --composer-shadow:
      0 1px 1px rgb(0 0 0 / 0.04), 0 2px 4px rgb(0 0 0 / 0.04), 0 4px 10px rgb(0 0 0 / 0.03);
    --composer-border: var(--border);
    --composer-border-focus: var(--border-1);
    --composer-send-bg: #1b1817;
    --composer-send-fg: var(--foreground-inverse);
    --composer-send-bg-hover: color-mix(in srgb, #1b1817 90%, white);
    --composer-send-bg-active: color-mix(in srgb, #1b1817, black 10%);
    --menu-faint: rgb(0 0 0 / 0.03);
    --menu-pill: rgb(0 0 0 / 0.06);
    --menu-tile: #ebebea;
    --menu-tile-fg: #6f6f6f;
    --menu-tile-active-fg: #f5fbf7;
    --fg-name: #1f1f1f;
    --fg-action: #3a3a3a;
    --fg-icon: #8d8d8d;
    --fg-dim: #8a8a8a;

    /* The segmented control's track. Its own token rather than `--hair-soft`,
       which in dark lands within a couple of levels of the raised segment and
       leaves the active option indistinguishable from the inactive one. */
    --segment-track: rgb(0 0 0 / 0.06);

    /* A managed server's state: a dot, a pill (tint + text on it) and a
       message box (a fainter wash with a hairline of the same hue). Colour
       lives only there; the text around them stays neutral. */
    --srv-running: #4fa05e;
    --srv-running-tint: rgb(79 160 94 / 0.14);
    --srv-running-text: #2f7a3f;
    --srv-working: #e0a23a;
    --srv-working-tint: rgb(224 162 58 / 0.18);
    --srv-working-text: #8a5a0f;
    --srv-working-box: rgb(224 162 58 / 0.08);
    --srv-working-line: rgb(224 162 58 / 0.3);
    --srv-stopped: #8a8a8a;
    --srv-stopped-tint: rgb(0 0 0 / 0.06);
    --srv-stopped-text: #555555;
    --srv-stopped-box: rgb(0 0 0 / 0.03);
    --srv-stopped-line: rgb(0 0 0 / 0.1);
    --srv-failed: #e5534b;
    --srv-failed-tint: rgb(229 83 75 / 0.12);
    --srv-failed-text: #b3261e;
    --srv-failed-box: rgb(229 83 75 / 0.06);
    --srv-failed-line: rgb(229 83 75 / 0.28);
    --srv-primary: #2f5a43;
    --srv-primary-fg: #f5fbf7;
    --srv-mono: #3a3a3a;

    --panel-radius: 12px;
    --radius-elevated: 11px;

    --selection: var(--blue-6);
    --selection-foreground: var(--blue-12);

    --status-in-progress: var(--amber-11);
    --status-in-review: var(--green-10);
    --status-done: var(--neutral-9);
    --status-todo: var(--neutral-9);
    --status-cancelled: var(--neutral-9);

    /* Monaco editor */
    --monaco-bg: var(--background);
    --monaco-fg: var(--foreground);
    --monaco-error-fg: var(--foreground-destructive);

    --monaco-line-highlight: var(--background-2);
    --monaco-line-number: var(--foreground-passive);
    --monaco-gutter: var(--monaco-bg);
    --monaco-inserted-text-bg: color(display-p3 0.063 0.725 0.506 / 0.251);
    --monaco-inserted-line-bg: color(display-p3 0.925 0.992 0.961 / 0.502);
    --monaco-removed-text-bg: color(display-p3 0.957 0.247 0.369 / 0.251);
    --monaco-removed-line-bg: color(display-p3 1 0.945 0.949 / 0.502);
    --monaco-unchanged-region-bg: color(display-p3 0.886 0.91 0.941);
    --monaco-diff-diagonal-fill: var(--background-2);
    --monaco-selection-bg: var(--selection);
    --monaco-selection-fg: var(--selection-foreground);
    --monaco-inactive-selection-bg: color-mix(in srgb, var(--selection) 15.3%, transparent);

    --foreground-diff-added: var(--green-9);
    --foreground-diff-modified: var(--amber-9);
    --foreground-diff-deleted: var(--red-9);

    /* State / indicator tokens */
    --foreground-success: var(--green-9);
    --background-success: var(--green-3);
    --background-success-hover: var(--green-4);
    --border-success: var(--green-7);

    --foreground-error: var(--red-9);
    --background-error: var(--red-3);
    --background-error-hover: var(--red-4);

    --foreground-warning: var(--amber-11);
    --background-warning: var(--amber-3);
    --background-warning-hover: var(--amber-4);
    --border-warning: var(--amber-7);

    --foreground-info: var(--blue-9);
    --background-info: var(--blue-3);
    --background-info-hover: var(--blue-4);
    --border-info: var(--blue-7);

    --foreground-conflict: var(--orange-9);
    --foreground-merged: var(--purple-9);
  }

  .emdark {
    /* ── Color palette (Radix dark P3) ───────────────────────── */

    /* Neutral */
    --neutral-1: color(display-p3 0.067 0.067 0.067);
    --neutral-2: color(display-p3 0.098 0.098 0.098);
    --neutral-3: color(display-p3 0.135 0.135 0.135);
    --neutral-4: color(display-p3 0.163 0.163 0.163);
    --neutral-5: color(display-p3 0.192 0.192 0.192);
    --neutral-6: color(display-p3 0.228 0.228 0.228);
    --neutral-7: color(display-p3 0.283 0.283 0.283);
    --neutral-8: color(display-p3 0.375 0.375 0.375);
    --neutral-9: color(display-p3 0.431 0.431 0.431);
    --neutral-10: color(display-p3 0.484 0.484 0.484);
    --neutral-11: color(display-p3 0.706 0.706 0.706);
    --neutral-12: color(display-p3 0.933 0.933 0.933);

    /* Red */
    --red-1: color(display-p3 0.093 0.068 0.067);
    --red-2: color(display-p3 0.118 0.077 0.079);
    --red-3: color(display-p3 0.211 0.081 0.099);
    --red-4: color(display-p3 0.287 0.079 0.113);
    --red-5: color(display-p3 0.348 0.11 0.142);
    --red-6: color(display-p3 0.414 0.16 0.183);
    --red-7: color(display-p3 0.508 0.224 0.236);
    --red-8: color(display-p3 0.659 0.298 0.297);
    --red-9: color(display-p3 0.83 0.329 0.324);
    --red-10: color(display-p3 0.861 0.403 0.387);
    --red-11: color(display-p3 1 0.57 0.55);
    --red-12: color(display-p3 0.971 0.826 0.852);

    /* Green (Radix grass dark) */
    --green-1: color(display-p3 0.062 0.083 0.067);
    --green-2: color(display-p3 0.083 0.103 0.085);
    --green-3: color(display-p3 0.118 0.163 0.122);
    --green-4: color(display-p3 0.142 0.225 0.15);
    --green-5: color(display-p3 0.178 0.279 0.186);
    --green-6: color(display-p3 0.217 0.337 0.224);
    --green-7: color(display-p3 0.258 0.4 0.264);
    --green-8: color(display-p3 0.302 0.47 0.305);
    --green-9: color(display-p3 0.38 0.647 0.378);
    --green-10: color(display-p3 0.426 0.694 0.426);
    --green-11: color(display-p3 0.535 0.807 0.542);
    --green-12: color(display-p3 0.797 0.936 0.776);

    /* Blue */
    --blue-1: color(display-p3 0.057 0.081 0.122);
    --blue-2: color(display-p3 0.072 0.098 0.147);
    --blue-3: color(display-p3 0.078 0.154 0.27);
    --blue-4: color(display-p3 0.033 0.197 0.37);
    --blue-5: color(display-p3 0.08 0.245 0.441);
    --blue-6: color(display-p3 0.14 0.298 0.511);
    --blue-7: color(display-p3 0.195 0.361 0.6);
    --blue-8: color(display-p3 0.239 0.434 0.72);
    --blue-9: color(display-p3 0.247 0.556 0.969);
    --blue-10: color(display-p3 0.344 0.612 0.973);
    --blue-11: color(display-p3 0.49 0.72 1);
    --blue-12: color(display-p3 0.788 0.898 0.99);

    /* Yellow */
    --yellow-1: color(display-p3 0.078 0.069 0.047);
    --yellow-2: color(display-p3 0.103 0.094 0.063);
    --yellow-3: color(display-p3 0.168 0.137 0.039);
    --yellow-4: color(display-p3 0.209 0.169 0);
    --yellow-5: color(display-p3 0.255 0.209 0);
    --yellow-6: color(display-p3 0.31 0.261 0.07);
    --yellow-7: color(display-p3 0.389 0.331 0.135);
    --yellow-8: color(display-p3 0.497 0.42 0.182);
    --yellow-9: color(display-p3 1 0.92 0.22);
    --yellow-10: color(display-p3 1 1 0.456);
    --yellow-11: color(display-p3 0.948 0.885 0.392);
    --yellow-12: color(display-p3 0.959 0.934 0.731);

    /* Purple */
    --purple-1: color(display-p3 0.09 0.068 0.103);
    --purple-2: color(display-p3 0.113 0.082 0.134);
    --purple-3: color(display-p3 0.175 0.112 0.224);
    --purple-4: color(display-p3 0.224 0.137 0.297);
    --purple-5: color(display-p3 0.264 0.167 0.349);
    --purple-6: color(display-p3 0.311 0.208 0.406);
    --purple-7: color(display-p3 0.381 0.266 0.496);
    --purple-8: color(display-p3 0.49 0.349 0.649);
    --purple-9: color(display-p3 0.523 0.318 0.751);
    --purple-10: color(display-p3 0.57 0.373 0.791);
    --purple-11: color(display-p3 0.8 0.62 1);
    --purple-12: color(display-p3 0.913 0.854 0.971);

    /* Orange */
    --orange-1: color(display-p3 0.088 0.07 0.057);
    --orange-2: color(display-p3 0.113 0.089 0.061);
    --orange-3: color(display-p3 0.189 0.12 0.056);
    --orange-4: color(display-p3 0.262 0.132 0);
    --orange-5: color(display-p3 0.315 0.168 0.016);
    --orange-6: color(display-p3 0.376 0.219 0.088);
    --orange-7: color(display-p3 0.465 0.283 0.147);
    --orange-8: color(display-p3 0.601 0.359 0.201);
    --orange-9: color(display-p3 0.9 0.45 0.2);
    --orange-10: color(display-p3 0.98 0.51 0.23);
    --orange-11: color(display-p3 1 0.63 0.38);
    --orange-12: color(display-p3 0.98 0.883 0.775);

    /* Cyan */
    --cyan-1: color(display-p3 0.053 0.085 0.098);
    --cyan-2: color(display-p3 0.072 0.105 0.122);
    --cyan-3: color(display-p3 0.073 0.168 0.209);
    --cyan-4: color(display-p3 0.063 0.216 0.277);
    --cyan-5: color(display-p3 0.091 0.267 0.336);
    --cyan-6: color(display-p3 0.137 0.324 0.4);
    --cyan-7: color(display-p3 0.186 0.398 0.484);
    --cyan-8: color(display-p3 0.23 0.496 0.6);
    --cyan-9: color(display-p3 0.282 0.627 0.765);
    --cyan-10: color(display-p3 0.331 0.675 0.801);
    --cyan-11: color(display-p3 0.446 0.79 0.887);
    --cyan-12: color(display-p3 0.757 0.919 0.962);

    /* Amber */
    --amber-1: color(display-p3 0.082 0.07 0.05);
    --amber-2: color(display-p3 0.111 0.094 0.064);
    --amber-3: color(display-p3 0.178 0.128 0.049);
    --amber-4: color(display-p3 0.239 0.156 0);
    --amber-5: color(display-p3 0.29 0.193 0);
    --amber-6: color(display-p3 0.344 0.245 0.076);
    --amber-7: color(display-p3 0.422 0.314 0.141);
    --amber-8: color(display-p3 0.535 0.399 0.189);
    --amber-9: color(display-p3 1 0.77 0.26);
    --amber-10: color(display-p3 1 0.87 0.15);
    --amber-11: color(display-p3 1 0.8 0.29);
    --amber-12: color(display-p3 0.984 0.909 0.726);

    /* Violet */
    --violet-1: color(display-p3 0.077 0.071 0.118);
    --violet-2: color(display-p3 0.101 0.084 0.141);
    --violet-3: color(display-p3 0.154 0.123 0.256);
    --violet-4: color(display-p3 0.191 0.148 0.345);
    --violet-5: color(display-p3 0.226 0.182 0.396);
    --violet-6: color(display-p3 0.269 0.223 0.449);
    --violet-7: color(display-p3 0.326 0.277 0.53);
    --violet-8: color(display-p3 0.399 0.346 0.656);
    --violet-9: color(display-p3 0.417 0.341 0.784);
    --violet-10: color(display-p3 0.477 0.402 0.823);
    --violet-11: color(display-p3 0.72 0.65 1);
    --violet-12: color(display-p3 0.883 0.867 0.986);

    /* Jade */
    --jade-1: color(display-p3 0.059 0.083 0.071);
    --jade-2: color(display-p3 0.078 0.11 0.094);
    --jade-3: color(display-p3 0.091 0.176 0.138);
    --jade-4: color(display-p3 0.102 0.228 0.177);
    --jade-5: color(display-p3 0.133 0.279 0.221);
    --jade-6: color(display-p3 0.174 0.334 0.273);
    --jade-7: color(display-p3 0.219 0.402 0.335);
    --jade-8: color(display-p3 0.263 0.488 0.411);
    --jade-9: color(display-p3 0.319 0.63 0.521);
    --jade-10: color(display-p3 0.338 0.68 0.555);
    --jade-11: color(display-p3 0.4 0.835 0.656);
    --jade-12: color(display-p3 0.734 0.934 0.838);

    /* ── Semantic tokens ─────────────────────────────────────── */
    --background: var(--neutral-1);
    --background-1: var(--neutral-2);
    --background-2: var(--neutral-3);
    --background-3: var(--neutral-4);

    --foreground: var(--neutral-12);
    --foreground-inverse: var(--neutral-1);
    --foreground-muted: var(--neutral-11);
    --foreground-passive: var(--neutral-9);

    --background-secondary: var(--background);
    --background-secondary-1: var(--background-1);
    --background-secondary-2: var(--background-2);
    --background-secondary-3: var(--background-3);

    --foreground-secondary: var(--foreground);
    --foreground-secondary-muted: var(--foreground-muted);
    --foreground-secondary-passive: var(--foreground-passive);

    --background-tertiary: var(--background);
    --background-tertiary-1: var(--background-1);
    --background-tertiary-2: var(--background-2);
    --background-tertiary-3: var(--background-3);

    --foreground-tertiary: var(--foreground);
    --foreground-tertiary-muted: var(--foreground-muted);
    --foreground-tertiary-passive: var(--foreground-passive);

    --background-quaternary: var(--background-1);
    --background-quaternary-1: var(--background-2);
    --background-quaternary-2: var(--background-3);

    --background-destructive: var(--red-3);
    --background-destructive-1: color(display-p3 0.25 0.102 0.122);
    --foreground-destructive: var(--red-9);
    --foreground-destructive-muted: color(display-p3 0.661 0.263 0.26);

    --background-neutral: var(--neutral-12);
    --foreground-neutral: var(--neutral-1);

    --primary-button-background: var(--jade-4);
    --primary-button-background-hover: var(--jade-5);
    --primary-button-foreground: var(--jade-12);
    --primary-button-border: var(--jade-7);

    --border: var(--neutral-6);
    --border-1: var(--neutral-7);
    --border-2: var(--neutral-8);
    --border-destructive: var(--red-8);
    --border-primary: var(--neutral-10);

    --ring: hsl(0 0% 3.9%);
    --radius: 0.5rem;

    /* Inverted against light: the panel is darker than the material it sits on,
       not lighter. */
    --material: #1a1a1a;
    --material-vibrant: rgb(24 24 24 / 0.72);
    --surface: #111111;
    --surface-2: #191919;

    --hair: rgb(255 255 255 / 0.12);
    --hair-strong: rgb(255 255 255 / 0.18);
    --hair-soft: rgb(255 255 255 / 0.07);

    --sel: rgb(255 255 255 / 0.11);
    --sel-soft: rgb(255 255 255 / 0.08);

    --fill: #222222;
    --fill-2: #2a2a2a;
    --fill-3: #3a3a3a;
    --btn-1: #2c2c2c;
    --accent-solid: #33513f;

    --fg-passive: #8d8d8d;

    --menu-surface: #262626;
    --menu-field: #1e1e1e;
    --menu-shadow: 0 20px 44px rgb(0 0 0 / 0.28);
    --composer-shadow: 0 1px 1px rgb(0 0 0 / 0.2), 0 2px 4px rgb(0 0 0 / 0.18);
    --composer-border: var(--border);
    --composer-border-focus: var(--border-1);
    --composer-send-bg: var(--foreground);
    --composer-send-fg: var(--foreground-inverse);
    --composer-send-bg-hover: color-mix(in srgb, var(--foreground) 92%, black);
    --composer-send-bg-active: color-mix(in srgb, var(--foreground) 85%, black);
    --menu-faint: rgb(255 255 255 / 0.03);
    --menu-pill: rgb(255 255 255 / 0.1);
    --menu-tile: #333333;
    --menu-tile-fg: #bbbbbb;
    --menu-tile-active-fg: #f5fbf7;
    --fg-name: #ededed;
    --fg-action: #d8d8d8;
    --fg-icon: #9a9a9a;
    --fg-dim: #9a9a9a;

    /* Darker than the material rather than lighter, so the raised segment
       reads as sitting on top of the track instead of merging into it. */
    --segment-track: rgb(0 0 0 / 0.32);

    --srv-running: #4fa05e;
    --srv-running-tint: rgb(79 160 94 / 0.14);
    --srv-running-text: #8fcb9e;
    --srv-working: #e0a23a;
    --srv-working-tint: rgb(224 162 58 / 0.14);
    --srv-working-text: #e8c07a;
    --srv-working-box: rgb(224 162 58 / 0.07);
    --srv-working-line: rgb(224 162 58 / 0.25);
    --srv-stopped: #6a6a6a;
    --srv-stopped-tint: rgb(255 255 255 / 0.07);
    --srv-stopped-text: #c8c8c8;
    --srv-stopped-box: rgb(255 255 255 / 0.04);
    --srv-stopped-line: rgb(255 255 255 / 0.1);
    --srv-failed: #e5534b;
    --srv-failed-tint: rgb(229 83 75 / 0.14);
    --srv-failed-text: #f2b8b5;
    --srv-failed-box: rgb(229 83 75 / 0.08);
    --srv-failed-line: rgb(229 83 75 / 0.25);
    --srv-primary: #2f5a43;
    --srv-primary-fg: #f5fbf7;
    --srv-mono: #c8c8c8;

    --panel-radius: 12px;
    --radius-elevated: 11px;

    --selection: var(--blue-9);
    --selection-foreground: var(--blue-12);

    --status-in-progress: var(--amber-11);
    --status-in-review: var(--green-10);
    --status-done: var(--neutral-10);
    --status-todo: var(--neutral-10);
    --status-cancelled: var(--neutral-10);

    /* Monaco editor */
    --monaco-bg: var(--background-1);
    --monaco-fg: var(--foreground-muted);
    --monaco-error-fg: color(display-p3 1 0.592 0.49);

    --monaco-line-highlight: var(--neutral-5);
    --monaco-line-number: color(display-p3 0.227 0.227 0.227);
    --monaco-gutter: var(--monaco-bg);
    /* Semi-transparent so the selection layer beneath stays visible (ENG-1248). */
    --monaco-inserted-text-bg: color(display-p3 0.145 0.282 0.176 / 0.45);
    --monaco-inserted-line-bg: color(display-p3 0.106 0.165 0.118 / 0.55);
    --monaco-inserted-text-border: color(display-p3 0.145 0.282 0.176 / 0.65);
    --monaco-removed-text-bg: color(display-p3 0.38 0.086 0.137 / 0.45);
    --monaco-removed-line-bg: color(display-p3 0.231 0.071 0.098 / 0.55);
    --monaco-removed-text-border: color(display-p3 0.38 0.086 0.137 / 0.65);
    --monaco-unchanged-region-bg: color(display-p3 0.165 0.165 0.165);
    --monaco-diff-border: color(display-p3 0.227 0.227 0.227);
    --monaco-diff-diagonal-fill: color(display-p3 0.165 0.165 0.165);
    --monaco-selection-bg: color(display-p3 0.3 0.52 0.82 / 0.7);
    --monaco-selection-fg: color(display-p3 0.95 0.96 0.98);
    --monaco-inactive-selection-bg: color(display-p3 0.3 0.52 0.82 / 0.35);

    --foreground-diff-added: var(--green-10);
    --foreground-diff-modified: var(--amber-9);
    --foreground-diff-deleted: var(--red-9);

    /* State / indicator tokens */
    --foreground-success: var(--green-9);
    --background-success: var(--green-3);
    --background-success-hover: var(--green-4);
    --border-success: var(--green-7);

    --foreground-error: var(--red-9);
    --background-error: var(--red-3);
    --background-error-hover: var(--red-4);

    --foreground-warning: var(--amber-11);
    --background-warning: var(--amber-3);
    --background-warning-hover: var(--amber-4);
    --border-warning: var(--amber-7);

    --foreground-info: var(--blue-9);
    --background-info: var(--blue-3);
    --background-info-hover: var(--blue-4);
    --border-info: var(--blue-7);

    --foreground-conflict: var(--orange-9);
    --foreground-merged: var(--purple-9);
  }
}

@layer base {
  * {
    @apply border-border;
  }
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
  #root {
    height: 100%;
    overflow: hidden;
  }
  body {
    @apply text-foreground;
    background: var(--material);
  }
  /* Set by the pre-paint script in index.html where the compositor is actually
     blurring behind the window. */
  html.has-vibrancy body {
    background: var(--material-vibrant);
  }

  /* Tailwind's reset gives buttons the arrow cursor, on the reasoning that a
     native app's controls do not use a hand. This app is full of controls that
     look like nothing until you hover them — sidebar rows, icon buttons, menu
     entries — so the hand is the only thing distinguishing what can be clicked
     from what is only being displayed. Sits in `base` so any `cursor-*`
     utility on the element still wins. */
  button:not(:disabled),
  summary,
  [role='button']:not([aria-disabled='true']),
  label[for] {
    cursor: pointer;
  }

  ::selection {
    background-color: color-mix(in srgb, var(--selection) 35%, transparent);
    color: var(--selection-foreground);
  }

  ::-moz-selection {
    background-color: color-mix(in srgb, var(--selection) 35%, transparent);
    color: var(--selection-foreground);
  }

  /* Scrollbar styles for light and dark mode */
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }

  *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  *::-webkit-scrollbar-track {
    background: transparent;
  }

  *::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
  }
}

@layer components {
  .logo-shimmer-container {
    position: relative;
    display: inline-block;
    height: 2.25rem;
  }

  .logo-shimmer-image {
    display: block;
    height: 100%;
    width: auto;
  }

  .logo-shimmer-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
  }

  .logo-shimmer-overlay::before {
    content: '';
    position: absolute;
    inset: -20% 0;
    width: 70%;
    background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.28) 30%,
      rgba(255, 255, 255, 0.75) 50%,
      rgba(255, 255, 255, 0.28) 70%,
      rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-15deg) translateX(-150%);
    animation: logo-shimmer-move 5s linear infinite;
    will-change: transform;
  }

  .emdark .logo-shimmer-overlay::before {
    background: linear-gradient(
      120deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.28) 30%,
      rgba(0, 0, 0, 0.75) 50%,
      rgba(0, 0, 0, 0.28) 70%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  @keyframes logo-shimmer-move {
    0% {
      transform: skewX(-15deg) translateX(-150%);
    }
    50% {
      transform: skewX(-15deg) translateX(250%);
    }
    100% {
      transform: skewX(-15deg) translateX(250%);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .logo-shimmer-overlay::before {
      animation: none;
      opacity: 0;
    }
  }
  .text-shimmer {
    background: linear-gradient(
      90deg,
      var(--foreground-passive) 0%,
      var(--foreground-passive) 30%,
      var(--foreground) 50%,
      var(--foreground-passive) 70%,
      var(--foreground-passive) 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer-move 2s linear infinite;
  }

  @keyframes text-shimmer-move {
    0% {
      background-position: 200% 0;
    }
    100% {
      background-position: -200% 0;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .text-shimmer {
      animation: none;
    }
  }

  /* Diff decorations for Monaco editor gutter and line highlights */
  .diff-glyph-added::before,
  .diff-glyph-modified::before,
  .diff-glyph-deleted::before {
    content: '';
    position: absolute;
    left: 3px;
    width: 3px;
    height: 100%;
    border-radius: 1px;
  }

  .diff-glyph-added::before {
    background-color: var(--diff-added);
  }

  .diff-glyph-modified::before {
    background-color: var(--diff-modified);
  }

  .diff-glyph-deleted::before {
    background-color: var(--diff-deleted);
  }

  .diff-glyph-added:hover::before,
  .diff-glyph-modified:hover::before,
  .diff-glyph-deleted:hover::before {
    width: 4px;
    left: 2px;
    transition:
      width 0.1s ease-in-out,
      left 0.1s ease-in-out;
  }

  .diff-line-added {
    background-color: var(--diff-added-bg);
  }

  .diff-line-modified {
    background-color: var(--diff-modified-bg);
  }

  .diff-line-deleted {
    background-color: var(--diff-deleted-bg);
  }

  /* Monaco diff comment UI */
  .file-diff-view .monaco-editor .margin-view-overlays .glyph-margin {
    width: 20px !important;
  }

  .file-diff-view .monaco-editor .margin {
    background-color: transparent !important;
  }

  .file-diff-view .comment-hover-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 1px auto;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    transition:
      background-color 0.15s ease,
      border-color 0.15s ease;
  }

  .file-diff-view .comment-hover-icon::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background-color: currentColor;
    color: var(--foreground-muted);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
  }

  .file-diff-view .comment-hover-icon:hover,
  .file-diff-view .comment-hover-icon.comment-hover-icon-pinned {
    background-color: var(--background-2);
    border-color: var(--border);
  }

  .file-diff-view .comment-hover-icon:hover::before,
  .file-diff-view .comment-hover-icon.comment-hover-icon-pinned::before {
    color: var(--foreground);
  }

  .file-diff-view .monaco-editor .glyph-margin > div {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .file-diff-view .monaco-editor .view-zones,
  .file-diff-view .monaco-editor .view-zone,
  .file-diff-view .comment-view-zone {
    pointer-events: auto !important;
  }
}