/* ============================================================================
   trace/app.css · 产品溯源（对外公示页）
   ----------------------------------------------------------------------------
   这一页的视觉目标和站内其他页面**刻意不同**：
     站内页面是"工作台"——信息密度高、深色、强调数据
     这一页是"说明书"——留白多、浅色、强调可读与可打印
   所以它用自己的一套排版节奏，而不是复用 app.css 的紧凑栅格。

   选择器一律 .tr- 前缀；全站禁 !important。
   ============================================================================ */

.tr-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

/* ── 顶栏 ────────────────────────────────────────────────────────────── */
.tr-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.tr-brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--t-sm);
}
.tr-brand .mark {
  width: 26px; height: 26px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accentSoft); color: var(--accent);
}
.tr-brand .mark svg { width: 15px; height: 15px; }
.tr-note { margin-left: auto; color: var(--faint); font-size: var(--t-xs); }

.tr-wrap { max-width: 780px; margin: 0 auto; padding: 34px 20px 60px; }

/* ── 首屏 ────────────────────────────────────────────────────────────── */
.tr-hero { margin-bottom: 26px; }
.tr-hero h1 { font-size: 30px; font-weight: 760; letter-spacing: -.03em; margin: 0 0 8px; }
.tr-hero p { margin: 0 0 18px; color: var(--muted); font-size: var(--t-sm); line-height: 1.8; }
.tr-form { display: flex; gap: 9px; flex-wrap: wrap; }
.tr-form input {
  flex: 1 1 240px; min-height: 46px; padding: 10px 14px;
  color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--line2); border-radius: var(--r-md);
  font: inherit; font-size: 16px; outline: none; letter-spacing: .04em;
}
.tr-form input:focus { border-color: var(--accent); }
.tr-form .btn { display: inline-flex; align-items: center; gap: 7px; min-height: 46px; }
.tr-form .btn svg { width: 16px; height: 16px; }
.tr-samples { margin-top: 12px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: var(--t-xs); }
.tr-sample {
  padding: 4px 11px; border-radius: var(--r-full); cursor: pointer;
  border: 1px solid var(--line2); background: var(--surface);
  color: var(--soft); font: inherit; font-size: var(--t-xs);
}
.tr-sample:hover { border-color: var(--accent); color: var(--ink); }

/* ── 卡片 ────────────────────────────────────────────────────────────── */
.tr-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 20px 22px; margin-bottom: 16px;
}
.tr-label { color: var(--faint); font-size: var(--t-xs); font-weight: 640; letter-spacing: .06em; }

.tr-prod-hd { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tr-prod-hd h2 { margin: 3px 0 8px; font-size: 23px; font-weight: 740; letter-spacing: -.02em; }
.tr-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tr-tag {
  padding: 2px 9px; border-radius: var(--r-full);
  border: 1px solid var(--line2); color: var(--muted); font-size: var(--t-xs);
}
.tr-code { margin-left: auto; text-align: right; }
.tr-code b {
  display: block; font-family: var(--f-mono); font-size: var(--t-base);
  letter-spacing: .06em; color: var(--ink); margin-top: 3px;
}

.tr-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px;
  padding-top: 15px; border-top: 1px solid var(--line);
}
.tr-facts > div { display: flex; flex-direction: column; gap: 3px; }
.tr-facts span { color: var(--faint); font-size: var(--t-xs); }
.tr-facts b { color: var(--ink); font-size: var(--t-sm); font-weight: 680; }

/* ── 时间线 ──────────────────────────────────────────────────────────── */
.tr-sec-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.tr-sec-hd h3 { margin: 0; font-size: var(--t-lg); font-weight: 700; }
.tr-flow { list-style: none; margin: 0; padding: 0; position: relative; }
/* 竖线：靠 ::before 画一条，比给每个 li 加边框干净 */
.tr-flow::before {
  content: ''; position: absolute; left: 15px; top: 14px; bottom: 14px;
  width: 2px; background: var(--line2);
}
.tr-node { display: flex; gap: 13px; padding: 9px 0; position: relative; }
.tr-node-ico {
  width: 32px; height: 32px; border-radius: 50%; flex: none; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elev); border: 2px solid var(--accent); color: var(--accent);
}
.tr-node-ico svg { width: 15px; height: 15px; }
.tr-node-body { flex: 1; min-width: 0; padding-top: 2px; }
.tr-node-hd { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.tr-node-hd b { color: var(--ink); font-size: var(--t-sm); font-weight: 700; }
.tr-node-hd time { color: var(--faint); font-size: var(--t-xs); font-family: var(--f-mono); }
.tr-who { color: var(--muted); font-size: var(--t-xs); }
.tr-node-body p { margin: 4px 0 0; color: var(--soft); font-size: var(--t-sm); line-height: 1.75; }

.tr-stagebar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px;
  padding-top: 14px; border-top: 1px dashed var(--line); }
.tr-st {
  padding: 3px 10px; border-radius: var(--r-full);
  border: 1px dashed var(--line2); color: var(--faint); font-size: var(--t-xs);
}
.tr-st.on { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accentSoft); }

/* ── 说明与动作 ──────────────────────────────────────────────────────── */
.tr-safe { display: flex; gap: 11px; align-items: flex-start; }
.tr-safe svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--warn); }
.tr-safe b { color: var(--ink); font-size: var(--t-sm); }
.tr-safe p { margin: 5px 0 0; color: var(--muted); font-size: var(--t-xs); line-height: 1.8; }
.tr-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.tr-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.tr-actions .btn svg { width: 14px; height: 14px; }

.tr-empty { text-align: center; padding: 44px 20px; color: var(--muted); font-size: var(--t-sm); }
.tr-empty svg { width: 26px; height: 26px; color: var(--accent); display: block; margin: 0 auto 10px; }
.tr-empty.small { padding: 20px; }
.tr-empty .btn { margin-top: 12px; }
.tr-loading { text-align: center; padding: 44px; color: var(--faint); font-size: var(--t-sm); }
.tr-dim { color: var(--faint); font-size: var(--t-xs); }

.tr-foot {
  max-width: 780px; margin: 0 auto; padding: 22px 20px 40px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline;
  color: var(--muted); font-size: var(--t-xs);
}

/* ── 手机端 ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .tr-wrap { padding: 22px 14px 44px; }
  .tr-hero h1 { font-size: 24px; }
  .tr-card { padding: 16px 15px; border-radius: var(--r-lg); }
  .tr-prod-hd h2 { font-size: 20px; }
  .tr-code { margin-left: 0; text-align: left; width: 100%; }
  .tr-facts { grid-template-columns: repeat(2, 1fr); }
  .tr-form input { font-size: 16px; }   /* iOS 聚焦不放大 */
}

/* ── 打印：这一页很可能会被存成 PDF 发给客户 ───────────────────────── */
@media print {
  .tr-top, .tr-foot, .tr-actions, .tr-form, .tr-samples, .tr-stagebar { display: none; }
  .tr-body { background: #fff; }
  .tr-card { break-inside: avoid; border-color: #ccc; box-shadow: none; }
  .tr-wrap { max-width: none; padding: 0; }
}
