:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --ink: #17202a;
  --muted: #626f7f;
  --line: #d9e0e8;
  --panel: #ffffff;
  --primary: #126b5a;
  --primary-hover: #0e5a4b;
  --danger: #a33b3b;
  --success: #276749;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.panel,
.results {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(23, 32, 42, 0.06);
}

.panel {
  padding: 28px;
}

.heading p {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heading h1 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.upload-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.file-picker {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px dashed #9aa8b6;
  border-radius: 6px;
  color: var(--muted);
  background: #fbfcfe;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

button {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.hint,
.status {
  margin: 14px 0 0;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

.results {
  margin-top: 18px;
  overflow: hidden;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.summary div {
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.summary div:last-child {
  border-right: 0;
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.65rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

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

  .panel {
    padding: 20px;
  }

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

  .summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary div:last-child {
    border-bottom: 0;
  }
}
