:root {
  --bg: #eaf0f5;
  --card: #ffffff;
  --surface: #f5f7f9;
  --surface-2: #edf2f5;
  --ink: #1d2938;
  --ink-2: #405064;
  --muted: #647589;
  --faint: #8796a7;
  --line: #d6e0e8;
  --line-2: #e6ecf1;
  --accent: #182638;
  --accent-2: #263548;
  --accent-bg: #e8edf2;
  --teal: #267d82;
  --teal-bg: #e4f3f4;
  --warn: #9f5c12;
  --warn-bg: #fff3e5;
  --up: #c9474e;
  --up-bg: #fff0f1;
  --down: #1f7a67;
  --down-bg: #e9f6f2;
  --power-ac: #207b68;
  --power-ac-bg: #e9f6f2;
  --power-dc: #5271a8;
  --power-dc-bg: #e8eef8;
  --power-rack: #9f5c12;
  --power-rack-bg: #fff3e5;
  --power-chip: #b05263;
  --power-chip-bg: #faedf0;
  --shadow: 0 1px 2px rgba(25, 43, 62, .025);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body.home-page,
body.power-page,
body.library-page,
body.settings-page,
body.test-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  transition: top .16s ease;
}
.skip-link:focus { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }

/* ── 三页共用主导航 ── */
.side {
  width: 176px;
  height: 100vh;
  flex: none;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 17px 11px;
  background: #eef3f7;
  border-right: 1px solid #d7e0e8;
}
.side .brand {
  padding: 2px 8px 16px;
  border-bottom: 1px solid #d8e1e9;
}
.side .brand .logo { display: flex; align-items: center; gap: 10px; }
.side .brand .dot {
  position: relative;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  background: var(--accent);
  box-shadow: none;
}
.side .brand .dot::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 14px;
  height: 14px;
  opacity: .9;
  background:
    linear-gradient(90deg,
      #fff 0 14%, transparent 14% 31%,
      #fff 31% 55%, transparent 55% 72%,
      #fff 72% 100%);
  clip-path: polygon(0 42%, 14% 42%, 14% 100%, 0 100%,
    31% 16%, 55% 16%, 55% 100%, 31% 100%,
    72% 0, 100% 0, 100% 100%, 72% 100%);
}
.side .brand b {
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .35px;
}
.side .brand .sub {
  margin: 5px 0 0 38px;
  color: #8d9aac;
  font-size: 9px;
  letter-spacing: .35px;
}
.side .nav { padding: 13px 0; flex: 1; }
.side .nav .item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  margin: 1px 0;
  padding: 8px 10px;
  border-radius: 6px;
  color: #67768a;
  font-size: 13px;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.side .nav .item:hover { color: var(--accent); background: #e4eaf0; }
.side .nav .item.on {
  color: var(--accent);
  background: #fff;
  box-shadow: inset 2px 0 var(--accent);
  font-weight: 700;
}
.nav-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side .nav .item:focus-visible {
  outline: 2px solid #6d879f;
  outline-offset: 2px;
}

/* ── 统一页面壳与标题 ── */
.main {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  margin: 0 auto;
  padding: 24px 28px 56px;
}
.crumb {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 13px;
}
.crumb .path,
.power-page .breadcrumb {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}
.main > h1 {
  max-width: 980px;
  margin: 0 0 7px;
  color: var(--accent);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.lede,
.power-page .subtitle {
  max-width: 900px;
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.legend,
.power-page .legend {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 12.5px;
}
.legend span,
.power-page .legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.arrowline {
  width: 22px;
  border-top-width: 2px;
}

/* ── 首页数据流 ── */
.home-page .band {
  padding: 14px 16px;
  gap: 20px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.home-page .band .head { width: 220px; }
.home-page .band .no {
  margin-bottom: 3px;
  font-size: 11.5px;
  letter-spacing: .03em;
}
.home-page .band h3 {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 720;
}
.home-page .band .head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.home-page .node {
  min-width: 104px;
  padding: 8px 12px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
}
.home-page .node b { color: #273547; font-size: 14px; }
.home-page .node i { color: var(--muted); font-size: 11.5px; }
.home-page .vlink {
  height: 22px;
  color: #9ca7b5;
  font-size: 14px;
  line-height: 22px;
}
.home-page .bd-blue { border-left-color: var(--power-dc); }
.home-page .bd-blue .node { border-color: #cdd8e7; background: #fbfcfe; }
.home-page .bd-blue .no,
.home-page .bd-blue .ar { color: var(--power-dc); }
.home-page .bd-orange { border-left-color: var(--power-rack); }
.home-page .bd-orange .node { border-color: #ead7bd; background: #fffdf9; }
.home-page .bd-orange .no,
.home-page .bd-orange .ar { color: var(--power-rack); }
.home-page .bd-green { border-left-color: var(--power-ac); }
.home-page .bd-green .node { border-color: #c6dfd8; background: #fbfefd; }
.home-page .bd-green .no,
.home-page .bd-green .ar { color: var(--power-ac); }
.home-page .bd-pink { border-left-color: var(--power-chip); }
.home-page .bd-pink .node { border-color: #e8cbd2; background: #fffafb; }
.home-page .bd-pink .no,
.home-page .bd-pink .ar { color: var(--power-chip); }
.home-page .bd-purple { border-left-color: #6f6f9b; }
.home-page .bd-purple .node { border-color: #d6d6e5; background: #fcfcfe; }
.home-page .bd-purple .no,
.home-page .bd-purple .ar { color: #6f6f9b; }
.home-page .grid4 {
  gap: 10px;
  margin-top: 18px;
}
.home-page .card,
.home-page .morph {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.home-page .card { padding: 13px 15px; }
.home-page .card h3,
.home-page .morph h3 {
  color: var(--accent);
  font-size: 14px;
  font-weight: 720;
}
.home-page .card ul,
.home-page .card ol {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.9;
}
.home-page .morph { margin-top: 10px; padding: 14px 15px; }
.home-page .morph h3 { margin: 0 0 10px; }
.home-page .chip {
  padding: 6px 10px;
  border-color: var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
}
.home-page .chips .a { color: var(--accent); font-size: 13.5px; }

/* ── 电力页 ── */
.power-page .main > .breadcrumb { min-height: 24px; margin-bottom: 13px; }
.power-page .scheme-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 28px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.power-page .scheme-tag {
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--accent) !important;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.power-page .scheme-title {
  color: var(--accent);
  font-size: 18px;
  font-weight: 740;
}
.power-page .scheme-note {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.power-page .stage {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.power-page .stage-info { width: 230px; }
.power-page .stage-num {
  margin-bottom: 3px;
  font-size: 11.5px;
  letter-spacing: .03em;
}
.power-page .stage-title {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 720;
}
.power-page .stage-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.power-page .flow { gap: 8px; padding-top: 0; }
.power-page .node {
  min-width: 108px;
  padding: 8px 12px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
}
.power-page .node b { color: #273547; font-size: 14px; }
.power-page .node small { color: var(--muted); font-size: 11.5px; }
.power-page .fa { font-size: 13px; }
.power-page .down {
  margin: 0;
  height: 22px;
  color: #9ca7b5;
  font-size: 14px;
  line-height: 22px;
}
.power-page .green { border-left-color: var(--power-ac); }
.power-page .green .stage-num,
.power-page .green .fa { color: var(--power-ac); }
.power-page .green .node { border-color: #c6dfd8; background: #fbfefd; }
.power-page .blue { border-left-color: var(--power-dc); }
.power-page .blue .stage-num,
.power-page .blue .fa { color: var(--power-dc); }
.power-page .blue .node { border-color: #cdd8e7; background: #fbfcfe; }
.power-page .orange { border-left-color: var(--power-rack); }
.power-page .orange .stage-num,
.power-page .orange .fa { color: var(--power-rack); }
.power-page .orange .node { border-color: #ead7bd; background: #fffdf9; }
.power-page .red { border-left-color: var(--power-chip); }
.power-page .red .stage-num,
.power-page .red .fa { color: var(--power-chip); }
.power-page .red .node { border-color: #e8cbd2; background: #fffafb; }
.power-page .highlight {
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid #e6d4b8;
  border-left: 3px solid var(--warn);
  border-radius: 7px;
  background: #fffaf2;
  color: #7b5a2f;
  font-size: 13px;
  line-height: 1.7;
}
.power-page .compare {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.power-page .compare h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 15px;
}
.power-page .compare table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.power-page .compare th,
.power-page .compare td {
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  line-height: 1.65;
}
.power-page .compare th {
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
}
.power-page .compare tr:last-child td { border-bottom: 0; }

@media (max-width: 980px) {
  .main { padding-inline: 18px; }
  .power-page .scheme-header { grid-template-columns: auto 1fr; }
  .power-page .scheme-note { grid-column: 2; text-align: left; }
  .power-page .stage { align-items: flex-start; }
  .power-page .stage-info { width: 190px; }
}

@media (max-width: 760px) {
  body.home-page,
  body.power-page,
  body.library-page,
  body.settings-page,
  body.test-page { flex-direction: column; }
  .side {
    width: 100%;
    height: auto;
    position: sticky;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 7px 9px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .side .brand {
    padding: 0 8px 0 0;
    border: 0;
  }
  .side .brand .logo { gap: 7px; }
  .side .brand .dot { width: 24px; height: 24px; border-radius: 6px; }
  .side .brand .dot::before { left: 6px; top: 6px; width: 12px; height: 12px; }
  .side .brand .sub { display: none; }
  .side .nav {
    display: flex;
    min-width: 0;
    margin-left: auto;
    padding: 0;
    overflow-x: auto;
  }
  .side .nav .item {
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    white-space: nowrap;
  }
  .side .nav .item.on { box-shadow: inset 0 -2px var(--accent); }
  .main { padding: 15px 10px 36px; }
  .main > h1 { font-size: 21px; }
  .home-page .band,
  .power-page .stage {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .home-page .band .head,
  .power-page .stage-info { width: auto; }
  .home-page .node,
  .power-page .node { flex: 1 1 118px; }
  .power-page .scheme-header { grid-template-columns: auto 1fr; }
  .power-page .scheme-note { grid-column: 1 / -1; }
  .power-page .compare { overflow-x: auto; }
  .power-page .compare table { min-width: 620px; }
}

@media (max-width: 440px) {
  .side .brand b { display: none; }
  .side .nav .item { gap: 6px; padding-inline: 8px; font-size: 11px; }
  .nav-icon { width: 15px; height: 15px; }
  .home-page .nodes,
  .power-page .flow { align-items: stretch; }
  .home-page .ar,
  .power-page .fa { align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* 站点版本角标(每页右上) */
.site-ver{position:fixed;top:9px;right:13px;z-index:80;padding:2px 8px;border:1px solid #d6e0e8;
border-radius:6px;background:#fff;color:#647589;font-size:9.5px;font-variant-numeric:tabular-nums}
