:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #152033;
  --muted: #5f6c82;
  --line: #d8e0ec;
  --accent: #2457ff;
  --accent-soft: #eef3ff;
  --danger: #c62828;
  --success: #0b7a3b;
  --shadow: 0 14px 40px rgba(17, 27, 53, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f6f9ff 0%, var(--bg) 100%);
  color: var(--text);
}

.shell {
  width: min(920px, calc(100vw - 32px));
  margin: 40px auto 64px;
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(216, 224, 236, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero {
  background: radial-gradient(circle at top right, #eef3ff 0%, #ffffff 42%);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
}

.lede,
.hint {
  margin: 0;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 16px;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
}

.file-field input {
  padding: 12px;
  background: var(--accent-soft);
}

textarea {
  min-height: 320px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 13px 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(36, 87, 255, 0.24);
}

button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.status-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.status.idle,
.status.running {
  color: var(--text);
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #d8e3ff;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 920px);
    margin-top: 20px;
  }

  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .actions,
  .status-wrap {
    align-items: flex-start;
    flex-direction: column;
  }
}
