:root {
  color-scheme: light;
  --ink: #101a14;
  --ink-soft: #3a4a41;
  --muted: #6d7c73;
  --paper: #efe8da;
  --panel: rgba(255, 252, 246, 0.72);
  --panel-solid: #fffdf8;
  --line: rgba(16, 26, 20, 0.1);
  --line-strong: rgba(16, 26, 20, 0.18);
  --moss: #1b6b49;
  --moss-mid: #24875c;
  --moss-deep: #0f3f2c;
  --moss-soft: #d5eee3;
  --gold: #b8893a;
  --shadow: 0 30px 80px rgba(16, 26, 20, 0.14);
  --shadow-soft: 0 12px 40px rgba(16, 26, 20, 0.08);
  --radius: 22px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", "Avenir Next", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(36, 135, 92, 0.22), transparent 58%),
    radial-gradient(760px 480px at 92% 4%, rgba(184, 137, 58, 0.18), transparent 55%),
    radial-gradient(700px 420px at 70% 100%, rgba(27, 107, 73, 0.1), transparent 60%),
    linear-gradient(165deg, #e8dfcf 0%, #f3eee4 38%, #e8efe9 100%);
  overflow-x: hidden;
}

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.topo {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 26, 20, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 26, 20, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 35% 18%, black 10%, transparent 70%);
  opacity: 0.85;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite;
}

.orb-a {
  width: 340px;
  height: 340px;
  top: -80px;
  left: -60px;
  background: rgba(36, 135, 92, 0.35);
}

.orb-b {
  width: 280px;
  height: 280px;
  top: 10%;
  right: -80px;
  background: rgba(184, 137, 58, 0.28);
  animation-delay: -6s;
}

.orb-c {
  width: 240px;
  height: 240px;
  bottom: 8%;
  left: 35%;
  background: rgba(27, 107, 73, 0.18);
  animation-delay: -11s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -22px, 0) scale(1.06);
  }
}

.app {
  position: relative;
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.brand,
.stage,
.jobs-shell,
.log-shell {
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stage {
  animation-delay: 80ms;
}

.jobs-shell {
  animation-delay: 160ms;
}

.log-shell {
  animation-delay: 240ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  margin-bottom: 32px;
}

.brand-mark {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(145deg, #2f9a68, #0f3f2c);
  box-shadow:
    0 18px 36px rgba(15, 63, 44, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  animation: float 5s ease-in-out infinite;
}

.ring {
  position: absolute;
  inset: -8px;
  border-radius: 26px;
  border: 1px solid rgba(27, 107, 73, 0.22);
  animation: pulse-ring 3.2s ease-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  70%,
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

.pin {
  width: 15px;
  height: 15px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #fffdf8;
  box-shadow: 0 0 0 6px rgba(255, 253, 248, 0.18);
}

.product {
  margin: 0 0 10px;
  color: var(--moss);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(36px, 5.4vw, 58px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--moss-deep);
}

.lede {
  max-width: 48ch;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.7);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-soft);
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--moss-mid);
  box-shadow: 0 0 0 5px rgba(36, 135, 92, 0.16);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.status[data-state="running"] .status-dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(184, 137, 58, 0.2);
  animation: pulse 1.15s ease-in-out infinite;
}

.status[data-state="complete"] .status-dot {
  background: var(--moss-mid);
}

.status[data-state="failed"] .status-dot {
  background: #b42318;
  box-shadow: 0 0 0 5px rgba(180, 35, 24, 0.16);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.status-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status strong {
  font-size: 15px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}

.surface {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 252, 246, 0.38)),
    var(--panel);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.surface::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
}

.controls,
.rail,
.log-shell,
.jobs-shell {
  padding: 26px;
}

.field {
  margin-bottom: 18px;
}

.drive-field {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}

.drive-field .field-head,
.drive-field .field-note {
  margin: 0;
}

.field-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.field-note strong {
  color: var(--moss-deep);
  font-weight: 700;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.dropzone {
  margin-bottom: 14px;
  border: 1.5px dashed rgba(27, 107, 73, 0.32);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(213, 238, 227, 0.9), transparent 55%),
    linear-gradient(180deg, rgba(213, 238, 227, 0.45), rgba(255, 253, 248, 0.55));
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.dropzone:hover,
.dropzone.active,
.dropzone:focus-visible {
  border-color: var(--moss);
  box-shadow: 0 16px 40px rgba(27, 107, 73, 0.12);
  outline: none;
  transform: translateY(-2px);
}

.dropzone-inner {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 18px;
  text-align: center;
}

.drop-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--moss-deep);
  background: rgba(255, 253, 248, 0.8);
  box-shadow: inset 0 0 0 1px rgba(27, 107, 73, 0.12);
}

.dropzone-inner strong {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.dropzone-inner span {
  color: var(--muted);
  font-size: 13px;
}

.file-summary {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}

.file-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 140px;
  overflow: auto;
}

.file-list li {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--ink-soft);
  font-size: 13px;
}

.file-list li.more {
  border-style: dashed;
  color: var(--muted);
  text-align: center;
}

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

label,
.rail-label,
.hint {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

label,
.rail-label {
  color: var(--ink-soft);
}

.hint.chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(27, 107, 73, 0.1);
  color: var(--moss-deep);
}

input[type="text"],
input[type="url"],
input:not([type]) {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.92);
  font: 500 14px/1.4 var(--font-body);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input::placeholder {
  color: #8b978f;
}

input:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 4px rgba(27, 107, 73, 0.14);
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 6px 0 22px;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.62);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.option:hover {
  border-color: rgba(27, 107, 73, 0.35);
  box-shadow: 0 10px 24px rgba(16, 26, 20, 0.06);
  transform: translateY(-1px);
}

.option input {
  margin-top: 3px;
  accent-color: var(--moss);
}

.option strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.option em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.4;
}

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

button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  font: 800 14px/1 var(--font-body);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
    linear-gradient(135deg, var(--moss-mid), var(--moss-deep));
  color: #fffdf8;
  box-shadow:
    0 16px 34px rgba(15, 63, 44, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

button.primary.full {
  width: 100%;
  min-height: 54px;
  font-size: 15px;
}

button.primary:hover:not(:disabled) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent),
    linear-gradient(135deg, #1f7550, #0b3323);
}

button.picker {
  border-color: rgba(27, 107, 73, 0.22);
  background: var(--moss-soft);
  color: var(--moss-deep);
  white-space: nowrap;
}

button.ghost {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, 0.35);
  color: var(--ink);
}

button.compact {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

.rail {
  display: grid;
  align-content: space-between;
  gap: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(36, 135, 92, 0.16), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 252, 246, 0.28)),
    var(--panel);
}

.rail p {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.rail-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid rgba(16, 26, 20, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.metric-wide {
  grid-column: 1 / -1;
}

.rail-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.log-shell,
.jobs-shell {
  margin-top: 20px;
}

.jobs-note {
  margin: 6px 0 0;
}

.jobs-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.job-empty {
  padding: 28px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 253, 248, 0.4);
}

.job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.job-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(16, 26, 20, 0.08);
}

.job-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.job-main strong {
  font-size: 15px;
}

.job-main > span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-meta em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 26, 20, 0.05);
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

pre {
  height: 280px;
  margin: 0;
  overflow: auto;
  border-radius: 16px;
  padding: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(36, 135, 92, 0.18), transparent 40%),
    linear-gradient(180deg, #17231c, #0e1511);
  color: #d7e7dc;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 860px) {
  .app {
    width: min(100vw - 24px, 760px);
    padding: 24px 0 48px;
  }

  .brand,
  .stage,
  .options,
  .rail-metrics,
  .job-card {
    grid-template-columns: 1fr;
  }

  .status {
    justify-self: start;
  }

  h1 {
    max-width: none;
  }

  .job-actions {
    justify-content: flex-start;
  }

  .metric-wide {
    grid-column: auto;
  }
}
