/* 研究分析端 · 创而不代 */
:root {
  --paper: #FFF7EC;
  --paper-deep: #FDEEDC;
  --surface: #FFFFFF;
  --ink: #22376B;
  --ink-soft: #5C6B94;
  --line: #EADDC8;
  --sun: #FFC531;
  --sun-soft: #FFE9A8;
  --coral: #FF7E9D;
  --coral-soft: #FFD6E2;
  --sky: #4EA8DE;
  --sky-soft: #CFE9F8;
  --leaf: #4CB782;
  --leaf-soft: #D8F0E2;
  --radius-md: 16px;
  --font: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 2.5px solid var(--ink);
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 42px; width: auto; border-radius: 9px; }
.topbar-title { font-weight: 900; font-size: 19px; }
.chip {
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--sun-soft);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
}
.topbar-links { display: flex; gap: 6px; margin-left: auto; }
.topbar-links a {
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
}
.topbar-links a:hover { background: var(--sun-soft); color: var(--ink); }

.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid var(--ink);
  transition: transform 0.16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: var(--sun); }

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 统计卡 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  padding: 20px 22px;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 4px 5px 0 var(--paper-deep);
}
.stat:nth-child(1) { box-shadow: 4px 5px 0 var(--sun-soft); }
.stat:nth-child(2) { box-shadow: 4px 5px 0 var(--sky-soft); }
.stat:nth-child(3) { box-shadow: 4px 5px 0 var(--coral-soft); }
.stat:nth-child(4) { box-shadow: 4px 5px 0 var(--leaf-soft); }
.stat b {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.2;
}
.stat span { font-size: 13.5px; color: var(--ink-soft); font-weight: 700; }

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

.card {
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 5px 6px 0 var(--paper-deep);
}
.card-title { margin: 0 0 18px; font-size: 17px; font-weight: 900; }

/* 柱状图 */
.chart { padding: 6px 0 0; }
.group {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 22px;
  height: 170px;
  padding: 0 12px;
}
.col {
  flex: 1;
  max-width: 72px;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 10px 10px 0 0;
  position: relative;
  transform-origin: bottom;
  animation: growBar 0.9s cubic-bezier(0.34, 1.3, 0.64, 1) backwards;
}
.col.c-b { background: var(--sky); animation-delay: 0.15s; }
.col.c-c { background: var(--leaf); animation-delay: 0.3s; }
@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.col span {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 900;
}
.chart-labels {
  display: flex;
  justify-content: space-around;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* 折线图 */
.line-chart { width: 100%; height: auto; }
.legend {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.dot.sun { background: var(--sun); }
.dot.sky { background: var(--sky); }
.dot.coral { background: var(--coral); }

/* 数据表 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
}
.data-table td {
  padding: 12px;
  border-bottom: 1.5px dashed var(--line);
  font-weight: 700;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--paper); }

.tag {
  padding: 3px 11px;
  font-size: 12px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.t-a { background: var(--sky-soft); }
.t-b { background: var(--coral-soft); }
.t-c { background: var(--leaf-soft); }

.foot {
  padding: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-top: 1.5px solid var(--line);
}

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar-links { display: none; }
  .data-table { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .col { animation: none; }
}
