:root {
  --ink: #202422;
  --muted: #6f7672;
  --line: #dfe4df;
  --paper: #fffdf8;
  --canvas: #f1f3ed;
  --green: #1d5b45;
  --green-dark: #124232;
  --lime: #d7f071;
  --danger: #a33b36;
  --shadow: 0 18px 48px rgba(36, 52, 44, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 86% 8%, rgba(215, 240, 113, .4), transparent 22rem),
    linear-gradient(180deg, #f7f8f3 0, var(--canvas) 36rem);
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, .dropzone:has(input:focus-visible) {
  outline: 3px solid rgba(29, 91, 69, .24);
  outline-offset: 2px;
}

.shell { width: min(880px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 72px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; font-weight: 760; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: white; background: var(--green); font-family: Georgia, serif; font-size: 18px; }
.brand-separator { width: 1px; height: 17px; background: #cbd1cb; }
.brand-product { color: var(--muted); font-weight: 580; }

.hero { max-width: 700px; padding: 72px 0 42px; }
.step { margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(43px, 7vw, 72px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.lead { max-width: 640px; margin-bottom: 0; color: #59615c; font-size: 18px; line-height: 1.55; }
h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; letter-spacing: -.025em; }

.panel { padding: clamp(22px, 4vw, 38px); border: 1px solid rgba(29, 91, 69, .15); border-radius: 24px; background: rgba(255, 253, 248, .93); box-shadow: var(--shadow); }
.panel-heading, .section-heading, .submit-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.format-pill, .jobs-count { padding: 7px 10px; border-radius: 999px; color: var(--green); background: #edf1e3; font-size: 11px; font-weight: 760; letter-spacing: .04em; }

.dropzone { display: grid; place-items: center; min-height: 230px; margin-top: 30px; padding: 30px; border: 1.5px dashed #aeb9b0; border-radius: 18px; text-align: center; background: #f9faf5; transition: border-color .18s, background .18s, transform .18s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--green); background: #f1f7e6; transform: translateY(-1px); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 50%; color: var(--green-dark); background: var(--lime); font-size: 24px; }
.dropzone strong { margin-bottom: 7px; font-size: 17px; }
.dropzone > span:last-child { color: var(--muted); font-size: 13px; }

.submit-row { justify-content: flex-end; margin-top: 20px; }
.primary-button, .download-button { min-height: 45px; padding: 0 20px; border: 0; border-radius: 12px; color: white; background: var(--green); font-weight: 760; transition: background .18s, transform .18s; }
.primary-button:hover:not(:disabled), .download-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .38; }
.progress-wrap { margin-top: 18px; }
.progress-track { overflow: hidden; height: 7px; border-radius: 99px; background: #e4e8e1; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s; }
.progress-wrap p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.error { margin: 14px 0 0; color: var(--danger); font-size: 13px; line-height: 1.45; }

.jobs-section { padding-top: 64px; }
.section-heading { margin-bottom: 20px; }
.empty-state { display: grid; place-items: center; min-height: 104px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); text-align: center; background: rgba(255, 255, 255, .38); }
.empty-state > span { display: none; }
.empty-state p { margin: 0 0 4px; color: #545b57; }
.empty-state small { font-size: 12px; }
.jobs { display: grid; gap: 12px; }
.job-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 253, 248, .86); }
.job-main, .job-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.job-actions { flex-wrap: wrap; justify-content: flex-end; }
.document-icon { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: white; background: #285ca8; font-family: Georgia, serif; font-size: 16px; font-weight: 700; }
.job-copy { display: grid; min-width: 0; gap: 4px; }
.job-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.job-status { color: var(--muted); font-size: 12px; }
.swap-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.swap { accent-color: var(--green); }
.download-button { min-height: 39px; padding: 0 15px; font-size: 12px; }
.delete-button { min-height: 39px; padding: 0 10px; border: 0; color: #8b3d38; background: transparent; font-size: 12px; font-weight: 700; }
.delete-button:hover { color: #6f2723; text-decoration: underline; }
.delete-button:disabled { cursor: wait; opacity: .55; }
.job-error { grid-column: 1 / -1; margin: 0; }

@media (max-width: 650px) {
  .shell { width: min(100% - 20px, 880px); padding-top: 16px; }
  .hero { padding: 54px 8px 30px; }
  .lead { font-size: 16px; }
  .panel-heading, .submit-row, .section-heading { align-items: flex-start; }
  .submit-row { flex-direction: column; }
  .primary-button { width: 100%; }
  .dropzone { min-height: 200px; }
  .job-card { grid-template-columns: 1fr; }
  .job-actions { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
