  :root {
    --bg: #05070b;
    --surface: #0e1218;
    --border: rgba(255,255,255,0.14);
    --green: #4ae395;
    --green-dim: rgba(74,227,149,0.18);
    --yellow: #ffd54a;
    --blue: #6bb8ff;
    --red: #ff958c;
    --text: #f0f4f8;
    --muted: #aeb9c6;
    --subtle: #8a96a8;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
  }

  body.embed-mode header {
    display: none;
  }
  body.embed-mode .sidebar-footer-tag {
    display: none;
  }
  body.embed-mode .layout {
    min-height: 100vh;
  }

  /* Theme · matches LIMS dashboard (embed + full-screen) */
  body.theme-light,
  body.theme-dark {
    --accent: #0d7377;
    --accent-soft: rgba(13, 115, 119, 0.12);
    --accent-text: #0d7377;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  }
  body.theme-light {
    --bg: #f1f4f8;
    --surface: #ffffff;
    --border: rgba(15, 23, 42, 0.1);
    --green: #0d7377;
    --green-dim: rgba(13, 115, 119, 0.12);
    --yellow: #b45309;
    --blue: #0369a1;
    --red: #b91c1c;
    --text: #1e293b;
    --muted: #64748b;
    --subtle: #94a3b8;
    --accent-text: #0d7377;
  }
  body.theme-dark {
    --bg: #1a2332;
    --surface: #243041;
    --border: rgba(255, 255, 255, 0.08);
    --green: #5eead4;
    --green-dim: rgba(13, 115, 119, 0.22);
    --yellow: #fbbf24;
    --blue: #7dd3fc;
    --red: #fca5a5;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --subtle: #64748b;
    --accent-text: #5eead4;
  }

  body.theme-light .tabs-bar,
  body.theme-dark .tabs-bar {
    padding: 10px 16px 0;
    gap: 4px;
    background: var(--surface);
    border-bottom-color: var(--border);
  }
  body.theme-light .tab,
  body.theme-dark .tab {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 8px 8px 0 0;
    padding: 8px 12px 10px;
  }
  body.theme-light .tab-badge,
  body.theme-dark .tab-badge {
    font-family: inherit;
    font-size: 10px;
    background: var(--accent-soft);
    color: var(--accent-text);
  }
  body.theme-light .sidebar,
  body.theme-dark .sidebar {
    background: var(--surface);
    border-right-color: var(--border);
    padding: 16px 12px;
  }
  body.theme-light .sidebar-label,
  body.theme-dark .sidebar-label,
  body.theme-light .metrics-box .mbox-title,
  body.theme-dark .metrics-box .mbox-title {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 600;
    color: var(--muted);
  }
  body.theme-light .pipeline-steps-panel,
  body.theme-dark .pipeline-steps-panel {
    background: var(--bg);
    border-color: var(--border);
  }
  body.theme-light .step-item,
  body.theme-dark .step-item {
    font-size: 13px;
    border-radius: 10px;
  }
  body.theme-light .step-item .step-status,
  body.theme-dark .step-item .step-status {
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    border-radius: 999px;
    padding: 3px 8px;
  }
  body.theme-light .step-item.idle .step-status::after,
  body.theme-dark .step-item.idle .step-status::after { content: 'Waiting'; }
  body.theme-light .step-item.running .step-status::after,
  body.theme-dark .step-item.running .step-status::after { content: 'In progress'; }
  body.theme-light .step-item.done .step-status::after,
  body.theme-dark .step-item.done .step-status::after { content: 'Complete'; }
  body.theme-light .step-item.error .step-status::after,
  body.theme-dark .step-item.error .step-status::after { content: 'Needs review'; }
  body.theme-light .step-item.running,
  body.theme-dark .step-item.running {
    background: rgba(14, 116, 144, 0.08);
  }
  body.theme-light .step-item.done,
  body.theme-dark .step-item.done {
    background: rgba(13, 115, 119, 0.08);
  }
  body.theme-light .metrics-box,
  body.theme-dark .metrics-box {
    background: var(--bg);
    border-color: var(--border);
    font-size: 12px;
  }
  body.theme-light .metric-row .mv,
  body.theme-dark .metric-row .mv {
    font-family: inherit;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }
  body.theme-light .diagram-area,
  body.theme-dark .diagram-area {
    padding: 16px;
    background: var(--bg);
  }
  body.theme-light .diagram-title,
  body.theme-dark .diagram-title {
    font-size: 16px;
    font-weight: 600;
  }
  body.theme-light .diagram-sub,
  body.theme-dark .diagram-sub {
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
  }
  body.theme-light .diagram-arch,
  body.theme-dark .diagram-arch {
    font-size: 12px;
    border-left-color: var(--accent);
    background: var(--accent-soft);
    color: var(--muted);
    margin-top: 10px;
  }
  body.theme-light .chip,
  body.theme-dark .chip {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    color: var(--text);
  }
  body.theme-light .chip.active,
  body.theme-dark .chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
  }
  body.theme-dark .chip.active {
    color: #0f172a;
  }
  body.theme-light .sim-controls-bar,
  body.theme-dark .sim-controls-bar {
    border-top-color: var(--border);
    justify-content: flex-start;
    padding-top: 10px;
  }
  body.theme-light .run-btn,
  body.theme-dark .run-btn {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 10px;
    padding: 10px 18px;
    min-width: 0;
    box-shadow: none;
  }
  body.theme-dark .run-btn {
    color: #0f172a;
  }
  body.theme-light .run-btn:hover,
  body.theme-dark .run-btn:hover {
    filter: brightness(1.05);
    box-shadow: none;
  }
  body.theme-light .run-btn.running,
  body.theme-dark .run-btn.running {
    background: #eab308;
    color: #422006;
    box-shadow: none;
  }
  body.theme-light .run-btn .dot,
  body.theme-dark .run-btn .dot {
    background: currentColor;
    opacity: 0.85;
  }
  body.theme-light .mermaid-wrapper,
  body.theme-dark .mermaid-wrapper {
    background: var(--surface);
    border-color: var(--border);
    border-radius: 12px;
  }
  body.embed-mode.theme-light .mermaid-wrapper,
  body.embed-mode.theme-dark .mermaid-wrapper {
    height: 460px;
    min-height: 360px;
  }
  body.theme-light .zoom-hint,
  body.theme-dark .zoom-hint,
  body.theme-light .zoom-level,
  body.theme-dark .zoom-level {
    font-family: inherit;
    color: var(--muted);
    background: var(--surface);
    border-color: var(--border);
  }
  body.theme-light .zoom-level,
  body.theme-dark .zoom-level {
    font-size: 10px;
  }
  body.theme-light .log-panel,
  body.theme-dark .log-panel {
    margin-top: 16px;
    background: var(--surface);
    border-color: var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 12px;
    max-height: 120px;
  }
  body.theme-light .log-panel .log-title,
  body.theme-dark .log-panel .log-title {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--muted);
    margin-bottom: 8px;
  }
  body.theme-light .log-line,
  body.theme-dark .log-line {
    line-height: 1.55;
    padding: 2px 0;
  }
  body.theme-light .log-line .ts,
  body.theme-dark .log-line .ts {
    font-size: 11px;
    color: var(--subtle);
    font-variant-numeric: tabular-nums;
  }
  body.theme-light .log-line .msg,
  body.theme-dark .log-line .msg {
    color: var(--text);
  }
  body.theme-light .log-badge,
  body.theme-dark .log-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    margin-right: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
  }
  body.theme-light .log-badge.tag-green,
  body.theme-dark .log-badge.tag-green {
    background: rgba(13, 115, 119, 0.12);
    color: var(--accent-text);
  }
  body.theme-light .log-badge.tag-yellow,
  body.theme-dark .log-badge.tag-yellow {
    background: rgba(234, 179, 8, 0.14);
    color: var(--yellow);
  }
  body.theme-light .log-badge.tag-red,
  body.theme-dark .log-badge.tag-red {
    background: rgba(220, 38, 38, 0.1);
    color: var(--red);
  }
  body.theme-light .db-search,
  body.theme-dark .db-search {
    font-family: inherit;
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
  }
  body.theme-light .db-sidebar-stats,
  body.theme-dark .db-sidebar-stats {
    font-family: inherit;
  }
  body.theme-light .db-count,
  body.theme-dark .db-count,
  body.theme-light .db-row-title,
  body.theme-dark .db-row-title {
    font-family: inherit;
  }
  body.theme-light .mermaid-pipeline-host g.node[data-sim='running'] foreignObject > div,
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='running'] foreignObject > div,
  body.theme-light .mermaid-pipeline-host g.node[data-sim='running'] .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='running'] .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node[data-sim='running'] .nodeLabel > div,
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='running'] .nodeLabel > div {
    animation: none;
    color: inherit;
    text-shadow: none;
  }
  /* Scrollbars · match dashboard panel size (6px), same on every scroll surface */
  * {
    scrollbar-width: thin;
  }
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
  }
  body.theme-light {
    scrollbar-color: #ffffff #ffffff;
  }
  body.theme-light ::-webkit-scrollbar-track,
  body.theme-light ::-webkit-scrollbar-thumb {
    background: #ffffff;
  }
  body.theme-dark {
    scrollbar-color: #243041 #243041;
  }
  body.theme-dark ::-webkit-scrollbar-track,
  body.theme-dark ::-webkit-scrollbar-thumb {
    background: #243041;
  }
  body.theme-dark .diagram-area {
    scrollbar-color: #1a2332 #1a2332;
  }
  body.theme-dark .diagram-area::-webkit-scrollbar-track,
  body.theme-dark .diagram-area::-webkit-scrollbar-thumb {
    background: #1a2332;
  }
  body.theme-light .diagram-area {
    scrollbar-color: #f1f4f8 #f1f4f8;
  }
  body.theme-light .diagram-area::-webkit-scrollbar-track,
  body.theme-light .diagram-area::-webkit-scrollbar-thumb {
    background: #f1f4f8;
  }
  body.theme-light #step-list,
  body.theme-light .db-results,
  body.theme-light .log-panel {
    scrollbar-color: #ffffff #ffffff;
  }
  body.theme-light #step-list::-webkit-scrollbar-track,
  body.theme-light #step-list::-webkit-scrollbar-thumb,
  body.theme-light .db-results::-webkit-scrollbar-track,
  body.theme-light .db-results::-webkit-scrollbar-thumb,
  body.theme-light .log-panel::-webkit-scrollbar-track,
  body.theme-light .log-panel::-webkit-scrollbar-thumb {
    background: #ffffff;
  }
  body.theme-dark #step-list,
  body.theme-dark .db-results,
  body.theme-dark .log-panel,
  body.theme-dark .sidebar {
    scrollbar-color: #243041 #243041;
  }
  body.theme-dark #step-list::-webkit-scrollbar-track,
  body.theme-dark #step-list::-webkit-scrollbar-thumb,
  body.theme-dark .db-results::-webkit-scrollbar-track,
  body.theme-dark .db-results::-webkit-scrollbar-thumb,
  body.theme-dark .log-panel::-webkit-scrollbar-track,
  body.theme-dark .log-panel::-webkit-scrollbar-thumb,
  body.theme-dark .sidebar::-webkit-scrollbar-track,
  body.theme-dark .sidebar::-webkit-scrollbar-thumb {
    background: #243041;
  }

  /* ── HEADER ── */
  header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 28px; border-bottom: 1px solid var(--border);
    background: var(--surface); position: sticky; top: 0; z-index: 100; flex-wrap: wrap;
  }
  /* Brand lockup · matches proposal site (YeastGenomics Lab NOVA FCT) */
  .brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .brand-mark {
    color: var(--green);
    font-size: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #d8dee6;
    line-height: 1.25;
  }
  .header-hint {
    font-size: 12px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    line-height: 1.45;
    max-width: 100%;
  }
  .header-hint strong {
    color: var(--text);
    font-weight: 600;
  }

  /* Run control · in-flow below scenario chips, above the graph */
  .sim-controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 16px;
    width: 100%;
    padding-top: 4px;
    margin-top: 2px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .sim-controls-bar .run-btn {
    flex: 0 0 auto;
  }
  .run-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--green);
    color: #041208;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border: none;
    border-radius: 24px;
    padding: 11px 24px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 24px rgba(74, 227, 149, 0.4);
    min-width: 160px;
    width: max-content;
  }
  .run-btn:hover { background: #2fc46e; box-shadow: 0 6px 28px rgba(61,220,132,.5); }
  .run-btn:active { transform: scale(.97); }
  .run-btn.running { background: var(--yellow); box-shadow: 0 4px 24px rgba(245,200,66,.35); }
  .run-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: #000; }
  .run-btn.running .dot { animation: pulse-dot .8s infinite; }
  @keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.3} }

  /* ── TABS ── */
  .tabs-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 4px;
    row-gap: 8px;
    padding: 12px 28px 0;
    border-bottom: 1px solid var(--border);
    overflow-x: hidden;
    max-width: 100%;
    background: var(--surface);
  }
  .tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--subtle);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: normal;
    min-width: 0;
    max-width: 100%;
    transition: color 0.15s, border-color 0.15s;
    -webkit-user-select: none;
    user-select: none;
  }
  .tab:hover {
    color: var(--text);
  }
  .tab.active {
    color: var(--text);
    border-bottom-color: var(--green);
  }
  .tab-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: inherit;
    opacity: 0.85;
  }
  .tab.active .tab-ico {
    color: var(--green);
    opacity: 1;
  }
  .tab-badge { font-size: 10px; font-family: 'JetBrains Mono', monospace; padding: 1px 6px; border-radius: 10px; background: var(--green-dim); color: var(--green); font-weight: 600; }

  /* ── LAYOUT ── */
  .layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: calc(100vh - 97px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  @media (max-width: 700px) {
    /* Scroll order: scenario tabs → diagram (main) → pipeline sidebar (steps, metrics, footer) */
    .layout {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      min-height: 0;
      width: 100%;
      max-width: 100%;
    }
    .diagram-area {
      order: 1;
      flex: 0 1 auto;
      min-width: 0;
    }
    .sidebar {
      order: 2;
      flex: 0 1 auto;
      border-right: none;
      border-top: 1px solid var(--border);
      border-bottom: none;
      min-width: 0;
    }
    .sidebar-stack {
      flex: 0 1 auto;
    }
    #step-list {
      flex: 0 1 auto;
      max-height: none;
      overflow-y: visible;
    }
    header {
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      padding: 12px 16px;
    }
    .header-hint {
      text-align: left;
    }
    .header-hint-arrow {
      display: none;
    }
    .sim-controls-bar {
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      padding-top: 8px;
      margin-top: 4px;
      border-top-color: rgba(255,255,255,0.1);
    }
    .run-btn {
      width: 100%;
      min-width: 0;
      align-self: stretch;
      border-radius: 14px;
      padding: 12px 16px;
      font-size: 14px;
    }
    .tabs-bar {
      flex-wrap: wrap;
      overflow-x: visible;
      padding: 10px 12px 8px;
      gap: 6px;
      row-gap: 8px;
      width: 100%;
      max-width: 100%;
    }
    .tab {
      flex: 1 1 calc(50% - 4px);
      min-width: 0;
      justify-content: center;
      white-space: normal;
      text-align: center;
      font-size: 11px;
      padding: 8px 8px 10px;
      line-height: 1.25;
    }
    .diagram-area {
      padding: 14px 12px 20px;
      overflow-x: hidden;
      max-width: 100%;
      min-width: 0;
    }
    .diagram-header {
      gap: 10px;
      margin-bottom: 14px;
    }
    .diagram-header-top {
      flex-direction: column;
      align-items: stretch;
    }
    .diagram-title {
      font-size: 16px;
      line-height: 1.3;
    }
    .diagram-sub {
      font-size: 13px;
      color: var(--muted);
    }
    .diagram-arch {
      font-size: 12px;
      color: var(--muted);
      max-width: none;
    }
    .scenario-chips {
      width: 100%;
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
    }
    .chip {
      width: 100%;
      text-align: center;
      justify-content: center;
      font-size: 12px;
      padding: 10px 12px;
      color: var(--text);
      border-color: rgba(255,255,255,0.22);
    }
    .mermaid-wrapper {
      min-height: 300px;
      height: auto;
      max-width: 100%;
      max-height: none;
    }
    .zoom-hint {
      left: 8px;
      right: 8px;
      bottom: 8px;
      max-width: none;
      width: auto;
    }
    .zoom-hint-title {
      font-size: 11px;
    }
    .zoom-hint-sub {
      font-size: 10px;
      white-space: normal;
    }
    .zoom-level {
      font-size: 10px;
      color: #041208;
      font-weight: 700;
    }
    .log-panel {
      font-size: 12px;
      max-width: 100%;
    }
    .step-item[data-tooltip]::after {
      left: 50%;
      right: auto;
      top: calc(100% + 8px);
      transform: translateX(-50%);
      max-width: min(280px, calc(100vw - 32px));
      width: max-content;
    }
  }

  /* ── SIDEBAR ── */
  .sidebar {
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .sidebar-stack {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  /* Steps scroll in a bounded panel so Run Metrics stays directly under the step list */
  #step-list {
    flex: 0 1 auto;
    min-height: 0;
    min-width: 0;
    max-height: min(46vh, 380px);
    overflow-x: hidden;
    overflow-y: auto;
  }
  .sidebar-stack::after {
    content: '';
    flex: 1 1 auto;
    min-height: 0;
  }
  .sidebar-footer {
    flex-shrink: 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .sidebar-footer-tag {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--muted);
    line-height: 1.45;
    letter-spacing: 0.02em;
  }
  .sidebar-footer-affil {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--subtle);
    line-height: 1.45;
    letter-spacing: 0.02em;
  }
  .sidebar-footer-stack {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--subtle);
    line-height: 1.5;
  }
  .sidebar-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: 2px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .sidebar-footer-link:hover {
    color: var(--green);
    border-color: rgba(61, 220, 132, 0.35);
    background: rgba(61, 220, 132, 0.1);
  }
  .pipeline-steps-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 8px 8px;
  }
  .pipeline-steps-panel .sidebar-label {
    padding: 0 6px;
    margin-bottom: 6px;
  }
  .pipeline-steps-panel #step-list {
    margin: 0 -2px;
  }
  .sidebar-label { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 8px; margin-bottom: 8px; }
  .step-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: background .15s; cursor: pointer; -webkit-user-select: none; user-select: none; }
  .step-item .step-icon { font-size: 13px; width: 20px; text-align: center; flex-shrink: 0; pointer-events: none; }
  .step-item .step-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    pointer-events: none;
  }
  .step-item .step-status { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600; pointer-events: none; }
  .step-item.idle .step-status {
    background: rgba(174, 185, 198, 0.14);
    color: var(--subtle);
  }
  .step-item.idle .step-status::after { content: 'idle'; }
  .step-item.running { background: rgba(245,200,66,.06); }
  .step-item.running .step-status { background: rgba(245,200,66,.15); color: var(--yellow); }
  .step-item.running .step-status::after { content: 'running'; }
  .step-item.done { background: rgba(61,220,132,.04); }
  .step-item.done .step-status { background: rgba(61,220,132,.15); color: var(--green); }
  .step-item.done .step-status::after { content: 'done'; }
  .step-item.error .step-status { background: rgba(255,123,114,.15); color: var(--red); }
  .step-item.error .step-status::after { content: 'error'; }

  /* Pipeline step hover tooltip - pointer cursor, instant tip, aria-label for a11y */
  .step-item[data-tooltip] {
    position: relative;
    z-index: 1;
    cursor: pointer;
  }
  .step-item[data-tooltip]:hover,
  .step-item[data-tooltip]:focus-visible {
    z-index: 20;
  }
  .step-item[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    max-width: min(260px, 70vw);
    width: max-content;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: none;
    z-index: 300;
    cursor: default;
    text-align: left;
    white-space: normal;
  }
  .step-item[data-tooltip]:hover::after,
  .step-item[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
  }
  .step-item[data-tooltip]:focus {
    outline: none;
  }
  .step-item[data-tooltip]:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
  }

  /* Tooltips below the row so they stay inside the narrow sidebar (no horizontal spill) */
  .sidebar .step-item[data-tooltip]::after {
    left: 50%;
    right: auto;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    max-width: calc(100% - 4px);
    width: max-content;
  }

  .metrics-box {
    flex-shrink: 0;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    font-size: 11px;
    background: rgba(255,255,255,.02);
    min-width: 0;
    max-width: 100%;
  }
  .metrics-box .mbox-title { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
  .metric-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--border); }
  .metric-row:last-child { border-bottom: none; }
  .metric-row .mk { color: var(--muted); }
  .metric-row .mv { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; }
  .mv.green { color: var(--green); } .mv.yellow { color: var(--yellow); } .mv.blue { color: var(--blue); }

  /* ── DIAGRAM AREA ── */
  .diagram-area {
    padding: 28px;
    overflow: auto;
    overflow-x: hidden;
    max-width: 100%;
    min-width: 0;
  }
  .diagram-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }
  .diagram-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }
  .diagram-title { font-size: 18px; font-weight: 700; }
  .diagram-sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
  .diagram-arch {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.55;
    max-width: 760px;
    margin-top: 12px;
    padding: 10px 12px 10px 14px; border-left: 2px solid var(--green);
    background: rgba(61,220,132,0.06); border-radius: 0 8px 8px 0;
  }
  .scenario-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .chip {
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
  }
  .chip:hover {
    border-color: var(--green);
    color: var(--green);
    background: rgba(74, 227, 149, 0.08);
  }
  .chip.active {
    background: var(--green);
    border-color: var(--green);
    color: #041208;
    font-weight: 700;
  }

  .mermaid-wrapper {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 0; min-height: 420px;
    overflow: hidden; position: relative;
    transition: opacity .25s ease;
    cursor: grab;
    height: 520px;
  }
  .mermaid-wrapper:active { cursor: grabbing; }
  .mermaid-wrapper.fading { opacity: 0; }

  /* Zoom / pan container · absolutely positioned so its size doesn't affect wrapper */
  #zoom-layer {
    position: absolute;
    top: 0; left: 0;
    transform-origin: 0 0;
    will-change: transform;
  }
  #zoom-layer.resetting {
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  }
  /* Let Mermaid SVG keep its natural size; we scale via the zoom-layer transform */
  .mermaid svg { display: block; overflow: visible; }

  /*
   * Html-label flowcharts: Mermaid computes foreignObject width/height from theme fontSize.
   * Do not add extra padding/font-size here · it desyncs shapes from labels (text floats outside).
   * Staging + visible hosts share .mermaid-pipeline-host so off-screen prerender matches the UI.
   * Label color is left to Mermaid classDef / themeVariables (enterprise role colors).
   */
  .mermaid-pipeline-host foreignObject {
    overflow: hidden;
  }
  .mermaid-pipeline-host foreignObject > div,
  .mermaid-pipeline-host .nodeLabel,
  .mermaid-pipeline-host .nodeLabel > div {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: inherit;
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .mermaid-pipeline-host .edgeLabel foreignObject > div {
    font-weight: 500;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--muted);
    white-space: normal;
    overflow-wrap: break-word;
    margin: 0;
    padding: 0;
  }
  .mermaid-pipeline-host .edgeLabel rect {
    fill: var(--surface) !important;
    stroke: var(--border) !important;
    stroke-width: 1px !important;
  }

  /* Soft lab cards · rounded rects via SVG rx/ry attrs (see applySvgCornerRadii) */
  .mermaid-pipeline-host .node rect,
  .mermaid-pipeline-host .node polygon,
  .mermaid-pipeline-host .node circle,
  .mermaid-pipeline-host .node ellipse,
  .mermaid-pipeline-host .node path {
    stroke-width: 1.6px;
  }
  body.theme-light .mermaid-pipeline-host .node > rect,
  body.theme-light .mermaid-pipeline-host .node > polygon,
  body.theme-light .mermaid-pipeline-host .node > path {
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.07));
  }
  body.theme-dark .mermaid-pipeline-host .node > rect,
  body.theme-dark .mermaid-pipeline-host .node > polygon,
  body.theme-dark .mermaid-pipeline-host .node > path {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  }
  .mermaid-pipeline-host .edgePath path {
    stroke-width: 1.75px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.88;
  }
  .mermaid-pipeline-host marker path {
    fill: var(--green);
    stroke: none;
  }

  /* Role fills via CSS (:::source / :::warn / …) - no Mermaid classDef needed */
  body.theme-light .mermaid-pipeline-host g.node.source > rect,
  body.theme-light .mermaid-pipeline-host g.node.source > polygon,
  body.theme-light .mermaid-pipeline-host g.node.source > path,
  body.theme-light .mermaid-pipeline-host g.node.source > circle,
  body.theme-light .mermaid-pipeline-host g.node.source > ellipse,
  body.theme-light .mermaid-pipeline-host g.node.done > rect,
  body.theme-light .mermaid-pipeline-host g.node.done > polygon,
  body.theme-light .mermaid-pipeline-host g.node.done > path,
  body.theme-light .mermaid-pipeline-host g.node.done > circle,
  body.theme-light .mermaid-pipeline-host g.node.done > ellipse {
    fill: #ecf5f5 !important;
    stroke: #0d7377 !important;
  }
  body.theme-light .mermaid-pipeline-host g.node.next > rect,
  body.theme-light .mermaid-pipeline-host g.node.next > polygon,
  body.theme-light .mermaid-pipeline-host g.node.next > path,
  body.theme-light .mermaid-pipeline-host g.node.next > circle,
  body.theme-light .mermaid-pipeline-host g.node.next > ellipse {
    fill: #eef6fb !important;
    stroke: #2b6f97 !important;
  }
  body.theme-light .mermaid-pipeline-host g.node.warn > rect,
  body.theme-light .mermaid-pipeline-host g.node.warn > polygon,
  body.theme-light .mermaid-pipeline-host g.node.warn > path,
  body.theme-light .mermaid-pipeline-host g.node.warn > circle,
  body.theme-light .mermaid-pipeline-host g.node.warn > ellipse {
    fill: #fff8eb !important;
    stroke: #b8860b !important;
  }
  body.theme-light .mermaid-pipeline-host g.node.err > rect,
  body.theme-light .mermaid-pipeline-host g.node.err > polygon,
  body.theme-light .mermaid-pipeline-host g.node.err > path,
  body.theme-light .mermaid-pipeline-host g.node.err > circle,
  body.theme-light .mermaid-pipeline-host g.node.err > ellipse {
    fill: #fdf2f2 !important;
    stroke: #b54a4a !important;
  }
  body.theme-dark .mermaid-pipeline-host g.node.source > rect,
  body.theme-dark .mermaid-pipeline-host g.node.source > polygon,
  body.theme-dark .mermaid-pipeline-host g.node.source > path,
  body.theme-dark .mermaid-pipeline-host g.node.source > circle,
  body.theme-dark .mermaid-pipeline-host g.node.source > ellipse,
  body.theme-dark .mermaid-pipeline-host g.node.done > rect,
  body.theme-dark .mermaid-pipeline-host g.node.done > polygon,
  body.theme-dark .mermaid-pipeline-host g.node.done > path,
  body.theme-dark .mermaid-pipeline-host g.node.done > circle,
  body.theme-dark .mermaid-pipeline-host g.node.done > ellipse {
    fill: #1e2e36 !important;
    stroke: #3d9a9e !important;
  }
  body.theme-dark .mermaid-pipeline-host g.node.next > rect,
  body.theme-dark .mermaid-pipeline-host g.node.next > polygon,
  body.theme-dark .mermaid-pipeline-host g.node.next > path,
  body.theme-dark .mermaid-pipeline-host g.node.next > circle,
  body.theme-dark .mermaid-pipeline-host g.node.next > ellipse {
    fill: #1c2836 !important;
    stroke: #4a8bb8 !important;
  }
  body.theme-dark .mermaid-pipeline-host g.node.warn > rect,
  body.theme-dark .mermaid-pipeline-host g.node.warn > polygon,
  body.theme-dark .mermaid-pipeline-host g.node.warn > path,
  body.theme-dark .mermaid-pipeline-host g.node.warn > circle,
  body.theme-dark .mermaid-pipeline-host g.node.warn > ellipse {
    fill: #2c281c !important;
    stroke: #c9a227 !important;
  }
  body.theme-dark .mermaid-pipeline-host g.node.err > rect,
  body.theme-dark .mermaid-pipeline-host g.node.err > polygon,
  body.theme-dark .mermaid-pipeline-host g.node.err > path,
  body.theme-dark .mermaid-pipeline-host g.node.err > circle,
  body.theme-dark .mermaid-pipeline-host g.node.err > ellipse {
    fill: #2c1e1e !important;
    stroke: #c97070 !important;
  }

  /* Label colors by role class */
  body.theme-light .mermaid-pipeline-host g.node.source .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node.source foreignObject > div,
  body.theme-light .mermaid-pipeline-host g.node.done .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node.done foreignObject > div {
    color: #0f4c4f;
  }
  body.theme-light .mermaid-pipeline-host g.node.next .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node.next foreignObject > div {
    color: #1e4d6b;
  }
  body.theme-light .mermaid-pipeline-host g.node.warn .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node.warn foreignObject > div {
    color: #7a4e0b;
  }
  body.theme-light .mermaid-pipeline-host g.node.err .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node.err foreignObject > div {
    color: #7f2d2d;
  }
  body.theme-dark .mermaid-pipeline-host g.node.source .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node.source foreignObject > div,
  body.theme-dark .mermaid-pipeline-host g.node.done .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node.done foreignObject > div {
    color: #b8e8ea;
  }
  body.theme-dark .mermaid-pipeline-host g.node.next .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node.next foreignObject > div {
    color: #b5d8ec;
  }
  body.theme-dark .mermaid-pipeline-host g.node.warn .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node.warn foreignObject > div {
    color: #ecd89a;
  }
  body.theme-dark .mermaid-pipeline-host g.node.err .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node.err foreignObject > div {
    color: #efc0c0;
  }

  /* Zoom hint badge */
  .zoom-hint {
    position: absolute; bottom: 10px; left: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: min(280px, calc(100% - 24px));
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
    line-height: 1.35;
  }
  .zoom-hint-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
  }
  .zoom-hint-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
  }
  .mermaid-wrapper:hover .zoom-hint { opacity: 1; }

  /* Zoom level badge top-right */
  .zoom-level {
    position: absolute; top: 10px; right: 12px;
    font-size: 10px; font-family: 'JetBrains Mono', monospace;
    color: var(--green); background: var(--green-dim);
    border: 1px solid rgba(61,220,132,.2); border-radius: 6px;
    padding: 2px 8px; pointer-events: none;
    opacity: 0; transition: opacity .3s;
  }
  .zoom-level.visible { opacity: 1; }

  /* ── SVG NODE ANIMATIONS ── */
  /* Do NOT set transform / transform-origin on g.node · Mermaid edge paths are
     absolute; transforming node groups desyncs boxes from connectors. */

  @keyframes node-enter {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* Edge path draw */
  @keyframes edge-draw {
    to { stroke-dashoffset: 0; }
  }

  /* Running · soft amber ring (enterprise, not neon) */
  @keyframes glow-pulse-yellow {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(201, 162, 39, 0.4)); }
    50%       { filter: drop-shadow(0 0 7px rgba(201, 162, 39, 0.22)); }
  }

  /* Error · soft red ring */
  @keyframes glow-pulse-red {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(185, 74, 74, 0.45)); }
    50%       { filter: drop-shadow(0 0 7px rgba(185, 74, 74, 0.22)); }
  }

  /* Error emphasis · filter only (no transform on g.node) */
  @keyframes node-alert {
    0%, 100% { filter: brightness(1); opacity: 1; }
    50%      { filter: brightness(1.06); opacity: 0.96; }
  }

  /* Simulation: quiet label emphasis (no neon glow) */
  @keyframes sim-label-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
  }
  .mermaid-pipeline-host g.node[data-sim='running'] foreignObject > div,
  .mermaid-pipeline-host g.node[data-sim='running'] .nodeLabel,
  .mermaid-pipeline-host g.node[data-sim='running'] .nodeLabel > div {
    animation: sim-label-pulse 1.2s ease-in-out infinite;
  }
  body.theme-light .mermaid-pipeline-host g.node[data-sim='done'] foreignObject > div,
  body.theme-light .mermaid-pipeline-host g.node[data-sim='done'] .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node[data-sim='done'] .nodeLabel > div {
    color: #0f4c4f;
    transition: color 0.35s ease;
  }
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='done'] foreignObject > div,
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='done'] .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='done'] .nodeLabel > div {
    color: #a8e6e8;
    transition: color 0.35s ease;
  }
  body.theme-light .mermaid-pipeline-host g.node[data-sim='error'] foreignObject > div,
  body.theme-light .mermaid-pipeline-host g.node[data-sim='error'] .nodeLabel,
  body.theme-light .mermaid-pipeline-host g.node[data-sim='error'] .nodeLabel > div {
    color: #7f2d2d;
    transition: color 0.25s ease;
  }
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='error'] foreignObject > div,
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='error'] .nodeLabel,
  body.theme-dark .mermaid-pipeline-host g.node[data-sim='error'] .nodeLabel > div {
    color: #f0b4b4;
    transition: color 0.25s ease;
  }

  /* Data packet travelling along an edge */
  .data-packet {
    position: absolute; pointer-events: none;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px 3px rgba(61,220,132,.7);
  }

  /* LOG ── */
  .log-panel { margin-top: 20px; background: #0b0e14; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px; max-height: 140px; overflow-y: auto; }
  .log-panel .log-title { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
  .log-line { line-height: 1.8; }
  .log-line .ts { color: var(--subtle); margin-right: 8px; }
  .log-line .tag-green { color: var(--green); }
  .log-line .tag-yellow { color: var(--yellow); }
  .log-line .tag-blue { color: var(--blue); }
  .log-line .tag-red { color: var(--red); }
  .log-line .msg { color: var(--muted); }

  /* ── DATABASE EXPLORER (tab) ── */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .pipeline-view {
    display: block;
  }
  .database-view {
    display: none;
  }
  body.view-database .pipeline-view {
    display: none;
  }
  body.view-database .database-view {
    display: block;
  }
  body.view-database #runBtn {
    opacity: 0.42;
    pointer-events: none;
    cursor: not-allowed;
  }
  .pipeline-sim-panels {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
  }
  .database-sidebar {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 8px;
  }
  body.view-database .pipeline-sim-panels {
    display: none;
  }
  body.view-database .database-sidebar {
    display: flex;
  }
  .db-sidebar-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    padding: 0 8px;
  }
  .db-sidebar-stats {
    list-style: none;
    padding: 0 8px;
    margin: 0;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
  }
  .db-sidebar-stats li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  .db-sidebar-stats .k {
    color: var(--subtle);
  }
  .db-sidebar-stats .v {
    color: var(--green);
    font-weight: 600;
  }
  .db-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
  }
  .db-search-wrap {
    flex: 1 1 220px;
    min-width: 0;
  }
  .db-search {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #060a0e;
    color: var(--text);
    font-size: 14px;
    padding: 12px 14px;
    font-family: 'JetBrains Mono', monospace;
  }
  .db-search::placeholder {
    color: var(--subtle);
  }
  .db-search:focus {
    outline: none;
    border-color: rgba(74, 227, 149, 0.45);
    box-shadow: 0 0 0 3px rgba(74, 227, 149, 0.12);
  }
  .db-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .db-chip {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .db-chip:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
  }
  .db-chip.active {
    background: var(--green-dim);
    border-color: rgba(74, 227, 149, 0.45);
    color: var(--green);
  }
  .db-hint {
    font-size: 11px;
    color: var(--subtle);
    margin-bottom: 14px;
  }
  .db-results {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
    max-height: min(62vh, 640px);
    overflow-y: auto;
  }
  .db-section-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--subtle);
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
  }
  .db-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: start;
    font-size: 12px;
  }
  .db-row:last-child {
    border-bottom: none;
  }
  .db-row-main {
    min-width: 0;
  }
  .db-row-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text);
    word-break: break-all;
    line-height: 1.4;
  }
  .db-row-meta {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
  }
  .db-row-badge {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--green);
    white-space: nowrap;
    align-self: start;
  }
  .db-row-badge.project {
    color: var(--blue);
  }
  .db-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
  }
  .db-count {
    font-size: 11px;
    color: var(--subtle);
    margin: -6px 0 12px;
    font-family: 'JetBrains Mono', monospace;
  }

  /* (scrollbars unified above · see theme-light / theme-dark rules) */
