/* 轻盈系列 Light 一物一码整体解决方案 · 决策简报
   设计取向：严肃机构文档。中性石灰基底 + 单一松绿强调色。
   主题锁定：整页统一，light / dark 由 prefers-color-scheme 决定，支持手动切换。 */

:root {
  color-scheme: light;

  --paper:        #f6f6f3;
  --paper-2:      #eceae4;
  --surface:      #fffffe;
  --line:         #d9d6cd;
  --line-soft:    #e6e3db;

  --ink:          #17191a;
  --ink-2:        #4a4e50;
  --ink-3:        #767b7d;

  --accent:       #1f6f5c;
  --accent-soft:  #e2efea;
  --accent-line:  #a9cec2;
  --on-accent:    #ffffff;

  --warn:         #96681a;
  --warn-soft:    #f6eedc;
  --warn-line:    #e0cb9c;

  --risk:         #9d3728;
  --risk-soft:    #f7e8e4;
  --risk-line:    #e2b7ac;

  --radius:       10px;
  --radius-sm:    6px;

  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --shell: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:       #131513;
    --paper-2:     #1a1d1b;
    --surface:     #1e2120;
    --line:        #333734;
    --line-soft:   #282c29;
    --ink:         #eceae4;
    --ink-2:       #b2b6b3;
    --ink-3:       #838a86;
    --accent:      #6dbfa5;
    --accent-soft: #1b2d28;
    --accent-line: #2f5850;
    --on-accent:   #0f1412;
    --warn:        #d6ab5e;
    --warn-soft:   #2c2517;
    --warn-line:   #56482a;
    --risk:        #dd8b78;
    --risk-soft:   #2e1b17;
    --risk-line:   #5b322a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:       #131513;
  --paper-2:     #1a1d1b;
  --surface:     #1e2120;
  --line:        #333734;
  --line-soft:   #282c29;
  --ink:         #eceae4;
  --ink-2:       #b2b6b3;
  --ink-3:       #838a86;
  --accent:      #6dbfa5;
  --accent-soft: #1b2d28;
  --accent-line: #2f5850;
  --on-accent:   #0f1412;
  --warn:        #d6ab5e;
  --warn-soft:   #2c2517;
  --warn-line:   #56482a;
  --risk:        #dd8b78;
  --risk-soft:   #2e1b17;
  --risk-line:   #5b322a;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ─── 口令门 ─────────────────────────────────────────── */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate[hidden] { display: none; }

.gate-inner { width: 100%; max-width: 380px; }

.gate-mark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.gate h1 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 6px;
  letter-spacing: 0;
}

.gate .gate-sub {
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 0 0 26px;
}

.gate-field { display: grid; gap: 8px; }

.gate-field label {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
}

.gate-row { display: flex; gap: 8px; }

.gate input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
.gate input::placeholder { color: var(--ink-3); }
.gate input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.btn {
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.gate-err {
  font-size: 13px;
  color: var(--risk);
  min-height: 20px;
  margin: 2px 0 0;
}

.gate-note {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ─── 骨架 ────────────────────────────────────────────── */

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 58px;
  display: flex;
  align-items: center;
  background: var(--paper);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .topbar { background: color-mix(in srgb, var(--paper) 86%, transparent); }
}
.topbar .shell { display: flex; align-items: center; gap: 16px; }

.topbar-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-name span { color: var(--ink-3); font-weight: 400; }

.topbar-spacer { flex: 1; }

.ghost {
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main { display: block; }

section { padding: 64px 0; border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: 0; }

h2 {
  font-size: 26px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
  margin: 0 0 10px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  margin: 0 0 12px;
  letter-spacing: 0;
}
.lede {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 32px;
}
p { margin: 0 0 14px; }

/* ─── 可靠性标记 ──────────────────────────────────────── */

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: .06em;
  padding: 1px 7px;
  border-radius: 3px;
  border: 1px solid;
  vertical-align: 2px;
  white-space: nowrap;
}
.tag.ok    { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.tag.quote { color: var(--ink-2);  background: var(--paper-2);     border-color: var(--line); }
.tag.est   { color: var(--warn);   background: var(--warn-soft);   border-color: var(--warn-line); }
.tag.tbd   { color: var(--risk);   background: var(--risk-soft);   border-color: var(--risk-line); }

/* ─── Hero ────────────────────────────────────────────── */

.hero { padding: 72px 0 60px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 56px;
  align-items: start;
}

.classif {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: 3px;
  padding: 3px 9px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 680;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0;
}

.meta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.meta-row {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 10px;
  padding: 9px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line-soft);
}
.meta-row:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-row:first-child { padding-top: 0; }
.meta-row dt { color: var(--ink-3); margin: 0; }
.meta-row dd { margin: 0; color: var(--ink); }
.meta-card dl { margin: 0; }

/* ─── 决策摘要：定义表 ────────────────────────────────── */

.defs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.def {
  display: grid;
  grid-template-columns: 13em 1fr;
  gap: 28px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
}
.def dt {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.def dd { margin: 0; font-size: 15px; }
.def dd strong { font-weight: 650; }
.def .no { color: var(--risk); }
.def .yes { color: var(--accent); }

/* ─── 转变对照 ────────────────────────────────────────── */

.shift {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
}
.shift-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--surface);
}
.shift-col.was { background: var(--paper-2); border-style: dashed; }
.shift-col h3 { font-size: 13px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 16px; }
.shift-col dl { margin: 0; display: grid; gap: 13px; }
.shift-col .k { font-size: 12px; color: var(--ink-3); margin: 0 0 2px; }
.shift-col .v { font-size: 14.5px; margin: 0; font-weight: 500; }
.shift-col.now .v { color: var(--accent); }
.shift-arrow {
  align-self: center;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink-3);
}

/* ─── 三层码架构（核心图）─────────────────────────────── */

.stack { display: grid; gap: 10px; margin-bottom: 40px; }
.layer {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  background: var(--surface);
}
.layer.zero {
  border-style: dashed;
  background: var(--paper-2);
}
.layer-id {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
  line-height: 1.5;
}
.layer-id b { display: block; font-size: 13px; color: var(--ink); letter-spacing: 0; font-family: var(--sans); font-weight: 600; }
.layer-body { font-size: 14px; color: var(--ink-2); }
.layer-body b { color: var(--ink); font-weight: 600; }
.layer.zero .layer-body b { color: var(--risk); }

.cols3 {
  display: grid;
  grid-template-columns: 9em repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13.5px;
  background: var(--surface);
}
.cols3 > * { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.cols3 .hd {
  font-weight: 600;
  background: var(--paper-2);
  font-size: 13px;
  line-height: 1.5;
}
.cols3 .hd small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.cols3 .rk { color: var(--ink-3); font-size: 12.5px; }
.cols3 .neg { color: var(--risk); }
.cols3 .pos { color: var(--accent); font-weight: 600; }
/* 末行 4 格 + 3 张窄屏卡片，共 7 个子元素不画底边框 */
.cols3 > *:nth-last-child(-n+7) { border-bottom: 0; }

.ortho-note {
  margin-top: 16px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
}

/* ─── 流程轨 ──────────────────────────────────────────── */

.flow { display: grid; gap: 0; position: relative; }
.step {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  gap: 20px;
  padding: 0 0 26px;
  position: relative;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: "";
  position: absolute;
  left: 1.1em;
  top: 26px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.step:last-child::before { display: none; }
.step-dot {
  width: 2.2em; height: 2.2em;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-2);
  position: relative; z-index: 1;
}
.step.mute .step-dot { border-style: dashed; color: var(--ink-3); }
.step.key .step-dot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.step-b h3 { margin-bottom: 4px; }
.step-b p { font-size: 14px; color: var(--ink-2); margin: 0; max-width: 64ch; }
.step.mute .step-b h3 { color: var(--ink-3); }

/* ─── 成本图 ──────────────────────────────────────────── */

.bars { display: grid; gap: 18px; margin-bottom: 14px; }
.bar-row { display: grid; grid-template-columns: 11em 1fr; gap: 18px; align-items: center; }
.bar-label { font-size: 13.5px; line-height: 1.45; }
.bar-label small { display: block; color: var(--ink-3); font-size: 11.5px; }
.bar-track {
  position: relative;
  height: 30px;
  background: var(--paper-2);
  border-radius: 4px;
  border: 1px solid var(--line-soft);
}
.bar-fill {
  position: absolute;
  top: -1px; bottom: -1px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}
/* 着色层单独做缩放动画，条内文字保持原尺寸不被拉伸 */
.bar-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  border: 1px solid;
  border-color: inherit;
  background: inherit;
  z-index: -1;
  transform-origin: left center;
}
.bar-fill { background: none; z-index: 0; }
.bar-fill.sw { color: var(--warn); }
.bar-fill.pk { color: var(--ink-2); }
.bar-fill.mk { color: var(--risk); }
.bar-fill.rc { color: var(--accent); }
.bar-fill.sw::before { background: var(--warn-soft);   border-color: var(--warn-line); }
.bar-fill.pk::before { background: var(--paper-2);     border-color: var(--line); }
.bar-fill.mk::before { background: var(--risk-soft);   border-color: var(--risk-line); }
.bar-fill.rc::before { background: var(--accent-soft); border-color: var(--accent-line); }

/* 窄条的数值放到条外；宽条的数值放条内，避免溢出容器被裁 */
.bar-out { position: absolute; left: calc(100% + 9px); color: var(--ink-3); }
.bar-in  { margin-left: auto; padding-left: 14px; }

.axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  margin-left: calc(11em + 18px);
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
}

.callout {
  margin-top: 28px;
  border: 1px solid var(--risk-line);
  background: var(--risk-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.callout h3 { color: var(--risk); margin-bottom: 8px; }
.callout p { font-size: 14.5px; margin: 0; }
.callout p + p { margin-top: 8px; }

/* 敏感性四档 */
.sens {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: end;
  margin-top: 40px;
}
.sens-col { display: grid; gap: 10px; }
.sens-bar {
  border-radius: 5px 5px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--paper-2);
  min-height: 18px;
}
.sens-col.peak .sens-bar { background: var(--risk-soft); border-color: var(--risk-line); }
.sens-col.base .sens-bar { background: var(--accent-soft); border-color: var(--accent-line); }
.sens-meta { border-top: 2px solid var(--ink); padding-top: 10px; }
.sens-col.base .sens-meta { border-top-color: var(--accent); }
.sens-col.peak .sens-meta { border-top-color: var(--risk); }
.sens-amt { font-family: var(--mono); font-size: 19px; font-weight: 600; line-height: 1.2; }
.sens-col.base .sens-amt { color: var(--accent); }
.sens-col.peak .sens-amt { color: var(--risk); }
.sens-k { font-size: 13px; font-weight: 600; margin-top: 3px; }
.sens-d { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; font-family: var(--mono); }

/* ─── 决策门分叉 ──────────────────────────────────────── */

.gatefig { display: grid; gap: 0; }
.gate-head {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
}
.gate-head b { font-size: 15px; }
.gate-head small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.gate-stem { width: 1px; height: 26px; background: var(--line); margin: 0 auto; }
.gate-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
  padding-top: 26px;
}
.gate-split::before {
  content: "";
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 1px;
  background: var(--line);
}
.gate-branch { position: relative; }
.gate-branch::before {
  content: "";
  position: absolute;
  top: -26px; left: 50%;
  width: 1px; height: 26px;
  background: var(--line);
}
.gate-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--surface);
  height: 100%;
}
.gate-box.keep { border-color: var(--accent-line); background: var(--accent-soft); }
.gate-box.esc  { border-color: var(--warn-line);   background: var(--warn-soft); }
.gate-cond {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.gate-box.keep .gate-cond { color: var(--accent); }
.gate-box.esc  .gate-cond { color: var(--warn); }
.gate-box h3 { margin-bottom: 6px; }
.gate-box p { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.gate-box ul { margin: 10px 0 0; padding-left: 1.1em; font-size: 13.5px; color: var(--ink-2); }
.gate-box li { margin-bottom: 4px; }

/* ─── 风险 ────────────────────────────────────────────── */

.risk-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; }

.rk-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}
.rk-item:first-of-type { padding-top: 0; }
.sev {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
  margin-top: 4px;
  white-space: nowrap;
}
.sev.hi  { color: var(--risk); background: var(--risk-soft); border-color: var(--risk-line); }
.sev.mid { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.rk-item h3 { margin-bottom: 4px; font-size: 15px; }
.rk-item p { font-size: 13.5px; color: var(--ink-2); margin: 0; }

.lesson {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.lesson-fig {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 12px 0 10px;
}
.lesson-fig div { min-width: 0; }
.lesson-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--risk);
  line-height: 1.2;
}
.lesson-cap { font-size: 11.5px; color: var(--ink-3); }
.lesson h3 { margin-bottom: 4px; }
.lesson p { font-size: 13.5px; color: var(--ink-2); margin: 0; }

.premises { margin-top: 36px; }
.premises ol { margin: 0; padding-left: 0; list-style: none; counter-reset: p; }
.premises li {
  counter-increment: p;
  display: grid;
  grid-template-columns: 2em 1fr auto;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  align-items: baseline;
}
.premises li::before {
  content: counter(p);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.st { font-family: var(--mono); font-size: 11px; padding: 1px 8px; border-radius: 3px; border: 1px solid; white-space: nowrap; }
.st.done { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.st.open { color: var(--ink-3); background: var(--paper-2); border-color: var(--line); }

/* ─── 时间轴 ──────────────────────────────────────────── */

.tl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 18px; }
.tl-ph { padding-right: 20px; position: relative; }
.tl-bar { height: 5px; border-radius: 3px; background: var(--line); margin-bottom: 14px; }
.tl-ph.p0 .tl-bar { background: var(--accent); }
.tl-ph.p1 .tl-bar { background: var(--accent); opacity: .62; }
.tl-ph.p2 .tl-bar { background: var(--ink-3); opacity: .5; }
.tl-ph.p3 .tl-bar { background: var(--line); }
.tl-wk { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-bottom: 5px; }
.tl-ph h3 { font-size: 14.5px; margin-bottom: 6px; }
.tl-ph p { font-size: 13px; color: var(--ink-2); margin: 0; padding-right: 8px; }
.tl-ph.p3 h3, .tl-ph.p3 p { color: var(--ink-3); }

.tl-total {
  font-size: 13.5px;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.tl-total b { font-family: var(--mono); font-size: 16px; color: var(--ink); }

/* ─── UV 关系 ─────────────────────────────────────────── */

.rel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.rel-row {
  display: grid;
  grid-template-columns: 13em 1fr;
  gap: 22px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  align-items: baseline;
}
.rel-row:last-child { border-bottom: 0; }
.rel-row dt { color: var(--ink-2); font-weight: 500; }
.rel-row dd { margin: 0; }
.rel dl { margin: 0; }
.keep-k { color: var(--accent); font-weight: 600; }
.mod-k  { color: var(--warn);   font-weight: 600; }

.obsolete {
  margin-top: 24px;
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
}
.obsolete h3 { color: var(--warn); font-size: 14px; margin-bottom: 6px; }
.obsolete p { margin: 0; color: var(--ink-2); }
.obsolete p + p { margin-top: 7px; }

/* ─── 附录折叠 ────────────────────────────────────────── */

.acc { border-top: 1px solid var(--line); }
details {
  border-bottom: 1px solid var(--line-soft);
}
summary {
  cursor: pointer;
  padding: 17px 0;
  font-size: 15.5px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+";
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink-3);
  width: 1em;
  flex: none;
}
details[open] summary::before { content: "\2212"; color: var(--accent); }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acc-body { padding: 0 0 26px 1.75em; font-size: 14px; color: var(--ink-2); max-width: 74ch; }
.acc-body p { margin: 0 0 12px; }
.acc-body p:last-child { margin-bottom: 0; }
.acc-body b { color: var(--ink); }
.acc-body dl { margin: 0 0 14px; display: grid; gap: 0; }
.acc-body dl > div {
  display: grid;
  grid-template-columns: 11em 1fr;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.acc-body dt { color: var(--ink-3); font-size: 13px; }
.acc-body dd { margin: 0; }
.acc-body ul { margin: 0 0 12px; padding-left: 1.2em; }
.acc-body li { margin-bottom: 6px; }
.acc-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 1px 5px;
}
.rfq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.rfq-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13.5px; }
.rfq-box.bad { border-color: var(--risk-line); background: var(--risk-soft); }
.rfq-box.good { border-color: var(--accent-line); background: var(--accent-soft); }
.rfq-box b { display: block; margin-bottom: 6px; font-size: 12px; font-family: var(--mono); }
.rfq-box.bad b { color: var(--risk); }
.rfq-box.good b { color: var(--accent); }

/* ─── 页脚 ────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 60px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.8;
}
footer .shell { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer b { color: var(--ink-2); font-weight: 500; }

/* ─── 动效：克制的入场，尊重 reduced motion ──────────── */

/* 内容默认完全可见。只有当 JS 确认能接管（.js-reveal 由脚本添加）
   且用户未要求减少动效时，才进入初始隐藏态。
   这样在无 JS、JS 报错、打印、整页截图等场景下，文档依然完整可读。 */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .rv {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.16,1,.3,1);
  }
  .js-reveal .rv.in { opacity: 1; transform: none; }

  .js-reveal .bar-fill::before { transform: scaleX(.001); transition: transform .8s cubic-bezier(.16,1,.3,1); }
  .js-reveal .bars.in .bar-fill::before { transform: scaleX(1); }
  .js-reveal .bar-fill > * { opacity: 0; transition: opacity .4s ease .35s; }
  .js-reveal .bars.in .bar-fill > * { opacity: 1; }

  .js-reveal .sens-bar { transform: scaleY(.02); transform-origin: bottom; transition: transform .7s cubic-bezier(.16,1,.3,1); }
  .js-reveal .sens.in .sens-bar { transform: scaleY(1); }
  .js-reveal .sens.in .sens-col:nth-child(2) .sens-bar { transition-delay: .07s; }
  .js-reveal .sens.in .sens-col:nth-child(3) .sens-bar { transition-delay: .14s; }
  .js-reveal .sens.in .sens-col:nth-child(4) .sens-bar { transition-delay: .21s; }
}

/* 打印与整页截图：强制全部可见 */
@media print {
  .js-reveal .rv { opacity: 1 !important; transform: none !important; }
  .js-reveal .bar-fill::before, .js-reveal .sens-bar { transform: none !important; }
  .js-reveal .bar-fill > * { opacity: 1 !important; }
  .gate, .topbar { display: none !important; }
  details { break-inside: avoid; }
  details > .acc-body { display: block !important; }
}

/* ─── 响应式 ──────────────────────────────────────────── */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .risk-grid { grid-template-columns: 1fr; gap: 34px; }
  .tl { grid-template-columns: repeat(2, 1fr); gap: 26px 0; }
  .cols3 { grid-template-columns: 7em repeat(3, 1fr); font-size: 12.5px; }
  .cols3 > * { padding: 10px; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .shell { padding: 0 16px; }
  section { padding: 44px 0; }
  h2 { font-size: 22px; }
  .hero { padding: 44px 0 40px; }

  .shift { grid-template-columns: 1fr; gap: 12px; }
  .shift-arrow { transform: rotate(90deg); justify-self: center; }

  .def { grid-template-columns: 1fr; gap: 3px; padding: 14px 0; }
  .def dt { font-size: 12.5px; }

  .layer { grid-template-columns: 1fr; gap: 8px; }

  .cols3 { display: grid; grid-template-columns: 1fr; border: 0; background: none; }
  .cols3 > * { display: none; }
  .cols3 .m-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 16px 18px;
    margin-bottom: 12px;
  }

  .bar-row { grid-template-columns: 1fr; gap: 7px; }
  .axis { margin-left: 0; }
  .bar-out { position: static; margin-left: 8px; }

  .sens { grid-template-columns: 1fr 1fr; gap: 20px 14px; }

  .gate-split { grid-template-columns: 1fr; gap: 14px; padding-top: 20px; }
  .gate-split::before { left: 50%; right: auto; width: 1px; height: 20px; top: 0; }
  .gate-branch::before { display: none; }

  .tl { grid-template-columns: 1fr; gap: 24px; }
  .tl-ph { padding-right: 0; }

  .rel-row { grid-template-columns: 1fr; gap: 3px; }
  .premises li { grid-template-columns: 1.6em 1fr; }
  .premises li .st { grid-column: 2; justify-self: start; margin-top: 4px; }

  .rfq { grid-template-columns: 1fr; }
  .acc-body { padding-left: 0; }
  .acc-body dl > div { grid-template-columns: 1fr; gap: 2px; }

  footer .shell { flex-direction: column; gap: 10px; }
}

/* 移动端卡片：桌面隐藏 */
.m-card { display: none; }

/* ── v2.0 新增：方案边界、备选路径、纸箱外观图 ── */
.scope-note {
  margin-top: 20px; padding: 12px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); background: var(--surface);
  font-size: 13.5px; line-height: 1.75; color: var(--ink-2);
}
.scope-note b { color: var(--ink); font-weight: 600; }

.alt-line {
  display: inline-block; margin-top: 6px;
  font-size: 12.5px; color: var(--ink-3); line-height: 1.7;
  border-left: 2px solid var(--line); padding-left: 8px;
}

.cartonfig {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-top: 30px;
}
.cartonfig figure {
  margin: 0; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.cartonfig svg { display: block; width: 100%; height: auto; }
.cartonfig figcaption {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
}
.cartonfig figcaption b { color: var(--ink); font-weight: 600; }

.ct-face polygon { fill: var(--paper-2); }
.ct-inner polygon { fill: var(--paper); }
.ct-edge polygon, .ct-edge polyline { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-linejoin: round; }
.ct-open { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 5 4; }
.ct-code { fill: var(--ink); stroke: none; }
.ct-code.in { fill: var(--accent); }
.ct-num { fill: var(--surface); font-family: var(--mono); font-size: 13px; font-weight: 700; text-anchor: middle; }
.ct-guide { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.ct-guide-t { fill: var(--accent); font-family: var(--sans); font-size: 12px; font-weight: 700; text-anchor: middle; }
.ct-guide-t.s { font-size: 11px; font-weight: 600; }
.ct-lead { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.ct-lab { fill: var(--ink-2); font-family: var(--mono); font-size: 11px; }
.ct-lab.e { text-anchor: end; }
.ct-lab.s { fill: var(--ink-3); font-size: 10.5px; }

@media (max-width: 720px) {
  .cartonfig { grid-template-columns: 1fr; }
}
.premises li small { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-3); font-weight: 400; }
.premises li span b { font-weight: 600; color: var(--ink); }
.defs .def dd small, .m-card small { color: var(--ink-3); }
dl div dt small { display: block; font-size: 10.5px; color: var(--warn); font-weight: 600; margin-top: 2px; }
.premises-note {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-size: 13px; line-height: 1.8; color: var(--ink-2);
}
.premises-note b { color: var(--ink); font-weight: 600; }
.premises li span .neg { color: var(--risk); }
.ct-lid polygon { fill: var(--surface); }
.ct-lab.c { text-anchor: middle; }
.payback {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 18px 0; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper);
}
.pb-item { flex: 1 1 110px; }
.pb-n { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.pb-item.hl .pb-n { color: var(--accent); }
.pb-k { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }
.pb-op { font-family: var(--mono); font-size: 17px; color: var(--ink-3); flex: 0 0 auto; }
.sev.done { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
@media (max-width: 720px) { .payback { gap: 10px; } .pb-item { flex: 1 1 100%; } .pb-op { display: none; } }

/* ── 多 SKU：刮刮贴区分设计 ── */
.labelfig { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; align-items: start; }
.labelfig figure {
  margin: 0; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.labelfig svg { display: block; width: 100%; height: auto; }
.labelfig figcaption {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
}
.labelfig figcaption b { color: var(--ink); font-weight: 600; }
.lb-card rect { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.2; }
.lb-coat.a { fill: var(--paper-2); stroke: var(--ink-3); stroke-width: 1; }
.lb-coat.b { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.lb-coat-t { fill: var(--ink-2); font-family: var(--sans); font-size: 12.5px; font-weight: 700; text-anchor: middle; }
.lb-coat-t.s { font-size: 10px; font-weight: 500; fill: var(--ink-3); }
.lb-coat-t.hl { fill: var(--accent); }
.lb-coat-t.s.hl { fill: var(--accent); opacity: .8; }
.lb-foot { fill: var(--ink-3); font-family: var(--mono); font-size: 9.5px; text-anchor: middle; }
.lb-x { fill: var(--ink-3); font-family: var(--mono); font-size: 20px; text-anchor: middle; }
.lb-reqs { display: grid; gap: 10px; }
.lb-req {
  padding: 12px 14px; border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--surface);
}
.lb-req b { display: block; font-size: 13px; color: var(--ink); margin-bottom: 3px; }
.lb-req span { font-size: 12px; color: var(--ink-2); line-height: 1.7; }
@media (max-width: 720px) { .labelfig { grid-template-columns: 1fr; } }
.st.risk { color: var(--risk); background: var(--risk-soft); border-color: var(--risk-line); }
.gate-cond.warn { color: var(--risk); }
.gate-cond.warn b, .gate-cond.ok b { font-weight: 700; }
.gate-cond.ok { color: var(--accent); }
