/* Probe and method reference share the production dark tokens. */
.probe-page,
.spec-page {
  min-width: 0;
}
.probe-page h1,
.spec-page h1 {
  margin: 4px 0;
  font-size: 24px;
  line-height: 1.3;
}
.probe-page h1 small,
.spec-page h1 small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.probe-page h2 {
  font-size: 16px;
  margin: 0;
}
.probe-page p,
.spec-page p {
  margin: 0;
  line-height: 1.65;
}
.probe-page small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin-top: 4px;
}
.probe-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.probe-page-head p,
.probe-source {
  font-size: 12px;
  color: var(--muted);
}
.probe-source {
  text-align: right;
  line-height: 1.6;
}
.probe-eyebrow {
  color: var(--positive);
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 650;
}
.probe-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.probe-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.probe-panel-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.probe-body {
  padding: 16px;
}
.probe-controls {
  padding: 12px 16px;
  margin-bottom: 14px;
}
.probe-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.probe-controls > .probe-toolbar + .probe-toolbar {
  margin-top: 12px;
}
.probe-toolbar label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.probe-toolbar input {
  min-width: 0;
}
.probe-page input,
.probe-page select,
.probe-page button,
.spec-page button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  color: var(--text);
  min-height: 32px;
  padding: 5px 10px;
}
.probe-page button,
.spec-page button {
  cursor: pointer;
}
.probe-page button:hover,
.spec-page button:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
}
.probe-page button:disabled {
  cursor: default;
  color: var(--muted);
}
.probe-page :is(button, input, select, summary, a):focus-visible,
.spec-page :is(button, summary, a):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.probe-page input {
  background: var(--bg);
}
.probe-page input::placeholder {
  color: var(--dim);
}
.probe-segment {
  display: inline-flex;
  max-width: 100%;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  gap: 2px;
}
.probe-segment button {
  background: transparent;
  border: 0;
  color: var(--muted);
  min-height: 26px;
  padding: 3px 9px;
  white-space: nowrap;
}
.probe-page [aria-pressed="true"] {
  background: var(--surface-selected);
  color: var(--text);
  border-color: var(--accent);
}
.probe-delay-label {
  margin-left: 12px;
}
.probe-muted {
  color: var(--muted);
}
.probe-positive {
  color: var(--positive);
}
.probe-negative {
  color: var(--negative);
}
.probe-warning {
  color: var(--warning);
}
.probe-number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.probe-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
  padding: 2px 6px;
  white-space: nowrap;
  color: var(--muted);
}
.probe-badge.probe-warning {
  color: var(--warning);
  border-color: #74613b;
  background: var(--warning-bg);
}
.probe-notice {
  padding: 10px 14px;
  border: 1px solid #675638;
  border-radius: 7px;
  color: var(--warning);
  background: var(--warning-bg);
  font-size: 12px;
  margin-bottom: 14px !important;
}
.probe-overview {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 16px;
}
.probe-identity {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.probe-symbol {
  font: 650 26px var(--font-mono) !important;
}
.probe-route-pair {
  display: flex;
  align-items: center;
  gap: 14px;
}
.probe-route-pair > div {
  flex: 1;
  min-width: 0;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 8px;
}
.probe-route-pair strong {
  font-size: 18px;
}
.probe-funding {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.probe-funding small {
  font-size: 11px;
}
.probe-venue-bn {
  color: var(--v-bn);
}
.probe-venue-bybit {
  color: var(--v-bybit);
}
.probe-venue-bitget {
  color: var(--v-bitget);
}
.probe-venue-gate {
  color: var(--v-gate);
}
.probe-venue-hl {
  color: var(--v-hl);
}
.probe-depth-rows {
  display: grid;
  gap: 16px;
}
.probe-depth-row {
  display: grid;
  grid-template-columns: 160px 1fr 104px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.probe-depth-row > .probe-number {
  text-align: right;
}
.probe-depth-track {
  height: 7px;
  background: var(--chart-grid);
  border-radius: 4px;
  overflow: hidden;
}
.probe-depth-track > div {
  height: 100%;
  border-radius: 4px;
}
.probe-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11px;
  margin: 22px 0 4px;
}
.probe-capacity {
  width: 100%;
  height: 190px;
  display: block;
}
.probe-body > .probe-muted {
  font-size: 12px;
  margin-top: 10px;
}
.probe-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.probe-metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 14px 16px;
  min-width: 0;
}
.probe-metric > .probe-muted {
  font-size: 12px;
}
.probe-metric-value {
  font: 650 30px/1.3 var(--font-mono);
  margin: 8px 0 4px;
  overflow-wrap: anywhere;
  letter-spacing: -0.7px;
}
.probe-metric-value small {
  display: inline;
  color: inherit;
  font-size: 12px;
  font-weight: 400;
}
.probe-table-wrap {
  overflow: auto;
  max-width: 100%;
}
.probe-page table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: right;
}
.probe-page th {
  font-weight: 500;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
  padding: 10px 12px;
}
.probe-page td {
  padding: 12px;
  border-bottom: 1px solid #243447;
  vertical-align: middle;
}
.probe-page tbody th {
  padding: 12px;
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid #243447;
}
.probe-page td:first-child,
.probe-page th:first-child {
  text-align: left;
}
.probe-page tbody tr:last-child :is(td, th) {
  border-bottom: 0;
}
.probe-page tbody tr:hover :is(td, th) {
  background: var(--surface-hover);
}
.probe-page .probe-row-selected :is(td, th) {
  background: var(--surface-selected);
}
.probe-matrix :is(th, td):first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}
.probe-matrix .probe-number {
  font-size: 15px;
}
.probe-exit-selected {
  box-shadow: inset 0 2px var(--accent);
  background: #22384e8c !important;
}
.probe-page thead th small {
  font-size: 10px;
}
.probe-panel-foot {
  padding: 12px 16px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.probe-summary,
.probe-records,
.probe-method {
  margin-top: 14px;
}
.probe-summary table {
  min-width: 1120px;
}
.probe-summary th button {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.probe-method > summary {
  padding: 14px 16px;
  cursor: pointer;
  min-height: 44px;
}
.probe-method p + p {
  margin-top: 8px;
}
.probe-method .probe-body {
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.probe-meta {
  font-size: 11px;
  color: var(--muted);
}
.probe-meta summary {
  cursor: pointer;
  min-height: 32px;
}
.probe-record-id,
.probe-meta pre {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font: 11px var(--font-mono);
}
.probe-meta p + p {
  margin-top: 5px;
}
.probe-link {
  border: 0 !important;
  padding: 0 !important;
  color: var(--accent) !important;
  background: none !important;
}
.probe-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}
.probe-empty {
  padding: 32px 16px;
  color: var(--muted);
  text-align: center;
}
.probe-empty p {
  margin: 12px 0;
}
.probe-loading {
  padding: 20px;
  color: var(--muted);
}
.probe-skeleton {
  height: 44px;
  margin-top: 12px;
  border-radius: 5px;
  background: var(--surface-raised);
}
.probe-error {
  padding: 12px;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid #74613b;
  border-radius: 6px;
  margin-bottom: 14px !important;
}
.probe-copy-message {
  margin-top: 12px;
  color: var(--accent);
  font-size: 12px;
}
.probe-copy-message label {
  display: grid;
  gap: 8px;
}
.probe-copy-message input {
  width: 100%;
}
.probe-page [hidden] {
  display: none !important;
}
.spec-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 880px);
  gap: 32px;
  align-items: start;
}
.spec-nav {
  position: sticky;
  top: 80px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 14px;
}
.spec-nav summary {
  font-size: 13px;
  font-weight: 600;
  padding: 4px;
  min-height: 32px;
}
.spec-nav a {
  display: block;
  padding: 8px;
  color: var(--muted);
  border-radius: 5px;
}
.spec-nav a[aria-current] {
  background: var(--surface-selected);
  color: var(--text);
}
.spec-copy {
  min-width: 0;
}
.spec-page-head {
  margin-bottom: 20px;
}
.spec-page-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.spec-section {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  scroll-margin-top: 80px;
}
.spec-section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.spec-section h2 {
  font-size: 16px;
  margin: 0;
}
.spec-section h3 {
  font-size: 13px;
  margin: 20px 0 8px;
}
.spec-section p {
  color: var(--muted);
  font-size: 13px;
}
.spec-section p + p {
  margin-top: 12px;
}
.spec-section .spec-formula {
  font-family: var(--font-mono);
  padding: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.spec-section .spec-highlight {
  color: var(--text);
}
.spec-table-wrap {
  max-width: 100%;
  overflow: auto;
}
.spec-page table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin-top: 14px;
}
.spec-page th {
  text-align: left;
  background: var(--surface-raised);
  color: var(--muted);
  white-space: nowrap;
  padding: 10px;
}
.spec-page td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.spec-case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.spec-case {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  padding: 14px;
}
.spec-case h3 {
  margin: 0 0 10px;
}
.spec-case p {
  font-size: 12px;
}
.spec-status {
  color: var(--accent);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.spec-status input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px;
}
.spec-page code {
  overflow-wrap: anywhere;
}
@media (max-width: 1279px) {
  .probe-overview {
    grid-template-columns: 1fr 1.5fr;
  }
  .probe-depth-row {
    grid-template-columns: 140px 1fr 94px;
    gap: 8px;
  }
  .probe-metric-value {
    font-size: 26px;
  }
  .spec-layout {
    gap: 20px;
  }
}
@media (max-width: 1023px) {
  .probe-overview {
    grid-template-columns: 1fr;
  }
  .probe-identity {
    gap: 14px;
  }
  .probe-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .probe-page-head {
    align-items: flex-start;
  }
  .probe-source {
    max-width: 220px;
  }
  .spec-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .spec-nav {
    position: static;
    padding: 10px;
  }
  .spec-nav nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .spec-section {
    scroll-margin-top: 112px;
  }
}
@media (max-width: 768px) {
  .probe-page-head {
    display: block;
  }
  .probe-source {
    text-align: left;
    max-width: none;
    margin-top: 10px;
  }
  .probe-page h1,
  .spec-page h1 {
    font-size: 22px;
  }
  .probe-page input,
  .probe-page select,
  .probe-page button,
  .spec-page button {
    min-height: 44px;
  }
  .probe-segment button {
    min-height: var(--control-touch-h);
  }
  .probe-controls {
    padding: 10px;
  }
  .probe-key-label,
  .probe-key-label input {
    width: 100%;
  }
  .probe-controls .probe-toolbar {
    gap: 8px;
  }
  .probe-controls .probe-delay-label {
    margin-left: 0;
  }
  .probe-size-controls {
    width: 100%;
    justify-content: space-between;
  }
  .probe-controls label {
    max-width: 100%;
  }
  .probe-controls input[type="datetime-local"] {
    width: 190px;
    max-width: 100%;
  }
  .probe-panel-head {
    padding: 12px;
    flex-wrap: wrap;
  }
  .probe-body,
  .probe-identity {
    padding: 14px;
  }
  .probe-identity > .probe-toolbar {
    align-items: flex-start;
  }
  .probe-route-pair {
    gap: 8px;
  }
  .probe-route-pair > div {
    padding: 10px;
  }
  .probe-route-pair strong {
    font-size: 16px;
  }
  .probe-depth-row {
    grid-template-columns: 1fr 92px;
    gap: 6px;
  }
  .probe-depth-row > span:first-child {
    grid-column: 1/-1;
  }
  .probe-metric {
    padding: 12px;
  }
  .probe-metric-value {
    font-size: 24px;
  }
  .probe-page .probe-table-wrap {
    overflow: visible;
  }
  .probe-page table {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .probe-page thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .probe-page tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }
  .probe-page tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-raised);
    overflow: hidden;
  }
  .probe-page tbody :is(th, td) {
    display: block;
    padding: 10px 12px !important;
    border: 0 !important;
    text-align: left;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    background: transparent;
  }
  .probe-page tbody th:first-child {
    position: static;
    grid-column: 1/-1;
    border-bottom: 1px solid var(--line) !important;
    background: var(--surface-hover);
  }
  .probe-page tbody :is(th, td)::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font: 11px/1.5 var(--font-ui);
    margin-bottom: 5px;
  }
  .probe-page tbody .probe-row-selected {
    border-color: var(--accent);
  }
  .probe-matrix tbody td:nth-child(3) {
    text-align: left;
  }
  .probe-matrix tbody td:nth-child(n + 4) {
    font-size: 16px;
  }
  .probe-panel-foot {
    padding: 12px;
  }
  .probe-pagination {
    align-items: flex-start;
  }
  .probe-pagination > .probe-toolbar {
    width: 100%;
    justify-content: space-between;
  }
  .probe-meta summary {
    min-height: 44px;
  }
  .spec-section {
    padding: 16px;
  }
  .spec-section header {
    align-items: flex-start;
  }
  .spec-section h2 {
    font-size: 15px;
  }
  .spec-section header button {
    font-size: 11px;
    flex-shrink: 0;
  }
  .spec-case-grid {
    grid-template-columns: 1fr;
  }
  .spec-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .spec-nav summary {
    min-height: var(--control-touch-h);
  }
  .spec-page table {
    min-width: 520px;
  }
}
@media (max-width: 360px) {
  .probe-segment button {
    padding: 3px 7px;
  }
  .probe-page :is(td, th) {
    padding: 8px !important;
  }
  .probe-metric-value {
    font-size: 21px;
  }
  .probe-metrics {
    gap: 8px;
  }
  .probe-metric {
    padding: 10px;
  }
  .probe-page tbody {
    padding: 8px;
    gap: 8px;
  }
  .probe-page tbody :is(th, td) {
    padding: 9px !important;
  }
  .probe-page .probe-number {
    font-size: 12px;
  }
  .probe-matrix .probe-number {
    font-size: 14px;
  }
  .probe-depth-row {
    grid-template-columns: 1fr 88px;
  }
  .probe-route-pair strong {
    font-size: 15px;
  }
}
