:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #21312f;
  background: #f2f0e8;
  --deep: #173b37;
  --green: #2d735f;
  --gold: #d49243;
  --paper: #fffdf8;
  --muted: #6f7a77;
  --line: #deddd5;
  --soft: #dcece5;
  --danger: #b44e45;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% 0, rgba(212, 146, 67, .15), transparent 30rem), #f2f0e8; }
button, input { font: inherit; }
.setup-shell { width: min(1040px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 70px; }
.setup-header { display: grid; grid-template-columns: 190px 1fr; gap: 30px; align-items: start; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--deep); font-weight: 850; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.eyebrow { font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
h1 { font-size: clamp(32px, 6vw, 58px); line-height: 1.02; letter-spacing: -.055em; margin: 8px 0 12px; color: var(--deep); }
h2 { margin: 0 0 8px; color: var(--deep); letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.6; margin: 0; }
.status-banner { padding: 13px 16px; border-radius: 14px; background: #e7ece9; color: var(--deep); font-weight: 700; margin-bottom: 16px; }
.status-banner.error { background: #f7dfdc; color: #713b36; }
.status-banner.success { background: var(--soft); color: var(--green); }
.ready-panel { margin-bottom: 16px; padding: 16px; border-radius: 16px; background: var(--deep); color: white; display: flex; gap: 18px; justify-content: space-between; align-items: center; }
.ready-panel strong, .ready-panel span { display: block; }
.ready-panel span { margin-top: 4px; color: rgba(255,255,255,.72); }
.ready-panel .primary-button { background: white; color: var(--deep); flex: 0 0 auto; }
.steps { display: grid; gap: 14px; }
.step-card { display: grid; grid-template-columns: 54px minmax(0,1fr) minmax(170px,.32fr); gap: 18px; align-items: start; padding: 22px; border: 1px solid rgba(76,96,91,.12); border-radius: 20px; background: rgba(255,253,248,.94); box-shadow: 0 12px 36px rgba(35,57,52,.05); }
.step-card.locked { opacity: .55; pointer-events: none; }
.step-number { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--deep); color: white; font-size: 20px; font-weight: 850; }
.step-action { display: flex; justify-content: flex-end; align-items: start; }
.primary-button, .secondary-button { border: 0; border-radius: 12px; min-height: 46px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 800; cursor: pointer; }
.primary-button { background: var(--deep); color: white; }
.secondary-button { background: var(--soft); color: var(--deep); }
.primary-button:disabled, .secondary-button:disabled { opacity: .45; cursor: not-allowed; }
.stack-form { display: grid; gap: 12px; margin-top: 18px; max-width: 540px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; max-width: 540px; }
label { display: grid; gap: 6px; font-size: 12px; font-weight: 780; color: var(--muted); }
input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 11px; background: white; padding: 10px 12px; outline: 0; color: #21312f; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,115,95,.11); }
.or { margin: 12px 0; color: var(--muted); font-size: 12px; }
.summary-card { padding: 12px 14px; border-radius: 13px; background: var(--soft); font-size: 13px; }
.summary-card strong, .summary-card span { display: block; }
.summary-card span { margin-top: 4px; color: var(--muted); }
.upload-form { margin-top: 18px; }
.upload-form input { position: absolute; opacity: 0; pointer-events: none; }
.drop-zone { border: 2px dashed #b8c7c1; border-radius: 16px; padding: 22px; display: grid; place-items: center; text-align: center; background: #f8faf7; margin-bottom: 12px; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.drop-zone strong { font-size: 17px; color: var(--deep); }
.drop-zone span { font-weight: 500; overflow-wrap: anywhere; }
.drop-zone.selected { border-style: solid; border-color: var(--green); background: var(--soft); transform: translateY(-1px); }
.drop-zone.selected strong { color: var(--green); }
.statement-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.optional-note { display: block; margin-top: 10px; color: var(--muted); line-height: 1.5; }
.progress-panel { margin-top: 18px; padding: 24px; border-radius: 22px; background: var(--deep); color: white; display: grid; grid-template-columns: minmax(220px,.38fr) 1fr; gap: 24px; }
.progress-panel h2 { color: white; }
.progress-panel p { color: rgba(255,255,255,.67); }
.jobs { display: grid; gap: 12px; min-width: 0; }
.job { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.09); overflow: hidden; }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.job-head div { min-width: 0; }
.job-head strong { display: block; overflow-wrap: anywhere; }
.job-head small { display: block; margin-top: 4px; color: rgba(255,255,255,.58); }
.job-head > span { max-width: 44%; text-align: right; font-size: 12px; line-height: 1.35; color: #f2d2a3; }
.bar { height: 9px; border-radius: 999px; background: rgba(255,255,255,.13); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); transition: width .35s ease; }
.progress-number { display: block; margin-top: 5px; color: rgba(255,255,255,.65); }
.stages { display: grid; gap: 7px; margin: 12px 0; }
.stage { display: flex; gap: 8px; align-items: center; font-size: 12px; color: rgba(255,255,255,.58); }
.stage.complete { color: white; }
.stage.processing { color: #f2d2a3; font-weight: 750; }
.stage.failed { color: #ffb5ad; }
.analyse-button { margin-top: 4px; background: white; color: var(--deep); }
.analysis-result { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.summary-grid > div { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.08); }
.summary-grid span, .summary-grid strong { display: block; }
.summary-grid span { font-size: 11px; color: rgba(255,255,255,.65); }
.summary-grid strong { margin-top: 5px; font-size: 18px; }
.category-list { margin-top: 14px; }
.category-list > strong { display: block; margin-bottom: 8px; }
.category-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.category-list span { color: rgba(255,255,255,.75); }
.ai-explanation { margin-top: 14px; padding: 14px; border-radius: 13px; background: rgba(212,146,67,.13); }
.ai-explanation p { margin-top: 8px; color: rgba(255,255,255,.86); }
.empty { padding: 18px; border: 1px dashed rgba(255,255,255,.22); border-radius: 14px; text-align: center; color: rgba(255,255,255,.72); }
.hidden { display: none !important; }
@media (max-width: 760px) {
  .setup-header, .step-card, .progress-panel { grid-template-columns: 1fr; }
  .setup-header { gap: 18px; }
  .step-card { padding: 18px; }
  .step-action { justify-content: flex-start; }
  .inline-form { grid-template-columns: 1fr; }
  .progress-panel { padding: 20px; }
  .brand { margin-bottom: 5px; }
  .ready-panel { align-items: stretch; flex-direction: column; }
  .job-head { flex-direction: column; }
  .job-head > span { max-width: none; text-align: left; }
}
@media (max-width: 420px) {
  .summary-grid { grid-template-columns: 1fr; }
  .statement-actions > * { width: 100%; }
}
