:root {
  --ink: #13231f;
  --muted: #65736d;
  --line: rgba(19, 35, 31, 0.12);
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --accent: #14745e;
  --accent-dark: #0d4f40;
  --accent-soft: rgba(20, 116, 94, 0.12);
  --warn: #9a3412;
  --warn-soft: rgba(154, 52, 18, 0.12);
  --shadow: 0 20px 58px rgba(31, 43, 36, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    linear-gradient(120deg, rgba(20, 116, 94, 0.13), transparent 30%),
    linear-gradient(240deg, rgba(228, 171, 56, 0.14), transparent 28%),
    linear-gradient(180deg, #fbfbf8 0%, #edf1ec 100%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1360px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 16px 0 20px;
}

.hero {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.kicker {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.panel h2 {
  margin: 0;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(1.45rem, 2.8vw, 2.25rem);
  font-weight: 700;
}

.hero-text,
.copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 64ch;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: start;
}

.panel {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

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

.dropzone {
  display: block;
  margin-top: 12px;
  padding: 16px;
  border: 1.5px dashed rgba(20, 116, 94, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 116, 94, 0.08), rgba(255, 255, 255, 0.96)),
    var(--panel-solid);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dropzone:hover,
.dropzone.drag-over {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(20, 116, 94, 0.14);
}

.dropzone-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
}

.dropzone-copy {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-empty,
.empty-state {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(19, 35, 31, 0.04);
  color: var(--muted);
  font-size: 0.86rem;
}

.file-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(19, 35, 31, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.file-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  word-break: break-word;
}

.file-item-details {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.file-remove,
.primary-button,
.ghost-button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.file-remove {
  padding: 8px 10px;
  background: rgba(19, 35, 31, 0.06);
  color: var(--ink);
}

.primary-button {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.primary-button:not(:disabled):hover,
.ghost-button:hover,
.file-remove:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ghost-button {
  padding: 8px 11px;
  background: rgba(19, 35, 31, 0.06);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.status {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.status-muted {
  background: rgba(19, 35, 31, 0.05);
  color: var(--muted);
}

.status-good {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.status-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.summary-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.summary-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.summary-value {
  margin: 5px 0 0;
  font-size: 1.24rem;
  font-weight: 700;
}

.log {
  min-height: 74px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10231e;
  color: #dbe9e3;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.preview-block {
  margin-top: 12px;
}

.preview-head {
  margin-bottom: 10px;
}

.preview {
  display: grid;
  gap: 10px;
}

.preview-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.preview-content {
  display: grid;
  gap: 10px;
}

.preview-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.preview-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.preview-table th,
.preview-table td {
  padding: 7px 9px;
  border-bottom: 1px solid rgba(19, 35, 31, 0.08);
  text-align: left;
  white-space: nowrap;
}

.preview-table th {
  color: var(--accent-dark);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.preview-table td:last-child,
.preview-table th:last-child {
  text-align: right;
}

.hidden {
  display: none !important;
}

@media (max-width: 850px) {
  .hero,
  .workspace-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-chips {
    justify-content: flex-start;
  }

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