/*! VibeFox JS Editor v1.0.0 | (c) VibeFox | commercial subscription license */
/* theme tokens (S31): inherited, initial value = the light theme */
@property --vfjs-bg { syntax: "*"; inherits: true; initial-value: #ffffff; }
@property --vfjs-fg { syntax: "*"; inherits: true; initial-value: #1f2328; }
@property --vfjs-border { syntax: "*"; inherits: true; initial-value: #d7dbe0; }
@property --vfjs-accent { syntax: "*"; inherits: true; initial-value: #2563eb; }
@property --vfjs-accent-fg { syntax: "*"; inherits: true; initial-value: #ffffff; }
@property --vfjs-muted { syntax: "*"; inherits: true; initial-value: #6b7280; }
@property --vfjs-surface { syntax: "*"; inherits: true; initial-value: #f6f8fa; }
@property --vfjs-radius { syntax: "*"; inherits: true; initial-value: 6px; }
@property --vfjs-font { syntax: "*"; inherits: true; initial-value: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
@property --vfjs-shadow { syntax: "*"; inherits: true; initial-value: 0 4px 16px rgba(15, 23, 42, .12); }
@property --vfjs-palette-0 { syntax: "*"; inherits: true; initial-value: #3b82f6; }
@property --vfjs-palette-1 { syntax: "*"; inherits: true; initial-value: #10b981; }
@property --vfjs-palette-2 { syntax: "*"; inherits: true; initial-value: #f59e0b; }
@property --vfjs-palette-3 { syntax: "*"; inherits: true; initial-value: #ef4444; }
@property --vfjs-palette-4 { syntax: "*"; inherits: true; initial-value: #8b5cf6; }
@property --vfjs-palette-5 { syntax: "*"; inherits: true; initial-value: #06b6d4; }
@property --vfjs-palette-6 { syntax: "*"; inherits: true; initial-value: #ec4899; }
@property --vfjs-palette-7 { syntax: "*"; inherits: true; initial-value: #84cc16; }
@property --vfjs-palette-8 { syntax: "*"; inherits: true; initial-value: #6366f1; }
@property --vfjs-palette-9 { syntax: "*"; inherits: true; initial-value: #14b8a6; }
@layer vfjs {
  /* markers: the JS checks them to warn when this file is not linked */
  :root { --vfjs-css-core: 1; --vfjs-css-editor: 1; }

  /* core: theme variables + base */
  :root {
    --vfjs-density: 1;
    --vfjs-theme-density: 1;
    --vfjs-space-unit: calc(var(--vfjs-size-unit) * 4);
    --vfjs-size-unit: 1px;
    --vfjs-em: 1em;
    --vfjs-aspect-ratio: 2 / 1;
    --vfjs-font-size: 13px;
    --vfjs-font-mono: ui-monospace, Consolas, 'Cascadia Mono', monospace;
    --vfjs-font-serif: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, 'Times New Roman', serif;
    --vfjs-font-weight-normal: 400;
    --vfjs-font-weight-medium: 500;
    --vfjs-font-weight-semibold: 600;
    --vfjs-font-weight-bold: 700;
    --vfjs-line-height-none: 1;
    --vfjs-line-height-tight: 1.2;
    --vfjs-line-height-snug: 1.3;
    --vfjs-line-height: 1.5;
    --vfjs-line-height-relaxed: 1.6;
    --vfjs-letter-spacing-caps: .05em;
    --vfjs-font-size-h1: 1.9em;
    --vfjs-font-size-h2: 1.55em;
    --vfjs-font-size-h3: 1.28em;
    --vfjs-font-size-h4: 1.1em;
    --vfjs-font-size-code: .9em;
    --vfjs-border-width: 1px;
    --vfjs-border-width-thick: 2px;
    --vfjs-border-style: solid;
    --vfjs-stroke-width: 1px;
    --vfjs-disabled-opacity: .5;
    --vfjs-hover-brightness: 1.1;
    --vfjs-focus-ring-width: 2px;
    --vfjs-focus-ring-offset: 2px;
    --vfjs-focus-ring-style: solid;
    --vfjs-motion-duration: 150ms;
    --vfjs-motion-easing: ease;
    --vfjs-motion-reduced-duration: 0.01ms;
    --vfjs-shadow-xs: 0 1px 2px rgba(0, 0, 0, .25);
    --vfjs-shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --vfjs-shadow-lg: 0 12px 32px rgba(15, 23, 42, .2);
    --vfjs-shadow-edge-start: 2px 0 4px -2px rgba(0, 0, 0, .25);
    --vfjs-shadow-edge-end: -2px 0 4px -2px rgba(0, 0, 0, .25);
    --vfjs-shadow-edge-start-soft: 2px 0 4px -2px rgba(0, 0, 0, .2);
    --vfjs-shadow-edge-end-soft: -2px 0 4px -2px rgba(0, 0, 0, .2);
    --vfjs-z-base: 0;
    --vfjs-z-drag: 9999;
    --vfjs-z-dropdown: 10500;
    --vfjs-z-drawer: 10800;
    --vfjs-z-toast: 11000;
    --vfjs-z-tooltip: 11500;
    --vfjs-z-tour: 11600;
    --vfjs-z-modal: 11800;
    --vfjs-white: #ffffff;
    --vfjs-black: #000000;
    --vfjs-slate-250: #d6dce8;
    --vfjs-slate-400: #94a3b8;
    --vfjs-slate-500: #64748b;
    --vfjs-slate-850: #2a2e39;
    --vfjs-slate-900: #0f172a;
    --vfjs-blue-100: #dbeafe;
    --vfjs-blue-300: #93c5fd;
    --vfjs-blue-400: #60a5fa;
    --vfjs-blue-500: #3b82f6;
    --vfjs-blue-800: #1e40af;
    --vfjs-blue-850: #1e3a5f;
    --vfjs-indigo-400: #818cf8;
    --vfjs-indigo-500: #6366f1;
    --vfjs-violet-400: #a78bfa;
    --vfjs-violet-500: #8b5cf6;
    --vfjs-purple-500: #a855f7;
    --vfjs-pink-400: #f472b6;
    --vfjs-pink-500: #ec4899;
    --vfjs-red-400: #f87171;
    --vfjs-red-450: #ef5350;
    --vfjs-red-500: #ef4444;
    --vfjs-red-550: #e5484d;
    --vfjs-red-600: #dc2626;
    --vfjs-amber-400: #fbbf24;
    --vfjs-amber-450: #f5a524;
    --vfjs-amber-500: #f59e0b;
    --vfjs-amber-600: #d97706;
    --vfjs-lime-400: #a3e635;
    --vfjs-lime-500: #84cc16;
    --vfjs-green-500: #22c55e;
    --vfjs-green-600: #16a34a;
    --vfjs-green-650: #4d9e63;
    --vfjs-green-700: #15803d;
    --vfjs-emerald-400: #34d399;
    --vfjs-emerald-500: #10b981;
    --vfjs-teal-400: #2dd4bf;
    --vfjs-teal-450: #26a69a;
    --vfjs-teal-500: #14b8a6;
    --vfjs-cyan-400: #22d3ee;
    --vfjs-cyan-500: #06b6d4;
    --vfjs-brown-400: #b08968;
  }
  [data-vfjs-density="compact"] { --vfjs-density: .75; }
  [data-vfjs-density="normal"] { --vfjs-density: 1; }
  [data-vfjs-density="comfortable"] { --vfjs-density: 1.25; }
  .vfjs {
    --vfjs-space: var(--_vfjs-space, calc(var(--vfjs-space-unit) * var(--vfjs-density) * var(--vfjs-theme-density)));
    --vfjs-space-1: var(--_vfjs-space-1, var(--vfjs-space));
    --vfjs-space-2: var(--_vfjs-space-2, calc(var(--vfjs-space) * 2));
    --vfjs-space-3: var(--_vfjs-space-3, calc(var(--vfjs-space) * 3));
    --vfjs-space-4: var(--_vfjs-space-4, calc(var(--vfjs-space) * 4));
    --vfjs-space-5: var(--_vfjs-space-5, calc(var(--vfjs-space) * 5));
    --vfjs-space-6: var(--_vfjs-space-6, calc(var(--vfjs-space) * 6));
    --vfjs-space-8: var(--_vfjs-space-8, calc(var(--vfjs-space) * 8));
    --vfjs-control-height-xs: var(--_vfjs-control-height-xs, calc(var(--vfjs-size-unit) * 26 * var(--vfjs-density) * var(--vfjs-theme-density)));
    --vfjs-control-height-sm: var(--_vfjs-control-height-sm, calc(var(--vfjs-size-unit) * 28 * var(--vfjs-density) * var(--vfjs-theme-density)));
    --vfjs-control-height: var(--_vfjs-control-height, calc(var(--vfjs-size-unit) * 32 * var(--vfjs-density) * var(--vfjs-theme-density)));
    --vfjs-control-height-lg: var(--_vfjs-control-height-lg, calc(var(--vfjs-size-unit) * 40 * var(--vfjs-density) * var(--vfjs-theme-density)));
    --vfjs-icon-size: var(--_vfjs-icon-size, calc(var(--vfjs-size-unit) * 16));
    --vfjs-font-size-3xs: var(--_vfjs-font-size-3xs, calc(var(--vfjs-font-size) - 4px));
    --vfjs-font-size-2xs: var(--_vfjs-font-size-2xs, calc(var(--vfjs-font-size) - 3px));
    --vfjs-font-size-xs: var(--_vfjs-font-size-xs, calc(var(--vfjs-font-size) - 2px));
    --vfjs-font-size-sm: var(--_vfjs-font-size-sm, calc(var(--vfjs-font-size) - 1px));
    --vfjs-font-size-lg: var(--_vfjs-font-size-lg, calc(var(--vfjs-font-size) + 1px));
    --vfjs-font-size-xl: var(--_vfjs-font-size-xl, calc(var(--vfjs-font-size) + 2px));
    --vfjs-font-size-2xl: var(--_vfjs-font-size-2xl, calc(var(--vfjs-font-size) + 3px));
    --vfjs-font-size-3xl: var(--_vfjs-font-size-3xl, calc(var(--vfjs-font-size) + 5px));
    --vfjs-font-size-4xl: var(--_vfjs-font-size-4xl, calc(var(--vfjs-font-size) + 7px));
    --vfjs-font-size-5xl: var(--_vfjs-font-size-5xl, calc(var(--vfjs-font-size) + 11px));
    --vfjs-radius-xs: var(--_vfjs-radius-xs, calc(var(--vfjs-radius) / 3));
    --vfjs-radius-sm: var(--_vfjs-radius-sm, calc(var(--vfjs-radius) / 2));
    --vfjs-radius-md: var(--_vfjs-radius-md, calc(var(--vfjs-radius) * 2 / 3));
    --vfjs-radius-lg: var(--_vfjs-radius-lg, calc(var(--vfjs-radius) * 1.5));
    --vfjs-radius-xl: var(--_vfjs-radius-xl, calc(var(--vfjs-radius) * 5 / 3));
    --vfjs-radius-full: var(--_vfjs-radius-full, 50%);
    --vfjs-radius-pill: var(--_vfjs-radius-pill, 9999px);
    --vfjs-motion-duration-fast: var(--_vfjs-motion-duration-fast, calc(var(--vfjs-motion-duration) * .8));
    --vfjs-motion-duration-slow: var(--_vfjs-motion-duration-slow, calc(var(--vfjs-motion-duration) * 5 / 3));
    --vfjs-danger: var(--_vfjs-danger, var(--vfjs-red-600));
    --vfjs-danger-fg: var(--_vfjs-danger-fg, var(--vfjs-white));
    --vfjs-danger-soft: var(--_vfjs-danger-soft, color-mix(in srgb, var(--vfjs-danger) 12%, transparent));
    --vfjs-success: var(--_vfjs-success, var(--vfjs-green-700));
    --vfjs-success-fg: var(--_vfjs-success-fg, var(--vfjs-white));
    --vfjs-success-soft: var(--_vfjs-success-soft, color-mix(in srgb, var(--vfjs-success) 12%, transparent));
    --vfjs-warning: var(--_vfjs-warning, var(--vfjs-amber-600));
    --vfjs-warning-fg: var(--_vfjs-warning-fg, var(--vfjs-slate-900));
    --vfjs-warning-soft: var(--_vfjs-warning-soft, color-mix(in srgb, var(--vfjs-warning) 12%, transparent));
    --vfjs-info: var(--_vfjs-info, var(--vfjs-accent));
    --vfjs-info-fg: var(--_vfjs-info-fg, var(--vfjs-accent-fg));
    --vfjs-info-soft: var(--_vfjs-info-soft, color-mix(in srgb, var(--vfjs-info) 12%, transparent));
    --vfjs-critical: var(--_vfjs-critical, var(--vfjs-danger));
    --vfjs-critical-fg: var(--_vfjs-critical-fg, var(--vfjs-danger-fg));
    --vfjs-up: var(--_vfjs-up, var(--vfjs-teal-450));
    --vfjs-down: var(--_vfjs-down, var(--vfjs-red-450));
    --vfjs-hover-bg: var(--_vfjs-hover-bg, var(--vfjs-surface));
    --vfjs-hover-fg: var(--_vfjs-hover-fg, var(--vfjs-fg));
    --vfjs-active-bg: var(--_vfjs-active-bg, color-mix(in srgb, var(--vfjs-fg) 10%, transparent));
    --vfjs-selected-bg: var(--_vfjs-selected-bg, color-mix(in srgb, var(--vfjs-accent) 14%, transparent));
    --vfjs-selected-fg: var(--_vfjs-selected-fg, var(--vfjs-accent));
    --vfjs-selected-strong-bg: var(--_vfjs-selected-strong-bg, var(--vfjs-accent));
    --vfjs-selected-strong-fg: var(--_vfjs-selected-strong-fg, var(--vfjs-accent-fg));
    --vfjs-accent-soft: var(--_vfjs-accent-soft, color-mix(in srgb, var(--vfjs-accent) 12%, transparent));
    --vfjs-disabled-fg: var(--_vfjs-disabled-fg, var(--vfjs-muted));
    --vfjs-disabled-bg: var(--_vfjs-disabled-bg, var(--vfjs-surface));
    --vfjs-backdrop: var(--_vfjs-backdrop, color-mix(in srgb, var(--vfjs-black) 45%, transparent));
    --vfjs-code-attr: var(--_vfjs-code-attr, var(--vfjs-brown-400));
    --vfjs-code-string: var(--_vfjs-code-string, var(--vfjs-green-650));
  }
  [data-vfjs-theme="light"]:where(:not(.vfjs), [data-vfjs-theme-own], :not([data-vfjs-theme="light"] *):is([data-vfjs-theme] *)) {
    --vfjs-bg: #ffffff;
    --vfjs-fg: #1f2328;
    --vfjs-border: #d7dbe0;
    --vfjs-accent: #2563eb;
    --vfjs-accent-fg: #ffffff;
    --vfjs-muted: #6b7280;
    --vfjs-surface: #f6f8fa;
    --vfjs-radius: 6px;
    --vfjs-font: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --vfjs-shadow: 0 4px 16px rgba(15, 23, 42, .12);
    --vfjs-palette-0: #3b82f6;
    --vfjs-palette-1: #10b981;
    --vfjs-palette-2: #f59e0b;
    --vfjs-palette-3: #ef4444;
    --vfjs-palette-4: #8b5cf6;
    --vfjs-palette-5: #06b6d4;
    --vfjs-palette-6: #ec4899;
    --vfjs-palette-7: #84cc16;
    --vfjs-palette-8: #6366f1;
    --vfjs-palette-9: #14b8a6;
  }
  [data-vfjs-theme="dark"]:where(:not(.vfjs), [data-vfjs-theme-own], :not([data-vfjs-theme="dark"] *)) {
    --vfjs-bg: #16181d;
    --vfjs-fg: #e6e9ef;
    --vfjs-border: #30353d;
    --vfjs-accent: #4f8ff7;
    --vfjs-accent-fg: #0b1220;
    --vfjs-muted: #98a1b3;
    --vfjs-surface: #1e2128;
    --vfjs-radius: 6px;
    --vfjs-font: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --vfjs-shadow: 0 4px 16px rgba(0, 0, 0, .45);
    --vfjs-palette-0: #60a5fa;
    --vfjs-palette-1: #34d399;
    --vfjs-palette-2: #fbbf24;
    --vfjs-palette-3: #f87171;
    --vfjs-palette-4: #a78bfa;
    --vfjs-palette-5: #22d3ee;
    --vfjs-palette-6: #f472b6;
    --vfjs-palette-7: #a3e635;
    --vfjs-palette-8: #818cf8;
    --vfjs-palette-9: #2dd4bf;
  }
  [data-vfjs-theme="high-contrast"]:where(:not(.vfjs), [data-vfjs-theme-own], :not([data-vfjs-theme="high-contrast"] *)) {
    --vfjs-bg: #000000;
    --vfjs-fg: #ffffff;
    --vfjs-border: #ffffff;
    --vfjs-accent: #ffd400;
    --vfjs-accent-fg: #000000;
    --vfjs-muted: #d9d9d9;
    --vfjs-surface: #0d0d0d;
    --vfjs-radius: 6px;
    --vfjs-font: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --vfjs-shadow: none;
    --vfjs-focus-ring-color: #00e5ff;
    --vfjs-palette-0: #3b82f6;
    --vfjs-palette-1: #10b981;
    --vfjs-palette-2: #f59e0b;
    --vfjs-palette-3: #ef4444;
    --vfjs-palette-4: #8b5cf6;
    --vfjs-palette-5: #06b6d4;
    --vfjs-palette-6: #ec4899;
    --vfjs-palette-7: #84cc16;
    --vfjs-palette-8: #6366f1;
    --vfjs-palette-9: #14b8a6;
  }
  .vfjs[data-vfjs-theme="high-contrast"] {
    --vfjs-focus-ring-width: 3px;
  }

  .vfjs {
    font-family: var(--vfjs-font);
    color: var(--vfjs-fg);
    box-sizing: border-box;
    *, *::before, *::after { box-sizing: inherit; }
    ::selection { background: var(--vfjs-accent); color: var(--vfjs-accent-fg); }
  }
  .vfjs-scroll {
    &::-webkit-scrollbar { width: calc(var(--vfjs-size-unit) * 10); height: calc(var(--vfjs-size-unit) * 10); }
    &::-webkit-scrollbar-thumb { background: var(--vfjs-border); border-radius: var(--vfjs-radius); }
    &::-webkit-scrollbar-track { background: transparent; }
  }
  /* S8: host element of a Web Component (vibefox-js-<pkg>-wc.js); the component is mounted inside it */
  [data-vfjs-wc] { display: block;
    &[hidden] { display: none; }
  }
  [data-vfjs-wc='inline'] { display: inline-block; vertical-align: middle; }


  .vfjs :focus-visible {
    outline: var(--vfjs-focus-ring-width) var(--vfjs-focus-ring-style) var(--vfjs-focus-ring-color, var(--vfjs-accent));
    outline-offset: var(--vfjs-focus-ring-offset);
  }
  .vfjs-sr-only {
    position: absolute;
    width: var(--vfjs-size-unit);
    height: var(--vfjs-size-unit);
    margin: calc(var(--vfjs-size-unit) * -1);
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  @media (prefers-reduced-motion: reduce) {
    :root { --vfjs-motion-duration: 0ms; }
    .vfjs.vfjs.vfjs, .vfjs.vfjs.vfjs *, .vfjs.vfjs.vfjs *::before, .vfjs.vfjs.vfjs *::after {
      animation-duration: var(--vfjs-motion-reduced-duration);
      animation-iteration-count: 1;
      transition-duration: var(--vfjs-motion-reduced-duration);
      scroll-behavior: auto;
    }
  }
  @media (forced-colors: active) {
    .vfjs.vfjs.vfjs.vfjs {
      --vfjs-bg: Canvas;
      --vfjs-fg: CanvasText;
      --vfjs-surface: Canvas;
      --vfjs-border: CanvasText;
      --vfjs-muted: GrayText;
      --vfjs-accent: Highlight;
      --vfjs-accent-fg: HighlightText;
      --vfjs-shadow: none;
      --vfjs-focus-ring-color: Highlight;
    }
  }

  /* editor */
  /* S17 / E21 part variables: change one place (on .vfjs, the component root, a style class or a theme); defaults = global tokens */
  .vfjs {
    /* frame */
    --_vfjs-editor-bg: var(--vfjs-editor-bg, var(--vfjs-bg));
    --_vfjs-editor-fg: var(--vfjs-editor-fg, var(--vfjs-fg));
    --_vfjs-editor-font: var(--vfjs-editor-font, var(--vfjs-font));
    --_vfjs-editor-radius: var(--vfjs-editor-radius, var(--vfjs-radius));
    /* toolbar */
    --_vfjs-editor-toolbar-bg: var(--vfjs-editor-toolbar-bg, var(--vfjs-surface));
    --_vfjs-editor-toolbar-frame: var(--vfjs-editor-toolbar-frame, none);
    --_vfjs-editor-toolbar-sticky-top: var(--vfjs-editor-toolbar-sticky-top, 0);
    /* toolbar buttons */
    --_vfjs-editor-btn-height: var(--vfjs-editor-btn-height, var(--vfjs-control-height-sm));
    --_vfjs-editor-btn-fg: var(--vfjs-editor-btn-fg, var(--vfjs-editor-toolbar-fg, var(--_vfjs-editor-fg)));
    --_vfjs-editor-btn-active-bg: var(--vfjs-editor-btn-active-bg, var(--vfjs-selected-strong-bg));
    --_vfjs-editor-btn-active-fg: var(--vfjs-editor-btn-active-fg, var(--vfjs-selected-strong-fg));
    /* text area */
    /* E11: previewPDF() without @vibefox/js-pdf (the browser's PDF viewer in a frame) */
    --_vfjs-editor-content-margin: var(--vfjs-editor-content-margin, 0);
    /* quotes */
    /* tables */
    /* code blocks and inline code */
    /* E6: syntax colors of code blocks — theme palette mixed with the text color (readable on light and dark) */
    --_vfjs-editor-code-comment: var(--vfjs-editor-code-comment, var(--vfjs-muted));
    --_vfjs-editor-code-keyword: var(--vfjs-editor-code-keyword, color-mix(in srgb, var(--vfjs-palette-4) 85%, var(--vfjs-fg)));
    --_vfjs-editor-code-string: var(--vfjs-editor-code-string, color-mix(in srgb, var(--vfjs-palette-1) 55%, var(--vfjs-fg)));
    --_vfjs-editor-code-number: var(--vfjs-editor-code-number, color-mix(in srgb, var(--vfjs-palette-2) 50%, var(--vfjs-fg)));
    --_vfjs-editor-code-literal: var(--vfjs-editor-code-literal, color-mix(in srgb, var(--vfjs-palette-3) 75%, var(--vfjs-fg)));
    --_vfjs-editor-code-function: var(--vfjs-editor-code-function, color-mix(in srgb, var(--vfjs-palette-0) 75%, var(--vfjs-fg)));
    --_vfjs-editor-code-type: var(--vfjs-editor-code-type, color-mix(in srgb, var(--vfjs-palette-5) 55%, var(--vfjs-fg)));
    --_vfjs-editor-code-property: var(--vfjs-editor-code-property, color-mix(in srgb, var(--vfjs-palette-8) 85%, var(--vfjs-fg)));
    --_vfjs-editor-code-tag: var(--vfjs-editor-code-tag, color-mix(in srgb, var(--vfjs-palette-3) 75%, var(--vfjs-fg)));
    --_vfjs-editor-code-attr: var(--vfjs-editor-code-attr, color-mix(in srgb, var(--vfjs-palette-2) 50%, var(--vfjs-fg)));
    --_vfjs-editor-code-variable: var(--vfjs-editor-code-variable, color-mix(in srgb, var(--vfjs-palette-6) 70%, var(--vfjs-fg)));
    --_vfjs-editor-code-regex: var(--vfjs-editor-code-regex, color-mix(in srgb, var(--vfjs-palette-6) 70%, var(--vfjs-fg)));
    --_vfjs-editor-code-meta: var(--vfjs-editor-code-meta, color-mix(in srgb, var(--vfjs-palette-9) 55%, var(--vfjs-fg)));
    --_vfjs-editor-code-punctuation: var(--vfjs-editor-code-punctuation, var(--vfjs-muted));
    --_vfjs-editor-code-heading: var(--vfjs-editor-code-heading, var(--_vfjs-editor-code-function));
    --_vfjs-editor-code-emphasis: var(--vfjs-editor-code-emphasis, var(--_vfjs-editor-code-keyword));
    --_vfjs-editor-code-link: var(--vfjs-editor-code-link, var(--_vfjs-editor-code-function));
    /* E6: language chip of the code block with the caret */
    /* source view (HTML) */
    /* status bar */
    /* popovers, menus, outline panel */
    --_vfjs-editor-menu-hover-bg: var(--vfjs-editor-menu-hover-bg, var(--vfjs-surface));
    --_vfjs-editor-menu-active-bg: var(--vfjs-editor-menu-active-bg, var(--vfjs-accent));
    --_vfjs-editor-menu-active-fg: var(--vfjs-editor-menu-active-fg, var(--vfjs-accent-fg));
    /* ==== E8: track changes ==== */
    /* author colors: slot 0…7 = data-vfjs-tc="0…7" = --vfjs-editor-track-a…h (stable per author id, option trackChanges.colors);
       own CSS per author: .vfjs-editor [data-vfjs-author="alice"] { --vfjs-editor-track-color: … } */
    & {
      --_vfjs-editor-track-a: var(--vfjs-editor-track-a, var(--vfjs-palette-0));
      --_vfjs-editor-track-b: var(--vfjs-editor-track-b, var(--vfjs-palette-1));
      --_vfjs-editor-track-c: var(--vfjs-editor-track-c, var(--vfjs-palette-2));
      --_vfjs-editor-track-d: var(--vfjs-editor-track-d, var(--vfjs-palette-3));
      --_vfjs-editor-track-e: var(--vfjs-editor-track-e, var(--vfjs-palette-4));
      --_vfjs-editor-track-f: var(--vfjs-editor-track-f, var(--vfjs-palette-5));
      --_vfjs-editor-track-g: var(--vfjs-editor-track-g, var(--vfjs-palette-6));
      --_vfjs-editor-track-h: var(--vfjs-editor-track-h, var(--vfjs-palette-7));
      --_vfjs-editor-track-color: var(--_vfjs-editor-track-a);
      --_vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-a);
      --_vfjs-editor-track-ins-fg: var(--vfjs-editor-track-ins-fg, color-mix(in srgb, var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)) 62%, var(--_vfjs-editor-fg)));
      --_vfjs-editor-track-ins-bg: var(--vfjs-editor-track-ins-bg, color-mix(in srgb, var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)) 13%, transparent));
      --_vfjs-editor-track-ins-decoration: var(--vfjs-editor-track-ins-decoration, underline);
      --_vfjs-editor-track-del-fg: var(--vfjs-editor-track-del-fg, color-mix(in srgb, var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)) 55%, var(--vfjs-muted)));
      --_vfjs-editor-track-del-bg: var(--vfjs-editor-track-del-bg, color-mix(in srgb, var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)) 7%, transparent));
      --_vfjs-editor-track-del-decoration: var(--vfjs-editor-track-del-decoration, line-through);
      --_vfjs-editor-track-del-opacity: var(--vfjs-editor-track-del-opacity, .75);
      --_vfjs-editor-track-format-decoration: var(--vfjs-editor-track-format-decoration, underline dotted);
      --_vfjs-editor-track-decoration-thickness: var(--vfjs-editor-track-decoration-thickness, var(--vfjs-border-width));
      --_vfjs-editor-track-bar: var(--vfjs-editor-track-bar, var(--vfjs-border-width-thick));
      --_vfjs-editor-track-bar-style: var(--vfjs-editor-track-bar-style, solid);
      --_vfjs-editor-track-join-style: var(--vfjs-editor-track-join-style, dashed);
      --_vfjs-editor-track-fmt-style: var(--vfjs-editor-track-fmt-style, dotted);
      --_vfjs-editor-track-block-outline: var(--vfjs-editor-track-block-outline, var(--vfjs-border-width-thick) dashed var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)));
      --_vfjs-editor-track-panel-width: var(--vfjs-editor-track-panel-width, calc(var(--vfjs-size-unit) * 280));
      --_vfjs-editor-track-panel-bg: var(--vfjs-editor-track-panel-bg, var(--vfjs-editor-outline-bg, var(--vfjs-surface)));
      --_vfjs-editor-track-panel-border: var(--vfjs-editor-track-panel-border, var(--vfjs-border-width) solid var(--vfjs-border));
      --_vfjs-editor-track-item-radius: var(--vfjs-editor-track-item-radius, var(--vfjs-radius-md));
      --_vfjs-editor-track-item-hover-bg: var(--vfjs-editor-track-item-hover-bg, var(--_vfjs-editor-menu-hover-bg));
      --_vfjs-editor-track-item-active-bg: var(--vfjs-editor-track-item-active-bg, var(--vfjs-selected-bg));
      --_vfjs-editor-track-count-bg: var(--vfjs-editor-track-count-bg, var(--_vfjs-editor-menu-active-bg));
      --_vfjs-editor-track-count-fg: var(--vfjs-editor-track-count-fg, var(--_vfjs-editor-menu-active-fg));
      --_vfjs-editor-track-dot: var(--vfjs-editor-track-dot, calc(var(--vfjs-size-unit) * 9));
      --_vfjs-editor-track-meta-fg: var(--vfjs-editor-track-meta-fg, var(--vfjs-muted));
      --_vfjs-editor-track-font-size: var(--vfjs-editor-track-font-size, var(--vfjs-font-size-sm));
    }
    /* ==== E9: comments ==== */
    /* author colors: slot 0…7 = data-vfjs-comment-tc="0…7" = --vfjs-editor-comment-a…h (default: the E8 author colors) */
    & {
      --_vfjs-editor-comment-a: var(--vfjs-editor-comment-a, var(--_vfjs-editor-track-a));
      --_vfjs-editor-comment-b: var(--vfjs-editor-comment-b, var(--_vfjs-editor-track-b));
      --_vfjs-editor-comment-c: var(--vfjs-editor-comment-c, var(--_vfjs-editor-track-c));
      --_vfjs-editor-comment-d: var(--vfjs-editor-comment-d, var(--_vfjs-editor-track-d));
      --_vfjs-editor-comment-e: var(--vfjs-editor-comment-e, var(--_vfjs-editor-track-e));
      --_vfjs-editor-comment-f: var(--vfjs-editor-comment-f, var(--_vfjs-editor-track-f));
      --_vfjs-editor-comment-g: var(--vfjs-editor-comment-g, var(--_vfjs-editor-track-g));
      --_vfjs-editor-comment-h: var(--vfjs-editor-comment-h, var(--_vfjs-editor-track-h));
      --_vfjs-editor-comment-bg: var(--vfjs-editor-comment-bg, color-mix(in srgb, var(--vfjs-editor-comment-color, var(--_vfjs-editor-comment-a)) 16%, transparent));
      --_vfjs-editor-comment-border: var(--vfjs-editor-comment-border, var(--vfjs-editor-comment-color, var(--_vfjs-editor-comment-a)));
      --_vfjs-editor-comment-panel-border: var(--vfjs-editor-comment-panel-border, var(--_vfjs-editor-track-panel-border));
      --_vfjs-editor-comment-item-border: var(--vfjs-editor-comment-item-border, var(--vfjs-border-width) solid var(--vfjs-border));
    }

    /* ---- E15: inline / balloon modes, shared toolbar, keyboard focus ---- */
    & {
      --_vfjs-editor-ui-gap: var(--vfjs-space-2);
      --_vfjs-editor-ui-z: var(--vfjs-editor-ui-z, calc(var(--vfjs-z-base) + 30));
    }

    /* ---- E17: accessibility panel ---- */
    & {
      --_vfjs-editor-access-item-border: var(--vfjs-editor-access-item-border, var(--vfjs-border-width) solid var(--vfjs-border));
    }

    /* E19: AI assistant — the answer preview in the text, its bar, the AI panel (variables: one place to change) */
    & {
      --_vfjs-editor-ai-accent: var(--vfjs-editor-ai-accent, var(--vfjs-accent));
      --_vfjs-editor-ai-target: var(--vfjs-editor-ai-target, color-mix(in srgb, var(--_vfjs-editor-ai-accent) 16%, transparent));
    }

    /* E20: page view — the desk, sheets behind the text, covers / headers / footers above it */
    & {
      --_vfjs-editor-pages-bg: var(--vfjs-editor-pages-bg, color-mix(in srgb, var(--vfjs-fg) 7%, var(--vfjs-bg)));
      --_vfjs-editor-page-gap: var(--vfjs-editor-page-gap, calc(var(--vfjs-size-unit) * 24));
    }
    /* ==== E18: real-time collaboration — cursors / selections of the others, the list of participants ==== */
    /* one color per participant: --vfjs-editor-peer-color (its user's color, else an author color --vfjs-editor-track-a…h) */
    & {
      --_vfjs-editor-peer-color: var(--_vfjs-editor-track-a);
      --_vfjs-editor-peer-typing-outline: var(--vfjs-editor-peer-typing-outline, var(--vfjs-border-width-thick) solid var(--vfjs-editor-peer-color, var(--_vfjs-editor-peer-color)));
    }
  }

  /* E21: ready-made styles (variables only). Class on the mount element (option style) or on any ancestor. */
  .vfjs-editor-style-minimal.vfjs, .vfjs-editor-style-minimal .vfjs {
    --vfjs-editor-border: none;
    --vfjs-editor-radius: 0;
    --vfjs-editor-bg: transparent;
    --vfjs-editor-toolbar-bg: transparent;
    --vfjs-editor-toolbar-padding: var(--vfjs-space) 0;
    --vfjs-editor-group-padding: 0 var(--vfjs-space);
    --vfjs-editor-group-separator: none;
    --vfjs-editor-btn-fg: var(--vfjs-muted);
    --vfjs-editor-btn-hover-bg: var(--vfjs-hover-bg);
    --vfjs-editor-btn-hover-fg: var(--vfjs-fg);
    --vfjs-editor-btn-hover-border: transparent;
    --vfjs-editor-btn-active-bg: var(--vfjs-selected-bg);
    --vfjs-editor-btn-active-fg: var(--vfjs-selected-fg);
    --vfjs-editor-btn-active-border: transparent;
    --vfjs-editor-content-padding: calc(var(--vfjs-space) * 3) 0;
    --vfjs-editor-quote-bg: transparent;
    --vfjs-editor-statusbar-bg: transparent;
    --vfjs-editor-statusbar-border: none;
    --vfjs-editor-statusbar-padding: var(--vfjs-space) 0;
  }
  .vfjs-editor-style-floating.vfjs, .vfjs-editor-style-floating .vfjs {
    --vfjs-editor-border: none;
    --vfjs-editor-bg: transparent;
    --vfjs-editor-toolbar-bg: var(--vfjs-bg);
    --vfjs-editor-toolbar-frame: var(--vfjs-border-width) solid var(--vfjs-border);
    --vfjs-editor-toolbar-radius: var(--vfjs-radius-lg);
    --vfjs-editor-toolbar-shadow: var(--vfjs-shadow);
    --vfjs-editor-toolbar-margin: 0 0 var(--vfjs-space-3);
    --vfjs-editor-toolbar-sticky-top: var(--vfjs-space-2);
    --vfjs-editor-toolbar-padding: var(--vfjs-space);
    --vfjs-editor-group-separator: none;
    --vfjs-editor-btn-radius: var(--vfjs-radius);
    --vfjs-editor-btn-hover-bg: var(--vfjs-hover-bg);
    --vfjs-editor-btn-hover-border: transparent;
    --vfjs-editor-content-bg: var(--vfjs-bg);
    --vfjs-editor-content-border: var(--vfjs-border-width) solid var(--vfjs-border);
    --vfjs-editor-content-radius: var(--vfjs-radius-lg);
    --vfjs-editor-statusbar-bg: transparent;
    --vfjs-editor-statusbar-border: none;
  }

  .vfjs-editor {
    position: relative;
    display: flex;
    flex-direction: column;
    border: var(--vfjs-editor-border, var(--vfjs-border-width) solid var(--vfjs-border));
    border-radius: var(--_vfjs-editor-radius);
    background: var(--_vfjs-editor-bg);
    color: var(--_vfjs-editor-fg);
    font-family: var(--_vfjs-editor-font);
    box-shadow: var(--vfjs-editor-shadow, none);
    overflow: visible;
    &.vfjs-editor-is-fullscreen {
      position: fixed;
      inset: 0;
      z-index: var(--vfjs-z-drag);
      border-radius: 0;
      .vfjs-editor-toolbar { border-radius: 0; }
    }
    &.vfjs-editor-style-floating.vfjs-editor-is-fullscreen, &.vfjs-editor-style-minimal.vfjs-editor-is-fullscreen { background: var(--vfjs-bg); }
    &.vfjs-editor-is-readonly .vfjs-editor-toolbar { opacity: .5; pointer-events: none; }

    /* ---- focus mode 🌟 ---- */
    &.vfjs-editor-is-focusmode {
      .vfjs-editor-content {
        > * { opacity: .3; transition: opacity var(--vfjs-motion-duration-slow); }
        > .vfjs-editor-current { opacity: 1; }
      }
    }
    &.vfjs-editor-is-dragover .vfjs-editor-content {
      outline: var(--vfjs-border-width-thick) dashed var(--vfjs-editor-dropzone, var(--vfjs-accent));
      outline-offset: calc(var(--vfjs-size-unit) * -4);
      background: var(--vfjs-editor-dropzone-bg, var(--vfjs-accent-soft));
    }
  }

  /* ---- toolbar ---- */
  .vfjs-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vfjs-editor-toolbar-gap, calc(var(--vfjs-space) * 0.5));
    margin: var(--vfjs-editor-toolbar-margin, 0);
    padding: var(--vfjs-editor-toolbar-padding, calc(var(--vfjs-space) * 1.5));
    border: var(--_vfjs-editor-toolbar-frame);
    border-bottom: var(--vfjs-editor-toolbar-border, var(--vfjs-border-width) solid var(--vfjs-border));
    background: var(--_vfjs-editor-toolbar-bg);
    color: var(--vfjs-editor-toolbar-fg, var(--_vfjs-editor-fg));
    border-radius: var(--vfjs-editor-toolbar-radius, var(--_vfjs-editor-radius) var(--_vfjs-editor-radius) 0 0);
    box-shadow: var(--vfjs-editor-toolbar-shadow, none);
    &.vfjs-editor-is-sticky { position: sticky; top: var(--_vfjs-editor-toolbar-sticky-top); z-index: calc(var(--vfjs-z-base) + 20); }

    /* E22: toolbar items hidden by the direction (ltr / rtl of a preset in left-to-right editors) */
    .vfjs-editor-btn[hidden] { display: none; }
  }
  .vfjs-editor-group {
    display: flex;
    align-items: center;
    gap: var(--vfjs-editor-group-gap, calc(var(--vfjs-space) * 0.5));
    padding: var(--vfjs-editor-group-padding, 0 calc(var(--vfjs-space) * 1.25));
    border-inline-end: var(--vfjs-editor-group-separator, var(--vfjs-border-width) solid var(--vfjs-border));
    &:last-child { border-inline-end: 0; }
  }
  .vfjs-editor-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--vfjs-space) * 1.25);
    min-width: var(--vfjs-editor-btn-min-width, calc(var(--vfjs-size-unit) * 28));
    height: var(--_vfjs-editor-btn-height);
    padding: var(--vfjs-editor-btn-padding, 0 calc(var(--vfjs-space) * 1.25));
    border: var(--vfjs-border-width) solid var(--vfjs-editor-btn-border, transparent);
    border-radius: var(--vfjs-editor-btn-radius, var(--vfjs-radius-md));
    background: var(--vfjs-editor-btn-bg, transparent);
    color: var(--_vfjs-editor-btn-fg);
    font: inherit;
    font-size: var(--vfjs-editor-btn-font-size, var(--vfjs-font-size));
    line-height: var(--vfjs-line-height-none);
    cursor: pointer;
    &:hover { background: var(--vfjs-editor-btn-hover-bg, var(--vfjs-bg)); border-color: var(--vfjs-editor-btn-hover-border, var(--vfjs-border)); color: var(--vfjs-editor-btn-hover-fg, var(--_vfjs-editor-btn-fg)); }
    &.vfjs-editor-is-active { background: var(--_vfjs-editor-btn-active-bg); border-color: var(--vfjs-editor-btn-active-border, var(--_vfjs-editor-btn-active-bg)); color: var(--_vfjs-editor-btn-active-fg); }
    &:disabled { opacity: var(--vfjs-editor-btn-disabled-opacity, .35); cursor: default; background: transparent; border-color: transparent; }
    svg { display: block; }
  }
  .vfjs-editor-select { min-width: calc(var(--vfjs-size-unit) * 96); justify-content: space-between; padding: 0 var(--vfjs-space-2);
    &::after {
      content: '';
      width: calc(var(--vfjs-size-unit) * 7); height: calc(var(--vfjs-size-unit) * 7);
      border-right: calc(var(--vfjs-border-width) * 1.5) solid currentColor; /* physical: a chevron (two borders, rotated) */
      border-bottom: calc(var(--vfjs-border-width) * 1.5) solid currentColor;
      transform: rotate(45deg) translateY(calc(var(--vfjs-size-unit) * -2));
      flex: none;
    }
  }

  /* ---- body / content ---- */
  .vfjs-editor-body { display: flex; flex: 1; min-height: 0; position: relative; }
  .vfjs-editor-content {
    flex: 1;
    min-width: 0;
    max-width: var(--vfjs-editor-content-max-width, none);
    margin: var(--_vfjs-editor-content-margin);
    margin-inline: auto;
    padding: var(--vfjs-editor-content-padding, calc(var(--vfjs-space) * 3.5) calc(var(--vfjs-space) * 4.5));
    border: var(--vfjs-editor-content-border, none);
    border-radius: var(--vfjs-editor-content-radius, 0);
    outline: none;
    overflow-y: auto;
    background: var(--vfjs-editor-content-bg, transparent);
    color: var(--vfjs-editor-content-fg, var(--_vfjs-editor-fg));
    font-family: var(--vfjs-editor-content-font, var(--_vfjs-editor-font));
    line-height: var(--vfjs-editor-line-height, var(--vfjs-line-height-relaxed));
    font-size: var(--vfjs-editor-font-size, var(--vfjs-font-size-xl));
    caret-color: var(--vfjs-editor-caret, var(--vfjs-accent));
    word-wrap: break-word;
    ::selection, &::selection { background: var(--vfjs-editor-selection-bg, var(--vfjs-accent)); color: var(--vfjs-editor-selection-fg, var(--vfjs-accent-fg)); }
    &.vfjs-editor-is-empty::before {
      content: attr(data-placeholder);
      display: block;
      height: 0;
      color: var(--vfjs-editor-placeholder, var(--vfjs-muted));
      pointer-events: none;
    }
    > :first-child { margin-top: 0; }
    p { margin: var(--vfjs-editor-paragraph-space, calc(var(--vfjs-em) * 0.45)) 0; }
    :is(h1, h2, h3, h4) { color: var(--vfjs-editor-heading-fg, currentColor); font-family: var(--vfjs-editor-heading-font, var(--vfjs-editor-content-font, var(--_vfjs-editor-font))); font-weight: var(--vfjs-editor-heading-weight, var(--vfjs-font-weight-bold)); }
    h1 { font-size: var(--vfjs-font-size-h1); margin: calc(var(--vfjs-em) * 0.7) 0 calc(var(--vfjs-em) * 0.35); line-height: calc(var(--vfjs-line-height-tight) + .05); }
    h2 { font-size: var(--vfjs-font-size-h2); margin: calc(var(--vfjs-em) * 0.7) 0 calc(var(--vfjs-em) * 0.35); line-height: calc(var(--vfjs-line-height-tight) + .05); }
    h3 { font-size: var(--vfjs-font-size-h3); margin: calc(var(--vfjs-em) * 0.6) 0 calc(var(--vfjs-em) * 0.3); }
    h4 { font-size: var(--vfjs-font-size-h4); margin: calc(var(--vfjs-em) * 0.6) 0 calc(var(--vfjs-em) * 0.3); }
    blockquote {
      margin: calc(var(--vfjs-em) * 0.6) 0;
      padding: var(--vfjs-editor-quote-padding, calc(var(--vfjs-em) * 0.35) var(--vfjs-em));
      border-inline-start: var(--vfjs-editor-quote-border, calc(var(--vfjs-border-width) * 3) solid var(--vfjs-accent));
      border-start-end-radius: var(--vfjs-editor-quote-radius, var(--vfjs-radius-md));
      border-end-end-radius: var(--vfjs-editor-quote-radius, var(--vfjs-radius-md));
      background: var(--vfjs-editor-quote-bg, var(--vfjs-surface));
      color: var(--vfjs-editor-quote-fg, var(--vfjs-muted));
      font-style: var(--vfjs-editor-quote-font-style, normal);
    }
    pre {
      margin: calc(var(--vfjs-em) * 0.6) 0;
      padding: var(--vfjs-editor-code-padding, calc(var(--vfjs-space) * 2.5) calc(var(--vfjs-space) * 3.5));
      background: var(--vfjs-editor-code-bg, var(--vfjs-surface));
      color: var(--vfjs-editor-code-fg, var(--vfjs-editor-content-fg, var(--_vfjs-editor-fg)));
      border: var(--vfjs-editor-code-border, var(--vfjs-border-width) solid var(--vfjs-border));
      border-radius: var(--vfjs-editor-code-radius, var(--vfjs-radius));
      font-family: var(--vfjs-editor-code-font, var(--vfjs-font-mono));
      font-size: var(--vfjs-editor-code-font-size, var(--vfjs-font-size));
      line-height: var(--vfjs-editor-code-line-height, var(--vfjs-line-height));
      tab-size: var(--vfjs-editor-code-tab-size, 4);
      white-space: var(--vfjs-editor-code-white-space, pre-wrap);
      overflow-x: auto;
      code { font: inherit; }
    }
    :not(pre) > code {
      padding: var(--vfjs-editor-inline-code-padding, calc(var(--vfjs-em) * 0.08) calc(var(--vfjs-em) * 0.35));
      background: var(--vfjs-editor-inline-code-bg, var(--vfjs-editor-code-bg, var(--vfjs-surface)));
      color: var(--vfjs-editor-inline-code-fg, currentColor);
      border: var(--vfjs-editor-inline-code-border, var(--vfjs-editor-code-border, var(--vfjs-border-width) solid var(--vfjs-border)));
      border-radius: var(--vfjs-editor-inline-code-radius, var(--vfjs-radius-md));
      font-family: var(--vfjs-editor-code-font, var(--vfjs-font-mono));
      font-size: var(--vfjs-editor-inline-code-font-size, var(--vfjs-font-size-code));
    }
    a { color: var(--vfjs-editor-link, var(--vfjs-accent)); text-decoration: var(--vfjs-editor-link-decoration, underline); }
    hr {
      border: 0;
      border-top: var(--vfjs-editor-hr, var(--vfjs-border-width-thick) solid var(--vfjs-border));
      margin: var(--vfjs-space-4) 0;
    }
    img { max-width: 100%; height: auto; border-radius: var(--vfjs-radius-md);
      &.vfjs-editor-img-selected { outline: var(--vfjs-border-width-thick) solid var(--vfjs-accent); outline-offset: var(--vfjs-size-unit); }
      &.vfjs-editor-align-left { float: left; /* physical: "wrap left / right" is a side of the page, as in other editors */ margin: var(--vfjs-space-1) var(--vfjs-space-4) var(--vfjs-space-2) 0; /* physical: "wrap left / right" is a side of the page, as in other editors */ }
      &.vfjs-editor-align-right { float: right; /* physical: "wrap left / right" is a side of the page, as in other editors */ margin: var(--vfjs-space-1) 0 var(--vfjs-space-2) var(--vfjs-space-4); /* physical: "wrap left / right" is a side of the page, as in other editors */ }
      &.vfjs-editor-align-center { display: block; float: none; margin: calc(var(--vfjs-space) * 2.5) auto; }
    }
    ul, ol { margin: calc(var(--vfjs-em) * 0.45) 0; padding-inline-start: calc(var(--vfjs-em) * 1.6); }

    /* checklist */
    ul.vfjs-editor-checklist { list-style: none; padding-inline-start: calc(var(--vfjs-em) * 0.2); }

    /* tables */
    table {
      &.vfjs-editor-table {
        border-collapse: collapse;
        width: 100%;
        margin: calc(var(--vfjs-em) * 0.7) 0;
        td, th {
          border: var(--vfjs-editor-table-border, var(--vfjs-border-width) solid var(--vfjs-border));
          padding: var(--vfjs-editor-table-cell-padding, calc(var(--vfjs-space) * 1.5) calc(var(--vfjs-space) * 2.5));
          min-width: var(--vfjs-editor-table-cell-min-width, calc(var(--vfjs-em) * 2.5));
          vertical-align: top;
        }
        th {
          background: var(--vfjs-editor-table-header-bg, var(--vfjs-surface));
          color: var(--vfjs-editor-table-header-fg, currentColor);
          font-weight: var(--vfjs-editor-table-header-weight, var(--vfjs-font-weight-bold));
          text-align: start;
        }
        tr:nth-child(even) > td { background-color: var(--vfjs-editor-table-stripe-bg, transparent); }
      }
    }
  }
  .vfjs-editor-checklist {
    li { position: relative; padding-inline-start: calc(var(--vfjs-space) * 6.5); margin: calc(var(--vfjs-em) * 0.2) 0;
      &[data-checked="true"] { color: var(--vfjs-muted); text-decoration: line-through;
        > .vfjs-editor-checkbox {
          background: var(--vfjs-accent);
          border-color: var(--vfjs-accent);
          &::after {
            content: '';
            position: absolute;
            left: calc(var(--vfjs-size-unit) * 4); /* physical: the check mark inside the box (rotated, not mirrored) */ top: var(--vfjs-size-unit);
            width: calc(var(--vfjs-size-unit) * 5); height: calc(var(--vfjs-size-unit) * 9);
            border-right: var(--vfjs-border-width-thick) solid var(--vfjs-accent-fg); /* physical: a check mark (two borders, rotated) */
            border-bottom: var(--vfjs-border-width-thick) solid var(--vfjs-accent-fg);
            transform: rotate(45deg);
          }
        }
      }
    }
  }
  .vfjs-editor-checkbox {
    position: absolute;
    inset-inline-start: 0;
    top: calc(var(--vfjs-em) * 0.28);
    width: calc(var(--vfjs-size-unit) * 16);
    height: calc(var(--vfjs-size-unit) * 16);
    border: calc(var(--vfjs-border-width) * 1.5) solid var(--vfjs-muted);
    border-radius: var(--vfjs-radius-md);
    background: var(--vfjs-bg);
    cursor: pointer;
    user-select: none;
  }

  /* mentions */
  .vfjs-editor-mention {
    display: inline-block;
    padding: calc(var(--vfjs-em) * 0.04) calc(var(--vfjs-em) * 0.35);
    border-radius: var(--vfjs-radius-md);
    background: var(--vfjs-surface);
    border: var(--vfjs-border-width) solid var(--vfjs-border);
    color: var(--vfjs-accent);
    font-weight: var(--vfjs-font-weight-medium);
    white-space: nowrap;
  }

  /* ---- popovers / menus ---- */
  .vfjs-editor-popover {
    position: absolute;
    z-index: calc(var(--vfjs-z-base) + 40);
    min-width: calc(var(--vfjs-size-unit) * 130);
    max-width: calc(var(--vfjs-size-unit) * 340);
    padding: calc(var(--vfjs-space) * 1.5);
    background: var(--vfjs-editor-popover-bg, var(--vfjs-bg));
    border: var(--vfjs-editor-popover-border, var(--vfjs-border-width) solid var(--vfjs-border));
    border-radius: var(--vfjs-editor-popover-radius, var(--vfjs-radius));
    box-shadow: var(--vfjs-editor-popover-shadow, var(--vfjs-shadow));
    font-size: var(--vfjs-font-size);
    color: var(--vfjs-editor-popover-fg, var(--vfjs-fg));
  }
  .vfjs-editor-menu { max-height: calc(var(--vfjs-size-unit) * 260); overflow-y: auto; }
  .vfjs-editor-menu-item {
    display: flex;
    align-items: center;
    gap: calc(var(--vfjs-space) * 2.25);
    padding: calc(var(--vfjs-space) * 1.5) calc(var(--vfjs-space) * 2.25);
    border-radius: var(--vfjs-radius-md);
    cursor: pointer;
    white-space: nowrap;
    &:hover { background: var(--_vfjs-editor-menu-hover-bg); }
    &.vfjs-editor-is-active { background: var(--_vfjs-editor-menu-active-bg); color: var(--_vfjs-editor-menu-active-fg);
      .vfjs-editor-menu-hint { color: var(--_vfjs-editor-menu-active-fg); }
    }
    svg { flex: none; }
    .vfjs-editor-menu-hint { margin-inline-start: auto; font-size: var(--vfjs-font-size-xs); color: var(--vfjs-muted); }
  }
  .vfjs-editor-menu-sep { height: var(--vfjs-size-unit); margin: calc(var(--vfjs-space) * 1.25) calc(var(--vfjs-space) * 0.5); background: var(--vfjs-border); }
  .vfjs-editor-input {
    width: 100%;
    padding: calc(var(--vfjs-space) * 1.5) calc(var(--vfjs-space) * 2.25);
    border: var(--vfjs-border-width) solid var(--vfjs-border);
    border-radius: var(--vfjs-radius-md);
    background: var(--vfjs-bg);
    color: var(--vfjs-fg);
    font: inherit;
    font-size: var(--vfjs-font-size);
    outline: none;
    &:focus { border-color: var(--vfjs-accent); }
  }
  .vfjs-editor-row { display: flex; align-items: center; gap: calc(var(--vfjs-space) * 1.5); margin-top: calc(var(--vfjs-space) * 1.75);
    &:first-child { margin-top: 0; }
  }
  .vfjs-editor-primary {
    background: var(--vfjs-accent);
    border-color: var(--vfjs-accent);
    color: var(--vfjs-accent-fg);
    &:hover { background: var(--vfjs-accent); opacity: .9; }
  }
  .vfjs-editor-check { display: flex; align-items: center; gap: calc(var(--vfjs-space) * 1.5); font-size: var(--vfjs-font-size-sm); color: var(--vfjs-muted); cursor: pointer; }

  /* palette */
  .vfjs-editor-palette { display: grid; grid-template-columns: repeat(10, calc(var(--vfjs-size-unit) * 20)); gap: var(--vfjs-space-1); padding: calc(var(--vfjs-space) * 0.5); }
  .vfjs-editor-swatch {
    width: calc(var(--vfjs-size-unit) * 20); height: calc(var(--vfjs-size-unit) * 20);
    border: var(--vfjs-border-width) solid var(--vfjs-border);
    border-radius: var(--vfjs-radius-md);
    cursor: pointer;
    &:hover { transform: scale(1.15); }
  }

  /* table size picker */
  .vfjs-editor-grid { display: grid; grid-template-columns: repeat(8, calc(var(--vfjs-size-unit) * 17)); gap: calc(var(--vfjs-space) * 0.75); padding: calc(var(--vfjs-space) * 0.5); }
  .vfjs-editor-cell {
    width: calc(var(--vfjs-size-unit) * 17); height: calc(var(--vfjs-size-unit) * 17);
    border: var(--vfjs-border-width) solid var(--vfjs-border);
    border-radius: var(--vfjs-radius-sm);
    background: var(--vfjs-bg);
    &.vfjs-editor-is-on { background: var(--vfjs-accent); border-color: var(--vfjs-accent); }
  }
  .vfjs-editor-grid-label { text-align: center; margin-top: calc(var(--vfjs-space) * 1.5); color: var(--vfjs-muted); font-size: var(--vfjs-font-size-sm); }

  /* ---- statusbar ---- */
  .vfjs-editor-statusbar {
    display: flex;
    justify-content: space-between;
    gap: var(--vfjs-space-3);
    padding: var(--vfjs-editor-statusbar-padding, calc(var(--vfjs-space) * 1.25) calc(var(--vfjs-space) * 3.5));
    border-top: var(--vfjs-editor-statusbar-border, var(--vfjs-border-width) solid var(--vfjs-border));
    background: var(--vfjs-editor-statusbar-bg, var(--vfjs-surface));
    border-radius: 0 0 var(--_vfjs-editor-radius) var(--_vfjs-editor-radius);
    color: var(--vfjs-editor-statusbar-fg, var(--vfjs-muted));
    font-size: var(--vfjs-editor-statusbar-font-size, var(--vfjs-font-size-sm));
  }

  /* ---- source mode ---- */
  .vfjs-editor-source {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: calc(var(--vfjs-space) * 3.5) calc(var(--vfjs-space) * 4.5);
    outline: none;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: var(--vfjs-editor-code-font, var(--vfjs-font-mono));
    font-size: var(--vfjs-font-size);
    line-height: calc(var(--vfjs-line-height) + .05);
    color: var(--vfjs-editor-source-fg, var(--_vfjs-editor-fg));
    background: var(--vfjs-editor-source-bg, var(--_vfjs-editor-bg));
    .vfjs-editor-tk-t { color: var(--vfjs-accent); }
    .vfjs-editor-tk-a { color: var(--vfjs-editor-syntax-attr, var(--vfjs-code-attr)); }
    .vfjs-editor-tk-s { color: var(--vfjs-editor-syntax-string, var(--vfjs-code-string)); }
    .vfjs-editor-tk-p { color: var(--vfjs-muted); }
  }

  /* ---- outline panel 🌟 ---- */
  .vfjs-editor-outline {
    flex: none;
    width: var(--vfjs-editor-outline-width, calc(var(--vfjs-size-unit) * 220));
    overflow-y: auto;
    padding: var(--vfjs-space-3);
    border-inline-start: var(--vfjs-border-width) solid var(--vfjs-border);
    background: var(--vfjs-editor-outline-bg, var(--vfjs-surface));
    font-size: var(--vfjs-font-size);
  }
  .vfjs-editor-outline-title {
    font-size: var(--vfjs-font-size-xs);
    text-transform: uppercase;
    letter-spacing: calc(var(--vfjs-letter-spacing-caps) * 1.2);
    color: var(--vfjs-muted);
    margin-bottom: var(--vfjs-space-2);
  }
  .vfjs-editor-outline-item {
    padding: var(--vfjs-space-1) calc(var(--vfjs-space) * 1.75);
    border-radius: var(--vfjs-radius-md);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    &:hover { background: var(--vfjs-bg); }
    &[data-level="2"] { padding-inline-start: calc(var(--vfjs-space) * 4.5); }
    &[data-level="3"] { padding-inline-start: calc(var(--vfjs-space) * 7.5); }
    &[data-level="4"] { padding-inline-start: calc(var(--vfjs-space) * 10.5); }
  }
  .vfjs-editor-outline-empty { color: var(--vfjs-muted); }

  /* image resize handle */
  .vfjs-editor-handle {
    position: absolute;
    z-index: calc(var(--vfjs-z-base) + 45);
    width: calc(var(--vfjs-size-unit) * 13);
    height: calc(var(--vfjs-size-unit) * 13);
    border-radius: 50%;
    background: var(--vfjs-accent);
    border: var(--vfjs-border-width-thick) solid var(--vfjs-bg);
    box-shadow: var(--vfjs-shadow);
    cursor: nwse-resize;
  }

  /* upload placeholder */
  .vfjs-editor-upload {
    display: inline-flex;
    align-items: center;
    gap: var(--vfjs-space-2);
    max-width: 100%;
    padding: var(--vfjs-space-1) var(--vfjs-space-2);
    border: var(--vfjs-editor-upload-border, var(--vfjs-border-width) dashed var(--vfjs-border));
    border-radius: var(--vfjs-radius-md);
    background: var(--vfjs-editor-upload-bg, var(--vfjs-surface));
    color: var(--vfjs-muted);
    font-size: var(--vfjs-font-size-sm);
    line-height: var(--vfjs-line-height-tight);
    vertical-align: middle;
    user-select: none;
  }
  .vfjs-editor-content {
    .vfjs-editor-upload img.vfjs-editor-upload-preview {
      width: var(--vfjs-editor-upload-preview-size, calc(var(--vfjs-size-unit) * 40));
      height: var(--vfjs-editor-upload-preview-size, calc(var(--vfjs-size-unit) * 40));
      object-fit: cover;
      border-radius: var(--vfjs-radius-sm);
    }

    /* images with a caption, attached files */
    figure {
      &.vfjs-editor-figure { display: table; max-width: 100%; margin: var(--vfjs-space-3) 0;
        img { display: block; }
        figcaption {
          display: table-caption;
          caption-side: bottom;
          padding-top: var(--vfjs-space-1);
          color: var(--vfjs-editor-caption-fg, var(--vfjs-muted));
          font-size: var(--vfjs-editor-caption-size, var(--vfjs-font-size-sm));
          text-align: center;
        }
      }
      &.vfjs-editor-align-left { float: left; /* physical: "wrap left / right" is a side of the page, as in other editors */ margin: var(--vfjs-space-1) var(--vfjs-space-4) var(--vfjs-space-2) 0; /* physical: "wrap left / right" is a side of the page, as in other editors */ }
      &.vfjs-editor-align-right { float: right; /* physical: "wrap left / right" is a side of the page, as in other editors */ margin: var(--vfjs-space-1) 0 var(--vfjs-space-2) var(--vfjs-space-4); /* physical: "wrap left / right" is a side of the page, as in other editors */ }
      &.vfjs-editor-align-center { margin-inline: auto; }

      /* E5: embeds (in the editor the player is not loaded: the iframe has no src, a label shows the link) */
      &.vfjs-editor-embed {
        position: relative;
        max-width: var(--vfjs-editor-embed-width, 100%);
        margin: var(--vfjs-space-3) 0;
        iframe {
          display: block;
          width: 100%;
          height: auto;
          aspect-ratio: var(--vfjs-editor-embed-ratio, 16 / 9);
          border: var(--vfjs-editor-embed-border, var(--vfjs-border-width) solid var(--vfjs-border));
          border-radius: var(--vfjs-editor-embed-radius, var(--vfjs-radius));
          background: var(--vfjs-editor-embed-bg, var(--vfjs-surface));
          &[data-vfjs-src] { pointer-events: none; }
        }
        &[data-vfjs-label] {
          max-width: min(var(--vfjs-editor-embed-width, 100%), var(--vfjs-editor-embed-placeholder-width, calc(var(--vfjs-size-unit) * 480)));
          &::after {
            content: attr(data-vfjs-label);
            position: absolute;
            top: 50%;
            left: 50%; /* physical: centered (translate -50%) */
            max-width: 90%;
            padding: var(--vfjs-space-2) var(--vfjs-space-3);
            overflow: hidden;
            border-radius: var(--vfjs-radius);
            background: var(--vfjs-editor-embed-label-bg, color-mix(in srgb, var(--vfjs-bg) 88%, transparent));
            color: var(--vfjs-editor-embed-label-fg, var(--vfjs-fg));
            font-size: var(--vfjs-font-size-sm);
            text-overflow: ellipsis;
            white-space: nowrap;
            transform: translate(-50%, -50%);
            pointer-events: none;
          }
        }
        figcaption {
          padding-top: var(--vfjs-space-1);
          color: var(--vfjs-editor-caption-fg, var(--vfjs-muted));
          font-size: var(--vfjs-editor-caption-size, var(--vfjs-font-size-sm));
          text-align: center;
        }
        &.vfjs-editor-embed-selected {
          outline: var(--vfjs-border-width-thick) solid var(--vfjs-editor-embed-selected, var(--vfjs-accent));
          outline-offset: var(--vfjs-space-1);
        }
      }
    }
    a.vfjs-editor-file {
      display: inline-block;
      padding: 0 var(--vfjs-space-2);
      border: var(--vfjs-border-width) solid var(--vfjs-border);
      border-radius: var(--vfjs-radius-md);
      background: var(--vfjs-editor-file-bg, var(--vfjs-surface));
      text-decoration: none;
    }

    /* table: column resize, cell properties */
    table {
      &.vfjs-editor-table.vfjs-editor-table-fixed { table-layout: fixed; }
      &.vfjs-editor-table-fixed td, &.vfjs-editor-table-fixed th { overflow-wrap: anywhere; }
    }
    &.vfjs-editor-is-col-resize, &.vfjs-editor-is-col-resize * { cursor: col-resize; }
  }
  .vfjs-editor-upload-name {
    max-width: calc(var(--vfjs-size-unit) * 180);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .vfjs-editor-upload-bar {
    display: inline-block;
    width: calc(var(--vfjs-size-unit) * 80);
    height: calc(var(--vfjs-size-unit) * 4);
    border-radius: var(--vfjs-radius-pill);
    background: var(--vfjs-editor-upload-track, var(--vfjs-border));
    overflow: hidden;
  }
  .vfjs-editor-upload-fill {
    display: block;
    width: 0;
    height: 100%;
    background: var(--vfjs-editor-upload-bar, var(--vfjs-accent));
    transition: width var(--vfjs-motion-duration);
  }

  /* notices (upload errors) */
  .vfjs-editor-notices {
    position: absolute;
    inset-inline-end: var(--vfjs-space-3);
    bottom: var(--vfjs-space-3);
    z-index: calc(var(--vfjs-z-base) + 50);
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-2);
    max-width: calc(100% - var(--vfjs-space-6));
    pointer-events: none;
  }
  .vfjs-editor-notice {
    display: flex;
    align-items: center;
    gap: var(--vfjs-space-2);
    padding: var(--vfjs-space-2) var(--vfjs-space-3);
    border-radius: var(--vfjs-radius);
    background: var(--vfjs-editor-notice-bg, var(--vfjs-danger));
    color: var(--vfjs-editor-notice-fg, var(--vfjs-danger-fg));
    box-shadow: var(--vfjs-shadow);
    font-size: var(--vfjs-font-size-sm);
    pointer-events: auto;
    &.vfjs-editor-is-info { background: var(--vfjs-surface); color: var(--vfjs-fg); }
    .vfjs-editor-notice-close { min-width: 0; height: auto; padding: 0 var(--vfjs-space-1); color: inherit; }
  }

  /* find & replace bar */
  .vfjs-editor-find {
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-space-2);
    border-bottom: var(--vfjs-border-width) solid var(--vfjs-border);
    background: var(--vfjs-editor-find-bg, var(--_vfjs-editor-toolbar-bg));
    .vfjs-editor-input { flex: 1 1 calc(var(--vfjs-size-unit) * 160); width: auto; min-width: 0;
      &[aria-invalid="true"] { border-color: var(--vfjs-danger); }
    }
  }
  .vfjs-editor-find-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--vfjs-space-1);
    &[hidden] { display: none; }
  }
  .vfjs-editor-find-count {
    min-width: calc(var(--vfjs-size-unit) * 64);
    color: var(--vfjs-muted);
    font-size: var(--vfjs-font-size-xs);
    text-align: center;
    white-space: nowrap;
  }
  .vfjs-editor-find-toggle { font-family: var(--vfjs-font-mono); font-size: var(--vfjs-font-size-xs);
    &[aria-pressed="true"] {
      background: var(--_vfjs-editor-btn-active-bg);
      border-color: var(--_vfjs-editor-btn-active-bg);
      color: var(--_vfjs-editor-btn-active-fg);
    }
  }
  ::highlight(vfjs-editor-find) { background-color: var(--vfjs-editor-find-match, color-mix(in srgb, var(--vfjs-amber-400) 45%, transparent)); }
  ::highlight(vfjs-editor-find-current) { background-color: var(--vfjs-editor-find-current, var(--vfjs-amber-500)); color: var(--vfjs-editor-find-current-fg, var(--vfjs-slate-900)); }
  .vfjs-editor {
    &.vfjs-editor-is-col-resizing {
      &, * { cursor: col-resize; user-select: none; }
      .vfjs-editor-content table.vfjs-editor-table td, .vfjs-editor-content table.vfjs-editor-table th { border-inline-color: var(--vfjs-editor-col-resize, var(--vfjs-accent)); }
    }
    &:dir(rtl) {
      .vfjs-editor-btn {
        &:is([data-name="undo"], [data-name="redo"], [data-name="ul"], [data-name="checklist"], [data-name="outline"], [data-name="indent"], [data-name="outdent"]) svg { transform: scaleX(-1); }
        &:is([data-name="changesPanel"]) svg { transform: scaleX(-1); }
        &:is([data-name="commentsPanel"], [data-name="versionsPanel"]) svg { transform: scaleX(-1); }
      }
    }
    [data-vfjs-tc="1"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-b); }
    [data-vfjs-tc="2"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-c); }
    [data-vfjs-tc="3"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-d); }
    [data-vfjs-tc="4"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-e); }
    [data-vfjs-tc="5"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-f); }
    [data-vfjs-tc="6"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-g); }
    [data-vfjs-tc="7"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-h); }
    [data-vfjs-tc="0"] { --vfjs-editor-track-color: var(--_vfjs-editor-track-a); }
    [data-vfjs-fmt-tc="1"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-b); }
    [data-vfjs-fmt-tc="2"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-c); }
    [data-vfjs-fmt-tc="3"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-d); }
    [data-vfjs-fmt-tc="4"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-e); }
    [data-vfjs-fmt-tc="5"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-f); }
    [data-vfjs-fmt-tc="6"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-g); }
    [data-vfjs-fmt-tc="7"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-h); }
    [data-vfjs-fmt-tc="0"] { --vfjs-editor-track-fmt-color: var(--_vfjs-editor-track-a); }
    [data-vfjs-comment-tc="1"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-b); }
    [data-vfjs-comment-tc="2"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-c); }
    [data-vfjs-comment-tc="3"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-d); }
    [data-vfjs-comment-tc="4"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-e); }
    [data-vfjs-comment-tc="5"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-f); }
    [data-vfjs-comment-tc="6"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-g); }
    [data-vfjs-comment-tc="7"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-h); }
    [data-vfjs-comment-tc="0"] { --vfjs-editor-comment-color: var(--_vfjs-editor-comment-a); }

    /* the comparison replaces the text area while it is open */
    &.vfjs-editor-is-comparing .vfjs-editor-body > .vfjs-editor-content { display: none; }
  }
  .vfjs-editor-cellprops { min-width: calc(var(--vfjs-size-unit) * 240); }
  .vfjs-editor-cellprops-label { margin: var(--vfjs-space-2) 0 var(--vfjs-space-1); color: var(--vfjs-muted); font-size: var(--vfjs-font-size-xs);
    &:first-child { margin-top: 0; }
  }
  .vfjs-editor-cellprops > .vfjs-editor-btn { width: 100%; margin-top: var(--vfjs-space-1); }
  button.vfjs-editor-swatch { appearance: none; padding: 0; }

  /* E3: special characters / emoji */
  .vfjs-editor-symbols { width: var(--vfjs-editor-symbols-width, calc(var(--vfjs-size-unit) * 320)); max-width: calc(100vw - var(--vfjs-space-6)); }
  .vfjs-editor-symbols-cats { display: flex; flex-wrap: wrap; gap: var(--vfjs-space-1); margin: var(--vfjs-space-2) 0; }
  .vfjs-editor-symbols-cat { height: var(--vfjs-control-height-xs); font-size: var(--vfjs-font-size-xs);
    &[aria-pressed="true"] {
      background: var(--_vfjs-editor-btn-active-bg);
      border-color: var(--_vfjs-editor-btn-active-bg);
      color: var(--_vfjs-editor-btn-active-fg);
    }
  }
  .vfjs-editor-symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--vfjs-editor-symbol-size, var(--vfjs-control-height)), 1fr));
    gap: var(--vfjs-space-1);
    max-height: var(--vfjs-editor-symbols-height, calc(var(--vfjs-size-unit) * 220));
    overflow-y: auto;
  }
  .vfjs-editor-symbol {
    appearance: none;
    height: var(--vfjs-editor-symbol-size, var(--vfjs-control-height));
    padding: 0;
    border: var(--vfjs-border-width) solid transparent;
    border-radius: var(--vfjs-radius-md);
    background: transparent;
    color: var(--vfjs-fg);
    font-family: var(--vfjs-font);
    font-size: var(--vfjs-editor-symbol-font-size, var(--vfjs-font-size-3xl));
    line-height: var(--vfjs-line-height-none);
    cursor: pointer;
    &:hover { background: var(--vfjs-hover-bg); }
    &:focus-visible { border-color: var(--vfjs-accent); }
  }
  .vfjs-editor-symbols-emoji .vfjs-editor-symbol { font-size: var(--vfjs-font-size-4xl); }
  .vfjs-editor-symbols-name, .vfjs-editor-symbols-empty {
    min-height: calc(var(--vfjs-font-size-xs) * 1.5);
    margin-top: var(--vfjs-space-1);
    overflow: hidden;
    color: var(--vfjs-muted);
    font-size: var(--vfjs-font-size-xs);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .vfjs-editor-symbols-empty { grid-column: 1 / -1; }
  .vfjs-editor-embed-pop { min-width: calc(var(--vfjs-size-unit) * 280); }
  .vfjs-editor-embed-hint { margin: var(--vfjs-space-1) 0; color: var(--vfjs-muted); font-size: var(--vfjs-font-size-xs); }

  /* E14: formulas */
  .vfjs-editor-math math, .vfjs-editor-math-preview math {
    font-family: var(--vfjs-editor-math-font, math, 'Cambria Math', 'STIX Two Math', 'Latin Modern Math', var(--vfjs-font-serif));
    font-size: var(--vfjs-editor-math-font-size, 105%);
    color: var(--vfjs-editor-math-fg, currentColor);
  }
  .vfjs-editor-content {
    .vfjs-editor-math {
      display: inline-block;
      padding-inline: var(--vfjs-editor-math-padding, calc(var(--vfjs-space) * 0.25));
      border-radius: var(--vfjs-editor-math-radius, var(--vfjs-radius-sm));
      cursor: pointer;
      text-indent: 0;
      &:hover { background: var(--vfjs-editor-math-hover-bg, color-mix(in srgb, var(--vfjs-accent) 10%, transparent)); }
      &.vfjs-editor-math-selected {
        outline: var(--vfjs-border-width-thick) solid var(--vfjs-editor-math-selected, var(--vfjs-accent));
        outline-offset: var(--vfjs-space-1);
      }
    }
  }
  .vfjs-editor-math {
    &[data-vfjs-display="block"] { display: block; margin: var(--vfjs-editor-math-block-margin, calc(var(--vfjs-space) * 2) 0); text-align: center;
      math { font-size: var(--vfjs-editor-math-block-font-size, 115%); }
    }
    mtable {
      &[data-vfjs-kind="align"] {
        mtd {
          &[columnalign="right"] { padding-inline-end: 0; }
          &[columnalign="left"] { padding-inline-start: 0; }
        }
      }
    }
    &.vfjs-editor-math-error math {
      color: var(--vfjs-editor-math-error-fg, var(--vfjs-danger));
      background: var(--vfjs-editor-math-error-bg, color-mix(in srgb, var(--vfjs-danger) 10%, transparent));
      font-family: var(--vfjs-editor-math-src-font, var(--vfjs-font-mono));
    }
  }
  .vfjs-editor-math mtd, .vfjs-editor-math-preview mtd { padding: var(--vfjs-editor-math-cell-padding, calc(var(--vfjs-space) * 0.75) calc(var(--vfjs-space) * 2)); }
  .vfjs-editor-math mtd[columnalign="left"], .vfjs-editor-math-preview mtd[columnalign="left"] { text-align: start; }
  .vfjs-editor-math mtd[columnalign="right"], .vfjs-editor-math-preview mtd[columnalign="right"] { text-align: end; }
  .vfjs-editor-math menclose[notation="box"], .vfjs-editor-math-preview menclose[notation="box"] {
    border: var(--vfjs-editor-math-box-border, var(--vfjs-border-width) solid currentColor);
    padding: var(--vfjs-editor-math-box-padding, calc(var(--vfjs-space) * 0.5));
  }
  .vfjs-editor-math-pop { inline-size: var(--vfjs-editor-math-pop-width, calc(var(--vfjs-size-unit) * 360)); max-inline-size: 90vw; }
  .vfjs-editor-math-title { font-weight: var(--vfjs-font-weight-semibold); margin-block-end: var(--vfjs-space-2); }
  .vfjs-editor-math-src { font-family: var(--vfjs-editor-math-src-font, var(--vfjs-font-mono)); resize: vertical;
    &[aria-invalid="true"] { border-color: var(--vfjs-danger); }
  }
  .vfjs-editor-math-templates { display: flex; flex-wrap: wrap; gap: var(--vfjs-space-1); margin-block: var(--vfjs-space-2);
    .vfjs-editor-btn { inline-size: auto; min-inline-size: var(--vfjs-editor-btn-min-width, calc(var(--vfjs-size-unit) * 28)); padding: 0 var(--vfjs-space-1); }
  }
  .vfjs-editor-math-preview {
    min-block-size: var(--vfjs-editor-math-preview-min-height, calc(var(--vfjs-size-unit) * 48));
    padding: var(--vfjs-editor-math-preview-padding, calc(var(--vfjs-space) * 2));
    border-radius: var(--vfjs-radius-md);
    background: var(--vfjs-editor-math-preview-bg, var(--vfjs-surface));
    overflow-x: auto;
    text-align: center;
  }
  .vfjs-editor-math-msg { min-block-size: calc(var(--vfjs-font-size-xs) * var(--vfjs-line-height)); margin-block: var(--vfjs-space-1); color: var(--vfjs-muted); font-size: var(--vfjs-font-size-xs);
    &.vfjs-editor-math-is-error { color: var(--vfjs-danger); }
  }
  .vfjs-editor-math-block { display: flex; align-items: center; gap: var(--vfjs-space-1); font-size: var(--vfjs-font-size-sm); cursor: pointer; }
  .vfjs-editor-math-hint { margin-inline-start: auto; color: var(--vfjs-muted); font-size: var(--vfjs-font-size-xs); }

  /* E12: page break of an imported Word document (a marker only: the editor has no pages) */
  .vfjs-editor-content hr.vfjs-editor-page-break { border: 0; border-block-start: var(--vfjs-editor-page-break, var(--vfjs-border-width-thick) dashed var(--vfjs-border)); }

  /* E6: syntax colors of code blocks (CSS Custom Highlight API: the DOM of the code is never changed) */
  ::highlight(vfjs-editor-code-comment) { color: var(--_vfjs-editor-code-comment); }
  ::highlight(vfjs-editor-code-keyword) { color: var(--_vfjs-editor-code-keyword); }
  ::highlight(vfjs-editor-code-string) { color: var(--_vfjs-editor-code-string); }
  ::highlight(vfjs-editor-code-number) { color: var(--_vfjs-editor-code-number); }
  ::highlight(vfjs-editor-code-literal) { color: var(--_vfjs-editor-code-literal); }
  ::highlight(vfjs-editor-code-function) { color: var(--_vfjs-editor-code-function); }
  ::highlight(vfjs-editor-code-type) { color: var(--_vfjs-editor-code-type); }
  ::highlight(vfjs-editor-code-property) { color: var(--_vfjs-editor-code-property); }
  ::highlight(vfjs-editor-code-tag) { color: var(--_vfjs-editor-code-tag); }
  ::highlight(vfjs-editor-code-attr) { color: var(--_vfjs-editor-code-attr); }
  ::highlight(vfjs-editor-code-variable) { color: var(--_vfjs-editor-code-variable); }
  ::highlight(vfjs-editor-code-regex) { color: var(--_vfjs-editor-code-regex); }
  ::highlight(vfjs-editor-code-meta) { color: var(--_vfjs-editor-code-meta); }
  ::highlight(vfjs-editor-code-punctuation) { color: var(--_vfjs-editor-code-punctuation); }
  ::highlight(vfjs-editor-code-heading) { color: var(--_vfjs-editor-code-heading); }
  ::highlight(vfjs-editor-code-emphasis) { color: var(--_vfjs-editor-code-emphasis); }
  ::highlight(vfjs-editor-code-link) { color: var(--_vfjs-editor-code-link); }

  /* E6: language chip (top inline-end corner of the code block with the caret) and its menu */
  .vfjs-editor-code-lang {
    appearance: none;
    position: absolute;
    z-index: calc(var(--vfjs-z-base) + 30);
    height: var(--vfjs-editor-code-lang-height, var(--vfjs-control-height-xs));
    padding: 0 var(--vfjs-space-2);
    border: var(--vfjs-editor-code-lang-border, var(--vfjs-border-width) solid var(--vfjs-border));
    border-radius: var(--vfjs-editor-code-lang-radius, var(--vfjs-radius-md));
    background: var(--vfjs-editor-code-lang-bg, var(--vfjs-bg));
    color: var(--vfjs-editor-code-lang-fg, var(--vfjs-muted));
    font: inherit;
    font-size: var(--vfjs-editor-code-lang-font-size, var(--vfjs-font-size-xs));
    line-height: var(--vfjs-line-height-none);
    white-space: nowrap;
    cursor: pointer;
    transform: translate(calc(-100% - var(--vfjs-editor-code-lang-offset, var(--vfjs-space-1))), var(--vfjs-editor-code-lang-offset, var(--vfjs-space-1)));
    &.vfjs-editor-code-lang-start { transform: translate(var(--vfjs-editor-code-lang-offset, var(--vfjs-space-1)), var(--vfjs-editor-code-lang-offset, var(--vfjs-space-1))); }
    &:hover { color: var(--vfjs-fg); border-color: var(--vfjs-accent); }
    &[hidden] { display: none; }
  }
  .vfjs-editor-code-menu { max-height: var(--vfjs-editor-code-menu-height, calc(var(--vfjs-size-unit) * 320)); }
  button {
    &.vfjs-editor-menu-item {
      appearance: none;
      width: 100%;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      text-align: start;
      &:hover { background: var(--_vfjs-editor-menu-hover-bg); }
      &.vfjs-editor-is-active { background: var(--_vfjs-editor-menu-active-bg); color: var(--_vfjs-editor-menu-active-fg); }
    }
  }

  /* RTL: the source view stays left-to-right; direction-bound icons mirror */
  .vfjs-editor-source { direction: ltr; text-align: left; /* physical: HTML source is always left-to-right */ }
  /* the current change (navigation) */
  .vfjs {
    --_vfjs-editor-track-current: var(--vfjs-editor-track-current, color-mix(in srgb, var(--vfjs-accent) 28%, transparent));
  }

  /* inline insertion / deletion / formatting */
  .vfjs-editor-content {
    ins {
      &[data-vfjs-cid] {
        color: var(--_vfjs-editor-track-ins-fg);
        background: var(--_vfjs-editor-track-ins-bg);
        text-decoration: var(--_vfjs-editor-track-ins-decoration);
        text-decoration-color: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color));
        text-decoration-thickness: var(--_vfjs-editor-track-decoration-thickness);
        img { outline: var(--vfjs-border-width-thick) solid var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)); }
      }
    }
    del {
      &[data-vfjs-cid] {
        color: var(--_vfjs-editor-track-del-fg);
        background: var(--_vfjs-editor-track-del-bg);
        text-decoration: var(--_vfjs-editor-track-del-decoration);
        text-decoration-color: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color));
        text-decoration-thickness: var(--_vfjs-editor-track-decoration-thickness);
        :is(img, .vfjs-editor-mention) { opacity: var(--_vfjs-editor-track-del-opacity); outline: var(--vfjs-border-width-thick) solid var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)); }
      }
    }
    span[data-vfjs-change="format"] {
      text-decoration: var(--_vfjs-editor-track-format-decoration);
      text-decoration-color: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color));
      text-decoration-thickness: var(--_vfjs-editor-track-decoration-thickness);
    }
    /* code blocks: the code keeps its colors, the change shows by its background */
    pre ins[data-vfjs-cid] { color: inherit; }

    /* blocks: a change bar on the start side (in the padding, the text does not move) */
    :is(p, h1, h2, h3, h4, li, blockquote, pre) {
      &[data-vfjs-change] {
        border-inline-start: var(--_vfjs-editor-track-bar) var(--_vfjs-editor-track-bar-style) var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color));
        margin-inline-start: calc(var(--_vfjs-editor-track-bar) * -1);
      }
      &[data-vfjs-change="join"] { border-inline-start-style: var(--_vfjs-editor-track-join-style); }
      &[data-vfjs-change="ins"] { background: var(--_vfjs-editor-track-ins-bg); }
    }
    :is(p, h1, h2, h3, h4, li, blockquote, pre, figure, table, tr, td, th)[data-vfjs-change="del"] {
      color: var(--_vfjs-editor-track-del-fg);
      background: var(--_vfjs-editor-track-del-bg);
      text-decoration: var(--_vfjs-editor-track-del-decoration);
      text-decoration-color: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color));
    }
    :is(p, h1, h2, h3, h4, li, blockquote, pre, td, th)[data-vfjs-fmt-cid]:not([data-vfjs-change]) {
      border-inline-start: var(--_vfjs-editor-track-bar) var(--_vfjs-editor-track-fmt-style) var(--vfjs-editor-track-fmt-color, var(--_vfjs-editor-track-fmt-color));
      margin-inline-start: calc(var(--_vfjs-editor-track-bar) * -1);
    }
    :is(td, th)[data-vfjs-fmt-cid] { box-shadow: inset 0 0 0 var(--vfjs-border-width) var(--vfjs-editor-track-fmt-color, var(--_vfjs-editor-track-fmt-color)); }
    :is(tr, td, th)[data-vfjs-change="ins"] { background: var(--_vfjs-editor-track-ins-bg); }
    tr[data-vfjs-change="del"] > :is(td, th) { text-decoration: var(--_vfjs-editor-track-del-decoration); text-decoration-color: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)); }
    :is(table, figure, hr, ul, ol)[data-vfjs-change] { outline: var(--_vfjs-editor-track-block-outline); outline-offset: var(--vfjs-space-1); }
    :is(figure, hr)[data-vfjs-change="del"] { opacity: var(--_vfjs-editor-track-del-opacity); }

    /* anchors (only of known threads: the editor decorates them) */
    span {
      &[data-vfjs-comment-tc] {
        background: var(--_vfjs-editor-comment-bg);
        border-block-end: var(--vfjs-editor-comment-border-width, var(--vfjs-border-width-thick)) var(--vfjs-editor-comment-border-style, solid) var(--_vfjs-editor-comment-border);
        &[data-vfjs-comment-state="resolved"] {
          background: var(--vfjs-editor-comment-resolved-bg, transparent);
          border-block-end-color: var(--vfjs-editor-comment-resolved-border, transparent);
        }
      }
    }
  }
  ::highlight(vfjs-editor-track-current) { background-color: var(--_vfjs-editor-track-current); }

  /* change list (side panel) */
  .vfjs-editor-track-panel {
    flex: none;
    display: flex;
    flex-direction: column;
    width: var(--_vfjs-editor-track-panel-width);
    max-height: 100%;
    overflow: hidden;
    border-inline-start: var(--_vfjs-editor-track-panel-border);
    background: var(--_vfjs-editor-track-panel-bg);
    font-size: var(--_vfjs-editor-track-font-size);
  }
  .vfjs-editor-track-head {
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-2);
    padding: var(--vfjs-space-3);
    border-bottom: var(--_vfjs-editor-track-panel-border);
  }
  .vfjs-editor-track-title {
    display: flex;
    align-items: center;
    gap: var(--vfjs-space-2);
    font-size: var(--vfjs-font-size-xs);
    text-transform: uppercase;
    letter-spacing: calc(var(--vfjs-letter-spacing-caps) * 1.2);
    color: var(--vfjs-muted);
  }
  .vfjs-editor-track-count {
    padding: 0 var(--vfjs-space-2);
    border-radius: var(--vfjs-radius-full);
    background: var(--_vfjs-editor-track-count-bg);
    color: var(--_vfjs-editor-track-count-fg);
    letter-spacing: normal;
  }
  .vfjs-editor-track-filter {
    width: 100%;
    min-height: var(--_vfjs-editor-btn-height);
    padding: 0 var(--vfjs-space-2);
    border: var(--_vfjs-editor-track-panel-border);
    border-radius: var(--vfjs-editor-btn-radius, var(--vfjs-radius-md));
    background: var(--_vfjs-editor-bg);
    color: var(--_vfjs-editor-fg);
    font: inherit;
  }
  .vfjs-editor-track-actions { display: flex; flex-wrap: wrap; gap: var(--vfjs-space-1);
    .vfjs-editor-btn { width: auto; padding: 0 var(--vfjs-space-2); }
  }
  .vfjs-editor-track-list { flex: 1 1 auto; overflow-y: auto; padding: var(--vfjs-space-2); }
  .vfjs-editor-track-item {
    display: flex;
    align-items: flex-start;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-space-1);
    border-radius: var(--_vfjs-editor-track-item-radius);
    border-inline-start: var(--_vfjs-editor-track-bar) solid var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color));
    &:hover { background: var(--_vfjs-editor-track-item-hover-bg); }
    &.vfjs-editor-is-active { background: var(--_vfjs-editor-track-item-active-bg); }
    .vfjs-editor-btn { flex: none; }
  }
  .vfjs-editor-track-go {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-space-1);
    border: 0;
    border-radius: var(--_vfjs-editor-track-item-radius);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
  }
  .vfjs-editor-track-meta { display: flex; align-items: center; gap: var(--vfjs-space-2); color: var(--_vfjs-editor-track-meta-fg); font-size: var(--vfjs-font-size-xs); }
  .vfjs-editor-track-dot { flex: none; width: var(--_vfjs-editor-track-dot); height: var(--_vfjs-editor-track-dot); border-radius: 50%; background: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)); }
  .vfjs-editor-track-who { color: var(--_vfjs-editor-fg); font-weight: var(--vfjs-font-weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vfjs-editor-track-kind { color: var(--_vfjs-editor-track-meta-fg);
    &[data-type="insert"] + .vfjs-editor-track-text { text-decoration: var(--_vfjs-editor-track-ins-decoration); text-decoration-color: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)); }
    &[data-type="delete"] + .vfjs-editor-track-text { text-decoration: var(--_vfjs-editor-track-del-decoration); text-decoration-color: var(--vfjs-editor-track-color, var(--_vfjs-editor-track-color)); }
  }
  .vfjs-editor-track-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vfjs-editor-track-empty { padding: var(--vfjs-space-3); color: var(--vfjs-muted);
    &[hidden] { display: none; }
  }
  ::highlight(vfjs-editor-comment-current) { background-color: var(--vfjs-editor-comment-current, color-mix(in srgb, var(--vfjs-accent) 30%, transparent)); }
  ::highlight(vfjs-editor-comment-pending) { background-color: var(--vfjs-editor-comment-pending, color-mix(in srgb, var(--vfjs-accent) 20%, transparent)); }

  /* panel */
  .vfjs-editor-comments-panel,
  .vfjs-editor-versions-panel {
    flex: none;
    display: flex;
    flex-direction: column;
    width: var(--vfjs-editor-comment-panel-width, calc(var(--vfjs-size-unit) * 300));
    max-height: 100%;
    overflow: hidden;
    border-inline-start: var(--_vfjs-editor-comment-panel-border);
    background: var(--vfjs-editor-comment-panel-bg, var(--_vfjs-editor-track-panel-bg));
    font-size: var(--vfjs-editor-comment-font-size, var(--vfjs-font-size-sm));
  }
  .vfjs-editor-comments-head,
  .vfjs-editor-versions-head {
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-2);
    padding: var(--vfjs-space-3);
    border-block-end: var(--_vfjs-editor-comment-panel-border);
  }
  .vfjs-editor-comments-title,
  .vfjs-editor-versions-title {
    display: flex;
    align-items: center;
    gap: var(--vfjs-space-2);
    font-size: var(--vfjs-font-size-xs);
    text-transform: uppercase;
    letter-spacing: calc(var(--vfjs-letter-spacing-caps) * 1.2);
    color: var(--vfjs-muted);
  }
  .vfjs-editor-comments-count,
  .vfjs-editor-versions-count {
    padding: 0 var(--vfjs-space-2);
    border-radius: var(--vfjs-radius-full);
    background: var(--vfjs-editor-comment-count-bg, var(--_vfjs-editor-menu-active-bg));
    color: var(--vfjs-editor-comment-count-fg, var(--_vfjs-editor-menu-active-fg));
    letter-spacing: normal;
  }
  .vfjs-editor-comments-filters { display: flex; gap: var(--vfjs-space-1); }
  .vfjs-editor-comments-filter,
  .vfjs-editor-comment-input,
  .vfjs-editor-versions-name {
    min-width: 0;
    min-height: var(--_vfjs-editor-btn-height);
    padding: var(--vfjs-editor-comment-input-padding, var(--vfjs-space-1) var(--vfjs-space-2));
    border: var(--vfjs-editor-comment-input-border, var(--vfjs-border-width) solid var(--vfjs-border));
    border-radius: var(--vfjs-editor-comment-input-radius, var(--vfjs-editor-btn-radius, var(--vfjs-radius-md)));
    background: var(--vfjs-editor-comment-input-bg, var(--_vfjs-editor-bg));
    color: var(--vfjs-editor-comment-input-fg, var(--_vfjs-editor-fg));
    font: inherit;
  }
  .vfjs-editor-comments-filter { flex: 1 1 0; }
  .vfjs-editor-comment-input {
    display: block;
    width: 100%;
    min-height: var(--vfjs-editor-comment-input-min-height, calc(var(--vfjs-size-unit) * 52));
    resize: vertical;
    box-sizing: border-box;
  }
  .vfjs-editor-comments-actions,
  .vfjs-editor-comment-buttons,
  .vfjs-editor-version-actions { display: flex; flex-wrap: wrap; gap: var(--vfjs-space-1); }
  .vfjs-editor-comments-actions .vfjs-editor-btn,
  .vfjs-editor-comment-buttons .vfjs-editor-btn,
  .vfjs-editor-version-actions .vfjs-editor-btn,
  .vfjs-editor-versions-form .vfjs-editor-btn { width: auto; padding: 0 var(--vfjs-space-2); white-space: nowrap; }
  .vfjs-editor-comments-list,
  .vfjs-editor-versions-list {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-editor-comment-item-gap, var(--vfjs-space-2));
    padding: var(--vfjs-space-2);
  }
  .vfjs-editor-comment-new {
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-space-2) var(--vfjs-space-3);
    border-block-end: var(--_vfjs-editor-comment-panel-border);
  }
  .vfjs-editor-comment-new[hidden],
  .vfjs-editor-comments-empty[hidden],
  .vfjs-editor-versions-empty[hidden] { display: none; }
  .vfjs-editor-comment-thread {
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-editor-comment-item-padding, var(--vfjs-space-2));
    border: var(--_vfjs-editor-comment-item-border);
    border-inline-start: var(--vfjs-editor-comment-bar, var(--vfjs-border-width-thick)) solid var(--vfjs-editor-comment-color, var(--_vfjs-editor-comment-a));
    border-radius: var(--vfjs-editor-comment-item-radius, var(--vfjs-radius-md));
    background: var(--vfjs-editor-comment-item-bg, var(--_vfjs-editor-bg));
    &:hover { background: var(--vfjs-editor-comment-item-hover-bg, var(--_vfjs-editor-menu-hover-bg)); }
    &.vfjs-editor-is-active { background: var(--vfjs-editor-comment-item-active-bg, var(--vfjs-selected-bg)); }
    &.vfjs-editor-comment-is-resolved { opacity: var(--vfjs-editor-comment-resolved-opacity, .7); }
  }
  .vfjs-editor-comment-go {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-space-1);
    border: 0;
    border-radius: var(--vfjs-editor-comment-item-radius, var(--vfjs-radius-md));
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
  }
  .vfjs-editor-comment-quote { color: var(--vfjs-editor-comment-quote-fg, var(--vfjs-muted)); font-style: italic; overflow-wrap: anywhere; }
  .vfjs-editor-comment-is-orphan .vfjs-editor-comment-quote { text-decoration: line-through; }
  .vfjs-editor-comment-state,
  .vfjs-editor-comment-change,
  .vfjs-editor-comment-edited,
  .vfjs-editor-comment-when,
  .vfjs-editor-version-meta { color: var(--vfjs-editor-comment-meta-fg, var(--vfjs-muted)); font-size: var(--vfjs-font-size-xs); }
  .vfjs-editor-comment-msgs { display: flex; flex-direction: column; gap: var(--vfjs-space-2); }
  .vfjs-editor-comment-msg { display: flex; flex-direction: column; gap: var(--vfjs-space-1);
    + .vfjs-editor-comment-msg { padding-block-start: var(--vfjs-space-2); border-block-start: var(--_vfjs-editor-comment-item-border); }
  }
  .vfjs-editor-comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--vfjs-space-2); }
  .vfjs-editor-comment-dot { flex: none; width: var(--vfjs-editor-comment-dot, calc(var(--vfjs-size-unit) * 9)); height: var(--vfjs-editor-comment-dot, calc(var(--vfjs-size-unit) * 9)); border-radius: 50%; background: var(--vfjs-editor-comment-color, var(--_vfjs-editor-comment-a)); }
  .vfjs-editor-comment-who,
  .vfjs-editor-version-name { color: var(--_vfjs-editor-fg); font-weight: var(--vfjs-font-weight-semibold); }
  .vfjs-editor-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
  .vfjs-editor-comment-mention {
    padding: 0 var(--vfjs-space-1);
    border-radius: var(--vfjs-radius-sm);
    background: var(--vfjs-editor-comment-mention-bg, color-mix(in srgb, var(--vfjs-accent) 14%, transparent));
    color: var(--vfjs-editor-comment-mention-fg, var(--vfjs-accent));
  }
  .vfjs-editor-comment-tools { display: flex; gap: var(--vfjs-space-1); }
  .vfjs-editor-comment-tool {
    width: auto;
    min-height: 0;
    padding: 0 var(--vfjs-space-1);
    font-size: var(--vfjs-font-size-xs);
    color: var(--vfjs-editor-comment-meta-fg, var(--vfjs-muted));
  }
  .vfjs-editor-comment-mentions {
    max-height: calc(var(--vfjs-size-unit) * 180);
    overflow-y: auto;
    padding: var(--vfjs-space-1);
    border: var(--vfjs-editor-popover-border, var(--vfjs-border-width) solid var(--vfjs-border));
    border-radius: var(--vfjs-editor-popover-radius, var(--vfjs-radius));
    background: var(--vfjs-editor-popover-bg, var(--vfjs-bg));
    color: var(--vfjs-editor-popover-fg, var(--vfjs-fg));
    box-shadow: var(--vfjs-editor-popover-shadow, var(--vfjs-shadow));
  }
  .vfjs-editor-comment-mention-option { padding: var(--vfjs-space-1) var(--vfjs-space-2); border-radius: var(--vfjs-radius-sm); cursor: pointer;
    &:hover { background: var(--_vfjs-editor-menu-hover-bg); }
    &.vfjs-editor-is-active { background: var(--_vfjs-editor-menu-active-bg); color: var(--_vfjs-editor-menu-active-fg); }
  }
  .vfjs-editor-comments-empty,
  .vfjs-editor-versions-empty { padding: var(--vfjs-space-3); color: var(--vfjs-muted); }
  .vfjs-editor-versions-form { display: flex; gap: var(--vfjs-space-1); }
  .vfjs-editor-versions-name { flex: 1 1 auto; }
  .vfjs-editor-version {
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-editor-comment-item-padding, var(--vfjs-space-2));
    border: var(--_vfjs-editor-comment-item-border);
    border-radius: var(--vfjs-editor-comment-item-radius, var(--vfjs-radius-md));
    background: var(--vfjs-editor-comment-item-bg, var(--_vfjs-editor-bg));
    &:hover { background: var(--vfjs-editor-comment-item-hover-bg, var(--_vfjs-editor-menu-hover-bg)); }
  }
  .vfjs-editor-version-go {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--vfjs-space-1);
    padding: var(--vfjs-space-1);
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
  }
  .vfjs-editor-version-is-auto .vfjs-editor-version-name { color: var(--vfjs-editor-version-auto-fg, var(--vfjs-muted)); font-weight: var(--vfjs-font-weight-normal); }
  .vfjs-editor-compare { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
  .vfjs-editor-compare-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vfjs-space-2);
    padding: var(--vfjs-editor-compare-bar-padding, var(--vfjs-space-2) var(--vfjs-space-3));
    border-block-end: var(--vfjs-editor-compare-bar-border, var(--vfjs-border-width) solid var(--vfjs-border));
    background: var(--vfjs-editor-compare-bar-bg, var(--_vfjs-editor-toolbar-bg));
  }
  .vfjs-editor-compare-title { font-weight: var(--vfjs-font-weight-semibold); }
  .vfjs-editor-compare-stats { color: var(--vfjs-muted); font-size: var(--vfjs-font-size-sm); }
  .vfjs-editor-compare-actions { display: flex; flex-wrap: wrap; gap: var(--vfjs-space-1); margin-inline-start: auto;
    .vfjs-editor-btn { width: auto; padding: 0 var(--vfjs-space-2);
      &[aria-pressed="true"] {
        background: var(--_vfjs-editor-btn-active-bg);
        color: var(--_vfjs-editor-btn-active-fg);
        border-color: var(--vfjs-editor-btn-active-border, var(--_vfjs-editor-btn-active-bg));
      }
    }
  }
  .vfjs-editor-compare-body { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: var(--vfjs-editor-compare-gap, var(--vfjs-space-3)); min-height: 0; }
  .vfjs-editor-compare-pane { flex: 1 1 var(--vfjs-editor-compare-pane-min, calc(var(--vfjs-size-unit) * 260)); min-width: 0; display: flex; flex-direction: column; }
  .vfjs-editor-compare-is-side .vfjs-editor-compare-pane + .vfjs-editor-compare-pane { border-inline-start: var(--vfjs-editor-compare-pane-border, var(--vfjs-border-width) solid var(--vfjs-border)); }
  .vfjs-editor-compare-label {
    padding: var(--vfjs-space-1) var(--vfjs-space-3);
    color: var(--vfjs-editor-compare-label-fg, var(--vfjs-muted));
    font-size: var(--vfjs-font-size-xs);
    text-transform: uppercase;
    letter-spacing: calc(var(--vfjs-letter-spacing-caps) * 1.2);
  }
  .vfjs-editor-compare-doc { width: 100%; box-sizing: border-box; max-height: var(--vfjs-editor-compare-max-height, 70vh); overflow-y: auto;
    .vfjs-editor-compare-current { outline: var(--vfjs-editor-compare-current, var(--vfjs-border-width-thick) solid var(--vfjs-accent)); outline-offset: var(--vfjs-space-1); }
  }
  /* E11: the PDF preview frame (its target may be outside the editor: the values of the variables as fallbacks) */
  .vfjs-editor-pdf-frame {
    display: block;
    inline-size: var(--vfjs-editor-pdf-frame-width, 100%);
    block-size: var(--vfjs-editor-pdf-frame-height, 100%);
    border: var(--vfjs-editor-pdf-frame-border, none);
  }
  /* no frame: the element keeps the look of the page */
  .vfjs-editor-ui-inline.vfjs, .vfjs-editor-ui-balloon.vfjs {
    --vfjs-editor-border: none;
    --vfjs-editor-radius: 0;
    --vfjs-editor-bg: transparent;
    --vfjs-editor-shadow: none;
    --vfjs-editor-content-padding: 0;
    --vfjs-editor-content-bg: transparent;
    --vfjs-editor-content-border: none;
    --vfjs-editor-content-radius: 0;
    --vfjs-editor-content-max-width: none;
    --vfjs-editor-content-margin: 0;
  }
  .vfjs-editor {
    &.vfjs-editor-ui-inline, &.vfjs-editor-ui-balloon { font: inherit; color: inherit; }
    &.vfjs-editor-ui-focused:is(.vfjs-editor-ui-inline, .vfjs-editor-ui-balloon) { outline: var(--vfjs-editor-ui-focus-outline, var(--vfjs-border-width) dashed var(--vfjs-accent)); outline-offset: var(--vfjs-editor-ui-focus-offset, var(--vfjs-space-1)); }
    &.vfjs-editor-is-ai .vfjs-editor-content { caret-color: transparent; }
  }
  :is(.vfjs-editor-ui-inline, .vfjs-editor-ui-balloon) {
    > .vfjs-editor-body > .vfjs-editor-content { font: inherit; color: inherit; overflow: visible; }
    > .vfjs-editor-statusbar { display: var(--vfjs-editor-ui-statusbar, none); }
    :is(.vfjs-editor-toolbar, .vfjs-editor-popover, .vfjs-editor-plus, .vfjs-editor-body > aside) { font-family: var(--vfjs-editor-ui-font, var(--vfjs-font)); }
  }
  /* floating toolbars (inline: above the block; balloon: at the selection); placed by script */
  .vfjs-editor-toolbar[hidden], .vfjs-editor-plus[hidden] { display: none; }
  .vfjs-editor-toolbar {
    &.vfjs-editor-is-floating {
      position: fixed;
      z-index: var(--_vfjs-editor-ui-z);
      max-inline-size: var(--vfjs-editor-ui-toolbar-max-width, calc(100vw - var(--vfjs-space-4)));
      margin: 0;
      padding: var(--vfjs-editor-ui-toolbar-padding, var(--vfjs-space));
      border: var(--vfjs-editor-ui-toolbar-border, var(--vfjs-border-width) solid var(--vfjs-border));
      border-radius: var(--vfjs-editor-ui-toolbar-radius, var(--vfjs-radius-lg));
      background: var(--vfjs-editor-ui-toolbar-bg, var(--vfjs-bg));
      box-shadow: var(--vfjs-editor-ui-toolbar-shadow, var(--vfjs-shadow));
    }
    &:focus-within .vfjs-editor-btn:focus-visible { outline: var(--vfjs-focus-ring-width) var(--vfjs-focus-ring-style) var(--vfjs-focus-ring-color, var(--vfjs-accent)); outline-offset: var(--vfjs-focus-ring-offset); }
  }
  .vfjs-editor-ui-inline:not(.vfjs-editor-ui-focused) > .vfjs-editor-toolbar.vfjs-editor-is-floating { visibility: hidden; pointer-events: none; }
  .vfjs-editor-plus {
    position: fixed;
    z-index: var(--_vfjs-editor-ui-z);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: var(--vfjs-editor-plus-size, var(--_vfjs-editor-btn-height));
    block-size: var(--vfjs-editor-plus-size, var(--_vfjs-editor-btn-height));
    padding: 0;
    border: var(--vfjs-editor-plus-border, var(--vfjs-border-width) solid var(--vfjs-border));
    border-radius: var(--vfjs-editor-plus-radius, var(--vfjs-radius-full));
    background: var(--vfjs-editor-plus-bg, var(--vfjs-bg));
    color: var(--vfjs-editor-plus-fg, var(--vfjs-muted));
    cursor: pointer;
    &:hover, &[aria-expanded="true"] { color: var(--vfjs-editor-plus-hover-fg, var(--vfjs-accent)); border-color: var(--vfjs-editor-plus-hover-fg, var(--vfjs-accent)); }
  }
  .vfjs-editor-block-menu .vfjs-editor-menu-item:focus { background: var(--_vfjs-editor-menu-active-bg); color: var(--_vfjs-editor-menu-active-fg); outline: none; }
  /* one toolbar for several editors */
  .vfjs-editor-shared-toolbar { display: block;
    &.vfjs-editor-is-sticky { position: sticky; top: var(--_vfjs-editor-toolbar-sticky-top); z-index: var(--_vfjs-editor-ui-z); }
    .vfjs-editor-toolbar { border: var(--vfjs-editor-shared-border, var(--vfjs-border-width) solid var(--vfjs-border)); border-radius: var(--vfjs-editor-shared-radius, var(--vfjs-radius)); background: var(--vfjs-editor-shared-bg, var(--_vfjs-editor-toolbar-bg)); }
    &.vfjs-editor-is-readonly .vfjs-editor-toolbar { opacity: .5; pointer-events: none; }
    .vfjs-editor-btn:is([data-name="undo"], [data-name="redo"], [data-name="ul"], [data-name="checklist"], [data-name="outline"], [data-name="indent"], [data-name="outdent"]):dir(rtl) svg { transform: scaleX(-1); }
  }
  .vfjs-editor-content {
    [data-vfjs-block] { margin: var(--vfjs-editor-block-space, calc(var(--vfjs-em) * 0.6) 0);
      &[contenteditable="false"] {
        border-radius: var(--vfjs-editor-island-radius, var(--vfjs-radius));
        outline: var(--vfjs-editor-island-outline, var(--vfjs-border-width) dashed transparent);
        outline-offset: var(--vfjs-editor-island-offset, var(--vfjs-space-1));
        cursor: default;
        &:hover { outline: var(--vfjs-editor-island-hover, var(--vfjs-border-width) dashed var(--vfjs-border)); }
      }
    }
    [contenteditable="false"]:is([data-vfjs-block], [data-vfjs-inline]):focus-within { outline: var(--vfjs-editor-island-focus, var(--vfjs-border-width-thick) solid var(--vfjs-accent)); }
  }
  .vfjs-editor-a11y-panel {
    flex: none;
    inline-size: var(--vfjs-editor-access-panel-width, calc(var(--vfjs-size-unit) * 280));
    overflow-y: auto;
    padding: var(--vfjs-space-3);
    border-inline-start: var(--vfjs-editor-access-panel-border, var(--vfjs-border-width) solid var(--vfjs-border));
    background: var(--vfjs-editor-access-panel-bg, var(--vfjs-editor-outline-bg, var(--vfjs-surface)));
    font-size: var(--vfjs-editor-access-font-size, var(--vfjs-font-size-sm));
  }
  .vfjs-editor-a11y-head { display: flex; align-items: center; justify-content: space-between; gap: var(--vfjs-space-2); margin-block-end: var(--vfjs-space-2); }
  .vfjs-editor-a11y-title {
    font-size: var(--vfjs-font-size-xs);
    text-transform: uppercase;
    letter-spacing: calc(var(--vfjs-letter-spacing-caps) * 1.2);
    color: var(--vfjs-muted);
  }
  .vfjs-editor-a11y-summary { color: var(--vfjs-editor-access-text-fg, var(--vfjs-muted)); margin-block-end: var(--vfjs-space-2); }
  .vfjs-editor-a11y-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--vfjs-editor-access-item-gap, var(--vfjs-space-2)); }
  .vfjs-editor-a11y-item {
    padding: var(--vfjs-editor-access-item-padding, var(--vfjs-space-2));
    border: var(--_vfjs-editor-access-item-border);
    border-inline-start: var(--vfjs-border-width-thick) solid var(--vfjs-editor-access-warning, var(--vfjs-warning));
    border-radius: var(--vfjs-editor-access-item-radius, var(--vfjs-radius));
    background: var(--vfjs-editor-access-item-bg, var(--vfjs-bg));
    &[data-severity="error"] { border-inline-start-color: var(--vfjs-editor-access-error, var(--vfjs-danger));
      .vfjs-editor-a11y-sev { color: var(--vfjs-editor-access-error-fg, color-mix(in srgb, var(--vfjs-danger) 80%, var(--vfjs-fg))); }
    }
    &:focus-visible { outline: var(--vfjs-focus-ring-width) var(--vfjs-focus-ring-style) var(--vfjs-focus-ring-color, var(--vfjs-accent)); outline-offset: var(--vfjs-focus-ring-offset); }
  }
  .vfjs-editor-a11y-sev { font-weight: var(--vfjs-font-weight-semibold); color: var(--vfjs-editor-access-warning-fg, color-mix(in srgb, var(--vfjs-warning) 60%, var(--vfjs-fg))); }
  .vfjs-editor-a11y-text { margin-block-start: var(--vfjs-space-1); color: var(--vfjs-editor-access-text-fg, var(--vfjs-muted)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vfjs-editor-a11y-actions { display: flex; flex-wrap: wrap; gap: var(--vfjs-space-1); margin-block-start: var(--vfjs-space-2);
    .vfjs-editor-btn { block-size: auto; min-block-size: var(--_vfjs-editor-btn-height); padding: 0 var(--vfjs-space-2); font-size: var(--vfjs-editor-access-font-size, var(--vfjs-font-size-sm)); }
  }
  .vfjs-editor-a11y-form .vfjs-editor-btn { block-size: auto; min-block-size: var(--_vfjs-editor-btn-height); padding: 0 var(--vfjs-space-2); }
  ::highlight(vfjs-editor-a11y-current) { background-color: var(--vfjs-editor-access-current, color-mix(in srgb, var(--vfjs-accent) 28%, transparent)); }
  ::highlight(vfjs-editor-ai-target) { background-color: var(--_vfjs-editor-ai-target); text-decoration-line: var(--vfjs-editor-ai-target-decoration, line-through); }
  ::highlight(vfjs-editor-ai-selection) { background-color: var(--_vfjs-editor-ai-target); }
  .vfjs-editor-content .vfjs-editor-ai-preview {
    margin-block: var(--vfjs-editor-ai-margin, var(--vfjs-space-2));
    padding: var(--vfjs-editor-ai-padding, var(--vfjs-space-2) var(--vfjs-space-3));
    border: var(--vfjs-editor-ai-border, var(--vfjs-border-width) solid color-mix(in srgb, var(--_vfjs-editor-ai-accent) 45%, transparent));
    border-radius: var(--vfjs-editor-ai-radius, var(--vfjs-radius-md));
    background: var(--vfjs-editor-ai-bg, color-mix(in srgb, var(--_vfjs-editor-ai-accent) 6%, var(--vfjs-bg)));
    color: var(--vfjs-editor-ai-fg, var(--vfjs-editor-content-fg, var(--_vfjs-editor-fg)));
    cursor: default;
  }
  .vfjs-editor-ai-answer {
    > :first-child { margin-block-start: 0; }
    > :last-child { margin-block-end: 0; }
  }
  .vfjs-editor-ai-preview {
    &[data-status="streaming"] .vfjs-editor-ai-answer > :last-child::after { content: '▍'; color: var(--vfjs-editor-ai-cursor, var(--_vfjs-editor-ai-accent)); }
    &[data-status="error"] .vfjs-editor-ai-status { color: var(--vfjs-editor-ai-error-fg, var(--vfjs-danger)); }
  }
  .vfjs-editor-ai-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vfjs-editor-ai-gap, var(--vfjs-space-2));
    margin-block-start: var(--vfjs-space-2);
    padding-block-start: var(--vfjs-space-2);
    border-block-start: var(--vfjs-editor-ai-bar-border, var(--vfjs-border-width) solid var(--vfjs-border));
    font-family: var(--_vfjs-editor-font);
    font-size: var(--vfjs-editor-ai-font-size, var(--vfjs-font-size-sm));
    color: var(--vfjs-editor-ai-bar-fg, var(--vfjs-muted));
    .vfjs-editor-btn { block-size: auto; min-block-size: var(--_vfjs-editor-btn-height); padding: 0 var(--vfjs-space-2); font-size: var(--vfjs-editor-ai-font-size, var(--vfjs-font-size-sm));
      &[hidden] { display: none; }
    }
    .vfjs-editor-ai-accept { background: var(--vfjs-editor-ai-accept-bg, var(--_vfjs-editor-ai-accent)); color: var(--vfjs-editor-ai-accept-fg, var(--vfjs-accent-fg)); border-color: var(--vfjs-editor-ai-accept-bg, var(--_vfjs-editor-ai-accent)); }
  }
  .vfjs-editor-ai-status { flex: 1 1 auto; min-inline-size: 0; }
  .vfjs-editor-popover.vfjs-editor-ai-panel {
    inline-size: var(--vfjs-editor-ai-panel-width, calc(var(--vfjs-size-unit) * 320));
    display: flex;
    flex-direction: column;
    gap: var(--vfjs-space-1);
  }
  .vfjs-editor-ai-head {
    display: flex;
    align-items: center;
    gap: var(--vfjs-space-1);
    color: var(--_vfjs-editor-ai-accent);
    font-weight: var(--vfjs-font-weight-semibold);
    font-size: var(--vfjs-font-size-sm);
  }
  .vfjs-editor-ai-input {
    inline-size: 100%;
    box-sizing: border-box;
    padding: var(--vfjs-editor-ai-input-padding, var(--vfjs-space-1) var(--vfjs-space-2));
    border: var(--vfjs-editor-ai-input-border, var(--vfjs-border-width) solid var(--vfjs-border));
    border-radius: var(--vfjs-editor-ai-input-radius, var(--vfjs-radius-sm));
    background: var(--vfjs-editor-ai-input-bg, var(--vfjs-bg));
    color: var(--vfjs-editor-ai-input-fg, var(--vfjs-fg));
    font-family: var(--_vfjs-editor-font);
    font-size: var(--vfjs-font-size);
    &:focus-visible { outline: var(--vfjs-focus-ring-width) var(--vfjs-focus-ring-style) var(--vfjs-focus-ring-color, var(--vfjs-accent)); outline-offset: var(--vfjs-focus-ring-offset); }
  }
  .vfjs-editor-ai-list { max-block-size: var(--vfjs-editor-ai-panel-height, calc(var(--vfjs-size-unit) * 280)); overflow-y: auto; }
  .vfjs-editor-ai-group {
    padding: var(--vfjs-space-2) var(--vfjs-space-2) var(--vfjs-space-1);
    font-size: var(--vfjs-font-size-xs);
    color: var(--vfjs-editor-ai-group-fg, var(--vfjs-muted));
    text-transform: uppercase;
    letter-spacing: calc(var(--vfjs-letter-spacing-caps) * 1.2);
  }
  .vfjs-editor-ai-hint { padding: 0 var(--vfjs-space-1); font-size: var(--vfjs-font-size-xs); color: var(--vfjs-editor-ai-group-fg, var(--vfjs-muted)); }
  .vfjs-editor {
    &.vfjs-editor-is-pages {
      .vfjs-editor-body { background: var(--_vfjs-editor-pages-bg); padding: var(--_vfjs-editor-page-gap); overflow: auto; }
      .vfjs-editor-pages-stage > .vfjs-editor-content {
        position: relative;
        z-index: calc(var(--vfjs-z-base) + 1);
        flex: none;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow: visible;
      }
      .vfjs-editor-content pre { overflow-x: visible; white-space: pre-wrap; }
    }
    &.vfjs-editor-is-comparing .vfjs-editor-pages-stage { display: none; }
  }
  .vfjs-editor-pages-stage { position: relative; flex: 0 0 auto; align-self: flex-start; margin-inline: auto; }
  .vfjs-editor-pages, .vfjs-editor-pages-front { position: absolute; inset: 0; pointer-events: none; }
  .vfjs-editor-pages-front { z-index: calc(var(--vfjs-z-base) + 2); }
  .vfjs-editor-page {
    position: absolute;
    inset-inline: 0;
    box-sizing: border-box;
    background: var(--vfjs-editor-page-bg, var(--vfjs-bg));
    border: var(--vfjs-editor-page-border, var(--vfjs-border-width) solid color-mix(in srgb, var(--vfjs-border) 70%, transparent));
    box-shadow: var(--vfjs-editor-page-shadow, var(--vfjs-shadow-sm));
  }
  .vfjs-editor-page-cover { position: absolute; inset-inline: var(--vfjs-border-width); background: var(--vfjs-editor-page-bg, var(--vfjs-bg)); }
  .vfjs-editor-page-gap { position: absolute; inset-inline: 0; background: var(--_vfjs-editor-pages-bg); }
  .vfjs-editor-page-header, .vfjs-editor-page-footer {
    position: absolute;
    inset-inline: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: var(--vfjs-space-3);
    font-family: var(--vfjs-editor-page-font, var(--vfjs-editor-content-font, var(--_vfjs-editor-font)));
    font-size: var(--vfjs-editor-page-header-size, var(--vfjs-font-size-xs));
    color: var(--vfjs-editor-page-header-fg, var(--vfjs-muted));
  }
  .vfjs-editor-page-text { flex: 1 1 0; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    &[data-align="left"] { text-align: left; /* physical: the side of the paper the option names (as the PDF / DOCX) */ }
    &[data-align="center"] { text-align: center; }
    &[data-align="right"] { text-align: right; /* physical: the side of the paper the option names (as the PDF / DOCX) */ }
  }
  .vfjs-editor-content {
    &.vfjs-editor-pages-repeat {
      position: absolute;
      margin: 0;
      padding: 0;
      min-block-size: 0;
      max-inline-size: none;
      border: 0;
      background: transparent;
      overflow: visible;
      > table, > table.vfjs-editor-table { margin: 0; }
    }
  }
  .vfjs-editor-statusbar-pages { display: inline-flex; align-items: center; gap: var(--vfjs-space-2); margin-inline-end: auto; }
  .vfjs-editor-statusbar .vfjs-editor-statusbar-zoom { block-size: auto; min-block-size: 0; min-inline-size: 0; padding: 0 var(--vfjs-space-1); font-size: inherit; }
  .vfjs-editor-peers { position: absolute; overflow: hidden; pointer-events: none; z-index: var(--vfjs-editor-peers-z, var(--vfjs-z-base)); }
  .vfjs-editor-peer { position: absolute; inset: 0; }
  .vfjs-editor-peer-sel { position: absolute; background: color-mix(in srgb, var(--vfjs-editor-peer-color, var(--_vfjs-editor-peer-color)) var(--vfjs-editor-peer-selection-mix, 24%), transparent); }
  .vfjs-editor-peer-caret { position: absolute; inline-size: var(--vfjs-editor-peer-caret-width, var(--vfjs-border-width-thick)); background: var(--vfjs-editor-peer-color, var(--_vfjs-editor-peer-color)); }
  .vfjs-editor-peer-flag {
    position: absolute;
    inset-block-end: 100%;
    inset-inline-start: 0;
    padding: var(--vfjs-editor-peer-flag-padding, 0 var(--vfjs-space-1));
    border-radius: var(--vfjs-editor-peer-flag-radius, var(--vfjs-radius-sm));
    background: var(--vfjs-editor-peer-color, var(--_vfjs-editor-peer-color));
    color: var(--vfjs-editor-peer-flag-fg, var(--vfjs-accent-fg));
    font-family: var(--vfjs-editor-peer-flag-font, var(--vfjs-font));
    font-size: var(--vfjs-editor-peer-flag-size, var(--vfjs-font-size-xs));
    font-weight: var(--vfjs-editor-peer-flag-weight, var(--vfjs-font-weight-semibold));
    line-height: var(--vfjs-editor-peer-flag-line-height, var(--vfjs-line-height-tight));
    white-space: nowrap;
    &.vfjs-editor-peer-flag-below { inset-block-end: auto; inset-block-start: 100%; }
    &.vfjs-editor-peer-is-typing::after { content: var(--vfjs-editor-peer-typing-mark, '…'); }
  }
  .vfjs-editor-peer-list { display: inline-flex; align-items: center; gap: var(--vfjs-editor-peer-chip-gap, var(--vfjs-space-1));
    &:empty { display: none; }
  }
  .vfjs-editor-peer-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: var(--vfjs-editor-peer-chip-size, calc(var(--vfjs-size-unit) * 18));
    block-size: var(--vfjs-editor-peer-chip-size, calc(var(--vfjs-size-unit) * 18));
    border-radius: var(--vfjs-editor-peer-chip-radius, var(--vfjs-radius-full));
    background: var(--vfjs-editor-peer-color, var(--_vfjs-editor-peer-color));
    color: var(--vfjs-editor-peer-flag-fg, var(--vfjs-accent-fg));
    font-size: var(--vfjs-editor-peer-chip-font-size, var(--vfjs-font-size-xs));
    font-weight: var(--vfjs-editor-peer-flag-weight, var(--vfjs-font-weight-semibold));
    line-height: var(--vfjs-line-height-none);
    &.vfjs-editor-peer-is-typing { outline: var(--_vfjs-editor-peer-typing-outline); outline-offset: var(--vfjs-editor-peer-typing-offset, var(--vfjs-border-width)); }
  }

  /* U20: component tokens set on a container reach the components */
  :where(:has(> .vfjs)):not(.vfjs, .vfjs *) {
    --_vfjs-accent-soft: var(--vfjs-accent-soft);
    --_vfjs-active-bg: var(--vfjs-active-bg);
    --_vfjs-backdrop: var(--vfjs-backdrop);
    --_vfjs-code-attr: var(--vfjs-code-attr);
    --_vfjs-code-string: var(--vfjs-code-string);
    --_vfjs-control-height: var(--vfjs-control-height);
    --_vfjs-control-height-lg: var(--vfjs-control-height-lg);
    --_vfjs-control-height-sm: var(--vfjs-control-height-sm);
    --_vfjs-control-height-xs: var(--vfjs-control-height-xs);
    --_vfjs-critical: var(--vfjs-critical);
    --_vfjs-critical-fg: var(--vfjs-critical-fg);
    --_vfjs-danger: var(--vfjs-danger);
    --_vfjs-danger-fg: var(--vfjs-danger-fg);
    --_vfjs-danger-soft: var(--vfjs-danger-soft);
    --_vfjs-disabled-bg: var(--vfjs-disabled-bg);
    --_vfjs-disabled-fg: var(--vfjs-disabled-fg);
    --_vfjs-down: var(--vfjs-down);
    --_vfjs-font-size-2xl: var(--vfjs-font-size-2xl);
    --_vfjs-font-size-2xs: var(--vfjs-font-size-2xs);
    --_vfjs-font-size-3xl: var(--vfjs-font-size-3xl);
    --_vfjs-font-size-3xs: var(--vfjs-font-size-3xs);
    --_vfjs-font-size-4xl: var(--vfjs-font-size-4xl);
    --_vfjs-font-size-5xl: var(--vfjs-font-size-5xl);
    --_vfjs-font-size-lg: var(--vfjs-font-size-lg);
    --_vfjs-font-size-sm: var(--vfjs-font-size-sm);
    --_vfjs-font-size-xl: var(--vfjs-font-size-xl);
    --_vfjs-font-size-xs: var(--vfjs-font-size-xs);
    --_vfjs-hover-bg: var(--vfjs-hover-bg);
    --_vfjs-hover-fg: var(--vfjs-hover-fg);
    --_vfjs-icon-size: var(--vfjs-icon-size);
    --_vfjs-info: var(--vfjs-info);
    --_vfjs-info-fg: var(--vfjs-info-fg);
    --_vfjs-info-soft: var(--vfjs-info-soft);
    --_vfjs-motion-duration-fast: var(--vfjs-motion-duration-fast);
    --_vfjs-motion-duration-slow: var(--vfjs-motion-duration-slow);
    --_vfjs-radius-full: var(--vfjs-radius-full);
    --_vfjs-radius-lg: var(--vfjs-radius-lg);
    --_vfjs-radius-md: var(--vfjs-radius-md);
    --_vfjs-radius-pill: var(--vfjs-radius-pill);
    --_vfjs-radius-sm: var(--vfjs-radius-sm);
    --_vfjs-radius-xl: var(--vfjs-radius-xl);
    --_vfjs-radius-xs: var(--vfjs-radius-xs);
    --_vfjs-selected-bg: var(--vfjs-selected-bg);
    --_vfjs-selected-fg: var(--vfjs-selected-fg);
    --_vfjs-selected-strong-bg: var(--vfjs-selected-strong-bg);
    --_vfjs-selected-strong-fg: var(--vfjs-selected-strong-fg);
    --_vfjs-space: var(--vfjs-space);
    --_vfjs-space-1: var(--vfjs-space-1);
    --_vfjs-space-2: var(--vfjs-space-2);
    --_vfjs-space-3: var(--vfjs-space-3);
    --_vfjs-space-4: var(--vfjs-space-4);
    --_vfjs-space-5: var(--vfjs-space-5);
    --_vfjs-space-6: var(--vfjs-space-6);
    --_vfjs-space-8: var(--vfjs-space-8);
    --_vfjs-success: var(--vfjs-success);
    --_vfjs-success-fg: var(--vfjs-success-fg);
    --_vfjs-success-soft: var(--vfjs-success-soft);
    --_vfjs-up: var(--vfjs-up);
    --_vfjs-warning: var(--vfjs-warning);
    --_vfjs-warning-fg: var(--vfjs-warning-fg);
    --_vfjs-warning-soft: var(--vfjs-warning-soft);
  }
  :where(:has(> .vfjs)):not(.vfjs) {
    --_vfjs-focus-ring-color: var(--vfjs-focus-ring-color);
  }
  :where([data-vfjs-theme]:not(.vfjs)) {
    --vfjs-focus-ring-color: initial;
  }
  .vfjs[data-vfjs-theme-own] {
    --_vfjs-focus-ring-color: initial;
  }
}
