/* ── 变量：全文只用黑色 ───────────────────────────── */
:root {
  --ink: #111;
  --sub: #111;
  --line: #e0ded6;
  --bg: #fbfaf6;
  --card: #fff;
  --accent: #111;
  --soft: #f4f2ec;
  --err: #b23a3a;

  --fs-body: clamp(18.5px, 13px + 1.05vw, 24px);
  --fs-h1: clamp(27px, 15px + 2.2vw, 42px);
  --fs-h2: clamp(20px, 15px + 0.9vw, 27px);
  --fs-sm: clamp(13px, 11px + 0.35vw, 16px);
  --fs-xs: clamp(12px, 10.5px + 0.3vw, 14px);
  --fs-table: clamp(13px, 0.74em, 15px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.95;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sc {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
}
body.hk {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "Hiragino Sans HK",
    "Noto Sans HK", "Source Han Sans HK", "Microsoft JhengHei", "PMingLiU", sans-serif;
  letter-spacing: 0.3px;
}

main, .page {
  width: min(96vw, 1040px);
  margin: 0 auto;
  padding: 30px clamp(16px, 3vw, 44px) 80px;
}

.boot {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a877d;
  font-size: var(--fs-sm);
}

/* ── 密码门 ─────────────────────────────────────── */
.lock {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(94vw, 480px);
  margin: 0 auto;
  padding: 40px 0 60px;
}

.lock-mark {
  width: 34px;
  height: 34px;
  border: 1.6px solid var(--ink);
  position: relative;
  margin-bottom: clamp(22px, 3vh, 34px);
}
.lock-mark::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 10px;
  height: 1.6px;
  background: var(--ink);
  box-shadow: 0 6px 0 var(--ink);
}
.lock-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  width: 9px;
  height: 1.6px;
  background: var(--ink);
}

.lock-kicker {
  font-size: var(--fs-xs);
  letter-spacing: 0.32em;
  color: #8a877d;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.lock h1 {
  font-size: clamp(24px, 16px + 1.6vw, 34px);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.lock-sub {
  color: #6d6a61;
  font-size: var(--fs-sm);
  line-height: 1.8;
  margin: 0 0 clamp(22px, 3vh, 30px);
}

.langs {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}
.lang-btn {
  flex: 1;
  border: 1px solid var(--line);
  background: transparent;
  color: #6d6a61;
  font-family: inherit;
  font-size: var(--fs-sm);
  padding: 10px 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.05em;
}
.lang-btn.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.lock h1 + .pin { margin-top: clamp(20px, 3vh, 30px); }

.pin {
  width: 100%;
  border: none;
  border-bottom: 1.6px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(26px, 20px + 1.4vw, 34px);
  letter-spacing: 0.42em;
  text-align: center;
  padding: 10px 0 12px 0.42em;
  outline: none;
  transition: border-color 0.18s;
  font-variant-numeric: tabular-nums;
}
.pin:focus { border-color: var(--ink); }
.pin::placeholder {
  color: #c4c0b4;
  letter-spacing: 0.05em;
  font-size: var(--fs-sm);
  font-weight: 400;
}

.err {
  min-height: 1.7em;
  font-size: var(--fs-sm);
  color: var(--err);
  margin: 12px 0 0;
  text-align: center;
  line-height: 1.6;
}

.btn {
  width: 100%;
  margin-top: 14px;
  border: none;
  border-radius: 2px;
  background: #1c1c1c;
  color: #fff;
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 15px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn[disabled] { opacity: 0.42; cursor: default; }

.lock p.lock-note {
  margin: 30px 0 0;
  font-size: var(--fs-xs);
  color: #8a877d;
  line-height: 1.9;
  text-align: center;
}

/* ── 顶栏 ───────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(251, 250, 246, 0.95);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-102%);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.topbar.show { transform: translateY(0); }
.topbar-inner {
  width: min(96vw, 1040px);
  margin: 0 auto;
  padding: clamp(9px, 1.2vw, 13px) clamp(16px, 3vw, 44px);
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  color: #8a877d;
  flex-shrink: 0;
}
.topbar-title {
  font-size: var(--fs-sm);
  color: #4a4740;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.lang-switch {
  border: 1px solid var(--line);
  background: transparent;
  color: #4a4740;
  font-family: inherit;
  font-size: var(--fs-xs);
  padding: 3px 9px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--ink);
  z-index: 30;
  width: 0;
  transition: width 0.1s linear;
}

/* ── 头部 ───────────────────────────────────────── */
header.head { padding: clamp(16px, 4vh, 46px) 0 clamp(18px, 3vh, 30px); }

.kicker {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: #8a877d;
  margin: 0 0 clamp(14px, 2vh, 22px);
  text-transform: uppercase;
}

h1.title {
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.018em;
  margin: 0 0 clamp(16px, 2.4vh, 26px);
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-size: var(--fs-sm);
  color: #6d6a61;
  font-variant-numeric: tabular-nums;
}
.meta span { display: inline-flex; align-items: center; }
.meta span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.82em;
  background: var(--line);
  margin: 0 0.85em;
}

/* ── 结论 ───────────────────────────────────────── */
.lede {
  background: var(--soft);
  border-left: 4px solid var(--ink);
  padding: clamp(18px, 2.6vw, 30px) clamp(18px, 2.6vw, 32px);
  margin: 0 0 clamp(26px, 3.4vw, 42px);
  line-height: 1.95;
}
.lede-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  color: #8a877d;
  margin: 0 0 10px;
}

/* ── 数字卡 ─────────────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 0 0 clamp(30px, 4vw, 52px);
}
.kpi {
  background: var(--card);
  padding: clamp(15px, 1.8vw, 22px) clamp(14px, 1.8vw, 24px);
}
.kpi-label {
  font-size: var(--fs-xs);
  color: #6d6a61;
  margin: 0 0 6px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.kpi-value {
  font-size: clamp(27px, 2vw + 17px, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.kpi-unit {
  font-size: 0.42em;
  font-weight: 400;
  color: #6d6a61;
  margin-left: 0.18em;
  letter-spacing: 0;
}
.kpi-delta {
  font-size: var(--fs-xs);
  margin: 7px 0 0;
  color: #6d6a61;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

/* ── 章节 ───────────────────────────────────────── */
section.block { margin: 0 0 clamp(34px, 4.6vw, 62px); }
section.block.untitled { margin-top: clamp(6px, 1vw, 14px); }

h2.sec-title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
  border-left: 5px solid var(--ink);
  padding: 0.06em 0 0.06em clamp(10px, 1.4vw, 15px);
  margin: 0 0 clamp(16px, 2.2vw, 24px);
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  text-wrap: balance;
  word-break: keep-all;
}
.sec-num {
  font-size: 0.62em;
  font-weight: 500;
  color: #8a877d;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.sec-aside {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: #8a877d;
  margin-left: auto;
  letter-spacing: 0;
  flex-shrink: 0;
  padding-left: 0.6em;
}

p.body {
  margin: 0 0 1.15em;
  color: var(--ink);
}
p.body:last-child { margin-bottom: 0; }

/* ── 提示块 ─────────────────────────────────────── */
.callout {
  background: var(--soft);
  border-left: 4px solid var(--ink);
  padding: clamp(16px, 2.2vw, 26px) clamp(17px, 2.4vw, 28px);
  margin: 0 0 1.3em;
  line-height: 1.9;
}
.callout .c-title {
  font-weight: 600;
  font-size: 0.96em;
  margin: 0 0 8px;
  line-height: 1.6;
}
.callout.risk { border-left-color: var(--ink); background: #f0eee7; }

/* ── 列表 ───────────────────────────────────────── */
ul.list {
  margin: 0 0 1.3em;
  padding: 0;
  list-style: none;
}
ul.list li {
  position: relative;
  padding-left: 1.35em;
  margin-bottom: 0.62em;
  line-height: 1.9;
}
ul.list li::before {
  content: "";
  position: absolute;
  left: 0.28em;
  top: 0.86em;
  width: 0.3em;
  height: 1.5px;
  background: var(--ink);
}
ul.list li:last-child { margin-bottom: 0; }

/* ── 图表 ───────────────────────────────────────── */
figure.chart {
  margin: 0 0 1.5em;
  background: var(--card);
  border: 1px solid var(--line);
  padding: clamp(16px, 2.2vw, 26px) clamp(14px, 2vw, 24px) clamp(10px, 1.4vw, 16px);
}
figure.chart figcaption {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 clamp(10px, 1.4vw, 16px);
  line-height: 1.6;
}
figure.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-note {
  font-size: var(--fs-xs);
  color: #6d6a61;
  margin: clamp(8px, 1vw, 12px) 0 0;
  line-height: 1.75;
}

/* ── 表格 ───────────────────────────────────────── */
.table-wrap {
  margin: 0 0 0.5em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-table);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
table.data th {
  text-align: center;
  font-weight: 700;
  background: var(--soft);
  color: var(--ink);
  padding: 0.5em 0.58em;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.45;
  min-width: 3.4em;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.data td {
  text-align: center;
  padding: 0.5em 0.58em;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
  min-width: 3.4em;
}
table.data th:last-child, table.data td:last-child { border-right: none; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td:first-child { white-space: normal; min-width: 6em; text-align: left; }
table.data td[style*="text-align:left"] { white-space: normal; }
table.data tr.sum td { font-weight: 600; background: #faf9f5; }

/* 5 列以上的表，首列横向滚动时固定 */
.table-wrap.wide th:first-child,
.table-wrap.wide td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--card);
  box-shadow: 2px 0 0 0 var(--line), 3px 0 0 0 rgba(17, 17, 17, 0.06);
}
.table-wrap.wide { scroll-snap-type: x proximity; }
.table-wrap.wide thead th, .table-wrap.wide tbody td { scroll-snap-align: start; }
.table-wrap.wide th:first-child {
  background: var(--soft);
  z-index: 3;
}
.table-wrap.wide tr.sum td:first-child { background: #faf9f5; }

.tip {
  font-size: var(--fs-xs);
  color: #8a877d;
  margin: 0.55em 0 1.5em;
  padding-left: 2px;
  line-height: 1.7;
}

/* ── 需要您定 ───────────────────────────────────── */
.ask {
  background: #1c1c1c;
  color: #f2efe7;
  padding: clamp(22px, 3vw, 38px) clamp(20px, 3vw, 40px);
  margin: clamp(34px, 4.4vw, 58px) 0 0;
}
.ask .a-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  color: #9a968b;
  margin: 0 0 12px;
  text-transform: uppercase;
}
.ask h3 {
  font-size: clamp(19px, 1vw + 15px, 27px);
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.55;
  color: #fff;
  text-wrap: balance;
}
.ask p {
  margin: 0 0 0.9em;
  font-size: 0.94em;
  line-height: 1.95;
  color: #d8d4c9;
}
.ask p:last-child { margin-bottom: 0; }
.ask strong { color: #fff; font-weight: 600; }


.sign {
  margin: clamp(30px, 4vw, 52px) 0 0;
  text-align: right;
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.sign + .sign { margin-top: 0.35em; }

/* ── 页脚 ───────────────────────────────────────── */
footer.foot {
  margin-top: clamp(30px, 4vw, 50px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: #8a877d;
  line-height: 1.85;
}
.foot-row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.totop {
  position: fixed;
  right: 18px;
  bottom: 24px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 25;
}
.totop.show { opacity: 1; pointer-events: auto; }

/* ── 断点 ───────────────────────────────────────── */
@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 400px) {
  main, .page { padding-left: 12px; padding-right: 12px; }
  h2.sec-title { border-left-width: 4px; padding-left: 10px; }
  .topbar-inner { padding-left: 12px; padding-right: 12px; }
  figure.chart { padding-left: 12px; padding-right: 12px; }
}

@media (min-width: 1200px) {
  main, .page { width: min(94vw, 1120px); }
  .topbar-inner { width: min(94vw, 1120px); }
}

/* ── 深色 ───────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceae3;
    --sub: #eceae3;
    --line: #33312a;
    --bg: #12110d;
    --card: #191812;
    --accent: #eceae3;
    --soft: #1d1c15;
  }
  .topbar { background: rgba(18, 17, 13, 0.95); }
  .topbar-title, .topbar-label, .lang-switch { color: #b6b2a6; }
  .lock-sub, .lede-label, .kpi-label, .sec-num, .sec-aside, .chart-note,
  .tip, .foot-row, .meta, .kicker, .lock-note, .lock-kicker { color: #8f8b7f; }
  .ask { background: #eceae3; }
  .ask h3, .ask strong { color: #12110d; }
  .ask p { color: #4a4740; }
  .ask .a-label { color: #7d7970; }
  .callout.risk { background: #1f1e16; }
  table.data th { background: #23221a; }
  table.data tr.sum td { background: #1d1c15; }
  .table-wrap.wide th:first-child { background: #23221a; }
  .table-wrap.wide tr.sum td:first-child { background: #1d1c15; }
  .totop { background: rgba(25, 24, 18, 0.92); }
  .ch-muted { fill: #4a463c; }
  .ch-stroke-muted { stroke: #55503f; }
}

@media print {
  .topbar, .totop, .progress { display: none; }
  body { background: #fff; }
}

/* ── 图表：全灰阶 ─────────────────────────────── */
figure.chart text { font-family: inherit; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-track { fill: var(--soft); }
.ch-axis-label { fill: #8a877d; font-size: clamp(11.5px, 0.6vw + 9.8px, 14px); font-variant-numeric: tabular-nums; }
.ch-cat-label { fill: #4a4740; font-size: clamp(12px, 0.6vw + 10.2px, 14px); }
.ch-value { fill: var(--ink); font-size: clamp(12px, 0.6vw + 10.2px, 14px); font-weight: 600; font-variant-numeric: tabular-nums; }
.ch-legend-text { fill: #4a4740; font-size: clamp(11.5px, 0.6vw + 9.8px, 14px); }
.ch-note-text { fill: #8a877d; font-size: clamp(11.5px, 0.6vw + 9.8px, 14px); }
.ch-ink { fill: var(--ink); }
.ch-muted { fill: #d5d2c6; }
.ch-accent { fill: var(--ink); }
.ch-ok { fill: var(--ink); }
.ch-blue { fill: #8a877d; }
.ch-dot { stroke: var(--card); stroke-width: 1.6; }
.ch-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ch-stroke-ink { stroke: var(--ink); }
.ch-stroke-muted { stroke: #b5b1a4; }
.ch-stroke-accent { stroke: var(--ink); }
.ch-stroke-ok { stroke: var(--ink); }
.ch-stroke-blue { stroke: #8a877d; }

.table-block { margin: 0 0 1.5em; }
.table-block .table-wrap { margin-bottom: 0; }
.table-block .chart-note { margin-top: 0.5em; }
.table-block .tip { margin: 0.4em 0 0; }
