:root {
  color-scheme: light dark;

  --lime-500: #c4f436;  --lime-ink: oklch(0.2 0.05 120);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --radius-card: 1.875rem;
  --radius-md: 1.25rem;
  --radius-well: 1rem;
  --radius-sm: 0.875rem;
  --radius-pill: 999px;

  --font-sans: "Geist", system-ui, sans-serif;
  --font-display: "Urbanist", "Geist", system-ui, sans-serif;  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --text-xs: 0.6875rem;
  --text-sm: 0.75rem;
  --text-md: 0.875rem;
  --text-lg: 1rem;
  --text-xl: 1.125rem;
  --text-2xl: 1.375rem;
  --text-display: 2.25rem;  --text-hero: 1.875rem;  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-heading: 600;
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --tracking-label: 0.04em;
  --tracking-tight: -0.02em;
  --leading-none: 1;
  --underline-offset: 0.18em;
  --code-size: 0.92em;

  --duration-fast: 150ms;
  --duration-base: 220ms;
  --duration-none: 0s;  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  --opacity-disabled: 0.5;
  --opacity-hidden: 0;
  --z-raised: 10;
  --z-overlay: 100;

  --row-h: 2.5rem;
  --control-h: 2.25rem;
  --control-text: 0.8125rem;
  --control-h-sm: 2rem;
  --card-pad: 1.25rem;
  --gap: 0.75rem;
  --gutter: 1.5rem;
  --tap: 2.5rem;
  --tab-h: 2.25rem;
  --icon-size: 1.25rem;
  --measure: 40rem;  --chart-h: 3rem;
  --gauge-w: 9rem;
  --chart-card-w: 26rem;
  --chart-plot-h: 8.75rem;
  --uptime-gap: 2px;
  --uptime-radius: 2px;
  --dot-size: 0.5rem;
  --stroke-chart: 2px;
  --stroke-gauge: 8px;
  --tab-indicator: 2px;
  --avatar-size: 2rem;
  --form-w: 48rem;
  --meter-h: 0.5rem;
  --ring-size: 2.75rem;
  --bars-h: 4.5rem;
  --attention-w: 16rem;
  --ring-size-lg: 3.25rem;
  --icon-badge: 2.5rem;
  --tile-w: 11rem;
  --overview-col-w: 24rem;
  --ring-icon: 1.125rem;
  --terminal-h: 70vh;
  --editor-h: 65vh;
  --fm-side-w: 13rem;
  --fm-tile-w: 12rem;
  --cell-max: 28rem;
  --drop-edge: 2px;
  --banner-edge: 0.25rem;
  --preview-h: 28rem;
  --dialog-w: 34rem;
  --bento-cols: 4;
  --search-w: 18rem;
  --filter-w: 12rem;
  --menu-w: 12rem;
  --cell-label-w: 7rem;
  --log-h: 28rem;
  --kv-label-w: 9rem;
  --content-max: 80rem;
  --grid-min: 16rem;
  --dot-mark: 1rem;
  --dot-ring: 2px;
  --target-min: 1.5rem;
  --float-min-w: 20rem;
  --float-min-h: 10rem;  --swatch-min: 9rem;
  --swatch-h: 3.5rem;
  --sheet-max-h: 85vh;
  --sheet-w: 40rem;
  --focus-w: 26rem;
  --qr-size: 12rem;
  --qr-bg: oklch(1 0 0);  --mail-bg: oklch(1 0 0);  --qr-fg: oklch(0 0 0);

  --bg: light-dark(oklch(0.925 0.004 270), oklch(0.135 0.004 270));
  --surface: light-dark(oklch(0.965 0.003 270), oklch(0.19 0.005 270));
  --surface-2: light-dark(oklch(0.915 0.004 270), oklch(0.24 0.006 270));
  --row-bg: light-dark(oklch(0.935 0.003 270), oklch(0.22 0.006 270));
  --scrim: oklch(0 0 0 / 0.55);  --highlight: light-dark(oklch(1 0 0 / 0.7), oklch(1 0 0 / 0.08));  --border: light-dark(oklch(0 0 0 / 0.08), oklch(1 0 0 / 0.06));
  --divider: light-dark(oklch(0 0 0 / 0.06), oklch(1 0 0 / 0.05));
  --text: light-dark(oklch(0.18 0 0), oklch(0.95 0 0));
  --text-muted: light-dark(oklch(0.44 0.005 270), oklch(0.66 0.005 270));
  --text-faint: light-dark(oklch(0.5 0.005 270), oklch(0.62 0.005 270));  --terminal-bg: oklch(0.11 0.004 270);  --terminal-text: oklch(0.9 0 0);
  --terminal-muted: oklch(0.62 0.005 270);
  --terminal-step: oklch(0.82 0.17 120);
  --terminal-error: oklch(0.72 0.17 25);

  --accent: var(--lime-500);
  --accent-contrast: var(--lime-ink);
  --accent-muted: color-mix(in oklch, var(--lime-500) 16%, transparent);
  --link: light-dark(oklch(0.46 0.14 120), oklch(0.82 0.17 120));

  --status-ok: light-dark(oklch(0.45 0.12 150), oklch(0.72 0.17 150));
  --status-busy: light-dark(oklch(0.5 0.15 255), oklch(0.7 0.14 240));
  --status-warn: light-dark(oklch(0.48 0.1 75), oklch(0.78 0.15 85));
  --status-error: light-dark(oklch(0.48 0.2 25), oklch(0.67 0.2 25));
  --status-off: light-dark(oklch(0.44 0.02 260), oklch(0.65 0.02 260));
  --status-ok-bg: oklch(0.72 0.17 150 / 0.12);
  --status-busy-bg: oklch(0.7 0.14 240 / 0.12);
  --status-warn-bg: oklch(0.78 0.15 85 / 0.12);
  --status-error-bg: oklch(0.64 0.2 25 / 0.12);
  --status-off-bg: oklch(0.65 0.02 260 / 0.12);

  --chart-accent: light-dark(oklch(0.62 0.17 125), var(--lime-500));
  --chart-muted: light-dark(oklch(0 0 0 / 0.14), oklch(1 0 0 / 0.16));
  --chart-line: light-dark(oklch(0.45 0.13 125), var(--lime-500));

  --shadow-card: 0 0.75rem 2rem light-dark(oklch(0 0 0 / 0.1), oklch(0 0 0 / 0.35));
  --shadow-float: 0 1.5rem 4rem light-dark(oklch(0 0 0 / 0.18), oklch(0 0 0 / 0.5));
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--link);

  --button-height: var(--control-h);
  --button-pad-x: var(--space-4);
  --button-radius: var(--radius-sm);
  --button-primary-bg: var(--accent);
  --button-primary-fg: var(--accent-contrast);
  --button-secondary-bg: var(--surface-2);
  --button-danger-fg: var(--status-error);

  --card-bg: var(--surface);
  --card-radius: var(--radius-card);
  --card-shadow: inset 0 1px 0 var(--highlight), var(--shadow-card);

  --field-bg: var(--surface-2);
  --field-radius: var(--radius-sm);
  --field-height: var(--control-h);

  --pill-radius: var(--radius-pill);
  --note-max-width: 16rem;
  --wizard-steps-width: 14rem;
  --choice-min-width: 15rem;
  --topnav-bg: var(--surface-2);
  --topnav-active-bg: var(--surface);
  --icon-btn-size: var(--tap);
  --table-row-h: 4.5rem;
  --table-row-h-nested: 3.25rem;
}

[data-cards="light"] .card,
[data-cards="light"] .datatable,
[data-cards="light"] .empty {
  color-scheme: light;
}

[data-cards="dark"] .card,
[data-cards="dark"] .datatable,
[data-cards="dark"] .empty {
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

@media (pointer: coarse) {
  :root {
    --tap: 2.75rem;
    --tab-h: 2.75rem;
    --row-h: 2.75rem;
    --control-h: 2.75rem;
    --control-h-sm: 2.75rem;
  }
}

@media (width < 640px) {
  :root {
    --card-pad: 1rem;
    --gap: 0.75rem;
    --gutter: 1rem;
  }
}
