/*
 * Chain-scan speed test (Trenches benchmark) page local styles — uses only existing styles.css tokens and does not change shared styles.
 * Design direction: dashboard-style high-density dark theme (same family as the detail page), a single accent color --accent; GMGN/OKX use only the existing platform colors.
 * Numbers are always monospace + tabular-nums; missing shows 「缺失」 ("missing"), never drawn as 0 or a winner.
 */
.tr-main {
  max-width: 1400px; margin: 0 auto; padding: 24px 28px 64px;
  /* 2026-10-19 taste pass: the shared --faint (#6b665d) is only 3.2:1 on panels, failing WCAG AA; brightened to 4.9:1 only within this page's scope,
   * without changing the shared tokens in styles.css (other pages unaffected). */
  --faint: #8a8478;
}
.tr-loading, .tr-note { color: var(--muted); font-size: 13px; }
.tr-h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; margin: 0; }
.tr-h3 { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin: 0; }
.tr-sub { color: var(--muted); font-size: 12.5px; line-height: 1.55; max-width: 72ch; margin: 6px 0 0; }
.tr-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tr-faint { color: var(--faint); }
.tr-missing { color: var(--faint); font-style: normal; }

/* Layout: home has the form on the left and status on the right, with the run list below */
.tr-home { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1024px) { .tr-home { grid-template-columns: minmax(0, 1fr); } }
.tr-home > * { min-width: 0; }
.tr-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; }
.tr-panel + .tr-panel { margin-top: 0; }
.tr-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tr-runs { grid-column: 1 / -1; display: grid; gap: 20px; min-width: 0; }
.tr-col { display: grid; gap: 20px; align-content: start; min-width: 0; }
/* Scheduled tests */
.tr-routine .tr-kv { margin-bottom: 10px; }
.tr-routine-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; }
.tr-routine-hist { margin-top: 8px; }
.tr-routine-run { border: 1px solid var(--line2); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; color: var(--muted); text-decoration: none; }
a.tr-routine-run:hover, a.tr-routine-run:focus-visible { color: var(--text); border-color: var(--accent); }
.tr-routine-run.done { color: var(--win); border-color: rgba(61, 219, 146, 0.4); }
.tr-routine-run.failed, .tr-routine-run.interrupted { color: #ffb4b4; border-color: rgba(239, 68, 68, 0.45); }
.tr-badge-routine { border-color: var(--line2); color: var(--muted); }
.tr-runs > * { min-width: 0; }

/* Form */
.tr-form { display: grid; gap: 14px; }
.tr-field { display: grid; gap: 6px; }
.tr-label { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted);
  transition: border-color 0.2s var(--ease-taste), color 0.2s var(--ease-taste), background 0.2s var(--ease-taste);
}
.tr-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tr-chip:has(input:checked) { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.tr-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tr-chip:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.tr-edge { margin: 6px 0 14px; padding-top: 14px; border-top: 1px dashed var(--line2); }
.tr-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tr-input, .tr-select {
  width: 100%; box-sizing: border-box; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 8px 10px;
  font-family: var(--font-mono); font-size: 13px;
}
.tr-input:focus, .tr-select:focus { outline: none; border-color: var(--accent); }
.tr-hint { font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.tr-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-btn {
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--text); border-radius: 999px;
  padding: 8px 18px; font-family: var(--font-display); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: background 0.2s var(--ease-taste), opacity 0.2s var(--ease-taste);
}
.tr-btn:hover { background: rgba(255, 138, 61, 0.24); }
.tr-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tr-btn.ghost { border-color: var(--line2); background: none; color: var(--muted); }
.tr-btn.ghost:hover { color: var(--text); border-color: var(--text); }
.tr-msg { font-size: 12.5px; min-height: 18px; }
.tr-msg.err { color: #ffb4b4; }
.tr-msg.ok { color: var(--win); }

/* In-flight job: stage bar + window progress */
.tr-stages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 4px 0 12px; }
.tr-stage { height: 4px; border-radius: 2px; background: var(--line2); }
.tr-stage.done { background: var(--accent); opacity: 0.55; }
.tr-stage.cur { background: var(--accent); }
.tr-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 13px; }
.tr-kv dt { color: var(--muted); }
.tr-kv dd { margin: 0; }
.tr-progress { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin: 10px 0 4px; }
.tr-progress > span { display: block; height: 100%; background: var(--accent); transition: width 0.6s var(--ease-out); }

/* Tables */
.tr-table-wrap { overflow-x: auto; }
.tr-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tr-table th { text-align: left; color: var(--faint); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tr-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tr-table td.num, .tr-table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tr-table tbody tr.click { cursor: pointer; }
.tr-table tbody tr.click:hover td { background: rgba(255, 255, 255, 0.025); }
.tr-status { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); }
.tr-status.done { color: var(--win); border-color: rgba(61, 219, 146, 0.4); }
.tr-status.running { color: var(--accent); border-color: var(--accent); }
.tr-status.failed, .tr-status.interrupted, .tr-status.unknown-exit { color: #ffb4b4; border-color: rgba(239, 68, 68, 0.45); }
.tr-status.cancelled, .tr-status.no-usable-evidence { color: var(--warn); border-color: rgba(245, 184, 61, 0.45); }

/* Detail */
.tr-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tr-back { color: var(--muted); font-size: 13px; text-decoration: none; }
.tr-back:hover { color: var(--text); }
.tr-caveat { border-left: 2px solid var(--warn); padding: 8px 12px; color: var(--muted); font-size: 12.5px; background: rgba(245, 184, 61, 0.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 18px; line-height: 1.55; }
.tr-chain { margin-bottom: 18px; }
.tr-chain-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tr-headline { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.tr-headline b { color: var(--text); font-weight: 600; }
.tr-grid2x2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
@media (max-width: 1024px) { .tr-grid2x2 { grid-template-columns: 1fr; } }
.tr-dist-title { flex-wrap: wrap; gap: 2px 10px; }
/* Key metrics phone layout: one card per chain (hidden on desktop); the wide-table swipe hint shows only on phones */
.tr-key-cards { display: none; }
.tr-key-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-top: 10px; background: var(--panel2); }
.tr-key-dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 8px 0 0; }
.tr-key-dl dt { font-size: 12px; color: var(--muted); margin-top: 8px; }
.tr-key-dl dt.tr-key-dl-group { color: var(--faint); font-size: 11px; letter-spacing: 0.03em; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.tr-key-dl dd { margin: 0; }
.tr-scroll-hint { display: none; font-size: 11px; color: var(--faint); margin: 0 0 6px; text-align: center; }

/* Collapsible blocks: details/diagnostics collapsed by default */
.tr-fold { border-top: 1px dashed var(--line2); padding: 10px 0 0; margin-top: 10px; }
.tr-fold > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
.tr-fold > summary::-webkit-details-marker { display: none; }
.tr-fold > summary::before { content: '›'; display: inline-block; width: 10px; color: var(--faint); transition: transform 0.2s var(--ease-taste); }
.tr-fold[open] > summary::before { transform: rotate(90deg); }
.tr-fold > summary:hover { color: var(--text); }
.tr-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.tr-fold[open] > summary { margin-bottom: 10px; }

/* Badges and alert text */
.tr-badge { display: inline-block; font-size: 10.5px; line-height: 1; padding: 3px 6px; border-radius: 999px; border: 1px solid rgba(245, 184, 61, 0.45); color: var(--warn); font-family: var(--font-display); font-weight: 500; vertical-align: middle; }
.tr-warn { color: var(--warn); }

/* Egress comparison: each point = one test's median difference; hollow = node MITM */
.tr-dots { position: relative; height: 16px; margin: 6px 0 2px; background: var(--panel2); border-radius: 8px; }
.tr-dots-zero { position: absolute; top: 2px; bottom: 2px; width: 1px; background: var(--line2); }
.tr-dot { position: absolute; top: 4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--text); border: 1px solid var(--text); box-sizing: border-box; }
.tr-dot.mitm { background: transparent; }
.tr-compare-table td:not(:first-child) { min-width: 150px; }
.tr-runcell { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tr-lp { margin: 0 0 12px; }

/* One-sentence conclusion */
.tr-conclusion { margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; max-width: 120ch; }
.tr-conclusion li + li { margin-top: 4px; }
.tr-conclusion li::marker { color: var(--faint); }

/* Key metrics: timeline + main table with chains as columns */
.tr-key { margin-bottom: 18px; }
.tr-flow { list-style: none; margin: 12px 0 14px; padding: 0; display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.tr-flow-node { flex: 1 1 140px; background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-flow-node b { font-family: var(--font-display); font-weight: 600; font-size: 13px; }
.tr-flow-node span { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.tr-flow-edge { flex: 0 0 auto; align-self: center; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tr-flow-edge::after { content: ' →'; color: var(--faint); }
.tr-key-table td { white-space: normal; vertical-align: top; }
.tr-key-table th:not(:first-child), .tr-key-table td:not(:first-child) { min-width: 120px; }
.tr-key-group td { color: var(--faint); font-size: 11.5px; letter-spacing: 0.03em; padding-top: 14px; border-bottom-color: var(--line2); }
.tr-key-label { min-width: 150px; }
.tr-lead { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.tr-lead-sub { font-size: 11px; color: var(--faint); margin-top: 2px; }
.tr-stage-pair { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tr-plat-g { color: var(--gmgn); }
.tr-plat-o { color: var(--okx); }
@media (max-width: 640px) {
  .tr-key .tr-table-wrap { display: none; }
  .tr-key-cards { display: block; }
  .tr-scroll-hint { display: block; }
  .tr-flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-flow-edge, .tr-key-label .tr-lead-sub { display: none; }
  .tr-key-table th:not(:first-child), .tr-key-table td:not(:first-child) { min-width: 92px; }
  .tr-key-label { min-width: 84px; }
}

/* Distribution bar: 0 centered; negative = GMGN first (GMGN color side), positive = OKX first */
.tr-dist { margin: 6px 0 14px; }
.tr-dist-title { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.tr-dist-axis { position: relative; height: 30px; background: var(--panel2); border-radius: 4px; }
.tr-dist-zero { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line2); }
.tr-dist-iqr { position: absolute; top: 8px; height: 14px; border-radius: 3px; background: rgba(234, 231, 224, 0.1); border: 1px solid var(--muted); box-sizing: border-box; }
.tr-dist-p50 { position: absolute; top: 4px; height: 22px; width: 2px; background: var(--text); }
.tr-dist-whisker { position: absolute; top: 14px; height: 1px; background: var(--muted); }
.tr-dist-sides { display: flex; justify-content: space-between; font-size: 11px; margin-top: 4px; }
.tr-dist-sides .g { color: var(--gmgn); }
.tr-dist-sides .o { color: var(--okx); }
.tr-pos { color: var(--okx); }
.tr-neg { color: var(--gmgn); }
.tr-cov { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.tr-cov span { border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; }
.tr-chain .tr-table-wrap + .tr-hint { margin: 6px 0 16px; }
.tr-chain > .tr-h3 + .tr-table-wrap, .tr-chain .tr-table-wrap { margin-top: 6px; }
.tr-errors { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { .tr-progress > span, .tr-chip, .tr-btn, .tr-fold > summary::before { transition: none; } }
/* Token address + GMGN/OKX token page links */
.tr-tok { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-tok-link { font-size: 11px; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 1px 8px; text-decoration: none; }
.tr-tok-link:hover, .tr-tok-link:focus-visible { color: var(--text); border-color: var(--accent); }
/* Phone width (≤640px): 16px side margins, numeric fields in a single column — must come after the base rules */
@media (max-width: 640px) { .tr-main { padding: 16px 16px 48px; } .tr-panel { padding: 14px 14px; } .tr-row3 { grid-template-columns: minmax(0, 1fr); } }

/* L0 quality bar (detail first screen): one row of quality chips; clicking it = full run info. Levels do not rely on color alone: every item has a text value */
.tr-quality { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 18px; }
.tr-quality.warn { border-color: rgba(245, 184, 61, 0.45); }
.tr-quality.bad { border-color: rgba(239, 68, 68, 0.5); }
.tr-quality-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; cursor: pointer; list-style: none; }
.tr-quality-sum::-webkit-details-marker { display: none; }
.tr-quality-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.tr-quality-head { font-family: var(--font-display); font-weight: 600; font-size: 13px; margin-right: 4px; }
.tr-quality-head::before { content: '›'; display: inline-block; width: 12px; color: var(--faint); transition: transform 0.2s var(--ease-taste); }
.tr-quality[open] .tr-quality-head::before { transform: rotate(90deg); }
.tr-quality[open] > .tr-kv { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line2); }
.tr-quality-go { margin-top: 10px; }
.tr-qchip { display: inline-flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 2px 10px; font-size: 11.5px; max-width: 100%; box-sizing: border-box; }
.tr-qchip .k { color: var(--faint); white-space: nowrap; }
.tr-qchip .v { color: var(--text); font-family: var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tr-qchip.warn { border-color: rgba(245, 184, 61, 0.45); }
.tr-qchip.warn .v { color: var(--warn); }
.tr-qchip.bad { border-color: rgba(239, 68, 68, 0.5); }
.tr-qchip.bad .v { color: #ffb4b4; }
.tr-key-label .tr-badge { margin-top: 4px; }

/* Table titles: the two key tables (who first / stages) and the percentile table are each their own table, and the title is the basis */
.tr-caption { caption-side: top; text-align: left; font-size: 12px; color: var(--muted); padding: 10px 10px 4px; font-family: var(--font-display); font-weight: 500; }
.tr-key .tr-table-wrap + .tr-table-wrap { margin-top: 10px; }
.tr-table td.tr-clock { font-size: 11px; white-space: normal; min-width: 140px; }

/* Distribution bar ticks and legend */
.tr-dist-ticks { position: relative; height: 14px; margin-top: 2px; }
.tr-dist-tick { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-dist-tick.p50 { color: var(--text); }
.tr-dist-tick.end { transform: translateX(-100%); }
.tr-dist-tick.start { transform: none; }
.tr-dist-legend { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Egress comparison: k + dot plot ticks; points are focusable/clickable into the detail */
.tr-lead-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tr-k { font-family: var(--font-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 0 6px; }
a.tr-dot { cursor: pointer; }
a.tr-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tr-dots-axis { position: relative; height: 13px; }
.tr-dots-tick { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-dots-tick.zero { color: var(--muted); }

/* History list filters */
.tr-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; }
.tr-filter { display: grid; gap: 4px; min-width: 110px; }
.tr-filter .tr-select { padding: 6px 8px; font-size: 12px; }
.tr-filter-count { margin-left: auto; align-self: center; }
.tr-table tbody tr.click:focus-visible td { background: rgba(255, 255, 255, 0.04); }
.tr-table tbody tr.click:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .tr-quality-head::before { transition: none; } }
@media (max-width: 640px) { .tr-filter { min-width: calc(50% - 6px); } .tr-filter-count { margin-left: 0; } }

/* ── Push difference trend (home small-chart group; colors in trenches-model.js TREND_COLORS, dataviz validation passed) ── */
.tr-trend { position: relative; }
.tr-trend-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 4px 0 10px; padding: 0; font-size: 12px; color: var(--muted); }
.tr-trend-legend li { display: inline-flex; align-items: center; gap: 6px; }
.tr-trend-swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--sw); }
.tr-trend-swatch.variant { background: transparent; border: 2px solid var(--sw); box-sizing: border-box; }
.tr-trend-grid-wrap { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 1100px) { .tr-trend-grid-wrap { grid-template-columns: repeat(3, 1fr); } }
.tr-trend-fig { margin: 0; background: var(--panel2); border-radius: var(--radius-sm); padding: 8px 8px 2px; }
.tr-trend-cap { font-size: 12px; color: var(--text); margin-bottom: 2px; }
.tr-trend-svg { display: block; max-width: 100%; height: auto; }
.tr-trend-grid { stroke: var(--line); stroke-width: 1; }
.tr-trend-zero { stroke: var(--line2); stroke-width: 1.5; }
.tr-trend-tick { fill: var(--faint); font-family: var(--font-mono); font-size: 10px; font-variant-numeric: tabular-nums; }
.tr-trend-dir { color: var(--faint); font-size: 11px; }
.tr-trend-line { fill: none; stroke-width: 2; stroke-linejoin: round; opacity: 0.55; }
.tr-trend-line.variant { stroke-dasharray: 4 3; }
.tr-trend-hit { fill: transparent; }
.tr-trend-dot { stroke: var(--panel2); stroke-width: 2; }
.tr-trend-dot.variant { fill: var(--panel2); stroke-width: 2; }
.tr-trend-pt { cursor: pointer; }
.tr-trend-pt:focus { outline: none; }
.tr-trend-pt:focus-visible .tr-trend-dot, .tr-trend-pt:hover .tr-trend-dot:not(.variant) { stroke: var(--text); }
.tr-trend-tip { position: absolute; z-index: 5; max-width: 260px; padding: 6px 8px; transform: translateY(-100%); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius-sm); font-size: 11px; color: var(--text); pointer-events: none; }

/* ── Export entry ── */
.tr-export { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-export a { font-size: 12px; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.tr-export a:hover, .tr-export a:focus-visible { color: var(--text); border-color: var(--accent); }
.tr-detail-export { margin: 4px 0 10px; }

/* ── 2026-10-19 taste pass (preserve mode: only typography/rhythm/contrast/shape adjusted, information architecture unchanged) ──
 * Shape rules: panel = --radius-md; surfaces inside panels and wrappable chips = --radius-sm; single-line labels/status/buttons = capsule; data bars = 4px.
 * The accent color is used only for interaction (buttons, selection, focus, progress); data marks use neutral colors or the GMGN/OKX platform colors. */
.tr-lead, .tr-headline, .tr-k, .tr-qchip .v { font-variant-numeric: tabular-nums; }
.tr-h2 { font-size: 21px; }
.tr-panel-head .tr-h3, .tr-chain-head .tr-h3 { font-size: 15.5px; }
.tr-table th { font-size: 11.5px; letter-spacing: 0.02em; }

/* History list: per-chain cells may wrap, no more horizontal truncation within desktop width (phones can still swipe) */
.tr-runs-table td { vertical-align: top; }
.tr-runs-table td.num:nth-child(n + 6) { white-space: normal; min-width: 230px; }
.tr-runs-table .tr-lead-sub { white-space: normal; line-height: 1.45; }

/* Visible focus (keyboard): buttons, back, token links and links inside panels */
.tr-btn:focus-visible, .tr-back:focus-visible, .tr-tok-link:focus-visible, .tr-routine-run:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.tr-input:focus-visible, .tr-select:focus-visible { box-shadow: 0 0 0 2px var(--accent-soft); }

/* Loading skeleton: static blocks shaped like the final layout (no shimmer) */
.tr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tr-skel { display: grid; gap: 20px; }
.tr-skel-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); }
.tr-skel-title { height: 28px; width: min(420px, 60%); border-radius: var(--radius-sm); background: var(--panel2); }
.tr-skel-strip { height: 46px; }
.tr-skel-panel { height: 260px; }
.tr-skel-panel.tall { height: 340px; }
@media (max-width: 640px) { .tr-skel-panel, .tr-skel-panel.tall { height: 180px; } }
