:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --ink: #1b2a24;
  --muted: #66756e;
  --line: #d9e2dc;
  --green: #1f7a4d;
  --green-dark: #145d39;
  --panel: #ffffff;
  --error: #b42318;
  --success: #167044;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 12px;
}

nav a,
.button {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 12px 30px rgba(23, 46, 35, 0.08);
}

.stack {
  display: grid;
  gap: 18px;
}

.narrow {
  max-width: 520px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.muted {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.tips {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbf9;
  color: var(--muted);
}

.tips p {
  margin: 0;
}

.form,
.upload {
  display: grid;
  gap: 18px;
  max-width: 520px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

button,
.secondary {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
}

button:hover {
  background: var(--green-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--green-dark);
}

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

.messages {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.message {
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.message.error {
  color: var(--error);
}

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

.table-wrap {
  margin-top: 24px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
}

th {
  width: 34%;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 980px);
    padding-top: 18px;
  }

  .topbar,
  .result-head {
    display: grid;
  }

  nav {
    flex-wrap: wrap;
  }

  .panel {
    padding: 22px;
  }
}
