:root {
  --ink: #17201b;
  --muted: #647067;
  --paper: #f7f3ea;
  --panel: #fffdf7;
  --line: #d8d0bd;
  --green: #0d6b4f;
  --green-2: #0b4d3d;
  --amber: #d29a21;
  --red: #b44536;
  --shadow: 0 22px 60px rgba(34, 45, 35, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(13, 107, 79, 0.12), transparent 36%),
    repeating-linear-gradient(90deg, rgba(23, 32, 27, 0.035) 0 1px, transparent 1px 80px),
    var(--paper);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.workspace { display: grid; gap: 18px; }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 18px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1, h2 { margin: 0; }
h1 { font-size: clamp(34px, 5vw, 64px); line-height: 0.96; }
h2 { font-size: 18px; }

.status-pill {
  min-width: 92px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background: var(--amber);
  color: var(--ink);
  text-align: center;
  font-weight: 800;
  box-shadow: 5px 5px 0 var(--ink);
}

.status-pill.ok { background: #7fc49b; }
.status-pill.error { background: #e07767; }

.panel {
  background: color-mix(in srgb, var(--panel) 94%, white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 18px;
}

.compact { min-height: 260px; }

.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

label { display: grid; gap: 7px; }
label span { color: var(--muted); font-size: 13px; font-weight: 800; }

input, textarea, select {
  width: 100%;
  border: 2px solid var(--line);
  background: #fffaf0;
  color: var(--ink);
  border-radius: 0;
  padding: 12px;
  font: inherit;
  outline: none;
}

textarea { resize: vertical; min-height: 92px; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(13, 107, 79, 0.14); }

.switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 10px 0 18px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input { width: 18px; height: 18px; }
.check span { color: var(--ink); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }

button {
  border: 2px solid var(--ink);
  background: var(--green);
  color: white;
  padding: 12px 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
}

button:hover { background: var(--green-2); transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.secondary { background: #fffaf0; color: var(--ink); }

.result-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 18px; }
.steps { margin: 16px 0 0; padding-left: 22px; color: var(--muted); line-height: 1.8; }

.log-panel { overflow: hidden; }
pre {
  margin: 14px 0 0;
  min-height: 190px;
  max-height: 460px;
  overflow: auto;
  padding: 14px;
  background: #152019;
  color: #e5f5dc;
  border: 2px solid #293d31;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 860px) {
  .masthead { align-items: start; flex-direction: column; }
  .two, .four, .result-grid { grid-template-columns: 1fr; }
}
