:root {
  color-scheme: dark;
  --bg: #060a07;
  --field: #0a100c;
  --line: #294032;
  --muted: #a7b5aa;
  --text: #ecf3eb;
  --acid: #a6ff1a;
  --error: #f08e72;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
}
button, input, textarea { font: inherit; }
button, input, textarea { color: inherit; }
.instrument { max-width: 1340px; margin: 0 auto; padding: clamp(17px, 3vw, 28px); }
.instrument-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.eyebrow, .boundary, .step, .module-heading p, .field-label, .hint, .status-message,
.recipient-count, .more-rows, .preview-field h3, .privacy-note {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--acid);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(30px, 4vw, 43px); line-height: .98; letter-spacing: -.055em; }
.boundary {
  display: grid;
  gap: 4px;
  max-width: 280px;
  margin: 0;
  padding: 9px 12px;
  border-left: 2px solid var(--acid);
  background: var(--field);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.boundary strong { color: var(--text); font-weight: 500; }
.boundary span { color: var(--acid); }
.workflow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 25px; }
.workflow-column { min-width: 0; }
.module { min-width: 0; padding: 15px 0 17px; border-bottom: 1px solid var(--line); }
.module-heading { display: flex; align-items: start; gap: 11px; margin-bottom: 14px; }
.step { flex: 0 0 auto; padding-top: 2px; color: var(--acid); font-size: 10px; }
.module-heading h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.module-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.field-label { display: grid; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 10px; letter-spacing: .045em; text-transform: uppercase; }
input[type="text"], textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--field);
  color: var(--text);
  font: 14px/1.5 "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: normal;
  text-transform: none;
}
input[type="text"] { min-height: 35px; padding: 7px 9px; }
textarea { padding: 9px; resize: vertical; }
input[type="text"]:focus-visible, textarea:focus-visible, input[type="file"]:focus-visible,
button:focus-visible, .file-picker:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.hint { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.file-actions, .task-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.file-actions { margin-top: 12px; }
input[type="file"] { min-width: 0; max-width: 100%; color: var(--muted); font-size: 10px; }
input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 8px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 10px "IBM Plex Mono", ui-monospace, monospace;
  cursor: pointer;
}
button, .file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--acid);
  border-radius: 0;
  background: var(--acid);
  color: #0c1606;
  font: 600 10px/1.2 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
button.quiet, .file-picker {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}
button:disabled { opacity: .45; cursor: not-allowed; }
button:hover:not(:disabled), .file-picker:hover { border-color: var(--text); }
button.quiet:hover, .file-picker:hover { color: var(--acid); border-color: var(--acid); }
.status-message { min-height: 13px; margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.status-message.error { color: var(--error); }
.recipient-count { margin: 9px 0 6px; color: var(--acid); font-size: 10px; }
.table-shell { max-width: 100%; overflow-x: auto; border-top: 1px solid var(--line); }
.recipient-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.recipient-table th, .recipient-table td { padding: 5px 6px; border-bottom: 1px solid #19251c; text-align: left; overflow-wrap: anywhere; }
.recipient-table th {
  color: var(--muted);
  font: 10px "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.recipient-table td { color: var(--text); line-height: 1.35; }
.more-rows { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.preview-field { padding: 9px 0; border-bottom: 1px solid #19251c; }
.preview-field h3 { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.preview-value { margin: 0; color: var(--text); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.preview-body { min-height: 47px; white-space: pre-wrap; font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif; }
.task-module .field-label { margin-bottom: 11px; }
.json-output {
  display: block;
  min-height: 114px;
  margin-top: 10px;
  color: #c5d3c7;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
  overflow: auto;
}
.task-actions { margin-top: 8px; }
.task-actions button { min-height: 30px; }
.privacy-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 720px) {
  .instrument-header { align-items: start; flex-direction: column; gap: 12px; }
  .boundary { max-width: none; }
  .workflow-grid { grid-template-columns: 1fr; gap: 0; }
  .module { padding: 14px 0 16px; }
  input[type="text"] { min-height: 44px; }
  input[type="file"]::file-selector-button { min-height: 44px; }
  button,.file-picker,.task-actions button { min-height: 44px; }
  .recipient-table { width: max-content; min-width: 100%; table-layout: auto; }
  .recipient-table th,.recipient-table td { white-space: nowrap; overflow-wrap: normal; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
