/* ============================================================
   企业全面风险诊断 · 视觉系统
   机构卷宗 / 诊断书质感：墨蓝 + 黄铜 + 米纸；宋体标题压阵。
   中文走系统字体栈（大陆加载快、零外部依赖）。
   ============================================================ */

:root {
  /* 墨色与纸 */
  --ink:        #112a3f;   /* 主文字 / 结构 */
  --ink-soft:   #3d5468;   /* 次级文字 */
  --ink-faint:  #6a7d8d;   /* 辅助说明 */
  --paper:      #f4efe4;   /* 页面底：暖米纸 */
  --paper-card: #fbf7ee;   /* 卡片底 */
  --paper-deep: #ece4d4;   /* 凹陷/轨道 */
  --rule:       rgba(17, 42, 63, 0.16);  /* 细线 */
  --rule-soft:  rgba(17, 42, 63, 0.08);

  /* 金属点缀 */
  --brass:      #b0894e;
  --brass-deep: #8c6a37;
  --steel:      #2f6b86;

  /* 风险三色（低饱和、沉稳） */
  --green:      #3f7a52;  --green-bg: #e6efe5;  --green-line: #bcd3bd;
  --amber:      #b5822a;  --amber-bg: #f4ead2;  --amber-line: #e3cb96;
  --red:        #a8393a;  --red-bg:   #f2e1df;  --red-line:   #ddb3ad;

  /* 字体 */
  --serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", SimSun, Georgia, "Times New Roman", serif;
  --sans:  "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 760px;
  --radius: 4px;       /* 克制的圆角，偏文档感 */
  --shadow: 0 14px 40px -18px rgba(17, 42, 63, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  position: relative;
  min-height: 100vh;
}

/* 纸张颗粒（极淡，营造质感，无外部资源） */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--brass); color: #fff; }

b, strong { font-weight: 600; color: var(--ink); }

/* ---------- 报头 masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, #fbf7ee, var(--paper));
}
.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex; align-items: center; gap: 14px;
}
.masthead__seal {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 20px; color: var(--brass-deep);
  border: 1.5px solid var(--brass);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(176, 137, 78, 0.25);
}
.masthead__titles { display: flex; flex-direction: column; line-height: 1.2; }
.masthead__kicker {
  font-size: 11px; letter-spacing: 0.32em; text-transform: none;
  color: var(--ink-faint);
}
.masthead__title {
  font-family: var(--serif);
  font-size: 19px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.04em;
}

/* ---------- 文档列 ---------- */
.doc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.eyebrow {
  font-size: 12px; letter-spacing: 0.26em; color: var(--brass-deep);
  margin-bottom: 18px; padding-top: 4px;
}

/* ---------- 落地区 ---------- */
.landing { padding: 52px 0 40px; animation: rise 0.6s ease both; }
.landing__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}
.landing__lead {
  font-size: 16.5px; color: var(--ink-soft); max-width: 38em;
  margin-bottom: 34px;
}
.stats {
  list-style: none; display: flex; gap: 14px; flex-wrap: wrap;
  padding: 22px 0; margin-bottom: 30px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.stat { flex: 1; min-width: 90px; }
.stat__num {
  display: block; font-family: var(--serif); font-size: 34px; font-weight: 600;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1;
}
.stat__unit { font-size: 15px; margin-left: 2px; color: var(--ink-soft); }
.stat__cap { font-size: 12.5px; letter-spacing: 0.16em; color: var(--ink-faint); }
.landing__note { margin-top: 22px; font-size: 12.5px; color: var(--ink-faint); }

/* ---------- 按钮 ---------- */
.btn {
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius);
  padding: 12px 26px; cursor: pointer; transition: all 0.18s ease;
  letter-spacing: 0.04em; background: none;
}
.btn--lg { padding: 15px 34px; font-size: 16px; }
.btn--block { display: block; width: 100%; }
.btn--primary {
  background: var(--ink); color: #fdfbf6;
  box-shadow: 0 6px 18px -8px rgba(17, 42, 63, 0.6);
}
.btn--primary:hover { background: #0b1f30; transform: translateY(-1px); }
.btn--ghost { color: var(--ink-soft); border-color: var(--rule); background: transparent; }
.btn--ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ---------- 进度 ---------- */
.progress { padding: 28px 0 10px; }
.progress__label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; letter-spacing: 0.14em; color: var(--ink-faint);
  margin-bottom: 9px;
}
.progress__label b { font-family: var(--serif); font-size: 15px; color: var(--ink); letter-spacing: 0; }
.progress__track { height: 3px; background: var(--paper-deep); border-radius: 2px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--brass); transition: width 0.4s cubic-bezier(.4,0,.2,1); }

/* ---------- 步骤 / 题目 ---------- */
.step { animation: rise 0.4s ease both; padding-top: 8px; }
.step__eyebrow { font-size: 12px; letter-spacing: 0.22em; color: var(--brass-deep); margin-bottom: 8px; }
.step__title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 5vw, 27px);
  line-height: 1.35; margin-bottom: 10px;
}
.step__intro { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }

.q { padding: 20px 0; border-bottom: 1px solid var(--rule-soft); }
.q:last-of-type { border-bottom: none; }
.q__num { font-family: var(--serif); color: var(--brass-deep); font-size: 14px; margin-right: 6px; }
.q__text { font-size: 16px; font-weight: 500; line-height: 1.6; margin-bottom: 14px; color: var(--ink); }

/* 单选三档 */
.opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opt {
  position: relative; flex: 1; min-width: 88px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px; cursor: pointer;
  background: var(--paper-card); border: 1px solid var(--rule);
  border-radius: var(--radius); font-size: 14.5px; color: var(--ink-soft);
  transition: all 0.14s ease; user-select: none; text-align: center;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { border-color: var(--ink-soft); }
.opt:has(input:checked) {
  background: var(--ink); color: #fdfbf6; border-color: var(--ink);
  box-shadow: 0 4px 12px -6px rgba(17,42,63,.5);
}
.opt:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ---------- 导航 ---------- */
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--rule); }
.nav__warn { color: var(--red); font-size: 13px; text-align: center; margin-bottom: 12px; }
[hidden] { display: none !important; }

/* ---------- 摘要（钢印评分） ---------- */
.summary { text-align: center; padding: 40px 0 8px; animation: rise 0.5s ease both; }
.summary__eyebrow { font-size: 12px; letter-spacing: 0.26em; color: var(--brass-deep); margin-bottom: 26px; }
.seal {
  width: 184px; height: 184px; margin: 0 auto 26px; position: relative;
  display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--brass);
  box-shadow: inset 0 0 0 6px rgba(176,137,78,0.18);
}
.seal::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%;
  border: 1px dashed rgba(176,137,78,0.4);
}
.seal__num { font-family: var(--serif); font-size: 62px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.seal__cap { font-size: 12px; letter-spacing: 0.2em; color: var(--ink-faint); margin-top: 6px; }
.seal--green .seal__num { color: var(--green); }
.seal--yellow .seal__num { color: var(--amber); }
.seal--red .seal__num { color: var(--red); }

.badge {
  display: inline-block; padding: 7px 22px; border-radius: 40px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.08em;
  border: 1px solid transparent;
}
.badge--green { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.badge--yellow { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.badge--red { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.summary__line { margin-top: 22px; color: var(--ink-soft); font-size: 15px; max-width: 30em; margin-left: auto; margin-right: auto; }
.summary__redflag { margin-top: 14px; color: var(--red); font-size: 13.5px; font-weight: 600; }

.lockcard {
  margin: 32px 0 0; padding: 26px 24px; background: var(--paper-card);
  border: 1px solid var(--rule); border-top: 3px solid var(--brass);
  border-radius: var(--radius); text-align: left;
}
.lockcard__title { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.lockcard__sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 22px; }

/* ---------- 留资表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: 0.04em; }
.field input[type="text"], .field input[type="tel"] {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
  padding: 12px 14px; background: #fff; border: 1px solid var(--rule);
  border-radius: var(--radius); transition: border-color 0.15s;
}
.field input:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px rgba(47,107,134,0.12); }
.field--error input { border-color: var(--red); }
.field__err { color: var(--red); font-size: 12.5px; margin-top: 5px; display: none; }
.field--error .field__err { display: block; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* 蜜罐 */

.consent { margin: 18px 0 4px; }
.consent__row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
.consent__row input { margin-top: 3px; width: 17px; height: 17px; flex: none; accent-color: var(--ink); cursor: pointer; }
.consent__row span { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.consent__row a { color: var(--steel); }
.consent--error span { color: var(--red); }

/* ---------- 报告 ---------- */
.report { animation: rise 0.5s ease both; }
.report__masthead { text-align: center; padding: 16px 0 24px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.report__doctitle { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: 0.04em; }
.report__date { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.1em; margin-top: 6px; }

.report__head { display: flex; align-items: center; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.report__score { display: flex; align-items: baseline; gap: 8px; }
.report__score b { font-family: var(--serif); font-size: 46px; font-variant-numeric: tabular-nums; line-height: 1; }
.report__score-cap { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.14em; }
.report__head-right { margin-left: auto; text-align: right; }

/* 各维条形 */
.bars { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.bars__title, .section__title { font-family: var(--serif); font-size: 17px; font-weight: 600; margin-bottom: 18px; letter-spacing: 0.04em; }
.bar { display: grid; grid-template-columns: 8.5em 1fr 3em; align-items: center; gap: 12px; margin-bottom: 13px; }
.bar__label { font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__track { height: 7px; background: var(--paper-deep); border-radius: 4px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.bar__fill--green { background: var(--green); }
.bar__fill--yellow { background: var(--amber); }
.bar__fill--red { background: var(--red); }
.bar__val { font-family: var(--serif); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.bar__val--redline { color: var(--red); }

/* 维度卡片：四段钩子 */
.section { padding: 26px 0; }
.cards { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--paper-card); border: 1px solid var(--rule);
  border-left: 4px solid var(--ink); border-radius: var(--radius);
  padding: 20px 22px; animation: rise 0.4s ease both;
}
.card--red { border-left-color: var(--red); }
.card--yellow { border-left-color: var(--amber); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card__name { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.card__tag { font-size: 11.5px; font-weight: 600; padding: 3px 11px; border-radius: 30px; letter-spacing: 0.06em; }
.card__tag--red { background: var(--red-bg); color: var(--red); }
.card__tag--yellow { background: var(--amber-bg); color: var(--amber); }
.card__redline { font-size: 12px; color: var(--red); font-weight: 600; margin-bottom: 12px; }

.issue { padding: 14px 0; border-top: 1px dashed var(--rule); }
.issue:first-of-type { border-top: none; }
.issue__phenom { font-size: 14.5px; font-weight: 500; color: var(--ink); margin-bottom: 7px; }
.issue__phenom .dot { color: var(--red); margin-right: 6px; }
.issue__phenom .dot--mid { color: var(--amber); }
.issue__conseq { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; padding-left: 14px; border-left: 2px solid var(--rule); }
.issue__law { color: var(--brass-deep); font-weight: 600; }
.card__advice { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--ink); }
.card__advice::first-letter { color: var(--brass-deep); }

.followup {
  margin-top: 26px; padding: 24px; text-align: center;
  background: linear-gradient(180deg, #14304a, var(--ink)); color: #f3ede0;
  border-radius: var(--radius);
}
.followup__title { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-bottom: 8px; color: #fff; }
.followup__sub { font-size: 14px; color: #c4d2dd; margin-bottom: 18px; }
.followup .btn--primary { background: var(--brass); color: #1a1207; }
.followup .btn--primary:hover { background: #c39a57; }

.report__actions { display: flex; gap: 12px; justify-content: center; margin: 28px 0 14px; }
.disclaimer { font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.6; padding: 18px 0 0; border-top: 1px solid var(--rule); margin-top: 8px; }

/* ---------- 页脚 ---------- */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 30px 24px 50px; font-size: 12px; color: var(--ink-faint); line-height: 1.7; }
.footer__rule { height: 1px; background: var(--rule); margin-bottom: 18px; }
.footer a { color: var(--steel); }

/* ---------- 动画 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rise 0.4s ease both; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- 响应式 ---------- */
@media (min-width: 760px) {
  body { font-size: 16.5px; }
  .doc { padding-left: 40px; padding-right: 40px; }
  .masthead__inner { padding-left: 40px; padding-right: 40px; }
}
@media (max-width: 460px) {
  .opt { min-width: 0; flex-basis: calc(33% - 8px); padding: 11px 6px; }
  .bar { grid-template-columns: 7em 1fr 2.6em; gap: 8px; }
  .report__head { gap: 14px; }
}

/* ---------- 打印 ---------- */
@media print {
  body { background: #fff; }
  body::before, .masthead, .footer, .report__actions, .followup, .nav, #landing { display: none !important; }
  .doc { max-width: 100%; }
  .card, .lockcard { box-shadow: none; break-inside: avoid; }
}
