/* AuditFlow v9.4.2: independent Trace relations scroll region. */
.trace-link-list-v81 {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8ba6bb transparent;
}
.trace-link-list-v81::-webkit-scrollbar { width: 10px; }
.trace-link-list-v81::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #8ba6bb; background-clip: padding-box; }
.trace-link-list-v81::-webkit-scrollbar-thumb:hover { background-color: #48728f; }

/* v9.8.0: keep the center relation stack as a bounded flex scrollport. The
   list must shrink into the fixed three-column workbench instead of growing
   with its cards, so its native thumb remains available for direct dragging. */
.trace-center-v81 {
  display: flex;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.trace-center-v81 .trace-link-list-v81 {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: auto !important;
  scrollbar-color: #6f8798 #edf1f4;
}
.trace-center-v81 .trace-link-list-v81::-webkit-scrollbar { width: 12px; }
.trace-center-v81 .trace-link-list-v81::-webkit-scrollbar-track { background: #edf1f4; }
.trace-center-v81 .trace-link-list-v81::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 3px solid #edf1f4;
  border-radius: 7px;
  background: #6f8798;
  background-clip: padding-box;
}
.trace-center-v81 .trace-link-list-v81::-webkit-scrollbar-thumb:hover { background: #3e647b; }
[data-theme="dark"] .trace-center-v81 .trace-link-list-v81 {
  scrollbar-color: #6f8798 #202a33;
}
[data-theme="dark"] .trace-center-v81 .trace-link-list-v81::-webkit-scrollbar-track { background: #202a33; }
[data-theme="dark"] .trace-center-v81 .trace-link-list-v81::-webkit-scrollbar-thumb { border-color: #202a33; }

/* v9.8.0: expose a stable scrollbar even when Edge hides native overlay bars. */
.trace-link-scroll-shell-v98 {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.trace-link-scroll-shell-v98 .trace-link-list-v81 {
  flex: 1 1 auto !important;
  min-width: 0;
  min-height: 0 !important;
  padding-right: 24px !important;
}
.trace-scrollbar-v98 {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 4px;
  bottom: 8px;
  width: 14px;
  border: 1px solid color-mix(in srgb, var(--af-line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--af-surface-muted) 92%, var(--af-line));
  opacity: .95;
}
.trace-scrollbar-thumb-v98 {
  position: absolute;
  top: 0;
  left: 2px;
  width: 10px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #6f8798;
  cursor: grab;
  touch-action: none;
}
.trace-scrollbar-thumb-v98:hover,
.trace-scrollbar-thumb-v98:focus-visible { background: #3e647b; outline: 2px solid var(--af-accent); outline-offset: 1px; }
.trace-scrollbar-thumb-v98:active { cursor: grabbing; }
.trace-scrollbar-v98:not(.is-scrollable) { opacity: .42; }
[data-theme="dark"] .trace-scrollbar-v98 { border-color: #3b4a57; background: #202a33; }
[data-theme="dark"] .trace-scrollbar-thumb-v98 { background: #6f8798; }

/* v9.6: keep the local Helix importer as the first, unmistakable Scope action. */
.helix-import-featured {
  border: 2px solid #0c66e4;
  background: #edf6ff;
  box-shadow: 0 4px 14px rgba(12, 102, 228, 0.14);
  margin: 0 0 16px;
}
.helix-import-featured > header {
  border-bottom-color: #b9d6f7;
}
.helix-import-featured h2 {
  color: #074b9a;
}
.local-workspace-mode {
  gap: 9px;
  min-width: 224px;
}
.local-workspace-mode > span:first-child {
  color: #0c66e4;
}
.local-workspace-mode strong,
.local-workspace-mode small {
  display: block;
}
@media (max-width: 1120px) {
  .trace-link-list-v81 { flex: initial; max-height: 620px; }
  .trace-center-v81 { height: auto; }
  .trace-center-v81 .trace-link-list-v81 { flex: 1 1 auto !important; min-height: 180px !important; max-height: 620px !important; }
  .trace-link-scroll-shell-v98 { min-height: 180px; max-height: 620px; }
  .helix-import-featured { margin-left: 0; margin-right: 0; }
}
