.chase-head[hidden], .chase-panel[hidden] { display: none !important; }
.chase-panel-active #tapeHead, .chase-panel-active #tapeSpacer, .chase-panel-active #feedNotice,
.chase-panel-active #exportButton, .chase-panel-active .maker-control label[for="passiveToggle"],
.chase-panel-active .maker-control > .help-mark { display: none !important; }
body.chase-panel-active #largeTradesMobileDock #exportButton { display: none !important; }
.chase-mode-control { margin-inline-end: 5px; }
.chase-panel-active .chase-mode-control { color: var(--cyan); }
.chase-panel-active #tapeViewport { grid-row: -3 / -1; height: auto; overflow: auto; }
.chase-head, .chase-primary { display: grid; grid-template-columns: 54px minmax(70px, 1fr) 42px minmax(144px, 1.2fr) minmax(142px, 1.6fr) 76px 76px 80px 40px; align-items: center; gap: 6px; font: 11px/1.4 "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.chase-head, .chase-panel { min-width: 0; }
.chase-head { position: sticky; top: 0; z-index: 2; height: 30px; padding: 0 8px; color: var(--muted); border-bottom: 1px solid var(--line); border-inline-start: 2px solid transparent; background: var(--surface); font-size: 10px; }
.chase-head button { display: flex; align-items: center; gap: 4px; min-width: 0; height: 29px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font: 600 10px/1.4 "IBM Plex Mono", monospace; text-align: start; text-transform: uppercase; white-space: nowrap; }
.chase-head button > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chase-head .sort-caret { flex: 0 0 8px; color: var(--cyan); opacity: .35; }
.chase-head button.asc .sort-caret, .chase-head button.desc .sort-caret { opacity: 1; }
.chase-head button:hover, .chase-head button:focus-visible { color: var(--text); }
.chase-head button:focus-visible { outline: 1px solid var(--cyan); outline-offset: 1px; }
.chase-head button:nth-child(6), .chase-head button:nth-child(8), .chase-head button:nth-child(9) { justify-content: flex-end; }
.chase-head button:nth-child(6), .chase-head button:nth-child(8), .chase-head button:nth-child(9),
.chase-value, .chase-price, .chase-fills { text-align: end; }
.chase-panel { padding-bottom: 12px; }
.chase-notice { margin: 0; padding: 9px 10px; color: var(--amber); font-size: 11px; line-height: 1.5; border-bottom: 1px solid var(--line-soft); }
.chase-row { --chase-accent: var(--sell); border-bottom: 1px solid var(--line-soft); border-inline-start: 2px solid var(--chase-accent); }
.chase-row.buy { --chase-accent: var(--buy); }
.chase-row:nth-child(even) { background: var(--surface); }
.chase-row > summary { min-width: 0; min-height: 46px; padding: 6px 8px; list-style: none; cursor: pointer; }
.chase-row > summary::-webkit-details-marker { display: none; }
.chase-cell, .chase-cell-value { min-width: 0; }
.chase-cell-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chase-time time { display: grid; gap: 2px; line-height: 12px; }
.chase-time time small { color: var(--muted); font-size: 10px; line-height: 12px; }
.chase-status .chase-cell-value { overflow: visible; white-space: normal; }
.chase-progress { display: grid; gap: 4px; min-width: 0; }
.chase-progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; min-width: 0; font-size: 10px; }
.chase-amounts { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chase-amounts strong { color: var(--text); font-weight: 600; }
.chase-total { color: var(--muted); }
.chase-percent { flex: 0 0 auto; color: var(--chase-accent); font-size: 10px; font-weight: 600; white-space: nowrap; }
.chase-track { display: block; height: 3px; overflow: hidden; border-radius: 1px; background: var(--line); }
.chase-fill { display: block; height: 100%; background: var(--chase-accent); border-radius: inherit; }
.chase-progress[data-status="COMPLETED"] .chase-fill { opacity: .55; }
.chase-progress[data-status="UNVERIFIED"] .chase-fill { opacity: .35; }
.chase-progress[data-status="UNVERIFIED"] .chase-percent { color: var(--muted); }
.chase-row > summary:hover, .chase-row[open] > summary { background: var(--surface-2); }
.chase-row > summary:focus-visible { outline: 1px solid var(--cyan); outline-offset: -2px; }
.chase-state { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 24px; padding: 2px 0; color: var(--muted); font: 500 10px/1.3 Inter, system-ui, sans-serif; }
.chase-state-icon { flex: 0 0 12px; font-size: 12px; line-height: 1; text-align: center; }
.chase-state-label { flex: 0 0 auto; white-space: nowrap; overflow-wrap: normal; word-break: normal; hyphens: none; }
.chase-state[data-status="OPEN"] { color: #94edb4; }
.chase-state[data-status="COMPLETED"] { color: #a8bbae; }
.chase-state[data-status="UNVERIFIED"] { color: #efcc7c; }
.chase-state[data-status="LAST_ORDER_FILLED"] { color: #b1d5e7; }
.chase-detail { padding: 12px; border-top: 1px solid var(--line-soft); background: var(--surface); font-size: 12px; line-height: 1.5; }
.chase-detail > button { max-width: 100%; overflow-wrap: anywhere; }
.chase-detail > a { margin-inline-start: 10px; }
.chase-detail dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.chase-detail dt { color: var(--muted); margin-bottom: 3px; }
.chase-detail dd { min-width: 0; margin: 0; overflow-x: auto; overflow-wrap: normal; word-break: normal; font-family: "IBM Plex Mono", monospace; }
.chase-more { margin: 10px; }
@container activity-center (max-width: 530px) {
  .chase-detail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chase-market { font: 650 12px/1.4 Inter, system-ui, sans-serif; }
.chase-value { color: var(--text); font-size: 12px; font-weight: 650; }
.chase-time, .chase-wallet, .chase-price, .chase-fills { color: var(--muted); }
.chase-detail :is(button, a) { min-height: 34px; display: inline-flex; align-items: center; }

/* Keep the order amount and progress in view when the feed column is narrow.
   All sort controls remain available in the horizontal header. Secondary
   wallet, average-price and fill data are repeated in the existing detail. */
@container activity-center (max-width: 960px) {
  .chase-head { display: flex; gap: 14px; height: 36px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  .chase-head button { flex: 0 0 auto; height: 34px; }
  .chase-head button > span:first-child { overflow: visible; }
  .chase-primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto minmax(80px, .9fr);
    grid-template-areas: "market market side value" "status status status time" "progress progress progress progress";
    gap: 4px 10px;
    font-size: 11px;
  }
  .chase-row > summary { padding: 9px 10px; }
  .chase-market { grid-area: market; font-size: 13px; }
  .chase-side { grid-area: side; }
  .chase-value { grid-area: value; font-size: 13px; }
  .chase-status { grid-area: status; }
  .chase-time { grid-area: time; text-align: end; }
  .chase-time time { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .chase-time time small { font-size: 10px; }
  .chase-state { min-height: 20px; font-size: 11px; }
  .chase-progress { grid-area: progress; gap: 5px; margin-top: 3px; }
  .chase-progress-heading { font-size: 11px; }
  .chase-progress-heading strong { font-size: 12px; }
  .chase-percent { font-size: 11px; }
  .chase-track { height: 4px; }
  .chase-primary :is(.chase-wallet, .chase-price, .chase-fills) { display: none; }
}
@media (max-width: 760px) {
  .chase-detail :is(button, a) { min-height: 40px; }
}
