:root {
  --bg: #f5f8fb;
  --surface: #ffffff;
  --border: #e3eaf2;
  --text: #1b2733;
  --muted: #5f6b7a;
  --faint: #8896a6;
  --body: #41505f;
  --accent: #185fa5;
  --accent-soft: #e8f1fa;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: #f0f4f9;
  color: var(--text);
}

.nav a.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.main {
  padding-bottom: 56px;
}

.hero {
  padding: 44px 0 30px;
  max-width: 780px;
}

.hero-sm {
  padding: 40px 0 22px;
}

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

h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-sm h1 {
  font-size: 27px;
}

.lede {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.kpi-label {
  font-size: 12.5px;
  color: var(--muted);
}

.kpi-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpi-value em {
  margin-left: 3px;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.kpi-foot {
  font-size: 12px;
  color: var(--faint);
}

.split {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.panel {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.split .panel {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

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

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.hint {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}

.map-wrap {
  border-radius: 10px;
  overflow: hidden;
}

.map {
  width: 100%;
  height: 396px;
}

.map-fallback {
  display: none;
  height: 396px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 26px;
  text-align: center;
  background: #eef4fa;
  border: 1px dashed #c7d6e6;
  border-radius: 10px;
  overflow-y: auto;
}

.map-fallback.is-show {
  display: flex;
}

.map-fallback-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.map-fallback-text {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--faint);
}

.route {
  margin: 16px auto 0;
  padding: 0;
  width: 100%;
  max-width: 340px;
  list-style: none;
}

.route li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  text-align: left;
}

.route li + li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -7px;
  height: 14px;
  border-left: 1px dashed #c7d6e6;
}

.route-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.route-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.route-section {
  margin-left: auto;
  font-size: 12px;
  color: var(--faint);
}

.level-dot-c1 {
  background: #2e7d32;
}

.level-dot-c2 {
  background: #185fa5;
}

.level-dot-c3 {
  background: #ba7517;
}

.level-dot-c4 {
  background: #c2410c;
}

.level-dot-c5 {
  background: #a32d2d;
}

.station-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 396px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.station {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.station:hover {
  border-color: #c7d6e6;
  background: #fafcfe;
}

.station.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.station-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.station-name {
  font-size: 14px;
  font-weight: 600;
}

.station-section {
  margin-top: 1px;
  font-size: 12px;
  color: var(--faint);
}

.station-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0 0;
}

.station-metrics dt {
  margin: 0;
  font-size: 11px;
  color: var(--faint);
}

.station-metrics dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.level-c1 {
  background: #e7f4ea;
  color: #2e7d32;
}

.level-c2 {
  background: #e8f1fa;
  color: #185fa5;
}

.level-c3 {
  background: #fdf3e3;
  color: #ba7517;
}

.level-c4 {
  background: #fcebe5;
  color: #c2410c;
}

.level-c5 {
  background: #fbe9e9;
  color: #a32d2d;
}

.kpi-value.level-text {
  font-size: 26px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.tab {
  padding: 7px 15px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.on {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}

.chart {
  width: 100%;
  height: 340px;
}

.chart-sm {
  width: 100%;
  height: 280px;
}

.chart-error {
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

.metric-note p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--body);
}

.metric-note p:last-child {
  margin-bottom: 0;
}

.note-mark {
  font-size: 13px !important;
  color: var(--faint) !important;
}

.insight h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.insight p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--body);
}

.insight strong {
  color: var(--text);
}

.prose h2 {
  margin: 30px 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--body);
}

.prose ul {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--body);
}

.prose li {
  margin-bottom: 4px;
}

.prose strong {
  color: var(--text);
}

code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef4fa;
  color: var(--accent);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}

.table {
  width: 100%;
  margin: 8px 0 16px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: #f4f8fc;
  color: var(--body);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.table td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef2f7;
  color: var(--body);
  vertical-align: top;
}

.table td:first-child {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

.foot {
  margin-top: 10px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--border);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--faint);
}

@media (max-width: 900px) {
  h1 {
    font-size: 26px;
  }

  .hero-sm h1 {
    font-size: 22px;
  }

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

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

  .station-list {
    max-height: none;
  }

  .main {
    padding-bottom: 40px;
  }
}
