:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #18202f;
  --muted: #637083;
  --line: #d9e0ea;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --success: #147a45;
  --warning: #a45f05;
  --code-bg: #101828;
  --code-text: #d8e2f0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 32px 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(26, 38, 68, 0.08);
}

.control-panel {
  position: sticky;
  top: 24px;
  padding: 24px;
}

.result-panel {
  min-height: calc(100vh - 64px);
  padding: 24px;
}

.brand-row,
.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 24px;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 76px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.status-pill.success {
  border-color: rgba(20, 122, 69, 0.28);
  background: rgba(20, 122, 69, 0.08);
  color: var(--success);
}

.status-pill.running {
  border-color: rgba(164, 95, 5, 0.28);
  background: rgba(164, 95, 5, 0.08);
  color: var(--warning);
}

.status-pill.failed {
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.status-pill.idle {
  background: #f8fafc;
}

.form-grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.desktop-link {
  display: grid;
  place-items: center;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.desktop-link:hover {
  border-color: var(--accent);
}

.steps {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.step-marker {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.step.ok .step-marker {
  background: rgba(20, 122, 69, 0.1);
  color: var(--success);
}

.step.fail .step-marker {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
}

.step-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.step-content p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.raw-json {
  min-height: 240px;
  margin: 0;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  overflow: auto;
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 840px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 16px 0;
  }

  .control-panel {
    position: static;
  }

  .result-panel {
    min-height: 420px;
  }

  .brand-row,
  .result-header {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    width: fit-content;
  }
}
