:root {
  --bg: #efe1cb;
  --panel: rgba(252, 248, 242, 0.86);
  --panel-strong: rgba(255, 252, 247, 0.98);
  --text: #20170f;
  --muted: #6e5c4e;
  --line: rgba(71, 48, 26, 0.14);
  --accent: #9d401a;
  --accent-dark: #6d2508;
  --accent-soft: rgba(157, 64, 26, 0.14);
  --success: #24634c;
  --warn: #a65a0b;
  --danger: #8e2e25;
  --shadow: 0 24px 60px rgba(79, 46, 18, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(201, 115, 63, 0.28), transparent 28%),
    radial-gradient(circle at right 18%, rgba(138, 72, 25, 0.16), transparent 24%),
    linear-gradient(180deg, #ecd9be 0%, #f7efe5 38%, #efe4d5 100%);
}

.shell {
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  padding: 18px 0 26px;
}

.eyebrow,
.section-kicker,
.field span,
.meta-label {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-size: 12px;
}

.hero h1,
.section-head h2,
.job-head h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.94;
}

.lede,
.section-note,
.workspace-copy,
.job-error,
.empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.lede {
  width: min(660px, 100%);
  margin: 18px 0 0;
  font-size: 18px;
}

.panel {
  margin-top: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.panel-identity {
  background: linear-gradient(135deg, rgba(255, 252, 247, 0.95), rgba(250, 242, 232, 0.84));
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 30px;
  line-height: 1.05;
}

.section-note {
  margin: 0;
  max-width: 420px;
  font-size: 14px;
}

.identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: end;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-wide,
.actions {
  grid-column: 1 / -1;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
  transition: border-color 120ms ease, transform 120ms ease;
}

input:focus {
  outline: none;
  border-color: rgba(157, 64, 26, 0.65);
  transform: translateY(-1px);
}

button,
.link-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff9f2;
  padding: 13px 24px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(109, 33, 5, 0.2);
  transition: transform 120ms ease, opacity 120ms ease;
  text-decoration: none;
}

button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
}

.actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.flash {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(36, 99, 76, 0.14);
  background: rgba(36, 99, 76, 0.08);
  color: var(--success);
}

.flash.error {
  border-color: rgba(142, 46, 37, 0.16);
  background: rgba(142, 46, 37, 0.08);
  color: var(--danger);
}

.config-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.64);
  color: var(--muted);
  font-size: 14px;
}

.config-note p {
  margin: 0;
}

.hidden {
  display: none;
}

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

.job-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.8);
  padding: 18px;
}

.job-head,
.job-metrics,
.job-actions,
.job-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.job-head {
  align-items: flex-start;
}

.job-head h3 {
  font-size: 24px;
  line-height: 1.2;
  word-break: break-word;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.job-metrics {
  margin: 16px 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.progress {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(109, 33, 5, 0.08);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #d67e32 0%, #9d401a 60%, #6d2508 100%);
  transition: width 180ms ease;
}

.job-meta {
  margin-top: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.job-meta p,
.job-error,
.workspace-copy {
  margin: 0;
}

.job-actions {
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.button-secondary,
.button-ghost {
  box-shadow: none;
}

.button-secondary {
  background: linear-gradient(135deg, #c56f35 0%, #954019 100%);
}

.button-ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--line);
}

.empty-state {
  padding: 24px;
  border: 1px dashed rgba(71, 48, 26, 0.2);
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.45);
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

@media (max-width: 840px) {
  .shell {
    width: min(100vw - 20px, 1080px);
    padding-top: 26px;
  }

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

  .section-head,
  .job-head,
  .job-metrics,
  .config-note,
  .identity-row,
  .actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

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

  button,
  .link-button {
    width: 100%;
  }
}
