:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #0f766e;
  --accent-soft: #d7efe9;
  --line: #e6e6e6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.shell {
  max-width: 960px;
  margin: 6vh auto 8vh;
  padding: 0 24px;
  display: grid;
  gap: 24px;
}

.shell > * {
  animation: fadeUp 0.6s ease both;
}

.shell > *:nth-child(2) {
  animation-delay: 0.06s;
}

.shell > *:nth-child(3) {
  animation-delay: 0.12s;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.logo {
  height: 28px;
  width: auto;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 40px);
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(27, 24, 20, 0.08);
}

.label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--line);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
}

.file input {
  display: none;
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.2);
}

.status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.file-name {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.progress {
  margin-top: 10px;
  height: 4px;
  background: #efe8dc;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: slide 1.2s ease-in-out infinite;
}

.hidden {
  display: none;
}

@keyframes slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(220%);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.output {
  font-size: 15px;
  line-height: 1.6;
  color: #1d1d1d;
  min-height: 120px;
}

.output .placeholder {
  color: var(--muted);
}

.output img {
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.output table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.output th,
.output td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.output pre {
  background: #f2ece2;
  padding: 12px;
  border-radius: 12px;
  overflow-x: auto;
}

.output code {
  background: #f2ece2;
  padding: 2px 6px;
  border-radius: 6px;
}

.output .error {
  color: #a12c2c;
  background: #fbeaea;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #f2c4c4;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
  }

  .badge {
    align-self: flex-start;
  }
}
