:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --ink: #18202a;
  --muted: #667085;
  --line: #d9dee7;
  --panel: #ffffff;
  --good: #0f7a4f;
  --warn: #a15c00;
  --bad: #a92d2d;
  --accent: #2454c6;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  font-size: 16px;
}

#subtitle,
.panel-head span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
}

button:first-child {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

main {
  padding: 22px 28px 36px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 14px 16px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 16px;
}

.wide {
  grid-column: span 2;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
  font-size: 12px;
}

.tag.good {
  background: #e9f7ef;
  color: var(--good);
}

.tag.warn {
  background: #fff3df;
  color: var(--warn);
}

.tag.bad {
  background: #ffecec;
  color: var(--bad);
}

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

.depth-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.decision {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .wide {
    grid-column: span 1;
  }
}
