/* ==========================================================================
   跨算云 CrossCalc AI —— 视觉系统
   设计命题：让「合规」看起来像一份有分量的档案，而不是又一个 SaaS 仪表盘。
   基调：深海墨蓝（权威）+ 暖象牙纸（可读）+ 琥珀金（稽核印信）。
   字体：中文标题用宋体（档案感），正文用无衬线（效率），数字用等宽（对账感）。
   全部字体取自系统本地，零外部请求（CSP 与零依赖红线）。
   ========================================================================== */

:root {
  --ink: #0e1b2a;
  --ink-2: #1b3049;
  --ink-3: #3d5468;
  --paper: #f5f0e5;
  --paper-2: #fcf9f3;
  --paper-3: #efe8d8;
  --gold: #b0823a;
  --gold-ink: #7a5620;
  --gold-2: #d8b273;
  --gold-soft: rgba(176, 130, 58, 0.14);
  --teal: #1f6a66;
  --teal-soft: rgba(31, 106, 102, 0.12);
  --red: #9c372c;
  --red-soft: rgba(156, 55, 44, 0.1);
  --line: rgba(14, 27, 42, 0.15);
  --line-soft: rgba(14, 27, 42, 0.08);
  --ring: rgba(176, 130, 58, 0.5);

  --font-display: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Courier New", monospace;

  --rail: 246px;
  --r: 2px;
  --shadow-1: 0 1px 0 rgba(14, 27, 42, 0.04), 0 8px 24px -18px rgba(14, 27, 42, 0.5);
  --shadow-2: 0 24px 60px -28px rgba(14, 27, 42, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  font-size: 14.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 纸张氛围：两团极淡的矿物色 + 细颗粒。纯 CSS/SVG，无外部请求。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(176, 130, 58, 0.1), transparent 60%),
    radial-gradient(900px 600px at 96% 8%, rgba(31, 106, 102, 0.08), transparent 62%),
    radial-gradient(800px 800px at 60% 110%, rgba(14, 27, 42, 0.06), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  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='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

a {
  color: var(--ink);
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--gold-ink);
}

::selection {
  background: var(--gold-2);
  color: var(--ink);
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

p {
  margin: 0 0 0.85em;
}
p:last-child {
  margin-bottom: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 24px 0;
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(175deg, #0d1a28 0%, #101f30 55%, #0b1622 100%);
  color: #e8e1d3;
  padding: 22px 18px 16px;
  overflow: hidden;
  border-right: 1px solid rgba(216, 178, 115, 0.22);
}

.rail::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(216, 178, 115, 0.055) 1px, transparent 1px);
  background-size: 100% 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(216, 178, 115, 0.5), 0 8px 20px -10px #000;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.16em;
  color: #f3ecdd;
  line-height: 1.1;
}

.brand-latin {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-top: 4px;
  opacity: 0.85;
}

.rail-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 178, 115, 0.45), transparent);
  margin: 14px 6px 16px;
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
  overflow-y: auto;
  flex: 1;
  margin: 0 -4px;
  padding: 0 4px;
}

.nav-group {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(216, 178, 115, 0.55);
  padding: 16px 10px 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r);
  color: rgba(232, 225, 211, 0.76);
  text-decoration: none;
  font-size: 13.5px;
  border-left: 2px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-item:hover {
  background: rgba(216, 178, 115, 0.09);
  color: #f6efe0;
}

.nav-item.is-active {
  background: rgba(216, 178, 115, 0.14);
  color: #fdf6e7;
  border-left-color: var(--gold-2);
}

.nav-item .ico {
  width: 15px;
  text-align: center;
  opacity: 0.8;
  font-family: var(--font-mono);
  font-size: 11px;
}

.nav-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--gold);
  color: #12202f;
  border-radius: 20px;
  padding: 1px 7px;
  font-weight: 700;
}

.rail-foot {
  position: relative;
  z-index: 1;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(216, 178, 115, 0.18);
  font-size: 11px;
  line-height: 1.55;
  color: rgba(232, 225, 211, 0.5);
}

.rail-foot b {
  color: var(--gold-2);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 34px;
  background: rgba(245, 240, 229, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.crumb {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.crumb b {
  color: var(--gold-ink);
  font-weight: 600;
}

.topbar-spacer {
  flex: 1;
}

.userchip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 12px;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: var(--paper-2);
}

.userchip .who {
  line-height: 1.2;
}
.userchip .who b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}
.userchip .who span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 14px;
}

.view {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  padding: 30px 34px 60px;
  margin: 0 auto;
  outline: none;
}

.foot {
  border-top: 1px solid var(--line-soft);
  padding: 18px 34px 30px;
  font-size: 11.5px;
  color: var(--ink-3);
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

/* ── 页头 ───────────────────────────────────────────────────────────────── */

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  padding-bottom: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 86px;
  height: 2px;
  background: var(--gold);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.page-title {
  font-size: clamp(24px, 2.6vw, 33px);
  letter-spacing: 0.015em;
}

.page-title em {
  font-style: normal;
  color: var(--gold-ink);
}

.page-lede {
  color: var(--ink-3);
  font-size: 13.5px;
  max-width: 62ch;
  margin-top: 8px;
}

.head-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── 卡片 ───────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 18px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-side {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}

.card.is-flush {
  border-radius: 0;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
}

.card-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  letter-spacing: 0.02em;
}

.card-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card-head .head-actions {
  margin-left: auto;
}

.card-body {
  padding: 20px;
}
.card-body.is-tight {
  padding: 0;
}

.card-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--gold-ink);
  border: 1px solid var(--gold-soft);
  background: var(--gold-soft);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
}

/* ── 按钮 ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #f7f2e7;
}
.btn-primary:hover {
  background: #16293c;
  border-color: var(--gold);
  color: #fff;
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #16120a;
  font-weight: 600;
}
.btn-gold:hover {
  background: var(--gold-2);
  border-color: var(--gold-2);
}

.btn-danger {
  color: var(--red);
  border-color: rgba(156, 55, 44, 0.35);
}
.btn-danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
}
.btn-block {
  width: 100%;
}

.btn-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink-3);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}
.btn-link:hover {
  color: var(--gold-ink);
}

/* ── 表单 ───────────────────────────────────────────────────────────────── */

.field {
  display: block;
  margin-bottom: 16px;
}

.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}

.label .req {
  color: var(--red);
  margin-left: 3px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fffdf8;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.6;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%233d5468'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.field-actions {
  display: flex;
  align-items: flex-end;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  color: inherit;
  border-color: rgba(176, 130, 58, 0.55);
}

.hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.5;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 5px 11px;
  font-size: 12.5px;
  cursor: pointer;
  background: #fffdf8;
  transition: all 0.15s ease;
}

.check input {
  accent-color: var(--gold);
}
.check:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-soft);
}

/* ── 徽标 / 状态 ─────────────────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-3);
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill-gold {
  color: #7a5a19;
  border-color: rgba(176, 130, 58, 0.4);
  background: var(--gold-soft);
}
.pill-teal {
  color: var(--teal);
  border-color: rgba(31, 106, 102, 0.32);
  background: var(--teal-soft);
}
.pill-red {
  color: var(--red);
  border-color: rgba(156, 55, 44, 0.32);
  background: var(--red-soft);
}
.pill-ink {
  color: #f7f2e7;
  background: var(--ink);
  border-color: var(--ink);
}
.pill-plain::before {
  display: none;
}

/* 信用印章 */
.seal {
  --pct: 0;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--gold) calc(var(--pct) * 1%), rgba(14, 27, 42, 0.09) 0);
  padding: 3px;
}

.seal-in {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(176, 130, 58, 0.35);
}

.seal-score {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.seal-cap {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.16em;
  color: var(--gold-ink);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── 表格 ───────────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tbl th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.4);
}

.tbl td {
  padding: 12px 14px;
  border-bottom: 1px dotted var(--line);
  vertical-align: top;
}

.tbl tr:last-child td {
  border-bottom: 0;
}

.tbl tr:hover td {
  background: rgba(176, 130, 58, 0.045);
}

.tbl .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tbl .right {
  text-align: right;
}

/* ── 列表项 ─────────────────────────────────────────────────────────────── */

.list {
  display: flex;
  flex-direction: column;
}

.item {
  display: flex;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  align-items: flex-start;
  transition: background 0.15s ease;
}

.item:last-child {
  border-bottom: 0;
}

.item.is-click {
  cursor: pointer;
}

.item.is-click:hover {
  background: rgba(176, 130, 58, 0.05);
}

.item-main {
  min-width: 0;
  flex: 1;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.item-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── 证据链（本产品的视觉签名） ─────────────────────────────────────────── */

.evidence {
  position: relative;
  padding-left: 26px;
}

.evidence::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), rgba(176, 130, 58, 0.15));
}

.ev-node {
  position: relative;
  padding: 0 0 18px;
}

.ev-node:last-child {
  padding-bottom: 0;
}

.ev-node::before {
  content: attr(data-n);
  position: absolute;
  left: -26px;
  top: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--gold);
  color: var(--gold-ink);
  font-family: var(--font-mono);
  font-size: 8.5px;
  display: grid;
  place-items: center;
  z-index: 1;
}

.ev-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 4px;
}

.ev-text {
  font-size: 13.8px;
  line-height: 1.68;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── 答案卡 ─────────────────────────────────────────────────────────────── */

.answer {
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  background: var(--paper-2);
  border-radius: var(--r);
  overflow: hidden;
}

.answer-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.answer-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.answer-title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.35;
}

.answer-body {
  padding: 18px 22px;
}

.disclaimer {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
  background: var(--paper-3);
  border-left: 2px solid var(--gold);
  padding: 10px 14px;
  border-radius: 0 var(--r) var(--r) 0;
}

.meter {
  height: 4px;
  background: rgba(14, 27, 42, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.meter i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── 统计块 ─────────────────────────────────────────────────────────────── */

.stat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  min-height: 110px;
  display: flex;
  flex-direction: column;
}

.stat::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 60px;
  height: 60px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-3);
  margin-left: 4px;
}

.stat-note {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: auto;
  padding-top: 8px;
  min-height: 18px;
}

/* ── 对话 ───────────────────────────────────────────────────────────────── */

.thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
  overflow-y: auto;
  padding: 4px 2px;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--paper-3);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid transparent;
}

.msg-me {
  align-self: flex-end;
  background: var(--ink);
  color: #f4eee0;
}

.msg-who {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 3px;
}

.msg-time {
  font-family: var(--font-mono);
  font-size: 9px;
  opacity: 0.45;
  margin-top: 4px;
}

/* ── 模态 / 提示 ─────────────────────────────────────────────────────────── */

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 27, 42, 0.42);
  backdrop-filter: blur(3px);
}

.modal {
  width: min(680px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-2);
  border-radius: var(--r);
  animation: pop 0.22s ease-out;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-body {
  padding: 20px;
}

.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
}

.toast-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.toast {
  padding: 11px 16px;
  background: var(--ink);
  color: #f6f0e2;
  border-radius: var(--r);
  font-size: 13px;
  box-shadow: var(--shadow-2);
  border-left: 3px solid var(--gold-2);
  animation: slide 0.24s ease-out;
  max-width: 380px;
}

.toast.is-error {
  border-left-color: #d8695a;
}
.toast.is-ok {
  border-left-color: #6fbfa4;
}

@keyframes slide {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

/* ── 空态 ───────────────────────────────────────────────────────────────── */

.empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--ink-3);
}

.empty-mark {
  font-family: var(--font-display);
  font-size: 26px;
  color: rgba(122, 86, 32, 0.42);
  margin-bottom: 6px;
  letter-spacing: 0.2em;
  line-height: 1.2;
}

.empty p {
  font-size: 13px;
  margin: 0;
}

/* ── 落地页 ─────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 34px;
  align-items: start;
  padding: 34px 0 38px;
}

.hero-title {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: 0.005em;
}

.hero-title em {
  font-style: normal;
  color: var(--gold-ink);
  position: relative;
}

.hero-title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.38em;
  background: var(--gold-soft);
  z-index: -1;
}

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

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-side {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 12.5px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  margin: 10px 0 34px;
}

.band-num {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.band-cap {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 7px;
}

.step {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.step:last-child {
  border-bottom: 0;
}
.step-n {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-ink);
  width: 30px;
  flex: 0 0 30px;
  line-height: 1.2;
}
.step h4 {
  font-size: 15px;
  margin-bottom: 4px;
}
.step p {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
}

/* ── 登录 ───────────────────────────────────────────────────────────────── */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 0;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  max-width: 940px;
  margin: 30px auto;
  background: var(--paper-2);
}

.auth-side {
  background: linear-gradient(160deg, #0e1b2a, #16293c 60%, #0b1622);
  color: #e9e2d4;
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
}

.auth-side::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(216, 178, 115, 0.2);
  border-radius: 50%;
}

.auth-side h2 {
  font-size: 26px;
  line-height: 1.35;
  margin: 18px 0 14px;
}

.auth-side p {
  font-size: 13px;
  color: rgba(233, 226, 212, 0.72);
  line-height: 1.75;
}

.auth-body {
  padding: 38px 34px;
}

.demo-accounts {
  margin-top: 22px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.demo-accounts .kv {
  cursor: pointer;
}
.demo-accounts .kv:hover b {
  color: var(--gold-ink);
}

/* ── 工具类 ─────────────────────────────────────────────────────────────── */

.muted {
  color: var(--ink-3);
}
.small {
  font-size: 12px;
}
.tiny {
  font-size: 11px;
}
.nowrap {
  white-space: nowrap;
}
.mt-0 {
  margin-top: 0;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-8 {
  margin-bottom: 8px;
}
.mb-12 {
  margin-bottom: 12px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-24 {
  margin-bottom: 24px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row-tight {
  gap: 6px;
}
.spacer {
  flex: 1;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 18px 0;
}
.text-gold {
  color: var(--gold-ink);
}
.text-teal {
  color: var(--teal);
}
.text-red {
  color: var(--red);
}
.serif {
  font-family: var(--font-display);
}
.center {
  text-align: center;
}
.pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.noscript {
  padding: 40px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
}

.reveal > * {
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-side {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 22px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --rail: 0px;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    gap: 12px;
    overflow-x: auto;
  }
  .rail::after,
  .rail-rule,
  .rail-foot,
  .brand-latin {
    display: none;
  }
  .brand {
    padding: 0;
    flex: 0 0 auto;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .brand-name {
    font-size: 17px;
    letter-spacing: 0.1em;
  }
  .nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    flex: 1;
    padding: 0;
  }
  .nav-group {
    display: none;
  }
  .nav-item {
    white-space: nowrap;
    border-left: 0;
    border-bottom: 2px solid transparent;
    font-size: 12.5px;
    padding: 7px 10px;
  }
  .nav-item.is-active {
    border-left: 0;
    border-bottom-color: var(--gold-2);
  }
  .view {
    padding: 20px 18px 50px;
  }
  .topbar,
  .foot {
    padding-left: 18px;
    padding-right: 18px;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .field-row,
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-side {
    padding: 28px 24px;
  }
  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .head-actions {
    margin-left: 0;
  }
}

@media print {
  .rail,
  .topbar,
  .foot,
  .head-actions,
  .btn {
    display: none !important;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  body {
    background: #fff;
  }
}

/* ── 站点门控：客户域名下隐藏回链与备案（自有域名由 site-gate.js 加 .site-ours） ── */
html:not(.site-ours) .js-back {
  display: none !important;
}