.transaction-flow {
  --flow-paper: var(--paper);
  --flow-field: var(--bg);
  --flow-rule: var(--line);
  --flow-ink: var(--ink);
  --flow-sub: var(--sub);
  --flow-inset: clamp(14px, 1.6vw, 24px);
  min-width: 0;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--flow-ink);
  background: var(--flow-paper);
  border: 1px solid var(--flow-rule);
  border-radius: 12px;
}
.txg-header, .txg-heading, .txg-tools, .txg-camera,
.txg-nav, .txg-stepper, .txg-pages, .txg-detail-head, .txg-trace-controls {
  display: flex;
  align-items: center;
}
.txg-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 423px) auto;
  gap: 8px 18px;
  padding: 14px var(--flow-inset);
  border-bottom: 1px solid var(--flow-rule);
}
.txg-heading {flex-direction:column; align-items:flex-start; gap:2px}
#search-body .txg-heading h3, .txg-heading h3 {
  margin: 0;
  font: 650 20px/1.25 Inter, Arial, sans-serif;
  letter-spacing: -.035em;
}
.txg-count, .txg-notice, .txg-pages, .txg-trace-controls [role="status"] {
  color: var(--flow-sub);
  font: 450 12px/1.5 Inter, Arial, sans-serif;
}
.txg-count, .txg-step-label, .txg-zoom-value {font-variant-numeric: tabular-nums}
.txg-tools {gap: 6px}
.transaction-flow .txg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 34px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--flow-rule);
  border-radius: 6px;
  color: var(--flow-ink);
  background: var(--flow-paper);
  font: 570 13px/1.25 Inter, Arial, sans-serif;
  white-space: nowrap;
}
.transaction-flow .txg-expand {
  padding-inline: 12px;
  background: var(--flow-paper);
}
.txg-expand::before {
  content: '';
  width: 14px;
  height: 14px;
  background: linear-gradient(currentColor,currentColor) left top/5px 1.5px,
    linear-gradient(currentColor,currentColor) left top/1.5px 5px,
    linear-gradient(currentColor,currentColor) right top/5px 1.5px,
    linear-gradient(currentColor,currentColor) right top/1.5px 5px,
    linear-gradient(currentColor,currentColor) left bottom/5px 1.5px,
    linear-gradient(currentColor,currentColor) left bottom/1.5px 5px,
    linear-gradient(currentColor,currentColor) right bottom/5px 1.5px,
    linear-gradient(currentColor,currentColor) right bottom/1.5px 5px;
  background-repeat:no-repeat;
}
.transaction-flow .txg-button:hover:not(:disabled) {background: var(--tint); border-color: var(--accent-border)}
.transaction-flow .txg-button:disabled {opacity: .42; cursor: default}
.transaction-flow :is(button, select, a):focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  z-index: 1;
}
.txg-workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  height: clamp(380px, 60vh, 760px);
}
.txg-viewport {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background-color: var(--flow-field);
  background-image: radial-gradient(var(--flow-rule) .7px, transparent .85px);
  background-size: 22px 22px;
}
.txg-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.txg-canvas:active {cursor: grabbing}
.txg-canvas:focus-visible {outline: 2px solid var(--link); outline-offset: -3px}
.txg-camera {
  position: absolute;
  bottom: 14px;
  left: 14px;
  gap: 1px;
  padding: 3px;
  border: 1px solid var(--flow-rule);
  border-radius: 8px;
  background: var(--flow-paper);
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}
.transaction-flow .txg-camera .txg-button {
  position: relative;
  min-width: 32px;
  min-height: 32px;
  padding-inline: 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.transaction-flow .txg-camera .txg-button:last-child {
  margin-left: 3px;
  padding-inline: 10px;
  border-left: 1px solid var(--flow-rule);
  border-radius: 0 4px 4px 0;
}
.transaction-flow .txg-camera .txg-button:hover:not(:disabled) {background: var(--tint)}
.transaction-flow .txg-zoom-value {min-width: 47px; font-size: 12px}
.txg-edge, .txg-node {cursor: pointer}
.txg-edge .txg-hit {fill: none; stroke: transparent; stroke-width: 18}
.txg-edge .txg-line {fill: none; stroke-width: 1.9}
.txg-edge:is(:hover, .txg-related) .txg-line {stroke-width: 2.6}
.txg-edge.txg-selected .txg-line {stroke-width: 3.8}
.txg-node.txg-muted {opacity: .36}
.txg-edge.txg-muted {opacity: .12}
.txg-edge.txg-muted:hover, .txg-node.txg-muted:hover {opacity: .85}
.txg-edge.txg-muted .txg-edge-label {visibility: hidden}
.txg-edge-label {
  font: 560 11.5px/1.2 Inter, Arial, sans-serif;
  fill: var(--flow-sub);
  paint-order: stroke;
  stroke: var(--flow-field);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.txg-edge.txg-selected .txg-edge-label {font-weight: 720; fill: var(--flow-ink)}
.txg-dense .txg-edge .txg-line {opacity: .66}
.txg-dense .txg-edge .txg-edge-label {visibility: hidden}
.txg-dense .txg-edge.txg-labeled:not(.txg-muted) .txg-edge-label {visibility: visible}
.txg-dense .txg-edge:is(.txg-selected, .txg-related, :hover) .txg-line {opacity: 1}
.txg-dense .txg-edge:is(.txg-selected, :hover) .txg-edge-label {visibility: visible}
.txg-edge:not(.txg-labeled):not(.txg-selected):not(:hover) .txg-edge-label {visibility:hidden}
.txg-other-asset:not(.txg-selected):not(:hover) {opacity: .13}
.txg-edge.txg-other-asset:not(.txg-selected):not(:hover) .txg-edge-label {visibility:hidden}
.txg-node > rect {fill: var(--flow-paper); stroke: color-mix(in srgb,var(--flow-sub) 30%,var(--flow-rule)); stroke-width: 1.2}
.txg-node[data-role="sender"] > rect {fill: light-dark(#f0f7ff,#223848); stroke: light-dark(#98b3d2,#7199b6)}
.txg-node[data-role="recipient"] > rect {fill: color-mix(in srgb,var(--accent-soft) 65%,var(--flow-paper)); stroke: var(--accent-border)}
.txg-node:is(:hover, .txg-related) > rect {fill: var(--accent-soft); stroke: var(--accent-border); stroke-width: 1.6}
.txg-node.txg-selected > rect {fill: var(--accent-soft); stroke: var(--primary); stroke-width: 2}
.txg-node-name {font: 650 13px/1.2 Inter, Arial, sans-serif; fill: var(--flow-ink)}
.txg-node-sub {font: 430 11px/1.2 Inter, Arial, sans-serif; fill: var(--flow-sub)}
.txg-inspector {
  flex: 0 0 clamp(240px, 19vw, 285px);
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 17px;
  border-left: 1px solid var(--flow-rule);
  background: var(--flow-paper);
}
.txg-detail-head {
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--flow-rule);
  font-size: 14px;
}
.txg-detail-head .txg-close {border-color: transparent}
.txg-transfer-summary {
  display: grid;
  gap: 5px;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--flow-rule);
}
.txg-transfer-kind {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--flow-sub);
  font: 550 12px/1.3 Inter, Arial, sans-serif;
}
.txg-transfer-kind::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--asset-color);
}
.txg-transfer-value {
  font: 640 clamp(16px,1.3vw,20px)/1.35 Inter, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.txg-sequence {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 8px var(--flow-inset);
  border-top: 1px solid var(--flow-rule);
  scrollbar-width: thin;
  scrollbar-color: var(--flow-rule) transparent;
}
.transaction-flow .txg-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  min-height: 34px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--flow-rule);
  border-radius: 6px;
  background: var(--flow-paper);
  color: var(--flow-ink);
  font: 550 12px/1.2 Inter,Arial,sans-serif;
  font-variant-numeric: tabular-nums;
}
.txg-chip-caption {overflow: hidden; white-space: nowrap; text-overflow: ellipsis}
.txg-chip-index {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 3px;
  border-radius: 4px;
  color: var(--asset-color);
  background: color-mix(in srgb,var(--asset-color) 10%,var(--flow-paper));
}
.transaction-flow .txg-chip:hover, .transaction-flow .txg-chip[aria-pressed="true"] {
  border-color: var(--asset-color);
  background: color-mix(in srgb,var(--asset-color) 7%,var(--flow-paper));
}
.txg-chip[aria-pressed="true"] .txg-chip-index {color: white; background: var(--asset-color)}
.txg-details:empty {display: none}
#search-body .txg-details dl, .txg-details dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 12px 0 0;
}
#search-body .txg-details dt, .txg-details dt {
  margin: 10px 0 0;
  color: var(--flow-sub);
  font: 550 12px/1.4 Inter, Arial, sans-serif;
  text-transform: none;
  letter-spacing: normal;
}
#search-body .txg-details dt:first-child, .txg-details dt:first-child {margin: 0}
#search-body .txg-details dd, .txg-details dd {
  min-width: 0;
  margin: 0;
  color: var(--flow-ink);
  font: 470 13px/1.5 Inter, Arial, sans-serif;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.txg-details a {
  color: var(--link);
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration:none;
}
.txg-details a:hover {color:var(--link-hover)}
.transaction-flow .txg-locate {
  display: flex;
  width: max-content;
  min-width: 0;
  min-height: 26px;
  margin-top: 2px;
  padding: 2px 4px;
  gap: 5px;
  color: var(--link);
  border: 0;
  background: transparent;
  font-size: 12px;
}
.txg-locate::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: radial-gradient(currentColor 1.5px, transparent 2px);
}
.txg-nav {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px var(--flow-inset);
  border-top: 1px solid var(--flow-rule);
}
.txg-list-toggle::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 1px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.txg-list-toggle[aria-expanded="true"]::before {transform: translateY(2px) rotate(225deg)}
.txg-list-toggle[aria-expanded="true"] {background: var(--accent-soft)}
.txg-stepper, .txg-pages {gap: 8px}
.txg-step-label {color: var(--flow-ink); font-size: 13px; font-weight: 600}
.txg-finder {
  position: relative;
  display: flex;
  flex: 1 1 210px;
  min-width: 0;
}
.txg-query-tools {display:flex; min-width:0; align-items:center; gap:8px}
.transaction-flow .txg-asset-filter {
  min-width:0; max-width:32%; min-height:36px;
  font:530 13px/1.35 Inter,Arial,sans-serif;
  appearance:none;
  background:linear-gradient(45deg, transparent 48%, currentColor 50% 68%, transparent 70%) calc(100% - 13px) 52% / 5px 5px,
    linear-gradient(-45deg, transparent 48%, currentColor 50% 68%, transparent 70%) calc(100% - 10px) 52% / 5px 5px,
    var(--flow-paper);
  background-repeat:no-repeat;
  border:1px solid var(--flow-rule); border-radius:6px; padding:4px 27px 4px 10px;
  text-overflow:ellipsis;
}
.transaction-flow .txg-asset-filter:has(option:checked:not([value=""])) {border-color:var(--accent-border); color:var(--link); background-color:var(--accent-soft)}
.transaction-flow :is(.txg-select, .txg-find) {
  min-width: 0;
  min-height: 36px;
  padding: 5px 8px;
  color: var(--flow-ink);
  background: var(--flow-paper);
  border: 1px solid var(--flow-rule);
  border-radius: 6px;
  font: 500 13px/1.4 Inter, Arial, sans-serif;
  text-overflow: ellipsis;
}
.transaction-flow .txg-find {width: 100%; padding-inline: 33px 10px}
.txg-finder::before, .txg-finder::after {content:''; position:absolute; pointer-events:none; color:var(--flow-sub)}
.txg-finder::before {width:10px;height:10px;left:12px;top:calc(50% - 7px);border:1.5px solid currentColor;border-radius:50%}
.txg-finder::after {width:6px;left:21px;top:calc(50% + 5px);border-top:1.5px solid currentColor;transform:rotate(45deg)}
.transaction-flow .txg-find::placeholder {color: var(--flow-sub)}
.transaction-flow .txg-select {
  position: absolute;
  z-index: 3;
  right: 0;
  top: calc(100% + 5px);
  width: max(100%, min(285px, calc(100vw - 64px)));
  height: min(190px, 35vh);
  padding: 4px;
  box-shadow: 0 4px 20px rgb(0 0 0 / 14%);
}
.txg-select :is(option, optgroup) {padding: 3px 5px}
.txg-pages {padding: 0 var(--flow-inset) 10px}
.transaction-flow .txg-notice {margin: 0; padding: 0 var(--flow-inset) 12px}
.txg-footer {display:flex; align-items:center; justify-content:space-between; gap:5px 16px; flex-wrap:wrap; padding:7px var(--flow-inset); border-top:1px solid var(--flow-rule)}
.txg-footer:empty {display:none}
.transaction-flow .txg-footer .txg-notice {padding:0; flex:1 1 270px}
.txg-trace-controls {
  flex-wrap: wrap;
  gap: 5px 12px;
}
.txg-trace-controls [role="status"]:empty {display:none}
.txg-trace-controls [role="status"] {flex: 1 1 190px; min-width: 0; overflow-wrap: anywhere}
.txg-host, .txg-mount {min-width: 0; min-height: 0}
html.txg-modal-open {overflow: hidden}
dialog.txg-dialog, .txg-host:fullscreen, .transaction-flow:is(.txg-expanded, :fullscreen) {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
}
dialog.txg-dialog {position: fixed; inset: 0; padding: 0; overflow: hidden; box-shadow: none}
dialog.txg-dialog::backdrop {background: var(--bg)}
:is(dialog.txg-dialog, .txg-host:fullscreen) > .txg-mount {height: 100%}
.transaction-flow:is(.txg-expanded, :fullscreen) {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.transaction-flow:is(.txg-expanded, :fullscreen) > .txg-workspace {flex: 1 1 0%; min-height: 0; height: auto}
.transaction-flow:is(.txg-expanded, :fullscreen) > :not(.txg-workspace) {flex: 0 0 auto}

@media (max-width: 700px) {
  .txg-header {grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding-block: 10px}
  .txg-tools {grid-column:2; grid-row:1; justify-self:end}
  .txg-header .txg-query-tools {grid-column:1 / -1; grid-row:2}
  .txg-heading {display: grid; gap: 0}
  .txg-workspace {flex-direction: column; height: auto}
  .txg-viewport {flex: none; height: clamp(360px, 52vh, 520px)}
  .txg-inspector {
    flex: none;
    max-height: 210px;
    padding: 10px var(--flow-inset);
    border-left: 0;
    border-top: 1px solid var(--flow-rule);
  }
  #search-body .txg-details dl, .txg-details dl {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px 12px;
  }
  #search-body .txg-details dt, .txg-details dt {margin: 0}
  .txg-transfer-summary {padding-block: 7px; gap: 2px}
  .txg-detail-head {padding-bottom: 3px}
  #search-body .txg-details dl, .txg-details dl {margin-top: 6px}
  .txg-endpoint {display: flex; align-items: center; gap: 6px}
  .txg-endpoint a {overflow: hidden; white-space: nowrap; text-overflow: ellipsis}
  .transaction-flow .txg-endpoint .txg-locate {
    flex: none; min-width: 24px; min-height: 24px; margin: 0; padding: 4px; font-size: 0; gap: 0;
  }
  .txg-camera {left: 9px; bottom: 9px; padding: 2px}
  .txg-nav {gap: 6px; padding-block: 8px}
  .txg-finder {flex: 1 1 145px}
  .transaction-flow .txg-notice {padding-bottom: 9px}
  .transaction-flow:is(.txg-expanded, :fullscreen) .txg-viewport {flex: 1 1 0%; height: auto}
  .transaction-flow:is(.txg-expanded, :fullscreen) .txg-inspector {max-height: min(23dvh, 210px)}
}
@media (max-width:700px) and (max-height:650px) {
  .transaction-flow.txg-expanded .txg-header {
    grid-template-columns:minmax(0, 1fr) minmax(115px, 1.35fr) auto;
  }
  .transaction-flow.txg-expanded .txg-heading h3 {font-size:16px}
  .transaction-flow.txg-expanded .txg-header .txg-query-tools {grid-column:2;grid-row:1}
  .transaction-flow.txg-expanded .txg-query-tools {flex-wrap:wrap;gap:3px}
  .transaction-flow.txg-expanded .txg-query-tools .txg-asset-filter {width:100%;max-width:100%}
  .transaction-flow.txg-expanded .txg-tools {grid-column:3}
  .transaction-flow.txg-expanded .txg-expand {font-size:0;gap:0;padding:4px}
}
@media (pointer: coarse) {
  .transaction-flow .txg-button, .transaction-flow .txg-chip, .transaction-flow .txg-camera .txg-button, .transaction-flow .txg-asset-filter,
  .transaction-flow :is(.txg-select, .txg-find) {min-height: 44px}
  .transaction-flow .txg-button, .transaction-flow .txg-camera .txg-button {min-width: 44px}
  .transaction-flow :is(.txg-select, .txg-find) {font-size: 16px}
}
@media (max-width: 700px) and (max-height: 650px) and (orientation: portrait) {
  .transaction-flow:is(.txg-expanded, :fullscreen) .txg-inspector {max-height: 19dvh}
}
@media (max-height: 500px) and (orientation: landscape) {
  .transaction-flow:is(.txg-expanded, :fullscreen) .txg-workspace {flex-direction: row}
  .transaction-flow:is(.txg-expanded, :fullscreen) .txg-inspector {
    flex: 0 0 min(34vw, 260px);
    max-height: 100%;
    border-left: 1px solid var(--flow-rule);
    border-top: 0;
  }
  .transaction-flow:is(.txg-expanded, :fullscreen) .txg-header,
  .transaction-flow:is(.txg-expanded, :fullscreen) .txg-nav {padding-block: 4px}
}

.txg-minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 144px;
  height: 80px;
  padding: 5px;
  border: 1px solid var(--flow-rule);
  border-radius: 7px;
  background: var(--flow-paper);
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
  touch-action: none;
  cursor: crosshair;
}
.txg-minimap[hidden] {display: none}
.txg-minimap svg {display: block; width: 100%; height: 100%; overflow: visible}
.txg-minimap-lines {fill: none; stroke: color-mix(in srgb,var(--flow-sub) 50%,var(--flow-rule)); stroke-width: .7; vector-effect: non-scaling-stroke}
.txg-minimap-cards {fill: var(--flow-sub)}
.txg-minimap-window {fill: color-mix(in srgb,var(--ink) 10%,transparent); stroke: var(--primary); stroke-width: 1.6; vector-effect: non-scaling-stroke}
@media (max-width: 700px) {
  .txg-minimap {right: 9px; bottom: 9px; width: min(25vw, 100px); height: 51px; padding: 4px}
}
@media (max-width: 360px), (max-height: 500px) and (orientation: landscape) {
  .txg-minimap {top: 9px; bottom: auto; right: 9px; width: 80px; height: 45px}
}

:root[data-theme=dark] .txg-line {filter:brightness(1.55)}
:root[data-theme=dark] .txg-chip-index {color:color-mix(in srgb,var(--asset-color) 45%,white)}
:root[data-theme=dark] .txg-chip[aria-pressed=true] .txg-chip-index {color:white}
