/* Vero design tokens. Values are HSL channels so hsl(var(--name)) and hsl(var(--name)/.5) both work. */
:root {
    --background: 150 20% 96.1%;        /* #F3F7F5 canvas */
    --foreground: 172.5 26.7% 11.8%;    /* #162624 */
    --card: 0 0% 100%;                  /* #FFFFFF surface */
    --card-foreground: 172.5 26.7% 11.8%;
    --popover: 0 0% 100%;
    --popover-foreground: 172.5 26.7% 11.8%;
    --primary: 169.8 54.6% 19%;         /* #164B42 jade */
    --primary-foreground: 0 0% 100%;
    --secondary: 150 22.7% 91.4%;
    --secondary-foreground: 172.5 26.7% 11.8%;
    --muted: 150 22.7% 91.4%;           /* #E4EEE9 */
    --muted-foreground: 166.4 12.2% 35.3%; /* #4F6560 */
    --accent: 158.2 28.2% 92.4%;        /* #E6F1ED hover and selected wash */
    --accent-foreground: 169.8 54.6% 19%;
    --destructive: 350.6 66% 38%;
    --destructive-foreground: 0 0% 100%;
    --border: 158.8 20.5% 83.7%;        /* #CDDED8 */
    --input: 158.8 20.5% 83.7%;
    --ring: 166.5 49.7% 28%;            /* #246B5B */
    --ok: 164.6 66.1% 23.1%;
    --warn: 32.9 100% 28.6%;
    --fail: 350.6 66% 38%;
    --live: 211.5 70.6% 38.6%;
    --up: 164.6 66.1% 23.1%;
    --down: 350.6 66% 38%;
    --ok-foreground: 0 0% 100%; --warn-foreground: 0 0% 100%; --fail-foreground: 0 0% 100%; --live-foreground: 0 0% 100%; --up-foreground: 0 0% 100%; --down-foreground: 0 0% 100%;
    --radius: 9px;
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dark {
    --background: 166.2 31.7% 8%;      /* #0E1B18 */
    --foreground: 146.7 22% 92%;        /* #E6EFEA */
    --card: 163.3 30% 11.8%;            /* #152722 */
    --card-foreground: 146.7 22% 92%;
    --popover: 163.3 30% 11.8%;
    --popover-foreground: 146.7 22% 92%;
    --primary: 162.6 54.4% 77.6%;       /* #A7E5D3 mint */
    --primary-foreground: 166.2 31.7% 8%;
    --secondary: 162 24.4% 16.1%;
    --secondary-foreground: 146.7 22% 92%;
    --muted: 162 24.4% 16.1%;
    --muted-foreground: 159.1 11.4% 60.6%;
    --accent: 162 26.3% 14.9%;
    --accent-foreground: 162.6 54.4% 77.6%;
    --destructive: 351.8 79.7% 74.9%;
    --destructive-foreground: 166.2 31.7% 8%;
    --border: 163.6 20.8% 20.8%;
    --input: 163.6 20.8% 20.8%;
    --ring: 162.6 54.4% 77.6%;
    --ok: 161.4 53.2% 63.1%;
    --warn: 35.5 85.4% 65.1%;
    --fail: 351.8 79.7% 74.9%;
    --live: 210.3 84.7% 74.3%;
    --up: 161.4 53.2% 63.1%;
    --down: 351.8 79.7% 74.9%;
    --ok-foreground: 166.2 31.7% 8%; --warn-foreground: 166.2 31.7% 8%; --fail-foreground: 166.2 31.7% 8%; --live-foreground: 166.2 31.7% 8%; --up-foreground: 166.2 31.7% 8%; --down-foreground: 166.2 31.7% 8%;
}

html { font-family: 'DM Sans', system-ui, sans-serif; }
body { background: hsl(var(--background)); color: hsl(var(--foreground)); }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* Brand mark: the same V as vero-mark/favicon.svg, colored by currentColor. */
.vero-mark {
    display: inline-block; flex: none; aspect-ratio: 1; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6 11l10 16L26 11' fill='none' stroke='%23000' stroke-width='4.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='16' cy='4.5' r='2.5' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6 11l10 16L26 11' fill='none' stroke='%23000' stroke-width='4.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='16' cy='4.5' r='2.5' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Shared primitives */
main > * { min-width: 0; }
.vui-title { font-size: 24px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
.vui-subtitle { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.vui-muted { color: hsl(var(--muted-foreground)); font-size: 13px; }
.vui-panel { min-width: 0; overflow-wrap: anywhere; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); color: hsl(var(--card-foreground)); box-shadow: 0 1px 2px hsl(var(--foreground) / .03); }
.vui-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 36px; padding: 8px 12px; border: 1px solid hsl(var(--input)); border-radius: calc(var(--radius) - 3px); background: hsl(var(--card)); color: hsl(var(--foreground)); font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s; }
.vui-button:hover { background: hsl(var(--accent)); }
.vui-button:disabled { opacity: .55; cursor: wait; }
.vui-primary { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.vui-primary:hover { background: hsl(var(--primary) / .88); color: hsl(var(--primary-foreground)); }
.vui-danger { color: hsl(var(--fail)); border-color: hsl(var(--fail) / .5); }
.vui-field { display: block; width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid hsl(var(--input)); border-radius: calc(var(--radius) - 3px); background: hsl(var(--card)); color: hsl(var(--foreground)); font: inherit; font-size: 13px; }
.vui-field::placeholder { color: hsl(var(--muted-foreground)); opacity: 1; }
.vui-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.vui-scroll { overflow: auto; min-width: 0; scrollbar-width: thin; scrollbar-color: hsl(var(--muted-foreground) / .4) transparent; }
.vui-scroll:focus-visible, .vui-panel:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.vui-selected { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); border-color: hsl(var(--ring)); }
.vui-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.vui-status::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 999px; background: currentColor; }
.vui-status[data-state="live"], .vui-status[data-state="running"] { color: hsl(var(--ok)); }
.vui-status[data-state="running"]::before { animation: vui-pulse 1.8s ease-in-out infinite; }
.vui-status[data-state="queued"] { color: hsl(var(--live)); }
.vui-status[data-state="queued"]::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.vui-status[data-state="stale"] { color: hsl(var(--warn)); }
.vui-status[data-state="stale"]::before { opacity: .55; }
.vui-status[data-state="failed"] { color: hsl(var(--fail)); }
.vui-status[data-state="idle"] { color: hsl(var(--muted-foreground)); }
@keyframes vui-pulse { 50% { opacity: .35; transform: scale(.8); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
