:root {
  color-scheme: dark;
  --background: #080b12;
  --surface: #101722;
  --surface-strong: #151f30;
  --text: #f1f4f9;
  --muted: #aab3c4;
  --line: rgba(235, 240, 250, 0.14);
  --primary: #7890ff;
  --secondary: #f0a45d;
  --success: #65d39a;
  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:
    radial-gradient(circle at 85% 10%, rgba(120, 144, 255, 0.15), transparent 30rem),
    var(--background);
  color: var(--text);
}

a {
  color: inherit;
  text-underline-offset: 0.25rem;
}

.shell {
  width: min(calc(100% - 2rem), 72rem);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 6rem) 0;
}

.hero,
.result-panel {
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: rgba(16, 23, 34, 0.9);
}

.hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(120, 144, 255, 0.13), transparent 24rem),
    rgba(16, 23, 34, 0.9);
}

.back-link,
.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 3rem 0 0.8rem;
  color: var(--secondary);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1rem;
  font-size: clamp(2.7rem, 8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.summary {
  max-width: 48rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

button {
  min-height: 3.1rem;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--primary);
  color: #080b12;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

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

.boundary {
  max-width: 52rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.result-panel {
  margin-top: 1.4rem;
}

.result-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.result-heading .eyebrow {
  margin-top: 0;
}

#run-status {
  max-width: 28rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
  text-align: right;
}

.steps {
  display: grid;
  margin: 2.5rem 0 0;
  padding: 0;
  gap: 0.7rem;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface-strong);
}

.steps span,
.steps small {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
}

.steps li[data-state="success"] {
  border-color: rgba(101, 211, 154, 0.4);
}

.steps li[data-state="success"] small {
  color: var(--success);
}

.steps li[data-state="error"] {
  border-color: rgba(240, 164, 93, 0.6);
}

details {
  margin-top: 1.5rem;
}

summary {
  cursor: pointer;
  color: var(--muted);
}

pre {
  max-height: 30rem;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #05070b;
  font-size: 0.78rem;
}

@media (max-width: 42rem) {
  .actions,
  .result-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  #run-status {
    text-align: left;
  }

  .steps li {
    grid-template-columns: 2rem 1fr;
  }

  .steps small {
    grid-column: 2;
  }
}
