:root {
  color-scheme: light;
  --ink: #17241f;
  --muted: #6d7973;
  --line: #e3e9e4;
  --soft: #f3f7f3;
  --paper: #ffffff;
  --green: #1b7758;
  --green-dark: #12523d;
  --green-pale: #e2f1e9;
  --orange: #ed8d50;
  --shadow: 0 18px 50px rgba(30, 54, 43, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: #f7faf7;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.app-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.topbar { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 750; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--green); color: white; font-size: 15px; font-weight: 800; }
.topbar-note { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: 0.02em; }

.hero { max-width: 730px; padding: 74px 0 41px; }
.eyebrow, .section-kicker { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.hero h1 { margin: 12px 0 13px; font-size: clamp(36px, 5vw, 58px); font-weight: 760; letter-spacing: -0.06em; line-height: 0.98; }
.hero p { max-width: 625px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(340px, 0.78fr); gap: 20px; align-items: start; }
.upload-card, .actions-card, .progress-card, .results-card { border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.upload-card { overflow: hidden; border-radius: 24px; }
.dropzone { display: flex; min-height: 332px; flex-direction: column; align-items: center; justify-content: center; padding: 40px 28px; border: 2px dashed #bfd4c6; background: linear-gradient(180deg, #fbfdfb, #f5faf6); text-align: center; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--green); background: #eef8f1; }
.dropzone.is-dragging { transform: scale(1.008); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 19px; border-radius: 19px; background: var(--green-pale); color: var(--green); }
.upload-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.dropzone-title { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.dropzone-subtitle { margin-top: 7px; color: var(--green); font-size: 13px; font-weight: 650; }
.file-hint { margin-top: 22px; color: #94a198; font-size: 11px; }

.file-panel { padding: 24px 27px 22px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.section-heading h2 { margin: 7px 0 0; font-size: 20px; letter-spacing: -0.035em; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 700; }
.text-button:hover { color: var(--green-dark); text-decoration: underline; }
.file-list { display: grid; gap: 8px; max-height: 260px; margin: 19px 0 0; padding: 0; overflow: auto; list-style: none; }
.file-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 11px; border: 1px solid #edf1ed; border-radius: 11px; background: #fbfcfb; }
.file-icon { display: grid; place-items: center; flex: 0 0 27px; height: 30px; border-radius: 7px; background: #fbe8dc; color: #bd6233; font-size: 10px; font-weight: 800; }
.file-name { min-width: 0; overflow: hidden; color: #3a4941; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.file-size { margin-left: auto; color: #99a49d; font-size: 10px; white-space: nowrap; }

.actions-card { border-radius: 24px; padding: 28px; }
.actions-card h2 { margin: 8px 0 9px; font-size: 24px; letter-spacing: -0.045em; }
.actions-intro { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.action-button { display: flex; width: 100%; align-items: center; gap: 12px; margin-top: 11px; padding: 15px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.action-button:not(:disabled):hover { border-color: #acd0ba; background: #f8fcf9; transform: translateY(-1px); }
.action-button-primary { border-color: var(--green); background: var(--green); color: white; }
.action-button-primary:not(:disabled):hover { border-color: var(--green-dark); background: var(--green-dark); }
.action-button:disabled { opacity: .47; }
.button-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px; background: rgba(255,255,255,.2); font-size: 17px; line-height: 1; }
.action-button:not(.action-button-primary) .button-icon { background: var(--green-pale); color: var(--green); }
.action-button strong, .action-button small { display: block; }
.action-button strong { font-size: 13px; font-weight: 760; }
.action-button small { margin-top: 4px; color: #8a968e; font-size: 10px; line-height: 1.3; }
.action-button-primary small { color: #c8e0d2; }
.button-arrow { margin-left: auto; font-size: 19px; font-weight: 300; }
.tip-box { display: flex; gap: 10px; margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); }
.tip-icon { display: grid; place-items: center; flex: 0 0 17px; width: 17px; height: 17px; border: 1px solid #a9b6ad; border-radius: 50%; color: #7d8c82; font-size: 10px; font-style: italic; font-weight: 800; }
.tip-box p { margin: 0; color: #8a958d; font-size: 10px; line-height: 1.55; }

.progress-card, .results-card { margin-top: 20px; border-radius: 20px; padding: 23px 26px; }
.progress-row { display: flex; justify-content: space-between; color: #44534a; font-size: 12px; font-weight: 700; }
.progress-track { height: 7px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: #e8eee9; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .2s ease; }
.progress-detail { min-height: 16px; margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.results-heading { align-items: center; }
.secondary-button { padding: 9px 13px; border: 1px solid #b9d6c4; border-radius: 10px; background: white; color: var(--green); font-size: 11px; font-weight: 750; }
.secondary-button:hover { background: #eff8f1; }
.results-list { display: grid; gap: 9px; margin-top: 20px; }
.result-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #e7ede8; border-radius: 13px; }
.result-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 35px; border-radius: 8px; background: var(--green-pale); color: var(--green); font-size: 10px; font-weight: 850; }
.result-info { min-width: 0; }
.result-name { overflow: hidden; color: #33433a; font-size: 12px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { margin-top: 4px; color: #95a098; font-size: 10px; }
.download-button { margin-left: auto; padding: 8px 11px; border: 0; border-radius: 9px; background: var(--green); color: #fff; font-size: 11px; font-weight: 750; white-space: nowrap; }
.download-button:hover { background: var(--green-dark); }
.footer-note { margin: 29px 0 0; color: #a1ada5; font-size: 11px; text-align: center; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 5; max-width: min(360px, calc(100% - 44px)); padding: 12px 15px; border: 1px solid #b9d7c3; border-radius: 11px; background: #eef8f1; box-shadow: 0 12px 30px rgba(30,54,43,.14); color: var(--green-dark); font-size: 12px; font-weight: 650; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { border-color: #f1c2aa; background: #fff4ed; color: #99451f; }

@media (max-width: 800px) {
  .app-shell { width: min(100% - 30px, 620px); padding-top: 18px; }
  .hero { padding: 58px 0 31px; }
  .workspace { grid-template-columns: 1fr; }
  .dropzone { min-height: 280px; }
}

@media (max-width: 480px) {
  .app-shell { width: calc(100% - 24px); }
  .topbar-note { display: none; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 14px; }
  .actions-card, .progress-card, .results-card { padding: 21px; }
  .file-panel { padding: 21px; }
  .file-size { display: none; }
  .results-heading { align-items: start; }
  .result-item { align-items: start; }
  .download-button { margin-top: 1px; }
}
