:root {
  --ink: #102a3a;
  --muted: #5d7788;
  --faint: #8ba0ad;
  --line: #d9e4ea;
  --panel: #ffffff;
  --bg: #f4f8fa;
  --blue: #126e8a;
  --blue-2: #1c93b5;
  --cyan: #60c7d9;
  --teal: #0e8f7a;
  --amber: #c98a1e;
  --red: #c9564d;
  --shadow: 0 12px 40px rgba(16, 42, 58, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1000px 420px at 88% -8%, rgba(96, 199, 217, 0.12), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1460px; margin: 0 auto; padding: 0 28px; height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--ink); color: #d9f4f8; font-family: Georgia, serif; font-size: 24px;
  border-radius: 10px 10px 10px 3px;
}
.brand b { display: block; font-size: 14px; letter-spacing: 0.03em; }
.brand small { display: block; color: var(--faint); font-family: Consolas, monospace; font-size: 8px; letter-spacing: 0.16em; }
.header-nav { display: flex; gap: 26px; color: var(--muted); font-size: 12px; }
.header-nav a:hover { color: var(--blue); }
.header-meta {
  display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(14, 143, 122, 0.12); }

main { max-width: 1460px; margin: 0 auto; padding: 0 28px 80px; }

.hero {
  display: grid; grid-template-columns: 1.18fr 0.82fr; gap: 54px;
  padding: 64px 0 44px; align-items: center;
}
.eyebrow {
  color: var(--blue); font-family: Consolas, monospace; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(38px, 4.4vw, 62px); line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.04em; }
.hero h1 em { font-style: normal; color: var(--blue); position: relative; }
.hero h1 em::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 4px; height: 9px;
  background: rgba(96, 199, 217, 0.25); z-index: -1;
}
.lede { max-width: 650px; color: var(--muted); font-size: 15px; line-height: 1.9; margin: 0 0 24px; }
.lede strong { color: var(--ink); }
.hero-actions { display: flex; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 11px 18px; border-radius: 8px; cursor: pointer; font-size: 12px;
  transition: 0.18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 42, 58, 0.07); }
.btn.primary { background: var(--ink); color: #e9f6f8; border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 12px; font-size: 11px; }
.hero-note { margin-top: 18px; font-size: 10px; color: var(--faint); }

.hero-panel {
  background: var(--ink); color: #d9eef2; border-radius: 16px; padding: 22px;
  box-shadow: 0 24px 60px rgba(16, 42, 58, 0.18); position: relative; overflow: hidden;
}
.hero-panel::before {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 199, 217, 0.22), transparent 65%);
  right: -120px; top: -130px;
}
.hero-panel-head { display: flex; justify-content: space-between; align-items: center; font-family: Consolas, monospace; font-size: 9px; letter-spacing: 0.14em; color: #8fb6c2; position: relative; }
.live { display: flex; align-items: center; gap: 7px; color: #8fe0cf; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #8fe0cf; }
.snapshot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 26px 0 18px; position: relative; }
.snapshot-grid b { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 400; color: #f2fbfc; line-height: 1.1; }
.snapshot-grid span { font-size: 9px; color: #87aeb9; letter-spacing: 0.08em; }
.mini-chart { height: 110px; position: relative; }
.hero-panel-foot { display: flex; gap: 18px; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 12px; font-size: 9px; color: #8fb6c2; position: relative; }
.hero-panel-foot b { color: #e9f6f8; font-weight: 600; }

.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 40px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; box-shadow: 0 4px 16px rgba(16, 42, 58, 0.035);
}
.kpi-label { font-size: 10px; color: var(--faint); letter-spacing: 0.06em; }
.kpi strong { display: block; font-size: 27px; font-weight: 500; font-family: Georgia, serif; margin: 4px 0 2px; }
.kpi small { font-size: 9px; color: var(--faint); }

.explorer { display: grid; grid-template-columns: 218px minmax(0, 1fr) 310px; gap: 14px; align-items: stretch; }
.station-panel, .chart-panel, .detail-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.station-panel { padding: 16px 12px 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 13px; }
.panel-head span { font-size: 10px; color: var(--faint); font-family: Consolas, monospace; }
.station-list { max-height: 548px; overflow: auto; padding-top: 6px; }
.station-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: transparent; padding: 9px 8px; border-radius: 7px;
  text-align: left; cursor: pointer; color: var(--muted); border-left: 2px solid transparent;
}
.station-item:hover { background: #f0f7f9; color: var(--ink); }
.station-item.active { background: #e9f4f7; color: var(--ink); border-left-color: var(--blue); }
.station-item b { font-size: 11px; font-weight: 600; display: block; }
.station-item small { font-size: 8px; color: var(--faint); display: block; margin-top: 1px; }
.station-item .cnt {
  min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 99px; background: #edf2f5; font-size: 9px; color: var(--muted);
}
.station-item.active .cnt { background: var(--blue); color: #fff; }
.station-foot { border-top: 1px solid var(--line); padding: 10px 4px 0; font-size: 8px; color: var(--faint); display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.legend-dot.high { background: var(--red); }
.legend-dot.mid { background: var(--amber); }
.legend-dot.low { background: var(--faint); }

.chart-panel { padding: 20px 20px 14px; min-width: 0; }
.chart-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.chart-kicker { font-family: Consolas, monospace; font-size: 8px; letter-spacing: 0.14em; color: var(--blue); }
.chart-head h2 { margin: 2px 0 2px; font-size: 24px; letter-spacing: -0.02em; }
.chart-head p { margin: 0; color: var(--faint); font-size: 10px; }
.chart-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--muted); padding: 6px 9px; font-size: 9px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--ink); color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); white-space: nowrap; }
.switch input { width: 13px; height: 13px; accent-color: var(--blue); }
.chart-wrap { position: relative; height: 430px; margin-top: 12px; }
.chart-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 9px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.line { width: 16px; height: 2px; display: inline-block; }
.line.raw { background: var(--blue); }
.line.smooth { background: var(--amber); }
.tri { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; display: inline-block; }
.tri.spike { border-bottom: 7px solid var(--red); }
.tri.shift { border-bottom: 7px solid var(--teal); }
.hint { font-size: 9px; color: var(--faint); }

.detail-panel { padding: 18px; display: flex; flex-direction: column; }
.detail-head { display: flex; align-items: center; justify-content: space-between; }
.detail-kicker { font-family: Consolas, monospace; font-size: 8px; letter-spacing: 0.14em; color: var(--blue); }
.badge { font-size: 8px; padding: 3px 7px; border-radius: 99px; background: #eef3f6; color: var(--muted); }
.badge.confirmed { background: #e4f5ef; color: var(--teal); }
.badge.rejected { background: #fbeceb; color: var(--red); }
.detail-panel h3 { margin: 12px 0 2px; font-size: 19px; letter-spacing: -0.02em; }
.detail-time { margin: 0 0 14px; font-size: 10px; color: var(--faint); font-family: Consolas, monospace; }
.detail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.detail-metrics div { background: #fbfdfe; padding: 8px 10px; }
.detail-metrics span { display: block; font-size: 8px; color: var(--faint); }
.detail-metrics b { font-size: 15px; font-weight: 500; font-family: Georgia, serif; }
.detail-type { margin-top: 12px; font-size: 10px; color: var(--blue); background: #edf7f9; border-radius: 5px; padding: 7px 9px; }
.detail-evidence { font-size: 10px; line-height: 1.75; color: var(--muted); margin: 10px 0; flex: 1; }
.detail-rule { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; border-top: 1px dashed var(--line); padding-top: 9px; font-size: 9px; color: var(--faint); }
.detail-rule b { color: var(--ink); font-family: Consolas, monospace; font-weight: 500; }
.detail-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.action { border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 7px 2px; font-size: 9px; cursor: pointer; color: var(--muted); }
.action.confirm { border-color: rgba(14,143,122,0.3); color: var(--teal); }
.action.reject { border-color: rgba(201,86,77,0.3); color: var(--red); }
.action:hover { background: #f5f9fa; }
.detail-note { margin: 9px 0 0; font-size: 8px; color: var(--faint); line-height: 1.5; }

.events-section, .quality-section, .method-section { margin-top: 52px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 16px; }
.section-head h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.03em; }
.section-head p { margin: 0; color: var(--muted); font-size: 11px; }
.event-tools { display: flex; gap: 8px; align-items: center; }
select { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; padding: 7px 9px; font-size: 10px; }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: auto; box-shadow: 0 6px 24px rgba(16,42,58,0.04); }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { text-align: left; color: var(--faint); font-weight: 500; font-size: 9px; background: #f7fafb; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid #eef3f5; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: #f7fbfc; color: var(--ink); }
td b { color: var(--ink); font-weight: 600; }
.type-pill { display: inline-block; font-size: 8px; padding: 2px 6px; border-radius: 99px; }
.type-pill.spike { background: #fbeceb; color: var(--red); }
.type-pill.level_shift { background: #e5f6f2; color: var(--teal); }
.level { font-size: 8px; padding: 2px 6px; border-radius: 99px; }
.level.高 { background: #fbeceb; color: var(--red); }
.level.中 { background: #fbf2e2; color: var(--amber); }
.level.低 { background: #eef3f5; color: var(--faint); }
.empty { display: none; padding: 24px; text-align: center; color: var(--faint); font-size: 11px; }

.quality-table td:first-child { color: var(--ink); font-weight: 600; }
.quality-table .num { font-family: Consolas, monospace; }
.quality-table .warn { color: var(--red); }

.method-section { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px; box-shadow: var(--shadow); }
.method-copy h2 { margin: 0 0 10px; font-size: 28px; }
.method-copy > p { color: var(--muted); font-size: 12px; line-height: 1.9; max-width: 700px; }
.method-list { padding-left: 18px; margin: 18px 0; color: var(--muted); font-size: 11px; line-height: 2; }
.method-list b { color: var(--ink); }
.callout { border-left: 3px solid var(--amber); background: #fdf8ee; padding: 12px 14px; font-size: 10px; line-height: 1.8; color: #6f5a33; border-radius: 0 6px 6px 0; }
.callout b { color: #4c3c1f; }
.method-side { border-left: 1px solid var(--line); padding-left: 28px; display: flex; flex-direction: column; justify-content: center; }
.formula { background: var(--ink); color: #dff3f6; border-radius: 10px; padding: 18px; }
.formula span { font-family: Consolas, monospace; font-size: 8px; letter-spacing: 0.16em; color: #8fb6c2; }
.formula b { display: block; font-family: Georgia, serif; font-size: 22px; font-weight: 400; margin: 6px 0 3px; }
.formula small { font-size: 9px; color: #8fb6c2; }
.method-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.method-stat div { border: 1px solid var(--line); border-radius: 7px; padding: 9px; }
.method-stat b { display: block; font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.method-stat span { font-size: 8px; color: var(--faint); }
.method-note { font-size: 9px; color: var(--faint); line-height: 1.8; margin: 0; }

.site-footer {
  max-width: 1460px; margin: 0 auto; padding: 24px 28px 40px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px; color: var(--faint); font-size: 9px;
}
.site-footer b { display: block; color: var(--ink); font-size: 11px; margin-bottom: 2px; }
.footer-links { text-align: right; }
.footer-links a { color: var(--blue); margin-right: 14px; }

@media (max-width: 1180px) {
  .explorer { grid-template-columns: 190px minmax(0, 1fr); }
  .detail-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .detail-panel .detail-head, .detail-panel h3, .detail-panel .detail-time, .detail-panel .detail-metrics { grid-column: 1; }
  .detail-panel .detail-type, .detail-panel .detail-evidence, .detail-panel .detail-rule, .detail-panel .detail-actions, .detail-panel .detail-note { grid-column: 2; }
  .detail-panel .detail-type { margin-top: 0; }
  .hero { gap: 30px; }
}
@media (max-width: 860px) {
  .header-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .explorer { grid-template-columns: 1fr; }
  .station-panel { order: 1; }
  .chart-panel { order: 2; }
  .detail-panel { order: 3; }
  .station-list { max-height: 220px; display: grid; grid-template-columns: 1fr 1fr; }
  .chart-tools { justify-content: flex-start; }
  .chart-wrap { height: 340px; }
  .method-section { grid-template-columns: 1fr; padding: 22px; }
  .method-side { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 20px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .event-tools { flex-wrap: wrap; }
}

section[id] { scroll-margin-top: 84px; }
