:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: #fffaf2;
  --text: #1f1a14;
  --muted: #6a5c4d;
  --line: #d5c6b3;
  --accent: #0b7a75;
  --accent-strong: #095d5a;
  --shadow: 0 24px 60px rgba(31, 26, 20, 0.12);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(11, 122, 117, 0.12), transparent 32%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 100%);
  color: var(--text);
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 16px;
}

.panel {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.95);
  box-shadow: var(--shadow);
  padding: 32px;
}

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

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.meta {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 28px 0;
}

.meta div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
}

.meta dt {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta dd {
  margin: 8px 0 0;
  font-weight: 600;
}

.upload-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
  font-weight: 600;
}

input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  color: var(--text);
}

button,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover,
button:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

button:disabled {
  cursor: progress;
  opacity: 0.65;
  transform: none;
}

.progress-card {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.result {
  margin: 14px 0 0;
  border-radius: 14px;
  background: #f3ede3;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.error-panel {
  text-align: center;
}

.back-link {
  margin-top: 18px;
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

@media (max-width: 640px) {
  .panel {
    padding: 24px;
  }

  .progress-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
