:root {
  color-scheme: light;

  --bg: #f5f5f7;
  --card: #ffffff;
  --card-2: #fafbff;
  --ink: #00001e;
  --ink-2: #5b6178;
  --ink-3: #9398ab;
  --line: #e8ecf5;
  --line-2: #f2f4f9;
  --hover: #fafbff;
  --theme: #4375ff;
  --theme-deep: #0271e4;
  --theme-bg: #eaf0ff;
  --green: #28a63f;
  --red: #d8213c;
  --radius: 16px;
  --shadow: 0 6px 24px -12px rgba(31, 38, 66, 0.18), 0 1px 2px rgba(31, 38, 66, 0.04);

  /* 导航 / 浮层 */
  --nav-bg: rgba(255, 255, 255, 0.72);
  --nav-border: rgba(255, 255, 255, 0.7);
  --nav-shadow: 0 8px 30px -18px rgba(31, 38, 66, 0.35);
  --tip-bg: rgba(0, 10, 40, 0.9);
  --tip-ink: #ffffff;

  /* 地图 */
  --map-1: #eef1f7;
  --map-2: #dbe6ff;
  --map-3: #b6cbff;
  --map-4: #8aa8ff;
  --map-5: #5b83ff;
  --map-6: #4375ff;
  --map-stroke: #ffffff;
  --map-area: #dfe6f5;
  --map-area-line: #b9c6de;
  --nh-frame: #fbfcff;
  --nh-frame-line: #dfe5f0;
  --bubble-bg: #ffffff;

  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* ---------------- 暗色（深夜）模式 ---------------- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a0d15;
  --card: #131824;
  --card-2: #0f141f;
  --ink: #e9edf7;
  --ink-2: #a4adc4;
  --ink-3: #6b7489;
  --line: #232b3c;
  --line-2: #1a2130;
  --hover: #171e2c;
  --theme: #5b8cff;
  --theme-deep: #8fb0ff;
  --theme-bg: rgba(91, 140, 255, 0.16);
  --green: #3ac26a;
  --red: #ff5d78;
  --shadow: 0 8px 28px -16px rgba(0, 0, 0, 0.75), 0 1px 2px rgba(0, 0, 0, 0.35);

  --nav-bg: rgba(18, 23, 34, 0.72);
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-shadow: 0 10px 34px -18px rgba(0, 0, 0, 0.9);
  --tip-bg: rgba(35, 43, 60, 0.94);
  --tip-ink: #eef2fb;

  --map-1: #1b2333;
  --map-2: #22304b;
  --map-3: #2c446c;
  --map-4: #3a5a94;
  --map-5: #4f7ad0;
  --map-6: #6c9aff;
  --map-stroke: #131824;
  --map-area: #1d2536;
  --map-area-line: #2b3549;
  --nh-frame: #0f141f;
  --nh-frame-line: #242c3d;
  --bubble-bg: #0a0d15;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "PingFangSC-Regular", -apple-system, "Helvetica Neue",
    Helvetica, "Microsoft YaHei", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.62;
}

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

/* ---------------- 导航 ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  padding: 12px 0;
  z-index: 50;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  max-width: calc(100vw - 20px);
  display: flex;
  align-items: center;
  gap: 2px;
  height: 52px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background-color .35s ease, border-color .35s ease;
}
.brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding-right: 12px;
  margin-right: 6px;
  border-right: 1px solid var(--line);
  font-weight: 600;
  letter-spacing: .2px;
}
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: linear-gradient(215deg, #4584ff 0%, #cf0db9 120%);
  box-shadow: 0 4px 10px -4px rgba(67, 117, 255, .7);
}
.nav a.link {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  transition: all .22s ease;
  white-space: nowrap;
}
.nav a.link:hover { color: var(--theme-deep); background: var(--theme-bg); }
.nav a.link.active { color: #fff; background: var(--theme); box-shadow: 0 6px 14px -6px rgba(67,117,255,.65); }

/* ---------------- 明暗切换 ---------------- */
.theme-btn {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 28px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px -4px rgba(31, 38, 66, .28);
  transition: background-color .22s ease, border-color .22s ease, color .22s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.theme-btn:hover { background: var(--theme-bg); border-color: transparent; color: var(--theme-deep); }
.theme-btn:active { transform: scale(.94); }
.theme-btn:focus-visible { outline: 2px solid var(--theme); outline-offset: 2px; }
.theme-btn svg { width: 17px; height: 17px; display: block; }
.theme-btn .half { fill: currentColor; }
.theme-btn .ring { fill: none; stroke: currentColor; stroke-width: 1.7; }
/* 自动模式：右上角小圆点 */
.theme-btn[data-mode="auto"]::after {
  content: "";
  position: absolute;
  top: 4px; right: 6px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--theme);
}

/* ---------------- 布局 ---------------- */
.wrap {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 96px 0 64px;
}
.page-head { margin-bottom: 22px; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--theme);
  font-weight: 600;
  margin-bottom: 8px;
}
h1 {
  font-size: 30px;
  line-height: 1.3;
  margin: 0 0 8px;
  letter-spacing: -.5px;
  font-weight: 600;
}
.sub { color: var(--ink-2); font-size: 14px; max-width: 760px; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px 22px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat .k { font-size: 12px; color: var(--ink-3); letter-spacing: .5px; }
.stat .v {
  font-size: 26px; font-weight: 600; letter-spacing: -.5px;
  font-family: var(--mono); margin-top: 4px;
}
.stat .v small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }

/* ---------------- 地图 ---------------- */
.map-card { padding: 14px; overflow: hidden; }
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 14px;
}
@media (max-width: 900px) { .map-grid { grid-template-columns: 1fr; } }

#map { width: 100%; height: auto; display: block; }
#map .prov {
  fill: var(--map-1);
  stroke: var(--map-stroke);
  stroke-width: .9;
  transition: fill .18s ease, opacity .18s ease;
  cursor: default;
}
#map .prov.lv0 { fill: var(--map-1); }
#map .prov.lv1 { fill: var(--map-2); }
#map .prov.lv2 { fill: var(--map-3); }
#map .prov.lv3 { fill: var(--map-4); }
#map .prov.lv4 { fill: var(--map-5); }
#map .prov.lv5 { fill: var(--map-6); }
#map .nh-area { fill: var(--map-area); stroke: var(--map-area-line); stroke-width: .6; }
#map .prov.has { cursor: pointer; }
#map .prov.has:hover { fill: var(--theme-deep) !important; }
#map .prov.dim { opacity: .45; }
#map .bubble { fill: var(--bubble-bg); stroke: var(--theme-deep); stroke-width: 2; pointer-events: none; }
#map .bubble-label {
  font-size: 11px; fill: var(--ink); font-weight: 600; pointer-events: none;
  font-family: var(--mono);
}
#map .nh-frame { fill: var(--nh-frame); stroke: var(--nh-frame-line); stroke-width: 1; }
#map .nh-text { font-size: 10px; fill: var(--ink-3); }

.map-side { display: flex; flex-direction: column; min-height: 0; }
.map-side h3 {
  font-size: 13px; margin: 2px 0 10px; color: var(--ink-2); font-weight: 600;
}
.prov-list { overflow: auto; flex: 1; margin: 0 -6px; padding: 0 6px; }
.prov-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 9px; cursor: pointer;
  transition: background .16s ease;
}
.prov-row:hover { background: var(--theme-bg); }
.prov-row .nm { width: 54px; font-size: 13px; }
.prov-row .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--map-1); overflow: hidden; }
.prov-row .bar i { display: block; height: 100%; border-radius: 99px; background: var(--theme); }
.prov-row .ct { font-size: 12px; color: var(--ink-2); font-family: var(--mono); width: 22px; text-align: right; }

.tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--tip-bg);
  color: var(--tip-ink);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 99;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}
.tooltip.show { opacity: 1; }

/* ---------------- 表格 ---------------- */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 20px; }
.tbl th.l, .tbl td.l { text-align: left; }
.tbl th:hover { color: var(--theme); }
.tbl th.on { color: var(--theme); font-weight: 600; }
.tbl td {
  padding: 13px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.tbl td.l { font-family: inherit; }
.tbl tbody tr { cursor: pointer; transition: background .14s ease; }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tbody tr:last-child td { border-bottom: none; }
.asset-name { font-weight: 500; font-size: 14px; }
.asset-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.pill {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  background: var(--theme-bg); color: var(--theme-deep);
  font-size: 11px; font-family: inherit;
}

/* ---------------- 图表 ---------------- */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 820px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-box { padding: 18px 18px 10px; }
.chart-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.chart-title b { font-size: 13px; font-weight: 600; }
.chart-title span { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.axis-line { stroke: var(--line); stroke-width: 1; }
.axis-text { font-size: 10px; fill: var(--ink-3); font-family: var(--mono); }
.series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.series-area { opacity: .10; }
.dot { stroke: var(--card); stroke-width: 1.6; }

/* ---------------- 列表 / 卡片 ---------------- */
.prov-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px) { .prov-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .prov-cards { grid-template-columns: 1fr; } }
.prov-card { padding: 18px 20px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.prov-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -16px rgba(31,38,66,.28); }
.prov-card .top { display: flex; align-items: baseline; justify-content: space-between; }
.prov-card .nm { font-size: 17px; font-weight: 600; }
.prov-card .ct { font-size: 12px; color: var(--ink-3); }
.prov-card .row2 {
  display: flex; gap: 18px; margin-top: 12px;
  font-family: var(--mono); font-size: 13px;
}
.prov-card .row2 i { font-style: normal; color: var(--ink-3); font-family: inherit; font-size: 12px; }

.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.search {
  flex: 1; min-width: 200px;
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 13px;
  box-shadow: var(--shadow);
}
.search input {
  border: none; outline: none; flex: 1; font-size: 14px;
  background: transparent; color: var(--ink); font-family: inherit;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 9px; font-size: 13px;
  background: var(--card); border: 1px solid var(--line);
  cursor: pointer; color: var(--ink-2); transition: all .16s ease;
}
.chip:hover { color: var(--theme); border-color: var(--theme-bg); }
.chip.on { background: var(--theme); color: #fff; border-color: var(--theme); }

.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.crumb a:hover { color: var(--theme); }

.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .kv { grid-template-columns: repeat(2, 1fr); } }
.kv .item { padding: 14px 16px; background: var(--card-2); border-radius: 12px; }
.kv .item .k { font-size: 12px; color: var(--ink-3); }
.kv .item .v { font-size: 19px; font-weight: 600; font-family: var(--mono); margin-top: 2px; }
.kv .item .v small { font-size: 12px; color: var(--ink-3); font-weight: 400; }

.up { color: var(--red); }
.down { color: var(--green); }

.foot {
  margin-top: 40px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3); line-height: 1.9;
}
/* 页脚版权：与页脚正文同字号同色，左对齐 */
.foot .copy {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-3);
  text-align: left;
  letter-spacing: .2px;
  white-space: normal;
  word-break: keep-all;
}
.foot .copy .copy-yr { font-variant-numeric: tabular-nums; }
.foot .copy .copy-ver {
  margin-left: 3px;
  font-family: var(--mono);
  font-size: 11px;
  opacity: .8;
  letter-spacing: 0;
}
.empty { padding: 48px; text-align: center; color: var(--ink-3); }


/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .map-side { max-height: 320px; }
}
@media (max-width: 620px) {
  html, body { overflow-x: hidden; }
  .wrap { width: 94%; padding-top: 82px; }
  h1 { font-size: 21px; letter-spacing: -.2px; }
  .sub { font-size: 13px; }
  .nav-inner { height: 46px; padding: 0 8px; gap: 0; }
  .brand { padding-right: 8px; margin-right: 2px; }
  .brand span:not(.brand-mark) { display: none; }
  .nav a.link { padding: 7px 11px; font-size: 13px; }
  .stat { padding: 13px 14px; }
  .stat .v { font-size: 21px; }
  .card-pad { padding: 16px; }
  .map-card { padding: 8px; }
  .tbl th, .tbl td { padding: 10px 8px; font-size: 12px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 12px; }
  .prov-row .nm { width: 46px; }
  .tbl { min-width: 720px; }
  .tbl td, .tbl th { white-space: nowrap; }
  .tbl .asset-name, .tbl .asset-sub { white-space: normal; }
  .card { -webkit-overflow-scrolling: touch; }
}


/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .map-side { max-height: 320px; }
}
@media (max-width: 620px) {
  html, body { overflow-x: hidden; }
  .wrap { width: 94%; padding-top: 82px; }
  h1 { font-size: 21px; letter-spacing: -.2px; }
  .sub { font-size: 13px; }
  .nav-inner { height: 46px; padding: 0 8px; gap: 0; }
  .brand { padding-right: 8px; margin-right: 2px; }
  .brand span:not(.brand-mark) { display: none; }
  .nav a.link { padding: 7px 11px; font-size: 13px; }
  .stat { padding: 13px 14px; }
  .stat .v { font-size: 21px; }
  .card-pad { padding: 16px; }
  .map-card { padding: 8px; }
  .tbl th, .tbl td { padding: 10px 8px; font-size: 12px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 12px; }
  .prov-row .nm { width: 46px; }
  .tbl { min-width: 720px; }
  .tbl td, .tbl th { white-space: nowrap; }
  .tbl .asset-name, .tbl .asset-sub { white-space: normal; }
  .card { -webkit-overflow-scrolling: touch; }
}


/* ---------------- 主题切换过渡 ----------------
   仅在首帧后（html.theme-anim）启用，避免首屏加载时颜色被补间 */
html.theme-anim body,
html.theme-anim .card,
html.theme-anim .stat,
html.theme-anim .search,
html.theme-anim .chip,
html.theme-anim .kv .item,
html.theme-anim .tbl td,
html.theme-anim .tbl th,
html.theme-anim .prov-row .bar,
html.theme-anim .map-card,
html.theme-anim .chart-box {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}
@media (prefers-reduced-motion: reduce) {
  html.theme-anim body,
  html.theme-anim .card,
  html.theme-anim .stat,
  html.theme-anim .search,
  html.theme-anim .chip,
  html.theme-anim .kv .item,
  html.theme-anim .tbl td,
  html.theme-anim .tbl th,
  html.theme-anim .prov-row .bar,
  html.theme-anim .map-card,
  html.theme-anim .chart-box { transition: none; }
}

/* ---------------- 小屏：收紧切换按钮 ---------------- */
@media (max-width: 620px) {
  .theme-btn { width: 42px; height: 25px; margin-left: 5px; }
  .theme-btn svg { width: 15px; height: 15px; }
  .theme-btn[data-mode="auto"]::after { top: 3px; right: 5px; width: 3.5px; height: 3.5px; }
}
