/* 业务组件：表格、状态 pill、订阅/策略列表、指标卡、详情卡、标签页 */

/* ===== 通用数据表 ===== */
.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 320px);
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 34px;
  padding: 0 10px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  height: 46px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}
.data-table td.num { text-align: right; }
.data-table th.num { text-align: right; }
.data-table th.time-col,
.data-table td.time-cell {
  width: 134px;
}
.table-head-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
}
.data-table td.time-cell .cell-main {
  max-width: none;
}
.data-table th.action-col,
.data-table td.action-cell { text-align: left; width: 172px; }
.data-table td.action-cell {
  white-space: nowrap;
}
.data-table td.action-cell .action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.data-table tbody tr:hover { background: var(--bg-2); }
.data-table .empty-row td { height: 120px; text-align: center; color: var(--ink-2); }

/* 表格内两行单元格 */
.cell-main {
  display: block;
  max-width: 180px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 170px;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-sub .status-pill { flex: none; }
.execution-health-summary {
  max-width: 220px;
  font-weight: 600;
  white-space: nowrap;
}
.token-cell { min-width: 230px; }
.token-cell .cell-sub { max-width: 260px; }
.token-address-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.token-address-line .token-copy {
  flex: none;
}
.address-inline {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
}
.address-text {
  color: var(--ink-0);
  font-weight: 700;
}
.icon-copy {
  flex: none;
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 4px;
}
.copy-icon {
  display: block;
  width: 13px;
  height: 13px;
  margin: auto;
  fill: currentColor;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
}
.control-icon {
  display: block;
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.control-icon.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.token-copy {
  display: block;
  height: 22px;
  max-width: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 650;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.token-copy:not(:disabled):hover {
  background: transparent;
  color: var(--accent-strong);
  text-decoration: underline;
  transform: none;
}
.token-copy:not(:disabled):active { transform: none; }

.follow-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(5, 8, 12, 0.54);
}
.follow-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(720px, calc(100vw - 360px));
  min-width: 620px;
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px 16px;
  border-left: 1px solid var(--line-strong);
  background: var(--bg-1);
  box-shadow: -16px 0 42px rgba(0, 0, 0, 0.46);
}
.follow-drawer-head,
.follow-drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.follow-drawer-head {
  min-height: 54px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.follow-drawer-head h2 {
  margin: 0;
  font-size: 18px;
}
.follow-drawer-head p {
  margin: 4px 0 0;
}
.follow-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 12px 2px 2px;
}
.follow-config-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.follow-config-section + .follow-config-section {
  margin-top: 10px;
}
.follow-config-section h3 {
  margin: 0 0 10px;
  color: var(--ink-0);
  font-size: 13px;
}
.follow-config-section .faint {
  margin: 0;
  line-height: 1.45;
}
.follow-grid {
  margin-bottom: 0;
}
.follow-grid input,
.follow-grid select,
.follow-grid textarea {
  width: 100%;
}
.follow-grid .field.wide {
  grid-column: 1 / -1;
}
.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 6px;
}
.strategy-mode-section .settings-preview {
  margin: 10px 0 0;
}
.drawer-strategy-tabs,
.drawer-segmented {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.drawer-strategy-tabs {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.drawer-segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.drawer-strategy-tab,
.drawer-segment {
  width: 100%;
  min-width: 0;
  height: 32px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-1);
}
.drawer-strategy-tab.active,
.drawer-segment.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.drawer-strategy-tab:not(:disabled):hover,
.drawer-segment:not(:disabled):hover {
  background: var(--bg-3);
  border-color: var(--line-strong);
  color: var(--ink-0);
  transform: none;
}
.drawer-strategy-tab.active:not(:disabled):hover,
.drawer-segment.active:not(:disabled):hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.target-wallet-section h3 {
  margin-bottom: 8px;
}
.wallet-address-box input {
  width: 100%;
  height: 44px;
  border-color: var(--line-strong);
  background: var(--bg-3);
  font-size: 13px;
}
.follow-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-1);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}
.follow-advanced summary::-webkit-details-marker {
  display: none;
}
.follow-mode-fields {
  margin-top: 10px;
}
.sell-segmented {
  margin-bottom: 10px;
}
.follow-advanced {
  padding: 0;
  overflow: hidden;
}
.follow-advanced summary {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink-0);
  font-weight: 650;
}
.follow-advanced[open] summary {
  border-bottom: 1px solid var(--line);
}
.follow-advanced .advanced-grid {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 10px 12px 0;
}
.follow-advanced .advanced-grid .field {
  gap: 3px;
}
.follow-advanced .advanced-grid input:not([type="checkbox"]),
.follow-advanced .advanced-grid select {
  height: 30px;
}
.readonly-rule {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-0);
  font-weight: 650;
}
.follow-advanced .advanced-grid .check-field {
  min-height: 28px;
  align-self: stretch;
}
.follow-advanced .faint {
  padding: 8px 12px 10px;
}
.advanced-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent-strong);
  font-weight: 700;
}
.follow-drawer-actions {
  justify-content: start;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
/* 删除挪进抽屉（REQ-0141 修正）：推到右下角，与保存/取消拉开，防误点 */
.follow-drawer-actions .drawer-delete {
  margin-left: auto;
}
.follow-config-button {
  min-width: 86px;
  width: auto;
}

.token-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 16;
  background: rgba(5, 8, 12, 0.48);
}
.token-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(1280px, calc(100vw - 280px));
  min-width: 1040px;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 18px 14px;
  border-left: 1px solid var(--line-strong);
  background: var(--bg-1);
  box-shadow: -16px 0 42px rgba(0, 0, 0, 0.42);
}
.token-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
}
.token-drawer-actions {
  display: flex;
  gap: 8px;
}
.token-drawer-title {
  margin: 0;
  color: var(--ink-0);
  font-size: 16px;
  line-height: 1.25;
}
.token-drawer-title .num {
  margin-left: 4px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
.icon-close {
  width: 34px;
  min-width: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.copytrade-trade-table-wrap {
  min-height: 0;
  overflow: auto;
}
.trade-detail-drawer-body {
  min-height: 0;
  overflow: auto;
  padding-top: 10px;
}
.trade-alert-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.trade-alert-panel.critical {
  border-color: var(--down);
  background: var(--down-dim);
}
.trade-alert-panel.info {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.trade-alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.trade-alert-head strong {
  min-width: 0;
  color: var(--ink-0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trade-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.trade-alert-item {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.trade-alert-item span,
.trade-alert-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trade-alert-item span {
  color: var(--ink-2);
  font-size: 11px;
}
.trade-alert-item strong {
  margin-top: 3px;
  color: var(--ink-0);
  font-size: 12px;
}
.trade-alert-text {
  font-weight: 500;
}
.trade-execution-sub {
  max-width: 120px;
  color: var(--ink-2);
}
.copytrade-trade-table .trade-alert-text,
.copytrade-trade-table .trade-execution-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copytrade-trade-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.follow-outcome-table {
  min-width: 1160px;
}
.follow-outcome-table th:nth-child(1) { width: 96px; }
.follow-outcome-table th:nth-child(2) { width: 160px; }
.follow-outcome-table th:nth-child(3) { width: 118px; }
.follow-outcome-table th:nth-child(4) { width: 138px; }
.follow-outcome-table th:nth-child(5) { width: 138px; }
.follow-outcome-table th:nth-child(6) { width: 138px; }
.follow-outcome-table th:nth-child(7) { width: 104px; }
.follow-outcome-table th:nth-child(8) { width: 148px; }
.follow-outcome-table th:nth-child(9) { width: 82px; }
.follow-outcome-table .cell-main,
.follow-outcome-table .cell-sub {
  max-width: 100%;
  white-space: nowrap;
}
.copytrade-trade-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 46px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.copytrade-trade-table th.num,
.copytrade-trade-table td.num {
  text-align: right;
}
.copytrade-trade-table td {
  height: 54px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-0);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copytrade-trade-table .empty-row td {
  height: 160px;
  color: var(--ink-2);
  text-align: center;
}
.copytrade-trade-table .failure-receipt-row td {
  height: auto;
  padding: 0 10px 10px;
  white-space: normal;
  overflow: visible;
}
.failure-receipt-details {
  border-top: 1px solid var(--line);
}
.failure-receipt-details > summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-1);
  cursor: pointer;
  font-size: 12px;
  list-style: none;
}
.failure-receipt-details > summary::-webkit-details-marker {
  display: none;
}
.failure-receipt-details > summary::before {
  content: "▸";
  color: var(--ink-2);
}
.failure-receipt-details[open] > summary::before {
  content: "▾";
}
.failure-receipt-details > summary strong {
  min-width: 0;
  color: var(--down);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.failure-receipt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.failure-receipt-grid > div {
  min-width: 0;
  padding: 7px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.failure-receipt-grid dt {
  color: var(--ink-2);
  font-size: 11px;
}
.failure-receipt-grid dd {
  margin: 3px 0 0;
  color: var(--ink-0);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.failure-receipt-raw {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding-top: 10px;
}
.failure-receipt-raw h4 {
  margin: 0 0 5px;
  color: var(--ink-1);
  font-size: 11px;
}
.failure-receipt-raw pre {
  max-height: 190px;
  margin: 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--bg-0);
  color: var(--ink-1);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.trade-side-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
}
.trade-side-pill.buy {
  background: var(--up-dim);
  color: var(--up);
}
.trade-side-pill.sell {
  background: var(--down-dim);
  color: var(--down);
}
.trade-link {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}
.trade-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}
.chain-links {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}
.chain-links .trade-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  font-size: 12px;
}
.chain-links .trade-link.follow {
  color: var(--up);
}

button.mini {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

button.copytrade-block-active {
  box-shadow: 0 0 0 1px var(--down-dim) inset;
}
button.icon-button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
}

/* ===== 状态 pill ===== */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--neutral-dim);
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 700;
}
.status-pill.holding, .status-pill.watching { background: var(--up-dim); color: var(--up); }
.status-pill.buy_pending, .status-pill.received { background: var(--warn-dim); color: var(--warn); }
.status-pill.sold { background: rgba(105, 118, 218, 0.18); color: #aeb7ff; }
.status-pill.failed, .status-pill.skipped, .status-pill.skipped_capacity, .status-pill.skipped_strategy, .status-pill.duplicate {
  background: var(--down-dim);
  color: var(--down);
}
.status-pill.copytrade_residual_position_alert { background: var(--warn-dim); color: var(--warn); }
.status-pill.buy { background: var(--up-dim); color: var(--up); }
.status-pill.sell, .status-pill.clear { background: var(--down-dim); color: var(--down); }
.status-pill.active { background: var(--up-dim); color: var(--up); }
.status-pill.paused { background: var(--warn-dim); color: var(--warn); }
.status-pill.failed { background: var(--down-dim); color: var(--down); }

/* 狙击汇总行 */
.snipe-summary {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-1);
  font-size: 12px;
}

.filter-count {
  min-width: 18px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--down-dim);
  color: var(--down);
}

.execution-quality-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  border-block: 1px solid var(--line);
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--panel) 88%, var(--surface));
}

.execution-quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

.execution-quality-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.execution-quality-head strong { font-size: 12px; }

.execution-quality-head > .muted {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
}

button.execution-quality-refresh {
  width: 20px;
  min-width: 20px;
  height: 20px;
}

.execution-quality-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
}

.execution-quality-group {
  min-width: 0;
  padding-top: 5px;
  border-right: 1px solid var(--line);
}

.execution-quality-group:last-child { border-right: 0; }

.execution-quality-group-title {
  padding: 0 9px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.execution-quality-group-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.execution-stage-row td {
  padding: 0;
  background: color-mix(in srgb, var(--panel) 92%, var(--surface));
}

.execution-stage-details {
  border-top: 1px solid var(--line);
}

.execution-stage-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink-1);
}

.execution-stage-details summary strong { font-size: 11px; }

.execution-stage-identity {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.execution-stage-identity > div {
  min-width: 0;
  padding: 6px 10px;
  border-right: 1px solid var(--line);
}

.execution-stage-identity > div:last-child { border-right: 0; }

.execution-stage-identity dt,
.execution-stage-evidence {
  color: var(--muted);
  font-size: 10px;
}

.execution-stage-identity dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.execution-stage-list { display: grid; }

.execution-stage-item {
  display: grid;
  grid-template-columns: minmax(100px, 0.9fr) minmax(116px, 1fr) minmax(64px, 0.5fr) minmax(0, 1.4fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.execution-stage-item:last-child { border-bottom: 0; }

.clearance-stage-item {
  grid-template-columns: minmax(100px, 0.9fr) minmax(116px, 1fr) minmax(0, 1.9fr);
}

.execution-stage-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.execution-stage-main strong,
.execution-stage-item > span,
.execution-stage-evidence {
  min-width: 0;
  overflow-wrap: anywhere;
}

.execution-stage-quantities {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.execution-stage-quantities b { font-weight: 500; }
.execution-stage-quantities em { color: var(--ink-1); font-style: normal; }

.execution-quality-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 10px;
  text-align: center;
}

.execution-quality-empty strong { font-size: 12px; }

.execution-quality-empty .muted { font-size: 11px; }

.execution-quality-metric {
  min-width: 0;
  padding: 5px 9px 7px;
}

.execution-quality-metric span,
.execution-quality-metric strong {
  display: block;
  overflow-wrap: anywhere;
}

.execution-quality-metric span {
  color: var(--muted);
  font-size: 11px;
}

.execution-quality-metric strong {
  margin-top: 2px;
  font-size: 13px;
}

.execution-quality-controls {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
}

.execution-quality-window {
  min-width: 54px;
  height: 25px;
  padding: 0 8px;
  border-radius: 0;
  border-color: var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11px;
}

.execution-quality-window:first-child { border-radius: 4px 0 0 4px; }
.execution-quality-window:last-of-type { border-radius: 0 4px 4px 0; }
.execution-quality-window + .execution-quality-window { margin-left: -1px; }
.execution-quality-window.active { position: relative; z-index: 1; background: var(--up-dim); border-color: var(--up); color: var(--up); }

.execution-quality-coverage-note {
  margin-left: auto;
  padding-left: 10px;
  font-size: 11px;
  white-space: nowrap;
}
.snipe-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.snipe-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.snipe-filter-tab {
  height: 28px;
  padding: 0 9px;
  border-color: var(--line);
  background: var(--bg-2);
  color: var(--ink-1);
  font-size: 12px;
  white-space: nowrap;
}
.snipe-filter-tab.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-strong);
}
.snipe-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink-1);
  font-size: 12px;
}
.snipe-search input {
  min-width: 0;
  height: 28px;
}
.snipe-time-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
}
.snipe-time-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.snipe-window {
  color: var(--ink-2);
  white-space: nowrap;
}

/* ===== 订阅列表 ===== */
.watch-target-form {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.watch-target-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.watch-target-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.watch-target-actions button { width: 72px; }
.watch-target-actions .muted {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.add-follow-config {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.add-follow-config.pending {
  border-color: var(--warn);
  background: var(--warn-dim);
}
.add-follow-config .follow-config-button {
  width: 52px;
  min-width: 52px;
  height: 24px;
}
.watch-target-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 6px;
}
.watch-target-tab {
  height: 28px;
  border-color: var(--line);
  background: var(--bg-2);
  color: var(--ink-1);
  font-size: 12px;
}
.watch-target-tab.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-strong);
}
.source-sortbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 6px;
  margin-bottom: 8px;
}
.source-sort-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--ink-1);
  font-size: 12px;
}
.source-sort-field.direction {
  grid-template-columns: 1fr;
}
.source-sort-field.direction span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.source-sort-field select {
  height: 28px;
  min-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
}
.source-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 350px);
  overflow: auto;
  padding-right: 2px;
}
.source-group-section {
  display: grid;
  gap: 4px;
}
.source-group-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.source-group-section-count {
  flex: none;
  font-weight: 600;
}
.source-group {
  display: grid;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  transition: border-color 120ms ease, background-color 120ms ease;
}
.source-group:hover { border-color: var(--line-strong); background: var(--bg-3); }
.source-group.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.source-group.missing { opacity: 0.68; }
.source-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.source-group-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.source-group-name {
  min-width: 0;
  font-weight: 650;
}
.source-group-count {
  flex: none;
  color: var(--ink-1);
  font-size: 12px;
  font-weight: 600;
}
.source-send-route-badge {
  flex: none;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 650;
  line-height: 14px;
}
.source-send-route-badge.rpc {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.source-send-route-badge.sender {
  border-color: var(--up);
  color: var(--up);
}
.field-note {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.35;
}
.source-group-body {
  display: grid;
  gap: 4px;
}
.source-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.source-fee-summary {
  min-width: 0;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}
.source-summary .addpos-on { color: var(--up); }
.source-summary .addpos-off { color: var(--ink-2); }
.source-wallet-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.wallet-pill .ellipsis { max-width: 120px; }
.wallet-pill .control-icon { width: 11px; height: 11px; }
.wallet-pill.exec {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.wallet-pill.exec:hover { background: rgba(63, 182, 188, 0.28); }
.wallet-pill.member {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-1);
}
.wallet-pill.member:hover { border-color: var(--ink-1); color: var(--ink-0); }
.wallet-more {
  height: 20px;
  min-height: 20px;
  padding: 0 6px;
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}
.wallet-more:hover { color: var(--accent); background: var(--accent-dim); }
.source-trade-summary {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 600;
}
.source-icon-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.source-icon-actions button.icon-button {
  width: 24px;
  min-width: 24px;
  height: 24px;
}
.status-pill.compact {
  flex: none;
  min-width: 42px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
}
.status-pill.compact.active {
  background: var(--up-dim);
  color: var(--up);
}
.status-pill.compact.paused {
  background: var(--warn-dim);
  color: var(--warn);
}
.sub-pause.paused {
  border-color: var(--warn);
  color: var(--warn);
}
/* ===== 指标卡 ===== */
.metric-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.metric-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.metric-card .metric-label { color: var(--ink-1); font-size: 12px; }
.metric-card .metric-value { font-size: 18px; font-weight: 700; }

.metric-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 8px;
}
.metric-mini {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--bg-2);
}
.metric-mini .metric-label { flex: none; color: var(--ink-2); font-size: 12px; }
.metric-mini .metric-value { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 加载失败占位 ===== */
.load-error {
  padding: 10px;
  border: 1px dashed var(--down);
  border-radius: var(--radius-sm);
  color: var(--down);
  font-size: 12px;
}
.ok-text { color: var(--up); }
.danger-text { color: var(--down); }

/* ===== 面板头部动作区 ===== */
.head-actions { display: flex; align-items: center; gap: 8px; }

.sub-delete,
.sub-restore {
  height: 24px;
  font-size: 12px;
}

/* ===== 交易面板 ===== */
.trade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.trade-grid .field { display: grid; gap: 4px; min-width: 0; }
.trade-grid .field > label { color: var(--ink-1); font-size: 12px; white-space: nowrap; }
.trade-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ===== 安全消息 ===== */
.safety-message-panel {
  min-height: 260px;
}
.safety-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.safety-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.safety-metric span {
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1;
}
.safety-metric strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.safety-message-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}
.safety-message-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 12px;
}
.safety-message-tab.active {
  border-color: var(--accent);
  color: var(--ink-0);
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-2));
}
.message-drawer {
  display: grid;
  gap: 4px;
  max-height: 320px;
  overflow: auto;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.safety-message-list {
  max-height: 360px;
}
.message-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
}
.message-row .message-text { color: var(--ink-1); }
.warn-ink { color: var(--warn); }

/* ===== 模态 ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 12, 0.66);
}
.modal {
  width: min(560px, calc(100vw - 40px));
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-1);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}
.modal .head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.settings-preview {
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-1);
  font-size: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.settings-grid .field { display: grid; gap: 4px; }
.settings-grid .field > label { color: var(--ink-1); font-size: 12px; }
.field-hint {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.35;
}
.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  color: var(--ink-1);
  font-size: 12px;
  cursor: pointer;
}
.check-field input { width: 16px; height: 16px; accent-color: var(--accent); }
.check-field.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.modal-actions { display: flex; align-items: center; gap: 8px; }

/* ===== 地址分析工作区 ===== */
.address-query-form .field {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.address-query-form .field > span {
  color: var(--ink-1);
  font-size: 12px;
}
.address-query-form input,
.address-query-form select,
.address-query-form button {
  width: 100%;
}
.address-input-field input {
  height: 36px;
  border-color: var(--line-strong);
  background: var(--bg-3);
  font-size: 13px;
}
.limit-field select {
  height: 36px;
}
.address-query-form button {
  height: 36px;
}
/* 结论横幅：可跟性仪表 + 理由 + 样本徽章 */
.address-verdict-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.address-verdict-panel.without-chart {
  grid-template-columns: minmax(0, 1fr);
}
.verdict-gauge {
  min-width: 0;
}
.verdict-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.verdict-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.verdict-title {
  font-size: 20px;
  font-weight: 600;
}
.verdict-scope {
  font-size: 11px;
}
.verdict-detail {
  margin: 0;
  color: var(--ink-1);
  line-height: 1.5;
}
.verdict-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.verdict-badge {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-1);
  font-size: 12px;
}
.verdict-badge strong {
  color: var(--ink-0);
}
.verdict-precision {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
}
.verdict-limitations {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
}
.verdict-limitations li + li {
  margin-top: 2px;
}

/* 四维图表卡 */
.follow-chart-card {
  display: grid;
  gap: 10px;
  align-content: start;
}
.chart-box {
  width: 100%;
  height: 200px;
  min-width: 0;
}
.chart-gauge {
  height: 160px;
}
.chart-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  border-top: 1px solid var(--line);
}
.chart-fact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 27px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-1);
  font-size: 12px;
}
.chart-fact strong {
  overflow: hidden;
  color: var(--ink-0);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 折叠详情与诊断 */
.address-details-panel {
  display: grid;
  gap: 8px;
}
.detail-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.detail-block > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--ink-0);
  font-size: 13px;
}
.detail-block > summary::-webkit-details-marker {
  display: none;
}
.detail-block > summary::before {
  content: "▸";
  color: var(--ink-2);
  font-size: 11px;
}
.detail-block[open] > summary::before {
  content: "▾";
}
.detail-block[open] > summary {
  border-bottom: 1px solid var(--line);
}
.detail-block > summary .detail-title {
  font-weight: 600;
}
.detail-block > summary .ghost.mini {
  margin-left: auto;
}
.detail-block > .table-wrap {
  margin: 8px;
}
.address-profile-table {
  min-height: 240px;
  max-height: 360px;
}
.address-unsupported-table {
  min-height: 300px;
  max-height: calc(100vh - 450px);
}
.address-unsupported-group-table {
  min-height: 160px;
  max-height: 260px;
  margin-bottom: 8px;
}
.address-events-table {
  min-height: 300px;
  max-height: 520px;
}
.address-profile-table .data-table td,
.address-unsupported-group-table .data-table td,
.address-unsupported-table .data-table td,
.address-events-table .data-table td {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.address-unsupported-group-table .data-table td:nth-child(3),
.address-unsupported-group-table .data-table td:nth-child(4),
.address-unsupported-group-table .data-table td:nth-child(5),
.address-unsupported-group-table .data-table td:nth-child(7) {
  max-width: 190px;
}
.address-unsupported-table .data-table td:nth-child(1) {
  min-width: 118px;
}
.address-unsupported-table .data-table td:nth-child(3),
.address-unsupported-table .data-table td:nth-child(6),
.address-unsupported-table .data-table td:nth-child(7),
.address-unsupported-table .data-table td:nth-child(8) {
  max-width: 190px;
}
.address-events-table .trade-side-pill {
  min-width: 48px;
  height: 26px;
  font-size: 12px;
}

/* ===== 钱包工作区 ===== */
.wallet-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.wallet-form .field {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.wallet-form .field > span {
  color: var(--ink-1);
  font-size: 12px;
}
.wallet-form input,
.wallet-form select,
.wallet-form textarea {
  width: 100%;
}
.wallet-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wallet-table-wrap {
  min-height: 420px;
  max-height: calc(100vh - 250px);
}
.wallet-table .token-cell {
  min-width: 280px;
}
.wallet-table .token-cell .cell-main {
  max-width: 260px;
}
.wallet-table .token-cell .cell-sub {
  max-width: 520px;
}
.wallet-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  min-height: 24px;
}
.wallet-name-row .cell-main {
  flex: 0 1 auto;
}
.wallet-name-edit-button {
  flex: none;
  max-width: 42px;
}
.wallet-name-edit-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 44px 44px;
  align-items: center;
  gap: 6px;
  max-width: 390px;
  min-height: 28px;
}
.wallet-name-input {
  min-width: 0;
  height: 26px;
  padding: 0 8px;
}
.wallet-table .wallet-address-line {
  align-items: center;
}
.wallet-table .wallet-address-line .ellipsis {
  min-width: 0;
}
.wallet-table .wallet-action-cell {
  width: 188px;
}

/* ===== 架构工作区 ===== */
.architecture-tab-panel {
  padding: 8px 12px;
}
.architecture-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}
.architecture-tab {
  height: 30px;
  padding: 0 8px;
  border-color: var(--line);
  background: var(--bg-2);
  color: var(--ink-1);
  font-size: 12px;
}
.architecture-tab.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-strong);
}
.architecture-tab:not(:disabled):hover {
  background: var(--bg-3);
  border-color: var(--line-strong);
  color: var(--ink-0);
  transform: none;
}
.architecture-summary-strip,
.architecture-definition-panel,
.architecture-mermaid-panel,
.architecture-system-index,
.architecture-code-panel {
  min-width: 0;
}
.architecture-page-toc {
  position: sticky;
  top: 12px;
  align-self: start;
  padding: 10px;
}
.architecture-title-block {
  display: grid;
  gap: 4px;
}
.architecture-title-block h2 {
  margin: 0;
}
.architecture-summary-text {
  margin: 0;
  max-width: 860px;
  line-height: 1.5;
}
.architecture-summary-strip,
.architecture-boundary-grid,
.architecture-system-list,
.architecture-constraint-grid,
.architecture-toc-list,
.architecture-section-stack {
  display: grid;
  gap: 8px;
}
.architecture-section-panel {
  scroll-margin-top: 16px;
}
.architecture-section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 2px;
}
.architecture-section-heading h2 {
  margin: 0;
}
.architecture-constraint-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.architecture-summary-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.architecture-summary-card,
.architecture-boundary-card,
.architecture-system-link {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}
.architecture-summary-card strong,
.architecture-boundary-card strong,
.architecture-system-link strong {
  color: var(--ink-0);
}
.architecture-summary-card span,
.architecture-boundary-card span,
.architecture-system-link span {
  color: var(--ink-1);
  line-height: 1.45;
}
.architecture-boundary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.architecture-toc-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-1);
  text-align: left;
  font-size: 12px;
}
.architecture-toc-link span:last-child {
  line-height: 1.4;
}
.architecture-toc-link:hover {
  border-color: var(--line-strong);
  background: var(--bg-3);
  color: var(--ink-0);
  transform: none;
}
.architecture-mermaid-panel {
  overflow: hidden;
  min-height: 0;
}
.architecture-mermaid {
  margin: 0;
  padding: 6px 0 0;
  overflow: auto;
  background: transparent;
  white-space: pre-wrap;
  min-height: 0;
}
.architecture-mermaid svg {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.architecture-caption {
  margin: 6px 0 0;
  color: var(--ink-1);
  font-size: 12px;
  line-height: 1.45;
}
.architecture-flow-lead {
  margin: 2px 0 10px;
  color: var(--ink-1);
  font-size: 12px;
  line-height: 1.5;
}
.architecture-system-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.architecture-system-link {
  min-width: 0;
  text-align: left;
  cursor: pointer;
  align-content: start;
  min-height: 92px;
}
.architecture-system-link:hover {
  border-color: var(--line-strong);
  background: var(--bg-3);
  transform: none;
}
.architecture-table-wrap {
  max-height: none;
  min-height: 0;
}
.architecture-table td:nth-child(1),
.architecture-table td:nth-child(2),
.architecture-table td:nth-child(5) {
  white-space: normal;
}
.architecture-code-panel .table-wrap {
  min-height: 0;
  max-height: none;
}
.architecture-code-panel .data-table td,
.architecture-code-panel .data-table th {
  white-space: normal;
}
.architecture-overview-layout .architecture-summary-strip {
  margin-bottom: 0;
}
.architecture-system-index--compact {
  padding-top: 10px;
}
.architecture-mermaid-panel--hero .architecture-mermaid {
  min-height: 170px;
}
.architecture-mermaid-panel--medium .architecture-mermaid {
  min-height: 250px;
}
.architecture-mermaid-panel--decision .architecture-mermaid {
  min-height: 360px;
}
.architecture-mermaid-panel--decision .architecture-mermaid svg {
  min-width: 0;
  width: 100%;
  max-width: 680px;
}
.architecture-mermaid-panel--compact .architecture-mermaid {
  min-height: 170px;
}
.architecture-mermaid-panel--context .architecture-mermaid {
  min-height: 260px;
}
.architecture-mermaid-panel--flow .architecture-mermaid {
  min-height: 340px;
}
.architecture-subflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.architecture-mermaid-panel--loop .architecture-mermaid {
  min-height: 460px;
}
.architecture-mermaid-panel--subflow .architecture-mermaid {
  min-height: 250px;
}
.architecture-code-panel--system {
  padding: 10px;
}
.architecture-code-panel--glossary .table-wrap {
  min-height: 0;
}
.architecture-code-map {
  display: grid;
  gap: 6px;
}
.architecture-code-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.architecture-code-item strong {
  color: var(--ink-0);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  word-break: break-all;
}
.architecture-code-item span {
  color: var(--ink-1);
  line-height: 1.35;
  font-size: 12px;
}
.architecture-glossary-layout .architecture-mermaid svg {
  min-width: 760px;
}
.architecture-code-panel--glossary .data-table td {
  height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.45;
  vertical-align: top;
}
.architecture-local-glossary-panel {
  min-width: 0;
}
.architecture-table--glossary th:nth-child(1) {
  width: 10%;
}
.architecture-table--glossary th:nth-child(2) {
  width: 12%;
}
.architecture-table--glossary th:nth-child(3) {
  width: 18%;
}
.architecture-table--glossary th:nth-child(4),
.architecture-table--glossary th:nth-child(5),
.architecture-table--glossary th:nth-child(6) {
  width: 16%;
}
.architecture-table--glossary th:nth-child(7) {
  width: 12%;
}
.architecture-table--local-glossary th:nth-child(1) {
  width: 10%;
}
.architecture-table--local-glossary th:nth-child(2) {
  width: 12%;
}
.architecture-table--local-glossary th:nth-child(3) {
  width: 16%;
}
.architecture-table--local-glossary th:nth-child(4),
.architecture-table--local-glossary th:nth-child(5),
.architecture-table--local-glossary th:nth-child(6) {
  width: 17%;
}
.architecture-table--local-glossary th:nth-child(7) {
  width: 11%;
}
.architecture-table--local-glossary td,
.architecture-table--local-glossary th,
.architecture-table--glossary td,
.architecture-table--glossary th {
  white-space: normal;
  vertical-align: top;
}
.architecture-table--local-glossary td,
.architecture-table--glossary td {
  height: auto;
  line-height: 1.45;
  padding-top: 8px;
  padding-bottom: 8px;
}
.architecture-table--local-glossary td:nth-child(2),
.architecture-table--glossary td:nth-child(2) {
  font-size: 12px;
  color: var(--ink-2);
}
.architecture-table--local-glossary td:last-child,
.architecture-table--glossary td:last-child {
  color: var(--ink-0);
  word-break: break-all;
}
