:root {
  color-scheme: light;
  --bg: #f6f7f1;
  --ink: #17211b;
  --muted: #5c665f;
  --line: #d7dbd0;
  --panel: #ffffff;
  --accent: #1f7a63;
  --accent-dark: #155744;
  --warn: #9c4b1c;
  --shadow: 0 18px 55px rgba(23, 33, 27, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(120deg, rgba(31, 122, 99, 0.12), transparent 42%),
    var(--bg);
  color: var(--ink);
}

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 32px 0;
}

.workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 48px);
}

.masthead {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.summary {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 620px;
}

.eyebrow::after {
  content: " progresso ativo";
  color: var(--muted);
  margin-left: 8px;
  text-transform: none;
  font-weight: 600;
}

.dropzone {
  min-height: 230px;
  border: 2px dashed #aeb8ad;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 28px;
  background: #fbfcf8;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone.isDragging {
  border-color: var(--accent);
  background: #eef8f2;
}

.pickButton,
.downloadButton {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.pickButton:hover,
.downloadButton:hover {
  background: var(--accent-dark);
}

.pickButton:disabled {
  cursor: wait;
  opacity: 0.75;
}

.downloadButton:not([href]) {
  pointer-events: none;
  opacity: 0.55;
}

.icon {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 1;
}

.fileMeta {
  margin: 0;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.statusPanel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.label,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

#statusText {
  font-size: 1.05rem;
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--accent);
}

.result {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric strong {
  font-size: 1.35rem;
}

.downloadButton {
  grid-column: 1 / -1;
}

.targetMessage {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.targetMessage.warning {
  color: var(--warn);
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 920px);
    padding: 10px 0;
  }

  .workspace {
    padding: 20px;
  }

  .dropzone {
    min-height: 190px;
  }

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