:root {
  color-scheme: light;
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #172033;
  --muted: #58677d;
  --line: #d8e2f0;
  --blue-line: #c8d8f5;
  --green: #16a34a;
  --blue: #2563eb;
  --orange: #d97706;
  --purple: #7c3aed;
  --red: #c2410c;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -160px, rgba(37, 99, 235, 0.1), transparent 380px),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 42%, #f1f5f9 100%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

button {
  font: inherit;
}

.page {
  width: min(100% - 32px, 1600px);
  margin: 0 auto;
  padding: 28px 0 34px;
}

.radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 1576px);
  margin: 0 auto 18px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.update-pill {
  border-radius: 999px;
  background: linear-gradient(180deg, #eef4ff, #e9eef6);
  color: #52637b;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 800;
}

.radar-head p {
  margin: 8px 0 0;
  color: #40516b;
  font-size: 15px;
  font-weight: 700;
}

.radar-shell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 20px;
  box-shadow: var(--shadow);
}

.score-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.score-card {
  min-height: 96px;
  border: 1px solid var(--blue-line);
  border-radius: 9px;
  padding: 13px 16px;
  background: #f5f8ff;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.score-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
}

.score-card span {
  display: block;
  color: #53657f;
  font-weight: 900;
  font-size: 15px;
}

.score-card strong {
  display: block;
  margin-top: 6px;
  font-size: 47px;
  line-height: 1;
  letter-spacing: 0;
}

.score-card.green strong {
  color: var(--green);
}

.score-card.blue strong {
  color: var(--blue);
}

.score-card.orange {
  border-color: #f5c48a;
  background: #fff7ed;
}

.score-card.orange strong {
  color: var(--orange);
}

.score-card.purple {
  border-color: #d8c2ff;
  background: #f7f1ff;
}

.score-card.purple strong {
  color: var(--purple);
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.line-chart-wrap {
  overflow-x: auto;
  border: 2px solid #edf0f5;
  border-radius: 26px;
  background: #fff;
  padding: 18px 18px 4px;
}

.line-chart-wrap svg {
  display: block;
  min-width: 0;
  width: 100%;
  height: auto;
}

.chart-grid line {
  stroke: #e4e8ef;
  stroke-width: 2;
}

.chart-grid text,
.chart-labels text {
  fill: #8a96a8;
  font-size: 18px;
  font-weight: 800;
}

.zone-label {
  fill: #7fa0e6;
  font-size: 16px;
  font-weight: 900;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 22px 140px;
  width: min(1020px, 88%);
  margin: 42px auto 6px;
  border: 2px solid #edf0f5;
  border-radius: 22px;
  padding: 22px 36px;
  background: #fff;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  color: #56647a;
  font-size: 22px;
  font-weight: 900;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0.38;
  padding: 8px 10px;
  transition:
    opacity 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.legend-item.active {
  opacity: 1;
}

.legend-item:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.legend-item i {
  width: 60px;
  height: 5px;
  border-radius: 999px;
}

.below-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 18px;
}

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

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

.section-head h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.task-row {
  min-height: 90px;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  background: #fff;
  padding: 10px;
  transition: transform 140ms ease;
}

.task-row:hover {
  transform: translateY(-1px);
}

.task-row.pass {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.task-row.fail {
  background: #fff7ed;
  border-color: #fed7aa;
}

.status-dot {
  display: inline-grid;
  min-width: 28px;
  height: 23px;
  place-items: center;
  border-radius: 999px;
  margin-bottom: 7px;
  background: rgba(100, 116, 139, 0.09);
  font-size: 11px;
  font-weight: 900;
}

.task-row.pass .status-dot {
  color: var(--green);
}

.task-row.fail .status-dot {
  color: var(--red);
}

.task-title {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-meta {
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid #e5eaf2;
  padding: 13px 12px;
  text-align: left;
  white-space: nowrap;
}

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

th {
  color: #64748b;
  font-size: 12px;
}

td {
  color: var(--ink);
  font-size: 14px;
}

@media (max-width: 980px) {
  .score-cards,
  .below-grid {
    grid-template-columns: 1fr 1fr;
  }

  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1680px);
    padding: 16px 10px 24px;
  }

  .radar-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-cards,
  .below-grid,
  .task-grid,
  .chart-legend {
    grid-template-columns: 1fr;
  }

  .radar-shell,
  .chart-card,
  .panel {
    padding: 12px;
  }

  .chart-legend {
    width: 100%;
    gap: 14px;
    margin-top: 22px;
    padding: 16px;
  }
}
