/* ElevenLabs light workspace: restored from the approved reference. */
    :root {
      --bg: #f7f7f5;
      --surface: #ffffff;
      --surface-warm: #f1f0ec;
      --fg: #111111;
      --fg-2: #343434;
      --muted: #6b6b67;
      --meta: #5f5f5b;
      --border: #deddd8;
      --border-soft: #ecebe7;
      --accent: #111111;
      --accent-on: #ffffff;
      --accent-hover: #2a2a2a;
      --accent-active: #000000;
      --success: #26734d;
      --warn: #9a6700;
      --danger: #b42318;
      --font-display: Waldenburg, "Helvetica Neue", Arial, sans-serif;
      --font-body: Inter, system-ui, sans-serif;
      --font-mono: "Geist Mono", ui-monospace, Menlo, monospace;
      --text-xs: 12px;
      --text-sm: 14px;
      --text-base: 16px;
      --text-lg: 18px;
      --text-xl: 24px;
      --text-2xl: 36px;
      --text-3xl: 54px;
      --text-4xl: 76px;
      --leading-body: 1.52;
      --leading-tight: 1.08;
      --tracking-display: -0.025em;
      --space-1: 4px;
      --space-2: 8px;
      --space-3: 12px;
      --space-4: 16px;
      --space-5: 20px;
      --space-6: 24px;
      --space-8: 32px;
      --space-12: 48px;
      --section-y-desktop: 96px;
      --section-y-tablet: 68px;
      --section-y-phone: 48px;
      --radius-sm: 12px;
      --radius-md: 16px;
      --radius-lg: 24px;
      --radius-pill: 9999px;
      --elev-flat: none;
      --elev-ring: 0 0 0 1px rgba(17, 17, 17, 0.08);
      --elev-raised: 0 1px 2px rgba(17, 17, 17, 0.05), 0 12px 32px rgba(17, 17, 17, 0.07);
      --focus-ring: 0 0 0 4px rgba(37, 99, 235, 0.18);
      --motion-fast: 150ms;
      --motion-base: 200ms;
      --ease-standard: cubic-bezier(0.2, 0, 0, 1);
      --container-max: 1180px;
      --container-gutter-desktop: 36px;
      --container-gutter-tablet: 24px;
      --container-gutter-phone: 16px;

      --surface-raised: var(--bg);
      --accent-soft: var(--surface-warm);
      --edge: var(--muted);
      --node-human: var(--fg);
      --node-ai: var(--muted);
      --node-sys: var(--fg-2);
      --elev-ring-accent: var(--focus-ring);
      --sidebar-w: 228px;
      --wire: var(--border);
      --dash: 1px dashed var(--border);
      --solid: 1px solid var(--border);
      --fill-box: var(--surface);
      --fill-sel: var(--accent-soft);
      --font-weight: 400;
    }

    *, *::before, *::after { box-sizing: border-box; }
    html, body { height: 100%; }
    html { color-scheme: light; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--fg);
      font-family: var(--font-body);
      font-size: var(--text-sm);
      font-weight: var(--font-weight);
      line-height: var(--leading-body);
      letter-spacing: 0.01em;
      -webkit-font-smoothing: antialiased;
    }
    button, input, select, textarea {
      font: inherit;
      color: inherit;
      font-style: normal;
    }
    button { cursor: pointer; }
    button:disabled { cursor: not-allowed; opacity: 0.48; background: var(--surface-warm); color: var(--muted); box-shadow: none; }
    button:active:not(:disabled) { transform: translateY(1px); }
    em, i, .italic { font-style: normal !important; }
    :focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; box-shadow: var(--focus-ring); }
    .skip-link {
      position: fixed;
      left: var(--space-3);
      top: var(--space-3);
      z-index: 20;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      background: var(--accent);
      color: var(--accent-on);
      transform: translateY(-160%);
    }
    .skip-link:focus { transform: translateY(0); }
    .sr-only {
      position: absolute !important;
      width: 1px; height: 1px;
      padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0, 0, 0, 0);
      white-space: nowrap; border: 0;
    }

    .app {
      display: grid;
      grid-template-columns: var(--sidebar-w) 1fr;
      grid-template-rows: 1fr;
      height: 100dvh;
      min-height: 640px;
    }
    .topbar {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      gap: var(--space-4);
      padding: 0 var(--space-5);
      border-bottom: var(--solid);
      background: color-mix(in oklab, var(--surface) 88%, transparent);
      backdrop-filter: blur(14px);
    }
    .brand {
      margin: 0;
      font-family: var(--font-display);
      font-weight: 300;
      font-size: var(--text-xl);
      letter-spacing: var(--tracking-display);
      white-space: nowrap;
    }
    .brand span { color: var(--muted); font-family: var(--font-body); font-weight: 400; margin-left: 6px; font-size: var(--text-sm); }
    .crumbs {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: var(--text-sm);
      min-width: 0;
      flex: 1;
    }
    .crumbs b { color: var(--fg); font-weight: 500; }
    .top-actions { display: flex; align-items: center; gap: 8px; }
    .svc-rail {
      display: flex;
      align-items: center;
      gap: 6px;
      max-width: 34vw;
    }
    .svc {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.02em;
      border: var(--solid);
      border-radius: var(--radius-pill);
      padding: 6px 10px;
      color: var(--muted);
      background: var(--bg);
      white-space: nowrap;
    }
    .svc.ok {
      color: color-mix(in oklab, var(--success) 64%, var(--fg));
      font-size: 11px;
      font-weight: 600;
      border-color: color-mix(in oklab, var(--success) 35%, var(--border));
      background: color-mix(in oklab, var(--success) 10%, var(--bg));
    }
    .svc .port { color: var(--meta); }
    .life {
      font-family: var(--font-mono);
      font-size: 11px;
      border: var(--solid);
      border-radius: var(--radius-pill);
      padding: 6px 10px;
      background: color-mix(in oklab, var(--warn) 12%, var(--bg));
      color: color-mix(in oklab, var(--warn) 58%, var(--fg));
      border-color: color-mix(in oklab, var(--warn) 40%, var(--border));
      white-space: nowrap;
    }
    .life strong { color: var(--fg); font-weight: 500; }
    .yumi-dock {
      border-top: var(--solid);
      background: var(--surface-warm);
      padding: 10px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .yumi-dock .yh {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .yumi-dock .yh b {
      font-size: 12px;
      letter-spacing: var(--tracking-display);
    }
    .yumi-dock .prompt {
      border: var(--dash);
      border-radius: var(--radius-sm);
      padding: 8px 10px;
      background: var(--bg);
      color: var(--muted);
      font-size: 12px;
      min-height: 52px;
    }
    .edge-label {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      fill: var(--meta);
      paint-order: stroke;
      stroke: var(--surface);
      stroke-width: 5px;
      stroke-linejoin: round;
    }
    .canvas-tools {
      position: absolute;
      right: 12px;
      top: 12px;
      z-index: 2;
      display: flex;
      gap: 6px;
    }
    .node .nk .edge {
      display: block;
      margin-top: 2px;
      color: var(--edge);
    }

    .sidebar {
      border-right: var(--solid);
      background: color-mix(in oklab, var(--surface-warm) 54%, var(--bg));
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: auto;
      padding: var(--space-3) 0 var(--space-6);
      position: relative;
    }
    .sidebar-resizer {
      position: absolute;
      top: 0;
      right: 0;
      width: 8px;
      height: 100%;
      cursor: col-resize;
      z-index: 4;
      touch-action: none;
    }
    .sidebar-resizer::after {
      content: "";
      position: absolute;
      top: 0;
      right: 0;
      width: 1px;
      height: 100%;
      background: transparent;
    }
    .sidebar-resizer:hover::after,
    .sidebar-resizer:focus-visible::after,
    .app.is-resizing-sidebar .sidebar-resizer::after {
      background: var(--fg);
    }
    .sidebar-resizer:focus-visible { outline: none; }
    .app.is-resizing-sidebar,
    .app.is-resizing-sidebar * {
      cursor: col-resize !important;
      user-select: none !important;
    }
    .sidebar-brand {
      padding: 10px 16px 14px;
      margin: 0 0 4px;
    }
    .sidebar-brand .brand {
      white-space: normal;
      line-height: 1.15;
    }
    .nav-group { padding: 0 var(--space-2) var(--space-3); }
    .nav-label {
      font-family: var(--font-mono);
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--meta);
      padding: 10px 12px 6px;
    }
    .nav-item {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 10px;
      text-align: left;
      border: 0;
      background: transparent;
      color: var(--fg-2);
      border-radius: var(--radius-pill);
      padding: 9px 12px;
      min-height: 40px;
      transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
    }
    .nav-item:hover { background: var(--surface); color: var(--fg); box-shadow: var(--elev-ring); }
    .nav-item:active { background: var(--surface-warm); }
    .nav-item.active {
      background: var(--surface);
      color: var(--fg);
      box-shadow: var(--elev-ring);
    }
    .nav-item .n {
      display: inline-block;
      min-width: 20px;
      color: var(--meta);
      font-family: var(--font-mono);
      font-size: 10px;
    }

    .main {
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      background: var(--bg);
    }
    .view { display: none; flex: 1; min-height: 0; flex-direction: column; }
    .view.active { display: flex; }

    .badge {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      border: var(--solid);
      border-radius: var(--radius-pill);
      padding: 4px 10px;
      color: var(--muted);
      background: var(--bg);
      white-space: nowrap;
    }
    .badge.on {
      color: var(--accent);
      border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
      background: var(--accent-soft);
    }

    .btn {
      border: var(--solid);
      background: var(--surface-raised);
      color: var(--fg);
      border-radius: var(--radius-pill);
      padding: 8px 14px;
      min-height: 40px;
      font-weight: 500;
      transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
    }
    .btn:hover:not(:disabled) { background: var(--surface-warm); border-color: var(--meta); }
    .btn:active:not(:disabled) { background: var(--border-soft); }
    .btn-sm { padding: 6px 12px; min-height: 36px; font-size: var(--text-xs); }
    .btn-primary {
      background: var(--accent);
      color: var(--accent-on);
      border-color: var(--accent);
      box-shadow: var(--elev-raised);
    }
    .btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
    .btn-primary:active:not(:disabled) { background: var(--accent-active); border-color: var(--accent-active); }
    .btn-ghost { background: transparent; }
    .btn[data-loading="true"] { position: relative; color: transparent; pointer-events: none; }
    .btn[data-loading="true"]::after {
      content: "";
      position: absolute;
      width: 14px; height: 14px;
      inset: 0; margin: auto;
      border: 2px solid color-mix(in oklab, var(--accent-on) 28%, transparent);
      border-top-color: var(--accent-on);
      border-radius: 50%;
      animation: spin 700ms linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .toolbar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px var(--space-4);
      border-bottom: var(--solid);
      background: var(--surface);
      flex-wrap: wrap;
      min-height: 52px;
    }
    .toolbar .sep {
      width: 1px;
      height: 18px;
      background: var(--border);
    }
    .w-grow { flex: 1; }
    .muted { color: var(--muted); }
    .mono { font-family: var(--font-mono); font-size: 12px; }
    .w-title {
      font-family: var(--font-display);
      font-weight: 300;
      font-size: var(--text-xl);
      line-height: var(--leading-tight);
      letter-spacing: var(--tracking-display);
    }
    .view-heading { min-width: min(440px, 100%); }
    .view-heading .w-title { display: block; }
    .view-heading .muted { display: block; margin-top: 2px; font-size: 12px; }

    .seg {
      display: inline-flex;
      border: var(--solid);
      border-radius: var(--radius-sm);
      overflow: hidden;
      background: var(--bg);
    }
    .seg button {
      border: 0;
      background: transparent;
      padding: 6px 12px;
      color: var(--muted);
      border-right: var(--solid);
    }
    .seg button:last-child { border-right: 0; }
    .seg button.active {
      background: var(--accent);
      color: var(--accent-on);
    }

    .pane-split, .pane-2 {
      flex: 1;
      min-height: 0;
      display: grid;
      gap: 0;
    }
    .pane-split { grid-template-columns: 260px 1fr; }
    .pane-split.is-proc { grid-template-columns: 200px 1fr 280px; }
    .pane-2 { grid-template-columns: 1fr 1fr; }
    .pane {
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      border-right: var(--solid);
      background: var(--surface);
    }
    .pane:last-child { border-right: 0; }
    .pane-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 10px 14px;
      border-bottom: var(--solid);
      background: var(--surface);
      font-weight: 500;
      font-size: var(--text-sm);
    }
    .pane-body { padding: 14px; overflow: auto; }
    .w-scroll { overflow: auto; flex: 1; min-height: 0; }
    .workspace-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 1px;
      margin-top: auto;
      border-top: var(--solid);
      background: var(--border);
    }
    .workspace-summary .summary-item { min-height: 82px; padding: 14px 16px; background: var(--surface); }
    .workspace-summary b { display: block; font-size: 17px; font-weight: 500; }
    .workspace-summary span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
    .submodule-strip { display:flex; gap:6px; flex-wrap:wrap; padding:10px 14px; border-bottom:var(--solid); background:var(--surface-warm); }
    .submodule-strip span, .submodule-strip button {
      padding:5px 9px; border:0; border-radius:var(--radius-pill); background:var(--surface);
      box-shadow:var(--elev-ring); color:var(--fg-2); font:11px var(--font-mono); cursor:pointer;
    }
    .submodule-strip button.active { background:var(--fg); color:var(--bg); }
    .submodule-strip button:focus-visible { outline:2px solid var(--fg); outline-offset:2px; }
    .proto-panel[hidden] { display:none !important; }
    #proc-graph { transform-origin: 40px 40px; transition: transform 160ms ease; }
    #od-toast {
      position:fixed; bottom:20px; left:50%; transform:translateX(-50%) translateY(12px);
      z-index:80; min-width:240px; max-width:min(520px, calc(100vw - 32px));
      padding:10px 14px; border-radius:var(--radius-pill); background:var(--fg); color:var(--bg);
      font-size:13px; opacity:0; pointer-events:none; transition:opacity 160ms ease, transform 160ms ease;
    }
    #od-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
    #od-modal[hidden] { display:none !important; }
    #od-modal {
      position:fixed; inset:0; z-index:90; display:grid; place-items:center;
      background:color-mix(in oklab, var(--fg) 28%, transparent);
    }
    .od-dialog {
      width:min(560px, calc(100vw - 32px)); max-height:min(80vh, 720px); overflow:auto;
      padding:20px; border-radius:var(--radius-lg); background:var(--surface); color:var(--fg);
      box-shadow:0 18px 40px color-mix(in oklab, var(--fg) 18%, transparent);
    }
    .od-dialog h2 { margin:0 0 8px; font-size:18px; font-weight:500; }
    .od-dialog p, .od-dialog label { margin:0 0 10px; color:var(--fg-2); font-size:13px; line-height:1.5; }
    .od-dialog .field { display:grid; gap:4px; margin:0 0 12px; }
    .od-dialog input, .od-dialog select, .od-dialog textarea {
      width:100%; min-height:40px; padding:8px 10px; border:var(--solid); border-radius:var(--radius-md);
      background:var(--bg); color:var(--fg); font:13px var(--font-sans);
    }
    .od-dialog .actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
    .preview-frame { width:100%; min-height:280px; border:0; background:var(--bg); border-radius:var(--radius-md); }
    .compliance-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
    .compliance-panel { min-width:0; padding:14px; border-radius:var(--radius-md); background:var(--surface); box-shadow:var(--elev-ring); }
    .compliance-panel h3 { margin:0 0 8px; font-size:13px; font-weight:500; }
    .compliance-panel p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
    .dxg-preview { margin-top:14px; padding:14px; border-radius:var(--radius-md); background:var(--surface-warm); box-shadow:var(--elev-ring); }
    .dxg-preview strong { display:block; margin-bottom:8px; }
    .dxg-field { display:grid; grid-template-columns:1fr auto; gap:8px; padding:8px 0; border-bottom:var(--solid); font-size:12px; }
    .preview-notice {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 9px 14px; border-bottom: var(--solid); background: var(--surface-warm);
      color: var(--fg-2); font-size: 12px;
    }
    .preview-notice strong { font-weight: 500; }
    .preview-notice .mono { color: var(--meta); }

    .list-item {
      width: 100%;
      display: flex;
      text-align: left;
      border: 0;
      border-bottom: var(--solid);
      background: transparent;
      padding: 12px 14px;
      color: var(--fg);
      transition: background var(--motion-fast) var(--ease-standard);
    }
    .list-item:hover { background: var(--surface); }
    .list-item.active {
      background: var(--fill-sel);
      box-shadow: inset 3px 0 0 var(--accent);
    }
    .list-item .t { font-weight: 500; }
    .list-item .d { color: var(--muted); font-size: 12px; margin-top: 2px; font-family: var(--font-mono); }

    .kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; margin: 0; }
    .kv dt { color: var(--muted); font-size: 12px; }
    .kv dd { margin: 0; }

    .note {
      margin-top: 12px;
      padding: 10px 12px;
      border: var(--dash);
      border-radius: var(--radius-md);
      color: var(--muted);
      font-size: 12px;
      background: color-mix(in oklab, var(--surface) 65%, transparent);
    }

    .chip {
      display: inline-flex;
      align-items: center;
      border: var(--solid);
      border-radius: var(--radius-pill);
      padding: 2px 8px;
      font-size: 11px;
      color: var(--muted);
      background: var(--bg);
    }
    .chip.active {
      color: var(--accent);
      border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
      background: var(--accent-soft);
    }

    .ds-table { width: 100%; border-collapse: collapse; }
    .ds-table th, .ds-table td {
      text-align: left;
      padding: 12px 10px;
      border-bottom: var(--solid);
      vertical-align: top;
    }
    .ds-table th {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--meta);
      font-weight: 500;
    }

    .code {
      font-family: var(--font-mono);
      font-size: 12px;
      line-height: 1.5;
      white-space: pre-wrap;
      border: var(--solid);
      border-radius: var(--radius-sm);
      padding: 12px;
      background: var(--surface);
      color: var(--fg-2);
    }

    .toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border-bottom: 1px solid var(--border-soft);
      font-size: 13px;
    }
    .switch {
      width: 44px;
      height: 24px;
      border-radius: var(--radius-md);
      border: var(--solid);
      background: var(--surface);
      position: relative;
      flex: 0 0 auto;
      padding: 0;
      cursor: pointer;
    }
    .switch::after {
      content: "";
      position: absolute;
      top: 4px; left: 4px;
      width: 14px; height: 14px;
      border-radius: 50%;
      background: var(--muted);
      transition: transform var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
    }
    .switch.on { background: var(--accent-soft); border-color: var(--accent); }
    .switch.on::after { transform: translateX(20px); background: var(--accent); }
    .switch:focus-visible { outline-offset: 3px; }

    .graph-shell {
      position: relative;
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 336px;
    }
    .graph-shell.inspector-closed {
      grid-template-columns: 1fr;
    }
    .graph-shell.inspector-closed .graph-canvas { border-right: 0; }
    .graph-shell.inspector-closed > .pane { display: none; }
    .graph-canvas {
      position: relative;
      min-height: 0;
      overflow: auto;
      border-right: var(--solid);
      isolation: isolate;
    }
    .graph-intro {
      position: sticky;
      top: 0;
      left: 0;
      z-index: 3;
      display: flex;
      align-items: center;
      gap: var(--space-4);
      min-width: 0;
      padding: 14px 18px;
      border-bottom: var(--solid);
      background: color-mix(in oklab, var(--surface) 92%, transparent);
      backdrop-filter: blur(12px);
    }
    .graph-intro .w-title {
      max-width: 18ch;
      font-size: var(--text-2xl);
      font-weight: 300;
    }
    .graph-intro p { margin: 3px 0 0; color: var(--muted); font-size: 12px; max-width: 62ch; }
    .graph-intro .hint { margin-left: auto; }
    .graph-canvas {
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    #vs-viewport {
      flex: 1;
      min-height: 0;
      overflow: hidden;
      cursor: grab;
      position: relative;
      touch-action: none;
    }
    #vs-viewport.is-panning,
    #vs-viewport:active { cursor: grabbing; }
    .vs-hit {
      position: absolute;
      inset: 0;
      z-index: 0;
    }
    .graph-stage { z-index: 1; }
    .vs-zoom {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: auto;
    }
    .vs-zoom .lab {
      font-family: var(--font-mono);
      font-size: 10px;
      min-width: 36px;
      text-align: center;
      color: var(--muted);
    }
    .graph-stage {
      position: relative;
      width: max-content;
      min-width: 720px;
      height: auto;
      min-height: 0;
      margin: 20px 16px 28px;
      overflow: visible;
      transform-origin: 0 0;
    }
    .graph-stage svg.edges {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      overflow: visible;
    }
    .graph-stage svg.edges path {
      fill: none;
      stroke: var(--edge);
      stroke-width: 1.5;
      stroke-linecap: round;
    }
    .graph-stage svg.edges path.peer {
      stroke: color-mix(in oklab, var(--edge) 42%, transparent);
      stroke-dasharray: 4 5;
    }
    .graph-stage svg.edges path.next-flow {
      stroke: var(--fg);
      stroke-width: 1.7;
      stroke-dasharray: 5 9;
      animation: vs-dash 0.85s linear infinite;
    }
    .graph-stage svg.edges .next-flash {
      fill: var(--fg);
    }
    @keyframes vs-dash { to { stroke-dashoffset: -14; } }
    .graph-stage svg.edges .edge-label {
      fill: var(--meta);
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.02em;
    }
    .graph-stage svg.edges .edge-label-bg {
      fill: var(--bg);
      stroke: var(--border);
      stroke-width: 1px;
      rx: 6px;
    }
    .g-node {
      position: absolute;
      box-sizing: border-box;
      height: 78px;
      min-width: 148px;
      max-width: 190px;
      border: var(--solid);
      border-radius: var(--radius-md);
      background: var(--surface-raised);
      box-shadow: var(--elev-ring), var(--elev-raised);
      padding: 10px 12px;
      text-align: left;
      color: var(--fg);
      transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
    }
    .g-run {
      position: absolute;
      right: 6px;
      bottom: 6px;
      font: 600 9px/1 var(--font-mono, ui-monospace, monospace);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 3px 6px;
      border: 1px solid var(--fg);
      background: var(--fg);
      color: var(--bg, #f5f4ed);
      pointer-events: auto;
    }
    .g-run:hover { opacity: 0.85; }
    .g-node:hover { border-color: var(--accent); box-shadow: var(--elev-raised); background: var(--surface-warm); }
    .g-node:active { transform: translateY(1px); }
    .g-node.active {
      border-color: var(--accent);
      box-shadow: var(--elev-ring-accent), var(--elev-raised);
      background: var(--accent-soft);
    }
    .g-node .k {
      font-family: var(--font-mono);
      font-size: 11px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--meta);
      margin-bottom: 4px;
    }
    .g-node .t { font-weight: 500; font-size: 14px; line-height: 1.25; }
    .g-node .m { margin-top: 6px; color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
    .g-node.stream {
      background: color-mix(in oklab, var(--accent-soft) 65%, var(--surface-raised));
      color: var(--fg);
      border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
      min-width: 156px;
    }
    .g-node.stream .k, .g-node.stream .m { color: var(--meta); }
    .g-node.stream.dim { opacity: 0.52; background: var(--surface-raised); border-color: var(--border); box-shadow: var(--elev-ring); }
    .g-node.stream.dim:hover { opacity: 0.82; border-color: var(--accent); }
    .g-node.stream.focus {
      opacity: 1;
      background: var(--accent);
      color: var(--accent-on);
      border-color: var(--accent);
      box-shadow: var(--elev-raised);
    }
    .g-node.stream.focus .k,
    .g-node.stream.focus .m { color: color-mix(in oklab, var(--accent-on) 72%, transparent); }
    .g-node.process {
      overflow: hidden;
      isolation: isolate;
    }
    .g-node.process::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0.14;
      background: repeating-linear-gradient(
        -32deg,
        transparent 0 6px,
        currentColor 6px 7px
      );
    }
    .g-node.heat-ok::after { color: var(--success); opacity: 0.11; }
    .g-node.heat-watch::after { color: var(--warn); opacity: 0.15; }
    .g-node.heat-urgent::after { color: var(--danger); opacity: 0.18; }
    .g-node .k::before {
      content: "";
      display: inline-block;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      margin-right: 6px;
      vertical-align: 1px;
      background: var(--line);
    }
    .g-node.stream .k::before,
    .g-node.process .k::before { display: none; }
    .g-node.step-human .k::before { background: var(--human); }
    .g-node.step-ai .k::before { background: var(--ai); }
    .g-node.step-sys .k::before { background: var(--sys); }
    .g-legend {
      position: sticky;
      left: 20px;
      bottom: 16px;
      display: flex;
      gap: 14px;
      font-size: 11px;
      color: var(--muted);
      background: var(--surface);
      border: var(--solid);
      border-radius: var(--radius-md);
      padding: 8px 12px;
      box-shadow: var(--elev-ring), var(--elev-raised);
    }
    .g-legend span > span {
      display: inline-block;
      width: 10px; height: 10px;
      border-radius: 2px;
      margin-right: 6px;
      vertical-align: -1px;
    }
    .g-legend .ok,
    .g-legend .watch,
    .g-legend .urgent {
      background-color: transparent;
      background-image: repeating-linear-gradient(
        -32deg,
        transparent 0 3px,
        currentColor 3px 4px
      );
    }
    .g-legend .ok { color: var(--success); }
    .g-legend .watch { color: var(--warn); }
    .g-legend .urgent { color: var(--danger); }
    .vs-kpis {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
      margin: 0 0 12px;
    }
    .vs-kpis .cell {
      border: var(--solid);
      border-radius: var(--radius-sm);
      padding: 4px 8px;
      background: var(--surface);
    }
    .vs-kpis .cell b { display: block; font-size: 18px; letter-spacing: var(--tracking-display); }
    .vs-kpis .cell span { color: var(--muted); font-size: 11px; }
    .drop-target { outline: 2px dashed var(--accent); outline-offset: -4px; }
    .pal-item[draggable="true"] { cursor: grab; }
    .pal-item[draggable="true"]:active { cursor: grabbing; }
    .portal-chrome {
      border: var(--solid);
      border-radius: var(--radius-md);
      overflow: hidden;
      background: var(--surface);
      margin: 0 0 14px;
    }
    .portal-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px 12px;
      background: #1B365D;
      color: #fff;
      font-size: 12px;
    }
    .portal-bar .logo { font-weight: 600; letter-spacing: 0.04em; }
    .portal-bar nav { display: flex; gap: 10px; opacity: 0.85; }
    .portal-chrome iframe {
      display: block;
      width: 100%;
      height: 220px;
      border: 0;
      background: #f5f4ed;
    }
    .fb-ctrl input, .fb-ctrl select, .fb-ctrl textarea {
      width: 100%;
      border: var(--solid);
      border-radius: 4px;
      padding: 6px 8px;
      font: inherit;
      background: var(--surface);
      color: var(--fg);
    }
    .fb-ctrl .switch-fake {
      display: inline-block;
      width: 36px; height: 20px;
      border-radius: 999px;
      background: var(--border);
      position: relative;
      vertical-align: middle;
    }
    .fb-ctrl .switch-fake::after {
      content: "";
      position: absolute;
      left: 2px; top: 2px;
      width: 16px; height: 16px;
      border-radius: 50%;
      background: var(--surface);
    }
    .field-stack { display: flex; flex-direction: column; gap: 12px; }
    .field-stack label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
    .field-stack textarea, .field-stack select, .field-stack input {
      width: 100%;
      border: var(--solid);
      border-radius: var(--radius-sm);
      padding: 8px;
      font: inherit;
      background: var(--surface);
    }

    .canvas {
      position: relative;
      flex: 1;
      min-height: 360px;
      overflow: auto;
      background: var(--surface);
    }
    .canvas-inner { position: relative; width: 980px; height: 420px; margin: 24px 56px 24px 24px; }
    .node {
      position: absolute;
      width: 150px;
      border: var(--solid);
      border-radius: var(--radius-md);
      background: var(--surface-raised);
      padding: 10px 12px;
      box-shadow: var(--elev-ring);
      cursor: pointer;
    }
    .node.active { border-color: var(--accent); background: var(--accent-soft); }
    .node .nt { font-weight: 500; font-size: 13px; }
    .node .nk { font-family: var(--font-mono); font-size: 10px; color: var(--meta); margin-top: 4px; }

    .fb-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px 1fr 280px; }
    .fb-palette { display: flex; flex-direction: column; gap: 8px; }
    .pal-item {
      display: flex; align-items: center; gap: 10px;
      width: 100%;
      border: var(--dash);
      border-radius: var(--radius-sm);
      padding: 10px;
      background: var(--surface-raised);
      color: var(--fg);
      text-align: left;
    }
    .pal-item:hover { border-style: solid; border-color: var(--accent); background: var(--surface-warm); }
    .pal-item[aria-pressed="true"] { border-style: solid; border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--elev-ring-accent); }
    .pal-item .ic {
      width: 24px; height: 24px;
      display: grid; place-items: center;
      border: var(--solid);
      border-radius: 4px;
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--accent);
      background: var(--accent-soft);
    }
    .form-canvas {
      border: var(--dash);
      border-radius: var(--radius-md);
      min-height: 0;
      flex: 1;
      display: flex;
      padding: 0;
      background: var(--surface-raised);
      margin: 10px;
      overflow: hidden;
    }
    .fb-block {
      width: 100%;
      border: var(--solid);
      border-radius: var(--radius-sm);
      padding: 12px;
      margin-bottom: 10px;
      background: var(--bg);
      color: var(--fg);
      text-align: left;
      cursor: pointer;
    }
    .fb-block.active { border-color: var(--accent); background: var(--accent-soft); }
    .fb-block .lbl { font-weight: 500; margin-bottom: 6px; }
    .fb-ctrl {
      border: var(--dash);
      border-radius: 4px;
      min-height: 32px;
      padding: 8px;
      color: var(--meta);
      font-size: 12px;
      background: var(--surface);
    }

    .kanban {
      display: grid;
      grid-template-columns: repeat(4, minmax(160px, 1fr));
      gap: 12px;
      padding: 16px;
      overflow: auto;
      flex: 1;
      align-content: start;
    }
    .k-col {
      border: var(--solid);
      border-radius: var(--radius-md);
      background: var(--surface);
      min-height: 280px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 10px;
    }
    .k-col-h {
      font-weight: 500;
      display: flex;
      justify-content: space-between;
      font-size: 13px;
    }
    .k-col-h span { font-family: var(--font-mono); font-size: 10px; color: var(--meta); font-weight: 500; }
    .k-card {
      border: var(--dash);
      border-radius: var(--radius-sm);
      background: var(--bg);
      padding: 10px;
    }
    .k-card .id { font-family: var(--font-mono); font-size: 11px; color: var(--meta); }
    .k-card .nm { font-weight: 500; margin-top: 4px; }
    .k-card .mt { font-size: 12px; color: var(--muted); margin-top: 4px; }

    .cap-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      align-content: start;
      gap: 12px;
      padding: 18px;
      overflow: auto;
    }
    .cap-card {
      border: var(--solid);
      border-radius: var(--radius-md);
      background: var(--surface-raised);
      padding: 14px;
      min-height: 220px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      box-shadow: var(--elev-ring), var(--elev-raised);
      text-align: left;
      cursor: pointer;
      transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
    }
    .cap-card:hover { border-color: var(--accent); background: var(--surface-warm); }
    .cap-card.active { border-color: var(--accent); background: var(--accent-soft); }
    .cap-card .tag {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--meta);
    }
    .cap-card h3 {
      margin: 0;
      font-size: var(--text-lg);
      font-weight: 500;
      letter-spacing: var(--tracking-display);
    }
    .cap-card p { margin: 0; color: var(--muted); font-size: 13px; }
    .cap-card .meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: auto;
    }

    .timeline { display: flex; flex-direction: column; gap: 0; }
    .tl-item {
      display: grid;
      grid-template-columns: 72px 16px 1fr;
      gap: 10px;
      padding: 10px 8px;
      border-radius: var(--radius-sm);
    }
    .tl-item.active { background: var(--surface-warm); box-shadow: inset 3px 0 0 var(--accent); }
    .tl-item .t { font-family: var(--font-mono); font-size: 11px; color: var(--meta); }
    .tl-item .dot {
      width: 10px; height: 10px; border-radius: 50%;
      background: var(--border);
      border: 2px solid var(--accent);
      margin-top: 4px;
      justify-self: center;
    }
    .tl-item.active .dot { background: var(--accent); }
    .tl-item .nm { font-weight: 500; }
    .tl-item .d { color: var(--muted); font-size: 12px; margin-top: 2px; }

    .score {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    .score .cell {
      border: var(--solid);
      border-radius: var(--radius-md);
      padding: 14px;
      background: var(--surface-raised);
    }
    .score .cell b { display: block; font-size: 22px; letter-spacing: var(--tracking-display); }
    .score .cell span { color: var(--muted); font-size: 12px; }
    .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px 28px; max-width: 920px; }
    .settings-group { min-width: 0; }
    .settings-group h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 300; letter-spacing: var(--tracking-display); }

    .state-panel {
      display: grid;
      place-items: center;
      min-height: 180px;
      padding: var(--space-6);
      text-align: center;
      border: var(--dash);
      border-radius: var(--radius-md);
      background: var(--surface-raised);
    }
    .state-panel strong { display: block; font-size: var(--text-base); font-weight: 500; }
    .state-panel p { max-width: 52ch; margin: 6px auto 14px; color: var(--muted); }
    .state-panel.error { border-color: color-mix(in oklab, var(--danger) 55%, var(--border)); }
    .loading-line {
      width: min(320px, 70vw); height: 8px;
      border-radius: var(--radius-sm);
      background: var(--border-soft);
      position: relative;
      overflow: hidden;
    }
    .loading-line::after {
      content: "";
      position: absolute;
      inset: 0 65% 0 0;
      background: var(--accent);
      animation: loading 1.2s ease-in-out infinite alternate;
    }
    @keyframes loading { to { transform: translateX(190%); } }
    .inspector-backdrop { display: none; }
    .mobile-selection { display: none; }

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

    @media (pointer: coarse) {
      .btn, .btn-sm, .nav-item { min-height: 44px; }
      .switch { min-height: 44px; }
      .sidebar-resizer { width: 16px; }
    }

    @media (max-width: 1100px) {
      .compliance-grid { grid-template-columns:1fr; }
      .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); min-height: 100dvh; height: 100dvh; }
      .sidebar-brand { padding: 8px 12px; margin: 0; border-right: var(--solid); display: flex; align-items: center; }
      .sidebar {
        flex-direction: row;
        overflow-x: visible;
        border-right: 0;
        border-bottom: var(--solid);
        padding: 0;
      }
      .sidebar-resizer { display: none; }
      .nav-group { display: flex; align-items: center; padding: 0 8px; }
      .nav-label { display: none; }
      .nav-item { white-space: nowrap; min-height: 44px; }
      .pane-2, .pane-split, .fb-layout, .graph-shell { grid-template-columns: 1fr; }
      .settings-grid { grid-template-columns: 1fr; }
      .pane { border-right: 0; border-bottom: var(--solid); }
      .fb-layout, .pane-split { overflow: auto; }
      .fb-layout > .pane, .pane-split > .pane { min-height: max-content; }
    }

    @media (max-width: 820px) {
      .toolbar { align-items: flex-start; padding: 10px 12px; overflow-x: auto; flex-wrap: nowrap; }
      .toolbar .view-heading { min-width: 240px; }
      .toolbar .w-grow { min-width: 1px; }
      .toolbar .sep { flex: 0 0 auto; }
      .graph-intro { padding: 10px 12px; }
      .graph-intro .hint { display: none; }
      .graph-stage { margin: 12px; }
      .g-legend { position: sticky; left: 12px; bottom: 12px; width: max-content; max-width: calc(100vw - 24px); overflow-x: auto; }
      .graph-shell > .pane {
        position: fixed;
        z-index: 12;
        inset: auto 0 0;
        max-height: min(74dvh, 620px);
        overflow: auto;
        border: var(--solid);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: var(--elev-raised);
        padding-bottom: env(safe-area-inset-bottom);
      }
      .graph-shell.inspector-closed > .pane { display: none; }
      .inspector-backdrop {
        position: fixed;
        z-index: 11;
        inset: 0;
        border: 0;
        background: color-mix(in oklab, var(--fg) 32%, transparent);
      }
      .graph-shell:not(.inspector-closed) .inspector-backdrop { display: block; }
      .mobile-selection {
        position: fixed;
        z-index: 5;
        left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border: var(--solid);
        border-radius: var(--radius-md);
        background: var(--surface-raised);
        box-shadow: var(--elev-raised);
      }
      .mobile-selection.visible { display: flex; }
      .mobile-selection .summary { min-width: 0; flex: 1; }
      .mobile-selection .summary b, .mobile-selection .summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .mobile-selection .summary span { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
      .cap-grid { grid-template-columns: 1fr; padding: 12px; }
      .score { grid-template-columns: 1fr; }
      .kanban { grid-template-columns: repeat(4, minmax(220px, 1fr)); }
    }

    #work-desk[hidden] { display:none !important; }
    #work-desk {
      position:fixed; inset:0; z-index:92; display:grid; place-items:center;
      background:color-mix(in oklab, var(--fg) 28%, transparent);
    }
    #work-desk .field-stack { display:flex; flex-direction:column; gap:10px; margin:12px 0 16px; }
    #work-desk .field-stack label { display:flex; flex-direction:column; gap:4px; font-size:12px; }
    #work-desk .field-stack input, #work-desk .field-stack textarea {
      font:inherit; padding:6px 8px; border:1px solid var(--line); background:var(--bg); color:var(--fg);
    }
    #work-desk .actions { display:flex; flex-wrap:wrap; gap:8px; }

    .catalog-atlas {
      flex: 1;
      min-height: 0;
      min-width: 0;
      overflow: hidden;
      display: grid;
      grid-template-columns: 228px 1fr;
      background: var(--border);
      gap: 1px;
    }
    .atlas-shelves {
      background: var(--surface);
      overflow: auto;
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .atlas-shelf {
      padding: 8px 10px 6px;
      border-bottom: var(--solid);
      min-width: 0;
    }
    .atlas-shelf:nth-child(2n) { border-right: 0; }
    .atlas-shelf h3 {
      margin: 0 0 4px;
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
    }
    .atlas-plate {
      display: grid;
      grid-template-columns: 1fr auto;
      grid-template-rows: auto auto;
      gap: 0 8px;
      width: 100%;
      margin: 0;
      padding: 5px 2px;
      border: 0;
      border-top: var(--solid);
      background: transparent;
      color: inherit;
      font: inherit;
      text-align: left;
      cursor: pointer;
      transition: background 160ms ease;
    }
    .atlas-plate:hover { background: var(--surface-warm); }
    .atlas-plate.is-open { background: var(--fill-sel); }
    .atlas-plate .nm {
      font-size: 12px;
      letter-spacing: var(--tracking-display);
      line-height: 1.25;
    }
    .atlas-plate .meta {
      grid-column: 1;
      font-family: var(--font-mono);
      font-size: 9px;
      color: var(--muted);
    }
    .atlas-ticks {
      grid-row: 1 / span 2;
      display: flex;
      align-items: flex-end;
      gap: 2px;
    }
    .atlas-ticks i {
      display: block;
      width: 3px;
      height: 8px;
      background: var(--fg);
      opacity: 0.16;
      transition: height 180ms ease, opacity 180ms ease;
    }
    .atlas-plate.is-open .atlas-ticks i { height: 11px; opacity: 0.32; }
    .atlas-ticks i.human { opacity: 0.28; }
    .atlas-ticks i.ai { opacity: 0.2; }
    .cat-q {
      width: 168px;
      border: var(--solid);
      background: var(--bg);
      color: var(--fg);
      font: inherit;
      font-size: 12px;
      padding: 4px 6px;
    }
    .atlas-dossier {
      background: var(--surface);
      overflow: auto;
      min-height: 0;
      min-width: 0;
      padding: 12px 14px 16px;
    }
    .atlas-dossier.is-fresh .cat-head,
    .atlas-dossier.is-fresh .cat-facets {
      animation: cat-in 280ms ease both;
    }
    .cat-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: flex-start;
    }
    .cat-head h2 {
      margin: 1px 0 0;
      font-size: 18px;
      letter-spacing: var(--tracking-display);
      font-weight: 400;
      line-height: var(--leading-tight);
    }
    .cat-head .k {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
    }
    .cat-actions { display: flex; gap: 8px; flex-shrink: 0; }
    .cat-spine {
      display: flex;
      gap: 16px;
      align-items: stretch;
      overflow-x: auto;
      overflow-y: hidden;
      min-width: 0;
      max-width: 100%;
      width: 100%;
      min-height: 0;
      margin: 10px 0 12px;
      padding: 4px 2px 10px;
      scroll-snap-type: x proximity;
    }
    .cat-step {
      position: relative;
      flex: 0 0 108px;
      width: 108px;
      min-height: 42px;
      padding: 5px 7px;
      border: var(--solid);
      background: var(--bg);
      box-sizing: border-box;
      scroll-snap-align: start;
      animation: cat-in 320ms ease both;
      animation-delay: calc(var(--i, 0) * 45ms);
    }
    .cat-step .ord {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--muted);
    }
    .cat-step .nm { font-size: 12px; }
    .cat-step:not(:last-child)::after {
      content: "";
      position: absolute;
      left: 100%;
      top: 50%;
      width: 16px;
      height: 1px;
      background: repeating-linear-gradient(90deg, var(--fg) 0 3px, transparent 3px 7px);
      background-size: 10px 1px;
      opacity: 0.35;
      animation: cat-crawl 0.8s linear infinite;
    }
    .cat-step:not(:last-child)::before {
      content: "";
      position: absolute;
      left: 100%;
      top: calc(50% - 2px);
      width: 5px;
      height: 5px;
      background: var(--fg);
      opacity: 0.45;
      animation: cat-bead 1.15s linear infinite;
    }
    @keyframes cat-in {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: none; }
    }
    @keyframes cat-crawl { to { background-position: 10px 0; } }
    @keyframes cat-bead {
      from { transform: translateX(0); opacity: 0; }
      20% { opacity: 0.5; }
      80% { opacity: 0.5; }
      to { transform: translateX(23px); opacity: 0; }
    }
    .cat-facets {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px 14px;
    }
    .cat-facet h4 {
      margin: 0 0 4px;
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      border-bottom: var(--solid);
      padding-bottom: 3px;
    }
    .cat-row {
      display: grid;
      grid-template-columns: 10px 1fr;
      gap: 6px;
      padding: 3px 0;
      font-size: 12px;
      border-bottom: 1px solid var(--border-soft);
    }
    .cat-row .dot {
      width: 6px; height: 6px; margin-top: 5px;
      background: var(--fg); opacity: 0.35;
    }
    .cat-empty { color: var(--muted); font-size: 12px; padding: 3px 0; }
    @media (max-width: 1100px) {
      .catalog-atlas { grid-template-columns: 1fr; }
      .atlas-shelves { max-height: 200px; flex-direction: row; overflow-x: auto; }
      .atlas-shelf { min-width: 200px; border-right: var(--solid); }
      .cat-facets { grid-template-columns: 1fr 1fr; }
    }

    .vs-step-rail {
      position: absolute;
      right: 0;
      display: flex;
      gap: 28px;
      overflow-x: auto;
      overflow-y: visible;
      padding: 0 0 18px;
      box-sizing: border-box;
    }
    .vs-step-rail .g-node {
      position: relative;
      left: auto;
      top: auto;
      flex: 0 0 168px;
      overflow: visible;
    }
    .vs-step-rail .g-node .t,
    .vs-step-rail .g-node .m,
    .g-node .t,
    .g-node .m {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .vs-step-rail .g-node:not(:last-child)::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 100%;
      width: 28px;
      height: 1px;
      background: repeating-linear-gradient(90deg, var(--fg) 0 4px, transparent 4px 8px);
      background-size: 28px 1px;
      animation: cat-crawl 0.9s linear infinite;
      pointer-events: none;
    }
    .vs-step-rail .g-node:not(:last-child)::before {
      content: "";
      position: absolute;
      top: calc(50% - 3px);
      left: 100%;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--fg);
      animation: cat-bead 0.9s linear infinite;
      pointer-events: none;
    }

    .form-canvas {
      flex: 1;
      min-height: 0;
      display: flex;
      margin: 10px;
      padding: 0;
      overflow: hidden;
    }
    .dxg-grid {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: repeat(16, minmax(0, 1fr));
      grid-template-rows: repeat(12, minmax(28px, 1fr));
      gap: 3px;
      padding: 6px;
      background:
        linear-gradient(to right, color-mix(in srgb, var(--fg) 6%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in srgb, var(--fg) 6%, transparent) 1px, transparent 1px);
      background-size: calc(100% / 16) calc(100% / 12);
    }
    .dxg-cell {
      min-height: 0;
      border: 1px dashed color-mix(in srgb, var(--fg) 14%, transparent);
      background: color-mix(in srgb, var(--surface) 70%, transparent);
    }
    .dxg-cell.is-over,
    .dxg-grid.drop-target .dxg-cell.is-over {
      background: var(--accent-soft);
      border-color: var(--accent);
      border-style: solid;
    }
    .dxg-grid .fb-block {
      width: auto;
      height: 100%;
      margin: 0;
      padding: 6px 8px;
      display: flex;
      flex-direction: column;
      min-width: 0;
      overflow: hidden;
    }
    .dxg-grid .fb-block .lbl { font-size: 11px; margin-bottom: 4px; }
    .dxg-grid .fb-ctrl { min-height: 22px; padding: 4px; font-size: 11px; flex: 1; }
    
    #dxg-menu {
      position: fixed;
      z-index: 90;
      min-width: 148px;
      padding: 4px;
      background: var(--bg);
      border: var(--solid);
      box-shadow: 0 8px 24px color-mix(in srgb, var(--fg) 18%, transparent);
    }
    #dxg-menu[hidden] { display: none; }
    #dxg-menu button {
      display: block;
      width: 100%;
      text-align: left;
      padding: 7px 10px;
      border: 0;
      background: transparent;
      font: 500 12px Inter, system-ui;
      color: var(--fg);
      cursor: pointer;
    }
    #dxg-menu button:hover,
    #dxg-menu button:focus { background: var(--bg-2); }
    #dxg-menu [data-act="delete"] { color: var(--danger); }

    #dxg-preview-modal {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      background: color-mix(in srgb, #1B365D 46%, transparent);
    }
    #dxg-preview-modal[hidden] { display: none; }
    .dxg-preview-card {
      width: min(920px, 94vw);
      height: min(720px, 88vh);
      background: #f5f4ed;
      border: var(--solid);
      box-shadow: 0 18px 50px color-mix(in srgb, #1B365D 28%, transparent);
    }
    .dxg-preview-chrome { height: 100%; margin: 0; display: flex; flex-direction: column; }
    .dxg-preview-chrome .portal-bar { flex: 0 0 auto; }
    .dxg-preview-chrome .portal-bar .btn { margin-left: auto; color: #1B365D; background: #f5f4ed; }
    .dxg-preview-chrome iframe { flex: 1; height: auto; min-height: 0; }
    .sr-only {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0,0,0,0); border: 0;
    }
