/* Discovery shares the dashboard palette; neither theme changes imported data. */
.discovery-workspace {
  color: var(--rf-text);
  font: 13px/1.5 system-ui, sans-serif;
  padding: 20px 32px 32px;
  max-width: 1700px;
  margin: 0 auto;
}
.discovery-workspace,
.discovery-workspace * {
  box-sizing: border-box;
}
.discovery-workspace button,
.discovery-workspace input {
  font: inherit;
}
.discovery-workspace button,
.discovery-workspace summary,
.discovery-node,
.discovery-edge [role=button] {
  cursor: pointer;
}
.discovery-workspace button:disabled {
  opacity: .45;
  cursor: default;
}
.discovery-workspace :is(button, summary, input, [role=button]):focus-visible {
  outline: 2px solid var(--rf-jlens-blue);
  outline-offset: 4px;
}
/* SVG focus follows the circle or line instead of its rectangular bounds. */
.discovery-workspace :is(.discovery-node, .discovery-edge):focus {
  outline: none;
}
.discovery-workspace h1,
.discovery-workspace h2,
.discovery-workspace h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.discovery-workspace p {
  color: var(--rf-muted);
}
.discovery-header,
.discovery-toolbar,
.discovery-canvas-footer,
.discovery-inspector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.discovery-header {
  margin-bottom: 18px;
}
.discovery-header h1 {
  font-size: 22px;
}
.discovery-graph-overflow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--rf-border); color: var(--rf-muted); font-size: 12px; }
.discovery-inspector-heading {
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--rf-muted);
}
.discovery-button,
.discovery-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--rf-border);
  border-radius: 4px;
  background: var(--rf-surface-2);
  color: var(--rf-text);
  padding: 8px 12px;
}
.discovery-primary {
  background: var(--rf-text);
  border-color: var(--rf-text);
  color: var(--rf-bg);
}
.discovery-primary:hover:not(:disabled) {
  opacity: .85;
}
.discovery-header .discovery-primary {
  background: transparent;
  border-color: var(--rf-border);
  color: var(--rf-text-dim);
}
.discovery-icon-button {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  padding: 0;
}
.discovery-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.discovery-error,
.discovery-caution {
  padding: 12px 16px;
  border: 1px solid var(--rf-agent-warning-border);
  border-radius: 4px;
  background: var(--rf-agent-warning-bg);
  color: var(--rf-agent-warning-text);
  overflow-wrap: anywhere;
}
.discovery-error {
  margin-bottom: 20px;
}
.discovery-empty,
.discovery-summary,
.discovery-explorer,
.discovery-coverage {
  background: var(--rf-surface);
  border: 1px solid var(--rf-border);
  border-radius: 4px;
}
.discovery-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  min-height: 530px;
  padding: 55px 24px 35px;
}
.discovery-empty-symbol,
.discovery-detail-icon,
.discovery-list-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--rf-text-dim);
  background: var(--rf-surface-2);
  border: 1px solid var(--rf-border);
  border-radius: 4px;
}
.discovery-empty-symbol {
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
}
.discovery-empty h2 {
  font-size: clamp(25px, 2vw, 30px);
  margin: 4px 0 14px;
}
.discovery-empty > p {
  max-width: 510px;
  line-height: 1.8;
  margin: 0 0 24px;
}
.discovery-empty > small {
  color: var(--rf-muted);
  margin-top: 20px;
}
.discovery-scan-command {
  text-align: left;
  max-width: 680px;
  width: 100%;
  margin-top: 34px;
  padding: 16px 18px;
  background: var(--rf-bg);
  border: 1px solid var(--rf-border);
  border-radius: 4px;
}
.discovery-scan-command span {
  display: block;
  color: var(--rf-muted);
  margin-bottom: 9px;
}
.discovery-scan-command code {
  font: 11px/1.8 ui-monospace, monospace;
  color: var(--rf-text-dim);
  overflow-wrap: anywhere;
}
.discovery-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0 18px;
  margin-bottom: 12px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rf-border);
  border-radius: 0;
}
.discovery-summary > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.discovery-summary strong {
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.discovery-summary span,
.discovery-snapshot time {
  font-size: 11px;
  color: var(--rf-muted);
}
.discovery-summary .discovery-snapshot {
  margin-left: auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.discovery-snapshot > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 230px;
}
.discovery-explorer {
  overflow: hidden;
}
.discovery-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 15px 22px 0;
  overflow: auto;
  white-space: nowrap;
  color: var(--rf-muted);
  font-size: 11px;
}
.discovery-breadcrumb button,
.discovery-inspector-heading button,
.discovery-list-name,
.discovery-zoom button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}
.discovery-breadcrumb button {
  flex-shrink: 0;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discovery-breadcrumb button[aria-current] {
  color: var(--rf-text);
}
.discovery-breadcrumb button:hover {
  color: var(--rf-jlens-blue);
}
.discovery-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rf-border);
}
.discovery-focus-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.discovery-focus-title > div,
.discovery-list-name > span:last-child {
  min-width: 0;
}
.discovery-focus-title h2 {
  font-size: 15px;
}
.discovery-focus-title h2:focus {
  outline: none;
}
.discovery-focus-title p {
  font-size: 11px;
  margin: 6px 0 0;
}
.discovery-view-toggle {
  display: flex;
  border-bottom: 1px solid var(--rf-border);
  flex-shrink: 0;
}
.discovery-view-toggle button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--rf-muted);
  font-size: 12px;
}
.discovery-view-toggle button[aria-pressed=true] {
  border-bottom-color: var(--rf-jlens-blue);
  color: var(--rf-text);
}
.discovery-explorer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.discovery-main {
  min-width: 0;
  background: var(--rf-trace-panel);
  position: relative;
}
.discovery-explorer-body.has-details {
  grid-template-columns: minmax(0, 1fr) 280px;
}
.discovery-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.discovery-toolbar-actions > button {
  color: var(--rf-muted);
  background: transparent;
  font-size: 12px;
}
.discovery-toolbar-actions > button[aria-expanded=true] {
  color: var(--rf-jlens-blue);
  border-color: var(--rf-jlens-blue);
}
.discovery-canvas {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.discovery-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.discovery-graph-scene {
  transform-origin: 0 0;
  transition: transform .15s ease;
}
.discovery-edge {
  color: var(--rf-text-dim);
  cursor: pointer;
}
.discovery-edge line {
  stroke: var(--rf-trace-border-strong);
  stroke-width: 1;
}
.discovery-edge .discovery-edge-hit {
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
}
.discovery-edge:is(:hover, :focus-visible, .is-selected) > line:first-of-type {
  stroke: var(--rf-jlens-blue);
  stroke-width: 1.5;
}
.discovery-edge-tooltip {
  visibility: hidden;
  pointer-events: none;
}
.discovery-edge:is(:hover, :focus) .discovery-edge-tooltip {
  visibility: visible;
  transition: visibility 0s linear 150ms;
}
.discovery-edge-tooltip rect {
  fill: var(--rf-surface);
  stroke: var(--rf-trace-border-strong);
  stroke-width: 1;
}
.discovery-edge-tooltip text {
  fill: var(--rf-text);
  font-size: 11px;
}
.discovery-node {
  color: var(--rf-text-dim);
}
.discovery-node-shell {
  fill: var(--rf-surface);
  stroke: var(--rf-trace-border-strong);
  stroke-width: 1;
  transition: stroke .12s, fill .12s;
}
.discovery-node:is(:hover, :focus-visible) .discovery-node-shell {
  fill: var(--rf-surface-2);
  stroke: var(--rf-jlens-blue);
  stroke-width: 1.5;
}
.discovery-node.accent-recorded .discovery-node-shell {
  stroke-dasharray: 3 3;
}
.discovery-node-focus {
  color: var(--rf-text);
}
.discovery-node-focus .discovery-node-shell {
  fill: var(--rf-surface-2);
  stroke: var(--rf-text-dim);
}
.discovery-node-title {
  fill: var(--rf-text-dim);
  font-size: 12px;
  font-weight: 400;
  paint-order: stroke;
  stroke: var(--rf-trace-panel);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.discovery-node:is(:hover, :focus-visible) .discovery-node-title,
.discovery-node-focus .discovery-node-title {
  fill: var(--rf-text);
}
.discovery-node-focus .discovery-node-title {
  font-size: 13px;
  font-weight: 600;
}
.discovery-node-symbol {
  pointer-events: none;
}
.discovery-leaf-note {
  position: absolute;
  bottom: 32px;
  left: 24px;
  right: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--rf-muted);
}
.discovery-canvas-footer {
  padding: 14px 20px;
  color: var(--rf-muted);
  font-size: 11px;
  border-top: 1px solid var(--rf-border);
  min-height: 49px;
}
.discovery-zoom {
  display: flex;
  align-items: center;
  border: 1px solid var(--rf-border);
  border-radius: 5px;
  background: var(--rf-surface);
}
.discovery-zoom button {
  padding: 4px 8px;
  font-size: 11px;
}
.discovery-zoom button:first-child,
.discovery-zoom button:last-child {
  font-size: 17px;
}
.discovery-inspector {
  padding: 22px 20px;
  border-left: 1px solid var(--rf-border);
  min-width: 0;
}
.discovery-inspector-heading {
  min-height: 18px;
}
.discovery-inspector-heading button {
  letter-spacing: 0;
  font-size: 10px;
}
.discovery-detail-icon {
  width: 45px;
  height: 45px;
  margin-top: 24px;
}
.discovery-inspector h3 {
  font-size: 17px;
  margin: 15px 0 7px;
}
.discovery-detail-description {
  font-size: 11px;
  line-height: 1.7;
  margin: 0 0 22px;
  overflow-wrap: anywhere;
}
.discovery-facts {
  margin: 18px 0 20px;
  font-size: 11px;
}
.discovery-facts dt {
  color: var(--rf-muted);
  margin-top: 12px;
}
.discovery-facts dd {
  margin: 3px 0 0;
  color: var(--rf-text-dim);
  overflow-wrap: anywhere;
}
.discovery-caution {
  font-size: 11px;
}
.discovery-evidence,
.discovery-identity {
  border-top: 1px solid var(--rf-border);
  padding-top: 20px;
  margin-top: 24px;
}
.discovery-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.discovery-section-heading h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--rf-text);
}
.discovery-section-heading > span,
.discovery-field-note {
  font-size: 11px;
  color: var(--rf-muted);
}
.discovery-evidence-record + .discovery-evidence-record {
  border-top: 1px solid var(--rf-border-soft);
  margin-top: 20px;
  padding-top: 20px;
}
.discovery-evidence-method {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--rf-text-dim);
}
.discovery-evidence-method > strong {
  font-weight: 500;
  text-transform: capitalize;
}
.discovery-evidence-basis {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--rf-border);
  border-radius: 3px;
  text-transform: capitalize;
}
.discovery-evidence-fields {
  margin: 16px 0 0;
  font-size: 11px;
}
.discovery-evidence-fields dt {
  color: var(--rf-muted);
  margin-top: 12px;
}
.discovery-evidence-fields dd {
  margin: 5px 0 0;
  color: var(--rf-text-dim);
  overflow-wrap: anywhere;
}
.discovery-field-note {
  display: block;
  margin-top: 5px;
}
.discovery-reference {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--rf-border-soft);
  border-radius: 3px;
  background: var(--rf-surface-2);
  color: var(--rf-text-dim);
  font: 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  user-select: text;
}
.discovery-search {
  margin: 12px 18px;
  width: min(280px, calc(100% - 36px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--rf-border);
  border-radius: 6px;
  background: var(--rf-surface);
  color: var(--rf-muted);
}
.discovery-search input {
  width: 100%;
  background: none;
  border: 0;
  color: var(--rf-text);
  font-size: 12px;
  padding: 3px;
}
.discovery-list {
  min-height: 360px;
}
.discovery-list-head,
.discovery-list-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.7fr) minmax(100px, 1fr) 28px;
  align-items: center;
  column-gap: 14px;
  padding: 13px 20px;
}
.discovery-list-head {
  font-size: 11px;
  color: var(--rf-muted);
  border-bottom: 1px solid var(--rf-border);
  background: var(--rf-surface-2);
}
.discovery-list-row {
  border-bottom: 1px solid var(--rf-border-soft);
  min-height: 76px;
}
.discovery-list-row:hover {
  background: var(--rf-surface-2);
}
.discovery-list-name {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
  text-align: left;
}
.discovery-list-name strong {
  display: block;
  font-weight: 500;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.discovery-list-name small {
  display: block;
  font-size: 11px;
  color: var(--rf-muted);
  margin-top: 3px;
}
.discovery-list-icon {
  width: 34px;
  height: 34px;
  border-radius: 4px;
}
.discovery-list-state {
  font-size: 11px;
  color: var(--rf-text-dim);
}
.discovery-list-state.is-recorded {
  color: var(--rf-muted);
}
.discovery-no-results {
  padding: 60px 25px;
  color: var(--rf-muted);
  font-size: 12px;
  text-align: center;
  min-height: 330px;
  display: grid;
  place-items: center;
}
.discovery-coverage {
  margin-top: 16px;
  color: var(--rf-muted);
  font-size: 12px;
}
.discovery-coverage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
}
.discovery-coverage-heading h2 {
  font-size: 14px;
  color: var(--rf-text);
}
.discovery-coverage-heading p {
  margin: 5px 0 0;
  font-size: 11px;
}
.discovery-coverage-status {
  font-size: 11px;
}
/* Match the review dot used in Traces. The count remains accessible. */
.discovery-coverage-gap-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rf-trajectory-review);
  flex-shrink: 0;
}
.discovery-coverage-tabs {
  display: flex;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid var(--rf-border);
}
.discovery-coverage-tabs button {
  padding: 0 0 12px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--rf-muted);
  font-size: 12px;
}
.discovery-coverage-tabs button[aria-selected="true"] {
  border-bottom-color: var(--rf-jlens-blue);
  color: var(--rf-text);
}
.discovery-coverage-content {
  padding: 18px 20px;
}
.discovery-coverage-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.discovery-coverage-table th {
  text-align: left;
  font-weight: 400;
  font-size: 11px;
  color: var(--rf-muted);
  padding: 0 16px 12px 0;
}
.discovery-coverage-table td {
  vertical-align: top;
  color: var(--rf-text-dim);
  padding: 14px 16px 14px 0;
  border-top: 1px solid var(--rf-border-soft);
  overflow-wrap: anywhere;
}
.discovery-coverage-table :is(th, td):last-child {
  padding-right: 0;
}
.discovery-coverage-table:not(.discovery-network-table) td {
  vertical-align: middle;
}
.discovery-network-table :is(th, td):nth-child(2) {
  text-align: center;
  padding-inline: 8px;
}
.discovery-coverage-table th:first-child { width: 22%; }
.discovery-coverage-table th:nth-child(2) { width: 18%; }
.discovery-network-table th:first-child { width: 38%; }
.discovery-network-table th:nth-child(2) { width: 24%; }
.discovery-network-table th:last-child { width: 38%; }
.discovery-network-table :is(th, td):last-child { text-align: right; }
.discovery-network-table :is(th, td) {
  vertical-align: middle;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.discovery-network-table th { white-space: normal; }
.discovery-coverage-table td p { margin: 0 0 6px; line-height: 1.6; }
.discovery-coverage-table td p:last-child { margin-bottom: 0; }
.discovery-collector-name,
.discovery-collector-result { text-transform: capitalize; }
.discovery-unavailable { display: grid; gap: 5px; margin-top: 10px; }
.discovery-unavailable > span { color: var(--rf-muted); font-size: 11px; }
.discovery-unavailable code { font-size: 11px; overflow-wrap: anywhere; }
.discovery-warning { color: var(--rf-text-amber); }
.discovery-coverage-note,
.discovery-network-note {
  font-size: 11px;
  line-height: 1.6;
}
.discovery-coverage-note { margin: 18px 0 0; }
.discovery-network-note { margin: 18px 0 0; }
@media (max-width: 1150px) {
  .discovery-workspace {
    padding: 24px 20px;
  }
  .discovery-explorer-body.has-details {
    grid-template-columns: minmax(0, 1fr);
  }
  .discovery-inspector {
    border-left: 0;
    border-top: 1px solid var(--rf-border);
  }
}
@media (max-width: 650px) {
  .discovery-workspace {
    padding: 20px 12px 30px;
  }
  .discovery-header {
    align-items: flex-start;
    gap: 10px;
  }
  .discovery-header .discovery-button {
    font-size: 11px;
    padding: 9px 10px;
    white-space: nowrap;
  }
  .discovery-header .discovery-button svg {
    display: none;
  }
  .discovery-summary {
    flex-wrap: wrap;
    padding: 15px 0;
    row-gap: 18px;
  }
  .discovery-summary > div {
    flex: 0 0 calc(50% - 12px);
    padding: 0;
  }
  .discovery-summary .discovery-snapshot {
    flex-basis: 100%;
    align-items: flex-start;
    margin-left: 0;
    padding: 0;
  }
  .discovery-snapshot > span:last-child {
    max-width: 100%;
  }
  .discovery-toolbar {
    padding: 16px 14px;
    flex-wrap: wrap;
  }
  .discovery-view-toggle {
    margin-left: auto;
  }
  .discovery-breadcrumb {
    padding: 14px 14px 0;
  }
  .discovery-canvas-footer {
    padding: 12px;
  }
  .discovery-canvas-footer > span {
    max-width: 190px;
  }
  .discovery-inspector {
    padding: 18px 14px;
  }
  .discovery-list-head {
    display: none;
  }
  .discovery-list-row {
    grid-template-columns: minmax(0, 1fr) 26px;
    gap: 8px;
    padding: 14px;
  }
  .discovery-list-name {
    grid-row: 1;
  }
  .discovery-list-row > .discovery-icon-button {
    grid-column: 2;
    grid-row: 1/3;
  }
  .discovery-list-state {
    grid-column: 1;
    padding-left: 45px;
  }
  .discovery-coverage-heading { padding: 18px 14px; }
  .discovery-coverage-tabs { padding: 0 14px; gap: 16px; }
  .discovery-coverage-table { font-size: 11px; }
  .discovery-coverage-table th:first-child { width: 25%; }
  .discovery-coverage-table th:nth-child(2) { width: 22%; }
  .discovery-network-table th:first-child { width: 38%; }
  .discovery-network-table th:nth-child(2) { width: 24%; }
  .discovery-network-table :is(th, td):nth-child(2) { padding-inline: 4px; }
  .discovery-coverage-table :is(th, td) { padding-right: 10px; }
  .discovery-coverage-content {
    padding: 16px 14px;
  }
  .discovery-empty {
    padding: 42px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .discovery-graph-scene {
    transition: none;
  }
  .discovery-node-shell {
    transition: none;
  }
}
/* Arrange nodes with mouse, touch or keyboard without selecting their text. */
.discovery-node {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.discovery-node.is-dragging {
  cursor: grabbing;
}
.discovery-graph-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.discovery-canvas-footer {
  flex-wrap: wrap;
  gap: 12px;
}
.discovery-summary + .discovery-explorer {
  margin-top: 18px;
}

.discovery-demo-notice { margin: 0 0 20px; color: var(--rf-muted); font-size: 13px; }
.discovery-demo-notice strong { color: var(--rf-text); margin-right: 8px; }
.discovery-page-controls { display: flex; flex-wrap: wrap; gap: 8px; }
