:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #697386;
  --line: #e6e8ef;
  --primary: #3457f5;
  --primary-dark: #2543c9;
  --danger: #b42318;
  --ok: #027a48;
  --warn: #b54708;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #e6ebff 0, transparent 36rem), var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 40px auto;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

h1 {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  margin: 0;
}

.sub {
  color: var(--muted);
  font-size: 18px;
  margin: 14px 0 0;
}

.card,
.warning {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(27, 36, 60, .08);
  padding: 24px;
  margin-bottom: 18px;
}

.warning {
  border-color: #fedf89;
  background: #fffbeb;
  color: var(--warn);
}

.submit-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(52, 87, 245, .1);
}

button,
.button-like {
  border: 0;
  border-radius: 16px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 14px 18px;
  text-decoration: none;
}

button:hover,
.button-like:hover {
  background: var(--primary-dark);
}

.secondary {
  background: #eef2ff;
  color: var(--primary-dark);
}

.secondary:hover {
  background: #dfe6ff;
}

.hint,
.empty,
footer {
  color: var(--muted);
}

.section-head,
.task {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.section-head {
  align-items: center;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  position: relative;
}

.delete-x {
  position: absolute;
  right: 8px;
  top: 6px;
  z-index: 2;
}

.delete-x button {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  color: #98a2b3;
  display: inline-flex;
  font-size: 22px;
  font-weight: 400;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 30px;
}

.delete-x button:hover {
  background: #fef3f2;
  color: var(--danger);
}

.task-main {
  min-width: 0;
}

.task-title {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.task-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  margin-top: 6px;
}

.url {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.task-side {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 120px;
  padding-top: 26px;
}

.status {
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
}

.status-queued {
  background: #eef2ff;
  color: #3538cd;
}

.status-running {
  background: #ecfdf3;
  color: var(--ok);
}

.status-completed {
  background: #dcfae6;
  color: var(--ok);
}

.status-failed {
  background: #fef3f2;
  color: var(--danger);
}

.progress {
  color: var(--muted);
  font-weight: 700;
}

.error {
  color: var(--danger);
  margin-top: 10px;
}

details {
  margin-top: 10px;
}

pre {
  background: #101828;
  border-radius: 14px;
  color: #e4e7ec;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

footer {
  display: grid;
  gap: 4px;
  font-size: 12px;
  margin-top: 20px;
}

code {
  background: rgba(0, 0, 0, .06);
  border-radius: 8px;
  padding: 2px 6px;
}

@media (max-width: 760px) {
  .hero,
  .section-head,
  .task {
    flex-direction: column;
  }

  .submit-form {
    grid-template-columns: 1fr;
  }

  .task-side {
    align-items: flex-start;
    padding-top: 0;
  }
}
