.protocol-workspace { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-raised); }
.protocol-heading, .protocol-actions, .protocol-send-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.protocol-heading h3 { font-size: 15px; }
.protocol-actions { justify-content: flex-start; gap: 2px; }
.protocol-actions a { display: inline-flex; align-items: center; }
.protocol-status, .protocol-hint { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.protocol-status { margin-top: 6px; }
.protocol-status[data-state="error"] { color: var(--red); }
.protocol-status[data-state="success"] { color: var(--green); }
.protocol-editor { margin-top: 12px; }
.protocol-editor[hidden] { display: none; }
.protocol-editor .field { margin-bottom: 8px; }
.protocol-editor select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; color: var(--ink); background: var(--panel); }
.protocol-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-height: 280px; overflow-y: auto; margin: 12px 0; }
.protocol-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.protocol-field > span { font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.protocol-field small { color: var(--muted); font-size: 10px; }
.protocol-field input { width: 100%; min-height: 38px; padding: 8px 10px; font-size: 13px; }
.protocol-field input:read-only { background: var(--panel-deep); }
.protocol-preview-details summary, .protocol-results summary { cursor: pointer; color: var(--ink); font-size: 12px; padding: 8px 0; overflow-wrap: anywhere; }
.protocol-preview-details summary span, .protocol-results summary span { color: var(--muted); margin-left: 6px; font-weight: normal; }
.protocol-preview { margin: 0 0 8px; max-height: 140px; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text); font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.protocol-send-footer { justify-content: flex-end; }
.protocol-send-footer .protocol-status { margin: 0; flex: 1; }
.protocol-send-footer .button { min-height: 38px; padding: 8px 12px; font-size: 13px; }
.protocol-results { margin-top: 10px; border-top: 1px solid var(--line); }
.protocol-result-list { max-height: 320px; overflow: auto; }
.protocol-result { border-top: 1px solid var(--line); padding: 8px 0; font-size: 12px; }
.protocol-result > strong { color: var(--green); }
.protocol-result[data-state="invalid"] > strong, .protocol-result[data-state="ambiguous"] > strong { color: var(--red); }
.protocol-result[data-state="unknown"] > strong { color: var(--amber); }
.protocol-result time { margin-left: 8px; color: var(--muted); font-size: 10px; }
.protocol-result p { color: var(--muted); overflow-wrap: anywhere; }
.protocol-table { width: 100%; border-collapse: collapse; margin-top: 6px; table-layout: fixed; }
.protocol-table th, .protocol-table td { padding: 4px 6px; text-align: left; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.protocol-table th { color: var(--muted); font-weight: 500; }
.protocol-note a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 590px) {
  .protocol-workspace { padding: 10px; }
  .protocol-heading { align-items: flex-start; }
  .protocol-fields { grid-template-columns: 1fr; }
  .protocol-send-footer { align-items: flex-start; }
}
