.tool-table-scroll, .tool-code-surface {
  min-inline-size: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.tool-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--t-body);
  line-height: var(--l-body);
  text-align: start;
}

.tool-table :is(th, td) {
  padding: var(--s2) var(--s3);
  border-block-end: 1px solid var(--line);
  text-align: start;
  overflow-wrap: anywhere;
}

.tool-table thead { background: var(--wash); }
.tool-table th { font-weight: var(--w-medium); }
.tool-table tr:last-child td { border-block-end: 0; }
.tool-table .numeric { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool-table tr[aria-current="step"] { background: var(--select); }

.tool-code-surface { padding: var(--s3); background: var(--wash); }
.tool-code-surface :is(pre, textarea) { margin: 0; font: var(--w-regular) var(--t-body)/var(--l-body) var(--mono); tab-size: 2; }
.tool-code-surface textarea { box-sizing: border-box; inline-size: 100%; resize: vertical; border: 0; color: var(--ink); background: transparent; }
.tool-code-surface textarea:focus-visible { outline-offset: 0; }
.tool-code-heading { margin: 0 0 var(--s2); font-size: var(--t-body); font-weight: var(--w-semibold); }
.tool-code-panes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--s3); }

.tool-stepper { display: grid; gap: var(--s3); min-inline-size: 0; }
.tool-stepper-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.tool-stepper-actions button { min-block-size: var(--control); }
.tool-stepper-count { margin-inline-start: auto; color: var(--muted); font-size: var(--t-ui); font-variant-numeric: tabular-nums; }
.tool-stepper-meaning { min-block-size: var(--l-body); margin: 0; font-size: var(--t-body); line-height: var(--l-body); }

@media (pointer: coarse) {
  .tool-code-surface textarea { font-size: var(--t-read); line-height: var(--l-read); }
}
