/* ============================================================
   FLRO 分析法 · 视觉系统
   ------------------------------------------------------------
   暖纸 / 墨色 / 余烬橙 / 金；账本感：表格、数字、细分隔线。
   - 复用能抓老鼠品牌 token，不引入新体系
   - 圆角 ≤ 4px；不用渐变按钮、不用卡片堆叠
   - 零外部请求：字体只用系统字体栈，纸纹用内联 SVG data URI
   分区：基础 / 头部 / 按钮 / 首页 / 向导 / 结果 / 记录 / 方法 / 打印 / 响应式
   ============================================================ */

/* ---------------- 基础 token ---------------- */

:root {
  --paper: #f2ece2;
  --paper-2: #e9e0d2;
  --surface: #faf6ee;
  --surface-2: #f6f0e5;
  --ink: #191410;
  --ink-2: #3d342b;
  --muted: #6f6458;
  --muted-2: #8d8174;
  --line: rgba(25, 20, 16, 0.13);
  --line-strong: rgba(25, 20, 16, 0.28);
  --ember: #c14a26;
  --ember-deep: #98361a;
  --ember-soft: rgba(193, 74, 38, 0.08);
  --gold: #a07a35;
  --good: #4d6957;
  --bad: #a8351c;
  --seg-f: #4a3527;
  --seg-l: #c14a26;
  --seg-r: #a07a35;
  --seg-o: #8d8174;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", SimSun, serif;
  --mono: "Cascadia Mono", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --max: 1160px;
  --radius: 3px;
  --tap: 44px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(193, 74, 38, 0.06), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(160, 122, 53, 0.05), transparent 55%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.9'/></svg>");
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--ember); color: #fff7ef; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { padding: 0; list-style: none; }

main { display: block; }
main:focus { outline: none; }

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  padding: 20px;
  margin: 20px auto;
  max-width: 640px;
  border: 1px solid var(--ember);
  background: var(--ember-soft);
  font-size: 14px;
}

.storage-note {
  padding: 10px 18px;
  background: rgba(193, 74, 38, 0.1);
  border-bottom: 1px solid rgba(193, 74, 38, 0.3);
  color: var(--ember-deep);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* ---------------- 头部 / 底栏 ---------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(242, 236, 226, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  min-height: var(--tap);
}
.brand img { width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.brand-text span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover::after,
.nav a:focus-visible::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); font-weight: 600; }
.nav a.is-active::after { transform: scaleX(1); }

.head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 34px 0 44px;
  background: var(--paper-2);
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}
.foot-brand { max-width: 520px; }
.foot-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.foot-brand p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.foot-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

/* ---------------- 按钮 / 链接 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.btn:hover { background: var(--ember-deep); border-color: var(--ember-deep); color: #fff7ef; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.38; pointer-events: none; }

.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn-primary { background: var(--ember); border-color: var(--ember); color: #fff8f1; }
.btn-primary:hover { background: var(--ember-deep); border-color: var(--ember-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn.danger { color: var(--ember-deep); }
.btn-ghost.danger:hover { border-color: var(--ember); color: var(--ember-deep); }

.btn-arrow { font-family: var(--mono); font-size: 13px; }
.btn-sub {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  opacity: 0.72;
}

.link-btn {
  border: 0;
  background: none;
  padding: 6px 2px;
  min-height: 32px;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}
.link-btn:hover { color: var(--ember); border-color: var(--ember); }

.mini-link {
  border: 0;
  background: none;
  padding: 6px 4px;
  min-height: 32px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  text-decoration: none;
}
.mini-link:hover { color: var(--ember); border-bottom-color: var(--ember); }
.mini-link.danger:hover { color: var(--ember-deep); }

.text-link { color: var(--ember-deep); text-decoration: underline; text-underline-offset: 3px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ember);
  text-transform: uppercase;
}

/* ---------------- 首页 ---------------- */

.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 900px; }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ember);
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 14px;
}
.hero-title-text { display: block; }
.hero-lead {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
  max-width: 66ch;
}
.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.formula-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.formula-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.formula-box code {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.01em;
}
.home-records {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
}
.home-records b { color: var(--ink); font-weight: 600; }
.home-records a { color: var(--ember-deep); text-underline-offset: 3px; }

.home-section { padding: 52px 0 0; }
/* 首页的 section-head 是「小标在上、标题在下」，与结果页的左右分栏不同 */
.home-section .section-head { display: block; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.section-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 8px;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  background: var(--line);
  border: 1px solid var(--line);
}
.letter-card {
  background: var(--surface);
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.letter-top { display: flex; align-items: baseline; gap: 10px; }
.letter-key {
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1;
  color: var(--ember);
  letter-spacing: -0.02em;
}
.letter-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}
.letter-alias {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.letter-detail { font-size: 12.5px; line-height: 1.72; color: var(--ink-2); }

.why-list {
  margin-top: 24px;
  border-top: 1px solid var(--line-strong);
  counter-reset: why;
}
.why-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.why-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ember);
  padding-top: 4px;
  letter-spacing: 0.06em;
}
.why-item p { font-size: 14px; line-height: 1.8; color: var(--ink-2); }

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  background: var(--line);
  border: 1px solid var(--line);
}
.home-step { background: var(--surface); padding: 24px 22px 26px; }
.home-step-no {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ember);
}
.home-step h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 10px 0 8px;
}
.home-step p { font-size: 13px; line-height: 1.75; color: var(--muted); }

.caution-band {
  margin-top: 52px;
  padding: 30px 32px 32px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: center;
}
.caution-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  grid-column: 1 / -1;
}
.caution-list {
  display: grid;
  gap: 10px;
  grid-column: 1;
}
.caution-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.caution-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--ember);
}
.caution-band .btn { grid-column: 2; grid-row: 2 / span 2; align-self: center; }

/* ---------------- 页面头（记录 / 方法） ---------------- */

.page-head { padding: 56px 0 30px; border-bottom: 1px solid var(--line); }
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 3.8vw, 42px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 14px 0 12px;
}
.page-head .lead {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 70ch;
}
.method-head h1 { max-width: 20em; }

.empty-page { padding: 80px 0 100px; max-width: 720px; }
.empty-page h1 { font-family: var(--serif); font-size: 32px; margin-bottom: 12px; }
.empty-page p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.empty-page .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.error-list { margin: 16px 0 0; display: grid; gap: 8px; }
.error-list li { font-size: 13.5px; color: var(--ember-deep); }

.empty-state {
  padding: 64px 0 72px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.empty-state h2 { font-family: var(--serif); font-size: 26px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }

/* ---------------- 向导 ---------------- */

.wizard { max-width: 860px; padding: 44px 36px 80px; }
.wizard-head { margin-bottom: 26px; }
.wizard-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.wizard-step-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.wizard-title-mini { font-size: 12.5px; color: var(--muted-2); }
.progress {
  height: 2px;
  background: var(--line);
  margin-top: 10px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--ember);
  transition: width 0.45s var(--ease);
}

.wizard-step { max-width: 720px; }
.step-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ember);
  text-transform: uppercase;
}
.step-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
}
.step-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 62ch;
}

.fields { margin-top: 28px; border-top: 1px solid var(--line-strong); }
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.field label, .field-legend {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  padding: 0;
}
.field-legend { margin-bottom: 2px; }
.field .unit { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.field .req {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ember);
  border: 1px solid rgba(193, 74, 38, 0.35);
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: 1px;
}
.field input[type="text"],
.field input[type="month"] {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: border-color 0.2s, background 0.2s;
}
.field input[type="text"]::placeholder { color: var(--muted-2); font-family: var(--sans); font-size: 13px; }
.field input[type="text"]:focus,
.field input[type="month"]:focus { outline: none; border-color: var(--ember); background: #fffaf3; }
.field input[type="text"]:focus-visible,
.field input[type="month"]:focus-visible { outline: 2px solid rgba(193, 74, 38, 0.24); outline-offset: 1px; }
.field-hint { font-size: 12px; line-height: 1.7; color: var(--muted); max-width: 66ch; }
.field-error {
  display: none;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ember-deep);
}
.field-error.is-on { display: block; }
.field.has-error input[type="text"],
.field.has-error input[type="month"] { border-color: var(--ember); background: rgba(193, 74, 38, 0.04); }
.field.has-error .option-body { border-color: rgba(193, 74, 38, 0.4); }

/* 统计周期实时预览（向导第 1 步） */
.period-preview {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 2px 0 6px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  background: rgba(250, 246, 238, 0.6);
}
.period-preview-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.period-preview-value { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.period-preview.is-error { border-color: rgba(193, 74, 38, 0.5); background: rgba(193, 74, 38, 0.05); }
.period-preview.is-error .period-preview-value { color: var(--ember-deep); font-family: var(--sans); font-size: 12.5px; }

.field-radio { border: 0; margin: 0; padding: 18px 0; }
.field-radio legend { float: left; width: 100%; }
.field-radio .options { clear: both; width: 100%; }

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.option-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 15px;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 246, 238, 0.5);
  transition: border-color 0.2s, background 0.2s;
}
.option:hover .option-body { border-color: var(--line-strong); background: var(--surface); }
.option input:checked + .option-body {
  border-color: var(--ember);
  background: var(--ember-soft);
  box-shadow: inset 0 0 0 1px var(--ember);
}
.option input:focus-visible + .option-body { outline: 2px solid var(--ember); outline-offset: 2px; }
.option-label { font-size: 14px; font-weight: 500; line-height: 1.5; }
.option-sub { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.wizard-clear { margin-top: 14px; text-align: right; }

.wizard-foot {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding: 14px 0;
  background: var(--paper);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -18px 28px -26px rgba(25, 20, 16, 0.55);
}
.wizard-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* 第 7 步确认 */

.confirm { margin-top: 28px; border: 1px solid var(--line-strong); background: var(--surface); padding: 24px 26px 22px; }
.confirm-group { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.confirm-group:last-of-type { padding-bottom: 0; border-bottom: 0; }
.confirm-title {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 400;
}
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.kv-row dt { color: var(--muted); }
.kv-row dd { font-family: var(--mono); text-align: right; }

.confirm-preview { padding-top: 4px; }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.preview-item { background: var(--paper); padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.preview-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: var(--muted); }
.preview-value { font-family: var(--mono); font-size: 16px; }
.preview-item.is-good .preview-value { color: var(--good); }
.preview-item.is-bad .preview-value { color: var(--bad); }
.split-hint { margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.split-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.confirm-tip { margin-top: 12px; font-size: 12px; color: var(--muted); }
.confirm-errors ul { display: grid; gap: 6px; }
.confirm-errors li { font-size: 13px; color: var(--ember-deep); }

/* ---------------- 结果页 ---------------- */

.result-page { padding-bottom: 20px; }
.result-head { padding: 44px 0 26px; border-bottom: 1px solid var(--line); }
.result-title {
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}
.result-meta { font-size: 13px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.02em; }
.result-meta-key {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  text-transform: uppercase;
  margin-right: 4px;
}
.result-meta [data-period-label] { color: var(--ink-2); }
.result-meta [data-kpi] { color: var(--ink-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.result-section { padding: 38px 0; border-bottom: 1px solid var(--line); }
.result-section .section-head h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.section-note {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.01em;
}
.section-lead { font-size: 14px; line-height: 1.85; color: var(--ink-2); margin-top: 16px; max-width: 78ch; }
.sub-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  margin: 32px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.result-foot { padding: 32px 0 20px; }
.print-hint { margin-top: 12px; font-size: 11.5px; color: var(--muted); }

/* 决策卡 */

.decision-card {
  background: var(--surface);
  border-bottom: 1px solid var(--line-strong);
  border-top: 3px solid var(--gold);
}
.decision-card.tone-good { border-top-color: var(--good); }
.decision-card.tone-warn { border-top-color: var(--ember); }
.decision-card.tone-danger { border-top-color: var(--ember-deep); }
.decision-card.tone-info { border-top-color: var(--gold); }
.decision-inner { padding: 32px 0 30px; }
.decision-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.decision-code {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ember-deep);
  text-transform: uppercase;
}
.badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 2px;
}
.badge-tool { border-color: rgba(160, 122, 53, 0.5); color: var(--gold); }
.decision-heading {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 14px 0 10px;
}
.decision-title { font-size: 16.5px; font-weight: 600; color: var(--ink-2); }
.decision-summary { font-size: 14px; line-height: 1.85; color: var(--muted); margin-top: 10px; max-width: 72ch; }

.basis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  background: var(--line);
  border: 1px solid var(--line);
}
.basis > div { background: var(--paper); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.basis dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--muted); }
.basis dd { font-family: var(--mono); font-size: 19px; line-height: 1.2; }
.num.is-good { color: var(--good); }
.num.is-bad { color: var(--bad); }
.breakeven-note {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(160, 122, 53, 0.08);
  border-left: 2px solid var(--gold);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.tolerance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(193, 74, 38, 0.3);
  background: rgba(193, 74, 38, 0.05);
}
.tolerance-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--ember-deep); }
.tolerance-value { font-family: var(--mono); font-size: 18px; }
.tolerance-hint { font-size: 12px; color: var(--muted); }

.decision-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 30px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.decision-block h3 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.decision-block h3 + h3 { margin-top: 18px; }
.decision-block ol { counter-reset: act; }
.decision-block ol li {
  counter-increment: act;
  position: relative;
  padding: 9px 0 9px 30px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}
.decision-block ol li::before {
  content: counter(act, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ember);
}
.decision-block ul li {
  position: relative;
  padding: 7px 0 7px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}
.decision-block ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 4px;
  height: 4px;
  background: var(--line-strong);
}
.decision-cycle { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.decision-note {
  margin-top: 22px;
  padding: 12px 14px;
  border-left: 2px solid var(--line-strong);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* 结构条 */

.struct { margin-top: 22px; }
.struct-bar {
  display: flex;
  height: 38px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  overflow: hidden;
}
.sg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
  padding: 0 8px;
  color: #fff8f1;
  font-family: var(--mono);
  font-size: 10.5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.sg b { font-size: 11px; letter-spacing: 0.08em; font-weight: 600; }
.sg i { font-style: normal; font-size: 10px; opacity: 0.92; }
.sg-F { background: var(--seg-f); }
.sg-L { background: var(--seg-l); }
.sg-R { background: var(--seg-r); }
.sg-O { background: var(--seg-o); }
.sg-net { background: var(--good); }
.struct.is-over .struct-bar { border-color: var(--ember); }
.struct.is-over .std { border-color: var(--ember); }
.struct-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
}
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 8px; height: 8px; background: var(--line-strong); }
.lg-F::before { background: var(--seg-f); }
.lg-L::before { background: var(--seg-l); }
.lg-R::before { background: var(--seg-r); }
.lg-O::before { background: var(--seg-o); }
.lg-net::before { background: var(--good); }
.lg-net.is-bad::before { background: var(--bad); }
.struct-note, .struct-over {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.struct-over { color: var(--ember-deep); }
.struct-compact .struct-bar { height: 26px; }
.struct-compact .sg { padding: 0 5px; font-size: 9px; }
.struct-compact .sg b { font-size: 9.5px; }
.struct-compact .sg i { display: none; }
.struct-compact .struct-legend { font-size: 9.5px; gap: 4px 12px; }

/* 表格 */

.table-card { margin-top: 26px; }
.table-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
}
.table-card-head h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}
.table-card-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-note {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 80ch;
}

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl caption { text-align: left; }
.tbl th, .tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.tbl thead th {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
  padding-top: 0;
}
.tbl tbody th { font-weight: 500; }
.tbl .num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cost-key {
  display: inline-block;
  width: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ember);
  letter-spacing: 0.02em;
}
.cost-name { color: var(--ink-2); }
.tbl .cell-bench {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.tbl .cell-status { white-space: nowrap; }
.tbl .row-total th, .tbl .row-total td { border-top: 1px solid var(--line-strong); }
.tbl .row-total .cost-name { color: var(--ink); font-weight: 500; }
.tbl .row-net th, .tbl .row-net td { border-top: 1px solid var(--line-strong); background: rgba(250, 246, 238, 0.65); }
.tbl .row-net .cost-name { color: var(--ink); font-weight: 600; }
.tbl-compact { font-size: 12.5px; }
.tbl-compact th, .tbl-compact td { padding: 8px 10px; }

.kpi, .kpi-money { font-family: var(--mono); }
.kpi-money .num { font-family: var(--mono); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.status i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.status-ok i { background: var(--good); }
.status-ok { color: var(--good); }
.status-high i { background: var(--ember); }
.status-high { color: var(--ember-deep); }
.status-low i { background: var(--gold); }
.status-low { color: var(--gold); }
.status-na { color: var(--muted-2); }

/* 参考带诊断 */

.diag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}
.diag-card { background: var(--surface); padding: 20px 22px 22px; }
.diag-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.diag-item { padding: 11px 0; border-top: 1px solid var(--line); }
.diag-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.diag-key {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ember);
  width: 14px;
}
.diag-label { font-size: 12.5px; font-weight: 500; }
.diag-pct { font-family: var(--mono); font-size: 12px; margin-left: auto; }
.diag-head .status { margin-left: 4px; }
.diag-explain { margin-top: 5px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.diag-explain.muted { color: var(--muted-2); }
.diag-net {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--line-strong);
}
.diag-card-note .diag-explain { margin-top: 0; }

/* 扭亏 */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  background: var(--line);
  border: 1px solid var(--line);
}
.kpi-cell { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.kpi-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--muted); }
.kpi-value { font-family: var(--mono); font-size: 18px; line-height: 1.25; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.plan-card { border: 1px solid var(--line); background: var(--surface); padding: 20px 22px 18px; }
.plan-card.is-blocked { border-color: rgba(193, 74, 38, 0.35); }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.plan-why { margin-top: 8px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.plan-card .table-wrap { margin-top: 12px; }
.plan-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
  font-family: var(--mono);
}
.verdict {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--muted);
  white-space: nowrap;
}
.verdict-ok { color: var(--good); border-color: rgba(77, 105, 87, 0.4); }
.verdict-tight { color: var(--gold); border-color: rgba(160, 122, 53, 0.45); }
.verdict-bad { color: var(--ember-deep); border-color: rgba(193, 74, 38, 0.4); }

.cuts {
  margin-top: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.cut-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1.4fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.cut-row:first-child { border-top: 0; }
.cut-label { font-size: 13px; }
.cut-current { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cut-row input[type="range"] {
  width: 100%;
  min-height: var(--tap);
  accent-color: var(--ember);
  background: transparent;
  cursor: pointer;
}
.cut-out {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
  min-width: 132px;
  text-align: right;
}
.cut-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 22px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  font-size: 13px;
}
.cut-result b { font-family: var(--mono); font-size: 17px; font-weight: 500; }
.cut-result-hit {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border: 1px solid rgba(193, 74, 38, 0.4);
  color: var(--ember-deep);
  margin-left: auto;
}
.cut-result-hit.is-hit { color: var(--good); border-color: rgba(77, 105, 87, 0.45); }

/* 口径说明 */

.split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin-top: 18px;
}
.split-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}
.split-list dt { color: var(--muted); flex-shrink: 0; }
.split-list dd { text-align: right; font-family: var(--mono); line-height: 1.65; }
.split-list dd .kpi { font-size: 13px; }

/* ---------------- 首页两条规则 ---------------- */

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  background: var(--line);
  border: 1px solid var(--line);
}
.rule-card { background: var(--surface); padding: 24px 24px 26px; }
.rule-no {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ember);
  text-transform: uppercase;
}
.rule-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  margin: 10px 0 8px;
}
.rule-card p { font-size: 13px; line-height: 1.78; color: var(--ink-2); }

/* ---------------- 预设净利率输入 ---------------- */

.field .input-suffix { position: relative; display: block; }
.field .input-suffix input { padding-right: 40px; }
.field .input-suffix-unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

/* ---------------- 达标卡 ---------------- */

.target-card {
  background: var(--surface);
  border-top: 3px solid var(--muted-2);
  border-bottom: 1px solid var(--line-strong);
}
.target-card.is-met { border-top-color: var(--good); }
.target-card.is-critical { border-top-color: var(--gold); }
.target-card.is-below { border-top-color: var(--ember); }
.target-inner { padding: 28px 0 26px; }
.target-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.target-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.target-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 3px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--muted);
}
.target-badge.is-met { color: var(--good); border-color: rgba(77, 105, 87, 0.5); }
.target-badge.is-critical { color: var(--gold); border-color: rgba(160, 122, 53, 0.55); }
.target-badge.is-below { color: var(--ember-deep); border-color: rgba(193, 74, 38, 0.5); }
.target-heading {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 12px 0 18px;
}
.target-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.target-cell { background: var(--paper); padding: 13px 15px; display: flex; flex-direction: column; gap: 3px; }
.target-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--muted); }
.target-value { font-family: var(--mono); font-size: 20px; line-height: 1.2; }
.target-value .kpi { font-family: var(--mono); }
.target-unit { font-size: 11px; color: var(--muted); margin-left: 4px; }
.target-memo { margin-top: 14px; font-size: 13px; line-height: 1.8; color: var(--ink-2); max-width: 80ch; }

/* ---------------- 达标之后：复制开店 ---------------- */

.growth-card {
  background: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--good);
}
.growth-card .shell { padding-top: 30px; padding-bottom: 28px; }
.growth-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.growth-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #d9a58d;
  text-transform: uppercase;
}
.growth-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 3px 11px;
  border: 1px solid rgba(242, 236, 226, 0.4);
  border-radius: 2px;
  color: var(--paper);
}
.growth-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 14px 0 10px;
  color: var(--paper);
}
.growth-lead {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(242, 236, 226, 0.78);
  max-width: 78ch;
}
.growth-why {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-width: 84ch;
}
.growth-why li {
  position: relative;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(242, 236, 226, 0.72);
}
.growth-why li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  background: #d9a58d;
}
.growth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  background: rgba(242, 236, 226, 0.16);
  border: 1px solid rgba(242, 236, 226, 0.2);
}
.growth-block { background: rgba(242, 236, 226, 0.03); padding: 18px 20px 20px; }
.growth-block h3 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: #d9a58d;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.growth-block ul { display: grid; gap: 8px; }
.growth-block li {
  position: relative;
  padding-left: 13px;
  font-size: 12.5px;
  line-height: 1.72;
  color: rgba(242, 236, 226, 0.82);
}
.growth-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 4px;
  height: 4px;
  background: rgba(242, 236, 226, 0.42);
}
.growth-notyet {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 236, 226, 0.22);
  font-size: 12.5px;
  line-height: 1.7;
  color: #d9a58d;
}

/* ---------------- 缺口测算（打平 / 达标） ---------------- */

.squeeze-section .kpi-row { margin-top: 22px; }
.after-breakeven {
  margin-top: 26px;
  padding: 18px 20px 16px;
  border: 1px solid var(--line-strong);
  background: rgba(160, 122, 53, 0.05);
}
.after-breakeven .sub-title { margin-top: 0; padding-top: 0; border-top: 0; }
.kpi-row-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.cut-reset { margin-left: auto; }

/* ---------------- 记录页达标徽标 ---------------- */

.met-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--muted);
  white-space: nowrap;
}
.met-badge.is-met { color: var(--good); border-color: rgba(77, 105, 87, 0.5); }
.met-badge.is-critical { color: var(--gold); border-color: rgba(160, 122, 53, 0.55); }
.met-badge.is-below { color: var(--ember-deep); border-color: rgba(193, 74, 38, 0.45); }
.muted { font-size: 11px; color: var(--muted); font-family: var(--mono); }

/* ---------------- 决策卡（达标后降为次要） ---------------- */

.decision-section { padding-top: 26px; }
.secondary-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  padding-bottom: 10px;
}

/* 注意事项 */

.warnbox {
  border: 1px solid rgba(160, 122, 53, 0.4);
  background: rgba(160, 122, 53, 0.06);
  padding: 14px 18px;
}
.warnbox summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  min-height: 24px;
}
.warnbox ul { margin-top: 10px; display: grid; gap: 7px; }
.warnbox li {
  position: relative;
  padding-left: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.warnbox li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 5px;
  height: 5px;
  background: var(--gold);
}

/* ---------------- 分享 / 长图 / 微信提示 ---------------- */

.wx-tip {
  margin-top: 12px;
  padding: 9px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(160, 122, 53, 0.08);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
}

.share-panel {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.share-panel .shell { padding-top: 20px; padding-bottom: 20px; }
.share-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 18px;
  flex-wrap: wrap;
}
.share-title { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.share-note { font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.share-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.share-name-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.share-name-option input { width: 16px; height: 16px; accent-color: var(--ember); }
.share-status {
  min-height: 18px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: var(--muted);
}
.share-status.is-pending { color: var(--muted); }
.share-status.is-done { color: var(--good); }
.share-status.is-error { color: var(--ember-deep); }
.share-link-box { display: flex; gap: 8px; margin-top: 8px; }
.share-link-box input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
}
.share-link-box .btn { flex-shrink: 0; }
.share-image-wrap { margin: 16px 0 0; padding: 0; }
.share-image-wrap img {
  display: block;
  width: 100%;
  max-width: 540px;
  border: 1px solid var(--line-strong);
  background: #fff;
}
.share-image-hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); }

.share-banner {
  padding: 11px 16px;
  background: rgba(193, 74, 38, 0.08);
  border-bottom: 1px solid rgba(193, 74, 38, 0.22);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ember-deep);
  text-align: center;
}
.share-error {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(193, 74, 38, 0.35);
  background: var(--ember-soft);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* ---------------- 财报导入 ---------------- */

.import-entry {
  display: flex;
  align-items: baseline;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.import-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 1px;
}
.import-link:hover { color: var(--ember-deep); border-color: var(--ember); }
.import-link span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--muted); }
.import-entry-note { font-size: 11.5px; color: var(--muted); }
.wizard-import { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.import-privacy {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(160, 122, 53, 0.07);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 78ch;
}
.import-body { padding: 28px 0 70px; max-width: 960px; }
.import-panel {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 24px 26px 22px;
}
.import-step { display: flex; gap: 14px; align-items: flex-start; }
.import-step-no {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ember);
  padding-top: 4px;
}
.import-step h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.import-step p { margin-top: 4px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.import-file {
  display: block;
  width: 100%;
  margin-top: 16px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 13px;
}
.import-file::file-selector-button {
  margin-right: 12px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.import-file-name {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--muted);
  min-height: 16px;
}
.import-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  cursor: pointer;
}
.import-consent input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--ember); flex-shrink: 0; }
.import-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.import-status {
  margin-top: 14px;
  padding: 9px 12px;
  border-left: 2px solid var(--line-strong);
  background: rgba(250, 246, 238, 0.6);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.import-status.is-uploading { border-color: var(--gold); color: var(--ink-2); }
.import-status.is-done { border-color: var(--good); color: var(--good); }
.import-status.is-error { border-color: var(--ember); color: var(--ember-deep); background: rgba(193, 74, 38, 0.05); }
.import-fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.import-fallback p { width: 100%; margin: 0 0 2px; }
.import-review { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.import-source { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.import-table { min-width: 620px; }
.import-table th:first-child { width: 150px; }
.import-table .import-value { font-family: var(--mono); white-space: nowrap; }
.import-table .import-evidence { font-size: 12px; line-height: 1.6; color: var(--muted); }
.import-table tr.is-missing { background: rgba(193, 74, 38, 0.05); }
.import-table tr.is-missing td { color: var(--ember-deep); }
.conf {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.conf-high { color: var(--good); border-color: rgba(77, 105, 87, 0.5); }
.conf-medium { color: var(--gold); border-color: rgba(160, 122, 53, 0.5); }
.conf-low { color: var(--ember-deep); border-color: rgba(193, 74, 38, 0.45); }
.conf-none { color: var(--muted-2); }
.import-missing-note { margin-top: 14px; font-size: 12.5px; line-height: 1.75; color: var(--ember-deep); }
.import-missing-note.is-ok { color: var(--good); }
.import-warnings {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(160, 122, 53, 0.35);
  background: rgba(160, 122, 53, 0.06);
}
.import-warnings h3 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.import-warnings ul { display: grid; gap: 6px; margin-top: 8px; }
.import-warnings li { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.import-review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.import-tips { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.import-tips h2 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.import-tips ul { margin-top: 10px; display: grid; gap: 7px; }
.import-tips li { position: relative; padding-left: 14px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.import-tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  background: var(--gold);
}

/* 财报未识别字段：向导内高亮 */
.field.has-import-missing {
  border-left: 2px solid var(--ember);
  padding-left: 10px;
  background: rgba(193, 74, 38, 0.035);
}
.field-import-note { font-size: 12px; line-height: 1.65; color: var(--ember-deep); }

/* ---------------- 记录页 ---------------- */

.records-body { padding: 28px 0 40px; }
.records-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}
.tool-field { display: flex; flex-direction: column; gap: 5px; }
.tool-field > span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.tool-field select {
  min-height: var(--tap);
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236f6458' stroke-width='1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.tool-field select:focus { outline: none; border-color: var(--ember); }
.records-tools .btn { margin-left: auto; }

.summary-bar {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.summary-item {
  flex: 1 1 112px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--line);
}
.summary-item:last-of-type { border-right: 0; }
.summary-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; }
.summary-value { font-family: var(--mono); font-size: 15px; line-height: 1.3; white-space: nowrap; }
.summary-note {
  flex: 1 1 100%;
  padding: 10px 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.summary-note b { color: var(--ember-deep); font-weight: 600; }

.records-table-wrap { margin-top: 20px; }
.rec-table { min-width: 1120px; }
.rec-table thead th { padding-top: 10px; }
.rec-table .select-col { width: 46px; }
.rec-table .select-cell { width: 46px; }
.rec-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ember);
  cursor: pointer;
}
.record-link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.record-link:hover { color: var(--ember-deep); border-color: var(--ember); }
.dec-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  white-space: nowrap;
}
.dec-badge.tone-good { color: var(--good); border-color: rgba(77, 105, 87, 0.45); }
.dec-badge.tone-warn { color: var(--ember-deep); border-color: rgba(193, 74, 38, 0.4); }
.dec-badge.tone-danger { color: #fff8f1; background: var(--ember-deep); border-color: var(--ember-deep); }
.dec-badge.tone-info { color: var(--gold); border-color: rgba(160, 122, 53, 0.5); }
.row-actions { white-space: nowrap; display: flex; gap: 2px; flex-wrap: wrap; }
.table-empty { padding: 26px 0; font-size: 13px; color: var(--muted); }
.page-foot-note { margin-top: 28px; font-size: 11.5px; line-height: 1.7; color: var(--muted-2); }

/* 红黑榜 / 对比 */

.rank-panel, .compare-panel { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 18px;
}
.rank-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 500;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.rank-title-good { color: var(--good); }
.rank-title-bad { color: var(--ember-deep); }
.rank-list { display: flex; flex-direction: column; }
.rank-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.rank-index { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.rank-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rank-body a { font-size: 14px; font-weight: 600; text-decoration: none; }
.rank-body a:hover { color: var(--ember-deep); }
.rank-body small { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.rank-value { font-family: var(--mono); font-size: 15px; text-align: right; }
.rank-value.is-good { color: var(--good); }
.rank-value.is-bad { color: var(--bad); }
.rank-drag {
  grid-column: 2 / -1;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.compare-empty { margin-top: 16px; font-size: 13px; color: var(--muted); }
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.compare-card { border: 1px solid var(--line); background: var(--surface); padding: 18px 18px 16px; }
.compare-card h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.compare-meta { margin-top: 3px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.compare-kv {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  background: var(--line);
  border: 1px solid var(--line);
}
.compare-kv > div { background: var(--paper); padding: 6px 5px; display: flex; flex-direction: column; gap: 2px; }
.compare-kv dt { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.compare-kv dd { font-family: var(--mono); font-size: 11.5px; }

/* ---------------- 方法页 ---------------- */

.method-body { padding: 12px 0 20px; max-width: 980px; }
.method-section { padding: 38px 0; border-bottom: 1px solid var(--line); }
.method-section h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 14px;
}
.sec-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ember);
  letter-spacing: 0.1em;
  margin-right: 12px;
  vertical-align: 3px;
}
.method-lead { font-size: 14.5px; line-height: 1.85; color: var(--ink-2); margin-bottom: 12px; }
.method-section p { font-size: 14px; line-height: 1.9; color: var(--ink-2); max-width: 78ch; }
.method-section p + p { margin-top: 10px; }
.method-section .section-note { margin-top: 14px; }
.method-section .formula-box { margin: 16px 0; display: inline-flex; }
.method-section .table-wrap { margin-top: 16px; }
.method-table td { font-size: 13px; }
.method-table td.strong { font-family: var(--mono); color: var(--ember); white-space: nowrap; }
.method-list { margin-top: 14px; display: grid; gap: 8px; }
.method-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}
.method-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 5px;
  height: 5px;
  background: var(--line-strong);
}

.bench-editor {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
}
.bench-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto 18px;
  gap: 10px 14px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.bench-key { font-family: var(--mono); font-size: 12px; color: var(--ember); }
.bench-name { font-size: 13px; }
.bench-field { display: inline-flex; align-items: center; gap: 6px; }
.bench-field span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.bench-field input {
  width: 82px;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13px;
}
.bench-field input:focus { outline: none; border-color: var(--ember); }
.bench-unit { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.bench-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 18px;
}
.bench-value-note { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 250;
  transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px);
  padding: 11px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.5;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 打印专用：屏幕不显示 */
.print-brand { display: none; }

/* ---------------- 打印（A4，只保留结果核心） ---------------- */

@media print {
  @page { size: A4; margin: 14mm 12mm; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10.5pt;
  }

  .grain, .toast, .skip-link, .storage-note, .noscript,
  .site-head, .site-foot, .no-print, .print-hide,
  .share-panel, .share-banner, .wx-tip { display: none !important; }

  .print-brand {
    display: block;
    font-family: var(--mono);
    font-size: 9pt;
    letter-spacing: 0.06em;
    color: #333;
    margin-bottom: 3mm;
  }

  .shell { max-width: none; padding: 0; }
  main { padding: 0; }

  a { color: #000 !important; text-decoration: none !important; }

  .result-head { padding: 6mm 0 4mm; border-bottom: 1px solid #000; }
  .result-title { font-size: 22pt; }
  .result-meta { color: #333; }

  .result-section { padding: 5mm 0; border-bottom: 1px solid #999; break-inside: avoid; }
  .section-head h2 { font-size: 14pt; }
  .section-note { color: #444; }

  .decision-card { border: 1px solid #000; background: #fff; break-inside: avoid; }
  .decision-inner { padding: 4mm 4mm 4mm; }
  .decision-heading { font-size: 18pt; }
  .secondary-kicker { color: #000; }
  .target-card { border: 1px solid #000; background: #fff; break-inside: avoid; }
  .target-heading { font-size: 16pt; }
  .target-grid { background: #999; border-color: #999; }
  .target-cell { background: #fff; }
  .growth-card { background: #fff !important; color: #000 !important; border: 1px solid #000; break-inside: avoid; }
  .growth-card * { color: #000 !important; }
  .growth-grid { background: #999; border-color: #999; }
  .growth-block { background: #fff; }
  .growth-notyet { border-top-color: #000; }
  .after-breakeven { border-color: #000; background: #fff; }
  .basis { border-color: #999; background: #999; }
  .basis > div { background: #fff; }
  .decision-cols { grid-template-columns: 1fr 1fr; }
  .decision-block ol li, .decision-block ul li { border-top-color: #ccc; }

  .table-card { break-inside: avoid; margin-top: 4mm; }
  .tbl { font-size: 9pt; }
  .tbl th, .tbl td { padding: 1.6mm 2mm; border-bottom: 1px solid #bbb; }
  .tbl thead th { color: #333; border-bottom: 1px solid #000; }
  .tbl .row-net td, .tbl .row-net th { background: #f2f2f2; }
  .table-wrap { overflow: visible; }
  .rec-table { min-width: 0; }

  .struct-bar { border: 1px solid #000; break-inside: avoid; }
  .struct-legend { color: #000; }
  .lg::before { border: 1px solid #444; }

  .plan-grid { grid-template-columns: 1fr 1fr; }
  .plan-card { border: 1px solid #444; break-inside: avoid; }
  /* 自定义降幅是交互工具（滑杆 + 重置按钮），打印版不保留 */
  .cuts { display: none !important; }
  .kpi-row { break-inside: avoid; }
  .kpi-cell { border: 1px solid #999; }

  .status-high { color: #000; font-weight: 600; }
  .status-ok { color: #333; }
  .status-low { color: #333; }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1024px) {
  .letter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wizard { padding-top: 32px; }
  .decision-cols { grid-template-columns: 1fr; gap: 22px; }
  .rec-table { min-width: 860px; }
}

@media (max-width: 860px) {
  .shell { padding: 0 22px; }
  /* 头部改为两行：品牌一行，导航一行（横滑，不挤成竖排） */
  .head-inner {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
    padding-top: 6px;
    padding-bottom: 2px;
    min-height: 0;
  }
  .brand { flex: 1 1 auto; min-height: 44px; }
  .brand-text span { display: none; }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line);
    padding: 2px 0 0;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; min-height: 44px; font-size: 13px; }
  .nav a::after { bottom: 7px; }
  .head-actions .btn { display: none; }
  .caution-band { grid-template-columns: 1fr; padding: 26px 24px; }
  .caution-band .btn { grid-column: 1; grid-row: auto; justify-self: start; }
  .step-grid { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .growth-grid { grid-template-columns: 1fr; }
  .target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-row-compact { grid-template-columns: 1fr; }
  .why-item { grid-template-columns: 40px minmax(0, 1fr); }
  .diag-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .basis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-list { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: 1fr; }
  .rank-grid { grid-template-columns: 1fr; gap: 26px; }
  .cut-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cut-row input[type="range"] { grid-column: 1 / -1; }
  .cut-out { grid-column: 1 / -1; text-align: left; min-width: 0; }
  .wizard { max-width: none; }

  /* 记录表 → 卡片式 */
  .records-table-wrap { overflow: visible; }
  .rec-table { min-width: 0; display: block; }
  .rec-table thead { display: none; }
  .rec-table tbody { display: block; }
  .rec-table tr {
    display: block;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .rec-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border: 0;
    text-align: right;
    white-space: normal;
  }
  .rec-table td::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-transform: uppercase;
    text-align: left;
    flex-shrink: 0;
  }
  .rec-table td.select-cell,
  .rec-table td.row-actions { justify-content: flex-start; }
  .rec-table td.select-cell::before,
  .rec-table td.row-actions::before { content: none; }
  .rec-table .row-actions { gap: 6px 12px; }
  .rec-table td[data-cell="name"] { font-size: 15px; font-weight: 600; }
  .rec-table td[data-cell="name"]::before { content: none; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .shell { padding: 0 16px; }
  .head-inner { gap: 12px; }
  .brand img { width: 28px; height: 28px; }
  .brand-text strong { font-size: 16px; }
  .brand-text span { font-size: 8.5px; }
  .nav { gap: 18px; }
  .nav a { font-size: 13px; padding: 6px 0; }
  .hero { padding: 40px 0 34px; }
  .hero-lead { font-size: 14.5px; }
  .hero-row { flex-direction: column; align-items: flex-start; }
  .hero-row .btn { width: 100%; }
  .formula-box { width: 100%; }
  .home-section { padding-top: 38px; }
  .caution-band { margin-top: 38px; }
  .wizard { padding: 26px 16px 64px; }
  .wizard-filter { display: none; }
  .wizard-foot { gap: 10px; }
  .wizard-btns { width: 100%; margin-left: 0; }
  .wizard-btns .btn { flex: 1 1 auto; padding: 0 12px; }
  .step-title { font-size: 27px; }
  .options { grid-template-columns: 1fr; }
  .page-actions { gap: 6px; }
  .page-actions .btn { flex: 1 1 auto; }
  .share-actions { gap: 8px; }
  .share-actions .btn { flex: 1 1 auto; }
  .share-name-option { width: 100%; }
  .share-link-box { flex-wrap: wrap; }
  .share-link-box input { flex: 1 1 100%; }
  .share-link-box .btn { flex: 1 1 auto; }
  /* 导入审核表 → 卡片式，避免窄屏横向滚动 */
  .import-review .table-wrap { overflow: visible; }
  .import-table { min-width: 0; display: block; }
  .import-table thead { display: none; }
  .import-table tbody { display: block; }
  .import-table tr {
    display: block;
    margin-bottom: 10px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .import-table th,
  .import-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }
  .import-table th { font-size: 13.5px; font-weight: 600; text-align: left; }
  .import-table td::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-transform: uppercase;
    flex-shrink: 0;
  }
  .import-table td.import-value { white-space: normal; word-break: break-all; }
  .result-section { padding: 28px 0; }
  .decision-inner { padding: 24px 0 22px; }
  .decision-heading { font-size: 29px; }
  .decision-cols { gap: 20px; }
  .basis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-row { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-list dd { text-align: left; }
  .split-list > div { flex-direction: column; gap: 3px; }
  .cuts { padding: 16px; }
  .cut-result-hit { margin-left: 0; }
  .rank-value { font-size: 13px; }
  .records-tools { gap: 10px; }
  .tool-field { flex: 1 1 140px; }
  .tool-field select { width: 100%; }
  .records-tools .btn { width: 100%; margin-left: 0; }
  .records-tools .btn { flex: 1 1 100%; }
  .summary-item { padding: 10px 12px; }
  .summary-value { font-size: 14px; }
  .bench-row { grid-template-columns: 22px minmax(0, 1fr) auto auto; }
  .bench-unit { display: none; }
  .method-section { padding: 28px 0; }
  .compare-kv { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  /* 结果表窄屏：隐去参考带与诊断列，诊断信息在下方「参考带诊断」中完整呈现 */
  .result-section .tbl thead th:nth-child(4),
  .result-section .tbl thead th:nth-child(5),
  .result-section .tbl tbody td:nth-child(4),
  .result-section .tbl tbody td:nth-child(5) { display: none; }
  .result-section .tbl th, .result-section .tbl td { padding: 8px 6px; font-size: 12.5px; }
  .result-section .tbl .cost-name { font-size: 11.5px; }
  .result-section .tbl .cell-bench, .result-section .tbl .cell-status { display: none; }
  .tbl-compact th, .tbl-compact td { padding: 7px 5px; font-size: 11.5px; }
  .struct-bar { height: 30px; }
  .sg { padding: 0 5px; font-size: 9px; }
  .sg b { font-size: 9.5px; }
  .sg i { display: none; }
  .compare-kv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 400px) {
  .shell { padding: 0 14px; }
  .wizard { padding-left: 14px; padding-right: 14px; }
  .brand-text span { display: none; }
  .nav { gap: 16px; }
  .nav a { font-size: 12.5px; }
  .basis dd { font-size: 16px; }
  .summary-value { font-size: 13px; }
  .letter-grid { grid-template-columns: 1fr; }
}

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