:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #657180;
  --line: #d8dee6;
  --soft: #eef2f6;
  --accent: #176b5d;
  --accent-dark: #0f5146;
  --ok: #197044;
  --ok-bg: #e8f6ef;
  --bad: #b42318;
  --bad-bg: #fff0ed;
  --warn: #985f0d;
  --warn-bg: #fff7e6;
  --shadow: 0 12px 28px rgba(29, 39, 52, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

h2 {
  font-size: 22px;
}

h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

p,
.hint {
  color: var(--muted);
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  padding: 40px 8vw 22px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

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

.subtitle {
  max-width: 680px;
  margin-top: 12px;
  line-height: 1.7;
}

.hero-card {
  display: grid;
  gap: 12px;
  min-width: 240px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-stat {
  display: grid;
  gap: 4px;
}

.hero-stat span {
  color: var(--muted);
  font-size: 12px;
}

.hero-stat strong {
  font-size: 18px;
}

.container {
  display: grid;
  gap: 20px;
  padding: 24px 8vw 72px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card-header {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.inline {
  display: flex;
  gap: 10px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

input[type="text"],
input[type="number"],
input:not([type]) {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
}

input[type="file"] {
  width: 100%;
  padding: 12px;
  background: #ffffff;
  border: 1px dashed #aeb8c5;
  border-radius: var(--radius);
}

select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
}

button {
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(23, 107, 93, 0.18);
}

button.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

button.secondary {
  background: #e8eef3;
  color: var(--ink);
}

button.ghost {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.wide {
  width: 100%;
}

.hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
}

.info-panel {
  min-height: 160px;
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info-empty {
  color: var(--muted);
  font-size: 13px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px 16px;
  align-items: center;
}

.profile-grid span {
  color: var(--muted);
  font-size: 13px;
}

.profile-grid strong {
  font-size: 14px;
}

.text-ok {
  color: var(--ok);
}

.text-bad {
  color: var(--bad);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.alert {
  display: none;
  margin-top: 14px;
  padding: 12px;
  background: var(--warn-bg);
  border: 1px solid #f1d08a;
  border-radius: var(--radius);
  color: var(--warn);
  font-size: 13px;
  line-height: 1.5;
}

.alert.show {
  display: block;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  min-height: 30px;
  padding: 6px 10px;
  background: #eef2f6;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
}

.upload-panel,
.rule-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rule-panel {
  margin-top: 14px;
}

.check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule-list span {
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

.verdict {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: var(--radius);
}

.verdict span {
  font-size: 12px;
  font-weight: 700;
}

.verdict strong {
  font-size: 20px;
}

.verdict-pass {
  background: var(--ok-bg);
  border: 1px solid #9bd2b6;
  color: var(--ok);
}

.verdict-fail {
  background: var(--bad-bg);
  border: 1px solid #f0aaa2;
  color: var(--bad);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.check-item {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #ffffff;
}

.check-item span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.check-item strong {
  font-size: 14px;
}

.check-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.4;
}

.check-item.pass span {
  background: var(--ok-bg);
  color: var(--ok);
}

.check-item.fail span {
  background: var(--bad-bg);
  color: var(--bad);
}

.result {
  display: grid;
  gap: 14px;
}

.result-card {
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-card h3 {
  margin-bottom: 10px;
}

.result-card p,
.result-card li {
  color: var(--muted);
  line-height: 1.7;
}

.result-status {
  font-size: 24px;
  font-weight: 800;
}

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

.status-reject {
  color: var(--bad);
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .hero,
  .container {
    padding-left: 5vw;
    padding-right: 5vw;
  }

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

  .inline,
  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
