:root {
  /* Core spacing scale */
  --node-editor-space-xs: 4px;
  --node-editor-space-sm: 8px;
  --node-editor-space-md: 12px;
  --node-editor-space-lg: 16px;
  --node-editor-space-xl: 24px;
  --node-editor-space-xxl: 32px;

  /* Layout spacing */
  --node-editor-control-padding: var(--node-editor-space-sm) var(--node-editor-space-lg);

  /* Inspector spacing system */
  --node-editor-inspector-space-xs: var(--node-editor-space-xs);
  --node-editor-inspector-space-sm: var(--node-editor-space-sm);
  --node-editor-inspector-space-md: var(--node-editor-space-md);
  --node-editor-inspector-space-lg: var(--node-editor-space-lg);
  --node-editor-inspector-space-xl: var(--node-editor-space-xl);
  --node-editor-inspector-space-xxl: var(--node-editor-space-xxl);
  --node-editor-inspector-content-padding: var(--node-editor-inspector-space-md);
  --node-editor-inspector-header-padding-top: var(--node-editor-inspector-space-md);
  --node-editor-inspector-header-padding-bottom: var(--node-editor-inspector-space-xs);
  --node-editor-inspector-header-gap: var(--node-editor-inspector-space-sm);
  --node-editor-inspector-section-gap: var(--node-editor-inspector-space-md);
  --node-editor-inspector-field-gap: var(--node-editor-inspector-space-sm);
  --node-editor-inspector-inline-gap: var(--node-editor-inspector-space-sm);
  --node-editor-inspector-empty-padding-vertical: var(--node-editor-inspector-space-xxl);
  --node-editor-inspector-empty-padding-horizontal: var(--node-editor-inspector-space-lg);
  --node-editor-inspector-input-padding: var(--node-editor-space-xs) var(--node-editor-space-sm);

  /* Inspector typography */
  --node-editor-inspector-font-size-title: 0.6875rem;
  --node-editor-inspector-line-height-title: 1.4;
  --node-editor-inspector-font-size-body: 0.8125rem;
  --node-editor-inspector-line-height-body: 1.45;
  --node-editor-inspector-font-size-meta: 0.6875rem;
  --node-editor-inspector-line-height-meta: 1.35;
  --node-editor-inspector-font-weight-medium: 500;
  --node-editor-inspector-font-size-heading: 0.875rem;
  --node-editor-inspector-font-size: var(--node-editor-inspector-font-size-body);
  --node-editor-inspector-line-height: var(--node-editor-inspector-line-height-body);

  /* Font families & typography */
  --node-editor-theme-default-font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --node-editor-theme-control-font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --node-editor-theme-label-font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --node-editor-system-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  --node-editor-font-mono: "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --node-editor-title-font: 600 0.9375rem/1.4 var(--node-editor-theme-label-font-family);
  --node-editor-subtitle-font: 500 0.875rem/1.4 var(--node-editor-theme-label-font-family);
  --node-editor-caption-font: 400 0.6875rem/1.35 var(--node-editor-theme-default-font-family);
  --node-editor-control-text-font: 500 0.8125rem/1.4 var(--node-editor-theme-control-font-family);
  --node-editor-input-font: 400 var(--node-editor-inspector-font-size-body) / 1.45 var(--node-editor-theme-default-font-family);
  --node-editor-font-size-lg: 1.125rem;
  --node-editor-font-size-sm: 0.875rem;
  --node-editor-font-size-xs: 0.75rem;

  /* Canvas grid */
  --node-editor-grid-color: #3a3a3c;
  --node-editor-grid-opacity: 0.14;

  /* Shadow system */
  --node-editor-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --node-editor-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --node-editor-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);

  /* Transition system */
  --node-editor-transition-duration: 0.3s;

  /* Inspector shadows */
  --node-editor-inspector-shadow: 0 20px 40px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --node-editor-inspector-header-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.06);

  /* Tree & List Components */
  --node-editor-tree-item-height: 28px;
  --node-editor-tree-indent: 16px;

  /* Control Buttons */
  --node-editor-control-button-size-sm: 16px;
  --node-editor-control-button-size: 20px;

  /* Icons */
  --node-editor-icon-size-sm: 13px;
  --node-editor-icon-selected-brightness: 1.1;

  /* Text colors */
  --node-editor-text-color: #1d1d1f;
  --node-editor-text-secondary: #515154;
  --node-editor-header-text-color: #0b0b0c;
  --node-editor-label-color: var(--node-editor-text-color);
  --node-editor-secondary-label-color: #86868b;
  --node-editor-tertiary-label-color: #a1a1a6;
  --node-editor-quaternary-label-color: #d2d2d7;
  --node-editor-control-text-color: var(--node-editor-text-color);
  --node-editor-control-text-color-primary: #ffffff;
  --node-editor-control-text-color-secondary: #1d1d1f;
  --node-editor-control-hover-text-color-primary: #ffffff;
  --node-editor-input-text-color: var(--node-editor-text-color);
  --node-editor-selected-control-text-color: #0c66d6;
  --node-editor-selected-menu-item-text-color: #ffffff;

  /* Status & accent colors */
  --node-editor-accent-color: #0071e3;
  --node-editor-accent-color-hover: #0a84ff;
  --node-editor-color-primary: #0071e3;
  --node-editor-keyboard-focus-indicator-color: rgba(10, 132, 255, 0.3);
  --node-editor-success-color: #34c759;
  --node-editor-warning-color: #ff9f0a;
  --node-editor-caution-color: #ff3b30;
  --node-editor-caution-hover-background: rgba(255, 59, 48, 0.12);
  --node-editor-system-orange-color: #ff9f0a;
  --node-editor-system-red-color: #ff3b30;
  --node-editor-connection-color: #2997ff;

  /* Surface colors */
  --node-editor-surface-primary: #fbfbfd;
  --node-editor-surface-secondary: #f5f5f7;
  --node-editor-surface-tertiary: #e5e5ea;
  --node-editor-background-surface: #f5f5f7;
  --node-editor-selected-content-background-color: rgba(10, 132, 255, 0.12);
  --node-editor-selected-control-color: rgba(10, 132, 255, 0.16);
  --node-editor-under-page-background-color: #ffffff;
  --node-editor-window-background-color: #fbfbfd;

  /* Control surfaces */
  --node-editor-control-background: rgba(255, 255, 255, 0.85);
  --node-editor-control-background-primary: #0071e3;
  --node-editor-control-background-secondary: rgba(255, 255, 255, 0.7);
  --node-editor-control-hover-background: rgba(0, 0, 0, 0.04);
  --node-editor-control-hover-background-primary: #0a84ff;
  --node-editor-hover-background: rgba(0, 0, 0, 0.05);
  --node-editor-control-box-shadow-primary: 0 10px 30px rgba(0, 113, 227, 0.3);
  --node-editor-control-box-shadow-secondary: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  --node-editor-disabled-control-text-color: rgba(81, 81, 84, 0.45);

  /* Input surfaces */
  --node-editor-input-background: rgba(255, 255, 255, 0.9);
  --node-editor-input-border: 0.5px solid rgba(0, 0, 0, 0.15);
  --node-editor-input-border-hover: rgba(10, 132, 255, 0.5);
  --node-editor-input-box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.04);
  --node-editor-input-padding: var(--node-editor-space-sm) var(--node-editor-space-md);

  /* Card & panel styling */
  --node-editor-card-border-color: rgba(28, 28, 30, 0.1);
  --node-editor-card-border: 1px solid var(--node-editor-card-border-color);
  --node-editor-card-border-radius: var(--node-editor-radius-lg);
  --node-editor-card-box-shadow: 0 24px 60px rgba(28, 28, 30, 0.12);
  --node-editor-card-hover-box-shadow: 0 28px 72px rgba(0, 0, 0, 0.16);
  --node-editor-node-card-box-shadow: 0 4px 12px rgba(28, 28, 30, 0.08);
  --node-editor-card-elevated-box-shadow: 0 32px 96px rgba(0, 0, 0, 0.18);
  --node-editor-card-focus-box-shadow: 0 0 0 3px var(--node-editor-keyboard-focus-indicator-color);
  --node-editor-card-disabled-background: rgba(209, 209, 214, 0.5);
  --node-editor-card-filled-background: rgba(10, 132, 255, 0.08);
  --node-editor-card-filled-hover-background: rgba(10, 132, 255, 0.12);
  --node-editor-card-hover-border-color: rgba(10, 132, 255, 0.3);

  /* Dialogs & overlays */
  --node-editor-dialog-background: rgba(255, 255, 255, 0.82);
  --node-editor-dialog-box-shadow: 0 60px 120px rgba(0, 0, 0, 0.2);
  --node-editor-dialog-level-elevation: 1000;

  /* Scrollbars */
  --node-editor-scroll-bar-thumb-color: rgba(120, 120, 128, 0.25);
  --node-editor-active-scroll-bar-thumb-color: rgba(10, 132, 255, 0.45);

  /* Selected State Colors */
  --node-editor-selected-secondary-color: rgba(255, 255, 255, 0.95);
  --node-editor-selected-hover-background: rgba(10, 132, 255, 0.2);

  /* Tables & list accents */
  --node-editor-table-header-background-color: rgba(255, 255, 255, 0.86);
  --node-editor-table-header-background-color-hover: rgba(255, 255, 255, 0.92);
  --node-editor-table-header-background-color-active: rgba(10, 132, 255, 0.14);

  /* Node-specific colors */
  --node-editor-group-node-background: rgba(10, 132, 255, 0.08);
  --node-editor-group-node-border: rgba(10, 132, 255, 0.24);
  --node-editor-group-node-active-background: rgba(10, 132, 255, 0.16);
  --node-editor-group-node-active-color: rgba(10, 132, 255, 0.55);
  --node-editor-node-port-input-color: #34c759;
  --node-editor-node-port-output-color: #0071e3;

  /* System fills */
  --node-editor-tertiary-system-background: rgba(0, 0, 0, 0.05);
  --node-editor-tertiary-system-fill-color: rgba(0, 0, 0, 0.08);
  --node-editor-quaternary-system-fill-color: rgba(0, 0, 0, 0.12);

  /* Border Radii */
  --node-editor-border-radius-xxs: 3px;
  --node-editor-border-radius-xs: 5px;
  --node-editor-radius-xs: 6px;
  --node-editor-radius-sm: 8px;
  --node-editor-radius-md: 10px;
  --node-editor-radius-lg: 12px;
  --node-editor-control-border-radius: var(--node-editor-radius-sm);
  --node-editor-segment-control-border-radius: var(--node-editor-radius-md);

  /* Borders */
  --node-editor-border-width: 1px;
  --node-editor-border-color: rgba(28, 28, 30, 0.12);
  --node-editor-divider-color: rgba(60, 60, 67, 0.16);
  --node-editor-separator-color: rgba(60, 60, 67, 0.1);

  /* Segment controls */
  --node-editor-segment-backdrop-filter: blur(20px) saturate(180%);
  --node-editor-segment-control-background: rgba(174, 174, 178, 0.18);
  --node-editor-segment-control-background-color: rgba(242, 242, 247, 0.75);
  --node-editor-segment-control-text-color: rgba(60, 60, 67, 0.75);
  --node-editor-segment-control-active-background-color: #ffffff;
  --node-editor-segment-control-active-text-color: #000000;
  --node-editor-segment-control-segment-padding: var(--node-editor-space-xs) var(--node-editor-space-sm);
  --node-editor-segment-control-hover-background-color: rgba(0, 0, 0, 0.04);
  --node-editor-segment-control-indicator-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);

  /* Tab Navigation - Apple text tab style */
  --node-editor-tab-nav-display: flex;
  --node-editor-tab-nav-direction: row;
  --node-editor-tab-nav-align: center;
  --node-editor-tab-nav-justify: center;
  --node-editor-tab-nav-gap: var(--node-editor-space-lg);
  --node-editor-tab-nav-width: auto;
  --node-editor-tab-nav-padding: 0;
  --node-editor-tab-nav-border-radius: 0;
  --node-editor-tab-nav-background: transparent;
  --node-editor-tab-nav-border: none;
  --node-editor-tab-nav-box-shadow: none;
  --node-editor-tab-nav-backdrop-filter: none;
  --node-editor-tab-nav-overflow: visible;

  /* Tab Button - Apple text style */
  --node-editor-tab-button-display: flex;
  --node-editor-tab-button-align: center;
  --node-editor-tab-button-justify: center;
  --node-editor-tab-button-flex: 0 0 auto;
  --node-editor-tab-button-min-width: auto;
  --node-editor-tab-button-min-height: 32px;
  --node-editor-tab-button-padding: var(--node-editor-space-xs) var(--node-editor-space-sm);
  --node-editor-tab-button-margin: 0;
  --node-editor-tab-button-border: none;
  --node-editor-tab-button-border-radius: 0;
  --node-editor-tab-button-background: transparent;
  --node-editor-tab-button-color: var(--node-editor-secondary-label-color);
  --node-editor-tab-button-font-family: var(--node-editor-theme-control-font-family);
  --node-editor-tab-button-font-size: 0.8125rem;
  --node-editor-tab-button-font-weight: 400;
  --node-editor-tab-button-line-height: 1.4;
  --node-editor-tab-button-letter-spacing: normal;
  --node-editor-tab-button-text-transform: none;
  --node-editor-tab-button-transition: color 0.2s ease;
  --node-editor-tab-button-first-border-radius: 0;
  --node-editor-tab-button-last-border-radius: 0;

  /* Tab Button Active State - Apple style */
  --node-editor-tab-button-active-background: transparent;
  --node-editor-tab-button-active-color: var(--node-editor-text-color);
  --node-editor-tab-button-active-font-weight: 500;
  --node-editor-tab-button-active-border: none;
  --node-editor-tab-button-active-box-shadow: none;
  --node-editor-tab-button-active-hover-opacity: 1;

  /* Tab Button Hover State */
  --node-editor-tab-button-hover-background: transparent;
  --node-editor-tab-button-hover-color: var(--node-editor-text-color);

  /* Tab Button Focus State */
  --node-editor-tab-button-focus-outline: 2px solid var(--node-editor-keyboard-focus-indicator-color);
  --node-editor-tab-button-focus-outline-offset: 2px;

  /* Tab Button Disabled State */
  --node-editor-tab-button-disabled-opacity: 0.4;

  /* Connection styling - Apple theme */
  --node-editor-connection-base-stroke-width: 2;
  --node-editor-connection-active-stroke-width: 3.5;
  --node-editor-connection-flow-stripe-stroke-width: 1.5;
  --node-editor-connection-flow-stripe-active-stroke-width: 2.5;
  --node-editor-connection-direction-stroke-width: 2;
  --node-editor-connection-hover-shadow: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
  --node-editor-connection-selected-shadow: drop-shadow(0 4px 12px rgba(10, 132, 255, 0.4));
  --node-editor-connection-hover-opacity: 0.85;
  --node-editor-connection-dragging-opacity: 0.5;
  --node-editor-connection-stripe-dash-array: 10 14;
  --node-editor-connection-stripe-dash-offset-bg: -12;
  --node-editor-connection-stripe-opacity-accent: 0.95;
  --node-editor-connection-stripe-opacity-background: 0.65;
  --node-editor-connection-flow-animation-duration: 1.4s;
  --node-editor-connection-flow-animation-distance: -24;
  --node-editor-connection-base-transition:
    stroke 0.3s cubic-bezier(0.4, 0, 0.2, 1), stroke-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --node-editor-connection-arrow-transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Connection drag styling - Apple theme */
  --node-editor-connection-drag-stroke-width-connecting: 2.5;
  --node-editor-connection-drag-stroke-width-disconnecting: 3;
  --node-editor-connection-drag-dash-array-connecting: 6 6;
  --node-editor-connection-drag-dash-array-disconnecting: 8 4;
  --node-editor-connection-drag-animation-duration: 0.6s;
  --node-editor-connection-drag-animation-distance: -12;

  /* Inspector icon button - SF Symbols style */
  --node-editor-inspector-icon-button-size: 28px;
  --node-editor-inspector-icon-button-size-sm: 22px;
  --node-editor-inspector-icon-button-icon-size: 15px;
  --node-editor-inspector-icon-button-icon-size-sm: 13px;
  --node-editor-inspector-icon-button-background: transparent;
  --node-editor-inspector-icon-button-background-hover: rgba(0, 0, 0, 0.05);
  --node-editor-inspector-icon-button-background-active: rgba(10, 132, 255, 0.12);
  --node-editor-inspector-icon-button-color: #515154;
  --node-editor-inspector-icon-button-color-hover: #1d1d1f;
  --node-editor-inspector-icon-button-color-active: #0071e3;
  --node-editor-inspector-icon-button-color-disabled: rgba(81, 81, 84, 0.4);

  /* Inspector input label - Apple typography */
  --node-editor-inspector-input-label-color: #515154;
  --node-editor-inspector-input-label-font-size: 0.6875rem;
  --node-editor-inspector-input-label-font-weight: 400;
  --node-editor-inspector-input-label-width: auto;
  --node-editor-inspector-input-label-min-width: 48px;

  /* Inspector segment control - iOS style */
  --node-editor-inspector-segment-background: rgba(174, 174, 178, 0.18);
  --node-editor-inspector-segment-border-radius: 8px;
  --node-editor-inspector-segment-padding: 2px;
  --node-editor-inspector-segment-gap: 0;
  --node-editor-inspector-segment-button-background: transparent;
  --node-editor-inspector-segment-button-background-hover: rgba(0, 0, 0, 0.04);
  --node-editor-inspector-segment-button-background-active: #ffffff;
  --node-editor-inspector-segment-button-color: #515154;
  --node-editor-inspector-segment-button-color-hover: #1d1d1f;
  --node-editor-inspector-segment-button-color-active: #1d1d1f;
  --node-editor-inspector-segment-button-shadow-active: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}
