/* The bench's own chrome. Deliberately plain and NOT themed with the tool's
   `--mc-*` tokens: this page is the host, and a host does not inherit the
   widget's palette. Anything here that looked like the tool would blur the
   line the bench exists to show. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font:
    14px/1.5 -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  color: #111827;
  background: #f1f5f9;
}

.top {
  padding: 14px 20px;
  background: #111827;
  color: #e5e7eb;
}

.top h1 {
  margin: 0;
  font-size: 16px;
}

.top p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9ca3af;
}

.top code {
  color: #93c5fd;
}

.top a {
  color: #93c5fd;
}

.split {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - 90px);
  overflow: auto;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  position: sticky;
  top: 16px;
}

.grp {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grp h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.row-label,
.row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.row label > span:first-child {
  flex: 1;
}

.row input[type='text'],
.row input[type='number'],
.row select {
  width: 130px;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
}

.note {
  margin: 0;
  font-size: 11px;
  color: #6b7280;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.step {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.search,
.art-row input[type='text'],
textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font: inherit;
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.results {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  max-height: 210px;
  overflow: auto;
}

.hit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: none;
  border: 0;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.hit:hover {
  background: #f9fafb;
}

.hit img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.hit-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hit-sku {
  font-size: 11px;
  color: #6b7280;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 4px 3px 8px;
  background: #eef2ff;
  border-radius: 999px;
  font-size: 12px;
}

.chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip .x {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: #4338ca;
}

.art-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.art-row input[type='text'] {
  flex: 1;
  min-width: 120px;
}

button {
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

button:hover {
  background: #f9fafb;
}

.status {
  margin: 0;
  font-size: 11px;
  min-height: 1em;
}

.status.bad,
.note.bad {
  color: #b91c1c;
}

.snippet {
  margin: 0;
  padding: 8px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  overflow: auto;
  max-height: 240px;
  white-space: pre-wrap;
  word-break: break-word;
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.tool-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  min-height: 70vh;
}

.log {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
}

.log-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.log-head .muted {
  flex: 1;
  font-size: 11px;
  color: #6b7280;
}

.log ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
}

.log li {
  border-top: 1px solid #f3f4f6;
  padding: 6px 0;
}

.ev-name {
  font-weight: 600;
  font-size: 12px;
}

.ev-time {
  margin-left: 8px;
  font-size: 11px;
  color: #6b7280;
}

.log pre {
  margin: 4px 0 0;
  font-size: 11px;
  max-height: 150px;
  overflow: auto;
  background: #f9fafb;
  padding: 6px;
  border-radius: 4px;
}
